@orderingstack/front-hooks 3.5.0 → 3.6.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.
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2278 -2154
- package/dist/index.es.js.map +1 -1
- package/dist/src/useAvailability.d.ts +3 -2
- package/dist/src/useAvailability.d.ts.map +1 -1
- package/dist/src/useMediaUrl.d.ts +1 -3
- package/dist/src/useMediaUrl.d.ts.map +1 -1
- package/package.json +4 -3
package/dist/index.cjs.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var Y=require("react"),Nt=require("@orderingstack/ordering-core-react"),Rn=require("react-i18next");function Le(e,r){const t=Y.useRef(),[n,a]=Y.useState(null);return Y.useEffect(()=>{t.current=e},[e]),Y.useEffect(()=>{function i(){var s;(s=t.current)==null||s.call(t)}if(r!==null){const s=setInterval(i,r);return a(s),()=>{a(null),clearInterval(s)}}},[r]),()=>{n&&clearInterval(n)}}var X=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Nn=Object.prototype;function Pn(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||Nn;return e===t}var xe=Pn;function Un(e,r){return function(t){return e(r(t))}}var Pt=Un,Mn=Pt,Fn=Mn(Object.keys,Object),Bn=Fn,Hn=xe,Yn=Bn,Gn=Object.prototype,qn=Gn.hasOwnProperty;function Wn(e){if(!Hn(e))return Yn(e);var r=[];for(var t in Object(e))qn.call(e,t)&&t!="constructor"&&r.push(t);return r}var Ut=Wn,Kn=typeof X=="object"&&X&&X.Object===Object&&X,Mt=Kn,Vn=Mt,kn=typeof self=="object"&&self&&self.Object===Object&&self,Jn=Vn||kn||Function("return this")(),K=Jn,zn=K,Zn=zn.Symbol,Re=Zn,Dr=Re,Ft=Object.prototype,Xn=Ft.hasOwnProperty,Qn=Ft.toString,he=Dr?Dr.toStringTag:void 0;function ea(e){var r=Xn.call(e,he),t=e[he];try{e[he]=void 0;var n=!0}catch{}var a=Qn.call(e);return n&&(r?e[he]=t:delete e[he]),a}var ra=ea,ta=Object.prototype,na=ta.toString;function aa(e){return na.call(e)}var ia=aa,jr=Re,sa=ra,oa=ia,ua="[object Null]",fa="[object Undefined]",Lr=jr?jr.toStringTag:void 0;function ca(e){return e==null?e===void 0?fa:ua:Lr&&Lr in Object(e)?sa(e):oa(e)}var Ne=ca;function la(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var $e=la,da=Ne,ha=$e,pa="[object AsyncFunction]",va="[object Function]",ga="[object GeneratorFunction]",$a="[object Proxy]";function ya(e){if(!ha(e))return!1;var r=da(e);return r==va||r==ga||r==pa||r==$a}var Bt=ya,ma=K,ba=ma["__core-js_shared__"],_a=ba,We=_a,xr=function(){var e=/[^.]+$/.exec(We&&We.keys&&We.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Aa(e){return!!xr&&xr in e}var Ea=Aa,Ta=Function.prototype,Oa=Ta.toString;function Sa(e){if(e!=null){try{return Oa.call(e)}catch{}try{return e+""}catch{}}return""}var Ht=Sa,wa=Bt,Ia=Ea,Ca=$e,Da=Ht,ja=/[\\^$.*+?()[\]{}|]/g,La=/^\[object .+?Constructor\]$/,xa=Function.prototype,Ra=Object.prototype,Na=xa.toString,Pa=Ra.hasOwnProperty,Ua=RegExp("^"+Na.call(Pa).replace(ja,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ma(e){if(!Ca(e)||Ia(e))return!1;var r=wa(e)?Ua:La;return r.test(Da(e))}var Fa=Ma;function Ba(e,r){return e==null?void 0:e[r]}var Ha=Ba,Ya=Fa,Ga=Ha;function qa(e,r){var t=Ga(e,r);return Ya(t)?t:void 0}var Q=qa,Wa=Q,Ka=K,Va=Wa(Ka,"DataView"),ka=Va,Ja=Q,za=K,Za=Ja(za,"Map"),lr=Za,Xa=Q,Qa=K,ei=Xa(Qa,"Promise"),ri=ei,ti=Q,ni=K,ai=ti(ni,"Set"),ii=ai,si=Q,oi=K,ui=si(oi,"WeakMap"),fi=ui,Xe=ka,Qe=lr,er=ri,rr=ii,tr=fi,Yt=Ne,ie=Ht,Rr="[object Map]",ci="[object Object]",Nr="[object Promise]",Pr="[object Set]",Ur="[object WeakMap]",Mr="[object DataView]",li=ie(Xe),di=ie(Qe),hi=ie(er),pi=ie(rr),vi=ie(tr),Z=Yt;(Xe&&Z(new Xe(new ArrayBuffer(1)))!=Mr||Qe&&Z(new Qe)!=Rr||er&&Z(er.resolve())!=Nr||rr&&Z(new rr)!=Pr||tr&&Z(new tr)!=Ur)&&(Z=function(e){var r=Yt(e),t=r==ci?e.constructor:void 0,n=t?ie(t):"";if(n)switch(n){case li:return Mr;case di:return Rr;case hi:return Nr;case pi:return Pr;case vi:return Ur}return r});var ye=Z;function gi(e){return e!=null&&typeof e=="object"}var se=gi,$i=Ne,yi=se,mi="[object Arguments]";function bi(e){return yi(e)&&$i(e)==mi}var _i=bi,Fr=_i,Ai=se,Gt=Object.prototype,Ei=Gt.hasOwnProperty,Ti=Gt.propertyIsEnumerable,Oi=Fr(function(){return arguments}())?Fr:function(e){return Ai(e)&&Ei.call(e,"callee")&&!Ti.call(e,"callee")},qt=Oi,Si=Array.isArray,me=Si,wi=9007199254740991;function Ii(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=wi}var Wt=Ii,Ci=Bt,Di=Wt;function ji(e){return e!=null&&Di(e.length)&&!Ci(e)}var dr=ji,ae={exports:{}};function Li(){return!1}var xi=Li;(function(e,r){var t=K,n=xi,a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,f=s?t.Buffer:void 0,o=f?f.isBuffer:void 0,v=o||n;e.exports=v})(ae,ae.exports);var Ri=Ne,Ni=Wt,Pi=se,Ui="[object Arguments]",Mi="[object Array]",Fi="[object Boolean]",Bi="[object Date]",Hi="[object Error]",Yi="[object Function]",Gi="[object Map]",qi="[object Number]",Wi="[object Object]",Ki="[object RegExp]",Vi="[object Set]",ki="[object String]",Ji="[object WeakMap]",zi="[object ArrayBuffer]",Zi="[object DataView]",Xi="[object Float32Array]",Qi="[object Float64Array]",es="[object Int8Array]",rs="[object Int16Array]",ts="[object Int32Array]",ns="[object Uint8Array]",as="[object Uint8ClampedArray]",is="[object Uint16Array]",ss="[object Uint32Array]",P={};P[Xi]=P[Qi]=P[es]=P[rs]=P[ts]=P[ns]=P[as]=P[is]=P[ss]=!0;P[Ui]=P[Mi]=P[zi]=P[Fi]=P[Zi]=P[Bi]=P[Hi]=P[Yi]=P[Gi]=P[qi]=P[Wi]=P[Ki]=P[Vi]=P[ki]=P[Ji]=!1;function os(e){return Pi(e)&&Ni(e.length)&&!!P[Ri(e)]}var us=os;function fs(e){return function(r){return e(r)}}var hr=fs,ve={exports:{}};(function(e,r){var t=Mt,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&t.process,f=function(){try{var o=a&&a.require&&a.require("util").types;return o||s&&s.binding&&s.binding("util")}catch{}}();e.exports=f})(ve,ve.exports);var cs=us,ls=hr,Br=ve.exports,Hr=Br&&Br.isTypedArray,ds=Hr?ls(Hr):cs,pr=ds,hs=Ut,ps=ye,vs=qt,gs=me,$s=dr,ys=ae.exports,ms=xe,bs=pr,_s="[object Map]",As="[object Set]",Es=Object.prototype,Ts=Es.hasOwnProperty;function Os(e){if(e==null)return!0;if($s(e)&&(gs(e)||typeof e=="string"||typeof e.splice=="function"||ys(e)||bs(e)||vs(e)))return!e.length;var r=ps(e);if(r==_s||r==As)return!e.size;if(ms(e))return!hs(e).length;for(var t in e)if(Ts.call(e,t))return!1;return!0}var vr=Os,Kt={exports:{}};(function(e,r){(function(t,n){e.exports=n()})(X,function(){var t="minute",n=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(i,s,f){var o=s.prototype;f.utc=function(p){var T={date:p,utc:!0,args:arguments};return new s(T)},o.utc=function(p){var T=f(this.toDate(),{locale:this.$L,utc:!0});return p?T.add(this.utcOffset(),t):T},o.local=function(){return f(this.toDate(),{locale:this.$L,utc:!1})};var v=o.parse;o.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),v.call(this,p)};var m=o.init;o.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else m.call(this)};var $=o.utcOffset;o.utcOffset=function(p,T){var j=this.$utils().u;if(j(p))return this.$u?0:j(this.$offset)?$.call(this):this.$offset;if(typeof p=="string"&&(p=function(l){l===void 0&&(l="");var y=l.match(n);if(!y)return null;var w=(""+y[0]).match(a)||["-",0,0],O=w[0],I=60*+w[1]+ +w[2];return I===0?0:O==="+"?I:-I}(p),p===null))return this;var u=Math.abs(p)<=16?60*p:p,c=this;if(T)return c.$offset=u,c.$u=p===0,c;if(p!==0){var d=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(c=this.local().add(u+d,t)).$offset=u,c.$x.$localOffset=d}else c=this.utc();return c};var h=o.format;o.format=function(p){var T=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,T)},o.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var g=o.toDate;o.toDate=function(p){return p==="s"&&this.$offset?f(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var A=o.diff;o.diff=function(p,T,j){if(p&&this.$u===p.$u)return A.call(this,p,T,j);var u=this.local(),c=f(p).local();return A.call(u,c,T,j)}}})})(Kt);var Ss=Kt.exports,Vt={exports:{}};(function(e,r){(function(t,n){e.exports=n()})(X,function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(a,i,s){var f,o=function(h,g,A){A===void 0&&(A={});var p=new Date(h),T=function(j,u){u===void 0&&(u={});var c=u.timeZoneName||"short",d=j+"|"+c,l=n[d];return l||(l=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:j,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:c}),n[d]=l),l}(g,A);return T.formatToParts(p)},v=function(h,g){for(var A=o(h,g),p=[],T=0;T<A.length;T+=1){var j=A[T],u=j.type,c=j.value,d=t[u];d>=0&&(p[d]=parseInt(c,10))}var l=p[3],y=l===24?0:l,w=p[0]+"-"+p[1]+"-"+p[2]+" "+y+":"+p[4]+":"+p[5]+":000",O=+h;return(s.utc(w).valueOf()-(O-=O%1e3))/6e4},m=i.prototype;m.tz=function(h,g){h===void 0&&(h=f);var A=this.utcOffset(),p=this.toDate(),T=p.toLocaleString("en-US",{timeZone:h}),j=Math.round((p-new Date(T))/1e3/60),u=s(T).$set("millisecond",this.$ms).utcOffset(15*-Math.round(p.getTimezoneOffset()/15)-j,!0);if(g){var c=u.utcOffset();u=u.add(A-c,"minute")}return u.$x.$timezone=h,u},m.offsetName=function(h){var g=this.$x.$timezone||s.tz.guess(),A=o(this.valueOf(),g,{timeZoneName:h}).find(function(p){return p.type.toLowerCase()==="timezonename"});return A&&A.value};var $=m.startOf;m.startOf=function(h,g){if(!this.$x||!this.$x.$timezone)return $.call(this,h,g);var A=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return $.call(A,h,g).tz(this.$x.$timezone,!0)},s.tz=function(h,g,A){var p=A&&g,T=A||g||f,j=v(+s(),T);if(typeof h!="string")return s(h).tz(T);var u=function(y,w,O){var I=y-60*w*1e3,x=v(I,O);if(w===x)return[I,w];var k=v(I-=60*(x-w)*1e3,O);return x===k?[I,x]:[y-60*Math.min(x,k)*1e3,Math.max(x,k)]}(s.utc(h,p).valueOf(),j,T),c=u[0],d=u[1],l=s(c).utcOffset(d);return l.$x.$timezone=T,l},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(h){f=h}}})})(Vt);var ws=Vt.exports,kt={exports:{}};(function(e,r){(function(t,n){e.exports=n()})(X,function(){var t=1e3,n=6e4,a=36e5,i="millisecond",s="second",f="minute",o="hour",v="day",m="week",$="month",h="quarter",g="year",A="date",p="Invalid Date",T=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,j=/\[([^\]]+)]|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("_")},c=function(L,E,b){var S=String(L);return!S||S.length>=E?L:""+Array(E+1-S.length).join(b)+L},d={s:c,z:function(L){var E=-L.utcOffset(),b=Math.abs(E),S=Math.floor(b/60),_=b%60;return(E<=0?"+":"-")+c(S,2,"0")+":"+c(_,2,"0")},m:function L(E,b){if(E.date()<b.date())return-L(b,E);var S=12*(b.year()-E.year())+(b.month()-E.month()),_=E.clone().add(S,$),D=b-_<0,C=E.clone().add(S+(D?-1:1),$);return+(-(S+(b-_)/(D?_-C:C-_))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:$,y:g,w:m,d:v,D:A,h:o,m:f,s,ms:i,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},l="en",y={};y[l]=u;var w=function(L){return L instanceof k},O=function L(E,b,S){var _;if(!E)return l;if(typeof E=="string"){var D=E.toLowerCase();y[D]&&(_=D),b&&(y[D]=b,_=D);var C=E.split("-");if(!_&&C.length>1)return L(C[0])}else{var R=E.name;y[R]=E,_=R}return!S&&_&&(l=_),_||!S&&l},I=function(L,E){if(w(L))return L.clone();var b=typeof E=="object"?E:{};return b.date=L,b.args=arguments,new k(b)},x=d;x.l=O,x.i=w,x.w=function(L,E){return I(L,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var k=function(){function L(b){this.$L=O(b.locale,null,!0),this.parse(b)}var E=L.prototype;return E.parse=function(b){this.$d=function(S){var _=S.date,D=S.utc;if(_===null)return new Date(NaN);if(x.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var C=_.match(T);if(C){var R=C[2]-1||0,M=(C[7]||"0").substring(0,3);return D?new Date(Date.UTC(C[1],R,C[3]||1,C[4]||0,C[5]||0,C[6]||0,M)):new Date(C[1],R,C[3]||1,C[4]||0,C[5]||0,C[6]||0,M)}}return new Date(_)}(b),this.$x=b.x||{},this.init()},E.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},E.$utils=function(){return x},E.isValid=function(){return this.$d.toString()!==p},E.isSame=function(b,S){var _=I(b);return this.startOf(S)<=_&&_<=this.endOf(S)},E.isAfter=function(b,S){return I(b)<this.startOf(S)},E.isBefore=function(b,S){return this.endOf(S)<I(b)},E.$g=function(b,S,_){return x.u(b)?this[S]:this.set(_,b)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(b,S){var _=this,D=!!x.u(S)||S,C=x.p(b),R=function(re,G){var z=x.w(_.$u?Date.UTC(_.$y,G,re):new Date(_.$y,G,re),_);return D?z:z.endOf(v)},M=function(re,G){return x.w(_.toDate()[re].apply(_.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(G)),_)},U=this.$W,B=this.$M,J=this.$D,V="set"+(this.$u?"UTC":"");switch(C){case g:return D?R(1,0):R(31,11);case $:return D?R(1,B):R(0,B+1);case m:var le=this.$locale().weekStart||0,de=(U<le?U+7:U)-le;return R(D?J-de:J+(6-de),B);case v:case A:return M(V+"Hours",0);case o:return M(V+"Minutes",1);case f:return M(V+"Seconds",2);case s:return M(V+"Milliseconds",3);default:return this.clone()}},E.endOf=function(b){return this.startOf(b,!1)},E.$set=function(b,S){var _,D=x.p(b),C="set"+(this.$u?"UTC":""),R=(_={},_[v]=C+"Date",_[A]=C+"Date",_[$]=C+"Month",_[g]=C+"FullYear",_[o]=C+"Hours",_[f]=C+"Minutes",_[s]=C+"Seconds",_[i]=C+"Milliseconds",_)[D],M=D===v?this.$D+(S-this.$W):S;if(D===$||D===g){var U=this.clone().set(A,1);U.$d[R](M),U.init(),this.$d=U.set(A,Math.min(this.$D,U.daysInMonth())).$d}else R&&this.$d[R](M);return this.init(),this},E.set=function(b,S){return this.clone().$set(b,S)},E.get=function(b){return this[x.p(b)]()},E.add=function(b,S){var _,D=this;b=Number(b);var C=x.p(S),R=function(B){var J=I(D);return x.w(J.date(J.date()+Math.round(B*b)),D)};if(C===$)return this.set($,this.$M+b);if(C===g)return this.set(g,this.$y+b);if(C===v)return R(1);if(C===m)return R(7);var M=(_={},_[f]=n,_[o]=a,_[s]=t,_)[C]||1,U=this.$d.getTime()+b*M;return x.w(U,this)},E.subtract=function(b,S){return this.add(-1*b,S)},E.format=function(b){var S=this,_=this.$locale();if(!this.isValid())return _.invalidDate||p;var D=b||"YYYY-MM-DDTHH:mm:ssZ",C=x.z(this),R=this.$H,M=this.$m,U=this.$M,B=_.weekdays,J=_.months,V=function(G,z,qe,_e){return G&&(G[z]||G(S,D))||qe[z].slice(0,_e)},le=function(G){return x.s(R%12||12,G,"0")},de=_.meridiem||function(G,z,qe){var _e=G<12?"AM":"PM";return qe?_e.toLowerCase():_e},re={YY:String(this.$y).slice(-2),YYYY:this.$y,M:U+1,MM:x.s(U+1,2,"0"),MMM:V(_.monthsShort,U,J,3),MMMM:V(J,U),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:V(_.weekdaysMin,this.$W,B,2),ddd:V(_.weekdaysShort,this.$W,B,3),dddd:B[this.$W],H:String(R),HH:x.s(R,2,"0"),h:le(1),hh:le(2),a:de(R,M,!0),A:de(R,M,!1),m:String(M),mm:x.s(M,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:C};return D.replace(j,function(G,z){return z||re[G]||C.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(b,S,_){var D,C=x.p(S),R=I(b),M=(R.utcOffset()-this.utcOffset())*n,U=this-R,B=x.m(this,R);return B=(D={},D[g]=B/12,D[$]=B,D[h]=B/3,D[m]=(U-M)/6048e5,D[v]=(U-M)/864e5,D[o]=U/a,D[f]=U/n,D[s]=U/t,D)[C]||U,_?B:x.a(B)},E.daysInMonth=function(){return this.endOf($).$D},E.$locale=function(){return y[this.$L]},E.locale=function(b,S){if(!b)return this.$L;var _=this.clone(),D=O(b,S,!0);return D&&(_.$L=D),_},E.clone=function(){return x.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},L}(),Cr=k.prototype;return I.prototype=Cr,[["$ms",i],["$s",s],["$m",f],["$H",o],["$W",v],["$M",$],["$y",g],["$D",A]].forEach(function(L){Cr[L[1]]=function(E){return this.$g(E,L[0],L[1])}}),I.extend=function(L,E){return L.$i||(L(E,k,I),L.$i=!0),I},I.locale=O,I.isDayjs=w,I.unix=function(L){return I(1e3*L)},I.en=y[l],I.Ls=y,I.p={},I})})(kt);var ge=kt.exports;ge.extend(Ss);ge.extend(ws);const Jt=["SUN","MON","TUE","WED","THU","FRI","SAT"],Ie=e=>{const[r,t]=e.split(":");return{hour:parseInt(r||"0",10),minutes:parseInt(t||"0",10)}};function nr(e,r,t){const{availability:n}=e;if(!n)return!0;if(vr(n))return!1;const a=t?ge(t).tz(r):ge().tz(r),i=a.day(),s=n[Jt[i]];if(!Array.isArray(s)||s.length!==2)return!1;const f=a.hour(),o=a.minute(),v=Ie(s[0]),m=Ie(s[1]);return f<v.hour||f===v.hour&&o<v.minutes?!1:!(f>m.hour||f===m.hour&&o>m.minutes)}const ar=(e,r=void 0,t=void 0,n=!1)=>n?e.map(i=>{let s;return Array.isArray(i.items)&&(s=ar(i.items,r,t,n)),{...i,items:s,outsideAvailabilitySlot:!nr(i,r,t)||(s==null?void 0:s.every(f=>f.outsideAvailabilitySlot))||!1}}):e.filter(i=>nr(i,r,t)).map(i=>Array.isArray(i.items)?{...i,items:ar(i.items,r,t)}:i),Yr=(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 s=ar(i.items,r,t,n);s.length>0&&a.push({...i,items:s})}),n&&(a=a.map(i=>!i.items||!Array.isArray(i.items)?i:{...i,outsideAvailabilitySlot:!nr(i,r,t)||i.items.every(s=>s.outsideAvailabilitySlot)})),a};function pe(e){const r=e==null?void 0:e.week;if(!e||!e.active||!r)return!1;const t=ge(),n=t.day(),a=r[Jt[n]];return a?a.some(i=>Is(t,i)):!1}function Is(e,r){const t=e.hour(),n=e.minute(),a=Ie(r.from),i=Ie(r.to);return t<a.hour||t===a.hour&&n<a.minutes?!1:!(t>i.hour||t===i.hour&&n>i.minutes)}function Cs(){this.__data__=[],this.size=0}var Ds=Cs;function js(e,r){return e===r||e!==e&&r!==r}var gr=js,Ls=gr;function xs(e,r){for(var t=e.length;t--;)if(Ls(e[t][0],r))return t;return-1}var Pe=xs,Rs=Pe,Ns=Array.prototype,Ps=Ns.splice;function Us(e){var r=this.__data__,t=Rs(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():Ps.call(r,t,1),--this.size,!0}var Ms=Us,Fs=Pe;function Bs(e){var r=this.__data__,t=Fs(r,e);return t<0?void 0:r[t][1]}var Hs=Bs,Ys=Pe;function Gs(e){return Ys(this.__data__,e)>-1}var qs=Gs,Ws=Pe;function Ks(e,r){var t=this.__data__,n=Ws(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var Vs=Ks,ks=Ds,Js=Ms,zs=Hs,Zs=qs,Xs=Vs;function oe(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])}}oe.prototype.clear=ks;oe.prototype.delete=Js;oe.prototype.get=zs;oe.prototype.has=Zs;oe.prototype.set=Xs;var Ue=oe,Qs=Ue;function eo(){this.__data__=new Qs,this.size=0}var ro=eo;function to(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var no=to;function ao(e){return this.__data__.get(e)}var io=ao;function so(e){return this.__data__.has(e)}var oo=so,uo=Q,fo=uo(Object,"create"),Me=fo,Gr=Me;function co(){this.__data__=Gr?Gr(null):{},this.size=0}var lo=co;function ho(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var po=ho,vo=Me,go="__lodash_hash_undefined__",$o=Object.prototype,yo=$o.hasOwnProperty;function mo(e){var r=this.__data__;if(vo){var t=r[e];return t===go?void 0:t}return yo.call(r,e)?r[e]:void 0}var bo=mo,_o=Me,Ao=Object.prototype,Eo=Ao.hasOwnProperty;function To(e){var r=this.__data__;return _o?r[e]!==void 0:Eo.call(r,e)}var Oo=To,So=Me,wo="__lodash_hash_undefined__";function Io(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=So&&r===void 0?wo:r,this}var Co=Io,Do=lo,jo=po,Lo=bo,xo=Oo,Ro=Co;function ue(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])}}ue.prototype.clear=Do;ue.prototype.delete=jo;ue.prototype.get=Lo;ue.prototype.has=xo;ue.prototype.set=Ro;var No=ue,qr=No,Po=Ue,Uo=lr;function Mo(){this.size=0,this.__data__={hash:new qr,map:new(Uo||Po),string:new qr}}var Fo=Mo;function Bo(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var Ho=Bo,Yo=Ho;function Go(e,r){var t=e.__data__;return Yo(r)?t[typeof r=="string"?"string":"hash"]:t.map}var Fe=Go,qo=Fe;function Wo(e){var r=qo(this,e).delete(e);return this.size-=r?1:0,r}var Ko=Wo,Vo=Fe;function ko(e){return Vo(this,e).get(e)}var Jo=ko,zo=Fe;function Zo(e){return zo(this,e).has(e)}var Xo=Zo,Qo=Fe;function eu(e,r){var t=Qo(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}var ru=eu,tu=Fo,nu=Ko,au=Jo,iu=Xo,su=ru;function fe(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])}}fe.prototype.clear=tu;fe.prototype.delete=nu;fe.prototype.get=au;fe.prototype.has=iu;fe.prototype.set=su;var zt=fe,ou=Ue,uu=lr,fu=zt,cu=200;function lu(e,r){var t=this.__data__;if(t instanceof ou){var n=t.__data__;if(!uu||n.length<cu-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new fu(n)}return t.set(e,r),this.size=t.size,this}var du=lu,hu=Ue,pu=ro,vu=no,gu=io,$u=oo,yu=du;function ce(e){var r=this.__data__=new hu(e);this.size=r.size}ce.prototype.clear=pu;ce.prototype.delete=vu;ce.prototype.get=gu;ce.prototype.has=$u;ce.prototype.set=yu;var Zt=ce,mu="__lodash_hash_undefined__";function bu(e){return this.__data__.set(e,mu),this}var _u=bu;function Au(e){return this.__data__.has(e)}var Eu=Au,Tu=zt,Ou=_u,Su=Eu;function Ce(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new Tu;++r<t;)this.add(e[r])}Ce.prototype.add=Ce.prototype.push=Ou;Ce.prototype.has=Su;var wu=Ce;function Iu(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 Cu=Iu;function Du(e,r){return e.has(r)}var ju=Du,Lu=wu,xu=Cu,Ru=ju,Nu=1,Pu=2;function Uu(e,r,t,n,a,i){var s=t&Nu,f=e.length,o=r.length;if(f!=o&&!(s&&o>f))return!1;var v=i.get(e),m=i.get(r);if(v&&m)return v==r&&m==e;var $=-1,h=!0,g=t&Pu?new Lu:void 0;for(i.set(e,r),i.set(r,e);++$<f;){var A=e[$],p=r[$];if(n)var T=s?n(p,A,$,r,e,i):n(A,p,$,e,r,i);if(T!==void 0){if(T)continue;h=!1;break}if(g){if(!xu(r,function(j,u){if(!Ru(g,u)&&(A===j||a(A,j,t,n,i)))return g.push(u)})){h=!1;break}}else if(!(A===p||a(A,p,t,n,i))){h=!1;break}}return i.delete(e),i.delete(r),h}var Xt=Uu,Mu=K,Fu=Mu.Uint8Array,Qt=Fu;function Bu(e){var r=-1,t=Array(e.size);return e.forEach(function(n,a){t[++r]=[a,n]}),t}var Hu=Bu;function Yu(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var Gu=Yu,Wr=Re,Kr=Qt,qu=gr,Wu=Xt,Ku=Hu,Vu=Gu,ku=1,Ju=2,zu="[object Boolean]",Zu="[object Date]",Xu="[object Error]",Qu="[object Map]",ef="[object Number]",rf="[object RegExp]",tf="[object Set]",nf="[object String]",af="[object Symbol]",sf="[object ArrayBuffer]",of="[object DataView]",Vr=Wr?Wr.prototype:void 0,Ke=Vr?Vr.valueOf:void 0;function uf(e,r,t,n,a,i,s){switch(t){case of:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case sf:return!(e.byteLength!=r.byteLength||!i(new Kr(e),new Kr(r)));case zu:case Zu:case ef:return qu(+e,+r);case Xu:return e.name==r.name&&e.message==r.message;case rf:case nf:return e==r+"";case Qu:var f=Ku;case tf:var o=n&ku;if(f||(f=Vu),e.size!=r.size&&!o)return!1;var v=s.get(e);if(v)return v==r;n|=Ju,s.set(e,r);var m=Wu(f(e),f(r),n,a,i,s);return s.delete(e),m;case af:if(Ke)return Ke.call(e)==Ke.call(r)}return!1}var ff=uf;function cf(e,r){for(var t=-1,n=r.length,a=e.length;++t<n;)e[a+t]=r[t];return e}var en=cf,lf=en,df=me;function hf(e,r,t){var n=r(e);return df(e)?n:lf(n,t(e))}var rn=hf;function pf(e,r){for(var t=-1,n=e==null?0:e.length,a=0,i=[];++t<n;){var s=e[t];r(s,t,e)&&(i[a++]=s)}return i}var vf=pf;function gf(){return[]}var tn=gf,$f=vf,yf=tn,mf=Object.prototype,bf=mf.propertyIsEnumerable,kr=Object.getOwnPropertySymbols,_f=kr?function(e){return e==null?[]:(e=Object(e),$f(kr(e),function(r){return bf.call(e,r)}))}:yf,$r=_f;function Af(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var Ef=Af,Tf=9007199254740991,Of=/^(?:0|[1-9]\d*)$/;function Sf(e,r){var t=typeof e;return r=r==null?Tf:r,!!r&&(t=="number"||t!="symbol"&&Of.test(e))&&e>-1&&e%1==0&&e<r}var wf=Sf,If=Ef,Cf=qt,Df=me,jf=ae.exports,Lf=wf,xf=pr,Rf=Object.prototype,Nf=Rf.hasOwnProperty;function Pf(e,r){var t=Df(e),n=!t&&Cf(e),a=!t&&!n&&jf(e),i=!t&&!n&&!a&&xf(e),s=t||n||a||i,f=s?If(e.length,String):[],o=f.length;for(var v in e)(r||Nf.call(e,v))&&!(s&&(v=="length"||a&&(v=="offset"||v=="parent")||i&&(v=="buffer"||v=="byteLength"||v=="byteOffset")||Lf(v,o)))&&f.push(v);return f}var nn=Pf,Uf=nn,Mf=Ut,Ff=dr;function Bf(e){return Ff(e)?Uf(e):Mf(e)}var yr=Bf,Hf=rn,Yf=$r,Gf=yr;function qf(e){return Hf(e,Gf,Yf)}var an=qf,Jr=an,Wf=1,Kf=Object.prototype,Vf=Kf.hasOwnProperty;function kf(e,r,t,n,a,i){var s=t&Wf,f=Jr(e),o=f.length,v=Jr(r),m=v.length;if(o!=m&&!s)return!1;for(var $=o;$--;){var h=f[$];if(!(s?h in r:Vf.call(r,h)))return!1}var g=i.get(e),A=i.get(r);if(g&&A)return g==r&&A==e;var p=!0;i.set(e,r),i.set(r,e);for(var T=s;++$<o;){h=f[$];var j=e[h],u=r[h];if(n)var c=s?n(u,j,h,r,e,i):n(j,u,h,e,r,i);if(!(c===void 0?j===u||a(j,u,t,n,i):c)){p=!1;break}T||(T=h=="constructor")}if(p&&!T){var d=e.constructor,l=r.constructor;d!=l&&"constructor"in e&&"constructor"in r&&!(typeof d=="function"&&d instanceof d&&typeof l=="function"&&l instanceof l)&&(p=!1)}return i.delete(e),i.delete(r),p}var Jf=kf,Ve=Zt,zf=Xt,Zf=ff,Xf=Jf,zr=ye,Zr=me,Xr=ae.exports,Qf=pr,ec=1,Qr="[object Arguments]",et="[object Array]",Ae="[object Object]",rc=Object.prototype,rt=rc.hasOwnProperty;function tc(e,r,t,n,a,i){var s=Zr(e),f=Zr(r),o=s?et:zr(e),v=f?et:zr(r);o=o==Qr?Ae:o,v=v==Qr?Ae:v;var m=o==Ae,$=v==Ae,h=o==v;if(h&&Xr(e)){if(!Xr(r))return!1;s=!0,m=!1}if(h&&!m)return i||(i=new Ve),s||Qf(e)?zf(e,r,t,n,a,i):Zf(e,r,o,t,n,a,i);if(!(t&ec)){var g=m&&rt.call(e,"__wrapped__"),A=$&&rt.call(r,"__wrapped__");if(g||A){var p=g?e.value():e,T=A?r.value():r;return i||(i=new Ve),a(p,T,t,n,i)}}return h?(i||(i=new Ve),Xf(e,r,t,n,a,i)):!1}var nc=tc,ac=nc,tt=se;function sn(e,r,t,n,a){return e===r?!0:e==null||r==null||!tt(e)&&!tt(r)?e!==e&&r!==r:ac(e,r,t,n,sn,a)}var ic=sn,sc=ic;function oc(e,r){return sc(e,r)}var on=oc;function uc(e,r=!1,t=void 0,n=60){const[a,i]=Y.useState(e&&Yr(e,t,void 0,r));Le(s,n*1e3);function s(){const f=e&&Yr(e,t,void 0,r);on(f,a)||(console.log("menu has changed",f),i(f))}return Y.useEffect(s,[a,e]),a}var nt;(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"})(nt||(nt={}));var at;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(at||(at={}));var ir;(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"})(ir||(ir={}));var it;(function(e){e.GROUP="group",e.PRODUCT="product"})(it||(it={}));var st;(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"})(st||(st={}));var ot;(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"})(ot||(ot={}));var ut;(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"})(ut||(ut={}));var ft;(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"})(ft||(ft={}));var ct;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(ct||(ct={}));var lt;(function(e){e.GROUP="group",e.PRODUCT="product"})(lt||(lt={}));var dt;(function(e){e.DINE_IN="DINE_IN",e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.UBER_DELIVERY="UBER_DELIVERY",e.BOLT_DELIVERY="BOLT_DELIVERY",e.WOLT_DELIVERY="WOLT_DELIVERY"})(dt||(dt={}));function fc(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var cc=fc,lc=Q,dc=function(){try{var e=lc(Object,"defineProperty");return e({},"",{}),e}catch{}}(),hc=dc,ht=hc;function pc(e,r,t){r=="__proto__"&&ht?ht(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}var un=pc,vc=un,gc=gr,$c=Object.prototype,yc=$c.hasOwnProperty;function mc(e,r,t){var n=e[r];(!(yc.call(e,r)&&gc(n,t))||t===void 0&&!(r in e))&&vc(e,r,t)}var fn=mc,bc=fn,_c=un;function Ac(e,r,t,n){var a=!t;t||(t={});for(var i=-1,s=r.length;++i<s;){var f=r[i],o=n?n(t[f],e[f],f,t,e):void 0;o===void 0&&(o=e[f]),a?_c(t,f,o):bc(t,f,o)}return t}var Be=Ac,Ec=Be,Tc=yr;function Oc(e,r){return e&&Ec(r,Tc(r),e)}var Sc=Oc;function wc(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var Ic=wc,Cc=$e,Dc=xe,jc=Ic,Lc=Object.prototype,xc=Lc.hasOwnProperty;function Rc(e){if(!Cc(e))return jc(e);var r=Dc(e),t=[];for(var n in e)n=="constructor"&&(r||!xc.call(e,n))||t.push(n);return t}var Nc=Rc,Pc=nn,Uc=Nc,Mc=dr;function Fc(e){return Mc(e)?Pc(e,!0):Uc(e)}var mr=Fc,Bc=Be,Hc=mr;function Yc(e,r){return e&&Bc(r,Hc(r),e)}var Gc=Yc,sr={exports:{}};(function(e,r){var t=K,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i?t.Buffer:void 0,f=s?s.allocUnsafe:void 0;function o(v,m){if(m)return v.slice();var $=v.length,h=f?f($):new v.constructor($);return v.copy(h),h}e.exports=o})(sr,sr.exports);function qc(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var Wc=qc,Kc=Be,Vc=$r;function kc(e,r){return Kc(e,Vc(e),r)}var Jc=kc,zc=Pt,Zc=zc(Object.getPrototypeOf,Object),cn=Zc,Xc=en,Qc=cn,el=$r,rl=tn,tl=Object.getOwnPropertySymbols,nl=tl?function(e){for(var r=[];e;)Xc(r,el(e)),e=Qc(e);return r}:rl,ln=nl,al=Be,il=ln;function sl(e,r){return al(e,il(e),r)}var ol=sl,ul=rn,fl=ln,cl=mr;function ll(e){return ul(e,cl,fl)}var dl=ll,hl=Object.prototype,pl=hl.hasOwnProperty;function vl(e){var r=e.length,t=new e.constructor(r);return r&&typeof e[0]=="string"&&pl.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var gl=vl,pt=Qt;function $l(e){var r=new e.constructor(e.byteLength);return new pt(r).set(new pt(e)),r}var br=$l,yl=br;function ml(e,r){var t=r?yl(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var bl=ml,_l=/\w*$/;function Al(e){var r=new e.constructor(e.source,_l.exec(e));return r.lastIndex=e.lastIndex,r}var El=Al,vt=Re,gt=vt?vt.prototype:void 0,$t=gt?gt.valueOf:void 0;function Tl(e){return $t?Object($t.call(e)):{}}var Ol=Tl,Sl=br;function wl(e,r){var t=r?Sl(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var Il=wl,Cl=br,Dl=bl,jl=El,Ll=Ol,xl=Il,Rl="[object Boolean]",Nl="[object Date]",Pl="[object Map]",Ul="[object Number]",Ml="[object RegExp]",Fl="[object Set]",Bl="[object String]",Hl="[object Symbol]",Yl="[object ArrayBuffer]",Gl="[object DataView]",ql="[object Float32Array]",Wl="[object Float64Array]",Kl="[object Int8Array]",Vl="[object Int16Array]",kl="[object Int32Array]",Jl="[object Uint8Array]",zl="[object Uint8ClampedArray]",Zl="[object Uint16Array]",Xl="[object Uint32Array]";function Ql(e,r,t){var n=e.constructor;switch(r){case Yl:return Cl(e);case Rl:case Nl:return new n(+e);case Gl:return Dl(e,t);case ql:case Wl:case Kl:case Vl:case kl:case Jl:case zl:case Zl:case Xl:return xl(e,t);case Pl:return new n;case Ul:case Bl:return new n(e);case Ml:return jl(e);case Fl:return new n;case Hl:return Ll(e)}}var ed=Ql,rd=$e,yt=Object.create,td=function(){function e(){}return function(r){if(!rd(r))return{};if(yt)return yt(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}(),nd=td,ad=nd,id=cn,sd=xe;function od(e){return typeof e.constructor=="function"&&!sd(e)?ad(id(e)):{}}var ud=od,fd=ye,cd=se,ld="[object Map]";function dd(e){return cd(e)&&fd(e)==ld}var hd=dd,pd=hd,vd=hr,mt=ve.exports,bt=mt&&mt.isMap,gd=bt?vd(bt):pd,$d=gd,yd=ye,md=se,bd="[object Set]";function _d(e){return md(e)&&yd(e)==bd}var Ad=_d,Ed=Ad,Td=hr,_t=ve.exports,At=_t&&_t.isSet,Od=At?Td(At):Ed,Sd=Od,wd=Zt,Id=cc,Cd=fn,Dd=Sc,jd=Gc,Ld=sr.exports,xd=Wc,Rd=Jc,Nd=ol,Pd=an,Ud=dl,Md=ye,Fd=gl,Bd=ed,Hd=ud,Yd=me,Gd=ae.exports,qd=$d,Wd=$e,Kd=Sd,Vd=yr,kd=mr,Jd=1,zd=2,Zd=4,dn="[object Arguments]",Xd="[object Array]",Qd="[object Boolean]",eh="[object Date]",rh="[object Error]",hn="[object Function]",th="[object GeneratorFunction]",nh="[object Map]",ah="[object Number]",pn="[object Object]",ih="[object RegExp]",sh="[object Set]",oh="[object String]",uh="[object Symbol]",fh="[object WeakMap]",ch="[object ArrayBuffer]",lh="[object DataView]",dh="[object Float32Array]",hh="[object Float64Array]",ph="[object Int8Array]",vh="[object Int16Array]",gh="[object Int32Array]",$h="[object Uint8Array]",yh="[object Uint8ClampedArray]",mh="[object Uint16Array]",bh="[object Uint32Array]",N={};N[dn]=N[Xd]=N[ch]=N[lh]=N[Qd]=N[eh]=N[dh]=N[hh]=N[ph]=N[vh]=N[gh]=N[nh]=N[ah]=N[pn]=N[ih]=N[sh]=N[oh]=N[uh]=N[$h]=N[yh]=N[mh]=N[bh]=!0;N[rh]=N[hn]=N[fh]=!1;function Oe(e,r,t,n,a,i){var s,f=r&Jd,o=r&zd,v=r&Zd;if(t&&(s=a?t(e,n,a,i):t(e)),s!==void 0)return s;if(!Wd(e))return e;var m=Yd(e);if(m){if(s=Fd(e),!f)return xd(e,s)}else{var $=Md(e),h=$==hn||$==th;if(Gd(e))return Ld(e,f);if($==pn||$==dn||h&&!a){if(s=o||h?{}:Hd(e),!f)return o?Nd(e,jd(s,e)):Rd(e,Dd(s,e))}else{if(!N[$])return a?e:{};s=Bd(e,$,f)}}i||(i=new wd);var g=i.get(e);if(g)return g;i.set(e,s),Kd(e)?e.forEach(function(T){s.add(Oe(T,r,t,T,e,i))}):qd(e)&&e.forEach(function(T,j){s.set(j,Oe(T,r,t,j,e,i))});var A=v?o?Ud:Pd:o?kd:Vd,p=m?void 0:A(e);return Id(p||e,function(T,j){p&&(j=T,T=e[j]),Cd(s,j,Oe(T,r,t,j,e,i))}),s}var _h=Oe,Ah=_h,Eh=1,Th=4;function Oh(e){return Ah(e,Eh|Th)}var Sh=Oh;function wh(e,r){if(!r||!r.filter||!e||!e.filter||e.kind!==ir.CONFIG)return!0;if(e.filter&&e.items){const t=Object.values(e.filter).flat().filter(n=>{var a,i,s,f;return r.filter[(i=(a=e.items)==null?void 0:a[0])==null?void 0:i.fltCtx]&&Object.values(r.filter[(f=(s=e.items)==null?void 0:s[0])==null?void 0:f.fltCtx]).includes(n)});if(Array.isArray(t)&&t.length===0)return!1}return!0}const De=(e,r,t=0)=>{if(!e)return 0;let n=parseFloat(e.price)||0;const{items:a}=e,i=Sh(r);return wh(e,i)&&Array.isArray(a)&&a.forEach(s=>{let f=0;if(s.kind!=="3e/product")f=De(s,i,t+1);else{const{selected:o={}}=i,{selCtx:v,id:m}=s;v in o&&m in o[v]&&(f=De(s,i,t+1)*o[v][m],delete i.selected[v][m])}n+=f}),Math.round(100*n)/100},Ih=({product:e,state:r,selected:t,cheapestGroupOptionsProduct:n})=>{var o;const a=r?De(e,r):0,i=e.state&&!vr((o=e==null?void 0:e.state)==null?void 0:o.selected)?De(e,e.state):0,s=e.minPrice&&parseFloat(e.price)===a;let f=t||!!n||parseFloat(e.price)===0?a||i:parseFloat(e.price);return n!==void 0&&(f-=n),s&&e.minPrice&&(f=parseFloat(e.minPrice)),{displayPrice:f,showAsMinPrice:s,calculatedPriceDefaultProductState:i}};function _r(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 Ch(e){return _r(e)}function Dh(e){return!e||e.length===0?null:_r(e.flatMap(r=>r.lines))}var Ar={exports:{}},vn=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)}},jh=vn,ee=Object.prototype.toString;function Er(e){return ee.call(e)==="[object Array]"}function or(e){return typeof e=="undefined"}function Lh(e){return e!==null&&!or(e)&&e.constructor!==null&&!or(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function xh(e){return ee.call(e)==="[object ArrayBuffer]"}function Rh(e){return typeof FormData!="undefined"&&e instanceof FormData}function Nh(e){var r;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&e.buffer instanceof ArrayBuffer,r}function Ph(e){return typeof e=="string"}function Uh(e){return typeof e=="number"}function gn(e){return e!==null&&typeof e=="object"}function Se(e){if(ee.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}function Mh(e){return ee.call(e)==="[object Date]"}function Fh(e){return ee.call(e)==="[object File]"}function Bh(e){return ee.call(e)==="[object Blob]"}function $n(e){return ee.call(e)==="[object Function]"}function Hh(e){return gn(e)&&$n(e.pipe)}function Yh(e){return typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams}function Gh(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function qh(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function Tr(e,r){if(!(e===null||typeof e=="undefined"))if(typeof e!="object"&&(e=[e]),Er(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 ur(){var e={};function r(a,i){Se(e[i])&&Se(a)?e[i]=ur(e[i],a):Se(a)?e[i]=ur({},a):Er(a)?e[i]=a.slice():e[i]=a}for(var t=0,n=arguments.length;t<n;t++)Tr(arguments[t],r);return e}function Wh(e,r,t){return Tr(r,function(a,i){t&&typeof a=="function"?e[i]=jh(a,t):e[i]=a}),e}function Kh(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var q={isArray:Er,isArrayBuffer:xh,isBuffer:Lh,isFormData:Rh,isArrayBufferView:Nh,isString:Ph,isNumber:Uh,isObject:gn,isPlainObject:Se,isUndefined:or,isDate:Mh,isFile:Fh,isBlob:Bh,isFunction:$n,isStream:Hh,isURLSearchParams:Yh,isStandardBrowserEnv:qh,forEach:Tr,merge:ur,extend:Wh,trim:Gh,stripBOM:Kh},te=q;function Et(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var yn=function(r,t,n){if(!t)return r;var a;if(n)a=n(t);else if(te.isURLSearchParams(t))a=t.toString();else{var i=[];te.forEach(t,function(o,v){o===null||typeof o=="undefined"||(te.isArray(o)?v=v+"[]":o=[o],te.forEach(o,function($){te.isDate($)?$=$.toISOString():te.isObject($)&&($=JSON.stringify($)),i.push(Et(v)+"="+Et($))}))}),a=i.join("&")}if(a){var s=r.indexOf("#");s!==-1&&(r=r.slice(0,s)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r},Vh=q;function He(){this.handlers=[]}He.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};He.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)};He.prototype.forEach=function(r){Vh.forEach(this.handlers,function(n){n!==null&&r(n)})};var kh=He,Jh=q,zh=function(r,t){Jh.forEach(r,function(a,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(r[t]=a,delete r[i])})},mn=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},Zh=mn,bn=function(r,t,n,a,i){var s=new Error(r);return Zh(s,t,n,a,i)},Xh=bn,Qh=function(r,t,n){var a=n.config.validateStatus;!n.status||!a||a(n.status)?r(n):t(Xh("Request failed with status code "+n.status,n.config,null,n.request,n))},Ee=q,ep=Ee.isStandardBrowserEnv()?function(){return{write:function(t,n,a,i,s,f){var o=[];o.push(t+"="+encodeURIComponent(n)),Ee.isNumber(a)&&o.push("expires="+new Date(a).toGMTString()),Ee.isString(i)&&o.push("path="+i),Ee.isString(s)&&o.push("domain="+s),f===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){var n=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),rp=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)},tp=function(r,t){return t?r.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):r},np=rp,ap=tp,ip=function(r,t){return r&&!np(t)?ap(r,t):t},ke=q,sp=["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"],op=function(r){var t={},n,a,i;return r&&ke.forEach(r.split(`
|
|
2
|
-
`),function(f){if(i=f.indexOf(":"),n=ke.trim(f.substr(0,i)).toLowerCase(),a=ke.trim(f.substr(i+1)),n){if(t[n]&&sp.indexOf(n)>=0)return;n==="set-cookie"?t[n]=(t[n]?t[n]:[]).concat([a]):t[n]=t[n]?t[n]+", "+a:a}}),t},Tt=q,up=Tt.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),n;function a(i){var s=i;return r&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=a(window.location.href),function(s){var f=Tt.isString(s)?a(s):s;return f.protocol===n.protocol&&f.host===n.host}}():function(){return function(){return!0}}(),Te=q,fp=Qh,cp=ep,lp=yn,dp=ip,hp=op,pp=up,Je=bn,Ot=function(r){return new Promise(function(n,a){var i=r.data,s=r.headers,f=r.responseType;Te.isFormData(i)&&delete s["Content-Type"];var o=new XMLHttpRequest;if(r.auth){var v=r.auth.username||"",m=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";s.Authorization="Basic "+btoa(v+":"+m)}var $=dp(r.baseURL,r.url);o.open(r.method.toUpperCase(),lp($,r.params,r.paramsSerializer),!0),o.timeout=r.timeout;function h(){if(!!o){var A="getAllResponseHeaders"in o?hp(o.getAllResponseHeaders()):null,p=!f||f==="text"||f==="json"?o.responseText:o.response,T={data:p,status:o.status,statusText:o.statusText,headers:A,config:r,request:o};fp(n,a,T),o=null}}if("onloadend"in o?o.onloadend=h:o.onreadystatechange=function(){!o||o.readyState!==4||o.status===0&&!(o.responseURL&&o.responseURL.indexOf("file:")===0)||setTimeout(h)},o.onabort=function(){!o||(a(Je("Request aborted",r,"ECONNABORTED",o)),o=null)},o.onerror=function(){a(Je("Network Error",r,null,o)),o=null},o.ontimeout=function(){var p="timeout of "+r.timeout+"ms exceeded";r.timeoutErrorMessage&&(p=r.timeoutErrorMessage),a(Je(p,r,r.transitional&&r.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",o)),o=null},Te.isStandardBrowserEnv()){var g=(r.withCredentials||pp($))&&r.xsrfCookieName?cp.read(r.xsrfCookieName):void 0;g&&(s[r.xsrfHeaderName]=g)}"setRequestHeader"in o&&Te.forEach(s,function(p,T){typeof i=="undefined"&&T.toLowerCase()==="content-type"?delete s[T]:o.setRequestHeader(T,p)}),Te.isUndefined(r.withCredentials)||(o.withCredentials=!!r.withCredentials),f&&f!=="json"&&(o.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&o.addEventListener("progress",r.onDownloadProgress),typeof r.onUploadProgress=="function"&&o.upload&&o.upload.addEventListener("progress",r.onUploadProgress),r.cancelToken&&r.cancelToken.promise.then(function(p){!o||(o.abort(),a(p),o=null)}),i||(i=null),o.send(i)})},F=q,St=zh,vp=mn,gp={"Content-Type":"application/x-www-form-urlencoded"};function wt(e,r){!F.isUndefined(e)&&F.isUndefined(e["Content-Type"])&&(e["Content-Type"]=r)}function $p(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Ot),e}function yp(e,r,t){if(F.isString(e))try{return(r||JSON.parse)(e),F.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}var Ye={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:$p(),transformRequest:[function(r,t){return St(t,"Accept"),St(t,"Content-Type"),F.isFormData(r)||F.isArrayBuffer(r)||F.isBuffer(r)||F.isStream(r)||F.isFile(r)||F.isBlob(r)?r:F.isArrayBufferView(r)?r.buffer:F.isURLSearchParams(r)?(wt(t,"application/x-www-form-urlencoded;charset=utf-8"),r.toString()):F.isObject(r)||t&&t["Content-Type"]==="application/json"?(wt(t,"application/json"),yp(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&&F.isString(r)&&r.length)try{return JSON.parse(r)}catch(s){if(i)throw s.name==="SyntaxError"?vp(s,this,"E_JSON_PARSE"):s}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(r){return r>=200&&r<300}};Ye.headers={common:{Accept:"application/json, text/plain, */*"}};F.forEach(["delete","get","head"],function(r){Ye.headers[r]={}});F.forEach(["post","put","patch"],function(r){Ye.headers[r]=F.merge(gp)});var Or=Ye,mp=q,bp=Or,_p=function(r,t,n){var a=this||bp;return mp.forEach(n,function(s){r=s.call(a,r,t)}),r},_n=function(r){return!!(r&&r.__CANCEL__)},It=q,ze=_p,Ap=_n,Ep=Or;function Ze(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Tp=function(r){Ze(r),r.headers=r.headers||{},r.data=ze.call(r,r.data,r.headers,r.transformRequest),r.headers=It.merge(r.headers.common||{},r.headers[r.method]||{},r.headers),It.forEach(["delete","get","head","post","put","patch","common"],function(a){delete r.headers[a]});var t=r.adapter||Ep.adapter;return t(r).then(function(a){return Ze(r),a.data=ze.call(r,a.data,a.headers,r.transformResponse),a},function(a){return Ap(a)||(Ze(r),a&&a.response&&(a.response.data=ze.call(r,a.response.data,a.response.headers,r.transformResponse))),Promise.reject(a)})},H=q,An=function(r,t){t=t||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],f=["validateStatus"];function o(h,g){return H.isPlainObject(h)&&H.isPlainObject(g)?H.merge(h,g):H.isPlainObject(g)?H.merge({},g):H.isArray(g)?g.slice():g}function v(h){H.isUndefined(t[h])?H.isUndefined(r[h])||(n[h]=o(void 0,r[h])):n[h]=o(r[h],t[h])}H.forEach(a,function(g){H.isUndefined(t[g])||(n[g]=o(void 0,t[g]))}),H.forEach(i,v),H.forEach(s,function(g){H.isUndefined(t[g])?H.isUndefined(r[g])||(n[g]=o(void 0,r[g])):n[g]=o(void 0,t[g])}),H.forEach(f,function(g){g in t?n[g]=o(r[g],t[g]):g in r&&(n[g]=o(void 0,r[g]))});var m=a.concat(i).concat(s).concat(f),$=Object.keys(r).concat(Object.keys(t)).filter(function(g){return m.indexOf(g)===-1});return H.forEach($,v),n};const Op="axios",Sp="0.21.4",wp="Promise based HTTP client for the browser and node.js",Ip="index.js",Cp={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"},Dp={type:"git",url:"https://github.com/axios/axios.git"},jp=["xhr","http","ajax","promise","node"],Lp="Matt Zabriskie",xp="MIT",Rp={url:"https://github.com/axios/axios/issues"},Np="https://axios-http.com",Pp={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"},Up={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},Mp="dist/axios.min.js",Fp="dist/axios.min.js",Bp="./index.d.ts",Hp={"follow-redirects":"^1.14.0"},Yp=[{path:"./dist/axios.min.js",threshold:"5kB"}];var Gp={name:Op,version:Sp,description:wp,main:Ip,scripts:Cp,repository:Dp,keywords:jp,author:Lp,license:xp,bugs:Rp,homepage:Np,devDependencies:Pp,browser:Up,jsdelivr:Mp,unpkg:Fp,typings:Bp,dependencies:Hp,bundlesize:Yp},En=Gp,Sr={};["object","boolean","number","function","string","symbol"].forEach(function(e,r){Sr[e]=function(n){return typeof n===e||"a"+(r<1?"n ":" ")+e}});var Ct={},qp=En.version.split(".");function Tn(e,r){for(var t=r?r.split("."):qp,n=e.split("."),a=0;a<3;a++){if(t[a]>n[a])return!0;if(t[a]<n[a])return!1}return!1}Sr.transitional=function(r,t,n){var a=t&&Tn(t);function i(s,f){return"[Axios v"+En.version+"] Transitional option '"+s+"'"+f+(n?". "+n:"")}return function(s,f,o){if(r===!1)throw new Error(i(f," has been removed in "+t));return a&&!Ct[f]&&(Ct[f]=!0,console.warn(i(f," has been deprecated since v"+t+" and will be removed in the near future"))),r?r(s,f,o):!0}};function Wp(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],s=r[i];if(s){var f=e[i],o=f===void 0||s(f,i,e);if(o!==!0)throw new TypeError("option "+i+" must be "+o);continue}if(t!==!0)throw Error("Unknown option "+i)}}var Kp={isOlderVersion:Tn,assertOptions:Wp,validators:Sr},On=q,Vp=yn,Dt=kh,jt=Tp,Ge=An,Sn=Kp,ne=Sn.validators;function be(e){this.defaults=e,this.interceptors={request:new Dt,response:new Dt}}be.prototype.request=function(r){typeof r=="string"?(r=arguments[1]||{},r.url=arguments[0]):r=r||{},r=Ge(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&&Sn.assertOptions(t,{silentJSONParsing:ne.transitional(ne.boolean,"1.0.0"),forcedJSONParsing:ne.transitional(ne.boolean,"1.0.0"),clarifyTimeoutError:ne.transitional(ne.boolean,"1.0.0")},!1);var n=[],a=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(a=a&&h.synchronous,n.unshift(h.fulfilled,h.rejected))});var i=[];this.interceptors.response.forEach(function(h){i.push(h.fulfilled,h.rejected)});var s;if(!a){var f=[jt,void 0];for(Array.prototype.unshift.apply(f,n),f=f.concat(i),s=Promise.resolve(r);f.length;)s=s.then(f.shift(),f.shift());return s}for(var o=r;n.length;){var v=n.shift(),m=n.shift();try{o=v(o)}catch($){m($);break}}try{s=jt(o)}catch($){return Promise.reject($)}for(;i.length;)s=s.then(i.shift(),i.shift());return s};be.prototype.getUri=function(r){return r=Ge(this.defaults,r),Vp(r.url,r.params,r.paramsSerializer).replace(/^\?/,"")};On.forEach(["delete","get","head","options"],function(r){be.prototype[r]=function(t,n){return this.request(Ge(n||{},{method:r,url:t,data:(n||{}).data}))}});On.forEach(["post","put","patch"],function(r){be.prototype[r]=function(t,n,a){return this.request(Ge(a||{},{method:r,url:t,data:n}))}});var kp=be;function wr(e){this.message=e}wr.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};wr.prototype.__CANCEL__=!0;var wn=wr,Jp=wn;function je(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(a){r=a});var t=this;e(function(a){t.reason||(t.reason=new Jp(a),r(t.reason))})}je.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};je.source=function(){var r,t=new je(function(a){r=a});return{token:t,cancel:r}};var zp=je,Zp=function(r){return function(n){return r.apply(null,n)}},Xp=function(r){return typeof r=="object"&&r.isAxiosError===!0},Lt=q,Qp=vn,we=kp,ev=An,rv=Or;function In(e){var r=new we(e),t=Qp(we.prototype.request,r);return Lt.extend(t,we.prototype,r),Lt.extend(t,r),t}var W=In(rv);W.Axios=we;W.create=function(r){return In(ev(W.defaults,r))};W.Cancel=wn;W.CancelToken=zp;W.isCancel=_n;W.all=function(r){return Promise.all(r)};W.spread=Zp;W.isAxiosError=Xp;Ar.exports=W;Ar.exports.default=W;var tv=Ar.exports;const nv=(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},av=(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 Ir(e,r=600,t=!0,n,a){var j,u;if(!n||!a)throw new Error("baseUrl or tenant was not provided");const i=`${e}_${a}_${n}`,s=`${n.endsWith("/")?n.slice(0,-1):n}/cms-api/content/${a}/${e}`,f=((j=T())==null?void 0:j.value)||null,[o,v]=Y.useState(((u=T())==null?void 0:u.timestamp)||0),[m,$]=Y.useState(f||null),[h,g]=Y.useState(!1);function A(){tv.get(s).then(c=>{if(vr(c.data))throw new Error(`CMS data '${e}' is an empty object`);on(c.data,m)||$(c.data),h&&g(!1),t&&p(c.data)}).catch(c=>{console.error(c),g(!0)})}function p(c){const d=new Date().valueOf(),l=JSON.stringify({value:c,timestamp:d});localStorage.setItem(i,l),v(d)}function T(){try{const c=localStorage.getItem(i);if(c)return JSON.parse(c)}catch(c){console.warn(c)}return null}return Y.useEffect(()=>{new Date().valueOf()-o>r*1e3&&A()},[]),Le(A,r*1e3),{value:m,isError:h,isLoading:!h&&!m}}function Cn(e,r=600,t=!0,n,a,i){var f,o,v,m;if(!n||!a||!i)throw new Error("baseUrl, tenant or venue was not provided");const s=Ir(e,r,t,n,a);return{value:((o=(f=s.value)==null?void 0:f.find)==null?void 0:o.call(f,$=>$.venue===i))||((m=(v=s.value)==null?void 0:v.find)==null?void 0:m.call(v,$=>$.venue==="*"))||null,isError:s.isError}}function iv(e,r,t,n=300,a=!0){var m,$,h,g;const i=Y.useContext(Nt.ConfigContext);if(!i)throw new Error("Missing config context");const{value:s,isError:f}=Cn(e,n,a,i.baseUrl,i.tenant,r);let o=null,v=null;return s&&((m=s==null?void 0:s.url)==null?void 0:m.length)>0&&(o=(($=s.url.find(A=>A.locale===t))==null?void 0:$.value)||((h=s.url.find(A=>A.locale==="*"))==null?void 0:h.value)||null),!o&&s&&((g=s==null?void 0:s.url)==null?void 0:g.length)>0&&(v=s.url[0].value),{url:o,fallbackUrl:v,isError:f}}function Dn({kioskMediaId:e,kioskMediaType:r,intervalSeconds:t=600,withLocalStorage:n=!0,baseUrl:a,tenant:i,venue:s,locale:f}){var p;const{value:o,isError:v,isLoading:m}=Ir(e,t,n,a,i),$=(o==null?void 0:o[r])||[],h=av($,s),g=nv(h,f),A=!g&&h&&((p=h==null?void 0:h.url)==null?void 0:p.length)>0?h.url[0].value:null;return{url:g,fallbackUrl:A,mediaType:h==null?void 0:h.mediaType,isError:v,isLoading:m}}function sv({kioskMediaId:e,kioskMediaType:r,venue:t,intervalSeconds:n=600,withLocalStorage:a=!0}){const i=Y.useContext(Nt.ConfigContext);if(!i)throw new Error("Missing config context");const{i18n:{language:s}}=Rn.useTranslation();return Dn({kioskMediaId:e,kioskMediaType:r,intervalSeconds:n,withLocalStorage:a,venue:t,baseUrl:i.baseUrl,tenant:i.tenant,locale:s})}function ov(e,r){Y.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 uv(e){const[r,t]=Y.useState(pe(e==null?void 0:e.DINE_IN)),[n,a]=Y.useState(pe(e==null?void 0:e.TAKE_AWAY));function i(){const s=pe(e==null?void 0:e.DINE_IN),f=pe(e==null?void 0:e.TAKE_AWAY);s!==r&&(console.log("dine in open changed",r,"=>",s),t(s)),f!==n&&(console.log("take away open changed",n,"=>",f),a(f))}return Y.useEffect(()=>{i()},[e]),Le(i,6e4),{dineInOpen:r,takeAwayOpen:n,loaded:!!e}}var fr={},fv=e=>encodeURIComponent(e).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),jn="%[a-f0-9]{2}",xt=new RegExp("("+jn+")|([^%]+?)","gi"),Rt=new RegExp("("+jn+")+","gi");function cr(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([],cr(t),cr(n))}function cv(e){try{return decodeURIComponent(e)}catch{for(var r=e.match(xt)||[],t=1;t<r.length;t++)e=cr(r,t).join(""),r=e.match(xt)||[];return e}}function lv(e){for(var r={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},t=Rt.exec(e);t;){try{r[t[0]]=decodeURIComponent(t[0])}catch{var n=cv(t[0]);n!==t[0]&&(r[t[0]]=n)}t=Rt.exec(e)}r["%C2"]="\uFFFD";for(var a=Object.keys(r),i=0;i<a.length;i++){var s=a[i];e=e.replace(new RegExp(s,"g"),r[s])}return e}var dv=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 lv(e)}},hv=(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)]},pv=function(e,r){for(var t={},n=Object.keys(e),a=Array.isArray(r),i=0;i<n.length;i++){var s=n[i],f=e[s];(a?r.indexOf(s)!==-1:r(s,f,e))&&(t[s]=f)}return t};(function(e){const r=fv,t=dv,n=hv,a=pv,i=u=>u==null,s=Symbol("encodeFragmentIdentifier");function f(u){switch(u.arrayFormat){case"index":return c=>(d,l)=>{const y=d.length;return l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[m(c,u),"[",y,"]"].join("")]:[...d,[m(c,u),"[",m(y,u),"]=",m(l,u)].join("")]};case"bracket":return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[m(c,u),"[]"].join("")]:[...d,[m(c,u),"[]=",m(l,u)].join("")];case"colon-list-separator":return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[m(c,u),":list="].join("")]:[...d,[m(c,u),":list=",m(l,u)].join("")];case"comma":case"separator":case"bracket-separator":{const c=u.arrayFormat==="bracket-separator"?"[]=":"=";return d=>(l,y)=>y===void 0||u.skipNull&&y===null||u.skipEmptyString&&y===""?l:(y=y===null?"":y,l.length===0?[[m(d,u),c,m(y,u)].join("")]:[[l,m(y,u)].join(u.arrayFormatSeparator)])}default:return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,m(c,u)]:[...d,[m(c,u),"=",m(l,u)].join("")]}}function o(u){let c;switch(u.arrayFormat){case"index":return(d,l,y)=>{if(c=/\[(\d*)\]$/.exec(d),d=d.replace(/\[\d*\]$/,""),!c){y[d]=l;return}y[d]===void 0&&(y[d]={}),y[d][c[1]]=l};case"bracket":return(d,l,y)=>{if(c=/(\[\])$/.exec(d),d=d.replace(/\[\]$/,""),!c){y[d]=l;return}if(y[d]===void 0){y[d]=[l];return}y[d]=[].concat(y[d],l)};case"colon-list-separator":return(d,l,y)=>{if(c=/(:list)$/.exec(d),d=d.replace(/:list$/,""),!c){y[d]=l;return}if(y[d]===void 0){y[d]=[l];return}y[d]=[].concat(y[d],l)};case"comma":case"separator":return(d,l,y)=>{const w=typeof l=="string"&&l.includes(u.arrayFormatSeparator),O=typeof l=="string"&&!w&&$(l,u).includes(u.arrayFormatSeparator);l=O?$(l,u):l;const I=w||O?l.split(u.arrayFormatSeparator).map(x=>$(x,u)):l===null?l:$(l,u);y[d]=I};case"bracket-separator":return(d,l,y)=>{const w=/(\[\])$/.test(d);if(d=d.replace(/\[\]$/,""),!w){y[d]=l&&$(l,u);return}const O=l===null?[]:l.split(u.arrayFormatSeparator).map(I=>$(I,u));if(y[d]===void 0){y[d]=O;return}y[d]=[].concat(y[d],O)};default:return(d,l,y)=>{if(y[d]===void 0){y[d]=l;return}y[d]=[].concat(y[d],l)}}}function v(u){if(typeof u!="string"||u.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function m(u,c){return c.encode?c.strict?r(u):encodeURIComponent(u):u}function $(u,c){return c.decode?t(u):u}function h(u){return Array.isArray(u)?u.sort():typeof u=="object"?h(Object.keys(u)).sort((c,d)=>Number(c)-Number(d)).map(c=>u[c]):u}function g(u){const c=u.indexOf("#");return c!==-1&&(u=u.slice(0,c)),u}function A(u){let c="";const d=u.indexOf("#");return d!==-1&&(c=u.slice(d)),c}function p(u){u=g(u);const c=u.indexOf("?");return c===-1?"":u.slice(c+1)}function T(u,c){return c.parseNumbers&&!Number.isNaN(Number(u))&&typeof u=="string"&&u.trim()!==""?u=Number(u):c.parseBooleans&&u!==null&&(u.toLowerCase()==="true"||u.toLowerCase()==="false")&&(u=u.toLowerCase()==="true"),u}function j(u,c){c=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},c),v(c.arrayFormatSeparator);const d=o(c),l=Object.create(null);if(typeof u!="string"||(u=u.trim().replace(/^[?#&]/,""),!u))return l;for(const y of u.split("&")){if(y==="")continue;let[w,O]=n(c.decode?y.replace(/\+/g," "):y,"=");O=O===void 0?null:["comma","separator","bracket-separator"].includes(c.arrayFormat)?O:$(O,c),d($(w,c),O,l)}for(const y of Object.keys(l)){const w=l[y];if(typeof w=="object"&&w!==null)for(const O of Object.keys(w))w[O]=T(w[O],c);else l[y]=T(w,c)}return c.sort===!1?l:(c.sort===!0?Object.keys(l).sort():Object.keys(l).sort(c.sort)).reduce((y,w)=>{const O=l[w];return Boolean(O)&&typeof O=="object"&&!Array.isArray(O)?y[w]=h(O):y[w]=O,y},Object.create(null))}e.extract=p,e.parse=j,e.stringify=(u,c)=>{if(!u)return"";c=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},c),v(c.arrayFormatSeparator);const d=O=>c.skipNull&&i(u[O])||c.skipEmptyString&&u[O]==="",l=f(c),y={};for(const O of Object.keys(u))d(O)||(y[O]=u[O]);const w=Object.keys(y);return c.sort!==!1&&w.sort(c.sort),w.map(O=>{const I=u[O];return I===void 0?"":I===null?m(O,c):Array.isArray(I)?I.length===0&&c.arrayFormat==="bracket-separator"?m(O,c)+"[]":I.reduce(l(O),[]).join("&"):m(O,c)+"="+m(I,c)}).filter(O=>O.length>0).join("&")},e.parseUrl=(u,c)=>{c=Object.assign({decode:!0},c);const[d,l]=n(u,"#");return Object.assign({url:d.split("?")[0]||"",query:j(p(u),c)},c&&c.parseFragmentIdentifier&&l?{fragmentIdentifier:$(l,c)}:{})},e.stringifyUrl=(u,c)=>{c=Object.assign({encode:!0,strict:!0,[s]:!0},c);const d=g(u.url).split("?")[0]||"",l=e.extract(u.url),y=e.parse(l,{sort:!1}),w=Object.assign(y,u.query);let O=e.stringify(w,c);O&&(O=`?${O}`);let I=A(u.url);return u.fragmentIdentifier&&(I=`#${c[s]?m(u.fragmentIdentifier,c):u.fragmentIdentifier}`),`${d}${O}${I}`},e.pick=(u,c,d)=>{d=Object.assign({parseFragmentIdentifier:!0,[s]:!1},d);const{url:l,query:y,fragmentIdentifier:w}=e.parseUrl(u,d);return e.stringifyUrl({url:l,query:a(y,c),fragmentIdentifier:w},d)},e.exclude=(u,c,d)=>{const l=Array.isArray(c)?y=>!c.includes(y):(y,w)=>!c(y,w);return e.pick(u,l,d)}})(fr);const vv=[".png",".jpg",".jpeg",".webp",".bmp",".tiff"];function Ln(e,r=500){const t=fr.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 vv.includes(n)?fr.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 gv(e,r=500){return Ln(e,r)}function xn(e){let r=0;return e==null||e.forEach(t=>r+=Number(t.discountPrice)),r}function $v(e){return xn(e.discounts)}exports.addDiscounts=xn;exports.getGroupedBucketLines=Dh;exports.getMediaUrl=Ln;exports.groupOrderLines=_r;exports.isChannelOpen=pe;exports.summarizeLineDiscounts=$v;exports.useAvailability=uc;exports.useCms=Ir;exports.useDisplayPrice=Ih;exports.useGroupOrderLines=Ch;exports.useInterval=Le;exports.useKioskChannelsAvailability=uv;exports.useKioskMediaCms=Dn;exports.useKioskMediaCmsWithContext=sv;exports.useLocalizedVenueMedia=iv;exports.useMediaUrl=gv;exports.useOnClickOutside=ov;exports.useVenueCms=Cn;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var B=require("react"),Mt=require("@orderingstack/ordering-core-react"),Bn=require("react-i18next");function Le(e,r){const t=B.useRef(),[n,a]=B.useState(null);return B.useEffect(()=>{t.current=e},[e]),B.useEffect(()=>{function i(){var s;(s=t.current)==null||s.call(t)}if(r!==null){const s=setInterval(i,r);return a(s),()=>{a(null),clearInterval(s)}}},[r]),()=>{n&&clearInterval(n)}}var X=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Hn=Object.prototype;function Yn(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||Hn;return e===t}var xe=Yn;function Gn(e,r){return function(t){return e(r(t))}}var Ft=Gn,qn=Ft,Wn=qn(Object.keys,Object),Kn=Wn,Vn=xe,kn=Kn,Jn=Object.prototype,zn=Jn.hasOwnProperty;function Zn(e){if(!Vn(e))return kn(e);var r=[];for(var t in Object(e))zn.call(e,t)&&t!="constructor"&&r.push(t);return r}var Bt=Zn,Xn=typeof X=="object"&&X&&X.Object===Object&&X,Ht=Xn,Qn=Ht,ea=typeof self=="object"&&self&&self.Object===Object&&self,ra=Qn||ea||Function("return this")(),K=ra,ta=K,na=ta.Symbol,Ne=na,xr=Ne,Yt=Object.prototype,aa=Yt.hasOwnProperty,ia=Yt.toString,he=xr?xr.toStringTag:void 0;function sa(e){var r=aa.call(e,he),t=e[he];try{e[he]=void 0;var n=!0}catch{}var a=ia.call(e);return n&&(r?e[he]=t:delete e[he]),a}var oa=sa,ua=Object.prototype,fa=ua.toString;function ca(e){return fa.call(e)}var la=ca,Nr=Ne,da=oa,ha=la,va="[object Null]",pa="[object Undefined]",Rr=Nr?Nr.toStringTag:void 0;function ga(e){return e==null?e===void 0?pa:va:Rr&&Rr in Object(e)?da(e):ha(e)}var Re=ga;function $a(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var $e=$a,ya=Re,ma=$e,ba="[object AsyncFunction]",_a="[object Function]",Aa="[object GeneratorFunction]",Ea="[object Proxy]";function Ta(e){if(!ma(e))return!1;var r=ya(e);return r==_a||r==Aa||r==ba||r==Ea}var Gt=Ta,Oa=K,Sa=Oa["__core-js_shared__"],wa=Sa,We=wa,Pr=function(){var e=/[^.]+$/.exec(We&&We.keys&&We.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ia(e){return!!Pr&&Pr in e}var Ca=Ia,Da=Function.prototype,ja=Da.toString;function La(e){if(e!=null){try{return ja.call(e)}catch{}try{return e+""}catch{}}return""}var qt=La,xa=Gt,Na=Ca,Ra=$e,Pa=qt,Ua=/[\\^$.*+?()[\]{}|]/g,Ma=/^\[object .+?Constructor\]$/,Fa=Function.prototype,Ba=Object.prototype,Ha=Fa.toString,Ya=Ba.hasOwnProperty,Ga=RegExp("^"+Ha.call(Ya).replace(Ua,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qa(e){if(!Ra(e)||Na(e))return!1;var r=xa(e)?Ga:Ma;return r.test(Pa(e))}var Wa=qa;function Ka(e,r){return e==null?void 0:e[r]}var Va=Ka,ka=Wa,Ja=Va;function za(e,r){var t=Ja(e,r);return ka(t)?t:void 0}var Q=za,Za=Q,Xa=K,Qa=Za(Xa,"DataView"),ei=Qa,ri=Q,ti=K,ni=ri(ti,"Map"),dr=ni,ai=Q,ii=K,si=ai(ii,"Promise"),oi=si,ui=Q,fi=K,ci=ui(fi,"Set"),Wt=ci,li=Q,di=K,hi=li(di,"WeakMap"),vi=hi,Qe=ei,er=dr,rr=oi,tr=Wt,nr=vi,Kt=Re,ie=qt,Ur="[object Map]",pi="[object Object]",Mr="[object Promise]",Fr="[object Set]",Br="[object WeakMap]",Hr="[object DataView]",gi=ie(Qe),$i=ie(er),yi=ie(rr),mi=ie(tr),bi=ie(nr),Z=Kt;(Qe&&Z(new Qe(new ArrayBuffer(1)))!=Hr||er&&Z(new er)!=Ur||rr&&Z(rr.resolve())!=Mr||tr&&Z(new tr)!=Fr||nr&&Z(new nr)!=Br)&&(Z=function(e){var r=Kt(e),t=r==pi?e.constructor:void 0,n=t?ie(t):"";if(n)switch(n){case gi:return Hr;case $i:return Ur;case yi:return Mr;case mi:return Fr;case bi:return Br}return r});var ye=Z;function _i(e){return e!=null&&typeof e=="object"}var se=_i,Ai=Re,Ei=se,Ti="[object Arguments]";function Oi(e){return Ei(e)&&Ai(e)==Ti}var Si=Oi,Yr=Si,wi=se,Vt=Object.prototype,Ii=Vt.hasOwnProperty,Ci=Vt.propertyIsEnumerable,Di=Yr(function(){return arguments}())?Yr:function(e){return wi(e)&&Ii.call(e,"callee")&&!Ci.call(e,"callee")},kt=Di,ji=Array.isArray,me=ji,Li=9007199254740991;function xi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Li}var Jt=xi,Ni=Gt,Ri=Jt;function Pi(e){return e!=null&&Ri(e.length)&&!Ni(e)}var hr=Pi,ae={exports:{}};function Ui(){return!1}var Mi=Ui;(function(e,r){var t=K,n=Mi,a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,f=s?t.Buffer:void 0,o=f?f.isBuffer:void 0,$=o||n;e.exports=$})(ae,ae.exports);var Fi=Re,Bi=Jt,Hi=se,Yi="[object Arguments]",Gi="[object Array]",qi="[object Boolean]",Wi="[object Date]",Ki="[object Error]",Vi="[object Function]",ki="[object Map]",Ji="[object Number]",zi="[object Object]",Zi="[object RegExp]",Xi="[object Set]",Qi="[object String]",es="[object WeakMap]",rs="[object ArrayBuffer]",ts="[object DataView]",ns="[object Float32Array]",as="[object Float64Array]",is="[object Int8Array]",ss="[object Int16Array]",os="[object Int32Array]",us="[object Uint8Array]",fs="[object Uint8ClampedArray]",cs="[object Uint16Array]",ls="[object Uint32Array]",P={};P[ns]=P[as]=P[is]=P[ss]=P[os]=P[us]=P[fs]=P[cs]=P[ls]=!0;P[Yi]=P[Gi]=P[rs]=P[qi]=P[ts]=P[Wi]=P[Ki]=P[Vi]=P[ki]=P[Ji]=P[zi]=P[Zi]=P[Xi]=P[Qi]=P[es]=!1;function ds(e){return Hi(e)&&Bi(e.length)&&!!P[Fi(e)]}var hs=ds;function vs(e){return function(r){return e(r)}}var vr=vs,pe={exports:{}};(function(e,r){var t=Ht,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&t.process,f=function(){try{var o=a&&a.require&&a.require("util").types;return o||s&&s.binding&&s.binding("util")}catch{}}();e.exports=f})(pe,pe.exports);var ps=hs,gs=vr,Gr=pe.exports,qr=Gr&&Gr.isTypedArray,$s=qr?gs(qr):ps,pr=$s,ys=Bt,ms=ye,bs=kt,_s=me,As=hr,Es=ae.exports,Ts=xe,Os=pr,Ss="[object Map]",ws="[object Set]",Is=Object.prototype,Cs=Is.hasOwnProperty;function Ds(e){if(e==null)return!0;if(As(e)&&(_s(e)||typeof e=="string"||typeof e.splice=="function"||Es(e)||Os(e)||bs(e)))return!e.length;var r=ms(e);if(r==Ss||r==ws)return!e.size;if(Ts(e))return!ys(e).length;for(var t in e)if(Cs.call(e,t))return!1;return!0}var gr=Ds,zt={exports:{}};(function(e,r){(function(t,n){e.exports=n()})(X,function(){var t="minute",n=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(i,s,f){var o=s.prototype;f.utc=function(v){var T={date:v,utc:!0,args:arguments};return new s(T)},o.utc=function(v){var T=f(this.toDate(),{locale:this.$L,utc:!0});return v?T.add(this.utcOffset(),t):T},o.local=function(){return f(this.toDate(),{locale:this.$L,utc:!1})};var $=o.parse;o.parse=function(v){v.utc&&(this.$u=!0),this.$utils().u(v.$offset)||(this.$offset=v.$offset),$.call(this,v)};var g=o.init;o.init=function(){if(this.$u){var v=this.$d;this.$y=v.getUTCFullYear(),this.$M=v.getUTCMonth(),this.$D=v.getUTCDate(),this.$W=v.getUTCDay(),this.$H=v.getUTCHours(),this.$m=v.getUTCMinutes(),this.$s=v.getUTCSeconds(),this.$ms=v.getUTCMilliseconds()}else g.call(this)};var p=o.utcOffset;o.utcOffset=function(v,T){var j=this.$utils().u;if(j(v))return this.$u?0:j(this.$offset)?p.call(this):this.$offset;if(typeof v=="string"&&(v=function(l){l===void 0&&(l="");var m=l.match(n);if(!m)return null;var w=(""+m[0]).match(a)||["-",0,0],O=w[0],I=60*+w[1]+ +w[2];return I===0?0:O==="+"?I:-I}(v),v===null))return this;var u=Math.abs(v)<=16?60*v:v,c=this;if(T)return c.$offset=u,c.$u=v===0,c;if(v!==0){var d=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(c=this.local().add(u+d,t)).$offset=u,c.$x.$localOffset=d}else c=this.utc();return c};var h=o.format;o.format=function(v){var T=v||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,T)},o.valueOf=function(){var v=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*v},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var y=o.toDate;o.toDate=function(v){return v==="s"&&this.$offset?f(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():y.call(this)};var A=o.diff;o.diff=function(v,T,j){if(v&&this.$u===v.$u)return A.call(this,v,T,j);var u=this.local(),c=f(v).local();return A.call(u,c,T,j)}}})})(zt);var js=zt.exports,Zt={exports:{}};(function(e,r){(function(t,n){e.exports=n()})(X,function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(a,i,s){var f,o=function(h,y,A){A===void 0&&(A={});var v=new Date(h),T=function(j,u){u===void 0&&(u={});var c=u.timeZoneName||"short",d=j+"|"+c,l=n[d];return l||(l=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:j,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:c}),n[d]=l),l}(y,A);return T.formatToParts(v)},$=function(h,y){for(var A=o(h,y),v=[],T=0;T<A.length;T+=1){var j=A[T],u=j.type,c=j.value,d=t[u];d>=0&&(v[d]=parseInt(c,10))}var l=v[3],m=l===24?0:l,w=v[0]+"-"+v[1]+"-"+v[2]+" "+m+":"+v[4]+":"+v[5]+":000",O=+h;return(s.utc(w).valueOf()-(O-=O%1e3))/6e4},g=i.prototype;g.tz=function(h,y){h===void 0&&(h=f);var A=this.utcOffset(),v=this.toDate(),T=v.toLocaleString("en-US",{timeZone:h}),j=Math.round((v-new Date(T))/1e3/60),u=s(T).$set("millisecond",this.$ms).utcOffset(15*-Math.round(v.getTimezoneOffset()/15)-j,!0);if(y){var c=u.utcOffset();u=u.add(A-c,"minute")}return u.$x.$timezone=h,u},g.offsetName=function(h){var y=this.$x.$timezone||s.tz.guess(),A=o(this.valueOf(),y,{timeZoneName:h}).find(function(v){return v.type.toLowerCase()==="timezonename"});return A&&A.value};var p=g.startOf;g.startOf=function(h,y){if(!this.$x||!this.$x.$timezone)return p.call(this,h,y);var A=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return p.call(A,h,y).tz(this.$x.$timezone,!0)},s.tz=function(h,y,A){var v=A&&y,T=A||y||f,j=$(+s(),T);if(typeof h!="string")return s(h).tz(T);var u=function(m,w,O){var I=m-60*w*1e3,x=$(I,O);if(w===x)return[I,w];var k=$(I-=60*(x-w)*1e3,O);return x===k?[I,x]:[m-60*Math.min(x,k)*1e3,Math.max(x,k)]}(s.utc(h,v).valueOf(),j,T),c=u[0],d=u[1],l=s(c).utcOffset(d);return l.$x.$timezone=T,l},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(h){f=h}}})})(Zt);var Ls=Zt.exports,Xt={exports:{}};(function(e,r){(function(t,n){e.exports=n()})(X,function(){var t=1e3,n=6e4,a=36e5,i="millisecond",s="second",f="minute",o="hour",$="day",g="week",p="month",h="quarter",y="year",A="date",v="Invalid Date",T=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,j=/\[([^\]]+)]|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("_")},c=function(L,E,b){var S=String(L);return!S||S.length>=E?L:""+Array(E+1-S.length).join(b)+L},d={s:c,z:function(L){var E=-L.utcOffset(),b=Math.abs(E),S=Math.floor(b/60),_=b%60;return(E<=0?"+":"-")+c(S,2,"0")+":"+c(_,2,"0")},m:function L(E,b){if(E.date()<b.date())return-L(b,E);var S=12*(b.year()-E.year())+(b.month()-E.month()),_=E.clone().add(S,p),D=b-_<0,C=E.clone().add(S+(D?-1:1),p);return+(-(S+(b-_)/(D?_-C:C-_))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:p,y,w:g,d:$,D:A,h:o,m:f,s,ms:i,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},l="en",m={};m[l]=u;var w=function(L){return L instanceof k},O=function L(E,b,S){var _;if(!E)return l;if(typeof E=="string"){var D=E.toLowerCase();m[D]&&(_=D),b&&(m[D]=b,_=D);var C=E.split("-");if(!_&&C.length>1)return L(C[0])}else{var N=E.name;m[N]=E,_=N}return!S&&_&&(l=_),_||!S&&l},I=function(L,E){if(w(L))return L.clone();var b=typeof E=="object"?E:{};return b.date=L,b.args=arguments,new k(b)},x=d;x.l=O,x.i=w,x.w=function(L,E){return I(L,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var k=function(){function L(b){this.$L=O(b.locale,null,!0),this.parse(b)}var E=L.prototype;return E.parse=function(b){this.$d=function(S){var _=S.date,D=S.utc;if(_===null)return new Date(NaN);if(x.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var C=_.match(T);if(C){var N=C[2]-1||0,M=(C[7]||"0").substring(0,3);return D?new Date(Date.UTC(C[1],N,C[3]||1,C[4]||0,C[5]||0,C[6]||0,M)):new Date(C[1],N,C[3]||1,C[4]||0,C[5]||0,C[6]||0,M)}}return new Date(_)}(b),this.$x=b.x||{},this.init()},E.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},E.$utils=function(){return x},E.isValid=function(){return this.$d.toString()!==v},E.isSame=function(b,S){var _=I(b);return this.startOf(S)<=_&&_<=this.endOf(S)},E.isAfter=function(b,S){return I(b)<this.startOf(S)},E.isBefore=function(b,S){return this.endOf(S)<I(b)},E.$g=function(b,S,_){return x.u(b)?this[S]:this.set(_,b)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(b,S){var _=this,D=!!x.u(S)||S,C=x.p(b),N=function(re,G){var z=x.w(_.$u?Date.UTC(_.$y,G,re):new Date(_.$y,G,re),_);return D?z:z.endOf($)},M=function(re,G){return x.w(_.toDate()[re].apply(_.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(G)),_)},U=this.$W,H=this.$M,J=this.$D,V="set"+(this.$u?"UTC":"");switch(C){case y:return D?N(1,0):N(31,11);case p:return D?N(1,H):N(0,H+1);case g:var le=this.$locale().weekStart||0,de=(U<le?U+7:U)-le;return N(D?J-de:J+(6-de),H);case $:case A:return M(V+"Hours",0);case o:return M(V+"Minutes",1);case f:return M(V+"Seconds",2);case s:return M(V+"Milliseconds",3);default:return this.clone()}},E.endOf=function(b){return this.startOf(b,!1)},E.$set=function(b,S){var _,D=x.p(b),C="set"+(this.$u?"UTC":""),N=(_={},_[$]=C+"Date",_[A]=C+"Date",_[p]=C+"Month",_[y]=C+"FullYear",_[o]=C+"Hours",_[f]=C+"Minutes",_[s]=C+"Seconds",_[i]=C+"Milliseconds",_)[D],M=D===$?this.$D+(S-this.$W):S;if(D===p||D===y){var U=this.clone().set(A,1);U.$d[N](M),U.init(),this.$d=U.set(A,Math.min(this.$D,U.daysInMonth())).$d}else N&&this.$d[N](M);return this.init(),this},E.set=function(b,S){return this.clone().$set(b,S)},E.get=function(b){return this[x.p(b)]()},E.add=function(b,S){var _,D=this;b=Number(b);var C=x.p(S),N=function(H){var J=I(D);return x.w(J.date(J.date()+Math.round(H*b)),D)};if(C===p)return this.set(p,this.$M+b);if(C===y)return this.set(y,this.$y+b);if(C===$)return N(1);if(C===g)return N(7);var M=(_={},_[f]=n,_[o]=a,_[s]=t,_)[C]||1,U=this.$d.getTime()+b*M;return x.w(U,this)},E.subtract=function(b,S){return this.add(-1*b,S)},E.format=function(b){var S=this,_=this.$locale();if(!this.isValid())return _.invalidDate||v;var D=b||"YYYY-MM-DDTHH:mm:ssZ",C=x.z(this),N=this.$H,M=this.$m,U=this.$M,H=_.weekdays,J=_.months,V=function(G,z,qe,_e){return G&&(G[z]||G(S,D))||qe[z].slice(0,_e)},le=function(G){return x.s(N%12||12,G,"0")},de=_.meridiem||function(G,z,qe){var _e=G<12?"AM":"PM";return qe?_e.toLowerCase():_e},re={YY:String(this.$y).slice(-2),YYYY:this.$y,M:U+1,MM:x.s(U+1,2,"0"),MMM:V(_.monthsShort,U,J,3),MMMM:V(J,U),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:V(_.weekdaysMin,this.$W,H,2),ddd:V(_.weekdaysShort,this.$W,H,3),dddd:H[this.$W],H:String(N),HH:x.s(N,2,"0"),h:le(1),hh:le(2),a:de(N,M,!0),A:de(N,M,!1),m:String(M),mm:x.s(M,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:C};return D.replace(j,function(G,z){return z||re[G]||C.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(b,S,_){var D,C=x.p(S),N=I(b),M=(N.utcOffset()-this.utcOffset())*n,U=this-N,H=x.m(this,N);return H=(D={},D[y]=H/12,D[p]=H,D[h]=H/3,D[g]=(U-M)/6048e5,D[$]=(U-M)/864e5,D[o]=U/a,D[f]=U/n,D[s]=U/t,D)[C]||U,_?H:x.a(H)},E.daysInMonth=function(){return this.endOf(p).$D},E.$locale=function(){return m[this.$L]},E.locale=function(b,S){if(!b)return this.$L;var _=this.clone(),D=O(b,S,!0);return D&&(_.$L=D),_},E.clone=function(){return x.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},L}(),Lr=k.prototype;return I.prototype=Lr,[["$ms",i],["$s",s],["$m",f],["$H",o],["$W",$],["$M",p],["$y",y],["$D",A]].forEach(function(L){Lr[L[1]]=function(E){return this.$g(E,L[0],L[1])}}),I.extend=function(L,E){return L.$i||(L(E,k,I),L.$i=!0),I},I.locale=O,I.isDayjs=w,I.unix=function(L){return I(1e3*L)},I.en=m[l],I.Ls=m,I.p={},I})})(Xt);var ge=Xt.exports;ge.extend(js);ge.extend(Ls);const Qt=["SUN","MON","TUE","WED","THU","FRI","SAT"],Ie=e=>{const[r,t]=e.split(":");return{hour:parseInt(r||"0",10),minutes:parseInt(t||"0",10)}};function ar(e,r,t){const{availability:n}=e;if(!n)return!0;if(gr(n))return!1;const a=t?ge(t).tz(r):ge().tz(r),i=a.day(),s=n[Qt[i]];if(!Array.isArray(s)||s.length!==2)return!1;const f=a.hour(),o=a.minute(),$=Ie(s[0]),g=Ie(s[1]);return f<$.hour||f===$.hour&&o<$.minutes?!1:!(f>g.hour||f===g.hour&&o>g.minutes)}const ir=(e,r=void 0,t=void 0,n=!1)=>n?e.map(i=>{let s;return Array.isArray(i.items)&&(s=ir(i.items,r,t,n)),{...i,items:s,outsideAvailabilitySlot:!ar(i,r,t)||(s==null?void 0:s.every(f=>f.outsideAvailabilitySlot))||!1}}):e.filter(i=>ar(i,r,t)).map(i=>Array.isArray(i.items)?{...i,items:ir(i.items,r,t)}:i),Wr=(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 s=ir(i.items,r,t,n);s.length>0&&a.push({...i,items:s})}),n&&(a=a.map(i=>!i.items||!Array.isArray(i.items)?i:{...i,outsideAvailabilitySlot:!ar(i,r,t)||i.items.every(s=>s.outsideAvailabilitySlot)})),a};function ve(e){const r=e==null?void 0:e.week;if(!e||!e.active||!r)return!1;const t=ge(),n=t.day(),a=r[Qt[n]];return a?a.some(i=>xs(t,i)):!1}function xs(e,r){const t=e.hour(),n=e.minute(),a=Ie(r.from),i=Ie(r.to);return t<a.hour||t===a.hour&&n<a.minutes?!1:!(t>i.hour||t===i.hour&&n>i.minutes)}function Ns(){this.__data__=[],this.size=0}var Rs=Ns;function Ps(e,r){return e===r||e!==e&&r!==r}var $r=Ps,Us=$r;function Ms(e,r){for(var t=e.length;t--;)if(Us(e[t][0],r))return t;return-1}var Pe=Ms,Fs=Pe,Bs=Array.prototype,Hs=Bs.splice;function Ys(e){var r=this.__data__,t=Fs(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():Hs.call(r,t,1),--this.size,!0}var Gs=Ys,qs=Pe;function Ws(e){var r=this.__data__,t=qs(r,e);return t<0?void 0:r[t][1]}var Ks=Ws,Vs=Pe;function ks(e){return Vs(this.__data__,e)>-1}var Js=ks,zs=Pe;function Zs(e,r){var t=this.__data__,n=zs(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var Xs=Zs,Qs=Rs,eo=Gs,ro=Ks,to=Js,no=Xs;function oe(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])}}oe.prototype.clear=Qs;oe.prototype.delete=eo;oe.prototype.get=ro;oe.prototype.has=to;oe.prototype.set=no;var Ue=oe,ao=Ue;function io(){this.__data__=new ao,this.size=0}var so=io;function oo(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var uo=oo;function fo(e){return this.__data__.get(e)}var co=fo;function lo(e){return this.__data__.has(e)}var ho=lo,vo=Q,po=vo(Object,"create"),Me=po,Kr=Me;function go(){this.__data__=Kr?Kr(null):{},this.size=0}var $o=go;function yo(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var mo=yo,bo=Me,_o="__lodash_hash_undefined__",Ao=Object.prototype,Eo=Ao.hasOwnProperty;function To(e){var r=this.__data__;if(bo){var t=r[e];return t===_o?void 0:t}return Eo.call(r,e)?r[e]:void 0}var Oo=To,So=Me,wo=Object.prototype,Io=wo.hasOwnProperty;function Co(e){var r=this.__data__;return So?r[e]!==void 0:Io.call(r,e)}var Do=Co,jo=Me,Lo="__lodash_hash_undefined__";function xo(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=jo&&r===void 0?Lo:r,this}var No=xo,Ro=$o,Po=mo,Uo=Oo,Mo=Do,Fo=No;function ue(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])}}ue.prototype.clear=Ro;ue.prototype.delete=Po;ue.prototype.get=Uo;ue.prototype.has=Mo;ue.prototype.set=Fo;var Bo=ue,Vr=Bo,Ho=Ue,Yo=dr;function Go(){this.size=0,this.__data__={hash:new Vr,map:new(Yo||Ho),string:new Vr}}var qo=Go;function Wo(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var Ko=Wo,Vo=Ko;function ko(e,r){var t=e.__data__;return Vo(r)?t[typeof r=="string"?"string":"hash"]:t.map}var Fe=ko,Jo=Fe;function zo(e){var r=Jo(this,e).delete(e);return this.size-=r?1:0,r}var Zo=zo,Xo=Fe;function Qo(e){return Xo(this,e).get(e)}var eu=Qo,ru=Fe;function tu(e){return ru(this,e).has(e)}var nu=tu,au=Fe;function iu(e,r){var t=au(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}var su=iu,ou=qo,uu=Zo,fu=eu,cu=nu,lu=su;function fe(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])}}fe.prototype.clear=ou;fe.prototype.delete=uu;fe.prototype.get=fu;fe.prototype.has=cu;fe.prototype.set=lu;var en=fe,du=Ue,hu=dr,vu=en,pu=200;function gu(e,r){var t=this.__data__;if(t instanceof du){var n=t.__data__;if(!hu||n.length<pu-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new vu(n)}return t.set(e,r),this.size=t.size,this}var $u=gu,yu=Ue,mu=so,bu=uo,_u=co,Au=ho,Eu=$u;function ce(e){var r=this.__data__=new yu(e);this.size=r.size}ce.prototype.clear=mu;ce.prototype.delete=bu;ce.prototype.get=_u;ce.prototype.has=Au;ce.prototype.set=Eu;var rn=ce,Tu="__lodash_hash_undefined__";function Ou(e){return this.__data__.set(e,Tu),this}var Su=Ou;function wu(e){return this.__data__.has(e)}var Iu=wu,Cu=en,Du=Su,ju=Iu;function Ce(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new Cu;++r<t;)this.add(e[r])}Ce.prototype.add=Ce.prototype.push=Du;Ce.prototype.has=ju;var tn=Ce;function Lu(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 xu=Lu;function Nu(e,r){return e.has(r)}var nn=Nu,Ru=tn,Pu=xu,Uu=nn,Mu=1,Fu=2;function Bu(e,r,t,n,a,i){var s=t&Mu,f=e.length,o=r.length;if(f!=o&&!(s&&o>f))return!1;var $=i.get(e),g=i.get(r);if($&&g)return $==r&&g==e;var p=-1,h=!0,y=t&Fu?new Ru:void 0;for(i.set(e,r),i.set(r,e);++p<f;){var A=e[p],v=r[p];if(n)var T=s?n(v,A,p,r,e,i):n(A,v,p,e,r,i);if(T!==void 0){if(T)continue;h=!1;break}if(y){if(!Pu(r,function(j,u){if(!Uu(y,u)&&(A===j||a(A,j,t,n,i)))return y.push(u)})){h=!1;break}}else if(!(A===v||a(A,v,t,n,i))){h=!1;break}}return i.delete(e),i.delete(r),h}var an=Bu,Hu=K,Yu=Hu.Uint8Array,sn=Yu;function Gu(e){var r=-1,t=Array(e.size);return e.forEach(function(n,a){t[++r]=[a,n]}),t}var qu=Gu;function Wu(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var yr=Wu,kr=Ne,Jr=sn,Ku=$r,Vu=an,ku=qu,Ju=yr,zu=1,Zu=2,Xu="[object Boolean]",Qu="[object Date]",ef="[object Error]",rf="[object Map]",tf="[object Number]",nf="[object RegExp]",af="[object Set]",sf="[object String]",of="[object Symbol]",uf="[object ArrayBuffer]",ff="[object DataView]",zr=kr?kr.prototype:void 0,Ke=zr?zr.valueOf:void 0;function cf(e,r,t,n,a,i,s){switch(t){case ff:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case uf:return!(e.byteLength!=r.byteLength||!i(new Jr(e),new Jr(r)));case Xu:case Qu:case tf:return Ku(+e,+r);case ef:return e.name==r.name&&e.message==r.message;case nf:case sf:return e==r+"";case rf:var f=ku;case af:var o=n&zu;if(f||(f=Ju),e.size!=r.size&&!o)return!1;var $=s.get(e);if($)return $==r;n|=Zu,s.set(e,r);var g=Vu(f(e),f(r),n,a,i,s);return s.delete(e),g;case of:if(Ke)return Ke.call(e)==Ke.call(r)}return!1}var lf=cf;function df(e,r){for(var t=-1,n=r.length,a=e.length;++t<n;)e[a+t]=r[t];return e}var on=df,hf=on,vf=me;function pf(e,r,t){var n=r(e);return vf(e)?n:hf(n,t(e))}var un=pf;function gf(e,r){for(var t=-1,n=e==null?0:e.length,a=0,i=[];++t<n;){var s=e[t];r(s,t,e)&&(i[a++]=s)}return i}var $f=gf;function yf(){return[]}var fn=yf,mf=$f,bf=fn,_f=Object.prototype,Af=_f.propertyIsEnumerable,Zr=Object.getOwnPropertySymbols,Ef=Zr?function(e){return e==null?[]:(e=Object(e),mf(Zr(e),function(r){return Af.call(e,r)}))}:bf,mr=Ef;function Tf(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var Of=Tf,Sf=9007199254740991,wf=/^(?:0|[1-9]\d*)$/;function If(e,r){var t=typeof e;return r=r==null?Sf:r,!!r&&(t=="number"||t!="symbol"&&wf.test(e))&&e>-1&&e%1==0&&e<r}var Cf=If,Df=Of,jf=kt,Lf=me,xf=ae.exports,Nf=Cf,Rf=pr,Pf=Object.prototype,Uf=Pf.hasOwnProperty;function Mf(e,r){var t=Lf(e),n=!t&&jf(e),a=!t&&!n&&xf(e),i=!t&&!n&&!a&&Rf(e),s=t||n||a||i,f=s?Df(e.length,String):[],o=f.length;for(var $ in e)(r||Uf.call(e,$))&&!(s&&($=="length"||a&&($=="offset"||$=="parent")||i&&($=="buffer"||$=="byteLength"||$=="byteOffset")||Nf($,o)))&&f.push($);return f}var cn=Mf,Ff=cn,Bf=Bt,Hf=hr;function Yf(e){return Hf(e)?Ff(e):Bf(e)}var br=Yf,Gf=un,qf=mr,Wf=br;function Kf(e){return Gf(e,Wf,qf)}var ln=Kf,Xr=ln,Vf=1,kf=Object.prototype,Jf=kf.hasOwnProperty;function zf(e,r,t,n,a,i){var s=t&Vf,f=Xr(e),o=f.length,$=Xr(r),g=$.length;if(o!=g&&!s)return!1;for(var p=o;p--;){var h=f[p];if(!(s?h in r:Jf.call(r,h)))return!1}var y=i.get(e),A=i.get(r);if(y&&A)return y==r&&A==e;var v=!0;i.set(e,r),i.set(r,e);for(var T=s;++p<o;){h=f[p];var j=e[h],u=r[h];if(n)var c=s?n(u,j,h,r,e,i):n(j,u,h,e,r,i);if(!(c===void 0?j===u||a(j,u,t,n,i):c)){v=!1;break}T||(T=h=="constructor")}if(v&&!T){var d=e.constructor,l=r.constructor;d!=l&&"constructor"in e&&"constructor"in r&&!(typeof d=="function"&&d instanceof d&&typeof l=="function"&&l instanceof l)&&(v=!1)}return i.delete(e),i.delete(r),v}var Zf=zf,Ve=rn,Xf=an,Qf=lf,ec=Zf,Qr=ye,et=me,rt=ae.exports,rc=pr,tc=1,tt="[object Arguments]",nt="[object Array]",Ae="[object Object]",nc=Object.prototype,at=nc.hasOwnProperty;function ac(e,r,t,n,a,i){var s=et(e),f=et(r),o=s?nt:Qr(e),$=f?nt:Qr(r);o=o==tt?Ae:o,$=$==tt?Ae:$;var g=o==Ae,p=$==Ae,h=o==$;if(h&&rt(e)){if(!rt(r))return!1;s=!0,g=!1}if(h&&!g)return i||(i=new Ve),s||rc(e)?Xf(e,r,t,n,a,i):Qf(e,r,o,t,n,a,i);if(!(t&tc)){var y=g&&at.call(e,"__wrapped__"),A=p&&at.call(r,"__wrapped__");if(y||A){var v=y?e.value():e,T=A?r.value():r;return i||(i=new Ve),a(v,T,t,n,i)}}return h?(i||(i=new Ve),ec(e,r,t,n,a,i)):!1}var ic=ac,sc=ic,it=se;function dn(e,r,t,n,a){return e===r?!0:e==null||r==null||!it(e)&&!it(r)?e!==e&&r!==r:sc(e,r,t,n,dn,a)}var oc=dn,uc=oc;function fc(e,r){return uc(e,r)}var hn=fc,sr={},cc=e=>encodeURIComponent(e).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),vn="%[a-f0-9]{2}",st=new RegExp("("+vn+")|([^%]+?)","gi"),ot=new RegExp("("+vn+")+","gi");function or(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([],or(t),or(n))}function lc(e){try{return decodeURIComponent(e)}catch{for(var r=e.match(st)||[],t=1;t<r.length;t++)e=or(r,t).join(""),r=e.match(st)||[];return e}}function dc(e){for(var r={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},t=ot.exec(e);t;){try{r[t[0]]=decodeURIComponent(t[0])}catch{var n=lc(t[0]);n!==t[0]&&(r[t[0]]=n)}t=ot.exec(e)}r["%C2"]="\uFFFD";for(var a=Object.keys(r),i=0;i<a.length;i++){var s=a[i];e=e.replace(new RegExp(s,"g"),r[s])}return e}var hc=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 dc(e)}},vc=(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)]},pc=function(e,r){for(var t={},n=Object.keys(e),a=Array.isArray(r),i=0;i<n.length;i++){var s=n[i],f=e[s];(a?r.indexOf(s)!==-1:r(s,f,e))&&(t[s]=f)}return t};(function(e){const r=cc,t=hc,n=vc,a=pc,i=u=>u==null,s=Symbol("encodeFragmentIdentifier");function f(u){switch(u.arrayFormat){case"index":return c=>(d,l)=>{const m=d.length;return l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[g(c,u),"[",m,"]"].join("")]:[...d,[g(c,u),"[",g(m,u),"]=",g(l,u)].join("")]};case"bracket":return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[g(c,u),"[]"].join("")]:[...d,[g(c,u),"[]=",g(l,u)].join("")];case"colon-list-separator":return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[g(c,u),":list="].join("")]:[...d,[g(c,u),":list=",g(l,u)].join("")];case"comma":case"separator":case"bracket-separator":{const c=u.arrayFormat==="bracket-separator"?"[]=":"=";return d=>(l,m)=>m===void 0||u.skipNull&&m===null||u.skipEmptyString&&m===""?l:(m=m===null?"":m,l.length===0?[[g(d,u),c,g(m,u)].join("")]:[[l,g(m,u)].join(u.arrayFormatSeparator)])}default:return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,g(c,u)]:[...d,[g(c,u),"=",g(l,u)].join("")]}}function o(u){let c;switch(u.arrayFormat){case"index":return(d,l,m)=>{if(c=/\[(\d*)\]$/.exec(d),d=d.replace(/\[\d*\]$/,""),!c){m[d]=l;return}m[d]===void 0&&(m[d]={}),m[d][c[1]]=l};case"bracket":return(d,l,m)=>{if(c=/(\[\])$/.exec(d),d=d.replace(/\[\]$/,""),!c){m[d]=l;return}if(m[d]===void 0){m[d]=[l];return}m[d]=[].concat(m[d],l)};case"colon-list-separator":return(d,l,m)=>{if(c=/(:list)$/.exec(d),d=d.replace(/:list$/,""),!c){m[d]=l;return}if(m[d]===void 0){m[d]=[l];return}m[d]=[].concat(m[d],l)};case"comma":case"separator":return(d,l,m)=>{const w=typeof l=="string"&&l.includes(u.arrayFormatSeparator),O=typeof l=="string"&&!w&&p(l,u).includes(u.arrayFormatSeparator);l=O?p(l,u):l;const I=w||O?l.split(u.arrayFormatSeparator).map(x=>p(x,u)):l===null?l:p(l,u);m[d]=I};case"bracket-separator":return(d,l,m)=>{const w=/(\[\])$/.test(d);if(d=d.replace(/\[\]$/,""),!w){m[d]=l&&p(l,u);return}const O=l===null?[]:l.split(u.arrayFormatSeparator).map(I=>p(I,u));if(m[d]===void 0){m[d]=O;return}m[d]=[].concat(m[d],O)};default:return(d,l,m)=>{if(m[d]===void 0){m[d]=l;return}m[d]=[].concat(m[d],l)}}}function $(u){if(typeof u!="string"||u.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function g(u,c){return c.encode?c.strict?r(u):encodeURIComponent(u):u}function p(u,c){return c.decode?t(u):u}function h(u){return Array.isArray(u)?u.sort():typeof u=="object"?h(Object.keys(u)).sort((c,d)=>Number(c)-Number(d)).map(c=>u[c]):u}function y(u){const c=u.indexOf("#");return c!==-1&&(u=u.slice(0,c)),u}function A(u){let c="";const d=u.indexOf("#");return d!==-1&&(c=u.slice(d)),c}function v(u){u=y(u);const c=u.indexOf("?");return c===-1?"":u.slice(c+1)}function T(u,c){return c.parseNumbers&&!Number.isNaN(Number(u))&&typeof u=="string"&&u.trim()!==""?u=Number(u):c.parseBooleans&&u!==null&&(u.toLowerCase()==="true"||u.toLowerCase()==="false")&&(u=u.toLowerCase()==="true"),u}function j(u,c){c=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},c),$(c.arrayFormatSeparator);const d=o(c),l=Object.create(null);if(typeof u!="string"||(u=u.trim().replace(/^[?#&]/,""),!u))return l;for(const m of u.split("&")){if(m==="")continue;let[w,O]=n(c.decode?m.replace(/\+/g," "):m,"=");O=O===void 0?null:["comma","separator","bracket-separator"].includes(c.arrayFormat)?O:p(O,c),d(p(w,c),O,l)}for(const m of Object.keys(l)){const w=l[m];if(typeof w=="object"&&w!==null)for(const O of Object.keys(w))w[O]=T(w[O],c);else l[m]=T(w,c)}return c.sort===!1?l:(c.sort===!0?Object.keys(l).sort():Object.keys(l).sort(c.sort)).reduce((m,w)=>{const O=l[w];return Boolean(O)&&typeof O=="object"&&!Array.isArray(O)?m[w]=h(O):m[w]=O,m},Object.create(null))}e.extract=v,e.parse=j,e.stringify=(u,c)=>{if(!u)return"";c=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},c),$(c.arrayFormatSeparator);const d=O=>c.skipNull&&i(u[O])||c.skipEmptyString&&u[O]==="",l=f(c),m={};for(const O of Object.keys(u))d(O)||(m[O]=u[O]);const w=Object.keys(m);return c.sort!==!1&&w.sort(c.sort),w.map(O=>{const I=u[O];return I===void 0?"":I===null?g(O,c):Array.isArray(I)?I.length===0&&c.arrayFormat==="bracket-separator"?g(O,c)+"[]":I.reduce(l(O),[]).join("&"):g(O,c)+"="+g(I,c)}).filter(O=>O.length>0).join("&")},e.parseUrl=(u,c)=>{c=Object.assign({decode:!0},c);const[d,l]=n(u,"#");return Object.assign({url:d.split("?")[0]||"",query:j(v(u),c)},c&&c.parseFragmentIdentifier&&l?{fragmentIdentifier:p(l,c)}:{})},e.stringifyUrl=(u,c)=>{c=Object.assign({encode:!0,strict:!0,[s]:!0},c);const d=y(u.url).split("?")[0]||"",l=e.extract(u.url),m=e.parse(l,{sort:!1}),w=Object.assign(m,u.query);let O=e.stringify(w,c);O&&(O=`?${O}`);let I=A(u.url);return u.fragmentIdentifier&&(I=`#${c[s]?g(u.fragmentIdentifier,c):u.fragmentIdentifier}`),`${d}${O}${I}`},e.pick=(u,c,d)=>{d=Object.assign({parseFragmentIdentifier:!0,[s]:!1},d);const{url:l,query:m,fragmentIdentifier:w}=e.parseUrl(u,d);return e.stringifyUrl({url:l,query:a(m,c),fragmentIdentifier:w},d)},e.exclude=(u,c,d)=>{const l=Array.isArray(c)?m=>!c.includes(m):(m,w)=>!c(m,w);return e.pick(u,l,d)}})(sr);const gc=[".png",".jpg",".jpeg",".webp",".bmp",".tiff"];function _r(e,r=500){const t=sr.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 gc.includes(n)?sr.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 $c(e,r=500){return _r(e,r)}function yc(e,r,t,n){for(var a=e.length,i=t+(n?1:-1);n?i--:++i<a;)if(r(e[i],i,e))return i;return-1}var mc=yc;function bc(e){return e!==e}var _c=bc;function Ac(e,r,t){for(var n=t-1,a=e.length;++n<a;)if(e[n]===r)return n;return-1}var Ec=Ac,Tc=mc,Oc=_c,Sc=Ec;function wc(e,r,t){return r===r?Sc(e,r,t):Tc(e,Oc,t)}var Ic=wc,Cc=Ic;function Dc(e,r){var t=e==null?0:e.length;return!!t&&Cc(e,r,0)>-1}var jc=Dc;function Lc(e,r,t){for(var n=-1,a=e==null?0:e.length;++n<a;)if(t(r,e[n]))return!0;return!1}var xc=Lc;function Nc(){}var Rc=Nc,ke=Wt,Pc=Rc,Uc=yr,Mc=1/0,Fc=ke&&1/Uc(new ke([,-0]))[1]==Mc?function(e){return new ke(e)}:Pc,Bc=Fc,Hc=tn,Yc=jc,Gc=xc,qc=nn,Wc=Bc,Kc=yr,Vc=200;function kc(e,r,t){var n=-1,a=Yc,i=e.length,s=!0,f=[],o=f;if(t)s=!1,a=Gc;else if(i>=Vc){var $=r?null:Wc(e);if($)return Kc($);s=!1,a=qc,o=new Hc}else o=r?[]:f;e:for(;++n<i;){var g=e[n],p=r?r(g):g;if(g=t||g!==0?g:0,s&&p===p){for(var h=o.length;h--;)if(o[h]===p)continue e;r&&o.push(p),f.push(g)}else a(o,p,t)||(o!==f&&o.push(p),f.push(g))}return f}var Jc=kc,zc=Jc;function Zc(e){return e&&e.length?zc(e):[]}var Xc=Zc;function Qc(e,r=!1,t=void 0,n=60,a=void 0){const[i,s]=B.useState(e&&Wr(e,t,void 0,r));Le(f,n*1e3);function f(){const o=e&&Wr(e,t,void 0,r);hn(o,i)||(console.log("menu has changed",o),s(o))}return B.useEffect(()=>{if(e&&a&&a.length>0){const o=e.flatMap(pn);Xc(a.flatMap(g=>o.map(p=>_r(p,g)))).forEach(g=>{const p=new Image;p.src=g,console.log("prefetching image",g)})}},[]),B.useEffect(f,[i,e]),i}function pn(e){var t,n,a;let r=[];return(a=(n=(t=e==null?void 0:e.details)==null?void 0:t.media)==null?void 0:n[0])!=null&&a.url&&r.push(e.details.media[0].url),e.items&&(r=r.concat(e.items.flatMap(i=>pn(i)))),r}var ut;(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"})(ut||(ut={}));var ft;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(ft||(ft={}));var ur;(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"})(ur||(ur={}));var ct;(function(e){e.GROUP="group",e.PRODUCT="product"})(ct||(ct={}));var lt;(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"})(lt||(lt={}));var dt;(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"})(dt||(dt={}));var ht;(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"})(ht||(ht={}));var vt;(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"})(vt||(vt={}));var pt;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(pt||(pt={}));var gt;(function(e){e.GROUP="group",e.PRODUCT="product"})(gt||(gt={}));var $t;(function(e){e.DINE_IN="DINE_IN",e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.UBER_DELIVERY="UBER_DELIVERY",e.BOLT_DELIVERY="BOLT_DELIVERY",e.WOLT_DELIVERY="WOLT_DELIVERY"})($t||($t={}));function el(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var rl=el,tl=Q,nl=function(){try{var e=tl(Object,"defineProperty");return e({},"",{}),e}catch{}}(),al=nl,yt=al;function il(e,r,t){r=="__proto__"&&yt?yt(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}var gn=il,sl=gn,ol=$r,ul=Object.prototype,fl=ul.hasOwnProperty;function cl(e,r,t){var n=e[r];(!(fl.call(e,r)&&ol(n,t))||t===void 0&&!(r in e))&&sl(e,r,t)}var $n=cl,ll=$n,dl=gn;function hl(e,r,t,n){var a=!t;t||(t={});for(var i=-1,s=r.length;++i<s;){var f=r[i],o=n?n(t[f],e[f],f,t,e):void 0;o===void 0&&(o=e[f]),a?dl(t,f,o):ll(t,f,o)}return t}var Be=hl,vl=Be,pl=br;function gl(e,r){return e&&vl(r,pl(r),e)}var $l=gl;function yl(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var ml=yl,bl=$e,_l=xe,Al=ml,El=Object.prototype,Tl=El.hasOwnProperty;function Ol(e){if(!bl(e))return Al(e);var r=_l(e),t=[];for(var n in e)n=="constructor"&&(r||!Tl.call(e,n))||t.push(n);return t}var Sl=Ol,wl=cn,Il=Sl,Cl=hr;function Dl(e){return Cl(e)?wl(e,!0):Il(e)}var Ar=Dl,jl=Be,Ll=Ar;function xl(e,r){return e&&jl(r,Ll(r),e)}var Nl=xl,fr={exports:{}};(function(e,r){var t=K,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i?t.Buffer:void 0,f=s?s.allocUnsafe:void 0;function o($,g){if(g)return $.slice();var p=$.length,h=f?f(p):new $.constructor(p);return $.copy(h),h}e.exports=o})(fr,fr.exports);function Rl(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var Pl=Rl,Ul=Be,Ml=mr;function Fl(e,r){return Ul(e,Ml(e),r)}var Bl=Fl,Hl=Ft,Yl=Hl(Object.getPrototypeOf,Object),yn=Yl,Gl=on,ql=yn,Wl=mr,Kl=fn,Vl=Object.getOwnPropertySymbols,kl=Vl?function(e){for(var r=[];e;)Gl(r,Wl(e)),e=ql(e);return r}:Kl,mn=kl,Jl=Be,zl=mn;function Zl(e,r){return Jl(e,zl(e),r)}var Xl=Zl,Ql=un,ed=mn,rd=Ar;function td(e){return Ql(e,rd,ed)}var nd=td,ad=Object.prototype,id=ad.hasOwnProperty;function sd(e){var r=e.length,t=new e.constructor(r);return r&&typeof e[0]=="string"&&id.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var od=sd,mt=sn;function ud(e){var r=new e.constructor(e.byteLength);return new mt(r).set(new mt(e)),r}var Er=ud,fd=Er;function cd(e,r){var t=r?fd(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var ld=cd,dd=/\w*$/;function hd(e){var r=new e.constructor(e.source,dd.exec(e));return r.lastIndex=e.lastIndex,r}var vd=hd,bt=Ne,_t=bt?bt.prototype:void 0,At=_t?_t.valueOf:void 0;function pd(e){return At?Object(At.call(e)):{}}var gd=pd,$d=Er;function yd(e,r){var t=r?$d(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var md=yd,bd=Er,_d=ld,Ad=vd,Ed=gd,Td=md,Od="[object Boolean]",Sd="[object Date]",wd="[object Map]",Id="[object Number]",Cd="[object RegExp]",Dd="[object Set]",jd="[object String]",Ld="[object Symbol]",xd="[object ArrayBuffer]",Nd="[object DataView]",Rd="[object Float32Array]",Pd="[object Float64Array]",Ud="[object Int8Array]",Md="[object Int16Array]",Fd="[object Int32Array]",Bd="[object Uint8Array]",Hd="[object Uint8ClampedArray]",Yd="[object Uint16Array]",Gd="[object Uint32Array]";function qd(e,r,t){var n=e.constructor;switch(r){case xd:return bd(e);case Od:case Sd:return new n(+e);case Nd:return _d(e,t);case Rd:case Pd:case Ud:case Md:case Fd:case Bd:case Hd:case Yd:case Gd:return Td(e,t);case wd:return new n;case Id:case jd:return new n(e);case Cd:return Ad(e);case Dd:return new n;case Ld:return Ed(e)}}var Wd=qd,Kd=$e,Et=Object.create,Vd=function(){function e(){}return function(r){if(!Kd(r))return{};if(Et)return Et(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}(),kd=Vd,Jd=kd,zd=yn,Zd=xe;function Xd(e){return typeof e.constructor=="function"&&!Zd(e)?Jd(zd(e)):{}}var Qd=Xd,eh=ye,rh=se,th="[object Map]";function nh(e){return rh(e)&&eh(e)==th}var ah=nh,ih=ah,sh=vr,Tt=pe.exports,Ot=Tt&&Tt.isMap,oh=Ot?sh(Ot):ih,uh=oh,fh=ye,ch=se,lh="[object Set]";function dh(e){return ch(e)&&fh(e)==lh}var hh=dh,vh=hh,ph=vr,St=pe.exports,wt=St&&St.isSet,gh=wt?ph(wt):vh,$h=gh,yh=rn,mh=rl,bh=$n,_h=$l,Ah=Nl,Eh=fr.exports,Th=Pl,Oh=Bl,Sh=Xl,wh=ln,Ih=nd,Ch=ye,Dh=od,jh=Wd,Lh=Qd,xh=me,Nh=ae.exports,Rh=uh,Ph=$e,Uh=$h,Mh=br,Fh=Ar,Bh=1,Hh=2,Yh=4,bn="[object Arguments]",Gh="[object Array]",qh="[object Boolean]",Wh="[object Date]",Kh="[object Error]",_n="[object Function]",Vh="[object GeneratorFunction]",kh="[object Map]",Jh="[object Number]",An="[object Object]",zh="[object RegExp]",Zh="[object Set]",Xh="[object String]",Qh="[object Symbol]",ev="[object WeakMap]",rv="[object ArrayBuffer]",tv="[object DataView]",nv="[object Float32Array]",av="[object Float64Array]",iv="[object Int8Array]",sv="[object Int16Array]",ov="[object Int32Array]",uv="[object Uint8Array]",fv="[object Uint8ClampedArray]",cv="[object Uint16Array]",lv="[object Uint32Array]",R={};R[bn]=R[Gh]=R[rv]=R[tv]=R[qh]=R[Wh]=R[nv]=R[av]=R[iv]=R[sv]=R[ov]=R[kh]=R[Jh]=R[An]=R[zh]=R[Zh]=R[Xh]=R[Qh]=R[uv]=R[fv]=R[cv]=R[lv]=!0;R[Kh]=R[_n]=R[ev]=!1;function Oe(e,r,t,n,a,i){var s,f=r&Bh,o=r&Hh,$=r&Yh;if(t&&(s=a?t(e,n,a,i):t(e)),s!==void 0)return s;if(!Ph(e))return e;var g=xh(e);if(g){if(s=Dh(e),!f)return Th(e,s)}else{var p=Ch(e),h=p==_n||p==Vh;if(Nh(e))return Eh(e,f);if(p==An||p==bn||h&&!a){if(s=o||h?{}:Lh(e),!f)return o?Sh(e,Ah(s,e)):Oh(e,_h(s,e))}else{if(!R[p])return a?e:{};s=jh(e,p,f)}}i||(i=new yh);var y=i.get(e);if(y)return y;i.set(e,s),Uh(e)?e.forEach(function(T){s.add(Oe(T,r,t,T,e,i))}):Rh(e)&&e.forEach(function(T,j){s.set(j,Oe(T,r,t,j,e,i))});var A=$?o?Ih:wh:o?Fh:Mh,v=g?void 0:A(e);return mh(v||e,function(T,j){v&&(j=T,T=e[j]),bh(s,j,Oe(T,r,t,j,e,i))}),s}var dv=Oe,hv=dv,vv=1,pv=4;function gv(e){return hv(e,vv|pv)}var $v=gv;function yv(e,r){if(!r||!r.filter||!e||!e.filter||e.kind!==ur.CONFIG)return!0;if(e.filter&&e.items){const t=Object.values(e.filter).flat().filter(n=>{var a,i,s,f;return r.filter[(i=(a=e.items)==null?void 0:a[0])==null?void 0:i.fltCtx]&&Object.values(r.filter[(f=(s=e.items)==null?void 0:s[0])==null?void 0:f.fltCtx]).includes(n)});if(Array.isArray(t)&&t.length===0)return!1}return!0}const De=(e,r,t=0)=>{if(!e)return 0;let n=parseFloat(e.price)||0;const{items:a}=e,i=$v(r);return yv(e,i)&&Array.isArray(a)&&a.forEach(s=>{let f=0;if(s.kind!=="3e/product")f=De(s,i,t+1);else{const{selected:o={}}=i,{selCtx:$,id:g}=s;$ in o&&g in o[$]&&(f=De(s,i,t+1)*o[$][g],delete i.selected[$][g])}n+=f}),Math.round(100*n)/100},mv=({product:e,state:r,selected:t,cheapestGroupOptionsProduct:n})=>{var o;const a=r?De(e,r):0,i=e.state&&!gr((o=e==null?void 0:e.state)==null?void 0:o.selected)?De(e,e.state):0,s=e.minPrice&&parseFloat(e.price)===a;let f=t||!!n||parseFloat(e.price)===0?a||i:parseFloat(e.price);return n!==void 0&&(f-=n),s&&e.minPrice&&(f=parseFloat(e.minPrice)),{displayPrice:f,showAsMinPrice:s,calculatedPriceDefaultProductState:i}};function Tr(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 bv(e){return Tr(e)}function _v(e){return!e||e.length===0?null:Tr(e.flatMap(r=>r.lines))}var Or={exports:{}},En=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)}},Av=En,ee=Object.prototype.toString;function Sr(e){return ee.call(e)==="[object Array]"}function cr(e){return typeof e=="undefined"}function Ev(e){return e!==null&&!cr(e)&&e.constructor!==null&&!cr(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Tv(e){return ee.call(e)==="[object ArrayBuffer]"}function Ov(e){return typeof FormData!="undefined"&&e instanceof FormData}function Sv(e){var r;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&e.buffer instanceof ArrayBuffer,r}function wv(e){return typeof e=="string"}function Iv(e){return typeof e=="number"}function Tn(e){return e!==null&&typeof e=="object"}function Se(e){if(ee.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}function Cv(e){return ee.call(e)==="[object Date]"}function Dv(e){return ee.call(e)==="[object File]"}function jv(e){return ee.call(e)==="[object Blob]"}function On(e){return ee.call(e)==="[object Function]"}function Lv(e){return Tn(e)&&On(e.pipe)}function xv(e){return typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams}function Nv(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Rv(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function wr(e,r){if(!(e===null||typeof e=="undefined"))if(typeof e!="object"&&(e=[e]),Sr(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 lr(){var e={};function r(a,i){Se(e[i])&&Se(a)?e[i]=lr(e[i],a):Se(a)?e[i]=lr({},a):Sr(a)?e[i]=a.slice():e[i]=a}for(var t=0,n=arguments.length;t<n;t++)wr(arguments[t],r);return e}function Pv(e,r,t){return wr(r,function(a,i){t&&typeof a=="function"?e[i]=Av(a,t):e[i]=a}),e}function Uv(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var q={isArray:Sr,isArrayBuffer:Tv,isBuffer:Ev,isFormData:Ov,isArrayBufferView:Sv,isString:wv,isNumber:Iv,isObject:Tn,isPlainObject:Se,isUndefined:cr,isDate:Cv,isFile:Dv,isBlob:jv,isFunction:On,isStream:Lv,isURLSearchParams:xv,isStandardBrowserEnv:Rv,forEach:wr,merge:lr,extend:Pv,trim:Nv,stripBOM:Uv},te=q;function It(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Sn=function(r,t,n){if(!t)return r;var a;if(n)a=n(t);else if(te.isURLSearchParams(t))a=t.toString();else{var i=[];te.forEach(t,function(o,$){o===null||typeof o=="undefined"||(te.isArray(o)?$=$+"[]":o=[o],te.forEach(o,function(p){te.isDate(p)?p=p.toISOString():te.isObject(p)&&(p=JSON.stringify(p)),i.push(It($)+"="+It(p))}))}),a=i.join("&")}if(a){var s=r.indexOf("#");s!==-1&&(r=r.slice(0,s)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r},Mv=q;function He(){this.handlers=[]}He.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};He.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)};He.prototype.forEach=function(r){Mv.forEach(this.handlers,function(n){n!==null&&r(n)})};var Fv=He,Bv=q,Hv=function(r,t){Bv.forEach(r,function(a,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(r[t]=a,delete r[i])})},wn=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},Yv=wn,In=function(r,t,n,a,i){var s=new Error(r);return Yv(s,t,n,a,i)},Gv=In,qv=function(r,t,n){var a=n.config.validateStatus;!n.status||!a||a(n.status)?r(n):t(Gv("Request failed with status code "+n.status,n.config,null,n.request,n))},Ee=q,Wv=Ee.isStandardBrowserEnv()?function(){return{write:function(t,n,a,i,s,f){var o=[];o.push(t+"="+encodeURIComponent(n)),Ee.isNumber(a)&&o.push("expires="+new Date(a).toGMTString()),Ee.isString(i)&&o.push("path="+i),Ee.isString(s)&&o.push("domain="+s),f===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){var n=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Kv=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)},Vv=function(r,t){return t?r.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):r},kv=Kv,Jv=Vv,zv=function(r,t){return r&&!kv(t)?Jv(r,t):t},Je=q,Zv=["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"],Xv=function(r){var t={},n,a,i;return r&&Je.forEach(r.split(`
|
|
2
|
+
`),function(f){if(i=f.indexOf(":"),n=Je.trim(f.substr(0,i)).toLowerCase(),a=Je.trim(f.substr(i+1)),n){if(t[n]&&Zv.indexOf(n)>=0)return;n==="set-cookie"?t[n]=(t[n]?t[n]:[]).concat([a]):t[n]=t[n]?t[n]+", "+a:a}}),t},Ct=q,Qv=Ct.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),n;function a(i){var s=i;return r&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=a(window.location.href),function(s){var f=Ct.isString(s)?a(s):s;return f.protocol===n.protocol&&f.host===n.host}}():function(){return function(){return!0}}(),Te=q,ep=qv,rp=Wv,tp=Sn,np=zv,ap=Xv,ip=Qv,ze=In,Dt=function(r){return new Promise(function(n,a){var i=r.data,s=r.headers,f=r.responseType;Te.isFormData(i)&&delete s["Content-Type"];var o=new XMLHttpRequest;if(r.auth){var $=r.auth.username||"",g=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";s.Authorization="Basic "+btoa($+":"+g)}var p=np(r.baseURL,r.url);o.open(r.method.toUpperCase(),tp(p,r.params,r.paramsSerializer),!0),o.timeout=r.timeout;function h(){if(!!o){var A="getAllResponseHeaders"in o?ap(o.getAllResponseHeaders()):null,v=!f||f==="text"||f==="json"?o.responseText:o.response,T={data:v,status:o.status,statusText:o.statusText,headers:A,config:r,request:o};ep(n,a,T),o=null}}if("onloadend"in o?o.onloadend=h:o.onreadystatechange=function(){!o||o.readyState!==4||o.status===0&&!(o.responseURL&&o.responseURL.indexOf("file:")===0)||setTimeout(h)},o.onabort=function(){!o||(a(ze("Request aborted",r,"ECONNABORTED",o)),o=null)},o.onerror=function(){a(ze("Network Error",r,null,o)),o=null},o.ontimeout=function(){var v="timeout of "+r.timeout+"ms exceeded";r.timeoutErrorMessage&&(v=r.timeoutErrorMessage),a(ze(v,r,r.transitional&&r.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",o)),o=null},Te.isStandardBrowserEnv()){var y=(r.withCredentials||ip(p))&&r.xsrfCookieName?rp.read(r.xsrfCookieName):void 0;y&&(s[r.xsrfHeaderName]=y)}"setRequestHeader"in o&&Te.forEach(s,function(v,T){typeof i=="undefined"&&T.toLowerCase()==="content-type"?delete s[T]:o.setRequestHeader(T,v)}),Te.isUndefined(r.withCredentials)||(o.withCredentials=!!r.withCredentials),f&&f!=="json"&&(o.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&o.addEventListener("progress",r.onDownloadProgress),typeof r.onUploadProgress=="function"&&o.upload&&o.upload.addEventListener("progress",r.onUploadProgress),r.cancelToken&&r.cancelToken.promise.then(function(v){!o||(o.abort(),a(v),o=null)}),i||(i=null),o.send(i)})},F=q,jt=Hv,sp=wn,op={"Content-Type":"application/x-www-form-urlencoded"};function Lt(e,r){!F.isUndefined(e)&&F.isUndefined(e["Content-Type"])&&(e["Content-Type"]=r)}function up(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Dt),e}function fp(e,r,t){if(F.isString(e))try{return(r||JSON.parse)(e),F.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}var Ye={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:up(),transformRequest:[function(r,t){return jt(t,"Accept"),jt(t,"Content-Type"),F.isFormData(r)||F.isArrayBuffer(r)||F.isBuffer(r)||F.isStream(r)||F.isFile(r)||F.isBlob(r)?r:F.isArrayBufferView(r)?r.buffer:F.isURLSearchParams(r)?(Lt(t,"application/x-www-form-urlencoded;charset=utf-8"),r.toString()):F.isObject(r)||t&&t["Content-Type"]==="application/json"?(Lt(t,"application/json"),fp(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&&F.isString(r)&&r.length)try{return JSON.parse(r)}catch(s){if(i)throw s.name==="SyntaxError"?sp(s,this,"E_JSON_PARSE"):s}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(r){return r>=200&&r<300}};Ye.headers={common:{Accept:"application/json, text/plain, */*"}};F.forEach(["delete","get","head"],function(r){Ye.headers[r]={}});F.forEach(["post","put","patch"],function(r){Ye.headers[r]=F.merge(op)});var Ir=Ye,cp=q,lp=Ir,dp=function(r,t,n){var a=this||lp;return cp.forEach(n,function(s){r=s.call(a,r,t)}),r},Cn=function(r){return!!(r&&r.__CANCEL__)},xt=q,Ze=dp,hp=Cn,vp=Ir;function Xe(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var pp=function(r){Xe(r),r.headers=r.headers||{},r.data=Ze.call(r,r.data,r.headers,r.transformRequest),r.headers=xt.merge(r.headers.common||{},r.headers[r.method]||{},r.headers),xt.forEach(["delete","get","head","post","put","patch","common"],function(a){delete r.headers[a]});var t=r.adapter||vp.adapter;return t(r).then(function(a){return Xe(r),a.data=Ze.call(r,a.data,a.headers,r.transformResponse),a},function(a){return hp(a)||(Xe(r),a&&a.response&&(a.response.data=Ze.call(r,a.response.data,a.response.headers,r.transformResponse))),Promise.reject(a)})},Y=q,Dn=function(r,t){t=t||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],f=["validateStatus"];function o(h,y){return Y.isPlainObject(h)&&Y.isPlainObject(y)?Y.merge(h,y):Y.isPlainObject(y)?Y.merge({},y):Y.isArray(y)?y.slice():y}function $(h){Y.isUndefined(t[h])?Y.isUndefined(r[h])||(n[h]=o(void 0,r[h])):n[h]=o(r[h],t[h])}Y.forEach(a,function(y){Y.isUndefined(t[y])||(n[y]=o(void 0,t[y]))}),Y.forEach(i,$),Y.forEach(s,function(y){Y.isUndefined(t[y])?Y.isUndefined(r[y])||(n[y]=o(void 0,r[y])):n[y]=o(void 0,t[y])}),Y.forEach(f,function(y){y in t?n[y]=o(r[y],t[y]):y in r&&(n[y]=o(void 0,r[y]))});var g=a.concat(i).concat(s).concat(f),p=Object.keys(r).concat(Object.keys(t)).filter(function(y){return g.indexOf(y)===-1});return Y.forEach(p,$),n};const gp="axios",$p="0.21.4",yp="Promise based HTTP client for the browser and node.js",mp="index.js",bp={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"},_p={type:"git",url:"https://github.com/axios/axios.git"},Ap=["xhr","http","ajax","promise","node"],Ep="Matt Zabriskie",Tp="MIT",Op={url:"https://github.com/axios/axios/issues"},Sp="https://axios-http.com",wp={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"},Ip={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},Cp="dist/axios.min.js",Dp="dist/axios.min.js",jp="./index.d.ts",Lp={"follow-redirects":"^1.14.0"},xp=[{path:"./dist/axios.min.js",threshold:"5kB"}];var Np={name:gp,version:$p,description:yp,main:mp,scripts:bp,repository:_p,keywords:Ap,author:Ep,license:Tp,bugs:Op,homepage:Sp,devDependencies:wp,browser:Ip,jsdelivr:Cp,unpkg:Dp,typings:jp,dependencies:Lp,bundlesize:xp},jn=Np,Cr={};["object","boolean","number","function","string","symbol"].forEach(function(e,r){Cr[e]=function(n){return typeof n===e||"a"+(r<1?"n ":" ")+e}});var Nt={},Rp=jn.version.split(".");function Ln(e,r){for(var t=r?r.split("."):Rp,n=e.split("."),a=0;a<3;a++){if(t[a]>n[a])return!0;if(t[a]<n[a])return!1}return!1}Cr.transitional=function(r,t,n){var a=t&&Ln(t);function i(s,f){return"[Axios v"+jn.version+"] Transitional option '"+s+"'"+f+(n?". "+n:"")}return function(s,f,o){if(r===!1)throw new Error(i(f," has been removed in "+t));return a&&!Nt[f]&&(Nt[f]=!0,console.warn(i(f," has been deprecated since v"+t+" and will be removed in the near future"))),r?r(s,f,o):!0}};function Pp(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],s=r[i];if(s){var f=e[i],o=f===void 0||s(f,i,e);if(o!==!0)throw new TypeError("option "+i+" must be "+o);continue}if(t!==!0)throw Error("Unknown option "+i)}}var Up={isOlderVersion:Ln,assertOptions:Pp,validators:Cr},xn=q,Mp=Sn,Rt=Fv,Pt=pp,Ge=Dn,Nn=Up,ne=Nn.validators;function be(e){this.defaults=e,this.interceptors={request:new Rt,response:new Rt}}be.prototype.request=function(r){typeof r=="string"?(r=arguments[1]||{},r.url=arguments[0]):r=r||{},r=Ge(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&&Nn.assertOptions(t,{silentJSONParsing:ne.transitional(ne.boolean,"1.0.0"),forcedJSONParsing:ne.transitional(ne.boolean,"1.0.0"),clarifyTimeoutError:ne.transitional(ne.boolean,"1.0.0")},!1);var n=[],a=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(a=a&&h.synchronous,n.unshift(h.fulfilled,h.rejected))});var i=[];this.interceptors.response.forEach(function(h){i.push(h.fulfilled,h.rejected)});var s;if(!a){var f=[Pt,void 0];for(Array.prototype.unshift.apply(f,n),f=f.concat(i),s=Promise.resolve(r);f.length;)s=s.then(f.shift(),f.shift());return s}for(var o=r;n.length;){var $=n.shift(),g=n.shift();try{o=$(o)}catch(p){g(p);break}}try{s=Pt(o)}catch(p){return Promise.reject(p)}for(;i.length;)s=s.then(i.shift(),i.shift());return s};be.prototype.getUri=function(r){return r=Ge(this.defaults,r),Mp(r.url,r.params,r.paramsSerializer).replace(/^\?/,"")};xn.forEach(["delete","get","head","options"],function(r){be.prototype[r]=function(t,n){return this.request(Ge(n||{},{method:r,url:t,data:(n||{}).data}))}});xn.forEach(["post","put","patch"],function(r){be.prototype[r]=function(t,n,a){return this.request(Ge(a||{},{method:r,url:t,data:n}))}});var Fp=be;function Dr(e){this.message=e}Dr.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Dr.prototype.__CANCEL__=!0;var Rn=Dr,Bp=Rn;function je(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(a){r=a});var t=this;e(function(a){t.reason||(t.reason=new Bp(a),r(t.reason))})}je.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};je.source=function(){var r,t=new je(function(a){r=a});return{token:t,cancel:r}};var Hp=je,Yp=function(r){return function(n){return r.apply(null,n)}},Gp=function(r){return typeof r=="object"&&r.isAxiosError===!0},Ut=q,qp=En,we=Fp,Wp=Dn,Kp=Ir;function Pn(e){var r=new we(e),t=qp(we.prototype.request,r);return Ut.extend(t,we.prototype,r),Ut.extend(t,r),t}var W=Pn(Kp);W.Axios=we;W.create=function(r){return Pn(Wp(W.defaults,r))};W.Cancel=Rn;W.CancelToken=Hp;W.isCancel=Cn;W.all=function(r){return Promise.all(r)};W.spread=Yp;W.isAxiosError=Gp;Or.exports=W;Or.exports.default=W;var Vp=Or.exports;const kp=(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},Jp=(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 jr(e,r=600,t=!0,n,a){var j,u;if(!n||!a)throw new Error("baseUrl or tenant was not provided");const i=`${e}_${a}_${n}`,s=`${n.endsWith("/")?n.slice(0,-1):n}/cms-api/content/${a}/${e}`,f=((j=T())==null?void 0:j.value)||null,[o,$]=B.useState(((u=T())==null?void 0:u.timestamp)||0),[g,p]=B.useState(f||null),[h,y]=B.useState(!1);function A(){Vp.get(s).then(c=>{if(gr(c.data))throw new Error(`CMS data '${e}' is an empty object`);hn(c.data,g)||p(c.data),h&&y(!1),t&&v(c.data)}).catch(c=>{console.error(c),y(!0)})}function v(c){const d=new Date().valueOf(),l=JSON.stringify({value:c,timestamp:d});localStorage.setItem(i,l),$(d)}function T(){try{const c=localStorage.getItem(i);if(c)return JSON.parse(c)}catch(c){console.warn(c)}return null}return B.useEffect(()=>{new Date().valueOf()-o>r*1e3&&A()},[]),Le(A,r*1e3),{value:g,isError:h,isLoading:!h&&!g}}function Un(e,r=600,t=!0,n,a,i){var f,o,$,g;if(!n||!a||!i)throw new Error("baseUrl, tenant or venue was not provided");const s=jr(e,r,t,n,a);return{value:((o=(f=s.value)==null?void 0:f.find)==null?void 0:o.call(f,p=>p.venue===i))||((g=($=s.value)==null?void 0:$.find)==null?void 0:g.call($,p=>p.venue==="*"))||null,isError:s.isError}}function zp(e,r,t,n=300,a=!0){var g,p,h,y;const i=B.useContext(Mt.ConfigContext);if(!i)throw new Error("Missing config context");const{value:s,isError:f}=Un(e,n,a,i.baseUrl,i.tenant,r);let o=null,$=null;return s&&((g=s==null?void 0:s.url)==null?void 0:g.length)>0&&(o=((p=s.url.find(A=>A.locale===t))==null?void 0:p.value)||((h=s.url.find(A=>A.locale==="*"))==null?void 0:h.value)||null),!o&&s&&((y=s==null?void 0:s.url)==null?void 0:y.length)>0&&($=s.url[0].value),{url:o,fallbackUrl:$,isError:f}}function Mn({kioskMediaId:e,kioskMediaType:r,intervalSeconds:t=600,withLocalStorage:n=!0,baseUrl:a,tenant:i,venue:s,locale:f}){var v;const{value:o,isError:$,isLoading:g}=jr(e,t,n,a,i),p=(o==null?void 0:o[r])||[],h=Jp(p,s),y=kp(h,f),A=!y&&h&&((v=h==null?void 0:h.url)==null?void 0:v.length)>0?h.url[0].value:null;return{url:y,fallbackUrl:A,mediaType:h==null?void 0:h.mediaType,isError:$,isLoading:g}}function Zp({kioskMediaId:e,kioskMediaType:r,venue:t,intervalSeconds:n=600,withLocalStorage:a=!0}){const i=B.useContext(Mt.ConfigContext);if(!i)throw new Error("Missing config context");const{i18n:{language:s}}=Bn.useTranslation();return Mn({kioskMediaId:e,kioskMediaType:r,intervalSeconds:n,withLocalStorage:a,venue:t,baseUrl:i.baseUrl,tenant:i.tenant,locale:s})}function Xp(e,r){B.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 Qp(e){const[r,t]=B.useState(ve(e==null?void 0:e.DINE_IN)),[n,a]=B.useState(ve(e==null?void 0:e.TAKE_AWAY));function i(){const s=ve(e==null?void 0:e.DINE_IN),f=ve(e==null?void 0:e.TAKE_AWAY);s!==r&&(console.log("dine in open changed",r,"=>",s),t(s)),f!==n&&(console.log("take away open changed",n,"=>",f),a(f))}return B.useEffect(()=>{i()},[e]),Le(i,6e4),{dineInOpen:r,takeAwayOpen:n,loaded:!!e}}function Fn(e){let r=0;return e==null||e.forEach(t=>r+=Number(t.discountPrice)),r}function eg(e){return Fn(e.discounts)}exports.addDiscounts=Fn;exports.getGroupedBucketLines=_v;exports.getMediaUrl=_r;exports.groupOrderLines=Tr;exports.isChannelOpen=ve;exports.summarizeLineDiscounts=eg;exports.useAvailability=Qc;exports.useCms=jr;exports.useDisplayPrice=mv;exports.useGroupOrderLines=bv;exports.useInterval=Le;exports.useKioskChannelsAvailability=Qp;exports.useKioskMediaCms=Mn;exports.useKioskMediaCmsWithContext=Zp;exports.useLocalizedVenueMedia=zp;exports.useMediaUrl=$c;exports.useOnClickOutside=Xp;exports.useVenueCms=Un;
|
|
3
3
|
//# sourceMappingURL=index.cjs.js.map
|