@orderingstack/front-hooks 3.16.0 → 3.17.0

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.
Files changed (30) hide show
  1. package/dist/{index-634a7a89.js → index-2f5eed0e.js} +4 -4
  2. package/dist/index-2f5eed0e.js.map +1 -0
  3. package/dist/{index-06211fd3.mjs → index-d6b80ce1.mjs} +7 -7
  4. package/dist/index-d6b80ce1.mjs.map +1 -0
  5. package/dist/index.cjs.js +1 -1
  6. package/dist/index.es.js +1 -1
  7. package/dist/types/useCms.d.ts.map +1 -1
  8. package/dist/{web-309eab31.mjs → web-2b0e023a.mjs} +2 -2
  9. package/dist/{web-309eab31.mjs.map → web-2b0e023a.mjs.map} +1 -1
  10. package/dist/{web-1ba31afd.js → web-36b6ba6d.js} +2 -2
  11. package/dist/{web-1ba31afd.js.map → web-36b6ba6d.js.map} +1 -1
  12. package/dist/{web-4c5c2835.mjs → web-3b1e1224.mjs} +2 -2
  13. package/dist/{web-4c5c2835.mjs.map → web-3b1e1224.mjs.map} +1 -1
  14. package/dist/{web-7082d55d.js → web-5e5dfaf9.js} +2 -2
  15. package/dist/{web-7082d55d.js.map → web-5e5dfaf9.js.map} +1 -1
  16. package/dist/{web-5fc33b72.mjs → web-61192263.mjs} +2 -2
  17. package/dist/{web-5fc33b72.mjs.map → web-61192263.mjs.map} +1 -1
  18. package/dist/{web-533498d1.js → web-918b9ba4.js} +2 -2
  19. package/dist/{web-533498d1.js.map → web-918b9ba4.js.map} +1 -1
  20. package/dist/{web-5249ecef.js → web-9c8696af.js} +2 -2
  21. package/dist/{web-5249ecef.js.map → web-9c8696af.js.map} +1 -1
  22. package/dist/{web-5e4a077c.mjs → web-a948b3da.mjs} +2 -2
  23. package/dist/{web-5e4a077c.mjs.map → web-a948b3da.mjs.map} +1 -1
  24. package/dist/{web-093ef89f.mjs → web-be22f3ac.mjs} +2 -2
  25. package/dist/{web-093ef89f.mjs.map → web-be22f3ac.mjs.map} +1 -1
  26. package/dist/{web-783b8092.js → web-e111688b.js} +2 -2
  27. package/dist/{web-783b8092.js.map → web-e111688b.js.map} +1 -1
  28. package/package.json +1 -1
  29. package/dist/index-06211fd3.mjs.map +0 -1
  30. package/dist/index-634a7a89.js.map +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";const re=require("react"),Br=require("@orderingstack/ordering-core-react"),tc=require("react-i18next"),Po=require("react-router-dom");function zt(e,r){const t=re.useRef(),[n,a]=re.useState(null);return re.useEffect(()=>{t.current=e},[e]),re.useEffect(()=>{function i(){var c;(c=t.current)==null||c.call(t)}if(r!==null){const c=setInterval(i,r);return a(c),()=>{a(null),clearInterval(c)}}},[r]),()=>{n&&clearInterval(n)}}var K=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nc(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){if(this instanceof n){var a=[null];a.push.apply(a,arguments);var i=Function.bind.apply(r,a);return new i}return r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),t}var ac=Object.prototype;function ic(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||ac;return e===t}var Gt=ic;function oc(e,r){return function(t){return e(r(t))}}var Do=oc,sc=Do,cc=sc(Object.keys,Object),uc=cc,fc=Gt,lc=uc,dc=Object.prototype,hc=dc.hasOwnProperty;function vc(e){if(!fc(e))return lc(e);var r=[];for(var t in Object(e))hc.call(e,t)&&t!="constructor"&&r.push(t);return r}var Bo=vc,xc=typeof K=="object"&&K&&K.Object===Object&&K,ko=xc,pc=ko,gc=typeof self=="object"&&self&&self.Object===Object&&self,mc=pc||gc||Function("return this")(),je=mc,yc=je,bc=yc.Symbol,Kt=bc,Ya=Kt,Lo=Object.prototype,_c=Lo.hasOwnProperty,Ec=Lo.toString,Sr=Ya?Ya.toStringTag:void 0;function wc(e){var r=_c.call(e,Sr),t=e[Sr];try{e[Sr]=void 0;var n=!0}catch{}var a=Ec.call(e);return n&&(r?e[Sr]=t:delete e[Sr]),a}var $c=wc,Ac=Object.prototype,Cc=Ac.toString;function Sc(e){return Cc.call(e)}var Tc=Sc,Va=Kt,Rc=$c,Oc=Tc,Pc="[object Null]",Ic="[object Undefined]",Xa=Va?Va.toStringTag:void 0;function Dc(e){return e==null?e===void 0?Ic:Pc:Xa&&Xa in Object(e)?Rc(e):Oc(e)}var Yt=Dc;function Bc(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var kr=Bc,kc=Yt,Lc=kr,Uc="[object AsyncFunction]",Nc="[object Function]",jc="[object GeneratorFunction]",Fc="[object Proxy]";function Hc(e){if(!Lc(e))return!1;var r=kc(e);return r==Nc||r==jc||r==Uc||r==Fc}var Uo=Hc,qc=je,Mc=qc["__core-js_shared__"],Wc=Mc,mn=Wc,Ja=function(){var e=/[^.]+$/.exec(mn&&mn.keys&&mn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function zc(e){return!!Ja&&Ja in e}var Gc=zc,Kc=Function.prototype,Yc=Kc.toString;function Vc(e){if(e!=null){try{return Yc.call(e)}catch{}try{return e+""}catch{}}return""}var No=Vc,Xc=Uo,Jc=Gc,Zc=kr,Qc=No,eu=/[\\^$.*+?()[\]{}|]/g,ru=/^\[object .+?Constructor\]$/,tu=Function.prototype,nu=Object.prototype,au=tu.toString,iu=nu.hasOwnProperty,ou=RegExp("^"+au.call(iu).replace(eu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function su(e){if(!Zc(e)||Jc(e))return!1;var r=Xc(e)?ou:ru;return r.test(Qc(e))}var cu=su;function uu(e,r){return e==null?void 0:e[r]}var fu=uu,lu=cu,du=fu;function hu(e,r){var t=du(e,r);return lu(t)?t:void 0}var Ye=hu,vu=Ye,xu=je,pu=vu(xu,"DataView"),gu=pu,mu=Ye,yu=je,bu=mu(yu,"Map"),_a=bu,_u=Ye,Eu=je,wu=_u(Eu,"Promise"),$u=wu,Au=Ye,Cu=je,Su=Au(Cu,"Set"),Tu=Su,Ru=Ye,Ou=je,Pu=Ru(Ou,"WeakMap"),Iu=Pu,ea=gu,ra=_a,ta=$u,na=Tu,aa=Iu,jo=Yt,fr=No,Za="[object Map]",Du="[object Object]",Qa="[object Promise]",e0="[object Set]",r0="[object WeakMap]",t0="[object DataView]",Bu=fr(ea),ku=fr(ra),Lu=fr(ta),Uu=fr(na),Nu=fr(aa),ze=jo;(ea&&ze(new ea(new ArrayBuffer(1)))!=t0||ra&&ze(new ra)!=Za||ta&&ze(ta.resolve())!=Qa||na&&ze(new na)!=e0||aa&&ze(new aa)!=r0)&&(ze=function(e){var r=jo(e),t=r==Du?e.constructor:void 0,n=t?fr(t):"";if(n)switch(n){case Bu:return t0;case ku:return Za;case Lu:return Qa;case Uu:return e0;case Nu:return r0}return r});var Lr=ze;function ju(e){return e!=null&&typeof e=="object"}var lr=ju,Fu=Yt,Hu=lr,qu="[object Arguments]";function Mu(e){return Hu(e)&&Fu(e)==qu}var Wu=Mu,n0=Wu,zu=lr,Fo=Object.prototype,Gu=Fo.hasOwnProperty,Ku=Fo.propertyIsEnumerable,Yu=n0(function(){return arguments}())?n0:function(e){return zu(e)&&Gu.call(e,"callee")&&!Ku.call(e,"callee")},Ho=Yu,Vu=Array.isArray,Ur=Vu,Xu=9007199254740991;function Ju(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Xu}var qo=Ju,Zu=Uo,Qu=qo;function ef(e){return e!=null&&Qu(e.length)&&!Zu(e)}var Ea=ef,Ke={},rf={get exports(){return Ke},set exports(e){Ke=e}};function tf(){return!1}var nf=tf;(function(e,r){var t=je,n=nf,a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===a,s=c?t.Buffer:void 0,d=s?s.isBuffer:void 0,o=d||n;e.exports=o})(rf,Ke);var af=Yt,of=qo,sf=lr,cf="[object Arguments]",uf="[object Array]",ff="[object Boolean]",lf="[object Date]",df="[object Error]",hf="[object Function]",vf="[object Map]",xf="[object Number]",pf="[object Object]",gf="[object RegExp]",mf="[object Set]",yf="[object String]",bf="[object WeakMap]",_f="[object ArrayBuffer]",Ef="[object DataView]",wf="[object Float32Array]",$f="[object Float64Array]",Af="[object Int8Array]",Cf="[object Int16Array]",Sf="[object Int32Array]",Tf="[object Uint8Array]",Rf="[object Uint8ClampedArray]",Of="[object Uint16Array]",Pf="[object Uint32Array]",se={};se[wf]=se[$f]=se[Af]=se[Cf]=se[Sf]=se[Tf]=se[Rf]=se[Of]=se[Pf]=!0;se[cf]=se[uf]=se[_f]=se[ff]=se[Ef]=se[lf]=se[df]=se[hf]=se[vf]=se[xf]=se[pf]=se[gf]=se[mf]=se[yf]=se[bf]=!1;function If(e){return sf(e)&&of(e.length)&&!!se[af(e)]}var Df=If;function Bf(e){return function(r){return e(r)}}var wa=Bf,cr={},kf={get exports(){return cr},set exports(e){cr=e}};(function(e,r){var t=ko,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,c=i&&t.process,s=function(){try{var d=a&&a.require&&a.require("util").types;return d||c&&c.binding&&c.binding("util")}catch{}}();e.exports=s})(kf,cr);var Lf=Df,Uf=wa,a0=cr,i0=a0&&a0.isTypedArray,Nf=i0?Uf(i0):Lf,$a=Nf,jf=Bo,Ff=Lr,Hf=Ho,qf=Ur,Mf=Ea,Wf=Ke,zf=Gt,Gf=$a,Kf="[object Map]",Yf="[object Set]",Vf=Object.prototype,Xf=Vf.hasOwnProperty;function Jf(e){if(e==null)return!0;if(Mf(e)&&(qf(e)||typeof e=="string"||typeof e.splice=="function"||Wf(e)||Gf(e)||Hf(e)))return!e.length;var r=Ff(e);if(r==Kf||r==Yf)return!e.size;if(zf(e))return!jf(e).length;for(var t in e)if(Xf.call(e,t))return!1;return!0}var Aa=Jf,ia={},Zf={get exports(){return ia},set exports(e){ia=e}};(function(e,r){(function(t,n){e.exports=n()})(K,function(){var t="minute",n=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(i,c,s){var d=c.prototype;s.utc=function(m){var x={date:m,utc:!0,args:arguments};return new c(x)},d.utc=function(m){var x=s(this.toDate(),{locale:this.$L,utc:!0});return m?x.add(this.utcOffset(),t):x},d.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var o=d.parse;d.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),o.call(this,m)};var l=d.init;d.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else l.call(this)};var g=d.utcOffset;d.utcOffset=function(m,x){var C=this.$utils().u;if(C(m))return this.$u?0:C(this.$offset)?g.call(this):this.$offset;if(typeof m=="string"&&(m=function(b){b===void 0&&(b="");var _=b.match(n);if(!_)return null;var A=(""+_[0]).match(a)||["-",0,0],E=A[0],R=60*+A[1]+ +A[2];return R===0?0:E==="+"?R:-R}(m),m===null))return this;var u=Math.abs(m)<=16?60*m:m,h=this;if(x)return h.$offset=u,h.$u=m===0,h;if(m!==0){var p=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(u+p,t)).$offset=u,h.$x.$localOffset=p}else h=this.utc();return h};var f=d.format;d.format=function(m){var x=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,x)},d.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var v=d.toDate;d.toDate=function(m){return m==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():v.call(this)};var y=d.diff;d.diff=function(m,x,C){if(m&&this.$u===m.$u)return y.call(this,m,x,C);var u=this.local(),h=s(m).local();return y.call(u,h,x,C)}}})})(Zf);const Qf=ia;var oa={},el={get exports(){return oa},set exports(e){oa=e}};(function(e,r){(function(t,n){e.exports=n()})(K,function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(a,i,c){var s,d=function(f,v,y){y===void 0&&(y={});var m=new Date(f),x=function(C,u){u===void 0&&(u={});var h=u.timeZoneName||"short",p=C+"|"+h,b=n[p];return b||(b=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:C,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:h}),n[p]=b),b}(v,y);return x.formatToParts(m)},o=function(f,v){for(var y=d(f,v),m=[],x=0;x<y.length;x+=1){var C=y[x],u=C.type,h=C.value,p=t[u];p>=0&&(m[p]=parseInt(h,10))}var b=m[3],_=b===24?0:b,A=m[0]+"-"+m[1]+"-"+m[2]+" "+_+":"+m[4]+":"+m[5]+":000",E=+f;return(c.utc(A).valueOf()-(E-=E%1e3))/6e4},l=i.prototype;l.tz=function(f,v){f===void 0&&(f=s);var y=this.utcOffset(),m=this.toDate(),x=m.toLocaleString("en-US",{timeZone:f}),C=Math.round((m-new Date(x))/1e3/60),u=c(x).$set("millisecond",this.$ms).utcOffset(15*-Math.round(m.getTimezoneOffset()/15)-C,!0);if(v){var h=u.utcOffset();u=u.add(y-h,"minute")}return u.$x.$timezone=f,u},l.offsetName=function(f){var v=this.$x.$timezone||c.tz.guess(),y=d(this.valueOf(),v,{timeZoneName:f}).find(function(m){return m.type.toLowerCase()==="timezonename"});return y&&y.value};var g=l.startOf;l.startOf=function(f,v){if(!this.$x||!this.$x.$timezone)return g.call(this,f,v);var y=c(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return g.call(y,f,v).tz(this.$x.$timezone,!0)},c.tz=function(f,v,y){var m=y&&v,x=y||v||s,C=o(+c(),x);if(typeof f!="string")return c(f).tz(x);var u=function(_,A,E){var R=_-60*A*1e3,w=o(R,E);if(A===w)return[R,A];var S=o(R-=60*(w-A)*1e3,E);return w===S?[R,w]:[_-60*Math.min(w,S)*1e3,Math.max(w,S)]}(c.utc(f,m).valueOf(),C,x),h=u[0],p=u[1],b=c(h).utcOffset(p);return b.$x.$timezone=x,b},c.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},c.tz.setDefault=function(f){s=f}}})})(el);const rl=oa;var sa={},tl={get exports(){return sa},set exports(e){sa=e}};(function(e,r){(function(t,n){e.exports=n()})(K,function(){var t=1e3,n=6e4,a=36e5,i="millisecond",c="second",s="minute",d="hour",o="day",l="week",g="month",f="quarter",v="year",y="date",m="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h=function(T,P,I){var N=String(T);return!N||N.length>=P?T:""+Array(P+1-N.length).join(I)+T},p={s:h,z:function(T){var P=-T.utcOffset(),I=Math.abs(P),N=Math.floor(I/60),U=I%60;return(P<=0?"+":"-")+h(N,2,"0")+":"+h(U,2,"0")},m:function T(P,I){if(P.date()<I.date())return-T(I,P);var N=12*(I.year()-P.year())+(I.month()-P.month()),U=P.clone().add(N,g),F=I-U<0,q=P.clone().add(N+(F?-1:1),g);return+(-(N+(I-U)/(F?U-q:q-U))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:g,y:v,w:l,d:o,D:y,h:d,m:s,s:c,ms:i,Q:f}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},b="en",_={};_[b]=u;var A=function(T){return T instanceof S},E=function T(P,I,N){var U;if(!P)return b;if(typeof P=="string"){var F=P.toLowerCase();_[F]&&(U=F),I&&(_[F]=I,U=F);var q=P.split("-");if(!U&&q.length>1)return T(q[0])}else{var H=P.name;_[H]=P,U=H}return!N&&U&&(b=U),U||!N&&b},R=function(T,P){if(A(T))return T.clone();var I=typeof P=="object"?P:{};return I.date=T,I.args=arguments,new S(I)},w=p;w.l=E,w.i=A,w.w=function(T,P){return R(T,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var S=function(){function T(I){this.$L=E(I.locale,null,!0),this.parse(I)}var P=T.prototype;return P.parse=function(I){this.$d=function(N){var U=N.date,F=N.utc;if(U===null)return new Date(NaN);if(w.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var q=U.match(x);if(q){var H=q[2]-1||0,O=(q[7]||"0").substring(0,3);return F?new Date(Date.UTC(q[1],H,q[3]||1,q[4]||0,q[5]||0,q[6]||0,O)):new Date(q[1],H,q[3]||1,q[4]||0,q[5]||0,q[6]||0,O)}}return new Date(U)}(I),this.$x=I.x||{},this.init()},P.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},P.$utils=function(){return w},P.isValid=function(){return this.$d.toString()!==m},P.isSame=function(I,N){var U=R(I);return this.startOf(N)<=U&&U<=this.endOf(N)},P.isAfter=function(I,N){return R(I)<this.startOf(N)},P.isBefore=function(I,N){return this.endOf(N)<R(I)},P.$g=function(I,N,U){return w.u(I)?this[N]:this.set(U,I)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(I,N){var U=this,F=!!w.u(N)||N,q=w.p(I),H=function(W,J){var V=w.w(U.$u?Date.UTC(U.$y,J,W):new Date(U.$y,J,W),U);return F?V:V.endOf(o)},O=function(W,J){return w.w(U.toDate()[W].apply(U.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(J)),U)},D=this.$W,k=this.$M,L=this.$D,z="set"+(this.$u?"UTC":"");switch(q){case v:return F?H(1,0):H(31,11);case g:return F?H(1,k):H(0,k+1);case l:var Y=this.$locale().weekStart||0,te=(D<Y?D+7:D)-Y;return H(F?L-te:L+(6-te),k);case o:case y:return O(z+"Hours",0);case d:return O(z+"Minutes",1);case s:return O(z+"Seconds",2);case c:return O(z+"Milliseconds",3);default:return this.clone()}},P.endOf=function(I){return this.startOf(I,!1)},P.$set=function(I,N){var U,F=w.p(I),q="set"+(this.$u?"UTC":""),H=(U={},U[o]=q+"Date",U[y]=q+"Date",U[g]=q+"Month",U[v]=q+"FullYear",U[d]=q+"Hours",U[s]=q+"Minutes",U[c]=q+"Seconds",U[i]=q+"Milliseconds",U)[F],O=F===o?this.$D+(N-this.$W):N;if(F===g||F===v){var D=this.clone().set(y,1);D.$d[H](O),D.init(),this.$d=D.set(y,Math.min(this.$D,D.daysInMonth())).$d}else H&&this.$d[H](O);return this.init(),this},P.set=function(I,N){return this.clone().$set(I,N)},P.get=function(I){return this[w.p(I)]()},P.add=function(I,N){var U,F=this;I=Number(I);var q=w.p(N),H=function(k){var L=R(F);return w.w(L.date(L.date()+Math.round(k*I)),F)};if(q===g)return this.set(g,this.$M+I);if(q===v)return this.set(v,this.$y+I);if(q===o)return H(1);if(q===l)return H(7);var O=(U={},U[s]=n,U[d]=a,U[c]=t,U)[q]||1,D=this.$d.getTime()+I*O;return w.w(D,this)},P.subtract=function(I,N){return this.add(-1*I,N)},P.format=function(I){var N=this,U=this.$locale();if(!this.isValid())return U.invalidDate||m;var F=I||"YYYY-MM-DDTHH:mm:ssZ",q=w.z(this),H=this.$H,O=this.$m,D=this.$M,k=U.weekdays,L=U.months,z=function(J,V,de,ce){return J&&(J[V]||J(N,F))||de[V].slice(0,ce)},Y=function(J){return w.s(H%12||12,J,"0")},te=U.meridiem||function(J,V,de){var ce=J<12?"AM":"PM";return de?ce.toLowerCase():ce},W={YY:String(this.$y).slice(-2),YYYY:this.$y,M:D+1,MM:w.s(D+1,2,"0"),MMM:z(U.monthsShort,D,L,3),MMMM:z(L,D),D:this.$D,DD:w.s(this.$D,2,"0"),d:String(this.$W),dd:z(U.weekdaysMin,this.$W,k,2),ddd:z(U.weekdaysShort,this.$W,k,3),dddd:k[this.$W],H:String(H),HH:w.s(H,2,"0"),h:Y(1),hh:Y(2),a:te(H,O,!0),A:te(H,O,!1),m:String(O),mm:w.s(O,2,"0"),s:String(this.$s),ss:w.s(this.$s,2,"0"),SSS:w.s(this.$ms,3,"0"),Z:q};return F.replace(C,function(J,V){return V||W[J]||q.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(I,N,U){var F,q=w.p(N),H=R(I),O=(H.utcOffset()-this.utcOffset())*n,D=this-H,k=w.m(this,H);return k=(F={},F[v]=k/12,F[g]=k,F[f]=k/3,F[l]=(D-O)/6048e5,F[o]=(D-O)/864e5,F[d]=D/a,F[s]=D/n,F[c]=D/t,F)[q]||D,U?k:w.a(k)},P.daysInMonth=function(){return this.endOf(g).$D},P.$locale=function(){return _[this.$L]},P.locale=function(I,N){if(!I)return this.$L;var U=this.clone(),F=E(I,N,!0);return F&&(U.$L=F),U},P.clone=function(){return w.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},T}(),B=S.prototype;return R.prototype=B,[["$ms",i],["$s",c],["$m",s],["$H",d],["$W",o],["$M",g],["$y",v],["$D",y]].forEach(function(T){B[T[1]]=function(P){return this.$g(P,T[0],T[1])}}),R.extend=function(T,P){return T.$i||(T(P,S,R),T.$i=!0),R},R.locale=E,R.isDayjs=A,R.unix=function(T){return R(1e3*T)},R.en=_[b],R.Ls=_,R.p={},R})})(tl);const Dr=sa;Dr.extend(Qf);Dr.extend(rl);const Mo=["SUN","MON","TUE","WED","THU","FRI","SAT"],rt=e=>{const[r,t]=e.split(":");return{hour:parseInt(r||"0",10),minutes:parseInt(t||"0",10)}};function ca(e,r,t){const{availability:n}=e;if(!n)return!0;if(Aa(n))return!1;const a=t?Dr(t).tz(r):Dr().tz(r),i=a.day(),c=n[Mo[i]];if(!Array.isArray(c)||c.length!==2)return!1;const s=a.hour(),d=a.minute(),o=rt(c[0]),l=rt(c[1]);return s<o.hour||s===o.hour&&d<o.minutes?!1:!(s>l.hour||s===l.hour&&d>l.minutes)}const ua=(e,r=void 0,t=void 0,n=!1)=>n?e.map(i=>{let c;return Array.isArray(i.items)&&(c=ua(i.items,r,t,n)),{...i,items:c,outsideAvailabilitySlot:!ca(i,r,t)||(c==null?void 0:c.every(s=>s.outsideAvailabilitySlot))||!1}}):e.filter(i=>ca(i,r,t)).map(i=>Array.isArray(i.items)?{...i,items:ua(i.items,r,t)}:i),o0=(e,r=void 0,t=void 0,n=!1)=>{let a=[];return e.forEach(i=>{if(!Array.isArray(i.items)){a.push(i);return}const c=ua(i.items,r,t,n);c.length>0&&a.push({...i,items:c})}),n&&(a=a.map(i=>!i.items||!Array.isArray(i.items)?i:{...i,outsideAvailabilitySlot:!ca(i,r,t)||i.items.every(c=>c.outsideAvailabilitySlot)})),a};function Or(e,r){const t=e==null?void 0:e.week;if(!e||!e.active||!t)return!1;const n=Dr().tz(r),a=n.day(),i=t[Mo[a]];return i?i.some(c=>nl(n,c)):!1}function nl(e,r){const t=e.hour(),n=e.minute(),a=rt(r.from),i=rt(r.to);return t<a.hour||t===a.hour&&n<a.minutes?!1:!(t>i.hour||t===i.hour&&n>i.minutes)}function al(){this.__data__=[],this.size=0}var il=al;function ol(e,r){return e===r||e!==e&&r!==r}var Ca=ol,sl=Ca;function cl(e,r){for(var t=e.length;t--;)if(sl(e[t][0],r))return t;return-1}var Vt=cl,ul=Vt,fl=Array.prototype,ll=fl.splice;function dl(e){var r=this.__data__,t=ul(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():ll.call(r,t,1),--this.size,!0}var hl=dl,vl=Vt;function xl(e){var r=this.__data__,t=vl(r,e);return t<0?void 0:r[t][1]}var pl=xl,gl=Vt;function ml(e){return gl(this.__data__,e)>-1}var yl=ml,bl=Vt;function _l(e,r){var t=this.__data__,n=bl(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var El=_l,wl=il,$l=hl,Al=pl,Cl=yl,Sl=El;function dr(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}dr.prototype.clear=wl;dr.prototype.delete=$l;dr.prototype.get=Al;dr.prototype.has=Cl;dr.prototype.set=Sl;var Xt=dr,Tl=Xt;function Rl(){this.__data__=new Tl,this.size=0}var Ol=Rl;function Pl(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var Il=Pl;function Dl(e){return this.__data__.get(e)}var Bl=Dl;function kl(e){return this.__data__.has(e)}var Ll=kl,Ul=Ye,Nl=Ul(Object,"create"),Jt=Nl,s0=Jt;function jl(){this.__data__=s0?s0(null):{},this.size=0}var Fl=jl;function Hl(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var ql=Hl,Ml=Jt,Wl="__lodash_hash_undefined__",zl=Object.prototype,Gl=zl.hasOwnProperty;function Kl(e){var r=this.__data__;if(Ml){var t=r[e];return t===Wl?void 0:t}return Gl.call(r,e)?r[e]:void 0}var Yl=Kl,Vl=Jt,Xl=Object.prototype,Jl=Xl.hasOwnProperty;function Zl(e){var r=this.__data__;return Vl?r[e]!==void 0:Jl.call(r,e)}var Ql=Zl,ed=Jt,rd="__lodash_hash_undefined__";function td(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=ed&&r===void 0?rd:r,this}var nd=td,ad=Fl,id=ql,od=Yl,sd=Ql,cd=nd;function hr(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}hr.prototype.clear=ad;hr.prototype.delete=id;hr.prototype.get=od;hr.prototype.has=sd;hr.prototype.set=cd;var ud=hr,c0=ud,fd=Xt,ld=_a;function dd(){this.size=0,this.__data__={hash:new c0,map:new(ld||fd),string:new c0}}var hd=dd;function vd(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var xd=vd,pd=xd;function gd(e,r){var t=e.__data__;return pd(r)?t[typeof r=="string"?"string":"hash"]:t.map}var Zt=gd,md=Zt;function yd(e){var r=md(this,e).delete(e);return this.size-=r?1:0,r}var bd=yd,_d=Zt;function Ed(e){return _d(this,e).get(e)}var wd=Ed,$d=Zt;function Ad(e){return $d(this,e).has(e)}var Cd=Ad,Sd=Zt;function Td(e,r){var t=Sd(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}var Rd=Td,Od=hd,Pd=bd,Id=wd,Dd=Cd,Bd=Rd;function vr(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}vr.prototype.clear=Od;vr.prototype.delete=Pd;vr.prototype.get=Id;vr.prototype.has=Dd;vr.prototype.set=Bd;var Wo=vr,kd=Xt,Ld=_a,Ud=Wo,Nd=200;function jd(e,r){var t=this.__data__;if(t instanceof kd){var n=t.__data__;if(!Ld||n.length<Nd-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new Ud(n)}return t.set(e,r),this.size=t.size,this}var Fd=jd,Hd=Xt,qd=Ol,Md=Il,Wd=Bl,zd=Ll,Gd=Fd;function xr(e){var r=this.__data__=new Hd(e);this.size=r.size}xr.prototype.clear=qd;xr.prototype.delete=Md;xr.prototype.get=Wd;xr.prototype.has=zd;xr.prototype.set=Gd;var zo=xr,Kd="__lodash_hash_undefined__";function Yd(e){return this.__data__.set(e,Kd),this}var Vd=Yd;function Xd(e){return this.__data__.has(e)}var Jd=Xd,Zd=Wo,Qd=Vd,eh=Jd;function tt(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new Zd;++r<t;)this.add(e[r])}tt.prototype.add=tt.prototype.push=Qd;tt.prototype.has=eh;var rh=tt;function th(e,r){for(var t=-1,n=e==null?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}var nh=th;function ah(e,r){return e.has(r)}var ih=ah,oh=rh,sh=nh,ch=ih,uh=1,fh=2;function lh(e,r,t,n,a,i){var c=t&uh,s=e.length,d=r.length;if(s!=d&&!(c&&d>s))return!1;var o=i.get(e),l=i.get(r);if(o&&l)return o==r&&l==e;var g=-1,f=!0,v=t&fh?new oh:void 0;for(i.set(e,r),i.set(r,e);++g<s;){var y=e[g],m=r[g];if(n)var x=c?n(m,y,g,r,e,i):n(y,m,g,e,r,i);if(x!==void 0){if(x)continue;f=!1;break}if(v){if(!sh(r,function(C,u){if(!ch(v,u)&&(y===C||a(y,C,t,n,i)))return v.push(u)})){f=!1;break}}else if(!(y===m||a(y,m,t,n,i))){f=!1;break}}return i.delete(e),i.delete(r),f}var Go=lh,dh=je,hh=dh.Uint8Array,Ko=hh;function vh(e){var r=-1,t=Array(e.size);return e.forEach(function(n,a){t[++r]=[a,n]}),t}var xh=vh;function ph(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var gh=ph,u0=Kt,f0=Ko,mh=Ca,yh=Go,bh=xh,_h=gh,Eh=1,wh=2,$h="[object Boolean]",Ah="[object Date]",Ch="[object Error]",Sh="[object Map]",Th="[object Number]",Rh="[object RegExp]",Oh="[object Set]",Ph="[object String]",Ih="[object Symbol]",Dh="[object ArrayBuffer]",Bh="[object DataView]",l0=u0?u0.prototype:void 0,yn=l0?l0.valueOf:void 0;function kh(e,r,t,n,a,i,c){switch(t){case Bh:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Dh:return!(e.byteLength!=r.byteLength||!i(new f0(e),new f0(r)));case $h:case Ah:case Th:return mh(+e,+r);case Ch:return e.name==r.name&&e.message==r.message;case Rh:case Ph:return e==r+"";case Sh:var s=bh;case Oh:var d=n&Eh;if(s||(s=_h),e.size!=r.size&&!d)return!1;var o=c.get(e);if(o)return o==r;n|=wh,c.set(e,r);var l=yh(s(e),s(r),n,a,i,c);return c.delete(e),l;case Ih:if(yn)return yn.call(e)==yn.call(r)}return!1}var Lh=kh;function Uh(e,r){for(var t=-1,n=r.length,a=e.length;++t<n;)e[a+t]=r[t];return e}var Yo=Uh,Nh=Yo,jh=Ur;function Fh(e,r,t){var n=r(e);return jh(e)?n:Nh(n,t(e))}var Vo=Fh;function Hh(e,r){for(var t=-1,n=e==null?0:e.length,a=0,i=[];++t<n;){var c=e[t];r(c,t,e)&&(i[a++]=c)}return i}var qh=Hh;function Mh(){return[]}var Xo=Mh,Wh=qh,zh=Xo,Gh=Object.prototype,Kh=Gh.propertyIsEnumerable,d0=Object.getOwnPropertySymbols,Yh=d0?function(e){return e==null?[]:(e=Object(e),Wh(d0(e),function(r){return Kh.call(e,r)}))}:zh,Sa=Yh;function Vh(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var Xh=Vh,Jh=9007199254740991,Zh=/^(?:0|[1-9]\d*)$/;function Qh(e,r){var t=typeof e;return r=r??Jh,!!r&&(t=="number"||t!="symbol"&&Zh.test(e))&&e>-1&&e%1==0&&e<r}var ev=Qh,rv=Xh,tv=Ho,nv=Ur,av=Ke,iv=ev,ov=$a,sv=Object.prototype,cv=sv.hasOwnProperty;function uv(e,r){var t=nv(e),n=!t&&tv(e),a=!t&&!n&&av(e),i=!t&&!n&&!a&&ov(e),c=t||n||a||i,s=c?rv(e.length,String):[],d=s.length;for(var o in e)(r||cv.call(e,o))&&!(c&&(o=="length"||a&&(o=="offset"||o=="parent")||i&&(o=="buffer"||o=="byteLength"||o=="byteOffset")||iv(o,d)))&&s.push(o);return s}var Jo=uv,fv=Jo,lv=Bo,dv=Ea;function hv(e){return dv(e)?fv(e):lv(e)}var Ta=hv,vv=Vo,xv=Sa,pv=Ta;function gv(e){return vv(e,pv,xv)}var Zo=gv,h0=Zo,mv=1,yv=Object.prototype,bv=yv.hasOwnProperty;function _v(e,r,t,n,a,i){var c=t&mv,s=h0(e),d=s.length,o=h0(r),l=o.length;if(d!=l&&!c)return!1;for(var g=d;g--;){var f=s[g];if(!(c?f in r:bv.call(r,f)))return!1}var v=i.get(e),y=i.get(r);if(v&&y)return v==r&&y==e;var m=!0;i.set(e,r),i.set(r,e);for(var x=c;++g<d;){f=s[g];var C=e[f],u=r[f];if(n)var h=c?n(u,C,f,r,e,i):n(C,u,f,e,r,i);if(!(h===void 0?C===u||a(C,u,t,n,i):h)){m=!1;break}x||(x=f=="constructor")}if(m&&!x){var p=e.constructor,b=r.constructor;p!=b&&"constructor"in e&&"constructor"in r&&!(typeof p=="function"&&p instanceof p&&typeof b=="function"&&b instanceof b)&&(m=!1)}return i.delete(e),i.delete(r),m}var Ev=_v,bn=zo,wv=Go,$v=Lh,Av=Ev,v0=Lr,x0=Ur,p0=Ke,Cv=$a,Sv=1,g0="[object Arguments]",m0="[object Array]",Yr="[object Object]",Tv=Object.prototype,y0=Tv.hasOwnProperty;function Rv(e,r,t,n,a,i){var c=x0(e),s=x0(r),d=c?m0:v0(e),o=s?m0:v0(r);d=d==g0?Yr:d,o=o==g0?Yr:o;var l=d==Yr,g=o==Yr,f=d==o;if(f&&p0(e)){if(!p0(r))return!1;c=!0,l=!1}if(f&&!l)return i||(i=new bn),c||Cv(e)?wv(e,r,t,n,a,i):$v(e,r,d,t,n,a,i);if(!(t&Sv)){var v=l&&y0.call(e,"__wrapped__"),y=g&&y0.call(r,"__wrapped__");if(v||y){var m=v?e.value():e,x=y?r.value():r;return i||(i=new bn),a(m,x,t,n,i)}}return f?(i||(i=new bn),Av(e,r,t,n,a,i)):!1}var Ov=Rv,Pv=Ov,b0=lr;function Qo(e,r,t,n,a){return e===r?!0:e==null||r==null||!b0(e)&&!b0(r)?e!==e&&r!==r:Pv(e,r,t,n,Qo,a)}var Iv=Qo,Dv=Iv;function Bv(e,r){return Dv(e,r)}var es=Bv;function rs(e){let r=0;return e==null||e.forEach(t=>r+=Number(t.discountPrice)),r}function kv(e){return rs(e.discounts)}function Lv(e,r,t=",",n=2){return`${Number(e).toFixed(n).replace(".",t)}${r?" "+r:""}`}function ts(e,r){var a;const t=(a=e._)==null?void 0:a.enableKey;return t?!r||!Array.isArray(r)||r.length===0?!1:t.replace(/\s/g,"").split(",").some(i=>r.includes(i)):!0}function Uv(e){var t,n,a,i,c,s;const r=(n=(t=e.details)==null?void 0:t.literals)==null?void 0:n.name.split(" ").filter(d=>d!=="");return r?r.length===1?((s=(c=(i=(a=e.details)==null?void 0:a.literals)==null?void 0:i.name)==null?void 0:c.slice)==null?void 0:s.call(c,0,2))||"":r.length>1?`${r[0][0]}${r[1][0]}`:"":""}function ns(e,r=!1,t=void 0,n=60){const[a,i]=re.useState(e&&o0(e,t,void 0,r));zt(c,n*1e3);function c(){const s=e&&o0(e,t,void 0,r);es(s,a)||(console.log("menu has changed",s),i(s))}return re.useEffect(c,[a,e]),a}function as(e,r){return e.__||(e.__={}),e.__.isHiddenByEnableKey=!ts(e,r),e.items&&e.items.length>0&&(e.items=e.items.map(t=>as(t,r))),e}function Nv(e,r){if(e)return e.map(t=>as(t,r))}function jv({originalMenu:e,markOnly:r=!1,timeZone:t,interval:n=60,enableKeys:a=[]}){const i=ns(e,r,t,n);return Nv(i,a)}var _0;(function(e){e.UNINITIALIZED="UNINITIALIZED",e.PROCESSING="PROCESSING",e.PAID="PAID",e.FAILED="FAILED",e.PRINTING_RECEIPT="PRINTING_RECEIPT",e.PRINTING_RECEIPT_SUCCESS="PRINTING_RECEIPT_SUCCESS",e.SENDING_RECEIPT="SENDING_RECEIPT",e.SENDING_RECEIPT_SUCCESS="SENDING_RECEIPT_SUCCESS",e.ERROR="ERROR"})(_0||(_0={}));var E0;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(E0||(E0={}));var fa;(function(e){e.GROUP="3e/group",e.PRODUCT="3e/product",e.CATEGORY="3e/group/category",e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.STATIC="3e/static",e.REF="3e/ref",e.QUERY="3e/query"})(fa||(fa={}));var w0;(function(e){e.GROUP="group",e.PRODUCT="product"})(w0||(w0={}));var $0;(function(e){e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.DINE_IN="DINE_IN",e.DINE_IN_OPEN="DINE_IN_OPEN",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.GLOVO_TAKE_AWAY="GLOVO_TAKE_AWAY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.JUSTEAT_TAKE_AWAY="JUSTEAT_TAKE_AWAY",e.UBER_DELIVERY="UBER_DELIVERY",e.UBER_TAKE_AWAY="UBER_TAKE_AWAY",e.UBER_DINE_IN="UBER_DINE_IN",e.BOLT_DELIVERY="BOLT_DELIVERY",e.BOLT_TAKE_AWAY="BOLT_TAKE_AWAY",e.WOLT_DELIVERY="WOLT_DELIVERY",e.WOLT_TAKE_AWAY="WOLT_TAKE_AWAY",e.WOLT_DINE_IN="WOLT_DINE_IN"})($0||($0={}));var A0;(function(e){e.NEW="NEW",e.COMPLETED="COMPLETED",e.VERIFIED="VERIFIED",e.DELIVER="DELIVER",e.DELIVERED="DELIVERED",e.CLOSED="CLOSED",e.ABANDONED="ABANDONED",e.CANCELLED="CANCELLED",e.PICKED="PICKED"})(A0||(A0={}));var C0;(function(e){e.CASH="CASH",e.CARD="CARD",e.COD="COD",e.TERMINAL="TERMINAL",e.EPAYMENT="EPAYMENT",e.COUPON="COUPON",e.WALLET="WALLET",e.PREAUTHORIZED="PREAUTHORIZED",e.RETURN="RETURN",e.EXTERNAL="EXTERNAL"})(C0||(C0={}));var S0;(function(e){e.KIOSK="KIOSK",e.WEB="WEB",e.JUST_EAT_TAKE_AWAY="JUSTEATTAKEAWAY",e.GLOVO="GLOVO",e.PYSZNE="PYSZNE",e.WOLT="WOLT",e.UBER="UBER",e.BOLT="BOLT"})(S0||(S0={}));var T0;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(T0||(T0={}));var R0;(function(e){e.GROUP="group",e.PRODUCT="product"})(R0||(R0={}));var O0;(function(e){e.DINE_IN="DINE_IN",e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.GLOVO="GLOVO",e.JUSTEAT="JUSTEAT",e.UBER="UBER",e.BOLT="BOLT",e.WOLT="WOLT"})(O0||(O0={}));var P0;(function(e){e.ORDER_EVENT_ERROR="OrderEventError",e.ORDER_APPLIED_EVENTS="OrderAppliedEvents",e.ORDER_EVENT_FISCAL="OrderEventFiscal",e.ORDER_UPSELL="OrderUpsell"})(P0||(P0={}));function Fv(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var Hv=Fv,qv=Ye,Mv=function(){try{var e=qv(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Wv=Mv,I0=Wv;function zv(e,r,t){r=="__proto__"&&I0?I0(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}var is=zv,Gv=is,Kv=Ca,Yv=Object.prototype,Vv=Yv.hasOwnProperty;function Xv(e,r,t){var n=e[r];(!(Vv.call(e,r)&&Kv(n,t))||t===void 0&&!(r in e))&&Gv(e,r,t)}var os=Xv,Jv=os,Zv=is;function Qv(e,r,t,n){var a=!t;t||(t={});for(var i=-1,c=r.length;++i<c;){var s=r[i],d=n?n(t[s],e[s],s,t,e):void 0;d===void 0&&(d=e[s]),a?Zv(t,s,d):Jv(t,s,d)}return t}var Qt=Qv,ex=Qt,rx=Ta;function tx(e,r){return e&&ex(r,rx(r),e)}var nx=tx;function ax(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var ix=ax,ox=kr,sx=Gt,cx=ix,ux=Object.prototype,fx=ux.hasOwnProperty;function lx(e){if(!ox(e))return cx(e);var r=sx(e),t=[];for(var n in e)n=="constructor"&&(r||!fx.call(e,n))||t.push(n);return t}var dx=lx,hx=Jo,vx=dx,xx=Ea;function px(e){return xx(e)?hx(e,!0):vx(e)}var Ra=px,gx=Qt,mx=Ra;function yx(e,r){return e&&gx(r,mx(r),e)}var bx=yx,nt={},_x={get exports(){return nt},set exports(e){nt=e}};(function(e,r){var t=je,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,c=i?t.Buffer:void 0,s=c?c.allocUnsafe:void 0;function d(o,l){if(l)return o.slice();var g=o.length,f=s?s(g):new o.constructor(g);return o.copy(f),f}e.exports=d})(_x,nt);function Ex(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var wx=Ex,$x=Qt,Ax=Sa;function Cx(e,r){return $x(e,Ax(e),r)}var Sx=Cx,Tx=Do,Rx=Tx(Object.getPrototypeOf,Object),ss=Rx,Ox=Yo,Px=ss,Ix=Sa,Dx=Xo,Bx=Object.getOwnPropertySymbols,kx=Bx?function(e){for(var r=[];e;)Ox(r,Ix(e)),e=Px(e);return r}:Dx,cs=kx,Lx=Qt,Ux=cs;function Nx(e,r){return Lx(e,Ux(e),r)}var jx=Nx,Fx=Vo,Hx=cs,qx=Ra;function Mx(e){return Fx(e,qx,Hx)}var Wx=Mx,zx=Object.prototype,Gx=zx.hasOwnProperty;function Kx(e){var r=e.length,t=new e.constructor(r);return r&&typeof e[0]=="string"&&Gx.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var Yx=Kx,D0=Ko;function Vx(e){var r=new e.constructor(e.byteLength);return new D0(r).set(new D0(e)),r}var Oa=Vx,Xx=Oa;function Jx(e,r){var t=r?Xx(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var Zx=Jx,Qx=/\w*$/;function e1(e){var r=new e.constructor(e.source,Qx.exec(e));return r.lastIndex=e.lastIndex,r}var r1=e1,B0=Kt,k0=B0?B0.prototype:void 0,L0=k0?k0.valueOf:void 0;function t1(e){return L0?Object(L0.call(e)):{}}var n1=t1,a1=Oa;function i1(e,r){var t=r?a1(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var o1=i1,s1=Oa,c1=Zx,u1=r1,f1=n1,l1=o1,d1="[object Boolean]",h1="[object Date]",v1="[object Map]",x1="[object Number]",p1="[object RegExp]",g1="[object Set]",m1="[object String]",y1="[object Symbol]",b1="[object ArrayBuffer]",_1="[object DataView]",E1="[object Float32Array]",w1="[object Float64Array]",$1="[object Int8Array]",A1="[object Int16Array]",C1="[object Int32Array]",S1="[object Uint8Array]",T1="[object Uint8ClampedArray]",R1="[object Uint16Array]",O1="[object Uint32Array]";function P1(e,r,t){var n=e.constructor;switch(r){case b1:return s1(e);case d1:case h1:return new n(+e);case _1:return c1(e,t);case E1:case w1:case $1:case A1:case C1:case S1:case T1:case R1:case O1:return l1(e,t);case v1:return new n;case x1:case m1:return new n(e);case p1:return u1(e);case g1:return new n;case y1:return f1(e)}}var I1=P1,D1=kr,U0=Object.create,B1=function(){function e(){}return function(r){if(!D1(r))return{};if(U0)return U0(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}(),k1=B1,L1=k1,U1=ss,N1=Gt;function j1(e){return typeof e.constructor=="function"&&!N1(e)?L1(U1(e)):{}}var F1=j1,H1=Lr,q1=lr,M1="[object Map]";function W1(e){return q1(e)&&H1(e)==M1}var z1=W1,G1=z1,K1=wa,N0=cr,j0=N0&&N0.isMap,Y1=j0?K1(j0):G1,V1=Y1,X1=Lr,J1=lr,Z1="[object Set]";function Q1(e){return J1(e)&&X1(e)==Z1}var ep=Q1,rp=ep,tp=wa,F0=cr,H0=F0&&F0.isSet,np=H0?tp(H0):rp,ap=np,ip=zo,op=Hv,sp=os,cp=nx,up=bx,fp=nt,lp=wx,dp=Sx,hp=jx,vp=Zo,xp=Wx,pp=Lr,gp=Yx,mp=I1,yp=F1,bp=Ur,_p=Ke,Ep=V1,wp=kr,$p=ap,Ap=Ta,Cp=Ra,Sp=1,Tp=2,Rp=4,us="[object Arguments]",Op="[object Array]",Pp="[object Boolean]",Ip="[object Date]",Dp="[object Error]",fs="[object Function]",Bp="[object GeneratorFunction]",kp="[object Map]",Lp="[object Number]",ls="[object Object]",Up="[object RegExp]",Np="[object Set]",jp="[object String]",Fp="[object Symbol]",Hp="[object WeakMap]",qp="[object ArrayBuffer]",Mp="[object DataView]",Wp="[object Float32Array]",zp="[object Float64Array]",Gp="[object Int8Array]",Kp="[object Int16Array]",Yp="[object Int32Array]",Vp="[object Uint8Array]",Xp="[object Uint8ClampedArray]",Jp="[object Uint16Array]",Zp="[object Uint32Array]",oe={};oe[us]=oe[Op]=oe[qp]=oe[Mp]=oe[Pp]=oe[Ip]=oe[Wp]=oe[zp]=oe[Gp]=oe[Kp]=oe[Yp]=oe[kp]=oe[Lp]=oe[ls]=oe[Up]=oe[Np]=oe[jp]=oe[Fp]=oe[Vp]=oe[Xp]=oe[Jp]=oe[Zp]=!0;oe[Dp]=oe[fs]=oe[Hp]=!1;function Xr(e,r,t,n,a,i){var c,s=r&Sp,d=r&Tp,o=r&Rp;if(t&&(c=a?t(e,n,a,i):t(e)),c!==void 0)return c;if(!wp(e))return e;var l=bp(e);if(l){if(c=gp(e),!s)return lp(e,c)}else{var g=pp(e),f=g==fs||g==Bp;if(_p(e))return fp(e,s);if(g==ls||g==us||f&&!a){if(c=d||f?{}:yp(e),!s)return d?hp(e,up(c,e)):dp(e,cp(c,e))}else{if(!oe[g])return a?e:{};c=mp(e,g,s)}}i||(i=new ip);var v=i.get(e);if(v)return v;i.set(e,c),$p(e)?e.forEach(function(x){c.add(Xr(x,r,t,x,e,i))}):Ep(e)&&e.forEach(function(x,C){c.set(C,Xr(x,r,t,C,e,i))});var y=o?d?xp:vp:d?Cp:Ap,m=l?void 0:y(e);return op(m||e,function(x,C){m&&(C=x,x=e[C]),sp(c,C,Xr(x,r,t,C,e,i))}),c}var Qp=Xr,eg=Qp,rg=1,tg=4;function ng(e){return eg(e,rg|tg)}var ag=ng;function ig(e,r){if(!r||!r.filter||!e||!e.filter||e.kind!==fa.CONFIG)return!0;if(e.filter&&e.items){const t=Object.values(e.filter).flat().filter(n=>{var a,i,c,s;return r.filter[(i=(a=e.items)==null?void 0:a[0])==null?void 0:i.fltCtx]&&Object.values(r.filter[(s=(c=e.items)==null?void 0:c[0])==null?void 0:s.fltCtx]).includes(n)});if(Array.isArray(t)&&t.length===0)return!1}return!0}const at=(e,r,t=0)=>{if(!e)return 0;let n=e.price?parseFloat(e.price):0;if(!(r!=null&&r.selected)||Aa(r.selected))return n;const{items:a}=e,i=ag(r);return ig(e,i)&&Array.isArray(a)&&a.forEach(c=>{let s=0;if(c.kind!=="3e/product")s=at(c,i,t+1);else{const{selected:d={}}=i,{selCtx:o,id:l}=c;o in d&&l in d[o]&&(s=at(c,i,t+1)*d[o][l],delete i.selected[o][l])}n+=s}),Math.round(100*n)/100},ds=({product:e,state:r,selected:t,cheapestGroupOptionsProduct:n})=>{const a=at(e,r),i=at(e,e.state),c=e.minPrice&&parseFloat(e.price)===a;let s=t||n||parseFloat(e.price)===0?a||i:parseFloat(e.price);return n!==void 0&&(s-=n),c&&e.minPrice&&(s=parseFloat(e.minPrice)),{displayPrice:s,showAsMinPrice:c,calculatedPriceDefaultProductState:i}},og=ds;function Pa(e){const r=[];return e.reduce((t,n)=>{if(t[n.hash]||(t[n.hash]={...n,quantity:0,discounted:0,discounts:[],firstProductQuantity:n.quantity,itemsToRemove:[]},r.push(t[n.hash])),t[n.hash].quantity+=n.quantity,t[n.hash].itemsToRemove.push(n.id),n.discounts){t[n.hash].discounts||(t[n.hash].discounts=[]),t[n.hash].discounts=t[n.hash].discounts.concat(n.discounts),t[n.hash].discounted=0;for(let a=0;a<t[n.hash].discounts.length;a+=1)t[n.hash].discounts[a]&&(t[n.hash].discounted+=parseFloat(t[n.hash].discounts[a].discountPrice))}return t},{}),r}function sg(e){return Pa(e)}function cg(e){return!e||e.length===0?null:Pa(e.flatMap(r=>r.lines))}var la={},ug={get exports(){return la},set exports(e){la=e}},it={},fg={get exports(){return it},set exports(e){it=e}},hs=function(r,t){return function(){for(var a=new Array(arguments.length),i=0;i<a.length;i++)a[i]=arguments[i];return r.apply(t,a)}},lg=hs,Ve=Object.prototype.toString;function Ia(e){return Ve.call(e)==="[object Array]"}function da(e){return typeof e>"u"}function dg(e){return e!==null&&!da(e)&&e.constructor!==null&&!da(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function hg(e){return Ve.call(e)==="[object ArrayBuffer]"}function vg(e){return typeof FormData<"u"&&e instanceof FormData}function xg(e){var r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&e.buffer instanceof ArrayBuffer,r}function pg(e){return typeof e=="string"}function gg(e){return typeof e=="number"}function vs(e){return e!==null&&typeof e=="object"}function Jr(e){if(Ve.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}function mg(e){return Ve.call(e)==="[object Date]"}function yg(e){return Ve.call(e)==="[object File]"}function bg(e){return Ve.call(e)==="[object Blob]"}function xs(e){return Ve.call(e)==="[object Function]"}function _g(e){return vs(e)&&xs(e.pipe)}function Eg(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}function wg(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function $g(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Da(e,r){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),Ia(e))for(var t=0,n=e.length;t<n;t++)r.call(null,e[t],t,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.call(null,e[a],a,e)}function ha(){var e={};function r(a,i){Jr(e[i])&&Jr(a)?e[i]=ha(e[i],a):Jr(a)?e[i]=ha({},a):Ia(a)?e[i]=a.slice():e[i]=a}for(var t=0,n=arguments.length;t<n;t++)Da(arguments[t],r);return e}function Ag(e,r,t){return Da(r,function(a,i){t&&typeof a=="function"?e[i]=lg(a,t):e[i]=a}),e}function Cg(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var $e={isArray:Ia,isArrayBuffer:hg,isBuffer:dg,isFormData:vg,isArrayBufferView:xg,isString:pg,isNumber:gg,isObject:vs,isPlainObject:Jr,isUndefined:da,isDate:mg,isFile:yg,isBlob:bg,isFunction:xs,isStream:_g,isURLSearchParams:Eg,isStandardBrowserEnv:$g,forEach:Da,merge:ha,extend:Ag,trim:wg,stripBOM:Cg},tr=$e;function q0(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var ps=function(r,t,n){if(!t)return r;var a;if(n)a=n(t);else if(tr.isURLSearchParams(t))a=t.toString();else{var i=[];tr.forEach(t,function(d,o){d===null||typeof d>"u"||(tr.isArray(d)?o=o+"[]":d=[d],tr.forEach(d,function(g){tr.isDate(g)?g=g.toISOString():tr.isObject(g)&&(g=JSON.stringify(g)),i.push(q0(o)+"="+q0(g))}))}),a=i.join("&")}if(a){var c=r.indexOf("#");c!==-1&&(r=r.slice(0,c)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r},Sg=$e;function en(){this.handlers=[]}en.prototype.use=function(r,t,n){return this.handlers.push({fulfilled:r,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};en.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)};en.prototype.forEach=function(r){Sg.forEach(this.handlers,function(n){n!==null&&r(n)})};var Tg=en,Rg=$e,Og=function(r,t){Rg.forEach(r,function(a,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(r[t]=a,delete r[i])})},gs=function(r,t,n,a,i){return r.config=t,n&&(r.code=n),r.request=a,r.response=i,r.isAxiosError=!0,r.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},r},_n,M0;function ms(){if(M0)return _n;M0=1;var e=gs;return _n=function(t,n,a,i,c){var s=new Error(t);return e(s,n,a,i,c)},_n}var En,W0;function Pg(){if(W0)return En;W0=1;var e=ms();return En=function(t,n,a){var i=a.config.validateStatus;!a.status||!i||i(a.status)?t(a):n(e("Request failed with status code "+a.status,a.config,null,a.request,a))},En}var wn,z0;function Ig(){if(z0)return wn;z0=1;var e=$e;return wn=e.isStandardBrowserEnv()?function(){return{write:function(n,a,i,c,s,d){var o=[];o.push(n+"="+encodeURIComponent(a)),e.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),e.isString(c)&&o.push("path="+c),e.isString(s)&&o.push("domain="+s),d===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(n){var a=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),wn}var $n,G0;function Dg(){return G0||(G0=1,$n=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)}),$n}var An,K0;function Bg(){return K0||(K0=1,An=function(r,t){return t?r.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):r}),An}var Cn,Y0;function kg(){if(Y0)return Cn;Y0=1;var e=Dg(),r=Bg();return Cn=function(n,a){return n&&!e(a)?r(n,a):a},Cn}var Sn,V0;function Lg(){if(V0)return Sn;V0=1;var e=$e,r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Sn=function(n){var a={},i,c,s;return n&&e.forEach(n.split(`
1
+ "use strict";const re=require("react"),Br=require("@orderingstack/ordering-core-react"),tc=require("react-i18next"),Po=require("react-router-dom");function zt(e,r){const t=re.useRef(),[n,a]=re.useState(null);return re.useEffect(()=>{t.current=e},[e]),re.useEffect(()=>{function i(){var c;(c=t.current)==null||c.call(t)}if(r!==null){const c=setInterval(i,r);return a(c),()=>{a(null),clearInterval(c)}}},[r]),()=>{n&&clearInterval(n)}}var K=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nc(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){if(this instanceof n){var a=[null];a.push.apply(a,arguments);var i=Function.bind.apply(r,a);return new i}return r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),t}var ac=Object.prototype;function ic(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||ac;return e===t}var Gt=ic;function oc(e,r){return function(t){return e(r(t))}}var Do=oc,sc=Do,cc=sc(Object.keys,Object),uc=cc,fc=Gt,lc=uc,dc=Object.prototype,hc=dc.hasOwnProperty;function vc(e){if(!fc(e))return lc(e);var r=[];for(var t in Object(e))hc.call(e,t)&&t!="constructor"&&r.push(t);return r}var Bo=vc,xc=typeof K=="object"&&K&&K.Object===Object&&K,ko=xc,pc=ko,gc=typeof self=="object"&&self&&self.Object===Object&&self,mc=pc||gc||Function("return this")(),je=mc,yc=je,bc=yc.Symbol,Kt=bc,Ya=Kt,Lo=Object.prototype,_c=Lo.hasOwnProperty,Ec=Lo.toString,Sr=Ya?Ya.toStringTag:void 0;function wc(e){var r=_c.call(e,Sr),t=e[Sr];try{e[Sr]=void 0;var n=!0}catch{}var a=Ec.call(e);return n&&(r?e[Sr]=t:delete e[Sr]),a}var $c=wc,Ac=Object.prototype,Cc=Ac.toString;function Sc(e){return Cc.call(e)}var Tc=Sc,Va=Kt,Rc=$c,Oc=Tc,Pc="[object Null]",Ic="[object Undefined]",Xa=Va?Va.toStringTag:void 0;function Dc(e){return e==null?e===void 0?Ic:Pc:Xa&&Xa in Object(e)?Rc(e):Oc(e)}var Yt=Dc;function Bc(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var kr=Bc,kc=Yt,Lc=kr,Uc="[object AsyncFunction]",Nc="[object Function]",jc="[object GeneratorFunction]",Fc="[object Proxy]";function Hc(e){if(!Lc(e))return!1;var r=kc(e);return r==Nc||r==jc||r==Uc||r==Fc}var Uo=Hc,qc=je,Mc=qc["__core-js_shared__"],Wc=Mc,mn=Wc,Ja=function(){var e=/[^.]+$/.exec(mn&&mn.keys&&mn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function zc(e){return!!Ja&&Ja in e}var Gc=zc,Kc=Function.prototype,Yc=Kc.toString;function Vc(e){if(e!=null){try{return Yc.call(e)}catch{}try{return e+""}catch{}}return""}var No=Vc,Xc=Uo,Jc=Gc,Zc=kr,Qc=No,eu=/[\\^$.*+?()[\]{}|]/g,ru=/^\[object .+?Constructor\]$/,tu=Function.prototype,nu=Object.prototype,au=tu.toString,iu=nu.hasOwnProperty,ou=RegExp("^"+au.call(iu).replace(eu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function su(e){if(!Zc(e)||Jc(e))return!1;var r=Xc(e)?ou:ru;return r.test(Qc(e))}var cu=su;function uu(e,r){return e==null?void 0:e[r]}var fu=uu,lu=cu,du=fu;function hu(e,r){var t=du(e,r);return lu(t)?t:void 0}var Ye=hu,vu=Ye,xu=je,pu=vu(xu,"DataView"),gu=pu,mu=Ye,yu=je,bu=mu(yu,"Map"),_a=bu,_u=Ye,Eu=je,wu=_u(Eu,"Promise"),$u=wu,Au=Ye,Cu=je,Su=Au(Cu,"Set"),Tu=Su,Ru=Ye,Ou=je,Pu=Ru(Ou,"WeakMap"),Iu=Pu,ea=gu,ra=_a,ta=$u,na=Tu,aa=Iu,jo=Yt,fr=No,Za="[object Map]",Du="[object Object]",Qa="[object Promise]",e0="[object Set]",r0="[object WeakMap]",t0="[object DataView]",Bu=fr(ea),ku=fr(ra),Lu=fr(ta),Uu=fr(na),Nu=fr(aa),ze=jo;(ea&&ze(new ea(new ArrayBuffer(1)))!=t0||ra&&ze(new ra)!=Za||ta&&ze(ta.resolve())!=Qa||na&&ze(new na)!=e0||aa&&ze(new aa)!=r0)&&(ze=function(e){var r=jo(e),t=r==Du?e.constructor:void 0,n=t?fr(t):"";if(n)switch(n){case Bu:return t0;case ku:return Za;case Lu:return Qa;case Uu:return e0;case Nu:return r0}return r});var Lr=ze;function ju(e){return e!=null&&typeof e=="object"}var lr=ju,Fu=Yt,Hu=lr,qu="[object Arguments]";function Mu(e){return Hu(e)&&Fu(e)==qu}var Wu=Mu,n0=Wu,zu=lr,Fo=Object.prototype,Gu=Fo.hasOwnProperty,Ku=Fo.propertyIsEnumerable,Yu=n0(function(){return arguments}())?n0:function(e){return zu(e)&&Gu.call(e,"callee")&&!Ku.call(e,"callee")},Ho=Yu,Vu=Array.isArray,Ur=Vu,Xu=9007199254740991;function Ju(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Xu}var qo=Ju,Zu=Uo,Qu=qo;function ef(e){return e!=null&&Qu(e.length)&&!Zu(e)}var Ea=ef,Ke={},rf={get exports(){return Ke},set exports(e){Ke=e}};function tf(){return!1}var nf=tf;(function(e,r){var t=je,n=nf,a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===a,s=c?t.Buffer:void 0,d=s?s.isBuffer:void 0,o=d||n;e.exports=o})(rf,Ke);var af=Yt,of=qo,sf=lr,cf="[object Arguments]",uf="[object Array]",ff="[object Boolean]",lf="[object Date]",df="[object Error]",hf="[object Function]",vf="[object Map]",xf="[object Number]",pf="[object Object]",gf="[object RegExp]",mf="[object Set]",yf="[object String]",bf="[object WeakMap]",_f="[object ArrayBuffer]",Ef="[object DataView]",wf="[object Float32Array]",$f="[object Float64Array]",Af="[object Int8Array]",Cf="[object Int16Array]",Sf="[object Int32Array]",Tf="[object Uint8Array]",Rf="[object Uint8ClampedArray]",Of="[object Uint16Array]",Pf="[object Uint32Array]",se={};se[wf]=se[$f]=se[Af]=se[Cf]=se[Sf]=se[Tf]=se[Rf]=se[Of]=se[Pf]=!0;se[cf]=se[uf]=se[_f]=se[ff]=se[Ef]=se[lf]=se[df]=se[hf]=se[vf]=se[xf]=se[pf]=se[gf]=se[mf]=se[yf]=se[bf]=!1;function If(e){return sf(e)&&of(e.length)&&!!se[af(e)]}var Df=If;function Bf(e){return function(r){return e(r)}}var wa=Bf,cr={},kf={get exports(){return cr},set exports(e){cr=e}};(function(e,r){var t=ko,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,c=i&&t.process,s=function(){try{var d=a&&a.require&&a.require("util").types;return d||c&&c.binding&&c.binding("util")}catch{}}();e.exports=s})(kf,cr);var Lf=Df,Uf=wa,a0=cr,i0=a0&&a0.isTypedArray,Nf=i0?Uf(i0):Lf,$a=Nf,jf=Bo,Ff=Lr,Hf=Ho,qf=Ur,Mf=Ea,Wf=Ke,zf=Gt,Gf=$a,Kf="[object Map]",Yf="[object Set]",Vf=Object.prototype,Xf=Vf.hasOwnProperty;function Jf(e){if(e==null)return!0;if(Mf(e)&&(qf(e)||typeof e=="string"||typeof e.splice=="function"||Wf(e)||Gf(e)||Hf(e)))return!e.length;var r=Ff(e);if(r==Kf||r==Yf)return!e.size;if(zf(e))return!jf(e).length;for(var t in e)if(Xf.call(e,t))return!1;return!0}var Aa=Jf,ia={},Zf={get exports(){return ia},set exports(e){ia=e}};(function(e,r){(function(t,n){e.exports=n()})(K,function(){var t="minute",n=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(i,c,s){var d=c.prototype;s.utc=function(m){var x={date:m,utc:!0,args:arguments};return new c(x)},d.utc=function(m){var x=s(this.toDate(),{locale:this.$L,utc:!0});return m?x.add(this.utcOffset(),t):x},d.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var o=d.parse;d.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),o.call(this,m)};var l=d.init;d.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else l.call(this)};var g=d.utcOffset;d.utcOffset=function(m,x){var C=this.$utils().u;if(C(m))return this.$u?0:C(this.$offset)?g.call(this):this.$offset;if(typeof m=="string"&&(m=function(b){b===void 0&&(b="");var _=b.match(n);if(!_)return null;var A=(""+_[0]).match(a)||["-",0,0],E=A[0],R=60*+A[1]+ +A[2];return R===0?0:E==="+"?R:-R}(m),m===null))return this;var u=Math.abs(m)<=16?60*m:m,h=this;if(x)return h.$offset=u,h.$u=m===0,h;if(m!==0){var p=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(u+p,t)).$offset=u,h.$x.$localOffset=p}else h=this.utc();return h};var f=d.format;d.format=function(m){var x=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,x)},d.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var v=d.toDate;d.toDate=function(m){return m==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():v.call(this)};var y=d.diff;d.diff=function(m,x,C){if(m&&this.$u===m.$u)return y.call(this,m,x,C);var u=this.local(),h=s(m).local();return y.call(u,h,x,C)}}})})(Zf);const Qf=ia;var oa={},el={get exports(){return oa},set exports(e){oa=e}};(function(e,r){(function(t,n){e.exports=n()})(K,function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(a,i,c){var s,d=function(f,v,y){y===void 0&&(y={});var m=new Date(f),x=function(C,u){u===void 0&&(u={});var h=u.timeZoneName||"short",p=C+"|"+h,b=n[p];return b||(b=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:C,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:h}),n[p]=b),b}(v,y);return x.formatToParts(m)},o=function(f,v){for(var y=d(f,v),m=[],x=0;x<y.length;x+=1){var C=y[x],u=C.type,h=C.value,p=t[u];p>=0&&(m[p]=parseInt(h,10))}var b=m[3],_=b===24?0:b,A=m[0]+"-"+m[1]+"-"+m[2]+" "+_+":"+m[4]+":"+m[5]+":000",E=+f;return(c.utc(A).valueOf()-(E-=E%1e3))/6e4},l=i.prototype;l.tz=function(f,v){f===void 0&&(f=s);var y=this.utcOffset(),m=this.toDate(),x=m.toLocaleString("en-US",{timeZone:f}),C=Math.round((m-new Date(x))/1e3/60),u=c(x).$set("millisecond",this.$ms).utcOffset(15*-Math.round(m.getTimezoneOffset()/15)-C,!0);if(v){var h=u.utcOffset();u=u.add(y-h,"minute")}return u.$x.$timezone=f,u},l.offsetName=function(f){var v=this.$x.$timezone||c.tz.guess(),y=d(this.valueOf(),v,{timeZoneName:f}).find(function(m){return m.type.toLowerCase()==="timezonename"});return y&&y.value};var g=l.startOf;l.startOf=function(f,v){if(!this.$x||!this.$x.$timezone)return g.call(this,f,v);var y=c(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return g.call(y,f,v).tz(this.$x.$timezone,!0)},c.tz=function(f,v,y){var m=y&&v,x=y||v||s,C=o(+c(),x);if(typeof f!="string")return c(f).tz(x);var u=function(_,A,E){var R=_-60*A*1e3,w=o(R,E);if(A===w)return[R,A];var S=o(R-=60*(w-A)*1e3,E);return w===S?[R,w]:[_-60*Math.min(w,S)*1e3,Math.max(w,S)]}(c.utc(f,m).valueOf(),C,x),h=u[0],p=u[1],b=c(h).utcOffset(p);return b.$x.$timezone=x,b},c.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},c.tz.setDefault=function(f){s=f}}})})(el);const rl=oa;var sa={},tl={get exports(){return sa},set exports(e){sa=e}};(function(e,r){(function(t,n){e.exports=n()})(K,function(){var t=1e3,n=6e4,a=36e5,i="millisecond",c="second",s="minute",d="hour",o="day",l="week",g="month",f="quarter",v="year",y="date",m="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h=function(T,P,I){var N=String(T);return!N||N.length>=P?T:""+Array(P+1-N.length).join(I)+T},p={s:h,z:function(T){var P=-T.utcOffset(),I=Math.abs(P),N=Math.floor(I/60),U=I%60;return(P<=0?"+":"-")+h(N,2,"0")+":"+h(U,2,"0")},m:function T(P,I){if(P.date()<I.date())return-T(I,P);var N=12*(I.year()-P.year())+(I.month()-P.month()),U=P.clone().add(N,g),F=I-U<0,q=P.clone().add(N+(F?-1:1),g);return+(-(N+(I-U)/(F?U-q:q-U))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:g,y:v,w:l,d:o,D:y,h:d,m:s,s:c,ms:i,Q:f}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},b="en",_={};_[b]=u;var A=function(T){return T instanceof S},E=function T(P,I,N){var U;if(!P)return b;if(typeof P=="string"){var F=P.toLowerCase();_[F]&&(U=F),I&&(_[F]=I,U=F);var q=P.split("-");if(!U&&q.length>1)return T(q[0])}else{var H=P.name;_[H]=P,U=H}return!N&&U&&(b=U),U||!N&&b},R=function(T,P){if(A(T))return T.clone();var I=typeof P=="object"?P:{};return I.date=T,I.args=arguments,new S(I)},w=p;w.l=E,w.i=A,w.w=function(T,P){return R(T,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var S=function(){function T(I){this.$L=E(I.locale,null,!0),this.parse(I)}var P=T.prototype;return P.parse=function(I){this.$d=function(N){var U=N.date,F=N.utc;if(U===null)return new Date(NaN);if(w.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var q=U.match(x);if(q){var H=q[2]-1||0,O=(q[7]||"0").substring(0,3);return F?new Date(Date.UTC(q[1],H,q[3]||1,q[4]||0,q[5]||0,q[6]||0,O)):new Date(q[1],H,q[3]||1,q[4]||0,q[5]||0,q[6]||0,O)}}return new Date(U)}(I),this.$x=I.x||{},this.init()},P.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},P.$utils=function(){return w},P.isValid=function(){return this.$d.toString()!==m},P.isSame=function(I,N){var U=R(I);return this.startOf(N)<=U&&U<=this.endOf(N)},P.isAfter=function(I,N){return R(I)<this.startOf(N)},P.isBefore=function(I,N){return this.endOf(N)<R(I)},P.$g=function(I,N,U){return w.u(I)?this[N]:this.set(U,I)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(I,N){var U=this,F=!!w.u(N)||N,q=w.p(I),H=function(W,J){var V=w.w(U.$u?Date.UTC(U.$y,J,W):new Date(U.$y,J,W),U);return F?V:V.endOf(o)},O=function(W,J){return w.w(U.toDate()[W].apply(U.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(J)),U)},D=this.$W,k=this.$M,L=this.$D,z="set"+(this.$u?"UTC":"");switch(q){case v:return F?H(1,0):H(31,11);case g:return F?H(1,k):H(0,k+1);case l:var Y=this.$locale().weekStart||0,te=(D<Y?D+7:D)-Y;return H(F?L-te:L+(6-te),k);case o:case y:return O(z+"Hours",0);case d:return O(z+"Minutes",1);case s:return O(z+"Seconds",2);case c:return O(z+"Milliseconds",3);default:return this.clone()}},P.endOf=function(I){return this.startOf(I,!1)},P.$set=function(I,N){var U,F=w.p(I),q="set"+(this.$u?"UTC":""),H=(U={},U[o]=q+"Date",U[y]=q+"Date",U[g]=q+"Month",U[v]=q+"FullYear",U[d]=q+"Hours",U[s]=q+"Minutes",U[c]=q+"Seconds",U[i]=q+"Milliseconds",U)[F],O=F===o?this.$D+(N-this.$W):N;if(F===g||F===v){var D=this.clone().set(y,1);D.$d[H](O),D.init(),this.$d=D.set(y,Math.min(this.$D,D.daysInMonth())).$d}else H&&this.$d[H](O);return this.init(),this},P.set=function(I,N){return this.clone().$set(I,N)},P.get=function(I){return this[w.p(I)]()},P.add=function(I,N){var U,F=this;I=Number(I);var q=w.p(N),H=function(k){var L=R(F);return w.w(L.date(L.date()+Math.round(k*I)),F)};if(q===g)return this.set(g,this.$M+I);if(q===v)return this.set(v,this.$y+I);if(q===o)return H(1);if(q===l)return H(7);var O=(U={},U[s]=n,U[d]=a,U[c]=t,U)[q]||1,D=this.$d.getTime()+I*O;return w.w(D,this)},P.subtract=function(I,N){return this.add(-1*I,N)},P.format=function(I){var N=this,U=this.$locale();if(!this.isValid())return U.invalidDate||m;var F=I||"YYYY-MM-DDTHH:mm:ssZ",q=w.z(this),H=this.$H,O=this.$m,D=this.$M,k=U.weekdays,L=U.months,z=function(J,V,de,ce){return J&&(J[V]||J(N,F))||de[V].slice(0,ce)},Y=function(J){return w.s(H%12||12,J,"0")},te=U.meridiem||function(J,V,de){var ce=J<12?"AM":"PM";return de?ce.toLowerCase():ce},W={YY:String(this.$y).slice(-2),YYYY:this.$y,M:D+1,MM:w.s(D+1,2,"0"),MMM:z(U.monthsShort,D,L,3),MMMM:z(L,D),D:this.$D,DD:w.s(this.$D,2,"0"),d:String(this.$W),dd:z(U.weekdaysMin,this.$W,k,2),ddd:z(U.weekdaysShort,this.$W,k,3),dddd:k[this.$W],H:String(H),HH:w.s(H,2,"0"),h:Y(1),hh:Y(2),a:te(H,O,!0),A:te(H,O,!1),m:String(O),mm:w.s(O,2,"0"),s:String(this.$s),ss:w.s(this.$s,2,"0"),SSS:w.s(this.$ms,3,"0"),Z:q};return F.replace(C,function(J,V){return V||W[J]||q.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(I,N,U){var F,q=w.p(N),H=R(I),O=(H.utcOffset()-this.utcOffset())*n,D=this-H,k=w.m(this,H);return k=(F={},F[v]=k/12,F[g]=k,F[f]=k/3,F[l]=(D-O)/6048e5,F[o]=(D-O)/864e5,F[d]=D/a,F[s]=D/n,F[c]=D/t,F)[q]||D,U?k:w.a(k)},P.daysInMonth=function(){return this.endOf(g).$D},P.$locale=function(){return _[this.$L]},P.locale=function(I,N){if(!I)return this.$L;var U=this.clone(),F=E(I,N,!0);return F&&(U.$L=F),U},P.clone=function(){return w.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},T}(),B=S.prototype;return R.prototype=B,[["$ms",i],["$s",c],["$m",s],["$H",d],["$W",o],["$M",g],["$y",v],["$D",y]].forEach(function(T){B[T[1]]=function(P){return this.$g(P,T[0],T[1])}}),R.extend=function(T,P){return T.$i||(T(P,S,R),T.$i=!0),R},R.locale=E,R.isDayjs=A,R.unix=function(T){return R(1e3*T)},R.en=_[b],R.Ls=_,R.p={},R})})(tl);const Dr=sa;Dr.extend(Qf);Dr.extend(rl);const Mo=["SUN","MON","TUE","WED","THU","FRI","SAT"],rt=e=>{const[r,t]=e.split(":");return{hour:parseInt(r||"0",10),minutes:parseInt(t||"0",10)}};function ca(e,r,t){const{availability:n}=e;if(!n)return!0;if(Aa(n))return!1;const a=t?Dr(t).tz(r):Dr().tz(r),i=a.day(),c=n[Mo[i]];if(!Array.isArray(c)||c.length!==2)return!1;const s=a.hour(),d=a.minute(),o=rt(c[0]),l=rt(c[1]);return s<o.hour||s===o.hour&&d<o.minutes?!1:!(s>l.hour||s===l.hour&&d>l.minutes)}const ua=(e,r=void 0,t=void 0,n=!1)=>n?e.map(i=>{let c;return Array.isArray(i.items)&&(c=ua(i.items,r,t,n)),{...i,items:c,outsideAvailabilitySlot:!ca(i,r,t)||(c==null?void 0:c.every(s=>s.outsideAvailabilitySlot))||!1}}):e.filter(i=>ca(i,r,t)).map(i=>Array.isArray(i.items)?{...i,items:ua(i.items,r,t)}:i),o0=(e,r=void 0,t=void 0,n=!1)=>{let a=[];return e.forEach(i=>{if(!Array.isArray(i.items)){a.push(i);return}const c=ua(i.items,r,t,n);c.length>0&&a.push({...i,items:c})}),n&&(a=a.map(i=>!i.items||!Array.isArray(i.items)?i:{...i,outsideAvailabilitySlot:!ca(i,r,t)||i.items.every(c=>c.outsideAvailabilitySlot)})),a};function Or(e,r){const t=e==null?void 0:e.week;if(!e||!e.active||!t)return!1;const n=Dr().tz(r),a=n.day(),i=t[Mo[a]];return i?i.some(c=>nl(n,c)):!1}function nl(e,r){const t=e.hour(),n=e.minute(),a=rt(r.from),i=rt(r.to);return i.hour===t&&t===23&&i.minutes===n&&n===59?!0:t<a.hour||t===a.hour&&n<a.minutes?!1:!(t>i.hour||t===i.hour&&n>i.minutes)}function al(){this.__data__=[],this.size=0}var il=al;function ol(e,r){return e===r||e!==e&&r!==r}var Ca=ol,sl=Ca;function cl(e,r){for(var t=e.length;t--;)if(sl(e[t][0],r))return t;return-1}var Vt=cl,ul=Vt,fl=Array.prototype,ll=fl.splice;function dl(e){var r=this.__data__,t=ul(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():ll.call(r,t,1),--this.size,!0}var hl=dl,vl=Vt;function xl(e){var r=this.__data__,t=vl(r,e);return t<0?void 0:r[t][1]}var pl=xl,gl=Vt;function ml(e){return gl(this.__data__,e)>-1}var yl=ml,bl=Vt;function _l(e,r){var t=this.__data__,n=bl(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var El=_l,wl=il,$l=hl,Al=pl,Cl=yl,Sl=El;function dr(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}dr.prototype.clear=wl;dr.prototype.delete=$l;dr.prototype.get=Al;dr.prototype.has=Cl;dr.prototype.set=Sl;var Xt=dr,Tl=Xt;function Rl(){this.__data__=new Tl,this.size=0}var Ol=Rl;function Pl(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var Il=Pl;function Dl(e){return this.__data__.get(e)}var Bl=Dl;function kl(e){return this.__data__.has(e)}var Ll=kl,Ul=Ye,Nl=Ul(Object,"create"),Jt=Nl,s0=Jt;function jl(){this.__data__=s0?s0(null):{},this.size=0}var Fl=jl;function Hl(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var ql=Hl,Ml=Jt,Wl="__lodash_hash_undefined__",zl=Object.prototype,Gl=zl.hasOwnProperty;function Kl(e){var r=this.__data__;if(Ml){var t=r[e];return t===Wl?void 0:t}return Gl.call(r,e)?r[e]:void 0}var Yl=Kl,Vl=Jt,Xl=Object.prototype,Jl=Xl.hasOwnProperty;function Zl(e){var r=this.__data__;return Vl?r[e]!==void 0:Jl.call(r,e)}var Ql=Zl,ed=Jt,rd="__lodash_hash_undefined__";function td(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=ed&&r===void 0?rd:r,this}var nd=td,ad=Fl,id=ql,od=Yl,sd=Ql,cd=nd;function hr(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}hr.prototype.clear=ad;hr.prototype.delete=id;hr.prototype.get=od;hr.prototype.has=sd;hr.prototype.set=cd;var ud=hr,c0=ud,fd=Xt,ld=_a;function dd(){this.size=0,this.__data__={hash:new c0,map:new(ld||fd),string:new c0}}var hd=dd;function vd(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var xd=vd,pd=xd;function gd(e,r){var t=e.__data__;return pd(r)?t[typeof r=="string"?"string":"hash"]:t.map}var Zt=gd,md=Zt;function yd(e){var r=md(this,e).delete(e);return this.size-=r?1:0,r}var bd=yd,_d=Zt;function Ed(e){return _d(this,e).get(e)}var wd=Ed,$d=Zt;function Ad(e){return $d(this,e).has(e)}var Cd=Ad,Sd=Zt;function Td(e,r){var t=Sd(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}var Rd=Td,Od=hd,Pd=bd,Id=wd,Dd=Cd,Bd=Rd;function vr(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}vr.prototype.clear=Od;vr.prototype.delete=Pd;vr.prototype.get=Id;vr.prototype.has=Dd;vr.prototype.set=Bd;var Wo=vr,kd=Xt,Ld=_a,Ud=Wo,Nd=200;function jd(e,r){var t=this.__data__;if(t instanceof kd){var n=t.__data__;if(!Ld||n.length<Nd-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new Ud(n)}return t.set(e,r),this.size=t.size,this}var Fd=jd,Hd=Xt,qd=Ol,Md=Il,Wd=Bl,zd=Ll,Gd=Fd;function xr(e){var r=this.__data__=new Hd(e);this.size=r.size}xr.prototype.clear=qd;xr.prototype.delete=Md;xr.prototype.get=Wd;xr.prototype.has=zd;xr.prototype.set=Gd;var zo=xr,Kd="__lodash_hash_undefined__";function Yd(e){return this.__data__.set(e,Kd),this}var Vd=Yd;function Xd(e){return this.__data__.has(e)}var Jd=Xd,Zd=Wo,Qd=Vd,eh=Jd;function tt(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new Zd;++r<t;)this.add(e[r])}tt.prototype.add=tt.prototype.push=Qd;tt.prototype.has=eh;var rh=tt;function th(e,r){for(var t=-1,n=e==null?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}var nh=th;function ah(e,r){return e.has(r)}var ih=ah,oh=rh,sh=nh,ch=ih,uh=1,fh=2;function lh(e,r,t,n,a,i){var c=t&uh,s=e.length,d=r.length;if(s!=d&&!(c&&d>s))return!1;var o=i.get(e),l=i.get(r);if(o&&l)return o==r&&l==e;var g=-1,f=!0,v=t&fh?new oh:void 0;for(i.set(e,r),i.set(r,e);++g<s;){var y=e[g],m=r[g];if(n)var x=c?n(m,y,g,r,e,i):n(y,m,g,e,r,i);if(x!==void 0){if(x)continue;f=!1;break}if(v){if(!sh(r,function(C,u){if(!ch(v,u)&&(y===C||a(y,C,t,n,i)))return v.push(u)})){f=!1;break}}else if(!(y===m||a(y,m,t,n,i))){f=!1;break}}return i.delete(e),i.delete(r),f}var Go=lh,dh=je,hh=dh.Uint8Array,Ko=hh;function vh(e){var r=-1,t=Array(e.size);return e.forEach(function(n,a){t[++r]=[a,n]}),t}var xh=vh;function ph(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var gh=ph,u0=Kt,f0=Ko,mh=Ca,yh=Go,bh=xh,_h=gh,Eh=1,wh=2,$h="[object Boolean]",Ah="[object Date]",Ch="[object Error]",Sh="[object Map]",Th="[object Number]",Rh="[object RegExp]",Oh="[object Set]",Ph="[object String]",Ih="[object Symbol]",Dh="[object ArrayBuffer]",Bh="[object DataView]",l0=u0?u0.prototype:void 0,yn=l0?l0.valueOf:void 0;function kh(e,r,t,n,a,i,c){switch(t){case Bh:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Dh:return!(e.byteLength!=r.byteLength||!i(new f0(e),new f0(r)));case $h:case Ah:case Th:return mh(+e,+r);case Ch:return e.name==r.name&&e.message==r.message;case Rh:case Ph:return e==r+"";case Sh:var s=bh;case Oh:var d=n&Eh;if(s||(s=_h),e.size!=r.size&&!d)return!1;var o=c.get(e);if(o)return o==r;n|=wh,c.set(e,r);var l=yh(s(e),s(r),n,a,i,c);return c.delete(e),l;case Ih:if(yn)return yn.call(e)==yn.call(r)}return!1}var Lh=kh;function Uh(e,r){for(var t=-1,n=r.length,a=e.length;++t<n;)e[a+t]=r[t];return e}var Yo=Uh,Nh=Yo,jh=Ur;function Fh(e,r,t){var n=r(e);return jh(e)?n:Nh(n,t(e))}var Vo=Fh;function Hh(e,r){for(var t=-1,n=e==null?0:e.length,a=0,i=[];++t<n;){var c=e[t];r(c,t,e)&&(i[a++]=c)}return i}var qh=Hh;function Mh(){return[]}var Xo=Mh,Wh=qh,zh=Xo,Gh=Object.prototype,Kh=Gh.propertyIsEnumerable,d0=Object.getOwnPropertySymbols,Yh=d0?function(e){return e==null?[]:(e=Object(e),Wh(d0(e),function(r){return Kh.call(e,r)}))}:zh,Sa=Yh;function Vh(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var Xh=Vh,Jh=9007199254740991,Zh=/^(?:0|[1-9]\d*)$/;function Qh(e,r){var t=typeof e;return r=r??Jh,!!r&&(t=="number"||t!="symbol"&&Zh.test(e))&&e>-1&&e%1==0&&e<r}var ev=Qh,rv=Xh,tv=Ho,nv=Ur,av=Ke,iv=ev,ov=$a,sv=Object.prototype,cv=sv.hasOwnProperty;function uv(e,r){var t=nv(e),n=!t&&tv(e),a=!t&&!n&&av(e),i=!t&&!n&&!a&&ov(e),c=t||n||a||i,s=c?rv(e.length,String):[],d=s.length;for(var o in e)(r||cv.call(e,o))&&!(c&&(o=="length"||a&&(o=="offset"||o=="parent")||i&&(o=="buffer"||o=="byteLength"||o=="byteOffset")||iv(o,d)))&&s.push(o);return s}var Jo=uv,fv=Jo,lv=Bo,dv=Ea;function hv(e){return dv(e)?fv(e):lv(e)}var Ta=hv,vv=Vo,xv=Sa,pv=Ta;function gv(e){return vv(e,pv,xv)}var Zo=gv,h0=Zo,mv=1,yv=Object.prototype,bv=yv.hasOwnProperty;function _v(e,r,t,n,a,i){var c=t&mv,s=h0(e),d=s.length,o=h0(r),l=o.length;if(d!=l&&!c)return!1;for(var g=d;g--;){var f=s[g];if(!(c?f in r:bv.call(r,f)))return!1}var v=i.get(e),y=i.get(r);if(v&&y)return v==r&&y==e;var m=!0;i.set(e,r),i.set(r,e);for(var x=c;++g<d;){f=s[g];var C=e[f],u=r[f];if(n)var h=c?n(u,C,f,r,e,i):n(C,u,f,e,r,i);if(!(h===void 0?C===u||a(C,u,t,n,i):h)){m=!1;break}x||(x=f=="constructor")}if(m&&!x){var p=e.constructor,b=r.constructor;p!=b&&"constructor"in e&&"constructor"in r&&!(typeof p=="function"&&p instanceof p&&typeof b=="function"&&b instanceof b)&&(m=!1)}return i.delete(e),i.delete(r),m}var Ev=_v,bn=zo,wv=Go,$v=Lh,Av=Ev,v0=Lr,x0=Ur,p0=Ke,Cv=$a,Sv=1,g0="[object Arguments]",m0="[object Array]",Yr="[object Object]",Tv=Object.prototype,y0=Tv.hasOwnProperty;function Rv(e,r,t,n,a,i){var c=x0(e),s=x0(r),d=c?m0:v0(e),o=s?m0:v0(r);d=d==g0?Yr:d,o=o==g0?Yr:o;var l=d==Yr,g=o==Yr,f=d==o;if(f&&p0(e)){if(!p0(r))return!1;c=!0,l=!1}if(f&&!l)return i||(i=new bn),c||Cv(e)?wv(e,r,t,n,a,i):$v(e,r,d,t,n,a,i);if(!(t&Sv)){var v=l&&y0.call(e,"__wrapped__"),y=g&&y0.call(r,"__wrapped__");if(v||y){var m=v?e.value():e,x=y?r.value():r;return i||(i=new bn),a(m,x,t,n,i)}}return f?(i||(i=new bn),Av(e,r,t,n,a,i)):!1}var Ov=Rv,Pv=Ov,b0=lr;function Qo(e,r,t,n,a){return e===r?!0:e==null||r==null||!b0(e)&&!b0(r)?e!==e&&r!==r:Pv(e,r,t,n,Qo,a)}var Iv=Qo,Dv=Iv;function Bv(e,r){return Dv(e,r)}var es=Bv;function rs(e){let r=0;return e==null||e.forEach(t=>r+=Number(t.discountPrice)),r}function kv(e){return rs(e.discounts)}function Lv(e,r,t=",",n=2){return`${Number(e).toFixed(n).replace(".",t)}${r?" "+r:""}`}function ts(e,r){var a;const t=(a=e._)==null?void 0:a.enableKey;return t?!r||!Array.isArray(r)||r.length===0?!1:t.replace(/\s/g,"").split(",").some(i=>r.includes(i)):!0}function Uv(e){var t,n,a,i,c,s;const r=(n=(t=e.details)==null?void 0:t.literals)==null?void 0:n.name.split(" ").filter(d=>d!=="");return r?r.length===1?((s=(c=(i=(a=e.details)==null?void 0:a.literals)==null?void 0:i.name)==null?void 0:c.slice)==null?void 0:s.call(c,0,2))||"":r.length>1?`${r[0][0]}${r[1][0]}`:"":""}function ns(e,r=!1,t=void 0,n=60){const[a,i]=re.useState(e&&o0(e,t,void 0,r));zt(c,n*1e3);function c(){const s=e&&o0(e,t,void 0,r);es(s,a)||(console.log("menu has changed",s),i(s))}return re.useEffect(c,[a,e]),a}function as(e,r){return e.__||(e.__={}),e.__.isHiddenByEnableKey=!ts(e,r),e.items&&e.items.length>0&&(e.items=e.items.map(t=>as(t,r))),e}function Nv(e,r){if(e)return e.map(t=>as(t,r))}function jv({originalMenu:e,markOnly:r=!1,timeZone:t,interval:n=60,enableKeys:a=[]}){const i=ns(e,r,t,n);return Nv(i,a)}var _0;(function(e){e.UNINITIALIZED="UNINITIALIZED",e.PROCESSING="PROCESSING",e.PAID="PAID",e.FAILED="FAILED",e.PRINTING_RECEIPT="PRINTING_RECEIPT",e.PRINTING_RECEIPT_SUCCESS="PRINTING_RECEIPT_SUCCESS",e.SENDING_RECEIPT="SENDING_RECEIPT",e.SENDING_RECEIPT_SUCCESS="SENDING_RECEIPT_SUCCESS",e.ERROR="ERROR"})(_0||(_0={}));var E0;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(E0||(E0={}));var fa;(function(e){e.GROUP="3e/group",e.PRODUCT="3e/product",e.CATEGORY="3e/group/category",e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.STATIC="3e/static",e.REF="3e/ref",e.QUERY="3e/query"})(fa||(fa={}));var w0;(function(e){e.GROUP="group",e.PRODUCT="product"})(w0||(w0={}));var $0;(function(e){e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.DINE_IN="DINE_IN",e.DINE_IN_OPEN="DINE_IN_OPEN",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.GLOVO_TAKE_AWAY="GLOVO_TAKE_AWAY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.JUSTEAT_TAKE_AWAY="JUSTEAT_TAKE_AWAY",e.UBER_DELIVERY="UBER_DELIVERY",e.UBER_TAKE_AWAY="UBER_TAKE_AWAY",e.UBER_DINE_IN="UBER_DINE_IN",e.BOLT_DELIVERY="BOLT_DELIVERY",e.BOLT_TAKE_AWAY="BOLT_TAKE_AWAY",e.WOLT_DELIVERY="WOLT_DELIVERY",e.WOLT_TAKE_AWAY="WOLT_TAKE_AWAY",e.WOLT_DINE_IN="WOLT_DINE_IN"})($0||($0={}));var A0;(function(e){e.NEW="NEW",e.COMPLETED="COMPLETED",e.VERIFIED="VERIFIED",e.DELIVER="DELIVER",e.DELIVERED="DELIVERED",e.CLOSED="CLOSED",e.ABANDONED="ABANDONED",e.CANCELLED="CANCELLED",e.PICKED="PICKED"})(A0||(A0={}));var C0;(function(e){e.CASH="CASH",e.CARD="CARD",e.COD="COD",e.TERMINAL="TERMINAL",e.EPAYMENT="EPAYMENT",e.COUPON="COUPON",e.WALLET="WALLET",e.PREAUTHORIZED="PREAUTHORIZED",e.RETURN="RETURN",e.EXTERNAL="EXTERNAL"})(C0||(C0={}));var S0;(function(e){e.KIOSK="KIOSK",e.WEB="WEB",e.JUST_EAT_TAKE_AWAY="JUSTEATTAKEAWAY",e.GLOVO="GLOVO",e.PYSZNE="PYSZNE",e.WOLT="WOLT",e.UBER="UBER",e.BOLT="BOLT"})(S0||(S0={}));var T0;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(T0||(T0={}));var R0;(function(e){e.GROUP="group",e.PRODUCT="product"})(R0||(R0={}));var O0;(function(e){e.DINE_IN="DINE_IN",e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.GLOVO="GLOVO",e.JUSTEAT="JUSTEAT",e.UBER="UBER",e.BOLT="BOLT",e.WOLT="WOLT"})(O0||(O0={}));var P0;(function(e){e.ORDER_EVENT_ERROR="OrderEventError",e.ORDER_APPLIED_EVENTS="OrderAppliedEvents",e.ORDER_EVENT_FISCAL="OrderEventFiscal",e.ORDER_UPSELL="OrderUpsell"})(P0||(P0={}));function Fv(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var Hv=Fv,qv=Ye,Mv=function(){try{var e=qv(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Wv=Mv,I0=Wv;function zv(e,r,t){r=="__proto__"&&I0?I0(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}var is=zv,Gv=is,Kv=Ca,Yv=Object.prototype,Vv=Yv.hasOwnProperty;function Xv(e,r,t){var n=e[r];(!(Vv.call(e,r)&&Kv(n,t))||t===void 0&&!(r in e))&&Gv(e,r,t)}var os=Xv,Jv=os,Zv=is;function Qv(e,r,t,n){var a=!t;t||(t={});for(var i=-1,c=r.length;++i<c;){var s=r[i],d=n?n(t[s],e[s],s,t,e):void 0;d===void 0&&(d=e[s]),a?Zv(t,s,d):Jv(t,s,d)}return t}var Qt=Qv,ex=Qt,rx=Ta;function tx(e,r){return e&&ex(r,rx(r),e)}var nx=tx;function ax(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var ix=ax,ox=kr,sx=Gt,cx=ix,ux=Object.prototype,fx=ux.hasOwnProperty;function lx(e){if(!ox(e))return cx(e);var r=sx(e),t=[];for(var n in e)n=="constructor"&&(r||!fx.call(e,n))||t.push(n);return t}var dx=lx,hx=Jo,vx=dx,xx=Ea;function px(e){return xx(e)?hx(e,!0):vx(e)}var Ra=px,gx=Qt,mx=Ra;function yx(e,r){return e&&gx(r,mx(r),e)}var bx=yx,nt={},_x={get exports(){return nt},set exports(e){nt=e}};(function(e,r){var t=je,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,c=i?t.Buffer:void 0,s=c?c.allocUnsafe:void 0;function d(o,l){if(l)return o.slice();var g=o.length,f=s?s(g):new o.constructor(g);return o.copy(f),f}e.exports=d})(_x,nt);function Ex(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var wx=Ex,$x=Qt,Ax=Sa;function Cx(e,r){return $x(e,Ax(e),r)}var Sx=Cx,Tx=Do,Rx=Tx(Object.getPrototypeOf,Object),ss=Rx,Ox=Yo,Px=ss,Ix=Sa,Dx=Xo,Bx=Object.getOwnPropertySymbols,kx=Bx?function(e){for(var r=[];e;)Ox(r,Ix(e)),e=Px(e);return r}:Dx,cs=kx,Lx=Qt,Ux=cs;function Nx(e,r){return Lx(e,Ux(e),r)}var jx=Nx,Fx=Vo,Hx=cs,qx=Ra;function Mx(e){return Fx(e,qx,Hx)}var Wx=Mx,zx=Object.prototype,Gx=zx.hasOwnProperty;function Kx(e){var r=e.length,t=new e.constructor(r);return r&&typeof e[0]=="string"&&Gx.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var Yx=Kx,D0=Ko;function Vx(e){var r=new e.constructor(e.byteLength);return new D0(r).set(new D0(e)),r}var Oa=Vx,Xx=Oa;function Jx(e,r){var t=r?Xx(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var Zx=Jx,Qx=/\w*$/;function e1(e){var r=new e.constructor(e.source,Qx.exec(e));return r.lastIndex=e.lastIndex,r}var r1=e1,B0=Kt,k0=B0?B0.prototype:void 0,L0=k0?k0.valueOf:void 0;function t1(e){return L0?Object(L0.call(e)):{}}var n1=t1,a1=Oa;function i1(e,r){var t=r?a1(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var o1=i1,s1=Oa,c1=Zx,u1=r1,f1=n1,l1=o1,d1="[object Boolean]",h1="[object Date]",v1="[object Map]",x1="[object Number]",p1="[object RegExp]",g1="[object Set]",m1="[object String]",y1="[object Symbol]",b1="[object ArrayBuffer]",_1="[object DataView]",E1="[object Float32Array]",w1="[object Float64Array]",$1="[object Int8Array]",A1="[object Int16Array]",C1="[object Int32Array]",S1="[object Uint8Array]",T1="[object Uint8ClampedArray]",R1="[object Uint16Array]",O1="[object Uint32Array]";function P1(e,r,t){var n=e.constructor;switch(r){case b1:return s1(e);case d1:case h1:return new n(+e);case _1:return c1(e,t);case E1:case w1:case $1:case A1:case C1:case S1:case T1:case R1:case O1:return l1(e,t);case v1:return new n;case x1:case m1:return new n(e);case p1:return u1(e);case g1:return new n;case y1:return f1(e)}}var I1=P1,D1=kr,U0=Object.create,B1=function(){function e(){}return function(r){if(!D1(r))return{};if(U0)return U0(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}(),k1=B1,L1=k1,U1=ss,N1=Gt;function j1(e){return typeof e.constructor=="function"&&!N1(e)?L1(U1(e)):{}}var F1=j1,H1=Lr,q1=lr,M1="[object Map]";function W1(e){return q1(e)&&H1(e)==M1}var z1=W1,G1=z1,K1=wa,N0=cr,j0=N0&&N0.isMap,Y1=j0?K1(j0):G1,V1=Y1,X1=Lr,J1=lr,Z1="[object Set]";function Q1(e){return J1(e)&&X1(e)==Z1}var ep=Q1,rp=ep,tp=wa,F0=cr,H0=F0&&F0.isSet,np=H0?tp(H0):rp,ap=np,ip=zo,op=Hv,sp=os,cp=nx,up=bx,fp=nt,lp=wx,dp=Sx,hp=jx,vp=Zo,xp=Wx,pp=Lr,gp=Yx,mp=I1,yp=F1,bp=Ur,_p=Ke,Ep=V1,wp=kr,$p=ap,Ap=Ta,Cp=Ra,Sp=1,Tp=2,Rp=4,us="[object Arguments]",Op="[object Array]",Pp="[object Boolean]",Ip="[object Date]",Dp="[object Error]",fs="[object Function]",Bp="[object GeneratorFunction]",kp="[object Map]",Lp="[object Number]",ls="[object Object]",Up="[object RegExp]",Np="[object Set]",jp="[object String]",Fp="[object Symbol]",Hp="[object WeakMap]",qp="[object ArrayBuffer]",Mp="[object DataView]",Wp="[object Float32Array]",zp="[object Float64Array]",Gp="[object Int8Array]",Kp="[object Int16Array]",Yp="[object Int32Array]",Vp="[object Uint8Array]",Xp="[object Uint8ClampedArray]",Jp="[object Uint16Array]",Zp="[object Uint32Array]",oe={};oe[us]=oe[Op]=oe[qp]=oe[Mp]=oe[Pp]=oe[Ip]=oe[Wp]=oe[zp]=oe[Gp]=oe[Kp]=oe[Yp]=oe[kp]=oe[Lp]=oe[ls]=oe[Up]=oe[Np]=oe[jp]=oe[Fp]=oe[Vp]=oe[Xp]=oe[Jp]=oe[Zp]=!0;oe[Dp]=oe[fs]=oe[Hp]=!1;function Xr(e,r,t,n,a,i){var c,s=r&Sp,d=r&Tp,o=r&Rp;if(t&&(c=a?t(e,n,a,i):t(e)),c!==void 0)return c;if(!wp(e))return e;var l=bp(e);if(l){if(c=gp(e),!s)return lp(e,c)}else{var g=pp(e),f=g==fs||g==Bp;if(_p(e))return fp(e,s);if(g==ls||g==us||f&&!a){if(c=d||f?{}:yp(e),!s)return d?hp(e,up(c,e)):dp(e,cp(c,e))}else{if(!oe[g])return a?e:{};c=mp(e,g,s)}}i||(i=new ip);var v=i.get(e);if(v)return v;i.set(e,c),$p(e)?e.forEach(function(x){c.add(Xr(x,r,t,x,e,i))}):Ep(e)&&e.forEach(function(x,C){c.set(C,Xr(x,r,t,C,e,i))});var y=o?d?xp:vp:d?Cp:Ap,m=l?void 0:y(e);return op(m||e,function(x,C){m&&(C=x,x=e[C]),sp(c,C,Xr(x,r,t,C,e,i))}),c}var Qp=Xr,eg=Qp,rg=1,tg=4;function ng(e){return eg(e,rg|tg)}var ag=ng;function ig(e,r){if(!r||!r.filter||!e||!e.filter||e.kind!==fa.CONFIG)return!0;if(e.filter&&e.items){const t=Object.values(e.filter).flat().filter(n=>{var a,i,c,s;return r.filter[(i=(a=e.items)==null?void 0:a[0])==null?void 0:i.fltCtx]&&Object.values(r.filter[(s=(c=e.items)==null?void 0:c[0])==null?void 0:s.fltCtx]).includes(n)});if(Array.isArray(t)&&t.length===0)return!1}return!0}const at=(e,r,t=0)=>{if(!e)return 0;let n=e.price?parseFloat(e.price):0;if(!(r!=null&&r.selected)||Aa(r.selected))return n;const{items:a}=e,i=ag(r);return ig(e,i)&&Array.isArray(a)&&a.forEach(c=>{let s=0;if(c.kind!=="3e/product")s=at(c,i,t+1);else{const{selected:d={}}=i,{selCtx:o,id:l}=c;o in d&&l in d[o]&&(s=at(c,i,t+1)*d[o][l],delete i.selected[o][l])}n+=s}),Math.round(100*n)/100},ds=({product:e,state:r,selected:t,cheapestGroupOptionsProduct:n})=>{const a=at(e,r),i=at(e,e.state),c=e.minPrice&&parseFloat(e.price)===a;let s=t||n||parseFloat(e.price)===0?a||i:parseFloat(e.price);return n!==void 0&&(s-=n),c&&e.minPrice&&(s=parseFloat(e.minPrice)),{displayPrice:s,showAsMinPrice:c,calculatedPriceDefaultProductState:i}},og=ds;function Pa(e){const r=[];return e.reduce((t,n)=>{if(t[n.hash]||(t[n.hash]={...n,quantity:0,discounted:0,discounts:[],firstProductQuantity:n.quantity,itemsToRemove:[]},r.push(t[n.hash])),t[n.hash].quantity+=n.quantity,t[n.hash].itemsToRemove.push(n.id),n.discounts){t[n.hash].discounts||(t[n.hash].discounts=[]),t[n.hash].discounts=t[n.hash].discounts.concat(n.discounts),t[n.hash].discounted=0;for(let a=0;a<t[n.hash].discounts.length;a+=1)t[n.hash].discounts[a]&&(t[n.hash].discounted+=parseFloat(t[n.hash].discounts[a].discountPrice))}return t},{}),r}function sg(e){return Pa(e)}function cg(e){return!e||e.length===0?null:Pa(e.flatMap(r=>r.lines))}var la={},ug={get exports(){return la},set exports(e){la=e}},it={},fg={get exports(){return it},set exports(e){it=e}},hs=function(r,t){return function(){for(var a=new Array(arguments.length),i=0;i<a.length;i++)a[i]=arguments[i];return r.apply(t,a)}},lg=hs,Ve=Object.prototype.toString;function Ia(e){return Ve.call(e)==="[object Array]"}function da(e){return typeof e>"u"}function dg(e){return e!==null&&!da(e)&&e.constructor!==null&&!da(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function hg(e){return Ve.call(e)==="[object ArrayBuffer]"}function vg(e){return typeof FormData<"u"&&e instanceof FormData}function xg(e){var r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&e.buffer instanceof ArrayBuffer,r}function pg(e){return typeof e=="string"}function gg(e){return typeof e=="number"}function vs(e){return e!==null&&typeof e=="object"}function Jr(e){if(Ve.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}function mg(e){return Ve.call(e)==="[object Date]"}function yg(e){return Ve.call(e)==="[object File]"}function bg(e){return Ve.call(e)==="[object Blob]"}function xs(e){return Ve.call(e)==="[object Function]"}function _g(e){return vs(e)&&xs(e.pipe)}function Eg(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}function wg(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function $g(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Da(e,r){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),Ia(e))for(var t=0,n=e.length;t<n;t++)r.call(null,e[t],t,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.call(null,e[a],a,e)}function ha(){var e={};function r(a,i){Jr(e[i])&&Jr(a)?e[i]=ha(e[i],a):Jr(a)?e[i]=ha({},a):Ia(a)?e[i]=a.slice():e[i]=a}for(var t=0,n=arguments.length;t<n;t++)Da(arguments[t],r);return e}function Ag(e,r,t){return Da(r,function(a,i){t&&typeof a=="function"?e[i]=lg(a,t):e[i]=a}),e}function Cg(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var $e={isArray:Ia,isArrayBuffer:hg,isBuffer:dg,isFormData:vg,isArrayBufferView:xg,isString:pg,isNumber:gg,isObject:vs,isPlainObject:Jr,isUndefined:da,isDate:mg,isFile:yg,isBlob:bg,isFunction:xs,isStream:_g,isURLSearchParams:Eg,isStandardBrowserEnv:$g,forEach:Da,merge:ha,extend:Ag,trim:wg,stripBOM:Cg},tr=$e;function q0(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var ps=function(r,t,n){if(!t)return r;var a;if(n)a=n(t);else if(tr.isURLSearchParams(t))a=t.toString();else{var i=[];tr.forEach(t,function(d,o){d===null||typeof d>"u"||(tr.isArray(d)?o=o+"[]":d=[d],tr.forEach(d,function(g){tr.isDate(g)?g=g.toISOString():tr.isObject(g)&&(g=JSON.stringify(g)),i.push(q0(o)+"="+q0(g))}))}),a=i.join("&")}if(a){var c=r.indexOf("#");c!==-1&&(r=r.slice(0,c)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r},Sg=$e;function en(){this.handlers=[]}en.prototype.use=function(r,t,n){return this.handlers.push({fulfilled:r,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};en.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)};en.prototype.forEach=function(r){Sg.forEach(this.handlers,function(n){n!==null&&r(n)})};var Tg=en,Rg=$e,Og=function(r,t){Rg.forEach(r,function(a,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(r[t]=a,delete r[i])})},gs=function(r,t,n,a,i){return r.config=t,n&&(r.code=n),r.request=a,r.response=i,r.isAxiosError=!0,r.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},r},_n,M0;function ms(){if(M0)return _n;M0=1;var e=gs;return _n=function(t,n,a,i,c){var s=new Error(t);return e(s,n,a,i,c)},_n}var En,W0;function Pg(){if(W0)return En;W0=1;var e=ms();return En=function(t,n,a){var i=a.config.validateStatus;!a.status||!i||i(a.status)?t(a):n(e("Request failed with status code "+a.status,a.config,null,a.request,a))},En}var wn,z0;function Ig(){if(z0)return wn;z0=1;var e=$e;return wn=e.isStandardBrowserEnv()?function(){return{write:function(n,a,i,c,s,d){var o=[];o.push(n+"="+encodeURIComponent(a)),e.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),e.isString(c)&&o.push("path="+c),e.isString(s)&&o.push("domain="+s),d===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(n){var a=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),wn}var $n,G0;function Dg(){return G0||(G0=1,$n=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)}),$n}var An,K0;function Bg(){return K0||(K0=1,An=function(r,t){return t?r.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):r}),An}var Cn,Y0;function kg(){if(Y0)return Cn;Y0=1;var e=Dg(),r=Bg();return Cn=function(n,a){return n&&!e(a)?r(n,a):a},Cn}var Sn,V0;function Lg(){if(V0)return Sn;V0=1;var e=$e,r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Sn=function(n){var a={},i,c,s;return n&&e.forEach(n.split(`
2
2
  `),function(o){if(s=o.indexOf(":"),i=e.trim(o.substr(0,s)).toLowerCase(),c=e.trim(o.substr(s+1)),i){if(a[i]&&r.indexOf(i)>=0)return;i==="set-cookie"?a[i]=(a[i]?a[i]:[]).concat([c]):a[i]=a[i]?a[i]+", "+c:c}}),a},Sn}var Tn,X0;function Ug(){if(X0)return Tn;X0=1;var e=$e;return Tn=e.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),a;function i(c){var s=c;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return a=i(window.location.href),function(s){var d=e.isString(s)?i(s):s;return d.protocol===a.protocol&&d.host===a.host}}():function(){return function(){return!0}}(),Tn}var Rn,J0;function Z0(){if(J0)return Rn;J0=1;var e=$e,r=Pg(),t=Ig(),n=ps,a=kg(),i=Lg(),c=Ug(),s=ms();return Rn=function(o){return new Promise(function(g,f){var v=o.data,y=o.headers,m=o.responseType;e.isFormData(v)&&delete y["Content-Type"];var x=new XMLHttpRequest;if(o.auth){var C=o.auth.username||"",u=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";y.Authorization="Basic "+btoa(C+":"+u)}var h=a(o.baseURL,o.url);x.open(o.method.toUpperCase(),n(h,o.params,o.paramsSerializer),!0),x.timeout=o.timeout;function p(){if(x){var _="getAllResponseHeaders"in x?i(x.getAllResponseHeaders()):null,A=!m||m==="text"||m==="json"?x.responseText:x.response,E={data:A,status:x.status,statusText:x.statusText,headers:_,config:o,request:x};r(g,f,E),x=null}}if("onloadend"in x?x.onloadend=p:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(p)},x.onabort=function(){x&&(f(s("Request aborted",o,"ECONNABORTED",x)),x=null)},x.onerror=function(){f(s("Network Error",o,null,x)),x=null},x.ontimeout=function(){var A="timeout of "+o.timeout+"ms exceeded";o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),f(s(A,o,o.transitional&&o.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",x)),x=null},e.isStandardBrowserEnv()){var b=(o.withCredentials||c(h))&&o.xsrfCookieName?t.read(o.xsrfCookieName):void 0;b&&(y[o.xsrfHeaderName]=b)}"setRequestHeader"in x&&e.forEach(y,function(A,E){typeof v>"u"&&E.toLowerCase()==="content-type"?delete y[E]:x.setRequestHeader(E,A)}),e.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),m&&m!=="json"&&(x.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&x.addEventListener("progress",o.onDownloadProgress),typeof o.onUploadProgress=="function"&&x.upload&&x.upload.addEventListener("progress",o.onUploadProgress),o.cancelToken&&o.cancelToken.promise.then(function(A){x&&(x.abort(),f(A),x=null)}),v||(v=null),x.send(v)})},Rn}var ve=$e,Q0=Og,Ng=gs,jg={"Content-Type":"application/x-www-form-urlencoded"};function ei(e,r){!ve.isUndefined(e)&&ve.isUndefined(e["Content-Type"])&&(e["Content-Type"]=r)}function Fg(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Z0()),e}function Hg(e,r,t){if(ve.isString(e))try{return(r||JSON.parse)(e),ve.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}var rn={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Fg(),transformRequest:[function(r,t){return Q0(t,"Accept"),Q0(t,"Content-Type"),ve.isFormData(r)||ve.isArrayBuffer(r)||ve.isBuffer(r)||ve.isStream(r)||ve.isFile(r)||ve.isBlob(r)?r:ve.isArrayBufferView(r)?r.buffer:ve.isURLSearchParams(r)?(ei(t,"application/x-www-form-urlencoded;charset=utf-8"),r.toString()):ve.isObject(r)||t&&t["Content-Type"]==="application/json"?(ei(t,"application/json"),Hg(r)):r}],transformResponse:[function(r){var t=this.transitional,n=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,i=!n&&this.responseType==="json";if(i||a&&ve.isString(r)&&r.length)try{return JSON.parse(r)}catch(c){if(i)throw c.name==="SyntaxError"?Ng(c,this,"E_JSON_PARSE"):c}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(r){return r>=200&&r<300}};rn.headers={common:{Accept:"application/json, text/plain, */*"}};ve.forEach(["delete","get","head"],function(r){rn.headers[r]={}});ve.forEach(["post","put","patch"],function(r){rn.headers[r]=ve.merge(jg)});var Ba=rn,qg=$e,Mg=Ba,Wg=function(r,t,n){var a=this||Mg;return qg.forEach(n,function(c){r=c.call(a,r,t)}),r},On,ri;function ys(){return ri||(ri=1,On=function(r){return!!(r&&r.__CANCEL__)}),On}var ti=$e,Pn=Wg,zg=ys(),Gg=Ba;function In(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Kg=function(r){In(r),r.headers=r.headers||{},r.data=Pn.call(r,r.data,r.headers,r.transformRequest),r.headers=ti.merge(r.headers.common||{},r.headers[r.method]||{},r.headers),ti.forEach(["delete","get","head","post","put","patch","common"],function(a){delete r.headers[a]});var t=r.adapter||Gg.adapter;return t(r).then(function(a){return In(r),a.data=Pn.call(r,a.data,a.headers,r.transformResponse),a},function(a){return zg(a)||(In(r),a&&a.response&&(a.response.data=Pn.call(r,a.response.data,a.response.headers,r.transformResponse))),Promise.reject(a)})},ye=$e,bs=function(r,t){t=t||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],c=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function d(f,v){return ye.isPlainObject(f)&&ye.isPlainObject(v)?ye.merge(f,v):ye.isPlainObject(v)?ye.merge({},v):ye.isArray(v)?v.slice():v}function o(f){ye.isUndefined(t[f])?ye.isUndefined(r[f])||(n[f]=d(void 0,r[f])):n[f]=d(r[f],t[f])}ye.forEach(a,function(v){ye.isUndefined(t[v])||(n[v]=d(void 0,t[v]))}),ye.forEach(i,o),ye.forEach(c,function(v){ye.isUndefined(t[v])?ye.isUndefined(r[v])||(n[v]=d(void 0,r[v])):n[v]=d(void 0,t[v])}),ye.forEach(s,function(v){v in t?n[v]=d(r[v],t[v]):v in r&&(n[v]=d(void 0,r[v]))});var l=a.concat(i).concat(c).concat(s),g=Object.keys(r).concat(Object.keys(t)).filter(function(v){return l.indexOf(v)===-1});return ye.forEach(g,o),n};const Yg="axios",Vg="0.21.4",Xg="Promise based HTTP client for the browser and node.js",Jg="index.js",Zg={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},Qg={type:"git",url:"https://github.com/axios/axios.git"},em=["xhr","http","ajax","promise","node"],rm="Matt Zabriskie",tm="MIT",nm={url:"https://github.com/axios/axios/issues"},am="https://axios-http.com",im={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},om={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},sm="dist/axios.min.js",cm="dist/axios.min.js",um="./index.d.ts",fm={"follow-redirects":"^1.14.0"},lm=[{path:"./dist/axios.min.js",threshold:"5kB"}],dm={name:Yg,version:Vg,description:Xg,main:Jg,scripts:Zg,repository:Qg,keywords:em,author:rm,license:tm,bugs:nm,homepage:am,devDependencies:im,browser:om,jsdelivr:sm,unpkg:cm,typings:um,dependencies:fm,bundlesize:lm};var _s=dm,ka={};["object","boolean","number","function","string","symbol"].forEach(function(e,r){ka[e]=function(n){return typeof n===e||"a"+(r<1?"n ":" ")+e}});var ni={},hm=_s.version.split(".");function Es(e,r){for(var t=r?r.split("."):hm,n=e.split("."),a=0;a<3;a++){if(t[a]>n[a])return!0;if(t[a]<n[a])return!1}return!1}ka.transitional=function(r,t,n){var a=t&&Es(t);function i(c,s){return"[Axios v"+_s.version+"] Transitional option '"+c+"'"+s+(n?". "+n:"")}return function(c,s,d){if(r===!1)throw new Error(i(s," has been removed in "+t));return a&&!ni[s]&&(ni[s]=!0,console.warn(i(s," has been deprecated since v"+t+" and will be removed in the near future"))),r?r(c,s,d):!0}};function vm(e,r,t){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),a=n.length;a-- >0;){var i=n[a],c=r[i];if(c){var s=e[i],d=s===void 0||c(s,i,e);if(d!==!0)throw new TypeError("option "+i+" must be "+d);continue}if(t!==!0)throw Error("Unknown option "+i)}}var xm={isOlderVersion:Es,assertOptions:vm,validators:ka},ws=$e,pm=ps,ai=Tg,ii=Kg,tn=bs,$s=xm,nr=$s.validators;function Nr(e){this.defaults=e,this.interceptors={request:new ai,response:new ai}}Nr.prototype.request=function(r){typeof r=="string"?(r=arguments[1]||{},r.url=arguments[0]):r=r||{},r=tn(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var t=r.transitional;t!==void 0&&$s.assertOptions(t,{silentJSONParsing:nr.transitional(nr.boolean,"1.0.0"),forcedJSONParsing:nr.transitional(nr.boolean,"1.0.0"),clarifyTimeoutError:nr.transitional(nr.boolean,"1.0.0")},!1);var n=[],a=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(a=a&&f.synchronous,n.unshift(f.fulfilled,f.rejected))});var i=[];this.interceptors.response.forEach(function(f){i.push(f.fulfilled,f.rejected)});var c;if(!a){var s=[ii,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(i),c=Promise.resolve(r);s.length;)c=c.then(s.shift(),s.shift());return c}for(var d=r;n.length;){var o=n.shift(),l=n.shift();try{d=o(d)}catch(g){l(g);break}}try{c=ii(d)}catch(g){return Promise.reject(g)}for(;i.length;)c=c.then(i.shift(),i.shift());return c};Nr.prototype.getUri=function(r){return r=tn(this.defaults,r),pm(r.url,r.params,r.paramsSerializer).replace(/^\?/,"")};ws.forEach(["delete","get","head","options"],function(r){Nr.prototype[r]=function(t,n){return this.request(tn(n||{},{method:r,url:t,data:(n||{}).data}))}});ws.forEach(["post","put","patch"],function(r){Nr.prototype[r]=function(t,n,a){return this.request(tn(a||{},{method:r,url:t,data:n}))}});var gm=Nr,Dn,oi;function As(){if(oi)return Dn;oi=1;function e(r){this.message=r}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,Dn=e,Dn}var Bn,si;function mm(){if(si)return Bn;si=1;var e=As();function r(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(c){n=c});var a=this;t(function(c){a.reason||(a.reason=new e(c),n(a.reason))})}return r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var n,a=new r(function(c){n=c});return{token:a,cancel:n}},Bn=r,Bn}var kn,ci;function ym(){return ci||(ci=1,kn=function(r){return function(n){return r.apply(null,n)}}),kn}var Ln,ui;function bm(){return ui||(ui=1,Ln=function(r){return typeof r=="object"&&r.isAxiosError===!0}),Ln}var fi=$e,_m=hs,Zr=gm,Em=bs,wm=Ba;function Cs(e){var r=new Zr(e),t=_m(Zr.prototype.request,r);return fi.extend(t,Zr.prototype,r),fi.extend(t,r),t}var Ie=Cs(wm);Ie.Axios=Zr;Ie.create=function(r){return Cs(Em(Ie.defaults,r))};Ie.Cancel=As();Ie.CancelToken=mm();Ie.isCancel=ys();Ie.all=function(r){return Promise.all(r)};Ie.spread=ym();Ie.isAxiosError=bm();fg.exports=Ie;it.default=Ie;(function(e){e.exports=it})(ug);const Pr=Io(la),$m=(e,r)=>{var t,n,a;return e&&((t=e==null?void 0:e.url)==null?void 0:t.length)>0&&(((n=e.url.find(i=>i.locale===r))==null?void 0:n.value)||((a=e.url.find(i=>i.locale==="*"))==null?void 0:a.value))||null},Am=(e,r)=>{var t,n;return((t=e==null?void 0:e.find)==null?void 0:t.call(e,a=>a.venue===r))||((n=e==null?void 0:e.find)==null?void 0:n.call(e,a=>a.venue==="*"))};function nn(e,r=600,t=!0,n,a){var C,u;if(!n||!a)throw new Error("baseUrl or tenant was not provided");const i=`${e}_${a}_${n}`,c=`${n.endsWith("/")?n.slice(0,-1):n}/cms-api/content/${a}/${e}`,s=((C=x())==null?void 0:C.value)||null,[d,o]=re.useState(((u=x())==null?void 0:u.timestamp)||0),[l,g]=re.useState(s||null),[f,v]=re.useState(!1);async function y(h){return Pr.get(c,{signal:h}).then(p=>{if(Aa(p.data))throw new Error(`CMS data '${e}' is an empty object`);es(p.data,l)||g(p.data),f&&v(!1),t&&m(p.data)}).catch(p=>{p.code!=="ERR_CANCELED"&&(console.error(p),v(!0))})}function m(h){const p=new Date().valueOf(),b=JSON.stringify({value:h,timestamp:p});localStorage.setItem(i,b),o(p)}function x(){try{const h=localStorage.getItem(i);if(h)return JSON.parse(h)}catch(h){console.warn(h)}return null}return re.useEffect(()=>{if(console.log("CMS ID",e),new Date().valueOf()-d>r*1e3){const p=new AbortController;return y(p.signal),()=>p.abort()}const h=x();if(h!=null&&h.value)g(h.value),o(h.timestamp);else{const p=new AbortController;return y(p.signal),()=>p.abort()}},[e]),zt(y,r*1e3),{value:l,isError:f,isLoading:!f&&!l}}function Cm({id:e,intervalSeconds:r,withLocalStorage:t}){const n=re.useContext(Br.ConfigContext);if(!n)throw new Error("Hook was used outside config context");return nn(e,r,t,n.baseUrl,n.tenant)}function Ss(e,r=600,t=!0,n,a,i){var s,d,o,l;if(!n||!a||!i)throw new Error("baseUrl, tenant or venue was not provided");const c=nn(e,r,t,n,a);return{value:((d=(s=c.value)==null?void 0:s.find)==null?void 0:d.call(s,g=>g.venue===i))||((l=(o=c.value)==null?void 0:o.find)==null?void 0:l.call(o,g=>g.venue==="*"))||null,isError:c.isError}}function Sm(e,r,t,n=300,a=!0){const i=re.useContext(Br.ConfigContext);if(!i)throw new Error("Hook was used outside config context");return Ts(e,r,t,n,a,i.baseUrl,i.tenant)}function Ts(e,r,t,n=300,a=!0,i,c){var g,f,v,y;if(!i||!c||!r)throw new Error("baseUrl, tenant or venue was not provided");const{value:s,isError:d}=Ss(e,n,a,i,c,r);let o=null,l=null;return s&&((g=s==null?void 0:s.url)==null?void 0:g.length)>0&&(o=((f=s.url.find(m=>m.locale===t))==null?void 0:f.value)||((v=s.url.find(m=>m.locale==="*"))==null?void 0:v.value)||null),!o&&s&&((y=s==null?void 0:s.url)==null?void 0:y.length)>0&&(l=s.url[0].value),{url:o,fallbackUrl:l,isError:d,mediaType:s==null?void 0:s.mediaType}}function Rs({kioskMediaId:e,kioskMediaType:r,intervalSeconds:t=600,withLocalStorage:n=!0,baseUrl:a,tenant:i,venue:c,locale:s}){var m;const{value:d,isError:o,isLoading:l}=nn(e,t,n,a,i),g=(d==null?void 0:d[r])||[],f=Am(g,c),v=$m(f,s),y=!v&&f&&((m=f==null?void 0:f.url)==null?void 0:m.length)>0?f.url[0].value:null;return{url:v,fallbackUrl:y,mediaType:f==null?void 0:f.mediaType,isError:o,isLoading:l,imageDisplayTime:f==null?void 0:f.imageDisplayTime}}function Tm({kioskMediaId:e,kioskMediaType:r,venue:t,intervalSeconds:n=600,withLocalStorage:a=!0}){const i=re.useContext(Br.ConfigContext);if(!i)throw new Error("Missing config context");const{i18n:{language:c}}=tc.useTranslation();return Rs({kioskMediaId:e,kioskMediaType:r,intervalSeconds:n,withLocalStorage:a,venue:t,baseUrl:i.baseUrl,tenant:i.tenant,locale:c})}function Rm(e,r){re.useEffect(()=>{const t=n=>{!e.current||e.current.contains(n.target)||r(n)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e,r])}function Om(e){const[r,t]=re.useState(Or(e==null?void 0:e.DINE_IN)),[n,a]=re.useState(Or(e==null?void 0:e.TAKE_AWAY));function i(){const c=Or(e==null?void 0:e.DINE_IN),s=Or(e==null?void 0:e.TAKE_AWAY);c!==r&&(console.log("dine in open changed",r,"=>",c),t(c)),s!==n&&(console.log("take away open changed",n,"=>",s),a(s))}return re.useEffect(()=>{i()},[e]),zt(i,6e4),{dineInOpen:r,takeAwayOpen:n,loaded:!!e}}var Ne={},Pm=e=>encodeURIComponent(e).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),Os="%[a-f0-9]{2}",li=new RegExp("("+Os+")|([^%]+?)","gi"),di=new RegExp("("+Os+")+","gi");function va(e,r){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;r=r||1;var t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],va(t),va(n))}function Im(e){try{return decodeURIComponent(e)}catch{for(var r=e.match(li)||[],t=1;t<r.length;t++)e=va(r,t).join(""),r=e.match(li)||[];return e}}function Dm(e){for(var r={"%FE%FF":"��","%FF%FE":"��"},t=di.exec(e);t;){try{r[t[0]]=decodeURIComponent(t[0])}catch{var n=Im(t[0]);n!==t[0]&&(r[t[0]]=n)}t=di.exec(e)}r["%C2"]="�";for(var a=Object.keys(r),i=0;i<a.length;i++){var c=a[i];e=e.replace(new RegExp(c,"g"),r[c])}return e}var Bm=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return Dm(e)}},km=(e,r)=>{if(!(typeof e=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r==="")return[e];const t=e.indexOf(r);return t===-1?[e]:[e.slice(0,t),e.slice(t+r.length)]},Lm=function(e,r){for(var t={},n=Object.keys(e),a=Array.isArray(r),i=0;i<n.length;i++){var c=n[i],s=e[c];(a?r.indexOf(c)!==-1:r(c,s,e))&&(t[c]=s)}return t};(function(e){const r=Pm,t=Bm,n=km,a=Lm,i=u=>u==null,c=Symbol("encodeFragmentIdentifier");function s(u){switch(u.arrayFormat){case"index":return h=>(p,b)=>{const _=p.length;return b===void 0||u.skipNull&&b===null||u.skipEmptyString&&b===""?p:b===null?[...p,[l(h,u),"[",_,"]"].join("")]:[...p,[l(h,u),"[",l(_,u),"]=",l(b,u)].join("")]};case"bracket":return h=>(p,b)=>b===void 0||u.skipNull&&b===null||u.skipEmptyString&&b===""?p:b===null?[...p,[l(h,u),"[]"].join("")]:[...p,[l(h,u),"[]=",l(b,u)].join("")];case"colon-list-separator":return h=>(p,b)=>b===void 0||u.skipNull&&b===null||u.skipEmptyString&&b===""?p:b===null?[...p,[l(h,u),":list="].join("")]:[...p,[l(h,u),":list=",l(b,u)].join("")];case"comma":case"separator":case"bracket-separator":{const h=u.arrayFormat==="bracket-separator"?"[]=":"=";return p=>(b,_)=>_===void 0||u.skipNull&&_===null||u.skipEmptyString&&_===""?b:(_=_===null?"":_,b.length===0?[[l(p,u),h,l(_,u)].join("")]:[[b,l(_,u)].join(u.arrayFormatSeparator)])}default:return h=>(p,b)=>b===void 0||u.skipNull&&b===null||u.skipEmptyString&&b===""?p:b===null?[...p,l(h,u)]:[...p,[l(h,u),"=",l(b,u)].join("")]}}function d(u){let h;switch(u.arrayFormat){case"index":return(p,b,_)=>{if(h=/\[(\d*)\]$/.exec(p),p=p.replace(/\[\d*\]$/,""),!h){_[p]=b;return}_[p]===void 0&&(_[p]={}),_[p][h[1]]=b};case"bracket":return(p,b,_)=>{if(h=/(\[\])$/.exec(p),p=p.replace(/\[\]$/,""),!h){_[p]=b;return}if(_[p]===void 0){_[p]=[b];return}_[p]=[].concat(_[p],b)};case"colon-list-separator":return(p,b,_)=>{if(h=/(:list)$/.exec(p),p=p.replace(/:list$/,""),!h){_[p]=b;return}if(_[p]===void 0){_[p]=[b];return}_[p]=[].concat(_[p],b)};case"comma":case"separator":return(p,b,_)=>{const A=typeof b=="string"&&b.includes(u.arrayFormatSeparator),E=typeof b=="string"&&!A&&g(b,u).includes(u.arrayFormatSeparator);b=E?g(b,u):b;const R=A||E?b.split(u.arrayFormatSeparator).map(w=>g(w,u)):b===null?b:g(b,u);_[p]=R};case"bracket-separator":return(p,b,_)=>{const A=/(\[\])$/.test(p);if(p=p.replace(/\[\]$/,""),!A){_[p]=b&&g(b,u);return}const E=b===null?[]:b.split(u.arrayFormatSeparator).map(R=>g(R,u));if(_[p]===void 0){_[p]=E;return}_[p]=[].concat(_[p],E)};default:return(p,b,_)=>{if(_[p]===void 0){_[p]=b;return}_[p]=[].concat(_[p],b)}}}function o(u){if(typeof u!="string"||u.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function l(u,h){return h.encode?h.strict?r(u):encodeURIComponent(u):u}function g(u,h){return h.decode?t(u):u}function f(u){return Array.isArray(u)?u.sort():typeof u=="object"?f(Object.keys(u)).sort((h,p)=>Number(h)-Number(p)).map(h=>u[h]):u}function v(u){const h=u.indexOf("#");return h!==-1&&(u=u.slice(0,h)),u}function y(u){let h="";const p=u.indexOf("#");return p!==-1&&(h=u.slice(p)),h}function m(u){u=v(u);const h=u.indexOf("?");return h===-1?"":u.slice(h+1)}function x(u,h){return h.parseNumbers&&!Number.isNaN(Number(u))&&typeof u=="string"&&u.trim()!==""?u=Number(u):h.parseBooleans&&u!==null&&(u.toLowerCase()==="true"||u.toLowerCase()==="false")&&(u=u.toLowerCase()==="true"),u}function C(u,h){h=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},h),o(h.arrayFormatSeparator);const p=d(h),b=Object.create(null);if(typeof u!="string"||(u=u.trim().replace(/^[?#&]/,""),!u))return b;for(const _ of u.split("&")){if(_==="")continue;let[A,E]=n(h.decode?_.replace(/\+/g," "):_,"=");E=E===void 0?null:["comma","separator","bracket-separator"].includes(h.arrayFormat)?E:g(E,h),p(g(A,h),E,b)}for(const _ of Object.keys(b)){const A=b[_];if(typeof A=="object"&&A!==null)for(const E of Object.keys(A))A[E]=x(A[E],h);else b[_]=x(A,h)}return h.sort===!1?b:(h.sort===!0?Object.keys(b).sort():Object.keys(b).sort(h.sort)).reduce((_,A)=>{const E=b[A];return E&&typeof E=="object"&&!Array.isArray(E)?_[A]=f(E):_[A]=E,_},Object.create(null))}e.extract=m,e.parse=C,e.stringify=(u,h)=>{if(!u)return"";h=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},h),o(h.arrayFormatSeparator);const p=E=>h.skipNull&&i(u[E])||h.skipEmptyString&&u[E]==="",b=s(h),_={};for(const E of Object.keys(u))p(E)||(_[E]=u[E]);const A=Object.keys(_);return h.sort!==!1&&A.sort(h.sort),A.map(E=>{const R=u[E];return R===void 0?"":R===null?l(E,h):Array.isArray(R)?R.length===0&&h.arrayFormat==="bracket-separator"?l(E,h)+"[]":R.reduce(b(E),[]).join("&"):l(E,h)+"="+l(R,h)}).filter(E=>E.length>0).join("&")},e.parseUrl=(u,h)=>{h=Object.assign({decode:!0},h);const[p,b]=n(u,"#");return Object.assign({url:p.split("?")[0]||"",query:C(m(u),h)},h&&h.parseFragmentIdentifier&&b?{fragmentIdentifier:g(b,h)}:{})},e.stringifyUrl=(u,h)=>{h=Object.assign({encode:!0,strict:!0,[c]:!0},h);const p=v(u.url).split("?")[0]||"",b=e.extract(u.url),_=e.parse(b,{sort:!1}),A=Object.assign(_,u.query);let E=e.stringify(A,h);E&&(E=`?${E}`);let R=y(u.url);return u.fragmentIdentifier&&(R=`#${h[c]?l(u.fragmentIdentifier,h):u.fragmentIdentifier}`),`${p}${E}${R}`},e.pick=(u,h,p)=>{p=Object.assign({parseFragmentIdentifier:!0,[c]:!1},p);const{url:b,query:_,fragmentIdentifier:A}=e.parseUrl(u,p);return e.stringifyUrl({url:b,query:a(_,h),fragmentIdentifier:A},p)},e.exclude=(u,h,p)=>{const b=Array.isArray(h)?_=>!h.includes(_):(_,A)=>!h(_,A);return e.pick(u,b,p)}})(Ne);const Um=[".png",".jpg",".jpeg",".webp",".bmp",".tiff"];function Ps(e,r=500){const t=Ne.parseUrl(e);if(!(e.startsWith("https://orderingstackmedia.blob.core.windows.net/pictures")||e.startsWith("https://orderingstack-mmedia-tools.azurewebsites.net/api/img/")))return e;const n=t.url.substring(t.url.lastIndexOf("."));return Um.includes(n)?Ne.stringifyUrl({url:t.url.replace("https://orderingstackmedia.blob.core.windows.net/pictures/","https://orderingstack-mmedia-tools.azurewebsites.net/api/img/"),query:{...t.query,w:r}}):e}function Nm(e,r=500){return Ps(e,r)}var Ge={},jm={get exports(){return Ge},set exports(e){Ge=e}};function Fm(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ot={},Hm={get exports(){return ot},set exports(e){ot=e}};const qm={},Mm=Object.freeze(Object.defineProperty({__proto__:null,default:qm},Symbol.toStringTag,{value:"Module"})),Wm=nc(Mm);var hi;function Q(){return hi||(hi=1,function(e,r){(function(t,n){e.exports=n()})(K,function(){var t=t||function(n,a){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof K<"u"&&K.crypto&&(i=K.crypto),!i&&typeof Fm=="function")try{i=Wm}catch{}var c=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function u(){}return function(h){var p;return u.prototype=h,p=new u,u.prototype=null,p}}(),d={},o=d.lib={},l=o.Base=function(){return{extend:function(u){var h=s(this);return u&&h.mixIn(u),(!h.hasOwnProperty("init")||this.init===h.init)&&(h.init=function(){h.$super.init.apply(this,arguments)}),h.init.prototype=h,h.$super=this,h},create:function(){var u=this.extend();return u.init.apply(u,arguments),u},init:function(){},mixIn:function(u){for(var h in u)u.hasOwnProperty(h)&&(this[h]=u[h]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=o.WordArray=l.extend({init:function(u,h){u=this.words=u||[],h!=a?this.sigBytes=h:this.sigBytes=u.length*4},toString:function(u){return(u||v).stringify(this)},concat:function(u){var h=this.words,p=u.words,b=this.sigBytes,_=u.sigBytes;if(this.clamp(),b%4)for(var A=0;A<_;A++){var E=p[A>>>2]>>>24-A%4*8&255;h[b+A>>>2]|=E<<24-(b+A)%4*8}else for(var R=0;R<_;R+=4)h[b+R>>>2]=p[R>>>2];return this.sigBytes+=_,this},clamp:function(){var u=this.words,h=this.sigBytes;u[h>>>2]&=4294967295<<32-h%4*8,u.length=n.ceil(h/4)},clone:function(){var u=l.clone.call(this);return u.words=this.words.slice(0),u},random:function(u){for(var h=[],p=0;p<u;p+=4)h.push(c());return new g.init(h,u)}}),f=d.enc={},v=f.Hex={stringify:function(u){for(var h=u.words,p=u.sigBytes,b=[],_=0;_<p;_++){var A=h[_>>>2]>>>24-_%4*8&255;b.push((A>>>4).toString(16)),b.push((A&15).toString(16))}return b.join("")},parse:function(u){for(var h=u.length,p=[],b=0;b<h;b+=2)p[b>>>3]|=parseInt(u.substr(b,2),16)<<24-b%8*4;return new g.init(p,h/2)}},y=f.Latin1={stringify:function(u){for(var h=u.words,p=u.sigBytes,b=[],_=0;_<p;_++){var A=h[_>>>2]>>>24-_%4*8&255;b.push(String.fromCharCode(A))}return b.join("")},parse:function(u){for(var h=u.length,p=[],b=0;b<h;b++)p[b>>>2]|=(u.charCodeAt(b)&255)<<24-b%4*8;return new g.init(p,h)}},m=f.Utf8={stringify:function(u){try{return decodeURIComponent(escape(y.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(u){return y.parse(unescape(encodeURIComponent(u)))}},x=o.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(u){typeof u=="string"&&(u=m.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},_process:function(u){var h,p=this._data,b=p.words,_=p.sigBytes,A=this.blockSize,E=A*4,R=_/E;u?R=n.ceil(R):R=n.max((R|0)-this._minBufferSize,0);var w=R*A,S=n.min(w*4,_);if(w){for(var B=0;B<w;B+=A)this._doProcessBlock(b,B);h=b.splice(0,w),p.sigBytes-=S}return new g.init(h,S)},clone:function(){var u=l.clone.call(this);return u._data=this._data.clone(),u},_minBufferSize:0});o.Hasher=x.extend({cfg:l.extend(),init:function(u){this.cfg=this.cfg.extend(u),this.reset()},reset:function(){x.reset.call(this),this._doReset()},update:function(u){return this._append(u),this._process(),this},finalize:function(u){u&&this._append(u);var h=this._doFinalize();return h},blockSize:16,_createHelper:function(u){return function(h,p){return new u.init(p).finalize(h)}},_createHmacHelper:function(u){return function(h,p){return new C.HMAC.init(u,p).finalize(h)}}});var C=d.algo={};return d}(Math);return t})}(Hm)),ot}var st={},zm={get exports(){return st},set exports(e){st=e}},vi;function an(){return vi||(vi=1,function(e,r){(function(t,n){e.exports=n(Q())})(K,function(t){return function(n){var a=t,i=a.lib,c=i.Base,s=i.WordArray,d=a.x64={};d.Word=c.extend({init:function(o,l){this.high=o,this.low=l}}),d.WordArray=c.extend({init:function(o,l){o=this.words=o||[],l!=n?this.sigBytes=l:this.sigBytes=o.length*8},toX32:function(){for(var o=this.words,l=o.length,g=[],f=0;f<l;f++){var v=o[f];g.push(v.high),g.push(v.low)}return s.create(g,this.sigBytes)},clone:function(){for(var o=c.clone.call(this),l=o.words=this.words.slice(0),g=l.length,f=0;f<g;f++)l[f]=l[f].clone();return o}})}(),t})}(zm)),st}var ct={},Gm={get exports(){return ct},set exports(e){ct=e}},xi;function Km(){return xi||(xi=1,function(e,r){(function(t,n){e.exports=n(Q())})(K,function(t){return function(){if(typeof ArrayBuffer=="function"){var n=t,a=n.lib,i=a.WordArray,c=i.init,s=i.init=function(d){if(d instanceof ArrayBuffer&&(d=new Uint8Array(d)),(d instanceof Int8Array||typeof Uint8ClampedArray<"u"&&d instanceof Uint8ClampedArray||d instanceof Int16Array||d instanceof Uint16Array||d instanceof Int32Array||d instanceof Uint32Array||d instanceof Float32Array||d instanceof Float64Array)&&(d=new Uint8Array(d.buffer,d.byteOffset,d.byteLength)),d instanceof Uint8Array){for(var o=d.byteLength,l=[],g=0;g<o;g++)l[g>>>2]|=d[g]<<24-g%4*8;c.call(this,l,o)}else c.apply(this,arguments)};s.prototype=i}}(),t.lib.WordArray})}(Gm)),ct}var ut={},Ym={get exports(){return ut},set exports(e){ut=e}},pi;function Vm(){return pi||(pi=1,function(e,r){(function(t,n){e.exports=n(Q())})(K,function(t){return function(){var n=t,a=n.lib,i=a.WordArray,c=n.enc;c.Utf16=c.Utf16BE={stringify:function(d){for(var o=d.words,l=d.sigBytes,g=[],f=0;f<l;f+=2){var v=o[f>>>2]>>>16-f%4*8&65535;g.push(String.fromCharCode(v))}return g.join("")},parse:function(d){for(var o=d.length,l=[],g=0;g<o;g++)l[g>>>1]|=d.charCodeAt(g)<<16-g%2*16;return i.create(l,o*2)}},c.Utf16LE={stringify:function(d){for(var o=d.words,l=d.sigBytes,g=[],f=0;f<l;f+=2){var v=s(o[f>>>2]>>>16-f%4*8&65535);g.push(String.fromCharCode(v))}return g.join("")},parse:function(d){for(var o=d.length,l=[],g=0;g<o;g++)l[g>>>1]|=s(d.charCodeAt(g)<<16-g%2*16);return i.create(l,o*2)}};function s(d){return d<<8&4278255360|d>>>8&16711935}}(),t.enc.Utf16})}(Ym)),ut}var ft={},Xm={get exports(){return ft},set exports(e){ft=e}},gi;function pr(){return gi||(gi=1,function(e,r){(function(t,n){e.exports=n(Q())})(K,function(t){return function(){var n=t,a=n.lib,i=a.WordArray,c=n.enc;c.Base64={stringify:function(d){var o=d.words,l=d.sigBytes,g=this._map;d.clamp();for(var f=[],v=0;v<l;v+=3)for(var y=o[v>>>2]>>>24-v%4*8&255,m=o[v+1>>>2]>>>24-(v+1)%4*8&255,x=o[v+2>>>2]>>>24-(v+2)%4*8&255,C=y<<16|m<<8|x,u=0;u<4&&v+u*.75<l;u++)f.push(g.charAt(C>>>6*(3-u)&63));var h=g.charAt(64);if(h)for(;f.length%4;)f.push(h);return f.join("")},parse:function(d){var o=d.length,l=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var f=0;f<l.length;f++)g[l.charCodeAt(f)]=f}var v=l.charAt(64);if(v){var y=d.indexOf(v);y!==-1&&(o=y)}return s(d,o,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(d,o,l){for(var g=[],f=0,v=0;v<o;v++)if(v%4){var y=l[d.charCodeAt(v-1)]<<v%4*2,m=l[d.charCodeAt(v)]>>>6-v%4*2,x=y|m;g[f>>>2]|=x<<24-f%4*8,f++}return i.create(g,f)}}(),t.enc.Base64})}(Xm)),ft}var lt={},Jm={get exports(){return lt},set exports(e){lt=e}},mi;function Zm(){return mi||(mi=1,function(e,r){(function(t,n){e.exports=n(Q())})(K,function(t){return function(){var n=t,a=n.lib,i=a.WordArray,c=n.enc;c.Base64url={stringify:function(d,o=!0){var l=d.words,g=d.sigBytes,f=o?this._safe_map:this._map;d.clamp();for(var v=[],y=0;y<g;y+=3)for(var m=l[y>>>2]>>>24-y%4*8&255,x=l[y+1>>>2]>>>24-(y+1)%4*8&255,C=l[y+2>>>2]>>>24-(y+2)%4*8&255,u=m<<16|x<<8|C,h=0;h<4&&y+h*.75<g;h++)v.push(f.charAt(u>>>6*(3-h)&63));var p=f.charAt(64);if(p)for(;v.length%4;)v.push(p);return v.join("")},parse:function(d,o=!0){var l=d.length,g=o?this._safe_map:this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var v=0;v<g.length;v++)f[g.charCodeAt(v)]=v}var y=g.charAt(64);if(y){var m=d.indexOf(y);m!==-1&&(l=m)}return s(d,l,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function s(d,o,l){for(var g=[],f=0,v=0;v<o;v++)if(v%4){var y=l[d.charCodeAt(v-1)]<<v%4*2,m=l[d.charCodeAt(v)]>>>6-v%4*2,x=y|m;g[f>>>2]|=x<<24-f%4*8,f++}return i.create(g,f)}}(),t.enc.Base64url})}(Jm)),lt}var dt={},Qm={get exports(){return dt},set exports(e){dt=e}},yi;function gr(){return yi||(yi=1,function(e,r){(function(t,n){e.exports=n(Q())})(K,function(t){return function(n){var a=t,i=a.lib,c=i.WordArray,s=i.Hasher,d=a.algo,o=[];(function(){for(var m=0;m<64;m++)o[m]=n.abs(n.sin(m+1))*4294967296|0})();var l=d.MD5=s.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,x){for(var C=0;C<16;C++){var u=x+C,h=m[u];m[u]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360}var p=this._hash.words,b=m[x+0],_=m[x+1],A=m[x+2],E=m[x+3],R=m[x+4],w=m[x+5],S=m[x+6],B=m[x+7],T=m[x+8],P=m[x+9],I=m[x+10],N=m[x+11],U=m[x+12],F=m[x+13],q=m[x+14],H=m[x+15],O=p[0],D=p[1],k=p[2],L=p[3];O=g(O,D,k,L,b,7,o[0]),L=g(L,O,D,k,_,12,o[1]),k=g(k,L,O,D,A,17,o[2]),D=g(D,k,L,O,E,22,o[3]),O=g(O,D,k,L,R,7,o[4]),L=g(L,O,D,k,w,12,o[5]),k=g(k,L,O,D,S,17,o[6]),D=g(D,k,L,O,B,22,o[7]),O=g(O,D,k,L,T,7,o[8]),L=g(L,O,D,k,P,12,o[9]),k=g(k,L,O,D,I,17,o[10]),D=g(D,k,L,O,N,22,o[11]),O=g(O,D,k,L,U,7,o[12]),L=g(L,O,D,k,F,12,o[13]),k=g(k,L,O,D,q,17,o[14]),D=g(D,k,L,O,H,22,o[15]),O=f(O,D,k,L,_,5,o[16]),L=f(L,O,D,k,S,9,o[17]),k=f(k,L,O,D,N,14,o[18]),D=f(D,k,L,O,b,20,o[19]),O=f(O,D,k,L,w,5,o[20]),L=f(L,O,D,k,I,9,o[21]),k=f(k,L,O,D,H,14,o[22]),D=f(D,k,L,O,R,20,o[23]),O=f(O,D,k,L,P,5,o[24]),L=f(L,O,D,k,q,9,o[25]),k=f(k,L,O,D,E,14,o[26]),D=f(D,k,L,O,T,20,o[27]),O=f(O,D,k,L,F,5,o[28]),L=f(L,O,D,k,A,9,o[29]),k=f(k,L,O,D,B,14,o[30]),D=f(D,k,L,O,U,20,o[31]),O=v(O,D,k,L,w,4,o[32]),L=v(L,O,D,k,T,11,o[33]),k=v(k,L,O,D,N,16,o[34]),D=v(D,k,L,O,q,23,o[35]),O=v(O,D,k,L,_,4,o[36]),L=v(L,O,D,k,R,11,o[37]),k=v(k,L,O,D,B,16,o[38]),D=v(D,k,L,O,I,23,o[39]),O=v(O,D,k,L,F,4,o[40]),L=v(L,O,D,k,b,11,o[41]),k=v(k,L,O,D,E,16,o[42]),D=v(D,k,L,O,S,23,o[43]),O=v(O,D,k,L,P,4,o[44]),L=v(L,O,D,k,U,11,o[45]),k=v(k,L,O,D,H,16,o[46]),D=v(D,k,L,O,A,23,o[47]),O=y(O,D,k,L,b,6,o[48]),L=y(L,O,D,k,B,10,o[49]),k=y(k,L,O,D,q,15,o[50]),D=y(D,k,L,O,w,21,o[51]),O=y(O,D,k,L,U,6,o[52]),L=y(L,O,D,k,E,10,o[53]),k=y(k,L,O,D,I,15,o[54]),D=y(D,k,L,O,_,21,o[55]),O=y(O,D,k,L,T,6,o[56]),L=y(L,O,D,k,H,10,o[57]),k=y(k,L,O,D,S,15,o[58]),D=y(D,k,L,O,F,21,o[59]),O=y(O,D,k,L,R,6,o[60]),L=y(L,O,D,k,N,10,o[61]),k=y(k,L,O,D,A,15,o[62]),D=y(D,k,L,O,P,21,o[63]),p[0]=p[0]+O|0,p[1]=p[1]+D|0,p[2]=p[2]+k|0,p[3]=p[3]+L|0},_doFinalize:function(){var m=this._data,x=m.words,C=this._nDataBytes*8,u=m.sigBytes*8;x[u>>>5]|=128<<24-u%32;var h=n.floor(C/4294967296),p=C;x[(u+64>>>9<<4)+15]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,x[(u+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,m.sigBytes=(x.length+1)*4,this._process();for(var b=this._hash,_=b.words,A=0;A<4;A++){var E=_[A];_[A]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return b},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});function g(m,x,C,u,h,p,b){var _=m+(x&C|~x&u)+h+b;return(_<<p|_>>>32-p)+x}function f(m,x,C,u,h,p,b){var _=m+(x&u|C&~u)+h+b;return(_<<p|_>>>32-p)+x}function v(m,x,C,u,h,p,b){var _=m+(x^C^u)+h+b;return(_<<p|_>>>32-p)+x}function y(m,x,C,u,h,p,b){var _=m+(C^(x|~u))+h+b;return(_<<p|_>>>32-p)+x}a.MD5=s._createHelper(l),a.HmacMD5=s._createHmacHelper(l)}(Math),t.MD5})}(Qm)),dt}var ht={},ey={get exports(){return ht},set exports(e){ht=e}},bi;function La(){return bi||(bi=1,function(e,r){(function(t,n){e.exports=n(Q())})(K,function(t){return function(){var n=t,a=n.lib,i=a.WordArray,c=a.Hasher,s=n.algo,d=[],o=s.SHA1=c.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,g){for(var f=this._hash.words,v=f[0],y=f[1],m=f[2],x=f[3],C=f[4],u=0;u<80;u++){if(u<16)d[u]=l[g+u]|0;else{var h=d[u-3]^d[u-8]^d[u-14]^d[u-16];d[u]=h<<1|h>>>31}var p=(v<<5|v>>>27)+C+d[u];u<20?p+=(y&m|~y&x)+1518500249:u<40?p+=(y^m^x)+1859775393:u<60?p+=(y&m|y&x|m&x)-1894007588:p+=(y^m^x)-899497514,C=x,x=m,m=y<<30|y>>>2,y=v,v=p}f[0]=f[0]+v|0,f[1]=f[1]+y|0,f[2]=f[2]+m|0,f[3]=f[3]+x|0,f[4]=f[4]+C|0},_doFinalize:function(){var l=this._data,g=l.words,f=this._nDataBytes*8,v=l.sigBytes*8;return g[v>>>5]|=128<<24-v%32,g[(v+64>>>9<<4)+14]=Math.floor(f/4294967296),g[(v+64>>>9<<4)+15]=f,l.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var l=c.clone.call(this);return l._hash=this._hash.clone(),l}});n.SHA1=c._createHelper(o),n.HmacSHA1=c._createHmacHelper(o)}(),t.SHA1})}(ey)),ht}var vt={},ry={get exports(){return vt},set exports(e){vt=e}},_i;function Is(){return _i||(_i=1,function(e,r){(function(t,n){e.exports=n(Q())})(K,function(t){return function(n){var a=t,i=a.lib,c=i.WordArray,s=i.Hasher,d=a.algo,o=[],l=[];(function(){function v(C){for(var u=n.sqrt(C),h=2;h<=u;h++)if(!(C%h))return!1;return!0}function y(C){return(C-(C|0))*4294967296|0}for(var m=2,x=0;x<64;)v(m)&&(x<8&&(o[x]=y(n.pow(m,1/2))),l[x]=y(n.pow(m,1/3)),x++),m++})();var g=[],f=d.SHA256=s.extend({_doReset:function(){this._hash=new c.init(o.slice(0))},_doProcessBlock:function(v,y){for(var m=this._hash.words,x=m[0],C=m[1],u=m[2],h=m[3],p=m[4],b=m[5],_=m[6],A=m[7],E=0;E<64;E++){if(E<16)g[E]=v[y+E]|0;else{var R=g[E-15],w=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,S=g[E-2],B=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;g[E]=w+g[E-7]+B+g[E-16]}var T=p&b^~p&_,P=x&C^x&u^C&u,I=(x<<30|x>>>2)^(x<<19|x>>>13)^(x<<10|x>>>22),N=(p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25),U=A+N+T+l[E]+g[E],F=I+P;A=_,_=b,b=p,p=h+U|0,h=u,u=C,C=x,x=U+F|0}m[0]=m[0]+x|0,m[1]=m[1]+C|0,m[2]=m[2]+u|0,m[3]=m[3]+h|0,m[4]=m[4]+p|0,m[5]=m[5]+b|0,m[6]=m[6]+_|0,m[7]=m[7]+A|0},_doFinalize:function(){var v=this._data,y=v.words,m=this._nDataBytes*8,x=v.sigBytes*8;return y[x>>>5]|=128<<24-x%32,y[(x+64>>>9<<4)+14]=n.floor(m/4294967296),y[(x+64>>>9<<4)+15]=m,v.sigBytes=y.length*4,this._process(),this._hash},clone:function(){var v=s.clone.call(this);return v._hash=this._hash.clone(),v}});a.SHA256=s._createHelper(f),a.HmacSHA256=s._createHmacHelper(f)}(Math),t.SHA256})}(ry)),vt}var xt={},ty={get exports(){return xt},set exports(e){xt=e}},Ei;function ny(){return Ei||(Ei=1,function(e,r){(function(t,n,a){e.exports=n(Q(),Is())})(K,function(t){return function(){var n=t,a=n.lib,i=a.WordArray,c=n.algo,s=c.SHA256,d=c.SHA224=s.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var o=s._doFinalize.call(this);return o.sigBytes-=4,o}});n.SHA224=s._createHelper(d),n.HmacSHA224=s._createHmacHelper(d)}(),t.SHA224})}(ty)),xt}var pt={},ay={get exports(){return pt},set exports(e){pt=e}},wi;function Ds(){return wi||(wi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),an())})(K,function(t){return function(){var n=t,a=n.lib,i=a.Hasher,c=n.x64,s=c.Word,d=c.WordArray,o=n.algo;function l(){return s.create.apply(s,arguments)}var g=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],f=[];(function(){for(var y=0;y<80;y++)f[y]=l()})();var v=o.SHA512=i.extend({_doReset:function(){this._hash=new d.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(y,m){for(var x=this._hash.words,C=x[0],u=x[1],h=x[2],p=x[3],b=x[4],_=x[5],A=x[6],E=x[7],R=C.high,w=C.low,S=u.high,B=u.low,T=h.high,P=h.low,I=p.high,N=p.low,U=b.high,F=b.low,q=_.high,H=_.low,O=A.high,D=A.low,k=E.high,L=E.low,z=R,Y=w,te=S,W=B,J=T,V=P,de=I,ce=N,he=U,ge=F,Ce=q,Re=H,Be=O,Oe=D,Se=k,ae=L,ee=0;ee<80;ee++){var le,ke,Qe=f[ee];if(ee<16)ke=Qe.high=y[m+ee*2]|0,le=Qe.low=y[m+ee*2+1]|0;else{var yr=f[ee-15],Fe=yr.high,Pe=yr.low,fn=(Fe>>>1|Pe<<31)^(Fe>>>8|Pe<<24)^Fe>>>7,br=(Pe>>>1|Fe<<31)^(Pe>>>8|Fe<<24)^(Pe>>>7|Fe<<25),_r=f[ee-2],Le=_r.high,We=_r.low,ln=(Le>>>19|We<<13)^(Le<<3|We>>>29)^Le>>>6,Hr=(We>>>19|Le<<13)^(We<<3|Le>>>29)^(We>>>6|Le<<26),qr=f[ee-7],dn=qr.high,hn=qr.low,Mr=f[ee-16],Er=Mr.high,wr=Mr.low;le=br+hn,ke=fn+dn+(le>>>0<br>>>0?1:0),le=le+Hr,ke=ke+ln+(le>>>0<Hr>>>0?1:0),le=le+wr,ke=ke+Er+(le>>>0<wr>>>0?1:0),Qe.high=ke,Qe.low=le}var qe=he&Ce^~he&Be,er=ge&Re^~ge&Oe,$r=z&te^z&J^te&J,Wr=Y&W^Y&V^W&V,vn=(z>>>28|Y<<4)^(z<<30|Y>>>2)^(z<<25|Y>>>7),Ar=(Y>>>28|z<<4)^(Y<<30|z>>>2)^(Y<<25|z>>>7),xn=(he>>>14|ge<<18)^(he>>>18|ge<<14)^(he<<23|ge>>>9),zr=(ge>>>14|he<<18)^(ge>>>18|he<<14)^(ge<<23|he>>>9),Cr=g[ee],pn=Cr.high,Gr=Cr.low,me=ae+zr,Ue=Se+xn+(me>>>0<ae>>>0?1:0),me=me+er,Ue=Ue+qe+(me>>>0<er>>>0?1:0),me=me+Gr,Ue=Ue+pn+(me>>>0<Gr>>>0?1:0),me=me+le,Ue=Ue+ke+(me>>>0<le>>>0?1:0),Kr=Ar+Wr,gn=vn+$r+(Kr>>>0<Ar>>>0?1:0);Se=Be,ae=Oe,Be=Ce,Oe=Re,Ce=he,Re=ge,ge=ce+me|0,he=de+Ue+(ge>>>0<ce>>>0?1:0)|0,de=J,ce=V,J=te,V=W,te=z,W=Y,Y=me+Kr|0,z=Ue+gn+(Y>>>0<me>>>0?1:0)|0}w=C.low=w+Y,C.high=R+z+(w>>>0<Y>>>0?1:0),B=u.low=B+W,u.high=S+te+(B>>>0<W>>>0?1:0),P=h.low=P+V,h.high=T+J+(P>>>0<V>>>0?1:0),N=p.low=N+ce,p.high=I+de+(N>>>0<ce>>>0?1:0),F=b.low=F+ge,b.high=U+he+(F>>>0<ge>>>0?1:0),H=_.low=H+Re,_.high=q+Ce+(H>>>0<Re>>>0?1:0),D=A.low=D+Oe,A.high=O+Be+(D>>>0<Oe>>>0?1:0),L=E.low=L+ae,E.high=k+Se+(L>>>0<ae>>>0?1:0)},_doFinalize:function(){var y=this._data,m=y.words,x=this._nDataBytes*8,C=y.sigBytes*8;m[C>>>5]|=128<<24-C%32,m[(C+128>>>10<<5)+30]=Math.floor(x/4294967296),m[(C+128>>>10<<5)+31]=x,y.sigBytes=m.length*4,this._process();var u=this._hash.toX32();return u},clone:function(){var y=i.clone.call(this);return y._hash=this._hash.clone(),y},blockSize:1024/32});n.SHA512=i._createHelper(v),n.HmacSHA512=i._createHmacHelper(v)}(),t.SHA512})}(ay)),pt}var gt={},iy={get exports(){return gt},set exports(e){gt=e}},$i;function oy(){return $i||($i=1,function(e,r){(function(t,n,a){e.exports=n(Q(),an(),Ds())})(K,function(t){return function(){var n=t,a=n.x64,i=a.Word,c=a.WordArray,s=n.algo,d=s.SHA512,o=s.SHA384=d.extend({_doReset:function(){this._hash=new c.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var l=d._doFinalize.call(this);return l.sigBytes-=16,l}});n.SHA384=d._createHelper(o),n.HmacSHA384=d._createHmacHelper(o)}(),t.SHA384})}(iy)),gt}var mt={},sy={get exports(){return mt},set exports(e){mt=e}},Ai;function cy(){return Ai||(Ai=1,function(e,r){(function(t,n,a){e.exports=n(Q(),an())})(K,function(t){return function(n){var a=t,i=a.lib,c=i.WordArray,s=i.Hasher,d=a.x64,o=d.Word,l=a.algo,g=[],f=[],v=[];(function(){for(var x=1,C=0,u=0;u<24;u++){g[x+5*C]=(u+1)*(u+2)/2%64;var h=C%5,p=(2*x+3*C)%5;x=h,C=p}for(var x=0;x<5;x++)for(var C=0;C<5;C++)f[x+5*C]=C+(2*x+3*C)%5*5;for(var b=1,_=0;_<24;_++){for(var A=0,E=0,R=0;R<7;R++){if(b&1){var w=(1<<R)-1;w<32?E^=1<<w:A^=1<<w-32}b&128?b=b<<1^113:b<<=1}v[_]=o.create(A,E)}})();var y=[];(function(){for(var x=0;x<25;x++)y[x]=o.create()})();var m=l.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var x=this._state=[],C=0;C<25;C++)x[C]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(x,C){for(var u=this._state,h=this.blockSize/2,p=0;p<h;p++){var b=x[C+2*p],_=x[C+2*p+1];b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360;var A=u[p];A.high^=_,A.low^=b}for(var E=0;E<24;E++){for(var R=0;R<5;R++){for(var w=0,S=0,B=0;B<5;B++){var A=u[R+5*B];w^=A.high,S^=A.low}var T=y[R];T.high=w,T.low=S}for(var R=0;R<5;R++)for(var P=y[(R+4)%5],I=y[(R+1)%5],N=I.high,U=I.low,w=P.high^(N<<1|U>>>31),S=P.low^(U<<1|N>>>31),B=0;B<5;B++){var A=u[R+5*B];A.high^=w,A.low^=S}for(var F=1;F<25;F++){var w,S,A=u[F],q=A.high,H=A.low,O=g[F];O<32?(w=q<<O|H>>>32-O,S=H<<O|q>>>32-O):(w=H<<O-32|q>>>64-O,S=q<<O-32|H>>>64-O);var D=y[f[F]];D.high=w,D.low=S}var k=y[0],L=u[0];k.high=L.high,k.low=L.low;for(var R=0;R<5;R++)for(var B=0;B<5;B++){var F=R+5*B,A=u[F],z=y[F],Y=y[(R+1)%5+5*B],te=y[(R+2)%5+5*B];A.high=z.high^~Y.high&te.high,A.low=z.low^~Y.low&te.low}var A=u[0],W=v[E];A.high^=W.high,A.low^=W.low}},_doFinalize:function(){var x=this._data,C=x.words;this._nDataBytes*8;var u=x.sigBytes*8,h=this.blockSize*32;C[u>>>5]|=1<<24-u%32,C[(n.ceil((u+1)/h)*h>>>5)-1]|=128,x.sigBytes=C.length*4,this._process();for(var p=this._state,b=this.cfg.outputLength/8,_=b/8,A=[],E=0;E<_;E++){var R=p[E],w=R.high,S=R.low;w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,A.push(S),A.push(w)}return new c.init(A,b)},clone:function(){for(var x=s.clone.call(this),C=x._state=this._state.slice(0),u=0;u<25;u++)C[u]=C[u].clone();return x}});a.SHA3=s._createHelper(m),a.HmacSHA3=s._createHmacHelper(m)}(Math),t.SHA3})}(sy)),mt}var yt={},uy={get exports(){return yt},set exports(e){yt=e}},Ci;function fy(){return Ci||(Ci=1,function(e,r){(function(t,n){e.exports=n(Q())})(K,function(t){/** @preserve
3
3
  (c) 2012 by Cédric Mesnil. All rights reserved.
4
4
 
@@ -12,8 +12,8 @@
12
12
  * Counter block mode compatible with Dr Brian Gladman fileenc.c
13
13
  * derived from CryptoJS.mode.CTR
14
14
  * Jan Hruby jhruby.web@gmail.com
15
- */return t.mode.CTRGladman=function(){var n=t.lib.BlockCipherMode.extend();function a(s){if((s>>24&255)===255){var d=s>>16&255,o=s>>8&255,l=s&255;d===255?(d=0,o===255?(o=0,l===255?l=0:++l):++o):++d,s=0,s+=d<<16,s+=o<<8,s+=l}else s+=1<<24;return s}function i(s){return(s[0]=a(s[0]))===0&&(s[1]=a(s[1])),s}var c=n.Encryptor=n.extend({processBlock:function(s,d){var o=this._cipher,l=o.blockSize,g=this._iv,f=this._counter;g&&(f=this._counter=g.slice(0),this._iv=void 0),i(f);var v=f.slice(0);o.encryptBlock(v,0);for(var y=0;y<l;y++)s[d+y]^=v[y]}});return n.Decryptor=c,n}(),t.mode.CTRGladman})}(by)),Ct}var St={},Ey={get exports(){return St},set exports(e){St=e}},Bi;function wy(){return Bi||(Bi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.mode.OFB=function(){var n=t.lib.BlockCipherMode.extend(),a=n.Encryptor=n.extend({processBlock:function(i,c){var s=this._cipher,d=s.blockSize,o=this._iv,l=this._keystream;o&&(l=this._keystream=o.slice(0),this._iv=void 0),s.encryptBlock(l,0);for(var g=0;g<d;g++)i[c+g]^=l[g]}});return n.Decryptor=a,n}(),t.mode.OFB})}(Ey)),St}var Tt={},$y={get exports(){return Tt},set exports(e){Tt=e}},ki;function Ay(){return ki||(ki=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.mode.ECB=function(){var n=t.lib.BlockCipherMode.extend();return n.Encryptor=n.extend({processBlock:function(a,i){this._cipher.encryptBlock(a,i)}}),n.Decryptor=n.extend({processBlock:function(a,i){this._cipher.decryptBlock(a,i)}}),n}(),t.mode.ECB})}($y)),Tt}var Rt={},Cy={get exports(){return Rt},set exports(e){Rt=e}},Li;function Sy(){return Li||(Li=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.pad.AnsiX923={pad:function(n,a){var i=n.sigBytes,c=a*4,s=c-i%c,d=i+s-1;n.clamp(),n.words[d>>>2]|=s<<24-d%4*8,n.sigBytes+=s},unpad:function(n){var a=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=a}},t.pad.Ansix923})}(Cy)),Rt}var Ot={},Ty={get exports(){return Ot},set exports(e){Ot=e}},Ui;function Ry(){return Ui||(Ui=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.pad.Iso10126={pad:function(n,a){var i=a*4,c=i-n.sigBytes%i;n.concat(t.lib.WordArray.random(c-1)).concat(t.lib.WordArray.create([c<<24],1))},unpad:function(n){var a=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=a}},t.pad.Iso10126})}(Ty)),Ot}var Pt={},Oy={get exports(){return Pt},set exports(e){Pt=e}},Ni;function Py(){return Ni||(Ni=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.pad.Iso97971={pad:function(n,a){n.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(n,a)},unpad:function(n){t.pad.ZeroPadding.unpad(n),n.sigBytes--}},t.pad.Iso97971})}(Oy)),Pt}var It={},Iy={get exports(){return It},set exports(e){It=e}},ji;function Dy(){return ji||(ji=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.pad.ZeroPadding={pad:function(n,a){var i=a*4;n.clamp(),n.sigBytes+=i-(n.sigBytes%i||i)},unpad:function(n){for(var a=n.words,i=n.sigBytes-1,i=n.sigBytes-1;i>=0;i--)if(a[i>>>2]>>>24-i%4*8&255){n.sigBytes=i+1;break}}},t.pad.ZeroPadding})}(Iy)),It}var Dt={},By={get exports(){return Dt},set exports(e){Dt=e}},Fi;function ky(){return Fi||(Fi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(By)),Dt}var Bt={},Ly={get exports(){return Bt},set exports(e){Bt=e}},Hi;function Uy(){return Hi||(Hi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return function(n){var a=t,i=a.lib,c=i.CipherParams,s=a.enc,d=s.Hex,o=a.format;o.Hex={stringify:function(l){return l.ciphertext.toString(d)},parse:function(l){var g=d.parse(l);return c.create({ciphertext:g})}}}(),t.format.Hex})}(Ly)),Bt}var kt={},Ny={get exports(){return kt},set exports(e){kt=e}},qi;function jy(){return qi||(qi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pr(),gr(),Xe(),pe())})(K,function(t){return function(){var n=t,a=n.lib,i=a.BlockCipher,c=n.algo,s=[],d=[],o=[],l=[],g=[],f=[],v=[],y=[],m=[],x=[];(function(){for(var h=[],p=0;p<256;p++)p<128?h[p]=p<<1:h[p]=p<<1^283;for(var b=0,_=0,p=0;p<256;p++){var A=_^_<<1^_<<2^_<<3^_<<4;A=A>>>8^A&255^99,s[b]=A,d[A]=b;var E=h[b],R=h[E],w=h[R],S=h[A]*257^A*16843008;o[b]=S<<24|S>>>8,l[b]=S<<16|S>>>16,g[b]=S<<8|S>>>24,f[b]=S;var S=w*16843009^R*65537^E*257^b*16843008;v[A]=S<<24|S>>>8,y[A]=S<<16|S>>>16,m[A]=S<<8|S>>>24,x[A]=S,b?(b=E^h[h[h[w^E]]],_^=h[h[_]]):b=_=1}})();var C=[0,1,2,4,8,16,32,64,128,27,54],u=c.AES=i.extend({_doReset:function(){var h;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var p=this._keyPriorReset=this._key,b=p.words,_=p.sigBytes/4,A=this._nRounds=_+6,E=(A+1)*4,R=this._keySchedule=[],w=0;w<E;w++)w<_?R[w]=b[w]:(h=R[w-1],w%_?_>6&&w%_==4&&(h=s[h>>>24]<<24|s[h>>>16&255]<<16|s[h>>>8&255]<<8|s[h&255]):(h=h<<8|h>>>24,h=s[h>>>24]<<24|s[h>>>16&255]<<16|s[h>>>8&255]<<8|s[h&255],h^=C[w/_|0]<<24),R[w]=R[w-_]^h);for(var S=this._invKeySchedule=[],B=0;B<E;B++){var w=E-B;if(B%4)var h=R[w];else var h=R[w-4];B<4||w<=4?S[B]=h:S[B]=v[s[h>>>24]]^y[s[h>>>16&255]]^m[s[h>>>8&255]]^x[s[h&255]]}}},encryptBlock:function(h,p){this._doCryptBlock(h,p,this._keySchedule,o,l,g,f,s)},decryptBlock:function(h,p){var b=h[p+1];h[p+1]=h[p+3],h[p+3]=b,this._doCryptBlock(h,p,this._invKeySchedule,v,y,m,x,d);var b=h[p+1];h[p+1]=h[p+3],h[p+3]=b},_doCryptBlock:function(h,p,b,_,A,E,R,w){for(var S=this._nRounds,B=h[p]^b[0],T=h[p+1]^b[1],P=h[p+2]^b[2],I=h[p+3]^b[3],N=4,U=1;U<S;U++){var F=_[B>>>24]^A[T>>>16&255]^E[P>>>8&255]^R[I&255]^b[N++],q=_[T>>>24]^A[P>>>16&255]^E[I>>>8&255]^R[B&255]^b[N++],H=_[P>>>24]^A[I>>>16&255]^E[B>>>8&255]^R[T&255]^b[N++],O=_[I>>>24]^A[B>>>16&255]^E[T>>>8&255]^R[P&255]^b[N++];B=F,T=q,P=H,I=O}var F=(w[B>>>24]<<24|w[T>>>16&255]<<16|w[P>>>8&255]<<8|w[I&255])^b[N++],q=(w[T>>>24]<<24|w[P>>>16&255]<<16|w[I>>>8&255]<<8|w[B&255])^b[N++],H=(w[P>>>24]<<24|w[I>>>16&255]<<16|w[B>>>8&255]<<8|w[T&255])^b[N++],O=(w[I>>>24]<<24|w[B>>>16&255]<<16|w[T>>>8&255]<<8|w[P&255])^b[N++];h[p]=F,h[p+1]=q,h[p+2]=H,h[p+3]=O},keySize:256/32});n.AES=i._createHelper(u)}(),t.AES})}(Ny)),kt}var Lt={},Fy={get exports(){return Lt},set exports(e){Lt=e}},Mi;function Hy(){return Mi||(Mi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pr(),gr(),Xe(),pe())})(K,function(t){return function(){var n=t,a=n.lib,i=a.WordArray,c=a.BlockCipher,s=n.algo,d=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],g=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],f=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],v=s.DES=c.extend({_doReset:function(){for(var C=this._key,u=C.words,h=[],p=0;p<56;p++){var b=d[p]-1;h[p]=u[b>>>5]>>>31-b%32&1}for(var _=this._subKeys=[],A=0;A<16;A++){for(var E=_[A]=[],R=l[A],p=0;p<24;p++)E[p/6|0]|=h[(o[p]-1+R)%28]<<31-p%6,E[4+(p/6|0)]|=h[28+(o[p+24]-1+R)%28]<<31-p%6;E[0]=E[0]<<1|E[0]>>>31;for(var p=1;p<7;p++)E[p]=E[p]>>>(p-1)*4+3;E[7]=E[7]<<5|E[7]>>>27}for(var w=this._invSubKeys=[],p=0;p<16;p++)w[p]=_[15-p]},encryptBlock:function(C,u){this._doCryptBlock(C,u,this._subKeys)},decryptBlock:function(C,u){this._doCryptBlock(C,u,this._invSubKeys)},_doCryptBlock:function(C,u,h){this._lBlock=C[u],this._rBlock=C[u+1],y.call(this,4,252645135),y.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),y.call(this,1,1431655765);for(var p=0;p<16;p++){for(var b=h[p],_=this._lBlock,A=this._rBlock,E=0,R=0;R<8;R++)E|=g[R][((A^b[R])&f[R])>>>0];this._lBlock=A,this._rBlock=_^E}var w=this._lBlock;this._lBlock=this._rBlock,this._rBlock=w,y.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),y.call(this,16,65535),y.call(this,4,252645135),C[u]=this._lBlock,C[u+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function y(C,u){var h=(this._lBlock>>>C^this._rBlock)&u;this._rBlock^=h,this._lBlock^=h<<C}function m(C,u){var h=(this._rBlock>>>C^this._lBlock)&u;this._lBlock^=h,this._rBlock^=h<<C}n.DES=c._createHelper(v);var x=s.TripleDES=c.extend({_doReset:function(){var C=this._key,u=C.words;if(u.length!==2&&u.length!==4&&u.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var h=u.slice(0,2),p=u.length<4?u.slice(0,2):u.slice(2,4),b=u.length<6?u.slice(0,2):u.slice(4,6);this._des1=v.createEncryptor(i.create(h)),this._des2=v.createEncryptor(i.create(p)),this._des3=v.createEncryptor(i.create(b))},encryptBlock:function(C,u){this._des1.encryptBlock(C,u),this._des2.decryptBlock(C,u),this._des3.encryptBlock(C,u)},decryptBlock:function(C,u){this._des3.decryptBlock(C,u),this._des2.encryptBlock(C,u),this._des1.decryptBlock(C,u)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=c._createHelper(x)}(),t.TripleDES})}(Fy)),Lt}var Ut={},qy={get exports(){return Ut},set exports(e){Ut=e}},Wi;function My(){return Wi||(Wi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pr(),gr(),Xe(),pe())})(K,function(t){return function(){var n=t,a=n.lib,i=a.StreamCipher,c=n.algo,s=c.RC4=i.extend({_doReset:function(){for(var l=this._key,g=l.words,f=l.sigBytes,v=this._S=[],y=0;y<256;y++)v[y]=y;for(var y=0,m=0;y<256;y++){var x=y%f,C=g[x>>>2]>>>24-x%4*8&255;m=(m+v[y]+C)%256;var u=v[y];v[y]=v[m],v[m]=u}this._i=this._j=0},_doProcessBlock:function(l,g){l[g]^=d.call(this)},keySize:256/32,ivSize:0});function d(){for(var l=this._S,g=this._i,f=this._j,v=0,y=0;y<4;y++){g=(g+1)%256,f=(f+l[g])%256;var m=l[g];l[g]=l[f],l[f]=m,v|=l[(l[g]+l[f])%256]<<24-y*8}return this._i=g,this._j=f,v}n.RC4=i._createHelper(s);var o=c.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)d.call(this)}});n.RC4Drop=i._createHelper(o)}(),t.RC4})}(qy)),Ut}var Nt={},Wy={get exports(){return Nt},set exports(e){Nt=e}},zi;function zy(){return zi||(zi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pr(),gr(),Xe(),pe())})(K,function(t){return function(){var n=t,a=n.lib,i=a.StreamCipher,c=n.algo,s=[],d=[],o=[],l=c.Rabbit=i.extend({_doReset:function(){for(var f=this._key.words,v=this.cfg.iv,y=0;y<4;y++)f[y]=(f[y]<<8|f[y]>>>24)&16711935|(f[y]<<24|f[y]>>>8)&4278255360;var m=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],x=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var y=0;y<4;y++)g.call(this);for(var y=0;y<8;y++)x[y]^=m[y+4&7];if(v){var C=v.words,u=C[0],h=C[1],p=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,_=p>>>16|b&4294901760,A=b<<16|p&65535;x[0]^=p,x[1]^=_,x[2]^=b,x[3]^=A,x[4]^=p,x[5]^=_,x[6]^=b,x[7]^=A;for(var y=0;y<4;y++)g.call(this)}},_doProcessBlock:function(f,v){var y=this._X;g.call(this),s[0]=y[0]^y[5]>>>16^y[3]<<16,s[1]=y[2]^y[7]>>>16^y[5]<<16,s[2]=y[4]^y[1]>>>16^y[7]<<16,s[3]=y[6]^y[3]>>>16^y[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,f[v+m]^=s[m]},blockSize:128/32,ivSize:64/32});function g(){for(var f=this._X,v=this._C,y=0;y<8;y++)d[y]=v[y];v[0]=v[0]+1295307597+this._b|0,v[1]=v[1]+3545052371+(v[0]>>>0<d[0]>>>0?1:0)|0,v[2]=v[2]+886263092+(v[1]>>>0<d[1]>>>0?1:0)|0,v[3]=v[3]+1295307597+(v[2]>>>0<d[2]>>>0?1:0)|0,v[4]=v[4]+3545052371+(v[3]>>>0<d[3]>>>0?1:0)|0,v[5]=v[5]+886263092+(v[4]>>>0<d[4]>>>0?1:0)|0,v[6]=v[6]+1295307597+(v[5]>>>0<d[5]>>>0?1:0)|0,v[7]=v[7]+3545052371+(v[6]>>>0<d[6]>>>0?1:0)|0,this._b=v[7]>>>0<d[7]>>>0?1:0;for(var y=0;y<8;y++){var m=f[y]+v[y],x=m&65535,C=m>>>16,u=((x*x>>>17)+x*C>>>15)+C*C,h=((m&4294901760)*m|0)+((m&65535)*m|0);o[y]=u^h}f[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,f[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,f[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,f[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,f[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,f[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,f[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,f[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}n.Rabbit=i._createHelper(l)}(),t.Rabbit})}(Wy)),Nt}var jt={},Gy={get exports(){return jt},set exports(e){jt=e}},Gi;function Ky(){return Gi||(Gi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pr(),gr(),Xe(),pe())})(K,function(t){return function(){var n=t,a=n.lib,i=a.StreamCipher,c=n.algo,s=[],d=[],o=[],l=c.RabbitLegacy=i.extend({_doReset:function(){var f=this._key.words,v=this.cfg.iv,y=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],m=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var x=0;x<4;x++)g.call(this);for(var x=0;x<8;x++)m[x]^=y[x+4&7];if(v){var C=v.words,u=C[0],h=C[1],p=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,_=p>>>16|b&4294901760,A=b<<16|p&65535;m[0]^=p,m[1]^=_,m[2]^=b,m[3]^=A,m[4]^=p,m[5]^=_,m[6]^=b,m[7]^=A;for(var x=0;x<4;x++)g.call(this)}},_doProcessBlock:function(f,v){var y=this._X;g.call(this),s[0]=y[0]^y[5]>>>16^y[3]<<16,s[1]=y[2]^y[7]>>>16^y[5]<<16,s[2]=y[4]^y[1]>>>16^y[7]<<16,s[3]=y[6]^y[3]>>>16^y[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,f[v+m]^=s[m]},blockSize:128/32,ivSize:64/32});function g(){for(var f=this._X,v=this._C,y=0;y<8;y++)d[y]=v[y];v[0]=v[0]+1295307597+this._b|0,v[1]=v[1]+3545052371+(v[0]>>>0<d[0]>>>0?1:0)|0,v[2]=v[2]+886263092+(v[1]>>>0<d[1]>>>0?1:0)|0,v[3]=v[3]+1295307597+(v[2]>>>0<d[2]>>>0?1:0)|0,v[4]=v[4]+3545052371+(v[3]>>>0<d[3]>>>0?1:0)|0,v[5]=v[5]+886263092+(v[4]>>>0<d[4]>>>0?1:0)|0,v[6]=v[6]+1295307597+(v[5]>>>0<d[5]>>>0?1:0)|0,v[7]=v[7]+3545052371+(v[6]>>>0<d[6]>>>0?1:0)|0,this._b=v[7]>>>0<d[7]>>>0?1:0;for(var y=0;y<8;y++){var m=f[y]+v[y],x=m&65535,C=m>>>16,u=((x*x>>>17)+x*C>>>15)+C*C,h=((m&4294901760)*m|0)+((m&65535)*m|0);o[y]=u^h}f[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,f[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,f[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,f[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,f[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,f[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,f[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,f[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}n.RabbitLegacy=i._createHelper(l)}(),t.RabbitLegacy})}(Gy)),jt}(function(e,r){(function(t,n,a){e.exports=n(Q(),an(),Km(),Vm(),pr(),Zm(),gr(),La(),Is(),ny(),Ds(),oy(),cy(),fy(),Ua(),hy(),Xe(),pe(),gy(),yy(),_y(),wy(),Ay(),Sy(),Ry(),Py(),Dy(),ky(),Uy(),jy(),Hy(),My(),zy(),Ky())})(K,function(t){return t})})(jm);const Ki="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";function Yy(e){const r=new ArrayBuffer(4);return new DataView(r).setUint32(0,e,!1),r}function Bs(e){const r=Ge.lib.WordArray.random(e).words,t=[];return r.forEach(n=>{new Uint8Array(Yy(n)).forEach(a=>t.push(a))}),t}function Ir(e){return Bs(e).map(r=>Ki[r%Ki.length]).reduce((r,t)=>r.concat(t),"")}var Ft=(e=>(e[e.Base64Url=0]="Base64Url",e[e.UriEncodedBase64=1]="UriEncodedBase64",e))(Ft||{});function Na(e,r){return encodeURIComponent(r===0?Ge.SHA256(e).toString(Ge.enc.Base64url):Ge.SHA256(e).toString(Ge.enc.Base64))}function xa(e=0,r=128){if(r<43||r>128)throw`Length must be between 43 and 128 (received ${r})`;const t=Ir(r),n=Na(t,e);return{code_verifier:t,code_challenge:n}}function Vy(e,r,t){return Na(e,t)===r}/*! Capacitor: https://capacitorjs.com/ - MIT License */const Xy=e=>{const r=new Map;r.set("web",{name:"web"});const t=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:r},n=(i,c)=>{t.platforms.set(i,c)},a=i=>{t.platforms.has(i)&&(t.currentPlatform=t.platforms.get(i))};return t.addPlatform=n,t.setPlatform=a,t},Jy=e=>e.CapacitorPlatforms=Xy(e),ks=Jy(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});ks.addPlatform;ks.setPlatform;var ur;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(ur||(ur={}));class Un extends Error{constructor(r,t,n){super(r),this.message=r,this.code=t,this.data=n}}const Zy=e=>{var r,t;return e!=null&&e.androidBridge?"android":!((t=(r=e==null?void 0:e.webkit)===null||r===void 0?void 0:r.messageHandlers)===null||t===void 0)&&t.bridge?"ios":"web"},Qy=e=>{var r,t,n,a,i;const c=e.CapacitorCustomPlatform||null,s=e.Capacitor||{},d=s.Plugins=s.Plugins||{},o=e.CapacitorPlatforms,l=()=>c!==null?c.name:Zy(e),g=((r=o==null?void 0:o.currentPlatform)===null||r===void 0?void 0:r.getPlatform)||l,f=()=>g()!=="web",v=((t=o==null?void 0:o.currentPlatform)===null||t===void 0?void 0:t.isNativePlatform)||f,y=A=>{const E=p.get(A);return!!(E!=null&&E.platforms.has(g())||C(A))},m=((n=o==null?void 0:o.currentPlatform)===null||n===void 0?void 0:n.isPluginAvailable)||y,x=A=>{var E;return(E=s.PluginHeaders)===null||E===void 0?void 0:E.find(R=>R.name===A)},C=((a=o==null?void 0:o.currentPlatform)===null||a===void 0?void 0:a.getPluginHeader)||x,u=A=>e.console.error(A),h=(A,E,R)=>Promise.reject(`${R} does not have an implementation of "${E}".`),p=new Map,b=(A,E={})=>{const R=p.get(A);if(R)return console.warn(`Capacitor plugin "${A}" already registered. Cannot register plugins twice.`),R.proxy;const w=g(),S=C(A);let B;const T=async()=>(!B&&w in E?B=typeof E[w]=="function"?B=await E[w]():B=E[w]:c!==null&&!B&&"web"in E&&(B=typeof E.web=="function"?B=await E.web():B=E.web),B),P=(H,O)=>{var D,k;if(S){const L=S==null?void 0:S.methods.find(z=>O===z.name);if(L)return L.rtype==="promise"?z=>s.nativePromise(A,O.toString(),z):(z,Y)=>s.nativeCallback(A,O.toString(),z,Y);if(H)return(D=H[O])===null||D===void 0?void 0:D.bind(H)}else{if(H)return(k=H[O])===null||k===void 0?void 0:k.bind(H);throw new Un(`"${A}" plugin is not implemented on ${w}`,ur.Unimplemented)}},I=H=>{let O;const D=(...k)=>{const L=T().then(z=>{const Y=P(z,H);if(Y){const te=Y(...k);return O=te==null?void 0:te.remove,te}else throw new Un(`"${A}.${H}()" is not implemented on ${w}`,ur.Unimplemented)});return H==="addListener"&&(L.remove=async()=>O()),L};return D.toString=()=>`${H.toString()}() { [capacitor code] }`,Object.defineProperty(D,"name",{value:H,writable:!1,configurable:!1}),D},N=I("addListener"),U=I("removeListener"),F=(H,O)=>{const D=N({eventName:H},O),k=async()=>{const z=await D;U({eventName:H,callbackId:z},O)},L=new Promise(z=>D.then(()=>z({remove:k})));return L.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await k()},L},q=new Proxy({},{get(H,O){switch(O){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return S?F:N;case"removeListener":return U;default:return I(O)}}});return d[A]=q,p.set(A,{name:A,proxy:q,platforms:new Set([...Object.keys(E),...S?[w]:[]])}),q},_=((i=o==null?void 0:o.currentPlatform)===null||i===void 0?void 0:i.registerPlugin)||b;return s.convertFileSrc||(s.convertFileSrc=A=>A),s.getPlatform=g,s.handleError=u,s.isNativePlatform=v,s.isPluginAvailable=m,s.pluginMethodNoop=h,s.registerPlugin=_,s.Exception=Un,s.DEBUG=!!s.DEBUG,s.isLoggingEnabled=!!s.isLoggingEnabled,s.platform=s.getPlatform(),s.isNative=s.isNativePlatform(),s},eb=e=>e.Capacitor=Qy(e),Ht=eb(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Je=Ht.registerPlugin;Ht.Plugins;class ja{constructor(r){this.listeners={},this.windowListeners={},r&&(console.warn(`Capacitor WebPlugin "${r.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=r)}addListener(r,t){this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push(t);const a=this.windowListeners[r];a&&!a.registered&&this.addWindowListener(a);const i=async()=>this.removeListener(r,t),c=Promise.resolve({remove:i});return Object.defineProperty(c,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await i()}}),c}async removeAllListeners(){this.listeners={};for(const r in this.windowListeners)this.removeWindowListener(this.windowListeners[r]);this.windowListeners={}}notifyListeners(r,t){const n=this.listeners[r];n&&n.forEach(a=>a(t))}hasListeners(r){return!!this.listeners[r].length}registerWindowListener(r,t){this.windowListeners[t]={registered:!1,windowEventName:r,pluginEventName:t,handler:n=>{this.notifyListeners(t,n)}}}unimplemented(r="not implemented"){return new Ht.Exception(r,ur.Unimplemented)}unavailable(r="not available"){return new Ht.Exception(r,ur.Unavailable)}async removeListener(r,t){const n=this.listeners[r];if(!n)return;const a=n.indexOf(t);this.listeners[r].splice(a,1),this.listeners[r].length||this.removeWindowListener(this.windowListeners[r])}addWindowListener(r){window.addEventListener(r.windowEventName,r.handler),r.registered=!0}removeWindowListener(r){r&&(window.removeEventListener(r.windowEventName,r.handler),r.registered=!1)}}const Yi=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Vi=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class rb extends ja{async getCookies(){const r=document.cookie,t={};return r.split(";").forEach(n=>{if(n.length<=0)return;let[a,i]=n.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");a=Vi(a).trim(),i=Vi(i).trim(),t[a]=i}),t}async setCookie(r){try{const t=Yi(r.key),n=Yi(r.value),a=`; expires=${(r.expires||"").replace("expires=","")}`,i=(r.path||"/").replace("path=",""),c=r.url!=null&&r.url.length>0?`domain=${r.url}`:"";document.cookie=`${t}=${n||""}${a}; path=${i}; ${c};`}catch(t){return Promise.reject(t)}}async deleteCookie(r){try{document.cookie=`${r.key}=; Max-Age=0`}catch(t){return Promise.reject(t)}}async clearCookies(){try{const r=document.cookie.split(";")||[];for(const t of r)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(r){return Promise.reject(r)}}async clearAllCookies(){try{await this.clearCookies()}catch(r){return Promise.reject(r)}}}Je("CapacitorCookies",{web:()=>new rb});const tb=async e=>new Promise((r,t)=>{const n=new FileReader;n.onload=()=>{const a=n.result;r(a.indexOf(",")>=0?a.split(",")[1]:a)},n.onerror=a=>t(a),n.readAsDataURL(e)}),nb=(e={})=>{const r=Object.keys(e);return Object.keys(e).map(a=>a.toLocaleLowerCase()).reduce((a,i,c)=>(a[i]=e[r[c]],a),{})},ab=(e,r=!0)=>e?Object.entries(e).reduce((n,a)=>{const[i,c]=a;let s,d;return Array.isArray(c)?(d="",c.forEach(o=>{s=r?encodeURIComponent(o):o,d+=`${i}=${s}&`}),d.slice(0,-1)):(s=r?encodeURIComponent(c):c,d=`${i}=${s}`),`${n}&${d}`},"").substr(1):null,ib=(e,r={})=>{const t=Object.assign({method:e.method||"GET",headers:e.headers},r),a=nb(e.headers)["content-type"]||"";if(typeof e.data=="string")t.body=e.data;else if(a.includes("application/x-www-form-urlencoded")){const i=new URLSearchParams;for(const[c,s]of Object.entries(e.data||{}))i.set(c,s);t.body=i.toString()}else if(a.includes("multipart/form-data")){const i=new FormData;if(e.data instanceof FormData)e.data.forEach((s,d)=>{i.append(d,s)});else for(const s of Object.keys(e.data))i.append(s,e.data[s]);t.body=i;const c=new Headers(t.headers);c.delete("content-type"),t.headers=c}else(a.includes("application/json")||typeof e.data=="object")&&(t.body=JSON.stringify(e.data));return t};class ob extends ja{async request(r){const t=ib(r,r.webFetchExtra),n=ab(r.params,r.shouldEncodeUrlParams),a=n?`${r.url}?${n}`:r.url,i=await fetch(a,t),c=i.headers.get("content-type")||"";let{responseType:s="text"}=i.ok?r:{};c.includes("application/json")&&(s="json");let d,o;switch(s){case"arraybuffer":case"blob":o=await i.blob(),d=await tb(o);break;case"json":d=await i.json();break;case"document":case"text":default:d=await i.text()}const l={};return i.headers.forEach((g,f)=>{l[f]=g}),{data:d,headers:l,status:i.status,url:i.url}}async get(r){return this.request(Object.assign(Object.assign({},r),{method:"GET"}))}async post(r){return this.request(Object.assign(Object.assign({},r),{method:"POST"}))}async put(r){return this.request(Object.assign(Object.assign({},r),{method:"PUT"}))}async patch(r){return this.request(Object.assign(Object.assign({},r),{method:"PATCH"}))}async delete(r){return this.request(Object.assign(Object.assign({},r),{method:"DELETE"}))}}Je("CapacitorHttp",{web:()=>new ob});const sr=Je("SecureStoragePlugin",{web:()=>Promise.resolve().then(()=>require("./web-5249ecef.js")).then(e=>new e.SecureStoragePluginWeb)}),sb=async e=>sr.get({key:`refresh_token_${e}`}).then(r=>r.value).catch(()=>""),cb=async(e,r)=>sr.set({key:`refresh_token_${e}`,value:r}).then(()=>{}),ub=async e=>sr.remove({key:`refresh_token_${e}`}).then(()=>{}),Ls={get:e=>sr.get({key:e}).then(r=>r.value).catch(r=>(console.warn(`Error getting from SecureStorage key '${e}': ${r}`),null)),set:(e,r)=>sr.set({key:e,value:r}),remove:e=>sr.remove({key:e})},or={getRefreshToken:sb,setRefreshToken:cb,clearRefreshToken:ub},fb=Je("SignInWithApple",{web:()=>Promise.resolve().then(()=>require("./web-7082d55d.js")).then(e=>new e.SignInWithAppleWeb)}),lb=Je("FacebookLogin",{web:()=>Promise.resolve().then(()=>require("./web-1ba31afd.js")).then(e=>new e.FacebookLoginWeb)}),db=Je("GoogleAuth",{web:()=>Promise.resolve().then(()=>require("./web-533498d1.js")).then(e=>new e.GoogleAuthWeb)});var Xi;(function(e){e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.DINE_IN="DINE_IN",e.DINE_IN_OPEN="DINE_IN_OPEN",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.GLOVO_TAKE_AWAY="GLOVO_TAKE_AWAY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.JUSTEAT_TAKE_AWAY="JUSTEAT_TAKE_AWAY",e.UBER_DELIVERY="UBER_DELIVERY",e.UBER_TAKE_AWAY="UBER_TAKE_AWAY",e.UBER_DINE_IN="UBER_DINE_IN",e.BOLT_DELIVERY="BOLT_DELIVERY",e.BOLT_TAKE_AWAY="BOLT_TAKE_AWAY",e.WOLT_DELIVERY="WOLT_DELIVERY",e.WOLT_TAKE_AWAY="WOLT_TAKE_AWAY",e.WOLT_DINE_IN="WOLT_DINE_IN"})(Xi||(Xi={}));var Ji;(function(e){e.NEW="NEW",e.COMPLETED="COMPLETED",e.VERIFIED="VERIFIED",e.DELIVER="DELIVER",e.DELIVERED="DELIVERED",e.CLOSED="CLOSED",e.ABANDONED="ABANDONED",e.CANCELLED="CANCELLED",e.PICKED="PICKED"})(Ji||(Ji={}));var Zi;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(Zi||(Zi={}));var Qi;(function(e){e.CASH="CASH",e.CARD="CARD",e.COD="COD",e.TERMINAL="TERMINAL",e.EPAYMENT="EPAYMENT",e.COUPON="COUPON",e.WALLET="WALLET",e.PREAUTHORIZED="PREAUTHORIZED",e.RETURN="RETURN",e.EXTERNAL="EXTERNAL"})(Qi||(Qi={}));var eo;(function(e){e.KIOSK="KIOSK",e.WEB="WEB",e.JUST_EAT_TAKE_AWAY="JUSTEATTAKEAWAY",e.GLOVO="GLOVO",e.PYSZNE="PYSZNE",e.WOLT="WOLT",e.UBER="UBER",e.BOLT="BOLT"})(eo||(eo={}));var ro;(function(e){e.GROUP="group",e.PRODUCT="product"})(ro||(ro={}));var to;(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.INVALID=1]="INVALID",e[e.VALID=2]="VALID"})(to||(to={}));var pa={},hb={get exports(){return pa},set exports(e){pa=e}},qt={},vb={get exports(){return qt},set exports(e){qt=e}},Us=function(r,t){return function(){for(var a=new Array(arguments.length),i=0;i<a.length;i++)a[i]=arguments[i];return r.apply(t,a)}},xb=Us,Ze=Object.prototype.toString;function Fa(e){return Ze.call(e)==="[object Array]"}function ga(e){return typeof e>"u"}function pb(e){return e!==null&&!ga(e)&&e.constructor!==null&&!ga(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function gb(e){return Ze.call(e)==="[object ArrayBuffer]"}function mb(e){return typeof FormData<"u"&&e instanceof FormData}function yb(e){var r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&e.buffer instanceof ArrayBuffer,r}function bb(e){return typeof e=="string"}function _b(e){return typeof e=="number"}function Ns(e){return e!==null&&typeof e=="object"}function Qr(e){if(Ze.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}function Eb(e){return Ze.call(e)==="[object Date]"}function wb(e){return Ze.call(e)==="[object File]"}function $b(e){return Ze.call(e)==="[object Blob]"}function js(e){return Ze.call(e)==="[object Function]"}function Ab(e){return Ns(e)&&js(e.pipe)}function Cb(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}function Sb(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Tb(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Ha(e,r){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),Fa(e))for(var t=0,n=e.length;t<n;t++)r.call(null,e[t],t,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.call(null,e[a],a,e)}function ma(){var e={};function r(a,i){Qr(e[i])&&Qr(a)?e[i]=ma(e[i],a):Qr(a)?e[i]=ma({},a):Fa(a)?e[i]=a.slice():e[i]=a}for(var t=0,n=arguments.length;t<n;t++)Ha(arguments[t],r);return e}function Rb(e,r,t){return Ha(r,function(a,i){t&&typeof a=="function"?e[i]=xb(a,t):e[i]=a}),e}function Ob(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var Ae={isArray:Fa,isArrayBuffer:gb,isBuffer:pb,isFormData:mb,isArrayBufferView:yb,isString:bb,isNumber:_b,isObject:Ns,isPlainObject:Qr,isUndefined:ga,isDate:Eb,isFile:wb,isBlob:$b,isFunction:js,isStream:Ab,isURLSearchParams:Cb,isStandardBrowserEnv:Tb,forEach:Ha,merge:ma,extend:Rb,trim:Sb,stripBOM:Ob},ar=Ae;function no(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Fs=function(r,t,n){if(!t)return r;var a;if(n)a=n(t);else if(ar.isURLSearchParams(t))a=t.toString();else{var i=[];ar.forEach(t,function(d,o){d===null||typeof d>"u"||(ar.isArray(d)?o=o+"[]":d=[d],ar.forEach(d,function(g){ar.isDate(g)?g=g.toISOString():ar.isObject(g)&&(g=JSON.stringify(g)),i.push(no(o)+"="+no(g))}))}),a=i.join("&")}if(a){var c=r.indexOf("#");c!==-1&&(r=r.slice(0,c)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r},Pb=Ae;function on(){this.handlers=[]}on.prototype.use=function(r,t,n){return this.handlers.push({fulfilled:r,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};on.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)};on.prototype.forEach=function(r){Pb.forEach(this.handlers,function(n){n!==null&&r(n)})};var Ib=on,Db=Ae,Bb=function(r,t){Db.forEach(r,function(a,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(r[t]=a,delete r[i])})},Hs=function(r,t,n,a,i){return r.config=t,n&&(r.code=n),r.request=a,r.response=i,r.isAxiosError=!0,r.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},r},Nn,ao;function qs(){if(ao)return Nn;ao=1;var e=Hs;return Nn=function(t,n,a,i,c){var s=new Error(t);return e(s,n,a,i,c)},Nn}var jn,io;function kb(){if(io)return jn;io=1;var e=qs();return jn=function(t,n,a){var i=a.config.validateStatus;!a.status||!i||i(a.status)?t(a):n(e("Request failed with status code "+a.status,a.config,null,a.request,a))},jn}var Fn,oo;function Lb(){if(oo)return Fn;oo=1;var e=Ae;return Fn=e.isStandardBrowserEnv()?function(){return{write:function(n,a,i,c,s,d){var o=[];o.push(n+"="+encodeURIComponent(a)),e.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),e.isString(c)&&o.push("path="+c),e.isString(s)&&o.push("domain="+s),d===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(n){var a=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Fn}var Hn,so;function Ub(){return so||(so=1,Hn=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)}),Hn}var qn,co;function Nb(){return co||(co=1,qn=function(r,t){return t?r.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):r}),qn}var Mn,uo;function jb(){if(uo)return Mn;uo=1;var e=Ub(),r=Nb();return Mn=function(n,a){return n&&!e(a)?r(n,a):a},Mn}var Wn,fo;function Fb(){if(fo)return Wn;fo=1;var e=Ae,r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Wn=function(n){var a={},i,c,s;return n&&e.forEach(n.split(`
16
- `),function(o){if(s=o.indexOf(":"),i=e.trim(o.substr(0,s)).toLowerCase(),c=e.trim(o.substr(s+1)),i){if(a[i]&&r.indexOf(i)>=0)return;i==="set-cookie"?a[i]=(a[i]?a[i]:[]).concat([c]):a[i]=a[i]?a[i]+", "+c:c}}),a},Wn}var zn,lo;function Hb(){if(lo)return zn;lo=1;var e=Ae;return zn=e.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),a;function i(c){var s=c;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return a=i(window.location.href),function(s){var d=e.isString(s)?i(s):s;return d.protocol===a.protocol&&d.host===a.host}}():function(){return function(){return!0}}(),zn}var Gn,ho;function vo(){if(ho)return Gn;ho=1;var e=Ae,r=kb(),t=Lb(),n=Fs,a=jb(),i=Fb(),c=Hb(),s=qs();return Gn=function(o){return new Promise(function(g,f){var v=o.data,y=o.headers,m=o.responseType;e.isFormData(v)&&delete y["Content-Type"];var x=new XMLHttpRequest;if(o.auth){var C=o.auth.username||"",u=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";y.Authorization="Basic "+btoa(C+":"+u)}var h=a(o.baseURL,o.url);x.open(o.method.toUpperCase(),n(h,o.params,o.paramsSerializer),!0),x.timeout=o.timeout;function p(){if(x){var _="getAllResponseHeaders"in x?i(x.getAllResponseHeaders()):null,A=!m||m==="text"||m==="json"?x.responseText:x.response,E={data:A,status:x.status,statusText:x.statusText,headers:_,config:o,request:x};r(g,f,E),x=null}}if("onloadend"in x?x.onloadend=p:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(p)},x.onabort=function(){x&&(f(s("Request aborted",o,"ECONNABORTED",x)),x=null)},x.onerror=function(){f(s("Network Error",o,null,x)),x=null},x.ontimeout=function(){var A="timeout of "+o.timeout+"ms exceeded";o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),f(s(A,o,o.transitional&&o.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",x)),x=null},e.isStandardBrowserEnv()){var b=(o.withCredentials||c(h))&&o.xsrfCookieName?t.read(o.xsrfCookieName):void 0;b&&(y[o.xsrfHeaderName]=b)}"setRequestHeader"in x&&e.forEach(y,function(A,E){typeof v>"u"&&E.toLowerCase()==="content-type"?delete y[E]:x.setRequestHeader(E,A)}),e.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),m&&m!=="json"&&(x.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&x.addEventListener("progress",o.onDownloadProgress),typeof o.onUploadProgress=="function"&&x.upload&&x.upload.addEventListener("progress",o.onUploadProgress),o.cancelToken&&o.cancelToken.promise.then(function(A){x&&(x.abort(),f(A),x=null)}),v||(v=null),x.send(v)})},Gn}var xe=Ae,xo=Bb,qb=Hs,Mb={"Content-Type":"application/x-www-form-urlencoded"};function po(e,r){!xe.isUndefined(e)&&xe.isUndefined(e["Content-Type"])&&(e["Content-Type"]=r)}function Wb(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=vo()),e}function zb(e,r,t){if(xe.isString(e))try{return(r||JSON.parse)(e),xe.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}var sn={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Wb(),transformRequest:[function(r,t){return xo(t,"Accept"),xo(t,"Content-Type"),xe.isFormData(r)||xe.isArrayBuffer(r)||xe.isBuffer(r)||xe.isStream(r)||xe.isFile(r)||xe.isBlob(r)?r:xe.isArrayBufferView(r)?r.buffer:xe.isURLSearchParams(r)?(po(t,"application/x-www-form-urlencoded;charset=utf-8"),r.toString()):xe.isObject(r)||t&&t["Content-Type"]==="application/json"?(po(t,"application/json"),zb(r)):r}],transformResponse:[function(r){var t=this.transitional,n=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,i=!n&&this.responseType==="json";if(i||a&&xe.isString(r)&&r.length)try{return JSON.parse(r)}catch(c){if(i)throw c.name==="SyntaxError"?qb(c,this,"E_JSON_PARSE"):c}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(r){return r>=200&&r<300}};sn.headers={common:{Accept:"application/json, text/plain, */*"}};xe.forEach(["delete","get","head"],function(r){sn.headers[r]={}});xe.forEach(["post","put","patch"],function(r){sn.headers[r]=xe.merge(Mb)});var qa=sn,Gb=Ae,Kb=qa,Yb=function(r,t,n){var a=this||Kb;return Gb.forEach(n,function(c){r=c.call(a,r,t)}),r},Kn,go;function Ms(){return go||(go=1,Kn=function(r){return!!(r&&r.__CANCEL__)}),Kn}var mo=Ae,Yn=Yb,Vb=Ms(),Xb=qa;function Vn(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Jb=function(r){Vn(r),r.headers=r.headers||{},r.data=Yn.call(r,r.data,r.headers,r.transformRequest),r.headers=mo.merge(r.headers.common||{},r.headers[r.method]||{},r.headers),mo.forEach(["delete","get","head","post","put","patch","common"],function(a){delete r.headers[a]});var t=r.adapter||Xb.adapter;return t(r).then(function(a){return Vn(r),a.data=Yn.call(r,a.data,a.headers,r.transformResponse),a},function(a){return Vb(a)||(Vn(r),a&&a.response&&(a.response.data=Yn.call(r,a.response.data,a.response.headers,r.transformResponse))),Promise.reject(a)})},be=Ae,Ws=function(r,t){t=t||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],c=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function d(f,v){return be.isPlainObject(f)&&be.isPlainObject(v)?be.merge(f,v):be.isPlainObject(v)?be.merge({},v):be.isArray(v)?v.slice():v}function o(f){be.isUndefined(t[f])?be.isUndefined(r[f])||(n[f]=d(void 0,r[f])):n[f]=d(r[f],t[f])}be.forEach(a,function(v){be.isUndefined(t[v])||(n[v]=d(void 0,t[v]))}),be.forEach(i,o),be.forEach(c,function(v){be.isUndefined(t[v])?be.isUndefined(r[v])||(n[v]=d(void 0,r[v])):n[v]=d(void 0,t[v])}),be.forEach(s,function(v){v in t?n[v]=d(r[v],t[v]):v in r&&(n[v]=d(void 0,r[v]))});var l=a.concat(i).concat(c).concat(s),g=Object.keys(r).concat(Object.keys(t)).filter(function(v){return l.indexOf(v)===-1});return be.forEach(g,o),n};const Zb="axios",Qb="0.21.4",e2="Promise based HTTP client for the browser and node.js",r2="index.js",t2={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},n2={type:"git",url:"https://github.com/axios/axios.git"},a2=["xhr","http","ajax","promise","node"],i2="Matt Zabriskie",o2="MIT",s2={url:"https://github.com/axios/axios/issues"},c2="https://axios-http.com",u2={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},f2={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},l2="dist/axios.min.js",d2="dist/axios.min.js",h2="./index.d.ts",v2={"follow-redirects":"^1.14.0"},x2=[{path:"./dist/axios.min.js",threshold:"5kB"}],p2={name:Zb,version:Qb,description:e2,main:r2,scripts:t2,repository:n2,keywords:a2,author:i2,license:o2,bugs:s2,homepage:c2,devDependencies:u2,browser:f2,jsdelivr:l2,unpkg:d2,typings:h2,dependencies:v2,bundlesize:x2};var zs=p2,Ma={};["object","boolean","number","function","string","symbol"].forEach(function(e,r){Ma[e]=function(n){return typeof n===e||"a"+(r<1?"n ":" ")+e}});var yo={},g2=zs.version.split(".");function Gs(e,r){for(var t=r?r.split("."):g2,n=e.split("."),a=0;a<3;a++){if(t[a]>n[a])return!0;if(t[a]<n[a])return!1}return!1}Ma.transitional=function(r,t,n){var a=t&&Gs(t);function i(c,s){return"[Axios v"+zs.version+"] Transitional option '"+c+"'"+s+(n?". "+n:"")}return function(c,s,d){if(r===!1)throw new Error(i(s," has been removed in "+t));return a&&!yo[s]&&(yo[s]=!0,console.warn(i(s," has been deprecated since v"+t+" and will be removed in the near future"))),r?r(c,s,d):!0}};function m2(e,r,t){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),a=n.length;a-- >0;){var i=n[a],c=r[i];if(c){var s=e[i],d=s===void 0||c(s,i,e);if(d!==!0)throw new TypeError("option "+i+" must be "+d);continue}if(t!==!0)throw Error("Unknown option "+i)}}var y2={isOlderVersion:Gs,assertOptions:m2,validators:Ma},Ks=Ae,b2=Fs,bo=Ib,_o=Jb,cn=Ws,Ys=y2,ir=Ys.validators;function jr(e){this.defaults=e,this.interceptors={request:new bo,response:new bo}}jr.prototype.request=function(r){typeof r=="string"?(r=arguments[1]||{},r.url=arguments[0]):r=r||{},r=cn(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var t=r.transitional;t!==void 0&&Ys.assertOptions(t,{silentJSONParsing:ir.transitional(ir.boolean,"1.0.0"),forcedJSONParsing:ir.transitional(ir.boolean,"1.0.0"),clarifyTimeoutError:ir.transitional(ir.boolean,"1.0.0")},!1);var n=[],a=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(a=a&&f.synchronous,n.unshift(f.fulfilled,f.rejected))});var i=[];this.interceptors.response.forEach(function(f){i.push(f.fulfilled,f.rejected)});var c;if(!a){var s=[_o,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(i),c=Promise.resolve(r);s.length;)c=c.then(s.shift(),s.shift());return c}for(var d=r;n.length;){var o=n.shift(),l=n.shift();try{d=o(d)}catch(g){l(g);break}}try{c=_o(d)}catch(g){return Promise.reject(g)}for(;i.length;)c=c.then(i.shift(),i.shift());return c};jr.prototype.getUri=function(r){return r=cn(this.defaults,r),b2(r.url,r.params,r.paramsSerializer).replace(/^\?/,"")};Ks.forEach(["delete","get","head","options"],function(r){jr.prototype[r]=function(t,n){return this.request(cn(n||{},{method:r,url:t,data:(n||{}).data}))}});Ks.forEach(["post","put","patch"],function(r){jr.prototype[r]=function(t,n,a){return this.request(cn(a||{},{method:r,url:t,data:n}))}});var _2=jr,Xn,Eo;function Vs(){if(Eo)return Xn;Eo=1;function e(r){this.message=r}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,Xn=e,Xn}var Jn,wo;function E2(){if(wo)return Jn;wo=1;var e=Vs();function r(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(c){n=c});var a=this;t(function(c){a.reason||(a.reason=new e(c),n(a.reason))})}return r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var n,a=new r(function(c){n=c});return{token:a,cancel:n}},Jn=r,Jn}var Zn,$o;function w2(){return $o||($o=1,Zn=function(r){return function(n){return r.apply(null,n)}}),Zn}var Qn,Ao;function $2(){return Ao||(Ao=1,Qn=function(r){return typeof r=="object"&&r.isAxiosError===!0}),Qn}var Co=Ae,A2=Us,et=_2,C2=Ws,S2=qa;function Xs(e){var r=new et(e),t=A2(et.prototype.request,r);return Co.extend(t,et.prototype,r),Co.extend(t,r),t}var De=Xs(S2);De.Axios=et;De.create=function(r){return Xs(C2(De.defaults,r))};De.Cancel=Vs();De.CancelToken=E2();De.isCancel=Ms();De.all=function(r){return Promise.all(r)};De.spread=w2();De.isAxiosError=$2();vb.exports=De;qt.default=De;(function(e){e.exports=qt})(hb);const Fr=Io(pa);function Wa(e){const{status:r,data:t}=e.response;switch(r){case 400:console.log("Error: invalid request");break;case 401:console.log("Error: not authenticated");break;case 500:console.log("Error: server problems");break}throw t&&console.log(t),e}globalThis&&globalThis.__awaiter;globalThis&&globalThis.__awaiter;var mr=globalThis&&globalThis.__awaiter||function(e,r,t,n){function a(i){return i instanceof t?i:new t(function(c){c(i)})}return new(t||(t=Promise))(function(i,c){function s(l){try{o(n.next(l))}catch(g){c(g)}}function d(l){try{o(n.throw(l))}catch(g){c(g)}}function o(l){l.done?i(l.value):a(l.value).then(s,d)}o((n=n.apply(e,r||[])).next())})};let Ee=null,un=-1;function T2(e,r,t,n,a){return mr(this,void 0,void 0,function*(){let i=null;try{return i=yield Fr({method:"post",url:`${e}/auth-oauth2/oauth/token`,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Authorization:`Basic ${t}`,"X-Tenant":r},data:`username=${n}&password=${a}&grant_type=password&scope=read`}),Ee=i.data,un=new Date().getTime(),!0}catch{return!1}})}function R2(e,r,t,n){return mr(this,void 0,void 0,function*(){let a=null;try{const i={method:"post",url:`${e}/auth-oauth2/oauth/token`,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Authorization:`Basic ${t}`,"X-Tenant":r},data:`refresh_token=${n}&grant_type=refresh_token`};return a=yield Fr(i),Ee=a.data,un=new Date().getTime(),!0}catch{return!1}})}const O2=(e,r,t=!1)=>mr(void 0,void 0,void 0,function*(){if(!t&&Ee&&Ee.access_token){const i=new Date().getTime()-un,c=parseInt(Ee.expires_in)*1e3*.95;if(i<c)return{token:Ee.access_token,UUID:Ee.UUID}}let n=!1;const a=yield r.getRefreshToken(e.TENANT);return a&&(n=yield R2(e.BASE_URL,e.TENANT,e.BASIC_AUTH,a)),!n&&e.anonymousAuth&&(n=yield T2(e.BASE_URL,e.TENANT,e.BASIC_AUTH,"anonymous","")),!n||!Ee?{token:"",UUID:""}:(r.setRefreshToken(e.TENANT,Ee.refresh_token),{token:Ee.access_token,UUID:Ee.UUID})});function P2(e,r,t=!1){return()=>O2(e,r,t)}function I2(e,r,t,n=new Date().getTime()){Ee=r,un=n,t.setRefreshToken(e,Ee.refresh_token)}function D2(e,r){r.clearRefreshToken(e),Ee=null}function ya(e,r){return mr(this,void 0,void 0,function*(){const t=yield Fr({method:"get",url:`${e}/auth-api/api/me`,headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).catch(Wa);return t?t.data:null})}function B2(e,r,t){return mr(this,void 0,void 0,function*(){const n=yield Fr.post(`${e}/auth-api/api/me`,t,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).catch(Wa);return n&&n.data||!1})}function k2(e,r){return mr(this,void 0,void 0,function*(){const{login:t}=yield ya(e,r),n=yield Fr.request({url:`${e}/auth-api/api/me`,method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},data:{login:t}}).catch(Wa);return n&&n.data||!1})}globalThis&&globalThis.__awaiter;if(typeof TextEncoder!="function"){const e=require("text-encoding");global.TextEncoder=e.TextEncoder,global.TextDecoder=e.TextDecoder}globalThis&&globalThis.__awaiter;function ba(e){this.message=e}ba.prototype=new Error,ba.prototype.name="InvalidCharacterError";var So=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var r=String(e).replace(/=+$/,"");if(r.length%4==1)throw new ba("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,n,a=0,i=0,c="";n=r.charAt(i++);~n&&(t=a%4?64*t+n:n,a++%4)?c+=String.fromCharCode(255&t>>(-2*a&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return c};function L2(e){var r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(So(t).replace(/(.)/g,function(n,a){var i=a.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}(r)}catch{return So(r)}}function Mt(e){this.message=e}function U2(e,r){if(typeof e!="string")throw new Mt("Invalid token specified");var t=(r=r||{}).header===!0?0:1;try{return JSON.parse(L2(e.split(".")[t]))}catch(n){throw new Mt("Invalid token specified: "+n.message)}}Mt.prototype=new Error,Mt.prototype.name="InvalidTokenError";var Me=(e=>(e.GOOGLE="google",e.APPLE="apple",e.FACEBOOK="facebook",e))(Me||{});const Js={loggedIn:!1,UUID:"",resolved:!1},za=Br.AuthContext,N2=()=>re.useContext(za),Zs=Br.ConfigContext,Qs=()=>re.useContext(Zs),j2=Je("Device",{web:()=>Promise.resolve().then(()=>require("./web-783b8092.js")).then(e=>new e.DeviceWeb)});function F2(){const e=Po.useNavigate();return{push:t=>e(t),replace:t=>e(t,{replace:!0})}}var Wt={},H2={get exports(){return Wt},set exports(e){Wt=e}},Tr={};/**
15
+ */return t.mode.CTRGladman=function(){var n=t.lib.BlockCipherMode.extend();function a(s){if((s>>24&255)===255){var d=s>>16&255,o=s>>8&255,l=s&255;d===255?(d=0,o===255?(o=0,l===255?l=0:++l):++o):++d,s=0,s+=d<<16,s+=o<<8,s+=l}else s+=1<<24;return s}function i(s){return(s[0]=a(s[0]))===0&&(s[1]=a(s[1])),s}var c=n.Encryptor=n.extend({processBlock:function(s,d){var o=this._cipher,l=o.blockSize,g=this._iv,f=this._counter;g&&(f=this._counter=g.slice(0),this._iv=void 0),i(f);var v=f.slice(0);o.encryptBlock(v,0);for(var y=0;y<l;y++)s[d+y]^=v[y]}});return n.Decryptor=c,n}(),t.mode.CTRGladman})}(by)),Ct}var St={},Ey={get exports(){return St},set exports(e){St=e}},Bi;function wy(){return Bi||(Bi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.mode.OFB=function(){var n=t.lib.BlockCipherMode.extend(),a=n.Encryptor=n.extend({processBlock:function(i,c){var s=this._cipher,d=s.blockSize,o=this._iv,l=this._keystream;o&&(l=this._keystream=o.slice(0),this._iv=void 0),s.encryptBlock(l,0);for(var g=0;g<d;g++)i[c+g]^=l[g]}});return n.Decryptor=a,n}(),t.mode.OFB})}(Ey)),St}var Tt={},$y={get exports(){return Tt},set exports(e){Tt=e}},ki;function Ay(){return ki||(ki=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.mode.ECB=function(){var n=t.lib.BlockCipherMode.extend();return n.Encryptor=n.extend({processBlock:function(a,i){this._cipher.encryptBlock(a,i)}}),n.Decryptor=n.extend({processBlock:function(a,i){this._cipher.decryptBlock(a,i)}}),n}(),t.mode.ECB})}($y)),Tt}var Rt={},Cy={get exports(){return Rt},set exports(e){Rt=e}},Li;function Sy(){return Li||(Li=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.pad.AnsiX923={pad:function(n,a){var i=n.sigBytes,c=a*4,s=c-i%c,d=i+s-1;n.clamp(),n.words[d>>>2]|=s<<24-d%4*8,n.sigBytes+=s},unpad:function(n){var a=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=a}},t.pad.Ansix923})}(Cy)),Rt}var Ot={},Ty={get exports(){return Ot},set exports(e){Ot=e}},Ui;function Ry(){return Ui||(Ui=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.pad.Iso10126={pad:function(n,a){var i=a*4,c=i-n.sigBytes%i;n.concat(t.lib.WordArray.random(c-1)).concat(t.lib.WordArray.create([c<<24],1))},unpad:function(n){var a=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=a}},t.pad.Iso10126})}(Ty)),Ot}var Pt={},Oy={get exports(){return Pt},set exports(e){Pt=e}},Ni;function Py(){return Ni||(Ni=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.pad.Iso97971={pad:function(n,a){n.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(n,a)},unpad:function(n){t.pad.ZeroPadding.unpad(n),n.sigBytes--}},t.pad.Iso97971})}(Oy)),Pt}var It={},Iy={get exports(){return It},set exports(e){It=e}},ji;function Dy(){return ji||(ji=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.pad.ZeroPadding={pad:function(n,a){var i=a*4;n.clamp(),n.sigBytes+=i-(n.sigBytes%i||i)},unpad:function(n){for(var a=n.words,i=n.sigBytes-1,i=n.sigBytes-1;i>=0;i--)if(a[i>>>2]>>>24-i%4*8&255){n.sigBytes=i+1;break}}},t.pad.ZeroPadding})}(Iy)),It}var Dt={},By={get exports(){return Dt},set exports(e){Dt=e}},Fi;function ky(){return Fi||(Fi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(By)),Dt}var Bt={},Ly={get exports(){return Bt},set exports(e){Bt=e}},Hi;function Uy(){return Hi||(Hi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pe())})(K,function(t){return function(n){var a=t,i=a.lib,c=i.CipherParams,s=a.enc,d=s.Hex,o=a.format;o.Hex={stringify:function(l){return l.ciphertext.toString(d)},parse:function(l){var g=d.parse(l);return c.create({ciphertext:g})}}}(),t.format.Hex})}(Ly)),Bt}var kt={},Ny={get exports(){return kt},set exports(e){kt=e}},qi;function jy(){return qi||(qi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pr(),gr(),Xe(),pe())})(K,function(t){return function(){var n=t,a=n.lib,i=a.BlockCipher,c=n.algo,s=[],d=[],o=[],l=[],g=[],f=[],v=[],y=[],m=[],x=[];(function(){for(var h=[],p=0;p<256;p++)p<128?h[p]=p<<1:h[p]=p<<1^283;for(var b=0,_=0,p=0;p<256;p++){var A=_^_<<1^_<<2^_<<3^_<<4;A=A>>>8^A&255^99,s[b]=A,d[A]=b;var E=h[b],R=h[E],w=h[R],S=h[A]*257^A*16843008;o[b]=S<<24|S>>>8,l[b]=S<<16|S>>>16,g[b]=S<<8|S>>>24,f[b]=S;var S=w*16843009^R*65537^E*257^b*16843008;v[A]=S<<24|S>>>8,y[A]=S<<16|S>>>16,m[A]=S<<8|S>>>24,x[A]=S,b?(b=E^h[h[h[w^E]]],_^=h[h[_]]):b=_=1}})();var C=[0,1,2,4,8,16,32,64,128,27,54],u=c.AES=i.extend({_doReset:function(){var h;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var p=this._keyPriorReset=this._key,b=p.words,_=p.sigBytes/4,A=this._nRounds=_+6,E=(A+1)*4,R=this._keySchedule=[],w=0;w<E;w++)w<_?R[w]=b[w]:(h=R[w-1],w%_?_>6&&w%_==4&&(h=s[h>>>24]<<24|s[h>>>16&255]<<16|s[h>>>8&255]<<8|s[h&255]):(h=h<<8|h>>>24,h=s[h>>>24]<<24|s[h>>>16&255]<<16|s[h>>>8&255]<<8|s[h&255],h^=C[w/_|0]<<24),R[w]=R[w-_]^h);for(var S=this._invKeySchedule=[],B=0;B<E;B++){var w=E-B;if(B%4)var h=R[w];else var h=R[w-4];B<4||w<=4?S[B]=h:S[B]=v[s[h>>>24]]^y[s[h>>>16&255]]^m[s[h>>>8&255]]^x[s[h&255]]}}},encryptBlock:function(h,p){this._doCryptBlock(h,p,this._keySchedule,o,l,g,f,s)},decryptBlock:function(h,p){var b=h[p+1];h[p+1]=h[p+3],h[p+3]=b,this._doCryptBlock(h,p,this._invKeySchedule,v,y,m,x,d);var b=h[p+1];h[p+1]=h[p+3],h[p+3]=b},_doCryptBlock:function(h,p,b,_,A,E,R,w){for(var S=this._nRounds,B=h[p]^b[0],T=h[p+1]^b[1],P=h[p+2]^b[2],I=h[p+3]^b[3],N=4,U=1;U<S;U++){var F=_[B>>>24]^A[T>>>16&255]^E[P>>>8&255]^R[I&255]^b[N++],q=_[T>>>24]^A[P>>>16&255]^E[I>>>8&255]^R[B&255]^b[N++],H=_[P>>>24]^A[I>>>16&255]^E[B>>>8&255]^R[T&255]^b[N++],O=_[I>>>24]^A[B>>>16&255]^E[T>>>8&255]^R[P&255]^b[N++];B=F,T=q,P=H,I=O}var F=(w[B>>>24]<<24|w[T>>>16&255]<<16|w[P>>>8&255]<<8|w[I&255])^b[N++],q=(w[T>>>24]<<24|w[P>>>16&255]<<16|w[I>>>8&255]<<8|w[B&255])^b[N++],H=(w[P>>>24]<<24|w[I>>>16&255]<<16|w[B>>>8&255]<<8|w[T&255])^b[N++],O=(w[I>>>24]<<24|w[B>>>16&255]<<16|w[T>>>8&255]<<8|w[P&255])^b[N++];h[p]=F,h[p+1]=q,h[p+2]=H,h[p+3]=O},keySize:256/32});n.AES=i._createHelper(u)}(),t.AES})}(Ny)),kt}var Lt={},Fy={get exports(){return Lt},set exports(e){Lt=e}},Mi;function Hy(){return Mi||(Mi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pr(),gr(),Xe(),pe())})(K,function(t){return function(){var n=t,a=n.lib,i=a.WordArray,c=a.BlockCipher,s=n.algo,d=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],g=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],f=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],v=s.DES=c.extend({_doReset:function(){for(var C=this._key,u=C.words,h=[],p=0;p<56;p++){var b=d[p]-1;h[p]=u[b>>>5]>>>31-b%32&1}for(var _=this._subKeys=[],A=0;A<16;A++){for(var E=_[A]=[],R=l[A],p=0;p<24;p++)E[p/6|0]|=h[(o[p]-1+R)%28]<<31-p%6,E[4+(p/6|0)]|=h[28+(o[p+24]-1+R)%28]<<31-p%6;E[0]=E[0]<<1|E[0]>>>31;for(var p=1;p<7;p++)E[p]=E[p]>>>(p-1)*4+3;E[7]=E[7]<<5|E[7]>>>27}for(var w=this._invSubKeys=[],p=0;p<16;p++)w[p]=_[15-p]},encryptBlock:function(C,u){this._doCryptBlock(C,u,this._subKeys)},decryptBlock:function(C,u){this._doCryptBlock(C,u,this._invSubKeys)},_doCryptBlock:function(C,u,h){this._lBlock=C[u],this._rBlock=C[u+1],y.call(this,4,252645135),y.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),y.call(this,1,1431655765);for(var p=0;p<16;p++){for(var b=h[p],_=this._lBlock,A=this._rBlock,E=0,R=0;R<8;R++)E|=g[R][((A^b[R])&f[R])>>>0];this._lBlock=A,this._rBlock=_^E}var w=this._lBlock;this._lBlock=this._rBlock,this._rBlock=w,y.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),y.call(this,16,65535),y.call(this,4,252645135),C[u]=this._lBlock,C[u+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function y(C,u){var h=(this._lBlock>>>C^this._rBlock)&u;this._rBlock^=h,this._lBlock^=h<<C}function m(C,u){var h=(this._rBlock>>>C^this._lBlock)&u;this._lBlock^=h,this._rBlock^=h<<C}n.DES=c._createHelper(v);var x=s.TripleDES=c.extend({_doReset:function(){var C=this._key,u=C.words;if(u.length!==2&&u.length!==4&&u.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var h=u.slice(0,2),p=u.length<4?u.slice(0,2):u.slice(2,4),b=u.length<6?u.slice(0,2):u.slice(4,6);this._des1=v.createEncryptor(i.create(h)),this._des2=v.createEncryptor(i.create(p)),this._des3=v.createEncryptor(i.create(b))},encryptBlock:function(C,u){this._des1.encryptBlock(C,u),this._des2.decryptBlock(C,u),this._des3.encryptBlock(C,u)},decryptBlock:function(C,u){this._des3.decryptBlock(C,u),this._des2.encryptBlock(C,u),this._des1.decryptBlock(C,u)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=c._createHelper(x)}(),t.TripleDES})}(Fy)),Lt}var Ut={},qy={get exports(){return Ut},set exports(e){Ut=e}},Wi;function My(){return Wi||(Wi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pr(),gr(),Xe(),pe())})(K,function(t){return function(){var n=t,a=n.lib,i=a.StreamCipher,c=n.algo,s=c.RC4=i.extend({_doReset:function(){for(var l=this._key,g=l.words,f=l.sigBytes,v=this._S=[],y=0;y<256;y++)v[y]=y;for(var y=0,m=0;y<256;y++){var x=y%f,C=g[x>>>2]>>>24-x%4*8&255;m=(m+v[y]+C)%256;var u=v[y];v[y]=v[m],v[m]=u}this._i=this._j=0},_doProcessBlock:function(l,g){l[g]^=d.call(this)},keySize:256/32,ivSize:0});function d(){for(var l=this._S,g=this._i,f=this._j,v=0,y=0;y<4;y++){g=(g+1)%256,f=(f+l[g])%256;var m=l[g];l[g]=l[f],l[f]=m,v|=l[(l[g]+l[f])%256]<<24-y*8}return this._i=g,this._j=f,v}n.RC4=i._createHelper(s);var o=c.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)d.call(this)}});n.RC4Drop=i._createHelper(o)}(),t.RC4})}(qy)),Ut}var Nt={},Wy={get exports(){return Nt},set exports(e){Nt=e}},zi;function zy(){return zi||(zi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pr(),gr(),Xe(),pe())})(K,function(t){return function(){var n=t,a=n.lib,i=a.StreamCipher,c=n.algo,s=[],d=[],o=[],l=c.Rabbit=i.extend({_doReset:function(){for(var f=this._key.words,v=this.cfg.iv,y=0;y<4;y++)f[y]=(f[y]<<8|f[y]>>>24)&16711935|(f[y]<<24|f[y]>>>8)&4278255360;var m=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],x=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var y=0;y<4;y++)g.call(this);for(var y=0;y<8;y++)x[y]^=m[y+4&7];if(v){var C=v.words,u=C[0],h=C[1],p=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,_=p>>>16|b&4294901760,A=b<<16|p&65535;x[0]^=p,x[1]^=_,x[2]^=b,x[3]^=A,x[4]^=p,x[5]^=_,x[6]^=b,x[7]^=A;for(var y=0;y<4;y++)g.call(this)}},_doProcessBlock:function(f,v){var y=this._X;g.call(this),s[0]=y[0]^y[5]>>>16^y[3]<<16,s[1]=y[2]^y[7]>>>16^y[5]<<16,s[2]=y[4]^y[1]>>>16^y[7]<<16,s[3]=y[6]^y[3]>>>16^y[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,f[v+m]^=s[m]},blockSize:128/32,ivSize:64/32});function g(){for(var f=this._X,v=this._C,y=0;y<8;y++)d[y]=v[y];v[0]=v[0]+1295307597+this._b|0,v[1]=v[1]+3545052371+(v[0]>>>0<d[0]>>>0?1:0)|0,v[2]=v[2]+886263092+(v[1]>>>0<d[1]>>>0?1:0)|0,v[3]=v[3]+1295307597+(v[2]>>>0<d[2]>>>0?1:0)|0,v[4]=v[4]+3545052371+(v[3]>>>0<d[3]>>>0?1:0)|0,v[5]=v[5]+886263092+(v[4]>>>0<d[4]>>>0?1:0)|0,v[6]=v[6]+1295307597+(v[5]>>>0<d[5]>>>0?1:0)|0,v[7]=v[7]+3545052371+(v[6]>>>0<d[6]>>>0?1:0)|0,this._b=v[7]>>>0<d[7]>>>0?1:0;for(var y=0;y<8;y++){var m=f[y]+v[y],x=m&65535,C=m>>>16,u=((x*x>>>17)+x*C>>>15)+C*C,h=((m&4294901760)*m|0)+((m&65535)*m|0);o[y]=u^h}f[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,f[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,f[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,f[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,f[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,f[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,f[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,f[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}n.Rabbit=i._createHelper(l)}(),t.Rabbit})}(Wy)),Nt}var jt={},Gy={get exports(){return jt},set exports(e){jt=e}},Gi;function Ky(){return Gi||(Gi=1,function(e,r){(function(t,n,a){e.exports=n(Q(),pr(),gr(),Xe(),pe())})(K,function(t){return function(){var n=t,a=n.lib,i=a.StreamCipher,c=n.algo,s=[],d=[],o=[],l=c.RabbitLegacy=i.extend({_doReset:function(){var f=this._key.words,v=this.cfg.iv,y=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],m=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var x=0;x<4;x++)g.call(this);for(var x=0;x<8;x++)m[x]^=y[x+4&7];if(v){var C=v.words,u=C[0],h=C[1],p=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,_=p>>>16|b&4294901760,A=b<<16|p&65535;m[0]^=p,m[1]^=_,m[2]^=b,m[3]^=A,m[4]^=p,m[5]^=_,m[6]^=b,m[7]^=A;for(var x=0;x<4;x++)g.call(this)}},_doProcessBlock:function(f,v){var y=this._X;g.call(this),s[0]=y[0]^y[5]>>>16^y[3]<<16,s[1]=y[2]^y[7]>>>16^y[5]<<16,s[2]=y[4]^y[1]>>>16^y[7]<<16,s[3]=y[6]^y[3]>>>16^y[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,f[v+m]^=s[m]},blockSize:128/32,ivSize:64/32});function g(){for(var f=this._X,v=this._C,y=0;y<8;y++)d[y]=v[y];v[0]=v[0]+1295307597+this._b|0,v[1]=v[1]+3545052371+(v[0]>>>0<d[0]>>>0?1:0)|0,v[2]=v[2]+886263092+(v[1]>>>0<d[1]>>>0?1:0)|0,v[3]=v[3]+1295307597+(v[2]>>>0<d[2]>>>0?1:0)|0,v[4]=v[4]+3545052371+(v[3]>>>0<d[3]>>>0?1:0)|0,v[5]=v[5]+886263092+(v[4]>>>0<d[4]>>>0?1:0)|0,v[6]=v[6]+1295307597+(v[5]>>>0<d[5]>>>0?1:0)|0,v[7]=v[7]+3545052371+(v[6]>>>0<d[6]>>>0?1:0)|0,this._b=v[7]>>>0<d[7]>>>0?1:0;for(var y=0;y<8;y++){var m=f[y]+v[y],x=m&65535,C=m>>>16,u=((x*x>>>17)+x*C>>>15)+C*C,h=((m&4294901760)*m|0)+((m&65535)*m|0);o[y]=u^h}f[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,f[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,f[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,f[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,f[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,f[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,f[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,f[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}n.RabbitLegacy=i._createHelper(l)}(),t.RabbitLegacy})}(Gy)),jt}(function(e,r){(function(t,n,a){e.exports=n(Q(),an(),Km(),Vm(),pr(),Zm(),gr(),La(),Is(),ny(),Ds(),oy(),cy(),fy(),Ua(),hy(),Xe(),pe(),gy(),yy(),_y(),wy(),Ay(),Sy(),Ry(),Py(),Dy(),ky(),Uy(),jy(),Hy(),My(),zy(),Ky())})(K,function(t){return t})})(jm);const Ki="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";function Yy(e){const r=new ArrayBuffer(4);return new DataView(r).setUint32(0,e,!1),r}function Bs(e){const r=Ge.lib.WordArray.random(e).words,t=[];return r.forEach(n=>{new Uint8Array(Yy(n)).forEach(a=>t.push(a))}),t}function Ir(e){return Bs(e).map(r=>Ki[r%Ki.length]).reduce((r,t)=>r.concat(t),"")}var Ft=(e=>(e[e.Base64Url=0]="Base64Url",e[e.UriEncodedBase64=1]="UriEncodedBase64",e))(Ft||{});function Na(e,r){return encodeURIComponent(r===0?Ge.SHA256(e).toString(Ge.enc.Base64url):Ge.SHA256(e).toString(Ge.enc.Base64))}function xa(e=0,r=128){if(r<43||r>128)throw`Length must be between 43 and 128 (received ${r})`;const t=Ir(r),n=Na(t,e);return{code_verifier:t,code_challenge:n}}function Vy(e,r,t){return Na(e,t)===r}/*! Capacitor: https://capacitorjs.com/ - MIT License */const Xy=e=>{const r=new Map;r.set("web",{name:"web"});const t=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:r},n=(i,c)=>{t.platforms.set(i,c)},a=i=>{t.platforms.has(i)&&(t.currentPlatform=t.platforms.get(i))};return t.addPlatform=n,t.setPlatform=a,t},Jy=e=>e.CapacitorPlatforms=Xy(e),ks=Jy(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});ks.addPlatform;ks.setPlatform;var ur;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(ur||(ur={}));class Un extends Error{constructor(r,t,n){super(r),this.message=r,this.code=t,this.data=n}}const Zy=e=>{var r,t;return e!=null&&e.androidBridge?"android":!((t=(r=e==null?void 0:e.webkit)===null||r===void 0?void 0:r.messageHandlers)===null||t===void 0)&&t.bridge?"ios":"web"},Qy=e=>{var r,t,n,a,i;const c=e.CapacitorCustomPlatform||null,s=e.Capacitor||{},d=s.Plugins=s.Plugins||{},o=e.CapacitorPlatforms,l=()=>c!==null?c.name:Zy(e),g=((r=o==null?void 0:o.currentPlatform)===null||r===void 0?void 0:r.getPlatform)||l,f=()=>g()!=="web",v=((t=o==null?void 0:o.currentPlatform)===null||t===void 0?void 0:t.isNativePlatform)||f,y=A=>{const E=p.get(A);return!!(E!=null&&E.platforms.has(g())||C(A))},m=((n=o==null?void 0:o.currentPlatform)===null||n===void 0?void 0:n.isPluginAvailable)||y,x=A=>{var E;return(E=s.PluginHeaders)===null||E===void 0?void 0:E.find(R=>R.name===A)},C=((a=o==null?void 0:o.currentPlatform)===null||a===void 0?void 0:a.getPluginHeader)||x,u=A=>e.console.error(A),h=(A,E,R)=>Promise.reject(`${R} does not have an implementation of "${E}".`),p=new Map,b=(A,E={})=>{const R=p.get(A);if(R)return console.warn(`Capacitor plugin "${A}" already registered. Cannot register plugins twice.`),R.proxy;const w=g(),S=C(A);let B;const T=async()=>(!B&&w in E?B=typeof E[w]=="function"?B=await E[w]():B=E[w]:c!==null&&!B&&"web"in E&&(B=typeof E.web=="function"?B=await E.web():B=E.web),B),P=(H,O)=>{var D,k;if(S){const L=S==null?void 0:S.methods.find(z=>O===z.name);if(L)return L.rtype==="promise"?z=>s.nativePromise(A,O.toString(),z):(z,Y)=>s.nativeCallback(A,O.toString(),z,Y);if(H)return(D=H[O])===null||D===void 0?void 0:D.bind(H)}else{if(H)return(k=H[O])===null||k===void 0?void 0:k.bind(H);throw new Un(`"${A}" plugin is not implemented on ${w}`,ur.Unimplemented)}},I=H=>{let O;const D=(...k)=>{const L=T().then(z=>{const Y=P(z,H);if(Y){const te=Y(...k);return O=te==null?void 0:te.remove,te}else throw new Un(`"${A}.${H}()" is not implemented on ${w}`,ur.Unimplemented)});return H==="addListener"&&(L.remove=async()=>O()),L};return D.toString=()=>`${H.toString()}() { [capacitor code] }`,Object.defineProperty(D,"name",{value:H,writable:!1,configurable:!1}),D},N=I("addListener"),U=I("removeListener"),F=(H,O)=>{const D=N({eventName:H},O),k=async()=>{const z=await D;U({eventName:H,callbackId:z},O)},L=new Promise(z=>D.then(()=>z({remove:k})));return L.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await k()},L},q=new Proxy({},{get(H,O){switch(O){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return S?F:N;case"removeListener":return U;default:return I(O)}}});return d[A]=q,p.set(A,{name:A,proxy:q,platforms:new Set([...Object.keys(E),...S?[w]:[]])}),q},_=((i=o==null?void 0:o.currentPlatform)===null||i===void 0?void 0:i.registerPlugin)||b;return s.convertFileSrc||(s.convertFileSrc=A=>A),s.getPlatform=g,s.handleError=u,s.isNativePlatform=v,s.isPluginAvailable=m,s.pluginMethodNoop=h,s.registerPlugin=_,s.Exception=Un,s.DEBUG=!!s.DEBUG,s.isLoggingEnabled=!!s.isLoggingEnabled,s.platform=s.getPlatform(),s.isNative=s.isNativePlatform(),s},eb=e=>e.Capacitor=Qy(e),Ht=eb(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Je=Ht.registerPlugin;Ht.Plugins;class ja{constructor(r){this.listeners={},this.windowListeners={},r&&(console.warn(`Capacitor WebPlugin "${r.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=r)}addListener(r,t){this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push(t);const a=this.windowListeners[r];a&&!a.registered&&this.addWindowListener(a);const i=async()=>this.removeListener(r,t),c=Promise.resolve({remove:i});return Object.defineProperty(c,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await i()}}),c}async removeAllListeners(){this.listeners={};for(const r in this.windowListeners)this.removeWindowListener(this.windowListeners[r]);this.windowListeners={}}notifyListeners(r,t){const n=this.listeners[r];n&&n.forEach(a=>a(t))}hasListeners(r){return!!this.listeners[r].length}registerWindowListener(r,t){this.windowListeners[t]={registered:!1,windowEventName:r,pluginEventName:t,handler:n=>{this.notifyListeners(t,n)}}}unimplemented(r="not implemented"){return new Ht.Exception(r,ur.Unimplemented)}unavailable(r="not available"){return new Ht.Exception(r,ur.Unavailable)}async removeListener(r,t){const n=this.listeners[r];if(!n)return;const a=n.indexOf(t);this.listeners[r].splice(a,1),this.listeners[r].length||this.removeWindowListener(this.windowListeners[r])}addWindowListener(r){window.addEventListener(r.windowEventName,r.handler),r.registered=!0}removeWindowListener(r){r&&(window.removeEventListener(r.windowEventName,r.handler),r.registered=!1)}}const Yi=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Vi=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class rb extends ja{async getCookies(){const r=document.cookie,t={};return r.split(";").forEach(n=>{if(n.length<=0)return;let[a,i]=n.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");a=Vi(a).trim(),i=Vi(i).trim(),t[a]=i}),t}async setCookie(r){try{const t=Yi(r.key),n=Yi(r.value),a=`; expires=${(r.expires||"").replace("expires=","")}`,i=(r.path||"/").replace("path=",""),c=r.url!=null&&r.url.length>0?`domain=${r.url}`:"";document.cookie=`${t}=${n||""}${a}; path=${i}; ${c};`}catch(t){return Promise.reject(t)}}async deleteCookie(r){try{document.cookie=`${r.key}=; Max-Age=0`}catch(t){return Promise.reject(t)}}async clearCookies(){try{const r=document.cookie.split(";")||[];for(const t of r)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(r){return Promise.reject(r)}}async clearAllCookies(){try{await this.clearCookies()}catch(r){return Promise.reject(r)}}}Je("CapacitorCookies",{web:()=>new rb});const tb=async e=>new Promise((r,t)=>{const n=new FileReader;n.onload=()=>{const a=n.result;r(a.indexOf(",")>=0?a.split(",")[1]:a)},n.onerror=a=>t(a),n.readAsDataURL(e)}),nb=(e={})=>{const r=Object.keys(e);return Object.keys(e).map(a=>a.toLocaleLowerCase()).reduce((a,i,c)=>(a[i]=e[r[c]],a),{})},ab=(e,r=!0)=>e?Object.entries(e).reduce((n,a)=>{const[i,c]=a;let s,d;return Array.isArray(c)?(d="",c.forEach(o=>{s=r?encodeURIComponent(o):o,d+=`${i}=${s}&`}),d.slice(0,-1)):(s=r?encodeURIComponent(c):c,d=`${i}=${s}`),`${n}&${d}`},"").substr(1):null,ib=(e,r={})=>{const t=Object.assign({method:e.method||"GET",headers:e.headers},r),a=nb(e.headers)["content-type"]||"";if(typeof e.data=="string")t.body=e.data;else if(a.includes("application/x-www-form-urlencoded")){const i=new URLSearchParams;for(const[c,s]of Object.entries(e.data||{}))i.set(c,s);t.body=i.toString()}else if(a.includes("multipart/form-data")){const i=new FormData;if(e.data instanceof FormData)e.data.forEach((s,d)=>{i.append(d,s)});else for(const s of Object.keys(e.data))i.append(s,e.data[s]);t.body=i;const c=new Headers(t.headers);c.delete("content-type"),t.headers=c}else(a.includes("application/json")||typeof e.data=="object")&&(t.body=JSON.stringify(e.data));return t};class ob extends ja{async request(r){const t=ib(r,r.webFetchExtra),n=ab(r.params,r.shouldEncodeUrlParams),a=n?`${r.url}?${n}`:r.url,i=await fetch(a,t),c=i.headers.get("content-type")||"";let{responseType:s="text"}=i.ok?r:{};c.includes("application/json")&&(s="json");let d,o;switch(s){case"arraybuffer":case"blob":o=await i.blob(),d=await tb(o);break;case"json":d=await i.json();break;case"document":case"text":default:d=await i.text()}const l={};return i.headers.forEach((g,f)=>{l[f]=g}),{data:d,headers:l,status:i.status,url:i.url}}async get(r){return this.request(Object.assign(Object.assign({},r),{method:"GET"}))}async post(r){return this.request(Object.assign(Object.assign({},r),{method:"POST"}))}async put(r){return this.request(Object.assign(Object.assign({},r),{method:"PUT"}))}async patch(r){return this.request(Object.assign(Object.assign({},r),{method:"PATCH"}))}async delete(r){return this.request(Object.assign(Object.assign({},r),{method:"DELETE"}))}}Je("CapacitorHttp",{web:()=>new ob});const sr=Je("SecureStoragePlugin",{web:()=>Promise.resolve().then(()=>require("./web-9c8696af.js")).then(e=>new e.SecureStoragePluginWeb)}),sb=async e=>sr.get({key:`refresh_token_${e}`}).then(r=>r.value).catch(()=>""),cb=async(e,r)=>sr.set({key:`refresh_token_${e}`,value:r}).then(()=>{}),ub=async e=>sr.remove({key:`refresh_token_${e}`}).then(()=>{}),Ls={get:e=>sr.get({key:e}).then(r=>r.value).catch(r=>(console.warn(`Error getting from SecureStorage key '${e}': ${r}`),null)),set:(e,r)=>sr.set({key:e,value:r}),remove:e=>sr.remove({key:e})},or={getRefreshToken:sb,setRefreshToken:cb,clearRefreshToken:ub},fb=Je("SignInWithApple",{web:()=>Promise.resolve().then(()=>require("./web-5e5dfaf9.js")).then(e=>new e.SignInWithAppleWeb)}),lb=Je("FacebookLogin",{web:()=>Promise.resolve().then(()=>require("./web-36b6ba6d.js")).then(e=>new e.FacebookLoginWeb)}),db=Je("GoogleAuth",{web:()=>Promise.resolve().then(()=>require("./web-918b9ba4.js")).then(e=>new e.GoogleAuthWeb)});var Xi;(function(e){e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.DINE_IN="DINE_IN",e.DINE_IN_OPEN="DINE_IN_OPEN",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.GLOVO_TAKE_AWAY="GLOVO_TAKE_AWAY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.JUSTEAT_TAKE_AWAY="JUSTEAT_TAKE_AWAY",e.UBER_DELIVERY="UBER_DELIVERY",e.UBER_TAKE_AWAY="UBER_TAKE_AWAY",e.UBER_DINE_IN="UBER_DINE_IN",e.BOLT_DELIVERY="BOLT_DELIVERY",e.BOLT_TAKE_AWAY="BOLT_TAKE_AWAY",e.WOLT_DELIVERY="WOLT_DELIVERY",e.WOLT_TAKE_AWAY="WOLT_TAKE_AWAY",e.WOLT_DINE_IN="WOLT_DINE_IN"})(Xi||(Xi={}));var Ji;(function(e){e.NEW="NEW",e.COMPLETED="COMPLETED",e.VERIFIED="VERIFIED",e.DELIVER="DELIVER",e.DELIVERED="DELIVERED",e.CLOSED="CLOSED",e.ABANDONED="ABANDONED",e.CANCELLED="CANCELLED",e.PICKED="PICKED"})(Ji||(Ji={}));var Zi;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(Zi||(Zi={}));var Qi;(function(e){e.CASH="CASH",e.CARD="CARD",e.COD="COD",e.TERMINAL="TERMINAL",e.EPAYMENT="EPAYMENT",e.COUPON="COUPON",e.WALLET="WALLET",e.PREAUTHORIZED="PREAUTHORIZED",e.RETURN="RETURN",e.EXTERNAL="EXTERNAL"})(Qi||(Qi={}));var eo;(function(e){e.KIOSK="KIOSK",e.WEB="WEB",e.JUST_EAT_TAKE_AWAY="JUSTEATTAKEAWAY",e.GLOVO="GLOVO",e.PYSZNE="PYSZNE",e.WOLT="WOLT",e.UBER="UBER",e.BOLT="BOLT"})(eo||(eo={}));var ro;(function(e){e.GROUP="group",e.PRODUCT="product"})(ro||(ro={}));var to;(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.INVALID=1]="INVALID",e[e.VALID=2]="VALID"})(to||(to={}));var pa={},hb={get exports(){return pa},set exports(e){pa=e}},qt={},vb={get exports(){return qt},set exports(e){qt=e}},Us=function(r,t){return function(){for(var a=new Array(arguments.length),i=0;i<a.length;i++)a[i]=arguments[i];return r.apply(t,a)}},xb=Us,Ze=Object.prototype.toString;function Fa(e){return Ze.call(e)==="[object Array]"}function ga(e){return typeof e>"u"}function pb(e){return e!==null&&!ga(e)&&e.constructor!==null&&!ga(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function gb(e){return Ze.call(e)==="[object ArrayBuffer]"}function mb(e){return typeof FormData<"u"&&e instanceof FormData}function yb(e){var r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&e.buffer instanceof ArrayBuffer,r}function bb(e){return typeof e=="string"}function _b(e){return typeof e=="number"}function Ns(e){return e!==null&&typeof e=="object"}function Qr(e){if(Ze.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}function Eb(e){return Ze.call(e)==="[object Date]"}function wb(e){return Ze.call(e)==="[object File]"}function $b(e){return Ze.call(e)==="[object Blob]"}function js(e){return Ze.call(e)==="[object Function]"}function Ab(e){return Ns(e)&&js(e.pipe)}function Cb(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}function Sb(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Tb(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Ha(e,r){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),Fa(e))for(var t=0,n=e.length;t<n;t++)r.call(null,e[t],t,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.call(null,e[a],a,e)}function ma(){var e={};function r(a,i){Qr(e[i])&&Qr(a)?e[i]=ma(e[i],a):Qr(a)?e[i]=ma({},a):Fa(a)?e[i]=a.slice():e[i]=a}for(var t=0,n=arguments.length;t<n;t++)Ha(arguments[t],r);return e}function Rb(e,r,t){return Ha(r,function(a,i){t&&typeof a=="function"?e[i]=xb(a,t):e[i]=a}),e}function Ob(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var Ae={isArray:Fa,isArrayBuffer:gb,isBuffer:pb,isFormData:mb,isArrayBufferView:yb,isString:bb,isNumber:_b,isObject:Ns,isPlainObject:Qr,isUndefined:ga,isDate:Eb,isFile:wb,isBlob:$b,isFunction:js,isStream:Ab,isURLSearchParams:Cb,isStandardBrowserEnv:Tb,forEach:Ha,merge:ma,extend:Rb,trim:Sb,stripBOM:Ob},ar=Ae;function no(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Fs=function(r,t,n){if(!t)return r;var a;if(n)a=n(t);else if(ar.isURLSearchParams(t))a=t.toString();else{var i=[];ar.forEach(t,function(d,o){d===null||typeof d>"u"||(ar.isArray(d)?o=o+"[]":d=[d],ar.forEach(d,function(g){ar.isDate(g)?g=g.toISOString():ar.isObject(g)&&(g=JSON.stringify(g)),i.push(no(o)+"="+no(g))}))}),a=i.join("&")}if(a){var c=r.indexOf("#");c!==-1&&(r=r.slice(0,c)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r},Pb=Ae;function on(){this.handlers=[]}on.prototype.use=function(r,t,n){return this.handlers.push({fulfilled:r,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};on.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)};on.prototype.forEach=function(r){Pb.forEach(this.handlers,function(n){n!==null&&r(n)})};var Ib=on,Db=Ae,Bb=function(r,t){Db.forEach(r,function(a,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(r[t]=a,delete r[i])})},Hs=function(r,t,n,a,i){return r.config=t,n&&(r.code=n),r.request=a,r.response=i,r.isAxiosError=!0,r.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},r},Nn,ao;function qs(){if(ao)return Nn;ao=1;var e=Hs;return Nn=function(t,n,a,i,c){var s=new Error(t);return e(s,n,a,i,c)},Nn}var jn,io;function kb(){if(io)return jn;io=1;var e=qs();return jn=function(t,n,a){var i=a.config.validateStatus;!a.status||!i||i(a.status)?t(a):n(e("Request failed with status code "+a.status,a.config,null,a.request,a))},jn}var Fn,oo;function Lb(){if(oo)return Fn;oo=1;var e=Ae;return Fn=e.isStandardBrowserEnv()?function(){return{write:function(n,a,i,c,s,d){var o=[];o.push(n+"="+encodeURIComponent(a)),e.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),e.isString(c)&&o.push("path="+c),e.isString(s)&&o.push("domain="+s),d===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(n){var a=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Fn}var Hn,so;function Ub(){return so||(so=1,Hn=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)}),Hn}var qn,co;function Nb(){return co||(co=1,qn=function(r,t){return t?r.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):r}),qn}var Mn,uo;function jb(){if(uo)return Mn;uo=1;var e=Ub(),r=Nb();return Mn=function(n,a){return n&&!e(a)?r(n,a):a},Mn}var Wn,fo;function Fb(){if(fo)return Wn;fo=1;var e=Ae,r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Wn=function(n){var a={},i,c,s;return n&&e.forEach(n.split(`
16
+ `),function(o){if(s=o.indexOf(":"),i=e.trim(o.substr(0,s)).toLowerCase(),c=e.trim(o.substr(s+1)),i){if(a[i]&&r.indexOf(i)>=0)return;i==="set-cookie"?a[i]=(a[i]?a[i]:[]).concat([c]):a[i]=a[i]?a[i]+", "+c:c}}),a},Wn}var zn,lo;function Hb(){if(lo)return zn;lo=1;var e=Ae;return zn=e.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),a;function i(c){var s=c;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return a=i(window.location.href),function(s){var d=e.isString(s)?i(s):s;return d.protocol===a.protocol&&d.host===a.host}}():function(){return function(){return!0}}(),zn}var Gn,ho;function vo(){if(ho)return Gn;ho=1;var e=Ae,r=kb(),t=Lb(),n=Fs,a=jb(),i=Fb(),c=Hb(),s=qs();return Gn=function(o){return new Promise(function(g,f){var v=o.data,y=o.headers,m=o.responseType;e.isFormData(v)&&delete y["Content-Type"];var x=new XMLHttpRequest;if(o.auth){var C=o.auth.username||"",u=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";y.Authorization="Basic "+btoa(C+":"+u)}var h=a(o.baseURL,o.url);x.open(o.method.toUpperCase(),n(h,o.params,o.paramsSerializer),!0),x.timeout=o.timeout;function p(){if(x){var _="getAllResponseHeaders"in x?i(x.getAllResponseHeaders()):null,A=!m||m==="text"||m==="json"?x.responseText:x.response,E={data:A,status:x.status,statusText:x.statusText,headers:_,config:o,request:x};r(g,f,E),x=null}}if("onloadend"in x?x.onloadend=p:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(p)},x.onabort=function(){x&&(f(s("Request aborted",o,"ECONNABORTED",x)),x=null)},x.onerror=function(){f(s("Network Error",o,null,x)),x=null},x.ontimeout=function(){var A="timeout of "+o.timeout+"ms exceeded";o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),f(s(A,o,o.transitional&&o.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",x)),x=null},e.isStandardBrowserEnv()){var b=(o.withCredentials||c(h))&&o.xsrfCookieName?t.read(o.xsrfCookieName):void 0;b&&(y[o.xsrfHeaderName]=b)}"setRequestHeader"in x&&e.forEach(y,function(A,E){typeof v>"u"&&E.toLowerCase()==="content-type"?delete y[E]:x.setRequestHeader(E,A)}),e.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),m&&m!=="json"&&(x.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&x.addEventListener("progress",o.onDownloadProgress),typeof o.onUploadProgress=="function"&&x.upload&&x.upload.addEventListener("progress",o.onUploadProgress),o.cancelToken&&o.cancelToken.promise.then(function(A){x&&(x.abort(),f(A),x=null)}),v||(v=null),x.send(v)})},Gn}var xe=Ae,xo=Bb,qb=Hs,Mb={"Content-Type":"application/x-www-form-urlencoded"};function po(e,r){!xe.isUndefined(e)&&xe.isUndefined(e["Content-Type"])&&(e["Content-Type"]=r)}function Wb(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=vo()),e}function zb(e,r,t){if(xe.isString(e))try{return(r||JSON.parse)(e),xe.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}var sn={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Wb(),transformRequest:[function(r,t){return xo(t,"Accept"),xo(t,"Content-Type"),xe.isFormData(r)||xe.isArrayBuffer(r)||xe.isBuffer(r)||xe.isStream(r)||xe.isFile(r)||xe.isBlob(r)?r:xe.isArrayBufferView(r)?r.buffer:xe.isURLSearchParams(r)?(po(t,"application/x-www-form-urlencoded;charset=utf-8"),r.toString()):xe.isObject(r)||t&&t["Content-Type"]==="application/json"?(po(t,"application/json"),zb(r)):r}],transformResponse:[function(r){var t=this.transitional,n=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,i=!n&&this.responseType==="json";if(i||a&&xe.isString(r)&&r.length)try{return JSON.parse(r)}catch(c){if(i)throw c.name==="SyntaxError"?qb(c,this,"E_JSON_PARSE"):c}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(r){return r>=200&&r<300}};sn.headers={common:{Accept:"application/json, text/plain, */*"}};xe.forEach(["delete","get","head"],function(r){sn.headers[r]={}});xe.forEach(["post","put","patch"],function(r){sn.headers[r]=xe.merge(Mb)});var qa=sn,Gb=Ae,Kb=qa,Yb=function(r,t,n){var a=this||Kb;return Gb.forEach(n,function(c){r=c.call(a,r,t)}),r},Kn,go;function Ms(){return go||(go=1,Kn=function(r){return!!(r&&r.__CANCEL__)}),Kn}var mo=Ae,Yn=Yb,Vb=Ms(),Xb=qa;function Vn(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Jb=function(r){Vn(r),r.headers=r.headers||{},r.data=Yn.call(r,r.data,r.headers,r.transformRequest),r.headers=mo.merge(r.headers.common||{},r.headers[r.method]||{},r.headers),mo.forEach(["delete","get","head","post","put","patch","common"],function(a){delete r.headers[a]});var t=r.adapter||Xb.adapter;return t(r).then(function(a){return Vn(r),a.data=Yn.call(r,a.data,a.headers,r.transformResponse),a},function(a){return Vb(a)||(Vn(r),a&&a.response&&(a.response.data=Yn.call(r,a.response.data,a.response.headers,r.transformResponse))),Promise.reject(a)})},be=Ae,Ws=function(r,t){t=t||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],c=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function d(f,v){return be.isPlainObject(f)&&be.isPlainObject(v)?be.merge(f,v):be.isPlainObject(v)?be.merge({},v):be.isArray(v)?v.slice():v}function o(f){be.isUndefined(t[f])?be.isUndefined(r[f])||(n[f]=d(void 0,r[f])):n[f]=d(r[f],t[f])}be.forEach(a,function(v){be.isUndefined(t[v])||(n[v]=d(void 0,t[v]))}),be.forEach(i,o),be.forEach(c,function(v){be.isUndefined(t[v])?be.isUndefined(r[v])||(n[v]=d(void 0,r[v])):n[v]=d(void 0,t[v])}),be.forEach(s,function(v){v in t?n[v]=d(r[v],t[v]):v in r&&(n[v]=d(void 0,r[v]))});var l=a.concat(i).concat(c).concat(s),g=Object.keys(r).concat(Object.keys(t)).filter(function(v){return l.indexOf(v)===-1});return be.forEach(g,o),n};const Zb="axios",Qb="0.21.4",e2="Promise based HTTP client for the browser and node.js",r2="index.js",t2={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},n2={type:"git",url:"https://github.com/axios/axios.git"},a2=["xhr","http","ajax","promise","node"],i2="Matt Zabriskie",o2="MIT",s2={url:"https://github.com/axios/axios/issues"},c2="https://axios-http.com",u2={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},f2={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},l2="dist/axios.min.js",d2="dist/axios.min.js",h2="./index.d.ts",v2={"follow-redirects":"^1.14.0"},x2=[{path:"./dist/axios.min.js",threshold:"5kB"}],p2={name:Zb,version:Qb,description:e2,main:r2,scripts:t2,repository:n2,keywords:a2,author:i2,license:o2,bugs:s2,homepage:c2,devDependencies:u2,browser:f2,jsdelivr:l2,unpkg:d2,typings:h2,dependencies:v2,bundlesize:x2};var zs=p2,Ma={};["object","boolean","number","function","string","symbol"].forEach(function(e,r){Ma[e]=function(n){return typeof n===e||"a"+(r<1?"n ":" ")+e}});var yo={},g2=zs.version.split(".");function Gs(e,r){for(var t=r?r.split("."):g2,n=e.split("."),a=0;a<3;a++){if(t[a]>n[a])return!0;if(t[a]<n[a])return!1}return!1}Ma.transitional=function(r,t,n){var a=t&&Gs(t);function i(c,s){return"[Axios v"+zs.version+"] Transitional option '"+c+"'"+s+(n?". "+n:"")}return function(c,s,d){if(r===!1)throw new Error(i(s," has been removed in "+t));return a&&!yo[s]&&(yo[s]=!0,console.warn(i(s," has been deprecated since v"+t+" and will be removed in the near future"))),r?r(c,s,d):!0}};function m2(e,r,t){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),a=n.length;a-- >0;){var i=n[a],c=r[i];if(c){var s=e[i],d=s===void 0||c(s,i,e);if(d!==!0)throw new TypeError("option "+i+" must be "+d);continue}if(t!==!0)throw Error("Unknown option "+i)}}var y2={isOlderVersion:Gs,assertOptions:m2,validators:Ma},Ks=Ae,b2=Fs,bo=Ib,_o=Jb,cn=Ws,Ys=y2,ir=Ys.validators;function jr(e){this.defaults=e,this.interceptors={request:new bo,response:new bo}}jr.prototype.request=function(r){typeof r=="string"?(r=arguments[1]||{},r.url=arguments[0]):r=r||{},r=cn(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var t=r.transitional;t!==void 0&&Ys.assertOptions(t,{silentJSONParsing:ir.transitional(ir.boolean,"1.0.0"),forcedJSONParsing:ir.transitional(ir.boolean,"1.0.0"),clarifyTimeoutError:ir.transitional(ir.boolean,"1.0.0")},!1);var n=[],a=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(a=a&&f.synchronous,n.unshift(f.fulfilled,f.rejected))});var i=[];this.interceptors.response.forEach(function(f){i.push(f.fulfilled,f.rejected)});var c;if(!a){var s=[_o,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(i),c=Promise.resolve(r);s.length;)c=c.then(s.shift(),s.shift());return c}for(var d=r;n.length;){var o=n.shift(),l=n.shift();try{d=o(d)}catch(g){l(g);break}}try{c=_o(d)}catch(g){return Promise.reject(g)}for(;i.length;)c=c.then(i.shift(),i.shift());return c};jr.prototype.getUri=function(r){return r=cn(this.defaults,r),b2(r.url,r.params,r.paramsSerializer).replace(/^\?/,"")};Ks.forEach(["delete","get","head","options"],function(r){jr.prototype[r]=function(t,n){return this.request(cn(n||{},{method:r,url:t,data:(n||{}).data}))}});Ks.forEach(["post","put","patch"],function(r){jr.prototype[r]=function(t,n,a){return this.request(cn(a||{},{method:r,url:t,data:n}))}});var _2=jr,Xn,Eo;function Vs(){if(Eo)return Xn;Eo=1;function e(r){this.message=r}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,Xn=e,Xn}var Jn,wo;function E2(){if(wo)return Jn;wo=1;var e=Vs();function r(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(c){n=c});var a=this;t(function(c){a.reason||(a.reason=new e(c),n(a.reason))})}return r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var n,a=new r(function(c){n=c});return{token:a,cancel:n}},Jn=r,Jn}var Zn,$o;function w2(){return $o||($o=1,Zn=function(r){return function(n){return r.apply(null,n)}}),Zn}var Qn,Ao;function $2(){return Ao||(Ao=1,Qn=function(r){return typeof r=="object"&&r.isAxiosError===!0}),Qn}var Co=Ae,A2=Us,et=_2,C2=Ws,S2=qa;function Xs(e){var r=new et(e),t=A2(et.prototype.request,r);return Co.extend(t,et.prototype,r),Co.extend(t,r),t}var De=Xs(S2);De.Axios=et;De.create=function(r){return Xs(C2(De.defaults,r))};De.Cancel=Vs();De.CancelToken=E2();De.isCancel=Ms();De.all=function(r){return Promise.all(r)};De.spread=w2();De.isAxiosError=$2();vb.exports=De;qt.default=De;(function(e){e.exports=qt})(hb);const Fr=Io(pa);function Wa(e){const{status:r,data:t}=e.response;switch(r){case 400:console.log("Error: invalid request");break;case 401:console.log("Error: not authenticated");break;case 500:console.log("Error: server problems");break}throw t&&console.log(t),e}globalThis&&globalThis.__awaiter;globalThis&&globalThis.__awaiter;var mr=globalThis&&globalThis.__awaiter||function(e,r,t,n){function a(i){return i instanceof t?i:new t(function(c){c(i)})}return new(t||(t=Promise))(function(i,c){function s(l){try{o(n.next(l))}catch(g){c(g)}}function d(l){try{o(n.throw(l))}catch(g){c(g)}}function o(l){l.done?i(l.value):a(l.value).then(s,d)}o((n=n.apply(e,r||[])).next())})};let Ee=null,un=-1;function T2(e,r,t,n,a){return mr(this,void 0,void 0,function*(){let i=null;try{return i=yield Fr({method:"post",url:`${e}/auth-oauth2/oauth/token`,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Authorization:`Basic ${t}`,"X-Tenant":r},data:`username=${n}&password=${a}&grant_type=password&scope=read`}),Ee=i.data,un=new Date().getTime(),!0}catch{return!1}})}function R2(e,r,t,n){return mr(this,void 0,void 0,function*(){let a=null;try{const i={method:"post",url:`${e}/auth-oauth2/oauth/token`,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Authorization:`Basic ${t}`,"X-Tenant":r},data:`refresh_token=${n}&grant_type=refresh_token`};return a=yield Fr(i),Ee=a.data,un=new Date().getTime(),!0}catch{return!1}})}const O2=(e,r,t=!1)=>mr(void 0,void 0,void 0,function*(){if(!t&&Ee&&Ee.access_token){const i=new Date().getTime()-un,c=parseInt(Ee.expires_in)*1e3*.95;if(i<c)return{token:Ee.access_token,UUID:Ee.UUID}}let n=!1;const a=yield r.getRefreshToken(e.TENANT);return a&&(n=yield R2(e.BASE_URL,e.TENANT,e.BASIC_AUTH,a)),!n&&e.anonymousAuth&&(n=yield T2(e.BASE_URL,e.TENANT,e.BASIC_AUTH,"anonymous","")),!n||!Ee?{token:"",UUID:""}:(r.setRefreshToken(e.TENANT,Ee.refresh_token),{token:Ee.access_token,UUID:Ee.UUID})});function P2(e,r,t=!1){return()=>O2(e,r,t)}function I2(e,r,t,n=new Date().getTime()){Ee=r,un=n,t.setRefreshToken(e,Ee.refresh_token)}function D2(e,r){r.clearRefreshToken(e),Ee=null}function ya(e,r){return mr(this,void 0,void 0,function*(){const t=yield Fr({method:"get",url:`${e}/auth-api/api/me`,headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).catch(Wa);return t?t.data:null})}function B2(e,r,t){return mr(this,void 0,void 0,function*(){const n=yield Fr.post(`${e}/auth-api/api/me`,t,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).catch(Wa);return n&&n.data||!1})}function k2(e,r){return mr(this,void 0,void 0,function*(){const{login:t}=yield ya(e,r),n=yield Fr.request({url:`${e}/auth-api/api/me`,method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},data:{login:t}}).catch(Wa);return n&&n.data||!1})}globalThis&&globalThis.__awaiter;if(typeof TextEncoder!="function"){const e=require("text-encoding");global.TextEncoder=e.TextEncoder,global.TextDecoder=e.TextDecoder}globalThis&&globalThis.__awaiter;function ba(e){this.message=e}ba.prototype=new Error,ba.prototype.name="InvalidCharacterError";var So=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var r=String(e).replace(/=+$/,"");if(r.length%4==1)throw new ba("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,n,a=0,i=0,c="";n=r.charAt(i++);~n&&(t=a%4?64*t+n:n,a++%4)?c+=String.fromCharCode(255&t>>(-2*a&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return c};function L2(e){var r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(So(t).replace(/(.)/g,function(n,a){var i=a.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}(r)}catch{return So(r)}}function Mt(e){this.message=e}function U2(e,r){if(typeof e!="string")throw new Mt("Invalid token specified");var t=(r=r||{}).header===!0?0:1;try{return JSON.parse(L2(e.split(".")[t]))}catch(n){throw new Mt("Invalid token specified: "+n.message)}}Mt.prototype=new Error,Mt.prototype.name="InvalidTokenError";var Me=(e=>(e.GOOGLE="google",e.APPLE="apple",e.FACEBOOK="facebook",e))(Me||{});const Js={loggedIn:!1,UUID:"",resolved:!1},za=Br.AuthContext,N2=()=>re.useContext(za),Zs=Br.ConfigContext,Qs=()=>re.useContext(Zs),j2=Je("Device",{web:()=>Promise.resolve().then(()=>require("./web-e111688b.js")).then(e=>new e.DeviceWeb)});function F2(){const e=Po.useNavigate();return{push:t=>e(t),replace:t=>e(t,{replace:!0})}}var Wt={},H2={get exports(){return Wt},set exports(e){Wt=e}},Tr={};/**
17
17
  * @license React
18
18
  * react-jsx-runtime.production.min.js
19
19
  *
@@ -40,4 +40,4 @@ Check the render method of \``+$+"`."}return""}}function vn($){{if($!==void 0){v
40
40
  Check your code at `+j+":"+M+"."}return""}}var Ar={};function xn($){{var j=Wr();if(!j){var M=typeof $=="string"?$:$.displayName||$.name;M&&(j=`
41
41
 
42
42
  Check the top-level render call using <`+M+">.")}return j}}function zr($,j){{if(!$._store||$._store.validated||$.key!=null)return;$._store.validated=!0;var M=xn(j);if(Ar[M])return;Ar[M]=!0;var G="";$&&$._owner&&$._owner!==Er.current&&(G=" It was passed a child from "+T($._owner.type)+"."),qe($),u('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',M,G),qe(null)}}function Cr($,j){{if(typeof $!="object")return;if(le($))for(var M=0;M<$.length;M++){var G=$[M];$r(G)&&zr(G,j)}else if($r($))$._store&&($._store.validated=!0);else if($){var ne=x($);if(typeof ne=="function"&&ne!==$.entries)for(var ie=ne.call($),Z;!(Z=ie.next()).done;)$r(Z.value)&&zr(Z.value,j)}}}function pn($){{var j=$.type;if(j==null||typeof j=="string")return;var M;if(typeof j=="function")M=j.propTypes;else if(typeof j=="object"&&(j.$$typeof===d||j.$$typeof===g))M=j.propTypes;else return;if(M){var G=T(j);ae(M,$.props,"prop",G,$)}else if(j.PropTypes!==void 0&&!er){er=!0;var ne=T(j);u("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ne||"Unknown")}typeof j.getDefaultProps=="function"&&!j.getDefaultProps.isReactClassApproved&&u("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Gr($){{for(var j=Object.keys($.props),M=0;M<j.length;M++){var G=j[M];if(G!=="children"&&G!=="key"){qe($),u("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",G),qe(null);break}}$.ref!==null&&(qe($),u("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}function me($,j,M,G,ne,ie){{var Z=w($);if(!Z){var X="";($===void 0||typeof $=="object"&&$!==null&&Object.keys($).length===0)&&(X+=" 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 _e=vn(ne);_e?X+=_e:X+=Wr();var ue;$===null?ue="null":le($)?ue="array":$!==void 0&&$.$$typeof===r?(ue="<"+(T($.type)||"Unknown")+" />",X=" Did you accidentally export a JSX literal instead of a component?"):ue=typeof $,u("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ue,X)}var fe=Mr($,j,M,ne,ie);if(fe==null)return fe;if(Z){var Te=j.children;if(Te!==void 0)if(G)if(le(Te)){for(var rr=0;rr<Te.length;rr++)Cr(Te[rr],$);Object.freeze&&Object.freeze(Te)}else u("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 Cr(Te,$)}return $===n?Gr(fe):pn(fe),fe}}function Ue($,j,M){return me($,j,M,!0)}function Kr($,j,M){return me($,j,M,!1)}var gn=Kr,rc=Ue;Rr.Fragment=n,Rr.jsx=gn,Rr.jsxs=rc}()),Rr}(function(e){process.env.NODE_ENV==="production"?e.exports=q2():e.exports=M2()})(H2);const Vr=Wt.jsx,Oo=Wt.Fragment;let we;j2.getInfo().then(e=>we=e.platform);exports.authProviderGlobal=void 0;var ec=(e=>(e.UNINITIALIZED="uninitialized",e.INITIALIZED="index",e.EMAIL_REGISTER_VERIFY="email-register-verify",e.EMAIL_REGISTER_FINAL="email-register-final",e.EMAIL_SIGN_IN="email-sign-in",e.EMAIL_REGISTER_INIT="email-register-init",e.EMAIL_PASSWORD_RESET="email-password-reset",e.EMAIL_PASSWORD_RESET_VERIFY="email-password-reset-verify",e.EMAIL_PASSWORD_RESET_FINAL="email-password-reset-final",e.MERGE_ACCOUNTS="merge-accounts",e.MERGE_ACCOUNT="merge-account",e.EMAIL_CONNECT_VERIFY="email-connect-verify",e.EMAIL_CONNECT_FINAL="email-connect-final",e.EXT_AUTH_REGISTER="ext-auth-register",e.PKCE_SUCCESS="success-pkce",e.SUCCESS="success",e.ERROR="error",e))(ec||{});const W2={stage:"uninitialized"},Ga=re.createContext(W2),z2=()=>re.useContext(Ga);function G2(e,r){if(!e||e.length===0)return!0;const t=r.map(a=>a.role);return e.filter(a=>t.includes(a)).length>0}function K2(e){const r=Math.min(window.innerWidth,500),t=Math.min(window.innerHeight,700),n=Math.round((window.innerWidth-r)/2),a=Math.round((window.innerHeight-t)/2);window.open(e,"_blank",`popup=true,width=${r},height=${t},top=${a},left=${n}`)}function Y2({setShowWelcomeScreen:e,language:r,...t}){const n=Ls,a=Qs(),i=Po.useLocation(),c=F2(),[s,d]=re.useState(!1);if(!a)return Vr(Oo,{children:"Configuration context should be provided"});if(!i)return Vr(Oo,{children:"React-router location context should be provided"});const o=P2({BASE_URL:a.baseUrl,TENANT:a.tenant,BASIC_AUTH:a.basicAuth,anonymousAuth:s},or,!1);exports.authProviderGlobal=o,re.useEffect(()=>{async function E(){s&&(await exports.authProviderGlobal(),await A())}E()},[s]);const[l,g]=re.useState({...Js,authProvider:o,deleteUser:h}),[f,v]=re.useState(t.successPath),y=re.useRef(f),[m,x]=re.useState({stage:"uninitialized",continueLogin:C,initSession:_});async function C(E,R){var B,T,P,I,N,U,F,q,H,O,D,k,L,z,Y,te;console.log("STAGE",E),console.log("params",R);let w=E,S="post";switch(E){case"uninitialized":console.log("GENERATING PKCE");const{code_verifier:W,code_challenge:J}=xa(Ft.UriEncodedBase64);n.set("codeVerifier",W),w=`auth-init/${a==null?void 0:a.tenantAuthConfig}-${we}?&codeChallenge=${J}`,S="get";break;case"index":w="email-start";break;case"ext-auth-register":w="register";break;case"merge-account":(B=t.onProcessing)==null||B.call(t);break;case"email-password-reset":S="get";break;case Me.APPLE:const de=(T=(await _()).data.data)==null?void 0:T.strategies,ce=de==null?void 0:de.find(ae=>ae.name==="apple");if(!ce)throw new Error('Strategy "apple" not found server side');const he=Ir(32);if(await n.set("oauthState-apple",he),we==="ios"){const ae={clientId:ce.clientId,redirectURI:`${a==null?void 0:a.baseUrl}/user-service/auth/apple/callback/${a==null?void 0:a.tenantAuthConfig}-${we}`,scopes:"email",state:he};try{const ee=await fb.authorize(ae);console.log("sign in with apple result",ee),w=`auth/apple/callback?code=${ee.response.authorizationCode}&id_token=${ee.response.identityToken}`}catch(ee){(P=t.onError)==null||P.call(t,ee);return}S="get"}if(["android","web"].includes(we)){const ae="https://appleid.apple.com/auth/authorize",ee=`${a==null?void 0:a.baseUrl}/user-service/auth/apple/callback/${a==null?void 0:a.tenantAuthConfig}-${we}`;R={scope:"email",response_type:"code id_token",response_mode:"form_post"};const le=Ne.stringifyUrl({url:ae,query:{client_id:ce.clientId,redirect_uri:ee,state:he,...R}});K2(le);return}break;case Me.GOOGLE:const Ce=(U=(N=(I=(await _()).data.data)==null?void 0:I.strategies)==null?void 0:N.find)==null?void 0:U.call(N,ae=>ae.name==="google");if(!Ce)throw new Error('Strategy "google" not found server side');if(we==="web"){const ae=Ir(32);await n.set("oauthState-google",ae);const ee=Ne.stringifyUrl({url:"https://accounts.google.com/o/oauth2/v2/auth",query:{client_id:Ce.clientId,redirect_uri:`${a==null?void 0:a.host}${t.authPath}/google-callback`,response_type:"code",state:ae,scope:"email",prompt:"consent"}});window.location.replace(ee);return}(we==="ios"||we==="android")&&await db.signIn().then(async ae=>{console.log("google user",JSON.stringify(ae,null,4)),w=`auth/google/callback?code=${ae.serverAuthCode}&id_token=${ae.authentication.idToken}`,S="get"}).catch(ae=>{var ee;(ee=t.onError)==null||ee.call(t,ae),console.warn("google sign in error",JSON.stringify(ae,null,4))});break;case Me.FACEBOOK:if(we==="ios"){const ae=["email"],ee=await lb.login({permissions:ae});if(ee!=null&&ee.accessToken)console.log(`Facebook access token is ${ee.accessToken.token}`),w="auth/facebook/after-login",R={access_token:ee.accessToken.token,user_id:ee.accessToken.userId},S="POST";else{(F=t.onError)==null||F.call(t,new Error("Facebook login did not return accessToken"));return}}const Be=(O=(H=(q=(await _()).data.data)==null?void 0:q.strategies)==null?void 0:H.find)==null?void 0:O.call(H,ae=>ae.name==="facebook");if(!Be)throw new Error('Strategy "facebook" not found server side');const Oe=Ir(32);await n.set("oauthState-facebook",Oe);const Se=Ne.stringifyUrl({url:"https://www.facebook.com/v14.0/dialog/oauth",query:{redirect_uri:`${a==null?void 0:a.host}${t.authPath}/facebook-callback`,client_id:Be.clientId,display:"popup",response_type:"code",scope:"email",stateFb:Oe}});if(console.log(Se),we==="web"){window.location.replace(Se);return}window.open(Se,"_blank","popup=true");return}try{const W=await Pr({method:S,url:`${a==null?void 0:a.baseUrl}/user-service/${w}`,headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded","Accept-Language":r},data:Ne.stringify(R),withCredentials:!0});console.log("RES",JSON.stringify(W,null,4));const{stage:J,data:V}=W.data;let de=J;switch(J){case"error":de="uninitialized";break;case"success":de="uninitialized";break}if((E=="ext-auth-register"||E=="email-register-final")&&(J==="success"||J==="success-pkce")&&((D=t.onUserRegistered)==null||D.call(t)),x(ce=>({...ce,stage:de,email:V==null?void 0:V.email,message:V==null?void 0:V.message,firstName:V==null?void 0:V.firstName,consents:V==null?void 0:V.consents})),[Me.APPLE,Me.FACEBOOK,Me.GOOGLE].includes(E)&&c.replace(t.loginPath),V!=null&&V.message&&((k=t.onError)==null||k.call(t,V.message)),J==="email-connect-verify"&&E==="email-connect-verify"&&((L=t.onError)==null||L.call(t,"Invalid code")),E==="email-register-init"&&((z=t.onEmailSent)==null||z.call(t)),J==="error"&&((Y=t.onError)==null||Y.call(t,{})),J==="success-pkce"){const{requestId:ce}=W.data;c.replace(`${t.authPath}?requestId=${ce}`)}J==="success"&&(console.log("EMAIL LOGIN SUCCESS"),await or.setRefreshToken(W.data.data.authData.TENANT,W.data.data.authData.refresh_token),await A())}catch(W){console.log(JSON.stringify(W,null,4)),(te=t.onError)==null||te.call(t,W)}}function u(E){console.log("--- sign out ---"),E||c.push("/"),x(R=>({...R,stage:"uninitialized"})),a&&D2(a.tenant,or),g({loggedIn:!1,UUID:"",resolved:!0,authProvider:o,deleteUser:h}),d(!1)}async function h(){const{token:E}=await o();if(!a)throw new Error("Missing config context");return k2(a==null?void 0:a.baseUrl,E)}async function p(E){const{token:R}=await o();if(R&&a)try{const S={...await ya(a==null?void 0:a.baseUrl,R),...E},B=await B2(a==null?void 0:a.baseUrl,R,S);return B&&g(T=>({...T,userData:S})),B}catch(w){return console.error(w),!1}return!1}async function b(){const{code_verifier:E,code_challenge:R}=xa(Ft.UriEncodedBase64);return await n.set("codeVerifier",E),`${a==null?void 0:a.baseUrl}/user-service/auth-init/${a==null?void 0:a.tenantAuthConfig}-${we}?codeChallenge=${R}`}async function _(){var B;console.log("--INIT USER-SERVICE SESSION");const E=await b(),R=await Pr.get(E,{withCredentials:!0,headers:{accept:"application/json","Accept-Language":r}}),w=(B=R.data.data)==null?void 0:B.strategies,S=R.data.stage;return x(T=>({...T,strategies:w,stage:S||"uninitialized"})),R}async function A(E){var w,S,B;console.log("GET USER DATA");const{isOnInit:R=!1}=E||{};try{const{UUID:T,token:P}=await o();if(P&&(a!=null&&a.baseUrl)){const{user_name:I}=U2(P),N=I==="anonymous";if(R&&N)return u(),!1;(w=t.onProcessing)==null||w.call(t,void 0,N);const U=await ya(a==null?void 0:a.baseUrl,P);return t.roles&&!G2(t.roles,U.roles)?(console.log("--- USER HAS NO REQUIRED ROLES ----- "),u(),!1):((S=t.onSuccess)==null||S.call(t,N),y.current&&(console.log("successPathRef.current",y.current),c.replace(y.current)),g({loggedIn:!0,isAnonymousUser:N,email:U.login,UUID:T,authProvider:o,signOut:u,resolved:!0,userData:U,updateUserData:p,deleteUser:h}),!0)}else return g(I=>({...I,resolved:!0})),!1}catch(T){return u(),(B=t.onError)==null||B.call(t,T),!1}}return re.useEffect(()=>{l.loggedIn?v(t.successPath):y.current=f},[f,l.loggedIn]),re.useEffect(()=>{console.log("STAGE",m.stage)},[m.stage]),re.useEffect(()=>{console.log("AUTH WRAPPER init",i.pathname),x(E=>({...E,stage:"uninitialized",continueLogin:C,initSession:_,resolved:!1})),A({isOnInit:!0}).then(E=>E?!0:n.get("onboarding_complete").then(R=>R==="true")).then(E=>{var R;E||e==null||e(!0),console.log("AUTH RESOLVED"),(R=t.onAuthResolved)==null||R.call(t)})},[]),re.useEffect(()=>{var w,S,B;if(console.log("AuthWrapper LOCATION PATHNAME",i.pathname),i.pathname===t.authPath){console.log("PKCE detected");const{search:T}=i,{query:{requestId:P,stage:I}}=Ne.parseUrl(T);console.log("PKCE stage",I),(w=t.onProcessing)==null||w.call(t),n.get("codeVerifier").then(N=>{const U={requestId:P,codeVerifier:N},F=`${a.baseUrl}/user-service/get-token/${a.tenantAuthConfig}-${we}`;return Pr.post(F,U)}).then(N=>{const{data:U}=N;return console.log("AXIOS RESPONSE DATA",U),I2(a.tenant,U,or),A()}).catch(N=>{var U;console.error("PKCE ERROR",JSON.stringify(N)),c.replace("/"),(U=t.onError)==null||U.call(t,N),g({loggedIn:!1,UUID:"",resolved:!0,authProvider:o,deleteUser:h})})}const E=new RegExp("^"+t.authPath+/\/[a-z]+-callback\/?$/.source),R=i.pathname.match(E);if(R){(S=t.onProcessing)==null||S.call(t),console.log(R);const T=R[0].replace("-callback","").replace(t.authPath+"/","");console.log("PROVIDER",T);try{const{error:P}=Ne.parse(i.search);console.log("SEARCH",i.search);const I=async()=>{var H;const N=`${a.baseUrl}/user-service/auth/${T}/callback${i.search}`,U=await Pr.get(N,{withCredentials:!0,headers:{accept:"application/json","Accept-Language":r}});console.log("User-service social provider res",JSON.stringify(U,null,4));const{stage:F,requestId:q}=U.data;if(F==="success-pkce"){c.replace(`${t.authPath}?requestId=${q}`);return}if(["merge-accounts","ext-auth-register"].includes(F)){c.replace(`${t.loginPath}`),x(O=>({...O,stage:F,...U.data.data})),(H=t.onProcessing)==null||H.call(t,!1);return}throw new Error(`Login failure - unknown stage "${F}"`)};if(P)throw new Error(Array.isArray(P)?P.join("-"):P);I().catch(N=>{var U;console.error(N),(U=t.onError)==null||U.call(t,N)})}catch(P){console.error(JSON.stringify(P,null,4)),(B=t.onError)==null||B.call(t,P)}}if(!l.loggedIn&&i.pathname===t.tokenLoginPath){const{search:T}=i,{query:{refreshToken:P}}=Ne.parseUrl(T);P&&or.setRefreshToken(a.tenant,P).then(()=>{A()})}},[i.pathname]),Vr(za.Provider,{value:l,children:Vr(Ga.Provider,{value:{...m,setSuccessPath:v,setIsAnonymousUser:d},children:t.children})})}exports.AuthContext=za;exports.AuthProvider=Y2;exports.CodeChallengeEncoding=Ft;exports.ConfigContext=Zs;exports.ELoginStage=ec;exports.LoginContext=Ga;exports.LoginProvider=Me;exports.WebPlugin=ja;exports.addDiscounts=rs;exports.calculateDisplayPrice=og;exports.defaultAuth=Js;exports.formatPrice=Lv;exports.generateCodeChallenge=Na;exports.generateCodeVerifier=Ir;exports.generatePkceChallenge=xa;exports.getGroupedBucketLines=cg;exports.getMediaUrl=Ps;exports.getProductAcronym=Uv;exports.getRandomValues=Bs;exports.groupOrderLines=Pa;exports.isChannelOpen=Or;exports.isProductEnabled=ts;exports.secureStorage=Ls;exports.summarizeLineDiscounts=kv;exports.tokenStorageHandler=or;exports.useAuthContext=N2;exports.useAvailability=ns;exports.useCms=nn;exports.useCmsInConfigContext=Cm;exports.useConfigContext=Qs;exports.useDisplayPrice=ds;exports.useGroupOrderLines=sg;exports.useInterval=zt;exports.useKioskChannelsAvailability=Om;exports.useKioskMediaCms=Rs;exports.useKioskMediaCmsWithContext=Tm;exports.useLocalizedVenueMedia=Sm;exports.useLocalizedVenueMediaLegacy=Ts;exports.useLoginContext=z2;exports.useMediaUrl=Nm;exports.useMenu=jv;exports.useOnClickOutside=Rm;exports.useVenueCms=Ss;exports.verifyChallenge=Vy;
43
- //# sourceMappingURL=index-634a7a89.js.map
43
+ //# sourceMappingURL=index-2f5eed0e.js.map