recaho-print-react 0.0.126 → 0.0.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(Oe,Ne){typeof exports=="object"&&typeof module<"u"?Ne(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],Ne):(Oe=typeof globalThis<"u"?globalThis:Oe||self,Ne(Oe["recaho-print-react"]={},Oe.React,Oe.ReactDOM))})(this,function(Oe,Ne,Xa){"use strict";function pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ms={exports:{}},Xt={};/**
1
+ (function(Oe,je){typeof exports=="object"&&typeof module<"u"?je(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],je):(Oe=typeof globalThis<"u"?globalThis:Oe||self,je(Oe["recaho-print-react"]={},Oe.React,Oe.ReactDOM))})(this,function(Oe,je,Xa){"use strict";function pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ms={exports:{}},Xt={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var yr;function ei(){if(yr)return Xt;yr=1;var e=Ne,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function h(f,o,l){var c,d={},m=null,p=null;l!==void 0&&(m=""+l),o.key!==void 0&&(m=""+o.key),o.ref!==void 0&&(p=o.ref);for(c in o)r.call(o,c)&&!a.hasOwnProperty(c)&&(d[c]=o[c]);if(f&&f.defaultProps)for(c in o=f.defaultProps,o)d[c]===void 0&&(d[c]=o[c]);return{$$typeof:t,type:f,key:m,ref:p,props:d,_owner:i.current}}return Xt.Fragment=n,Xt.jsx=h,Xt.jsxs=h,Xt}var es={};/**
9
+ */var yr;function ei(){if(yr)return Xt;yr=1;var e=je,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function h(f,o,l){var c,d={},p=null,m=null;l!==void 0&&(p=""+l),o.key!==void 0&&(p=""+o.key),o.ref!==void 0&&(m=o.ref);for(c in o)r.call(o,c)&&!a.hasOwnProperty(c)&&(d[c]=o[c]);if(f&&f.defaultProps)for(c in o=f.defaultProps,o)d[c]===void 0&&(d[c]=o[c]);return{$$typeof:t,type:f,key:p,ref:m,props:d,_owner:i.current}}return Xt.Fragment=n,Xt.jsx=h,Xt.jsxs=h,Xt}var es={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,41 +14,41 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var gr;function ti(){return gr||(gr=1,process.env.NODE_ENV!=="production"&&function(){var e=Ne,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),f=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),x=Symbol.iterator,v="@@iterator";function _(y){if(y===null||typeof y!="object")return null;var N=x&&y[x]||y[v];return typeof N=="function"?N:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function T(y){{for(var N=arguments.length,P=new Array(N>1?N-1:0),V=1;V<N;V++)P[V-1]=arguments[V];O("error",y,P)}}function O(y,N,P){{var V=w.ReactDebugCurrentFrame,oe=V.getStackAddendum();oe!==""&&(N+="%s",P=P.concat([oe]));var he=P.map(function(ie){return String(ie)});he.unshift("Warning: "+N),Function.prototype.apply.call(console[y],console,he)}}var F=!1,M=!1,z=!1,K=!1,te=!1,Q;Q=Symbol.for("react.module.reference");function ae(y){return!!(typeof y=="string"||typeof y=="function"||y===r||y===a||te||y===i||y===l||y===c||K||y===p||F||M||z||typeof y=="object"&&y!==null&&(y.$$typeof===m||y.$$typeof===d||y.$$typeof===h||y.$$typeof===f||y.$$typeof===o||y.$$typeof===Q||y.getModuleId!==void 0))}function Ce(y,N,P){var V=y.displayName;if(V)return V;var oe=N.displayName||N.name||"";return oe!==""?P+"("+oe+")":P}function W(y){return y.displayName||"Context"}function q(y){if(y==null)return null;if(typeof y.tag=="number"&&T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof y=="function")return y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case c:return"SuspenseList"}if(typeof y=="object")switch(y.$$typeof){case f:var N=y;return W(N)+".Consumer";case h:var P=y;return W(P._context)+".Provider";case o:return Ce(y,y.render,"ForwardRef");case d:var V=y.displayName||null;return V!==null?V:q(y.type)||"Memo";case m:{var oe=y,he=oe._payload,ie=oe._init;try{return q(ie(he))}catch{return null}}}return null}var B=Object.assign,me=0,A,Be,st,nt,pt,Mt,J;function je(){}je.__reactDisabledLog=!0;function yt(){{if(me===0){A=console.log,Be=console.info,st=console.warn,nt=console.error,pt=console.group,Mt=console.groupCollapsed,J=console.groupEnd;var y={configurable:!0,enumerable:!0,value:je,writable:!0};Object.defineProperties(console,{info:y,log:y,warn:y,error:y,group:y,groupCollapsed:y,groupEnd:y})}me++}}function gt(){{if(me--,me===0){var y={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},y,{value:A}),info:B({},y,{value:Be}),warn:B({},y,{value:st}),error:B({},y,{value:nt}),group:B({},y,{value:pt}),groupCollapsed:B({},y,{value:Mt}),groupEnd:B({},y,{value:J})})}me<0&&T("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var g=w.ReactCurrentDispatcher,u;function C(y,N,P){{if(u===void 0)try{throw Error()}catch(oe){var V=oe.stack.trim().match(/\n( *(at )?)/);u=V&&V[1]||""}return`
18
- `+u+y}}var j=!1,I;{var D=typeof WeakMap=="function"?WeakMap:Map;I=new D}function S(y,N){if(!y||j)return"";{var P=I.get(y);if(P!==void 0)return P}var V;j=!0;var oe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var he;he=g.current,g.current=null,yt();try{if(N){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(Fe){V=Fe}Reflect.construct(y,[],ie)}else{try{ie.call()}catch(Fe){V=Fe}y.call(ie.prototype)}}else{try{throw Error()}catch(Fe){V=Fe}y()}}catch(Fe){if(Fe&&V&&typeof Fe.stack=="string"){for(var ne=Fe.stack.split(`
19
- `),Ee=V.stack.split(`
20
- `),be=ne.length-1,we=Ee.length-1;be>=1&&we>=0&&ne[be]!==Ee[we];)we--;for(;be>=1&&we>=0;be--,we--)if(ne[be]!==Ee[we]){if(be!==1||we!==1)do if(be--,we--,we<0||ne[be]!==Ee[we]){var We=`
21
- `+ne[be].replace(" at new "," at ");return y.displayName&&We.includes("<anonymous>")&&(We=We.replace("<anonymous>",y.displayName)),typeof y=="function"&&I.set(y,We),We}while(be>=1&&we>=0);break}}}finally{j=!1,g.current=he,gt(),Error.prepareStackTrace=oe}var Jt=y?y.displayName||y.name:"",kt=Jt?C(Jt):"";return typeof y=="function"&&I.set(y,kt),kt}function k(y,N,P){return S(y,!1)}function $(y){var N=y.prototype;return!!(N&&N.isReactComponent)}function pe(y,N,P){if(y==null)return"";if(typeof y=="function")return S(y,$(y));if(typeof y=="string")return C(y);switch(y){case l:return C("Suspense");case c:return C("SuspenseList")}if(typeof y=="object")switch(y.$$typeof){case o:return k(y.render);case d:return pe(y.type,N,P);case m:{var V=y,oe=V._payload,he=V._init;try{return pe(he(oe),N,P)}catch{}}}return""}var Te=Object.prototype.hasOwnProperty,Le={},Pe=w.ReactDebugCurrentFrame;function Ae(y){if(y){var N=y._owner,P=pe(y.type,y._source,N?N.type:null);Pe.setExtraStackFrame(P)}else Pe.setExtraStackFrame(null)}function At(y,N,P,V,oe){{var he=Function.call.bind(Te);for(var ie in y)if(he(y,ie)){var ne=void 0;try{if(typeof y[ie]!="function"){var Ee=Error((V||"React class")+": "+P+" type `"+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof y[ie]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ee.name="Invariant Violation",Ee}ne=y[ie](N,ie,V,P,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(be){ne=be}ne&&!(ne instanceof Error)&&(Ae(oe),T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",V||"React class",P,ie,typeof ne),Ae(null)),ne instanceof Error&&!(ne.message in Le)&&(Le[ne.message]=!0,Ae(oe),T("Failed %s type: %s",P,ne.message),Ae(null))}}}var Et=Array.isArray;function xt(y){return Et(y)}function G(y){{var N=typeof Symbol=="function"&&Symbol.toStringTag,P=N&&y[Symbol.toStringTag]||y.constructor.name||"Object";return P}}function Rt(y){try{return rt(y),!1}catch{return!0}}function rt(y){return""+y}function Ns(y){if(Rt(y))return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",G(y)),rt(y)}var js=w.ReactCurrentOwner,on={key:!0,ref:!0,__self:!0,__source:!0},vs,_s;function cn(y){if(Te.call(y,"ref")){var N=Object.getOwnPropertyDescriptor(y,"ref").get;if(N&&N.isReactWarning)return!1}return y.ref!==void 0}function dn(y){if(Te.call(y,"key")){var N=Object.getOwnPropertyDescriptor(y,"key").get;if(N&&N.isReactWarning)return!1}return y.key!==void 0}function hn(y,N){typeof y.ref=="string"&&js.current}function un(y,N){{var P=function(){vs||(vs=!0,T("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",N))};P.isReactWarning=!0,Object.defineProperty(y,"key",{get:P,configurable:!0})}}function mn(y,N){{var P=function(){_s||(_s=!0,T("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",N))};P.isReactWarning=!0,Object.defineProperty(y,"ref",{get:P,configurable:!0})}}var fn=function(y,N,P,V,oe,he,ie){var ne={$$typeof:t,type:y,key:N,ref:P,props:ie,_owner:he};return ne._store={},Object.defineProperty(ne._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ne,"_self",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.defineProperty(ne,"_source",{configurable:!1,enumerable:!1,writable:!1,value:oe}),Object.freeze&&(Object.freeze(ne.props),Object.freeze(ne)),ne};function pn(y,N,P,V,oe){{var he,ie={},ne=null,Ee=null;P!==void 0&&(Ns(P),ne=""+P),dn(N)&&(Ns(N.key),ne=""+N.key),cn(N)&&(Ee=N.ref,hn(N,oe));for(he in N)Te.call(N,he)&&!on.hasOwnProperty(he)&&(ie[he]=N[he]);if(y&&y.defaultProps){var be=y.defaultProps;for(he in be)ie[he]===void 0&&(ie[he]=be[he])}if(ne||Ee){var we=typeof y=="function"?y.displayName||y.name||"Unknown":y;ne&&un(ie,we),Ee&&mn(ie,we)}return fn(y,ne,Ee,oe,V,js.current,ie)}}var Kt=w.ReactCurrentOwner,bs=w.ReactDebugCurrentFrame;function Nt(y){if(y){var N=y._owner,P=pe(y.type,y._source,N?N.type:null);bs.setExtraStackFrame(P)}else bs.setExtraStackFrame(null)}var Qt;Qt=!1;function Zt(y){return typeof y=="object"&&y!==null&&y.$$typeof===t}function Ss(){{if(Kt.current){var y=q(Kt.current.type);if(y)return`
17
+ */var gr;function ti(){return gr||(gr=1,process.env.NODE_ENV!=="production"&&function(){var e=je,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),f=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),x=Symbol.iterator,v="@@iterator";function b(y){if(y===null||typeof y!="object")return null;var N=x&&y[x]||y[v];return typeof N=="function"?N:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(y){{for(var N=arguments.length,L=new Array(N>1?N-1:0),V=1;V<N;V++)L[V-1]=arguments[V];M("error",y,L)}}function M(y,N,L){{var V=w.ReactDebugCurrentFrame,ce=V.getStackAddendum();ce!==""&&(N+="%s",L=L.concat([ce]));var ue=L.map(function(le){return String(le)});ue.unshift("Warning: "+N),Function.prototype.apply.call(console[y],console,ue)}}var P=!1,O=!1,z=!1,K=!1,se=!1,Q;Q=Symbol.for("react.module.reference");function ie(y){return!!(typeof y=="string"||typeof y=="function"||y===r||y===a||se||y===i||y===l||y===c||K||y===m||P||O||z||typeof y=="object"&&y!==null&&(y.$$typeof===p||y.$$typeof===d||y.$$typeof===h||y.$$typeof===f||y.$$typeof===o||y.$$typeof===Q||y.getModuleId!==void 0))}function Ce(y,N,L){var V=y.displayName;if(V)return V;var ce=N.displayName||N.name||"";return ce!==""?L+"("+ce+")":L}function W(y){return y.displayName||"Context"}function q(y){if(y==null)return null;if(typeof y.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof y=="function")return y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case c:return"SuspenseList"}if(typeof y=="object")switch(y.$$typeof){case f:var N=y;return W(N)+".Consumer";case h:var L=y;return W(L._context)+".Provider";case o:return Ce(y,y.render,"ForwardRef");case d:var V=y.displayName||null;return V!==null?V:q(y.type)||"Memo";case p:{var ce=y,ue=ce._payload,le=ce._init;try{return q(le(ue))}catch{return null}}}return null}var B=Object.assign,fe=0,U,Z,nt,rt,Mt,at,At;function J(){}J.__reactDisabledLog=!0;function be(){{if(fe===0){U=console.log,Z=console.info,nt=console.warn,rt=console.error,Mt=console.group,at=console.groupCollapsed,At=console.groupEnd;var y={configurable:!0,enumerable:!0,value:J,writable:!0};Object.defineProperties(console,{info:y,log:y,warn:y,error:y,group:y,groupCollapsed:y,groupEnd:y})}fe++}}function gt(){{if(fe--,fe===0){var y={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},y,{value:U}),info:B({},y,{value:Z}),warn:B({},y,{value:nt}),error:B({},y,{value:rt}),group:B({},y,{value:Mt}),groupCollapsed:B({},y,{value:at}),groupEnd:B({},y,{value:At})})}fe<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var g=w.ReactCurrentDispatcher,u;function I(y,N,L){{if(u===void 0)try{throw Error()}catch(ce){var V=ce.stack.trim().match(/\n( *(at )?)/);u=V&&V[1]||""}return`
18
+ `+u+y}}var j=!1,C;{var F=typeof WeakMap=="function"?WeakMap:Map;C=new F}function T(y,N){if(!y||j)return"";{var L=C.get(y);if(L!==void 0)return L}var V;j=!0;var ce=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ue;ue=g.current,g.current=null,be();try{if(N){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(De){V=De}Reflect.construct(y,[],le)}else{try{le.call()}catch(De){V=De}y.call(le.prototype)}}else{try{throw Error()}catch(De){V=De}y()}}catch(De){if(De&&V&&typeof De.stack=="string"){for(var re=De.stack.split(`
19
+ `),Re=V.stack.split(`
20
+ `),Se=re.length-1,we=Re.length-1;Se>=1&&we>=0&&re[Se]!==Re[we];)we--;for(;Se>=1&&we>=0;Se--,we--)if(re[Se]!==Re[we]){if(Se!==1||we!==1)do if(Se--,we--,we<0||re[Se]!==Re[we]){var ze=`
21
+ `+re[Se].replace(" at new "," at ");return y.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",y.displayName)),typeof y=="function"&&C.set(y,ze),ze}while(Se>=1&&we>=0);break}}}finally{j=!1,g.current=ue,gt(),Error.prepareStackTrace=ce}var Jt=y?y.displayName||y.name:"",kt=Jt?I(Jt):"";return typeof y=="function"&&C.set(y,kt),kt}function R(y,N,L){return T(y,!1)}function $(y){var N=y.prototype;return!!(N&&N.isReactComponent)}function pe(y,N,L){if(y==null)return"";if(typeof y=="function")return T(y,$(y));if(typeof y=="string")return I(y);switch(y){case l:return I("Suspense");case c:return I("SuspenseList")}if(typeof y=="object")switch(y.$$typeof){case o:return R(y.render);case d:return pe(y.type,N,L);case p:{var V=y,ce=V._payload,ue=V._init;try{return pe(ue(ce),N,L)}catch{}}}return""}var Ee=Object.prototype.hasOwnProperty,Pe={},Fe=w.ReactDebugCurrentFrame;function Ae(y){if(y){var N=y._owner,L=pe(y.type,y._source,N?N.type:null);Fe.setExtraStackFrame(L)}else Fe.setExtraStackFrame(null)}function $e(y,N,L,V,ce){{var ue=Function.call.bind(Ee);for(var le in y)if(ue(y,le)){var re=void 0;try{if(typeof y[le]!="function"){var Re=Error((V||"React class")+": "+L+" type `"+le+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof y[le]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Re.name="Invariant Violation",Re}re=y[le](N,le,V,L,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Se){re=Se}re&&!(re instanceof Error)&&(Ae(ce),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",V||"React class",L,le,typeof re),Ae(null)),re instanceof Error&&!(re.message in Pe)&&(Pe[re.message]=!0,Ae(ce),S("Failed %s type: %s",L,re.message),Ae(null))}}}var Et=Array.isArray;function xt(y){return Et(y)}function G(y){{var N=typeof Symbol=="function"&&Symbol.toStringTag,L=N&&y[Symbol.toStringTag]||y.constructor.name||"Object";return L}}function Rt(y){try{return it(y),!1}catch{return!0}}function it(y){return""+y}function Ns(y){if(Rt(y))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",G(y)),it(y)}var js=w.ReactCurrentOwner,on={key:!0,ref:!0,__self:!0,__source:!0},vs,_s;function cn(y){if(Ee.call(y,"ref")){var N=Object.getOwnPropertyDescriptor(y,"ref").get;if(N&&N.isReactWarning)return!1}return y.ref!==void 0}function dn(y){if(Ee.call(y,"key")){var N=Object.getOwnPropertyDescriptor(y,"key").get;if(N&&N.isReactWarning)return!1}return y.key!==void 0}function hn(y,N){typeof y.ref=="string"&&js.current}function un(y,N){{var L=function(){vs||(vs=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",N))};L.isReactWarning=!0,Object.defineProperty(y,"key",{get:L,configurable:!0})}}function mn(y,N){{var L=function(){_s||(_s=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",N))};L.isReactWarning=!0,Object.defineProperty(y,"ref",{get:L,configurable:!0})}}var fn=function(y,N,L,V,ce,ue,le){var re={$$typeof:t,type:y,key:N,ref:L,props:le,_owner:ue};return re._store={},Object.defineProperty(re._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(re,"_self",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.defineProperty(re,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.freeze&&(Object.freeze(re.props),Object.freeze(re)),re};function pn(y,N,L,V,ce){{var ue,le={},re=null,Re=null;L!==void 0&&(Ns(L),re=""+L),dn(N)&&(Ns(N.key),re=""+N.key),cn(N)&&(Re=N.ref,hn(N,ce));for(ue in N)Ee.call(N,ue)&&!on.hasOwnProperty(ue)&&(le[ue]=N[ue]);if(y&&y.defaultProps){var Se=y.defaultProps;for(ue in Se)le[ue]===void 0&&(le[ue]=Se[ue])}if(re||Re){var we=typeof y=="function"?y.displayName||y.name||"Unknown":y;re&&un(le,we),Re&&mn(le,we)}return fn(y,re,Re,ce,V,js.current,le)}}var Kt=w.ReactCurrentOwner,bs=w.ReactDebugCurrentFrame;function Nt(y){if(y){var N=y._owner,L=pe(y.type,y._source,N?N.type:null);bs.setExtraStackFrame(L)}else bs.setExtraStackFrame(null)}var Qt;Qt=!1;function Zt(y){return typeof y=="object"&&y!==null&&y.$$typeof===t}function Ss(){{if(Kt.current){var y=q(Kt.current.type);if(y)return`
22
22
 
23
- Check the render method of \``+y+"`."}return""}}function yn(y){return""}var Ts={};function gn(y){{var N=Ss();if(!N){var P=typeof y=="string"?y:y.displayName||y.name;P&&(N=`
23
+ Check the render method of \``+y+"`."}return""}}function yn(y){return""}var Ts={};function gn(y){{var N=Ss();if(!N){var L=typeof y=="string"?y:y.displayName||y.name;L&&(N=`
24
24
 
25
- Check the top-level render call using <`+P+">.")}return N}}function ws(y,N){{if(!y._store||y._store.validated||y.key!=null)return;y._store.validated=!0;var P=gn(N);if(Ts[P])return;Ts[P]=!0;var V="";y&&y._owner&&y._owner!==Kt.current&&(V=" It was passed a child from "+q(y._owner.type)+"."),Nt(y),T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',P,V),Nt(null)}}function Is(y,N){{if(typeof y!="object")return;if(xt(y))for(var P=0;P<y.length;P++){var V=y[P];Zt(V)&&ws(V,N)}else if(Zt(y))y._store&&(y._store.validated=!0);else if(y){var oe=_(y);if(typeof oe=="function"&&oe!==y.entries)for(var he=oe.call(y),ie;!(ie=he.next()).done;)Zt(ie.value)&&ws(ie.value,N)}}}function xn(y){{var N=y.type;if(N==null||typeof N=="string")return;var P;if(typeof N=="function")P=N.propTypes;else if(typeof N=="object"&&(N.$$typeof===o||N.$$typeof===d))P=N.propTypes;else return;if(P){var V=q(N);At(P,y.props,"prop",V,y)}else if(N.PropTypes!==void 0&&!Qt){Qt=!0;var oe=q(N);T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",oe||"Unknown")}typeof N.getDefaultProps=="function"&&!N.getDefaultProps.isReactClassApproved&&T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Nn(y){{for(var N=Object.keys(y.props),P=0;P<N.length;P++){var V=N[P];if(V!=="children"&&V!=="key"){Nt(y),T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",V),Nt(null);break}}y.ref!==null&&(Nt(y),T("Invalid attribute `ref` supplied to `React.Fragment`."),Nt(null))}}var Cs={};function Os(y,N,P,V,oe,he){{var ie=ae(y);if(!ie){var ne="";(y===void 0||typeof y=="object"&&y!==null&&Object.keys(y).length===0)&&(ne+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ee=yn();Ee?ne+=Ee:ne+=Ss();var be;y===null?be="null":xt(y)?be="array":y!==void 0&&y.$$typeof===t?(be="<"+(q(y.type)||"Unknown")+" />",ne=" Did you accidentally export a JSX literal instead of a component?"):be=typeof y,T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",be,ne)}var we=pn(y,N,P,oe,he);if(we==null)return we;if(ie){var We=N.children;if(We!==void 0)if(V)if(xt(We)){for(var Jt=0;Jt<We.length;Jt++)Is(We[Jt],y);Object.freeze&&Object.freeze(We)}else T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Is(We,y)}if(Te.call(N,"key")){var kt=q(y),Fe=Object.keys(N).filter(function(Yh){return Yh!=="key"}),fr=Fe.length>0?"{key: someKey, "+Fe.join(": ..., ")+": ...}":"{key: someKey}";if(!Cs[kt+fr]){var Dh=Fe.length>0?"{"+Fe.join(": ..., ")+": ...}":"{}";T(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+L+">.")}return N}}function ws(y,N){{if(!y._store||y._store.validated||y.key!=null)return;y._store.validated=!0;var L=gn(N);if(Ts[L])return;Ts[L]=!0;var V="";y&&y._owner&&y._owner!==Kt.current&&(V=" It was passed a child from "+q(y._owner.type)+"."),Nt(y),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',L,V),Nt(null)}}function Is(y,N){{if(typeof y!="object")return;if(xt(y))for(var L=0;L<y.length;L++){var V=y[L];Zt(V)&&ws(V,N)}else if(Zt(y))y._store&&(y._store.validated=!0);else if(y){var ce=b(y);if(typeof ce=="function"&&ce!==y.entries)for(var ue=ce.call(y),le;!(le=ue.next()).done;)Zt(le.value)&&ws(le.value,N)}}}function xn(y){{var N=y.type;if(N==null||typeof N=="string")return;var L;if(typeof N=="function")L=N.propTypes;else if(typeof N=="object"&&(N.$$typeof===o||N.$$typeof===d))L=N.propTypes;else return;if(L){var V=q(N);$e(L,y.props,"prop",V,y)}else if(N.PropTypes!==void 0&&!Qt){Qt=!0;var ce=q(N);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ce||"Unknown")}typeof N.getDefaultProps=="function"&&!N.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Nn(y){{for(var N=Object.keys(y.props),L=0;L<N.length;L++){var V=N[L];if(V!=="children"&&V!=="key"){Nt(y),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",V),Nt(null);break}}y.ref!==null&&(Nt(y),S("Invalid attribute `ref` supplied to `React.Fragment`."),Nt(null))}}var Cs={};function Os(y,N,L,V,ce,ue){{var le=ie(y);if(!le){var re="";(y===void 0||typeof y=="object"&&y!==null&&Object.keys(y).length===0)&&(re+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Re=yn();Re?re+=Re:re+=Ss();var Se;y===null?Se="null":xt(y)?Se="array":y!==void 0&&y.$$typeof===t?(Se="<"+(q(y.type)||"Unknown")+" />",re=" Did you accidentally export a JSX literal instead of a component?"):Se=typeof y,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Se,re)}var we=pn(y,N,L,ce,ue);if(we==null)return we;if(le){var ze=N.children;if(ze!==void 0)if(V)if(xt(ze)){for(var Jt=0;Jt<ze.length;Jt++)Is(ze[Jt],y);Object.freeze&&Object.freeze(ze)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Is(ze,y)}if(Ee.call(N,"key")){var kt=q(y),De=Object.keys(N).filter(function(Yh){return Yh!=="key"}),fr=De.length>0?"{key: someKey, "+De.join(": ..., ")+": ...}":"{key: someKey}";if(!Cs[kt+fr]){var Dh=De.length>0?"{"+De.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,fr,kt,Dh,kt),Cs[kt+fr]=!0}}return y===r?Nn(we):xn(we),we}}function ee(y,N,P){return Os(y,N,P,!0)}function b(y,N,P){return Os(y,N,P,!1)}var Z=b,ue=ee;es.Fragment=r,es.jsx=Z,es.jsxs=ue}()),es}var xr;function si(){return xr||(xr=1,process.env.NODE_ENV==="production"?Ms.exports=ei():Ms.exports=ti()),Ms.exports}var s=si(),Lt={},Nr;function ni(){if(Nr)return Lt;Nr=1;var e=Xa;if(process.env.NODE_ENV==="production")Lt.createRoot=e.createRoot,Lt.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Lt.createRoot=function(n,r){t.usingClientEntryPoint=!0;try{return e.createRoot(n,r)}finally{t.usingClientEntryPoint=!1}},Lt.hydrateRoot=function(n,r,i){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(n,r,i)}finally{t.usingClientEntryPoint=!1}}}return Lt}var ri=ni();const ai=pr(ri),ts=e=>e.replace(/\-/g," ").replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase());//! moment.js
30
+ <%s key={someKey} {...props} />`,fr,kt,Dh,kt),Cs[kt+fr]=!0}}return y===r?Nn(we):xn(we),we}}function te(y,N,L){return Os(y,N,L,!0)}function _(y,N,L){return Os(y,N,L,!1)}var X=_,me=te;es.Fragment=r,es.jsx=X,es.jsxs=me}()),es}var xr;function si(){return xr||(xr=1,process.env.NODE_ENV==="production"?Ms.exports=ei():Ms.exports=ti()),Ms.exports}var s=si(),Lt={},Nr;function ni(){if(Nr)return Lt;Nr=1;var e=Xa;if(process.env.NODE_ENV==="production")Lt.createRoot=e.createRoot,Lt.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Lt.createRoot=function(n,r){t.usingClientEntryPoint=!0;try{return e.createRoot(n,r)}finally{t.usingClientEntryPoint=!1}},Lt.hydrateRoot=function(n,r,i){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(n,r,i)}finally{t.usingClientEntryPoint=!1}}}return Lt}var ri=ni();const ai=pr(ri),ts=e=>e.replace(/\-/g," ").replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase());//! moment.js
31
31
  //! version : 2.30.1
32
32
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
33
33
  //! license : MIT
34
34
  //! momentjs.com
35
- var jr;function R(){return jr.apply(null,arguments)}function ii(e){jr=e}function ze(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Tt(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function jn(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(ce(e,t))return!1;return!0}function Re(e){return e===void 0}function at(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function ss(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function vr(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function jt(e,t){for(var n in t)ce(t,n)&&(e[n]=t[n]);return ce(t,"toString")&&(e.toString=t.toString),ce(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Qe(e,t,n,r){return qr(e,t,n,r,!0).utc()}function li(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function X(e){return e._pf==null&&(e._pf=li()),e._pf}var vn;Array.prototype.some?vn=Array.prototype.some:vn=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function _n(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=X(e),n=vn.call(t.parsedDateParts,function(i){return i!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function As(e){var t=Qe(NaN);return e!=null?jt(X(t),e):X(t).userInvalidated=!0,t}var _r=R.momentProperties=[],bn=!1;function Sn(e,t){var n,r,i,a=_r.length;if(Re(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Re(t._i)||(e._i=t._i),Re(t._f)||(e._f=t._f),Re(t._l)||(e._l=t._l),Re(t._strict)||(e._strict=t._strict),Re(t._tzm)||(e._tzm=t._tzm),Re(t._isUTC)||(e._isUTC=t._isUTC),Re(t._offset)||(e._offset=t._offset),Re(t._pf)||(e._pf=X(t)),Re(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=_r[n],i=t[r],Re(i)||(e[r]=i);return e}function ns(e){Sn(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),bn===!1&&(bn=!0,R.updateOffset(this),bn=!1)}function Ge(e){return e instanceof ns||e!=null&&e._isAMomentObject!=null}function br(e){R.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Ue(e,t){var n=!0;return jt(function(){if(R.deprecationHandler!=null&&R.deprecationHandler(null,e),n){var r=[],i,a,h,f=arguments.length;for(a=0;a<f;a++){if(i="",typeof arguments[a]=="object"){i+=`
36
- [`+a+"] ";for(h in arguments[0])ce(arguments[0],h)&&(i+=h+": "+arguments[0][h]+", ");i=i.slice(0,-2)}else i=arguments[a];r.push(i)}br(e+`
35
+ var jr;function E(){return jr.apply(null,arguments)}function ii(e){jr=e}function Ge(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Tt(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function de(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function jn(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(de(e,t))return!1;return!0}function ke(e){return e===void 0}function lt(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function ss(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function vr(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function jt(e,t){for(var n in t)de(t,n)&&(e[n]=t[n]);return de(t,"toString")&&(e.toString=t.toString),de(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Ze(e,t,n,r){return qr(e,t,n,r,!0).utc()}function li(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function ee(e){return e._pf==null&&(e._pf=li()),e._pf}var vn;Array.prototype.some?vn=Array.prototype.some:vn=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function _n(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=ee(e),n=vn.call(t.parsedDateParts,function(i){return i!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function As(e){var t=Ze(NaN);return e!=null?jt(ee(t),e):ee(t).userInvalidated=!0,t}var _r=E.momentProperties=[],bn=!1;function Sn(e,t){var n,r,i,a=_r.length;if(ke(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),ke(t._i)||(e._i=t._i),ke(t._f)||(e._f=t._f),ke(t._l)||(e._l=t._l),ke(t._strict)||(e._strict=t._strict),ke(t._tzm)||(e._tzm=t._tzm),ke(t._isUTC)||(e._isUTC=t._isUTC),ke(t._offset)||(e._offset=t._offset),ke(t._pf)||(e._pf=ee(t)),ke(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=_r[n],i=t[r],ke(i)||(e[r]=i);return e}function ns(e){Sn(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),bn===!1&&(bn=!0,E.updateOffset(this),bn=!1)}function Ve(e){return e instanceof ns||e!=null&&e._isAMomentObject!=null}function br(e){E.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function He(e,t){var n=!0;return jt(function(){if(E.deprecationHandler!=null&&E.deprecationHandler(null,e),n){var r=[],i,a,h,f=arguments.length;for(a=0;a<f;a++){if(i="",typeof arguments[a]=="object"){i+=`
36
+ [`+a+"] ";for(h in arguments[0])de(arguments[0],h)&&(i+=h+": "+arguments[0][h]+", ");i=i.slice(0,-2)}else i=arguments[a];r.push(i)}br(e+`
37
37
  Arguments: `+Array.prototype.slice.call(r).join("")+`
38
- `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Sr={};function Tr(e,t){R.deprecationHandler!=null&&R.deprecationHandler(e,t),Sr[e]||(br(t),Sr[e]=!0)}R.suppressDeprecationWarnings=!1,R.deprecationHandler=null;function Ze(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function oi(e){var t,n;for(n in e)ce(e,n)&&(t=e[n],Ze(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Tn(e,t){var n=jt({},e),r;for(r in t)ce(t,r)&&(Tt(e[r])&&Tt(t[r])?(n[r]={},jt(n[r],e[r]),jt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)ce(e,r)&&!ce(t,r)&&Tt(e[r])&&(n[r]=jt({},n[r]));return n}function wn(e){e!=null&&this.set(e)}var In;Object.keys?In=Object.keys:In=function(e){var t,n=[];for(t in e)ce(e,t)&&n.push(t);return n};var ci={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function di(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Ze(r)?r.call(t,n):r}function Je(e,t,n){var r=""+Math.abs(e),i=t-r.length,a=e>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Cn=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Es=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,On={},Pt={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(Pt[e]=i),t&&(Pt[t[0]]=function(){return Je(i.apply(this,arguments),t[1],t[2])}),n&&(Pt[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function hi(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function ui(e){var t=e.match(Cn),n,r;for(n=0,r=t.length;n<r;n++)Pt[t[n]]?t[n]=Pt[t[n]]:t[n]=hi(t[n]);return function(i){var a="",h;for(h=0;h<r;h++)a+=Ze(t[h])?t[h].call(i,e):t[h];return a}}function Rs(e,t){return e.isValid()?(t=wr(t,e.localeData()),On[t]=On[t]||ui(t),On[t](e)):e.localeData().invalidDate()}function wr(e,t){var n=5;function r(i){return t.longDateFormat(i)||i}for(Es.lastIndex=0;n>=0&&Es.test(e);)e=e.replace(Es,r),Es.lastIndex=0,n-=1;return e}var mi={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function fi(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Cn).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var pi="Invalid date";function yi(){return this._invalidDate}var gi="%d",xi=/\d{1,2}/;function Ni(e){return this._ordinal.replace("%d",e)}var ji={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function vi(e,t,n,r){var i=this._relativeTime[n];return Ze(i)?i(e,t,n,r):i.replace(/%d/i,e)}function _i(e,t){var n=this._relativeTime[e>0?"future":"past"];return Ze(n)?n(t):n.replace(/%s/i,t)}var Ir={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function $e(e){return typeof e=="string"?Ir[e]||Ir[e.toLowerCase()]:void 0}function Mn(e){var t={},n,r;for(r in e)ce(e,r)&&(n=$e(r),n&&(t[n]=e[r]));return t}var bi={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Si(e){var t=[],n;for(n in e)ce(e,n)&&t.push({unit:n,priority:bi[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var Cr=/\d/,De=/\d\d/,Or=/\d{3}/,An=/\d{4}/,ks=/[+-]?\d{6}/,ye=/\d\d?/,Mr=/\d\d\d\d?/,Ar=/\d\d\d\d\d\d?/,Ls=/\d{1,3}/,En=/\d{1,4}/,Ps=/[+-]?\d{1,6}/,Ft=/\d+/,Fs=/[+-]?\d+/,Ti=/Z|[+-]\d\d:?\d\d/gi,Ds=/Z|[+-]\d\d(?::?\d\d)?/gi,wi=/[+-]?\d+(\.\d{1,3})?/,rs=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Dt=/^[1-9]\d?/,Rn=/^([1-9]\d|\d)/,Ys;Ys={};function Y(e,t,n){Ys[e]=Ze(t)?t:function(r,i){return r&&n?n:t}}function Ii(e,t){return ce(Ys,e)?Ys[e](t._strict,t._locale):new RegExp(Ci(e))}function Ci(e){return it(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,a){return n||r||i||a}))}function it(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function He(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function se(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=He(t)),n}var kn={};function fe(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),at(t)&&(r=function(a,h){h[t]=se(a)}),i=e.length,n=0;n<i;n++)kn[e[n]]=r}function as(e,t){fe(e,function(n,r,i,a){i._w=i._w||{},t(n,i._w,i,a)})}function Oi(e,t,n){t!=null&&ce(kn,e)&&kn[e](t,n._a,n,e)}function Us(e){return e%4===0&&e%100!==0||e%400===0}var Me=0,lt=1,Xe=2,Ie=3,Ve=4,ot=5,wt=6,Mi=7,Ai=8;H("Y",0,0,function(){var e=this.year();return e<=9999?Je(e,4):"+"+e}),H(0,["YY",2],0,function(){return this.year()%100}),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),Y("Y",Fs),Y("YY",ye,De),Y("YYYY",En,An),Y("YYYYY",Ps,ks),Y("YYYYYY",Ps,ks),fe(["YYYYY","YYYYYY"],Me),fe("YYYY",function(e,t){t[Me]=e.length===2?R.parseTwoDigitYear(e):se(e)}),fe("YY",function(e,t){t[Me]=R.parseTwoDigitYear(e)}),fe("Y",function(e,t){t[Me]=parseInt(e,10)});function is(e){return Us(e)?366:365}R.parseTwoDigitYear=function(e){return se(e)+(se(e)>68?1900:2e3)};var Er=Yt("FullYear",!0);function Ei(){return Us(this.year())}function Yt(e,t){return function(n){return n!=null?(Rr(this,e,n),R.updateOffset(this,t),this):ls(this,e)}}function ls(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Rr(e,t,n){var r,i,a,h,f;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,h=e.month(),f=e.date(),f=f===29&&h===1&&!Us(a)?28:f,i?r.setUTCFullYear(a,h,f):r.setFullYear(a,h,f)}}function Ri(e){return e=$e(e),Ze(this[e])?this[e]():this}function ki(e,t){if(typeof e=="object"){e=Mn(e);var n=Si(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=$e(e),Ze(this[e]))return this[e](t);return this}function Li(e,t){return(e%t+t)%t}var ve;Array.prototype.indexOf?ve=Array.prototype.indexOf:ve=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Ln(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Li(t,12);return e+=(t-n)/12,n===1?Us(e)?29:28:31-n%7%2}H("M",["MM",2],"Mo",function(){return this.month()+1}),H("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),H("MMMM",0,0,function(e){return this.localeData().months(this,e)}),Y("M",ye,Dt),Y("MM",ye,De),Y("MMM",function(e,t){return t.monthsShortRegex(e)}),Y("MMMM",function(e,t){return t.monthsRegex(e)}),fe(["M","MM"],function(e,t){t[lt]=se(e)-1}),fe(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i!=null?t[lt]=i:X(n).invalidMonth=e});var Pi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),kr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Lr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Fi=rs,Di=rs;function Yi(e,t){return e?ze(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Lr).test(t)?"format":"standalone"][e.month()]:ze(this._months)?this._months:this._months.standalone}function Ui(e,t){return e?ze(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Lr.test(t)?"format":"standalone"][e.month()]:ze(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function $i(e,t,n){var r,i,a,h=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=Qe([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?t==="MMM"?(i=ve.call(this._shortMonthsParse,h),i!==-1?i:null):(i=ve.call(this._longMonthsParse,h),i!==-1?i:null):t==="MMM"?(i=ve.call(this._shortMonthsParse,h),i!==-1?i:(i=ve.call(this._longMonthsParse,h),i!==-1?i:null)):(i=ve.call(this._longMonthsParse,h),i!==-1?i:(i=ve.call(this._shortMonthsParse,h),i!==-1?i:null))}function Hi(e,t,n){var r,i,a;if(this._monthsParseExact)return $i.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Qe([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function Pr(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=se(t);else if(t=e.localeData().monthsParse(t),!at(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,Ln(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Fr(e){return e!=null?(Pr(this,e),R.updateOffset(this,!0),this):ls(this,"Month")}function Bi(){return Ln(this.year(),this.month())}function Wi(e){return this._monthsParseExact?(ce(this,"_monthsRegex")||Dr.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(ce(this,"_monthsShortRegex")||(this._monthsShortRegex=Fi),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function zi(e){return this._monthsParseExact?(ce(this,"_monthsRegex")||Dr.call(this),e?this._monthsStrictRegex:this._monthsRegex):(ce(this,"_monthsRegex")||(this._monthsRegex=Di),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Dr(){function e(o,l){return l.length-o.length}var t=[],n=[],r=[],i,a,h,f;for(i=0;i<12;i++)a=Qe([2e3,i]),h=it(this.monthsShort(a,"")),f=it(this.months(a,"")),t.push(h),n.push(f),r.push(f),r.push(h);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Gi(e,t,n,r,i,a,h){var f;return e<100&&e>=0?(f=new Date(e+400,t,n,r,i,a,h),isFinite(f.getFullYear())&&f.setFullYear(e)):f=new Date(e,t,n,r,i,a,h),f}function os(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function $s(e,t,n){var r=7+t-n,i=(7+os(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Yr(e,t,n,r,i){var a=(7+n-r)%7,h=$s(e,r,i),f=1+7*(t-1)+a+h,o,l;return f<=0?(o=e-1,l=is(o)+f):f>is(e)?(o=e+1,l=f-is(e)):(o=e,l=f),{year:o,dayOfYear:l}}function cs(e,t,n){var r=$s(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,h;return i<1?(h=e.year()-1,a=i+ct(h,t,n)):i>ct(e.year(),t,n)?(a=i-ct(e.year(),t,n),h=e.year()+1):(h=e.year(),a=i),{week:a,year:h}}function ct(e,t,n){var r=$s(e,t,n),i=$s(e+1,t,n);return(is(e)-r+i)/7}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),Y("w",ye,Dt),Y("ww",ye,De),Y("W",ye,Dt),Y("WW",ye,De),as(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=se(e)});function Vi(e){return cs(e,this._week.dow,this._week.doy).week}var qi={dow:0,doy:6};function Ki(){return this._week.dow}function Qi(){return this._week.doy}function Zi(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Ji(e){var t=cs(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day"),H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),Y("d",ye),Y("e",ye),Y("E",ye),Y("dd",function(e,t){return t.weekdaysMinRegex(e)}),Y("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Y("dddd",function(e,t){return t.weekdaysRegex(e)}),as(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:X(n).invalidWeekday=e}),as(["d","e","E"],function(e,t,n,r){t[r]=se(e)});function Xi(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function el(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pn(e,t){return e.slice(t,7).concat(e.slice(0,t))}var tl="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ur="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sl="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),nl=rs,rl=rs,al=rs;function il(e,t){var n=ze(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Pn(n,this._week.dow):e?n[e.day()]:n}function ll(e){return e===!0?Pn(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ol(e){return e===!0?Pn(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function cl(e,t,n){var r,i,a,h=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=Qe([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(i=ve.call(this._weekdaysParse,h),i!==-1?i:null):t==="ddd"?(i=ve.call(this._shortWeekdaysParse,h),i!==-1?i:null):(i=ve.call(this._minWeekdaysParse,h),i!==-1?i:null):t==="dddd"?(i=ve.call(this._weekdaysParse,h),i!==-1||(i=ve.call(this._shortWeekdaysParse,h),i!==-1)?i:(i=ve.call(this._minWeekdaysParse,h),i!==-1?i:null)):t==="ddd"?(i=ve.call(this._shortWeekdaysParse,h),i!==-1||(i=ve.call(this._weekdaysParse,h),i!==-1)?i:(i=ve.call(this._minWeekdaysParse,h),i!==-1?i:null)):(i=ve.call(this._minWeekdaysParse,h),i!==-1||(i=ve.call(this._weekdaysParse,h),i!==-1)?i:(i=ve.call(this._shortWeekdaysParse,h),i!==-1?i:null))}function dl(e,t,n){var r,i,a;if(this._weekdaysParseExact)return cl.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Qe([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function hl(e){if(!this.isValid())return e!=null?this:NaN;var t=ls(this,"Day");return e!=null?(e=Xi(e,this.localeData()),this.add(e-t,"d")):t}function ul(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ml(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=el(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function fl(e){return this._weekdaysParseExact?(ce(this,"_weekdaysRegex")||Fn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ce(this,"_weekdaysRegex")||(this._weekdaysRegex=nl),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function pl(e){return this._weekdaysParseExact?(ce(this,"_weekdaysRegex")||Fn.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ce(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=rl),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function yl(e){return this._weekdaysParseExact?(ce(this,"_weekdaysRegex")||Fn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ce(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=al),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Fn(){function e(c,d){return d.length-c.length}var t=[],n=[],r=[],i=[],a,h,f,o,l;for(a=0;a<7;a++)h=Qe([2e3,1]).day(a),f=it(this.weekdaysMin(h,"")),o=it(this.weekdaysShort(h,"")),l=it(this.weekdays(h,"")),t.push(f),n.push(o),r.push(l),i.push(f),i.push(o),i.push(l);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Dn(){return this.hours()%12||12}function gl(){return this.hours()||24}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Dn),H("k",["kk",2],0,gl),H("hmm",0,0,function(){return""+Dn.apply(this)+Je(this.minutes(),2)}),H("hmmss",0,0,function(){return""+Dn.apply(this)+Je(this.minutes(),2)+Je(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+Je(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+Je(this.minutes(),2)+Je(this.seconds(),2)});function $r(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}$r("a",!0),$r("A",!1);function Hr(e,t){return t._meridiemParse}Y("a",Hr),Y("A",Hr),Y("H",ye,Rn),Y("h",ye,Dt),Y("k",ye,Dt),Y("HH",ye,De),Y("hh",ye,De),Y("kk",ye,De),Y("hmm",Mr),Y("hmmss",Ar),Y("Hmm",Mr),Y("Hmmss",Ar),fe(["H","HH"],Ie),fe(["k","kk"],function(e,t,n){var r=se(e);t[Ie]=r===24?0:r}),fe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),fe(["h","hh"],function(e,t,n){t[Ie]=se(e),X(n).bigHour=!0}),fe("hmm",function(e,t,n){var r=e.length-2;t[Ie]=se(e.substr(0,r)),t[Ve]=se(e.substr(r)),X(n).bigHour=!0}),fe("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Ie]=se(e.substr(0,r)),t[Ve]=se(e.substr(r,2)),t[ot]=se(e.substr(i)),X(n).bigHour=!0}),fe("Hmm",function(e,t,n){var r=e.length-2;t[Ie]=se(e.substr(0,r)),t[Ve]=se(e.substr(r))}),fe("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Ie]=se(e.substr(0,r)),t[Ve]=se(e.substr(r,2)),t[ot]=se(e.substr(i))});function xl(e){return(e+"").toLowerCase().charAt(0)==="p"}var Nl=/[ap]\.?m?\.?/i,jl=Yt("Hours",!0);function vl(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Br={calendar:ci,longDateFormat:mi,invalidDate:pi,ordinal:gi,dayOfMonthOrdinalParse:xi,relativeTime:ji,months:Pi,monthsShort:kr,week:qi,weekdays:tl,weekdaysMin:sl,weekdaysShort:Ur,meridiemParse:Nl},xe={},ds={},hs;function _l(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function Wr(e){return e&&e.toLowerCase().replace("_","-")}function bl(e){for(var t=0,n,r,i,a;t<e.length;){for(a=Wr(e[t]).split("-"),n=a.length,r=Wr(e[t+1]),r=r?r.split("-"):null;n>0;){if(i=Hs(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&_l(a,r)>=n-1)break;n--}t++}return hs}function Sl(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Hs(e){var t=null,n;if(xe[e]===void 0&&typeof module<"u"&&module&&module.exports&&Sl(e))try{t=hs._abbr,n=require,n("./locale/"+e),vt(t)}catch{xe[e]=null}return xe[e]}function vt(e,t){var n;return e&&(Re(t)?n=dt(e):n=Yn(e,t),n?hs=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),hs._abbr}function Yn(e,t){if(t!==null){var n,r=Br;if(t.abbr=e,xe[e]!=null)Tr("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=xe[e]._config;else if(t.parentLocale!=null)if(xe[t.parentLocale]!=null)r=xe[t.parentLocale]._config;else if(n=Hs(t.parentLocale),n!=null)r=n._config;else return ds[t.parentLocale]||(ds[t.parentLocale]=[]),ds[t.parentLocale].push({name:e,config:t}),null;return xe[e]=new wn(Tn(r,t)),ds[e]&&ds[e].forEach(function(i){Yn(i.name,i.config)}),vt(e),xe[e]}else return delete xe[e],null}function Tl(e,t){if(t!=null){var n,r,i=Br;xe[e]!=null&&xe[e].parentLocale!=null?xe[e].set(Tn(xe[e]._config,t)):(r=Hs(e),r!=null&&(i=r._config),t=Tn(i,t),r==null&&(t.abbr=e),n=new wn(t),n.parentLocale=xe[e],xe[e]=n),vt(e)}else xe[e]!=null&&(xe[e].parentLocale!=null?(xe[e]=xe[e].parentLocale,e===vt()&&vt(e)):xe[e]!=null&&delete xe[e]);return xe[e]}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return hs;if(!ze(e)){if(t=Hs(e),t)return t;e=[e]}return bl(e)}function wl(){return In(xe)}function Un(e){var t,n=e._a;return n&&X(e).overflow===-2&&(t=n[lt]<0||n[lt]>11?lt:n[Xe]<1||n[Xe]>Ln(n[Me],n[lt])?Xe:n[Ie]<0||n[Ie]>24||n[Ie]===24&&(n[Ve]!==0||n[ot]!==0||n[wt]!==0)?Ie:n[Ve]<0||n[Ve]>59?Ve:n[ot]<0||n[ot]>59?ot:n[wt]<0||n[wt]>999?wt:-1,X(e)._overflowDayOfYear&&(t<Me||t>Xe)&&(t=Xe),X(e)._overflowWeeks&&t===-1&&(t=Mi),X(e)._overflowWeekday&&t===-1&&(t=Ai),X(e).overflow=t),e}var Il=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cl=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ol=/Z|[+-]\d\d(?::?\d\d)?/,Bs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],$n=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ml=/^\/?Date\((-?\d+)/i,Al=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,El={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function zr(e){var t,n,r=e._i,i=Il.exec(r)||Cl.exec(r),a,h,f,o,l=Bs.length,c=$n.length;if(i){for(X(e).iso=!0,t=0,n=l;t<n;t++)if(Bs[t][1].exec(i[1])){h=Bs[t][0],a=Bs[t][2]!==!1;break}if(h==null){e._isValid=!1;return}if(i[3]){for(t=0,n=c;t<n;t++)if($n[t][1].exec(i[3])){f=(i[2]||" ")+$n[t][0];break}if(f==null){e._isValid=!1;return}}if(!a&&f!=null){e._isValid=!1;return}if(i[4])if(Ol.exec(i[4]))o="Z";else{e._isValid=!1;return}e._f=h+(f||"")+(o||""),Bn(e)}else e._isValid=!1}function Rl(e,t,n,r,i,a){var h=[kl(e),kr.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&h.push(parseInt(a,10)),h}function kl(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ll(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Pl(e,t,n){if(e){var r=Ur.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return X(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Fl(e,t,n){if(e)return El[e];if(t)return 0;var r=parseInt(n,10),i=r%100,a=(r-i)/100;return a*60+i}function Gr(e){var t=Al.exec(Ll(e._i)),n;if(t){if(n=Rl(t[4],t[3],t[2],t[5],t[6],t[7]),!Pl(t[1],n,e))return;e._a=n,e._tzm=Fl(t[8],t[9],t[10]),e._d=os.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),X(e).rfc2822=!0}else e._isValid=!1}function Dl(e){var t=Ml.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(zr(e),e._isValid===!1)delete e._isValid;else return;if(Gr(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:R.createFromInputFallback(e)}R.createFromInputFallback=Ue("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Ut(e,t,n){return e??t??n}function Yl(e){var t=new Date(R.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Hn(e){var t,n,r=[],i,a,h;if(!e._d){for(i=Yl(e),e._w&&e._a[Xe]==null&&e._a[lt]==null&&Ul(e),e._dayOfYear!=null&&(h=Ut(e._a[Me],i[Me]),(e._dayOfYear>is(h)||e._dayOfYear===0)&&(X(e)._overflowDayOfYear=!0),n=os(h,0,e._dayOfYear),e._a[lt]=n.getUTCMonth(),e._a[Xe]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Ie]===24&&e._a[Ve]===0&&e._a[ot]===0&&e._a[wt]===0&&(e._nextDay=!0,e._a[Ie]=0),e._d=(e._useUTC?os:Gi).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ie]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(X(e).weekdayMismatch=!0)}}function Ul(e){var t,n,r,i,a,h,f,o,l;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,h=4,n=Ut(t.GG,e._a[Me],cs(ge(),1,4).year),r=Ut(t.W,1),i=Ut(t.E,1),(i<1||i>7)&&(o=!0)):(a=e._locale._week.dow,h=e._locale._week.doy,l=cs(ge(),a,h),n=Ut(t.gg,e._a[Me],l.year),r=Ut(t.w,l.week),t.d!=null?(i=t.d,(i<0||i>6)&&(o=!0)):t.e!=null?(i=t.e+a,(t.e<0||t.e>6)&&(o=!0)):i=a),r<1||r>ct(n,a,h)?X(e)._overflowWeeks=!0:o!=null?X(e)._overflowWeekday=!0:(f=Yr(n,r,i,a,h),e._a[Me]=f.year,e._dayOfYear=f.dayOfYear)}R.ISO_8601=function(){},R.RFC_2822=function(){};function Bn(e){if(e._f===R.ISO_8601){zr(e);return}if(e._f===R.RFC_2822){Gr(e);return}e._a=[],X(e).empty=!0;var t=""+e._i,n,r,i,a,h,f=t.length,o=0,l,c;for(i=wr(e._f,e._locale).match(Cn)||[],c=i.length,n=0;n<c;n++)a=i[n],r=(t.match(Ii(a,e))||[])[0],r&&(h=t.substr(0,t.indexOf(r)),h.length>0&&X(e).unusedInput.push(h),t=t.slice(t.indexOf(r)+r.length),o+=r.length),Pt[a]?(r?X(e).empty=!1:X(e).unusedTokens.push(a),Oi(a,r,e)):e._strict&&!r&&X(e).unusedTokens.push(a);X(e).charsLeftOver=f-o,t.length>0&&X(e).unusedInput.push(t),e._a[Ie]<=12&&X(e).bigHour===!0&&e._a[Ie]>0&&(X(e).bigHour=void 0),X(e).parsedDateParts=e._a.slice(0),X(e).meridiem=e._meridiem,e._a[Ie]=$l(e._locale,e._a[Ie],e._meridiem),l=X(e).era,l!==null&&(e._a[Me]=e._locale.erasConvertYear(l,e._a[Me])),Hn(e),Un(e)}function $l(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Hl(e){var t,n,r,i,a,h,f=!1,o=e._f.length;if(o===0){X(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<o;i++)a=0,h=!1,t=Sn({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],Bn(t),_n(t)&&(h=!0),a+=X(t).charsLeftOver,a+=X(t).unusedTokens.length*10,X(t).score=a,f?a<r&&(r=a,n=t):(r==null||a<r||h)&&(r=a,n=t,h&&(f=!0));jt(e,n||t)}function Bl(e){if(!e._d){var t=Mn(e._i),n=t.day===void 0?t.date:t.day;e._a=vr([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),Hn(e)}}function Wl(e){var t=new ns(Un(Vr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Vr(e){var t=e._i,n=e._f;return e._locale=e._locale||dt(e._l),t===null||n===void 0&&t===""?As({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Ge(t)?new ns(Un(t)):(ss(t)?e._d=t:ze(n)?Hl(e):n?Bn(e):zl(e),_n(e)||(e._d=null),e))}function zl(e){var t=e._i;Re(t)?e._d=new Date(R.now()):ss(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Dl(e):ze(t)?(e._a=vr(t.slice(0),function(n){return parseInt(n,10)}),Hn(e)):Tt(t)?Bl(e):at(t)?e._d=new Date(t):R.createFromInputFallback(e)}function qr(e,t,n,r,i){var a={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Tt(e)&&jn(e)||ze(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=r,Wl(a)}function ge(e,t,n,r){return qr(e,t,n,r,!1)}var Gl=Ue("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ge.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:As()}),Vl=Ue("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ge.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:As()});function Kr(e,t){var n,r;if(t.length===1&&ze(t[0])&&(t=t[0]),!t.length)return ge();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function ql(){var e=[].slice.call(arguments,0);return Kr("isBefore",e)}function Kl(){var e=[].slice.call(arguments,0);return Kr("isAfter",e)}var Ql=function(){return Date.now?Date.now():+new Date},us=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Zl(e){var t,n=!1,r,i=us.length;for(t in e)if(ce(e,t)&&!(ve.call(us,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[us[r]]){if(n)return!1;parseFloat(e[us[r]])!==se(e[us[r]])&&(n=!0)}return!0}function Jl(){return this._isValid}function Xl(){return qe(NaN)}function Ws(e){var t=Mn(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,h=t.day||0,f=t.hour||0,o=t.minute||0,l=t.second||0,c=t.millisecond||0;this._isValid=Zl(t),this._milliseconds=+c+l*1e3+o*6e4+f*1e3*60*60,this._days=+h+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=dt(),this._bubble()}function zs(e){return e instanceof Ws}function Wn(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function eo(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,h;for(h=0;h<r;h++)se(e[h])!==se(t[h])&&a++;return a+i}function Qr(e,t){H(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Je(~~(n/60),2)+t+Je(~~n%60,2)})}Qr("Z",":"),Qr("ZZ",""),Y("Z",Ds),Y("ZZ",Ds),fe(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=zn(Ds,e)});var to=/([\+\-]|\d\d)/gi;function zn(e,t){var n=(t||"").match(e),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(to)||["-",0,0],a=+(i[1]*60)+se(i[2]),a===0?0:i[0]==="+"?a:-a)}function Gn(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(Ge(e)||ss(e)?e.valueOf():ge(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),R.updateOffset(n,!1),n):ge(e).local()}function Vn(e){return-Math.round(e._d.getTimezoneOffset())}R.updateOffset=function(){};function so(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=zn(Ds,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=Vn(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?ea(this,qe(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,R.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Vn(this)}function no(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function ro(e){return this.utcOffset(0,e)}function ao(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Vn(this),"m")),this}function io(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=zn(Ti,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function lo(e){return this.isValid()?(e=e?ge(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function oo(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function co(){if(!Re(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Sn(e,this),e=Vr(e),e._a?(t=e._isUTC?Qe(e._a):ge(e._a),this._isDSTShifted=this.isValid()&&eo(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ho(){return this.isValid()?!this._isUTC:!1}function uo(){return this.isValid()?this._isUTC:!1}function Zr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var mo=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,fo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function qe(e,t){var n=e,r=null,i,a,h;return zs(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:at(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=mo.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:se(r[Xe])*i,h:se(r[Ie])*i,m:se(r[Ve])*i,s:se(r[ot])*i,ms:se(Wn(r[wt]*1e3))*i}):(r=fo.exec(e))?(i=r[1]==="-"?-1:1,n={y:It(r[2],i),M:It(r[3],i),w:It(r[4],i),d:It(r[5],i),h:It(r[6],i),m:It(r[7],i),s:It(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(h=po(ge(n.from),ge(n.to)),n={},n.ms=h.milliseconds,n.M=h.months),a=new Ws(n),zs(e)&&ce(e,"_locale")&&(a._locale=e._locale),zs(e)&&ce(e,"_isValid")&&(a._isValid=e._isValid),a}qe.fn=Ws.prototype,qe.invalid=Xl;function It(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Jr(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function po(e,t){var n;return e.isValid()&&t.isValid()?(t=Gn(t,e),e.isBefore(t)?n=Jr(e,t):(n=Jr(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Xr(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(Tr(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=qe(n,r),ea(this,i,e),this}}function ea(e,t,n,r){var i=t._milliseconds,a=Wn(t._days),h=Wn(t._months);e.isValid()&&(r=r??!0,h&&Pr(e,ls(e,"Month")+h*n),a&&Rr(e,"Date",ls(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&R.updateOffset(e,a||h))}var yo=Xr(1,"add"),go=Xr(-1,"subtract");function ta(e){return typeof e=="string"||e instanceof String}function xo(e){return Ge(e)||ss(e)||ta(e)||at(e)||jo(e)||No(e)||e===null||e===void 0}function No(e){var t=Tt(e)&&!jn(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,h=r.length;for(i=0;i<h;i+=1)a=r[i],n=n||ce(e,a);return t&&n}function jo(e){var t=ze(e),n=!1;return t&&(n=e.filter(function(r){return!at(r)&&ta(e)}).length===0),t&&n}function vo(e){var t=Tt(e)&&!jn(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,a;for(i=0;i<r.length;i+=1)a=r[i],n=n||ce(e,a);return t&&n}function _o(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function bo(e,t){arguments.length===1&&(arguments[0]?xo(arguments[0])?(e=arguments[0],t=void 0):vo(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||ge(),r=Gn(n,this).startOf("day"),i=R.calendarFormat(this,r)||"sameElse",a=t&&(Ze(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,ge(n)))}function So(){return new ns(this)}function To(e,t){var n=Ge(e)?e:ge(e);return this.isValid()&&n.isValid()?(t=$e(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function wo(e,t){var n=Ge(e)?e:ge(e);return this.isValid()&&n.isValid()?(t=$e(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function Io(e,t,n,r){var i=Ge(e)?e:ge(e),a=Ge(t)?t:ge(t);return this.isValid()&&i.isValid()&&a.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function Co(e,t){var n=Ge(e)?e:ge(e),r;return this.isValid()&&n.isValid()?(t=$e(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Oo(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Mo(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ao(e,t,n){var r,i,a;if(!this.isValid())return NaN;if(r=Gn(e,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=$e(t),t){case"year":a=Gs(this,r)/12;break;case"month":a=Gs(this,r);break;case"quarter":a=Gs(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:He(a)}function Gs(e,t){if(e.date()<t.date())return-Gs(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),i,a;return t-r<0?(i=e.clone().add(n-1,"months"),a=(t-r)/(r-i)):(i=e.clone().add(n+1,"months"),a=(t-r)/(i-r)),-(n+a)||0}R.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",R.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Eo(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ro(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Rs(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ze(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Rs(n,"Z")):Rs(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ko(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+i+a)}function Lo(e){e||(e=this.isUtc()?R.defaultFormatUtc:R.defaultFormat);var t=Rs(this,e);return this.localeData().postformat(t)}function Po(e,t){return this.isValid()&&(Ge(e)&&e.isValid()||ge(e).isValid())?qe({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Fo(e){return this.from(ge(),e)}function Do(e,t){return this.isValid()&&(Ge(e)&&e.isValid()||ge(e).isValid())?qe({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Yo(e){return this.to(ge(),e)}function sa(e){var t;return e===void 0?this._locale._abbr:(t=dt(e),t!=null&&(this._locale=t),this)}var na=Ue("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function ra(){return this._locale}var Vs=1e3,$t=60*Vs,qs=60*$t,aa=(365*400+97)*24*qs;function Ht(e,t){return(e%t+t)%t}function ia(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-aa:new Date(e,t,n).valueOf()}function la(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-aa:Date.UTC(e,t,n)}function Uo(e){var t,n;if(e=$e(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?la:ia,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ht(t+(this._isUTC?0:this.utcOffset()*$t),qs);break;case"minute":t=this._d.valueOf(),t-=Ht(t,$t);break;case"second":t=this._d.valueOf(),t-=Ht(t,Vs);break}return this._d.setTime(t),R.updateOffset(this,!0),this}function $o(e){var t,n;if(e=$e(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?la:ia,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=qs-Ht(t+(this._isUTC?0:this.utcOffset()*$t),qs)-1;break;case"minute":t=this._d.valueOf(),t+=$t-Ht(t,$t)-1;break;case"second":t=this._d.valueOf(),t+=Vs-Ht(t,Vs)-1;break}return this._d.setTime(t),R.updateOffset(this,!0),this}function Ho(){return this._d.valueOf()-(this._offset||0)*6e4}function Bo(){return Math.floor(this.valueOf()/1e3)}function Wo(){return new Date(this.valueOf())}function zo(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Go(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Vo(){return this.isValid()?this.toISOString():null}function qo(){return _n(this)}function Ko(){return jt({},X(this))}function Qo(){return X(this).overflow}function Zo(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),Y("N",qn),Y("NN",qn),Y("NNN",qn),Y("NNNN",oc),Y("NNNNN",cc),fe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?X(n).era=i:X(n).invalidEra=e}),Y("y",Ft),Y("yy",Ft),Y("yyy",Ft),Y("yyyy",Ft),Y("yo",dc),fe(["y","yy","yyy","yyyy"],Me),fe(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Me]=n._locale.eraYearOrdinalParse(e,i):t[Me]=parseInt(e,10)});function Jo(e,t){var n,r,i,a=this._eras||dt("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":i=R(a[n].since).startOf("day"),a[n].since=i.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=R(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf();break}}return a}function Xo(e,t,n){var r,i,a=this.eras(),h,f,o;for(e=e.toUpperCase(),r=0,i=a.length;r<i;++r)if(h=a[r].name.toUpperCase(),f=a[r].abbr.toUpperCase(),o=a[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(f===e)return a[r];break;case"NNNN":if(h===e)return a[r];break;case"NNNNN":if(o===e)return a[r];break}else if([h,f,o].indexOf(e)>=0)return a[r]}function ec(e,t){var n=e.since<=e.until?1:-1;return t===void 0?R(e.since).year():R(e.since).year()+(t-e.offset)*n}function tc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function sc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function nc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function rc(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-R(i[e].since).year())*n+i[e].offset;return this.year()}function ac(e){return ce(this,"_erasNameRegex")||Kn.call(this),e?this._erasNameRegex:this._erasRegex}function ic(e){return ce(this,"_erasAbbrRegex")||Kn.call(this),e?this._erasAbbrRegex:this._erasRegex}function lc(e){return ce(this,"_erasNarrowRegex")||Kn.call(this),e?this._erasNarrowRegex:this._erasRegex}function qn(e,t){return t.erasAbbrRegex(e)}function oc(e,t){return t.erasNameRegex(e)}function cc(e,t){return t.erasNarrowRegex(e)}function dc(e,t){return t._eraYearOrdinalRegex||Ft}function Kn(){var e=[],t=[],n=[],r=[],i,a,h,f,o,l=this.eras();for(i=0,a=l.length;i<a;++i)h=it(l[i].name),f=it(l[i].abbr),o=it(l[i].narrow),t.push(h),e.push(f),n.push(o),r.push(h),r.push(f),r.push(o);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Ks(e,t){H(0,[e,e.length],0,t)}Ks("gggg","weekYear"),Ks("ggggg","weekYear"),Ks("GGGG","isoWeekYear"),Ks("GGGGG","isoWeekYear"),Y("G",Fs),Y("g",Fs),Y("GG",ye,De),Y("gg",ye,De),Y("GGGG",En,An),Y("gggg",En,An),Y("GGGGG",Ps,ks),Y("ggggg",Ps,ks),as(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=se(e)}),as(["gg","GG"],function(e,t,n,r){t[r]=R.parseTwoDigitYear(e)});function hc(e){return oa.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function uc(e){return oa.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function mc(){return ct(this.year(),1,4)}function fc(){return ct(this.isoWeekYear(),1,4)}function pc(){var e=this.localeData()._week;return ct(this.year(),e.dow,e.doy)}function yc(){var e=this.localeData()._week;return ct(this.weekYear(),e.dow,e.doy)}function oa(e,t,n,r,i){var a;return e==null?cs(this,r,i).year:(a=ct(e,r,i),t>a&&(t=a),gc.call(this,e,t,n,r,i))}function gc(e,t,n,r,i){var a=Yr(e,t,n,r,i),h=os(a.year,0,a.dayOfYear);return this.year(h.getUTCFullYear()),this.month(h.getUTCMonth()),this.date(h.getUTCDate()),this}H("Q",0,"Qo","quarter"),Y("Q",Cr),fe("Q",function(e,t){t[lt]=(se(e)-1)*3});function xc(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date"),Y("D",ye,Dt),Y("DD",ye,De),Y("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),fe(["D","DD"],Xe),fe("Do",function(e,t){t[Xe]=se(e.match(ye)[0])});var ca=Yt("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),Y("DDD",Ls),Y("DDDD",Or),fe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=se(e)});function Nc(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute"),Y("m",ye,Rn),Y("mm",ye,De),fe(["m","mm"],Ve);var jc=Yt("Minutes",!1);H("s",["ss",2],0,"second"),Y("s",ye,Rn),Y("ss",ye,De),fe(["s","ss"],ot);var vc=Yt("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return this.millisecond()*10}),H(0,["SSSSS",5],0,function(){return this.millisecond()*100}),H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Y("S",Ls,Cr),Y("SS",Ls,De),Y("SSS",Ls,Or);var _t,da;for(_t="SSSS";_t.length<=9;_t+="S")Y(_t,Ft);function _c(e,t){t[wt]=se(("0."+e)*1e3)}for(_t="S";_t.length<=9;_t+="S")fe(_t,_c);da=Yt("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");function bc(){return this._isUTC?"UTC":""}function Sc(){return this._isUTC?"Coordinated Universal Time":""}var E=ns.prototype;E.add=yo,E.calendar=bo,E.clone=So,E.diff=Ao,E.endOf=$o,E.format=Lo,E.from=Po,E.fromNow=Fo,E.to=Do,E.toNow=Yo,E.get=Ri,E.invalidAt=Qo,E.isAfter=To,E.isBefore=wo,E.isBetween=Io,E.isSame=Co,E.isSameOrAfter=Oo,E.isSameOrBefore=Mo,E.isValid=qo,E.lang=na,E.locale=sa,E.localeData=ra,E.max=Vl,E.min=Gl,E.parsingFlags=Ko,E.set=ki,E.startOf=Uo,E.subtract=go,E.toArray=zo,E.toObject=Go,E.toDate=Wo,E.toISOString=Ro,E.inspect=ko,typeof Symbol<"u"&&Symbol.for!=null&&(E[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),E.toJSON=Vo,E.toString=Eo,E.unix=Bo,E.valueOf=Ho,E.creationData=Zo,E.eraName=tc,E.eraNarrow=sc,E.eraAbbr=nc,E.eraYear=rc,E.year=Er,E.isLeapYear=Ei,E.weekYear=hc,E.isoWeekYear=uc,E.quarter=E.quarters=xc,E.month=Fr,E.daysInMonth=Bi,E.week=E.weeks=Zi,E.isoWeek=E.isoWeeks=Ji,E.weeksInYear=pc,E.weeksInWeekYear=yc,E.isoWeeksInYear=mc,E.isoWeeksInISOWeekYear=fc,E.date=ca,E.day=E.days=hl,E.weekday=ul,E.isoWeekday=ml,E.dayOfYear=Nc,E.hour=E.hours=jl,E.minute=E.minutes=jc,E.second=E.seconds=vc,E.millisecond=E.milliseconds=da,E.utcOffset=so,E.utc=ro,E.local=ao,E.parseZone=io,E.hasAlignedHourOffset=lo,E.isDST=oo,E.isLocal=ho,E.isUtcOffset=uo,E.isUtc=Zr,E.isUTC=Zr,E.zoneAbbr=bc,E.zoneName=Sc,E.dates=Ue("dates accessor is deprecated. Use date instead.",ca),E.months=Ue("months accessor is deprecated. Use month instead",Fr),E.years=Ue("years accessor is deprecated. Use year instead",Er),E.zone=Ue("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",no),E.isDSTShifted=Ue("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",co);function Tc(e){return ge(e*1e3)}function wc(){return ge.apply(null,arguments).parseZone()}function ha(e){return e}var de=wn.prototype;de.calendar=di,de.longDateFormat=fi,de.invalidDate=yi,de.ordinal=Ni,de.preparse=ha,de.postformat=ha,de.relativeTime=vi,de.pastFuture=_i,de.set=oi,de.eras=Jo,de.erasParse=Xo,de.erasConvertYear=ec,de.erasAbbrRegex=ic,de.erasNameRegex=ac,de.erasNarrowRegex=lc,de.months=Yi,de.monthsShort=Ui,de.monthsParse=Hi,de.monthsRegex=zi,de.monthsShortRegex=Wi,de.week=Vi,de.firstDayOfYear=Qi,de.firstDayOfWeek=Ki,de.weekdays=il,de.weekdaysMin=ol,de.weekdaysShort=ll,de.weekdaysParse=dl,de.weekdaysRegex=fl,de.weekdaysShortRegex=pl,de.weekdaysMinRegex=yl,de.isPM=xl,de.meridiem=vl;function Qs(e,t,n,r){var i=dt(),a=Qe().set(r,t);return i[n](a,e)}function ua(e,t,n){if(at(e)&&(t=e,e=void 0),e=e||"",t!=null)return Qs(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Qs(e,r,n,"month");return i}function Qn(e,t,n,r){typeof e=="boolean"?(at(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,at(t)&&(n=t,t=void 0),t=t||"");var i=dt(),a=e?i._week.dow:0,h,f=[];if(n!=null)return Qs(t,(n+a)%7,r,"day");for(h=0;h<7;h++)f[h]=Qs(t,(h+a)%7,r,"day");return f}function Ic(e,t){return ua(e,t,"months")}function Cc(e,t){return ua(e,t,"monthsShort")}function Oc(e,t,n){return Qn(e,t,n,"weekdays")}function Mc(e,t,n){return Qn(e,t,n,"weekdaysShort")}function Ac(e,t,n){return Qn(e,t,n,"weekdaysMin")}vt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=se(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),R.lang=Ue("moment.lang is deprecated. Use moment.locale instead.",vt),R.langData=Ue("moment.langData is deprecated. Use moment.localeData instead.",dt);var ht=Math.abs;function Ec(){var e=this._data;return this._milliseconds=ht(this._milliseconds),this._days=ht(this._days),this._months=ht(this._months),e.milliseconds=ht(e.milliseconds),e.seconds=ht(e.seconds),e.minutes=ht(e.minutes),e.hours=ht(e.hours),e.months=ht(e.months),e.years=ht(e.years),this}function ma(e,t,n,r){var i=qe(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Rc(e,t){return ma(this,e,t,1)}function kc(e,t){return ma(this,e,t,-1)}function fa(e){return e<0?Math.floor(e):Math.ceil(e)}function Lc(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,h,f,o;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=fa(Zn(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=He(e/1e3),r.seconds=i%60,a=He(i/60),r.minutes=a%60,h=He(a/60),r.hours=h%24,t+=He(h/24),o=He(pa(t)),n+=o,t-=fa(Zn(o)),f=He(n/12),n%=12,r.days=t,r.months=n,r.years=f,this}function pa(e){return e*4800/146097}function Zn(e){return e*146097/4800}function Pc(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=$e(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+pa(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Zn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function ut(e){return function(){return this.as(e)}}var ya=ut("ms"),Fc=ut("s"),Dc=ut("m"),Yc=ut("h"),Uc=ut("d"),$c=ut("w"),Hc=ut("M"),Bc=ut("Q"),Wc=ut("y"),zc=ya;function Gc(){return qe(this)}function Vc(e){return e=$e(e),this.isValid()?this[e+"s"]():NaN}function Ct(e){return function(){return this.isValid()?this._data[e]:NaN}}var qc=Ct("milliseconds"),Kc=Ct("seconds"),Qc=Ct("minutes"),Zc=Ct("hours"),Jc=Ct("days"),Xc=Ct("months"),ed=Ct("years");function td(){return He(this.days()/7)}var mt=Math.round,Bt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function sd(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function nd(e,t,n,r){var i=qe(e).abs(),a=mt(i.as("s")),h=mt(i.as("m")),f=mt(i.as("h")),o=mt(i.as("d")),l=mt(i.as("M")),c=mt(i.as("w")),d=mt(i.as("y")),m=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||h<=1&&["m"]||h<n.m&&["mm",h]||f<=1&&["h"]||f<n.h&&["hh",f]||o<=1&&["d"]||o<n.d&&["dd",o];return n.w!=null&&(m=m||c<=1&&["w"]||c<n.w&&["ww",c]),m=m||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d],m[2]=t,m[3]=+e>0,m[4]=r,sd.apply(null,m)}function rd(e){return e===void 0?mt:typeof e=="function"?(mt=e,!0):!1}function ad(e,t){return Bt[e]===void 0?!1:t===void 0?Bt[e]:(Bt[e]=t,e==="s"&&(Bt.ss=t-1),!0)}function id(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Bt,i,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Bt,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=nd(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var Jn=Math.abs;function Wt(e){return(e>0)-(e<0)||+e}function Zs(){if(!this.isValid())return this.localeData().invalidDate();var e=Jn(this._milliseconds)/1e3,t=Jn(this._days),n=Jn(this._months),r,i,a,h,f=this.asSeconds(),o,l,c,d;return f?(r=He(e/60),i=He(r/60),e%=60,r%=60,a=He(n/12),n%=12,h=e?e.toFixed(3).replace(/\.?0+$/,""):"",o=f<0?"-":"",l=Wt(this._months)!==Wt(f)?"-":"",c=Wt(this._days)!==Wt(f)?"-":"",d=Wt(this._milliseconds)!==Wt(f)?"-":"",o+"P"+(a?l+a+"Y":"")+(n?l+n+"M":"")+(t?c+t+"D":"")+(i||r||e?"T":"")+(i?d+i+"H":"")+(r?d+r+"M":"")+(e?d+h+"S":"")):"P0D"}var re=Ws.prototype;re.isValid=Jl,re.abs=Ec,re.add=Rc,re.subtract=kc,re.as=Pc,re.asMilliseconds=ya,re.asSeconds=Fc,re.asMinutes=Dc,re.asHours=Yc,re.asDays=Uc,re.asWeeks=$c,re.asMonths=Hc,re.asQuarters=Bc,re.asYears=Wc,re.valueOf=zc,re._bubble=Lc,re.clone=Gc,re.get=Vc,re.milliseconds=qc,re.seconds=Kc,re.minutes=Qc,re.hours=Zc,re.days=Jc,re.weeks=td,re.months=Xc,re.years=ed,re.humanize=id,re.toISOString=Zs,re.toString=Zs,re.toJSON=Zs,re.locale=sa,re.localeData=ra,re.toIsoString=Ue("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zs),re.lang=na,H("X",0,0,"unix"),H("x",0,0,"valueOf"),Y("x",Fs),Y("X",wi),fe("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),fe("x",function(e,t,n){n._d=new Date(se(e))});//! moment.js
39
- R.version="2.30.1",ii(ge),R.fn=E,R.min=ql,R.max=Kl,R.now=Ql,R.utc=Qe,R.unix=Tc,R.months=Ic,R.isDate=ss,R.locale=vt,R.invalid=As,R.duration=qe,R.isMoment=Ge,R.weekdays=Oc,R.parseZone=wc,R.localeData=dt,R.isDuration=zs,R.monthsShort=Cc,R.weekdaysMin=Ac,R.defineLocale=Yn,R.updateLocale=Tl,R.locales=wl,R.weekdaysShort=Mc,R.normalizeUnits=$e,R.relativeTimeRounding=rd,R.relativeTimeThreshold=ad,R.calendarFormat=_o,R.prototype=E,R.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const bt=(e,t,n)=>{let r;for(let i=0;i<(e==null?void 0:e.length);i++)if(r=e[i],r[n]==t)return r;return new Object},Ke=e=>{if(!e)return"";e=e.toLowerCase();let t=e.split(" ");for(let n=0;n<t.length;n++)t[n]=t[n].charAt(0).toUpperCase()+t[n].slice(1);return t.join(" ")},ms=(e,t)=>{let n,r=new Object;if(e&&e.length>0)for(let i=0;i<e.length;i++)n=e[i],r[n[t]]=n;return r},ld=e=>{let t,n=new Object;for(let r=0;r<e.length;r++)t=e[r],n[t]=t;return n},od=(e,t)=>(e.sort((n,r)=>r[t]-n[t]),e);var Js={exports:{}};/*! @preserve
38
+ `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Sr={};function Tr(e,t){E.deprecationHandler!=null&&E.deprecationHandler(e,t),Sr[e]||(br(t),Sr[e]=!0)}E.suppressDeprecationWarnings=!1,E.deprecationHandler=null;function Je(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function oi(e){var t,n;for(n in e)de(e,n)&&(t=e[n],Je(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Tn(e,t){var n=jt({},e),r;for(r in t)de(t,r)&&(Tt(e[r])&&Tt(t[r])?(n[r]={},jt(n[r],e[r]),jt(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)de(e,r)&&!de(t,r)&&Tt(e[r])&&(n[r]=jt({},n[r]));return n}function wn(e){e!=null&&this.set(e)}var In;Object.keys?In=Object.keys:In=function(e){var t,n=[];for(t in e)de(e,t)&&n.push(t);return n};var ci={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function di(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Je(r)?r.call(t,n):r}function Xe(e,t,n){var r=""+Math.abs(e),i=t-r.length,a=e>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Cn=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Es=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,On={},Pt={};function H(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(Pt[e]=i),t&&(Pt[t[0]]=function(){return Xe(i.apply(this,arguments),t[1],t[2])}),n&&(Pt[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function hi(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function ui(e){var t=e.match(Cn),n,r;for(n=0,r=t.length;n<r;n++)Pt[t[n]]?t[n]=Pt[t[n]]:t[n]=hi(t[n]);return function(i){var a="",h;for(h=0;h<r;h++)a+=Je(t[h])?t[h].call(i,e):t[h];return a}}function Rs(e,t){return e.isValid()?(t=wr(t,e.localeData()),On[t]=On[t]||ui(t),On[t](e)):e.localeData().invalidDate()}function wr(e,t){var n=5;function r(i){return t.longDateFormat(i)||i}for(Es.lastIndex=0;n>=0&&Es.test(e);)e=e.replace(Es,r),Es.lastIndex=0,n-=1;return e}var mi={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function fi(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Cn).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var pi="Invalid date";function yi(){return this._invalidDate}var gi="%d",xi=/\d{1,2}/;function Ni(e){return this._ordinal.replace("%d",e)}var ji={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function vi(e,t,n,r){var i=this._relativeTime[n];return Je(i)?i(e,t,n,r):i.replace(/%d/i,e)}function _i(e,t){var n=this._relativeTime[e>0?"future":"past"];return Je(n)?n(t):n.replace(/%s/i,t)}var Ir={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Be(e){return typeof e=="string"?Ir[e]||Ir[e.toLowerCase()]:void 0}function Mn(e){var t={},n,r;for(r in e)de(e,r)&&(n=Be(r),n&&(t[n]=e[r]));return t}var bi={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Si(e){var t=[],n;for(n in e)de(e,n)&&t.push({unit:n,priority:bi[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var Cr=/\d/,Ye=/\d\d/,Or=/\d{3}/,An=/\d{4}/,ks=/[+-]?\d{6}/,ge=/\d\d?/,Mr=/\d\d\d\d?/,Ar=/\d\d\d\d\d\d?/,Ls=/\d{1,3}/,En=/\d{1,4}/,Ps=/[+-]?\d{1,6}/,Ft=/\d+/,Fs=/[+-]?\d+/,Ti=/Z|[+-]\d\d:?\d\d/gi,Ds=/Z|[+-]\d\d(?::?\d\d)?/gi,wi=/[+-]?\d+(\.\d{1,3})?/,rs=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Dt=/^[1-9]\d?/,Rn=/^([1-9]\d|\d)/,Ys;Ys={};function D(e,t,n){Ys[e]=Je(t)?t:function(r,i){return r&&n?n:t}}function Ii(e,t){return de(Ys,e)?Ys[e](t._strict,t._locale):new RegExp(Ci(e))}function Ci(e){return ot(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,a){return n||r||i||a}))}function ot(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function We(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ne(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=We(t)),n}var kn={};function ye(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),lt(t)&&(r=function(a,h){h[t]=ne(a)}),i=e.length,n=0;n<i;n++)kn[e[n]]=r}function as(e,t){ye(e,function(n,r,i,a){i._w=i._w||{},t(n,i._w,i,a)})}function Oi(e,t,n){t!=null&&de(kn,e)&&kn[e](t,n._a,n,e)}function Us(e){return e%4===0&&e%100!==0||e%400===0}var Me=0,ct=1,et=2,Ie=3,qe=4,dt=5,wt=6,Mi=7,Ai=8;H("Y",0,0,function(){var e=this.year();return e<=9999?Xe(e,4):"+"+e}),H(0,["YY",2],0,function(){return this.year()%100}),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),D("Y",Fs),D("YY",ge,Ye),D("YYYY",En,An),D("YYYYY",Ps,ks),D("YYYYYY",Ps,ks),ye(["YYYYY","YYYYYY"],Me),ye("YYYY",function(e,t){t[Me]=e.length===2?E.parseTwoDigitYear(e):ne(e)}),ye("YY",function(e,t){t[Me]=E.parseTwoDigitYear(e)}),ye("Y",function(e,t){t[Me]=parseInt(e,10)});function is(e){return Us(e)?366:365}E.parseTwoDigitYear=function(e){return ne(e)+(ne(e)>68?1900:2e3)};var Er=Yt("FullYear",!0);function Ei(){return Us(this.year())}function Yt(e,t){return function(n){return n!=null?(Rr(this,e,n),E.updateOffset(this,t),this):ls(this,e)}}function ls(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Rr(e,t,n){var r,i,a,h,f;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,h=e.month(),f=e.date(),f=f===29&&h===1&&!Us(a)?28:f,i?r.setUTCFullYear(a,h,f):r.setFullYear(a,h,f)}}function Ri(e){return e=Be(e),Je(this[e])?this[e]():this}function ki(e,t){if(typeof e=="object"){e=Mn(e);var n=Si(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=Be(e),Je(this[e]))return this[e](t);return this}function Li(e,t){return(e%t+t)%t}var ve;Array.prototype.indexOf?ve=Array.prototype.indexOf:ve=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Ln(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Li(t,12);return e+=(t-n)/12,n===1?Us(e)?29:28:31-n%7%2}H("M",["MM",2],"Mo",function(){return this.month()+1}),H("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),H("MMMM",0,0,function(e){return this.localeData().months(this,e)}),D("M",ge,Dt),D("MM",ge,Ye),D("MMM",function(e,t){return t.monthsShortRegex(e)}),D("MMMM",function(e,t){return t.monthsRegex(e)}),ye(["M","MM"],function(e,t){t[ct]=ne(e)-1}),ye(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i!=null?t[ct]=i:ee(n).invalidMonth=e});var Pi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),kr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Lr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Fi=rs,Di=rs;function Yi(e,t){return e?Ge(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Lr).test(t)?"format":"standalone"][e.month()]:Ge(this._months)?this._months:this._months.standalone}function Ui(e,t){return e?Ge(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Lr.test(t)?"format":"standalone"][e.month()]:Ge(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function $i(e,t,n){var r,i,a,h=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=Ze([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?t==="MMM"?(i=ve.call(this._shortMonthsParse,h),i!==-1?i:null):(i=ve.call(this._longMonthsParse,h),i!==-1?i:null):t==="MMM"?(i=ve.call(this._shortMonthsParse,h),i!==-1?i:(i=ve.call(this._longMonthsParse,h),i!==-1?i:null)):(i=ve.call(this._longMonthsParse,h),i!==-1?i:(i=ve.call(this._shortMonthsParse,h),i!==-1?i:null))}function Hi(e,t,n){var r,i,a;if(this._monthsParseExact)return $i.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Ze([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function Pr(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=ne(t);else if(t=e.localeData().monthsParse(t),!lt(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,Ln(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Fr(e){return e!=null?(Pr(this,e),E.updateOffset(this,!0),this):ls(this,"Month")}function Bi(){return Ln(this.year(),this.month())}function Wi(e){return this._monthsParseExact?(de(this,"_monthsRegex")||Dr.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(de(this,"_monthsShortRegex")||(this._monthsShortRegex=Fi),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function zi(e){return this._monthsParseExact?(de(this,"_monthsRegex")||Dr.call(this),e?this._monthsStrictRegex:this._monthsRegex):(de(this,"_monthsRegex")||(this._monthsRegex=Di),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Dr(){function e(o,l){return l.length-o.length}var t=[],n=[],r=[],i,a,h,f;for(i=0;i<12;i++)a=Ze([2e3,i]),h=ot(this.monthsShort(a,"")),f=ot(this.months(a,"")),t.push(h),n.push(f),r.push(f),r.push(h);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Gi(e,t,n,r,i,a,h){var f;return e<100&&e>=0?(f=new Date(e+400,t,n,r,i,a,h),isFinite(f.getFullYear())&&f.setFullYear(e)):f=new Date(e,t,n,r,i,a,h),f}function os(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function $s(e,t,n){var r=7+t-n,i=(7+os(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Yr(e,t,n,r,i){var a=(7+n-r)%7,h=$s(e,r,i),f=1+7*(t-1)+a+h,o,l;return f<=0?(o=e-1,l=is(o)+f):f>is(e)?(o=e+1,l=f-is(e)):(o=e,l=f),{year:o,dayOfYear:l}}function cs(e,t,n){var r=$s(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,h;return i<1?(h=e.year()-1,a=i+ht(h,t,n)):i>ht(e.year(),t,n)?(a=i-ht(e.year(),t,n),h=e.year()+1):(h=e.year(),a=i),{week:a,year:h}}function ht(e,t,n){var r=$s(e,t,n),i=$s(e+1,t,n);return(is(e)-r+i)/7}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),D("w",ge,Dt),D("ww",ge,Ye),D("W",ge,Dt),D("WW",ge,Ye),as(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=ne(e)});function Vi(e){return cs(e,this._week.dow,this._week.doy).week}var qi={dow:0,doy:6};function Ki(){return this._week.dow}function Qi(){return this._week.doy}function Zi(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Ji(e){var t=cs(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}H("d",0,"do","day"),H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),D("d",ge),D("e",ge),D("E",ge),D("dd",function(e,t){return t.weekdaysMinRegex(e)}),D("ddd",function(e,t){return t.weekdaysShortRegex(e)}),D("dddd",function(e,t){return t.weekdaysRegex(e)}),as(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:ee(n).invalidWeekday=e}),as(["d","e","E"],function(e,t,n,r){t[r]=ne(e)});function Xi(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function el(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pn(e,t){return e.slice(t,7).concat(e.slice(0,t))}var tl="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ur="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sl="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),nl=rs,rl=rs,al=rs;function il(e,t){var n=Ge(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Pn(n,this._week.dow):e?n[e.day()]:n}function ll(e){return e===!0?Pn(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ol(e){return e===!0?Pn(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function cl(e,t,n){var r,i,a,h=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=Ze([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(i=ve.call(this._weekdaysParse,h),i!==-1?i:null):t==="ddd"?(i=ve.call(this._shortWeekdaysParse,h),i!==-1?i:null):(i=ve.call(this._minWeekdaysParse,h),i!==-1?i:null):t==="dddd"?(i=ve.call(this._weekdaysParse,h),i!==-1||(i=ve.call(this._shortWeekdaysParse,h),i!==-1)?i:(i=ve.call(this._minWeekdaysParse,h),i!==-1?i:null)):t==="ddd"?(i=ve.call(this._shortWeekdaysParse,h),i!==-1||(i=ve.call(this._weekdaysParse,h),i!==-1)?i:(i=ve.call(this._minWeekdaysParse,h),i!==-1?i:null)):(i=ve.call(this._minWeekdaysParse,h),i!==-1||(i=ve.call(this._weekdaysParse,h),i!==-1)?i:(i=ve.call(this._shortWeekdaysParse,h),i!==-1?i:null))}function dl(e,t,n){var r,i,a;if(this._weekdaysParseExact)return cl.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Ze([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function hl(e){if(!this.isValid())return e!=null?this:NaN;var t=ls(this,"Day");return e!=null?(e=Xi(e,this.localeData()),this.add(e-t,"d")):t}function ul(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ml(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=el(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function fl(e){return this._weekdaysParseExact?(de(this,"_weekdaysRegex")||Fn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(de(this,"_weekdaysRegex")||(this._weekdaysRegex=nl),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function pl(e){return this._weekdaysParseExact?(de(this,"_weekdaysRegex")||Fn.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(de(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=rl),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function yl(e){return this._weekdaysParseExact?(de(this,"_weekdaysRegex")||Fn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(de(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=al),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Fn(){function e(c,d){return d.length-c.length}var t=[],n=[],r=[],i=[],a,h,f,o,l;for(a=0;a<7;a++)h=Ze([2e3,1]).day(a),f=ot(this.weekdaysMin(h,"")),o=ot(this.weekdaysShort(h,"")),l=ot(this.weekdays(h,"")),t.push(f),n.push(o),r.push(l),i.push(f),i.push(o),i.push(l);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Dn(){return this.hours()%12||12}function gl(){return this.hours()||24}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Dn),H("k",["kk",2],0,gl),H("hmm",0,0,function(){return""+Dn.apply(this)+Xe(this.minutes(),2)}),H("hmmss",0,0,function(){return""+Dn.apply(this)+Xe(this.minutes(),2)+Xe(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+Xe(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+Xe(this.minutes(),2)+Xe(this.seconds(),2)});function $r(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}$r("a",!0),$r("A",!1);function Hr(e,t){return t._meridiemParse}D("a",Hr),D("A",Hr),D("H",ge,Rn),D("h",ge,Dt),D("k",ge,Dt),D("HH",ge,Ye),D("hh",ge,Ye),D("kk",ge,Ye),D("hmm",Mr),D("hmmss",Ar),D("Hmm",Mr),D("Hmmss",Ar),ye(["H","HH"],Ie),ye(["k","kk"],function(e,t,n){var r=ne(e);t[Ie]=r===24?0:r}),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[Ie]=ne(e),ee(n).bigHour=!0}),ye("hmm",function(e,t,n){var r=e.length-2;t[Ie]=ne(e.substr(0,r)),t[qe]=ne(e.substr(r)),ee(n).bigHour=!0}),ye("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Ie]=ne(e.substr(0,r)),t[qe]=ne(e.substr(r,2)),t[dt]=ne(e.substr(i)),ee(n).bigHour=!0}),ye("Hmm",function(e,t,n){var r=e.length-2;t[Ie]=ne(e.substr(0,r)),t[qe]=ne(e.substr(r))}),ye("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Ie]=ne(e.substr(0,r)),t[qe]=ne(e.substr(r,2)),t[dt]=ne(e.substr(i))});function xl(e){return(e+"").toLowerCase().charAt(0)==="p"}var Nl=/[ap]\.?m?\.?/i,jl=Yt("Hours",!0);function vl(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Br={calendar:ci,longDateFormat:mi,invalidDate:pi,ordinal:gi,dayOfMonthOrdinalParse:xi,relativeTime:ji,months:Pi,monthsShort:kr,week:qi,weekdays:tl,weekdaysMin:sl,weekdaysShort:Ur,meridiemParse:Nl},Ne={},ds={},hs;function _l(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function Wr(e){return e&&e.toLowerCase().replace("_","-")}function bl(e){for(var t=0,n,r,i,a;t<e.length;){for(a=Wr(e[t]).split("-"),n=a.length,r=Wr(e[t+1]),r=r?r.split("-"):null;n>0;){if(i=Hs(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&_l(a,r)>=n-1)break;n--}t++}return hs}function Sl(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Hs(e){var t=null,n;if(Ne[e]===void 0&&typeof module<"u"&&module&&module.exports&&Sl(e))try{t=hs._abbr,n=require,n("./locale/"+e),vt(t)}catch{Ne[e]=null}return Ne[e]}function vt(e,t){var n;return e&&(ke(t)?n=ut(e):n=Yn(e,t),n?hs=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),hs._abbr}function Yn(e,t){if(t!==null){var n,r=Br;if(t.abbr=e,Ne[e]!=null)Tr("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Ne[e]._config;else if(t.parentLocale!=null)if(Ne[t.parentLocale]!=null)r=Ne[t.parentLocale]._config;else if(n=Hs(t.parentLocale),n!=null)r=n._config;else return ds[t.parentLocale]||(ds[t.parentLocale]=[]),ds[t.parentLocale].push({name:e,config:t}),null;return Ne[e]=new wn(Tn(r,t)),ds[e]&&ds[e].forEach(function(i){Yn(i.name,i.config)}),vt(e),Ne[e]}else return delete Ne[e],null}function Tl(e,t){if(t!=null){var n,r,i=Br;Ne[e]!=null&&Ne[e].parentLocale!=null?Ne[e].set(Tn(Ne[e]._config,t)):(r=Hs(e),r!=null&&(i=r._config),t=Tn(i,t),r==null&&(t.abbr=e),n=new wn(t),n.parentLocale=Ne[e],Ne[e]=n),vt(e)}else Ne[e]!=null&&(Ne[e].parentLocale!=null?(Ne[e]=Ne[e].parentLocale,e===vt()&&vt(e)):Ne[e]!=null&&delete Ne[e]);return Ne[e]}function ut(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return hs;if(!Ge(e)){if(t=Hs(e),t)return t;e=[e]}return bl(e)}function wl(){return In(Ne)}function Un(e){var t,n=e._a;return n&&ee(e).overflow===-2&&(t=n[ct]<0||n[ct]>11?ct:n[et]<1||n[et]>Ln(n[Me],n[ct])?et:n[Ie]<0||n[Ie]>24||n[Ie]===24&&(n[qe]!==0||n[dt]!==0||n[wt]!==0)?Ie:n[qe]<0||n[qe]>59?qe:n[dt]<0||n[dt]>59?dt:n[wt]<0||n[wt]>999?wt:-1,ee(e)._overflowDayOfYear&&(t<Me||t>et)&&(t=et),ee(e)._overflowWeeks&&t===-1&&(t=Mi),ee(e)._overflowWeekday&&t===-1&&(t=Ai),ee(e).overflow=t),e}var Il=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cl=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ol=/Z|[+-]\d\d(?::?\d\d)?/,Bs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],$n=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ml=/^\/?Date\((-?\d+)/i,Al=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,El={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function zr(e){var t,n,r=e._i,i=Il.exec(r)||Cl.exec(r),a,h,f,o,l=Bs.length,c=$n.length;if(i){for(ee(e).iso=!0,t=0,n=l;t<n;t++)if(Bs[t][1].exec(i[1])){h=Bs[t][0],a=Bs[t][2]!==!1;break}if(h==null){e._isValid=!1;return}if(i[3]){for(t=0,n=c;t<n;t++)if($n[t][1].exec(i[3])){f=(i[2]||" ")+$n[t][0];break}if(f==null){e._isValid=!1;return}}if(!a&&f!=null){e._isValid=!1;return}if(i[4])if(Ol.exec(i[4]))o="Z";else{e._isValid=!1;return}e._f=h+(f||"")+(o||""),Bn(e)}else e._isValid=!1}function Rl(e,t,n,r,i,a){var h=[kl(e),kr.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&h.push(parseInt(a,10)),h}function kl(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ll(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Pl(e,t,n){if(e){var r=Ur.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return ee(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Fl(e,t,n){if(e)return El[e];if(t)return 0;var r=parseInt(n,10),i=r%100,a=(r-i)/100;return a*60+i}function Gr(e){var t=Al.exec(Ll(e._i)),n;if(t){if(n=Rl(t[4],t[3],t[2],t[5],t[6],t[7]),!Pl(t[1],n,e))return;e._a=n,e._tzm=Fl(t[8],t[9],t[10]),e._d=os.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),ee(e).rfc2822=!0}else e._isValid=!1}function Dl(e){var t=Ml.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(zr(e),e._isValid===!1)delete e._isValid;else return;if(Gr(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:E.createFromInputFallback(e)}E.createFromInputFallback=He("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Ut(e,t,n){return e??t??n}function Yl(e){var t=new Date(E.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Hn(e){var t,n,r=[],i,a,h;if(!e._d){for(i=Yl(e),e._w&&e._a[et]==null&&e._a[ct]==null&&Ul(e),e._dayOfYear!=null&&(h=Ut(e._a[Me],i[Me]),(e._dayOfYear>is(h)||e._dayOfYear===0)&&(ee(e)._overflowDayOfYear=!0),n=os(h,0,e._dayOfYear),e._a[ct]=n.getUTCMonth(),e._a[et]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Ie]===24&&e._a[qe]===0&&e._a[dt]===0&&e._a[wt]===0&&(e._nextDay=!0,e._a[Ie]=0),e._d=(e._useUTC?os:Gi).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ie]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(ee(e).weekdayMismatch=!0)}}function Ul(e){var t,n,r,i,a,h,f,o,l;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,h=4,n=Ut(t.GG,e._a[Me],cs(xe(),1,4).year),r=Ut(t.W,1),i=Ut(t.E,1),(i<1||i>7)&&(o=!0)):(a=e._locale._week.dow,h=e._locale._week.doy,l=cs(xe(),a,h),n=Ut(t.gg,e._a[Me],l.year),r=Ut(t.w,l.week),t.d!=null?(i=t.d,(i<0||i>6)&&(o=!0)):t.e!=null?(i=t.e+a,(t.e<0||t.e>6)&&(o=!0)):i=a),r<1||r>ht(n,a,h)?ee(e)._overflowWeeks=!0:o!=null?ee(e)._overflowWeekday=!0:(f=Yr(n,r,i,a,h),e._a[Me]=f.year,e._dayOfYear=f.dayOfYear)}E.ISO_8601=function(){},E.RFC_2822=function(){};function Bn(e){if(e._f===E.ISO_8601){zr(e);return}if(e._f===E.RFC_2822){Gr(e);return}e._a=[],ee(e).empty=!0;var t=""+e._i,n,r,i,a,h,f=t.length,o=0,l,c;for(i=wr(e._f,e._locale).match(Cn)||[],c=i.length,n=0;n<c;n++)a=i[n],r=(t.match(Ii(a,e))||[])[0],r&&(h=t.substr(0,t.indexOf(r)),h.length>0&&ee(e).unusedInput.push(h),t=t.slice(t.indexOf(r)+r.length),o+=r.length),Pt[a]?(r?ee(e).empty=!1:ee(e).unusedTokens.push(a),Oi(a,r,e)):e._strict&&!r&&ee(e).unusedTokens.push(a);ee(e).charsLeftOver=f-o,t.length>0&&ee(e).unusedInput.push(t),e._a[Ie]<=12&&ee(e).bigHour===!0&&e._a[Ie]>0&&(ee(e).bigHour=void 0),ee(e).parsedDateParts=e._a.slice(0),ee(e).meridiem=e._meridiem,e._a[Ie]=$l(e._locale,e._a[Ie],e._meridiem),l=ee(e).era,l!==null&&(e._a[Me]=e._locale.erasConvertYear(l,e._a[Me])),Hn(e),Un(e)}function $l(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Hl(e){var t,n,r,i,a,h,f=!1,o=e._f.length;if(o===0){ee(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<o;i++)a=0,h=!1,t=Sn({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],Bn(t),_n(t)&&(h=!0),a+=ee(t).charsLeftOver,a+=ee(t).unusedTokens.length*10,ee(t).score=a,f?a<r&&(r=a,n=t):(r==null||a<r||h)&&(r=a,n=t,h&&(f=!0));jt(e,n||t)}function Bl(e){if(!e._d){var t=Mn(e._i),n=t.day===void 0?t.date:t.day;e._a=vr([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),Hn(e)}}function Wl(e){var t=new ns(Un(Vr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Vr(e){var t=e._i,n=e._f;return e._locale=e._locale||ut(e._l),t===null||n===void 0&&t===""?As({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Ve(t)?new ns(Un(t)):(ss(t)?e._d=t:Ge(n)?Hl(e):n?Bn(e):zl(e),_n(e)||(e._d=null),e))}function zl(e){var t=e._i;ke(t)?e._d=new Date(E.now()):ss(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Dl(e):Ge(t)?(e._a=vr(t.slice(0),function(n){return parseInt(n,10)}),Hn(e)):Tt(t)?Bl(e):lt(t)?e._d=new Date(t):E.createFromInputFallback(e)}function qr(e,t,n,r,i){var a={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Tt(e)&&jn(e)||Ge(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=r,Wl(a)}function xe(e,t,n,r){return qr(e,t,n,r,!1)}var Gl=He("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=xe.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:As()}),Vl=He("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=xe.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:As()});function Kr(e,t){var n,r;if(t.length===1&&Ge(t[0])&&(t=t[0]),!t.length)return xe();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function ql(){var e=[].slice.call(arguments,0);return Kr("isBefore",e)}function Kl(){var e=[].slice.call(arguments,0);return Kr("isAfter",e)}var Ql=function(){return Date.now?Date.now():+new Date},us=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Zl(e){var t,n=!1,r,i=us.length;for(t in e)if(de(e,t)&&!(ve.call(us,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[us[r]]){if(n)return!1;parseFloat(e[us[r]])!==ne(e[us[r]])&&(n=!0)}return!0}function Jl(){return this._isValid}function Xl(){return Ke(NaN)}function Ws(e){var t=Mn(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,h=t.day||0,f=t.hour||0,o=t.minute||0,l=t.second||0,c=t.millisecond||0;this._isValid=Zl(t),this._milliseconds=+c+l*1e3+o*6e4+f*1e3*60*60,this._days=+h+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=ut(),this._bubble()}function zs(e){return e instanceof Ws}function Wn(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function eo(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,h;for(h=0;h<r;h++)ne(e[h])!==ne(t[h])&&a++;return a+i}function Qr(e,t){H(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Xe(~~(n/60),2)+t+Xe(~~n%60,2)})}Qr("Z",":"),Qr("ZZ",""),D("Z",Ds),D("ZZ",Ds),ye(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=zn(Ds,e)});var to=/([\+\-]|\d\d)/gi;function zn(e,t){var n=(t||"").match(e),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(to)||["-",0,0],a=+(i[1]*60)+ne(i[2]),a===0?0:i[0]==="+"?a:-a)}function Gn(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(Ve(e)||ss(e)?e.valueOf():xe(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),E.updateOffset(n,!1),n):xe(e).local()}function Vn(e){return-Math.round(e._d.getTimezoneOffset())}E.updateOffset=function(){};function so(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=zn(Ds,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=Vn(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?ea(this,Ke(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,E.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Vn(this)}function no(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function ro(e){return this.utcOffset(0,e)}function ao(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Vn(this),"m")),this}function io(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=zn(Ti,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function lo(e){return this.isValid()?(e=e?xe(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function oo(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function co(){if(!ke(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Sn(e,this),e=Vr(e),e._a?(t=e._isUTC?Ze(e._a):xe(e._a),this._isDSTShifted=this.isValid()&&eo(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ho(){return this.isValid()?!this._isUTC:!1}function uo(){return this.isValid()?this._isUTC:!1}function Zr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var mo=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,fo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ke(e,t){var n=e,r=null,i,a,h;return zs(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:lt(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=mo.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:ne(r[et])*i,h:ne(r[Ie])*i,m:ne(r[qe])*i,s:ne(r[dt])*i,ms:ne(Wn(r[wt]*1e3))*i}):(r=fo.exec(e))?(i=r[1]==="-"?-1:1,n={y:It(r[2],i),M:It(r[3],i),w:It(r[4],i),d:It(r[5],i),h:It(r[6],i),m:It(r[7],i),s:It(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(h=po(xe(n.from),xe(n.to)),n={},n.ms=h.milliseconds,n.M=h.months),a=new Ws(n),zs(e)&&de(e,"_locale")&&(a._locale=e._locale),zs(e)&&de(e,"_isValid")&&(a._isValid=e._isValid),a}Ke.fn=Ws.prototype,Ke.invalid=Xl;function It(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Jr(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function po(e,t){var n;return e.isValid()&&t.isValid()?(t=Gn(t,e),e.isBefore(t)?n=Jr(e,t):(n=Jr(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Xr(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(Tr(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=Ke(n,r),ea(this,i,e),this}}function ea(e,t,n,r){var i=t._milliseconds,a=Wn(t._days),h=Wn(t._months);e.isValid()&&(r=r??!0,h&&Pr(e,ls(e,"Month")+h*n),a&&Rr(e,"Date",ls(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&E.updateOffset(e,a||h))}var yo=Xr(1,"add"),go=Xr(-1,"subtract");function ta(e){return typeof e=="string"||e instanceof String}function xo(e){return Ve(e)||ss(e)||ta(e)||lt(e)||jo(e)||No(e)||e===null||e===void 0}function No(e){var t=Tt(e)&&!jn(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,h=r.length;for(i=0;i<h;i+=1)a=r[i],n=n||de(e,a);return t&&n}function jo(e){var t=Ge(e),n=!1;return t&&(n=e.filter(function(r){return!lt(r)&&ta(e)}).length===0),t&&n}function vo(e){var t=Tt(e)&&!jn(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,a;for(i=0;i<r.length;i+=1)a=r[i],n=n||de(e,a);return t&&n}function _o(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function bo(e,t){arguments.length===1&&(arguments[0]?xo(arguments[0])?(e=arguments[0],t=void 0):vo(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||xe(),r=Gn(n,this).startOf("day"),i=E.calendarFormat(this,r)||"sameElse",a=t&&(Je(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,xe(n)))}function So(){return new ns(this)}function To(e,t){var n=Ve(e)?e:xe(e);return this.isValid()&&n.isValid()?(t=Be(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function wo(e,t){var n=Ve(e)?e:xe(e);return this.isValid()&&n.isValid()?(t=Be(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function Io(e,t,n,r){var i=Ve(e)?e:xe(e),a=Ve(t)?t:xe(t);return this.isValid()&&i.isValid()&&a.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function Co(e,t){var n=Ve(e)?e:xe(e),r;return this.isValid()&&n.isValid()?(t=Be(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Oo(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Mo(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ao(e,t,n){var r,i,a;if(!this.isValid())return NaN;if(r=Gn(e,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=Be(t),t){case"year":a=Gs(this,r)/12;break;case"month":a=Gs(this,r);break;case"quarter":a=Gs(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:We(a)}function Gs(e,t){if(e.date()<t.date())return-Gs(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),i,a;return t-r<0?(i=e.clone().add(n-1,"months"),a=(t-r)/(r-i)):(i=e.clone().add(n+1,"months"),a=(t-r)/(i-r)),-(n+a)||0}E.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",E.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Eo(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ro(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Rs(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Je(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Rs(n,"Z")):Rs(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ko(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+r+i+a)}function Lo(e){e||(e=this.isUtc()?E.defaultFormatUtc:E.defaultFormat);var t=Rs(this,e);return this.localeData().postformat(t)}function Po(e,t){return this.isValid()&&(Ve(e)&&e.isValid()||xe(e).isValid())?Ke({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Fo(e){return this.from(xe(),e)}function Do(e,t){return this.isValid()&&(Ve(e)&&e.isValid()||xe(e).isValid())?Ke({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Yo(e){return this.to(xe(),e)}function sa(e){var t;return e===void 0?this._locale._abbr:(t=ut(e),t!=null&&(this._locale=t),this)}var na=He("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function ra(){return this._locale}var Vs=1e3,$t=60*Vs,qs=60*$t,aa=(365*400+97)*24*qs;function Ht(e,t){return(e%t+t)%t}function ia(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-aa:new Date(e,t,n).valueOf()}function la(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-aa:Date.UTC(e,t,n)}function Uo(e){var t,n;if(e=Be(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?la:ia,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ht(t+(this._isUTC?0:this.utcOffset()*$t),qs);break;case"minute":t=this._d.valueOf(),t-=Ht(t,$t);break;case"second":t=this._d.valueOf(),t-=Ht(t,Vs);break}return this._d.setTime(t),E.updateOffset(this,!0),this}function $o(e){var t,n;if(e=Be(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?la:ia,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=qs-Ht(t+(this._isUTC?0:this.utcOffset()*$t),qs)-1;break;case"minute":t=this._d.valueOf(),t+=$t-Ht(t,$t)-1;break;case"second":t=this._d.valueOf(),t+=Vs-Ht(t,Vs)-1;break}return this._d.setTime(t),E.updateOffset(this,!0),this}function Ho(){return this._d.valueOf()-(this._offset||0)*6e4}function Bo(){return Math.floor(this.valueOf()/1e3)}function Wo(){return new Date(this.valueOf())}function zo(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Go(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Vo(){return this.isValid()?this.toISOString():null}function qo(){return _n(this)}function Ko(){return jt({},ee(this))}function Qo(){return ee(this).overflow}function Zo(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),D("N",qn),D("NN",qn),D("NNN",qn),D("NNNN",oc),D("NNNNN",cc),ye(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?ee(n).era=i:ee(n).invalidEra=e}),D("y",Ft),D("yy",Ft),D("yyy",Ft),D("yyyy",Ft),D("yo",dc),ye(["y","yy","yyy","yyyy"],Me),ye(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Me]=n._locale.eraYearOrdinalParse(e,i):t[Me]=parseInt(e,10)});function Jo(e,t){var n,r,i,a=this._eras||ut("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":i=E(a[n].since).startOf("day"),a[n].since=i.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=E(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf();break}}return a}function Xo(e,t,n){var r,i,a=this.eras(),h,f,o;for(e=e.toUpperCase(),r=0,i=a.length;r<i;++r)if(h=a[r].name.toUpperCase(),f=a[r].abbr.toUpperCase(),o=a[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(f===e)return a[r];break;case"NNNN":if(h===e)return a[r];break;case"NNNNN":if(o===e)return a[r];break}else if([h,f,o].indexOf(e)>=0)return a[r]}function ec(e,t){var n=e.since<=e.until?1:-1;return t===void 0?E(e.since).year():E(e.since).year()+(t-e.offset)*n}function tc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function sc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function nc(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function rc(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-E(i[e].since).year())*n+i[e].offset;return this.year()}function ac(e){return de(this,"_erasNameRegex")||Kn.call(this),e?this._erasNameRegex:this._erasRegex}function ic(e){return de(this,"_erasAbbrRegex")||Kn.call(this),e?this._erasAbbrRegex:this._erasRegex}function lc(e){return de(this,"_erasNarrowRegex")||Kn.call(this),e?this._erasNarrowRegex:this._erasRegex}function qn(e,t){return t.erasAbbrRegex(e)}function oc(e,t){return t.erasNameRegex(e)}function cc(e,t){return t.erasNarrowRegex(e)}function dc(e,t){return t._eraYearOrdinalRegex||Ft}function Kn(){var e=[],t=[],n=[],r=[],i,a,h,f,o,l=this.eras();for(i=0,a=l.length;i<a;++i)h=ot(l[i].name),f=ot(l[i].abbr),o=ot(l[i].narrow),t.push(h),e.push(f),n.push(o),r.push(h),r.push(f),r.push(o);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Ks(e,t){H(0,[e,e.length],0,t)}Ks("gggg","weekYear"),Ks("ggggg","weekYear"),Ks("GGGG","isoWeekYear"),Ks("GGGGG","isoWeekYear"),D("G",Fs),D("g",Fs),D("GG",ge,Ye),D("gg",ge,Ye),D("GGGG",En,An),D("gggg",En,An),D("GGGGG",Ps,ks),D("ggggg",Ps,ks),as(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=ne(e)}),as(["gg","GG"],function(e,t,n,r){t[r]=E.parseTwoDigitYear(e)});function hc(e){return oa.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function uc(e){return oa.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function mc(){return ht(this.year(),1,4)}function fc(){return ht(this.isoWeekYear(),1,4)}function pc(){var e=this.localeData()._week;return ht(this.year(),e.dow,e.doy)}function yc(){var e=this.localeData()._week;return ht(this.weekYear(),e.dow,e.doy)}function oa(e,t,n,r,i){var a;return e==null?cs(this,r,i).year:(a=ht(e,r,i),t>a&&(t=a),gc.call(this,e,t,n,r,i))}function gc(e,t,n,r,i){var a=Yr(e,t,n,r,i),h=os(a.year,0,a.dayOfYear);return this.year(h.getUTCFullYear()),this.month(h.getUTCMonth()),this.date(h.getUTCDate()),this}H("Q",0,"Qo","quarter"),D("Q",Cr),ye("Q",function(e,t){t[ct]=(ne(e)-1)*3});function xc(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}H("D",["DD",2],"Do","date"),D("D",ge,Dt),D("DD",ge,Ye),D("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ye(["D","DD"],et),ye("Do",function(e,t){t[et]=ne(e.match(ge)[0])});var ca=Yt("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),D("DDD",Ls),D("DDDD",Or),ye(["DDD","DDDD"],function(e,t,n){n._dayOfYear=ne(e)});function Nc(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}H("m",["mm",2],0,"minute"),D("m",ge,Rn),D("mm",ge,Ye),ye(["m","mm"],qe);var jc=Yt("Minutes",!1);H("s",["ss",2],0,"second"),D("s",ge,Rn),D("ss",ge,Ye),ye(["s","ss"],dt);var vc=Yt("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return this.millisecond()*10}),H(0,["SSSSS",5],0,function(){return this.millisecond()*100}),H(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),H(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),H(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),H(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),D("S",Ls,Cr),D("SS",Ls,Ye),D("SSS",Ls,Or);var _t,da;for(_t="SSSS";_t.length<=9;_t+="S")D(_t,Ft);function _c(e,t){t[wt]=ne(("0."+e)*1e3)}for(_t="S";_t.length<=9;_t+="S")ye(_t,_c);da=Yt("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");function bc(){return this._isUTC?"UTC":""}function Sc(){return this._isUTC?"Coordinated Universal Time":""}var A=ns.prototype;A.add=yo,A.calendar=bo,A.clone=So,A.diff=Ao,A.endOf=$o,A.format=Lo,A.from=Po,A.fromNow=Fo,A.to=Do,A.toNow=Yo,A.get=Ri,A.invalidAt=Qo,A.isAfter=To,A.isBefore=wo,A.isBetween=Io,A.isSame=Co,A.isSameOrAfter=Oo,A.isSameOrBefore=Mo,A.isValid=qo,A.lang=na,A.locale=sa,A.localeData=ra,A.max=Vl,A.min=Gl,A.parsingFlags=Ko,A.set=ki,A.startOf=Uo,A.subtract=go,A.toArray=zo,A.toObject=Go,A.toDate=Wo,A.toISOString=Ro,A.inspect=ko,typeof Symbol<"u"&&Symbol.for!=null&&(A[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),A.toJSON=Vo,A.toString=Eo,A.unix=Bo,A.valueOf=Ho,A.creationData=Zo,A.eraName=tc,A.eraNarrow=sc,A.eraAbbr=nc,A.eraYear=rc,A.year=Er,A.isLeapYear=Ei,A.weekYear=hc,A.isoWeekYear=uc,A.quarter=A.quarters=xc,A.month=Fr,A.daysInMonth=Bi,A.week=A.weeks=Zi,A.isoWeek=A.isoWeeks=Ji,A.weeksInYear=pc,A.weeksInWeekYear=yc,A.isoWeeksInYear=mc,A.isoWeeksInISOWeekYear=fc,A.date=ca,A.day=A.days=hl,A.weekday=ul,A.isoWeekday=ml,A.dayOfYear=Nc,A.hour=A.hours=jl,A.minute=A.minutes=jc,A.second=A.seconds=vc,A.millisecond=A.milliseconds=da,A.utcOffset=so,A.utc=ro,A.local=ao,A.parseZone=io,A.hasAlignedHourOffset=lo,A.isDST=oo,A.isLocal=ho,A.isUtcOffset=uo,A.isUtc=Zr,A.isUTC=Zr,A.zoneAbbr=bc,A.zoneName=Sc,A.dates=He("dates accessor is deprecated. Use date instead.",ca),A.months=He("months accessor is deprecated. Use month instead",Fr),A.years=He("years accessor is deprecated. Use year instead",Er),A.zone=He("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",no),A.isDSTShifted=He("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",co);function Tc(e){return xe(e*1e3)}function wc(){return xe.apply(null,arguments).parseZone()}function ha(e){return e}var he=wn.prototype;he.calendar=di,he.longDateFormat=fi,he.invalidDate=yi,he.ordinal=Ni,he.preparse=ha,he.postformat=ha,he.relativeTime=vi,he.pastFuture=_i,he.set=oi,he.eras=Jo,he.erasParse=Xo,he.erasConvertYear=ec,he.erasAbbrRegex=ic,he.erasNameRegex=ac,he.erasNarrowRegex=lc,he.months=Yi,he.monthsShort=Ui,he.monthsParse=Hi,he.monthsRegex=zi,he.monthsShortRegex=Wi,he.week=Vi,he.firstDayOfYear=Qi,he.firstDayOfWeek=Ki,he.weekdays=il,he.weekdaysMin=ol,he.weekdaysShort=ll,he.weekdaysParse=dl,he.weekdaysRegex=fl,he.weekdaysShortRegex=pl,he.weekdaysMinRegex=yl,he.isPM=xl,he.meridiem=vl;function Qs(e,t,n,r){var i=ut(),a=Ze().set(r,t);return i[n](a,e)}function ua(e,t,n){if(lt(e)&&(t=e,e=void 0),e=e||"",t!=null)return Qs(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Qs(e,r,n,"month");return i}function Qn(e,t,n,r){typeof e=="boolean"?(lt(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,lt(t)&&(n=t,t=void 0),t=t||"");var i=ut(),a=e?i._week.dow:0,h,f=[];if(n!=null)return Qs(t,(n+a)%7,r,"day");for(h=0;h<7;h++)f[h]=Qs(t,(h+a)%7,r,"day");return f}function Ic(e,t){return ua(e,t,"months")}function Cc(e,t){return ua(e,t,"monthsShort")}function Oc(e,t,n){return Qn(e,t,n,"weekdays")}function Mc(e,t,n){return Qn(e,t,n,"weekdaysShort")}function Ac(e,t,n){return Qn(e,t,n,"weekdaysMin")}vt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=ne(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),E.lang=He("moment.lang is deprecated. Use moment.locale instead.",vt),E.langData=He("moment.langData is deprecated. Use moment.localeData instead.",ut);var mt=Math.abs;function Ec(){var e=this._data;return this._milliseconds=mt(this._milliseconds),this._days=mt(this._days),this._months=mt(this._months),e.milliseconds=mt(e.milliseconds),e.seconds=mt(e.seconds),e.minutes=mt(e.minutes),e.hours=mt(e.hours),e.months=mt(e.months),e.years=mt(e.years),this}function ma(e,t,n,r){var i=Ke(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Rc(e,t){return ma(this,e,t,1)}function kc(e,t){return ma(this,e,t,-1)}function fa(e){return e<0?Math.floor(e):Math.ceil(e)}function Lc(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,h,f,o;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=fa(Zn(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=We(e/1e3),r.seconds=i%60,a=We(i/60),r.minutes=a%60,h=We(a/60),r.hours=h%24,t+=We(h/24),o=We(pa(t)),n+=o,t-=fa(Zn(o)),f=We(n/12),n%=12,r.days=t,r.months=n,r.years=f,this}function pa(e){return e*4800/146097}function Zn(e){return e*146097/4800}function Pc(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Be(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+pa(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Zn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function ft(e){return function(){return this.as(e)}}var ya=ft("ms"),Fc=ft("s"),Dc=ft("m"),Yc=ft("h"),Uc=ft("d"),$c=ft("w"),Hc=ft("M"),Bc=ft("Q"),Wc=ft("y"),zc=ya;function Gc(){return Ke(this)}function Vc(e){return e=Be(e),this.isValid()?this[e+"s"]():NaN}function Ct(e){return function(){return this.isValid()?this._data[e]:NaN}}var qc=Ct("milliseconds"),Kc=Ct("seconds"),Qc=Ct("minutes"),Zc=Ct("hours"),Jc=Ct("days"),Xc=Ct("months"),ed=Ct("years");function td(){return We(this.days()/7)}var pt=Math.round,Bt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function sd(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function nd(e,t,n,r){var i=Ke(e).abs(),a=pt(i.as("s")),h=pt(i.as("m")),f=pt(i.as("h")),o=pt(i.as("d")),l=pt(i.as("M")),c=pt(i.as("w")),d=pt(i.as("y")),p=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||h<=1&&["m"]||h<n.m&&["mm",h]||f<=1&&["h"]||f<n.h&&["hh",f]||o<=1&&["d"]||o<n.d&&["dd",o];return n.w!=null&&(p=p||c<=1&&["w"]||c<n.w&&["ww",c]),p=p||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d],p[2]=t,p[3]=+e>0,p[4]=r,sd.apply(null,p)}function rd(e){return e===void 0?pt:typeof e=="function"?(pt=e,!0):!1}function ad(e,t){return Bt[e]===void 0?!1:t===void 0?Bt[e]:(Bt[e]=t,e==="s"&&(Bt.ss=t-1),!0)}function id(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Bt,i,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Bt,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=nd(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var Jn=Math.abs;function Wt(e){return(e>0)-(e<0)||+e}function Zs(){if(!this.isValid())return this.localeData().invalidDate();var e=Jn(this._milliseconds)/1e3,t=Jn(this._days),n=Jn(this._months),r,i,a,h,f=this.asSeconds(),o,l,c,d;return f?(r=We(e/60),i=We(r/60),e%=60,r%=60,a=We(n/12),n%=12,h=e?e.toFixed(3).replace(/\.?0+$/,""):"",o=f<0?"-":"",l=Wt(this._months)!==Wt(f)?"-":"",c=Wt(this._days)!==Wt(f)?"-":"",d=Wt(this._milliseconds)!==Wt(f)?"-":"",o+"P"+(a?l+a+"Y":"")+(n?l+n+"M":"")+(t?c+t+"D":"")+(i||r||e?"T":"")+(i?d+i+"H":"")+(r?d+r+"M":"")+(e?d+h+"S":"")):"P0D"}var ae=Ws.prototype;ae.isValid=Jl,ae.abs=Ec,ae.add=Rc,ae.subtract=kc,ae.as=Pc,ae.asMilliseconds=ya,ae.asSeconds=Fc,ae.asMinutes=Dc,ae.asHours=Yc,ae.asDays=Uc,ae.asWeeks=$c,ae.asMonths=Hc,ae.asQuarters=Bc,ae.asYears=Wc,ae.valueOf=zc,ae._bubble=Lc,ae.clone=Gc,ae.get=Vc,ae.milliseconds=qc,ae.seconds=Kc,ae.minutes=Qc,ae.hours=Zc,ae.days=Jc,ae.weeks=td,ae.months=Xc,ae.years=ed,ae.humanize=id,ae.toISOString=Zs,ae.toString=Zs,ae.toJSON=Zs,ae.locale=sa,ae.localeData=ra,ae.toIsoString=He("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zs),ae.lang=na,H("X",0,0,"unix"),H("x",0,0,"valueOf"),D("x",Fs),D("X",wi),ye("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),ye("x",function(e,t,n){n._d=new Date(ne(e))});//! moment.js
39
+ E.version="2.30.1",ii(xe),E.fn=A,E.min=ql,E.max=Kl,E.now=Ql,E.utc=Ze,E.unix=Tc,E.months=Ic,E.isDate=ss,E.locale=vt,E.invalid=As,E.duration=Ke,E.isMoment=Ve,E.weekdays=Oc,E.parseZone=wc,E.localeData=ut,E.isDuration=zs,E.monthsShort=Cc,E.weekdaysMin=Ac,E.defineLocale=Yn,E.updateLocale=Tl,E.locales=wl,E.weekdaysShort=Mc,E.normalizeUnits=Be,E.relativeTimeRounding=rd,E.relativeTimeThreshold=ad,E.calendarFormat=_o,E.prototype=A,E.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const bt=(e,t,n)=>{let r;for(let i=0;i<(e==null?void 0:e.length);i++)if(r=e[i],r[n]==t)return r;return new Object},Qe=e=>{if(!e)return"";e=e.toLowerCase();let t=e.split(" ");for(let n=0;n<t.length;n++)t[n]=t[n].charAt(0).toUpperCase()+t[n].slice(1);return t.join(" ")},ms=(e,t)=>{let n,r=new Object;if(e&&e.length>0)for(let i=0;i<e.length;i++)n=e[i],r[n[t]]=n;return r},ld=e=>{let t,n=new Object;for(let r=0;r<e.length;r++)t=e[r],n[t]=t;return n},od=(e,t)=>(e.sort((n,r)=>r[t]-n[t]),e);var Js={exports:{}};/*! @preserve
40
40
  * numeral.js
41
41
  * version : 2.0.6
42
42
  * author : Adam Draper
43
43
  * license : MIT
44
44
  * http://adamwdraper.github.com/Numeral-js/
45
- */var cd=Js.exports,ga;function dd(){return ga||(ga=1,function(e){(function(t,n){e.exports?e.exports=n():t.numeral=n()})(cd,function(){var t,n,r="2.0.6",i={},a={},h={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},f={currentLocale:h.currentLocale,zeroFormat:h.zeroFormat,nullFormat:h.nullFormat,defaultFormat:h.defaultFormat,scalePercentBy100:h.scalePercentBy100};function o(l,c){this._input=l,this._value=c}return t=function(l){var c,d,m,p;if(t.isNumeral(l))c=l.value();else if(l===0||typeof l>"u")c=0;else if(l===null||n.isNaN(l))c=null;else if(typeof l=="string")if(f.zeroFormat&&l===f.zeroFormat)c=0;else if(f.nullFormat&&l===f.nullFormat||!l.replace(/[^0-9]+/g,"").length)c=null;else{for(d in i)if(p=typeof i[d].regexps.unformat=="function"?i[d].regexps.unformat():i[d].regexps.unformat,p&&l.match(p)){m=i[d].unformat;break}m=m||t._.stringToNumber,c=m(l)}else c=Number(l)||null;return new o(l,c)},t.version=r,t.isNumeral=function(l){return l instanceof o},t._=n={numberToFormat:function(l,c,d){var m=a[t.options.currentLocale],p=!1,x=!1,v=0,_="",w=1e12,T=1e9,O=1e6,F=1e3,M="",z=!1,K,te,Q,ae,Ce,W,q;if(l=l||0,te=Math.abs(l),t._.includes(c,"(")?(p=!0,c=c.replace(/[\(|\)]/g,"")):(t._.includes(c,"+")||t._.includes(c,"-"))&&(Ce=t._.includes(c,"+")?c.indexOf("+"):l<0?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),t._.includes(c,"a")&&(K=c.match(/a(k|m|b|t)?/),K=K?K[1]:!1,t._.includes(c," a")&&(_=" "),c=c.replace(new RegExp(_+"a[kmbt]?"),""),te>=w&&!K||K==="t"?(_+=m.abbreviations.trillion,l=l/w):te<w&&te>=T&&!K||K==="b"?(_+=m.abbreviations.billion,l=l/T):te<T&&te>=O&&!K||K==="m"?(_+=m.abbreviations.million,l=l/O):(te<O&&te>=F&&!K||K==="k")&&(_+=m.abbreviations.thousand,l=l/F)),t._.includes(c,"[.]")&&(x=!0,c=c.replace("[.]",".")),Q=l.toString().split(".")[0],ae=c.split(".")[1],W=c.indexOf(","),v=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,ae?(t._.includes(ae,"[")?(ae=ae.replace("]",""),ae=ae.split("["),M=t._.toFixed(l,ae[0].length+ae[1].length,d,ae[1].length)):M=t._.toFixed(l,ae.length,d),Q=M.split(".")[0],t._.includes(M,".")?M=m.delimiters.decimal+M.split(".")[1]:M="",x&&Number(M.slice(1))===0&&(M="")):Q=t._.toFixed(l,0,d),_&&!K&&Number(Q)>=1e3&&_!==m.abbreviations.trillion)switch(Q=String(Number(Q)/1e3),_){case m.abbreviations.thousand:_=m.abbreviations.million;break;case m.abbreviations.million:_=m.abbreviations.billion;break;case m.abbreviations.billion:_=m.abbreviations.trillion;break}if(t._.includes(Q,"-")&&(Q=Q.slice(1),z=!0),Q.length<v)for(var B=v-Q.length;B>0;B--)Q="0"+Q;return W>-1&&(Q=Q.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+m.delimiters.thousands)),c.indexOf(".")===0&&(Q=""),q=Q+M+(_||""),p?q=(p&&z?"(":"")+q+(p&&z?")":""):Ce>=0?q=Ce===0?(z?"-":"+")+q:q+(z?"-":"+"):z&&(q="-"+q),q},stringToNumber:function(l){var c=a[f.currentLocale],d=l,m={thousand:3,million:6,billion:9,trillion:12},p,x,v;if(f.zeroFormat&&l===f.zeroFormat)x=0;else if(f.nullFormat&&l===f.nullFormat||!l.replace(/[^0-9]+/g,"").length)x=null;else{x=1,c.delimiters.decimal!=="."&&(l=l.replace(/\./g,"").replace(c.delimiters.decimal,"."));for(p in m)if(v=new RegExp("[^a-zA-Z]"+c.abbreviations[p]+"(?:\\)|(\\"+c.currency.symbol+")?(?:\\))?)?$"),d.match(v)){x*=Math.pow(10,m[p]);break}x*=(l.split("-").length+Math.min(l.split("(").length-1,l.split(")").length-1))%2?1:-1,l=l.replace(/[^0-9\.]+/g,""),x*=Number(l)}return x},isNaN:function(l){return typeof l=="number"&&isNaN(l)},includes:function(l,c){return l.indexOf(c)!==-1},insert:function(l,c,d){return l.slice(0,d)+c+l.slice(d)},reduce:function(l,c){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof c!="function")throw new TypeError(c+" is not a function");var d=Object(l),m=d.length>>>0,p=0,x;if(arguments.length===3)x=arguments[2];else{for(;p<m&&!(p in d);)p++;if(p>=m)throw new TypeError("Reduce of empty array with no initial value");x=d[p++]}for(;p<m;p++)p in d&&(x=c(x,d[p],p,d));return x},multiplier:function(l){var c=l.toString().split(".");return c.length<2?1:Math.pow(10,c[1].length)},correctionFactor:function(){var l=Array.prototype.slice.call(arguments);return l.reduce(function(c,d){var m=n.multiplier(d);return c>m?c:m},1)},toFixed:function(l,c,d,m){var p=l.toString().split("."),x=c-(m||0),v,_,w,T;return p.length===2?v=Math.min(Math.max(p[1].length,x),c):v=x,w=Math.pow(10,v),T=(d(l+"e+"+v)/w).toFixed(v),m>c-v&&(_=new RegExp("\\.?0{1,"+(m-(c-v))+"}$"),T=T.replace(_,"")),T}},t.options=f,t.formats=i,t.locales=a,t.locale=function(l){return l&&(f.currentLocale=l.toLowerCase()),f.currentLocale},t.localeData=function(l){if(!l)return a[f.currentLocale];if(l=l.toLowerCase(),!a[l])throw new Error("Unknown locale : "+l);return a[l]},t.reset=function(){for(var l in h)f[l]=h[l]},t.zeroFormat=function(l){f.zeroFormat=typeof l=="string"?l:null},t.nullFormat=function(l){f.nullFormat=typeof l=="string"?l:null},t.defaultFormat=function(l){f.defaultFormat=typeof l=="string"?l:"0.0"},t.register=function(l,c,d){if(c=c.toLowerCase(),this[l+"s"][c])throw new TypeError(c+" "+l+" already registered.");return this[l+"s"][c]=d,d},t.validate=function(l,c){var d,m,p,x,v,_,w,T;if(typeof l!="string"&&(l+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",l)),l=l.trim(),l.match(/^\d+$/))return!0;if(l==="")return!1;try{w=t.localeData(c)}catch{w=t.localeData(t.locale())}return p=w.currency.symbol,v=w.abbreviations,d=w.delimiters.decimal,w.delimiters.thousands==="."?m="\\.":m=w.delimiters.thousands,T=l.match(/^[^\d]+/),T!==null&&(l=l.substr(1),T[0]!==p)||(T=l.match(/[^\d]+$/),T!==null&&(l=l.slice(0,-1),T[0]!==v.thousand&&T[0]!==v.million&&T[0]!==v.billion&&T[0]!==v.trillion))?!1:(_=new RegExp(m+"{2}"),l.match(/[^\d.,]/g)?!1:(x=l.split(d),x.length>2?!1:x.length<2?!!x[0].match(/^\d+.*\d$/)&&!x[0].match(_):x[0].length===1?!!x[0].match(/^\d+$/)&&!x[0].match(_)&&!!x[1].match(/^\d+$/):!!x[0].match(/^\d+.*\d$/)&&!x[0].match(_)&&!!x[1].match(/^\d+$/)))},t.fn=o.prototype={clone:function(){return t(this)},format:function(l,c){var d=this._value,m=l||f.defaultFormat,p,x,v;if(c=c||Math.round,d===0&&f.zeroFormat!==null)x=f.zeroFormat;else if(d===null&&f.nullFormat!==null)x=f.nullFormat;else{for(p in i)if(m.match(i[p].regexps.format)){v=i[p].format;break}v=v||t._.numberToFormat,x=v(d,m,c)}return x},value:function(){return this._value},input:function(){return this._input},set:function(l){return this._value=Number(l),this},add:function(l){var c=n.correctionFactor.call(null,this._value,l);function d(m,p,x,v){return m+Math.round(c*p)}return this._value=n.reduce([this._value,l],d,0)/c,this},subtract:function(l){var c=n.correctionFactor.call(null,this._value,l);function d(m,p,x,v){return m-Math.round(c*p)}return this._value=n.reduce([l],d,Math.round(this._value*c))/c,this},multiply:function(l){function c(d,m,p,x){var v=n.correctionFactor(d,m);return Math.round(d*v)*Math.round(m*v)/Math.round(v*v)}return this._value=n.reduce([this._value,l],c,1),this},divide:function(l){function c(d,m,p,x){var v=n.correctionFactor(d,m);return Math.round(d*v)/Math.round(m*v)}return this._value=n.reduce([this._value,l],c),this},difference:function(l){return Math.abs(t(this._value).subtract(l).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(l){var c=l%10;return~~(l%100/10)===1?"th":c===1?"st":c===2?"nd":c===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(l,c,d){var m=t._.includes(c," BPS")?" ":"",p;return l=l*1e4,c=c.replace(/\s?BPS/,""),p=t._.numberToFormat(l,c,d),t._.includes(p,")")?(p=p.split(""),p.splice(-1,0,m+"BPS"),p=p.join("")):p=p+m+"BPS",p},unformat:function(l){return+(t._.stringToNumber(l)*1e-4).toFixed(15)}})}(),function(){var l={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},d=l.suffixes.concat(c.suffixes.filter(function(p){return l.suffixes.indexOf(p)<0})),m=d.join("|");m="("+m.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(m)},format:function(p,x,v){var _,w=t._.includes(x,"ib")?c:l,T=t._.includes(x," b")||t._.includes(x," ib")?" ":"",O,F,M;for(x=x.replace(/\s?i?b/,""),O=0;O<=w.suffixes.length;O++)if(F=Math.pow(w.base,O),M=Math.pow(w.base,O+1),p===null||p===0||p>=F&&p<M){T+=w.suffixes[O],F>0&&(p=p/F);break}return _=t._.numberToFormat(p,x,v),_+T},unformat:function(p){var x=t._.stringToNumber(p),v,_;if(x){for(v=l.suffixes.length-1;v>=0;v--){if(t._.includes(p,l.suffixes[v])){_=Math.pow(l.base,v);break}if(t._.includes(p,c.suffixes[v])){_=Math.pow(c.base,v);break}}x*=_||1}return x}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(l,c,d){var m=t.locales[t.options.currentLocale],p={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]},x,v,_;for(c=c.replace(/\s?\$\s?/,""),x=t._.numberToFormat(l,c,d),l>=0?(p.before=p.before.replace(/[\-\(]/,""),p.after=p.after.replace(/[\-\)]/,"")):l<0&&!t._.includes(p.before,"-")&&!t._.includes(p.before,"(")&&(p.before="-"+p.before),_=0;_<p.before.length;_++)switch(v=p.before[_],v){case"$":x=t._.insert(x,m.currency.symbol,_);break;case" ":x=t._.insert(x," ",_+m.currency.symbol.length-1);break}for(_=p.after.length-1;_>=0;_--)switch(v=p.after[_],v){case"$":x=_===p.after.length-1?x+m.currency.symbol:t._.insert(x,m.currency.symbol,-(p.after.length-(1+_)));break;case" ":x=_===p.after.length-1?x+" ":t._.insert(x," ",-(p.after.length-(1+_)+m.currency.symbol.length-1));break}return x}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(l,c,d){var m,p=typeof l=="number"&&!t._.isNaN(l)?l.toExponential():"0e+0",x=p.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),m=t._.numberToFormat(Number(x[0]),c,d),m+"e"+x[1]},unformat:function(l){var c=t._.includes(l,"e+")?l.split("e+"):l.split("e-"),d=Number(c[0]),m=Number(c[1]);m=t._.includes(l,"e-")?m*=-1:m;function p(x,v,_,w){var T=t._.correctionFactor(x,v),O=x*T*(v*T)/(T*T);return O}return t._.reduce([d,Math.pow(10,m)],p,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(l,c,d){var m=t.locales[t.options.currentLocale],p,x=t._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),x+=m.ordinal(l),p=t._.numberToFormat(l,c,d),p+x}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(l,c,d){var m=t._.includes(c," %")?" ":"",p;return t.options.scalePercentBy100&&(l=l*100),c=c.replace(/\s?\%/,""),p=t._.numberToFormat(l,c,d),t._.includes(p,")")?(p=p.split(""),p.splice(-1,0,m+"%"),p=p.join("")):p=p+m+"%",p},unformat:function(l){var c=t._.stringToNumber(l);return t.options.scalePercentBy100?c*.01:c}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(l,c,d){var m=Math.floor(l/60/60),p=Math.floor((l-m*60*60)/60),x=Math.round(l-m*60*60-p*60);return m+":"+(p<10?"0"+p:p)+":"+(x<10?"0"+x:x)},unformat:function(l){var c=l.split(":"),d=0;return c.length===3?(d=d+Number(c[0])*60*60,d=d+Number(c[1])*60,d=d+Number(c[2])):c.length===2&&(d=d+Number(c[0])*60,d=d+Number(c[1])),Number(d)}})}(),t})}(Js)),Js.exports}var hd=dd();const Xs=pr(hd),_e=e=>+(Math.round(parseFloat(e)+"e+3")+"e-3"),et=e=>+(Math.round(parseFloat(e)+"e+2")+"e-2"),ud={_2:{reg:/^\d+(\.\d{1,2})?$/,message:"Only Positive value upto 2 decimals is allowed",roundUpto:et},_3:{reg:/^\d+(\.\d{1,3})?$/,message:"Only Positive value upto 3 decimals is allowed",roundUpto:_e}},xa=(e,t)=>{const n=ud[`_${tn[t].minimumFractionDigits??2}`].roundUpto;return n(e)},en=e=>({INR:"Rs",USD:"USD",GBP:"GBP",AED:"AE",ZMW:"ZM",SAR:"SAR",QAR:"QAR",BHD:"BHD",NPR:"NPR",KWD:"KWD",OMR:"OMR",KES:"KES",SGD:"SGD",MVR:"MVR",IDR:"IDR",THB:"THB",MYR:"MYR",TZS:"TZS",BWP:"BWP"})[e]||"Rs",tn={USD:{symbol:"$"},EUR:{symbol:"€"},GBP:{symbol:"£"},AED:{symbol:"AE",contactValidation:8},JPY:{symbol:"¥"},AUD:{symbol:"A$"},CAD:{symbol:"CA$",contactValidation:7},INR:{symbol:"₹",round:Math.round},CNY:{symbol:"CN¥",contactValidation:8},BRL:{symbol:"R$",contactValidation:9},QAR:{symbol:"QAR",contactValidation:8},SAR:{symbol:"SAR",contactValidation:7},BHD:{symbol:"BHD",minimumFractionDigits:3,contactValidation:7},NPR:{symbol:"NPR",contactValidation:10},KWD:{symbol:"KWD",minimumFractionDigits:3,contactValidation:8},ZMW:{symbol:"ZK",contactValidation:9},OMR:{symbol:"OMR",minimumFractionDigits:3,contactValidation:8},KES:{symbol:"KSh",contactValidation:9},SGD:{symbol:"S$",contactValidation:9},MVR:{symbol:"MVR",contactValidation:7,displayType:"code"},IDR:{symbol:"Rp",contactValidation:13,displayType:"code",round:Math.round},THB:{symbol:"฿",contactValidation:8,displayType:"code"},MYR:{symbol:"RM",displayType:"code"},PKR:{symbol:"₨",round:Math.round},GHS:{symbol:"₵",contactValidation:9},LKR:{symbol:"₨",displayType:"code"},TZS:{symbol:"TZS",contactValidation:9},BWP:{symbol:"P",contactValidation:8,displayType:"code"}};function md(e,t){switch(t){case"BHD":case"KWD":case"OMR":return Xs(e).format("0,00.000");default:return Xs(e).format("0,00.00")}}function fd(e){const t=["","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"],n=["Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],r=["","Ten","Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety"];function i(m){if(m<10)return t[m];if(m<20)return n[m-11];{const p=m%10,x=Math.floor(m/10);return`${r[x]}${p?" "+t[p]:""}`}}function a(m){var p=m.toString(),x,v,_,w,T,O,F,M,z,K,te,Q,ae="and";if(p=p.replace(/[, ]/g,""),parseInt(p)===0)return"zero";for(x=["","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],v=["","","Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety"],_=["","Thousand","Million","Billion","Trillion","Quadrillion","Quintillion","Sextillion","Septillion","Octillion","Nonillion","Decillion","Undecillion","Duodecillion","Tredecillion","Quatttuor-Decillion","quindecillion","sexdecillion","septen-decillion","octodecillion","novemdecillion","vigintillion","centillion"],w=p.length,O=[];w>0;)T=w,O.push(p.slice(w=Math.max(0,w-3),T));if(F=O.length,F>_.length)return"";for(Q=[],K=0;K<F;K++)M=parseInt(O[K]),M&&(z=O[K].split("").reverse().map(parseFloat),z[1]===1&&(z[0]+=10),(te=_[K])&&Q.push(te),(te=x[z[0]])&&Q.push(te),(te=v[z[1]])&&Q.push(te),(z[0]||z[1])&&(z[2]||K+1>F)&&Q.push(ae),(te=x[z[2]])&&Q.push(te+" Hundred"));return Q.reverse().join(" ")}const[h,f]=e.toString().split("."),o=a(parseInt(h,10)),l=i(parseInt(f,10)),c=l?`${l} Paise`:"";return`${o} Rupees ${c&&"And "+c?c:""} Only`}const le=(e,t)=>`${tn[t].symbol} ${xa(e||0,t)}`,U=(e,t)=>`${tn[t].symbol} ${md(e||0,t)}`,Xn=()=>{var e="Unknown OS";return navigator.userAgent.indexOf("Win")!=-1&&(e="Windows OS"),navigator.userAgent.indexOf("Mac")!=-1&&(e="Macintosh"),navigator.userAgent.indexOf("Linux")!=-1&&(e="Linux OS"),navigator.userAgent.indexOf("Android")!=-1&&(e="Android OS"),navigator.userAgent.indexOf("like Mac")!=-1&&(e="iOS"),e},pd=e=>+(Math.round(parseFloat(e)*1e3)/1e3).toFixed(3),er=(e,t="type",n)=>{const r={},i=n==null?void 0:n.separateItemsDisc;return e.forEach(h=>{var f;(f=h.discounts)==null||f.forEach(o=>{if(o.type){let l=`${o[t]}`;o.type==="DISCOUNT_ITEMS"&&i&&(l=`${o[t]}::${o.discountType}::${o.discountValue}`),r[l]?r[l].discountAmt+=o.discountAmt:r[l]={type:o.type,discountType:o.discountType,discountValue:o.discountValue,discountAmt:pd(o.discountAmt),discountName:o.discountName}}})}),Object.values(r)},tr=(e,t="type")=>{const n={};return e.forEach(i=>{var a;(a=i.dish_charges)==null||a.forEach(h=>{const f=`${h[t]}`;n[f]?(n[f].amt+=h.amt,n[f].taxAmt+=h.taxAmt):n[f]={amt:h.amt,chargeType:h.chargeType?h.chargeType:h.type,defaultSelcted:h.defaultSelcted,rate:h.rate,tax:h.tax,taxAmt:h.taxAmt,name:h.name,type:h.type}})}),Object.values(n)},sr=e=>{const t=e==null?void 0:e.split("-");return(t==null?void 0:t.length)===3?`${t[2]}-${t[1]}-${t[0]}`:null};function fs(e,t){const n=Buffer.from([e],"utf8"),r=Buffer.from([t.length],"utf8"),i=Buffer.from(t,"utf8"),a=[n,r,i];return Buffer.concat(a)}function yd(e,t,n,r,i){const a=fs("1",e),h=fs("2",t),f=fs("3",n),o=fs("4",r),l=fs("5",i);var c=Buffer.concat([a,h,f,o,l]);return c.toString("base64")}const gd=e=>({Station:"Station",Chef:"Chef",Area:"Areas",Waiter:"Waiter",Captain:"Captain",Table:"Table",KOT:"KOT",Table_View:"Table View",Manage_Dine_In:"Manage Dine-In",Counter:"Counter"}),xd=e=>{let t;return e!=null&&e.length?t=JSON.parse(JSON.stringify(e)):t=[{internalName:"CASH",displayName:"Cash",paymentState:"PAID_OFFLINE"},{internalName:"CREDIT_CARD",displayName:"Credit Card",paymentState:"PAID_ONLINE"},{internalName:"DEBIT_CARD",displayName:"Debit Card",paymentState:"PAID_ONLINE"},{internalName:"UPI",displayName:"UPI",paymentState:"PAID_ONLINE"}],t},ps=Xn(),Nd=e=>{let t=e||0;var n=Math.floor(t/60),r=`${n} min`,i=parseInt(r);if(i>60){var a=Math.floor(t/3600),h=Math.floor(t%3600/60),f=`${a} hr ${h} min`;return f}else return r},jd=(e,t)=>{let n=new Array,r={WRITE_OFF:"WRITE_OFF",CASH_CARD:"CASH_CARD"};const i=[...t,{internalName:"swiggy",displayName:"Swiggy"},{internalName:"zomato",displayName:"Zomato"}],a=ms(i,"internalName");let h;for(let f in e.paymentModes)!r[f]&&e.paymentModes[f]&&(h=a[f],n.push({displayName:h?h.displayName:Ke(f.replace("_"," ")),value:et(e.paymentModes[f])}));return n},vd=(e,t)=>e>0&&t>0?e/t:0;function zt(e){return new Promise((t,n)=>{try{var r=new Image;r.src=e,r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{var i=document.createElement("canvas");i.width=r.width,i.height=r.height;var a=i.getContext("2d");a.drawImage(r,0,0);var h=i.toDataURL("image/png");t(h)},r.onerror=i=>{t(null)}}catch{t(null)}})}const sn=(e,t,n)=>{if(e&&e.length>0)if(t!=null&&t.name){let r=[];return e.map(i=>{i.serverName&&i.serverName.includes(t==null?void 0:t.name)&&r.push({...i,value:i[n]})}),r}else return e;else return!0},nr=e=>{let t={},n;for(let r=0;r<e.length;r++)switch(n=e[r],n.type){case"ORDER_DISCOUNT":t.ORDER_DISCOUNT=[n];break;case"DISCOUNT_ITEMS":t.DISCOUNT_ITEMS?t.DISCOUNT_ITEMS.push(n):t.DISCOUNT_ITEMS=[n];break;case"CATEGORY_DISCOUNT":t.CATEGORY_DISCOUNT?t.CATEGORY_DISCOUNT.push(n):t.CATEGORY_DISCOUNT=[n];break;case"ITEM_DISCOUNT":t.ITEM_DISCOUNT?t.ITEM_DISCOUNT.push(n):t.ITEM_DISCOUNT=[n];break;case"COUPON_DISCOUNT":t.COUPON_DISCOUNT=[n];break;case"SEGMENT_DISCOUNT":t.SEGMENT_DISCOUNT=[n];break}return t},rr=(e,t)=>{var c,d,m,p;let n,r,i,a,h;const f={},{itemInstructionOnBill:o,printZeroPriceAddons:l}=t;for(let x=0;x<e.length;x++)if(n=e[x],n.status!=="CANCELLED"){if((c=n.addons)!=null&&c.length&&!l)for(i=[],h=0;h<n.addons.length;h++)a=n.addons[h],a.serviceRate&&i.push(a);else i=n.addons;if(o?r=`${n.serviceId}::${n.serviceRate}::${n.instruction}::${n.taxType??"GST"}`:r=`${n.serviceId}::${n.serviceRate}::${n.taxType??"GST"}`,f[r]){if(f[r].qty+=n.qty,f[r].sub_total+=n.sub_total,(d=f[r].addons)!=null&&d.length&&((m=n.addons)!=null&&m.length)){const v=ms(n.addons,"serviceId"),_=[];let w;for(let T=0;T<f[r].addons.length;T++)a=f[r].addons[T],(p=v[a.serviceId])!=null&&p.serviceId&&(w=v[a.serviceId],a.sub_total+=w.sub_total??0),_.push(a);f[r].addons=_}}else f[r]=JSON.parse(JSON.stringify({...n,addons:i}))}return Object.values(f)},ar=e=>{var f;let t,n,r,i,a={},h=0;for(let o=0;o<e.length;o++)if(t=e[o],(f=t.taxation)!=null&&f.length)for(n=0;n<t.taxation.length;n++)r=t.taxation[n],i=`${r.tax}::${r.taxType??"GST"}`,a[i]?(a[i].taxableAmt=a[i].taxableAmt+(r.taxableAmt??0),a[i].taxAmt=a[i].taxAmt+(r.taxAmt??0),h+=r.taxAmt):(a[i]=JSON.parse(JSON.stringify(r)),h+=r.taxAmt);return{obj:Object.values(a),sum:h}},ir=(e,t,n)=>{var a,h,f,o;let r=n.occupiedServer,i;try{i=r?JSON.parse(r):void 0}catch(l){console.error("Failed to parse serverData:",l),i=void 0}if(t.type=="BILL"||t.type=="AGGREGATOR_BILL")return sn((a=t.siteSetting)==null?void 0:a.billPrinters,i,"label");if(t.type=="PACKAGING_SLIP"){let l=sn((h=t.siteSetting)==null?void 0:h.packagingSlipPrinters,i,"value");if(ps=="Android OS"){let c=l&&l.length>0?l.findIndex(d=>d.value==e.value):-1;return c!=-1?[l[c]]:null}else{let c=l&&l.length>0?l.findIndex(d=>d.value==e):-1;return c!=-1?[l[c]]:null}}else{if(t.type=="ITEMWISE_SALES_COUNTER"||t.type=="PRINT_DASHBOARD"||t.type=="COUNTER_OPERATION"||t.type=="CARD_RECHARGE_DETAILS"||t.type==="ORDER_AGGREGATED_PRINT")return sn((f=t.siteSetting)==null?void 0:f.billPrinters,i,"value");{let l=sn((o=t.siteSetting)==null?void 0:o.printers,i,"value");if(l===!0)return l;if(ps=="Android OS"){let c=l&&l.length>0?l.findIndex(d=>d.value==(e==null?void 0:e.value)):-1;return c!=-1?[l[c]]:null}else{let c=l&&l.length>0?l.findIndex(d=>d.value==e):-1;return c!=-1?[l[c]]:null}}}},_d=(e,t,n={})=>{var _;const{usersObj:r}=n;let i={},a,h;const{cancelledKOT:f,onlyCancelledItems:o,kotStatus:l="KOT_GENERATED"}=n,c=bt(e.orderTags,"EXPRESS","tag_type").content?"INSTANT - URGENT ORDER":null;if((_=e.customFeilds)!=null&&_.length){let w=bt(e.customFeilds,"INSTRUCTION","customType");w!=null&&w.customValue&&(h=[{customName:w.customName,customValue:w.customValue}])}e.orderList.filter(w=>{a=w.services.sort(T=>T.status==="CANCELLED"?-1:0),a.forEach((T,O)=>{var Ce,W,q;let F=T.station?T.station.split("::"):"",M=F&&F.length>1?F[1]:F[0],z=e.tableNo?e.tableNo.split("::"):null,K=z&&z.length>0?z[0]:e.orderFrom,te=e.tableName?e.tableName:e.tableNo?K:e.orderFrom,Q;(Ce=r==null?void 0:r[w.createdBy])!=null&&Ce.name&&(Q=r[w.createdBy].name);let ae=!1;(f||M&&T.status==l)&&(ae=!0),ae&&lr(M)&&(i[M]||(i[M]={},i[M].station=M,i[M].services=[],i[M].tableName=te,i[M].customerName=e.name==t.companyName?null:e.name,i[M].time=R().format("DD-MM-YYYY hh:mm a"),i[M].type=e.orderFrom,i[M].subOrderFrom=e.subOrderFrom,i[M].orderId=e.externalOrderId||e.offlineOrderId?e.orderId:w.subOrderId,i[M].orderId=new Set([i[M].orderId]),i[M].instruction=e.instruction,i[M].orderSource=e.orderSource,i[M].deliveryTimestamp=e.deliveryTimestamp?R.unix(e.deliveryTimestamp).format("DD-MM-YYYY hh:mm A"):null,i[M].aggregatorOrderId=e.externalOrderId,i[M].otp=e.otp,i[M].totalQty=0,i[M].tokenId=e.tokenId,i[M].kotId=T.kotId?new Set([T.kotId]):null,i[M].waiterName=e.waiterName,i[M].duplicate=f,i[M].createdBy=Q,i[M].zomatoInstant=c,h&&(i[M].customFields=h),o&&(i[M].onlyCancelledItems=o),e.preparationTime&&(i[M].prepareBy=R().add(e.preparationTime,"minutes").format("DD-MM-YYYY hh:mm A"))),i[M]?(i[M].services.push({serviceName:T.serviceName,qty:T.qty,instruction:T.isUrgent&&T.instruction?`(URGENT -${T.instruction})`:T.instruction?`(${T.instruction})`:T.isUrgent?"(URGENT)":"",subOrderId:w.subOrderId,isUrgent:T.isUrgent,index:O,status:T.status,addons:T.addons}),i[M].totalQty+=_e(T.qty),(W=i[M].kotId)==null||W.add(T.kotId),e.externalOrderId||e.offlineOrderId||(q=i[M].orderId)==null||q.add(w.subOrderId)):(i[M]=[],i[M].services.push({serviceName:T.serviceName,qty:T.qty,instruction:T.instruction?T.instruction:"",subOrderId:w.subOrderId,index:O,status:T.status}),i[M].totalQty+=_e(T.qty)))})});let d={},m="2INCH";Xn();let p,x=[],v={};for(const w in i)if(Object.hasOwnProperty.call(i,w)){const T=i[w];try{t.printers&&t.printers.map(O=>{O.label.toUpperCase()==T.station.toUpperCase()&&(p=ps=="Android OS"?O:O.value??void 0,m=O.paperSize?O.paperSize:t.printerSize,x.push({printer:p,paperSize:m}))}),x.length==0&&x.push({printer:p,paperSize:t.printerSize||m});for(let O=0;O<T.services.length;O++){let F=T.services[O],M=e.orderList.find(K=>K.subOrderId==F.subOrderId),z=d[F.subOrderId];M&&(z?z.services.push(M.services[F.index]):(d[F.subOrderId]={},d[F.subOrderId].subOrderId=M.subOrderId,d[F.subOrderId].services=[M.services[F.index]]))}}catch(O){console.log(O)}v[w]=x,x=[],p=null}for(const w in d)Object.hasOwnProperty.call(d,w)&&d[w];return{obj:i,paperSize:m,printer:p,printersMap:v}},bd=(e,t,n)=>{var i,a;const{kotStatus:r="KOT_GENERATED"}=n;try{let h="2INCH",f,o=[],l,c;const d=bt(e.orderTags,"EXPRESS","tag_type").content?"INSTANT - URGENT ORDER":null;if((i=e.customFeilds)!=null&&i.length){let m=bt(e.customFeilds,"INSTRUCTION","customType");m!=null&&m.customValue&&(c=[{customName:m.customName,customValue:m.customValue}])}for(let m=0;m<t.packagingSlipPrinters.length;m++)if(l=t.packagingSlipPrinters[m],l.label==e.subOrderFrom&&(f=ps=="Android OS"?l:l.value??void 0,h=l.paperSize?l.paperSize:h,l.paperSize)){let p,x,v,_,w,T={orderFrom:e.orderFrom,subOrderFrom:e.subOrderFrom,companyInfo:{companyName:t.companyName},tokenId:e.tokenId,orderId:e.orderId,customerInfo:{custName:e.name,custContact:e.mobile},paymentMethods:e.paymentMethods,newId:Math.random(),date:R().format("DD-MM-YYYY hh:mm a"),tableName:e.tableName,tableName:e.tableName,waiterName:e.waiterName,paymentStatus:e.paymentStatus??"UNPAID",aggregatorOrderId:e.externalOrderId,orderSource:e.orderSource,otp:e.otp,zomatoInstant:d},O={},F=!1,M,z=0;for(e.preparationTime&&(T.prepareBy=R().add(e.preparationTime,"minutes").format("DD-MM-YYYY hh:mm A")),c&&(T.customFields=c),v=0;v<e.orderList.length;v++)for(p=e.orderList[v],_=0;_<p.services.length;_++)x=p.services[_],x={...x,instruction:x.isUrgent&&x.instruction?`(URGENT -${x.instruction})`:x.instruction?`(${x.instruction})`:x.isUrgent?"(URGENT)":null},F=!1,x.status===r&&((a=l.stations)!=null&&a.length?(M=ld(l.stations),M[x.station]&&(F=!0)):F=!0),F&&x.kotId&&x.station&&(w=x.station.split("::")[1],z+=x.qty,O[`${w}/${x.kotId}`]?O[`${w}/${x.kotId}`].push(x):O[`${w}/${x.kotId}`]=[x]);Object.keys(O).length&&(T.services=O,T.totalQty=et(z),o.push({printer:f,paperSize:h,obj:T}))}return{printers:o}}catch(h){console.log(h)}},Sd=(e,t,n={})=>{let r={};if(n.action==="SWITCH_TABLE")e.orderList.forEach(o=>{o.services.forEach(l=>{var c;if((l.status==="KOT_GENERATED"||l.status==="IN_PROCESS")&&l.station){let d=(c=l.station.split("::"))==null?void 0:c[1];d&&lr(d)&&(r[d]?r[d].activeKots[l.kotId]=l.kotId:r[d]={from:[n.from],to:[n.to],station:d,activeKots:{[l.kotId]:l.kotId},type:"UPDATE_TABLE",action:"SWITCH_TABLE",orderId:l.id})}})});else{let o,l,c,d,m={},p=[];for(l=0;l<n.sources.length;l++)for(o=n.sources[l],p.push(o.tableNo),c=0;c<o.ids.length;c++)d=o.ids[c],m[d]=d;for(let x=0;x<n.orderData.length;x++)o=n.orderData[x],m[o.id]&&o.orderList.forEach(v=>{v.services.forEach(_=>{var w;if((_.status==="KOT_GENERATED"||_.status==="IN_PROCESS")&&_.station){let T=(w=_.station.split("::"))==null?void 0:w[1];T&&lr(T)&&(r[T]?r[T].activeKots[_.kotId]=_.kotId:r[T]={from:p,to:[n.to],station:T,activeKots:{[_.kotId]:_.kotId},type:"UPDATE_TABLE",action:"MERGE_TABLE",orderId:_.id})}})})}let i="2INCH",a,h=[],f={};for(const o in r)if(Object.hasOwnProperty.call(r,o)){const l=r[o];try{t.printers&&t.printers.map(c=>{c.label.toUpperCase()==l.station.toUpperCase()&&(a=c.value?ps=="Android OS"?c:c.value:void 0,i=c.paperSize?c.paperSize:t.printerSize,h.push({printer:a,paperSize:i}))}),h.length==0&&h.push({printer:a,paperSize:t.printerSize||i})}catch(c){console.log(c)}f[o]=h,h=[],a=null}return{obj:r,paperSize:i,printersMap:f}},Td=(e,t)=>{var O,F;let{serviceTypeConfig:n,salesCollection:r,todayCollection:i,dailyExpanse:a,collectionDate:h,rangeDate:f}=t,o={},l;const c=!!bt(n,"dine-in","slugName").slugName;if(i!=null&&i.AGGREGATOR_PAYMENT){const{AGGREGATOR_PAYMENT:M,...z}=i;i={...z,swiggy:r.swiggy_collection??0,zomato:r.zomato_collection??0}}let d=c&&(n==null?void 0:n.length)&&n.some(M=>M.slugName==="online-menu")&&e.isAggregatorEnabled==!0,m=d?r.aggregator_collection:void 0,p=d?r.zomato_collection:void 0,x=d?r.swiggy_collection:void 0,v=c?Nd(r.avgTableTime):void 0;l={};let _=0;if(r!=null&&r.menuWiseSales){const M=r.menuWiseSales;for(const z in M)z.endsWith("collection")?l[ts(z)]=et(M[z]):l[ts(z)]=M[z]}if(r.swiggy_aggregator&&(l.Swiggy=r.swiggy_aggregator,l.Swiggy_collection=r.swiggy_collection),r.zomato_aggregator&&(l.Zomato=r.zomato_aggregator,l.Zomato_collection=r.zomato_collection),r.itemTypeList&&((O=Object.keys(r.itemTypeList))!=null&&O.length))for(let M in r.itemTypeList)_+=r.itemTypeList[M];let w=h;return f.toDate!==f.fromDate&&(w=`${sr(f.fromDate)} - ${sr(f.toDate)}`),{salesCollection:c?{...r,totalCollection:et(r.totalCollection),totalOrders:r.totalOrders,online_aggregator:r.aggregator,zomato_aggregator:r.zomato_aggregator,swiggy_aggregator:r.swiggy_aggregator,online_aggregator_collection:m,zomato_aggregator_collection:p,swiggy_aggregator_collection:x,itemTypes:o}:void 0,todayCollection:jd(i,e.paymentModes),totalCollection:et(i.totalCollection),averageCollection:{avgTableTime:v,avgorderValue:vd(r.totalCollection,r.totalOrders).toFixed(2),todayExpense:a&&((F=a.DEBIT)!=null&&F.total)?et(a.DEBIT.total):0,totalDiscountAmt:r&&r.totalDiscountAmt?et(r.totalDiscountAmt):0,totalBalanceAmt:r&&r.totalBalanceAmt?et(r.totalBalanceAmt):0,dailyExpanse:a,noOfGuest:r.noOfGuest,avgPerCover:r.avgPerCover,refundAmt:i.refundAmt,writeOffAmt:i.writeOffAmt,rewardAmt:r.rewardAmt},menusCollection:{...l},selectedDate:w,id:Math.random(),otherFields:{salesCollection:i.salesCollection?et(i.salesCollection):0,outstandingAmt:i.outstandingAmt,totalDiscountAmt:r.totalDiscountAmt,discountList:r.discountList,totalOtherCharges:r.totalOtherCharges,otherChargesList:r.otherChargesList,totalTax:r.totalTax,taxList:r.taxList,totalItemType:_,itemTypeList:r.itemTypeList}}},wd=(e,t,n={})=>new Promise(async(r,i)=>{var d,m,p;const{invoiceFormat:a,userData:h}=n;let f,o,l=[],c;try{if((d=e.appliedDiscounts)!=null&&d.length){c=0;for(let q=0;q<e.appliedDiscounts.length;q++)f=e.appliedDiscounts[q],c+=f.discountAmt}const x=bt(e.orderTags,"EXPRESS","tag_type").content?"INSTANT - URGENT ORDER":null;if((m=e.customFeilds)!=null&&m.length){const q=bt(e.customFeilds,"INSTRUCTION","customType");q!=null&&q.customValue&&(l=[{customName:q.customName,customValue:q.customValue}])}f={};let v=(p=t==null?void 0:t.footerAddress)!=null&&p.addressLineOne?t==null?void 0:t.footerAddress.addressLineOne:"",_=t.footerAddress.addressLineTwo?t.footerAddress.addressLineTwo:"",w=t.footerAddress.city?t.footerAddress.city:"",T=t.footerAddress.zip?t.footerAddress.zip:"",O=(v!=""?v+",":"")+(_!=""?_+",":"")+(w!=""?w+",":"")+(T!=""?T+",":""),F=t.gstNo,M={companyName:t.companyName,companyAddress:O,companyContact:t.contactNumber,companyEmail:t.contactEmail},K={orderStatus:"COMPLETED",orderDate:e&&e.timestamp?R.unix(e.timestamp).format("DD-MM-YYYY hh:mm A"):null,orderNumber:e&&e.orderId?e.orderId:null,timestamp:e.timestamp},te={custName:e.name??null,custAddress:e.custAddress??null,custContact:e.mobile??null},Q=en(t.curr),ae={...e,companyInfo:M,orderInfo:K,customerInfo:te,gst:F,curr:Q},Ce=null,W=null;a.companyLogo&&(Ce=await zt(`https://${a.companyLogo.bucket}.s3.amazonaws.com/${a.companyLogo.key}`)),a.qrcode&&(W=await zt(`https://${a.qrcode.bucket}.s3.amazonaws.com/${a.qrcode.key}`)),e.orderList.filter(q=>{q.services.forEach(async(B,me)=>{var st,nt;let A="kitchen",Be=e.tableName?e.tableName:e.orderFrom;A&&(f[A]||(f[A]={},f[A].station=A,f[A].services=[],f[A].tableName=Be,f[A].customerName=e.name,f[A].time=R.unix(e.timestamp).format("DD-MM-YYYY hh:mm a"),f[A].type=e.orderFrom,f[A].orderId=e.orderId,f[A].instruction=e.instruction,f[A].totalQty=0,f[A].tokenId=e.tokenId,f[A].orderSource=e.orderSource,f[A].aggregatorOrderId=e.externalOrderId,f[A].otp=e.otp,f[A].paymentState=e.paymentState,f[A].discountAmt=c,f[A].otherCharges=e.otherCharges,f[A].taxAmt=e.taxAmt,f[A].customFeilds=l,f[A].curr=t.curr??"INR",f[A].zomatoInstant=x),f[A]?(o={serviceName:B.serviceName,qty:B.qty,instruction:B.isUrgent&&B.instruction?`(URGENT -${B.instruction})`:B.instruction?`(${B.instruction})`:B.isUrgent?"(URGENT)":"",subOrderId:q.subOrderId,isUrgent:B.isUrgent,index:me},(st=B.addons)!=null&&st.length&&(o.addons=B.addons),f[A].services.push(o),f[A].totalQty+=B.qty):(f[A]=[],f[A].services.push({serviceName:B.serviceName,qty:B.qty,instruction:B.instruction?B.instruction:"",subOrderId:q.subOrderId,index:me}),f[A].totalQty+=B.qty),f[A]={...f[A],companyInfo:M,orderInfo:K,customerInfo:te,gst:F,curr:Q},f[A].domain=a.siteURL,f[A].paymentMethods=a.paymentMode?ae.paymentMethods:null,f[A].companyInfo.companyName=a.companyName,f[A].companyInfo.companyEmail=a.email,f[A].companyInfo.companyAddress=a.address,f[A].companyInfo.companyContact=a.mobile,f[A].tokenId=a.token?ae.tokenId:null,a.isPayQR&&a.upiId&&a.upiId!==""&&(ae.upiId=a.upiId),f[A].gstNo=a.gst?ae.gst:null,f[A].footerMessage=a.footerMessage,f[A].orderFrom=(nt=e.subOrderFrom)==null?void 0:nt.toUpperCase(),f[A].fssai=t.fssai,f[A].vatNo=t.vatNo,f[A].printOperatorInfo=a.printOperatorInfo===null||a.printOperatorInfo===!0,f[A].disabledPoweredBy=t.disabledPoweredBy===!0,f[A].printTime=R().format("DD-MM-YYYY hh:mm A"),f[A].printedBy=h.userRole=="admin"?"Admin":h.name,e.deliveryTimestamp&&(f[A].deliveryTimestamp=R.unix(e.deliveryTimestamp).format("DD-MM-YYYY hh:mm A")),f[A].itemInstructionOnBill=a.itemInstructionOnBill,f[A]={...f[A],companyLogo:Ce,companyQrCode:W})})});for(const q in f)if(Object.hasOwnProperty.call(f,q)){const B=f[q];try{let me=t.printerSize??"2inch";r(new Object({obj:new Object({...B,paperSize:me}),orderList:e.orderList}));return}catch(me){console.log(me)}}}catch(x){console.log("err::",x)}}),Id=async e=>{let t=[];for(let d=0;d<e.length;d++)for(let m=0;m<e[d].orderList.length;m++)t.push(e[d].orderList[m]);let n=[];if(t.length>0)for(let d=0;d<t.length;d++)for(let m=0;m<t[d].services.length;m++)t[d].services[m].status!="CANCELLED"&&t[d].services[m].status!="RETURNED"&&t[d].services[m].status!="SHIFTED"&&n.push(t[d].services[m]);let r={},i=[];for(let d=0;d<n.length;d++)if(n[d].addons&&n[d].addons.length>0)for(let m=0;m<n[d].addons.length;m++){let p={...n[d].addons[m]};p.qty=n[d].qty,i.push(p)}n.forEach(d=>{let{attachedCat:m,serviceId:p}=d;r[m]||(r[m]=[]);let x=r[m].findIndex(v=>v.serviceId===p);x!==-1?r[m][x].qty=r[m][x].qty+d.qty:r[m].push({serviceName:d.serviceName,qty:d.qty,status:d.status,serviceId:d.serviceId,attachedCat:d.attachedCat,station:d.station})});const a=Object.keys(r).sort(),h={};a.forEach(d=>{h[d]=r[d]});for(let d in h)h[d].sort((m,p)=>m.serviceName.localeCompare(p.serviceName));let f={Category:h},o={};i.forEach(d=>{let{attachedAddonCat:m,serviceId:p}=d;o[m]||(o[m]=[]);let x=o[m].findIndex(v=>v.serviceId===p);x!==-1?o[m][x].qty=o[m][x].qty+d.qty:o[m].push({serviceName:d.serviceName,qty:d.qty,status:d.status,serviceId:d.serviceId,attachedCat:d.attachedAddonCat,station:d.station})});const l=Object.keys(o).sort(),c={};l.forEach(d=>{c[d]=o[d]});for(let d in c)c[d].sort((m,p)=>m.serviceName.localeCompare(p.serviceName));return f.Addon=c,f},Na={"Andaman and Nicobar Islands":"UTGST",Chandigarh:"UTGST","Dadra and Nagar Haveli and Daman and Diu":"UTGST","Jammu & Kashmir":"UTGST",Ladakh:"UTGST",Lakshadweep:"UTGST",Puducherry:"UTGST"},ja=e=>{let t=e&&e.footerAddress&&e.footerAddress.state&&e.footerAddress.state?e.footerAddress.state:null;return Na[t]?Na[t]:"SGST"},va=(e,t,n={})=>new Promise(async(r,i)=>{var h,f,o,l,c,d;try{const{invoiceFormat:m,custName:p,custMobile:x,custAddress:v,userData:_={}}=n,{itemList:w}=e;let T=_==null?void 0:_.userRole;if(_.userRole=="admin"?T="ADMIN":T=_==null?void 0:_.name,!(w!=null&&w.length))return;let O=t.printerSize,F=ir(null,{type:"BILL",siteSetting:t},{occupiedServer:n.occupiedServer});O=F?(h=F[0])!=null&&h.paperSize?(f=F[0])==null?void 0:f.paperSize:O||"2INCH":O;let M=t.footerAddress.addressLineOne?t.footerAddress.addressLineOne:"",z=t.footerAddress.addressLineTwo?t.footerAddress.addressLineTwo:"",K=t.footerAddress.city?t.footerAddress.city:"",te=t.footerAddress.zip?t.footerAddress.zip:"",Q=(M!=""?M+",":"")+(z!=""?z+",":"")+(K!=""?K+",":"")+(te!=""?te+",":""),ae=t.gstNo,Ce={companyName:t.companyName,companyAddress:Q,companyContact:t.contactNumber,companyEmail:t.contactEmail},q={orderStatus:"COMPLETED",orderDate:e&&e.timestamp?R.unix(e.timestamp).format("DD-MM-YYYY hh:mm A"):null,orderNumber:e&&e.orderId?e.orderId:null,timestamp:e.timestamp},B={custName:m&&m.custName?p==t.companyName?null:p:null,custAddress:m&&m.custAddress&&v||null,custContact:m&&m.custMobile?x:null,custEmail:"ajaybaglane7@gmail.com"},me=en(t.curr),A={...e,companyInfo:Ce,orderInfo:q,customerInfo:B,gst:ae,curr:me};if(m){if(A.domain=m.siteURL,A.paymentMethods=m.paymentMode?A.paymentMethods:null,A.companyInfo.companyName=m.companyName,A.companyInfo.companyEmail=m.email,A.companyInfo.companyAddress=m.address,A.companyInfo.companyContact=m.mobile,A.customerInfo.custName=m.custName?p:null,A.tokenId=m.token?A.tokenId:null,m.isPayQR&&m.upiId&&m.upiId!==""&&(A.upiId=m.upiId),A.gstNo=m.gst?A.gst:null,A.footerMessage=m.footerMessage,A.orderFrom=(o=e.subOrderFrom)==null?void 0:o.toUpperCase(),A.fssai=t.fssai,A.vatNo=t.vatNo,A.taxLabel=ja(t),A.printOperatorInfo=m.printOperatorInfo===null||m.printOperatorInfo===!0,A.disabledPoweredBy=t.disabledPoweredBy===!0,A.printTime=R().format("DD-MM-YYYY hh:mm A"),e.deliveryTimestamp&&(A.deliveryTimestamp=R.unix(e.deliveryTimestamp).format("DD-MM-YYYY hh:mm A")),A.itemInstructionOnBill=m.itemInstructionOnBill,A.noOfInvoice=m.noOfInvoice,A.printby=T,A.newFormat=!0,!m.itemInstructionOnBill&&A.itemList){let J;for(let je=0;je<A.itemList.length;je++)J=A.itemList[je],J.instruction&&delete J.instruction}t.enabledOutstandingOnPay&&((l=e.custoutStandingData)!=null&&l.balanceAmt)&&(A.custoutStandingData={balanceAmt:e.custoutStandingData.balanceAmt});let Be=[];if((c=e.customFeilds)!=null&&c.length){let J;for(let je=0;je<e.customFeilds.length;je++)J=e.customFeilds[je],J!=null&&J.customValue&&((d=J.availability)!=null&&d.includes("BILL"))&&Be.push({customName:J.customName,customValue:J.customValue});A.customFields=Be}let st=null,nt=null;m.companyLogo&&(st=await zt(`https://${m.companyLogo.bucket}.s3.amazonaws.com/${m.companyLogo.key}`)),m.qrcode&&(nt=await zt(`https://${m.qrcode.bucket}.s3.amazonaws.com/${m.qrcode.key}`));var a="Unknown OS";navigator.userAgent.indexOf("Win")!=-1&&(a="Windows OS"),navigator.userAgent.indexOf("Mac")!=-1&&(a="Macintosh"),navigator.userAgent.indexOf("Linux")!=-1&&(a="Linux OS"),navigator.userAgent.indexOf("Android")!=-1&&(a="Android OS"),navigator.userAgent.indexOf("like Mac")!=-1&&(a="iOS");let pt={};(function(){let J,je,yt=0,gt=0,g=0,u=0,C=0,j=0,I=0,D=0,S=[],k=[],$=0,pe;if(O==="A4"||O==="A5"){for(je=0;je<w.length;je++)J=w[je],gt+=J.sub_total,g+=J.afterdiscAmt,u+=J.afterdiscAmt+(J.total_charges??0),yt+=J.afterdiscAmt+(J.total_charges??0),$+=J.qty;let Te=er(w,"discountName",{separateItemsDisc:!0});const Le=nr(Te);let{obj:Pe,sum:Ae}=ar(w);pt={itemList:rr(w,{itemInstructionOnBill:m.itemInstructionOnBill,printZeroPriceAddons:m.printZeroPriceAddons}),discounts:Le,charges:tr(w,"name"),taxation:Pe,subTotal:_e(gt),afterDisc:_e(g),afterCharges:_e(u),total:_e(yt+Ae),qty:$}}else{for(je=0;je<w.length;je++)J=w[je],J.taxType==="VAT"?(k.push(J),D+=J.sub_total,j+=J.afterdiscAmt,C+=J.afterdiscAmt+(J.total_charges??0),I+=J.afterdiscAmt+(J.total_charges??0)):(S.push(J),gt+=J.sub_total,g+=J.afterdiscAmt,u+=J.afterdiscAmt+(J.total_charges??0),yt+=J.afterdiscAmt+(J.total_charges??0));if(S.length){let Te=er(S,"discountName",{separateItemsDisc:!0});const Le=nr(Te);let{obj:Pe,sum:Ae}=ar(S);pt.GST={itemList:rr(S,{itemInstructionOnBill:m.itemInstructionOnBill,printZeroPriceAddons:m.printZeroPriceAddons}),discounts:Le,charges:tr(S,"name"),taxation:Pe,subTotal:_e(gt),afterDisc:_e(g),afterCharges:_e(u),total:_e(yt+Ae)}}if(k.length){let Te=er(k,"discountName",{separateItemsDisc:!0});const Le=nr(Te);let{obj:Pe,sum:Ae}=ar(k);pt.VAT={itemList:rr(k,{itemInstructionOnBill:m.itemInstructionOnBill,printZeroPriceAddons:m.printZeroPriceAddons}),discounts:Le,charges:tr(k,"name"),taxation:Pe,subTotal:_e(D),afterDisc:_e(j),afterCharges:_e(C),total:_e(I+Ae)}}}})(),A.distributedData=pt;let Mt={obj:A,companyLogo:st,companyQrCode:nt,paperSize:t.printerSize,Name:a};r(Mt)}}catch(m){console.log("err",m),i(m)}}),Cd=(e,t,n={})=>(console.log("orderObj :::",e,t,n),new Promise(async(r,i)=>{var h,f,o,l,c;try{const{invoiceFormat:d,custName:m,custMobile:p,custAddress:x,orderData:v}=n;let _=t.footerAddress.addressLineOne?t.footerAddress.addressLineOne:"",w=t.footerAddress.addressLineTwo?t.footerAddress.addressLineTwo:"",T=t.footerAddress.city?t.footerAddress.city:"",O=t.footerAddress.zip?t.footerAddress.zip:"",F=(_!=""?_+",":"")+(w!=""?w+",":"")+(T!=""?T+",":"")+(O!=""?O+",":""),M=t.gstNo,z={companyName:t.companyName,companyAddress:F,companyContact:t.contactNumber,companyEmail:t.contactEmail},te={orderStatus:"COMPLETED",orderDate:v&&v.timestamp?R.unix(v.timestamp).format("DD-MM-YYYY hh:mm A"):null,orderNumber:v&&v.orderId?v.orderId:null,timestamp:v.timestamp},Q={custName:d&&d.custName?m==t.companyName?null:m:null,custAddress:d&&d.custAddress&&x||null,custContact:d&&d.custMobile?p:null,custEmail:"ajaybaglane7@gmail.com"},ae=en(t.curr),Ce="",W={...e,companyInfo:z,orderInfo:te,customerInfo:Q,gst:M,curr:ae};if(d){if(W.domain=d.siteURL,W.paymentMethods=d.paymentMode?W.paymentMethods:null,W.companyInfo.companyName=d.companyName,W.companyInfo.companyEmail=d.email,W.companyInfo.companyAddress=d.address,W.companyInfo.companyContact=d.mobile,W.customerInfo.custName=d.custName?m:null,W.tokenId=d.token?W.tokenId:null,d.isPayQR&&d.upiId&&d.upiId!==""&&(W.upiId=d.upiId),W.gstNo=d.gst?W.gst:null,W.footerMessage=d.footerMessage,W.orderFrom=(h=v.subOrderFrom)==null?void 0:h.toUpperCase(),W.fssai=t.fssai,W.vatNo=t.vatNo,W.taxLabel=ja(t),W.printOperatorInfo=d.printOperatorInfo===null||d.printOperatorInfo===!0,W.disabledPoweredBy=t.disabledPoweredBy===!0,W.printTime=R().format("DD-MM-YYYY hh:mm A"),v.deliveryTimestamp&&(W.deliveryTimestamp=R.unix(v.deliveryTimestamp).format("DD-MM-YYYY hh:mm A")),W.itemInstructionOnBill=d.itemInstructionOnBill,W.printHSNCodeOnBill=d.printHSNCodeOnBill,W.noOfInvoice=d.noOfInvoice,W.area=v.area,W.captainName=v.captainName,!(d.itemInstructionOnBill||d.printHSNCodeOnBill)&&((f=W.itemList)!=null&&f.length)){let B;for(let me=0;me<W.itemList.length;me++)B=W.itemList[me],B.instruction&&delete B.instruction,B.hsnCode&&delete B.hsnCode}t.enabledOutstandingOnPay&&((o=e.custoutStandingData)!=null&&o.balanceAmt)&&(W.custoutStandingData={balanceAmt:e.custoutStandingData.balanceAmt});let q=[];if((l=v.customFeilds)!=null&&l.length){let B;for(let me=0;me<v.customFeilds.length;me++)B=v.customFeilds[me],B!=null&&B.customValue&&((c=B.availability)!=null&&c.includes("BILL"))&&q.push({customName:B.customName,customValue:B.customValue});W.customFields=q}if(t&&t.isOld&&t.isOld==!0){let B=null,me=null;d.companyLogo&&(B=await zt(`https://${d.companyLogo.bucket}.s3.amazonaws.com/${d.companyLogo.key}`)),d.qrcode&&(me=await zt(`https://${d.qrcode.bucket}.s3.amazonaws.com/${d.qrcode.key}`));var a="Unknown OS";navigator.userAgent.indexOf("Win")!=-1&&(a="Windows OS"),navigator.userAgent.indexOf("Mac")!=-1&&(a="Macintosh"),navigator.userAgent.indexOf("Linux")!=-1&&(a="Linux OS"),navigator.userAgent.indexOf("Android")!=-1&&(a="Android OS"),navigator.userAgent.indexOf("like Mac")!=-1&&(a="iOS");let A={obj:W,companyLogo:B,companyQrCode:me,paperSize:t.printerSize,Name:a};console.log("obj :::",W),r(A)}}}catch(d){console.log("err",d)}})),Od=(e,t)=>new Promise(async(n,r)=>{var O;let i;(O=t.siteLogo)!=null&&O.key;let a=t.footerAddress.addressLineOne?t.footerAddress.addressLineOne:"",h=t.footerAddress.addressLineTwo?t.footerAddress.addressLineTwo:"",f=t.footerAddress.city?t.footerAddress.city:"",o=t.footerAddress.zip?t.footerAddress.zip:"",l=(a!=""?a+",":"")+(h!=""?h+",":"")+(f!=""?f+",":"")+(o!=""?o+",":""),c=[],d,m=0,p=0,x=0,v=[],_,w;const T=ms(t.paymentModes??defaultPaymentModes,"internalName");for(let F=0;F<e.length;F++)for(d=e[F],c.push({date:d.date,orderId:d.orderId,finalAmount:d.finalAmount}),m+=d.finalAmount,p+=d.paidAmt,x+=d.balanceAmt,_=0;_<d.orderTransactions.length;_++)w=d.orderTransactions[_],w.paidAmt&&v.push({date:R.unix(w.createdAt).format("DD-MM-YYYY"),paymentMode:T[w.paymentMode].displayName,amount:_e(w.paidAmt)});n({logo:i,companyAddress:l,companyName:t.companyName,companyContact:t.contactNumber,gst:t.gstNo,vatNo:t.vatNo,fssai:t.fssai,orders:c,totalAmount:m,totalPaid:p,totalPayable:x,paperSize:t.printerSize,curr:en(t.curr),transactions:v})}),Md=e=>new Promise(async(t,n)=>{let r={...e};r.orderObj=JSON.parse(e.orderObj),r.settingData=JSON.parse(e.settingData),r.invoiceFormat=JSON.parse(e.invoiceFormat),r.orderData=JSON.parse(e.orderObj);let i;r.newFormat?i=await va({...r.orderObj,itemList:r.orderObj.orderList},r.settingData,{invoiceFormat:r.invoiceFormat,custName:r.orderObj.custName,custMobile:r.orderObj.custMob,custAddress:r.orderObj.custAddress}):i=await Cd(r.orderObj,r.settingData,{invoiceFormat:r.invoiceFormat,custName:r.orderObj.custName,custMobile:r.orderObj.custMob,custAddress:r.orderObj.custAddress,orderData:r.orderData}),t(i)}),_a=e=>{let t=new Array;for(const n in e)if(Object.hasOwnProperty.call(e,n)){const r=`${n}::${e[n].orderId}::${Math.random()}`,i=e[n];i.newId=r,t.push(i)}return t},lr=e=>{var i,a;let t=localStorage.getItem("stationList"),n=JSON.parse(t),r=n.findIndex(h=>h.typeValue=="station::"+e);return((i=n[r])==null?void 0:i.printKot)==null?!0:(a=n[r])==null?void 0:a.printKot};function Ad(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}const Ed=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function St(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let Gt=null;function ba(e={}){return Gt||(e.includeStyleProperties?(Gt=e.includeStyleProperties,Gt):(Gt=St(window.getComputedStyle(document.documentElement)),Gt))}function nn(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function Rd(e){const t=nn(e,"border-left-width"),n=nn(e,"border-right-width");return e.clientWidth+t+n}function kd(e){const t=nn(e,"border-top-width"),n=nn(e,"border-bottom-width");return e.clientHeight+t+n}function Sa(e,t={}){const n=t.width||Rd(e),r=t.height||kd(e);return{width:n,height:r}}function Ld(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const Ye=16384;function Pd(e){(e.width>Ye||e.height>Ye)&&(e.width>Ye&&e.height>Ye?e.width>e.height?(e.height*=Ye/e.width,e.width=Ye):(e.width*=Ye/e.height,e.height=Ye):e.width>Ye?(e.height*=Ye/e.width,e.width=Ye):(e.width*=Ye/e.height,e.height=Ye))}function rn(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function Fd(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Dd(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),a=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(e),Fd(i)}const ke=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||ke(n,t)};function Yd(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Ud(e,t){return ba(t).map(n=>{const r=e.getPropertyValue(n),i=e.getPropertyPriority(n);return`${n}: ${r}${i?" !important":""};`}).join(" ")}function $d(e,t,n,r){const i=`.${e}:${t}`,a=n.cssText?Yd(n):Ud(n,r);return document.createTextNode(`${i}{${a}}`)}function Ta(e,t,n,r){const i=window.getComputedStyle(e,n),a=i.getPropertyValue("content");if(a===""||a==="none")return;const h=Ed();try{t.className=`${t.className} ${h}`}catch{return}const f=document.createElement("style");f.appendChild($d(h,n,i,r)),t.appendChild(f)}function Hd(e,t,n){Ta(e,t,":before",n),Ta(e,t,":after",n)}const wa="application/font-woff",Ia="image/jpeg",Bd={woff:wa,woff2:wa,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ia,jpeg:Ia,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Wd(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function or(e){const t=Wd(e).toLowerCase();return Bd[t]||""}function zd(e){return e.split(/,/)[1]}function cr(e){return e.search(/^(data:)/)!==-1}function Gd(e,t){return`data:${t};base64,${e}`}async function Ca(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise((a,h)=>{const f=new FileReader;f.onerror=h,f.onloadend=()=>{try{a(n({res:r,result:f.result}))}catch(o){h(o)}},f.readAsDataURL(i)})}const dr={};function Vd(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function hr(e,t,n){const r=Vd(e,t,n.includeQueryParams);if(dr[r]!=null)return dr[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const a=await Ca(e,n.fetchRequestInit,({res:h,result:f})=>(t||(t=h.headers.get("Content-Type")||""),zd(f)));i=Gd(a,t)}catch(a){i=n.imagePlaceholder||"";let h=`Failed to fetch resource: ${e}`;a&&(h=typeof a=="string"?a:a.message),h&&console.warn(h)}return dr[r]=i,i}async function qd(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):rn(t)}async function Kd(e,t){if(e.currentSrc){const a=document.createElement("canvas"),h=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,h==null||h.drawImage(e,0,0,a.width,a.height);const f=a.toDataURL();return rn(f)}const n=e.poster,r=or(n),i=await hr(n,r,t);return rn(i)}async function Qd(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await an(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Zd(e,t){return ke(e,HTMLCanvasElement)?qd(e):ke(e,HTMLVideoElement)?Kd(e,t):ke(e,HTMLIFrameElement)?Qd(e,t):e.cloneNode(Oa(e))}const Jd=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Oa=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Xd(e,t,n){var r,i;if(Oa(t))return t;let a=[];return Jd(e)&&e.assignedNodes?a=St(e.assignedNodes()):ke(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?a=St(e.contentDocument.body.childNodes):a=St(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),a.length===0||ke(e,HTMLVideoElement)||await a.reduce((h,f)=>h.then(()=>an(f,n)).then(o=>{o&&t.appendChild(o)}),Promise.resolve()),t}function eh(e,t,n){const r=t.style;if(!r)return;const i=window.getComputedStyle(e);i.cssText?(r.cssText=i.cssText,r.transformOrigin=i.transformOrigin):ba(n).forEach(a=>{let h=i.getPropertyValue(a);a==="font-size"&&h.endsWith("px")&&(h=`${Math.floor(parseFloat(h.substring(0,h.length-2)))-.1}px`),ke(e,HTMLIFrameElement)&&a==="display"&&h==="inline"&&(h="block"),a==="d"&&t.getAttribute("d")&&(h=`path(${t.getAttribute("d")})`),r.setProperty(a,h,i.getPropertyPriority(a))})}function th(e,t){ke(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),ke(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function sh(e,t){if(ke(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function nh(e,t,n){return ke(t,Element)&&(eh(e,t,n),Hd(e,t,n),th(e,t),sh(e,t)),t}async function rh(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let a=0;a<n.length;a++){const f=n[a].getAttribute("xlink:href");if(f){const o=e.querySelector(f),l=document.querySelector(f);!o&&l&&!r[f]&&(r[f]=await an(l,t,!0))}}const i=Object.values(r);if(i.length){const a="http://www.w3.org/1999/xhtml",h=document.createElementNS(a,"svg");h.setAttribute("xmlns",a),h.style.position="absolute",h.style.width="0",h.style.height="0",h.style.overflow="hidden",h.style.display="none";const f=document.createElementNS(a,"defs");h.appendChild(f);for(let o=0;o<i.length;o++)f.appendChild(i[o]);e.appendChild(h)}return e}async function an(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>Zd(r,t)).then(r=>Xd(e,r,t)).then(r=>nh(e,r,t)).then(r=>rh(r,t))}const Ma=/url\((['"]?)([^'"]+?)\1\)/g,ah=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,ih=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function lh(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function oh(e){const t=[];return e.replace(Ma,(n,r,i)=>(t.push(i),n)),t.filter(n=>!cr(n))}async function ch(e,t,n,r,i){try{const a=n?Ad(t,n):t,h=or(t);let f;return i||(f=await hr(a,h,r)),e.replace(lh(t),`$1${f}$3`)}catch{}return e}function dh(e,{preferredFontFormat:t}){return t?e.replace(ih,n=>{for(;;){const[r,,i]=ah.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function Aa(e){return e.search(Ma)!==-1}async function Ea(e,t,n){if(!Aa(e))return e;const r=dh(e,n);return oh(r).reduce((a,h)=>a.then(f=>ch(f,h,t,n)),Promise.resolve(r))}async function Vt(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const a=await Ea(i,null,n);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function hh(e,t){await Vt("background",e,t)||await Vt("background-image",e,t),await Vt("mask",e,t)||await Vt("-webkit-mask",e,t)||await Vt("mask-image",e,t)||await Vt("-webkit-mask-image",e,t)}async function uh(e,t){const n=ke(e,HTMLImageElement);if(!(n&&!cr(e.src))&&!(ke(e,SVGImageElement)&&!cr(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await hr(r,or(r),t);await new Promise((a,h)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...o)=>{try{a(t.onImageErrorHandler(...o))}catch(l){h(l)}}:h;const f=e;f.decode&&(f.decode=a),f.loading==="lazy"&&(f.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i})}async function mh(e,t){const r=St(e.childNodes).map(i=>Ra(i,t));await Promise.all(r).then(()=>e)}async function Ra(e,t){ke(e,Element)&&(await hh(e,t),await uh(e,t),await mh(e,t))}function fh(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(i=>{n[i]=r[i]}),e}const ka={};async function La(e){let t=ka[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},ka[e]=t,t}async function Pa(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,a=(n.match(/url\([^)]+\)/g)||[]).map(async h=>{let f=h.replace(r,"$1");return f.startsWith("https://")||(f=new URL(f,e.url).href),Ca(f,t.fetchRequestInit,({result:o})=>(n=n.replace(h,`url(${o})`),[h,o]))});return Promise.all(a).then(()=>n)}function Fa(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const o=i.exec(r);if(o===null)break;t.push(o[0])}r=r.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,h="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",f=new RegExp(h,"gi");for(;;){let o=a.exec(r);if(o===null){if(o=f.exec(r),o===null)break;a.lastIndex=f.lastIndex}else f.lastIndex=a.lastIndex;t.push(o[0])}return t}async function ph(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{St(i.cssRules||[]).forEach((a,h)=>{if(a.type===CSSRule.IMPORT_RULE){let f=h+1;const o=a.href,l=La(o).then(c=>Pa(c,t)).then(c=>Fa(c).forEach(d=>{try{i.insertRule(d,d.startsWith("@import")?f+=1:i.cssRules.length)}catch(m){console.error("Error inserting rule from remote css",{rule:d,error:m})}})).catch(c=>{console.error("Error loading remote css",c.toString())});r.push(l)}})}catch(a){const h=e.find(f=>f.href==null)||document.styleSheets[0];i.href!=null&&r.push(La(i.href).then(f=>Pa(f,t)).then(f=>Fa(f).forEach(o=>{h.insertRule(o,h.cssRules.length)})).catch(f=>{console.error("Error loading remote stylesheet",f)})),console.error("Error inlining remote css file",a)}}),Promise.all(r).then(()=>(e.forEach(i=>{if("cssRules"in i)try{St(i.cssRules||[]).forEach(a=>{n.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),n))}function yh(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Aa(t.style.getPropertyValue("src")))}async function gh(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=St(e.ownerDocument.styleSheets),r=await ph(n,t);return yh(r)}function Da(e){return e.trim().replace(/["']/g,"")}function xh(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(a=>{t.add(Da(a))}),Array.from(r.children).forEach(a=>{a instanceof HTMLElement&&n(a)})}return n(e),t}async function Nh(e,t){const n=await gh(e,t),r=xh(e);return(await Promise.all(n.filter(a=>r.has(Da(a.style.fontFamily))).map(a=>{const h=a.parentStyleSheet?a.parentStyleSheet.href:null;return Ea(a.cssText,h,t)}))).join(`
45
+ */var cd=Js.exports,ga;function dd(){return ga||(ga=1,function(e){(function(t,n){e.exports?e.exports=n():t.numeral=n()})(cd,function(){var t,n,r="2.0.6",i={},a={},h={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},f={currentLocale:h.currentLocale,zeroFormat:h.zeroFormat,nullFormat:h.nullFormat,defaultFormat:h.defaultFormat,scalePercentBy100:h.scalePercentBy100};function o(l,c){this._input=l,this._value=c}return t=function(l){var c,d,p,m;if(t.isNumeral(l))c=l.value();else if(l===0||typeof l>"u")c=0;else if(l===null||n.isNaN(l))c=null;else if(typeof l=="string")if(f.zeroFormat&&l===f.zeroFormat)c=0;else if(f.nullFormat&&l===f.nullFormat||!l.replace(/[^0-9]+/g,"").length)c=null;else{for(d in i)if(m=typeof i[d].regexps.unformat=="function"?i[d].regexps.unformat():i[d].regexps.unformat,m&&l.match(m)){p=i[d].unformat;break}p=p||t._.stringToNumber,c=p(l)}else c=Number(l)||null;return new o(l,c)},t.version=r,t.isNumeral=function(l){return l instanceof o},t._=n={numberToFormat:function(l,c,d){var p=a[t.options.currentLocale],m=!1,x=!1,v=0,b="",w=1e12,S=1e9,M=1e6,P=1e3,O="",z=!1,K,se,Q,ie,Ce,W,q;if(l=l||0,se=Math.abs(l),t._.includes(c,"(")?(m=!0,c=c.replace(/[\(|\)]/g,"")):(t._.includes(c,"+")||t._.includes(c,"-"))&&(Ce=t._.includes(c,"+")?c.indexOf("+"):l<0?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),t._.includes(c,"a")&&(K=c.match(/a(k|m|b|t)?/),K=K?K[1]:!1,t._.includes(c," a")&&(b=" "),c=c.replace(new RegExp(b+"a[kmbt]?"),""),se>=w&&!K||K==="t"?(b+=p.abbreviations.trillion,l=l/w):se<w&&se>=S&&!K||K==="b"?(b+=p.abbreviations.billion,l=l/S):se<S&&se>=M&&!K||K==="m"?(b+=p.abbreviations.million,l=l/M):(se<M&&se>=P&&!K||K==="k")&&(b+=p.abbreviations.thousand,l=l/P)),t._.includes(c,"[.]")&&(x=!0,c=c.replace("[.]",".")),Q=l.toString().split(".")[0],ie=c.split(".")[1],W=c.indexOf(","),v=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,ie?(t._.includes(ie,"[")?(ie=ie.replace("]",""),ie=ie.split("["),O=t._.toFixed(l,ie[0].length+ie[1].length,d,ie[1].length)):O=t._.toFixed(l,ie.length,d),Q=O.split(".")[0],t._.includes(O,".")?O=p.delimiters.decimal+O.split(".")[1]:O="",x&&Number(O.slice(1))===0&&(O="")):Q=t._.toFixed(l,0,d),b&&!K&&Number(Q)>=1e3&&b!==p.abbreviations.trillion)switch(Q=String(Number(Q)/1e3),b){case p.abbreviations.thousand:b=p.abbreviations.million;break;case p.abbreviations.million:b=p.abbreviations.billion;break;case p.abbreviations.billion:b=p.abbreviations.trillion;break}if(t._.includes(Q,"-")&&(Q=Q.slice(1),z=!0),Q.length<v)for(var B=v-Q.length;B>0;B--)Q="0"+Q;return W>-1&&(Q=Q.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+p.delimiters.thousands)),c.indexOf(".")===0&&(Q=""),q=Q+O+(b||""),m?q=(m&&z?"(":"")+q+(m&&z?")":""):Ce>=0?q=Ce===0?(z?"-":"+")+q:q+(z?"-":"+"):z&&(q="-"+q),q},stringToNumber:function(l){var c=a[f.currentLocale],d=l,p={thousand:3,million:6,billion:9,trillion:12},m,x,v;if(f.zeroFormat&&l===f.zeroFormat)x=0;else if(f.nullFormat&&l===f.nullFormat||!l.replace(/[^0-9]+/g,"").length)x=null;else{x=1,c.delimiters.decimal!=="."&&(l=l.replace(/\./g,"").replace(c.delimiters.decimal,"."));for(m in p)if(v=new RegExp("[^a-zA-Z]"+c.abbreviations[m]+"(?:\\)|(\\"+c.currency.symbol+")?(?:\\))?)?$"),d.match(v)){x*=Math.pow(10,p[m]);break}x*=(l.split("-").length+Math.min(l.split("(").length-1,l.split(")").length-1))%2?1:-1,l=l.replace(/[^0-9\.]+/g,""),x*=Number(l)}return x},isNaN:function(l){return typeof l=="number"&&isNaN(l)},includes:function(l,c){return l.indexOf(c)!==-1},insert:function(l,c,d){return l.slice(0,d)+c+l.slice(d)},reduce:function(l,c){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof c!="function")throw new TypeError(c+" is not a function");var d=Object(l),p=d.length>>>0,m=0,x;if(arguments.length===3)x=arguments[2];else{for(;m<p&&!(m in d);)m++;if(m>=p)throw new TypeError("Reduce of empty array with no initial value");x=d[m++]}for(;m<p;m++)m in d&&(x=c(x,d[m],m,d));return x},multiplier:function(l){var c=l.toString().split(".");return c.length<2?1:Math.pow(10,c[1].length)},correctionFactor:function(){var l=Array.prototype.slice.call(arguments);return l.reduce(function(c,d){var p=n.multiplier(d);return c>p?c:p},1)},toFixed:function(l,c,d,p){var m=l.toString().split("."),x=c-(p||0),v,b,w,S;return m.length===2?v=Math.min(Math.max(m[1].length,x),c):v=x,w=Math.pow(10,v),S=(d(l+"e+"+v)/w).toFixed(v),p>c-v&&(b=new RegExp("\\.?0{1,"+(p-(c-v))+"}$"),S=S.replace(b,"")),S}},t.options=f,t.formats=i,t.locales=a,t.locale=function(l){return l&&(f.currentLocale=l.toLowerCase()),f.currentLocale},t.localeData=function(l){if(!l)return a[f.currentLocale];if(l=l.toLowerCase(),!a[l])throw new Error("Unknown locale : "+l);return a[l]},t.reset=function(){for(var l in h)f[l]=h[l]},t.zeroFormat=function(l){f.zeroFormat=typeof l=="string"?l:null},t.nullFormat=function(l){f.nullFormat=typeof l=="string"?l:null},t.defaultFormat=function(l){f.defaultFormat=typeof l=="string"?l:"0.0"},t.register=function(l,c,d){if(c=c.toLowerCase(),this[l+"s"][c])throw new TypeError(c+" "+l+" already registered.");return this[l+"s"][c]=d,d},t.validate=function(l,c){var d,p,m,x,v,b,w,S;if(typeof l!="string"&&(l+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",l)),l=l.trim(),l.match(/^\d+$/))return!0;if(l==="")return!1;try{w=t.localeData(c)}catch{w=t.localeData(t.locale())}return m=w.currency.symbol,v=w.abbreviations,d=w.delimiters.decimal,w.delimiters.thousands==="."?p="\\.":p=w.delimiters.thousands,S=l.match(/^[^\d]+/),S!==null&&(l=l.substr(1),S[0]!==m)||(S=l.match(/[^\d]+$/),S!==null&&(l=l.slice(0,-1),S[0]!==v.thousand&&S[0]!==v.million&&S[0]!==v.billion&&S[0]!==v.trillion))?!1:(b=new RegExp(p+"{2}"),l.match(/[^\d.,]/g)?!1:(x=l.split(d),x.length>2?!1:x.length<2?!!x[0].match(/^\d+.*\d$/)&&!x[0].match(b):x[0].length===1?!!x[0].match(/^\d+$/)&&!x[0].match(b)&&!!x[1].match(/^\d+$/):!!x[0].match(/^\d+.*\d$/)&&!x[0].match(b)&&!!x[1].match(/^\d+$/)))},t.fn=o.prototype={clone:function(){return t(this)},format:function(l,c){var d=this._value,p=l||f.defaultFormat,m,x,v;if(c=c||Math.round,d===0&&f.zeroFormat!==null)x=f.zeroFormat;else if(d===null&&f.nullFormat!==null)x=f.nullFormat;else{for(m in i)if(p.match(i[m].regexps.format)){v=i[m].format;break}v=v||t._.numberToFormat,x=v(d,p,c)}return x},value:function(){return this._value},input:function(){return this._input},set:function(l){return this._value=Number(l),this},add:function(l){var c=n.correctionFactor.call(null,this._value,l);function d(p,m,x,v){return p+Math.round(c*m)}return this._value=n.reduce([this._value,l],d,0)/c,this},subtract:function(l){var c=n.correctionFactor.call(null,this._value,l);function d(p,m,x,v){return p-Math.round(c*m)}return this._value=n.reduce([l],d,Math.round(this._value*c))/c,this},multiply:function(l){function c(d,p,m,x){var v=n.correctionFactor(d,p);return Math.round(d*v)*Math.round(p*v)/Math.round(v*v)}return this._value=n.reduce([this._value,l],c,1),this},divide:function(l){function c(d,p,m,x){var v=n.correctionFactor(d,p);return Math.round(d*v)/Math.round(p*v)}return this._value=n.reduce([this._value,l],c),this},difference:function(l){return Math.abs(t(this._value).subtract(l).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(l){var c=l%10;return~~(l%100/10)===1?"th":c===1?"st":c===2?"nd":c===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(l,c,d){var p=t._.includes(c," BPS")?" ":"",m;return l=l*1e4,c=c.replace(/\s?BPS/,""),m=t._.numberToFormat(l,c,d),t._.includes(m,")")?(m=m.split(""),m.splice(-1,0,p+"BPS"),m=m.join("")):m=m+p+"BPS",m},unformat:function(l){return+(t._.stringToNumber(l)*1e-4).toFixed(15)}})}(),function(){var l={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},d=l.suffixes.concat(c.suffixes.filter(function(m){return l.suffixes.indexOf(m)<0})),p=d.join("|");p="("+p.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(p)},format:function(m,x,v){var b,w=t._.includes(x,"ib")?c:l,S=t._.includes(x," b")||t._.includes(x," ib")?" ":"",M,P,O;for(x=x.replace(/\s?i?b/,""),M=0;M<=w.suffixes.length;M++)if(P=Math.pow(w.base,M),O=Math.pow(w.base,M+1),m===null||m===0||m>=P&&m<O){S+=w.suffixes[M],P>0&&(m=m/P);break}return b=t._.numberToFormat(m,x,v),b+S},unformat:function(m){var x=t._.stringToNumber(m),v,b;if(x){for(v=l.suffixes.length-1;v>=0;v--){if(t._.includes(m,l.suffixes[v])){b=Math.pow(l.base,v);break}if(t._.includes(m,c.suffixes[v])){b=Math.pow(c.base,v);break}}x*=b||1}return x}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(l,c,d){var p=t.locales[t.options.currentLocale],m={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]},x,v,b;for(c=c.replace(/\s?\$\s?/,""),x=t._.numberToFormat(l,c,d),l>=0?(m.before=m.before.replace(/[\-\(]/,""),m.after=m.after.replace(/[\-\)]/,"")):l<0&&!t._.includes(m.before,"-")&&!t._.includes(m.before,"(")&&(m.before="-"+m.before),b=0;b<m.before.length;b++)switch(v=m.before[b],v){case"$":x=t._.insert(x,p.currency.symbol,b);break;case" ":x=t._.insert(x," ",b+p.currency.symbol.length-1);break}for(b=m.after.length-1;b>=0;b--)switch(v=m.after[b],v){case"$":x=b===m.after.length-1?x+p.currency.symbol:t._.insert(x,p.currency.symbol,-(m.after.length-(1+b)));break;case" ":x=b===m.after.length-1?x+" ":t._.insert(x," ",-(m.after.length-(1+b)+p.currency.symbol.length-1));break}return x}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(l,c,d){var p,m=typeof l=="number"&&!t._.isNaN(l)?l.toExponential():"0e+0",x=m.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),p=t._.numberToFormat(Number(x[0]),c,d),p+"e"+x[1]},unformat:function(l){var c=t._.includes(l,"e+")?l.split("e+"):l.split("e-"),d=Number(c[0]),p=Number(c[1]);p=t._.includes(l,"e-")?p*=-1:p;function m(x,v,b,w){var S=t._.correctionFactor(x,v),M=x*S*(v*S)/(S*S);return M}return t._.reduce([d,Math.pow(10,p)],m,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(l,c,d){var p=t.locales[t.options.currentLocale],m,x=t._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),x+=p.ordinal(l),m=t._.numberToFormat(l,c,d),m+x}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(l,c,d){var p=t._.includes(c," %")?" ":"",m;return t.options.scalePercentBy100&&(l=l*100),c=c.replace(/\s?\%/,""),m=t._.numberToFormat(l,c,d),t._.includes(m,")")?(m=m.split(""),m.splice(-1,0,p+"%"),m=m.join("")):m=m+p+"%",m},unformat:function(l){var c=t._.stringToNumber(l);return t.options.scalePercentBy100?c*.01:c}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(l,c,d){var p=Math.floor(l/60/60),m=Math.floor((l-p*60*60)/60),x=Math.round(l-p*60*60-m*60);return p+":"+(m<10?"0"+m:m)+":"+(x<10?"0"+x:x)},unformat:function(l){var c=l.split(":"),d=0;return c.length===3?(d=d+Number(c[0])*60*60,d=d+Number(c[1])*60,d=d+Number(c[2])):c.length===2&&(d=d+Number(c[0])*60,d=d+Number(c[1])),Number(d)}})}(),t})}(Js)),Js.exports}var hd=dd();const Xs=pr(hd),_e=e=>+(Math.round(parseFloat(e)+"e+3")+"e-3"),tt=e=>+(Math.round(parseFloat(e)+"e+2")+"e-2"),ud={_2:{reg:/^\d+(\.\d{1,2})?$/,message:"Only Positive value upto 2 decimals is allowed",roundUpto:tt},_3:{reg:/^\d+(\.\d{1,3})?$/,message:"Only Positive value upto 3 decimals is allowed",roundUpto:_e}},xa=(e,t)=>{const n=ud[`_${tn[t].minimumFractionDigits??2}`].roundUpto;return n(e)},en=e=>({INR:"Rs",USD:"USD",GBP:"GBP",AED:"AE",ZMW:"ZM",SAR:"SAR",QAR:"QAR",BHD:"BHD",NPR:"NPR",KWD:"KWD",OMR:"OMR",KES:"KES",SGD:"SGD",MVR:"MVR",IDR:"IDR",THB:"THB",MYR:"MYR",TZS:"TZS",BWP:"BWP"})[e]||"Rs",tn={USD:{symbol:"$"},EUR:{symbol:"€"},GBP:{symbol:"£"},AED:{symbol:"AE",contactValidation:8},JPY:{symbol:"¥"},AUD:{symbol:"A$"},CAD:{symbol:"CA$",contactValidation:7},INR:{symbol:"₹",round:Math.round},CNY:{symbol:"CN¥",contactValidation:8},BRL:{symbol:"R$",contactValidation:9},QAR:{symbol:"QAR",contactValidation:8},SAR:{symbol:"SAR",contactValidation:7},BHD:{symbol:"BHD",minimumFractionDigits:3,contactValidation:7},NPR:{symbol:"NPR",contactValidation:10},KWD:{symbol:"KWD",minimumFractionDigits:3,contactValidation:8},ZMW:{symbol:"ZK",contactValidation:9},OMR:{symbol:"OMR",minimumFractionDigits:3,contactValidation:8},KES:{symbol:"KSh",contactValidation:9},SGD:{symbol:"S$",contactValidation:9},MVR:{symbol:"MVR",contactValidation:7,displayType:"code"},IDR:{symbol:"Rp",contactValidation:13,displayType:"code",round:Math.round},THB:{symbol:"฿",contactValidation:8,displayType:"code"},MYR:{symbol:"RM",displayType:"code"},PKR:{symbol:"₨",round:Math.round},GHS:{symbol:"₵",contactValidation:9},LKR:{symbol:"₨",displayType:"code"},TZS:{symbol:"TZS",contactValidation:9},BWP:{symbol:"P",contactValidation:8,displayType:"code"}};function md(e,t){switch(t){case"BHD":case"KWD":case"OMR":return Xs(e).format("0,00.000");default:return Xs(e).format("0,00.00")}}function fd(e){const t=["","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"],n=["Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],r=["","Ten","Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety"];function i(p){if(p<10)return t[p];if(p<20)return n[p-11];{const m=p%10,x=Math.floor(p/10);return`${r[x]}${m?" "+t[m]:""}`}}function a(p){var m=p.toString(),x,v,b,w,S,M,P,O,z,K,se,Q,ie="and";if(m=m.replace(/[, ]/g,""),parseInt(m)===0)return"zero";for(x=["","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],v=["","","Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety"],b=["","Thousand","Million","Billion","Trillion","Quadrillion","Quintillion","Sextillion","Septillion","Octillion","Nonillion","Decillion","Undecillion","Duodecillion","Tredecillion","Quatttuor-Decillion","quindecillion","sexdecillion","septen-decillion","octodecillion","novemdecillion","vigintillion","centillion"],w=m.length,M=[];w>0;)S=w,M.push(m.slice(w=Math.max(0,w-3),S));if(P=M.length,P>b.length)return"";for(Q=[],K=0;K<P;K++)O=parseInt(M[K]),O&&(z=M[K].split("").reverse().map(parseFloat),z[1]===1&&(z[0]+=10),(se=b[K])&&Q.push(se),(se=x[z[0]])&&Q.push(se),(se=v[z[1]])&&Q.push(se),(z[0]||z[1])&&(z[2]||K+1>P)&&Q.push(ie),(se=x[z[2]])&&Q.push(se+" Hundred"));return Q.reverse().join(" ")}const[h,f]=e.toString().split("."),o=a(parseInt(h,10)),l=i(parseInt(f,10)),c=l?`${l} Paise`:"";return`${o} Rupees ${c&&"And "+c?c:""} Only`}const oe=(e,t)=>`${tn[t].symbol} ${xa(e||0,t)}`,Y=(e,t)=>`${tn[t].symbol} ${md(e||0,t)}`,Xn=()=>{var e="Unknown OS";return navigator.userAgent.indexOf("Win")!=-1&&(e="Windows OS"),navigator.userAgent.indexOf("Mac")!=-1&&(e="Macintosh"),navigator.userAgent.indexOf("Linux")!=-1&&(e="Linux OS"),navigator.userAgent.indexOf("Android")!=-1&&(e="Android OS"),navigator.userAgent.indexOf("like Mac")!=-1&&(e="iOS"),e},pd=e=>+(Math.round(parseFloat(e)*1e3)/1e3).toFixed(3),er=(e,t="type",n)=>{const r={},i=n==null?void 0:n.separateItemsDisc;return e.forEach(h=>{var f;(f=h.discounts)==null||f.forEach(o=>{if(o.type){let l=`${o[t]}`;o.type==="DISCOUNT_ITEMS"&&i&&(l=`${o[t]}::${o.discountType}::${o.discountValue}`),r[l]?r[l].discountAmt+=o.discountAmt:r[l]={type:o.type,discountType:o.discountType,discountValue:o.discountValue,discountAmt:pd(o.discountAmt),discountName:o.discountName}}})}),Object.values(r)},tr=(e,t="type")=>{const n={};return e.forEach(i=>{var a;(a=i.dish_charges)==null||a.forEach(h=>{const f=`${h[t]}`;n[f]?(n[f].amt+=h.amt,n[f].taxAmt+=h.taxAmt):n[f]={amt:h.amt,chargeType:h.chargeType?h.chargeType:h.type,defaultSelcted:h.defaultSelcted,rate:h.rate,tax:h.tax,taxAmt:h.taxAmt,name:h.name,type:h.type}})}),Object.values(n)},sr=e=>{const t=e==null?void 0:e.split("-");return(t==null?void 0:t.length)===3?`${t[2]}-${t[1]}-${t[0]}`:null};function fs(e,t){const n=Buffer.from([e],"utf8"),r=Buffer.from([t.length],"utf8"),i=Buffer.from(t,"utf8"),a=[n,r,i];return Buffer.concat(a)}function yd(e,t,n,r,i){const a=fs("1",e),h=fs("2",t),f=fs("3",n),o=fs("4",r),l=fs("5",i);var c=Buffer.concat([a,h,f,o,l]);return c.toString("base64")}const gd=e=>({Station:"Station",Chef:"Chef",Area:"Areas",Waiter:"Waiter",Captain:"Captain",Table:"Table",KOT:"KOT",Table_View:"Table View",Manage_Dine_In:"Manage Dine-In",Counter:"Counter"}),xd=e=>{let t;return e!=null&&e.length?t=JSON.parse(JSON.stringify(e)):t=[{internalName:"CASH",displayName:"Cash",paymentState:"PAID_OFFLINE"},{internalName:"CREDIT_CARD",displayName:"Credit Card",paymentState:"PAID_ONLINE"},{internalName:"DEBIT_CARD",displayName:"Debit Card",paymentState:"PAID_ONLINE"},{internalName:"UPI",displayName:"UPI",paymentState:"PAID_ONLINE"}],t},ps=Xn(),Nd=e=>{let t=e||0;var n=Math.floor(t/60),r=`${n} min`,i=parseInt(r);if(i>60){var a=Math.floor(t/3600),h=Math.floor(t%3600/60),f=`${a} hr ${h} min`;return f}else return r},jd=(e,t)=>{let n=new Array,r={WRITE_OFF:"WRITE_OFF",CASH_CARD:"CASH_CARD"};const i=[...t,{internalName:"swiggy",displayName:"Swiggy"},{internalName:"zomato",displayName:"Zomato"}],a=ms(i,"internalName");let h;for(let f in e.paymentModes)!r[f]&&e.paymentModes[f]&&(h=a[f],n.push({displayName:h?h.displayName:Qe(f.replace("_"," ")),value:tt(e.paymentModes[f])}));return n},vd=(e,t)=>e>0&&t>0?e/t:0;function zt(e){return new Promise((t,n)=>{try{var r=new Image;r.src=e,r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{var i=document.createElement("canvas");i.width=r.width,i.height=r.height;var a=i.getContext("2d");a.drawImage(r,0,0);var h=i.toDataURL("image/png");t(h)},r.onerror=i=>{t(null)}}catch{t(null)}})}const sn=(e,t,n)=>{if(e&&e.length>0)if(t!=null&&t.name){let r=[];return e.map(i=>{i.serverName&&i.serverName.includes(t==null?void 0:t.name)&&r.push({...i,value:i[n]})}),r}else return e;else return!0},nr=e=>{let t={},n;for(let r=0;r<e.length;r++)switch(n=e[r],n.type){case"ORDER_DISCOUNT":t.ORDER_DISCOUNT=[n];break;case"DISCOUNT_ITEMS":t.DISCOUNT_ITEMS?t.DISCOUNT_ITEMS.push(n):t.DISCOUNT_ITEMS=[n];break;case"CATEGORY_DISCOUNT":t.CATEGORY_DISCOUNT?t.CATEGORY_DISCOUNT.push(n):t.CATEGORY_DISCOUNT=[n];break;case"ITEM_DISCOUNT":t.ITEM_DISCOUNT?t.ITEM_DISCOUNT.push(n):t.ITEM_DISCOUNT=[n];break;case"COUPON_DISCOUNT":t.COUPON_DISCOUNT=[n];break;case"SEGMENT_DISCOUNT":t.SEGMENT_DISCOUNT=[n];break}return t},rr=(e,t)=>{var c,d,p,m;let n,r,i,a,h;const f={},{itemInstructionOnBill:o,printZeroPriceAddons:l}=t;for(let x=0;x<e.length;x++)if(n=e[x],n.status!=="CANCELLED"){if((c=n.addons)!=null&&c.length&&!l)for(i=[],h=0;h<n.addons.length;h++)a=n.addons[h],a.serviceRate&&i.push(a);else i=n.addons;if(o?r=`${n.serviceId}::${n.serviceRate}::${n.instruction}::${n.taxType??"GST"}`:r=`${n.serviceId}::${n.serviceRate}::${n.taxType??"GST"}`,f[r]){if(f[r].qty+=n.qty,f[r].sub_total+=n.sub_total,(d=f[r].addons)!=null&&d.length&&((p=n.addons)!=null&&p.length)){const v=ms(n.addons,"serviceId"),b=[];let w;for(let S=0;S<f[r].addons.length;S++)a=f[r].addons[S],(m=v[a.serviceId])!=null&&m.serviceId&&(w=v[a.serviceId],a.sub_total+=w.sub_total??0),b.push(a);f[r].addons=b}}else f[r]=JSON.parse(JSON.stringify({...n,addons:i}))}return Object.values(f)},ar=e=>{var f;let t,n,r,i,a={},h=0;for(let o=0;o<e.length;o++)if(t=e[o],(f=t.taxation)!=null&&f.length)for(n=0;n<t.taxation.length;n++)r=t.taxation[n],i=`${r.tax}::${r.taxType??"GST"}`,a[i]?(a[i].taxableAmt=a[i].taxableAmt+(r.taxableAmt??0),a[i].taxAmt=a[i].taxAmt+(r.taxAmt??0),h+=r.taxAmt):(a[i]=JSON.parse(JSON.stringify(r)),h+=r.taxAmt);return{obj:Object.values(a),sum:h}},ir=(e,t,n)=>{var a,h,f,o;let r=n.occupiedServer,i;try{i=r?JSON.parse(r):void 0}catch(l){console.error("Failed to parse serverData:",l),i=void 0}if(t.type=="BILL"||t.type=="AGGREGATOR_BILL")return sn((a=t.siteSetting)==null?void 0:a.billPrinters,i,"label");if(t.type=="PACKAGING_SLIP"){let l=sn((h=t.siteSetting)==null?void 0:h.packagingSlipPrinters,i,"value");if(ps=="Android OS"){let c=l&&l.length>0?l.findIndex(d=>d.value==e.value):-1;return c!=-1?[l[c]]:null}else{let c=l&&l.length>0?l.findIndex(d=>d.value==e):-1;return c!=-1?[l[c]]:null}}else{if(t.type=="ITEMWISE_SALES_COUNTER"||t.type=="PRINT_DASHBOARD"||t.type=="COUNTER_OPERATION"||t.type=="CARD_RECHARGE_DETAILS"||t.type==="ORDER_AGGREGATED_PRINT")return sn((f=t.siteSetting)==null?void 0:f.billPrinters,i,"value");{let l=sn((o=t.siteSetting)==null?void 0:o.printers,i,"value");if(l===!0)return l;if(ps=="Android OS"){let c=l&&l.length>0?l.findIndex(d=>d.value==(e==null?void 0:e.value)):-1;return c!=-1?[l[c]]:null}else{let c=l&&l.length>0?l.findIndex(d=>d.value==e):-1;return c!=-1?[l[c]]:null}}}},_d=(e,t,n={})=>{var b;const{usersObj:r}=n;let i={},a,h;const{cancelledKOT:f,onlyCancelledItems:o,kotStatus:l="KOT_GENERATED"}=n,c=bt(e.orderTags,"EXPRESS","tag_type").content?"INSTANT - URGENT ORDER":null;if((b=e.customFeilds)!=null&&b.length){let w=bt(e.customFeilds,"INSTRUCTION","customType");w!=null&&w.customValue&&(h=[{customName:w.customName,customValue:w.customValue}])}e.orderList.filter(w=>{a=w.services.sort(S=>S.status==="CANCELLED"?-1:0),a.forEach((S,M)=>{var Ce,W,q;let P=S.station?S.station.split("::"):"",O=P&&P.length>1?P[1]:P[0],z=e.tableNo?e.tableNo.split("::"):null,K=z&&z.length>0?z[0]:e.orderFrom,se=e.tableName?e.tableName:e.tableNo?K:e.orderFrom,Q;(Ce=r==null?void 0:r[w.createdBy])!=null&&Ce.name&&(Q=r[w.createdBy].name);let ie=!1;(f||O&&S.status==l)&&(ie=!0),ie&&lr(O)&&(i[O]||(i[O]={},i[O].station=O,i[O].services=[],i[O].tableName=se,i[O].customerName=e.name==t.companyName?null:e.name,i[O].time=E().format("DD-MM-YYYY hh:mm a"),i[O].type=e.orderFrom,i[O].subOrderFrom=e.subOrderFrom,i[O].orderId=e.externalOrderId||e.offlineOrderId?e.orderId:w.subOrderId,i[O].orderId=new Set([i[O].orderId]),i[O].instruction=e.instruction,i[O].orderSource=e.orderSource,i[O].deliveryTimestamp=e.deliveryTimestamp?E.unix(e.deliveryTimestamp).format("DD-MM-YYYY hh:mm A"):null,i[O].aggregatorOrderId=e.externalOrderId,i[O].otp=e.otp,i[O].totalQty=0,i[O].tokenId=e.tokenId,i[O].kotId=S.kotId?new Set([S.kotId]):null,i[O].waiterName=e.waiterName,i[O].duplicate=f,i[O].createdBy=Q,i[O].zomatoInstant=c,h&&(i[O].customFields=h),o&&(i[O].onlyCancelledItems=o),e.preparationTime&&(i[O].prepareBy=E().add(e.preparationTime,"minutes").format("DD-MM-YYYY hh:mm A"))),i[O]?(i[O].services.push({serviceName:S.serviceName,qty:S.qty,instruction:S.isUrgent&&S.instruction?`(URGENT -${S.instruction})`:S.instruction?`(${S.instruction})`:S.isUrgent?"(URGENT)":"",subOrderId:w.subOrderId,isUrgent:S.isUrgent,index:M,status:S.status,addons:S.addons}),i[O].totalQty+=_e(S.qty),(W=i[O].kotId)==null||W.add(S.kotId),e.externalOrderId||e.offlineOrderId||(q=i[O].orderId)==null||q.add(w.subOrderId)):(i[O]=[],i[O].services.push({serviceName:S.serviceName,qty:S.qty,instruction:S.instruction?S.instruction:"",subOrderId:w.subOrderId,index:M,status:S.status}),i[O].totalQty+=_e(S.qty)))})});let d={},p="2INCH";Xn();let m,x=[],v={};for(const w in i)if(Object.hasOwnProperty.call(i,w)){const S=i[w];try{t.printers&&t.printers.map(M=>{M.label.toUpperCase()==S.station.toUpperCase()&&(m=ps=="Android OS"?M:M.value??void 0,p=M.paperSize?M.paperSize:t.printerSize,x.push({printer:m,paperSize:p}))}),x.length==0&&x.push({printer:m,paperSize:t.printerSize||p});for(let M=0;M<S.services.length;M++){let P=S.services[M],O=e.orderList.find(K=>K.subOrderId==P.subOrderId),z=d[P.subOrderId];O&&(z?z.services.push(O.services[P.index]):(d[P.subOrderId]={},d[P.subOrderId].subOrderId=O.subOrderId,d[P.subOrderId].services=[O.services[P.index]]))}}catch(M){console.log(M)}v[w]=x,x=[],m=null}for(const w in d)Object.hasOwnProperty.call(d,w)&&d[w];return{obj:i,paperSize:p,printer:m,printersMap:v}},bd=(e,t,n)=>{var i,a;const{kotStatus:r="KOT_GENERATED"}=n;try{let h="2INCH",f,o=[],l,c;const d=bt(e.orderTags,"EXPRESS","tag_type").content?"INSTANT - URGENT ORDER":null;if((i=e.customFeilds)!=null&&i.length){let p=bt(e.customFeilds,"INSTRUCTION","customType");p!=null&&p.customValue&&(c=[{customName:p.customName,customValue:p.customValue}])}for(let p=0;p<t.packagingSlipPrinters.length;p++)if(l=t.packagingSlipPrinters[p],l.label==e.subOrderFrom&&(f=ps=="Android OS"?l:l.value??void 0,h=l.paperSize?l.paperSize:h,l.paperSize)){let m,x,v,b,w,S={orderFrom:e.orderFrom,subOrderFrom:e.subOrderFrom,companyInfo:{companyName:t.companyName},tokenId:e.tokenId,orderId:e.orderId,customerInfo:{custName:e.name,custContact:e.mobile},paymentMethods:e.paymentMethods,newId:Math.random(),date:E().format("DD-MM-YYYY hh:mm a"),tableName:e.tableName,tableName:e.tableName,waiterName:e.waiterName,paymentStatus:e.paymentStatus??"UNPAID",aggregatorOrderId:e.externalOrderId,orderSource:e.orderSource,otp:e.otp,zomatoInstant:d},M={},P=!1,O,z=0;for(e.preparationTime&&(S.prepareBy=E().add(e.preparationTime,"minutes").format("DD-MM-YYYY hh:mm A")),c&&(S.customFields=c),v=0;v<e.orderList.length;v++)for(m=e.orderList[v],b=0;b<m.services.length;b++)x=m.services[b],x={...x,instruction:x.isUrgent&&x.instruction?`(URGENT -${x.instruction})`:x.instruction?`(${x.instruction})`:x.isUrgent?"(URGENT)":null},P=!1,x.status===r&&((a=l.stations)!=null&&a.length?(O=ld(l.stations),O[x.station]&&(P=!0)):P=!0),P&&x.kotId&&x.station&&(w=x.station.split("::")[1],z+=x.qty,M[`${w}/${x.kotId}`]?M[`${w}/${x.kotId}`].push(x):M[`${w}/${x.kotId}`]=[x]);Object.keys(M).length&&(S.services=M,S.totalQty=tt(z),o.push({printer:f,paperSize:h,obj:S}))}return{printers:o}}catch(h){console.log(h)}},Sd=(e,t,n={})=>{let r={};if(n.action==="SWITCH_TABLE")e.orderList.forEach(o=>{o.services.forEach(l=>{var c;if((l.status==="KOT_GENERATED"||l.status==="IN_PROCESS")&&l.station){let d=(c=l.station.split("::"))==null?void 0:c[1];d&&lr(d)&&(r[d]?r[d].activeKots[l.kotId]=l.kotId:r[d]={from:[n.from],to:[n.to],station:d,activeKots:{[l.kotId]:l.kotId},type:"UPDATE_TABLE",action:"SWITCH_TABLE",orderId:l.id})}})});else{let o,l,c,d,p={},m=[];for(l=0;l<n.sources.length;l++)for(o=n.sources[l],m.push(o.tableNo),c=0;c<o.ids.length;c++)d=o.ids[c],p[d]=d;for(let x=0;x<n.orderData.length;x++)o=n.orderData[x],p[o.id]&&o.orderList.forEach(v=>{v.services.forEach(b=>{var w;if((b.status==="KOT_GENERATED"||b.status==="IN_PROCESS")&&b.station){let S=(w=b.station.split("::"))==null?void 0:w[1];S&&lr(S)&&(r[S]?r[S].activeKots[b.kotId]=b.kotId:r[S]={from:m,to:[n.to],station:S,activeKots:{[b.kotId]:b.kotId},type:"UPDATE_TABLE",action:"MERGE_TABLE",orderId:b.id})}})})}let i="2INCH",a,h=[],f={};for(const o in r)if(Object.hasOwnProperty.call(r,o)){const l=r[o];try{t.printers&&t.printers.map(c=>{c.label.toUpperCase()==l.station.toUpperCase()&&(a=c.value?ps=="Android OS"?c:c.value:void 0,i=c.paperSize?c.paperSize:t.printerSize,h.push({printer:a,paperSize:i}))}),h.length==0&&h.push({printer:a,paperSize:t.printerSize||i})}catch(c){console.log(c)}f[o]=h,h=[],a=null}return{obj:r,paperSize:i,printersMap:f}},Td=(e,t)=>{var M,P;let{serviceTypeConfig:n,salesCollection:r,todayCollection:i,dailyExpanse:a,collectionDate:h,rangeDate:f}=t,o={},l;const c=!!bt(n,"dine-in","slugName").slugName;if(i!=null&&i.AGGREGATOR_PAYMENT){const{AGGREGATOR_PAYMENT:O,...z}=i;i={...z,swiggy:r.swiggy_collection??0,zomato:r.zomato_collection??0}}let d=c&&(n==null?void 0:n.length)&&n.some(O=>O.slugName==="online-menu")&&e.isAggregatorEnabled==!0,p=d?r.aggregator_collection:void 0,m=d?r.zomato_collection:void 0,x=d?r.swiggy_collection:void 0,v=c?Nd(r.avgTableTime):void 0;l={};let b=0;if(r!=null&&r.menuWiseSales){const O=r.menuWiseSales;for(const z in O)z.endsWith("collection")?l[ts(z)]=tt(O[z]):l[ts(z)]=O[z]}if(r.swiggy_aggregator&&(l.Swiggy=r.swiggy_aggregator,l.Swiggy_collection=r.swiggy_collection),r.zomato_aggregator&&(l.Zomato=r.zomato_aggregator,l.Zomato_collection=r.zomato_collection),r.itemTypeList&&((M=Object.keys(r.itemTypeList))!=null&&M.length))for(let O in r.itemTypeList)b+=r.itemTypeList[O];let w=h;return f.toDate!==f.fromDate&&(w=`${sr(f.fromDate)} - ${sr(f.toDate)}`),{salesCollection:c?{...r,totalCollection:tt(r.totalCollection),totalOrders:r.totalOrders,online_aggregator:r.aggregator,zomato_aggregator:r.zomato_aggregator,swiggy_aggregator:r.swiggy_aggregator,online_aggregator_collection:p,zomato_aggregator_collection:m,swiggy_aggregator_collection:x,itemTypes:o}:void 0,todayCollection:jd(i,e.paymentModes),totalCollection:tt(i.totalCollection),averageCollection:{avgTableTime:v,avgorderValue:vd(r.totalCollection,r.totalOrders).toFixed(2),todayExpense:a&&((P=a.DEBIT)!=null&&P.total)?tt(a.DEBIT.total):0,totalDiscountAmt:r&&r.totalDiscountAmt?tt(r.totalDiscountAmt):0,totalBalanceAmt:r&&r.totalBalanceAmt?tt(r.totalBalanceAmt):0,dailyExpanse:a,noOfGuest:r.noOfGuest,avgPerCover:r.avgPerCover,refundAmt:i.refundAmt,writeOffAmt:i.writeOffAmt,rewardAmt:r.rewardAmt},menusCollection:{...l},selectedDate:w,id:Math.random(),otherFields:{salesCollection:i.salesCollection?tt(i.salesCollection):0,outstandingAmt:i.outstandingAmt,totalDiscountAmt:r.totalDiscountAmt,discountList:r.discountList,totalOtherCharges:r.totalOtherCharges,otherChargesList:r.otherChargesList,totalTax:r.totalTax,taxList:r.taxList,totalItemType:b,itemTypeList:r.itemTypeList}}},wd=(e,t,n={})=>new Promise(async(r,i)=>{var d,p,m;const{invoiceFormat:a,userData:h}=n;let f,o,l=[],c;try{if((d=e.appliedDiscounts)!=null&&d.length){c=0;for(let q=0;q<e.appliedDiscounts.length;q++)f=e.appliedDiscounts[q],c+=f.discountAmt}const x=bt(e.orderTags,"EXPRESS","tag_type").content?"INSTANT - URGENT ORDER":null;if((p=e.customFeilds)!=null&&p.length){const q=bt(e.customFeilds,"INSTRUCTION","customType");q!=null&&q.customValue&&(l=[{customName:q.customName,customValue:q.customValue}])}f={};let v=(m=t==null?void 0:t.footerAddress)!=null&&m.addressLineOne?t==null?void 0:t.footerAddress.addressLineOne:"",b=t.footerAddress.addressLineTwo?t.footerAddress.addressLineTwo:"",w=t.footerAddress.city?t.footerAddress.city:"",S=t.footerAddress.zip?t.footerAddress.zip:"",M=(v!=""?v+",":"")+(b!=""?b+",":"")+(w!=""?w+",":"")+(S!=""?S+",":""),P=t.gstNo,O={companyName:t.companyName,companyAddress:M,companyContact:t.contactNumber,companyEmail:t.contactEmail},K={orderStatus:"COMPLETED",orderDate:e&&e.timestamp?E.unix(e.timestamp).format("DD-MM-YYYY hh:mm A"):null,orderNumber:e&&e.orderId?e.orderId:null,timestamp:e.timestamp},se={custName:e.name??null,custAddress:e.custAddress??null,custContact:e.mobile??null},Q=en(t.curr),ie={...e,companyInfo:O,orderInfo:K,customerInfo:se,gst:P,curr:Q},Ce=null,W=null;a.companyLogo&&(Ce=await zt(`https://${a.companyLogo.bucket}.s3.amazonaws.com/${a.companyLogo.key}`)),a.qrcode&&(W=await zt(`https://${a.qrcode.bucket}.s3.amazonaws.com/${a.qrcode.key}`)),e.orderList.filter(q=>{q.services.forEach(async(B,fe)=>{var nt,rt;let U="kitchen",Z=e.tableName?e.tableName:e.orderFrom;U&&(f[U]||(f[U]={},f[U].station=U,f[U].services=[],f[U].tableName=Z,f[U].customerName=e.name,f[U].time=E.unix(e.timestamp).format("DD-MM-YYYY hh:mm a"),f[U].type=e.orderFrom,f[U].orderId=e.orderId,f[U].instruction=e.instruction,f[U].totalQty=0,f[U].tokenId=e.tokenId,f[U].orderSource=e.orderSource,f[U].aggregatorOrderId=e.externalOrderId,f[U].otp=e.otp,f[U].paymentState=e.paymentState,f[U].discountAmt=c,f[U].otherCharges=e.otherCharges,f[U].taxAmt=e.taxAmt,f[U].customFeilds=l,f[U].curr=t.curr??"INR",f[U].zomatoInstant=x),f[U]?(o={serviceName:B.serviceName,qty:B.qty,instruction:B.isUrgent&&B.instruction?`(URGENT -${B.instruction})`:B.instruction?`(${B.instruction})`:B.isUrgent?"(URGENT)":"",subOrderId:q.subOrderId,isUrgent:B.isUrgent,index:fe},(nt=B.addons)!=null&&nt.length&&(o.addons=B.addons),f[U].services.push(o),f[U].totalQty+=B.qty):(f[U]=[],f[U].services.push({serviceName:B.serviceName,qty:B.qty,instruction:B.instruction?B.instruction:"",subOrderId:q.subOrderId,index:fe}),f[U].totalQty+=B.qty),f[U]={...f[U],companyInfo:O,orderInfo:K,customerInfo:se,gst:P,curr:Q},f[U].domain=a.siteURL,f[U].paymentMethods=a.paymentMode?ie.paymentMethods:null,f[U].companyInfo.companyName=a.companyName,f[U].companyInfo.companyEmail=a.email,f[U].companyInfo.companyAddress=a.address,f[U].companyInfo.companyContact=a.mobile,f[U].tokenId=a.token?ie.tokenId:null,a.isPayQR&&a.upiId&&a.upiId!==""&&(ie.upiId=a.upiId),f[U].gstNo=a.gst?ie.gst:null,f[U].footerMessage=a.footerMessage,f[U].orderFrom=(rt=e.subOrderFrom)==null?void 0:rt.toUpperCase(),f[U].fssai=t.fssai,f[U].vatNo=t.vatNo,f[U].printOperatorInfo=a.printOperatorInfo===null||a.printOperatorInfo===!0,f[U].disabledPoweredBy=t.disabledPoweredBy===!0,f[U].printTime=E().format("DD-MM-YYYY hh:mm A"),f[U].printedBy=h.userRole=="admin"?"Admin":h.name,e.deliveryTimestamp&&(f[U].deliveryTimestamp=E.unix(e.deliveryTimestamp).format("DD-MM-YYYY hh:mm A")),f[U].itemInstructionOnBill=a.itemInstructionOnBill,f[U]={...f[U],companyLogo:Ce,companyQrCode:W})})});for(const q in f)if(Object.hasOwnProperty.call(f,q)){const B=f[q];try{let fe=t.printerSize??"2inch";r(new Object({obj:new Object({...B,paperSize:fe}),orderList:e.orderList}));return}catch(fe){console.log(fe)}}}catch(x){console.log("err::",x)}}),Id=async e=>{let t=[];for(let d=0;d<e.length;d++)for(let p=0;p<e[d].orderList.length;p++)t.push(e[d].orderList[p]);let n=[];if(t.length>0)for(let d=0;d<t.length;d++)for(let p=0;p<t[d].services.length;p++)t[d].services[p].status!="CANCELLED"&&t[d].services[p].status!="RETURNED"&&t[d].services[p].status!="SHIFTED"&&n.push(t[d].services[p]);let r={},i=[];for(let d=0;d<n.length;d++)if(n[d].addons&&n[d].addons.length>0)for(let p=0;p<n[d].addons.length;p++){let m={...n[d].addons[p]};m.qty=n[d].qty,i.push(m)}n.forEach(d=>{let{attachedCat:p,serviceId:m}=d;r[p]||(r[p]=[]);let x=r[p].findIndex(v=>v.serviceId===m);x!==-1?r[p][x].qty=r[p][x].qty+d.qty:r[p].push({serviceName:d.serviceName,qty:d.qty,status:d.status,serviceId:d.serviceId,attachedCat:d.attachedCat,station:d.station})});const a=Object.keys(r).sort(),h={};a.forEach(d=>{h[d]=r[d]});for(let d in h)h[d].sort((p,m)=>p.serviceName.localeCompare(m.serviceName));let f={Category:h},o={};i.forEach(d=>{let{attachedAddonCat:p,serviceId:m}=d;o[p]||(o[p]=[]);let x=o[p].findIndex(v=>v.serviceId===m);x!==-1?o[p][x].qty=o[p][x].qty+d.qty:o[p].push({serviceName:d.serviceName,qty:d.qty,status:d.status,serviceId:d.serviceId,attachedCat:d.attachedAddonCat,station:d.station})});const l=Object.keys(o).sort(),c={};l.forEach(d=>{c[d]=o[d]});for(let d in c)c[d].sort((p,m)=>p.serviceName.localeCompare(m.serviceName));return f.Addon=c,f},Na={"Andaman and Nicobar Islands":"UTGST",Chandigarh:"UTGST","Dadra and Nagar Haveli and Daman and Diu":"UTGST","Jammu & Kashmir":"UTGST",Ladakh:"UTGST",Lakshadweep:"UTGST",Puducherry:"UTGST"},ja=e=>{let t=e&&e.footerAddress&&e.footerAddress.state&&e.footerAddress.state?e.footerAddress.state:null;return Na[t]?Na[t]:"SGST"},va=(e,t,n={})=>new Promise(async(r,i)=>{var h,f,o,l,c,d,p;try{const{invoiceFormat:m,custName:x,custMobile:v,custAddress:b,userData:w={}}=n,{itemList:S}=e;let M=w==null?void 0:w.userRole;if(w.userRole=="admin"?M="ADMIN":M=w==null?void 0:w.name,!(S!=null&&S.length))return;let P=t.printerSize,O=ir(null,{type:"BILL",siteSetting:t},{occupiedServer:n.occupiedServer});P=O?(h=O[0])!=null&&h.paperSize?(f=O[0])==null?void 0:f.paperSize:P||"2INCH":P;let z=t.footerAddress.addressLineOne?t.footerAddress.addressLineOne:"",K=t.footerAddress.addressLineTwo?t.footerAddress.addressLineTwo:"",se=t.footerAddress.city?t.footerAddress.city:"",Q=t.footerAddress.zip?t.footerAddress.zip:"",ie=(z!=""?z+",":"")+(K!=""?K+",":"")+(se!=""?se+",":"")+(Q!=""?Q+",":""),Ce=t.gstNo,W={companyName:t.companyName,companyAddress:ie,companyContact:t.contactNumber,companyEmail:t.contactEmail},B={orderStatus:"COMPLETED",orderDate:e&&e.timestamp?E.unix(e.timestamp).format("DD-MM-YYYY hh:mm A"):null,orderNumber:e&&e.orderId?e.orderId:null,timestamp:e.timestamp},fe={custName:m&&m.custName?x==t.companyName?null:x:null,custAddress:m&&m.custAddress&&b||null,custContact:m&&m.custMobile?v:null,custEmail:"ajaybaglane7@gmail.com"},U=en(t.curr),Z={...e,companyInfo:W,orderInfo:B,customerInfo:fe,gst:Ce,curr:U};if(m){if(Z.domain=m.siteURL,Z.paymentMethods=m.paymentMode?Z.paymentMethods:null,Z.companyInfo.companyName=m.companyName,Z.companyInfo.companyEmail=m.email,Z.companyInfo.companyAddress=m.address,Z.companyInfo.companyContact=m.mobile,Z.customerInfo.custName=m.custName?x:null,Z.tokenId=m.token?Z.tokenId:null,m.isPayQR&&m.upiId&&m.upiId!==""&&(Z.upiId=m.upiId),Z.gstNo=m.gst?Z.gst:null,Z.footerMessage=m.footerMessage,Z.orderFrom=(o=e.subOrderFrom)==null?void 0:o.toUpperCase(),Z.fssai=t.fssai,Z.vatNo=t.vatNo,Z.taxLabel=ja(t),Z.printOperatorInfo=m.printOperatorInfo===null||m.printOperatorInfo===!0,Z.disabledPoweredBy=t.disabledPoweredBy===!0,Z.printTime=E().format("DD-MM-YYYY hh:mm A"),e.deliveryTimestamp&&(Z.deliveryTimestamp=E.unix(e.deliveryTimestamp).format("DD-MM-YYYY hh:mm A")),Z.itemInstructionOnBill=m.itemInstructionOnBill,Z.printHSNCodeOnBill=m.printHSNCodeOnBill,Z.noOfInvoice=m.noOfInvoice,Z.printby=M,Z.newFormat=!0,!(m.itemInstructionOnBill||m.printHSNCodeOnBill)&&((l=Z.itemList)!=null&&l.length)){let J;for(let be=0;be<Z.itemList.length;be++)J=Z.itemList[be],J.instruction&&delete J.instruction,J.hsnCode&&delete J.hsnCode}t.enabledOutstandingOnPay&&((c=e.custoutStandingData)!=null&&c.balanceAmt)&&(Z.custoutStandingData={balanceAmt:e.custoutStandingData.balanceAmt});let nt=[];if((d=e.customFeilds)!=null&&d.length){let J;for(let be=0;be<e.customFeilds.length;be++)J=e.customFeilds[be],J!=null&&J.customValue&&((p=J.availability)!=null&&p.includes("BILL"))&&nt.push({customName:J.customName,customValue:J.customValue});Z.customFields=nt}let rt=null,Mt=null;m.companyLogo&&(rt=await zt(`https://${m.companyLogo.bucket}.s3.amazonaws.com/${m.companyLogo.key}`)),m.qrcode&&(Mt=await zt(`https://${m.qrcode.bucket}.s3.amazonaws.com/${m.qrcode.key}`));var a="Unknown OS";navigator.userAgent.indexOf("Win")!=-1&&(a="Windows OS"),navigator.userAgent.indexOf("Mac")!=-1&&(a="Macintosh"),navigator.userAgent.indexOf("Linux")!=-1&&(a="Linux OS"),navigator.userAgent.indexOf("Android")!=-1&&(a="Android OS"),navigator.userAgent.indexOf("like Mac")!=-1&&(a="iOS");let at={};(function(){let J,be,gt=0,g=0,u=0,I=0,j=0,C=0,F=0,T=0,R=[],$=[],pe=0,Ee;if(P==="A4"||P==="A5"){for(be=0;be<S.length;be++)J=S[be],g+=J.sub_total,u+=J.afterdiscAmt,I+=J.afterdiscAmt+(J.total_charges??0),gt+=J.afterdiscAmt+(J.total_charges??0),pe+=J.qty;let Pe=er(S,"discountName",{separateItemsDisc:!0});const Fe=nr(Pe);let{obj:Ae,sum:$e}=ar(S);at={itemList:rr(S,{itemInstructionOnBill:m.itemInstructionOnBill,printZeroPriceAddons:m.printZeroPriceAddons}),discounts:Fe,charges:tr(S,"name"),taxation:Ae,subTotal:_e(g),afterDisc:_e(u),afterCharges:_e(I),total:_e(gt+$e),qty:pe}}else{for(be=0;be<S.length;be++)J=S[be],J.taxType==="VAT"?($.push(J),T+=J.sub_total,C+=J.afterdiscAmt,j+=J.afterdiscAmt+(J.total_charges??0),F+=J.afterdiscAmt+(J.total_charges??0)):(R.push(J),g+=J.sub_total,u+=J.afterdiscAmt,I+=J.afterdiscAmt+(J.total_charges??0),gt+=J.afterdiscAmt+(J.total_charges??0));if(R.length){let Pe=er(R,"discountName",{separateItemsDisc:!0});const Fe=nr(Pe);let{obj:Ae,sum:$e}=ar(R);at.GST={itemList:rr(R,{itemInstructionOnBill:m.itemInstructionOnBill,printZeroPriceAddons:m.printZeroPriceAddons}),discounts:Fe,charges:tr(R,"name"),taxation:Ae,subTotal:_e(g),afterDisc:_e(u),afterCharges:_e(I),total:_e(gt+$e)}}if($.length){let Pe=er($,"discountName",{separateItemsDisc:!0});const Fe=nr(Pe);let{obj:Ae,sum:$e}=ar($);at.VAT={itemList:rr($,{itemInstructionOnBill:m.itemInstructionOnBill,printZeroPriceAddons:m.printZeroPriceAddons}),discounts:Fe,charges:tr($,"name"),taxation:Ae,subTotal:_e(T),afterDisc:_e(C),afterCharges:_e(j),total:_e(F+$e)}}}})(),Z.distributedData=at;let At={obj:Z,companyLogo:rt,companyQrCode:Mt,paperSize:t.printerSize,Name:a};r(At)}}catch(m){console.log("err",m),i(m)}}),Cd=(e,t,n={})=>new Promise(async(r,i)=>{var h,f,o,l,c;try{const{invoiceFormat:d,custName:p,custMobile:m,custAddress:x,orderData:v}=n;let b=t.footerAddress.addressLineOne?t.footerAddress.addressLineOne:"",w=t.footerAddress.addressLineTwo?t.footerAddress.addressLineTwo:"",S=t.footerAddress.city?t.footerAddress.city:"",M=t.footerAddress.zip?t.footerAddress.zip:"",P=(b!=""?b+",":"")+(w!=""?w+",":"")+(S!=""?S+",":"")+(M!=""?M+",":""),O=t.gstNo,z={companyName:t.companyName,companyAddress:P,companyContact:t.contactNumber,companyEmail:t.contactEmail},se={orderStatus:"COMPLETED",orderDate:v&&v.timestamp?E.unix(v.timestamp).format("DD-MM-YYYY hh:mm A"):null,orderNumber:v&&v.orderId?v.orderId:null,timestamp:v.timestamp},Q={custName:d&&d.custName?p==t.companyName?null:p:null,custAddress:d&&d.custAddress&&x||null,custContact:d&&d.custMobile?m:null,custEmail:"ajaybaglane7@gmail.com"},ie=en(t.curr),Ce="",W={...e,companyInfo:z,orderInfo:se,customerInfo:Q,gst:O,curr:ie};if(d){if(W.domain=d.siteURL,W.paymentMethods=d.paymentMode?W.paymentMethods:null,W.companyInfo.companyName=d.companyName,W.companyInfo.companyEmail=d.email,W.companyInfo.companyAddress=d.address,W.companyInfo.companyContact=d.mobile,W.customerInfo.custName=d.custName?p:null,W.tokenId=d.token?W.tokenId:null,d.isPayQR&&d.upiId&&d.upiId!==""&&(W.upiId=d.upiId),W.gstNo=d.gst?W.gst:null,W.footerMessage=d.footerMessage,W.orderFrom=(h=v.subOrderFrom)==null?void 0:h.toUpperCase(),W.fssai=t.fssai,W.vatNo=t.vatNo,W.taxLabel=ja(t),W.printOperatorInfo=d.printOperatorInfo===null||d.printOperatorInfo===!0,W.disabledPoweredBy=t.disabledPoweredBy===!0,W.printTime=E().format("DD-MM-YYYY hh:mm A"),v.deliveryTimestamp&&(W.deliveryTimestamp=E.unix(v.deliveryTimestamp).format("DD-MM-YYYY hh:mm A")),W.itemInstructionOnBill=d.itemInstructionOnBill,W.printHSNCodeOnBill=d.printHSNCodeOnBill,W.noOfInvoice=d.noOfInvoice,W.area=v.area,W.captainName=v.captainName,!(d.itemInstructionOnBill||d.printHSNCodeOnBill)&&((f=W.itemList)!=null&&f.length)){let B;for(let fe=0;fe<W.itemList.length;fe++)B=W.itemList[fe],B.instruction&&delete B.instruction,B.hsnCode&&delete B.hsnCode}t.enabledOutstandingOnPay&&((o=e.custoutStandingData)!=null&&o.balanceAmt)&&(W.custoutStandingData={balanceAmt:e.custoutStandingData.balanceAmt});let q=[];if((l=v.customFeilds)!=null&&l.length){let B;for(let fe=0;fe<v.customFeilds.length;fe++)B=v.customFeilds[fe],B!=null&&B.customValue&&((c=B.availability)!=null&&c.includes("BILL"))&&q.push({customName:B.customName,customValue:B.customValue});W.customFields=q}if(t&&t.isOld&&t.isOld==!0){let B=null,fe=null;d.companyLogo&&(B=await zt(`https://${d.companyLogo.bucket}.s3.amazonaws.com/${d.companyLogo.key}`)),d.qrcode&&(fe=await zt(`https://${d.qrcode.bucket}.s3.amazonaws.com/${d.qrcode.key}`));var a="Unknown OS";navigator.userAgent.indexOf("Win")!=-1&&(a="Windows OS"),navigator.userAgent.indexOf("Mac")!=-1&&(a="Macintosh"),navigator.userAgent.indexOf("Linux")!=-1&&(a="Linux OS"),navigator.userAgent.indexOf("Android")!=-1&&(a="Android OS"),navigator.userAgent.indexOf("like Mac")!=-1&&(a="iOS");let U={obj:W,companyLogo:B,companyQrCode:fe,paperSize:t.printerSize,Name:a};r(U)}}}catch(d){console.log("err",d)}}),Od=(e,t)=>new Promise(async(n,r)=>{var M;let i;(M=t.siteLogo)!=null&&M.key;let a=t.footerAddress.addressLineOne?t.footerAddress.addressLineOne:"",h=t.footerAddress.addressLineTwo?t.footerAddress.addressLineTwo:"",f=t.footerAddress.city?t.footerAddress.city:"",o=t.footerAddress.zip?t.footerAddress.zip:"",l=(a!=""?a+",":"")+(h!=""?h+",":"")+(f!=""?f+",":"")+(o!=""?o+",":""),c=[],d,p=0,m=0,x=0,v=[],b,w;const S=ms(t.paymentModes??defaultPaymentModes,"internalName");for(let P=0;P<e.length;P++)for(d=e[P],c.push({date:d.date,orderId:d.orderId,finalAmount:d.finalAmount}),p+=d.finalAmount,m+=d.paidAmt,x+=d.balanceAmt,b=0;b<d.orderTransactions.length;b++)w=d.orderTransactions[b],w.paidAmt&&v.push({date:E.unix(w.createdAt).format("DD-MM-YYYY"),paymentMode:S[w.paymentMode].displayName,amount:_e(w.paidAmt)});n({logo:i,companyAddress:l,companyName:t.companyName,companyContact:t.contactNumber,gst:t.gstNo,vatNo:t.vatNo,fssai:t.fssai,orders:c,totalAmount:p,totalPaid:m,totalPayable:x,paperSize:t.printerSize,curr:en(t.curr),transactions:v})}),Md=e=>new Promise(async(t,n)=>{let r={...e};r.orderObj=JSON.parse(e.orderObj),r.settingData=JSON.parse(e.settingData),r.invoiceFormat=JSON.parse(e.invoiceFormat),r.orderData=JSON.parse(e.orderObj);let i;r.newFormat?i=await va({...r.orderObj,itemList:r.orderObj.orderList},r.settingData,{invoiceFormat:r.invoiceFormat,custName:r.orderObj.custName,custMobile:r.orderObj.custMob,custAddress:r.orderObj.custAddress}):i=await Cd(r.orderObj,r.settingData,{invoiceFormat:r.invoiceFormat,custName:r.orderObj.custName,custMobile:r.orderObj.custMob,custAddress:r.orderObj.custAddress,orderData:r.orderData}),t(i)}),_a=e=>{let t=new Array;for(const n in e)if(Object.hasOwnProperty.call(e,n)){const r=`${n}::${e[n].orderId}::${Math.random()}`,i=e[n];i.newId=r,t.push(i)}return t},lr=e=>{var i,a;let t=localStorage.getItem("stationList"),n=JSON.parse(t),r=n.findIndex(h=>h.typeValue=="station::"+e);return((i=n[r])==null?void 0:i.printKot)==null?!0:(a=n[r])==null?void 0:a.printKot};function Ad(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}const Ed=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function St(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let Gt=null;function ba(e={}){return Gt||(e.includeStyleProperties?(Gt=e.includeStyleProperties,Gt):(Gt=St(window.getComputedStyle(document.documentElement)),Gt))}function nn(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function Rd(e){const t=nn(e,"border-left-width"),n=nn(e,"border-right-width");return e.clientWidth+t+n}function kd(e){const t=nn(e,"border-top-width"),n=nn(e,"border-bottom-width");return e.clientHeight+t+n}function Sa(e,t={}){const n=t.width||Rd(e),r=t.height||kd(e);return{width:n,height:r}}function Ld(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const Ue=16384;function Pd(e){(e.width>Ue||e.height>Ue)&&(e.width>Ue&&e.height>Ue?e.width>e.height?(e.height*=Ue/e.width,e.width=Ue):(e.width*=Ue/e.height,e.height=Ue):e.width>Ue?(e.height*=Ue/e.width,e.width=Ue):(e.width*=Ue/e.height,e.height=Ue))}function rn(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function Fd(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Dd(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),a=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(e),Fd(i)}const Le=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||Le(n,t)};function Yd(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Ud(e,t){return ba(t).map(n=>{const r=e.getPropertyValue(n),i=e.getPropertyPriority(n);return`${n}: ${r}${i?" !important":""};`}).join(" ")}function $d(e,t,n,r){const i=`.${e}:${t}`,a=n.cssText?Yd(n):Ud(n,r);return document.createTextNode(`${i}{${a}}`)}function Ta(e,t,n,r){const i=window.getComputedStyle(e,n),a=i.getPropertyValue("content");if(a===""||a==="none")return;const h=Ed();try{t.className=`${t.className} ${h}`}catch{return}const f=document.createElement("style");f.appendChild($d(h,n,i,r)),t.appendChild(f)}function Hd(e,t,n){Ta(e,t,":before",n),Ta(e,t,":after",n)}const wa="application/font-woff",Ia="image/jpeg",Bd={woff:wa,woff2:wa,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ia,jpeg:Ia,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Wd(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function or(e){const t=Wd(e).toLowerCase();return Bd[t]||""}function zd(e){return e.split(/,/)[1]}function cr(e){return e.search(/^(data:)/)!==-1}function Gd(e,t){return`data:${t};base64,${e}`}async function Ca(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise((a,h)=>{const f=new FileReader;f.onerror=h,f.onloadend=()=>{try{a(n({res:r,result:f.result}))}catch(o){h(o)}},f.readAsDataURL(i)})}const dr={};function Vd(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function hr(e,t,n){const r=Vd(e,t,n.includeQueryParams);if(dr[r]!=null)return dr[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const a=await Ca(e,n.fetchRequestInit,({res:h,result:f})=>(t||(t=h.headers.get("Content-Type")||""),zd(f)));i=Gd(a,t)}catch(a){i=n.imagePlaceholder||"";let h=`Failed to fetch resource: ${e}`;a&&(h=typeof a=="string"?a:a.message),h&&console.warn(h)}return dr[r]=i,i}async function qd(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):rn(t)}async function Kd(e,t){if(e.currentSrc){const a=document.createElement("canvas"),h=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,h==null||h.drawImage(e,0,0,a.width,a.height);const f=a.toDataURL();return rn(f)}const n=e.poster,r=or(n),i=await hr(n,r,t);return rn(i)}async function Qd(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await an(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Zd(e,t){return Le(e,HTMLCanvasElement)?qd(e):Le(e,HTMLVideoElement)?Kd(e,t):Le(e,HTMLIFrameElement)?Qd(e,t):e.cloneNode(Oa(e))}const Jd=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Oa=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Xd(e,t,n){var r,i;if(Oa(t))return t;let a=[];return Jd(e)&&e.assignedNodes?a=St(e.assignedNodes()):Le(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?a=St(e.contentDocument.body.childNodes):a=St(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),a.length===0||Le(e,HTMLVideoElement)||await a.reduce((h,f)=>h.then(()=>an(f,n)).then(o=>{o&&t.appendChild(o)}),Promise.resolve()),t}function eh(e,t,n){const r=t.style;if(!r)return;const i=window.getComputedStyle(e);i.cssText?(r.cssText=i.cssText,r.transformOrigin=i.transformOrigin):ba(n).forEach(a=>{let h=i.getPropertyValue(a);a==="font-size"&&h.endsWith("px")&&(h=`${Math.floor(parseFloat(h.substring(0,h.length-2)))-.1}px`),Le(e,HTMLIFrameElement)&&a==="display"&&h==="inline"&&(h="block"),a==="d"&&t.getAttribute("d")&&(h=`path(${t.getAttribute("d")})`),r.setProperty(a,h,i.getPropertyPriority(a))})}function th(e,t){Le(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),Le(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function sh(e,t){if(Le(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function nh(e,t,n){return Le(t,Element)&&(eh(e,t,n),Hd(e,t,n),th(e,t),sh(e,t)),t}async function rh(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let a=0;a<n.length;a++){const f=n[a].getAttribute("xlink:href");if(f){const o=e.querySelector(f),l=document.querySelector(f);!o&&l&&!r[f]&&(r[f]=await an(l,t,!0))}}const i=Object.values(r);if(i.length){const a="http://www.w3.org/1999/xhtml",h=document.createElementNS(a,"svg");h.setAttribute("xmlns",a),h.style.position="absolute",h.style.width="0",h.style.height="0",h.style.overflow="hidden",h.style.display="none";const f=document.createElementNS(a,"defs");h.appendChild(f);for(let o=0;o<i.length;o++)f.appendChild(i[o]);e.appendChild(h)}return e}async function an(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>Zd(r,t)).then(r=>Xd(e,r,t)).then(r=>nh(e,r,t)).then(r=>rh(r,t))}const Ma=/url\((['"]?)([^'"]+?)\1\)/g,ah=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,ih=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function lh(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function oh(e){const t=[];return e.replace(Ma,(n,r,i)=>(t.push(i),n)),t.filter(n=>!cr(n))}async function ch(e,t,n,r,i){try{const a=n?Ad(t,n):t,h=or(t);let f;return i||(f=await hr(a,h,r)),e.replace(lh(t),`$1${f}$3`)}catch{}return e}function dh(e,{preferredFontFormat:t}){return t?e.replace(ih,n=>{for(;;){const[r,,i]=ah.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function Aa(e){return e.search(Ma)!==-1}async function Ea(e,t,n){if(!Aa(e))return e;const r=dh(e,n);return oh(r).reduce((a,h)=>a.then(f=>ch(f,h,t,n)),Promise.resolve(r))}async function Vt(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const a=await Ea(i,null,n);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function hh(e,t){await Vt("background",e,t)||await Vt("background-image",e,t),await Vt("mask",e,t)||await Vt("-webkit-mask",e,t)||await Vt("mask-image",e,t)||await Vt("-webkit-mask-image",e,t)}async function uh(e,t){const n=Le(e,HTMLImageElement);if(!(n&&!cr(e.src))&&!(Le(e,SVGImageElement)&&!cr(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await hr(r,or(r),t);await new Promise((a,h)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...o)=>{try{a(t.onImageErrorHandler(...o))}catch(l){h(l)}}:h;const f=e;f.decode&&(f.decode=a),f.loading==="lazy"&&(f.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i})}async function mh(e,t){const r=St(e.childNodes).map(i=>Ra(i,t));await Promise.all(r).then(()=>e)}async function Ra(e,t){Le(e,Element)&&(await hh(e,t),await uh(e,t),await mh(e,t))}function fh(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(i=>{n[i]=r[i]}),e}const ka={};async function La(e){let t=ka[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},ka[e]=t,t}async function Pa(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,a=(n.match(/url\([^)]+\)/g)||[]).map(async h=>{let f=h.replace(r,"$1");return f.startsWith("https://")||(f=new URL(f,e.url).href),Ca(f,t.fetchRequestInit,({result:o})=>(n=n.replace(h,`url(${o})`),[h,o]))});return Promise.all(a).then(()=>n)}function Fa(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const o=i.exec(r);if(o===null)break;t.push(o[0])}r=r.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,h="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",f=new RegExp(h,"gi");for(;;){let o=a.exec(r);if(o===null){if(o=f.exec(r),o===null)break;a.lastIndex=f.lastIndex}else f.lastIndex=a.lastIndex;t.push(o[0])}return t}async function ph(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{St(i.cssRules||[]).forEach((a,h)=>{if(a.type===CSSRule.IMPORT_RULE){let f=h+1;const o=a.href,l=La(o).then(c=>Pa(c,t)).then(c=>Fa(c).forEach(d=>{try{i.insertRule(d,d.startsWith("@import")?f+=1:i.cssRules.length)}catch(p){console.error("Error inserting rule from remote css",{rule:d,error:p})}})).catch(c=>{console.error("Error loading remote css",c.toString())});r.push(l)}})}catch(a){const h=e.find(f=>f.href==null)||document.styleSheets[0];i.href!=null&&r.push(La(i.href).then(f=>Pa(f,t)).then(f=>Fa(f).forEach(o=>{h.insertRule(o,h.cssRules.length)})).catch(f=>{console.error("Error loading remote stylesheet",f)})),console.error("Error inlining remote css file",a)}}),Promise.all(r).then(()=>(e.forEach(i=>{if("cssRules"in i)try{St(i.cssRules||[]).forEach(a=>{n.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),n))}function yh(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Aa(t.style.getPropertyValue("src")))}async function gh(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=St(e.ownerDocument.styleSheets),r=await ph(n,t);return yh(r)}function Da(e){return e.trim().replace(/["']/g,"")}function xh(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(a=>{t.add(Da(a))}),Array.from(r.children).forEach(a=>{a instanceof HTMLElement&&n(a)})}return n(e),t}async function Nh(e,t){const n=await gh(e,t),r=xh(e);return(await Promise.all(n.filter(a=>r.has(Da(a.style.fontFamily))).map(a=>{const h=a.parentStyleSheet?a.parentStyleSheet.href:null;return Ea(a.cssText,h,t)}))).join(`
46
46
  `)}async function jh(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Nh(e,t);if(n){const r=document.createElement("style"),i=document.createTextNode(n);r.appendChild(i),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function Ya(e,t={}){const{width:n,height:r}=Sa(e,t),i=await an(e,t,!0);return await jh(i,t),await Ra(i,t),fh(i,t),await Dd(i,n,r)}async function vh(e,t={}){const{width:n,height:r}=Sa(e,t),i=await Ya(e,t),a=await rn(i),h=document.createElement("canvas"),f=h.getContext("2d"),o=t.pixelRatio||Ld(),l=t.canvasWidth||n,c=t.canvasHeight||r;return h.width=l*o,h.height=c*o,t.skipAutoScale||Pd(h),h.style.width=`${l}`,h.style.height=`${c}`,t.backgroundColor&&(f.fillStyle=t.backgroundColor,f.fillRect(0,0,h.width,h.height)),f.drawImage(a,0,0,h.width,h.height),h}async function _h(e,t={}){return(await vh(e,t)).toDataURL("image/jpeg",t.quality||1)}var bh=Object.defineProperty,ln=Object.getOwnPropertySymbols,Ua=Object.prototype.hasOwnProperty,$a=Object.prototype.propertyIsEnumerable,Ha=(e,t,n)=>t in e?bh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ys=(e,t)=>{for(var n in t||(t={}))Ua.call(t,n)&&Ha(e,n,t[n]);if(ln)for(var n of ln(t))$a.call(t,n)&&Ha(e,n,t[n]);return e},ur=(e,t)=>{var n={};for(var r in e)Ua.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ln)for(var r of ln(e))t.indexOf(r)<0&&$a.call(e,r)&&(n[r]=e[r]);return n};/**
47
47
  * @license QR Code generator library (TypeScript)
48
48
  * Copyright (c) Project Nayuki.
49
49
  * SPDX-License-Identifier: MIT
50
- */var Ot;(e=>{const t=class{constructor(o,l,c,d){if(this.version=o,this.errorCorrectionLevel=l,this.modules=[],this.isFunction=[],o<t.MIN_VERSION||o>t.MAX_VERSION)throw new RangeError("Version value out of range");if(d<-1||d>7)throw new RangeError("Mask value out of range");this.size=o*4+17;let m=[];for(let x=0;x<this.size;x++)m.push(!1);for(let x=0;x<this.size;x++)this.modules.push(m.slice()),this.isFunction.push(m.slice());this.drawFunctionPatterns();const p=this.addEccAndInterleave(c);if(this.drawCodewords(p),d==-1){let x=1e9;for(let v=0;v<8;v++){this.applyMask(v),this.drawFormatBits(v);const _=this.getPenaltyScore();_<x&&(d=v,x=_),this.applyMask(v)}}a(0<=d&&d<=7),this.mask=d,this.applyMask(d),this.drawFormatBits(d),this.isFunction=[]}static encodeText(o,l){const c=e.QrSegment.makeSegments(o);return t.encodeSegments(c,l)}static encodeBinary(o,l){const c=e.QrSegment.makeBytes(o);return t.encodeSegments([c],l)}static encodeSegments(o,l,c=1,d=40,m=-1,p=!0){if(!(t.MIN_VERSION<=c&&c<=d&&d<=t.MAX_VERSION)||m<-1||m>7)throw new RangeError("Invalid value");let x,v;for(x=c;;x++){const O=t.getNumDataCodewords(x,l)*8,F=f.getTotalBits(o,x);if(F<=O){v=F;break}if(x>=d)throw new RangeError("Data too long")}for(const O of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])p&&v<=t.getNumDataCodewords(x,O)*8&&(l=O);let _=[];for(const O of o){r(O.mode.modeBits,4,_),r(O.numChars,O.mode.numCharCountBits(x),_);for(const F of O.getData())_.push(F)}a(_.length==v);const w=t.getNumDataCodewords(x,l)*8;a(_.length<=w),r(0,Math.min(4,w-_.length),_),r(0,(8-_.length%8)%8,_),a(_.length%8==0);for(let O=236;_.length<w;O^=253)r(O,8,_);let T=[];for(;T.length*8<_.length;)T.push(0);return _.forEach((O,F)=>T[F>>>3]|=O<<7-(F&7)),new t(x,l,T,m)}getModule(o,l){return 0<=o&&o<this.size&&0<=l&&l<this.size&&this.modules[l][o]}getModules(){return this.modules}drawFunctionPatterns(){for(let c=0;c<this.size;c++)this.setFunctionModule(6,c,c%2==0),this.setFunctionModule(c,6,c%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const o=this.getAlignmentPatternPositions(),l=o.length;for(let c=0;c<l;c++)for(let d=0;d<l;d++)c==0&&d==0||c==0&&d==l-1||c==l-1&&d==0||this.drawAlignmentPattern(o[c],o[d]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(o){const l=this.errorCorrectionLevel.formatBits<<3|o;let c=l;for(let m=0;m<10;m++)c=c<<1^(c>>>9)*1335;const d=(l<<10|c)^21522;a(d>>>15==0);for(let m=0;m<=5;m++)this.setFunctionModule(8,m,i(d,m));this.setFunctionModule(8,7,i(d,6)),this.setFunctionModule(8,8,i(d,7)),this.setFunctionModule(7,8,i(d,8));for(let m=9;m<15;m++)this.setFunctionModule(14-m,8,i(d,m));for(let m=0;m<8;m++)this.setFunctionModule(this.size-1-m,8,i(d,m));for(let m=8;m<15;m++)this.setFunctionModule(8,this.size-15+m,i(d,m));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let o=this.version;for(let c=0;c<12;c++)o=o<<1^(o>>>11)*7973;const l=this.version<<12|o;a(l>>>18==0);for(let c=0;c<18;c++){const d=i(l,c),m=this.size-11+c%3,p=Math.floor(c/3);this.setFunctionModule(m,p,d),this.setFunctionModule(p,m,d)}}drawFinderPattern(o,l){for(let c=-4;c<=4;c++)for(let d=-4;d<=4;d++){const m=Math.max(Math.abs(d),Math.abs(c)),p=o+d,x=l+c;0<=p&&p<this.size&&0<=x&&x<this.size&&this.setFunctionModule(p,x,m!=2&&m!=4)}}drawAlignmentPattern(o,l){for(let c=-2;c<=2;c++)for(let d=-2;d<=2;d++)this.setFunctionModule(o+d,l+c,Math.max(Math.abs(d),Math.abs(c))!=1)}setFunctionModule(o,l,c){this.modules[l][o]=c,this.isFunction[l][o]=!0}addEccAndInterleave(o){const l=this.version,c=this.errorCorrectionLevel;if(o.length!=t.getNumDataCodewords(l,c))throw new RangeError("Invalid argument");const d=t.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][l],m=t.ECC_CODEWORDS_PER_BLOCK[c.ordinal][l],p=Math.floor(t.getNumRawDataModules(l)/8),x=d-p%d,v=Math.floor(p/d);let _=[];const w=t.reedSolomonComputeDivisor(m);for(let O=0,F=0;O<d;O++){let M=o.slice(F,F+v-m+(O<x?0:1));F+=M.length;const z=t.reedSolomonComputeRemainder(M,w);O<x&&M.push(0),_.push(M.concat(z))}let T=[];for(let O=0;O<_[0].length;O++)_.forEach((F,M)=>{(O!=v-m||M>=x)&&T.push(F[O])});return a(T.length==p),T}drawCodewords(o){if(o.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let l=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let d=0;d<this.size;d++)for(let m=0;m<2;m++){const p=c-m,v=(c+1&2)==0?this.size-1-d:d;!this.isFunction[v][p]&&l<o.length*8&&(this.modules[v][p]=i(o[l>>>3],7-(l&7)),l++)}}a(l==o.length*8)}applyMask(o){if(o<0||o>7)throw new RangeError("Mask value out of range");for(let l=0;l<this.size;l++)for(let c=0;c<this.size;c++){let d;switch(o){case 0:d=(c+l)%2==0;break;case 1:d=l%2==0;break;case 2:d=c%3==0;break;case 3:d=(c+l)%3==0;break;case 4:d=(Math.floor(c/3)+Math.floor(l/2))%2==0;break;case 5:d=c*l%2+c*l%3==0;break;case 6:d=(c*l%2+c*l%3)%2==0;break;case 7:d=((c+l)%2+c*l%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[l][c]&&d&&(this.modules[l][c]=!this.modules[l][c])}}getPenaltyScore(){let o=0;for(let m=0;m<this.size;m++){let p=!1,x=0,v=[0,0,0,0,0,0,0];for(let _=0;_<this.size;_++)this.modules[m][_]==p?(x++,x==5?o+=t.PENALTY_N1:x>5&&o++):(this.finderPenaltyAddHistory(x,v),p||(o+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),p=this.modules[m][_],x=1);o+=this.finderPenaltyTerminateAndCount(p,x,v)*t.PENALTY_N3}for(let m=0;m<this.size;m++){let p=!1,x=0,v=[0,0,0,0,0,0,0];for(let _=0;_<this.size;_++)this.modules[_][m]==p?(x++,x==5?o+=t.PENALTY_N1:x>5&&o++):(this.finderPenaltyAddHistory(x,v),p||(o+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),p=this.modules[_][m],x=1);o+=this.finderPenaltyTerminateAndCount(p,x,v)*t.PENALTY_N3}for(let m=0;m<this.size-1;m++)for(let p=0;p<this.size-1;p++){const x=this.modules[m][p];x==this.modules[m][p+1]&&x==this.modules[m+1][p]&&x==this.modules[m+1][p+1]&&(o+=t.PENALTY_N2)}let l=0;for(const m of this.modules)l=m.reduce((p,x)=>p+(x?1:0),l);const c=this.size*this.size,d=Math.ceil(Math.abs(l*20-c*10)/c)-1;return a(0<=d&&d<=9),o+=d*t.PENALTY_N4,a(0<=o&&o<=2568888),o}getAlignmentPatternPositions(){if(this.version==1)return[];{const o=Math.floor(this.version/7)+2,l=this.version==32?26:Math.ceil((this.version*4+4)/(o*2-2))*2;let c=[6];for(let d=this.size-7;c.length<o;d-=l)c.splice(1,0,d);return c}}static getNumRawDataModules(o){if(o<t.MIN_VERSION||o>t.MAX_VERSION)throw new RangeError("Version number out of range");let l=(16*o+128)*o+64;if(o>=2){const c=Math.floor(o/7)+2;l-=(25*c-10)*c-55,o>=7&&(l-=36)}return a(208<=l&&l<=29648),l}static getNumDataCodewords(o,l){return Math.floor(t.getNumRawDataModules(o)/8)-t.ECC_CODEWORDS_PER_BLOCK[l.ordinal][o]*t.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][o]}static reedSolomonComputeDivisor(o){if(o<1||o>255)throw new RangeError("Degree out of range");let l=[];for(let d=0;d<o-1;d++)l.push(0);l.push(1);let c=1;for(let d=0;d<o;d++){for(let m=0;m<l.length;m++)l[m]=t.reedSolomonMultiply(l[m],c),m+1<l.length&&(l[m]^=l[m+1]);c=t.reedSolomonMultiply(c,2)}return l}static reedSolomonComputeRemainder(o,l){let c=l.map(d=>0);for(const d of o){const m=d^c.shift();c.push(0),l.forEach((p,x)=>c[x]^=t.reedSolomonMultiply(p,m))}return c}static reedSolomonMultiply(o,l){if(o>>>8||l>>>8)throw new RangeError("Byte out of range");let c=0;for(let d=7;d>=0;d--)c=c<<1^(c>>>7)*285,c^=(l>>>d&1)*o;return a(c>>>8==0),c}finderPenaltyCountPatterns(o){const l=o[1];a(l<=this.size*3);const c=l>0&&o[2]==l&&o[3]==l*3&&o[4]==l&&o[5]==l;return(c&&o[0]>=l*4&&o[6]>=l?1:0)+(c&&o[6]>=l*4&&o[0]>=l?1:0)}finderPenaltyTerminateAndCount(o,l,c){return o&&(this.finderPenaltyAddHistory(l,c),l=0),l+=this.size,this.finderPenaltyAddHistory(l,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(o,l){l[0]==0&&(o+=this.size),l.pop(),l.unshift(o)}};let n=t;n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;function r(o,l,c){if(l<0||l>31||o>>>l)throw new RangeError("Value out of range");for(let d=l-1;d>=0;d--)c.push(o>>>d&1)}function i(o,l){return(o>>>l&1)!=0}function a(o){if(!o)throw new Error("Assertion error")}const h=class{constructor(o,l,c){if(this.mode=o,this.numChars=l,this.bitData=c,l<0)throw new RangeError("Invalid argument");this.bitData=c.slice()}static makeBytes(o){let l=[];for(const c of o)r(c,8,l);return new h(h.Mode.BYTE,o.length,l)}static makeNumeric(o){if(!h.isNumeric(o))throw new RangeError("String contains non-numeric characters");let l=[];for(let c=0;c<o.length;){const d=Math.min(o.length-c,3);r(parseInt(o.substr(c,d),10),d*3+1,l),c+=d}return new h(h.Mode.NUMERIC,o.length,l)}static makeAlphanumeric(o){if(!h.isAlphanumeric(o))throw new RangeError("String contains unencodable characters in alphanumeric mode");let l=[],c;for(c=0;c+2<=o.length;c+=2){let d=h.ALPHANUMERIC_CHARSET.indexOf(o.charAt(c))*45;d+=h.ALPHANUMERIC_CHARSET.indexOf(o.charAt(c+1)),r(d,11,l)}return c<o.length&&r(h.ALPHANUMERIC_CHARSET.indexOf(o.charAt(c)),6,l),new h(h.Mode.ALPHANUMERIC,o.length,l)}static makeSegments(o){return o==""?[]:h.isNumeric(o)?[h.makeNumeric(o)]:h.isAlphanumeric(o)?[h.makeAlphanumeric(o)]:[h.makeBytes(h.toUtf8ByteArray(o))]}static makeEci(o){let l=[];if(o<0)throw new RangeError("ECI assignment value out of range");if(o<128)r(o,8,l);else if(o<16384)r(2,2,l),r(o,14,l);else if(o<1e6)r(6,3,l),r(o,21,l);else throw new RangeError("ECI assignment value out of range");return new h(h.Mode.ECI,0,l)}static isNumeric(o){return h.NUMERIC_REGEX.test(o)}static isAlphanumeric(o){return h.ALPHANUMERIC_REGEX.test(o)}getData(){return this.bitData.slice()}static getTotalBits(o,l){let c=0;for(const d of o){const m=d.mode.numCharCountBits(l);if(d.numChars>=1<<m)return 1/0;c+=4+m+d.bitData.length}return c}static toUtf8ByteArray(o){o=encodeURI(o);let l=[];for(let c=0;c<o.length;c++)o.charAt(c)!="%"?l.push(o.charCodeAt(c)):(l.push(parseInt(o.substr(c+1,2),16)),c+=2);return l}};let f=h;f.NUMERIC_REGEX=/^[0-9]*$/,f.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,f.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=f})(Ot||(Ot={})),(e=>{(t=>{const n=class{constructor(i,a){this.ordinal=i,this.formatBits=a}};let r=n;r.LOW=new n(0,1),r.MEDIUM=new n(1,0),r.QUARTILE=new n(2,3),r.HIGH=new n(3,2),t.Ecc=r})(e.QrCode||(e.QrCode={}))})(Ot||(Ot={})),(e=>{(t=>{const n=class{constructor(i,a){this.modeBits=i,this.numBitsCharCount=a}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};let r=n;r.NUMERIC=new n(1,[10,12,14]),r.ALPHANUMERIC=new n(2,[9,11,13]),r.BYTE=new n(4,[8,16,16]),r.KANJI=new n(8,[8,10,12]),r.ECI=new n(7,[0,0,0]),t.Mode=r})(e.QrSegment||(e.QrSegment={}))})(Ot||(Ot={}));var qt=Ot;/**
50
+ */var Ot;(e=>{const t=class{constructor(o,l,c,d){if(this.version=o,this.errorCorrectionLevel=l,this.modules=[],this.isFunction=[],o<t.MIN_VERSION||o>t.MAX_VERSION)throw new RangeError("Version value out of range");if(d<-1||d>7)throw new RangeError("Mask value out of range");this.size=o*4+17;let p=[];for(let x=0;x<this.size;x++)p.push(!1);for(let x=0;x<this.size;x++)this.modules.push(p.slice()),this.isFunction.push(p.slice());this.drawFunctionPatterns();const m=this.addEccAndInterleave(c);if(this.drawCodewords(m),d==-1){let x=1e9;for(let v=0;v<8;v++){this.applyMask(v),this.drawFormatBits(v);const b=this.getPenaltyScore();b<x&&(d=v,x=b),this.applyMask(v)}}a(0<=d&&d<=7),this.mask=d,this.applyMask(d),this.drawFormatBits(d),this.isFunction=[]}static encodeText(o,l){const c=e.QrSegment.makeSegments(o);return t.encodeSegments(c,l)}static encodeBinary(o,l){const c=e.QrSegment.makeBytes(o);return t.encodeSegments([c],l)}static encodeSegments(o,l,c=1,d=40,p=-1,m=!0){if(!(t.MIN_VERSION<=c&&c<=d&&d<=t.MAX_VERSION)||p<-1||p>7)throw new RangeError("Invalid value");let x,v;for(x=c;;x++){const M=t.getNumDataCodewords(x,l)*8,P=f.getTotalBits(o,x);if(P<=M){v=P;break}if(x>=d)throw new RangeError("Data too long")}for(const M of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])m&&v<=t.getNumDataCodewords(x,M)*8&&(l=M);let b=[];for(const M of o){r(M.mode.modeBits,4,b),r(M.numChars,M.mode.numCharCountBits(x),b);for(const P of M.getData())b.push(P)}a(b.length==v);const w=t.getNumDataCodewords(x,l)*8;a(b.length<=w),r(0,Math.min(4,w-b.length),b),r(0,(8-b.length%8)%8,b),a(b.length%8==0);for(let M=236;b.length<w;M^=253)r(M,8,b);let S=[];for(;S.length*8<b.length;)S.push(0);return b.forEach((M,P)=>S[P>>>3]|=M<<7-(P&7)),new t(x,l,S,p)}getModule(o,l){return 0<=o&&o<this.size&&0<=l&&l<this.size&&this.modules[l][o]}getModules(){return this.modules}drawFunctionPatterns(){for(let c=0;c<this.size;c++)this.setFunctionModule(6,c,c%2==0),this.setFunctionModule(c,6,c%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const o=this.getAlignmentPatternPositions(),l=o.length;for(let c=0;c<l;c++)for(let d=0;d<l;d++)c==0&&d==0||c==0&&d==l-1||c==l-1&&d==0||this.drawAlignmentPattern(o[c],o[d]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(o){const l=this.errorCorrectionLevel.formatBits<<3|o;let c=l;for(let p=0;p<10;p++)c=c<<1^(c>>>9)*1335;const d=(l<<10|c)^21522;a(d>>>15==0);for(let p=0;p<=5;p++)this.setFunctionModule(8,p,i(d,p));this.setFunctionModule(8,7,i(d,6)),this.setFunctionModule(8,8,i(d,7)),this.setFunctionModule(7,8,i(d,8));for(let p=9;p<15;p++)this.setFunctionModule(14-p,8,i(d,p));for(let p=0;p<8;p++)this.setFunctionModule(this.size-1-p,8,i(d,p));for(let p=8;p<15;p++)this.setFunctionModule(8,this.size-15+p,i(d,p));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let o=this.version;for(let c=0;c<12;c++)o=o<<1^(o>>>11)*7973;const l=this.version<<12|o;a(l>>>18==0);for(let c=0;c<18;c++){const d=i(l,c),p=this.size-11+c%3,m=Math.floor(c/3);this.setFunctionModule(p,m,d),this.setFunctionModule(m,p,d)}}drawFinderPattern(o,l){for(let c=-4;c<=4;c++)for(let d=-4;d<=4;d++){const p=Math.max(Math.abs(d),Math.abs(c)),m=o+d,x=l+c;0<=m&&m<this.size&&0<=x&&x<this.size&&this.setFunctionModule(m,x,p!=2&&p!=4)}}drawAlignmentPattern(o,l){for(let c=-2;c<=2;c++)for(let d=-2;d<=2;d++)this.setFunctionModule(o+d,l+c,Math.max(Math.abs(d),Math.abs(c))!=1)}setFunctionModule(o,l,c){this.modules[l][o]=c,this.isFunction[l][o]=!0}addEccAndInterleave(o){const l=this.version,c=this.errorCorrectionLevel;if(o.length!=t.getNumDataCodewords(l,c))throw new RangeError("Invalid argument");const d=t.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][l],p=t.ECC_CODEWORDS_PER_BLOCK[c.ordinal][l],m=Math.floor(t.getNumRawDataModules(l)/8),x=d-m%d,v=Math.floor(m/d);let b=[];const w=t.reedSolomonComputeDivisor(p);for(let M=0,P=0;M<d;M++){let O=o.slice(P,P+v-p+(M<x?0:1));P+=O.length;const z=t.reedSolomonComputeRemainder(O,w);M<x&&O.push(0),b.push(O.concat(z))}let S=[];for(let M=0;M<b[0].length;M++)b.forEach((P,O)=>{(M!=v-p||O>=x)&&S.push(P[M])});return a(S.length==m),S}drawCodewords(o){if(o.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let l=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let d=0;d<this.size;d++)for(let p=0;p<2;p++){const m=c-p,v=(c+1&2)==0?this.size-1-d:d;!this.isFunction[v][m]&&l<o.length*8&&(this.modules[v][m]=i(o[l>>>3],7-(l&7)),l++)}}a(l==o.length*8)}applyMask(o){if(o<0||o>7)throw new RangeError("Mask value out of range");for(let l=0;l<this.size;l++)for(let c=0;c<this.size;c++){let d;switch(o){case 0:d=(c+l)%2==0;break;case 1:d=l%2==0;break;case 2:d=c%3==0;break;case 3:d=(c+l)%3==0;break;case 4:d=(Math.floor(c/3)+Math.floor(l/2))%2==0;break;case 5:d=c*l%2+c*l%3==0;break;case 6:d=(c*l%2+c*l%3)%2==0;break;case 7:d=((c+l)%2+c*l%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[l][c]&&d&&(this.modules[l][c]=!this.modules[l][c])}}getPenaltyScore(){let o=0;for(let p=0;p<this.size;p++){let m=!1,x=0,v=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[p][b]==m?(x++,x==5?o+=t.PENALTY_N1:x>5&&o++):(this.finderPenaltyAddHistory(x,v),m||(o+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),m=this.modules[p][b],x=1);o+=this.finderPenaltyTerminateAndCount(m,x,v)*t.PENALTY_N3}for(let p=0;p<this.size;p++){let m=!1,x=0,v=[0,0,0,0,0,0,0];for(let b=0;b<this.size;b++)this.modules[b][p]==m?(x++,x==5?o+=t.PENALTY_N1:x>5&&o++):(this.finderPenaltyAddHistory(x,v),m||(o+=this.finderPenaltyCountPatterns(v)*t.PENALTY_N3),m=this.modules[b][p],x=1);o+=this.finderPenaltyTerminateAndCount(m,x,v)*t.PENALTY_N3}for(let p=0;p<this.size-1;p++)for(let m=0;m<this.size-1;m++){const x=this.modules[p][m];x==this.modules[p][m+1]&&x==this.modules[p+1][m]&&x==this.modules[p+1][m+1]&&(o+=t.PENALTY_N2)}let l=0;for(const p of this.modules)l=p.reduce((m,x)=>m+(x?1:0),l);const c=this.size*this.size,d=Math.ceil(Math.abs(l*20-c*10)/c)-1;return a(0<=d&&d<=9),o+=d*t.PENALTY_N4,a(0<=o&&o<=2568888),o}getAlignmentPatternPositions(){if(this.version==1)return[];{const o=Math.floor(this.version/7)+2,l=this.version==32?26:Math.ceil((this.version*4+4)/(o*2-2))*2;let c=[6];for(let d=this.size-7;c.length<o;d-=l)c.splice(1,0,d);return c}}static getNumRawDataModules(o){if(o<t.MIN_VERSION||o>t.MAX_VERSION)throw new RangeError("Version number out of range");let l=(16*o+128)*o+64;if(o>=2){const c=Math.floor(o/7)+2;l-=(25*c-10)*c-55,o>=7&&(l-=36)}return a(208<=l&&l<=29648),l}static getNumDataCodewords(o,l){return Math.floor(t.getNumRawDataModules(o)/8)-t.ECC_CODEWORDS_PER_BLOCK[l.ordinal][o]*t.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][o]}static reedSolomonComputeDivisor(o){if(o<1||o>255)throw new RangeError("Degree out of range");let l=[];for(let d=0;d<o-1;d++)l.push(0);l.push(1);let c=1;for(let d=0;d<o;d++){for(let p=0;p<l.length;p++)l[p]=t.reedSolomonMultiply(l[p],c),p+1<l.length&&(l[p]^=l[p+1]);c=t.reedSolomonMultiply(c,2)}return l}static reedSolomonComputeRemainder(o,l){let c=l.map(d=>0);for(const d of o){const p=d^c.shift();c.push(0),l.forEach((m,x)=>c[x]^=t.reedSolomonMultiply(m,p))}return c}static reedSolomonMultiply(o,l){if(o>>>8||l>>>8)throw new RangeError("Byte out of range");let c=0;for(let d=7;d>=0;d--)c=c<<1^(c>>>7)*285,c^=(l>>>d&1)*o;return a(c>>>8==0),c}finderPenaltyCountPatterns(o){const l=o[1];a(l<=this.size*3);const c=l>0&&o[2]==l&&o[3]==l*3&&o[4]==l&&o[5]==l;return(c&&o[0]>=l*4&&o[6]>=l?1:0)+(c&&o[6]>=l*4&&o[0]>=l?1:0)}finderPenaltyTerminateAndCount(o,l,c){return o&&(this.finderPenaltyAddHistory(l,c),l=0),l+=this.size,this.finderPenaltyAddHistory(l,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(o,l){l[0]==0&&(o+=this.size),l.pop(),l.unshift(o)}};let n=t;n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;function r(o,l,c){if(l<0||l>31||o>>>l)throw new RangeError("Value out of range");for(let d=l-1;d>=0;d--)c.push(o>>>d&1)}function i(o,l){return(o>>>l&1)!=0}function a(o){if(!o)throw new Error("Assertion error")}const h=class{constructor(o,l,c){if(this.mode=o,this.numChars=l,this.bitData=c,l<0)throw new RangeError("Invalid argument");this.bitData=c.slice()}static makeBytes(o){let l=[];for(const c of o)r(c,8,l);return new h(h.Mode.BYTE,o.length,l)}static makeNumeric(o){if(!h.isNumeric(o))throw new RangeError("String contains non-numeric characters");let l=[];for(let c=0;c<o.length;){const d=Math.min(o.length-c,3);r(parseInt(o.substr(c,d),10),d*3+1,l),c+=d}return new h(h.Mode.NUMERIC,o.length,l)}static makeAlphanumeric(o){if(!h.isAlphanumeric(o))throw new RangeError("String contains unencodable characters in alphanumeric mode");let l=[],c;for(c=0;c+2<=o.length;c+=2){let d=h.ALPHANUMERIC_CHARSET.indexOf(o.charAt(c))*45;d+=h.ALPHANUMERIC_CHARSET.indexOf(o.charAt(c+1)),r(d,11,l)}return c<o.length&&r(h.ALPHANUMERIC_CHARSET.indexOf(o.charAt(c)),6,l),new h(h.Mode.ALPHANUMERIC,o.length,l)}static makeSegments(o){return o==""?[]:h.isNumeric(o)?[h.makeNumeric(o)]:h.isAlphanumeric(o)?[h.makeAlphanumeric(o)]:[h.makeBytes(h.toUtf8ByteArray(o))]}static makeEci(o){let l=[];if(o<0)throw new RangeError("ECI assignment value out of range");if(o<128)r(o,8,l);else if(o<16384)r(2,2,l),r(o,14,l);else if(o<1e6)r(6,3,l),r(o,21,l);else throw new RangeError("ECI assignment value out of range");return new h(h.Mode.ECI,0,l)}static isNumeric(o){return h.NUMERIC_REGEX.test(o)}static isAlphanumeric(o){return h.ALPHANUMERIC_REGEX.test(o)}getData(){return this.bitData.slice()}static getTotalBits(o,l){let c=0;for(const d of o){const p=d.mode.numCharCountBits(l);if(d.numChars>=1<<p)return 1/0;c+=4+p+d.bitData.length}return c}static toUtf8ByteArray(o){o=encodeURI(o);let l=[];for(let c=0;c<o.length;c++)o.charAt(c)!="%"?l.push(o.charCodeAt(c)):(l.push(parseInt(o.substr(c+1,2),16)),c+=2);return l}};let f=h;f.NUMERIC_REGEX=/^[0-9]*$/,f.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,f.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=f})(Ot||(Ot={})),(e=>{(t=>{const n=class{constructor(i,a){this.ordinal=i,this.formatBits=a}};let r=n;r.LOW=new n(0,1),r.MEDIUM=new n(1,0),r.QUARTILE=new n(2,3),r.HIGH=new n(3,2),t.Ecc=r})(e.QrCode||(e.QrCode={}))})(Ot||(Ot={})),(e=>{(t=>{const n=class{constructor(i,a){this.modeBits=i,this.numBitsCharCount=a}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};let r=n;r.NUMERIC=new n(1,[10,12,14]),r.ALPHANUMERIC=new n(2,[9,11,13]),r.BYTE=new n(4,[8,16,16]),r.KANJI=new n(8,[8,10,12]),r.ECI=new n(7,[0,0,0]),t.Mode=r})(e.QrSegment||(e.QrSegment={}))})(Ot||(Ot={}));var qt=Ot;/**
51
51
  * @license qrcode.react
52
52
  * Copyright (c) Paul O'Shannessy
53
53
  * SPDX-License-Identifier: ISC
54
- */var Ba={L:qt.QrCode.Ecc.LOW,M:qt.QrCode.Ecc.MEDIUM,Q:qt.QrCode.Ecc.QUARTILE,H:qt.QrCode.Ecc.HIGH},Wa=128,za="L",Ga="#FFFFFF",Va="#000000",qa=!1,mr=4,Sh=.1;function Ka(e,t=0){const n=[];return e.forEach(function(r,i){let a=null;r.forEach(function(h,f){if(!h&&a!==null){n.push(`M${a+t} ${i+t}h${f-a}v1H${a+t}z`),a=null;return}if(f===r.length-1){if(!h)return;a===null?n.push(`M${f+t},${i+t} h1v1H${f+t}z`):n.push(`M${a+t},${i+t} h${f+1-a}v1H${a+t}z`);return}h&&a===null&&(a=f)})}),n.join("")}function Qa(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((i,a)=>a<t.x||a>=t.x+t.w?i:!1))}function Za(e,t,n,r){if(r==null)return null;const i=n?mr:0,a=e.length+i*2,h=Math.floor(t*Sh),f=a/t,o=(r.width||h)*f,l=(r.height||h)*f,c=r.x==null?e.length/2-o/2:r.x*f,d=r.y==null?e.length/2-l/2:r.y*f;let m=null;if(r.excavate){let p=Math.floor(c),x=Math.floor(d),v=Math.ceil(o+c-p),_=Math.ceil(l+d-x);m={x:p,y:x,w:v,h:_}}return{x:c,y:d,h:l,w:o,excavation:m}}var Th=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function wh(e){const t=e,{value:n,size:r=Wa,level:i=za,bgColor:a=Ga,fgColor:h=Va,includeMargin:f=qa,style:o,imageSettings:l}=t,c=ur(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),d=l==null?void 0:l.src,m=Ne.useRef(null),p=Ne.useRef(null),[x,v]=Ne.useState(!1);Ne.useEffect(()=>{if(m.current!=null){const T=m.current,O=T.getContext("2d");if(!O)return;let F=qt.QrCode.encodeText(n,Ba[i]).getModules();const M=f?mr:0,z=F.length+M*2,K=Za(F,r,f,l),te=p.current,Q=K!=null&&te!==null&&te.complete&&te.naturalHeight!==0&&te.naturalWidth!==0;Q&&K.excavation!=null&&(F=Qa(F,K.excavation));const ae=window.devicePixelRatio||1;T.height=T.width=r*ae;const Ce=r/z*ae;O.scale(Ce,Ce),O.fillStyle=a,O.fillRect(0,0,z,z),O.fillStyle=h,Th?O.fill(new Path2D(Ka(F,M))):F.forEach(function(W,q){W.forEach(function(B,me){B&&O.fillRect(me+M,q+M,1,1)})}),Q&&O.drawImage(te,K.x+M,K.y+M,K.w,K.h)}}),Ne.useEffect(()=>{v(!1)},[d]);const _=ys({height:r,width:r},o);let w=null;return d!=null&&(w=Ne.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{v(!0)},ref:p})),Ne.createElement(Ne.Fragment,null,Ne.createElement("canvas",ys({style:_,height:r,width:r,ref:m},c)),w)}function Ih(e){const t=e,{value:n,size:r=Wa,level:i=za,bgColor:a=Ga,fgColor:h=Va,includeMargin:f=qa,imageSettings:o}=t,l=ur(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let c=qt.QrCode.encodeText(n,Ba[i]).getModules();const d=f?mr:0,m=c.length+d*2,p=Za(c,r,f,o);let x=null;o!=null&&p!=null&&(p.excavation!=null&&(c=Qa(c,p.excavation)),x=Ne.createElement("image",{xlinkHref:o.src,height:p.h,width:p.w,x:p.x+d,y:p.y+d,preserveAspectRatio:"none"}));const v=Ka(c,d);return Ne.createElement("svg",ys({height:r,width:r,viewBox:`0 0 ${m} ${m}`},l),Ne.createElement("path",{fill:a,d:`M0,0 h${m}v${m}H0z`,shapeRendering:"crispEdges"}),Ne.createElement("path",{fill:h,d:v,shapeRendering:"crispEdges"}),x)}var Ja=e=>{const t=e,{renderAs:n}=t,r=ur(t,["renderAs"]);return n==="svg"?Ne.createElement(Ih,ys({},r)):Ne.createElement(wh,ys({},r))};const gs=(e,t)=>t*100/e,Ch={ABSOLUTE:"AMT",RELATIVE:"%",COMPLIMENTARY:"COMPLIMENTARY"},L=new Object({"3INCH":{lines:"- - - - - - - - - - - - - - - - - - - - - - - - - - - - -",paperSize:"36rem",itemName:"Item Name ",dynamicClassname:"size-3inch",textSize:19},"2INCH":{lines:"- - - - - - - - - - - - - - - - - - - -",paperSize:"23rem",itemName:"Item Name ",dynamicClassname:"size-2inch",textSize:13},"2.5INCH":{paperSize:"28rem",itemName:"Item Name ",dynamicClassname:"size-2inch",textSize:13},"2.7INCH":{paperSize:"30.6rem",itemName:"Item Name ",dynamicClassname:"size-3inch",textSize:19},"1.8INCH":{paperSize:"20.7rem",itemName:"Item Name ",dynamicClassname:"size-2inch",textSize:13},A4:{paperSize:"297mm",itemName:"Item Name ",dynamicClassname:"size-a4",textSize:13},A5:{paperSize:"148mm",itemName:"Item Name ",dynamicClassname:"size-a5",textSize:9}});var xs=Xn(),Se="normal-class";(xs=="Android OS"||xs==="iOS")&&(Se="bold-class");const tt=e=>{var Mt,J,je,yt,gt;const t=e.additionalActions??{},n=Ne.useRef(null),r=e.settingData?e.settingData:e.value.settingData,i=localStorage.getItem("siteId"),{staticDataKOT:a,printer:h,type:f}=e.printerDataObject,o=((J=(Mt=e.value)==null?void 0:Mt.settingData)==null?void 0:J.curr)??((je=e.settingData)==null?void 0:je.curr)??"INR";r==null||r.fontTheme;let l=e.printerDataObject.paperSize,c=ir(h,{type:f,siteSetting:e.settingData?e.settingData:e.value.settingData},t);const d=r.customLabels??gd();l=c?(yt=c[0])!=null&&yt.paperSize?(gt=c[0])==null?void 0:gt.paperSize:l||"3INCH":e.printerDataObject.paperSize;function m(g){const u=Math.abs(parseFloat(g));return p(u)}function p(g){switch(o){case"BHD":case"KWD":case"MUR":case"OMR":return Xs(g).format("0,00.000");default:return Xs(g).format("0,00.00")}}Ne.useEffect(()=>{w()},[e.newId]);const x=()=>new Promise(async(g,u)=>{if(xs=="Android OS"||xs==="iOS"){let C=await _h(n.current);if(C){const j=await _(C);g(j)}}else{let C=await Ya(n.current);C&&g(C)}}),v=()=>new Promise(async(g,u)=>{const C=await x();g(C)}),_=g=>new Promise((u,C)=>{let j=new Image;j.src=g,j.onload=()=>{let I=document.createElement("canvas");const D=600,S=j.height;let k=j.width,$=j.height;k>$?k>D&&($*=D/k,k=D):$>S&&(k*=S/$,$=S),I.width=k,I.height=$,I.getContext("2d").drawImage(j,0,0,k,$),u(I.toDataURL())}}),w=async()=>{if(n&&n.current){const g=await v();e.onImageGenerated(g)}},T=g=>{let u=new Array;for(const C in g.menusCollection)C.endsWith("collection")||(g.menusCollection[`${C}_collection`]||g.menusCollection[C])&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold display-percentage",children:[s.jsx("span",{children:` -- ${C.replace("_"," ")}(${g.menusCollection[C]}):`}),s.jsx("span",{children:le(g.menusCollection[`${C}_collection`],o)}),s.jsx("span",{children:p(gs(g.salesCollection.totalCollection,g.menusCollection[`${C}_collection`]??0))+"%"})]}));return g.salesCollection.online_aggregator_collection&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:` -- Aggregator(${g.salesCollection.online_aggregator}):`}),s.jsx("span",{children:le(g.salesCollection.online_aggregator_collection,o)})]}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:` -- Zomato(${g.salesCollection.zomato_aggregator??0}):`}),s.jsx("span",{children:le(g.salesCollection.zomato_aggregator_collection,o)})]}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:` -- Swiggy(${g.salesCollection.swiggy_aggregator??0}):`}),s.jsx("span",{children:le(g.salesCollection.swiggy_aggregator_collection,o)})]})),u},O=g=>{let u=new Array,C=new Object;for(let j=0;j<g.todayCollection.length;j++)C=g.todayCollection[j],u.push(s.jsxs("h5",{className:"left-align-entity level3-bold display-percentage",children:[s.jsx("span",{children:` -- ${C.displayName}:`}),s.jsx("span",{children:le(C.value,o)}),s.jsx("span",{children:p(gs(g.totalCollection,C.value))+"%"})]}));return u},F=(g,u,C,j,I={})=>{let D=g.includes("upi://");const S=`upi://pay?pa=${g}&pn=${C}&cu=INR&am=${j}&tr=${u}`;return s.jsx(Ja,{value:D?g:S,renderAs:"canvas",size:I.size??250})},M=(g,u)=>{var D,S;let C=0;if((D=u.taxObj)!=null&&D.VAT.length){let k,$,pe;for($=0;$<((S=u.taxObj)==null?void 0:S.VAT.length);$++){k=u.taxObj.VAT[$];for(pe in k)C+=_e(k[pe])}}const j={sellerName:u.companyInfo.companyName,vatRegistrationNumber:g,invoiceTimestamp:new Date(u.orderInfo.timestamp*1e3).toISOString(),invoiceTotal:u.finalAmount,invoiceVatTotal:C},I=yd(j.sellerName,j.vatRegistrationNumber,j.invoiceTimestamp,j.invoiceTotal,j.invoiceVatTotal.toFixed(2));return s.jsx(Ja,{value:I,renderAs:"canvas",size:250})},z=g=>{const u=[];return(g.totalBalanceAmt||g.refundAmt||g.writeOffAmt||g.rewardAmt||g.cashCard)&&(u.push(s.jsx("hr",{})),g.rewardAmt&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"REWARDS:"}),s.jsx("span",{children:le(g.rewardAmt,o)})]})),g.totalBalanceAmt&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"OUTSTANDING AMOUNT:"}),s.jsx("span",{children:le(g.totalBalanceAmt,o)})]})),g.writeOffAmt&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"WRITE OFF AMOUNT:"}),s.jsx("span",{children:le(g.writeOffAmt,o)})]})),g.refundAmt&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"REFUND AMOUNT:"}),s.jsx("span",{children:le(g.refundAmt,o)})]})),g.cashCard&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"CASH CARD:"}),s.jsx("span",{children:le(g.cashCard,o)})]}))),u},K=(g,u)=>{if(u&&u.length){for(let C=0;C<u.length;C++)if(u[C].slugName===g)return u[C]}return!1},te=(g,u)=>{if(u&&u.length){for(let C=0;C<u.length;C++)if(u[C].itemType===g)return u[C]}return!1},Q=new Object({CREDIT:"Other Income",DEBIT:"Expense"}),ae=g=>g.discountType==="COMPLIMENTARY"?"@ COMPLIMENTARY":`@ ${g.discountValue}${Ch[g.discountType]}`,Ce=g=>{const u=new Array;if(g&&Object.keys(g).length!==0){u.push(s.jsx("h4",{className:"single-entity-and-center",children:"ACCOUNTS"}));for(const C in g)if(u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:`Total ${Q[C]}:`}),s.jsx("span",{children:le(g[C].total,o)})]})),C&&Object.keys(C).length!==0)for(const j in g[C])j!=="total"&&g[C][j]&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:` -- ${Ke(j)}:`}),s.jsx("span",{children:le(g[C][j],o)})]}))}return u},W=(g,u)=>{let C=!1;g.totalValue&&(C=Object.keys(g.totalValue).length>1);let j=new Object;return s.jsxs(s.Fragment,{children:[g.totalValue&&Object.keys(g.totalValue).map(D=>{if(j=g.totalValue[D],D==="GST")return s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsxs("section",{className:"products-section",children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h4",{className:`items products-heading-name ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.item_name}}),s.jsx("h4",{className:`items products-heading-qty ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.qty}}),s.jsx("h4",{className:`items products-heading-rate ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.rate}}),s.jsx("h4",{className:`items products-heading-amt ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.amt}})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:"products-section",style:{paddingTop:"12px"},children:[g.itemList&&g.itemList.length&&g.itemList.length>0&&g.itemList.map(S=>{if(S.taxType===D||!S.taxType)return s.jsxs("div",{style:S.name.startsWith("+ ")?{}:{paddingTop:"12px"},children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsxs("h6",{className:`items products-heading-name ${L[l].dynamicClassname}`,style:{fontWeight:"lighter",lineHeight:1.2},children:[S.status==="RETURNED"?"(R) ":"",S.name.toUpperCase()]}),s.jsxs("h6",{className:`items products-heading-qty ${L[l].dynamicClassname}`,style:{fontWeight:"lighter"},children:[S.status==="RETURNED"?"-":"",S.quantity]}),s.jsx("h6",{className:`items products-heading-rate ${L[l].dynamicClassname}`,style:{fontWeight:"lighter"},children:S.rate?m(S.rate):""}),s.jsx("h6",{className:`items products-heading-amt ${L[l].dynamicClassname}`,style:{fontWeight:"lighter"},children:S.status==="RETURNED"?S.serviceAmount?p(S.serviceAmount):"":S.price?p(S.price):""})]}),S.addons&&S.addons.length&&S.addons.map(k=>s.jsx("h6",{className:`items products-heading-addon-kot ${L[l].dynamicClassname}`,children:"- "+Ke(k.serviceName)})),S.instruction&&g.itemInstructionOnBill&&s.jsx("h6",{className:"left-align-entity level2-bold",children:s.jsx("h6",{className:"items products-heading-addon-kot",children:" ("+S.instruction+")"})})]})}),s.jsx("hr",{})]}),s.jsxs("div",{className:`bottom-section ${L[l].dynamicClassname}`,children:[s.jsxs("div",{className:"bottom-section-div inline-display",style:{paddingTop:"12px"},children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.subtotal}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.gstTTL)})]}),i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المجموع الفرعي"}),s.jsx("h5",{className:"actual-qty"})]}):"",j&&j.cat&&Object.keys(j.cat).length>0?Object.keys(j.cat).map(S=>{const k=K(S,g.discArr);if(k&&j.cat[S]!==0&&k.serviceName)return s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`disc_${k.serviceName.toLowerCase()}`]??"DISC-"+k.serviceName.toUpperCase()}}),s.jsx("span",{children:" @"+k.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.cat[S])})]})}):"",g.totalItemDisc&&j&&j.itemTypes&&Object.keys(j.itemTypes).length>0?Object.keys(j.itemTypes).map(S=>{const k=te(S,g.itemTypeDiscObj);if(k&&j.itemTypes[S]!==0&&k.itemType&&k.value)return s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`disc_${k.itemType.toLowerCase()}`]??"DISC-"+k.itemType.toUpperCase()}}),s.jsx("span",{children:" @"+k.value+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.itemTypes[S])})]})}):"",g.segMentDisc&&j&&j.segDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`segment_disc${g.segMentObj.segmentName.toLowerCase()}`]??g.segMentObj.segmentName.toUpperCase()+"DISC"}}),s.jsx("span",{children:" @"+g.segMentObj.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.segDisc)})]}):"",j&&j.orderDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:g.couponCode?u.coupon_disc??"COUPON DISC":u.order_disc??"ORDER DISC"}}),":",s.jsxs("span",{children:[g.couponCode?`(${g.couponCode.toUpperCase()})`:"",p(g.dicsEnterValue)?`@${g.dicsEnterValue}${g.discountType=="RELATIVE"||g.discountType=="COMPLIMENTARY"?"%":"AMT"}`:""]})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.orderDisc)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j&&j.orderDisc?s.jsxs("div",{className:"bottom-section-div",children:[s.jsxs("h5",{className:"total-qty",children:["  ",g.couponCode?"COUPON DISC":"خصم الطلب",g.couponCode?`(${g.couponCode.toUpperCase()})`:""]}),s.jsx("h5",{className:"actual-qty"})]}):"",j.otherCharges&&j.otherCharges.length>0?j.otherCharges.map(S=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u[`charges_${S.name.toLowerCase()}`]??S.name}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(S.amt)})]})})):"",j&&j.aftDisc&&j.gstTTL!==j.aftDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.amt_before_tax}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.aftDisc)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j&&j.aftDisc&&j.gstTTL!==j.aftDisc?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المبلغ قبل الضريبة"}),s.jsx("h5",{className:"actual-qty"})]}):"",g.taxObj&&g.taxObj[D]&&j?s.jsx(s.Fragment,{children:D==="GST"?g.taxObj[D].map(S=>{let k=new Array;for(const $ in S)if(S[$]&&S[$]!=0){let pe=$/2;k.push(s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u.cgst}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(S[$]/2)})]}),s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u[g.taxLabel.toLowerCase()]}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(S[$]/2)})]})]}))}return k}):g.taxObj[D].map(S=>{let k=new Array;for(const $ in S)if(S[$]&&S[$]!=0){let pe=$;k.push(s.jsx(s.Fragment,{children:s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u.vat}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(S[$])})]})}))}return k})}):"",j.gstTTL!==(j.total||0)+(j.aftDisc||0)+j.taxOnCharges&&s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.total}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p((j.total||0)+(j.aftDisc||0)+j.taxOnCharges)})]}),i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j.gstTTL!==(j.total||0)+(j.aftDisc||0)+j.taxOnCharges&&s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المجموع"}),s.jsx("h5",{className:"actual-qty"})]}),g.totalValue&&(Object.keys(g.totalValue).length||0)>1?s.jsx("h4",{className:"single-entity-and-center",style:{marginTop:"10px"},children:"- - - - -"}):"",C&&s.jsx("div",{className:"space-2rem"})]})]})}),g.totalValue&&Object.keys(g.totalValue).map(D=>{if(j=g.totalValue[D],D==="VAT")return s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsxs("section",{className:"products-section",children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.item_name}}),s.jsx("h6",{className:`items products-heading-qty ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.qty}}),s.jsx("h6",{className:`items products-heading-rate ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.rate}}),s.jsx("h6",{className:`items products-heading-amt ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.amt}})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:"products-section",style:{paddingTop:"12px"},children:[g.itemList&&g.itemList.length&&g.itemList.length>0&&g.itemList.map(S=>{if(S.taxType===D)return s.jsxs("div",{style:S.name.startsWith("+ ")?{}:{paddingTop:"12px"},children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsxs("h6",{className:`items products-heading-name ${L[l].dynamicClassname}`,children:[S.status==="RETURNED"?"(R) ":"",S.name.toUpperCase()]}),s.jsxs("h6",{className:`items products-heading-qty ${L[l].dynamicClassname}`,children:[S.status==="RETURNED"?"-":"",S.quantity]}),s.jsx("h6",{className:`items products-heading-rate ${L[l].dynamicClassname}`,children:S.rate?m(S.rate):""}),s.jsx("h6",{className:`items products-heading-amt ${L[l].dynamicClassname}`,children:S.status==="RETURNED"?S.serviceAmount?p(S.serviceAmount):"":S.price?p(S.price):""})]}),S.addons&&S.addons.length&&S.addons.map(k=>s.jsx("h6",{className:`items products-heading-addon-kot ${L[l].dynamicClassname}`,children:"- "+Ke(k.serviceName)})),S.instruction&&g.itemInstructionOnBill&&s.jsx("h6",{className:"left-align-entity level2-bold",children:s.jsx("h6",{className:"items products-heading-addon-kot",children:" ("+S.instruction+")"})})]})}),s.jsx("hr",{})]}),s.jsxs("div",{className:`bottom-section ${L[l].dynamicClassname}`,children:[s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.subtotal}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.vatTTL)})]}),i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المجموع الفرعي"}),s.jsx("h5",{className:"actual-qty"})]}):"",j&&j.cat&&Object.keys(j.cat).length>0?Object.keys(j.cat).map(S=>{const k=K(S,g.discArr);if(k&&j.cat[S]!==0&&k.serviceName)return s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`disc_${k.serviceName.toLowerCase()}`]??"DISC-"+k.serviceName.toUpperCase()}}),s.jsx("span",{children:" @"+k.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.cat[S])})]})}):"",g.totalItemDisc&&j&&j.itemTypes&&Object.keys(j.itemTypes).length>0?Object.keys(j.itemTypes).map(S=>{const k=te(S,g.itemTypeDiscObj);if(k&&j.itemTypes[S]!==0&&k.itemType&&k.value)return s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`disc_${k.itemType.toLowerCase()}`]??"DISC-"+k.itemType.toUpperCase()}}),s.jsx("span",{children:" @"+k.value+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.itemTypes[S])})]})}):"",g.segMentDisc&&j&&j.segDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`segment_disc${g.segMentObj.segmentName.toLowerCase()}`]??g.segMentObj.segmentName.toUpperCase()+"DISC"}}),s.jsx("span",{children:" @"+g.segMentObj.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.segDisc)})]}):"",j&&j.orderDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:g.couponCode?u.coupon_disc??"COUPON DISC":u.order_disc??"ORDER DISC"}}),":",s.jsxs("span",{children:[g.couponCode?`(${g.couponCode.toUpperCase()})`:"",p(g.dicsEnterValue)?`@${g.dicsEnterValue}${g.discountType=="RELATIVE"||g.discountType=="COMPLIMENTARY"?"%":"AMT"}`:""]})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.orderDisc)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j&&j.orderDisc?s.jsxs("div",{className:"bottom-section-div",children:[s.jsxs("h5",{className:"total-qty",children:["  ",g.couponCode?"COUPON DISC":"خصم الطلب",g.couponCode?`(${g.couponCode.toUpperCase()})`:""]}),s.jsx("h5",{className:"actual-qty"})]}):"",j.otherCharges&&j.otherCharges.length>0?j.otherCharges.map(S=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u[`charges_${S.name.toLowerCase()}`]??S.name}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(S.amt)})]})})):"",j&&j.aftDisc&&j.vatTTL!==j.aftDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.amt_before_tax}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(j.aftDisc)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j&&j.aftDisc&&j.vatTTL!==j.aftDisc?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المبلغ قبل الضريبة"}),s.jsx("h5",{className:"actual-qty"})]}):"",j.otherCharges&&j.otherCharges.length>0?j.otherCharges.map(S=>s.jsx(s.Fragment,{children:S.taxOnAmount&&S.taxOnAmount!=0?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u.cgst}}),s.jsx("span",{children:" @"+S.tax/2+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(S.taxOnAmount/2)})]}),s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u[g.taxLabel.toLowerCase()]}}),s.jsx("span",{children:" @"+S.tax/2+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(S.taxOnAmount/2)})]})]}):""})):"",g.taxObj&&g.taxObj[D]&&j?s.jsx(s.Fragment,{children:D==="GST"?g.taxObj[D].map(S=>{let k=new Array;for(const $ in S)if(S[$]&&S[$]!=0){let pe=$/2;k.push(s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u.cgst}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(S[$]/2)})]}),s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u[g.taxLabel.toLowerCase()]}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(S[$]/2)})]})]}))}return k}):g.taxObj[D].map(S=>{let k=new Array;for(const $ in S)if(S[$]&&S[$]!=0){let pe=$;k.push(s.jsx(s.Fragment,{children:s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u.vat}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p(S[$])})]})}))}return k})}):"",j.vatTTL!==(j.total||0)+(j.aftDisc||0)+j.taxOnCharges&&s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.total}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+p((j.total||0)+(j.aftDisc||0)+j.taxOnCharges)})]}),i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j.vatTTL!==(j.total||0)+(j.aftDisc||0)+j.taxOnCharges&&s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المجموع"}),s.jsx("h5",{className:"actual-qty"})]})]})]})})]})},q=(g,u,{labels:C,doMultipleTax:j,type:I})=>{var S,k,$,pe,Te,Le,Pe,Ae,At,Et,xt;const D=g.discounts;return s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsxs("section",{className:"products-section",children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h4",{className:`items products-heading-name ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:C.item_name}}),s.jsx("h4",{className:`items products-heading-qty ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:C.qty}}),s.jsx("h4",{className:`items products-heading-rate ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:C.rate}}),s.jsx("h4",{className:`items products-heading-amt ${L[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:C.amt}})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:"products-section",style:{paddingTop:"12px"},children:[g.itemList.map(G=>{var Rt;return s.jsxs("div",{style:G.serviceName.startsWith("+ ")?{}:{paddingTop:"12px"},children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsxs("h6",{className:`items products-heading-name ${L[l].dynamicClassname}`,style:{lineHeight:1.2},children:[G.status==="RETURNED"?"(R) ":"",G.serviceName.toUpperCase()]}),s.jsxs("h6",{className:`items products-heading-qty ${L[l].dynamicClassname}`,children:[G.status==="RETURNED"?"-":"",G.qty]}),s.jsx("h6",{className:`items products-heading-rate ${L[l].dynamicClassname}`,children:G.serviceRate?m(G.serviceRate):""}),s.jsx("h6",{className:`items products-heading-amt ${L[l].dynamicClassname}`,children:G.sub_total?p(G.sub_total):""})]}),G.hsnCode&&u.printHSNCodeOnBill&&s.jsxs("h6",{className:`items products-heading-name ${L[l].dynamicClassname}`,style:{lineHeight:1.2},children:["HSN: ",G.hsnCode]}),(Rt=G.addons)!=null&&Rt.length?G.addons.map(rt=>s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name ${L[l].dynamicClassname}`,style:{lineHeight:1.2},children:"+ "+Ke(rt.serviceName)}),s.jsxs("h6",{className:`items products-heading-qty ${L[l].dynamicClassname}`,children:[G.status==="RETURNED"?"-":"",rt.qty*G.qty]}),s.jsx("h6",{className:`items products-heading-rate ${L[l].dynamicClassname}`}),s.jsx("h6",{className:`items products-heading-amt ${L[l].dynamicClassname}`})]}),s.jsx("div",{children:rt.hsnCode&&u.printHSNCodeOnBill&&s.jsxs("h6",{className:`items products-heading-name ${L[l].dynamicClassname}`,style:{lineHeight:1.2},children:["HSN: ",rt.hsnCode]})})]})):"",G.instruction?s.jsx("h6",{className:"left-align-entity level2-bold",children:s.jsx("h6",{className:"items products-heading-addon-kot",children:" ("+G.instruction+")"})}):""]})}),s.jsx("hr",{})]}),s.jsxs("div",{className:`bottom-section ${L[l].dynamicClassname} ${Se}`,children:[s.jsxs("div",{className:"bottom-section-div inline-display",style:{paddingTop:"12px"},children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:C.subtotal}}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(g.subTotal)})]}),i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المجموع الفرعي"}),s.jsx("h5",{className:"actual-qty"})]}):""]}),(S=D.DISCOUNT_ITEMS)!=null&&S.length?D.DISCOUNT_ITEMS.map(G=>s.jsxs("div",{className:`bottom-section-div inline-display ${Se}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:C[`disc_${G.discountName.toLowerCase()}`]??"DISC-"+G.discountName.toUpperCase()}}),s.jsx("span",{children:ae(G)})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(G.discountAmt)})]})):"",(k=D.CATEGORY_DISCOUNT)!=null&&k.length?D.CATEGORY_DISCOUNT.map(G=>s.jsxs("div",{className:`bottom-section-div inline-display ${Se}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:C[`disc_${G.discountName.toLowerCase()}`]??"DISC-"+G.discountName.toUpperCase()}}),s.jsx("span",{children:" @"+G.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(G.discountAmt)})]})):"",($=D.ITEM_DISCOUNT)!=null&&$.length?D.ITEM_DISCOUNT.map(G=>s.jsxs("div",{className:`bottom-section-div inline-display ${Se}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:C[`disc_${G.discountName.toLowerCase()}`]??"DISC-"+ts(G.discountName).toUpperCase()}}),s.jsx("span",{children:" @"+G.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(G.discountAmt)})]})):"",(Te=(pe=D.SEGMENT_DISCOUNT)==null?void 0:pe[0])!=null&&Te.discountAmt?s.jsxs("div",{className:`bottom-section-div inline-display ${Se}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:C[`segment_disc${D.SEGMENT_DISCOUNT[0].discountName.toLowerCase()}`]??"DISC-"+D.SEGMENT_DISCOUNT[0].discountName.toUpperCase()}}),":",s.jsx("span",{children:" @"+D.SEGMENT_DISCOUNT[0].discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(D.SEGMENT_DISCOUNT[0].discountAmt)})]}):"",(Pe=(Le=D.COUPON_DISCOUNT)==null?void 0:Le[0])!=null&&Pe.discountAmt?s.jsxs("div",{className:`bottom-section-div inline-display ${Se}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:"COUPON DISC"}}),":",s.jsx("span",{children:`(${D.COUPON_DISCOUNT[0].discountName.toUpperCase()}) @${D.COUPON_DISCOUNT[0].discountValue}${D.COUPON_DISCOUNT[0].discountType=="RELATIVE"?"%":"AMT"}`})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(D.COUPON_DISCOUNT[0].discountAmt)})]}):"",(At=(Ae=D.ORDER_DISCOUNT)==null?void 0:Ae[0])!=null&&At.discountAmt?s.jsxs("div",{className:`bottom-section-div inline-display ${Se}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:C.order_disc??"ORDER DISC"}}),":",s.jsx("span",{children:p(D.ORDER_DISCOUNT[0].discountValue)?`@${D.ORDER_DISCOUNT[0].discountValue}${D.ORDER_DISCOUNT[0].discountType=="RELATIVE"||D.ORDER_DISCOUNT[0].discountType=="COMPLIMENTARY"?"%":"AMT"}`:""})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(D.ORDER_DISCOUNT[0].discountAmt)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&g&&g.orderDisc?s.jsxs("div",{className:`bottom-section-div ${Se}`,children:[s.jsxs("h5",{className:"total-qty",children:["  ",u.couponCode?"COUPON DISC":"خصم الطلب",u.couponCode?`(${u.couponCode.toUpperCase()})`:""]}),s.jsx("h5",{className:"actual-qty"})]}):"",(Et=g.charges)!=null&&Et.length?g.charges.map(G=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:`bottom-section-div inline-display ${Se}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:C[`charges_${G.name.toLowerCase()}`]??G.name}})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(G.amt)})]})})):"",g.subTotal!==g.afterCharges&&g.afterCharges!==g.total?s.jsxs("div",{className:`bottom-section-div inline-display ${Se}`,children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:C.amt_before_tax}}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(g.afterCharges)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&g.subTotal!==g.afterCharges?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المبلغ قبل الضريبة"}),s.jsx("h5",{className:"actual-qty"})]}):"",(xt=g.taxation)!=null&&xt.length?g.taxation.map(G=>{if(G.taxAmt)return G.taxType==="GST"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:`bottom-section-div ${Se}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.cgst}}),s.jsx("span",{children:"@"+G.tax/2+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(G.taxAmt/2)})]}),s.jsxs("div",{className:`bottom-section-div ${Se}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C[u.taxLabel.toLowerCase()]}}),s.jsx("span",{children:"@"+G.tax/2+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(G.taxAmt/2)})]})]}):s.jsxs("div",{className:`bottom-section-div ${Se}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.vat}}),s.jsx("span",{children:"@"+G.tax+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(G.taxAmt)})]})}):"",s.jsxs("div",{className:`bottom-section-div inline-display ${Se}`,children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:C.total}}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+p(g.total)})]}),j?s.jsx(s.Fragment,{children:I==="GST"?s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"single-entity-and-center",style:{marginTop:"10px"},children:"- - - - -"}),s.jsx("div",{className:"space-2rem"})]}):""}):""]})},B=(g,u)=>{var D,S;let C=!1;const j=g.distributedData;return g.distributedData&&(C=Object.keys(g.distributedData).length>1),s.jsxs(s.Fragment,{children:[((D=j.GST)==null?void 0:D.itemList)&&q(j.GST,g,{labels:u,doMultipleTax:C,type:"GST"}),((S=j.VAT)==null?void 0:S.itemList)&&q(j.VAT,g,{labels:u,doMultipleTax:C,type:"VAT"})]})},me=g=>{const u=g.services,C=Object.keys(g.services),j=C.length;return s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsxs("section",{className:`products-section ${Se}`,children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h5",{className:"items products-heading-name-kot",children:L[l].itemName}),s.jsx("h5",{className:"items products-heading-qty-kot",children:"QTY"})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:"products-section",children:[j&&C.map((D,S)=>s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"left-align-entity level3-bold",children:s.jsxs("u",{children:[D.toUpperCase(),":"]})}),u[D].map(k=>{var $;return s.jsxs("div",{children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h4",{className:`items products-heading-name-kot ${L[l].dynamicClassname}`,children:Ke(k.serviceName)}),s.jsx("h4",{className:`items products-heading-qty-kot ${L[l].dynamicClassname}`,children:k.qty})]}),(($=k.addons)==null?void 0:$.length)&&k.addons.map(pe=>{var Te;return s.jsx("h5",{className:"items products-heading-addon-kot",children:"- "+((Te=pe.serviceName)==null?void 0:Te.toUpperCase())})}),k.instruction&&s.jsx("h5",{className:"left-align-entity",children:s.jsx("h5",{className:"items products-heading-addon-kot",children:" ("+k.instruction+")"})})]})}),j!==S+1&&s.jsx("br",{})]})),s.jsx("hr",{})]})]})},A=g=>{const u=g.slice(0,-4),C=g.slice(-4);return{firstDigits:u,last4Dgits:C}},Be=(g,u,C,j={})=>{const I=Object.keys(u??{});let D=[],S,k="flex-two-items";if(j.action==="addCharges"&&(k="display-percentage"),g&&I.length){D.push(s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"single-entity-and-center",children:`${C.toUpperCase()} BREAK-UP`}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsxs("span",{children:["Total ",C,":"]}),s.jsx("span",{children:le(g,o)})]})]}));for(let $=0;$<I.length;$++)S=I[$],u[S]&&D.push(s.jsxs("h5",{className:`left-align-entity level3-bold ${k} second-span-right`,children:[s.jsx("span",{children:` -- ${S.replaceAll("_"," ")}:`}),s.jsx("span",{children:le(u[S],o)}),j.action==="addCharges"?s.jsx("span",{children:p(gs(g,u[S]))+"%"}):""]}));D.push(s.jsx("hr",{}))}return D},st=g=>{const u=Object.keys(g.Category),C=Object.keys(g.Addon);let j=new Array;return j.push(s.jsxs(s.Fragment,{children:[s.jsx("h3",{className:"left-align-entity level3-bold",children:"Product Category"}),s.jsx("hr",{className:"dashed"})]})),u.forEach((I,D)=>{const S=g.Category[I];let k=[];j.push(s.jsxs(s.Fragment,{children:[s.jsxs("h4",{className:"left-align-entity level3-bold",children:[" - "," ",ts(I)]}),s.jsxs("section",{className:"products-section",children:[S.forEach($=>{k.push(s.jsx(s.Fragment,{children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name-kot ${L["3INCH"].dynamicClassname}`,children:$.serviceName}),s.jsx("h6",{className:`items products-heading-qty-kot ${L["3INCH"].dynamicClassname}`,children:parseFloat($.qty.toFixed(2))})]})}))}),k,D!=u.length-1&&s.jsx("hr",{})]})]}))}),C.length>0&&(j.push(s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsx("h3",{className:"left-align-entity level3-bold",children:"Addon Category"}),s.jsx("hr",{className:"dashed"})]})),C.forEach((I,D)=>{const S=g.Addon[I];let k=[];j.push(s.jsxs(s.Fragment,{children:[s.jsxs("h4",{className:"left-align-entity level3-bold",children:[" - "," ",ts(I)]}),s.jsxs("section",{className:"products-section",children:[S.forEach($=>{k.push(s.jsx(s.Fragment,{children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name-kot ${L["3INCH"].dynamicClassname}`,children:$.serviceName}),s.jsx("h6",{className:`items products-heading-qty-kot ${L["3INCH"].dynamicClassname}`,children:parseFloat($.qty.toFixed(2))})]})}))}),k,D!=C.length-1&&s.jsx("hr",{className:"dashed"})]})]}))})),j},nt=g=>{var C;const u={company_mobile:"Mob",company_Email:"Email",company_GST:"GST",company_VAT:"VAT",company_FSSAI:"FSSAI",name:"Name",mobile:"Mobile",address:"Address",email:"Email",token_no:"Token No",order_no:"Order No",date:"Date",delivery_date:"Delivery Date",item_name:"Item Name",qty:"Qty",rate:"Rate",amt:"Amt",subtotal:"SUB TOTAL",order_disc:"ORDER DISC",coupon_disc:"COUPON DISC",complementary_disc:"COMPLIMENTARY BILL",amt_before_tax:"AMT BEFORE TAX",total:"TOTAL",grand_total:"GRAND TOTAL",reward_point_balance:"REWARD POINT BALANCE",balance_amt:"BALANCE AMOUNT",rewards_redeemed:"REWARDS REDEEMED",vat:"VAT",sgst:"SGST",cgst:"CGST",utgst:"UTGST",igst:"IGST",previous_outstanding:"PREVIOUS OUTSTANDING",total_payable:"TOTAL PAYABLE",delivery_code:"Delivery Code",online_order_id:"Online Order ID",area_name:"Area Name",table_name:"Table Name",captain_name:"Captain Name"};if((C=g==null?void 0:g.customBillLabels)!=null&&C.length){let j;for(let I=0;I<g.customBillLabels.length;I++)j=g.customBillLabels[I],u[j.defaultName]=j.displayName}return u},pt=(g,u,C,j)=>{var $,pe,Te,Le,Pe,Ae,At,Et,xt,G,Rt,rt,Ns,js,on,vs,_s,cn,dn,hn,un,mn,fn,pn,Kt,bs,Nt,Qt,Zt,Ss,yn,Ts,gn,ws,Is,xn,Nn,Cs,Os;const I=nt(r.customLabelsMap),D=ms(xd(r.paymentModes),"internalName"),S=ee=>{var b;return(b=D[ee])!=null&&b.displayName?D[ee].displayName.toUpperCase():ee};if(g==="BILL"){let ee;if(l==="A4"||l==="A5"){let b={...u},Z=0,ue=b.distributedData;const y=ue.discounts;ee=s.jsx("div",{className:`invoiceContainer main-div ${L[l].dynamicClassname}`,children:s.jsxs("div",{id:"page-wrap",children:[s.jsx("table",{width:"100%",className:"custom-table custom-table-bordered",children:s.jsxs("tbody",{children:[s.jsxs("tr",{children:[s.jsxs("td",{colSpan:9,children:[s.jsx("tr",{className:"subtotalTr",children:s.jsx("td",{colSpan:12,style:{borderBottom:"1px solid black",width:"100%"},children:s.jsx("h5",{children:s.jsxs("strong",{children:[b.companyInfo.companyName,":"]})})})}),s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:`${I.order_no}:`},className:"font-weight-bold"}),s.jsx("span",{children:b.orderId})]}),s.jsxs("td",{width:"50%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:`${I.date}:`},className:"font-weight-bold"}),s.jsx("span",{children:b.orderInfo.orderDate})]})]})]}),s.jsx("td",{colSpan:3,className:"text-right",children:s.jsx("div",{className:"d-flex justify-content-center",children:C&&s.jsx("img",{src:C,width:90})})})]}),s.jsx("tr",{children:s.jsx("td",{colSpan:12,className:"text-center border-right",style:{padding:"0px 1.4rem"},children:s.jsx("h6",{children:s.jsx("strong",{children:"Tax Invoice"})})})}),s.jsxs("tr",{children:[s.jsx("td",{colSpan:6,className:"v-align-baseline col-6",children:s.jsxs("div",{className:"divPadding",children:[(b.customerInfo.custName||(($=b.customFields)==null?void 0:$.length))&&s.jsx("tr",{children:s.jsx("td",{colSpan:"2",className:"text-center border-right",children:s.jsx("strong",{children:"Bill To"})})}),b.customerInfo.custName&&b.customerInfo.custName!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:b.customerInfo.custName})}),b.customerInfo.custContact&&b.customerInfo.custContact!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:b.customerInfo.custContact})}),b.customerInfo.custAddress&&b.customerInfo.custAddress!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:b.customerInfo.custAddress})}),b.deliveryTimestamp&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:b.deliveryTimestamp})}),(pe=b.customFields)!=null&&pe.length?b.customFields.map(N=>s.jsx("tr",{children:s.jsxs("td",{width:"10%",children:[N.customName,": ",N.customValue]})})):""]})}),s.jsx("td",{colSpan:6,className:"v-align-baseline",children:s.jsxs("div",{className:"divPadding",children:[s.jsx("tr",{children:s.jsx("td",{colSpan:"2",className:"text-center border-right",children:s.jsx("strong",{children:"Bill From"})})}),s.jsx("tr",{children:s.jsx("td",{width:"10%",children:b.companyInfo.companyName})}),b.companyInfo.companyAddress&&b.companyInfo.companyAddress!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:b.companyInfo.companyAddress})}),b.companyInfo.companyEmail&&b.companyInfo.companyEmail!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:b.companyInfo.companyEmail})}),b.companyInfo.companyContact&&b.companyInfo.companyContact!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:b.companyInfo.companyContact})}),b.fssai&&b.fssai!==""&&s.jsx("tr",{children:s.jsxs("td",{width:"10%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:`${I.company_FSSAI}:`}}),s.jsx("span",{children:b.fssai})]})}),b.gst&&b.gst!==""&&s.jsx("tr",{children:s.jsxs("td",{width:"10%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:`${I.company_GST}:`}}),s.jsx("span",{children:b.gst})]})}),b.vatNo&&b.vatNo!==""&&s.jsx("tr",{children:s.jsxs("td",{width:"10%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:`${I.company_VAT}:`}}),s.jsx("span",{children:b.vatNo})]})})]})})]}),s.jsx("tr",{children:s.jsx("td",{colSpan:12,children:s.jsxs("table",{width:"100%",className:"custom-table productTable ",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-right",style:{lineHeight:"10px"},children:[s.jsx("th",{className:"text-align-left",children:"Sr No"}),s.jsx("th",{className:"text-align-left",style:{width:"40%"},children:"Item Name"}),s.jsx("th",{className:"text-align-left",children:"Quantity"}),s.jsx("th",{className:"text-align-right",children:"Price/Unit"}),s.jsx("th",{className:"text-align-right",children:"Amount"})]})}),s.jsxs("tbody",{children:[b.itemList.map(N=>{var oe;let P="",V=[];return Z++,V.push(s.jsxs(s.Fragment,{children:[s.jsxs("tr",{style:{lineHeight:"10px"},className:P,children:[s.jsx("td",{className:"text-align-left",children:N.serviceRate?Z:""}),s.jsx("td",{style:{width:"40%"},className:"text-align-left",children:N.serviceName.toUpperCase()}),s.jsx("td",{className:"text-align-left",children:N.qty}),s.jsx("td",{className:"text-align-right",children:N.serviceRate?U(N.serviceRate,o):""}),s.jsx("td",{className:"text-align-right",children:N.sub_total?U(N.sub_total,o):""})]}),N.instruction&&s.jsxs("tr",{children:[s.jsx("td",{}),s.jsx("td",{style:{width:"40%"},children:"("+N.instruction+")"})]})]})),(oe=N.addons)!=null&&oe.length&&N.addons.map(he=>{V.push(s.jsxs(s.Fragment,{children:[s.jsxs("tr",{style:{lineHeight:"10px"},className:"fs-8",children:[s.jsx("td",{}),s.jsxs("td",{style:{width:"40%"},children:["+ ",he.serviceName.toUpperCase()]}),s.jsx("td",{children:he.qty*N.qty})]}),he.instruction&&s.jsxs("tr",{children:[s.jsx("td",{}),s.jsx("td",{style:{width:"40%"},children:"("+he.instruction+")"})]})]}))}),V}),s.jsx("tr",{style:{lineHeight:"10px",fontSize:"14px"},children:s.jsx("td",{colSpan:5,children:s.jsx("strong",{className:"font-weight-bold",children:`Total ${Z} Items and ${_e(ue.qty)} Quantity`})})})]})]})})}),s.jsxs("tr",{className:"avoid-page-break",children:[s.jsx("td",{colSpan:6,style:{verticalAlign:"top"},children:s.jsx("div",{children:s.jsxs("div",{width:"100%",children:[s.jsx("tr",{children:s.jsxs("td",{colSpan:"2",children:[s.jsx("strong",{className:"font-weight-bold",children:"Amount in words"}),s.jsx("br",{}),fd(xa(b.finalAmount,o).toFixed(tn[o].minimumFractionDigits??2))]})}),s.jsx("hr",{}),b.upiId&&u.companyInfo.companyName&&s.jsxs(s.Fragment,{children:[s.jsx("tr",{children:s.jsx("td",{width:"50%",className:"font-weight-bold",children:"Scan To Pay"})}),s.jsx("tr",{children:s.jsx("td",{width:"50%",children:s.jsx("div",{className:"image-bill",children:F(u.upiId,u.orderId,u.companyInfo.companyName,u.paidAmt,{size:100})})})})]}),b.footerMessage?s.jsx("tr",{children:s.jsx("td",{colSpan:"2",children:s.jsx("div",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:b.footerMessage}})})}):""]})})}),s.jsx("td",{colSpan:6,style:{verticalAlign:"top"},children:s.jsx(s.Fragment,{children:s.jsxs(s.Fragment,{children:[s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{children:s.jsx("strong",{dangerouslySetInnerHTML:{__html:I.subtotal}})})}),s.jsx("td",{width:"50%",className:"text-align-right",children:U(ue.subTotal,o)})]}),(Te=y==null?void 0:y.DISCOUNT_ITEMS)!=null&&Te.length?y.DISCOUNT_ITEMS.map(N=>s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:I[`disc_${N.discountName.toLowerCase()}`]??"DISC-"+N.discountName.toUpperCase()}}),s.jsx("span",{children:ae(N)})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(N.discountAmt,o)})]})):"",(Le=y==null?void 0:y.CATEGORY_DISCOUNT)!=null&&Le.length?y.CATEGORY_DISCOUNT.map(N=>s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:I[`disc_${N.discountName.toLowerCase()}`]??"DISC-"+N.discountName.toUpperCase()}}),s.jsx("span",{children:" @"+N.discountValue+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(N.discountAmt,o)})]})):"",(Pe=y==null?void 0:y.ITEM_DISCOUNT)!=null&&Pe.length?y.ITEM_DISCOUNT.map(N=>s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:I[`disc_${N.discountName.toLowerCase()}`]??"DISC-"+N.discountName.toUpperCase()}}),s.jsx("span",{children:" @"+N.discountValue+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(N.discountAmt,o)})]})):"",(At=(Ae=y==null?void 0:y.SEGMENT_DISCOUNT)==null?void 0:Ae[0])!=null&&At.discountAmt?s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:I[`segment_disc${y.SEGMENT_DISCOUNT[0].discountName.toLowerCase()}`]??"DISC-"+y.SEGMENT_DISCOUNT[0].discountName.toUpperCase()}}),s.jsx("span",{children:" @"+y.SEGMENT_DISCOUNT[0].discountValue+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(y.SEGMENT_DISCOUNT[0].discountAmt,o)})]}):"",(xt=(Et=y==null?void 0:y.COUPON_DISCOUNT)==null?void 0:Et[0])!=null&&xt.discountAmt?s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:"COUPON DISC"}}),s.jsx("span",{children:`(${y.COUPON_DISCOUNT[0].discountName.toUpperCase()}) @${y.COUPON_DISCOUNT[0].discountValue}${y.COUPON_DISCOUNT[0].discountType=="RELATIVE"?"%":"AMT"}`})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(y.COUPON_DISCOUNT[0].discountAmt,o)})]}):"",(Rt=(G=y==null?void 0:y.ORDER_DISCOUNT)==null?void 0:G[0])!=null&&Rt.discountAmt?s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:I.order_disc??"ORDER DISC"}}),s.jsx("span",{children:p(y.ORDER_DISCOUNT[0].discountValue)?`@${y.ORDER_DISCOUNT[0].discountValue}${y.ORDER_DISCOUNT[0].discountType=="RELATIVE"||y.ORDER_DISCOUNT[0].discountType=="COMPLIMENTARY"?"%":"AMT"}`:""})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(y.ORDER_DISCOUNT[0].discountAmt,o)})]}):"",(rt=ue.charges)!=null&&rt.length?ue.charges.map(N=>s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:I[`charges_${N.name.toLowerCase()}`]??N.name}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(N.amt,o)})]})):"",ue.subTotal!==ue.afterCharges?s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:I.amt_before_tax}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(ue.afterCharges,o)})]}):"",(Ns=ue.taxation)!=null&&Ns.length?ue.taxation.map(N=>N.taxType==="GST"?s.jsxs(s.Fragment,{children:[s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.cgst}}),s.jsx("span",{children:" @"+N.tax/2+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(N.taxAmt/2,o)})]}),s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.sgst}}),s.jsx("span",{children:" @"+N.tax/2+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(N.taxAmt/2,o)})]})]}):s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.vat}}),s.jsx("span",{children:" @"+N.tax+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(N.taxAmt,o)})]})):"",s.jsxs("tr",{className:"font-weight-bold subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("strong",{dangerouslySetInnerHTML:{__html:I.grand_total}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(b.finalAmount,o)})]}),(js=u==null?void 0:u.custoutStandingData)!=null&&js.balanceAmt?s.jsxs(s.Fragment,{children:[s.jsxs("tr",{className:"font-weight-bold subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:I.previous_outstanding}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:U((on=b==null?void 0:b.custoutStandingData)==null?void 0:on.balanceAmt,o)})]}),s.jsxs("tr",{className:"font-weight-bold subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("strong",{dangerouslySetInnerHTML:{__html:I.total_payable}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(b.grandTotal+((vs=b==null?void 0:b.custoutStandingData)==null?void 0:vs.balanceAmt),o)})]})]}):"",b.rewardAmt?s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:I.rewards_redeemed}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(b.rewardAmt,o)})]}):"",(_s=u.paymentMethods)!=null&&_s.length?u.paymentMethods.map(N=>{var P;if(N.paidAmt)return s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:["-"," ",s.jsx("span",{dangerouslySetInnerHTML:{__html:I[`${(P=N.paymentMode)==null?void 0:P.toLowerCase()}`]??S(N.paymentMode)??"CASH"}}),s.jsx("span",{children:N.isRefund?"(Refund)":""})]}),N.isRefund?s.jsx("td",{className:"text-align-right",width:"50%",children:"("+U(N.paidAmt,o)+")"}):s.jsx("td",{className:"text-align-right",width:"50%",children:U(N.paidAmt,o)})]})}):"",b.balanceAmt&&u.balanceAmt!=0?s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:I.balance_amt}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:U(u.balanceAmt,o)})]}):"",u.balPoint&&!Number.isNaN(u.balPoint)?s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:I.reward_point_balance}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:u.balPoint})]}):"",s.jsx("tr",{className:"subtotalTr",children:s.jsxs("td",{className:"text-center",width:"100%",children:[s.jsx("hr",{}),s.jsx("strong",{children:"Authorised Signatory"})]})}),s.jsx("tr",{className:"subtotalTr",children:s.jsx("td",{colSpan:2,width:"50%",children:s.jsx("div",{className:"p-4"})})})]})})})]})]})}),s.jsx("p",{className:"single-entity-and-center f-12 mt-2 avoid-page-break",style:{marginTop:"10px"},children:`Printed By :${b.printby} Printed On: ${b.printTime}`}),b.disabledPoweredBy?"":s.jsx("p",{className:"single-entity-and-center f-12 mt-2 avoid-page-break",children:"Powered By: www.recaho.com"})]})})}else ee=s.jsx("div",{className:"main-div bill",style:{width:L[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[u.duplicateBill?s.jsx("h4",{className:"single-entity-and-center",children:"DUPLICATE BILL"}):"",s.jsx("br",{}),C&&s.jsx("div",{className:"image-bill",children:s.jsx("img",{src:C,className:"single-entity-and-center",style:{width:L[l].logoWidth}})}),s.jsxs("div",{className:`details-section ${L[l].dynamicClassname}`,children:[!C&&u.companyInfo.companyName&&u.companyInfo.companyName!=""&&s.jsx("h1",{className:"single-entity-and-center",children:u.companyInfo.companyName}),u.companyInfo.companyAddress&&u.companyInfo.companyAddress!==""&&s.jsx("h3",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:u.companyInfo.companyAddress}}),u.companyInfo.companyContact&&u.companyInfo.companyContact!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_mobile}}),": ",s.jsx("span",{children:u.companyInfo.companyContact})]})}),u.companyInfo.companyEmail&&u.companyInfo.companyEmail!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_Email}}),": ",s.jsx("span",{children:u.companyInfo.companyEmail})]})}),u.fssai&&u.fssai!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_FSSAI}}),": ",s.jsx("span",{children:u.fssai})]})}),u.gst&&u.gst!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_GST}}),": ",s.jsx("span",{children:u.gst})]})}),u.vatNo&&u.vatNo!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_VAT}}),": ",s.jsx("span",{children:u.vatNo})]})}),s.jsx("hr",{}),u.orderFrom&&s.jsx("h2",{className:"single-entity-and-center level2-bold",children:u.orderFrom}),u.area&&s.jsxs("h3",{className:"single-entity-and-center level2-bold",children:[u.area," : ",u.tableName?u.tableName:u.tableNo]}),u.tokenId&&s.jsx("h2",{className:"single-entity-and-center level2-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.token_no}})," ",s.jsx("span",{children:u.tokenId})]})}),u.parentOrderRef&&s.jsx("h4",{className:"single-entity-and-center",children:"RETURN/EXCHANGE"})]}),s.jsx("hr",{}),s.jsxs("div",{className:`details-section ${L[l].dynamicClassname} ${Se}`,children:[u.customerInfo.custName&&u.customerInfo.custName!==""&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.name}}),": ",s.jsx("span",{children:u.customerInfo.custName})]})}),u.customerInfo.custContact&&u.customerInfo.custContact!==""&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.mobile}}),": ",s.jsx("span",{children:u.customerInfo.custContact})]})}),u.customerInfo.custAddress&&u.customerInfo.custAddress!==""&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.address}}),": ",s.jsx("span",{children:u.customerInfo.custAddress})]})}),bt(u.appliedDiscounts??[],"COMPLIMENTARY","discountType").discountType&&s.jsx("h5",{className:"left-align-entity level2-bold",dangerouslySetInnerHTML:{__html:I.complementary_disc}}),u.orderId&&s.jsx("h5",{className:"left-align-entity",style:{flexShrink:0},children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.order_no}}),": ",s.jsx("span",{children:u.orderId})]})}),u.orderInfo.orderDate&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.date}}),":",s.jsx("span",{children:u.orderInfo.orderDate})]})}),u.deliveryTimestamp&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.delivery_date}}),":",s.jsx("span",{children:u.deliveryTimestamp})]})}),u.captainName&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.captain_name}}),":",s.jsx("span",{children:u.captainName})]})})]}),(cn=u.customFields)!=null&&cn.length?s.jsxs("div",{className:`details-section ${L[l].dynamicClassname}`,children:[s.jsx("hr",{}),u.customFields.map(b=>s.jsx("h4",{className:"left-align-entity",children:b.customName+": "+b.customValue}))]}):"",u.newFormat?B(u,I):W(u,I),s.jsx("br",{}),s.jsxs("div",{className:`bottom-section ${L[l].dynamicClassname}`,children:[s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h6",{className:`total-qty ${(dn=u.custoutStandingData)!=null&&dn.balanceAmt||u.rewardAmt&&u.paymentMethods&&u.paymentMethods.length>0?"level3-bold":"level2-bold"}`,style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.50rem":"1.75rem"},dangerouslySetInnerHTML:{__html:I.grand_total}}),s.jsx("h6",{className:`actual-qty ${(hn=u.custoutStandingData)!=null&&hn.balanceAmt||u.rewardAmt&&u.paymentMethods&&u.paymentMethods.length>0?"level3-bold":"level2-bold"}`,style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.40rem":"1.75rem"},children:u.curr+" "+p(u.finalAmount)})]}),(un=u.custoutStandingData)!=null&&un.balanceAmt?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{children:s.jsx("span",{dangerouslySetInnerHTML:{__html:I.previous_outstanding}})}),s.jsx("h5",{children:u.curr+" "+p(u.custoutStandingData.balanceAmt)})]}),!u.rewardAmt&&!u.paymentMethods?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h6",{className:"total-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.50rem":"1.75rem"},dangerouslySetInnerHTML:{__html:I.total_payable}}),s.jsx("h6",{className:"actual-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.40rem":"1.75rem"},children:u.curr+" "+p(u.finalAmount+u.custoutStandingData.balanceAmt)})]}):""]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h6",{className:"total-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.50rem":"1.75rem"},children:"المجموع الإجمالي"}),s.jsx("h6",{className:"actual-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.40rem":"1.75rem"}})]}):"",u.rewardAmt?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsxs("h5",{children:["- ",s.jsx("span",{dangerouslySetInnerHTML:{__html:I.rewards_redeemed}}),s.jsx("span",{children:"("+u.usedPoints+" Points)"})]}),s.jsx("h5",{children:u.curr+" "+u.rewardAmt})]}):"",u.paymentMethods&&u.paymentMethods.length?u.paymentMethods.map(b=>{var Z;if(b.paidAmt)return s.jsxs("div",{className:`bottom-section-div inline-display ${Se}`,children:[s.jsxs("h5",{children:["-",s.jsx("span",{dangerouslySetInnerHTML:{__html:I[`${(Z=b.paymentMode)==null?void 0:Z.toLowerCase()}`]??S(b.paymentMode)??"CASH"}}),s.jsx("span",{children:b.isRefund?"(Refund)":""})]}),s.jsx("h5",{children:b.isRefund?s.jsx(s.Fragment,{children:u.curr+" ("+p(b.paidAmt)+")"}):s.jsx(s.Fragment,{children:u.curr+" "+p(b.paidAmt)})})]})}):"",u.rewardAmt&&!u.paymentMethods?s.jsx(s.Fragment,{children:s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h6",{className:"total-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.50rem":"1.75rem"},dangerouslySetInnerHTML:{__html:I.total_payable}}),s.jsx("h6",{className:"actual-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.40rem":"1.75rem"},children:u.curr+" "+p(u.finalAmount+(((mn=u==null?void 0:u.custoutStandingData)==null?void 0:mn.balanceAmt)||0)-u.rewardAmt)})]})}):"",u.balanceAmt&&u.balanceAmt!=0?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{dangerouslySetInnerHTML:{__html:I.balance_amt}}),s.jsx("h5",{children:u.curr+" "+p(u.balanceAmt)})]}):"",s.jsx("hr",{})]}),u.earnPoints&&u.paymentMethods?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h6",{className:"total-qty line-gaps",children:"EARN POINTS"}),s.jsx("h6",{className:"actual-qty",children:u.earnPoints})]}):"",(u.balPoint||u.earnPoints)&&!Number.isNaN(u.balPoint||u.earnPoints)?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h6",{className:"total-qty line-gaps",dangerouslySetInnerHTML:{__html:I.reward_point_balance}}),s.jsx("h6",{className:"actual-qty",children:u.balPoint+u.earnPoints||0})]}):"",u.upiId&&u.companyInfo.companyName&&s.jsxs("div",{className:"single-entity-and-center",children:[s.jsx("h6",{style:{marginTop:"6px"},children:"Scan this QRCode to Pay"}),F(u.upiId,u.orderId,u.companyInfo.companyName,u.paidAmount)]}),u.curr==="SAR"&&r.vatNo&&s.jsxs("div",{className:"single-entity-and-center",children:[s.jsx("h6",{style:{marginTop:"6px"},children:"Scan with ZATCA app for invoice details."}),M(r.vatNo,u)]}),j?s.jsx("div",{className:"image-bill",children:s.jsx("img",{src:`${j}`,className:"single-entity-and-center",style:{width:L[l].logoWidth}})}):"",u.footerMessage?s.jsx("h4",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:u.footerMessage}}):"",u.printby&&u.printOperatorInfo?s.jsx("h6",{className:"left-align-entity",children:`Printed By:${u.printby}`}):"",u.printTime&&u.printOperatorInfo?s.jsx("h6",{className:"left-align-entity",children:`Printed On:${u.printTime}`}):"",u.disabledPoweredBy?"":s.jsx("h6",{className:"single-entity-and-center",children:"Powered By: www.recaho.com"})]})});return ee}else if(g==="PRINT_DASHBOARD"&&u.salesCollection){const ee=u.salesCollection.totalDiscountAmt?gs(u.salesCollection.grandTotal,u.salesCollection.totalDiscountAmt):null,b=u.salesCollection.totalCollection-u.salesCollection.totalTax;var k=R().format("DD/MM/YYYY LT");const Z=(fn=u.monthTillDateSalesColl)!=null&&fn.totalDiscountAmt?gs(u.monthTillDateSalesColl.grandTotal,u.monthTillDateSalesColl.totalDiscountAmt):null;return s.jsxs("div",{className:`main-div ${L[l].dynamicClassname}`,style:{width:L[l].paperSize},children:[s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsxs("div",{children:[s.jsx("p",{className:"single-entity-and-left-align",children:`Printed On:- ${k}`}),s.jsx("br",{}),s.jsx("h1",{className:"single-entity-and-center level2-bold",children:"Sales Report"}),s.jsx("p",{className:"single-entity-and-center",children:u.selectedDate})]}),s.jsx("hr",{}),u.monthTillDateSalesColl?s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center flex-two-items",children:"MTD Sales Breakup"}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"Gross Sales:"}),s.jsx("span",{children:le(u.monthTillDateSalesColl.grandTotal,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"DISCOUNT:"}),s.jsx("span",{children:`${le(u.monthTillDateSalesColl.totalDiscountAmt,o)}${Z?`(${p(Z)}%)`:""}`})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"CHARGES:"}),s.jsx("span",{children:le(u.monthTillDateSalesColl.totalOtherCharges,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"NET SALES BEFORE TAX:"}),s.jsx("span",{children:le(u.monthTillDateSalesColl.totalCollection-u.monthTillDateSalesColl.totalTax,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"TAX:"}),s.jsx("span",{children:le(u.monthTillDateSalesColl.totalTax,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"NET SALES AFTER TAX:"}),s.jsx("span",{children:le(u.monthTillDateSalesColl.totalCollection,o)})]})]}),s.jsx("hr",{})]}):"",s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center flex-two-items",children:"SALES BREAK-UP"}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"Gross Sales:"}),s.jsx("span",{children:le(u.salesCollection.grandTotal,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"DISCOUNT:"}),s.jsx("span",{children:`${le(u.salesCollection.totalDiscountAmt,o)}${ee?`(${p(ee)}%)`:""}`})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"CHARGES:"}),s.jsx("span",{children:le(u.salesCollection.totalOtherCharges,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"NET SALES BEFORE TAX:"}),s.jsx("span",{children:le(b,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"TAX:"}),s.jsx("span",{children:le(u.salesCollection.totalTax,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"NET SALES AFTER TAX:"}),s.jsx("span",{children:le(u.salesCollection.totalCollection,o)})]})]}),s.jsx("hr",{}),Be(u.otherFields.totalDiscountAmt,u.otherFields.discountList,"Discount",{action:"addCharges"}),Be(u.otherFields.totalOtherCharges,u.otherFields.otherChargesList,"Charges"),Be(u.otherFields.totalTax,u.otherFields.taxList,"Tax"),s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center",children:"BY BUSINESS"}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Total Sales:"}),s.jsx("span",{children:le(u.salesCollection.totalCollection,o)})]}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Total Orders:"}),s.jsx("span",{children:u.salesCollection.totalOrders})]}),T(u)]}),s.jsx("hr",{}),u.otherFields.totalItemType?s.jsx("div",{children:Be(u.otherFields.totalItemType,u.otherFields.itemTypeList,"Item Type",{action:"addCharges"})}):"",u.averageCollection.avgTableTime||u.averageCollection.avgorderValue||u.averageCollection.noOfGuest?s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center",children:"PERFORMANCE METRICS"}),u.averageCollection.avgTableTime?s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsxs("span",{children:["Average ",r.customLabels.Table," Time:"]}),s.jsx("span",{children:u.averageCollection.avgTableTime})]}):"",u.averageCollection.avgorderValue?s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Average Order Value:"}),s.jsx("span",{children:le(u.averageCollection.avgorderValue,o)})]}):"",u.averageCollection.noOfGuest?s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Covers:"}),s.jsx("span",{children:u.averageCollection.noOfGuest})]}):"",u.averageCollection.avgPerCover?s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Average Per Cover:"}),s.jsx("span",{children:le(u.averageCollection.avgPerCover,o)})]}):"",s.jsx("hr",{})]}):"",s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center",children:"BY PAYMENT CATEGORY"}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Total Collection:"}),s.jsx("span",{children:le(u.totalCollection,o)})]}),O(u)]}),z(u.averageCollection),u.otherFields.outstandingAmt?s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center",children:"BY PAYMENT STATUS"}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:" -- Sales:"}),s.jsx("span",{children:le(u.otherFields.salesCollection,o)})]}),u.otherFields.outstandingAmt?s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:" -- Outstanding Payment Received:"}),s.jsx("span",{children:le(u.otherFields.outstandingAmt,o)})]}):""]})]}):"",s.jsx("hr",{}),Ce(u.averageCollection.dailyExpanse)]}),s.jsx("br",{}),xs=="Android OS"&&s.jsx("div",{className:"space-3rem"})]})}else if(g==="AGGREGATOR_BILL"){let ee;return a.aggregatorOrderId&&a.aggregatorOrderId!==""&&(ee=A(a.aggregatorOrderId)),s.jsx("div",{className:"main-div bill",style:{width:L[l].paperSize},children:s.jsxs("div",{children:[s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsx("br",{}),C&&s.jsx("div",{className:"image-bill",children:s.jsx("img",{src:C,className:"single-entity-and-center",style:{width:L[l].logoWidth}})}),s.jsxs("div",{className:`details-section ${L[l].dynamicClassname}`,children:[!C&&a.companyInfo.companyName&&a.companyInfo.companyName!=""&&s.jsx("h1",{className:"single-entity-and-center",children:a.companyInfo.companyName}),a.companyInfo.companyAddress&&a.companyInfo.companyAddress!==""&&s.jsx("h3",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:a.companyInfo.companyAddress}}),a.companyInfo.companyContact&&a.companyInfo.companyContact!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_mobile}}),": ",s.jsx("span",{children:a.companyInfo.companyContact})]})}),a.companyInfo.companyEmail&&a.companyInfo.companyEmail!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_Email}}),": ",s.jsx("span",{children:a.companyInfo.companyEmail})]})}),a.fssai&&a.fssai!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_FSSAI}}),": ",s.jsx("span",{children:a.fssai})]})}),a.gst&&a.gst!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_GST}}),": ",s.jsx("span",{children:a.gst})]})}),a.vatNo&&a.vatNo!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_VAT}}),": ",s.jsx("span",{children:a.vatNo})]})}),a.orderFrom&&s.jsx("h3",{className:"single-entity-and-center level2-bold",children:a.orderFrom}),a.orderSource&&ee&&s.jsxs("h4",{className:"single-entity-and-center",children:[`${a.orderSource}: ${ee.firstDigits||""}`,s.jsxs("span",{style:{fontSize:"2rem"},children:["-",ee.last4Dgits||""]})]}),a.zomatoInstant&&s.jsx("h4",{className:"single-entity-and-center",children:a.zomatoInstant}),a.otp&&a.otp!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.delivery_code}}),": ",s.jsx("span",{children:a.otp})]})}),a.tokenId&&s.jsx("h2",{className:"single-entity-and-center level2-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.token_no}})," ",s.jsx("span",{children:a.tokenId})]})})]}),s.jsx("hr",{}),s.jsxs("div",{className:`details-section ${L[l].dynamicClassname}`,children:[a.customerInfo.custName&&a.customerInfo.custName!==""&&s.jsx("h5",{className:"left-align-entity level3-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.name}}),": ",s.jsx("span",{children:a.customerInfo.custName})]})}),a.customerInfo.custContact&&a.customerInfo.custContact!==""&&s.jsx("h5",{className:"left-align-entity level3-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.mobile}}),": ",s.jsx("span",{children:a.customerInfo.custContact})]})}),a.customerInfo.custAddress&&a.customerInfo.custAddress!==""&&s.jsx("h5",{className:"left-align-entity level3-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.address}}),": ",s.jsx("span",{children:a.customerInfo.custAddress})]})}),s.jsxs("div",{className:"flex-two-items",children:[a.orderId&&s.jsx("h5",{className:"left-align-entity level3-bold",style:{flexShrink:0},children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.order_no}}),": ",s.jsx("span",{children:a.orderId})]})}),a.orderFrom&&s.jsx("h5",{className:"single-entity-and-center",children:a.orderFrom})]}),a.orderInfo.orderDate&&s.jsx("h5",{className:"left-align-entity level3-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.date}}),":",s.jsx("span",{children:a.orderInfo.orderDate})]})}),a.deliveryTimestamp&&s.jsx("h5",{className:"left-align-entity level3-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.delivery_date}}),":",s.jsx("span",{children:a.deliveryTimestamp})]})})]})]}),s.jsx("hr",{}),s.jsxs("section",{className:"products-section",children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:"items products-heading-name-kot",children:L[l].itemName}),s.jsx("h6",{className:"items products-heading-qty-kot",children:"Qty"})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:"products-section",style:{paddingTop:"12px"},children:[((pn=a.services)==null?void 0:pn.length)&&a.services.map(Z=>{var ue;return s.jsxs("div",{style:Z.serviceName.startsWith("+ ")?{}:{paddingTop:"12px"},children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:"items products-heading-name-kot",style:{lineHeight:1.2},children:Z.serviceName.toUpperCase()}),s.jsx("h6",{className:"items products-heading-qty-kot",children:Z.qty})]}),((ue=Z.addons)==null?void 0:ue.length)&&Z.addons.map(y=>s.jsx("h6",{className:"items products-heading-addon-kot",children:"- "+Ke(y.serviceName)})),Z.instruction&&a.itemInstructionOnBill&&s.jsx("h6",{className:"left-align-entity level2-bold",children:s.jsx("h6",{className:"items products-heading-addon-kot",children:Z.instruction})})]})}),s.jsx("hr",{})]}),s.jsxs("div",{className:"bottom-section-div flex-two-items",style:{paddingBottom:"3rem"},children:[s.jsxs("h5",{children:["TOTAL ITEMS: ",a.services.length]}),s.jsxs("h5",{children:["TOTAL QTY: ",_e(a.totalQty)]})]}),a&&a.discountAmt?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{children:"DISCOUNT AMOUNT"}),s.jsx("h5",{children:le(a.discountAmt,o)})]}):"",a.otherCharges&&a.otherCharges.length>0?a.otherCharges.map(Z=>{if(Z.amt)return s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{children:Z.name}),s.jsx("h5",{children:a.curr+" "+p(Z.amt)})]})}):"",a.taxObj&&a.taxObj.GST?s.jsx(s.Fragment,{children:a.taxObj.GST.map(Z=>{let ue=new Array;for(const y in Z)if(Z[y]&&Z[y]!=0){let N=y/2;ue.push(s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bottom-section-div",children:[s.jsxs("h5",{children:["CGST @",N]}),s.jsx("h5",{children:a.curr+" "+p(Z[y]/2)})]}),s.jsxs("div",{className:"bottom-section-div",children:[s.jsxs("h5",{children:[u.taxLabel+" "," @",N,"%"]}),s.jsx("h5",{children:a.curr+" "+p(Z[y]/2)})]})]}))}return ue})}):"",s.jsx("div",{style:{marginTop:"6px"},children:(Kt=a.customFeilds)==null?void 0:Kt.map(Z=>s.jsx("h4",{className:"left-align-entity",children:Z.customName+": "+Z.customValue}))}),a.paymentState&&s.jsx("h4",{className:"single-entity-and-center",style:{marginTop:"6px"},children:`Payment Status: ${a.paymentState=="PAID_ONLINE"?"Online paid":"COD"}`}),j?s.jsx("div",{className:"image-bill",children:s.jsx("img",{src:`${j}`,className:"single-entity-and-center",style:{width:L[l].logoWidth}})}):"",a.footerMessage?s.jsx("h4",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:a.footerMessage}}):"",a.printedBy&&a.printOperatorInfo?s.jsx("h6",{className:"left-align-entity",children:`Printed By: ${a.printedBy}`}):"",a.printTime&&a.printOperatorInfo?s.jsx("h6",{className:"left-align-entity",children:`Printed On: ${a.printTime}`}):"",a.disabledPoweredBy?"":s.jsx("h6",{className:"single-entity-and-center",children:"Powered By: www.recaho.com"})]})})}else if(g==="UPDATE_TABLE"){let ee="";return a.action==="SWITCH_TABLE"?ee=s.jsx("div",{className:"main-div",style:{width:"100%",height:"auto"},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:["**",(bs=d.Table)==null?void 0:bs.toUpperCase()," SWITCH**"]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"From"}),s.jsx("h5",{className:"left-align-entity level3-bold",children:(Nt=a.from)==null?void 0:Nt.map((b,Z)=>{var ue,y,N;return`${(y=(ue=e.tableData[b])==null?void 0:ue.attachedArea)==null?void 0:y.toUpperCase()} - ${(N=e.tableData[b])==null?void 0:N.tableName}${Z+1===a.from.length?"":", "} `})}),s.jsx("br",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"To"}),s.jsx("h2",{className:"left-align-entity level2-bold",children:`${(Zt=(Qt=e.tableData[a.to[0]])==null?void 0:Qt.attachedArea)==null?void 0:Zt.toUpperCase()} - ${(Ss=e.tableData[a.to[0]])==null?void 0:Ss.tableName}`}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Running ",`${d.KOT}`,"s: ",Object.keys(a.activeKots).join(", ")]})]})}):ee=s.jsx("div",{className:"main-div",style:{width:"100%",height:"auto"},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:["**MERGE ",(yn=d.Table)==null?void 0:yn.toUpperCase(),"**"]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"From"}),s.jsx("h5",{className:"left-align-entity level3-bold",children:(Ts=a.from)==null?void 0:Ts.map((b,Z)=>{var ue,y,N;return`${(y=(ue=e.tableData[b])==null?void 0:ue.attachedArea)==null?void 0:y.toUpperCase()} - ${(N=e.tableData[b])==null?void 0:N.tableName}${Z+1===a.from.length?"":", "} `})}),s.jsx("br",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"To"}),s.jsx("h2",{className:"left-align-entity level2-bold",children:`${(ws=(gn=e.tableData[a.to[0]])==null?void 0:gn.attachedArea)==null?void 0:ws.toUpperCase()} - ${(Is=e.tableData[a.to[0]])==null?void 0:Is.tableName}`}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Running ",`${d.KOT}`,"s: ",Object.keys(a.activeKots).join(", ")]})]})}),ee}else if(g==="COUNTER_OPERATION"){let ee;return l=="2INCH"||l=="1.8INCH"?ee=s.jsx("div",{className:"main-div",style:{width:L[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:[a.counterName," Report"]}),s.jsxs("h6",{className:"single-entity-and-center level3-bold",children:[" Printed By: ",a.printedBy," "]}),s.jsxs("h6",{className:"single-entity-and-center level3-bold",children:[" Printed On: ",a.printedOn," "]}),s.jsx("hr",{}),s.jsxs("h4",{className:"left-align-entity level3-bold",children:[" Total Sales: ",U(a.totalSale,o)," "]}),a.totalSale>0&&s.jsxs(s.Fragment,{children:[(a.cashSale>0||a.cashSale<0)&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Cash: ",U(a.cashSale,o)," "]}),a.payModes&&a.payModes.length>0&&a.payModes.map(b=>{if(b.value>0||b.value<0)return s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- ",b.displayName," : ",U(b.value,o)]})})]}),s.jsxs("h4",{className:"left-align-entity level3-bold",children:["Cash Balance: ",U(a.closingActualBalance,o)]}),s.jsx("hr",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"Opening Counter Operation"}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Opened By : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.openedBy]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Date/Time : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.openingDateTime]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- System Opening Balance : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",U(a.openingBalance,o)," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Actual Opening Balance : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",U(a.actualOpeningBalance,o)]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Opening Difference Amt : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",U(a.openingShort,o)," "]}),a.openingShortReason&&s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Opening Difference Reason : "}),a.openingShortReason&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.openingShortReason]}),a.openingTotalDenomations>0&&s.jsx(s.Fragment,{children:s.jsx("h5",{className:"left-align-entity level3-bold",children:"-- Currency Denominations"})}),a.openingDenominations&&a.openingDenominations.length>0&&a.openingDenominations.map(b=>s.jsxs("div",{class:o=="INR"?"denomination-container":"denomination-container-other-country",children:[s.jsxs("h5",{className:"left-align-entity level3-bold",children:["   ",o=="INR"?U(b.denomination,o):b.denomination]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" X "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",b.count," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",U(b.total,o)," "]})]})),a.openingTotalDenomations>0&&s.jsxs("div",{class:o=="INR"?"total-container":"total-container-other-country",children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" Total "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:U(a.openingTotalDenomations,o)})]}),s.jsx("hr",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"Closing Counter Operation"}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Closed By : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.closedBy," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Date/Time :"}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.closingDateTime]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Cash Sale : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",U(a.cashSale,o)," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- System Closing Balance : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",U(a.closingBalance,o)," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Actual Closing Balance : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["   ",U(a.closingActualBalance,o)]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Closing Difference Amt : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",U(a.closingShort,o)," "]}),a.closingShortReason&&s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Closing Difference Reason : "}),a.closingShortReason&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.closingShortReason," "]}),a.debitEntry>0&&s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Other Cash Expense : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    -",U(a.debitEntry,o)," "]})]}),a.creditEntry>0&&s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Other Cash Income : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    +",U(a.creditEntry,o)," "]})]}),a.internalTransferDebit>0&&s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Internal Transfer(cash to bank): "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["   -",U(a.internalTransferDebit,o)]})]}),a.internalTransferCredit>0&&s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Internal Transfer(bank to cash) : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["   +",U(a.internalTransferCredit,o)]})]}),a.TotalDenomationsAmount>0&&s.jsx(s.Fragment,{children:s.jsx("h5",{className:"left-align-entity level3-bold",children:"-- Currency Denominations"})}),a.denomations&&a.denomations.length>0&&a.denomations.map(b=>s.jsxs("div",{class:o=="INR"?"denomination-container":"denomination-container-other-country",children:[s.jsxs("h5",{className:"left-align-entity level3-bold",children:["  ",o=="INR"?U(b.denomination,o):b.curr+" "+b.denomination]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" X "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",b.count," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",U(b.total,o)," "]})]})),a.TotalDenomationsAmount>0&&s.jsxs("div",{class:o=="INR"?"total-container":"total-container-other-country",children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" Total "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:U(a.TotalDenomationsAmount,o)})]})]})}):ee=s.jsx("div",{className:"main-div",style:{width:L[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:[a.counterName," Report"]}),s.jsxs("h6",{className:"single-entity-and-center level3-bold",children:[" Printed By: ",a.printedBy," "]}),s.jsxs("h6",{className:"single-entity-and-center level3-bold",children:[" Printed On: ",a.printedOn," "]}),s.jsx("hr",{}),s.jsxs("h4",{className:"left-align-entity level3-bold",children:[" Total Sales: ",U(a.totalSale,o)," "]}),a.totalSale>0&&s.jsxs(s.Fragment,{children:[a.cashSale>0&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Cash: ",U(a.cashSale,o)," "]}),a.payModes&&a.payModes.length>0&&a.payModes.map(b=>{if(b.value>0)return s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- ",b.displayName," : ",U(b.value,o)]})})]}),s.jsxs("h4",{className:"left-align-entity level3-bold",children:["Cash Balance: ",U(a.closingActualBalance,o)]}),s.jsx("hr",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"Opening Counter Operation"}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Opened By : ",a.openedBy]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Date/Time : ",a.openingDateTime]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- System Opening Balance : ",U(a.openingBalance,o)]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Actual Opening Balance : ",U(a.actualOpeningBalance,o)]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Opening Difference Amt : ",U(a.openingShort,o)]}),a.openingShortReason&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Opening Difference Reason : ",a.openingShortReason]}),a.openingTotalDenomations>0&&s.jsx(s.Fragment,{children:s.jsx("h5",{className:"left-align-entity level3-bold",children:"-- Currency Denominations"})}),a.openingDenominations&&a.openingDenominations.length>0&&a.openingDenominations.map(b=>s.jsxs("div",{class:o=="INR"?"denomination-container":"denomination-container-other-country",children:[s.jsxs("h5",{className:"left-align-entity level3-bold",children:["   ",o=="INR"?U(b.denomination,o):b.denomination]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" X "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",b.count," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",U(b.total,o)," "]})]})),a.openingTotalDenomations>0&&s.jsxs("div",{class:o=="INR"?"total-container":"total-container-other-country",children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" Total "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:U(a.openingTotalDenomations,o)})]}),s.jsx("hr",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"Closing Counter Operation"}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Closed By : ",a.closedBy," "]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Date/Time : ",a.closingDateTime]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Cash Sale : ",U(a.cashSale,o)," "]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- System Closing Balance : ",U(a.closingBalance,o)]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Actual Closing Balance : ",U(a.closingActualBalance,o)]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Closing Difference Amt : ",U(a.closingShort,o)]}),a.closingShortReason&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Closing Difference Reason : ",a.closingShortReason," "]}),a.debitEntry>0&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Other Cash Expense : -",U(a.debitEntry,o)]}),a.creditEntry>0&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Other Cash Income : +",U(a.creditEntry,o)]}),a.internalTransferDebit>0&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Internal Transfer(cash to bank): -",U(a.internalTransferDebit,o)]}),a.internalTransferCredit>0&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Internal Transfer(bank to cash): +",U(a.internalTransferCredit,o)]}),a.TotalDenomationsAmount>0&&s.jsx(s.Fragment,{children:s.jsx("h5",{className:"left-align-entity level3-bold",children:"--Currency Denominations"})}),a.denomations&&a.denomations.length>0&&a.denomations.map(b=>s.jsxs("div",{class:o=="INR"?"denomination-container":"denomination-container-other-country",children:[s.jsxs("h5",{className:"left-align-entity level3-bold",children:["  ",o=="INR"?U(b.denomination,o):b.curr+" "+b.denomination]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" X "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",b.count," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",U(b.total,o)," "]})]})),a.TotalDenomationsAmount>0&&s.jsxs("div",{class:o=="INR"?"total-container":"total-container-other-country",children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" Total "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:U(a.TotalDenomationsAmount,o)})]})]})}),ee}else if(g==="ITEMWISE_SALES_COUNTER"){let ee,{counterDetails:b}=e.printerDataObject;return ee=s.jsx("div",{className:"main-div",style:{width:L[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsx("h2",{className:"single-entity-and-center level2-bold",children:"Item Wise Sales Report"}),s.jsx("h5",{className:"single-entity-and-center level3-bold",children:b.currentDate}),s.jsx("hr",{}),b.CounterName&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Counter Name: ",b.CounterName]}),b.CounterName&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["UserName: ",b.openedBy]}),b.CounterName&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Login Time: ",b.loginTime]}),b.logoutTime&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Logout Time: ",b.logoutTime]}),b.CounterName&&s.jsx("hr",{}),st(a),s.jsx("hr",{}),s.jsx("h6",{className:"left-align-entity",children:`Printed By: ${b.openedBy}`}),s.jsx("h6",{className:"left-align-entity",children:`Printed On: ${b.printedOn}`})]})}),ee}else if(g==="CARD_RECHARGE_DETAILS"){let{staticDataKOT:ee}=e.printerDataObject;return getRechargeDetails(ee)}else if(g==="PACKAGING_SLIP"){let ee,b=0;u.aggregatorOrderId&&u.aggregatorOrderId!==""&&(ee=A(u.aggregatorOrderId));const Z=u.services;for(let y in Z)b+=Z[y].length;return s.jsx("div",{className:"main-div",style:{width:L[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsx("br",{}),s.jsxs("div",{className:`details-section ${L[l].dynamicClassname}`,children:[u.subOrderFrom&&s.jsx("h4",{className:"single-entity-and-center",children:u.subOrderFrom.toUpperCase()}),u.orderFrom!=="dine-in"&&s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:["Token No ",u.tokenId]}),u.tableName&&s.jsx("h2",{className:"single-entity-and-center level2-bold",children:u.tableName}),u.otp&&s.jsx("h4",{className:"single-entity-and-center level2-bold",children:"OTP: "+u.otp}),u.orderSource&&ee&&s.jsxs("h4",{className:"single-entity-and-center level2-bold",children:[`${u.orderSource}: ${ee.firstDigits||""}`,s.jsx("span",{style:{fontSize:"2rem"},children:ee.last4Dgits||""})]}),u.zomatoInstant&&s.jsx("h4",{className:"single-entity-and-center level2-bold",children:u.zomatoInstant}),s.jsx("hr",{}),u.orderId&&s.jsx("h5",{className:"left-align-entity level3-bold",children:"Order Id: "+u.orderId}),u.date&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Printed On: ",u.date]}),u.prepareBy?s.jsx("h5",{className:"left-align-entity level3-bold",children:"Prepare By : "+u.prepareBy}):"",u.waiterName&&s.jsx("h5",{className:"left-align-entity level3-bold",children:`${d.Waiter} Name: `+u.waiterName})]}),me(u),s.jsx("br",{}),s.jsxs("div",{className:"bottom-section-div flex-two-items space-3rem",children:[s.jsxs("h5",{children:["TOTAL ITEMS: ",b]}),s.jsxs("h5",{children:["TOTAL QTY: ",_e(u.totalQty)]})]}),(xn=u.customFields)==null?void 0:xn.map(y=>s.jsx("h4",{className:"left-align-entity",children:y.customName+": "+y.customValue})),s.jsx("br",{}),u.orderFrom!=="dine-in"&&s.jsxs("h4",{className:"left-align-entity level3-bold",children:["Payment Status: ",u.paymentStatus.replace("_"," ")]})]})})}else{if(g==="ORDER_AGGREGATED_PRINT")return s.jsx("div",{className:"main-div",style:{width:L[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[a.logo&&s.jsx("div",{className:"image-bill",children:s.jsx("img",{src:a.logo,className:"single-entity-and-center"})}),s.jsxs("div",{className:`details-section ${L[l].dynamicClassname}`,children:[!a.logo&&a.companyName&&a.companyName!=""&&s.jsx("h1",{className:"single-entity-and-center",children:a.companyName}),a.companyAddress&&a.companyAddress!==""&&s.jsx("h3",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:a.companyAddress}}),a.companyContact&&a.companyContact!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_mobile}}),": ",s.jsx("span",{children:a.companyContact})]})}),a.fssai&&a.fssai!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_FSSAI}}),": ",s.jsx("span",{children:a.fssai})]})}),a.gst&&a.gst!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_GST}}),": ",s.jsx("span",{children:a.gst})]})}),a.vatNo&&a.vatNo!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.company_VAT}}),": ",s.jsx("span",{children:a.vatNo})]})})]}),s.jsx("hr",{}),s.jsx("h3",{className:"single-entity-and-center",children:"Outstanding Bill Summary"}),s.jsx("hr",{}),s.jsx("hr",{}),a.name&&s.jsxs("h5",{children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.name}}),": ",s.jsx("span",{children:a.name})]}),a.mobile&&s.jsxs("h5",{children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.mobile}}),": ",s.jsx("span",{children:a.mobile})]}),s.jsxs("div",{className:"mt-2",children:[s.jsx("hr",{}),s.jsx("section",{className:"products-section",children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h5",{className:`items products-heading-name ${L[l].dynamicClassname}`,children:"Date"}),s.jsx("h5",{className:`items products-heading-orderId ${L[l].dynamicClassname}`,children:"Order Id"}),s.jsx("h5",{className:`items products-heading-amount ${L[l].dynamicClassname}`,children:"Amount"})]})}),s.jsx("hr",{}),s.jsx("section",{className:"products-section",children:a.orders.map(b=>s.jsx("div",{style:{paddingTop:"12px"},children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name ${L[l].dynamicClassname}`,children:sr(b.date)}),s.jsx("h6",{className:`items products-heading-orderId ${L[l].dynamicClassname}`,children:b.orderId}),s.jsx("h6",{className:`items products-heading-amount ${L[l].dynamicClassname}`,children:a.curr+" "+p(b.finalAmount)})]})},b.orderId))})]}),s.jsxs("div",{children:[s.jsx("hr",{}),s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:"Total Bill Amount"}),s.jsx("h5",{className:"actual-qty",children:a.curr+" "+p(a.totalAmount)})]}),s.jsx("hr",{}),s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:"Total Amount Paid"}),s.jsx("h5",{className:"actual-qty",children:a.curr+" "+p(a.totalPaid)})]})]}),(Nn=a.transactions)!=null&&Nn.length?s.jsxs("div",{children:[s.jsx("hr",{}),s.jsx("section",{className:"products-section",children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h5",{className:`items products-heading-name ${L[l].dynamicClassname}`,children:"Date"}),s.jsx("h5",{className:`items products-heading-orderId ${L[l].dynamicClassname}`,children:"Payment Mode"}),s.jsx("h5",{className:`items products-heading-amount ${L[l].dynamicClassname}`,children:"Amount"})]})}),s.jsx("hr",{}),s.jsx("section",{className:"products-section",children:a.transactions.map(b=>s.jsx("div",{style:{paddingTop:"12px"},children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name ${L[l].dynamicClassname}`,children:b.date}),s.jsx("h6",{className:`items products-heading-orderId ${L[l].dynamicClassname}`,children:b.paymentMode}),s.jsx("h6",{className:`items products-heading-amount ${L[l].dynamicClassname}`,children:a.curr+" "+p(b.amount)})]})},b.id))})]}):"",s.jsxs("div",{className:"mt-2 pb-2rem",children:[s.jsx("hr",{}),s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h4",{className:"total-qty-other",children:"Total Payable"}),s.jsx("h4",{className:"actual-qty-other",children:a.curr+" "+p(a.totalPayable)})]})]})]})});{let ee,b=0,Z,ue;for(let N=0;N<(((Cs=a.services)==null?void 0:Cs.length)||0);N++)ue=a.services[N],ue.status==="CANCELLED"&&!a.onlyCancelledItems&&(b+=ue.qty);return a.aggregatorOrderId&&a.aggregatorOrderId!==""&&(ee=A(a.aggregatorOrderId)),s.jsx("div",{className:"main-div",style:{width:L[l].paperSize},children:s.jsxs("div",{style:{maxWidth:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsx("br",{}),s.jsxs("div",{className:"main-div",children:[a.duplicate&&!a.onlyCancelledItems?s.jsx("h4",{className:"single-entity-and-center",children:"DUPLICATE KOT"}):"",b||a.onlyCancelledItems?s.jsx("h4",{className:"single-entity-and-center",children:"EDITED KOT - ITEM CANCELLED"}):"",a.station&&s.jsx("h4",{className:"single-entity-and-center level2-bold",children:a.station.toUpperCase()}),a.subOrderFrom&&s.jsx("h4",{className:"single-entity-and-center",children:a.subOrderFrom.toUpperCase()}),a.type!="dine-in"&&a.tokenId&&s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:["Token No ",a.tokenId]}),a.type=="dine-in"&&a.type&&s.jsx("h2",{className:"single-entity-and-center level2-bold",children:a.type==="dine-in"?a.tableName?a.tableName:"-":""}),s.jsx("hr",{}),a.otp&&s.jsx("h4",{className:"single-entity-and-center level2-bold",children:"OTP: "+a.otp}),a.orderSource&&ee&&s.jsxs("h4",{className:"single-entity-and-center level2-bold",children:[`${a.orderSource}: ${ee.firstDigits||""}`,s.jsx("span",{style:{fontSize:"2rem"},children:ee.last4Dgits||""})]}),a.zomatoInstant&&s.jsx("h4",{className:"single-entity-and-center level2-bold",children:a.zomatoInstant}),s.jsxs("div",{className:"details-section",children:[a.orderId&&s.jsx("h5",{className:"left-align-entity level3-bold",children:"Order Id: "+Array.from(a.orderId).join(", ")}),s.jsxs("div",{className:"flex-container-kot",children:[a.kotId&&s.jsx("h5",{className:"left-align-entity level3-bold",children:`${d.KOT} Id: `+Array.from(a.kotId).join(", ")}),a.type&&a.type!="dine-in"&&s.jsx("h2",{className:"left-align-entity",children:a.type==="dine-in"?a.tableName?a.tableName:"-":""})]}),a.customerName&&s.jsx("h5",{className:"left-align-entity level3-bold",children:a.customerName}),a.time?s.jsx("h5",{className:"left-align-entity level3-bold",children:"Printed On : "+a.time}):"",a.prepareBy?s.jsx("h5",{className:"left-align-entity level3-bold",children:"Prepare By : "+a.prepareBy}):""]}),a.createdBy&&s.jsx("h5",{className:"left-align-entity level3-bold",children:"Printed By: "+a.createdBy}),a.waiterName&&s.jsx("h5",{className:"left-align-entity level3-bold",children:`${d.Waiter} Name: `+a.waiterName})]}),s.jsx("hr",{}),s.jsxs("section",{className:`products-section ${Se}`,children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h5",{className:"items products-heading-name-kot",children:L[l].itemName}),s.jsx("h5",{className:"items products-heading-qty-kot",children:"QTY"})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:`products-section ${Se}`,style:{paddingTop:"12px"},children:[a.services&&a.services.length&&a.services.length>0&&a.services.reverse().map(N=>(N.status==="CANCELLED"?Z=s.jsxs("strike",{children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h2",{className:"items products-heading-name-kot ",children:Ke(N.serviceName)}),s.jsx("h2",{className:"items products-heading-qty-kot ",children:N.qty})]}),N.addons&&N.addons.length&&N.addons.map(P=>s.jsx("h2",{className:"items products-heading-addon-kot",children:"- "+Ke(P.serviceName)})),N.instruction&&s.jsx("h4",{className:"left-align-entity level2-bold",children:s.jsx("h4",{className:"items products-heading-addon-kot",children:" "+N.instruction})})]}):Z=s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h2",{className:"items products-heading-name-kot ",children:Ke(N.serviceName)}),s.jsx("h2",{className:"items products-heading-qty-kot ",children:N.qty})]}),N.addons&&N.addons.length&&N.addons.map(P=>s.jsx("h2",{className:"items products-heading-addon-kot",children:"- "+Ke(P.serviceName)})),N.instruction&&s.jsx("h4",{className:"left-align-entity level2-bold",children:s.jsx("h4",{className:"items products-heading-addon-kot",children:" "+N.instruction})})]}),s.jsx("div",{children:Z}))),s.jsx("hr",{})]}),s.jsxs("div",{className:"bottom-section-div flex-two-items",style:{paddingBottom:"3rem"},children:[s.jsxs("h5",{className:"level3-bold",children:["TOTAL ITEMS: ",a.services.length]}),s.jsxs("h5",{className:"level3-bold",children:["TOTAL QTY: ",_e(a.totalQty-b)]})]}),(Os=a.customFields)==null?void 0:Os.map(N=>s.jsx("h4",{className:"left-align-entity",children:N.customName+": "+N.customValue})),a.deliveryTimestamp&&s.jsx("h5",{className:"left-align-entity level3-bold",children:"Delivery Date: "+a.deliveryTimestamp})]})})}}};return s.jsx("div",{children:a&&Object.keys(a).length!==0&&s.jsx("div",{id:"domEl",ref:n,className:"html-bill-print",style:{maxWidth:L[l].paperSize,zIndex:"-10",backgroundColor:"#fff"},children:pt(f,a.obj,a.companyLogo,a.companyQrCode)})})},Oh=async(e,t,n,r={})=>new Promise(async(i,a)=>{var h,f,o;try{const{needPackagingSlip:l=!0}=r;e.primaryWaiter&&n&&(e.primaryWaiter=((h=n[e.primaryWaiter])==null?void 0:h.name)||null);const{obj:c,printersMap:d}=_d(e,t,r);let m=[],p=[];const x=_a(c).flatMap(v=>{var _;return(_=d[v.station])==null?void 0:_.map(w=>new Promise(T=>s.jsx(tt,{printerDataObject:{staticDataKOT:v,paperSize:w.paperSize,printer:w.printer},newId:v.newId,value:{settingData:t},onImageGenerated:O=>{m.push({paperSize:w.paperSize,printer:w.printer,image:O,type:"KOT"}),T()},additionalActions:r},v.newId)))});if(l&&((f=t.packagingSlipPrinters)!=null&&f.length)){const v=bd(e,t,r);(o=v.printers)!=null&&o.length&&v.printers.forEach(_=>{p.push(new Promise(w=>{x.push(s.jsx(tt,{printerDataObject:{staticDataKOT:{obj:_.obj},paperSize:_.paperSize,printer:_.printer,type:"PACKAGING_SLIP"},newId:_.obj.newId,value:{settingData:t},onImageGenerated:T=>{m.push({paperSize:_.paperSize,printer:_.printer,image:T,type:"PACKAGING_SLIP"}),w()},additionalActions:r},_.obj.newId))}))})}x.length&&ft("root2",x),await Promise.all(p),i(m)}catch(l){a(l)}}),Mh=(e,t,n)=>new Promise(async(r,i)=>{try{const{tableData:a}=n;let h=[],f=[];if(n!=null&&n.action){const{obj:o,paperSize:l,printersMap:c}=Sd(e,t,n),d=_a(o).flatMap(m=>{var p;return(p=c[m.station])==null?void 0:p.map(x=>new Promise(v=>{const _=s.jsx(tt,{printerDataObject:{staticDataKOT:m,paperSize:l,printer:x.printer,type:m.type},newId:m.newId,settingData:t,tableData:ms(a,"typeValue"),onImageGenerated:w=>{h.push({paperSize:x.paperSize,printer:x.printer,image:w,type:"UPDATE_TABLE"}),v()},additionalActions:n});return f.push(v),_}))});d.length&&ft("root1",d),await Promise.all(f.map(m=>new Promise(m)))}r(h)}catch(a){i(a)}}),Ah=(e,t)=>new Promise(async(n,r)=>{try{const i=Td(e,t);let a=[];await new Promise(f=>{const o=s.jsx(tt,{printerDataObject:{staticDataKOT:{obj:i},paperSize:e.printerSize,type:"PRINT_DASHBOARD"},newId:i.id,settingData:e,onImageGenerated:l=>{a.push({paperSize:e.printerSize,image:l,type:"PRINT_DASHBOARD"}),f()},additionalActions:t});ft("root1",o)}),n(a)}catch(i){r(i)}}),Eh=async(e,t,n)=>new Promise(async(r,i)=>{try{const{obj:a}=await wd(e,t,n);let h=[];await new Promise(o=>{const l=s.jsx(tt,{printerDataObject:{staticDataKOT:a,paperSize:a.paperSize,type:"AGGREGATOR_BILL"},newId:Math.random(),settingData:t,onImageGenerated:c=>{h.push({paperSize:a.paperSize,image:c,type:"AGGREGATOR_BILL"}),o()},additionalActions:n});ft("root1",l)}),r(h)}catch(a){i(a)}}),Rh=async(e,t,n)=>new Promise(async(r,i)=>{try{let a=await va(e,t,n),h=[];await new Promise(o=>{const l=s.jsx(tt,{printerDataObject:{staticDataKOT:a,paperSize:a.paperSize,type:"BILL"},newId:Math.random(),settingData:t,onImageGenerated:c=>{h.push({paperSize:a.paperSize,image:c,type:"BILL"}),o()},additionalActions:n});ft("root1",l)}),r(h)}catch(a){i(a)}}),kh=async(e,t,n,r)=>new Promise(async(i,a)=>{try{let h=await Id(e);if(h&&Object.keys(h.Category).length!==0){let o=`ItemWiseSales:::${Math.floor(Math.random()*1e3)}`,l=[];await new Promise(d=>{const m=s.jsx(tt,{printerDataObject:{staticDataKOT:h,paperSize:t.printerSize,type:"ITEMWISE_SALES_COUNTER",counterDetails:n},newId:o,settingData:t,onImageGenerated:p=>{l.push({paperSize:t.printerSize,image:p,type:"ITEMWISE_SALES_COUNTER"}),d()},additionalActions:r});ft("root1",m)}),i(l)}else i([])}catch(h){a(h)}}),Lh=async(e,t,n)=>new Promise(async(r,i)=>{try{let h=`counterDetailsPrint:::${Math.floor(Math.random()*1e3)}`,f=[];await new Promise(l=>{const c=s.jsx(tt,{printerDataObject:{staticDataKOT:e,paperSize:t.printerSize,type:"COUNTER_OPERATION"},newId:h,settingData:t,onImageGenerated:d=>{f.push({paperSize:t.printerSize,image:d,type:"COUNTER_OPERATION"}),l()},additionalActions:n});ft("root1",c)}),r(f)}catch(a){i(a)}}),Ph=async(e,t,n={},r={})=>new Promise(async(i,a)=>{var h;try{const f=await Od(e,t);let o=[],l=ir(null,{fontTheme:t.fontTheme,type:"ORDER_AGGREGATED_PRINT",siteSetting:t}),c=l?(h=l[0])==null?void 0:h.paperSize:t.printerSize;await new Promise(m=>{const p=s.jsx(tt,{printerDataObject:{staticDataKOT:{...f,name:n.name,mobile:n.mobile},paperSize:c,type:"ORDER_AGGREGATED_PRINT"},newId:Math.random(),settingData:t,onImageGenerated:x=>{o.push({paperSize:c,image:x,type:"ORDER_AGGREGATED_PRINT"}),m()},additionalActions:r});ft("root1",p)}),i(o)}catch(f){a(f)}}),Fh=async(e,t,n={})=>new Promise(async(r,i)=>{var a;try{const h=[];let f=[];for(let o=0;o<e.length;o++){let l=e[o];if((a=l.invoiceFormats)!=null&&a.length){let c=od(l.invoiceFormats,"createdAt")[0],d=await Md(c);await new Promise(p=>{const x=s.jsx(tt,{printerDataObject:{staticDataKOT:d,paperSize:d.paperSize,type:"BILL"},newId:Math.random(),settingData:t,onImageGenerated:v=>{f.push({paperSize:d.paperSize,image:v,type:"BILL"}),p()},additionalActions:n});h.push(x)})}}h.length&&ft("root1",h),r(f)}catch(h){i(h)}}),ft=(e,t)=>{const n=document.getElementById(e);n&&ai.createRoot(n).render(t)};Oe.counterDetailsPrint=Lh,Oe.handleAggregatorBillPrint=Eh,Oe.handleBillPrint=Rh,Oe.handleDashboardPrint=Ah,Oe.handleItemWisePrint=kh,Oe.handleKOTPrint=Oh,Oe.handleOldBillPrints=Fh,Oe.handleSummaryPrint=Ph,Oe.handleUpdateTablePrint=Mh,Object.defineProperty(Oe,Symbol.toStringTag,{value:"Module"})});
54
+ */var Ba={L:qt.QrCode.Ecc.LOW,M:qt.QrCode.Ecc.MEDIUM,Q:qt.QrCode.Ecc.QUARTILE,H:qt.QrCode.Ecc.HIGH},Wa=128,za="L",Ga="#FFFFFF",Va="#000000",qa=!1,mr=4,Sh=.1;function Ka(e,t=0){const n=[];return e.forEach(function(r,i){let a=null;r.forEach(function(h,f){if(!h&&a!==null){n.push(`M${a+t} ${i+t}h${f-a}v1H${a+t}z`),a=null;return}if(f===r.length-1){if(!h)return;a===null?n.push(`M${f+t},${i+t} h1v1H${f+t}z`):n.push(`M${a+t},${i+t} h${f+1-a}v1H${a+t}z`);return}h&&a===null&&(a=f)})}),n.join("")}function Qa(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((i,a)=>a<t.x||a>=t.x+t.w?i:!1))}function Za(e,t,n,r){if(r==null)return null;const i=n?mr:0,a=e.length+i*2,h=Math.floor(t*Sh),f=a/t,o=(r.width||h)*f,l=(r.height||h)*f,c=r.x==null?e.length/2-o/2:r.x*f,d=r.y==null?e.length/2-l/2:r.y*f;let p=null;if(r.excavate){let m=Math.floor(c),x=Math.floor(d),v=Math.ceil(o+c-m),b=Math.ceil(l+d-x);p={x:m,y:x,w:v,h:b}}return{x:c,y:d,h:l,w:o,excavation:p}}var Th=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function wh(e){const t=e,{value:n,size:r=Wa,level:i=za,bgColor:a=Ga,fgColor:h=Va,includeMargin:f=qa,style:o,imageSettings:l}=t,c=ur(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),d=l==null?void 0:l.src,p=je.useRef(null),m=je.useRef(null),[x,v]=je.useState(!1);je.useEffect(()=>{if(p.current!=null){const S=p.current,M=S.getContext("2d");if(!M)return;let P=qt.QrCode.encodeText(n,Ba[i]).getModules();const O=f?mr:0,z=P.length+O*2,K=Za(P,r,f,l),se=m.current,Q=K!=null&&se!==null&&se.complete&&se.naturalHeight!==0&&se.naturalWidth!==0;Q&&K.excavation!=null&&(P=Qa(P,K.excavation));const ie=window.devicePixelRatio||1;S.height=S.width=r*ie;const Ce=r/z*ie;M.scale(Ce,Ce),M.fillStyle=a,M.fillRect(0,0,z,z),M.fillStyle=h,Th?M.fill(new Path2D(Ka(P,O))):P.forEach(function(W,q){W.forEach(function(B,fe){B&&M.fillRect(fe+O,q+O,1,1)})}),Q&&M.drawImage(se,K.x+O,K.y+O,K.w,K.h)}}),je.useEffect(()=>{v(!1)},[d]);const b=ys({height:r,width:r},o);let w=null;return d!=null&&(w=je.createElement("img",{src:d,key:d,style:{display:"none"},onLoad:()=>{v(!0)},ref:m})),je.createElement(je.Fragment,null,je.createElement("canvas",ys({style:b,height:r,width:r,ref:p},c)),w)}function Ih(e){const t=e,{value:n,size:r=Wa,level:i=za,bgColor:a=Ga,fgColor:h=Va,includeMargin:f=qa,imageSettings:o}=t,l=ur(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let c=qt.QrCode.encodeText(n,Ba[i]).getModules();const d=f?mr:0,p=c.length+d*2,m=Za(c,r,f,o);let x=null;o!=null&&m!=null&&(m.excavation!=null&&(c=Qa(c,m.excavation)),x=je.createElement("image",{xlinkHref:o.src,height:m.h,width:m.w,x:m.x+d,y:m.y+d,preserveAspectRatio:"none"}));const v=Ka(c,d);return je.createElement("svg",ys({height:r,width:r,viewBox:`0 0 ${p} ${p}`},l),je.createElement("path",{fill:a,d:`M0,0 h${p}v${p}H0z`,shapeRendering:"crispEdges"}),je.createElement("path",{fill:h,d:v,shapeRendering:"crispEdges"}),x)}var Ja=e=>{const t=e,{renderAs:n}=t,r=ur(t,["renderAs"]);return n==="svg"?je.createElement(Ih,ys({},r)):je.createElement(wh,ys({},r))};const gs=(e,t)=>t*100/e,Ch={ABSOLUTE:"AMT",RELATIVE:"%",COMPLIMENTARY:"COMPLIMENTARY"},k=new Object({"3INCH":{lines:"- - - - - - - - - - - - - - - - - - - - - - - - - - - - -",paperSize:"36rem",itemName:"Item Name ",dynamicClassname:"size-3inch",textSize:19},"2INCH":{lines:"- - - - - - - - - - - - - - - - - - - -",paperSize:"23rem",itemName:"Item Name ",dynamicClassname:"size-2inch",textSize:13},"2.5INCH":{paperSize:"28rem",itemName:"Item Name ",dynamicClassname:"size-2inch",textSize:13},"2.7INCH":{paperSize:"30.6rem",itemName:"Item Name ",dynamicClassname:"size-3inch",textSize:19},"1.8INCH":{paperSize:"20.7rem",itemName:"Item Name ",dynamicClassname:"size-2inch",textSize:13},A4:{paperSize:"297mm",itemName:"Item Name ",dynamicClassname:"size-a4",textSize:13},A5:{paperSize:"148mm",itemName:"Item Name ",dynamicClassname:"size-a5",textSize:9}});var xs=Xn(),Te="normal-class";(xs=="Android OS"||xs==="iOS")&&(Te="bold-class");const st=e=>{var at,At,J,be,gt;const t=e.additionalActions??{},n=je.useRef(null),r=e.settingData?e.settingData:e.value.settingData,i=localStorage.getItem("siteId"),{staticDataKOT:a,printer:h,type:f}=e.printerDataObject,o=((At=(at=e.value)==null?void 0:at.settingData)==null?void 0:At.curr)??((J=e.settingData)==null?void 0:J.curr)??"INR";r==null||r.fontTheme;let l=e.printerDataObject.paperSize,c=ir(h,{type:f,siteSetting:e.settingData?e.settingData:e.value.settingData},t);const d=r.customLabels??gd();l=c?(be=c[0])!=null&&be.paperSize?(gt=c[0])==null?void 0:gt.paperSize:l||"3INCH":e.printerDataObject.paperSize;function p(g){const u=Math.abs(parseFloat(g));return m(u)}function m(g){switch(o){case"BHD":case"KWD":case"MUR":case"OMR":return Xs(g).format("0,00.000");default:return Xs(g).format("0,00.00")}}je.useEffect(()=>{w()},[e.newId]);const x=()=>new Promise(async(g,u)=>{if(xs=="Android OS"||xs==="iOS"){let I=await _h(n.current);if(I){const j=await b(I);g(j)}}else{let I=await Ya(n.current);I&&g(I)}}),v=()=>new Promise(async(g,u)=>{const I=await x();g(I)}),b=g=>new Promise((u,I)=>{let j=new Image;j.src=g,j.onload=()=>{let C=document.createElement("canvas");const F=600,T=j.height;let R=j.width,$=j.height;R>$?R>F&&($*=F/R,R=F):$>T&&(R*=T/$,$=T),C.width=R,C.height=$,C.getContext("2d").drawImage(j,0,0,R,$),u(C.toDataURL())}}),w=async()=>{if(n&&n.current){const g=await v();e.onImageGenerated(g)}},S=g=>{let u=new Array;for(const I in g.menusCollection)I.endsWith("collection")||(g.menusCollection[`${I}_collection`]||g.menusCollection[I])&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold display-percentage",children:[s.jsx("span",{children:` -- ${I.replace("_"," ")}(${g.menusCollection[I]}):`}),s.jsx("span",{children:oe(g.menusCollection[`${I}_collection`],o)}),s.jsx("span",{children:m(gs(g.salesCollection.totalCollection,g.menusCollection[`${I}_collection`]??0))+"%"})]}));return g.salesCollection.online_aggregator_collection&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:` -- Aggregator(${g.salesCollection.online_aggregator}):`}),s.jsx("span",{children:oe(g.salesCollection.online_aggregator_collection,o)})]}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:` -- Zomato(${g.salesCollection.zomato_aggregator??0}):`}),s.jsx("span",{children:oe(g.salesCollection.zomato_aggregator_collection,o)})]}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:` -- Swiggy(${g.salesCollection.swiggy_aggregator??0}):`}),s.jsx("span",{children:oe(g.salesCollection.swiggy_aggregator_collection,o)})]})),u},M=g=>{let u=new Array,I=new Object;for(let j=0;j<g.todayCollection.length;j++)I=g.todayCollection[j],u.push(s.jsxs("h5",{className:"left-align-entity level3-bold display-percentage",children:[s.jsx("span",{children:` -- ${I.displayName}:`}),s.jsx("span",{children:oe(I.value,o)}),s.jsx("span",{children:m(gs(g.totalCollection,I.value))+"%"})]}));return u},P=(g,u,I,j,C={})=>{let F=g.includes("upi://");const T=`upi://pay?pa=${g}&pn=${I}&cu=INR&am=${j}&tr=${u}`;return s.jsx(Ja,{value:F?g:T,renderAs:"canvas",size:C.size??250})},O=(g,u)=>{var F,T;let I=0;if((F=u.taxObj)!=null&&F.VAT.length){let R,$,pe;for($=0;$<((T=u.taxObj)==null?void 0:T.VAT.length);$++){R=u.taxObj.VAT[$];for(pe in R)I+=_e(R[pe])}}const j={sellerName:u.companyInfo.companyName,vatRegistrationNumber:g,invoiceTimestamp:new Date(u.orderInfo.timestamp*1e3).toISOString(),invoiceTotal:u.finalAmount,invoiceVatTotal:I},C=yd(j.sellerName,j.vatRegistrationNumber,j.invoiceTimestamp,j.invoiceTotal,j.invoiceVatTotal.toFixed(2));return s.jsx(Ja,{value:C,renderAs:"canvas",size:250})},z=g=>{const u=[];return(g.totalBalanceAmt||g.refundAmt||g.writeOffAmt||g.rewardAmt||g.cashCard)&&(u.push(s.jsx("hr",{})),g.rewardAmt&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"REWARDS:"}),s.jsx("span",{children:oe(g.rewardAmt,o)})]})),g.totalBalanceAmt&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"OUTSTANDING AMOUNT:"}),s.jsx("span",{children:oe(g.totalBalanceAmt,o)})]})),g.writeOffAmt&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"WRITE OFF AMOUNT:"}),s.jsx("span",{children:oe(g.writeOffAmt,o)})]})),g.refundAmt&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"REFUND AMOUNT:"}),s.jsx("span",{children:oe(g.refundAmt,o)})]})),g.cashCard&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"CASH CARD:"}),s.jsx("span",{children:oe(g.cashCard,o)})]}))),u},K=(g,u)=>{if(u&&u.length){for(let I=0;I<u.length;I++)if(u[I].slugName===g)return u[I]}return!1},se=(g,u)=>{if(u&&u.length){for(let I=0;I<u.length;I++)if(u[I].itemType===g)return u[I]}return!1},Q=new Object({CREDIT:"Other Income",DEBIT:"Expense"}),ie=g=>g.discountType==="COMPLIMENTARY"?"@ COMPLIMENTARY":`@ ${g.discountValue}${Ch[g.discountType]}`,Ce=g=>{const u=new Array;if(g&&Object.keys(g).length!==0){u.push(s.jsx("h4",{className:"single-entity-and-center",children:"ACCOUNTS"}));for(const I in g)if(u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:`Total ${Q[I]}:`}),s.jsx("span",{children:oe(g[I].total,o)})]})),I&&Object.keys(I).length!==0)for(const j in g[I])j!=="total"&&g[I][j]&&u.push(s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:` -- ${Qe(j)}:`}),s.jsx("span",{children:oe(g[I][j],o)})]}))}return u},W=(g,u)=>{let I=!1;g.totalValue&&(I=Object.keys(g.totalValue).length>1);let j=new Object;return s.jsxs(s.Fragment,{children:[g.totalValue&&Object.keys(g.totalValue).map(F=>{if(j=g.totalValue[F],F==="GST")return s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsxs("section",{className:"products-section",children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h4",{className:`items products-heading-name ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.item_name}}),s.jsx("h4",{className:`items products-heading-qty ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.qty}}),s.jsx("h4",{className:`items products-heading-rate ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.rate}}),s.jsx("h4",{className:`items products-heading-amt ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.amt}})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:"products-section",style:{paddingTop:"12px"},children:[g.itemList&&g.itemList.length&&g.itemList.length>0&&g.itemList.map(T=>{if(T.taxType===F||!T.taxType)return s.jsxs("div",{style:T.name.startsWith("+ ")?{}:{paddingTop:"12px"},children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsxs("h6",{className:`items products-heading-name ${k[l].dynamicClassname}`,style:{fontWeight:"lighter",lineHeight:1.2},children:[T.status==="RETURNED"?"(R) ":"",T.name.toUpperCase()]}),s.jsxs("h6",{className:`items products-heading-qty ${k[l].dynamicClassname}`,style:{fontWeight:"lighter"},children:[T.status==="RETURNED"?"-":"",T.quantity]}),s.jsx("h6",{className:`items products-heading-rate ${k[l].dynamicClassname}`,style:{fontWeight:"lighter"},children:T.rate?p(T.rate):""}),s.jsx("h6",{className:`items products-heading-amt ${k[l].dynamicClassname}`,style:{fontWeight:"lighter"},children:T.status==="RETURNED"?T.serviceAmount?m(T.serviceAmount):"":T.price?m(T.price):""})]}),T.addons&&T.addons.length&&T.addons.map(R=>s.jsx("h6",{className:`items products-heading-addon-kot ${k[l].dynamicClassname}`,children:"- "+Qe(R.serviceName)})),T.instruction&&g.itemInstructionOnBill&&s.jsx("h6",{className:"left-align-entity level2-bold",children:s.jsx("h6",{className:"items products-heading-addon-kot",children:" ("+T.instruction+")"})})]})}),s.jsx("hr",{})]}),s.jsxs("div",{className:`bottom-section ${k[l].dynamicClassname}`,children:[s.jsxs("div",{className:"bottom-section-div inline-display",style:{paddingTop:"12px"},children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.subtotal}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.gstTTL)})]}),i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المجموع الفرعي"}),s.jsx("h5",{className:"actual-qty"})]}):"",j&&j.cat&&Object.keys(j.cat).length>0?Object.keys(j.cat).map(T=>{const R=K(T,g.discArr);if(R&&j.cat[T]!==0&&R.serviceName)return s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`disc_${R.serviceName.toLowerCase()}`]??"DISC-"+R.serviceName.toUpperCase()}}),s.jsx("span",{children:" @"+R.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.cat[T])})]})}):"",g.totalItemDisc&&j&&j.itemTypes&&Object.keys(j.itemTypes).length>0?Object.keys(j.itemTypes).map(T=>{const R=se(T,g.itemTypeDiscObj);if(R&&j.itemTypes[T]!==0&&R.itemType&&R.value)return s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`disc_${R.itemType.toLowerCase()}`]??"DISC-"+R.itemType.toUpperCase()}}),s.jsx("span",{children:" @"+R.value+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.itemTypes[T])})]})}):"",g.segMentDisc&&j&&j.segDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`segment_disc${g.segMentObj.segmentName.toLowerCase()}`]??g.segMentObj.segmentName.toUpperCase()+"DISC"}}),s.jsx("span",{children:" @"+g.segMentObj.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.segDisc)})]}):"",j&&j.orderDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:g.couponCode?u.coupon_disc??"COUPON DISC":u.order_disc??"ORDER DISC"}}),":",s.jsxs("span",{children:[g.couponCode?`(${g.couponCode.toUpperCase()})`:"",m(g.dicsEnterValue)?`@${g.dicsEnterValue}${g.discountType=="RELATIVE"||g.discountType=="COMPLIMENTARY"?"%":"AMT"}`:""]})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.orderDisc)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j&&j.orderDisc?s.jsxs("div",{className:"bottom-section-div",children:[s.jsxs("h5",{className:"total-qty",children:["  ",g.couponCode?"COUPON DISC":"خصم الطلب",g.couponCode?`(${g.couponCode.toUpperCase()})`:""]}),s.jsx("h5",{className:"actual-qty"})]}):"",j.otherCharges&&j.otherCharges.length>0?j.otherCharges.map(T=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u[`charges_${T.name.toLowerCase()}`]??T.name}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(T.amt)})]})})):"",j&&j.aftDisc&&j.gstTTL!==j.aftDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.amt_before_tax}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.aftDisc)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j&&j.aftDisc&&j.gstTTL!==j.aftDisc?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المبلغ قبل الضريبة"}),s.jsx("h5",{className:"actual-qty"})]}):"",g.taxObj&&g.taxObj[F]&&j?s.jsx(s.Fragment,{children:F==="GST"?g.taxObj[F].map(T=>{let R=new Array;for(const $ in T)if(T[$]&&T[$]!=0){let pe=$/2;R.push(s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u.cgst}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(T[$]/2)})]}),s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u[g.taxLabel.toLowerCase()]}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(T[$]/2)})]})]}))}return R}):g.taxObj[F].map(T=>{let R=new Array;for(const $ in T)if(T[$]&&T[$]!=0){let pe=$;R.push(s.jsx(s.Fragment,{children:s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u.vat}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(T[$])})]})}))}return R})}):"",j.gstTTL!==(j.total||0)+(j.aftDisc||0)+j.taxOnCharges&&s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.total}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m((j.total||0)+(j.aftDisc||0)+j.taxOnCharges)})]}),i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j.gstTTL!==(j.total||0)+(j.aftDisc||0)+j.taxOnCharges&&s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المجموع"}),s.jsx("h5",{className:"actual-qty"})]}),g.totalValue&&(Object.keys(g.totalValue).length||0)>1?s.jsx("h4",{className:"single-entity-and-center",style:{marginTop:"10px"},children:"- - - - -"}):"",I&&s.jsx("div",{className:"space-2rem"})]})]})}),g.totalValue&&Object.keys(g.totalValue).map(F=>{if(j=g.totalValue[F],F==="VAT")return s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsxs("section",{className:"products-section",children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.item_name}}),s.jsx("h6",{className:`items products-heading-qty ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.qty}}),s.jsx("h6",{className:`items products-heading-rate ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.rate}}),s.jsx("h6",{className:`items products-heading-amt ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:u.amt}})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:"products-section",style:{paddingTop:"12px"},children:[g.itemList&&g.itemList.length&&g.itemList.length>0&&g.itemList.map(T=>{if(T.taxType===F)return s.jsxs("div",{style:T.name.startsWith("+ ")?{}:{paddingTop:"12px"},children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsxs("h6",{className:`items products-heading-name ${k[l].dynamicClassname}`,children:[T.status==="RETURNED"?"(R) ":"",T.name.toUpperCase()]}),s.jsxs("h6",{className:`items products-heading-qty ${k[l].dynamicClassname}`,children:[T.status==="RETURNED"?"-":"",T.quantity]}),s.jsx("h6",{className:`items products-heading-rate ${k[l].dynamicClassname}`,children:T.rate?p(T.rate):""}),s.jsx("h6",{className:`items products-heading-amt ${k[l].dynamicClassname}`,children:T.status==="RETURNED"?T.serviceAmount?m(T.serviceAmount):"":T.price?m(T.price):""})]}),T.addons&&T.addons.length&&T.addons.map(R=>s.jsx("h6",{className:`items products-heading-addon-kot ${k[l].dynamicClassname}`,children:"- "+Qe(R.serviceName)})),T.instruction&&g.itemInstructionOnBill&&s.jsx("h6",{className:"left-align-entity level2-bold",children:s.jsx("h6",{className:"items products-heading-addon-kot",children:" ("+T.instruction+")"})})]})}),s.jsx("hr",{})]}),s.jsxs("div",{className:`bottom-section ${k[l].dynamicClassname}`,children:[s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.subtotal}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.vatTTL)})]}),i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المجموع الفرعي"}),s.jsx("h5",{className:"actual-qty"})]}):"",j&&j.cat&&Object.keys(j.cat).length>0?Object.keys(j.cat).map(T=>{const R=K(T,g.discArr);if(R&&j.cat[T]!==0&&R.serviceName)return s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`disc_${R.serviceName.toLowerCase()}`]??"DISC-"+R.serviceName.toUpperCase()}}),s.jsx("span",{children:" @"+R.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.cat[T])})]})}):"",g.totalItemDisc&&j&&j.itemTypes&&Object.keys(j.itemTypes).length>0?Object.keys(j.itemTypes).map(T=>{const R=se(T,g.itemTypeDiscObj);if(R&&j.itemTypes[T]!==0&&R.itemType&&R.value)return s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`disc_${R.itemType.toLowerCase()}`]??"DISC-"+R.itemType.toUpperCase()}}),s.jsx("span",{children:" @"+R.value+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.itemTypes[T])})]})}):"",g.segMentDisc&&j&&j.segDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:u[`segment_disc${g.segMentObj.segmentName.toLowerCase()}`]??g.segMentObj.segmentName.toUpperCase()+"DISC"}}),s.jsx("span",{children:" @"+g.segMentObj.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.segDisc)})]}):"",j&&j.orderDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:g.couponCode?u.coupon_disc??"COUPON DISC":u.order_disc??"ORDER DISC"}}),":",s.jsxs("span",{children:[g.couponCode?`(${g.couponCode.toUpperCase()})`:"",m(g.dicsEnterValue)?`@${g.dicsEnterValue}${g.discountType=="RELATIVE"||g.discountType=="COMPLIMENTARY"?"%":"AMT"}`:""]})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.orderDisc)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j&&j.orderDisc?s.jsxs("div",{className:"bottom-section-div",children:[s.jsxs("h5",{className:"total-qty",children:["  ",g.couponCode?"COUPON DISC":"خصم الطلب",g.couponCode?`(${g.couponCode.toUpperCase()})`:""]}),s.jsx("h5",{className:"actual-qty"})]}):"",j.otherCharges&&j.otherCharges.length>0?j.otherCharges.map(T=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u[`charges_${T.name.toLowerCase()}`]??T.name}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(T.amt)})]})})):"",j&&j.aftDisc&&j.vatTTL!==j.aftDisc?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.amt_before_tax}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(j.aftDisc)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j&&j.aftDisc&&j.vatTTL!==j.aftDisc?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المبلغ قبل الضريبة"}),s.jsx("h5",{className:"actual-qty"})]}):"",j.otherCharges&&j.otherCharges.length>0?j.otherCharges.map(T=>s.jsx(s.Fragment,{children:T.taxOnAmount&&T.taxOnAmount!=0?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u.cgst}}),s.jsx("span",{children:" @"+T.tax/2+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(T.taxOnAmount/2)})]}),s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u[g.taxLabel.toLowerCase()]}}),s.jsx("span",{children:" @"+T.tax/2+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(T.taxOnAmount/2)})]})]}):""})):"",g.taxObj&&g.taxObj[F]&&j?s.jsx(s.Fragment,{children:F==="GST"?g.taxObj[F].map(T=>{let R=new Array;for(const $ in T)if(T[$]&&T[$]!=0){let pe=$/2;R.push(s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u.cgst}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(T[$]/2)})]}),s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u[g.taxLabel.toLowerCase()]}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(T[$]/2)})]})]}))}return R}):g.taxObj[F].map(T=>{let R=new Array;for(const $ in T)if(T[$]&&T[$]!=0){let pe=$;R.push(s.jsx(s.Fragment,{children:s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:u.vat}}),s.jsx("span",{children:" @"+pe+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m(T[$])})]})}))}return R})}):"",j.vatTTL!==(j.total||0)+(j.aftDisc||0)+j.taxOnCharges&&s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:u.total}}),s.jsx("h5",{className:"actual-qty",children:g.curr+" "+m((j.total||0)+(j.aftDisc||0)+j.taxOnCharges)})]}),i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&j.vatTTL!==(j.total||0)+(j.aftDisc||0)+j.taxOnCharges&&s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المجموع"}),s.jsx("h5",{className:"actual-qty"})]})]})]})})]})},q=(g,u,{labels:I,doMultipleTax:j,type:C})=>{var T,R,$,pe,Ee,Pe,Fe,Ae,$e,Et,xt;const F=g.discounts;return s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsxs("section",{className:"products-section",children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h4",{className:`items products-heading-name ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:I.item_name}}),s.jsx("h4",{className:`items products-heading-qty ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:I.qty}}),s.jsx("h4",{className:`items products-heading-rate ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:I.rate}}),s.jsx("h4",{className:`items products-heading-amt ${k[l].dynamicClassname}`,dangerouslySetInnerHTML:{__html:I.amt}})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:"products-section",style:{paddingTop:"12px"},children:[g.itemList.map(G=>{var Rt;return s.jsxs("div",{style:G.serviceName.startsWith("+ ")?{}:{paddingTop:"12px"},children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsxs("h6",{className:`items products-heading-name ${k[l].dynamicClassname}`,style:{lineHeight:1.2},children:[G.status==="RETURNED"?"(R) ":"",G.serviceName.toUpperCase()]}),s.jsxs("h6",{className:`items products-heading-qty ${k[l].dynamicClassname}`,children:[G.status==="RETURNED"?"-":"",G.qty]}),s.jsx("h6",{className:`items products-heading-rate ${k[l].dynamicClassname}`,children:G.serviceRate?p(G.serviceRate):""}),s.jsx("h6",{className:`items products-heading-amt ${k[l].dynamicClassname}`,children:G.sub_total?m(G.sub_total):""})]}),G.hsnCode&&u.printHSNCodeOnBill&&s.jsxs("h6",{className:`items products-heading-name ${k[l].dynamicClassname}`,style:{lineHeight:1.2},children:["HSN: ",G.hsnCode]}),(Rt=G.addons)!=null&&Rt.length?G.addons.map(it=>s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name ${k[l].dynamicClassname}`,style:{lineHeight:1.2},children:"+ "+Qe(it.serviceName)}),s.jsxs("h6",{className:`items products-heading-qty ${k[l].dynamicClassname}`,children:[G.status==="RETURNED"?"-":"",it.qty*G.qty]}),s.jsx("h6",{className:`items products-heading-rate ${k[l].dynamicClassname}`}),s.jsx("h6",{className:`items products-heading-amt ${k[l].dynamicClassname}`})]}),s.jsx("div",{children:it.hsnCode&&u.printHSNCodeOnBill&&s.jsxs("h6",{className:`items products-heading-name ${k[l].dynamicClassname}`,style:{lineHeight:1.2},children:["HSN: ",it.hsnCode]})})]})):"",G.instruction?s.jsx("h6",{className:"left-align-entity level2-bold",children:s.jsx("h6",{className:"items products-heading-addon-kot",children:" ("+G.instruction+")"})}):""]})}),s.jsx("hr",{})]}),s.jsxs("div",{className:`bottom-section ${k[l].dynamicClassname} ${Te}`,children:[s.jsxs("div",{className:"bottom-section-div inline-display",style:{paddingTop:"12px"},children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:I.subtotal}}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(g.subTotal)})]}),i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المجموع الفرعي"}),s.jsx("h5",{className:"actual-qty"})]}):""]}),(T=F.DISCOUNT_ITEMS)!=null&&T.length?F.DISCOUNT_ITEMS.map(G=>s.jsxs("div",{className:`bottom-section-div inline-display ${Te}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:I[`disc_${G.discountName.toLowerCase()}`]??"DISC-"+G.discountName.toUpperCase()}}),s.jsx("span",{children:ie(G)})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(G.discountAmt)})]})):"",(R=F.CATEGORY_DISCOUNT)!=null&&R.length?F.CATEGORY_DISCOUNT.map(G=>s.jsxs("div",{className:`bottom-section-div inline-display ${Te}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:I[`disc_${G.discountName.toLowerCase()}`]??"DISC-"+G.discountName.toUpperCase()}}),s.jsx("span",{children:" @"+G.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(G.discountAmt)})]})):"",($=F.ITEM_DISCOUNT)!=null&&$.length?F.ITEM_DISCOUNT.map(G=>s.jsxs("div",{className:`bottom-section-div inline-display ${Te}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:I[`disc_${G.discountName.toLowerCase()}`]??"DISC-"+ts(G.discountName).toUpperCase()}}),s.jsx("span",{children:" @"+G.discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(G.discountAmt)})]})):"",(Ee=(pe=F.SEGMENT_DISCOUNT)==null?void 0:pe[0])!=null&&Ee.discountAmt?s.jsxs("div",{className:`bottom-section-div inline-display ${Te}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:I[`segment_disc${F.SEGMENT_DISCOUNT[0].discountName.toLowerCase()}`]??"DISC-"+F.SEGMENT_DISCOUNT[0].discountName.toUpperCase()}}),":",s.jsx("span",{children:" @"+F.SEGMENT_DISCOUNT[0].discountValue+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(F.SEGMENT_DISCOUNT[0].discountAmt)})]}):"",(Fe=(Pe=F.COUPON_DISCOUNT)==null?void 0:Pe[0])!=null&&Fe.discountAmt?s.jsxs("div",{className:`bottom-section-div inline-display ${Te}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:"COUPON DISC"}}),":",s.jsx("span",{children:`(${F.COUPON_DISCOUNT[0].discountName.toUpperCase()}) @${F.COUPON_DISCOUNT[0].discountValue}${F.COUPON_DISCOUNT[0].discountType=="RELATIVE"?"%":"AMT"}`})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(F.COUPON_DISCOUNT[0].discountAmt)})]}):"",($e=(Ae=F.ORDER_DISCOUNT)==null?void 0:Ae[0])!=null&&$e.discountAmt?s.jsxs("div",{className:`bottom-section-div inline-display ${Te}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:I.order_disc??"ORDER DISC"}}),":",s.jsx("span",{children:m(F.ORDER_DISCOUNT[0].discountValue)?`@${F.ORDER_DISCOUNT[0].discountValue}${F.ORDER_DISCOUNT[0].discountType=="RELATIVE"||F.ORDER_DISCOUNT[0].discountType=="COMPLIMENTARY"?"%":"AMT"}`:""})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(F.ORDER_DISCOUNT[0].discountAmt)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&g&&g.orderDisc?s.jsxs("div",{className:`bottom-section-div ${Te}`,children:[s.jsxs("h5",{className:"total-qty",children:["  ",u.couponCode?"COUPON DISC":"خصم الطلب",u.couponCode?`(${u.couponCode.toUpperCase()})`:""]}),s.jsx("h5",{className:"actual-qty"})]}):"",(Et=g.charges)!=null&&Et.length?g.charges.map(G=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:`bottom-section-div inline-display ${Te}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:I[`charges_${G.name.toLowerCase()}`]??G.name}})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(G.amt)})]})})):"",g.subTotal!==g.afterCharges&&g.afterCharges!==g.total?s.jsxs("div",{className:`bottom-section-div inline-display ${Te}`,children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:I.amt_before_tax}}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(g.afterCharges)})]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"&&g.subTotal!==g.afterCharges?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{className:"total-qty",children:"المبلغ قبل الضريبة"}),s.jsx("h5",{className:"actual-qty"})]}):"",(xt=g.taxation)!=null&&xt.length?g.taxation.map(G=>{if(G.taxAmt)return G.taxType==="GST"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:`bottom-section-div ${Te}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.cgst}}),s.jsx("span",{children:"@"+G.tax/2+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(G.taxAmt/2)})]}),s.jsxs("div",{className:`bottom-section-div ${Te}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I[u.taxLabel.toLowerCase()]}}),s.jsx("span",{children:"@"+G.tax/2+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(G.taxAmt/2)})]})]}):s.jsxs("div",{className:`bottom-section-div ${Te}`,children:[s.jsx("h5",{className:"total-qty",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:I.vat}}),s.jsx("span",{children:"@"+G.tax+"%"})]})}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(G.taxAmt)})]})}):"",s.jsxs("div",{className:`bottom-section-div inline-display ${Te}`,children:[s.jsx("h5",{className:"total-qty",dangerouslySetInnerHTML:{__html:I.total}}),s.jsx("h5",{className:"actual-qty",children:u.curr+" "+m(g.total)})]}),j?s.jsx(s.Fragment,{children:C==="GST"?s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"single-entity-and-center",style:{marginTop:"10px"},children:"- - - - -"}),s.jsx("div",{className:"space-2rem"})]}):""}):""]})},B=(g,u)=>{var F,T;let I=!1;const j=g.distributedData;return g.distributedData&&(I=Object.keys(g.distributedData).length>1),s.jsxs(s.Fragment,{children:[((F=j.GST)==null?void 0:F.itemList)&&q(j.GST,g,{labels:u,doMultipleTax:I,type:"GST"}),((T=j.VAT)==null?void 0:T.itemList)&&q(j.VAT,g,{labels:u,doMultipleTax:I,type:"VAT"})]})},fe=g=>{const u=g.services,I=Object.keys(g.services),j=I.length;return s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsxs("section",{className:`products-section ${Te}`,children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h5",{className:"items products-heading-name-kot",children:k[l].itemName}),s.jsx("h5",{className:"items products-heading-qty-kot",children:"QTY"})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:"products-section",children:[j&&I.map((F,T)=>s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"left-align-entity level3-bold",children:s.jsxs("u",{children:[F.toUpperCase(),":"]})}),u[F].map(R=>{var $;return s.jsxs("div",{children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h4",{className:`items products-heading-name-kot ${k[l].dynamicClassname}`,children:Qe(R.serviceName)}),s.jsx("h4",{className:`items products-heading-qty-kot ${k[l].dynamicClassname}`,children:R.qty})]}),(($=R.addons)==null?void 0:$.length)&&R.addons.map(pe=>{var Ee;return s.jsx("h5",{className:"items products-heading-addon-kot",children:"- "+((Ee=pe.serviceName)==null?void 0:Ee.toUpperCase())})}),R.instruction&&s.jsx("h5",{className:"left-align-entity",children:s.jsx("h5",{className:"items products-heading-addon-kot",children:" ("+R.instruction+")"})})]})}),j!==T+1&&s.jsx("br",{})]})),s.jsx("hr",{})]})]})},U=g=>{const u=g.slice(0,-4),I=g.slice(-4);return{firstDigits:u,last4Dgits:I}},Z=(g,u,I,j={})=>{const C=Object.keys(u??{});let F=[],T,R="flex-two-items";if(j.action==="addCharges"&&(R="display-percentage"),g&&C.length){F.push(s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"single-entity-and-center",children:`${I.toUpperCase()} BREAK-UP`}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsxs("span",{children:["Total ",I,":"]}),s.jsx("span",{children:oe(g,o)})]})]}));for(let $=0;$<C.length;$++)T=C[$],u[T]&&F.push(s.jsxs("h5",{className:`left-align-entity level3-bold ${R} second-span-right`,children:[s.jsx("span",{children:` -- ${T.replaceAll("_"," ")}:`}),s.jsx("span",{children:oe(u[T],o)}),j.action==="addCharges"?s.jsx("span",{children:m(gs(g,u[T]))+"%"}):""]}));F.push(s.jsx("hr",{}))}return F},nt=g=>{const u=Object.keys(g.Category),I=Object.keys(g.Addon);let j=new Array;return j.push(s.jsxs(s.Fragment,{children:[s.jsx("h3",{className:"left-align-entity level3-bold",children:"Product Category"}),s.jsx("hr",{className:"dashed"})]})),u.forEach((C,F)=>{const T=g.Category[C];let R=[];j.push(s.jsxs(s.Fragment,{children:[s.jsxs("h4",{className:"left-align-entity level3-bold",children:[" - "," ",ts(C)]}),s.jsxs("section",{className:"products-section",children:[T.forEach($=>{R.push(s.jsx(s.Fragment,{children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name-kot ${k["3INCH"].dynamicClassname}`,children:$.serviceName}),s.jsx("h6",{className:`items products-heading-qty-kot ${k["3INCH"].dynamicClassname}`,children:parseFloat($.qty.toFixed(2))})]})}))}),R,F!=u.length-1&&s.jsx("hr",{})]})]}))}),I.length>0&&(j.push(s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsx("h3",{className:"left-align-entity level3-bold",children:"Addon Category"}),s.jsx("hr",{className:"dashed"})]})),I.forEach((C,F)=>{const T=g.Addon[C];let R=[];j.push(s.jsxs(s.Fragment,{children:[s.jsxs("h4",{className:"left-align-entity level3-bold",children:[" - "," ",ts(C)]}),s.jsxs("section",{className:"products-section",children:[T.forEach($=>{R.push(s.jsx(s.Fragment,{children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name-kot ${k["3INCH"].dynamicClassname}`,children:$.serviceName}),s.jsx("h6",{className:`items products-heading-qty-kot ${k["3INCH"].dynamicClassname}`,children:parseFloat($.qty.toFixed(2))})]})}))}),R,F!=I.length-1&&s.jsx("hr",{className:"dashed"})]})]}))})),j},rt=g=>{var I;const u={company_mobile:"Mob",company_Email:"Email",company_GST:"GST",company_VAT:"VAT",company_FSSAI:"FSSAI",name:"Name",mobile:"Mobile",address:"Address",email:"Email",token_no:"Token No",order_no:"Order No",date:"Date",delivery_date:"Delivery Date",item_name:"Item Name",qty:"Qty",rate:"Rate",amt:"Amt",subtotal:"SUB TOTAL",order_disc:"ORDER DISC",coupon_disc:"COUPON DISC",complementary_disc:"COMPLIMENTARY BILL",amt_before_tax:"AMT BEFORE TAX",total:"TOTAL",grand_total:"GRAND TOTAL",reward_point_balance:"REWARD POINT BALANCE",balance_amt:"BALANCE AMOUNT",rewards_redeemed:"REWARDS REDEEMED",vat:"VAT",sgst:"SGST",cgst:"CGST",utgst:"UTGST",igst:"IGST",previous_outstanding:"PREVIOUS OUTSTANDING",total_payable:"TOTAL PAYABLE",delivery_code:"Delivery Code",online_order_id:"Online Order ID",area_name:"Area Name",table_name:"Table Name",captain_name:"Captain Name"};if((I=g==null?void 0:g.customBillLabels)!=null&&I.length){let j;for(let C=0;C<g.customBillLabels.length;C++)j=g.customBillLabels[C],u[j.defaultName]=j.displayName}return u},Mt=(g,u,I,j)=>{var $,pe,Ee,Pe,Fe,Ae,$e,Et,xt,G,Rt,it,Ns,js,on,vs,_s,cn,dn,hn,un,mn,fn,pn,Kt,bs,Nt,Qt,Zt,Ss,yn,Ts,gn,ws,Is,xn,Nn,Cs,Os;const C=rt(r.customLabelsMap),F=ms(xd(r.paymentModes),"internalName"),T=te=>{var _;return(_=F[te])!=null&&_.displayName?F[te].displayName.toUpperCase():te};if(g==="BILL"){let te;if(l==="A4"||l==="A5"){let _={...u},X=0,me=_.distributedData;const y=me.discounts;te=s.jsx("div",{className:`invoiceContainer main-div ${k[l].dynamicClassname}`,children:s.jsxs("div",{id:"page-wrap",children:[s.jsx("table",{width:"100%",className:"custom-table custom-table-bordered",children:s.jsxs("tbody",{children:[s.jsxs("tr",{children:[s.jsxs("td",{colSpan:9,children:[s.jsx("tr",{className:"subtotalTr",children:s.jsx("td",{colSpan:12,style:{borderBottom:"1px solid black",width:"100%"},children:s.jsx("h5",{children:s.jsxs("strong",{children:[_.companyInfo.companyName,":"]})})})}),s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:`${C.order_no}:`},className:"font-weight-bold"}),s.jsx("span",{children:_.orderId})]}),s.jsxs("td",{width:"50%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:`${C.date}:`},className:"font-weight-bold"}),s.jsx("span",{children:_.orderInfo.orderDate})]})]})]}),s.jsx("td",{colSpan:3,className:"text-right",children:s.jsx("div",{className:"d-flex justify-content-center",children:I&&s.jsx("img",{src:I,width:90})})})]}),s.jsx("tr",{children:s.jsx("td",{colSpan:12,className:"text-center border-right",style:{padding:"0px 1.4rem"},children:s.jsx("h6",{children:s.jsx("strong",{children:"Tax Invoice"})})})}),s.jsxs("tr",{children:[s.jsx("td",{colSpan:6,className:"v-align-baseline col-6",children:s.jsxs("div",{className:"divPadding",children:[(_.customerInfo.custName||(($=_.customFields)==null?void 0:$.length))&&s.jsx("tr",{children:s.jsx("td",{colSpan:"2",className:"text-center border-right",children:s.jsx("strong",{children:"Bill To"})})}),_.customerInfo.custName&&_.customerInfo.custName!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:_.customerInfo.custName})}),_.customerInfo.custContact&&_.customerInfo.custContact!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:_.customerInfo.custContact})}),_.customerInfo.custAddress&&_.customerInfo.custAddress!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:_.customerInfo.custAddress})}),_.deliveryTimestamp&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:_.deliveryTimestamp})}),(pe=_.customFields)!=null&&pe.length?_.customFields.map(N=>s.jsx("tr",{children:s.jsxs("td",{width:"10%",children:[N.customName,": ",N.customValue]})})):""]})}),s.jsx("td",{colSpan:6,className:"v-align-baseline",children:s.jsxs("div",{className:"divPadding",children:[s.jsx("tr",{children:s.jsx("td",{colSpan:"2",className:"text-center border-right",children:s.jsx("strong",{children:"Bill From"})})}),s.jsx("tr",{children:s.jsx("td",{width:"10%",children:_.companyInfo.companyName})}),_.companyInfo.companyAddress&&_.companyInfo.companyAddress!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:_.companyInfo.companyAddress})}),_.companyInfo.companyEmail&&_.companyInfo.companyEmail!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:_.companyInfo.companyEmail})}),_.companyInfo.companyContact&&_.companyInfo.companyContact!==""&&s.jsx("tr",{children:s.jsx("td",{width:"10%",children:_.companyInfo.companyContact})}),_.fssai&&_.fssai!==""&&s.jsx("tr",{children:s.jsxs("td",{width:"10%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:`${C.company_FSSAI}:`}}),s.jsx("span",{children:_.fssai})]})}),_.gst&&_.gst!==""&&s.jsx("tr",{children:s.jsxs("td",{width:"10%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:`${C.company_GST}:`}}),s.jsx("span",{children:_.gst})]})}),_.vatNo&&_.vatNo!==""&&s.jsx("tr",{children:s.jsxs("td",{width:"10%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:`${C.company_VAT}:`}}),s.jsx("span",{children:_.vatNo})]})})]})})]}),s.jsx("tr",{children:s.jsx("td",{colSpan:12,children:s.jsxs("table",{width:"100%",className:"custom-table productTable ",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-right",style:{lineHeight:"10px"},children:[s.jsx("th",{className:"text-align-left",children:"Sr No"}),s.jsx("th",{className:"text-align-left",style:{width:"40%"},children:"Item Name"}),s.jsx("th",{className:"text-align-left",children:"Quantity"}),s.jsx("th",{className:"text-align-right",children:"Price/Unit"}),s.jsx("th",{className:"text-align-right",children:"Amount"})]})}),s.jsxs("tbody",{children:[_.itemList.map(N=>{var ce;let L="",V=[];return X++,V.push(s.jsxs(s.Fragment,{children:[s.jsxs("tr",{style:{lineHeight:"10px"},className:L,children:[s.jsx("td",{className:"text-align-left",children:N.serviceRate?X:""}),s.jsx("td",{style:{width:"40%"},className:"text-align-left",children:N.serviceName.toUpperCase()}),s.jsx("td",{className:"text-align-left",children:N.qty}),s.jsx("td",{className:"text-align-right",children:N.serviceRate?Y(N.serviceRate,o):""}),s.jsx("td",{className:"text-align-right",children:N.sub_total?Y(N.sub_total,o):""})]}),N.instruction&&s.jsxs("tr",{children:[s.jsx("td",{}),s.jsx("td",{style:{width:"40%"},children:"("+N.instruction+")"})]})]})),(ce=N.addons)!=null&&ce.length&&N.addons.map(ue=>{V.push(s.jsxs(s.Fragment,{children:[s.jsxs("tr",{style:{lineHeight:"10px"},className:"fs-8",children:[s.jsx("td",{}),s.jsxs("td",{style:{width:"40%"},children:["+ ",ue.serviceName.toUpperCase()]}),s.jsx("td",{children:ue.qty*N.qty})]}),ue.instruction&&s.jsxs("tr",{children:[s.jsx("td",{}),s.jsx("td",{style:{width:"40%"},children:"("+ue.instruction+")"})]})]}))}),V}),s.jsx("tr",{style:{lineHeight:"10px",fontSize:"14px"},children:s.jsx("td",{colSpan:5,children:s.jsx("strong",{className:"font-weight-bold",children:`Total ${X} Items and ${_e(me.qty)} Quantity`})})})]})]})})}),s.jsxs("tr",{className:"avoid-page-break",children:[s.jsx("td",{colSpan:6,style:{verticalAlign:"top"},children:s.jsx("div",{children:s.jsxs("div",{width:"100%",children:[s.jsx("tr",{children:s.jsxs("td",{colSpan:"2",children:[s.jsx("strong",{className:"font-weight-bold",children:"Amount in words"}),s.jsx("br",{}),fd(xa(_.finalAmount,o).toFixed(tn[o].minimumFractionDigits??2))]})}),s.jsx("hr",{}),_.upiId&&u.companyInfo.companyName&&s.jsxs(s.Fragment,{children:[s.jsx("tr",{children:s.jsx("td",{width:"50%",className:"font-weight-bold",children:"Scan To Pay"})}),s.jsx("tr",{children:s.jsx("td",{width:"50%",children:s.jsx("div",{className:"image-bill",children:P(u.upiId,u.orderId,u.companyInfo.companyName,u.paidAmt,{size:100})})})})]}),_.footerMessage?s.jsx("tr",{children:s.jsx("td",{colSpan:"2",children:s.jsx("div",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:_.footerMessage}})})}):""]})})}),s.jsx("td",{colSpan:6,style:{verticalAlign:"top"},children:s.jsx(s.Fragment,{children:s.jsxs(s.Fragment,{children:[s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{children:s.jsx("strong",{dangerouslySetInnerHTML:{__html:C.subtotal}})})}),s.jsx("td",{width:"50%",className:"text-align-right",children:Y(me.subTotal,o)})]}),(Ee=y==null?void 0:y.DISCOUNT_ITEMS)!=null&&Ee.length?y.DISCOUNT_ITEMS.map(N=>s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:C[`disc_${N.discountName.toLowerCase()}`]??"DISC-"+N.discountName.toUpperCase()}}),s.jsx("span",{children:ie(N)})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(N.discountAmt,o)})]})):"",(Pe=y==null?void 0:y.CATEGORY_DISCOUNT)!=null&&Pe.length?y.CATEGORY_DISCOUNT.map(N=>s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:C[`disc_${N.discountName.toLowerCase()}`]??"DISC-"+N.discountName.toUpperCase()}}),s.jsx("span",{children:" @"+N.discountValue+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(N.discountAmt,o)})]})):"",(Fe=y==null?void 0:y.ITEM_DISCOUNT)!=null&&Fe.length?y.ITEM_DISCOUNT.map(N=>s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:C[`disc_${N.discountName.toLowerCase()}`]??"DISC-"+N.discountName.toUpperCase()}}),s.jsx("span",{children:" @"+N.discountValue+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(N.discountAmt,o)})]})):"",($e=(Ae=y==null?void 0:y.SEGMENT_DISCOUNT)==null?void 0:Ae[0])!=null&&$e.discountAmt?s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:C[`segment_disc${y.SEGMENT_DISCOUNT[0].discountName.toLowerCase()}`]??"DISC-"+y.SEGMENT_DISCOUNT[0].discountName.toUpperCase()}}),s.jsx("span",{children:" @"+y.SEGMENT_DISCOUNT[0].discountValue+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(y.SEGMENT_DISCOUNT[0].discountAmt,o)})]}):"",(xt=(Et=y==null?void 0:y.COUPON_DISCOUNT)==null?void 0:Et[0])!=null&&xt.discountAmt?s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:"COUPON DISC"}}),s.jsx("span",{children:`(${y.COUPON_DISCOUNT[0].discountName.toUpperCase()}) @${y.COUPON_DISCOUNT[0].discountValue}${y.COUPON_DISCOUNT[0].discountType=="RELATIVE"?"%":"AMT"}`})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(y.COUPON_DISCOUNT[0].discountAmt,o)})]}):"",(Rt=(G=y==null?void 0:y.ORDER_DISCOUNT)==null?void 0:G[0])!=null&&Rt.discountAmt?s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{className:"spaced-text",dangerouslySetInnerHTML:{__html:C.order_disc??"ORDER DISC"}}),s.jsx("span",{children:m(y.ORDER_DISCOUNT[0].discountValue)?`@${y.ORDER_DISCOUNT[0].discountValue}${y.ORDER_DISCOUNT[0].discountType=="RELATIVE"||y.ORDER_DISCOUNT[0].discountType=="COMPLIMENTARY"?"%":"AMT"}`:""})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(y.ORDER_DISCOUNT[0].discountAmt,o)})]}):"",(it=me.charges)!=null&&it.length?me.charges.map(N=>s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:C[`charges_${N.name.toLowerCase()}`]??N.name}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(N.amt,o)})]})):"",me.subTotal!==me.afterCharges?s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:C.amt_before_tax}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(me.afterCharges,o)})]}):"",(Ns=me.taxation)!=null&&Ns.length?me.taxation.map(N=>N.taxType==="GST"?s.jsxs(s.Fragment,{children:[s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.cgst}}),s.jsx("span",{children:" @"+N.tax/2+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(N.taxAmt/2,o)})]}),s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.sgst}}),s.jsx("span",{children:" @"+N.tax/2+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(N.taxAmt/2,o)})]})]}):s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.vat}}),s.jsx("span",{children:" @"+N.tax+"%"})]}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(N.taxAmt,o)})]})):"",s.jsxs("tr",{className:"font-weight-bold subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("strong",{dangerouslySetInnerHTML:{__html:C.grand_total}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(_.finalAmount,o)})]}),(js=u==null?void 0:u.custoutStandingData)!=null&&js.balanceAmt?s.jsxs(s.Fragment,{children:[s.jsxs("tr",{className:"font-weight-bold subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:C.previous_outstanding}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y((on=_==null?void 0:_.custoutStandingData)==null?void 0:on.balanceAmt,o)})]}),s.jsxs("tr",{className:"font-weight-bold subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("strong",{dangerouslySetInnerHTML:{__html:C.total_payable}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(_.grandTotal+((vs=_==null?void 0:_.custoutStandingData)==null?void 0:vs.balanceAmt),o)})]})]}):"",_.rewardAmt?s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:C.rewards_redeemed}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(_.rewardAmt,o)})]}):"",(_s=u.paymentMethods)!=null&&_s.length?u.paymentMethods.map(N=>{var L;if(N.paidAmt)return s.jsxs("tr",{className:"subtotalTr",children:[s.jsxs("td",{width:"50%",children:["-"," ",s.jsx("span",{dangerouslySetInnerHTML:{__html:C[`${(L=N.paymentMode)==null?void 0:L.toLowerCase()}`]??T(N.paymentMode)??"CASH"}}),s.jsx("span",{children:N.isRefund?"(Refund)":""})]}),N.isRefund?s.jsx("td",{className:"text-align-right",width:"50%",children:"("+Y(N.paidAmt,o)+")"}):s.jsx("td",{className:"text-align-right",width:"50%",children:Y(N.paidAmt,o)})]})}):"",_.balanceAmt&&u.balanceAmt!=0?s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:C.balance_amt}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:Y(u.balanceAmt,o)})]}):"",u.balPoint&&!Number.isNaN(u.balPoint)?s.jsxs("tr",{className:"subtotalTr",children:[s.jsx("td",{width:"50%",children:s.jsx("span",{dangerouslySetInnerHTML:{__html:C.reward_point_balance}})}),s.jsx("td",{className:"text-align-right",width:"50%",children:u.balPoint})]}):"",s.jsx("tr",{className:"subtotalTr",children:s.jsxs("td",{className:"text-center",width:"100%",children:[s.jsx("hr",{}),s.jsx("strong",{children:"Authorised Signatory"})]})}),s.jsx("tr",{className:"subtotalTr",children:s.jsx("td",{colSpan:2,width:"50%",children:s.jsx("div",{className:"p-4"})})})]})})})]})]})}),s.jsx("p",{className:"single-entity-and-center f-12 mt-2 avoid-page-break",style:{marginTop:"10px"},children:`Printed By :${_.printby} Printed On: ${_.printTime}`}),_.disabledPoweredBy?"":s.jsx("p",{className:"single-entity-and-center f-12 mt-2 avoid-page-break",children:"Powered By: www.recaho.com"})]})})}else te=s.jsx("div",{className:"main-div bill",style:{width:k[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[u.duplicateBill?s.jsx("h4",{className:"single-entity-and-center",children:"DUPLICATE BILL"}):"",s.jsx("br",{}),I&&s.jsx("div",{className:"image-bill",children:s.jsx("img",{src:I,className:"single-entity-and-center",style:{width:k[l].logoWidth}})}),s.jsxs("div",{className:`details-section ${k[l].dynamicClassname}`,children:[!I&&u.companyInfo.companyName&&u.companyInfo.companyName!=""&&s.jsx("h1",{className:"single-entity-and-center",children:u.companyInfo.companyName}),u.companyInfo.companyAddress&&u.companyInfo.companyAddress!==""&&s.jsx("h3",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:u.companyInfo.companyAddress}}),u.companyInfo.companyContact&&u.companyInfo.companyContact!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_mobile}}),": ",s.jsx("span",{children:u.companyInfo.companyContact})]})}),u.companyInfo.companyEmail&&u.companyInfo.companyEmail!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_Email}}),": ",s.jsx("span",{children:u.companyInfo.companyEmail})]})}),u.fssai&&u.fssai!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_FSSAI}}),": ",s.jsx("span",{children:u.fssai})]})}),u.gst&&u.gst!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_GST}}),": ",s.jsx("span",{children:u.gst})]})}),u.vatNo&&u.vatNo!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_VAT}}),": ",s.jsx("span",{children:u.vatNo})]})}),s.jsx("hr",{}),u.orderFrom&&s.jsx("h2",{className:"single-entity-and-center level2-bold",children:u.orderFrom}),u.area&&s.jsxs("h3",{className:"single-entity-and-center level2-bold",children:[u.area," : ",u.tableName?u.tableName:u.tableNo]}),u.tokenId&&s.jsx("h2",{className:"single-entity-and-center level2-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.token_no}})," ",s.jsx("span",{children:u.tokenId})]})}),u.parentOrderRef&&s.jsx("h4",{className:"single-entity-and-center",children:"RETURN/EXCHANGE"})]}),s.jsx("hr",{}),s.jsxs("div",{className:`details-section ${k[l].dynamicClassname} ${Te}`,children:[u.customerInfo.custName&&u.customerInfo.custName!==""&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.name}}),": ",s.jsx("span",{children:u.customerInfo.custName})]})}),u.customerInfo.custContact&&u.customerInfo.custContact!==""&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.mobile}}),": ",s.jsx("span",{children:u.customerInfo.custContact})]})}),u.customerInfo.custAddress&&u.customerInfo.custAddress!==""&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.address}}),": ",s.jsx("span",{children:u.customerInfo.custAddress})]})}),bt(u.appliedDiscounts??[],"COMPLIMENTARY","discountType").discountType&&s.jsx("h5",{className:"left-align-entity level2-bold",dangerouslySetInnerHTML:{__html:C.complementary_disc}}),u.orderId&&s.jsx("h5",{className:"left-align-entity",style:{flexShrink:0},children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.order_no}}),": ",s.jsx("span",{children:u.orderId})]})}),u.orderInfo.orderDate&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.date}}),":",s.jsx("span",{children:u.orderInfo.orderDate})]})}),u.deliveryTimestamp&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.delivery_date}}),":",s.jsx("span",{children:u.deliveryTimestamp})]})}),u.captainName&&s.jsx("h5",{className:"left-align-entity",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.captain_name}}),":",s.jsx("span",{children:u.captainName})]})})]}),(cn=u.customFields)!=null&&cn.length?s.jsxs("div",{className:`details-section ${k[l].dynamicClassname}`,children:[s.jsx("hr",{}),u.customFields.map(_=>s.jsx("h4",{className:"left-align-entity",children:_.customName+": "+_.customValue}))]}):"",u.newFormat?B(u,C):W(u,C),s.jsx("br",{}),s.jsxs("div",{className:`bottom-section ${k[l].dynamicClassname}`,children:[s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h6",{className:`total-qty ${(dn=u.custoutStandingData)!=null&&dn.balanceAmt||u.rewardAmt&&u.paymentMethods&&u.paymentMethods.length>0?"level3-bold":"level2-bold"}`,style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.50rem":"1.75rem"},dangerouslySetInnerHTML:{__html:C.grand_total}}),s.jsx("h6",{className:`actual-qty ${(hn=u.custoutStandingData)!=null&&hn.balanceAmt||u.rewardAmt&&u.paymentMethods&&u.paymentMethods.length>0?"level3-bold":"level2-bold"}`,style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.40rem":"1.75rem"},children:u.curr+" "+m(u.finalAmount)})]}),(un=u.custoutStandingData)!=null&&un.balanceAmt?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{children:s.jsx("span",{dangerouslySetInnerHTML:{__html:C.previous_outstanding}})}),s.jsx("h5",{children:u.curr+" "+m(u.custoutStandingData.balanceAmt)})]}),!u.rewardAmt&&!u.paymentMethods?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h6",{className:"total-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.50rem":"1.75rem"},dangerouslySetInnerHTML:{__html:C.total_payable}}),s.jsx("h6",{className:"actual-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.40rem":"1.75rem"},children:u.curr+" "+m(u.finalAmount+u.custoutStandingData.balanceAmt)})]}):""]}):"",i=="25e5f1e4-68ff-43a7-b042-bebb93f42b94"?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h6",{className:"total-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.50rem":"1.75rem"},children:"المجموع الإجمالي"}),s.jsx("h6",{className:"actual-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.40rem":"1.75rem"}})]}):"",u.rewardAmt?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsxs("h5",{children:["- ",s.jsx("span",{dangerouslySetInnerHTML:{__html:C.rewards_redeemed}}),s.jsx("span",{children:"("+u.usedPoints+" Points)"})]}),s.jsx("h5",{children:u.curr+" "+u.rewardAmt})]}):"",u.paymentMethods&&u.paymentMethods.length?u.paymentMethods.map(_=>{var X;if(_.paidAmt)return s.jsxs("div",{className:`bottom-section-div inline-display ${Te}`,children:[s.jsxs("h5",{children:["-",s.jsx("span",{dangerouslySetInnerHTML:{__html:C[`${(X=_.paymentMode)==null?void 0:X.toLowerCase()}`]??T(_.paymentMode)??"CASH"}}),s.jsx("span",{children:_.isRefund?"(Refund)":""})]}),s.jsx("h5",{children:_.isRefund?s.jsx(s.Fragment,{children:u.curr+" ("+m(_.paidAmt)+")"}):s.jsx(s.Fragment,{children:u.curr+" "+m(_.paidAmt)})})]})}):"",u.rewardAmt&&!u.paymentMethods?s.jsx(s.Fragment,{children:s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h6",{className:"total-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.50rem":"1.75rem"},dangerouslySetInnerHTML:{__html:C.total_payable}}),s.jsx("h6",{className:"actual-qty level2-bold",style:{fontSize:l==="2INCH"||l==="1.8INCH"?"1.40rem":"1.75rem"},children:u.curr+" "+m(u.finalAmount+(((mn=u==null?void 0:u.custoutStandingData)==null?void 0:mn.balanceAmt)||0)-u.rewardAmt)})]})}):"",u.balanceAmt&&u.balanceAmt!=0?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{dangerouslySetInnerHTML:{__html:C.balance_amt}}),s.jsx("h5",{children:u.curr+" "+m(u.balanceAmt)})]}):"",s.jsx("hr",{})]}),u.earnPoints&&u.paymentMethods?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h6",{className:"total-qty line-gaps",children:"EARN POINTS"}),s.jsx("h6",{className:"actual-qty",children:u.earnPoints})]}):"",(u.balPoint||u.earnPoints)&&!Number.isNaN(u.balPoint||u.earnPoints)?s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h6",{className:"total-qty line-gaps",dangerouslySetInnerHTML:{__html:C.reward_point_balance}}),s.jsx("h6",{className:"actual-qty",children:u.balPoint+u.earnPoints||0})]}):"",u.upiId&&u.companyInfo.companyName&&s.jsxs("div",{className:"single-entity-and-center",children:[s.jsx("h6",{style:{marginTop:"6px"},children:"Scan this QRCode to Pay"}),P(u.upiId,u.orderId,u.companyInfo.companyName,u.paidAmount)]}),u.curr==="SAR"&&r.vatNo&&s.jsxs("div",{className:"single-entity-and-center",children:[s.jsx("h6",{style:{marginTop:"6px"},children:"Scan with ZATCA app for invoice details."}),O(r.vatNo,u)]}),j?s.jsx("div",{className:"image-bill",children:s.jsx("img",{src:`${j}`,className:"single-entity-and-center",style:{width:k[l].logoWidth}})}):"",u.footerMessage?s.jsx("h4",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:u.footerMessage}}):"",u.printby&&u.printOperatorInfo?s.jsx("h6",{className:"left-align-entity",children:`Printed By:${u.printby}`}):"",u.printTime&&u.printOperatorInfo?s.jsx("h6",{className:"left-align-entity",children:`Printed On:${u.printTime}`}):"",u.disabledPoweredBy?"":s.jsx("h6",{className:"single-entity-and-center",children:"Powered By: www.recaho.com"})]})});return te}else if(g==="PRINT_DASHBOARD"&&u.salesCollection){const te=u.salesCollection.totalDiscountAmt?gs(u.salesCollection.grandTotal,u.salesCollection.totalDiscountAmt):null,_=u.salesCollection.totalCollection-u.salesCollection.totalTax;var R=E().format("DD/MM/YYYY LT");const X=(fn=u.monthTillDateSalesColl)!=null&&fn.totalDiscountAmt?gs(u.monthTillDateSalesColl.grandTotal,u.monthTillDateSalesColl.totalDiscountAmt):null;return s.jsxs("div",{className:`main-div ${k[l].dynamicClassname}`,style:{width:k[l].paperSize},children:[s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsxs("div",{children:[s.jsx("p",{className:"single-entity-and-left-align",children:`Printed On:- ${R}`}),s.jsx("br",{}),s.jsx("h1",{className:"single-entity-and-center level2-bold",children:"Sales Report"}),s.jsx("p",{className:"single-entity-and-center",children:u.selectedDate})]}),s.jsx("hr",{}),u.monthTillDateSalesColl?s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center flex-two-items",children:"MTD Sales Breakup"}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"Gross Sales:"}),s.jsx("span",{children:oe(u.monthTillDateSalesColl.grandTotal,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"DISCOUNT:"}),s.jsx("span",{children:`${oe(u.monthTillDateSalesColl.totalDiscountAmt,o)}${X?`(${m(X)}%)`:""}`})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"CHARGES:"}),s.jsx("span",{children:oe(u.monthTillDateSalesColl.totalOtherCharges,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"NET SALES BEFORE TAX:"}),s.jsx("span",{children:oe(u.monthTillDateSalesColl.totalCollection-u.monthTillDateSalesColl.totalTax,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"TAX:"}),s.jsx("span",{children:oe(u.monthTillDateSalesColl.totalTax,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"NET SALES AFTER TAX:"}),s.jsx("span",{children:oe(u.monthTillDateSalesColl.totalCollection,o)})]})]}),s.jsx("hr",{})]}):"",s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center flex-two-items",children:"SALES BREAK-UP"}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"Gross Sales:"}),s.jsx("span",{children:oe(u.salesCollection.grandTotal,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"DISCOUNT:"}),s.jsx("span",{children:`${oe(u.salesCollection.totalDiscountAmt,o)}${te?`(${m(te)}%)`:""}`})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"CHARGES:"}),s.jsx("span",{children:oe(u.salesCollection.totalOtherCharges,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"NET SALES BEFORE TAX:"}),s.jsx("span",{children:oe(_,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"TAX:"}),s.jsx("span",{children:oe(u.salesCollection.totalTax,o)})]}),s.jsxs("h5",{className:"level3-bold flex-two-items",children:[s.jsx("span",{children:"NET SALES AFTER TAX:"}),s.jsx("span",{children:oe(u.salesCollection.totalCollection,o)})]})]}),s.jsx("hr",{}),Z(u.otherFields.totalDiscountAmt,u.otherFields.discountList,"Discount",{action:"addCharges"}),Z(u.otherFields.totalOtherCharges,u.otherFields.otherChargesList,"Charges"),Z(u.otherFields.totalTax,u.otherFields.taxList,"Tax"),s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center",children:"BY BUSINESS"}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Total Sales:"}),s.jsx("span",{children:oe(u.salesCollection.totalCollection,o)})]}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Total Orders:"}),s.jsx("span",{children:u.salesCollection.totalOrders})]}),S(u)]}),s.jsx("hr",{}),u.otherFields.totalItemType?s.jsx("div",{children:Z(u.otherFields.totalItemType,u.otherFields.itemTypeList,"Item Type",{action:"addCharges"})}):"",u.averageCollection.avgTableTime||u.averageCollection.avgorderValue||u.averageCollection.noOfGuest?s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center",children:"PERFORMANCE METRICS"}),u.averageCollection.avgTableTime?s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsxs("span",{children:["Average ",r.customLabels.Table," Time:"]}),s.jsx("span",{children:u.averageCollection.avgTableTime})]}):"",u.averageCollection.avgorderValue?s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Average Order Value:"}),s.jsx("span",{children:oe(u.averageCollection.avgorderValue,o)})]}):"",u.averageCollection.noOfGuest?s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Covers:"}),s.jsx("span",{children:u.averageCollection.noOfGuest})]}):"",u.averageCollection.avgPerCover?s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Average Per Cover:"}),s.jsx("span",{children:oe(u.averageCollection.avgPerCover,o)})]}):"",s.jsx("hr",{})]}):"",s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center",children:"BY PAYMENT CATEGORY"}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:"Total Collection:"}),s.jsx("span",{children:oe(u.totalCollection,o)})]}),M(u)]}),z(u.averageCollection),u.otherFields.outstandingAmt?s.jsxs(s.Fragment,{children:[s.jsx("hr",{}),s.jsxs("div",{children:[s.jsx("h4",{className:"single-entity-and-center",children:"BY PAYMENT STATUS"}),s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:" -- Sales:"}),s.jsx("span",{children:oe(u.otherFields.salesCollection,o)})]}),u.otherFields.outstandingAmt?s.jsxs("h5",{className:"left-align-entity level3-bold flex-two-items",children:[s.jsx("span",{children:" -- Outstanding Payment Received:"}),s.jsx("span",{children:oe(u.otherFields.outstandingAmt,o)})]}):""]})]}):"",s.jsx("hr",{}),Ce(u.averageCollection.dailyExpanse)]}),s.jsx("br",{}),xs=="Android OS"&&s.jsx("div",{className:"space-3rem"})]})}else if(g==="AGGREGATOR_BILL"){let te;return a.aggregatorOrderId&&a.aggregatorOrderId!==""&&(te=U(a.aggregatorOrderId)),s.jsx("div",{className:"main-div bill",style:{width:k[l].paperSize},children:s.jsxs("div",{children:[s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsx("br",{}),I&&s.jsx("div",{className:"image-bill",children:s.jsx("img",{src:I,className:"single-entity-and-center",style:{width:k[l].logoWidth}})}),s.jsxs("div",{className:`details-section ${k[l].dynamicClassname}`,children:[!I&&a.companyInfo.companyName&&a.companyInfo.companyName!=""&&s.jsx("h1",{className:"single-entity-and-center",children:a.companyInfo.companyName}),a.companyInfo.companyAddress&&a.companyInfo.companyAddress!==""&&s.jsx("h3",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:a.companyInfo.companyAddress}}),a.companyInfo.companyContact&&a.companyInfo.companyContact!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_mobile}}),": ",s.jsx("span",{children:a.companyInfo.companyContact})]})}),a.companyInfo.companyEmail&&a.companyInfo.companyEmail!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_Email}}),": ",s.jsx("span",{children:a.companyInfo.companyEmail})]})}),a.fssai&&a.fssai!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_FSSAI}}),": ",s.jsx("span",{children:a.fssai})]})}),a.gst&&a.gst!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_GST}}),": ",s.jsx("span",{children:a.gst})]})}),a.vatNo&&a.vatNo!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_VAT}}),": ",s.jsx("span",{children:a.vatNo})]})}),a.orderFrom&&s.jsx("h3",{className:"single-entity-and-center level2-bold",children:a.orderFrom}),a.orderSource&&te&&s.jsxs("h4",{className:"single-entity-and-center",children:[`${a.orderSource}: ${te.firstDigits||""}`,s.jsxs("span",{style:{fontSize:"2rem"},children:["-",te.last4Dgits||""]})]}),a.zomatoInstant&&s.jsx("h4",{className:"single-entity-and-center",children:a.zomatoInstant}),a.otp&&a.otp!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.delivery_code}}),": ",s.jsx("span",{children:a.otp})]})}),a.tokenId&&s.jsx("h2",{className:"single-entity-and-center level2-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.token_no}})," ",s.jsx("span",{children:a.tokenId})]})})]}),s.jsx("hr",{}),s.jsxs("div",{className:`details-section ${k[l].dynamicClassname}`,children:[a.customerInfo.custName&&a.customerInfo.custName!==""&&s.jsx("h5",{className:"left-align-entity level3-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.name}}),": ",s.jsx("span",{children:a.customerInfo.custName})]})}),a.customerInfo.custContact&&a.customerInfo.custContact!==""&&s.jsx("h5",{className:"left-align-entity level3-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.mobile}}),": ",s.jsx("span",{children:a.customerInfo.custContact})]})}),a.customerInfo.custAddress&&a.customerInfo.custAddress!==""&&s.jsx("h5",{className:"left-align-entity level3-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.address}}),": ",s.jsx("span",{children:a.customerInfo.custAddress})]})}),s.jsxs("div",{className:"flex-two-items",children:[a.orderId&&s.jsx("h5",{className:"left-align-entity level3-bold",style:{flexShrink:0},children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.order_no}}),": ",s.jsx("span",{children:a.orderId})]})}),a.orderFrom&&s.jsx("h5",{className:"single-entity-and-center",children:a.orderFrom})]}),a.orderInfo.orderDate&&s.jsx("h5",{className:"left-align-entity level3-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.date}}),":",s.jsx("span",{children:a.orderInfo.orderDate})]})}),a.deliveryTimestamp&&s.jsx("h5",{className:"left-align-entity level3-bold",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.delivery_date}}),":",s.jsx("span",{children:a.deliveryTimestamp})]})})]})]}),s.jsx("hr",{}),s.jsxs("section",{className:"products-section",children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:"items products-heading-name-kot",children:k[l].itemName}),s.jsx("h6",{className:"items products-heading-qty-kot",children:"Qty"})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:"products-section",style:{paddingTop:"12px"},children:[((pn=a.services)==null?void 0:pn.length)&&a.services.map(X=>{var me;return s.jsxs("div",{style:X.serviceName.startsWith("+ ")?{}:{paddingTop:"12px"},children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:"items products-heading-name-kot",style:{lineHeight:1.2},children:X.serviceName.toUpperCase()}),s.jsx("h6",{className:"items products-heading-qty-kot",children:X.qty})]}),((me=X.addons)==null?void 0:me.length)&&X.addons.map(y=>s.jsx("h6",{className:"items products-heading-addon-kot",children:"- "+Qe(y.serviceName)})),X.instruction&&a.itemInstructionOnBill&&s.jsx("h6",{className:"left-align-entity level2-bold",children:s.jsx("h6",{className:"items products-heading-addon-kot",children:X.instruction})})]})}),s.jsx("hr",{})]}),s.jsxs("div",{className:"bottom-section-div flex-two-items",style:{paddingBottom:"3rem"},children:[s.jsxs("h5",{children:["TOTAL ITEMS: ",a.services.length]}),s.jsxs("h5",{children:["TOTAL QTY: ",_e(a.totalQty)]})]}),a&&a.discountAmt?s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{children:"DISCOUNT AMOUNT"}),s.jsx("h5",{children:oe(a.discountAmt,o)})]}):"",a.otherCharges&&a.otherCharges.length>0?a.otherCharges.map(X=>{if(X.amt)return s.jsxs("div",{className:"bottom-section-div",children:[s.jsx("h5",{children:X.name}),s.jsx("h5",{children:a.curr+" "+m(X.amt)})]})}):"",a.taxObj&&a.taxObj.GST?s.jsx(s.Fragment,{children:a.taxObj.GST.map(X=>{let me=new Array;for(const y in X)if(X[y]&&X[y]!=0){let N=y/2;me.push(s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bottom-section-div",children:[s.jsxs("h5",{children:["CGST @",N]}),s.jsx("h5",{children:a.curr+" "+m(X[y]/2)})]}),s.jsxs("div",{className:"bottom-section-div",children:[s.jsxs("h5",{children:[u.taxLabel+" "," @",N,"%"]}),s.jsx("h5",{children:a.curr+" "+m(X[y]/2)})]})]}))}return me})}):"",s.jsx("div",{style:{marginTop:"6px"},children:(Kt=a.customFeilds)==null?void 0:Kt.map(X=>s.jsx("h4",{className:"left-align-entity",children:X.customName+": "+X.customValue}))}),a.paymentState&&s.jsx("h4",{className:"single-entity-and-center",style:{marginTop:"6px"},children:`Payment Status: ${a.paymentState=="PAID_ONLINE"?"Online paid":"COD"}`}),j?s.jsx("div",{className:"image-bill",children:s.jsx("img",{src:`${j}`,className:"single-entity-and-center",style:{width:k[l].logoWidth}})}):"",a.footerMessage?s.jsx("h4",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:a.footerMessage}}):"",a.printedBy&&a.printOperatorInfo?s.jsx("h6",{className:"left-align-entity",children:`Printed By: ${a.printedBy}`}):"",a.printTime&&a.printOperatorInfo?s.jsx("h6",{className:"left-align-entity",children:`Printed On: ${a.printTime}`}):"",a.disabledPoweredBy?"":s.jsx("h6",{className:"single-entity-and-center",children:"Powered By: www.recaho.com"})]})})}else if(g==="UPDATE_TABLE"){let te="";return a.action==="SWITCH_TABLE"?te=s.jsx("div",{className:"main-div",style:{width:"100%",height:"auto"},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:["**",(bs=d.Table)==null?void 0:bs.toUpperCase()," SWITCH**"]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"From"}),s.jsx("h5",{className:"left-align-entity level3-bold",children:(Nt=a.from)==null?void 0:Nt.map((_,X)=>{var me,y,N;return`${(y=(me=e.tableData[_])==null?void 0:me.attachedArea)==null?void 0:y.toUpperCase()} - ${(N=e.tableData[_])==null?void 0:N.tableName}${X+1===a.from.length?"":", "} `})}),s.jsx("br",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"To"}),s.jsx("h2",{className:"left-align-entity level2-bold",children:`${(Zt=(Qt=e.tableData[a.to[0]])==null?void 0:Qt.attachedArea)==null?void 0:Zt.toUpperCase()} - ${(Ss=e.tableData[a.to[0]])==null?void 0:Ss.tableName}`}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Running ",`${d.KOT}`,"s: ",Object.keys(a.activeKots).join(", ")]})]})}):te=s.jsx("div",{className:"main-div",style:{width:"100%",height:"auto"},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:["**MERGE ",(yn=d.Table)==null?void 0:yn.toUpperCase(),"**"]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"From"}),s.jsx("h5",{className:"left-align-entity level3-bold",children:(Ts=a.from)==null?void 0:Ts.map((_,X)=>{var me,y,N;return`${(y=(me=e.tableData[_])==null?void 0:me.attachedArea)==null?void 0:y.toUpperCase()} - ${(N=e.tableData[_])==null?void 0:N.tableName}${X+1===a.from.length?"":", "} `})}),s.jsx("br",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"To"}),s.jsx("h2",{className:"left-align-entity level2-bold",children:`${(ws=(gn=e.tableData[a.to[0]])==null?void 0:gn.attachedArea)==null?void 0:ws.toUpperCase()} - ${(Is=e.tableData[a.to[0]])==null?void 0:Is.tableName}`}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Running ",`${d.KOT}`,"s: ",Object.keys(a.activeKots).join(", ")]})]})}),te}else if(g==="COUNTER_OPERATION"){let te;return l=="2INCH"||l=="1.8INCH"?te=s.jsx("div",{className:"main-div",style:{width:k[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:[a.counterName," Report"]}),s.jsxs("h6",{className:"single-entity-and-center level3-bold",children:[" Printed By: ",a.printedBy," "]}),s.jsxs("h6",{className:"single-entity-and-center level3-bold",children:[" Printed On: ",a.printedOn," "]}),s.jsx("hr",{}),s.jsxs("h4",{className:"left-align-entity level3-bold",children:[" Total Sales: ",Y(a.totalSale,o)," "]}),a.totalSale>0&&s.jsxs(s.Fragment,{children:[(a.cashSale>0||a.cashSale<0)&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Cash: ",Y(a.cashSale,o)," "]}),a.payModes&&a.payModes.length>0&&a.payModes.map(_=>{if(_.value>0||_.value<0)return s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- ",_.displayName," : ",Y(_.value,o)]})})]}),s.jsxs("h4",{className:"left-align-entity level3-bold",children:["Cash Balance: ",Y(a.closingActualBalance,o)]}),s.jsx("hr",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"Opening Counter Operation"}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Opened By : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.openedBy]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Date/Time : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.openingDateTime]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- System Opening Balance : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",Y(a.openingBalance,o)," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Actual Opening Balance : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",Y(a.actualOpeningBalance,o)]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Opening Difference Amt : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",Y(a.openingShort,o)," "]}),a.openingShortReason&&s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Opening Difference Reason : "}),a.openingShortReason&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.openingShortReason]}),a.openingTotalDenomations>0&&s.jsx(s.Fragment,{children:s.jsx("h5",{className:"left-align-entity level3-bold",children:"-- Currency Denominations"})}),a.openingDenominations&&a.openingDenominations.length>0&&a.openingDenominations.map(_=>s.jsxs("div",{class:o=="INR"?"denomination-container":"denomination-container-other-country",children:[s.jsxs("h5",{className:"left-align-entity level3-bold",children:["   ",o=="INR"?Y(_.denomination,o):_.denomination]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" X "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",_.count," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",Y(_.total,o)," "]})]})),a.openingTotalDenomations>0&&s.jsxs("div",{class:o=="INR"?"total-container":"total-container-other-country",children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" Total "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:Y(a.openingTotalDenomations,o)})]}),s.jsx("hr",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"Closing Counter Operation"}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Closed By : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.closedBy," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Date/Time :"}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.closingDateTime]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Cash Sale : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",Y(a.cashSale,o)," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- System Closing Balance : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",Y(a.closingBalance,o)," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Actual Closing Balance : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["   ",Y(a.closingActualBalance,o)]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Closing Difference Amt : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",Y(a.closingShort,o)," "]}),a.closingShortReason&&s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Closing Difference Reason : "}),a.closingShortReason&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    ",a.closingShortReason," "]}),a.debitEntry>0&&s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Other Cash Expense : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    -",Y(a.debitEntry,o)," "]})]}),a.creditEntry>0&&s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Other Cash Income : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["    +",Y(a.creditEntry,o)," "]})]}),a.internalTransferDebit>0&&s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Internal Transfer(cash to bank): "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["   -",Y(a.internalTransferDebit,o)]})]}),a.internalTransferCredit>0&&s.jsxs(s.Fragment,{children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" -- Internal Transfer(bank to cash) : "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["   +",Y(a.internalTransferCredit,o)]})]}),a.TotalDenomationsAmount>0&&s.jsx(s.Fragment,{children:s.jsx("h5",{className:"left-align-entity level3-bold",children:"-- Currency Denominations"})}),a.denomations&&a.denomations.length>0&&a.denomations.map(_=>s.jsxs("div",{class:o=="INR"?"denomination-container":"denomination-container-other-country",children:[s.jsxs("h5",{className:"left-align-entity level3-bold",children:["  ",o=="INR"?Y(_.denomination,o):_.curr+" "+_.denomination]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" X "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",_.count," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",Y(_.total,o)," "]})]})),a.TotalDenomationsAmount>0&&s.jsxs("div",{class:o=="INR"?"total-container":"total-container-other-country",children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" Total "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:Y(a.TotalDenomationsAmount,o)})]})]})}):te=s.jsx("div",{className:"main-div",style:{width:k[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:[a.counterName," Report"]}),s.jsxs("h6",{className:"single-entity-and-center level3-bold",children:[" Printed By: ",a.printedBy," "]}),s.jsxs("h6",{className:"single-entity-and-center level3-bold",children:[" Printed On: ",a.printedOn," "]}),s.jsx("hr",{}),s.jsxs("h4",{className:"left-align-entity level3-bold",children:[" Total Sales: ",Y(a.totalSale,o)," "]}),a.totalSale>0&&s.jsxs(s.Fragment,{children:[a.cashSale>0&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Cash: ",Y(a.cashSale,o)," "]}),a.payModes&&a.payModes.length>0&&a.payModes.map(_=>{if(_.value>0)return s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- ",_.displayName," : ",Y(_.value,o)]})})]}),s.jsxs("h4",{className:"left-align-entity level3-bold",children:["Cash Balance: ",Y(a.closingActualBalance,o)]}),s.jsx("hr",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"Opening Counter Operation"}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Opened By : ",a.openedBy]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Date/Time : ",a.openingDateTime]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- System Opening Balance : ",Y(a.openingBalance,o)]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Actual Opening Balance : ",Y(a.actualOpeningBalance,o)]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Opening Difference Amt : ",Y(a.openingShort,o)]}),a.openingShortReason&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Opening Difference Reason : ",a.openingShortReason]}),a.openingTotalDenomations>0&&s.jsx(s.Fragment,{children:s.jsx("h5",{className:"left-align-entity level3-bold",children:"-- Currency Denominations"})}),a.openingDenominations&&a.openingDenominations.length>0&&a.openingDenominations.map(_=>s.jsxs("div",{class:o=="INR"?"denomination-container":"denomination-container-other-country",children:[s.jsxs("h5",{className:"left-align-entity level3-bold",children:["   ",o=="INR"?Y(_.denomination,o):_.denomination]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" X "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",_.count," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",Y(_.total,o)," "]})]})),a.openingTotalDenomations>0&&s.jsxs("div",{class:o=="INR"?"total-container":"total-container-other-country",children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" Total "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:Y(a.openingTotalDenomations,o)})]}),s.jsx("hr",{}),s.jsx("h5",{className:"left-align-entity level3-bold",children:"Closing Counter Operation"}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Closed By : ",a.closedBy," "]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Date/Time : ",a.closingDateTime]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Cash Sale : ",Y(a.cashSale,o)," "]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- System Closing Balance : ",Y(a.closingBalance,o)]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Actual Closing Balance : ",Y(a.closingActualBalance,o)]}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Closing Difference Amt : ",Y(a.closingShort,o)]}),a.closingShortReason&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" -- Closing Difference Reason : ",a.closingShortReason," "]}),a.debitEntry>0&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Other Cash Expense : -",Y(a.debitEntry,o)]}),a.creditEntry>0&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Other Cash Income : +",Y(a.creditEntry,o)]}),a.internalTransferDebit>0&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Internal Transfer(cash to bank): -",Y(a.internalTransferDebit,o)]}),a.internalTransferCredit>0&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["-- Internal Transfer(bank to cash): +",Y(a.internalTransferCredit,o)]}),a.TotalDenomationsAmount>0&&s.jsx(s.Fragment,{children:s.jsx("h5",{className:"left-align-entity level3-bold",children:"--Currency Denominations"})}),a.denomations&&a.denomations.length>0&&a.denomations.map(_=>s.jsxs("div",{class:o=="INR"?"denomination-container":"denomination-container-other-country",children:[s.jsxs("h5",{className:"left-align-entity level3-bold",children:["  ",o=="INR"?Y(_.denomination,o):_.curr+" "+_.denomination]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" X "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",_.count," "]}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsxs("h5",{className:"left-align-entity level3-bold",children:[" ",Y(_.total,o)," "]})]})),a.TotalDenomationsAmount>0&&s.jsxs("div",{class:o=="INR"?"total-container":"total-container-other-country",children:[s.jsx("h5",{className:"left-align-entity level3-bold",children:" "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" Total "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:" = "}),s.jsx("h5",{className:"left-align-entity level3-bold",children:Y(a.TotalDenomationsAmount,o)})]})]})}),te}else if(g==="ITEMWISE_SALES_COUNTER"){let te,{counterDetails:_}=e.printerDataObject;return te=s.jsx("div",{className:"main-div",style:{width:k[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsx("h2",{className:"single-entity-and-center level2-bold",children:"Item Wise Sales Report"}),s.jsx("h5",{className:"single-entity-and-center level3-bold",children:_.currentDate}),s.jsx("hr",{}),_.CounterName&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Counter Name: ",_.CounterName]}),_.CounterName&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["UserName: ",_.openedBy]}),_.CounterName&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Login Time: ",_.loginTime]}),_.logoutTime&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Logout Time: ",_.logoutTime]}),_.CounterName&&s.jsx("hr",{}),nt(a),s.jsx("hr",{}),s.jsx("h6",{className:"left-align-entity",children:`Printed By: ${_.openedBy}`}),s.jsx("h6",{className:"left-align-entity",children:`Printed On: ${_.printedOn}`})]})}),te}else if(g==="CARD_RECHARGE_DETAILS"){let{staticDataKOT:te}=e.printerDataObject;return getRechargeDetails(te)}else if(g==="PACKAGING_SLIP"){let te,_=0;u.aggregatorOrderId&&u.aggregatorOrderId!==""&&(te=U(u.aggregatorOrderId));const X=u.services;for(let y in X)_+=X[y].length;return s.jsx("div",{className:"main-div",style:{width:k[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsx("br",{}),s.jsxs("div",{className:`details-section ${k[l].dynamicClassname}`,children:[u.subOrderFrom&&s.jsx("h4",{className:"single-entity-and-center",children:u.subOrderFrom.toUpperCase()}),u.orderFrom!=="dine-in"&&s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:["Token No ",u.tokenId]}),u.tableName&&s.jsx("h2",{className:"single-entity-and-center level2-bold",children:u.tableName}),u.otp&&s.jsx("h4",{className:"single-entity-and-center level2-bold",children:"OTP: "+u.otp}),u.orderSource&&te&&s.jsxs("h4",{className:"single-entity-and-center level2-bold",children:[`${u.orderSource}: ${te.firstDigits||""}`,s.jsx("span",{style:{fontSize:"2rem"},children:te.last4Dgits||""})]}),u.zomatoInstant&&s.jsx("h4",{className:"single-entity-and-center level2-bold",children:u.zomatoInstant}),s.jsx("hr",{}),u.orderId&&s.jsx("h5",{className:"left-align-entity level3-bold",children:"Order Id: "+u.orderId}),u.date&&s.jsxs("h5",{className:"left-align-entity level3-bold",children:["Printed On: ",u.date]}),u.prepareBy?s.jsx("h5",{className:"left-align-entity level3-bold",children:"Prepare By : "+u.prepareBy}):"",u.waiterName&&s.jsx("h5",{className:"left-align-entity level3-bold",children:`${d.Waiter} Name: `+u.waiterName})]}),fe(u),s.jsx("br",{}),s.jsxs("div",{className:"bottom-section-div flex-two-items space-3rem",children:[s.jsxs("h5",{children:["TOTAL ITEMS: ",_]}),s.jsxs("h5",{children:["TOTAL QTY: ",_e(u.totalQty)]})]}),(xn=u.customFields)==null?void 0:xn.map(y=>s.jsx("h4",{className:"left-align-entity",children:y.customName+": "+y.customValue})),s.jsx("br",{}),u.orderFrom!=="dine-in"&&s.jsxs("h4",{className:"left-align-entity level3-bold",children:["Payment Status: ",u.paymentStatus.replace("_"," ")]})]})})}else{if(g==="ORDER_AGGREGATED_PRINT")return s.jsx("div",{className:"main-div",style:{width:k[l].paperSize},children:s.jsxs("div",{style:{width:"100%",textAlign:"left",marginLeft:"auto"},children:[a.logo&&s.jsx("div",{className:"image-bill",children:s.jsx("img",{src:a.logo,className:"single-entity-and-center"})}),s.jsxs("div",{className:`details-section ${k[l].dynamicClassname}`,children:[!a.logo&&a.companyName&&a.companyName!=""&&s.jsx("h1",{className:"single-entity-and-center",children:a.companyName}),a.companyAddress&&a.companyAddress!==""&&s.jsx("h3",{className:"single-entity-and-center",dangerouslySetInnerHTML:{__html:a.companyAddress}}),a.companyContact&&a.companyContact!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_mobile}}),": ",s.jsx("span",{children:a.companyContact})]})}),a.fssai&&a.fssai!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_FSSAI}}),": ",s.jsx("span",{children:a.fssai})]})}),a.gst&&a.gst!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_GST}}),": ",s.jsx("span",{children:a.gst})]})}),a.vatNo&&a.vatNo!==""&&s.jsx("h3",{className:"single-entity-and-center",children:s.jsxs("div",{className:"inline-display",children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.company_VAT}}),": ",s.jsx("span",{children:a.vatNo})]})})]}),s.jsx("hr",{}),s.jsx("h3",{className:"single-entity-and-center",children:"Outstanding Bill Summary"}),s.jsx("hr",{}),s.jsx("hr",{}),a.name&&s.jsxs("h5",{children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.name}}),": ",s.jsx("span",{children:a.name})]}),a.mobile&&s.jsxs("h5",{children:[s.jsx("span",{dangerouslySetInnerHTML:{__html:C.mobile}}),": ",s.jsx("span",{children:a.mobile})]}),s.jsxs("div",{className:"mt-2",children:[s.jsx("hr",{}),s.jsx("section",{className:"products-section",children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h5",{className:`items products-heading-name ${k[l].dynamicClassname}`,children:"Date"}),s.jsx("h5",{className:`items products-heading-orderId ${k[l].dynamicClassname}`,children:"Order Id"}),s.jsx("h5",{className:`items products-heading-amount ${k[l].dynamicClassname}`,children:"Amount"})]})}),s.jsx("hr",{}),s.jsx("section",{className:"products-section",children:a.orders.map(_=>s.jsx("div",{style:{paddingTop:"12px"},children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name ${k[l].dynamicClassname}`,children:sr(_.date)}),s.jsx("h6",{className:`items products-heading-orderId ${k[l].dynamicClassname}`,children:_.orderId}),s.jsx("h6",{className:`items products-heading-amount ${k[l].dynamicClassname}`,children:a.curr+" "+m(_.finalAmount)})]})},_.orderId))})]}),s.jsxs("div",{children:[s.jsx("hr",{}),s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:"Total Bill Amount"}),s.jsx("h5",{className:"actual-qty",children:a.curr+" "+m(a.totalAmount)})]}),s.jsx("hr",{}),s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h5",{className:"total-qty",children:"Total Amount Paid"}),s.jsx("h5",{className:"actual-qty",children:a.curr+" "+m(a.totalPaid)})]})]}),(Nn=a.transactions)!=null&&Nn.length?s.jsxs("div",{children:[s.jsx("hr",{}),s.jsx("section",{className:"products-section",children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h5",{className:`items products-heading-name ${k[l].dynamicClassname}`,children:"Date"}),s.jsx("h5",{className:`items products-heading-orderId ${k[l].dynamicClassname}`,children:"Payment Mode"}),s.jsx("h5",{className:`items products-heading-amount ${k[l].dynamicClassname}`,children:"Amount"})]})}),s.jsx("hr",{}),s.jsx("section",{className:"products-section",children:a.transactions.map(_=>s.jsx("div",{style:{paddingTop:"12px"},children:s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h6",{className:`items products-heading-name ${k[l].dynamicClassname}`,children:_.date}),s.jsx("h6",{className:`items products-heading-orderId ${k[l].dynamicClassname}`,children:_.paymentMode}),s.jsx("h6",{className:`items products-heading-amount ${k[l].dynamicClassname}`,children:a.curr+" "+m(_.amount)})]})},_.id))})]}):"",s.jsxs("div",{className:"mt-2 pb-2rem",children:[s.jsx("hr",{}),s.jsxs("div",{className:"bottom-section-div inline-display",children:[s.jsx("h4",{className:"total-qty-other",children:"Total Payable"}),s.jsx("h4",{className:"actual-qty-other",children:a.curr+" "+m(a.totalPayable)})]})]})]})});{let te,_=0,X,me;for(let N=0;N<(((Cs=a.services)==null?void 0:Cs.length)||0);N++)me=a.services[N],me.status==="CANCELLED"&&!a.onlyCancelledItems&&(_+=me.qty);return a.aggregatorOrderId&&a.aggregatorOrderId!==""&&(te=U(a.aggregatorOrderId)),s.jsx("div",{className:"main-div",style:{width:k[l].paperSize},children:s.jsxs("div",{style:{maxWidth:"100%",textAlign:"left",marginLeft:"auto"},children:[s.jsx("br",{}),s.jsxs("div",{className:"main-div",children:[a.duplicate&&!a.onlyCancelledItems?s.jsx("h4",{className:"single-entity-and-center",children:"DUPLICATE KOT"}):"",_||a.onlyCancelledItems?s.jsx("h4",{className:"single-entity-and-center",children:"EDITED KOT - ITEM CANCELLED"}):"",a.station&&s.jsx("h4",{className:"single-entity-and-center level2-bold",children:a.station.toUpperCase()}),a.subOrderFrom&&s.jsx("h4",{className:"single-entity-and-center",children:a.subOrderFrom.toUpperCase()}),a.type!="dine-in"&&a.tokenId&&s.jsxs("h2",{className:"single-entity-and-center level2-bold",children:["Token No ",a.tokenId]}),a.type=="dine-in"&&a.type&&s.jsx("h2",{className:"single-entity-and-center level2-bold",children:a.type==="dine-in"?a.tableName?a.tableName:"-":""}),s.jsx("hr",{}),a.otp&&s.jsx("h4",{className:"single-entity-and-center level2-bold",children:"OTP: "+a.otp}),a.orderSource&&te&&s.jsxs("h4",{className:"single-entity-and-center level2-bold",children:[`${a.orderSource}: ${te.firstDigits||""}`,s.jsx("span",{style:{fontSize:"2rem"},children:te.last4Dgits||""})]}),a.zomatoInstant&&s.jsx("h4",{className:"single-entity-and-center level2-bold",children:a.zomatoInstant}),s.jsxs("div",{className:"details-section",children:[a.orderId&&s.jsx("h5",{className:"left-align-entity level3-bold",children:"Order Id: "+Array.from(a.orderId).join(", ")}),s.jsxs("div",{className:"flex-container-kot",children:[a.kotId&&s.jsx("h5",{className:"left-align-entity level3-bold",children:`${d.KOT} Id: `+Array.from(a.kotId).join(", ")}),a.type&&a.type!="dine-in"&&s.jsx("h2",{className:"left-align-entity",children:a.type==="dine-in"?a.tableName?a.tableName:"-":""})]}),a.customerName&&s.jsx("h5",{className:"left-align-entity level3-bold",children:a.customerName}),a.time?s.jsx("h5",{className:"left-align-entity level3-bold",children:"Printed On : "+a.time}):"",a.prepareBy?s.jsx("h5",{className:"left-align-entity level3-bold",children:"Prepare By : "+a.prepareBy}):""]}),a.createdBy&&s.jsx("h5",{className:"left-align-entity level3-bold",children:"Printed By: "+a.createdBy}),a.waiterName&&s.jsx("h5",{className:"left-align-entity level3-bold",children:`${d.Waiter} Name: `+a.waiterName})]}),s.jsx("hr",{}),s.jsxs("section",{className:`products-section ${Te}`,children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h5",{className:"items products-heading-name-kot",children:k[l].itemName}),s.jsx("h5",{className:"items products-heading-qty-kot",children:"QTY"})]}),s.jsx("hr",{})]}),s.jsxs("section",{className:`products-section ${Te}`,style:{paddingTop:"12px"},children:[a.services&&a.services.length&&a.services.length>0&&a.services.reverse().map(N=>(N.status==="CANCELLED"?X=s.jsxs("strike",{children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h2",{className:"items products-heading-name-kot ",children:Qe(N.serviceName)}),s.jsx("h2",{className:"items products-heading-qty-kot ",children:N.qty})]}),N.addons&&N.addons.length&&N.addons.map(L=>s.jsx("h2",{className:"items products-heading-addon-kot",children:"- "+Qe(L.serviceName)})),N.instruction&&s.jsx("h4",{className:"left-align-entity level2-bold",children:s.jsx("h4",{className:"items products-heading-addon-kot",children:" "+N.instruction})})]}):X=s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"products-heading-div",children:[s.jsx("h2",{className:"items products-heading-name-kot ",children:Qe(N.serviceName)}),s.jsx("h2",{className:"items products-heading-qty-kot ",children:N.qty})]}),N.addons&&N.addons.length&&N.addons.map(L=>s.jsx("h2",{className:"items products-heading-addon-kot",children:"- "+Qe(L.serviceName)})),N.instruction&&s.jsx("h4",{className:"left-align-entity level2-bold",children:s.jsx("h4",{className:"items products-heading-addon-kot",children:" "+N.instruction})})]}),s.jsx("div",{children:X}))),s.jsx("hr",{})]}),s.jsxs("div",{className:"bottom-section-div flex-two-items",style:{paddingBottom:"3rem"},children:[s.jsxs("h5",{className:"level3-bold",children:["TOTAL ITEMS: ",a.services.length]}),s.jsxs("h5",{className:"level3-bold",children:["TOTAL QTY: ",_e(a.totalQty-_)]})]}),(Os=a.customFields)==null?void 0:Os.map(N=>s.jsx("h4",{className:"left-align-entity",children:N.customName+": "+N.customValue})),a.deliveryTimestamp&&s.jsx("h5",{className:"left-align-entity level3-bold",children:"Delivery Date: "+a.deliveryTimestamp})]})})}}};return s.jsx("div",{children:a&&Object.keys(a).length!==0&&s.jsx("div",{id:"domEl",ref:n,className:"html-bill-print",style:{maxWidth:k[l].paperSize,zIndex:"-10",backgroundColor:"#fff"},children:Mt(f,a.obj,a.companyLogo,a.companyQrCode)})})},Oh=async(e,t,n,r={})=>new Promise(async(i,a)=>{var h,f,o;try{const{needPackagingSlip:l=!0}=r;e.primaryWaiter&&n&&(e.primaryWaiter=((h=n[e.primaryWaiter])==null?void 0:h.name)||null);const{obj:c,printersMap:d}=_d(e,t,r);let p=[],m=[];const x=_a(c).flatMap(v=>{var b;return(b=d[v.station])==null?void 0:b.map(w=>new Promise(S=>s.jsx(st,{printerDataObject:{staticDataKOT:v,paperSize:w.paperSize,printer:w.printer},newId:v.newId,value:{settingData:t},onImageGenerated:M=>{p.push({paperSize:w.paperSize,printer:w.printer,image:M,type:"KOT"}),S()},additionalActions:r},v.newId)))});if(l&&((f=t.packagingSlipPrinters)!=null&&f.length)){const v=bd(e,t,r);(o=v.printers)!=null&&o.length&&v.printers.forEach(b=>{m.push(new Promise(w=>{x.push(s.jsx(st,{printerDataObject:{staticDataKOT:{obj:b.obj},paperSize:b.paperSize,printer:b.printer,type:"PACKAGING_SLIP"},newId:b.obj.newId,value:{settingData:t},onImageGenerated:S=>{p.push({paperSize:b.paperSize,printer:b.printer,image:S,type:"PACKAGING_SLIP"}),w()},additionalActions:r},b.obj.newId))}))})}x.length&&yt("root2",x),await Promise.all(m),i(p)}catch(l){a(l)}}),Mh=(e,t,n)=>new Promise(async(r,i)=>{try{const{tableData:a}=n;let h=[],f=[];if(n!=null&&n.action){const{obj:o,paperSize:l,printersMap:c}=Sd(e,t,n),d=_a(o).flatMap(p=>{var m;return(m=c[p.station])==null?void 0:m.map(x=>new Promise(v=>{const b=s.jsx(st,{printerDataObject:{staticDataKOT:p,paperSize:l,printer:x.printer,type:p.type},newId:p.newId,settingData:t,tableData:ms(a,"typeValue"),onImageGenerated:w=>{h.push({paperSize:x.paperSize,printer:x.printer,image:w,type:"UPDATE_TABLE"}),v()},additionalActions:n});return f.push(v),b}))});d.length&&yt("root1",d),await Promise.all(f.map(p=>new Promise(p)))}r(h)}catch(a){i(a)}}),Ah=(e,t)=>new Promise(async(n,r)=>{try{const i=Td(e,t);let a=[];await new Promise(f=>{const o=s.jsx(st,{printerDataObject:{staticDataKOT:{obj:i},paperSize:e.printerSize,type:"PRINT_DASHBOARD"},newId:i.id,settingData:e,onImageGenerated:l=>{a.push({paperSize:e.printerSize,image:l,type:"PRINT_DASHBOARD"}),f()},additionalActions:t});yt("root1",o)}),n(a)}catch(i){r(i)}}),Eh=async(e,t,n)=>new Promise(async(r,i)=>{try{const{obj:a}=await wd(e,t,n);let h=[];await new Promise(o=>{const l=s.jsx(st,{printerDataObject:{staticDataKOT:a,paperSize:a.paperSize,type:"AGGREGATOR_BILL"},newId:Math.random(),settingData:t,onImageGenerated:c=>{h.push({paperSize:a.paperSize,image:c,type:"AGGREGATOR_BILL"}),o()},additionalActions:n});yt("root1",l)}),r(h)}catch(a){i(a)}}),Rh=async(e,t,n)=>new Promise(async(r,i)=>{try{let a=await va(e,t,n),h=[];await new Promise(o=>{const l=s.jsx(st,{printerDataObject:{staticDataKOT:a,paperSize:a.paperSize,type:"BILL"},newId:Math.random(),settingData:t,onImageGenerated:c=>{h.push({paperSize:a.paperSize,image:c,type:"BILL"}),o()},additionalActions:n});yt("root1",l)}),r(h)}catch(a){i(a)}}),kh=async(e,t,n,r)=>new Promise(async(i,a)=>{try{let h=await Id(e);if(h&&Object.keys(h.Category).length!==0){let o=`ItemWiseSales:::${Math.floor(Math.random()*1e3)}`,l=[];await new Promise(d=>{const p=s.jsx(st,{printerDataObject:{staticDataKOT:h,paperSize:t.printerSize,type:"ITEMWISE_SALES_COUNTER",counterDetails:n},newId:o,settingData:t,onImageGenerated:m=>{l.push({paperSize:t.printerSize,image:m,type:"ITEMWISE_SALES_COUNTER"}),d()},additionalActions:r});yt("root1",p)}),i(l)}else i([])}catch(h){a(h)}}),Lh=async(e,t,n)=>new Promise(async(r,i)=>{try{let h=`counterDetailsPrint:::${Math.floor(Math.random()*1e3)}`,f=[];await new Promise(l=>{const c=s.jsx(st,{printerDataObject:{staticDataKOT:e,paperSize:t.printerSize,type:"COUNTER_OPERATION"},newId:h,settingData:t,onImageGenerated:d=>{f.push({paperSize:t.printerSize,image:d,type:"COUNTER_OPERATION"}),l()},additionalActions:n});yt("root1",c)}),r(f)}catch(a){i(a)}}),Ph=async(e,t,n={},r={})=>new Promise(async(i,a)=>{var h;try{const f=await Od(e,t);let o=[],l=ir(null,{fontTheme:t.fontTheme,type:"ORDER_AGGREGATED_PRINT",siteSetting:t}),c=l?(h=l[0])==null?void 0:h.paperSize:t.printerSize;await new Promise(p=>{const m=s.jsx(st,{printerDataObject:{staticDataKOT:{...f,name:n.name,mobile:n.mobile},paperSize:c,type:"ORDER_AGGREGATED_PRINT"},newId:Math.random(),settingData:t,onImageGenerated:x=>{o.push({paperSize:c,image:x,type:"ORDER_AGGREGATED_PRINT"}),p()},additionalActions:r});yt("root1",m)}),i(o)}catch(f){a(f)}}),Fh=async(e,t,n={})=>new Promise(async(r,i)=>{var a;try{const h=[];let f=[];for(let o=0;o<e.length;o++){let l=e[o];if((a=l.invoiceFormats)!=null&&a.length){let c=od(l.invoiceFormats,"createdAt")[0],d=await Md(c);await new Promise(m=>{const x=s.jsx(st,{printerDataObject:{staticDataKOT:d,paperSize:d.paperSize,type:"BILL"},newId:Math.random(),settingData:t,onImageGenerated:v=>{f.push({paperSize:d.paperSize,image:v,type:"BILL"}),m()},additionalActions:n});h.push(x)})}}h.length&&yt("root1",h),r(f)}catch(h){i(h)}}),yt=(e,t)=>{const n=document.getElementById(e);n&&ai.createRoot(n).render(t)};Oe.counterDetailsPrint=Lh,Oe.handleAggregatorBillPrint=Eh,Oe.handleBillPrint=Rh,Oe.handleDashboardPrint=Ah,Oe.handleItemWisePrint=kh,Oe.handleKOTPrint=Oh,Oe.handleOldBillPrints=Fh,Oe.handleSummaryPrint=Ph,Oe.handleUpdateTablePrint=Mh,Object.defineProperty(Oe,Symbol.toStringTag,{value:"Module"})});