diff --git a/ury_pos/public/urypos/assets/Login-19b9fb8e.js b/ury_pos/public/urypos/assets/Login-e2605211.js similarity index 98% rename from ury_pos/public/urypos/assets/Login-19b9fb8e.js rename to ury_pos/public/urypos/assets/Login-e2605211.js index 4154543..59644c4 100644 --- a/ury_pos/public/urypos/assets/Login-19b9fb8e.js +++ b/ury_pos/public/urypos/assets/Login-e2605211.js @@ -1 +1 @@ -import{_ as n,u as a,o,c as i,a as e,w as d,b as l,v as u,d as c}from"./index-214798b4.js";const p={setup(){return{auth:a()}}},h={class:"flex flex-col justify-center py-12 sm:px-6 lg:px-8"},m={class:"mt-8 sm:mx-auto sm:w-full sm:max-w-md"},f={class:"bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10"},w={class:"relative mt-1"},x=e("div",{class:"absolute inset-y-0 left-0 flex items-center px-2"},[e("svg",{class:"field-icon email-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M2.5 7.65149V15.0757C2.5 15.4374 2.64367 15.7842 2.8994 16.04C3.15513 16.2957 3.50198 16.4394 3.86364 16.4394H16.1364C16.498 16.4394 16.8449 16.2957 17.1006 16.04C17.3563 15.7842 17.5 15.4374 17.5 15.0757V7.65149",stroke:"#74808B","stroke-miterlimit":"10","stroke-linecap":"square"}),e("path",{d:"M17.5 7.57572V5.53026C17.5 5.1686 17.3563 4.82176 17.1006 4.56603C16.8449 4.31029 16.498 4.16663 16.1364 4.16663H3.86364C3.50198 4.16663 3.15513 4.31029 2.8994 4.56603C2.64367 4.82176 2.5 5.1686 2.5 5.53026V7.57572L10 10.8333L17.5 7.57572Z",stroke:"#74808B","stroke-miterlimit":"10","stroke-linecap":"square"})])],-1),C={class:"mt-1"},g={class:"relative"},b=["type"],_=e("div",{class:"absolute inset-y-0 left-0 flex items-center px-2"},[e("svg",{class:"field-icon password-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0961 1.93768H10.0264C8.94806 1.92763 7.90976 2.34591 7.13951 3.10075C6.36866 3.85619 5.9294 4.88687 5.91833 5.96612L5.91831 5.96612V5.97124V6.52695H4.3125C3.20793 6.52695 2.3125 7.42238 2.3125 8.52695V16.0165C2.3125 17.121 3.20793 18.0165 4.3125 18.0165H15.7356C16.8401 18.0165 17.7356 17.121 17.7356 16.0165V8.52695C17.7356 7.42238 16.8401 6.52695 15.7356 6.52695H14.1297V6.04576C14.1397 4.96742 13.7214 3.92913 12.9666 3.15888C12.2112 2.38803 11.1805 1.94877 10.1012 1.9377V1.93768H10.0961ZM13.1297 6.52695V6.04336V6.03838H13.1297C13.1378 5.22428 12.8222 4.44029 12.2524 3.85881C11.6831 3.27793 10.9067 2.94667 10.0934 2.93768H10.024H10.019V2.93765C9.20491 2.92955 8.42092 3.24512 7.83944 3.81497C7.25856 4.38423 6.9273 5.1607 6.91831 5.9739V6.52695H13.1297ZM4.3125 7.52695C3.76022 7.52695 3.3125 7.97467 3.3125 8.52695V16.0165C3.3125 16.5687 3.76022 17.0165 4.3125 17.0165H15.7356C16.2879 17.0165 16.7356 16.5687 16.7356 16.0165V8.52695C16.7356 7.97467 16.2879 7.52695 15.7356 7.52695H4.3125ZM10.0242 13.2384C10.5581 13.2384 10.9909 12.8056 10.9909 12.2717C10.9909 11.7377 10.5581 11.3049 10.0242 11.3049C9.49023 11.3049 9.05738 11.7377 9.05738 12.2717C9.05738 12.8056 9.49023 13.2384 10.0242 13.2384ZM11.9909 12.2717C11.9909 13.3579 11.1104 14.2384 10.0242 14.2384C8.93794 14.2384 8.05738 13.3579 8.05738 12.2717C8.05738 11.1854 8.93794 10.3049 10.0242 10.3049C11.1104 10.3049 11.9909 11.1854 11.9909 12.2717Z",fill:"#74808B"})])],-1),v={class:"absolute inset-y-0 right-0 flex items-center pr-3 text-sm leading-5"},y={key:0,class:"text-gray-400"},V={key:1,class:"text-gray-400"},H=e("div",null,[e("button",{type:"submit",class:"flex w-full justify-center rounded-md border border-transparent bg-blue-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"}," Sign in ")],-1);function k(r,s,M,B,P,Z){return o(),i("div",h,[e("div",m,[e("div",f,[e("form",{class:"space-y-6",onSubmit:s[3]||(s[3]=d((...t)=>this.auth.login&&this.auth.login(...t),["prevent"]))},[e("div",w,[l(e("input",{name:"user_id","onUpdate:modelValue":s[0]||(s[0]=t=>this.auth.userId=t),required:"",class:"block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 pr-8 pl-10 placeholder-gray-400 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-blue-500 sm:text-sm",placeholder:"jane@exmaple.com"},null,512),[[u,this.auth.userId]]),x]),e("div",C,[e("div",g,[l(e("input",{name:"currentPassword",type:this.auth.passwordFieldType,"onUpdate:modelValue":s[1]||(s[1]=t=>this.auth.currentPassword=t),required:"",placeholder:"•••••",class:"block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 pl-10 placeholder-gray-400 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-blue-500 sm:text-sm"},null,8,b),[[c,this.auth.currentPassword]]),_,e("div",v,[e("button",{type:"button",class:"absolute inset-y-0 right-0 flex items-center pr-3 text-sm leading-5",onClick:s[2]||(s[2]=t=>this.auth.showPassword=!this.auth.showPassword)},[this.auth.showPassword?(o(),i("span",y,"Hide")):(o(),i("span",V,"Show"))])])])]),H],32)])])])}const q=n(p,[["render",k]]);export{q as default}; +import{_ as n,u as a,o,c as i,a as e,w as d,b as l,v as u,d as c}from"./index-e6ebee7c.js";const p={setup(){return{auth:a()}}},h={class:"flex flex-col justify-center py-12 sm:px-6 lg:px-8"},m={class:"mt-8 sm:mx-auto sm:w-full sm:max-w-md"},f={class:"bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10"},w={class:"relative mt-1"},x=e("div",{class:"absolute inset-y-0 left-0 flex items-center px-2"},[e("svg",{class:"field-icon email-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M2.5 7.65149V15.0757C2.5 15.4374 2.64367 15.7842 2.8994 16.04C3.15513 16.2957 3.50198 16.4394 3.86364 16.4394H16.1364C16.498 16.4394 16.8449 16.2957 17.1006 16.04C17.3563 15.7842 17.5 15.4374 17.5 15.0757V7.65149",stroke:"#74808B","stroke-miterlimit":"10","stroke-linecap":"square"}),e("path",{d:"M17.5 7.57572V5.53026C17.5 5.1686 17.3563 4.82176 17.1006 4.56603C16.8449 4.31029 16.498 4.16663 16.1364 4.16663H3.86364C3.50198 4.16663 3.15513 4.31029 2.8994 4.56603C2.64367 4.82176 2.5 5.1686 2.5 5.53026V7.57572L10 10.8333L17.5 7.57572Z",stroke:"#74808B","stroke-miterlimit":"10","stroke-linecap":"square"})])],-1),C={class:"mt-1"},g={class:"relative"},b=["type"],_=e("div",{class:"absolute inset-y-0 left-0 flex items-center px-2"},[e("svg",{class:"field-icon password-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0961 1.93768H10.0264C8.94806 1.92763 7.90976 2.34591 7.13951 3.10075C6.36866 3.85619 5.9294 4.88687 5.91833 5.96612L5.91831 5.96612V5.97124V6.52695H4.3125C3.20793 6.52695 2.3125 7.42238 2.3125 8.52695V16.0165C2.3125 17.121 3.20793 18.0165 4.3125 18.0165H15.7356C16.8401 18.0165 17.7356 17.121 17.7356 16.0165V8.52695C17.7356 7.42238 16.8401 6.52695 15.7356 6.52695H14.1297V6.04576C14.1397 4.96742 13.7214 3.92913 12.9666 3.15888C12.2112 2.38803 11.1805 1.94877 10.1012 1.9377V1.93768H10.0961ZM13.1297 6.52695V6.04336V6.03838H13.1297C13.1378 5.22428 12.8222 4.44029 12.2524 3.85881C11.6831 3.27793 10.9067 2.94667 10.0934 2.93768H10.024H10.019V2.93765C9.20491 2.92955 8.42092 3.24512 7.83944 3.81497C7.25856 4.38423 6.9273 5.1607 6.91831 5.9739V6.52695H13.1297ZM4.3125 7.52695C3.76022 7.52695 3.3125 7.97467 3.3125 8.52695V16.0165C3.3125 16.5687 3.76022 17.0165 4.3125 17.0165H15.7356C16.2879 17.0165 16.7356 16.5687 16.7356 16.0165V8.52695C16.7356 7.97467 16.2879 7.52695 15.7356 7.52695H4.3125ZM10.0242 13.2384C10.5581 13.2384 10.9909 12.8056 10.9909 12.2717C10.9909 11.7377 10.5581 11.3049 10.0242 11.3049C9.49023 11.3049 9.05738 11.7377 9.05738 12.2717C9.05738 12.8056 9.49023 13.2384 10.0242 13.2384ZM11.9909 12.2717C11.9909 13.3579 11.1104 14.2384 10.0242 14.2384C8.93794 14.2384 8.05738 13.3579 8.05738 12.2717C8.05738 11.1854 8.93794 10.3049 10.0242 10.3049C11.1104 10.3049 11.9909 11.1854 11.9909 12.2717Z",fill:"#74808B"})])],-1),v={class:"absolute inset-y-0 right-0 flex items-center pr-3 text-sm leading-5"},y={key:0,class:"text-gray-400"},V={key:1,class:"text-gray-400"},H=e("div",null,[e("button",{type:"submit",class:"flex w-full justify-center rounded-md border border-transparent bg-blue-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"}," Sign in ")],-1);function k(r,s,M,B,P,Z){return o(),i("div",h,[e("div",m,[e("div",f,[e("form",{class:"space-y-6",onSubmit:s[3]||(s[3]=d((...t)=>this.auth.login&&this.auth.login(...t),["prevent"]))},[e("div",w,[l(e("input",{name:"user_id","onUpdate:modelValue":s[0]||(s[0]=t=>this.auth.userId=t),required:"",class:"block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 pr-8 pl-10 placeholder-gray-400 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-blue-500 sm:text-sm",placeholder:"jane@exmaple.com"},null,512),[[u,this.auth.userId]]),x]),e("div",C,[e("div",g,[l(e("input",{name:"currentPassword",type:this.auth.passwordFieldType,"onUpdate:modelValue":s[1]||(s[1]=t=>this.auth.currentPassword=t),required:"",placeholder:"•••••",class:"block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 pl-10 placeholder-gray-400 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-blue-500 sm:text-sm"},null,8,b),[[c,this.auth.currentPassword]]),_,e("div",v,[e("button",{type:"button",class:"absolute inset-y-0 right-0 flex items-center pr-3 text-sm leading-5",onClick:s[2]||(s[2]=t=>this.auth.showPassword=!this.auth.showPassword)},[this.auth.showPassword?(o(),i("span",y,"Hide")):(o(),i("span",V,"Show"))])])])]),H],32)])])])}const q=n(p,[["render",k]]);export{q as default}; diff --git a/ury_pos/public/urypos/assets/index-214798b4.js b/ury_pos/public/urypos/assets/index-e6ebee7c.js similarity index 94% rename from ury_pos/public/urypos/assets/index-214798b4.js rename to ury_pos/public/urypos/assets/index-e6ebee7c.js index 4cfaf52..1418550 100644 --- a/ury_pos/public/urypos/assets/index-214798b4.js +++ b/ury_pos/public/urypos/assets/index-e6ebee7c.js @@ -6,7 +6,7 @@ var Um=Object.defineProperty,qm=Object.defineProperties;var Km=Object.getOwnProp * vue-router v4.2.4 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const Ds=typeof window!="undefined";function Ly(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const qe=Object.assign;function Tu(e,t){const r={};for(const n in t){const s=t[n];r[n]=wr(s)?s.map(e):e(s)}return r}const Pi=()=>{},wr=Array.isArray,Vy=/\/$/,Uy=e=>e.replace(Vy,"");function Fu(e,t,r="/"){let n,s={},i="",a="";const o=t.indexOf("#");let u=t.indexOf("?");return o=0&&(u=-1),u>-1&&(n=t.slice(0,u),i=t.slice(u+1,o>-1?o:t.length),s=e(i)),o>-1&&(n=n||t.slice(0,o),a=t.slice(o,t.length)),n=zy(n!=null?n:t,r),{fullPath:n+(i&&"?")+i+a,path:n,query:s,hash:a}}function qy(e,t){const r=t.query?e(t.query):"";return t.path+(r&&"?")+r+(t.hash||"")}function cf(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Ky(e,t,r){const n=t.matched.length-1,s=r.matched.length-1;return n>-1&&n===s&&Gs(t.matched[n],r.matched[s])&&t0(t.params,r.params)&&e(t.query)===e(r.query)&&t.hash===r.hash}function Gs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function t0(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(!Yy(e[r],t[r]))return!1;return!0}function Yy(e,t){return wr(e)?hf(e,t):wr(t)?hf(t,e):e===t}function hf(e,t){return wr(t)?e.length===t.length&&e.every((r,n)=>r===t[n]):e.length===1&&e[0]===t}function zy(e,t){if(e.startsWith("/"))return e;if(!e)return t;const r=t.split("/"),n=e.split("/"),s=n[n.length-1];(s===".."||s===".")&&n.push("");let i=r.length-1,a,o;for(a=0;a1&&i--;else break;return r.slice(0,i).join("/")+"/"+n.slice(a-(a===n.length?1:0)).join("/")}var zi;(function(e){e.pop="pop",e.push="push"})(zi||(zi={}));var Di;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Di||(Di={}));function Wy(e){if(!e)if(Ds){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Uy(e)}const Gy=/^[^#]+#/;function Jy(e,t){return e.replace(Gy,"#")+t}function Xy(e,t){const r=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-r.left-(t.left||0),top:n.top-r.top-(t.top||0)}}const $o=()=>({left:window.pageXOffset,top:window.pageYOffset});function Zy(e){let t;if("el"in e){const r=e.el,n=typeof r=="string"&&r.startsWith("#"),s=typeof r=="string"?n?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!s)return;t=Xy(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function ff(e,t){return(history.state?history.state.position-t:-1)+e}const fl=new Map;function Qy(e,t){fl.set(e,t)}function eb(e){const t=fl.get(e);return fl.delete(e),t}let tb=()=>location.protocol+"//"+location.host;function r0(e,t){const{pathname:r,search:n,hash:s}=t,i=e.indexOf("#");if(i>-1){let o=s.includes(e.slice(i))?e.slice(i).length:1,u=s.slice(o);return u[0]!=="/"&&(u="/"+u),cf(u,"")}return cf(r,e)+n+s}function rb(e,t,r,n){let s=[],i=[],a=null;const o=({state:c})=>{const f=r0(e,location),p=r.value,g=t.value;let m=0;if(c){if(r.value=f,t.value=c,a&&a===p){a=null;return}m=g?c.position-g.position:0}else n(f);s.forEach(y=>{y(r.value,p,{delta:m,type:zi.pop,direction:m?m>0?Di.forward:Di.back:Di.unknown})})};function u(){a=r.value}function l(c){s.push(c);const f=()=>{const p=s.indexOf(c);p>-1&&s.splice(p,1)};return i.push(f),f}function h(){const{history:c}=window;c.state&&c.replaceState(qe({},c.state,{scroll:$o()}),"")}function d(){for(const c of i)c();i=[],window.removeEventListener("popstate",o),window.removeEventListener("beforeunload",h)}return window.addEventListener("popstate",o),window.addEventListener("beforeunload",h,{passive:!0}),{pauseListeners:u,listen:l,destroy:d}}function df(e,t,r,n=!1,s=!1){return{back:e,current:t,forward:r,replaced:n,position:window.history.length,scroll:s?$o():null}}function nb(e){const{history:t,location:r}=window,n={value:r0(e,r)},s={value:t.state};s.value||i(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(u,l,h){const d=e.indexOf("#"),c=d>-1?(r.host&&document.querySelector("base")?e:e.slice(d))+u:tb()+e+u;try{t[h?"replaceState":"pushState"](l,"",c),s.value=l}catch(f){console.error(f),r[h?"replace":"assign"](c)}}function a(u,l){const h=qe({},t.state,df(s.value.back,u,s.value.forward,!0),l,{position:s.value.position});i(u,h,!0),n.value=u}function o(u,l){const h=qe({},s.value,t.state,{forward:u,scroll:$o()});i(h.current,h,!0);const d=qe({},df(n.value,u,null),{position:h.position+1},l);i(u,d,!1),n.value=u}return{location:n,state:s,push:o,replace:a}}function sb(e){e=Wy(e);const t=nb(e),r=rb(e,t.state,t.location,t.replace);function n(i,a=!0){a||r.pauseListeners(),history.go(i)}const s=qe({location:"",base:e,go:n,createHref:Jy.bind(null,e)},t,r);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function ib(e){return typeof e=="string"||e&&typeof e=="object"}function n0(e){return typeof e=="string"||typeof e=="symbol"}const dn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},s0=Symbol("");var pf;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(pf||(pf={}));function Js(e,t){return qe(new Error,{type:e,[s0]:!0},t)}function jr(e,t){return e instanceof Error&&s0 in e&&(t==null||!!(e.type&t))}const gf="[^/]+?",ab={sensitive:!1,strict:!1,start:!0,end:!0},ob=/[.+*?^${}()[\]/\\]/g;function ub(e,t){const r=qe({},ab,t),n=[];let s=r.start?"^":"";const i=[];for(const l of e){const h=l.length?[]:[90];r.strict&&!l.length&&(s+="/");for(let d=0;dt.length?t.length===1&&t[0]===40+40?1:-1:0}function cb(e,t){let r=0;const n=e.score,s=t.score;for(;r0&&t[t.length-1]<0}const hb={type:0,value:""},fb=/[a-zA-Z0-9_]/;function db(e){if(!e)return[[]];if(e==="/")return[[hb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${r})/"${l}": ${f}`)}let r=0,n=r;const s=[];let i;function a(){i&&s.push(i),i=[]}let o=0,u,l="",h="";function d(){l&&(r===0?i.push({type:0,value:l}):r===1||r===2||r===3?(i.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:l,regexp:h,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),l="")}function c(){l+=u}for(;o{a(x)}:Pi}function a(h){if(n0(h)){const d=n.get(h);d&&(n.delete(h),r.splice(r.indexOf(d),1),d.children.forEach(a),d.alias.forEach(a))}else{const d=r.indexOf(h);d>-1&&(r.splice(d,1),h.record.name&&n.delete(h.record.name),h.children.forEach(a),h.alias.forEach(a))}}function o(){return r}function u(h){let d=0;for(;d=0&&(h.record.path!==r[d].record.path||!i0(h,r[d]));)d++;r.splice(d,0,h),h.record.name&&!yf(h)&&n.set(h.record.name,h)}function l(h,d){let c,f={},p,g;if("name"in h&&h.name){if(c=n.get(h.name),!c)throw Js(1,{location:h});g=c.record.name,f=qe(vf(d.params,c.keys.filter(x=>!x.optional).map(x=>x.name)),h.params&&vf(h.params,c.keys.map(x=>x.name))),p=c.stringify(f)}else if("path"in h)p=h.path,c=r.find(x=>x.re.test(p)),c&&(f=c.parse(p),g=c.record.name);else{if(c=d.name?n.get(d.name):r.find(x=>x.re.test(d.path)),!c)throw Js(1,{location:h,currentLocation:d});g=c.record.name,f=qe({},d.params,h.params),p=c.stringify(f)}const m=[];let y=c;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:p,params:f,matched:m,meta:yb(m)}}return e.forEach(h=>i(h)),{addRoute:i,resolve:l,removeRoute:a,getRoutes:o,getRecordMatcher:s}}function vf(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}function mb(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:vb(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function vb(e){const t={},r=e.props||!1;if("component"in e)t.default=r;else for(const n in e.components)t[n]=typeof r=="object"?r[n]:r;return t}function yf(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function yb(e){return e.reduce((t,r)=>qe(t,r.meta),{})}function bf(e,t){const r={};for(const n in e)r[n]=n in t?t[n]:e[n];return r}function i0(e,t){return t.children.some(r=>r===e||i0(e,r))}const a0=/#/g,bb=/&/g,wb=/\//g,xb=/=/g,Sb=/\?/g,o0=/\+/g,_b=/%5B/g,Eb=/%5D/g,u0=/%5E/g,Cb=/%60/g,l0=/%7B/g,kb=/%7C/g,c0=/%7D/g,Ab=/%20/g;function uc(e){return encodeURI(""+e).replace(kb,"|").replace(_b,"[").replace(Eb,"]")}function Pb(e){return uc(e).replace(l0,"{").replace(c0,"}").replace(u0,"^")}function dl(e){return uc(e).replace(o0,"%2B").replace(Ab,"+").replace(a0,"%23").replace(bb,"%26").replace(Cb,"`").replace(l0,"{").replace(c0,"}").replace(u0,"^")}function Db(e){return dl(e).replace(xb,"%3D")}function Tb(e){return uc(e).replace(a0,"%23").replace(Sb,"%3F")}function Fb(e){return e==null?"":Tb(e).replace(wb,"%2F")}function eo(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}function Ob(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;si&&dl(i)):[n&&dl(n)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+r,i!=null&&(t+="="+i))})}return t}function Rb(e){const t={};for(const r in e){const n=e[r];n!==void 0&&(t[r]=wr(n)?n.map(s=>s==null?null:""+s):n==null?n:""+n)}return t}const Ib=Symbol(""),xf=Symbol(""),lc=Symbol(""),h0=Symbol(""),pl=Symbol("");function pi(){let e=[];function t(n){return e.push(n),()=>{const s=e.indexOf(n);s>-1&&e.splice(s,1)}}function r(){e=[]}return{add:t,list:()=>e.slice(),reset:r}}function bn(e,t,r,n,s){const i=n&&(n.enterCallbacks[s]=n.enterCallbacks[s]||[]);return()=>new Promise((a,o)=>{const u=d=>{d===!1?o(Js(4,{from:r,to:t})):d instanceof Error?o(d):ib(d)?o(Js(2,{from:t,to:d})):(i&&n.enterCallbacks[s]===i&&typeof d=="function"&&i.push(d),a())},l=e.call(n&&n.instances[s],t,r,u);let h=Promise.resolve(l);e.length<3&&(h=h.then(u)),h.catch(d=>o(d))})}function Ou(e,t,r,n){const s=[];for(const i of e)for(const a in i.components){let o=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(Nb(o)){const l=(o.__vccOpts||o)[t];l&&s.push(bn(l,r,n,i,a))}else{let u=o();s.push(()=>u.then(l=>{if(!l)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${i.path}"`));const h=Ly(l)?l.default:l;i.components[a]=h;const c=(h.__vccOpts||h)[t];return c&&bn(c,r,n,i,a)()}))}}return s}function Nb(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Sf(e){const t=zt(lc),r=zt(h0),n=et(()=>t.resolve(An(e.to))),s=et(()=>{const{matched:u}=n.value,{length:l}=u,h=u[l-1],d=r.matched;if(!h||!d.length)return-1;const c=d.findIndex(Gs.bind(null,h));if(c>-1)return c;const f=_f(u[l-2]);return l>1&&_f(h)===f&&d[d.length-1].path!==f?d.findIndex(Gs.bind(null,u[l-2])):c}),i=et(()=>s.value>-1&&Hb(r.params,n.value.params)),a=et(()=>s.value>-1&&s.value===r.matched.length-1&&t0(r.params,n.value.params));function o(u={}){return $b(u)?t[An(e.replace)?"replace":"push"](An(e.to)).catch(Pi):Promise.resolve()}return{route:n,href:et(()=>n.value.href),isActive:i,isExactActive:a,navigate:o}}const Mb=Er({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Sf,setup(e,{slots:t}){const r=Ir(Sf(e)),{options:n}=zt(lc),s=et(()=>({[Ef(e.activeClass,n.linkActiveClass,"router-link-active")]:r.isActive,[Ef(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const i=t.default&&t.default(r);return e.custom?i:Yi("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:s.value},i)}}}),Bb=Mb;function $b(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Hb(e,t){for(const r in t){const n=t[r],s=e[r];if(typeof n=="string"){if(n!==s)return!1}else if(!wr(s)||s.length!==n.length||n.some((i,a)=>i!==s[a]))return!1}return!0}function _f(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ef=(e,t,r)=>e!=null?e:t!=null?t:r,jb=Er({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:r}){const n=zt(pl),s=et(()=>e.route||n.value),i=zt(xf,0),a=et(()=>{let l=An(i);const{matched:h}=s.value;let d;for(;(d=h[l])&&!d.components;)l++;return l}),o=et(()=>s.value.matched[a.value]);os(xf,et(()=>a.value+1)),os(Ib,o),os(pl,s);const u=tt();return $s(()=>[u.value,o.value,e.name],([l,h,d],[c,f,p])=>{h&&(h.instances[d]=l,f&&f!==h&&l&&l===c&&(h.leaveGuards.size||(h.leaveGuards=f.leaveGuards),h.updateGuards.size||(h.updateGuards=f.updateGuards))),l&&h&&(!f||!Gs(h,f)||!c)&&(h.enterCallbacks[d]||[]).forEach(g=>g(l))},{flush:"post"}),()=>{const l=s.value,h=e.name,d=o.value,c=d&&d.components[h];if(!c)return Cf(r.default,{Component:c,route:l});const f=d.props[h],p=f?f===!0?l.params:typeof f=="function"?f(l):f:null,m=Yi(c,qe({},p,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[h]=null)},ref:u}));return Cf(r.default,{Component:m,route:l})||m}}});function Cf(e,t){if(!e)return null;const r=e(t);return r.length===1?r[0]:r}const Lb=jb;function Vb(e){const t=gb(e.routes,e),r=e.parseQuery||Ob,n=e.stringifyQuery||wf,s=e.history,i=pi(),a=pi(),o=pi(),u=fp(dn);let l=dn;Ds&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=Tu.bind(null,L=>""+L),d=Tu.bind(null,Fb),c=Tu.bind(null,eo);function f(L,X){let J,ne;return n0(L)?(J=t.getRecordMatcher(L),ne=X):ne=L,t.addRoute(ne,J)}function p(L){const X=t.getRecordMatcher(L);X&&t.removeRoute(X)}function g(){return t.getRoutes().map(L=>L.record)}function m(L){return!!t.getRecordMatcher(L)}function y(L,X){if(X=qe({},X||u.value),typeof L=="string"){const H=Fu(r,L,X.path),U=t.resolve({path:H.path},X),Y=s.createHref(H.fullPath);return qe(H,U,{params:c(U.params),hash:eo(H.hash),redirectedFrom:void 0,href:Y})}let J;if("path"in L)J=qe({},L,{path:Fu(r,L.path,X.path).path});else{const H=qe({},L.params);for(const U in H)H[U]==null&&delete H[U];J=qe({},L,{params:d(H)}),X.params=d(X.params)}const ne=t.resolve(J,X),xe=L.hash||"";ne.params=h(c(ne.params));const O=qy(n,qe({},L,{hash:Pb(xe),path:ne.path})),I=s.createHref(O);return qe({fullPath:O,hash:xe,query:n===wf?Rb(L.query):L.query||{}},ne,{redirectedFrom:void 0,href:I})}function x(L){return typeof L=="string"?Fu(r,L,u.value.path):qe({},L)}function C(L,X){if(l!==L)return Js(8,{from:X,to:L})}function A(L){return _(L)}function P(L){return A(qe(x(L),{replace:!0}))}function b(L){const X=L.matched[L.matched.length-1];if(X&&X.redirect){const{redirect:J}=X;let ne=typeof J=="function"?J(L):J;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=x(ne):{path:ne},ne.params={}),qe({query:L.query,hash:L.hash,params:"path"in ne?{}:L.params},ne)}}function _(L,X){const J=l=y(L),ne=u.value,xe=L.state,O=L.force,I=L.replace===!0,H=b(J);if(H)return _(qe(x(H),{state:typeof H=="object"?qe({},xe,H.state):xe,force:O,replace:I}),X||J);const U=J;U.redirectedFrom=X;let Y;return!O&&Ky(n,ne,J)&&(Y=Js(16,{to:U,from:ne}),Pe(ne,ne,!0,!1)),(Y?Promise.resolve(Y):k(U,ne)).catch(G=>jr(G)?jr(G,2)?G:fe(G):re(G,U,ne)).then(G=>{if(G){if(jr(G,2))return _(qe({replace:I},x(G.to),{state:typeof G.to=="object"?qe({},xe,G.to.state):xe,force:O}),X||U)}else G=T(U,ne,!0,I,xe);return D(U,ne,G),G})}function S(L,X){const J=C(L,X);return J?Promise.reject(J):Promise.resolve()}function w(L){const X=Xe.values().next().value;return X&&typeof X.runWithContext=="function"?X.runWithContext(L):L()}function k(L,X){let J;const[ne,xe,O]=Ub(L,X);J=Ou(ne.reverse(),"beforeRouteLeave",L,X);for(const H of ne)H.leaveGuards.forEach(U=>{J.push(bn(U,L,X))});const I=S.bind(null,L,X);return J.push(I),He(J).then(()=>{J=[];for(const H of i.list())J.push(bn(H,L,X));return J.push(I),He(J)}).then(()=>{J=Ou(xe,"beforeRouteUpdate",L,X);for(const H of xe)H.updateGuards.forEach(U=>{J.push(bn(U,L,X))});return J.push(I),He(J)}).then(()=>{J=[];for(const H of O)if(H.beforeEnter)if(wr(H.beforeEnter))for(const U of H.beforeEnter)J.push(bn(U,L,X));else J.push(bn(H.beforeEnter,L,X));return J.push(I),He(J)}).then(()=>(L.matched.forEach(H=>H.enterCallbacks={}),J=Ou(O,"beforeRouteEnter",L,X),J.push(I),He(J))).then(()=>{J=[];for(const H of a.list())J.push(bn(H,L,X));return J.push(I),He(J)}).catch(H=>jr(H,8)?H:Promise.reject(H))}function D(L,X,J){o.list().forEach(ne=>w(()=>ne(L,X,J)))}function T(L,X,J,ne,xe){const O=C(L,X);if(O)return O;const I=X===dn,H=Ds?history.state:{};J&&(ne||I?s.replace(L.fullPath,qe({scroll:I&&H&&H.scroll},xe)):s.push(L.fullPath,xe)),u.value=L,Pe(L,X,J,I),fe()}let M;function F(){M||(M=s.listen((L,X,J)=>{if(!_t.listening)return;const ne=y(L),xe=b(ne);if(xe){_(qe(xe,{replace:!0}),ne).catch(Pi);return}l=ne;const O=u.value;Ds&&Qy(ff(O.fullPath,J.delta),$o()),k(ne,O).catch(I=>jr(I,12)?I:jr(I,2)?(_(I.to,ne).then(H=>{jr(H,20)&&!J.delta&&J.type===zi.pop&&s.go(-1,!1)}).catch(Pi),Promise.reject()):(J.delta&&s.go(-J.delta,!1),re(I,ne,O))).then(I=>{I=I||T(ne,O,!1),I&&(J.delta&&!jr(I,8)?s.go(-J.delta,!1):J.type===zi.pop&&jr(I,20)&&s.go(-1,!1)),D(ne,O,I)}).catch(Pi)}))}let R=pi(),N=pi(),$;function re(L,X,J){fe(L);const ne=N.list();return ne.length?ne.forEach(xe=>xe(L,X,J)):console.error(L),Promise.reject(L)}function de(){return $&&u.value!==dn?Promise.resolve():new Promise((L,X)=>{R.add([L,X])})}function fe(L){return $||($=!L,F(),R.list().forEach(([X,J])=>L?J(L):X()),R.reset()),L}function Pe(L,X,J,ne){const{scrollBehavior:xe}=e;if(!Ds||!xe)return Promise.resolve();const O=!J&&eb(ff(L.fullPath,0))||(ne||!J)&&history.state&&history.state.scroll||null;return Do().then(()=>xe(L,X,O)).then(I=>I&&Zy(I)).catch(I=>re(I,L,X))}const Fe=L=>s.go(L);let Ze;const Xe=new Set,_t={currentRoute:u,listening:!0,addRoute:f,removeRoute:p,hasRoute:m,getRoutes:g,resolve:y,options:e,push:A,replace:P,go:Fe,back:()=>Fe(-1),forward:()=>Fe(1),beforeEach:i.add,beforeResolve:a.add,afterEach:o.add,onError:N.add,isReady:de,install(L){const X=this;L.component("RouterLink",Bb),L.component("RouterView",Lb),L.config.globalProperties.$router=X,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>An(u)}),Ds&&!Ze&&u.value===dn&&(Ze=!0,A(s.location).catch(xe=>{}));const J={};for(const xe in dn)Object.defineProperty(J,xe,{get:()=>u.value[xe],enumerable:!0});L.provide(lc,X),L.provide(h0,op(J)),L.provide(pl,u);const ne=L.unmount;Xe.add(L),L.unmount=function(){Xe.delete(L),Xe.size<1&&(l=dn,M&&M(),M=null,u.value=dn,Ze=!1,$=!1),ne()}}};function He(L){return L.reduce((X,J)=>X.then(()=>w(J)),Promise.resolve())}return _t}function Ub(e,t){const r=[],n=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aGs(l,o))?n.push(o):r.push(o));const u=e.matched[a];u&&(t.matched.find(l=>Gs(l,u))||s.push(u))}return[r,n,s]}const qb="modulepreload",Kb=function(e){return"/assets/ury_pos/urypos/"+e},kf={},Yb=function(t,r,n){if(!r||r.length===0)return t();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=Kb(i),i in kf)return;kf[i]=!0;const a=i.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!n)for(let h=s.length-1;h>=0;h--){const d=s[h];if(d.href===i&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${o}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":qb,a||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),a)return new Promise((h,d)=>{l.addEventListener("load",h),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})},zb=[{path:"/login",name:"Login",component:()=>Yb(()=>import("./Login-19b9fb8e.js"),[]),meta:{isLoginPage:!0},props:!0}],ra=Mr("notification",{state:()=>({}),actions:{createNotification(e){const t=document.createElement("div");t.classList.add("fixed","bottom-20","right-5"),document.body.appendChild(t);const r=document.createElement("div");r.classList.add("bg-green-100","text-dark","py-2","px-2","mr-3"),r.style.borderRadius="5px",r.style.width="400px",r.style.height="65px",window.matchMedia("(max-width: 640px)").matches&&(r.style.width="300px");const s=document.createElement("span");s.innerHTML=` + */const Ds=typeof window!="undefined";function Ly(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const qe=Object.assign;function Tu(e,t){const r={};for(const n in t){const s=t[n];r[n]=wr(s)?s.map(e):e(s)}return r}const Pi=()=>{},wr=Array.isArray,Vy=/\/$/,Uy=e=>e.replace(Vy,"");function Fu(e,t,r="/"){let n,s={},i="",a="";const o=t.indexOf("#");let u=t.indexOf("?");return o=0&&(u=-1),u>-1&&(n=t.slice(0,u),i=t.slice(u+1,o>-1?o:t.length),s=e(i)),o>-1&&(n=n||t.slice(0,o),a=t.slice(o,t.length)),n=zy(n!=null?n:t,r),{fullPath:n+(i&&"?")+i+a,path:n,query:s,hash:a}}function qy(e,t){const r=t.query?e(t.query):"";return t.path+(r&&"?")+r+(t.hash||"")}function cf(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Ky(e,t,r){const n=t.matched.length-1,s=r.matched.length-1;return n>-1&&n===s&&Gs(t.matched[n],r.matched[s])&&t0(t.params,r.params)&&e(t.query)===e(r.query)&&t.hash===r.hash}function Gs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function t0(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(!Yy(e[r],t[r]))return!1;return!0}function Yy(e,t){return wr(e)?hf(e,t):wr(t)?hf(t,e):e===t}function hf(e,t){return wr(t)?e.length===t.length&&e.every((r,n)=>r===t[n]):e.length===1&&e[0]===t}function zy(e,t){if(e.startsWith("/"))return e;if(!e)return t;const r=t.split("/"),n=e.split("/"),s=n[n.length-1];(s===".."||s===".")&&n.push("");let i=r.length-1,a,o;for(a=0;a1&&i--;else break;return r.slice(0,i).join("/")+"/"+n.slice(a-(a===n.length?1:0)).join("/")}var zi;(function(e){e.pop="pop",e.push="push"})(zi||(zi={}));var Di;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Di||(Di={}));function Wy(e){if(!e)if(Ds){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Uy(e)}const Gy=/^[^#]+#/;function Jy(e,t){return e.replace(Gy,"#")+t}function Xy(e,t){const r=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-r.left-(t.left||0),top:n.top-r.top-(t.top||0)}}const $o=()=>({left:window.pageXOffset,top:window.pageYOffset});function Zy(e){let t;if("el"in e){const r=e.el,n=typeof r=="string"&&r.startsWith("#"),s=typeof r=="string"?n?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!s)return;t=Xy(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function ff(e,t){return(history.state?history.state.position-t:-1)+e}const fl=new Map;function Qy(e,t){fl.set(e,t)}function eb(e){const t=fl.get(e);return fl.delete(e),t}let tb=()=>location.protocol+"//"+location.host;function r0(e,t){const{pathname:r,search:n,hash:s}=t,i=e.indexOf("#");if(i>-1){let o=s.includes(e.slice(i))?e.slice(i).length:1,u=s.slice(o);return u[0]!=="/"&&(u="/"+u),cf(u,"")}return cf(r,e)+n+s}function rb(e,t,r,n){let s=[],i=[],a=null;const o=({state:c})=>{const f=r0(e,location),p=r.value,g=t.value;let m=0;if(c){if(r.value=f,t.value=c,a&&a===p){a=null;return}m=g?c.position-g.position:0}else n(f);s.forEach(y=>{y(r.value,p,{delta:m,type:zi.pop,direction:m?m>0?Di.forward:Di.back:Di.unknown})})};function u(){a=r.value}function l(c){s.push(c);const f=()=>{const p=s.indexOf(c);p>-1&&s.splice(p,1)};return i.push(f),f}function h(){const{history:c}=window;c.state&&c.replaceState(qe({},c.state,{scroll:$o()}),"")}function d(){for(const c of i)c();i=[],window.removeEventListener("popstate",o),window.removeEventListener("beforeunload",h)}return window.addEventListener("popstate",o),window.addEventListener("beforeunload",h,{passive:!0}),{pauseListeners:u,listen:l,destroy:d}}function df(e,t,r,n=!1,s=!1){return{back:e,current:t,forward:r,replaced:n,position:window.history.length,scroll:s?$o():null}}function nb(e){const{history:t,location:r}=window,n={value:r0(e,r)},s={value:t.state};s.value||i(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(u,l,h){const d=e.indexOf("#"),c=d>-1?(r.host&&document.querySelector("base")?e:e.slice(d))+u:tb()+e+u;try{t[h?"replaceState":"pushState"](l,"",c),s.value=l}catch(f){console.error(f),r[h?"replace":"assign"](c)}}function a(u,l){const h=qe({},t.state,df(s.value.back,u,s.value.forward,!0),l,{position:s.value.position});i(u,h,!0),n.value=u}function o(u,l){const h=qe({},s.value,t.state,{forward:u,scroll:$o()});i(h.current,h,!0);const d=qe({},df(n.value,u,null),{position:h.position+1},l);i(u,d,!1),n.value=u}return{location:n,state:s,push:o,replace:a}}function sb(e){e=Wy(e);const t=nb(e),r=rb(e,t.state,t.location,t.replace);function n(i,a=!0){a||r.pauseListeners(),history.go(i)}const s=qe({location:"",base:e,go:n,createHref:Jy.bind(null,e)},t,r);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function ib(e){return typeof e=="string"||e&&typeof e=="object"}function n0(e){return typeof e=="string"||typeof e=="symbol"}const dn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},s0=Symbol("");var pf;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(pf||(pf={}));function Js(e,t){return qe(new Error,{type:e,[s0]:!0},t)}function jr(e,t){return e instanceof Error&&s0 in e&&(t==null||!!(e.type&t))}const gf="[^/]+?",ab={sensitive:!1,strict:!1,start:!0,end:!0},ob=/[.+*?^${}()[\]/\\]/g;function ub(e,t){const r=qe({},ab,t),n=[];let s=r.start?"^":"";const i=[];for(const l of e){const h=l.length?[]:[90];r.strict&&!l.length&&(s+="/");for(let d=0;dt.length?t.length===1&&t[0]===40+40?1:-1:0}function cb(e,t){let r=0;const n=e.score,s=t.score;for(;r0&&t[t.length-1]<0}const hb={type:0,value:""},fb=/[a-zA-Z0-9_]/;function db(e){if(!e)return[[]];if(e==="/")return[[hb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${r})/"${l}": ${f}`)}let r=0,n=r;const s=[];let i;function a(){i&&s.push(i),i=[]}let o=0,u,l="",h="";function d(){l&&(r===0?i.push({type:0,value:l}):r===1||r===2||r===3?(i.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:l,regexp:h,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),l="")}function c(){l+=u}for(;o{a(x)}:Pi}function a(h){if(n0(h)){const d=n.get(h);d&&(n.delete(h),r.splice(r.indexOf(d),1),d.children.forEach(a),d.alias.forEach(a))}else{const d=r.indexOf(h);d>-1&&(r.splice(d,1),h.record.name&&n.delete(h.record.name),h.children.forEach(a),h.alias.forEach(a))}}function o(){return r}function u(h){let d=0;for(;d=0&&(h.record.path!==r[d].record.path||!i0(h,r[d]));)d++;r.splice(d,0,h),h.record.name&&!yf(h)&&n.set(h.record.name,h)}function l(h,d){let c,f={},p,g;if("name"in h&&h.name){if(c=n.get(h.name),!c)throw Js(1,{location:h});g=c.record.name,f=qe(vf(d.params,c.keys.filter(x=>!x.optional).map(x=>x.name)),h.params&&vf(h.params,c.keys.map(x=>x.name))),p=c.stringify(f)}else if("path"in h)p=h.path,c=r.find(x=>x.re.test(p)),c&&(f=c.parse(p),g=c.record.name);else{if(c=d.name?n.get(d.name):r.find(x=>x.re.test(d.path)),!c)throw Js(1,{location:h,currentLocation:d});g=c.record.name,f=qe({},d.params,h.params),p=c.stringify(f)}const m=[];let y=c;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:p,params:f,matched:m,meta:yb(m)}}return e.forEach(h=>i(h)),{addRoute:i,resolve:l,removeRoute:a,getRoutes:o,getRecordMatcher:s}}function vf(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}function mb(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:vb(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function vb(e){const t={},r=e.props||!1;if("component"in e)t.default=r;else for(const n in e.components)t[n]=typeof r=="object"?r[n]:r;return t}function yf(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function yb(e){return e.reduce((t,r)=>qe(t,r.meta),{})}function bf(e,t){const r={};for(const n in e)r[n]=n in t?t[n]:e[n];return r}function i0(e,t){return t.children.some(r=>r===e||i0(e,r))}const a0=/#/g,bb=/&/g,wb=/\//g,xb=/=/g,Sb=/\?/g,o0=/\+/g,_b=/%5B/g,Eb=/%5D/g,u0=/%5E/g,Cb=/%60/g,l0=/%7B/g,kb=/%7C/g,c0=/%7D/g,Ab=/%20/g;function uc(e){return encodeURI(""+e).replace(kb,"|").replace(_b,"[").replace(Eb,"]")}function Pb(e){return uc(e).replace(l0,"{").replace(c0,"}").replace(u0,"^")}function dl(e){return uc(e).replace(o0,"%2B").replace(Ab,"+").replace(a0,"%23").replace(bb,"%26").replace(Cb,"`").replace(l0,"{").replace(c0,"}").replace(u0,"^")}function Db(e){return dl(e).replace(xb,"%3D")}function Tb(e){return uc(e).replace(a0,"%23").replace(Sb,"%3F")}function Fb(e){return e==null?"":Tb(e).replace(wb,"%2F")}function eo(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}function Ob(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;si&&dl(i)):[n&&dl(n)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+r,i!=null&&(t+="="+i))})}return t}function Rb(e){const t={};for(const r in e){const n=e[r];n!==void 0&&(t[r]=wr(n)?n.map(s=>s==null?null:""+s):n==null?n:""+n)}return t}const Ib=Symbol(""),xf=Symbol(""),lc=Symbol(""),h0=Symbol(""),pl=Symbol("");function pi(){let e=[];function t(n){return e.push(n),()=>{const s=e.indexOf(n);s>-1&&e.splice(s,1)}}function r(){e=[]}return{add:t,list:()=>e.slice(),reset:r}}function bn(e,t,r,n,s){const i=n&&(n.enterCallbacks[s]=n.enterCallbacks[s]||[]);return()=>new Promise((a,o)=>{const u=d=>{d===!1?o(Js(4,{from:r,to:t})):d instanceof Error?o(d):ib(d)?o(Js(2,{from:t,to:d})):(i&&n.enterCallbacks[s]===i&&typeof d=="function"&&i.push(d),a())},l=e.call(n&&n.instances[s],t,r,u);let h=Promise.resolve(l);e.length<3&&(h=h.then(u)),h.catch(d=>o(d))})}function Ou(e,t,r,n){const s=[];for(const i of e)for(const a in i.components){let o=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(Nb(o)){const l=(o.__vccOpts||o)[t];l&&s.push(bn(l,r,n,i,a))}else{let u=o();s.push(()=>u.then(l=>{if(!l)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${i.path}"`));const h=Ly(l)?l.default:l;i.components[a]=h;const c=(h.__vccOpts||h)[t];return c&&bn(c,r,n,i,a)()}))}}return s}function Nb(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Sf(e){const t=zt(lc),r=zt(h0),n=et(()=>t.resolve(An(e.to))),s=et(()=>{const{matched:u}=n.value,{length:l}=u,h=u[l-1],d=r.matched;if(!h||!d.length)return-1;const c=d.findIndex(Gs.bind(null,h));if(c>-1)return c;const f=_f(u[l-2]);return l>1&&_f(h)===f&&d[d.length-1].path!==f?d.findIndex(Gs.bind(null,u[l-2])):c}),i=et(()=>s.value>-1&&Hb(r.params,n.value.params)),a=et(()=>s.value>-1&&s.value===r.matched.length-1&&t0(r.params,n.value.params));function o(u={}){return $b(u)?t[An(e.replace)?"replace":"push"](An(e.to)).catch(Pi):Promise.resolve()}return{route:n,href:et(()=>n.value.href),isActive:i,isExactActive:a,navigate:o}}const Mb=Er({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Sf,setup(e,{slots:t}){const r=Ir(Sf(e)),{options:n}=zt(lc),s=et(()=>({[Ef(e.activeClass,n.linkActiveClass,"router-link-active")]:r.isActive,[Ef(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const i=t.default&&t.default(r);return e.custom?i:Yi("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:s.value},i)}}}),Bb=Mb;function $b(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Hb(e,t){for(const r in t){const n=t[r],s=e[r];if(typeof n=="string"){if(n!==s)return!1}else if(!wr(s)||s.length!==n.length||n.some((i,a)=>i!==s[a]))return!1}return!0}function _f(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ef=(e,t,r)=>e!=null?e:t!=null?t:r,jb=Er({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:r}){const n=zt(pl),s=et(()=>e.route||n.value),i=zt(xf,0),a=et(()=>{let l=An(i);const{matched:h}=s.value;let d;for(;(d=h[l])&&!d.components;)l++;return l}),o=et(()=>s.value.matched[a.value]);os(xf,et(()=>a.value+1)),os(Ib,o),os(pl,s);const u=tt();return $s(()=>[u.value,o.value,e.name],([l,h,d],[c,f,p])=>{h&&(h.instances[d]=l,f&&f!==h&&l&&l===c&&(h.leaveGuards.size||(h.leaveGuards=f.leaveGuards),h.updateGuards.size||(h.updateGuards=f.updateGuards))),l&&h&&(!f||!Gs(h,f)||!c)&&(h.enterCallbacks[d]||[]).forEach(g=>g(l))},{flush:"post"}),()=>{const l=s.value,h=e.name,d=o.value,c=d&&d.components[h];if(!c)return Cf(r.default,{Component:c,route:l});const f=d.props[h],p=f?f===!0?l.params:typeof f=="function"?f(l):f:null,m=Yi(c,qe({},p,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[h]=null)},ref:u}));return Cf(r.default,{Component:m,route:l})||m}}});function Cf(e,t){if(!e)return null;const r=e(t);return r.length===1?r[0]:r}const Lb=jb;function Vb(e){const t=gb(e.routes,e),r=e.parseQuery||Ob,n=e.stringifyQuery||wf,s=e.history,i=pi(),a=pi(),o=pi(),u=fp(dn);let l=dn;Ds&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=Tu.bind(null,L=>""+L),d=Tu.bind(null,Fb),c=Tu.bind(null,eo);function f(L,X){let J,ne;return n0(L)?(J=t.getRecordMatcher(L),ne=X):ne=L,t.addRoute(ne,J)}function p(L){const X=t.getRecordMatcher(L);X&&t.removeRoute(X)}function g(){return t.getRoutes().map(L=>L.record)}function m(L){return!!t.getRecordMatcher(L)}function y(L,X){if(X=qe({},X||u.value),typeof L=="string"){const H=Fu(r,L,X.path),U=t.resolve({path:H.path},X),Y=s.createHref(H.fullPath);return qe(H,U,{params:c(U.params),hash:eo(H.hash),redirectedFrom:void 0,href:Y})}let J;if("path"in L)J=qe({},L,{path:Fu(r,L.path,X.path).path});else{const H=qe({},L.params);for(const U in H)H[U]==null&&delete H[U];J=qe({},L,{params:d(H)}),X.params=d(X.params)}const ne=t.resolve(J,X),xe=L.hash||"";ne.params=h(c(ne.params));const O=qy(n,qe({},L,{hash:Pb(xe),path:ne.path})),I=s.createHref(O);return qe({fullPath:O,hash:xe,query:n===wf?Rb(L.query):L.query||{}},ne,{redirectedFrom:void 0,href:I})}function x(L){return typeof L=="string"?Fu(r,L,u.value.path):qe({},L)}function C(L,X){if(l!==L)return Js(8,{from:X,to:L})}function A(L){return _(L)}function P(L){return A(qe(x(L),{replace:!0}))}function b(L){const X=L.matched[L.matched.length-1];if(X&&X.redirect){const{redirect:J}=X;let ne=typeof J=="function"?J(L):J;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=x(ne):{path:ne},ne.params={}),qe({query:L.query,hash:L.hash,params:"path"in ne?{}:L.params},ne)}}function _(L,X){const J=l=y(L),ne=u.value,xe=L.state,O=L.force,I=L.replace===!0,H=b(J);if(H)return _(qe(x(H),{state:typeof H=="object"?qe({},xe,H.state):xe,force:O,replace:I}),X||J);const U=J;U.redirectedFrom=X;let Y;return!O&&Ky(n,ne,J)&&(Y=Js(16,{to:U,from:ne}),Pe(ne,ne,!0,!1)),(Y?Promise.resolve(Y):k(U,ne)).catch(G=>jr(G)?jr(G,2)?G:fe(G):re(G,U,ne)).then(G=>{if(G){if(jr(G,2))return _(qe({replace:I},x(G.to),{state:typeof G.to=="object"?qe({},xe,G.to.state):xe,force:O}),X||U)}else G=T(U,ne,!0,I,xe);return D(U,ne,G),G})}function S(L,X){const J=C(L,X);return J?Promise.reject(J):Promise.resolve()}function w(L){const X=Xe.values().next().value;return X&&typeof X.runWithContext=="function"?X.runWithContext(L):L()}function k(L,X){let J;const[ne,xe,O]=Ub(L,X);J=Ou(ne.reverse(),"beforeRouteLeave",L,X);for(const H of ne)H.leaveGuards.forEach(U=>{J.push(bn(U,L,X))});const I=S.bind(null,L,X);return J.push(I),He(J).then(()=>{J=[];for(const H of i.list())J.push(bn(H,L,X));return J.push(I),He(J)}).then(()=>{J=Ou(xe,"beforeRouteUpdate",L,X);for(const H of xe)H.updateGuards.forEach(U=>{J.push(bn(U,L,X))});return J.push(I),He(J)}).then(()=>{J=[];for(const H of O)if(H.beforeEnter)if(wr(H.beforeEnter))for(const U of H.beforeEnter)J.push(bn(U,L,X));else J.push(bn(H.beforeEnter,L,X));return J.push(I),He(J)}).then(()=>(L.matched.forEach(H=>H.enterCallbacks={}),J=Ou(O,"beforeRouteEnter",L,X),J.push(I),He(J))).then(()=>{J=[];for(const H of a.list())J.push(bn(H,L,X));return J.push(I),He(J)}).catch(H=>jr(H,8)?H:Promise.reject(H))}function D(L,X,J){o.list().forEach(ne=>w(()=>ne(L,X,J)))}function T(L,X,J,ne,xe){const O=C(L,X);if(O)return O;const I=X===dn,H=Ds?history.state:{};J&&(ne||I?s.replace(L.fullPath,qe({scroll:I&&H&&H.scroll},xe)):s.push(L.fullPath,xe)),u.value=L,Pe(L,X,J,I),fe()}let M;function F(){M||(M=s.listen((L,X,J)=>{if(!_t.listening)return;const ne=y(L),xe=b(ne);if(xe){_(qe(xe,{replace:!0}),ne).catch(Pi);return}l=ne;const O=u.value;Ds&&Qy(ff(O.fullPath,J.delta),$o()),k(ne,O).catch(I=>jr(I,12)?I:jr(I,2)?(_(I.to,ne).then(H=>{jr(H,20)&&!J.delta&&J.type===zi.pop&&s.go(-1,!1)}).catch(Pi),Promise.reject()):(J.delta&&s.go(-J.delta,!1),re(I,ne,O))).then(I=>{I=I||T(ne,O,!1),I&&(J.delta&&!jr(I,8)?s.go(-J.delta,!1):J.type===zi.pop&&jr(I,20)&&s.go(-1,!1)),D(ne,O,I)}).catch(Pi)}))}let R=pi(),N=pi(),$;function re(L,X,J){fe(L);const ne=N.list();return ne.length?ne.forEach(xe=>xe(L,X,J)):console.error(L),Promise.reject(L)}function de(){return $&&u.value!==dn?Promise.resolve():new Promise((L,X)=>{R.add([L,X])})}function fe(L){return $||($=!L,F(),R.list().forEach(([X,J])=>L?J(L):X()),R.reset()),L}function Pe(L,X,J,ne){const{scrollBehavior:xe}=e;if(!Ds||!xe)return Promise.resolve();const O=!J&&eb(ff(L.fullPath,0))||(ne||!J)&&history.state&&history.state.scroll||null;return Do().then(()=>xe(L,X,O)).then(I=>I&&Zy(I)).catch(I=>re(I,L,X))}const Fe=L=>s.go(L);let Ze;const Xe=new Set,_t={currentRoute:u,listening:!0,addRoute:f,removeRoute:p,hasRoute:m,getRoutes:g,resolve:y,options:e,push:A,replace:P,go:Fe,back:()=>Fe(-1),forward:()=>Fe(1),beforeEach:i.add,beforeResolve:a.add,afterEach:o.add,onError:N.add,isReady:de,install(L){const X=this;L.component("RouterLink",Bb),L.component("RouterView",Lb),L.config.globalProperties.$router=X,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>An(u)}),Ds&&!Ze&&u.value===dn&&(Ze=!0,A(s.location).catch(xe=>{}));const J={};for(const xe in dn)Object.defineProperty(J,xe,{get:()=>u.value[xe],enumerable:!0});L.provide(lc,X),L.provide(h0,op(J)),L.provide(pl,u);const ne=L.unmount;Xe.add(L),L.unmount=function(){Xe.delete(L),Xe.size<1&&(l=dn,M&&M(),M=null,u.value=dn,Ze=!1,$=!1),ne()}}};function He(L){return L.reduce((X,J)=>X.then(()=>w(J)),Promise.resolve())}return _t}function Ub(e,t){const r=[],n=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aGs(l,o))?n.push(o):r.push(o));const u=e.matched[a];u&&(t.matched.find(l=>Gs(l,u))||s.push(u))}return[r,n,s]}const qb="modulepreload",Kb=function(e){return"/assets/ury_pos/urypos/"+e},kf={},Yb=function(t,r,n){if(!r||r.length===0)return t();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=Kb(i),i in kf)return;kf[i]=!0;const a=i.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!n)for(let h=s.length-1;h>=0;h--){const d=s[h];if(d.href===i&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${o}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":qb,a||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),a)return new Promise((h,d)=>{l.addEventListener("load",h),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})},zb=[{path:"/login",name:"Login",component:()=>Yb(()=>import("./Login-e2605211.js"),[]),meta:{isLoginPage:!0},props:!0}],ra=Mr("notification",{state:()=>({}),actions:{createNotification(e){const t=document.createElement("div");t.classList.add("fixed","bottom-20","right-5"),document.body.appendChild(t);const r=document.createElement("div");r.classList.add("bg-green-100","text-dark","py-2","px-2","mr-3"),r.style.borderRadius="5px",r.style.width="400px",r.style.height="65px",window.matchMedia("(max-width: 640px)").matches&&(r.style.width="300px");const s=document.createElement("span");s.innerHTML=` Close @@ -122,7 +122,7 @@ ae.version="2.29.4";jw(rt);ae.fn=Q;ae.min=AS;ae.max=PS;ae.now=DS;ae.utc=$r;ae.un `}else if(R=="subjectAltName"){var Ze=b(this.getExtSubjectAltName());k+=Ze+` `}else if(R=="cRLDistributionPoints"){var Xe=this.getExtCRLDistributionPoints();k+=S(Xe)}else if(R=="authorityInfoAccess"){var _t=this.getExtAuthorityInfoAccess();k+=w(_t)}else R=="certificatePolicies"&&(k+=_(this.getExtCertificatePolicies()))}}return k+="signature algorithm: "+this.getSignatureAlgorithmName()+` `,k+="signature: "+this.getSignatureValueHex().substr(0,16)+`... -`,k},typeof e=="string"&&(e.indexOf("-----BEGIN")!=-1?this.readCertPEM(e):v.lang.String.isHex(e)&&this.readCertHex(e))}we.EXT_PARSER={};we.registExtParser=function(e,t){we.EXT_PARSER[e]=t};we.hex2dn=function(e,t){t===void 0&&(t=0);var r=new we;Z.getTLV(e,t);var n=r.getX500Name(e);return n.str};we.hex2rdn=function(e,t){if(t===void 0&&(t=0),e.substr(t,2)!=="31")throw new Error("malformed RDN");for(var r=new Array,n=Z.getChildIdx(e,t),s=0;s0){var A=":"+r.join(":")+":";if(A.indexOf(":"+x+":")==-1)throw"algorithm '"+x+"' not accepted in the list"}if(x!="none"&&t===null)throw"key shall be specified to verify.";if(typeof t=="string"&&t.indexOf("-----BEGIN ")!=-1&&(t=Le.getKey(t)),(C=="RS"||C=="PS")&&!(t instanceof d))throw"key shall be a RSAKey obj for RS* and PS* algs";if(C=="ES"&&!(t instanceof u))throw"key shall be a ECDSA obj for ES* algs";var P=null;if(i.jwsalg2sigalg[y.alg]===void 0)throw"unsupported alg name: "+x;if(P=i.jwsalg2sigalg[x],P=="none")throw"not supported";if(P.substr(0,4)=="Hmac"){var b=null;if(t===void 0)throw"hexadecimal key shall be specified for HMAC";var _=new l({alg:P,pass:t});return _.updateString(g),b=_.doFinal(),m==b}else if(P.indexOf("withECDSA")!=-1){var S=null;try{S=u.concatSigToASN1Sig(m)}catch(k){return!1}var w=new h({alg:P});return w.init(t),w.updateString(g),w.verify(S)}else{var w=new h({alg:P});return w.init(t),w.updateString(g),w.verify(m)}};v.jws.JWS.parse=function(e){var t=e.split("."),r={},n,s,i;if(t.length!=2&&t.length!=3)throw"malformed sJWS: wrong number of '.' splitted elements";return n=t[0],s=t[1],t.length==3&&(i=t[2]),r.headerObj=v.jws.JWS.readSafeJSONString(Or(n)),r.payloadObj=v.jws.JWS.readSafeJSONString(Or(s)),r.headerPP=JSON.stringify(r.headerObj,null," "),r.payloadObj==null?r.payloadPP=Or(s):r.payloadPP=JSON.stringify(r.payloadObj,null," "),i!==void 0&&(r.sigHex=st(i)),r};v.jws.JWS.verifyJWT=function(e,t,r){var n=v,s=n.jws,i=s.JWS,a=i.readSafeJSONString,o=i.inArray,u=i.includedArray;if(!Ug(e))return!1;var l=e.split(".");if(l.length!=3)return!1;var h=l[0],d=l[1];st(l[2]);var c=a(Or(h)),f=a(Or(d));if(c.alg===void 0)return!1;if(r.alg===void 0)throw"acceptField.alg shall be specified";if(!o(c.alg,r.alg)||f.iss!==void 0&&typeof r.iss=="object"&&!o(f.iss,r.iss)||f.sub!==void 0&&typeof r.sub=="object"&&!o(f.sub,r.sub))return!1;if(f.aud!==void 0&&typeof r.aud=="object"){if(typeof f.aud=="string"){if(!o(f.aud,r.aud))return!1}else if(typeof f.aud=="object"&&!u(f.aud,r.aud))return!1}var p=s.IntDate.getNow();return r.verifyAt!==void 0&&typeof r.verifyAt=="number"&&(p=r.verifyAt),(r.gracePeriod===void 0||typeof r.gracePeriod!="number")&&(r.gracePeriod=0),!(f.exp!==void 0&&typeof f.exp=="number"&&f.exp+r.gracePeriodu&&this.aHeader.pop(),this.aSignature.length>u&&this.aSignature.pop(),"addSignature failed: "+f}},this.verifyAll=function(s){if(this.aHeader.length!==s.length||this.aSignature.length!==s.length)return!1;for(var i=0;i0)this.aHeader=s.headers;else throw"malformed header";if(typeof s.payload=="string")this.sPayload=s.payload;else throw"malformed signatures";if(s.signatures.length>0)this.aSignature=s.signatures;else throw"malformed signatures"}catch(a){throw"malformed JWS-JS JSON object: "+a}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return this.aHeader.length==0?1:0}};v.crypto.ECDSA;v.crypto.DSA;v.crypto.Signature;v.crypto.MessageDigest;v.crypto.Mac;v.crypto.Cipher;var I6=Le,N6=S6,M6=Wt,B6=v;v.crypto;v.asn1;v.jws;v.lang;function Tl(e){return new Promise((t,r)=>{Ut.security.setCertificatePromise(n=>{qo.get("/assets/ury/files/cert.pem").then(s=>{n(s.data)}).catch(s=>{r({custom:!0,title:"Error during fetching certificate",message:s})})}),Ut.websocket.isActive()||Ut.websocket.connect({host:e,usingSecure:!1}).then(()=>t("success")).catch(n=>{r({custom:!0,title:"Error during connection to printer",message:String(n)})})})}function $6(){Ut.websocket.isActive()&&Ut.websocket.disconnect()}function H6(e,t){return new Promise((r,n)=>{Ut.security.setSignatureAlgorithm("SHA512"),Ut.security.setSignaturePromise(function(i){return function(a){try{var o=I6.getKey(q5),u=new B6.crypto.Signature({alg:"SHA512withRSA"});u.init(o),u.updateString(i);var l=u.sign();a(N6(M6(l)))}catch(h){n(h)}}});const s=()=>{Ut.printers.getDefault().then(i=>_e(this,null,function*(){const a=[{type:"html",format:"plain",data:t}],o=Ut.configs.create(i);try{return yield Ut.print(o,a),r("printed")}catch(u){Ut.websocket.disconnect(),n({custom:!0,title:"Print failed",message:String(u)})}})).catch(i=>{Ut.websocket.disconnect(),n({custom:!0,title:"Error looking up for printer",message:String(i)})})};Ut.websocket.isActive()?s():Tl(e).then(()=>s()).catch(i=>n(i))})}const ur=Mr("invoiceData",{state:()=>({invoiceDetails:[],defaultModeOfPayment:"Cash",warehouse:"",posProfile:"",waiter:"",auth:cr(),cashier:"",modeOfPaymentList:null,alert:Mn(),showDialog:!1,notification:ra(),menu:ps(),recentOrders:kl(),printer:null,print_format:null,print_type:null,branch:null,company:null,qz_host:null,grandTotal:null,cancelReason:null,tableInvoiceNo:null,invoiceNumber:null,showUpdateButtton:!0,isChecked:!1,isPrinting:!1,cancelInvoiceFlag:!1,previousOrderItem:[],table:ws(),call:Dt.call(),qz_print:null}),actions:{fetchInvoiceDetails(){return _e(this,null,function*(){try{const e=yield this.call.get("ury.ury_pos.api.getPosProfile").then(t=>{this.invoiceDetails=t.message,this.warehouse=this.invoiceDetails.warehouse,this.posProfile=this.invoiceDetails.pos_profile,this.waiter=this.invoiceDetails.waiter,this.cashier=this.invoiceDetails.cashier,this.branch=this.invoiceDetails.branch,this.company=this.invoiceDetails.company,this.print_format=this.invoiceDetails.print_format,this.qz_print=this.invoiceDetails.qz_print,this.qz_host=this.invoiceDetails.qz_host,this.print_type=this.invoiceDetails.print_type,this.printer=this.invoiceDetails.printer,this.qz_host&&Tl(this.qz_host)})}catch(e){console.error(e)}this.call.get("ury.ury_pos.api.getModeOfPayment").then(e=>{this.modeOfPaymentList=e.message}).catch(e=>{})})},invoiceCreation(){return _e(this,null,function*(){this.showUpdateButtton=!1;let e="";this.invoiceNo=this.table.invoiceNo;let t=this.menu.cart;const r=Yo(),n=r.search,s=r.numberOfPax;let i=this.recentOrders.invoiceNumber||this.invoiceNumber||this.table.invoiceNo||null;e=this.table.selectedTable||this.recentOrders.restaurantTable;const a=JSON.parse(JSON.stringify(t)),o={table:e,customer:n,items:t,no_of_pax:s,mode_of_payment:this.defaultModeOfPayment,cashier:this.cashier,waiter:this.waiter,last_modified_time:this.table.modifiedTime,pos_profile:this.posProfile,invoice:i,last_invoice:i};!this.auth.cashier&&!s?(this.alert.createAlert("Message","Please Select Customer / No of Pax","OK"),this.showUpdateButtton=!0):!this.auth.cashier&&!e?(this.alert.createAlert("Message","Please Select a Table","OK"),this.showUpdateButtton=!0):this.call.post("ury.ury.doctype.ury_order.ury_order.sync_order",o).then(u=>{if(this.showUpdateButtton=!0,u.message.status==="Failure"){const l=u._server_messages,h=JSON.parse(l),d=JSON.parse(h[0]);this.alert.createAlert("Message",d.message,"OK").then(()=>{gt.push("/Table").then(()=>{window.location.reload()})})}else this.invoiceNumber=u.message.name,this.grandTotal=u.message.grand_total,this.notification.createNotification("Order Update"),this.table.fetchTable(),this.menu.comments="",this.menu.items.forEach(h=>{h.comment=""}),this.previousOrderItem.splice(0,this.previousOrderItem.length),this.previousOrderItem.splice(0,this.previousOrderItem.length,...a),this.table.modifiedTime=u.message.modified,this.auth.cashier&&this.recentOrders.viewRecentOrder(u.message)}).catch(u=>{if(this.showUpdateButtton=!0,u._server_messages){const l=JSON.parse(u._server_messages),h=JSON.parse(l[0]);this.alert.createAlert("Message",h.message,"OK")}})})},billing(e){const r={table:e.name};this.call.get("ury.ury.doctype.ury_order.ury_order.get_order_invoice",r).then(n=>{this.tableInvoiceNo=n.message.name,!this.auth.hasAccess&&!this.auth.cashier&&this.auth.sessionUser!==n.message.waiter?this.alert.createAlert("Message","Printing is Blocked Table is assigned to "+n.message.waiter,"OK"):(this.isPrinting=!0,this.printFunction())}).catch(n=>console.error(n))},printFunction:function(){return _e(this,null,function*(){var t,r;this.isPrinting=!0;let e=this.recentOrders.invoiceNumber||this.tableInvoiceNo||this.invoiceNumber;try{if(this.print_type==="qz"){const n={doc:"POS Invoice",name:e,print_format:this.print_format,_lang:"en"},s=yield this.call.get("frappe.www.printview.get_html_and_style",n);if((t=s==null?void 0:s.message)!=null&&t.html||(this.isPrinting=!1,this.alert.createAlert("Message","Error while getting the HTML document to print for QZ","OK")),(yield H6(this.qz_host,(r=s==null?void 0:s.message)==null?void 0:r.html))==="printed"){this.notification.createNotification("Print Successful");const a={invoice:e};this.call.post("ury.ury.api.ury_print.qz_print_update",a).then(()=>(window.location.reload(),200)).catch(o=>console.error(o,"printed"))}}else if(this.print_type==="network")if(this.auth.cashier){const n={doctype:"POS Invoice",name:e,printer_setting:this.printer,print_format:this.print_format},s=()=>_e(this,null,function*(){return(yield this.call.post("ury.ury.api.ury_print.network_printing",n)).message});let i=0,a="";do{const o=yield s();if(o==="Success"){this.notification.createNotification("Print Successful");const u={invoice:e};yield this.call.post("ury.ury.api.ury_print.qz_print_update",u).then(()=>(window.location.reload(),200))}a=o,i++}while(i<1);throw{alert:this.alert.createAlert("Message",`Print failed with error ${a}`,"OK"),custom:this.isPrinting=!1}}else{const n={doctype:"POS Invoice",name:e,printer_setting:this.printer,print_format:this.print_format},s=()=>_e(this,null,function*(){return(yield this.call.post("ury.ury.api.ury_print.select_network_printer",n)).message});let i=0,a="";do{const o=yield s();if(o==="Success"){this.notification.createNotification("Print Successful");const u={invoice:e};yield this.call.post("ury.ury.api.ury_print.qz_print_update",u).then(()=>(window.location.reload(),200))}a=o,i++}while(i<1);throw{alert:this.alert.createAlert("Message",`Print failed with error ${a}`,"OK"),custom:this.isPrinting=!1}}else{const n={doctype:"POS Invoice",name:e,print_format:this.print_format};this.call.post("ury.ury.api.ury_print.print_pos_page",n).then(s=>(this.notification.createNotification("Print Successful"),window.location.reload(),s.message)).catch(s=>console.error(s))}}catch(n){if(n!=null&&n.custom)return this.isPrinting=!1,this.alert.createAlert("Error",n==null?void 0:n.title,"OK")}})},loadPrinter:function(e){return _e(this,null,function*(){try{const t=yield Tl(url,e);print(e),t==="success"&&this.notification.createNotification("Printer loaded")}catch(t){this.alert.createAlert("Message",t.message,"OK")}})},showCancelInvoiceModal(){this.call.get("ury.ury.api.button_permission.cancel_check").then(e=>{e.message===!0?(this.cancelInvoiceFlag=!0,this.cancelReason=""):(this.alert.createAlert("Message","You don't Have Permission to Cancel ","OK"),this.cancelInvoiceFlag=!1,this.cancelReason="")}).catch(e=>{})},cancelInvoice:function(){return _e(this,null,function*(){const r={invoice_id:kl().invoiceNumber||this.invoiceNumber||this.table.invoiceNo,reason:this.cancelReason};this.call.post("ury.ury.doctype.ury_order.ury_order.cancel_order",r).then(()=>{this.notification.createNotification("Invoice Cancelled"),gt.push("/Table").then(()=>{window.location.reload()})}).catch(n=>console.error(n))})}}}),lr=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},j6={name:"takeAwayTable",setup(){const e=ws(),t=ur(),r=cr();return{table:e,invoiceData:t,auth:r}}},L6={class:"flow-root"},V6={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-gray-300 bg-opacity-50 text-lg"},U6={class:"grid grid-cols-2 gap-4 md:grid-cols-4 lg:grid-cols-5"},q6={class:"flex justify-between"},K6={class:"flex justify-start px-2 pt-2"},Y6={key:0,class:"relative"},z6=["onClick"],W6=E("svg",{class:"h-6 w-6","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[E("path",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"})],-1),G6=[W6],J6={class:"absolute right-0 z-10 w-36 divide-y divide-gray-100 rounded-lg bg-white shadow dark:bg-gray-700"},X6={class:"py-2"},Z6=["onClick"],Q6={key:0},eE=["onClick"],tE={class:"flex flex-col pb-4"},rE=["onClick"],nE={class:"text-sm text-gray-500 dark:text-gray-400"},sE={key:0,class:"mt-8 text-center"},iE=["onClick"],aE=E("svg",{class:"ml-2 h-6 w-6 dark:text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),oE={key:1,class:"mt-2 flex justify-center"},uE=["onClick"],lE=E("svg",{class:"svg-icon mr-2",viewBox:"0 0 24 24",width:"18",height:"18",fill:"white"},[E("path",{d:"M6 19H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h3V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v4h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-3v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-2zm0-2v-1a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1h2V9H4v8h2zM8 4v3h8V4H8zm0 13v3h8v-3H8zm-3-7h3v2H5v-2z"})],-1),cE=["onClick"],hE=E("svg",{"aria-hidden":"true",class:"h-10 w-6",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[E("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),E("path",{"fill-rule":"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z","clip-rule":"evenodd"})],-1),fE=[hE];function dE(e,t,r,n,s,i){return j(),V("div",L6,[this.invoiceData.isLoading?(j(),V("div",V6," Payment Being Processing ")):oe("",!0),E("div",U6,[(j(!0),V(De,null,ht(this.table.takeAway,a=>(j(),V("div",{"w-full":"",class:"w-full max-w-sm rounded-lg border border-gray-200 bg-white shadow dark:border-gray-700 dark:bg-gray-800",key:a.name},[E("div",q6,[E("div",K6,[E("span",{class:Ae(["me-2 rounded px-2.5 py-0.5 text-sm font-medium",{"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300":this.table.getBadgeType(a)==="default","bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300":this.table.getBadgeType(a)==="red","bg-yellow-100 text-yellow-800":this.table.getBadgeType(a)==="yellow","bg-green-100 text-green-800":this.table.getBadgeType(a)==="green"}])},be(this.table.getBadgeText(a)),3)]),a.occupied===1?(j(),V("div",Y6,[E("button",{class:"inline-block rounded-lg p-1.5 text-sm text-gray-500 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700",type:"button",onClick:o=>this.table.toggleDropdown(a.name)},G6,8,z6),Se(E("div",J6,[E("ul",X6,[E("li",null,[E("a",{href:"#",class:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white",onClick:o=>this.table.showModal=!0},"Table Transfer",8,Z6)]),this.auth.hasAccess?(j(),V("li",Q6,[E("a",{href:"#",class:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white",onClick:o=>this.table.showModalCaptainTransfer=!0},"Captain Transfer",8,eE)])):oe("",!0)])],512),[[oc,this.table.activeDropdown===a.name]])])):oe("",!0)]),E("div",tE,[E("div",{class:"mt-1 text-center",onClick:o=>a.occupied===1&&!this.auth.restrictTableOrder?this.table.routeToMenu(a):""},[E("h5",{class:Ae(["mt-2 text-xl font-medium text-gray-900 dark:text-white",{"mt-3":a.occupied===0}])},be(a.name),3),E("span",nE,be(a.occupied===1?this.table.getTimeDifference(a):""),1)],8,rE),a.occupied!=1?(j(),V("div",sE,[E("button",{type:"button",class:Ae(["inline-flex items-center rounded px-2 py-2.5 text-center text-sm font-medium text-white hover:bg-[#2557D6]/90 focus:outline-none focus:ring-4 focus:ring-[#2557D6]/50 dark:focus:ring-[#2557D6]/50",[{"bg-blue-700":!this.auth.restrictTableOrder,"pointer-events-none bg-blue-400":this.auth.restrictTableOrder}]]),onClick:o=>!this.auth.restrictTableOrder&&this.table.addToSelectedTables(a)},[Ys(" Open Table "),aE],10,iE)])):oe("",!0),a.occupied===1?(j(),V("div",oE,[E("button",{type:"button",class:"mb-2 me-2 inline-flex items-center rounded bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-[#2557D6]/90 focus:outline-none focus:ring-4 focus:ring-[#2557D6]/50 dark:focus:ring-[#2557D6]/50",onClick:o=>this.invoiceData.billing(a)},[lE,Ys(" Bill ")],8,uE),E("div",{class:Ae(["relative inline-flex h-10 w-10 items-center justify-center overflow-hidden rounded-full border hover:bg-blue-700 hover:text-white focus:outline-none focus:ring-4 focus:ring-blue-300 dark:border-blue-500 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white dark:focus:ring-blue-800",[{"border-blue-700 text-blue-700":!this.auth.restrictTableOrder,"pointer-events-none border-blue-400 text-blue-400":this.auth.restrictTableOrder}]]),onClick:o=>!this.auth.restrictTableOrder&&this.table.routeToCart(a)},fE,10,cE)])):oe("",!0)])]))),128))])])}const pE=lr(j6,[["render",dE]]);const gE={name:"Table",components:{takeAwayTable:pE},setup(){const e=ws(),t=ur(),r=cr();return{table:e,invoiceData:t,auth:r}}},Ct=e=>(Sp("data-v-80551b1d"),e=e(),_p(),e),mE={class:"switch-wrapper mt-2"},vE=Ct(()=>E("label",{for:"Table",class:"switch-label text-center"},"Table",-1)),yE=Ct(()=>E("label",{for:"take_away",class:"switch-label text-center"},"Takeaway",-1)),bE=Ct(()=>E("span",{class:"highlighter"},null,-1)),wE={key:0,class:"m-auto"},xE={class:"flow-root"},SE={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-gray-300 bg-opacity-50 text-lg"},_E={class:"grid grid-cols-2 gap-4 md:grid-cols-4 lg:grid-cols-5"},EE={class:"flex justify-between"},CE={class:"flex justify-start px-2 pt-2"},kE={key:0,class:"relative"},AE=["onClick"],PE=Ct(()=>E("svg",{class:"h-6 w-6","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[E("path",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"})],-1)),DE=[PE],TE={class:"absolute right-0 z-10 w-36 divide-y divide-gray-100 rounded-lg bg-white shadow dark:bg-gray-700"},FE={class:"py-2"},OE=["onClick"],RE={key:0},IE=["onClick"],NE={class:"flex flex-col pb-4"},ME=["onClick"],BE={class:"text-sm text-gray-500 dark:text-gray-400"},$E={key:0,class:"mt-8 text-center"},HE=["onClick"],jE=Ct(()=>E("svg",{class:"ml-2 h-6 w-6 dark:text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),LE={key:1,class:"mt-2 flex justify-center"},VE=["onClick"],UE=Ct(()=>E("svg",{class:"svg-icon mr-2",viewBox:"0 0 24 24",width:"18",height:"18",fill:"white"},[E("path",{d:"M6 19H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h3V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v4h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-3v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-2zm0-2v-1a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1h2V9H4v8h2zM8 4v3h8V4H8zm0 13v3h8v-3H8zm-3-7h3v2H5v-2z"})],-1)),qE=["onClick"],KE=Ct(()=>E("svg",{"aria-hidden":"true",class:"h-10 w-6",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[E("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),E("path",{"fill-rule":"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z","clip-rule":"evenodd"})],-1)),YE=[KE],zE={key:1,class:"container m-auto"},WE={key:2,class:"fixed inset-0 z-10 overflow-y-auto bg-gray-100"},GE={class:"mt-20 flex items-center justify-center"},JE={class:"mt-10 w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},XE={class:"flex justify-end"},ZE=Ct(()=>E("span",{class:"sr-only"},"Close",-1)),QE=Ct(()=>E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)),eC=[QE],tC=Ct(()=>E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," Table Transfer ",-1)),rC={class:"relative",ref:"container"},nC=Ct(()=>E("label",{for:"newTable",class:"mt-6 block text-left text-gray-900 dark:text-white"}," New Table ",-1)),sC={key:0,class:"absolute left-0 top-full z-10 max-h-64 w-full overflow-y-scroll rounded bg-white shadow",ref:"dropdown"},iC=["onClick"],aC={class:"text-base font-semibold leading-normal"},oC=Ct(()=>E("label",{for:"newTable",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Current Table ",-1)),uC=["value"],lC={class:"flex justify-end"},cC={key:3,class:"fixed inset-0 z-10 overflow-y-auto bg-gray-100"},hC={class:"mt-20 flex items-center justify-center"},fC={class:"mt-10 w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},dC={class:"flex justify-end"},pC=Ct(()=>E("span",{class:"sr-only"},"Close",-1)),gC=Ct(()=>E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)),mC=[gC],vC=Ct(()=>E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," Captain Transfer ",-1)),yC={class:"relative",ref:"container"},bC=Ct(()=>E("label",{for:"newTable",class:"mt-6 block text-left text-gray-900 dark:text-white"}," New Captain ",-1)),wC={key:0,class:"absolute left-0 top-full z-10 max-h-64 w-full overflow-y-scroll rounded bg-white shadow",ref:"dropdown"},xC=["onClick"],SC={class:"text-base font-semibold leading-normal"},_C=Ct(()=>E("label",{for:"newTable",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Current Captain ",-1)),EC=["value"],CC={class:"flex justify-end"};function kC(e,t,r,n,s,i){const a=$t("takeAwayTable");return j(),V(De,null,[E("div",mE,[Se(E("input",{id:"Table",type:"radio",name:"switch","onUpdate:modelValue":t[0]||(t[0]=o=>this.table.selectedOption=o),value:"Table"},null,512),[[ll,this.table.selectedOption]]),Se(E("input",{id:"take_away",type:"radio",name:"switch","onUpdate:modelValue":t[1]||(t[1]=o=>this.table.selectedOption=o),value:"take_away"},null,512),[[ll,this.table.selectedOption]]),vE,yE,bE]),this.table.selectedOption==="Table"?(j(),V("div",wE,[E("div",xE,[this.invoiceData.isPrinting?(j(),V("div",SE," Printing Invoice ")):oe("",!0),E("div",_E,[(j(!0),V(De,null,ht(this.table.filteredTables,o=>(j(),V("div",{"w-full":"",class:"w-full max-w-sm rounded border border-gray-200 bg-white shadow dark:border-gray-700 dark:bg-gray-800",key:o.name},[E("div",EE,[E("div",CE,[E("span",{class:Ae(["me-2 rounded px-2.5 py-0.5 text-sm font-medium",{"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300":this.table.getBadgeType(o)==="red","bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300":this.table.getBadgeType(o)==="default","bg-yellow-100 text-yellow-800":this.table.getBadgeType(o)==="yellow","bg-green-100 text-green-800":this.table.getBadgeType(o)==="green"}])},be(this.table.getBadgeText(o)),3)]),o.occupied===1?(j(),V("div",kE,[E("button",{class:"inline-block rounded-lg p-1.5 text-sm text-gray-500 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700",type:"button",onClick:u=>this.table.toggleDropdown(o.name)},DE,8,AE),Se(E("div",TE,[E("ul",FE,[E("li",null,[E("a",{href:"#",class:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white",onClick:u=>this.table.showModal=!0},"Table Transfer",8,OE)]),this.auth.hasAccess?(j(),V("li",RE,[E("a",{href:"#",class:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white",onClick:u=>this.table.showModalCaptainTransfer=!0},"Captain Transfer",8,IE)])):oe("",!0)])],512),[[oc,this.table.activeDropdown===o.name]])])):oe("",!0)]),E("div",NE,[E("div",{class:"mt-1 text-center",onClick:u=>o.occupied===1&&!this.auth.restrictTableOrder?this.table.routeToMenu(o):""},[E("h5",{class:Ae(["mt-2 text-xl font-medium text-gray-900 dark:text-white",{"mt-3":o.occupied===0}])},be(o.name),3),E("span",BE,be(o.occupied===1?this.table.getTimeDifference(o):""),1)],8,ME),o.occupied!=1?(j(),V("div",$E,[E("button",{type:"button",class:Ae(["inline-flex items-center rounded px-2 py-2.5 text-center text-sm font-medium text-white hover:bg-[#2557D6]/90 focus:outline-none focus:ring-4 focus:ring-[#2557D6]/50 dark:focus:ring-[#2557D6]/50",[{"bg-blue-700":!this.auth.restrictTableOrder,"pointer-events-none bg-blue-400":this.auth.restrictTableOrder}]]),onClick:u=>!this.auth.restrictTableOrder&&this.table.addToSelectedTables(o)},[Ys(" Open Table "),jE],10,HE)])):oe("",!0),o.occupied===1?(j(),V("div",LE,[E("button",{type:"button",class:"mb-2 me-2 inline-flex items-center rounded bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-[#2557D6]/90 focus:outline-none focus:ring-4 focus:ring-[#2557D6]/50 dark:focus:ring-[#2557D6]/50",onClick:u=>this.invoiceData.billing(o)},[UE,Ys(" Bill ")],8,VE),E("div",{class:Ae(["relative inline-flex h-10 w-10 items-center justify-center overflow-hidden rounded-full border hover:bg-blue-700 hover:text-white focus:outline-none focus:ring-4 focus:ring-blue-300 dark:border-blue-500 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white dark:focus:ring-blue-800",[{"border-blue-700 text-blue-700":!this.auth.restrictTableOrder,"pointer-events-none border-blue-400 text-blue-400":this.auth.restrictTableOrder}]]),onClick:u=>!this.auth.restrictTableOrder&&this.table.routeToCart(o)},YE,10,qE)])):oe("",!0)])]))),128))])])])):oe("",!0),this.table.selectedOption==="take_away"?(j(),V("div",zE,[K(a)])):oe("",!0),n.table.showModal?(j(),V("div",WE,[E("div",GE,[E("div",JE,[E("div",XE,[ZE,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[2]||(t[2]=o=>this.table.showModal=!1)},eC))]),tC,E("div",rC,[nC,Se(E("input",{type:"text",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[3]||(t[3]=o=>n.table.newTable=o),onClick:t[4]||(t[4]=o=>{this.table.showTable=!0,this.table.tableSearch()})},null,512),[[Ce,n.table.newTable]]),this.table.showTable?(j(),V("div",sC,[(j(!0),V(De,null,ht(this.table.searchTable,(o,u)=>(j(),V("div",{class:"h-16 w-full rounded-lg p-4 hover:bg-gray-100",key:u,onClick:l=>this.table.selectTable(o)},[E("h1",aC,be(o.name),1)],8,iC))),128))],512)):oe("",!0)],512),oC,E("input",{type:"text",id:"newTable",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none",value:n.table.tableName,readonly:""},null,8,uC),E("div",lC,[E("button",{onClick:t[5]||(t[5]=o=>{this.table.showModal=!1,this.table.tableTransfer(n.table)}),class:"mt-8 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Transfer ")])])])])):oe("",!0),n.table.showModalCaptainTransfer?(j(),V("div",cC,[E("div",hC,[E("div",fC,[E("div",dC,[pC,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[6]||(t[6]=o=>n.table.showModalCaptainTransfer=!1)},mC))]),vC,E("div",yC,[bC,Se(E("input",{type:"text",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none",onClick:t[7]||(t[7]=o=>{this.table.showCaptain=!0,this.table.fetchCaptain()}),"onUpdate:modelValue":t[8]||(t[8]=o=>this.table.newCaptain=o)},null,512),[[Ce,this.table.newCaptain]]),this.table.showCaptain?(j(),V("div",wC,[(j(!0),V(De,null,ht(this.table.captain,(o,u)=>(j(),V("div",{class:"h-16 w-full rounded-lg p-4 hover:bg-gray-100",key:u,onClick:l=>this.table.selectcaptain(o)},[E("h1",SC,be(o.name),1)],8,xC))),128))],512)):oe("",!0)],512),_C,E("input",{type:"text",id:"newTable",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none",value:this.table.currentCaptain,readonly:""},null,8,EC),E("div",CC,[E("button",{onClick:t[9]||(t[9]=o=>{this.table.showModalCaptainTransfer=!1,this.table.captianTransfer()}),class:"mt-8 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Transfer ")])])])])):oe("",!0)],64)}const td=lr(gE,[["render",kC],["__scopeId","data-v-80551b1d"]]),AC={name:"Customer",setup(){return{customers:Yo()}}},PC={class:"container m-auto"},DC={class:"mb-6 gap-6 md:grid-cols-2"},TC={class:"relative mt-5",ref:"container"},FC=E("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[E("svg",{"aria-hidden":"true",class:"h-5 w-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})])],-1),OC={key:0,class:"absolute left-0 top-full z-10 max-h-64 w-full overflow-y-scroll rounded bg-white shadow md:w-3/5 lg:w-2/5",ref:"dropdown"},RC=["onClick"],IC={class:"text-base font-semibold leading-normal"},NC={class:"text-sm leading-normal"},MC={key:0},BC=E("svg",{fill:"none",stroke:"currentColor",class:"h-8 w-8 font-extrabold",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[E("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v12m6-6H6"})],-1),$C={key:0,class:"fixed inset-0 z-10 mt-20 overflow-y-auto bg-gray-100"},HC={class:"mt-10 flex items-center justify-center"},jC={class:"w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},LC={class:"flex justify-end"},VC=E("span",{class:"sr-only"},"Close",-1),UC=E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1),qC=[UC],KC=E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," New Customer ",-1),YC=E("label",{for:"newCustomer",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Customer Name ",-1),zC=E("label",{for:"mobileNumber",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Mobile Number ",-1),WC={class:"relative mt-5",ref:"container"},GC=E("label",{for:"customerGroup",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Customer Group ",-1),JC={key:0,class:"absolute left-0 top-full z-10 max-h-64 w-full overflow-y-scroll rounded bg-white shadow",ref:"dropdown"},XC=["onClick"],ZC={class:"text-base font-semibold leading-normal"},QC={class:"relative mt-5",ref:"container"},ek=E("label",{for:"territory",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Territory ",-1),tk={key:0,class:"absolute left-0 top-full z-10 max-h-64 w-full overflow-y-scroll rounded bg-white shadow",ref:"dropdown"},rk=["onClick"],nk={class:"text-base font-semibold leading-normal"},sk={class:"flex justify-end"},ik={class:"relative mb-6 mt-6"},ak=E("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[E("svg",{class:"h-6 w-6 text-gray-500 group-hover:text-blue-600 dark:text-gray-400 dark:group-hover:text-blue-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[E("path",{"fill-rule":"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z","clip-rule":"evenodd"})])],-1),ok={key:1,class:"tex mt-10 text-xl font-semibold"},uk={key:2,class:"cart-item-details mt-1 grid grid-cols-4 gap-2 py-2 sm:w-full md:w-full lg:w-full"},lk=E("h3",{class:"font-semibold"},"Item Name",-1),ck=E("h3",{class:"font-semibold"},"Quantity",-1),hk=[lk,ck],fk=E("img",null,null,-1),dk={class:"cart-item-details sm:min-w-none grid w-full min-w-0 grid-cols-4 gap-2 py-2 sm:w-full md:w-full lg:w-full"},pk={class:"ml-4"};function gk(e,t,r,n,s,i){return j(),V("div",PC,[E("div",DC,[E("div",TC,[FC,Se(E("input",{type:"text",class:"block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 pl-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500 md:w-3/5 lg:w-2/5",placeholder:"Search Customers","onUpdate:modelValue":t[0]||(t[0]=a=>this.customers.search=a),onInput:t[1]||(t[1]=a=>this.customers.pickCustomer()),onClick:t[2]||(t[2]=a=>{this.customers.showCustomers=!0,this.customers.showAddNewCustomer=!0}),required:""},null,544),[[Ce,this.customers.search]]),this.customers.showCustomers&&this.customers.showAddNewCustomer?(j(),V("div",OC,[(j(!0),V(De,null,ht(this.customers.customer,(a,o)=>(j(),V("div",{class:"h-16 rounded-lg p-4 hover:bg-gray-100",key:o,onClick:u=>this.customers.selectCustomer(a)},[E("h1",IC,be(a.name),1),E("h2",NC,be(a.name)+" "+be(a.content?this.customers.extractName(a.content):""),1)],8,RC))),128)),this.customers.showAddNewCustomer?(j(),V("div",MC,[E("a",{href:"#",class:"mt-4 inline-flex items-center text-blue-600 hover:underline",onClick:t[3]||(t[3]=Ay(a=>this.customers.newCustomerData(this.customers.search),["prevent"]))},[BC,Ys(" Create a New Customer ")])])):oe("",!0)],512)):oe("",!0)],512),this.customers.showModalNewCustomer?(j(),V("div",$C,[E("div",HC,[E("div",jC,[E("div",LC,[VC,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[4]||(t[4]=a=>this.customers.showModalNewCustomer=!1)},qC))]),KC,YC,Se(E("input",{type:"text",id:"newCustomer",class:"mt-4 w-full rounded-lg border border-gray-300 bg-gray-50 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500","onUpdate:modelValue":t[5]||(t[5]=a=>this.customers.newCustomer=a)},null,512),[[Ce,this.customers.newCustomer]]),zC,Se(E("input",{type:"number",id:"mobileNumber",class:"mt-4 w-full rounded-lg border border-gray-300 bg-gray-50 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500","onUpdate:modelValue":t[6]||(t[6]=a=>this.customers.newCustomerMobileNo=a)},null,512),[[Ce,this.customers.newCustomerMobileNo]]),E("div",WC,[GC,Se(E("input",{type:"text",id:"customerGroup",class:"mt-4 w-full rounded-lg border border-gray-300 bg-gray-50 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500","onUpdate:modelValue":t[7]||(t[7]=a=>this.customers.customerGroup=a),onClick:t[8]||(t[8]=a=>{this.customers.showCustomersGroup=!0,this.customers.pickCustomerGroup()}),required:""},null,512),[[Ce,this.customers.customerGroup]]),this.customers.showCustomersGroup?(j(),V("div",JC,[(j(!0),V(De,null,ht(this.customers.customerGroupList,(a,o)=>(j(),V("div",{class:"h-12 rounded-lg p-4 hover:bg-gray-100",key:o,onClick:u=>this.customers.selectCustomerGroup(a)},[E("h1",ZC,be(a.name),1)],8,XC))),128))],512)):oe("",!0)],512),E("div",QC,[ek,Se(E("input",{type:"text",id:"territory",class:"mt-4 w-full rounded-lg border border-gray-300 bg-gray-50 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500","onUpdate:modelValue":t[9]||(t[9]=a=>this.customers.customerTerritory=a),onClick:t[10]||(t[10]=a=>{this.customers.showCustomersTerritory=!0,this.customers.pickCustomerTerritory()}),required:""},null,512),[[Ce,this.customers.customerTerritory]]),this.customers.showCustomersTerritory?(j(),V("div",tk,[(j(!0),V(De,null,ht(this.customers.customerTerritoryList,(a,o)=>(j(),V("div",{class:"h-12 rounded-lg p-4 hover:bg-gray-100",key:o,onClick:u=>this.customers.selectCustomerTerritory(a)},[E("h1",nk,be(a.name),1)],8,rk))),128))],512)):oe("",!0)],512),E("div",sk,[E("button",{onClick:t[11]||(t[11]=a=>this.customers.addNewCustomer()),class:"mt-8 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Save ")])])])])):oe("",!0),E("div",ik,[ak,Se(E("input",{type:"text",id:"input-group-1",class:"block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 pl-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500 md:w-3/5 lg:w-2/5",placeholder:"Pax",required:"","onUpdate:modelValue":t[12]||(t[12]=a=>this.customers.numberOfPax=a)},null,512),[[Ce,this.customers.numberOfPax]])]),this.customers.customerFavouriteItems.length>0?(j(),V("h1",ok," Favourite Items ")):oe("",!0),this.customers.customerFavouriteItems.length>0?(j(),V("div",uk,hk)):oe("",!0),(j(!0),V(De,null,ht(this.customers.customerFavouriteItems,(a,o)=>(j(),V("div",{key:o},[fk,E("div",dk,[E("h3",null,be(a.item_name),1),E("h3",pk,be(a.qty),1)])]))),128))])])}const mk=lr(AC,[["render",gk]]),vk={setup(){return{menu:ps()}}},yk={class:"flex flex-col md:flex-row mt-2"},bk=E("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[E("svg",{"aria-hidden":"true",class:"h-5 w-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})])],-1),wk={key:0,class:"mt-2 flex flex-row md:ml-2 md:mt-0 md:w-1/3"};function xk(e,t,r,n,s,i){return j(),V("div",yk,[E("div",{class:Ae(["relative",[{"md:w-2/3":this.menu.showPriority==!0,"md:w-full":this.menu.showPriority==!1}]])},[bk,Se(E("input",{type:"search",id:"default-search",class:"block w-full rounded-lg border border-gray-300 bg-gray-50 pl-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500",placeholder:"Item Search","onUpdate:modelValue":t[0]||(t[0]=a=>this.menu.searchTerm=a),onInput:t[1]||(t[1]=(...a)=>this.menu.handleSearchInput&&this.menu.handleSearchInput(...a)),onClick:t[2]||(t[2]=(...a)=>this.menu.clearSearch&&this.menu.clearSearch(...a)),autocapitalize:"none"},null,544),[[Ce,this.menu.searchTerm]])],2),this.menu.showPriority==!0?(j(),V("div",wk,[E("button",{class:"focus:shadow-outline w-1/2 rounded bg-blue-700 px-4 py-2 font-bold text-white hover:bg-blue-900 focus:outline-none",type:"button",onClick:t[3]||(t[3]=(...a)=>this.menu.showSpecialItems&&this.menu.showSpecialItems(...a))}," Priority "),E("button",{class:"focus:shadow-outline ml-2 w-1/2 rounded bg-blue-700 px-4 py-2 font-bold text-white hover:bg-blue-900 focus:outline-none",type:"button",onClick:t[4]||(t[4]=(...a)=>this.menu.showAllItems&&this.menu.showAllItems(...a))}," All ")])):oe("",!0)])}const Sk=lr(vk,[["render",xk]]);const _k={setup(){return{menu:ps()}},name:"Menu",components:{Search:Sk}},Ek={key:0,class:"container mx-auto"},Ck={class:"mt-8 grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-5"},kk={class:"mt-0 mb-2 text-lg font-normal leading-normal"},Ak={class:"mt-0 mb-2 text-lg font-normal leading-normal"},Pk={key:0},Dk=["onClick"],Tk={key:1,class:"flex rounded-md"},Fk=["onClick"],Ok=["value","onInput","onClick"],Rk=["onClick"],Ik={key:0,class:"fixed inset-0 mt-20 z-10 overflow-y-auto bg-gray-100"},Nk={class:"mt-10 flex items-center justify-center"},Mk={class:"w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},Bk={class:"flex justify-end"},$k=E("span",{class:"sr-only"},"Close",-1),Hk=E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1),jk=[Hk],Lk=E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," Enter Details ",-1),Vk={class:"relative"},Uk=E("label",{for:"quantity",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Quantity ",-1),qk=E("label",{for:"paidAmount",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Comments ",-1),Kk={class:"flex justify-end"},Yk={key:1},zk={key:0,class:"flex h-screen items-center justify-center"},Wk=E("div",{class:"text-center"},"No items found. Please select a table or set an active menu.",-1),Gk=[Wk],Jk={key:1,class:"flex h-screen items-center justify-center"},Xk=E("div",{class:"text-center"},"No items found.",-1),Zk=[Xk],Qk={key:2,class:"mt-4 flex justify-center"},e8=["disabled"],t8=["onClick"],r8={key:1},n8=["disabled"];function s8(e,t,r,n,s,i){const a=$t("Search");return j(),V(De,null,[K(a),this.menu.paginatedItems.length>0?(j(),V("div",Ek,[E("div",Ck,[(j(!0),V(De,null,ht(this.menu.paginatedItems,o=>(j(),V("div",{class:"rounded-md border px-2 py-2 text-center shadow",key:o.item},[E("h2",kk,be(o.item_name),1),E("h2",Ak," ₹ "+be(o.rate),1),o.qty?oe("",!0):(j(),V("div",Pk,[E("button",{onClick:u=>{o.showInput=!0,this.menu.addToCart(o)},class:"rounded border px-10 pt-2.5 pb-2 text-xs font-medium leading-normal"}," ADD + ",8,Dk)])),o.qty?(j(),V("div",Tk,[E("button",{type:"button",class:"-ml-px inline-flex items-center justify-center gap-2 border bg-white py-3 px-4 align-middle text-sm font-medium text-gray-700 shadow-sm transition-all focus:outline-none dark:border-gray-700",onClick:u=>this.menu.decrementItemQuantity(o)}," - ",8,Fk),E("input",{type:"number",id:"qty_input",name:"qty_input",class:"block w-full border border-gray-200 text-center text-sm shadow-sm",value:o.qty,onInput:u=>o.qty=u.target.value,readonly:"",onClick:u=>this.menu.showModal(o)},null,40,Ok),E("button",{type:"button",class:"-ml-px inline-flex items-center justify-center gap-2 border bg-white py-3 px-4 align-middle text-sm font-medium text-gray-700 shadow-sm transition-all focus:outline-none dark:border-gray-700",onClick:u=>this.menu.incrementItemQuantity(o)}," + ",8,Rk)])):oe("",!0)]))),128)),n.menu.showDialog?(j(),V("div",Ik,[E("div",Nk,[E("div",Mk,[E("div",Bk,[$k,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[0]||(t[0]=o=>n.menu.showDialog=!1)},jk))]),Lk,E("div",Vk,[Uk,Se(E("input",{type:"number",id:"modeOfPayment",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[1]||(t[1]=o=>this.menu.quantity=o)},null,512),[[Ce,this.menu.quantity]]),qk,Se(E("input",{type:"text",id:"Comments",class:"mt-4 w-full rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[2]||(t[2]=o=>this.menu.itemComments=o)},null,512),[[Ce,this.menu.itemComments]])]),E("div",Kk,[E("button",{onClick:t[3]||(t[3]=o=>this.menu.addToCartAndUpdateQty(e.item)),class:"mt-8 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Add ")])])])])):oe("",!0)])])):(j(),V("div",Yk,[this.menu.items.length===0?(j(),V("div",zk,Gk)):(j(),V("div",Jk,Zk))])),this.menu.paginatedItems.length>0?(j(),V("div",Qk,[E("button",{class:Ae([{hidden:this.menu.currentPage===1},"mr-2 rounded-md border px-2 py-1"]),disabled:this.menu.currentPage===1,onClick:t[4]||(t[4]=o=>this.menu.currentPage-=1)}," Previous ",10,e8),(j(!0),V(De,null,ht(this.menu.pageNumbers,o=>(j(),V("div",null,[o===this.menu.currentPage||Math.abs(o-this.menu.currentPage)<=2?(j(),V("button",{key:o,onClick:u=>this.menu.currentPage=o,class:Ae([{"bg-gray-200":o===this.menu.currentPage},"mr-2 rounded-md border px-2 py-1"])},be(o),11,t8)):this.menu.pageNumbers.indexOf(o)===0||this.menu.pageNumbers.indexOf(o)===this.menu.pageNumbers.length-1?(j(),V("span",r8," ... ")):oe("",!0)]))),256)),E("button",{disabled:this.menu.currentPage===this.menu.totalPages,onClick:t[5]||(t[5]=o=>this.menu.currentPage+=1),class:Ae([{hidden:this.menu.currentPage===this.menu.totalPages},"rounded-md border px-2 py-1"])}," Next ",10,n8)])):oe("",!0)],64)}const i8=lr(_k,[["render",s8]]);const a8={name:"Cart",setup(){const e=ps(),t=ws(),r=cr(),n=ur();return{menu:e,table:t,invoiceData:n,auth:r}},methods:{}},o8={key:0,class:"float-right rounded px-4 py-2"},u8={key:1,class:"flex h-screen items-center justify-center"},l8=E("div",{class:"text-center"},"Nothing to show here",-1),c8=[l8],h8={key:2,class:"mt-20 border shadow"},f8=E("div",{class:"cart-item-details grid w-full grid-cols-3 gap-4 md:w-full lg:w-full"},[E("h3",{class:"ml-3 mt-2 text-base font-semibold text-gray-900 dark:text-white"}," Item Name "),E("h3",{class:"ml-3 mt-2 text-center text-lg font-semibold text-gray-900 dark:text-white"}," Quantity ")],-1),d8={class:"w-full text-base text-gray-900 dark:text-white"},p8=["value","onInput","onClick"],g8={class:"items-center text-center"},m8=["onClick"],v8=E("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",fill:"currentColor border",class:"bi bi-trash",viewBox:"0 0 16 16"},[E("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6Z"}),E("path",{d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1ZM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118ZM2.5 3h11V2h-11v1Z"})],-1),y8=[v8],b8={key:3,class:"relative mt-8"},w8=E("label",{for:"Comments",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Comments ",-1),x8={key:4,class:"fixed inset-0 z-10 mt-20 overflow-y-auto bg-gray-100"},S8={class:"mt-20 flex items-center justify-center"},_8={class:"w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},E8={class:"flex justify-end"},C8=E("span",{class:"sr-only"},"Close",-1),k8=E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1),A8=[k8],P8=E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," Are you sure to cancel ",-1),D8={class:"relative"},T8=E("label",{for:"cancelReason",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Reason ",-1),F8={class:"flex justify-end"},O8={key:5,class:"fixed inset-0 mt-20 z-10 overflow-y-auto bg-gray-100"},R8={class:"mt-10 flex items-center justify-center"},I8={class:"w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},N8={class:"flex justify-end"},M8=E("span",{class:"sr-only"},"Close",-1),B8=E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1),$8=[B8],H8=E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," Enter Details ",-1),j8={class:"relative"},L8=E("label",{for:"quantity",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Quantity ",-1),V8=E("label",{for:"Comments",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Comments ",-1),U8={class:"flex justify-end"},q8={key:6,class:"mt-4 w-full divide-y divide-gray-200 bg-white"},K8=E("summary",{class:"question w-full cursor-pointer select-none py-3"}," Additional Details ",-1),Y8={class:"additional-details m-3"},z8={key:0,for:"grand_total",class:"grand_total mt-10 block text-sm font-medium text-gray-900 dark:text-white"},W8=["value"],G8={key:2,for:"invoiceNo",class:"mt-10 block text-sm font-medium text-gray-900 dark:text-white"},J8=["value"],X8=["value"];function Z8(e,t,r,n,s,i){return j(),V(De,null,[this.menu.cart.length>0?(j(),V("div",o8,[this.invoiceData.showUpdateButtton===!0?(j(),V("button",{key:0,class:"mr-4 rounded px-4 py-2 shadow",onClick:t[0]||(t[0]=a=>this.invoiceData.invoiceCreation())}," Update ")):oe("",!0),E("button",{class:"rounded px-4 py-2 shadow",onClick:t[1]||(t[1]=a=>this.invoiceData.showCancelInvoiceModal())}," Cancel ")])):oe("",!0),this.menu.cart.length===0?(j(),V("div",u8,c8)):oe("",!0),this.menu.cart.length>0?(j(),V("div",h8,[f8,(j(!0),V(De,null,ht(this.menu.cart,(a,o)=>(j(),V("div",{class:"cart-item-details ml-3 mt-2 grid w-full grid-cols-3 gap-4 pb-2 md:w-full lg:w-full",key:o},[E("h3",d8,be(a.item_name),1),E("input",{type:"number",id:"qty_input_cart",name:"qty_input_cart",class:"block w-full border-none text-center text-base text-gray-900 dark:text-white",value:parseInt(a.qty),onInput:u=>a.qty=u.target.value,onClick:u=>{this.menu.showModal(a),n.menu.showDialogCart=!0}},null,40,p8),E("div",g8,[E("button",{class:"p-2 text-center",type:"button",onClick:u=>this.menu.removeItemFromCart(o)},y8,8,m8)])]))),128))])):oe("",!0),this.menu.cart.length>0?(j(),V("div",b8,[w8,Se(E("input",{id:"comments",class:"comments mt-3 block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5","onUpdate:modelValue":t[2]||(t[2]=a=>this.menu.comments=a)},null,512),[[Ce,this.menu.comments]])])):oe("",!0),this.invoiceData.cancelInvoiceFlag===!0?(j(),V("div",x8,[E("div",S8,[E("div",_8,[E("div",E8,[C8,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[3]||(t[3]=a=>this.invoiceData.cancelInvoiceFlag=!1)},A8))]),P8,E("div",D8,[T8,Se(E("input",{type:"text",id:"cancelReason",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[4]||(t[4]=a=>this.invoiceData.cancelReason=a)},null,512),[[Ce,this.invoiceData.cancelReason]])]),E("div",F8,[E("button",{onClick:t[5]||(t[5]=a=>this.invoiceData.cancelInvoiceFlag=!1),class:"mr-3 mt-6 rounded border border-gray-300 bg-gray-50 px-3 py-2"}," No "),E("button",{onClick:t[6]||(t[6]=a=>{this.invoiceData.cancelInvoice(),this.invoiceData.cancelInvoiceFlag=!1}),class:"mt-6 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Yes ")])])])])):oe("",!0),n.menu.showDialogCart?(j(),V("div",O8,[E("div",R8,[E("div",I8,[E("div",N8,[M8,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[7]||(t[7]=a=>n.menu.showDialogCart=!1)},$8))]),H8,E("div",j8,[L8,Se(E("input",{type:"number",id:"modeOfPayment",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[8]||(t[8]=a=>this.menu.quantity=a)},null,512),[[Ce,this.menu.quantity]]),V8,Se(E("input",{type:"text",id:"Comments",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[9]||(t[9]=a=>this.menu.itemComments=a)},null,512),[[Ce,this.menu.itemComments]])]),E("div",U8,[E("button",{onClick:t[10]||(t[10]=a=>{this.menu.addToCartAndUpdateQty(e.item),n.menu.showDialogCart=!1}),class:"mt-8 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Add ")])])])])):oe("",!0),this.menu.cart.length>0?(j(),V("div",q8,[E("details",null,[K8,E("div",Y8,[this.table.grandTotal||n.invoiceData.grandTotal?(j(),V("label",z8," Grand Total ")):oe("",!0),this.table.grandTotal||n.invoiceData.grandTotal?(j(),V("input",{key:1,class:"block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5",value:this.table.grandTotal||n.invoiceData.grandTotal,readonly:""},null,8,W8)):oe("",!0),this.table.invoiceNo||n.invoiceData.invoiceNumber?(j(),V("label",G8," Invoice ")):oe("",!0),this.table.invoiceNo||n.invoiceData.invoiceNumber?(j(),V("input",{key:3,class:"invoiceNo mt-3 block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5",value:this.table.invoiceNo||n.invoiceData.invoiceNumber,readonly:""},null,8,J8)):oe("",!0),E("label",{for:"waiter",class:Ae(["mt-10 block text-sm font-medium text-gray-900 dark:text-white",{hidden:this.invoiceData.waiter===""}])}," Waiter ",2),E("input",{class:Ae(["waiter mt-3 block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5",{hidden:this.invoiceData.waiter===""}]),value:this.table.newCaptain?this.table.newCaptain:this.invoiceData.waiter,readonly:""},null,10,X8),E("label",{for:"posProfile",class:Ae(["mt-10 block text-sm font-medium text-gray-900 dark:text-white",{hidden:this.invoiceData.posProfile===""}])}," POS Profile ",2),Se(E("input",{class:Ae(["posProfile mt-3 block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5",{hidden:this.invoiceData.posProfile===""}]),"onUpdate:modelValue":t[11]||(t[11]=a=>this.invoiceData.posProfile=a),readonly:""},null,2),[[Ce,this.invoiceData.posProfile]]),E("label",{for:"cashier",class:Ae(["mt-10 block text-sm font-medium text-gray-900 dark:text-white",{hidden:this.invoiceData.cashier===""}])}," Cashier ",2),Se(E("input",{class:Ae(["mt-3 block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5",{hidden:this.invoiceData.cashier===""}]),"onUpdate:modelValue":t[12]||(t[12]=a=>this.invoiceData.cashier=a),readonly:""},null,2),[[Ce,this.invoiceData.cashier]])])])])):oe("",!0)],64)}const Q8=lr(a8,[["render",Z8]]);Ir({});var zg={exports:{}};/*! +`,k},typeof e=="string"&&(e.indexOf("-----BEGIN")!=-1?this.readCertPEM(e):v.lang.String.isHex(e)&&this.readCertHex(e))}we.EXT_PARSER={};we.registExtParser=function(e,t){we.EXT_PARSER[e]=t};we.hex2dn=function(e,t){t===void 0&&(t=0);var r=new we;Z.getTLV(e,t);var n=r.getX500Name(e);return n.str};we.hex2rdn=function(e,t){if(t===void 0&&(t=0),e.substr(t,2)!=="31")throw new Error("malformed RDN");for(var r=new Array,n=Z.getChildIdx(e,t),s=0;s0){var A=":"+r.join(":")+":";if(A.indexOf(":"+x+":")==-1)throw"algorithm '"+x+"' not accepted in the list"}if(x!="none"&&t===null)throw"key shall be specified to verify.";if(typeof t=="string"&&t.indexOf("-----BEGIN ")!=-1&&(t=Le.getKey(t)),(C=="RS"||C=="PS")&&!(t instanceof d))throw"key shall be a RSAKey obj for RS* and PS* algs";if(C=="ES"&&!(t instanceof u))throw"key shall be a ECDSA obj for ES* algs";var P=null;if(i.jwsalg2sigalg[y.alg]===void 0)throw"unsupported alg name: "+x;if(P=i.jwsalg2sigalg[x],P=="none")throw"not supported";if(P.substr(0,4)=="Hmac"){var b=null;if(t===void 0)throw"hexadecimal key shall be specified for HMAC";var _=new l({alg:P,pass:t});return _.updateString(g),b=_.doFinal(),m==b}else if(P.indexOf("withECDSA")!=-1){var S=null;try{S=u.concatSigToASN1Sig(m)}catch(k){return!1}var w=new h({alg:P});return w.init(t),w.updateString(g),w.verify(S)}else{var w=new h({alg:P});return w.init(t),w.updateString(g),w.verify(m)}};v.jws.JWS.parse=function(e){var t=e.split("."),r={},n,s,i;if(t.length!=2&&t.length!=3)throw"malformed sJWS: wrong number of '.' splitted elements";return n=t[0],s=t[1],t.length==3&&(i=t[2]),r.headerObj=v.jws.JWS.readSafeJSONString(Or(n)),r.payloadObj=v.jws.JWS.readSafeJSONString(Or(s)),r.headerPP=JSON.stringify(r.headerObj,null," "),r.payloadObj==null?r.payloadPP=Or(s):r.payloadPP=JSON.stringify(r.payloadObj,null," "),i!==void 0&&(r.sigHex=st(i)),r};v.jws.JWS.verifyJWT=function(e,t,r){var n=v,s=n.jws,i=s.JWS,a=i.readSafeJSONString,o=i.inArray,u=i.includedArray;if(!Ug(e))return!1;var l=e.split(".");if(l.length!=3)return!1;var h=l[0],d=l[1];st(l[2]);var c=a(Or(h)),f=a(Or(d));if(c.alg===void 0)return!1;if(r.alg===void 0)throw"acceptField.alg shall be specified";if(!o(c.alg,r.alg)||f.iss!==void 0&&typeof r.iss=="object"&&!o(f.iss,r.iss)||f.sub!==void 0&&typeof r.sub=="object"&&!o(f.sub,r.sub))return!1;if(f.aud!==void 0&&typeof r.aud=="object"){if(typeof f.aud=="string"){if(!o(f.aud,r.aud))return!1}else if(typeof f.aud=="object"&&!u(f.aud,r.aud))return!1}var p=s.IntDate.getNow();return r.verifyAt!==void 0&&typeof r.verifyAt=="number"&&(p=r.verifyAt),(r.gracePeriod===void 0||typeof r.gracePeriod!="number")&&(r.gracePeriod=0),!(f.exp!==void 0&&typeof f.exp=="number"&&f.exp+r.gracePeriodu&&this.aHeader.pop(),this.aSignature.length>u&&this.aSignature.pop(),"addSignature failed: "+f}},this.verifyAll=function(s){if(this.aHeader.length!==s.length||this.aSignature.length!==s.length)return!1;for(var i=0;i0)this.aHeader=s.headers;else throw"malformed header";if(typeof s.payload=="string")this.sPayload=s.payload;else throw"malformed signatures";if(s.signatures.length>0)this.aSignature=s.signatures;else throw"malformed signatures"}catch(a){throw"malformed JWS-JS JSON object: "+a}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return this.aHeader.length==0?1:0}};v.crypto.ECDSA;v.crypto.DSA;v.crypto.Signature;v.crypto.MessageDigest;v.crypto.Mac;v.crypto.Cipher;var I6=Le,N6=S6,M6=Wt,B6=v;v.crypto;v.asn1;v.jws;v.lang;function Tl(e){return new Promise((t,r)=>{Ut.security.setCertificatePromise(n=>{qo.get("/assets/ury/files/cert.pem").then(s=>{n(s.data)}).catch(s=>{r({custom:!0,title:"Error during fetching certificate",message:s})})}),Ut.websocket.isActive()||Ut.websocket.connect({host:e,usingSecure:!1}).then(()=>t("success")).catch(n=>{r({custom:!0,title:"Error during connection to printer",message:String(n)})})})}function $6(){Ut.websocket.isActive()&&Ut.websocket.disconnect()}function H6(e,t){return new Promise((r,n)=>{Ut.security.setSignatureAlgorithm("SHA512"),Ut.security.setSignaturePromise(function(i){return function(a){try{var o=I6.getKey(q5),u=new B6.crypto.Signature({alg:"SHA512withRSA"});u.init(o),u.updateString(i);var l=u.sign();a(N6(M6(l)))}catch(h){n(h)}}});const s=()=>{Ut.printers.getDefault().then(i=>_e(this,null,function*(){const a=[{type:"html",format:"plain",data:t}],o=Ut.configs.create(i);try{return yield Ut.print(o,a),r("printed")}catch(u){Ut.websocket.disconnect(),n({custom:!0,title:"Print failed",message:String(u)})}})).catch(i=>{Ut.websocket.disconnect(),n({custom:!0,title:"Error looking up for printer",message:String(i)})})};Ut.websocket.isActive()?s():Tl(e).then(()=>s()).catch(i=>n(i))})}const ur=Mr("invoiceData",{state:()=>({invoiceDetails:[],defaultModeOfPayment:"Cash",warehouse:"",posProfile:"",waiter:"",auth:cr(),cashier:"",modeOfPaymentList:null,alert:Mn(),showDialog:!1,notification:ra(),menu:ps(),recentOrders:kl(),printer:null,print_format:null,print_type:null,branch:null,company:null,qz_host:null,grandTotal:null,cancelReason:null,tableInvoiceNo:null,invoiceNumber:null,showUpdateButtton:!0,isChecked:!1,isPrinting:!1,cancelInvoiceFlag:!1,previousOrderItem:[],table:ws(),call:Dt.call(),qz_print:null}),actions:{fetchInvoiceDetails(){return _e(this,null,function*(){try{const e=yield this.call.get("ury.ury_pos.api.getPosProfile").then(t=>{this.invoiceDetails=t.message,this.warehouse=this.invoiceDetails.warehouse,this.posProfile=this.invoiceDetails.pos_profile,this.waiter=this.invoiceDetails.waiter,this.cashier=this.invoiceDetails.cashier,this.branch=this.invoiceDetails.branch,this.company=this.invoiceDetails.company,this.print_format=this.invoiceDetails.print_format,this.qz_print=this.invoiceDetails.qz_print,this.qz_host=this.invoiceDetails.qz_host,this.print_type=this.invoiceDetails.print_type,this.printer=this.invoiceDetails.printer,this.qz_host&&Tl(this.qz_host)})}catch(e){console.error(e)}this.call.get("ury.ury_pos.api.getModeOfPayment").then(e=>{this.modeOfPaymentList=e.message}).catch(e=>{})})},invoiceCreation(){return _e(this,null,function*(){this.showUpdateButtton=!1;let e="";this.invoiceNo=this.table.invoiceNo;let t=this.menu.cart;const r=Yo(),n=r.search,s=r.numberOfPax;let i=this.recentOrders.invoiceNumber||this.invoiceNumber||this.table.invoiceNo||null;e=this.table.selectedTable||this.recentOrders.restaurantTable;const a=JSON.parse(JSON.stringify(t)),o={table:e,customer:n,items:t,no_of_pax:s,mode_of_payment:this.defaultModeOfPayment,cashier:this.cashier,waiter:this.waiter,last_modified_time:this.table.modifiedTime,pos_profile:this.posProfile,invoice:i,last_invoice:i};!this.auth.cashier&&!s?(this.alert.createAlert("Message","Please Select Customer / No of Pax","OK"),this.showUpdateButtton=!0):!this.auth.cashier&&!e?(this.alert.createAlert("Message","Please Select a Table","OK"),this.showUpdateButtton=!0):this.call.post("ury.ury.doctype.ury_order.ury_order.sync_order",o).then(u=>{if(this.showUpdateButtton=!0,u.message.status==="Failure"){const l=u._server_messages,h=JSON.parse(l),d=JSON.parse(h[0]);this.alert.createAlert("Message",d.message,"OK").then(()=>{gt.push("/Table").then(()=>{window.location.reload()})})}else this.invoiceNumber=u.message.name,this.grandTotal=u.message.grand_total,this.notification.createNotification("Order Update"),this.table.fetchTable(),this.menu.comments="",this.menu.items.forEach(h=>{h.comment=""}),this.previousOrderItem.splice(0,this.previousOrderItem.length),this.previousOrderItem.splice(0,this.previousOrderItem.length,...a),this.table.modifiedTime=u.message.modified,this.auth.cashier&&this.recentOrders.viewRecentOrder(u.message)}).catch(u=>{if(this.showUpdateButtton=!0,u._server_messages){const l=JSON.parse(u._server_messages),h=JSON.parse(l[0]);this.alert.createAlert("Message",h.message,"OK")}})})},billing(e){const r={table:e.name};this.call.get("ury.ury.doctype.ury_order.ury_order.get_order_invoice",r).then(n=>{this.tableInvoiceNo=n.message.name,!this.auth.hasAccess&&!this.auth.cashier&&this.auth.sessionUser!==n.message.waiter?this.alert.createAlert("Message","Printing is Blocked Table is assigned to "+n.message.waiter,"OK"):(this.isPrinting=!0,this.printFunction())}).catch(n=>console.error(n))},printFunction:function(){return _e(this,null,function*(){var t,r;this.isPrinting=!0;let e=this.recentOrders.invoiceNumber||this.tableInvoiceNo||this.invoiceNumber;try{if(this.print_type==="qz"){const n={doc:"POS Invoice",name:e,print_format:this.print_format,_lang:"en"},s=yield this.call.get("frappe.www.printview.get_html_and_style",n);if((t=s==null?void 0:s.message)!=null&&t.html||(this.isPrinting=!1,this.alert.createAlert("Message","Error while getting the HTML document to print for QZ","OK")),(yield H6(this.qz_host,(r=s==null?void 0:s.message)==null?void 0:r.html))==="printed"){this.notification.createNotification("Print Successful");const a={invoice:e};this.call.post("ury.ury.api.ury_print.qz_print_update",a).then(()=>(window.location.reload(),200)).catch(o=>console.error(o,"printed"))}}else if(this.print_type==="network")if(this.auth.cashier){const n={doctype:"POS Invoice",name:e,printer_setting:this.printer,print_format:this.print_format},s=()=>_e(this,null,function*(){return(yield this.call.post("ury.ury.api.ury_print.network_printing",n)).message});let i=0,a="";do{const o=yield s();if(o==="Success"){this.notification.createNotification("Print Successful");const u={invoice:e};yield this.call.post("ury.ury.api.ury_print.qz_print_update",u).then(()=>(window.location.reload(),200))}a=o,i++}while(i<1);throw{alert:this.alert.createAlert("Message",`Print failed with error ${a}`,"OK"),custom:this.isPrinting=!1}}else{const n={invoice_id:e,pos_profile:this.posProfile},s=()=>_e(this,null,function*(){return(yield this.call.post("ury.ury.api.ury_print.select_network_printer",n)).message});let i=0,a="";do{const o=yield s();if(o==="Success"){this.notification.createNotification("Print Successful");const u={invoice:e};yield this.call.post("ury.ury.api.ury_print.qz_print_update",u).then(()=>(window.location.reload(),200))}a=o,i++}while(i<1);throw{alert:this.alert.createAlert("Message",`Print failed with error ${a}`,"OK"),custom:this.isPrinting=!1}}else{const n={doctype:"POS Invoice",name:e,print_format:this.print_format};this.call.post("ury.ury.api.ury_print.print_pos_page",n).then(s=>(this.notification.createNotification("Print Successful"),window.location.reload(),s.message)).catch(s=>console.error(s))}}catch(n){if(n!=null&&n.custom)return this.isPrinting=!1,this.alert.createAlert("Error",n==null?void 0:n.title,"OK")}})},loadPrinter:function(e){return _e(this,null,function*(){try{const t=yield Tl(url,e);print(e),t==="success"&&this.notification.createNotification("Printer loaded")}catch(t){this.alert.createAlert("Message",t.message,"OK")}})},showCancelInvoiceModal(){this.call.get("ury.ury.api.button_permission.cancel_check").then(e=>{e.message===!0?(this.cancelInvoiceFlag=!0,this.cancelReason=""):(this.alert.createAlert("Message","You don't Have Permission to Cancel ","OK"),this.cancelInvoiceFlag=!1,this.cancelReason="")}).catch(e=>{})},cancelInvoice:function(){return _e(this,null,function*(){const r={invoice_id:kl().invoiceNumber||this.invoiceNumber||this.table.invoiceNo,reason:this.cancelReason};this.call.post("ury.ury.doctype.ury_order.ury_order.cancel_order",r).then(()=>{this.notification.createNotification("Invoice Cancelled"),gt.push("/Table").then(()=>{window.location.reload()})}).catch(n=>console.error(n))})}}}),lr=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},j6={name:"takeAwayTable",setup(){const e=ws(),t=ur(),r=cr();return{table:e,invoiceData:t,auth:r}}},L6={class:"flow-root"},V6={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-gray-300 bg-opacity-50 text-lg"},U6={class:"grid grid-cols-2 gap-4 md:grid-cols-4 lg:grid-cols-5"},q6={class:"flex justify-between"},K6={class:"flex justify-start px-2 pt-2"},Y6={key:0,class:"relative"},z6=["onClick"],W6=E("svg",{class:"h-6 w-6","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[E("path",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"})],-1),G6=[W6],J6={class:"absolute right-0 z-10 w-36 divide-y divide-gray-100 rounded-lg bg-white shadow dark:bg-gray-700"},X6={class:"py-2"},Z6=["onClick"],Q6={key:0},eE=["onClick"],tE={class:"flex flex-col pb-4"},rE=["onClick"],nE={class:"text-sm text-gray-500 dark:text-gray-400"},sE={key:0,class:"mt-8 text-center"},iE=["onClick"],aE=E("svg",{class:"ml-2 h-6 w-6 dark:text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),oE={key:1,class:"mt-2 flex justify-center"},uE=["onClick"],lE=E("svg",{class:"svg-icon mr-2",viewBox:"0 0 24 24",width:"18",height:"18",fill:"white"},[E("path",{d:"M6 19H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h3V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v4h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-3v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-2zm0-2v-1a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1h2V9H4v8h2zM8 4v3h8V4H8zm0 13v3h8v-3H8zm-3-7h3v2H5v-2z"})],-1),cE=["onClick"],hE=E("svg",{"aria-hidden":"true",class:"h-10 w-6",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[E("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),E("path",{"fill-rule":"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z","clip-rule":"evenodd"})],-1),fE=[hE];function dE(e,t,r,n,s,i){return j(),V("div",L6,[this.invoiceData.isLoading?(j(),V("div",V6," Payment Being Processing ")):oe("",!0),E("div",U6,[(j(!0),V(De,null,ht(this.table.takeAway,a=>(j(),V("div",{"w-full":"",class:"w-full max-w-sm rounded-lg border border-gray-200 bg-white shadow dark:border-gray-700 dark:bg-gray-800",key:a.name},[E("div",q6,[E("div",K6,[E("span",{class:Ae(["me-2 rounded px-2.5 py-0.5 text-sm font-medium",{"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300":this.table.getBadgeType(a)==="default","bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300":this.table.getBadgeType(a)==="red","bg-yellow-100 text-yellow-800":this.table.getBadgeType(a)==="yellow","bg-green-100 text-green-800":this.table.getBadgeType(a)==="green"}])},be(this.table.getBadgeText(a)),3)]),a.occupied===1?(j(),V("div",Y6,[E("button",{class:"inline-block rounded-lg p-1.5 text-sm text-gray-500 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700",type:"button",onClick:o=>this.table.toggleDropdown(a.name)},G6,8,z6),Se(E("div",J6,[E("ul",X6,[E("li",null,[E("a",{href:"#",class:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white",onClick:o=>this.table.showModal=!0},"Table Transfer",8,Z6)]),this.auth.hasAccess?(j(),V("li",Q6,[E("a",{href:"#",class:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white",onClick:o=>this.table.showModalCaptainTransfer=!0},"Captain Transfer",8,eE)])):oe("",!0)])],512),[[oc,this.table.activeDropdown===a.name]])])):oe("",!0)]),E("div",tE,[E("div",{class:"mt-1 text-center",onClick:o=>a.occupied===1&&!this.auth.restrictTableOrder?this.table.routeToMenu(a):""},[E("h5",{class:Ae(["mt-2 text-xl font-medium text-gray-900 dark:text-white",{"mt-3":a.occupied===0}])},be(a.name),3),E("span",nE,be(a.occupied===1?this.table.getTimeDifference(a):""),1)],8,rE),a.occupied!=1?(j(),V("div",sE,[E("button",{type:"button",class:Ae(["inline-flex items-center rounded px-2 py-2.5 text-center text-sm font-medium text-white hover:bg-[#2557D6]/90 focus:outline-none focus:ring-4 focus:ring-[#2557D6]/50 dark:focus:ring-[#2557D6]/50",[{"bg-blue-700":!this.auth.restrictTableOrder,"pointer-events-none bg-blue-400":this.auth.restrictTableOrder}]]),onClick:o=>!this.auth.restrictTableOrder&&this.table.addToSelectedTables(a)},[Ys(" Open Table "),aE],10,iE)])):oe("",!0),a.occupied===1?(j(),V("div",oE,[E("button",{type:"button",class:"mb-2 me-2 inline-flex items-center rounded bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-[#2557D6]/90 focus:outline-none focus:ring-4 focus:ring-[#2557D6]/50 dark:focus:ring-[#2557D6]/50",onClick:o=>this.invoiceData.billing(a)},[lE,Ys(" Bill ")],8,uE),E("div",{class:Ae(["relative inline-flex h-10 w-10 items-center justify-center overflow-hidden rounded-full border hover:bg-blue-700 hover:text-white focus:outline-none focus:ring-4 focus:ring-blue-300 dark:border-blue-500 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white dark:focus:ring-blue-800",[{"border-blue-700 text-blue-700":!this.auth.restrictTableOrder,"pointer-events-none border-blue-400 text-blue-400":this.auth.restrictTableOrder}]]),onClick:o=>!this.auth.restrictTableOrder&&this.table.routeToCart(a)},fE,10,cE)])):oe("",!0)])]))),128))])])}const pE=lr(j6,[["render",dE]]);const gE={name:"Table",components:{takeAwayTable:pE},setup(){const e=ws(),t=ur(),r=cr();return{table:e,invoiceData:t,auth:r}}},Ct=e=>(Sp("data-v-80551b1d"),e=e(),_p(),e),mE={class:"switch-wrapper mt-2"},vE=Ct(()=>E("label",{for:"Table",class:"switch-label text-center"},"Table",-1)),yE=Ct(()=>E("label",{for:"take_away",class:"switch-label text-center"},"Takeaway",-1)),bE=Ct(()=>E("span",{class:"highlighter"},null,-1)),wE={key:0,class:"m-auto"},xE={class:"flow-root"},SE={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-gray-300 bg-opacity-50 text-lg"},_E={class:"grid grid-cols-2 gap-4 md:grid-cols-4 lg:grid-cols-5"},EE={class:"flex justify-between"},CE={class:"flex justify-start px-2 pt-2"},kE={key:0,class:"relative"},AE=["onClick"],PE=Ct(()=>E("svg",{class:"h-6 w-6","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[E("path",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"})],-1)),DE=[PE],TE={class:"absolute right-0 z-10 w-36 divide-y divide-gray-100 rounded-lg bg-white shadow dark:bg-gray-700"},FE={class:"py-2"},OE=["onClick"],RE={key:0},IE=["onClick"],NE={class:"flex flex-col pb-4"},ME=["onClick"],BE={class:"text-sm text-gray-500 dark:text-gray-400"},$E={key:0,class:"mt-8 text-center"},HE=["onClick"],jE=Ct(()=>E("svg",{class:"ml-2 h-6 w-6 dark:text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),LE={key:1,class:"mt-2 flex justify-center"},VE=["onClick"],UE=Ct(()=>E("svg",{class:"svg-icon mr-2",viewBox:"0 0 24 24",width:"18",height:"18",fill:"white"},[E("path",{d:"M6 19H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h3V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v4h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-3v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-2zm0-2v-1a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1h2V9H4v8h2zM8 4v3h8V4H8zm0 13v3h8v-3H8zm-3-7h3v2H5v-2z"})],-1)),qE=["onClick"],KE=Ct(()=>E("svg",{"aria-hidden":"true",class:"h-10 w-6",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[E("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),E("path",{"fill-rule":"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z","clip-rule":"evenodd"})],-1)),YE=[KE],zE={key:1,class:"container m-auto"},WE={key:2,class:"fixed inset-0 z-10 overflow-y-auto bg-gray-100"},GE={class:"mt-20 flex items-center justify-center"},JE={class:"mt-10 w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},XE={class:"flex justify-end"},ZE=Ct(()=>E("span",{class:"sr-only"},"Close",-1)),QE=Ct(()=>E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)),eC=[QE],tC=Ct(()=>E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," Table Transfer ",-1)),rC={class:"relative",ref:"container"},nC=Ct(()=>E("label",{for:"newTable",class:"mt-6 block text-left text-gray-900 dark:text-white"}," New Table ",-1)),sC={key:0,class:"absolute left-0 top-full z-10 max-h-64 w-full overflow-y-scroll rounded bg-white shadow",ref:"dropdown"},iC=["onClick"],aC={class:"text-base font-semibold leading-normal"},oC=Ct(()=>E("label",{for:"newTable",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Current Table ",-1)),uC=["value"],lC={class:"flex justify-end"},cC={key:3,class:"fixed inset-0 z-10 overflow-y-auto bg-gray-100"},hC={class:"mt-20 flex items-center justify-center"},fC={class:"mt-10 w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},dC={class:"flex justify-end"},pC=Ct(()=>E("span",{class:"sr-only"},"Close",-1)),gC=Ct(()=>E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)),mC=[gC],vC=Ct(()=>E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," Captain Transfer ",-1)),yC={class:"relative",ref:"container"},bC=Ct(()=>E("label",{for:"newTable",class:"mt-6 block text-left text-gray-900 dark:text-white"}," New Captain ",-1)),wC={key:0,class:"absolute left-0 top-full z-10 max-h-64 w-full overflow-y-scroll rounded bg-white shadow",ref:"dropdown"},xC=["onClick"],SC={class:"text-base font-semibold leading-normal"},_C=Ct(()=>E("label",{for:"newTable",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Current Captain ",-1)),EC=["value"],CC={class:"flex justify-end"};function kC(e,t,r,n,s,i){const a=$t("takeAwayTable");return j(),V(De,null,[E("div",mE,[Se(E("input",{id:"Table",type:"radio",name:"switch","onUpdate:modelValue":t[0]||(t[0]=o=>this.table.selectedOption=o),value:"Table"},null,512),[[ll,this.table.selectedOption]]),Se(E("input",{id:"take_away",type:"radio",name:"switch","onUpdate:modelValue":t[1]||(t[1]=o=>this.table.selectedOption=o),value:"take_away"},null,512),[[ll,this.table.selectedOption]]),vE,yE,bE]),this.table.selectedOption==="Table"?(j(),V("div",wE,[E("div",xE,[this.invoiceData.isPrinting?(j(),V("div",SE," Printing Invoice ")):oe("",!0),E("div",_E,[(j(!0),V(De,null,ht(this.table.filteredTables,o=>(j(),V("div",{"w-full":"",class:"w-full max-w-sm rounded border border-gray-200 bg-white shadow dark:border-gray-700 dark:bg-gray-800",key:o.name},[E("div",EE,[E("div",CE,[E("span",{class:Ae(["me-2 rounded px-2.5 py-0.5 text-sm font-medium",{"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300":this.table.getBadgeType(o)==="red","bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300":this.table.getBadgeType(o)==="default","bg-yellow-100 text-yellow-800":this.table.getBadgeType(o)==="yellow","bg-green-100 text-green-800":this.table.getBadgeType(o)==="green"}])},be(this.table.getBadgeText(o)),3)]),o.occupied===1?(j(),V("div",kE,[E("button",{class:"inline-block rounded-lg p-1.5 text-sm text-gray-500 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700",type:"button",onClick:u=>this.table.toggleDropdown(o.name)},DE,8,AE),Se(E("div",TE,[E("ul",FE,[E("li",null,[E("a",{href:"#",class:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white",onClick:u=>this.table.showModal=!0},"Table Transfer",8,OE)]),this.auth.hasAccess?(j(),V("li",RE,[E("a",{href:"#",class:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white",onClick:u=>this.table.showModalCaptainTransfer=!0},"Captain Transfer",8,IE)])):oe("",!0)])],512),[[oc,this.table.activeDropdown===o.name]])])):oe("",!0)]),E("div",NE,[E("div",{class:"mt-1 text-center",onClick:u=>o.occupied===1&&!this.auth.restrictTableOrder?this.table.routeToMenu(o):""},[E("h5",{class:Ae(["mt-2 text-xl font-medium text-gray-900 dark:text-white",{"mt-3":o.occupied===0}])},be(o.name),3),E("span",BE,be(o.occupied===1?this.table.getTimeDifference(o):""),1)],8,ME),o.occupied!=1?(j(),V("div",$E,[E("button",{type:"button",class:Ae(["inline-flex items-center rounded px-2 py-2.5 text-center text-sm font-medium text-white hover:bg-[#2557D6]/90 focus:outline-none focus:ring-4 focus:ring-[#2557D6]/50 dark:focus:ring-[#2557D6]/50",[{"bg-blue-700":!this.auth.restrictTableOrder,"pointer-events-none bg-blue-400":this.auth.restrictTableOrder}]]),onClick:u=>!this.auth.restrictTableOrder&&this.table.addToSelectedTables(o)},[Ys(" Open Table "),jE],10,HE)])):oe("",!0),o.occupied===1?(j(),V("div",LE,[E("button",{type:"button",class:"mb-2 me-2 inline-flex items-center rounded bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-[#2557D6]/90 focus:outline-none focus:ring-4 focus:ring-[#2557D6]/50 dark:focus:ring-[#2557D6]/50",onClick:u=>this.invoiceData.billing(o)},[UE,Ys(" Bill ")],8,VE),E("div",{class:Ae(["relative inline-flex h-10 w-10 items-center justify-center overflow-hidden rounded-full border hover:bg-blue-700 hover:text-white focus:outline-none focus:ring-4 focus:ring-blue-300 dark:border-blue-500 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white dark:focus:ring-blue-800",[{"border-blue-700 text-blue-700":!this.auth.restrictTableOrder,"pointer-events-none border-blue-400 text-blue-400":this.auth.restrictTableOrder}]]),onClick:u=>!this.auth.restrictTableOrder&&this.table.routeToCart(o)},YE,10,qE)])):oe("",!0)])]))),128))])])])):oe("",!0),this.table.selectedOption==="take_away"?(j(),V("div",zE,[K(a)])):oe("",!0),n.table.showModal?(j(),V("div",WE,[E("div",GE,[E("div",JE,[E("div",XE,[ZE,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[2]||(t[2]=o=>this.table.showModal=!1)},eC))]),tC,E("div",rC,[nC,Se(E("input",{type:"text",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[3]||(t[3]=o=>n.table.newTable=o),onClick:t[4]||(t[4]=o=>{this.table.showTable=!0,this.table.tableSearch()})},null,512),[[Ce,n.table.newTable]]),this.table.showTable?(j(),V("div",sC,[(j(!0),V(De,null,ht(this.table.searchTable,(o,u)=>(j(),V("div",{class:"h-16 w-full rounded-lg p-4 hover:bg-gray-100",key:u,onClick:l=>this.table.selectTable(o)},[E("h1",aC,be(o.name),1)],8,iC))),128))],512)):oe("",!0)],512),oC,E("input",{type:"text",id:"newTable",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none",value:n.table.tableName,readonly:""},null,8,uC),E("div",lC,[E("button",{onClick:t[5]||(t[5]=o=>{this.table.showModal=!1,this.table.tableTransfer(n.table)}),class:"mt-8 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Transfer ")])])])])):oe("",!0),n.table.showModalCaptainTransfer?(j(),V("div",cC,[E("div",hC,[E("div",fC,[E("div",dC,[pC,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[6]||(t[6]=o=>n.table.showModalCaptainTransfer=!1)},mC))]),vC,E("div",yC,[bC,Se(E("input",{type:"text",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none",onClick:t[7]||(t[7]=o=>{this.table.showCaptain=!0,this.table.fetchCaptain()}),"onUpdate:modelValue":t[8]||(t[8]=o=>this.table.newCaptain=o)},null,512),[[Ce,this.table.newCaptain]]),this.table.showCaptain?(j(),V("div",wC,[(j(!0),V(De,null,ht(this.table.captain,(o,u)=>(j(),V("div",{class:"h-16 w-full rounded-lg p-4 hover:bg-gray-100",key:u,onClick:l=>this.table.selectcaptain(o)},[E("h1",SC,be(o.name),1)],8,xC))),128))],512)):oe("",!0)],512),_C,E("input",{type:"text",id:"newTable",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none",value:this.table.currentCaptain,readonly:""},null,8,EC),E("div",CC,[E("button",{onClick:t[9]||(t[9]=o=>{this.table.showModalCaptainTransfer=!1,this.table.captianTransfer()}),class:"mt-8 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Transfer ")])])])])):oe("",!0)],64)}const td=lr(gE,[["render",kC],["__scopeId","data-v-80551b1d"]]),AC={name:"Customer",setup(){return{customers:Yo()}}},PC={class:"container m-auto"},DC={class:"mb-6 gap-6 md:grid-cols-2"},TC={class:"relative mt-5",ref:"container"},FC=E("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[E("svg",{"aria-hidden":"true",class:"h-5 w-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})])],-1),OC={key:0,class:"absolute left-0 top-full z-10 max-h-64 w-full overflow-y-scroll rounded bg-white shadow md:w-3/5 lg:w-2/5",ref:"dropdown"},RC=["onClick"],IC={class:"text-base font-semibold leading-normal"},NC={class:"text-sm leading-normal"},MC={key:0},BC=E("svg",{fill:"none",stroke:"currentColor",class:"h-8 w-8 font-extrabold",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[E("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v12m6-6H6"})],-1),$C={key:0,class:"fixed inset-0 z-10 mt-20 overflow-y-auto bg-gray-100"},HC={class:"mt-10 mb-16 flex items-center justify-center"},jC={class:"w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},LC={class:"flex justify-end"},VC=E("span",{class:"sr-only"},"Close",-1),UC=E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1),qC=[UC],KC=E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," New Customer ",-1),YC=E("label",{for:"newCustomer",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Customer Name ",-1),zC=E("label",{for:"mobileNumber",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Mobile Number ",-1),WC={class:"relative mt-5",ref:"container"},GC=E("label",{for:"customerGroup",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Customer Group ",-1),JC={key:0,class:"absolute left-0 top-full z-10 max-h-64 w-full overflow-y-scroll rounded bg-white shadow",ref:"dropdown"},XC=["onClick"],ZC={class:"text-base font-semibold leading-normal"},QC={class:"relative mt-5",ref:"container"},ek=E("label",{for:"territory",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Territory ",-1),tk={key:0,class:"absolute left-0 top-full z-10 max-h-64 w-full overflow-y-scroll rounded bg-white shadow",ref:"dropdown"},rk=["onClick"],nk={class:"text-base font-semibold leading-normal"},sk={class:"flex justify-end"},ik={class:"relative mb-6 mt-6"},ak=E("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[E("svg",{class:"h-6 w-6 text-gray-500 group-hover:text-blue-600 dark:text-gray-400 dark:group-hover:text-blue-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[E("path",{"fill-rule":"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z","clip-rule":"evenodd"})])],-1),ok={key:1,class:"tex mt-10 text-xl font-semibold"},uk={key:2,class:"cart-item-details mt-1 grid grid-cols-4 gap-2 py-2 sm:w-full md:w-full lg:w-full"},lk=E("h3",{class:"font-semibold"},"Item Name",-1),ck=E("h3",{class:"font-semibold"},"Quantity",-1),hk=[lk,ck],fk=E("img",null,null,-1),dk={class:"cart-item-details sm:min-w-none grid w-full min-w-0 grid-cols-4 gap-2 py-2 sm:w-full md:w-full lg:w-full"},pk={class:"ml-4"};function gk(e,t,r,n,s,i){return j(),V("div",PC,[E("div",DC,[E("div",TC,[FC,Se(E("input",{type:"text",class:"block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 pl-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500 md:w-3/5 lg:w-2/5",placeholder:"Search Customers","onUpdate:modelValue":t[0]||(t[0]=a=>this.customers.search=a),onInput:t[1]||(t[1]=a=>this.customers.pickCustomer()),onClick:t[2]||(t[2]=a=>{this.customers.showCustomers=!0,this.customers.showAddNewCustomer=!0}),required:""},null,544),[[Ce,this.customers.search]]),this.customers.showCustomers&&this.customers.showAddNewCustomer?(j(),V("div",OC,[(j(!0),V(De,null,ht(this.customers.customer,(a,o)=>(j(),V("div",{class:"h-16 rounded-lg p-4 hover:bg-gray-100",key:o,onClick:u=>this.customers.selectCustomer(a)},[E("h1",IC,be(a.name),1),E("h2",NC,be(a.name)+" "+be(a.content?this.customers.extractName(a.content):""),1)],8,RC))),128)),this.customers.showAddNewCustomer?(j(),V("div",MC,[E("a",{href:"#",class:"mt-4 inline-flex items-center text-blue-600 hover:underline",onClick:t[3]||(t[3]=Ay(a=>this.customers.newCustomerData(this.customers.search),["prevent"]))},[BC,Ys(" Create a New Customer ")])])):oe("",!0)],512)):oe("",!0)],512),this.customers.showModalNewCustomer?(j(),V("div",$C,[E("div",HC,[E("div",jC,[E("div",LC,[VC,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[4]||(t[4]=a=>this.customers.showModalNewCustomer=!1)},qC))]),KC,YC,Se(E("input",{type:"text",id:"newCustomer",class:"mt-4 w-full rounded-lg border border-gray-300 bg-gray-50 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500","onUpdate:modelValue":t[5]||(t[5]=a=>this.customers.newCustomer=a)},null,512),[[Ce,this.customers.newCustomer]]),zC,Se(E("input",{type:"number",id:"mobileNumber",class:"mt-4 w-full rounded-lg border border-gray-300 bg-gray-50 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500","onUpdate:modelValue":t[6]||(t[6]=a=>this.customers.newCustomerMobileNo=a)},null,512),[[Ce,this.customers.newCustomerMobileNo]]),E("div",WC,[GC,Se(E("input",{type:"text",id:"customerGroup",class:"mt-4 w-full rounded-lg border border-gray-300 bg-gray-50 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500","onUpdate:modelValue":t[7]||(t[7]=a=>this.customers.customerGroup=a),onClick:t[8]||(t[8]=a=>{this.customers.showCustomersGroup=!0,this.customers.pickCustomerGroup()}),required:""},null,512),[[Ce,this.customers.customerGroup]]),this.customers.showCustomersGroup?(j(),V("div",JC,[(j(!0),V(De,null,ht(this.customers.customerGroupList,(a,o)=>(j(),V("div",{class:"h-12 rounded-lg p-4 hover:bg-gray-100",key:o,onClick:u=>this.customers.selectCustomerGroup(a)},[E("h1",ZC,be(a.name),1)],8,XC))),128))],512)):oe("",!0)],512),E("div",QC,[ek,Se(E("input",{type:"text",id:"territory",class:"mt-4 w-full rounded-lg border border-gray-300 bg-gray-50 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500","onUpdate:modelValue":t[9]||(t[9]=a=>this.customers.customerTerritory=a),onClick:t[10]||(t[10]=a=>{this.customers.showCustomersTerritory=!0,this.customers.pickCustomerTerritory()}),required:""},null,512),[[Ce,this.customers.customerTerritory]]),this.customers.showCustomersTerritory?(j(),V("div",tk,[(j(!0),V(De,null,ht(this.customers.customerTerritoryList,(a,o)=>(j(),V("div",{class:"h-12 rounded-lg p-4 hover:bg-gray-100",key:o,onClick:u=>this.customers.selectCustomerTerritory(a)},[E("h1",nk,be(a.name),1)],8,rk))),128))],512)):oe("",!0)],512),E("div",sk,[E("button",{onClick:t[11]||(t[11]=a=>this.customers.addNewCustomer()),class:"mt-8 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Save ")])])])])):oe("",!0),E("div",ik,[ak,Se(E("input",{type:"text",id:"input-group-1",class:"block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 pl-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500 md:w-3/5 lg:w-2/5",placeholder:"Pax",required:"","onUpdate:modelValue":t[12]||(t[12]=a=>this.customers.numberOfPax=a)},null,512),[[Ce,this.customers.numberOfPax]])]),this.customers.customerFavouriteItems.length>0?(j(),V("h1",ok," Favourite Items ")):oe("",!0),this.customers.customerFavouriteItems.length>0?(j(),V("div",uk,hk)):oe("",!0),(j(!0),V(De,null,ht(this.customers.customerFavouriteItems,(a,o)=>(j(),V("div",{key:o},[fk,E("div",dk,[E("h3",null,be(a.item_name),1),E("h3",pk,be(a.qty),1)])]))),128))])])}const mk=lr(AC,[["render",gk]]),vk={setup(){return{menu:ps()}}},yk={class:"flex flex-col md:flex-row mt-2"},bk=E("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[E("svg",{"aria-hidden":"true",class:"h-5 w-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})])],-1),wk={key:0,class:"mt-2 flex flex-row md:ml-2 md:mt-0 md:w-1/3"};function xk(e,t,r,n,s,i){return j(),V("div",yk,[E("div",{class:Ae(["relative",[{"md:w-2/3":this.menu.showPriority==!0,"md:w-full":this.menu.showPriority==!1}]])},[bk,Se(E("input",{type:"search",id:"default-search",class:"block w-full rounded-lg border border-gray-300 bg-gray-50 pl-10 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500",placeholder:"Item Search","onUpdate:modelValue":t[0]||(t[0]=a=>this.menu.searchTerm=a),onInput:t[1]||(t[1]=(...a)=>this.menu.handleSearchInput&&this.menu.handleSearchInput(...a)),onClick:t[2]||(t[2]=(...a)=>this.menu.clearSearch&&this.menu.clearSearch(...a)),autocapitalize:"none"},null,544),[[Ce,this.menu.searchTerm]])],2),this.menu.showPriority==!0?(j(),V("div",wk,[E("button",{class:"focus:shadow-outline w-1/2 rounded bg-blue-700 px-4 py-2 font-bold text-white hover:bg-blue-900 focus:outline-none",type:"button",onClick:t[3]||(t[3]=(...a)=>this.menu.showSpecialItems&&this.menu.showSpecialItems(...a))}," Priority "),E("button",{class:"focus:shadow-outline ml-2 w-1/2 rounded bg-blue-700 px-4 py-2 font-bold text-white hover:bg-blue-900 focus:outline-none",type:"button",onClick:t[4]||(t[4]=(...a)=>this.menu.showAllItems&&this.menu.showAllItems(...a))}," All ")])):oe("",!0)])}const Sk=lr(vk,[["render",xk]]);const _k={setup(){return{menu:ps()}},name:"Menu",components:{Search:Sk}},Ek={key:0,class:"container mx-auto"},Ck={class:"mt-8 grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-5"},kk={class:"mt-0 mb-2 text-lg font-normal leading-normal"},Ak={class:"mt-0 mb-2 text-lg font-normal leading-normal"},Pk={key:0},Dk=["onClick"],Tk={key:1,class:"flex rounded-md"},Fk=["onClick"],Ok=["value","onInput","onClick"],Rk=["onClick"],Ik={key:0,class:"fixed inset-0 mt-20 z-10 overflow-y-auto bg-gray-100"},Nk={class:"mt-10 flex items-center justify-center"},Mk={class:"w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},Bk={class:"flex justify-end"},$k=E("span",{class:"sr-only"},"Close",-1),Hk=E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1),jk=[Hk],Lk=E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," Enter Details ",-1),Vk={class:"relative"},Uk=E("label",{for:"quantity",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Quantity ",-1),qk=E("label",{for:"paidAmount",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Comments ",-1),Kk={class:"flex justify-end"},Yk={key:1},zk={key:0,class:"flex h-screen items-center justify-center"},Wk=E("div",{class:"text-center"},"No items found. Please select a table or set an active menu.",-1),Gk=[Wk],Jk={key:1,class:"flex h-screen items-center justify-center"},Xk=E("div",{class:"text-center"},"No items found.",-1),Zk=[Xk],Qk={key:2,class:"mt-4 flex justify-center"},e8=["disabled"],t8=["onClick"],r8={key:1},n8=["disabled"];function s8(e,t,r,n,s,i){const a=$t("Search");return j(),V(De,null,[K(a),this.menu.paginatedItems.length>0?(j(),V("div",Ek,[E("div",Ck,[(j(!0),V(De,null,ht(this.menu.paginatedItems,o=>(j(),V("div",{class:"rounded-md border px-2 py-2 text-center shadow",key:o.item},[E("h2",kk,be(o.item_name),1),E("h2",Ak," ₹ "+be(o.rate),1),o.qty?oe("",!0):(j(),V("div",Pk,[E("button",{onClick:u=>{o.showInput=!0,this.menu.addToCart(o)},class:"rounded border px-10 pt-2.5 pb-2 text-xs font-medium leading-normal"}," ADD + ",8,Dk)])),o.qty?(j(),V("div",Tk,[E("button",{type:"button",class:"-ml-px inline-flex items-center justify-center gap-2 border bg-white py-3 px-4 align-middle text-sm font-medium text-gray-700 shadow-sm transition-all focus:outline-none dark:border-gray-700",onClick:u=>this.menu.decrementItemQuantity(o)}," - ",8,Fk),E("input",{type:"number",id:"qty_input",name:"qty_input",class:"block w-full border border-gray-200 text-center text-sm shadow-sm",value:o.qty,onInput:u=>o.qty=u.target.value,readonly:"",onClick:u=>this.menu.showModal(o)},null,40,Ok),E("button",{type:"button",class:"-ml-px inline-flex items-center justify-center gap-2 border bg-white py-3 px-4 align-middle text-sm font-medium text-gray-700 shadow-sm transition-all focus:outline-none dark:border-gray-700",onClick:u=>this.menu.incrementItemQuantity(o)}," + ",8,Rk)])):oe("",!0)]))),128)),n.menu.showDialog?(j(),V("div",Ik,[E("div",Nk,[E("div",Mk,[E("div",Bk,[$k,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[0]||(t[0]=o=>n.menu.showDialog=!1)},jk))]),Lk,E("div",Vk,[Uk,Se(E("input",{type:"number",id:"modeOfPayment",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[1]||(t[1]=o=>this.menu.quantity=o)},null,512),[[Ce,this.menu.quantity]]),qk,Se(E("input",{type:"text",id:"Comments",class:"mt-4 w-full rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[2]||(t[2]=o=>this.menu.itemComments=o)},null,512),[[Ce,this.menu.itemComments]])]),E("div",Kk,[E("button",{onClick:t[3]||(t[3]=o=>this.menu.addToCartAndUpdateQty(e.item)),class:"mt-8 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Add ")])])])])):oe("",!0)])])):(j(),V("div",Yk,[this.menu.items.length===0?(j(),V("div",zk,Gk)):(j(),V("div",Jk,Zk))])),this.menu.paginatedItems.length>0?(j(),V("div",Qk,[E("button",{class:Ae([{hidden:this.menu.currentPage===1},"mr-2 rounded-md border px-2 py-1"]),disabled:this.menu.currentPage===1,onClick:t[4]||(t[4]=o=>this.menu.currentPage-=1)}," Previous ",10,e8),(j(!0),V(De,null,ht(this.menu.pageNumbers,o=>(j(),V("div",null,[o===this.menu.currentPage||Math.abs(o-this.menu.currentPage)<=2?(j(),V("button",{key:o,onClick:u=>this.menu.currentPage=o,class:Ae([{"bg-gray-200":o===this.menu.currentPage},"mr-2 rounded-md border px-2 py-1"])},be(o),11,t8)):this.menu.pageNumbers.indexOf(o)===0||this.menu.pageNumbers.indexOf(o)===this.menu.pageNumbers.length-1?(j(),V("span",r8," ... ")):oe("",!0)]))),256)),E("button",{disabled:this.menu.currentPage===this.menu.totalPages,onClick:t[5]||(t[5]=o=>this.menu.currentPage+=1),class:Ae([{hidden:this.menu.currentPage===this.menu.totalPages},"rounded-md border px-2 py-1"])}," Next ",10,n8)])):oe("",!0)],64)}const i8=lr(_k,[["render",s8]]);const a8={name:"Cart",setup(){const e=ps(),t=ws(),r=cr(),n=ur();return{menu:e,table:t,invoiceData:n,auth:r}},methods:{}},o8={key:0,class:"float-right rounded px-4 py-2"},u8={key:1,class:"flex h-screen items-center justify-center"},l8=E("div",{class:"text-center"},"Nothing to show here",-1),c8=[l8],h8={key:2,class:"mt-20 border shadow"},f8=E("div",{class:"cart-item-details grid w-full grid-cols-3 gap-4 md:w-full lg:w-full"},[E("h3",{class:"ml-3 mt-2 text-base font-semibold text-gray-900 dark:text-white"}," Item Name "),E("h3",{class:"ml-3 mt-2 text-center text-lg font-semibold text-gray-900 dark:text-white"}," Quantity ")],-1),d8={class:"w-full text-base text-gray-900 dark:text-white"},p8=["value","onInput","onClick"],g8={class:"items-center text-center"},m8=["onClick"],v8=E("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",fill:"currentColor border",class:"bi bi-trash",viewBox:"0 0 16 16"},[E("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6Z"}),E("path",{d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1ZM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118ZM2.5 3h11V2h-11v1Z"})],-1),y8=[v8],b8={key:3,class:"relative mt-8"},w8=E("label",{for:"Comments",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Comments ",-1),x8={key:4,class:"fixed inset-0 z-10 mt-20 overflow-y-auto bg-gray-100"},S8={class:"mt-20 flex items-center justify-center"},_8={class:"w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},E8={class:"flex justify-end"},C8=E("span",{class:"sr-only"},"Close",-1),k8=E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1),A8=[k8],P8=E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," Are you sure to cancel ",-1),D8={class:"relative"},T8=E("label",{for:"cancelReason",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Reason ",-1),F8={class:"flex justify-end"},O8={key:5,class:"fixed inset-0 mt-20 z-10 overflow-y-auto bg-gray-100"},R8={class:"mt-10 flex items-center justify-center"},I8={class:"w-full rounded-lg bg-white p-6 shadow-lg md:max-w-md"},N8={class:"flex justify-end"},M8=E("span",{class:"sr-only"},"Close",-1),B8=E("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1),$8=[B8],H8=E("h2",{class:"mt-1 block text-left text-xl font-medium text-gray-900 dark:text-white"}," Enter Details ",-1),j8={class:"relative"},L8=E("label",{for:"quantity",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Quantity ",-1),V8=E("label",{for:"Comments",class:"mt-6 block text-left text-gray-900 dark:text-white"}," Comments ",-1),U8={class:"flex justify-end"},q8={key:6,class:"mt-4 w-full divide-y divide-gray-200 bg-white"},K8=E("summary",{class:"question w-full cursor-pointer select-none py-3"}," Additional Details ",-1),Y8={class:"additional-details m-3"},z8={key:0,for:"grand_total",class:"grand_total mt-10 block text-sm font-medium text-gray-900 dark:text-white"},W8=["value"],G8={key:2,for:"invoiceNo",class:"mt-10 block text-sm font-medium text-gray-900 dark:text-white"},J8=["value"],X8=["value"];function Z8(e,t,r,n,s,i){return j(),V(De,null,[this.menu.cart.length>0?(j(),V("div",o8,[this.invoiceData.showUpdateButtton===!0?(j(),V("button",{key:0,class:"mr-4 rounded px-4 py-2 shadow",onClick:t[0]||(t[0]=a=>this.invoiceData.invoiceCreation())}," Update ")):oe("",!0),E("button",{class:"rounded px-4 py-2 shadow",onClick:t[1]||(t[1]=a=>this.invoiceData.showCancelInvoiceModal())}," Cancel ")])):oe("",!0),this.menu.cart.length===0?(j(),V("div",u8,c8)):oe("",!0),this.menu.cart.length>0?(j(),V("div",h8,[f8,(j(!0),V(De,null,ht(this.menu.cart,(a,o)=>(j(),V("div",{class:"cart-item-details ml-3 mt-2 grid w-full grid-cols-3 gap-4 pb-2 md:w-full lg:w-full",key:o},[E("h3",d8,be(a.item_name),1),E("input",{type:"number",id:"qty_input_cart",name:"qty_input_cart",class:"block w-full border-none text-center text-base text-gray-900 dark:text-white",value:parseInt(a.qty),onInput:u=>a.qty=u.target.value,onClick:u=>{this.menu.showModal(a),n.menu.showDialogCart=!0}},null,40,p8),E("div",g8,[E("button",{class:"p-2 text-center",type:"button",onClick:u=>this.menu.removeItemFromCart(o)},y8,8,m8)])]))),128))])):oe("",!0),this.menu.cart.length>0?(j(),V("div",b8,[w8,Se(E("input",{id:"comments",class:"comments mt-3 block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5","onUpdate:modelValue":t[2]||(t[2]=a=>this.menu.comments=a)},null,512),[[Ce,this.menu.comments]])])):oe("",!0),this.invoiceData.cancelInvoiceFlag===!0?(j(),V("div",x8,[E("div",S8,[E("div",_8,[E("div",E8,[C8,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[3]||(t[3]=a=>this.invoiceData.cancelInvoiceFlag=!1)},A8))]),P8,E("div",D8,[T8,Se(E("input",{type:"text",id:"cancelReason",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[4]||(t[4]=a=>this.invoiceData.cancelReason=a)},null,512),[[Ce,this.invoiceData.cancelReason]])]),E("div",F8,[E("button",{onClick:t[5]||(t[5]=a=>this.invoiceData.cancelInvoiceFlag=!1),class:"mr-3 mt-6 rounded border border-gray-300 bg-gray-50 px-3 py-2"}," No "),E("button",{onClick:t[6]||(t[6]=a=>{this.invoiceData.cancelInvoice(),this.invoiceData.cancelInvoiceFlag=!1}),class:"mt-6 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Yes ")])])])])):oe("",!0),n.menu.showDialogCart?(j(),V("div",O8,[E("div",R8,[E("div",I8,[E("div",N8,[M8,(j(),V("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:t[7]||(t[7]=a=>n.menu.showDialogCart=!1)},$8))]),H8,E("div",j8,[L8,Se(E("input",{type:"number",id:"modeOfPayment",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[8]||(t[8]=a=>this.menu.quantity=a)},null,512),[[Ce,this.menu.quantity]]),V8,Se(E("input",{type:"text",id:"Comments",class:"mt-4 w-full appearance-none rounded border p-2 leading-tight text-gray-900 shadow focus:outline-none","onUpdate:modelValue":t[9]||(t[9]=a=>this.menu.itemComments=a)},null,512),[[Ce,this.menu.itemComments]])]),E("div",U8,[E("button",{onClick:t[10]||(t[10]=a=>{this.menu.addToCartAndUpdateQty(e.item),n.menu.showDialogCart=!1}),class:"mt-8 rounded bg-blue-500 px-3 py-2 text-white hover:bg-blue-600"}," Add ")])])])])):oe("",!0),this.menu.cart.length>0?(j(),V("div",q8,[E("details",null,[K8,E("div",Y8,[this.table.grandTotal||n.invoiceData.grandTotal?(j(),V("label",z8," Grand Total ")):oe("",!0),this.table.grandTotal||n.invoiceData.grandTotal?(j(),V("input",{key:1,class:"block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5",value:this.table.grandTotal||n.invoiceData.grandTotal,readonly:""},null,8,W8)):oe("",!0),this.table.invoiceNo||n.invoiceData.invoiceNumber?(j(),V("label",G8," Invoice ")):oe("",!0),this.table.invoiceNo||n.invoiceData.invoiceNumber?(j(),V("input",{key:3,class:"invoiceNo mt-3 block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5",value:this.table.invoiceNo||n.invoiceData.invoiceNumber,readonly:""},null,8,J8)):oe("",!0),E("label",{for:"waiter",class:Ae(["mt-10 block text-sm font-medium text-gray-900 dark:text-white",{hidden:this.invoiceData.waiter===""}])}," Waiter ",2),E("input",{class:Ae(["waiter mt-3 block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5",{hidden:this.invoiceData.waiter===""}]),value:this.table.newCaptain?this.table.newCaptain:this.invoiceData.waiter,readonly:""},null,10,X8),E("label",{for:"posProfile",class:Ae(["mt-10 block text-sm font-medium text-gray-900 dark:text-white",{hidden:this.invoiceData.posProfile===""}])}," POS Profile ",2),Se(E("input",{class:Ae(["posProfile mt-3 block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5",{hidden:this.invoiceData.posProfile===""}]),"onUpdate:modelValue":t[11]||(t[11]=a=>this.invoiceData.posProfile=a),readonly:""},null,2),[[Ce,this.invoiceData.posProfile]]),E("label",{for:"cashier",class:Ae(["mt-10 block text-sm font-medium text-gray-900 dark:text-white",{hidden:this.invoiceData.cashier===""}])}," Cashier ",2),Se(E("input",{class:Ae(["mt-3 block w-full rounded-md border bg-gray-50 p-2.5 text-sm text-gray-900 md:w-3/5 lg:w-2/5",{hidden:this.invoiceData.cashier===""}]),"onUpdate:modelValue":t[12]||(t[12]=a=>this.invoiceData.cashier=a),readonly:""},null,2),[[Ce,this.invoiceData.cashier]])])])])):oe("",!0)],64)}const Q8=lr(a8,[["render",Z8]]);Ir({});var zg={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames diff --git a/ury_pos/public/urypos/index.html b/ury_pos/public/urypos/index.html index 33184ac..dac25da 100644 --- a/ury_pos/public/urypos/index.html +++ b/ury_pos/public/urypos/index.html @@ -5,7 +5,7 @@ URY POS - + diff --git a/ury_pos/www/urypos.html b/ury_pos/www/urypos.html index 33184ac..dac25da 100644 --- a/ury_pos/www/urypos.html +++ b/ury_pos/www/urypos.html @@ -5,7 +5,7 @@ URY POS - + diff --git a/urypos/src/components/Customer.vue b/urypos/src/components/Customer.vue index eeaceb6..f5f6a01 100644 --- a/urypos/src/components/Customer.vue +++ b/urypos/src/components/Customer.vue @@ -87,7 +87,7 @@ v-if="this.customers.showModalNewCustomer" class="fixed inset-0 z-10 mt-20 overflow-y-auto bg-gray-100" > -
+
Close