@rechargeapps/storefront-client 0.0.14 → 0.0.15
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/README.md +2 -2
- package/dist/cjs/api/bundle.js +22 -43
- package/dist/cjs/api/bundle.js.map +1 -1
- package/dist/cjs/api/cdn.js +21 -41
- package/dist/cjs/api/cdn.js.map +1 -1
- package/dist/cjs/utils/request.js +30 -52
- package/dist/cjs/utils/request.js.map +1 -1
- package/dist/esm/api/bundle.js +22 -43
- package/dist/esm/api/bundle.js.map +1 -1
- package/dist/esm/api/cdn.js +22 -42
- package/dist/esm/api/cdn.js.map +1 -1
- package/dist/esm/utils/request.js +30 -52
- package/dist/esm/utils/request.js.map +1 -1
- package/dist/umd/recharge-storefront-client.min.js +8 -8
- package/dist/umd/recharge-storefront-client.min.js.map +1 -1
- package/package.json +8 -9
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
(function(le,te){typeof exports=="object"&&typeof module<"u"?module.exports=te():typeof define=="function"&&define.amd?define(te):(le=typeof globalThis<"u"?globalThis:le||self,le.recharge=te())})(this,function(){"use strict";const le=r=>r==="stage"?"https://static.stage.rechargecdn.com":"https://static.rechargecdn.com";var te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bf(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}function wf(r,e){for(var t=-1,n=r==null?0:r.length,i=Array(n);++t<n;)i[t]=e(r[t],t,r);return i}var Pr=wf;function $f(){this.__data__=[],this.size=0}var Ef=$f;function Of(r,e){return r===e||r!==r&&e!==e}var Fr=Of,Af=Fr;function Sf(r,e){for(var t=r.length;t--;)if(Af(r[t][0],e))return t;return-1}var Rr=Sf,Tf=Rr,If=Array.prototype,xf=If.splice;function Pf(r){var e=this.__data__,t=Tf(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():xf.call(e,t,1),--this.size,!0}var Ff=Pf,Rf=Rr;function Mf(r){var e=this.__data__,t=Rf(e,r);return t<0?void 0:e[t][1]}var Bf=Mf,Uf=Rr;function Nf(r){return Uf(this.__data__,r)>-1}var Df=Nf,Lf=Rr;function Cf(r,e){var t=this.__data__,n=Lf(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var jf=Cf,kf=Ef,Vf=Ff,qf=Bf,Gf=Df,Hf=jf;function Me(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Me.prototype.clear=kf,Me.prototype.delete=Vf,Me.prototype.get=qf,Me.prototype.has=Gf,Me.prototype.set=Hf;var Mr=Me,Wf=Mr;function Xf(){this.__data__=new Wf,this.size=0}var zf=Xf;function Yf(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var Kf=Yf;function Zf(r){return this.__data__.get(r)}var Jf=Zf;function Qf(r){return this.__data__.has(r)}var es=Qf,rs=typeof te=="object"&&te&&te.Object===Object&&te,li=rs,ts=li,ns=typeof self=="object"&&self&&self.Object===Object&&self,is=ts||ns||Function("return this")(),H=is,as=H,os=as.Symbol,Be=os,ci=Be,hi=Object.prototype,us=hi.hasOwnProperty,fs=hi.toString,Je=ci?ci.toStringTag:void 0;function ss(r){var e=us.call(r,Je),t=r[Je];try{r[Je]=void 0;var n=!0}catch{}var i=fs.call(r);return n&&(e?r[Je]=t:delete r[Je]),i}var ls=ss,cs=Object.prototype,hs=cs.toString;function ps(r){return hs.call(r)}var ys=ps,pi=Be,ds=ls,vs=ys,gs="[object Null]",_s="[object Undefined]",yi=pi?pi.toStringTag:void 0;function ms(r){return r==null?r===void 0?_s:gs:yi&&yi in Object(r)?ds(r):vs(r)}var ne=ms;function bs(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var ce=bs,ws=ne,$s=ce,Es="[object AsyncFunction]",Os="[object Function]",As="[object GeneratorFunction]",Ss="[object Proxy]";function Ts(r){if(!$s(r))return!1;var e=ws(r);return e==Os||e==As||e==Es||e==Ss}var Mt=Ts,Is=H,xs=Is["__core-js_shared__"],Ps=xs,Bt=Ps,di=function(){var r=/[^.]+$/.exec(Bt&&Bt.keys&&Bt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Fs(r){return!!di&&di in r}var Rs=Fs,Ms=Function.prototype,Bs=Ms.toString;function Us(r){if(r!=null){try{return Bs.call(r)}catch{}try{return r+""}catch{}}return""}var vi=Us,Ns=Mt,Ds=Rs,Ls=ce,Cs=vi,js=/[\\^$.*+?()[\]{}|]/g,ks=/^\[object .+?Constructor\]$/,Vs=Function.prototype,qs=Object.prototype,Gs=Vs.toString,Hs=qs.hasOwnProperty,Ws=RegExp("^"+Gs.call(Hs).replace(js,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Xs(r){if(!Ls(r)||Ds(r))return!1;var e=Ns(r)?Ws:ks;return e.test(Cs(r))}var zs=Xs;function Ys(r,e){return r?.[e]}var Ks=Ys,Zs=zs,Js=Ks;function Qs(r,e){var t=Js(r,e);return Zs(t)?t:void 0}var me=Qs,el=me,rl=H,tl=el(rl,"Map"),Ut=tl,nl=me,il=nl(Object,"create"),Br=il,gi=Br;function al(){this.__data__=gi?gi(null):{},this.size=0}var ol=al;function ul(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var fl=ul,sl=Br,ll="__lodash_hash_undefined__",cl=Object.prototype,hl=cl.hasOwnProperty;function pl(r){var e=this.__data__;if(sl){var t=e[r];return t===ll?void 0:t}return hl.call(e,r)?e[r]:void 0}var yl=pl,dl=Br,vl=Object.prototype,gl=vl.hasOwnProperty;function _l(r){var e=this.__data__;return dl?e[r]!==void 0:gl.call(e,r)}var ml=_l,bl=Br,wl="__lodash_hash_undefined__";function $l(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=bl&&e===void 0?wl:e,this}var El=$l,Ol=ol,Al=fl,Sl=yl,Tl=ml,Il=El;function Ue(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Ue.prototype.clear=Ol,Ue.prototype.delete=Al,Ue.prototype.get=Sl,Ue.prototype.has=Tl,Ue.prototype.set=Il;var xl=Ue,_i=xl,Pl=Mr,Fl=Ut;function Rl(){this.size=0,this.__data__={hash:new _i,map:new(Fl||Pl),string:new _i}}var Ml=Rl;function Bl(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var Ul=Bl,Nl=Ul;function Dl(r,e){var t=r.__data__;return Nl(e)?t[typeof e=="string"?"string":"hash"]:t.map}var Ur=Dl,Ll=Ur;function Cl(r){var e=Ll(this,r).delete(r);return this.size-=e?1:0,e}var jl=Cl,kl=Ur;function Vl(r){return kl(this,r).get(r)}var ql=Vl,Gl=Ur;function Hl(r){return Gl(this,r).has(r)}var Wl=Hl,Xl=Ur;function zl(r,e){var t=Xl(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var Yl=zl,Kl=Ml,Zl=jl,Jl=ql,Ql=Wl,ec=Yl;function Ne(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Ne.prototype.clear=Kl,Ne.prototype.delete=Zl,Ne.prototype.get=Jl,Ne.prototype.has=Ql,Ne.prototype.set=ec;var Nt=Ne,rc=Mr,tc=Ut,nc=Nt,ic=200;function ac(r,e){var t=this.__data__;if(t instanceof rc){var n=t.__data__;if(!tc||n.length<ic-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new nc(n)}return t.set(r,e),this.size=t.size,this}var oc=ac,uc=Mr,fc=zf,sc=Kf,lc=Jf,cc=es,hc=oc;function De(r){var e=this.__data__=new uc(r);this.size=e.size}De.prototype.clear=fc,De.prototype.delete=sc,De.prototype.get=lc,De.prototype.has=cc,De.prototype.set=hc;var Dt=De;function pc(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var mi=pc,yc=me,dc=function(){try{var r=yc(Object,"defineProperty");return r({},"",{}),r}catch{}}(),bi=dc,wi=bi;function vc(r,e,t){e=="__proto__"&&wi?wi(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var $i=vc,gc=$i,_c=Fr,mc=Object.prototype,bc=mc.hasOwnProperty;function wc(r,e,t){var n=r[e];(!(bc.call(r,e)&&_c(n,t))||t===void 0&&!(e in r))&&gc(r,e,t)}var Ei=wc,$c=Ei,Ec=$i;function Oc(r,e,t,n){var i=!t;t||(t={});for(var a=-1,o=e.length;++a<o;){var f=e[a],s=n?n(t[f],r[f],f,t,r):void 0;s===void 0&&(s=r[f]),i?Ec(t,f,s):$c(t,f,s)}return t}var Le=Oc;function Ac(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Oi=Ac;function Sc(r){return r!=null&&typeof r=="object"}var G=Sc,Tc=ne,Ic=G,xc="[object Arguments]";function Pc(r){return Ic(r)&&Tc(r)==xc}var Fc=Pc,Ai=Fc,Rc=G,Si=Object.prototype,Mc=Si.hasOwnProperty,Bc=Si.propertyIsEnumerable,Uc=Ai(function(){return arguments}())?Ai:function(r){return Rc(r)&&Mc.call(r,"callee")&&!Bc.call(r,"callee")},Lt=Uc,Nc=Array.isArray,N=Nc,Qe={exports:{}};function Dc(){return!1}var Lc=Dc;(function(r,e){var t=H,n=Lc,i=e&&!e.nodeType&&e,a=i&&!0&&r&&!r.nodeType&&r,o=a&&a.exports===i,f=o?t.Buffer:void 0,s=f?f.isBuffer:void 0,l=s||n;r.exports=l})(Qe,Qe.exports);var Cc=9007199254740991,jc=/^(?:0|[1-9]\d*)$/;function kc(r,e){var t=typeof r;return e=e??Cc,!!e&&(t=="number"||t!="symbol"&&jc.test(r))&&r>-1&&r%1==0&&r<e}var Ct=kc,Vc=9007199254740991;function qc(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Vc}var jt=qc,Gc=ne,Hc=jt,Wc=G,Xc="[object Arguments]",zc="[object Array]",Yc="[object Boolean]",Kc="[object Date]",Zc="[object Error]",Jc="[object Function]",Qc="[object Map]",eh="[object Number]",rh="[object Object]",th="[object RegExp]",nh="[object Set]",ih="[object String]",ah="[object WeakMap]",oh="[object ArrayBuffer]",uh="[object DataView]",fh="[object Float32Array]",sh="[object Float64Array]",lh="[object Int8Array]",ch="[object Int16Array]",hh="[object Int32Array]",ph="[object Uint8Array]",yh="[object Uint8ClampedArray]",dh="[object Uint16Array]",vh="[object Uint32Array]",P={};P[fh]=P[sh]=P[lh]=P[ch]=P[hh]=P[ph]=P[yh]=P[dh]=P[vh]=!0,P[Xc]=P[zc]=P[oh]=P[Yc]=P[uh]=P[Kc]=P[Zc]=P[Jc]=P[Qc]=P[eh]=P[rh]=P[th]=P[nh]=P[ih]=P[ah]=!1;function gh(r){return Wc(r)&&Hc(r.length)&&!!P[Gc(r)]}var _h=gh;function mh(r){return function(e){return r(e)}}var kt=mh,er={exports:{}};(function(r,e){var t=li,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,f=function(){try{var s=i&&i.require&&i.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}}();r.exports=f})(er,er.exports);var bh=_h,wh=kt,Ti=er.exports,Ii=Ti&&Ti.isTypedArray,$h=Ii?wh(Ii):bh,xi=$h,Eh=Oi,Oh=Lt,Ah=N,Sh=Qe.exports,Th=Ct,Ih=xi,xh=Object.prototype,Ph=xh.hasOwnProperty;function Fh(r,e){var t=Ah(r),n=!t&&Oh(r),i=!t&&!n&&Sh(r),a=!t&&!n&&!i&&Ih(r),o=t||n||i||a,f=o?Eh(r.length,String):[],s=f.length;for(var l in r)(e||Ph.call(r,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Th(l,s)))&&f.push(l);return f}var Pi=Fh,Rh=Object.prototype;function Mh(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Rh;return r===t}var Vt=Mh;function Bh(r,e){return function(t){return r(e(t))}}var Fi=Bh,Uh=Fi,Nh=Uh(Object.keys,Object),Dh=Nh,Lh=Vt,Ch=Dh,jh=Object.prototype,kh=jh.hasOwnProperty;function Vh(r){if(!Lh(r))return Ch(r);var e=[];for(var t in Object(r))kh.call(r,t)&&t!="constructor"&&e.push(t);return e}var qh=Vh,Gh=Mt,Hh=jt;function Wh(r){return r!=null&&Hh(r.length)&&!Gh(r)}var rr=Wh,Xh=Pi,zh=qh,Yh=rr;function Kh(r){return Yh(r)?Xh(r):zh(r)}var Ce=Kh,Zh=Le,Jh=Ce;function Qh(r,e){return r&&Zh(e,Jh(e),r)}var ep=Qh;function rp(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var tp=rp,np=ce,ip=Vt,ap=tp,op=Object.prototype,up=op.hasOwnProperty;function fp(r){if(!np(r))return ap(r);var e=ip(r),t=[];for(var n in r)n=="constructor"&&(e||!up.call(r,n))||t.push(n);return t}var sp=fp,lp=Pi,cp=sp,hp=rr;function pp(r){return hp(r)?lp(r,!0):cp(r)}var Nr=pp,yp=Le,dp=Nr;function vp(r,e){return r&&yp(e,dp(e),r)}var gp=vp,qt={exports:{}};(function(r,e){var t=H,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a?t.Buffer:void 0,f=o?o.allocUnsafe:void 0;function s(l,h){if(h)return l.slice();var u=l.length,c=f?f(u):new l.constructor(u);return l.copy(c),c}r.exports=s})(qt,qt.exports);function _p(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var mp=_p;function bp(r,e){for(var t=-1,n=r==null?0:r.length,i=0,a=[];++t<n;){var o=r[t];e(o,t,r)&&(a[i++]=o)}return a}var wp=bp;function $p(){return[]}var Ri=$p,Ep=wp,Op=Ri,Ap=Object.prototype,Sp=Ap.propertyIsEnumerable,Mi=Object.getOwnPropertySymbols,Tp=Mi?function(r){return r==null?[]:(r=Object(r),Ep(Mi(r),function(e){return Sp.call(r,e)}))}:Op,Gt=Tp,Ip=Le,xp=Gt;function Pp(r,e){return Ip(r,xp(r),e)}var Fp=Pp;function Rp(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var Ht=Rp,Mp=Fi,Bp=Mp(Object.getPrototypeOf,Object),Wt=Bp,Up=Ht,Np=Wt,Dp=Gt,Lp=Ri,Cp=Object.getOwnPropertySymbols,jp=Cp?function(r){for(var e=[];r;)Up(e,Dp(r)),r=Np(r);return e}:Lp,Bi=jp,kp=Le,Vp=Bi;function qp(r,e){return kp(r,Vp(r),e)}var Gp=qp,Hp=Ht,Wp=N;function Xp(r,e,t){var n=e(r);return Wp(r)?n:Hp(n,t(r))}var Ui=Xp,zp=Ui,Yp=Gt,Kp=Ce;function Zp(r){return zp(r,Kp,Yp)}var Ni=Zp,Jp=Ui,Qp=Bi,ey=Nr;function ry(r){return Jp(r,ey,Qp)}var Di=ry,ty=me,ny=H,iy=ty(ny,"DataView"),ay=iy,oy=me,uy=H,fy=oy(uy,"Promise"),sy=fy,ly=me,cy=H,hy=ly(cy,"Set"),py=hy,yy=me,dy=H,vy=yy(dy,"WeakMap"),gy=vy,Xt=ay,zt=Ut,Yt=sy,Kt=py,Zt=gy,Li=ne,je=vi,Ci="[object Map]",_y="[object Object]",ji="[object Promise]",ki="[object Set]",Vi="[object WeakMap]",qi="[object DataView]",my=je(Xt),by=je(zt),wy=je(Yt),$y=je(Kt),Ey=je(Zt),be=Li;(Xt&&be(new Xt(new ArrayBuffer(1)))!=qi||zt&&be(new zt)!=Ci||Yt&&be(Yt.resolve())!=ji||Kt&&be(new Kt)!=ki||Zt&&be(new Zt)!=Vi)&&(be=function(r){var e=Li(r),t=e==_y?r.constructor:void 0,n=t?je(t):"";if(n)switch(n){case my:return qi;case by:return Ci;case wy:return ji;case $y:return ki;case Ey:return Vi}return e});var Dr=be,Oy=Object.prototype,Ay=Oy.hasOwnProperty;function Sy(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&Ay.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var Ty=Sy,Iy=H,xy=Iy.Uint8Array,Gi=xy,Hi=Gi;function Py(r){var e=new r.constructor(r.byteLength);return new Hi(e).set(new Hi(r)),e}var Jt=Py,Fy=Jt;function Ry(r,e){var t=e?Fy(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var My=Ry,By=/\w*$/;function Uy(r){var e=new r.constructor(r.source,By.exec(r));return e.lastIndex=r.lastIndex,e}var Ny=Uy,Wi=Be,Xi=Wi?Wi.prototype:void 0,zi=Xi?Xi.valueOf:void 0;function Dy(r){return zi?Object(zi.call(r)):{}}var Ly=Dy,Cy=Jt;function jy(r,e){var t=e?Cy(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var ky=jy,Vy=Jt,qy=My,Gy=Ny,Hy=Ly,Wy=ky,Xy="[object Boolean]",zy="[object Date]",Yy="[object Map]",Ky="[object Number]",Zy="[object RegExp]",Jy="[object Set]",Qy="[object String]",ed="[object Symbol]",rd="[object ArrayBuffer]",td="[object DataView]",nd="[object Float32Array]",id="[object Float64Array]",ad="[object Int8Array]",od="[object Int16Array]",ud="[object Int32Array]",fd="[object Uint8Array]",sd="[object Uint8ClampedArray]",ld="[object Uint16Array]",cd="[object Uint32Array]";function hd(r,e,t){var n=r.constructor;switch(e){case rd:return Vy(r);case Xy:case zy:return new n(+r);case td:return qy(r,t);case nd:case id:case ad:case od:case ud:case fd:case sd:case ld:case cd:return Wy(r,t);case Yy:return new n;case Ky:case Qy:return new n(r);case Zy:return Gy(r);case Jy:return new n;case ed:return Hy(r)}}var pd=hd,yd=ce,Yi=Object.create,dd=function(){function r(){}return function(e){if(!yd(e))return{};if(Yi)return Yi(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),vd=dd,gd=vd,_d=Wt,md=Vt;function bd(r){return typeof r.constructor=="function"&&!md(r)?gd(_d(r)):{}}var wd=bd,$d=Dr,Ed=G,Od="[object Map]";function Ad(r){return Ed(r)&&$d(r)==Od}var Sd=Ad,Td=Sd,Id=kt,Ki=er.exports,Zi=Ki&&Ki.isMap,xd=Zi?Id(Zi):Td,Pd=xd,Fd=Dr,Rd=G,Md="[object Set]";function Bd(r){return Rd(r)&&Fd(r)==Md}var Ud=Bd,Nd=Ud,Dd=kt,Ji=er.exports,Qi=Ji&&Ji.isSet,Ld=Qi?Dd(Qi):Nd,Cd=Ld,jd=Dt,kd=mi,Vd=Ei,qd=ep,Gd=gp,Hd=qt.exports,Wd=mp,Xd=Fp,zd=Gp,Yd=Ni,Kd=Di,Zd=Dr,Jd=Ty,Qd=pd,ev=wd,rv=N,tv=Qe.exports,nv=Pd,iv=ce,av=Cd,ov=Ce,uv=Nr,fv=1,sv=2,lv=4,ea="[object Arguments]",cv="[object Array]",hv="[object Boolean]",pv="[object Date]",yv="[object Error]",ra="[object Function]",dv="[object GeneratorFunction]",vv="[object Map]",gv="[object Number]",ta="[object Object]",_v="[object RegExp]",mv="[object Set]",bv="[object String]",wv="[object Symbol]",$v="[object WeakMap]",Ev="[object ArrayBuffer]",Ov="[object DataView]",Av="[object Float32Array]",Sv="[object Float64Array]",Tv="[object Int8Array]",Iv="[object Int16Array]",xv="[object Int32Array]",Pv="[object Uint8Array]",Fv="[object Uint8ClampedArray]",Rv="[object Uint16Array]",Mv="[object Uint32Array]",x={};x[ea]=x[cv]=x[Ev]=x[Ov]=x[hv]=x[pv]=x[Av]=x[Sv]=x[Tv]=x[Iv]=x[xv]=x[vv]=x[gv]=x[ta]=x[_v]=x[mv]=x[bv]=x[wv]=x[Pv]=x[Fv]=x[Rv]=x[Mv]=!0,x[yv]=x[ra]=x[$v]=!1;function Lr(r,e,t,n,i,a){var o,f=e&fv,s=e&sv,l=e&lv;if(t&&(o=i?t(r,n,i,a):t(r)),o!==void 0)return o;if(!iv(r))return r;var h=rv(r);if(h){if(o=Jd(r),!f)return Wd(r,o)}else{var u=Zd(r),c=u==ra||u==dv;if(tv(r))return Hd(r,f);if(u==ta||u==ea||c&&!i){if(o=s||c?{}:ev(r),!f)return s?zd(r,Gd(o,r)):Xd(r,qd(o,r))}else{if(!x[u])return i?r:{};o=Qd(r,u,f)}}a||(a=new jd);var d=a.get(r);if(d)return d;a.set(r,o),av(r)?r.forEach(function($){o.add(Lr($,e,t,$,r,a))}):nv(r)&&r.forEach(function($,b){o.set(b,Lr($,e,t,b,r,a))});var _=l?s?Kd:Yd:s?uv:ov,E=h?void 0:_(r);return kd(E||r,function($,b){E&&(b=$,$=r[b]),Vd(o,b,Lr($,e,t,b,r,a))}),o}var Bv=Lr,Uv=ne,Nv=G,Dv="[object Symbol]";function Lv(r){return typeof r=="symbol"||Nv(r)&&Uv(r)==Dv}var Cr=Lv,Cv=N,jv=Cr,kv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vv=/^\w*$/;function qv(r,e){if(Cv(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||jv(r)?!0:Vv.test(r)||!kv.test(r)||e!=null&&r in Object(e)}var Qt=qv,na=Nt,Gv="Expected a function";function en(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(Gv);var t=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=t.cache;if(a.has(i))return a.get(i);var o=r.apply(this,n);return t.cache=a.set(i,o)||a,o};return t.cache=new(en.Cache||na),t}en.Cache=na;var Hv=en,Wv=Hv,Xv=500;function zv(r){var e=Wv(r,function(n){return t.size===Xv&&t.clear(),n}),t=e.cache;return e}var Yv=zv,Kv=Yv,Zv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jv=/\\(\\)?/g,Qv=Kv(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(Zv,function(t,n,i,a){e.push(i?a.replace(Jv,"$1"):n||t)}),e}),eg=Qv,ia=Be,rg=Pr,tg=N,ng=Cr,ig=1/0,aa=ia?ia.prototype:void 0,oa=aa?aa.toString:void 0;function ua(r){if(typeof r=="string")return r;if(tg(r))return rg(r,ua)+"";if(ng(r))return oa?oa.call(r):"";var e=r+"";return e=="0"&&1/r==-ig?"-0":e}var rn=ua,ag=rn;function og(r){return r==null?"":ag(r)}var tn=og,ug=N,fg=Qt,sg=eg,lg=tn;function cg(r,e){return ug(r)?r:fg(r,e)?[r]:sg(lg(r))}var jr=cg;function hg(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var pg=hg,yg=Cr,dg=1/0;function vg(r){if(typeof r=="string"||yg(r))return r;var e=r+"";return e=="0"&&1/r==-dg?"-0":e}var tr=vg,gg=jr,_g=tr;function mg(r,e){e=gg(e,r);for(var t=0,n=e.length;r!=null&&t<n;)r=r[_g(e[t++])];return t&&t==n?r:void 0}var nn=mg;function bg(r,e,t){var n=-1,i=r.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=r[n+e];return a}var fa=bg,wg=nn,$g=fa;function Eg(r,e){return e.length<2?r:wg(r,$g(e,0,-1))}var Og=Eg,Ag=jr,Sg=pg,Tg=Og,Ig=tr;function xg(r,e){return e=Ag(e,r),r=Tg(r,e),r==null||delete r[Ig(Sg(e))]}var Pg=xg,Fg=ne,Rg=Wt,Mg=G,Bg="[object Object]",Ug=Function.prototype,Ng=Object.prototype,sa=Ug.toString,Dg=Ng.hasOwnProperty,Lg=sa.call(Object);function Cg(r){if(!Mg(r)||Fg(r)!=Bg)return!1;var e=Rg(r);if(e===null)return!0;var t=Dg.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&sa.call(t)==Lg}var jg=Cg,kg=jg;function Vg(r){return kg(r)?void 0:r}var qg=Vg,la=Be,Gg=Lt,Hg=N,ca=la?la.isConcatSpreadable:void 0;function Wg(r){return Hg(r)||Gg(r)||!!(ca&&r&&r[ca])}var Xg=Wg,zg=Ht,Yg=Xg;function ha(r,e,t,n,i){var a=-1,o=r.length;for(t||(t=Yg),i||(i=[]);++a<o;){var f=r[a];e>0&&t(f)?e>1?ha(f,e-1,t,n,i):zg(i,f):n||(i[i.length]=f)}return i}var Kg=ha,Zg=Kg;function Jg(r){var e=r==null?0:r.length;return e?Zg(r,1):[]}var Qg=Jg;function e_(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}var r_=e_,t_=r_,pa=Math.max;function n_(r,e,t){return e=pa(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,a=pa(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var f=Array(e+1);++i<e;)f[i]=n[i];return f[e]=t(o),t_(r,this,f)}}var ya=n_;function i_(r){return function(){return r}}var a_=i_;function o_(r){return r}var kr=o_,u_=a_,da=bi,f_=kr,s_=da?function(r,e){return da(r,"toString",{configurable:!0,enumerable:!1,value:u_(e),writable:!0})}:f_,l_=s_,c_=800,h_=16,p_=Date.now;function y_(r){var e=0,t=0;return function(){var n=p_(),i=h_-(n-t);if(t=n,i>0){if(++e>=c_)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var d_=y_,v_=l_,g_=d_,__=g_(v_),va=__,m_=Qg,b_=ya,w_=va;function $_(r){return w_(b_(r,void 0,m_),r+"")}var E_=$_,O_=Pr,A_=Bv,S_=Pg,T_=jr,I_=Le,x_=qg,P_=E_,F_=Di,R_=1,M_=2,B_=4,U_=P_(function(r,e){var t={};if(r==null)return t;var n=!1;e=O_(e,function(a){return a=T_(a,r),n||(n=a.length>1),a}),I_(r,F_(r),t),n&&(t=A_(t,R_|M_|B_,x_));for(var i=e.length;i--;)S_(t,e[i]);return t}),N_=U_,D_=Object.defineProperty,L_=Object.defineProperties,C_=Object.getOwnPropertyDescriptors,ga=Object.getOwnPropertySymbols,j_=Object.prototype.hasOwnProperty,k_=Object.prototype.propertyIsEnumerable,_a=(r,e,t)=>e in r?D_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,V_=(r,e)=>{for(var t in e||(e={}))j_.call(e,t)&&_a(r,t,e[t]);if(ga)for(var t of ga(e))k_.call(e,t)&&_a(r,t,e[t]);return r},q_=(r,e)=>L_(r,C_(e));function G_(r){try{return JSON.parse(r)}catch{return r}}function H_(r){return Object.entries(r).reduce((e,[t,n])=>q_(V_({},e),{[t]:G_(n)}),{})}var W_=Object.defineProperty,X_=Object.defineProperties,z_=Object.getOwnPropertyDescriptors,ma=Object.getOwnPropertySymbols,Y_=Object.prototype.hasOwnProperty,K_=Object.prototype.propertyIsEnumerable,ba=(r,e,t)=>e in r?W_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,wa=(r,e)=>{for(var t in e||(e={}))Y_.call(e,t)&&ba(r,t,e[t]);if(ma)for(var t of ma(e))K_.call(e,t)&&ba(r,t,e[t]);return r},$a=(r,e)=>X_(r,z_(e));function Ea(r){var e;const t=H_(r),n=t.auto_inject===void 0?!0:t.auto_inject,i=(e=t.display_on)!=null?e:[],a=t.first_option==="autodeliver";return $a(wa({},N_(t,["display_on","first_option"])),{auto_inject:n,valid_pages:i,is_subscription_first:a,autoInject:n,validPages:i,isSubscriptionFirst:a})}function Oa(r){var e;const t=((e=r.subscription_options)==null?void 0:e.storefront_purchase_options)==="subscription_only";return $a(wa({},r),{is_subscription_only:t,isSubscriptionOnly:t})}function Z_(r){return r.map(e=>{const t={};return Object.entries(e).forEach(([n,i])=>{t[n]=Oa(i)}),t})}var C=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof C<"u"&&C,k={searchParams:"URLSearchParams"in C,iterable:"Symbol"in C&&"iterator"in Symbol,blob:"FileReader"in C&&"Blob"in C&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in C,arrayBuffer:"ArrayBuffer"in C};function J_(r){return r&&DataView.prototype.isPrototypeOf(r)}if(k.arrayBuffer)var Q_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],e0=ArrayBuffer.isView||function(r){return r&&Q_.indexOf(Object.prototype.toString.call(r))>-1};function nr(r){if(typeof r!="string"&&(r=String(r)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(r)||r==="")throw new TypeError('Invalid character in header field name: "'+r+'"');return r.toLowerCase()}function an(r){return typeof r!="string"&&(r=String(r)),r}function on(r){var e={next:function(){var t=r.shift();return{done:t===void 0,value:t}}};return k.iterable&&(e[Symbol.iterator]=function(){return e}),e}function M(r){this.map={},r instanceof M?r.forEach(function(e,t){this.append(t,e)},this):Array.isArray(r)?r.forEach(function(e){this.append(e[0],e[1])},this):r&&Object.getOwnPropertyNames(r).forEach(function(e){this.append(e,r[e])},this)}M.prototype.append=function(r,e){r=nr(r),e=an(e);var t=this.map[r];this.map[r]=t?t+", "+e:e},M.prototype.delete=function(r){delete this.map[nr(r)]},M.prototype.get=function(r){return r=nr(r),this.has(r)?this.map[r]:null},M.prototype.has=function(r){return this.map.hasOwnProperty(nr(r))},M.prototype.set=function(r,e){this.map[nr(r)]=an(e)},M.prototype.forEach=function(r,e){for(var t in this.map)this.map.hasOwnProperty(t)&&r.call(e,this.map[t],t,this)},M.prototype.keys=function(){var r=[];return this.forEach(function(e,t){r.push(t)}),on(r)},M.prototype.values=function(){var r=[];return this.forEach(function(e){r.push(e)}),on(r)},M.prototype.entries=function(){var r=[];return this.forEach(function(e,t){r.push([t,e])}),on(r)},k.iterable&&(M.prototype[Symbol.iterator]=M.prototype.entries);function un(r){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}function Aa(r){return new Promise(function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}})}function r0(r){var e=new FileReader,t=Aa(e);return e.readAsArrayBuffer(r),t}function t0(r){var e=new FileReader,t=Aa(e);return e.readAsText(r),t}function n0(r){for(var e=new Uint8Array(r),t=new Array(e.length),n=0;n<e.length;n++)t[n]=String.fromCharCode(e[n]);return t.join("")}function Sa(r){if(r.slice)return r.slice(0);var e=new Uint8Array(r.byteLength);return e.set(new Uint8Array(r)),e.buffer}function Ta(){return this.bodyUsed=!1,this._initBody=function(r){this.bodyUsed=this.bodyUsed,this._bodyInit=r,r?typeof r=="string"?this._bodyText=r:k.blob&&Blob.prototype.isPrototypeOf(r)?this._bodyBlob=r:k.formData&&FormData.prototype.isPrototypeOf(r)?this._bodyFormData=r:k.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)?this._bodyText=r.toString():k.arrayBuffer&&k.blob&&J_(r)?(this._bodyArrayBuffer=Sa(r.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):k.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(r)||e0(r))?this._bodyArrayBuffer=Sa(r):this._bodyText=r=Object.prototype.toString.call(r):this._bodyText="",this.headers.get("content-type")||(typeof r=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):k.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},k.blob&&(this.blob=function(){var r=un(this);if(r)return r;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var r=un(this);return r||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(r0)}),this.text=function(){var r=un(this);if(r)return r;if(this._bodyBlob)return t0(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(n0(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},k.formData&&(this.formData=function(){return this.text().then(o0)}),this.json=function(){return this.text().then(JSON.parse)},this}var i0=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function a0(r){var e=r.toUpperCase();return i0.indexOf(e)>-1?e:r}function we(r,e){if(!(this instanceof we))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{};var t=e.body;if(r instanceof we){if(r.bodyUsed)throw new TypeError("Already read");this.url=r.url,this.credentials=r.credentials,e.headers||(this.headers=new M(r.headers)),this.method=r.method,this.mode=r.mode,this.signal=r.signal,!t&&r._bodyInit!=null&&(t=r._bodyInit,r.bodyUsed=!0)}else this.url=String(r);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new M(e.headers)),this.method=a0(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&t)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(t),(this.method==="GET"||this.method==="HEAD")&&(e.cache==="no-store"||e.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}we.prototype.clone=function(){return new we(this,{body:this._bodyInit})};function o0(r){var e=new FormData;return r.trim().split("&").forEach(function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(a))}}),e}function u0(r){var e=new M,t=r.replace(/\r?\n[\t ]+/g," ");return t.split("\r").map(function(n){return n.indexOf(`
|
|
2
|
-
`)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),a=i.shift().trim();if(a){var o=i.join(":").trim();e.append(a,o)}}),e}Ta.call(we.prototype);function W(r,e){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new M(e.headers),this.url=e.url||"",this._initBody(r)}Ta.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new M(this.headers),url:this.url})},W.error=function(){var r=new W(null,{status:0,statusText:""});return r.type="error",r};var f0=[301,302,303,307,308];W.redirect=function(r,e){if(f0.indexOf(e)===-1)throw new RangeError("Invalid status code");return new W(null,{status:e,headers:{location:r}})};var $e=C.DOMException;try{new $e}catch{$e=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},$e.prototype=Object.create(Error.prototype),$e.prototype.constructor=$e}function Ia(r,e){return new Promise(function(t,n){var i=new we(r,e);if(i.signal&&i.signal.aborted)return n(new $e("Aborted","AbortError"));var a=new XMLHttpRequest;function o(){a.abort()}a.onload=function(){var s={status:a.status,statusText:a.statusText,headers:u0(a.getAllResponseHeaders()||"")};s.url="responseURL"in a?a.responseURL:s.headers.get("X-Request-URL");var l="response"in a?a.response:a.responseText;setTimeout(function(){t(new W(l,s))},0)},a.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.onabort=function(){setTimeout(function(){n(new $e("Aborted","AbortError"))},0)};function f(s){try{return s===""&&C.location.href?C.location.href:s}catch{return s}}a.open(i.method,f(i.url),!0),i.credentials==="include"?a.withCredentials=!0:i.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(k.blob?a.responseType="blob":k.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(a.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof M)?Object.getOwnPropertyNames(e.headers).forEach(function(s){a.setRequestHeader(s,an(e.headers[s]))}):i.headers.forEach(function(s,l){a.setRequestHeader(l,s)}),i.signal&&(i.signal.addEventListener("abort",o),a.onreadystatechange=function(){a.readyState===4&&i.signal.removeEventListener("abort",o)}),a.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}Ia.polyfill=!0,C.fetch||(C.fetch=Ia,C.Headers=M,C.Request=we,C.Response=W),self.fetch.bind(self);var s0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==i||o.enumerable!==!0)return!1}return!0},xa=typeof Symbol<"u"&&Symbol,l0=s0,c0=function(){return typeof xa!="function"||typeof Symbol!="function"||typeof xa("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:l0()},h0="Function.prototype.bind called on incompatible ",fn=Array.prototype.slice,p0=Object.prototype.toString,y0="[object Function]",d0=function(e){var t=this;if(typeof t!="function"||p0.call(t)!==y0)throw new TypeError(h0+t);for(var n=fn.call(arguments,1),i,a=function(){if(this instanceof i){var h=t.apply(this,n.concat(fn.call(arguments)));return Object(h)===h?h:this}else return t.apply(e,n.concat(fn.call(arguments)))},o=Math.max(0,t.length-n.length),f=[],s=0;s<o;s++)f.push("$"+s);if(i=Function("binder","return function ("+f.join(",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var l=function(){};l.prototype=t.prototype,i.prototype=new l,l.prototype=null}return i},v0=d0,sn=Function.prototype.bind||v0,g0=sn,_0=g0.call(Function.call,Object.prototype.hasOwnProperty),T,ke=SyntaxError,Pa=Function,Ve=TypeError,ln=function(r){try{return Pa('"use strict"; return ('+r+").constructor;")()}catch{}},Ee=Object.getOwnPropertyDescriptor;if(Ee)try{Ee({},"")}catch{Ee=null}var cn=function(){throw new Ve},m0=Ee?function(){try{return arguments.callee,cn}catch{try{return Ee(arguments,"callee").get}catch{return cn}}}():cn,qe=c0(),he=Object.getPrototypeOf||function(r){return r.__proto__},Ge={},b0=typeof Uint8Array>"u"?T:he(Uint8Array),He={"%AggregateError%":typeof AggregateError>"u"?T:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?T:ArrayBuffer,"%ArrayIteratorPrototype%":qe?he([][Symbol.iterator]()):T,"%AsyncFromSyncIteratorPrototype%":T,"%AsyncFunction%":Ge,"%AsyncGenerator%":Ge,"%AsyncGeneratorFunction%":Ge,"%AsyncIteratorPrototype%":Ge,"%Atomics%":typeof Atomics>"u"?T:Atomics,"%BigInt%":typeof BigInt>"u"?T:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?T:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?T:Float32Array,"%Float64Array%":typeof Float64Array>"u"?T:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?T:FinalizationRegistry,"%Function%":Pa,"%GeneratorFunction%":Ge,"%Int8Array%":typeof Int8Array>"u"?T:Int8Array,"%Int16Array%":typeof Int16Array>"u"?T:Int16Array,"%Int32Array%":typeof Int32Array>"u"?T:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":qe?he(he([][Symbol.iterator]())):T,"%JSON%":typeof JSON=="object"?JSON:T,"%Map%":typeof Map>"u"?T:Map,"%MapIteratorPrototype%":typeof Map>"u"||!qe?T:he(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?T:Promise,"%Proxy%":typeof Proxy>"u"?T:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?T:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?T:Set,"%SetIteratorPrototype%":typeof Set>"u"||!qe?T:he(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?T:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":qe?he(""[Symbol.iterator]()):T,"%Symbol%":qe?Symbol:T,"%SyntaxError%":ke,"%ThrowTypeError%":m0,"%TypedArray%":b0,"%TypeError%":Ve,"%Uint8Array%":typeof Uint8Array>"u"?T:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?T:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?T:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?T:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?T:WeakMap,"%WeakRef%":typeof WeakRef>"u"?T:WeakRef,"%WeakSet%":typeof WeakSet>"u"?T:WeakSet},w0=function r(e){var t;if(e==="%AsyncFunction%")t=ln("async function () {}");else if(e==="%GeneratorFunction%")t=ln("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=ln("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&(t=he(i.prototype))}return He[e]=t,t},Fa={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ir=sn,Vr=_0,$0=ir.call(Function.call,Array.prototype.concat),E0=ir.call(Function.apply,Array.prototype.splice),Ra=ir.call(Function.call,String.prototype.replace),qr=ir.call(Function.call,String.prototype.slice),O0=ir.call(Function.call,RegExp.prototype.exec),A0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S0=/\\(\\)?/g,T0=function(e){var t=qr(e,0,1),n=qr(e,-1);if(t==="%"&&n!=="%")throw new ke("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new ke("invalid intrinsic syntax, expected opening `%`");var i=[];return Ra(e,A0,function(a,o,f,s){i[i.length]=f?Ra(s,S0,"$1"):o||a}),i},I0=function(e,t){var n=e,i;if(Vr(Fa,n)&&(i=Fa[n],n="%"+i[0]+"%"),Vr(He,n)){var a=He[n];if(a===Ge&&(a=w0(n)),typeof a>"u"&&!t)throw new Ve("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new ke("intrinsic "+e+" does not exist!")},hn=function(e,t){if(typeof e!="string"||e.length===0)throw new Ve("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Ve('"allowMissing" argument must be a boolean');if(O0(/^%?[^%]*%?$/g,e)===null)throw new ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=T0(e),i=n.length>0?n[0]:"",a=I0("%"+i+"%",t),o=a.name,f=a.value,s=!1,l=a.alias;l&&(i=l[0],E0(n,$0([0,1],l)));for(var h=1,u=!0;h<n.length;h+=1){var c=n[h],d=qr(c,0,1),_=qr(c,-1);if((d==='"'||d==="'"||d==="`"||_==='"'||_==="'"||_==="`")&&d!==_)throw new ke("property names with quotes must have matching quotes");if((c==="constructor"||!u)&&(s=!0),i+="."+c,o="%"+i+"%",Vr(He,o))f=He[o];else if(f!=null){if(!(c in f)){if(!t)throw new Ve("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ee&&h+1>=n.length){var E=Ee(f,c);u=!!E,u&&"get"in E&&!("originalValue"in E.get)?f=E.get:f=f[c]}else u=Vr(f,c),f=f[c];u&&!s&&(He[o]=f)}}return f},Ma={exports:{}};(function(r){var e=sn,t=hn,n=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(i,n),o=t("%Object.getOwnPropertyDescriptor%",!0),f=t("%Object.defineProperty%",!0),s=t("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}r.exports=function(u){var c=a(e,i,arguments);if(o&&f){var d=o(c,"length");d.configurable&&f(c,"length",{value:1+s(0,u.length-(arguments.length-1))})}return c};var l=function(){return a(e,n,arguments)};f?f(r.exports,"apply",{value:l}):r.exports.apply=l})(Ma);var Ba=hn,Ua=Ma.exports,x0=Ua(Ba("String.prototype.indexOf")),P0=function(e,t){var n=Ba(e,!!t);return typeof n=="function"&&x0(e,".prototype.")>-1?Ua(n):n},We=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},X=[],q=[],F0=typeof Uint8Array<"u"?Uint8Array:Array,pn=!1;function Na(){pn=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)X[e]=r[e],q[r.charCodeAt(e)]=e;q["-".charCodeAt(0)]=62,q["_".charCodeAt(0)]=63}function R0(r){pn||Na();var e,t,n,i,a,o,f=r.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=r[f-2]==="="?2:r[f-1]==="="?1:0,o=new F0(f*3/4-a),n=a>0?f-4:f;var s=0;for(e=0,t=0;e<n;e+=4,t+=3)i=q[r.charCodeAt(e)]<<18|q[r.charCodeAt(e+1)]<<12|q[r.charCodeAt(e+2)]<<6|q[r.charCodeAt(e+3)],o[s++]=i>>16&255,o[s++]=i>>8&255,o[s++]=i&255;return a===2?(i=q[r.charCodeAt(e)]<<2|q[r.charCodeAt(e+1)]>>4,o[s++]=i&255):a===1&&(i=q[r.charCodeAt(e)]<<10|q[r.charCodeAt(e+1)]<<4|q[r.charCodeAt(e+2)]>>2,o[s++]=i>>8&255,o[s++]=i&255),o}function M0(r){return X[r>>18&63]+X[r>>12&63]+X[r>>6&63]+X[r&63]}function B0(r,e,t){for(var n,i=[],a=e;a<t;a+=3)n=(r[a]<<16)+(r[a+1]<<8)+r[a+2],i.push(M0(n));return i.join("")}function Da(r){pn||Na();for(var e,t=r.length,n=t%3,i="",a=[],o=16383,f=0,s=t-n;f<s;f+=o)a.push(B0(r,f,f+o>s?s:f+o));return n===1?(e=r[t-1],i+=X[e>>2],i+=X[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=X[e>>10],i+=X[e>>4&63],i+=X[e<<2&63],i+="="),a.push(i),a.join("")}function Gr(r,e,t,n,i){var a,o,f=i*8-n-1,s=(1<<f)-1,l=s>>1,h=-7,u=t?i-1:0,c=t?-1:1,d=r[e+u];for(u+=c,a=d&(1<<-h)-1,d>>=-h,h+=f;h>0;a=a*256+r[e+u],u+=c,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=n;h>0;o=o*256+r[e+u],u+=c,h-=8);if(a===0)a=1-l;else{if(a===s)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-l}return(d?-1:1)*o*Math.pow(2,a-n)}function La(r,e,t,n,i,a){var o,f,s,l=a*8-i-1,h=(1<<l)-1,u=h>>1,c=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,_=n?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-o))<1&&(o--,s*=2),o+u>=1?e+=c/s:e+=c*Math.pow(2,1-u),e*s>=2&&(o++,s/=2),o+u>=h?(f=0,o=h):o+u>=1?(f=(e*s-1)*Math.pow(2,i),o=o+u):(f=e*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;r[t+d]=f&255,d+=_,f/=256,i-=8);for(o=o<<i|f,l+=i;l>0;r[t+d]=o&255,d+=_,o/=256,l-=8);r[t+d-_]|=E*128}var U0={}.toString,Ca=Array.isArray||function(r){return U0.call(r)=="[object Array]"};/*!
|
|
1
|
+
(function(le,te){typeof exports=="object"&&typeof module<"u"?module.exports=te():typeof define=="function"&&define.amd?define(te):(le=typeof globalThis<"u"?globalThis:le||self,le.recharge=te())})(this,function(){"use strict";const le=r=>r==="stage"?"https://static.stage.rechargecdn.com":"https://static.rechargecdn.com";var te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _f(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}function mf(r,e){for(var t=-1,n=r==null?0:r.length,i=Array(n);++t<n;)i[t]=e(r[t],t,r);return i}var xr=mf;function bf(){this.__data__=[],this.size=0}var wf=bf;function $f(r,e){return r===e||r!==r&&e!==e}var Pr=$f,Ef=Pr;function Of(r,e){for(var t=r.length;t--;)if(Ef(r[t][0],e))return t;return-1}var Fr=Of,Af=Fr,Sf=Array.prototype,If=Sf.splice;function Tf(r){var e=this.__data__,t=Af(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():If.call(e,t,1),--this.size,!0}var xf=Tf,Pf=Fr;function Ff(r){var e=this.__data__,t=Pf(e,r);return t<0?void 0:e[t][1]}var Rf=Ff,Mf=Fr;function Bf(r){return Mf(this.__data__,r)>-1}var Uf=Bf,Nf=Fr;function Df(r,e){var t=this.__data__,n=Nf(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var Lf=Df,Cf=wf,jf=xf,kf=Rf,Vf=Uf,qf=Lf;function Re(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Re.prototype.clear=Cf,Re.prototype.delete=jf,Re.prototype.get=kf,Re.prototype.has=Vf,Re.prototype.set=qf;var Rr=Re,Gf=Rr;function Hf(){this.__data__=new Gf,this.size=0}var Wf=Hf;function Xf(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var zf=Xf;function Yf(r){return this.__data__.get(r)}var Kf=Yf;function Zf(r){return this.__data__.has(r)}var Jf=Zf,Qf=typeof te=="object"&&te&&te.Object===Object&&te,fi=Qf,es=fi,rs=typeof self=="object"&&self&&self.Object===Object&&self,ts=es||rs||Function("return this")(),H=ts,ns=H,is=ns.Symbol,Me=is,si=Me,li=Object.prototype,as=li.hasOwnProperty,os=li.toString,Je=si?si.toStringTag:void 0;function us(r){var e=as.call(r,Je),t=r[Je];try{r[Je]=void 0;var n=!0}catch{}var i=os.call(r);return n&&(e?r[Je]=t:delete r[Je]),i}var fs=us,ss=Object.prototype,ls=ss.toString;function cs(r){return ls.call(r)}var hs=cs,ci=Me,ps=fs,ys=hs,ds="[object Null]",vs="[object Undefined]",hi=ci?ci.toStringTag:void 0;function gs(r){return r==null?r===void 0?vs:ds:hi&&hi in Object(r)?ps(r):ys(r)}var ne=gs;function _s(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var ce=_s,ms=ne,bs=ce,ws="[object AsyncFunction]",$s="[object Function]",Es="[object GeneratorFunction]",Os="[object Proxy]";function As(r){if(!bs(r))return!1;var e=ms(r);return e==$s||e==Es||e==ws||e==Os}var Rt=As,Ss=H,Is=Ss["__core-js_shared__"],Ts=Is,Mt=Ts,pi=function(){var r=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function xs(r){return!!pi&&pi in r}var Ps=xs,Fs=Function.prototype,Rs=Fs.toString;function Ms(r){if(r!=null){try{return Rs.call(r)}catch{}try{return r+""}catch{}}return""}var yi=Ms,Bs=Rt,Us=Ps,Ns=ce,Ds=yi,Ls=/[\\^$.*+?()[\]{}|]/g,Cs=/^\[object .+?Constructor\]$/,js=Function.prototype,ks=Object.prototype,Vs=js.toString,qs=ks.hasOwnProperty,Gs=RegExp("^"+Vs.call(qs).replace(Ls,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Hs(r){if(!Ns(r)||Us(r))return!1;var e=Bs(r)?Gs:Cs;return e.test(Ds(r))}var Ws=Hs;function Xs(r,e){return r?.[e]}var zs=Xs,Ys=Ws,Ks=zs;function Zs(r,e){var t=Ks(r,e);return Ys(t)?t:void 0}var me=Zs,Js=me,Qs=H,el=Js(Qs,"Map"),Bt=el,rl=me,tl=rl(Object,"create"),Mr=tl,di=Mr;function nl(){this.__data__=di?di(null):{},this.size=0}var il=nl;function al(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var ol=al,ul=Mr,fl="__lodash_hash_undefined__",sl=Object.prototype,ll=sl.hasOwnProperty;function cl(r){var e=this.__data__;if(ul){var t=e[r];return t===fl?void 0:t}return ll.call(e,r)?e[r]:void 0}var hl=cl,pl=Mr,yl=Object.prototype,dl=yl.hasOwnProperty;function vl(r){var e=this.__data__;return pl?e[r]!==void 0:dl.call(e,r)}var gl=vl,_l=Mr,ml="__lodash_hash_undefined__";function bl(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=_l&&e===void 0?ml:e,this}var wl=bl,$l=il,El=ol,Ol=hl,Al=gl,Sl=wl;function Be(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Be.prototype.clear=$l,Be.prototype.delete=El,Be.prototype.get=Ol,Be.prototype.has=Al,Be.prototype.set=Sl;var Il=Be,vi=Il,Tl=Rr,xl=Bt;function Pl(){this.size=0,this.__data__={hash:new vi,map:new(xl||Tl),string:new vi}}var Fl=Pl;function Rl(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var Ml=Rl,Bl=Ml;function Ul(r,e){var t=r.__data__;return Bl(e)?t[typeof e=="string"?"string":"hash"]:t.map}var Br=Ul,Nl=Br;function Dl(r){var e=Nl(this,r).delete(r);return this.size-=e?1:0,e}var Ll=Dl,Cl=Br;function jl(r){return Cl(this,r).get(r)}var kl=jl,Vl=Br;function ql(r){return Vl(this,r).has(r)}var Gl=ql,Hl=Br;function Wl(r,e){var t=Hl(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var Xl=Wl,zl=Fl,Yl=Ll,Kl=kl,Zl=Gl,Jl=Xl;function Ue(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Ue.prototype.clear=zl,Ue.prototype.delete=Yl,Ue.prototype.get=Kl,Ue.prototype.has=Zl,Ue.prototype.set=Jl;var Ut=Ue,Ql=Rr,ec=Bt,rc=Ut,tc=200;function nc(r,e){var t=this.__data__;if(t instanceof Ql){var n=t.__data__;if(!ec||n.length<tc-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new rc(n)}return t.set(r,e),this.size=t.size,this}var ic=nc,ac=Rr,oc=Wf,uc=zf,fc=Kf,sc=Jf,lc=ic;function Ne(r){var e=this.__data__=new ac(r);this.size=e.size}Ne.prototype.clear=oc,Ne.prototype.delete=uc,Ne.prototype.get=fc,Ne.prototype.has=sc,Ne.prototype.set=lc;var Nt=Ne;function cc(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var gi=cc,hc=me,pc=function(){try{var r=hc(Object,"defineProperty");return r({},"",{}),r}catch{}}(),_i=pc,mi=_i;function yc(r,e,t){e=="__proto__"&&mi?mi(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var bi=yc,dc=bi,vc=Pr,gc=Object.prototype,_c=gc.hasOwnProperty;function mc(r,e,t){var n=r[e];(!(_c.call(r,e)&&vc(n,t))||t===void 0&&!(e in r))&&dc(r,e,t)}var wi=mc,bc=wi,wc=bi;function $c(r,e,t,n){var i=!t;t||(t={});for(var a=-1,o=e.length;++a<o;){var f=e[a],s=n?n(t[f],r[f],f,t,r):void 0;s===void 0&&(s=r[f]),i?wc(t,f,s):bc(t,f,s)}return t}var De=$c;function Ec(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var $i=Ec;function Oc(r){return r!=null&&typeof r=="object"}var G=Oc,Ac=ne,Sc=G,Ic="[object Arguments]";function Tc(r){return Sc(r)&&Ac(r)==Ic}var xc=Tc,Ei=xc,Pc=G,Oi=Object.prototype,Fc=Oi.hasOwnProperty,Rc=Oi.propertyIsEnumerable,Mc=Ei(function(){return arguments}())?Ei:function(r){return Pc(r)&&Fc.call(r,"callee")&&!Rc.call(r,"callee")},Dt=Mc,Bc=Array.isArray,N=Bc,Qe={exports:{}};function Uc(){return!1}var Nc=Uc;(function(r,e){var t=H,n=Nc,i=e&&!e.nodeType&&e,a=i&&!0&&r&&!r.nodeType&&r,o=a&&a.exports===i,f=o?t.Buffer:void 0,s=f?f.isBuffer:void 0,l=s||n;r.exports=l})(Qe,Qe.exports);var Dc=9007199254740991,Lc=/^(?:0|[1-9]\d*)$/;function Cc(r,e){var t=typeof r;return e=e??Dc,!!e&&(t=="number"||t!="symbol"&&Lc.test(r))&&r>-1&&r%1==0&&r<e}var Lt=Cc,jc=9007199254740991;function kc(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=jc}var Ct=kc,Vc=ne,qc=Ct,Gc=G,Hc="[object Arguments]",Wc="[object Array]",Xc="[object Boolean]",zc="[object Date]",Yc="[object Error]",Kc="[object Function]",Zc="[object Map]",Jc="[object Number]",Qc="[object Object]",eh="[object RegExp]",rh="[object Set]",th="[object String]",nh="[object WeakMap]",ih="[object ArrayBuffer]",ah="[object DataView]",oh="[object Float32Array]",uh="[object Float64Array]",fh="[object Int8Array]",sh="[object Int16Array]",lh="[object Int32Array]",ch="[object Uint8Array]",hh="[object Uint8ClampedArray]",ph="[object Uint16Array]",yh="[object Uint32Array]",P={};P[oh]=P[uh]=P[fh]=P[sh]=P[lh]=P[ch]=P[hh]=P[ph]=P[yh]=!0,P[Hc]=P[Wc]=P[ih]=P[Xc]=P[ah]=P[zc]=P[Yc]=P[Kc]=P[Zc]=P[Jc]=P[Qc]=P[eh]=P[rh]=P[th]=P[nh]=!1;function dh(r){return Gc(r)&&qc(r.length)&&!!P[Vc(r)]}var vh=dh;function gh(r){return function(e){return r(e)}}var jt=gh,er={exports:{}};(function(r,e){var t=fi,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,f=function(){try{var s=i&&i.require&&i.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}}();r.exports=f})(er,er.exports);var _h=vh,mh=jt,Ai=er.exports,Si=Ai&&Ai.isTypedArray,bh=Si?mh(Si):_h,Ii=bh,wh=$i,$h=Dt,Eh=N,Oh=Qe.exports,Ah=Lt,Sh=Ii,Ih=Object.prototype,Th=Ih.hasOwnProperty;function xh(r,e){var t=Eh(r),n=!t&&$h(r),i=!t&&!n&&Oh(r),a=!t&&!n&&!i&&Sh(r),o=t||n||i||a,f=o?wh(r.length,String):[],s=f.length;for(var l in r)(e||Th.call(r,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ah(l,s)))&&f.push(l);return f}var Ti=xh,Ph=Object.prototype;function Fh(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Ph;return r===t}var kt=Fh;function Rh(r,e){return function(t){return r(e(t))}}var xi=Rh,Mh=xi,Bh=Mh(Object.keys,Object),Uh=Bh,Nh=kt,Dh=Uh,Lh=Object.prototype,Ch=Lh.hasOwnProperty;function jh(r){if(!Nh(r))return Dh(r);var e=[];for(var t in Object(r))Ch.call(r,t)&&t!="constructor"&&e.push(t);return e}var kh=jh,Vh=Rt,qh=Ct;function Gh(r){return r!=null&&qh(r.length)&&!Vh(r)}var rr=Gh,Hh=Ti,Wh=kh,Xh=rr;function zh(r){return Xh(r)?Hh(r):Wh(r)}var Le=zh,Yh=De,Kh=Le;function Zh(r,e){return r&&Yh(e,Kh(e),r)}var Jh=Zh;function Qh(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var ep=Qh,rp=ce,tp=kt,np=ep,ip=Object.prototype,ap=ip.hasOwnProperty;function op(r){if(!rp(r))return np(r);var e=tp(r),t=[];for(var n in r)n=="constructor"&&(e||!ap.call(r,n))||t.push(n);return t}var up=op,fp=Ti,sp=up,lp=rr;function cp(r){return lp(r)?fp(r,!0):sp(r)}var Ur=cp,hp=De,pp=Ur;function yp(r,e){return r&&hp(e,pp(e),r)}var dp=yp,Vt={exports:{}};(function(r,e){var t=H,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a?t.Buffer:void 0,f=o?o.allocUnsafe:void 0;function s(l,c){if(c)return l.slice();var u=l.length,h=f?f(u):new l.constructor(u);return l.copy(h),h}r.exports=s})(Vt,Vt.exports);function vp(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var gp=vp;function _p(r,e){for(var t=-1,n=r==null?0:r.length,i=0,a=[];++t<n;){var o=r[t];e(o,t,r)&&(a[i++]=o)}return a}var mp=_p;function bp(){return[]}var Pi=bp,wp=mp,$p=Pi,Ep=Object.prototype,Op=Ep.propertyIsEnumerable,Fi=Object.getOwnPropertySymbols,Ap=Fi?function(r){return r==null?[]:(r=Object(r),wp(Fi(r),function(e){return Op.call(r,e)}))}:$p,qt=Ap,Sp=De,Ip=qt;function Tp(r,e){return Sp(r,Ip(r),e)}var xp=Tp;function Pp(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var Gt=Pp,Fp=xi,Rp=Fp(Object.getPrototypeOf,Object),Ht=Rp,Mp=Gt,Bp=Ht,Up=qt,Np=Pi,Dp=Object.getOwnPropertySymbols,Lp=Dp?function(r){for(var e=[];r;)Mp(e,Up(r)),r=Bp(r);return e}:Np,Ri=Lp,Cp=De,jp=Ri;function kp(r,e){return Cp(r,jp(r),e)}var Vp=kp,qp=Gt,Gp=N;function Hp(r,e,t){var n=e(r);return Gp(r)?n:qp(n,t(r))}var Mi=Hp,Wp=Mi,Xp=qt,zp=Le;function Yp(r){return Wp(r,zp,Xp)}var Bi=Yp,Kp=Mi,Zp=Ri,Jp=Ur;function Qp(r){return Kp(r,Jp,Zp)}var Ui=Qp,ey=me,ry=H,ty=ey(ry,"DataView"),ny=ty,iy=me,ay=H,oy=iy(ay,"Promise"),uy=oy,fy=me,sy=H,ly=fy(sy,"Set"),cy=ly,hy=me,py=H,yy=hy(py,"WeakMap"),dy=yy,Wt=ny,Xt=Bt,zt=uy,Yt=cy,Kt=dy,Ni=ne,Ce=yi,Di="[object Map]",vy="[object Object]",Li="[object Promise]",Ci="[object Set]",ji="[object WeakMap]",ki="[object DataView]",gy=Ce(Wt),_y=Ce(Xt),my=Ce(zt),by=Ce(Yt),wy=Ce(Kt),be=Ni;(Wt&&be(new Wt(new ArrayBuffer(1)))!=ki||Xt&&be(new Xt)!=Di||zt&&be(zt.resolve())!=Li||Yt&&be(new Yt)!=Ci||Kt&&be(new Kt)!=ji)&&(be=function(r){var e=Ni(r),t=e==vy?r.constructor:void 0,n=t?Ce(t):"";if(n)switch(n){case gy:return ki;case _y:return Di;case my:return Li;case by:return Ci;case wy:return ji}return e});var Nr=be,$y=Object.prototype,Ey=$y.hasOwnProperty;function Oy(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&Ey.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var Ay=Oy,Sy=H,Iy=Sy.Uint8Array,Vi=Iy,qi=Vi;function Ty(r){var e=new r.constructor(r.byteLength);return new qi(e).set(new qi(r)),e}var Zt=Ty,xy=Zt;function Py(r,e){var t=e?xy(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var Fy=Py,Ry=/\w*$/;function My(r){var e=new r.constructor(r.source,Ry.exec(r));return e.lastIndex=r.lastIndex,e}var By=My,Gi=Me,Hi=Gi?Gi.prototype:void 0,Wi=Hi?Hi.valueOf:void 0;function Uy(r){return Wi?Object(Wi.call(r)):{}}var Ny=Uy,Dy=Zt;function Ly(r,e){var t=e?Dy(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var Cy=Ly,jy=Zt,ky=Fy,Vy=By,qy=Ny,Gy=Cy,Hy="[object Boolean]",Wy="[object Date]",Xy="[object Map]",zy="[object Number]",Yy="[object RegExp]",Ky="[object Set]",Zy="[object String]",Jy="[object Symbol]",Qy="[object ArrayBuffer]",ed="[object DataView]",rd="[object Float32Array]",td="[object Float64Array]",nd="[object Int8Array]",id="[object Int16Array]",ad="[object Int32Array]",od="[object Uint8Array]",ud="[object Uint8ClampedArray]",fd="[object Uint16Array]",sd="[object Uint32Array]";function ld(r,e,t){var n=r.constructor;switch(e){case Qy:return jy(r);case Hy:case Wy:return new n(+r);case ed:return ky(r,t);case rd:case td:case nd:case id:case ad:case od:case ud:case fd:case sd:return Gy(r,t);case Xy:return new n;case zy:case Zy:return new n(r);case Yy:return Vy(r);case Ky:return new n;case Jy:return qy(r)}}var cd=ld,hd=ce,Xi=Object.create,pd=function(){function r(){}return function(e){if(!hd(e))return{};if(Xi)return Xi(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),yd=pd,dd=yd,vd=Ht,gd=kt;function _d(r){return typeof r.constructor=="function"&&!gd(r)?dd(vd(r)):{}}var md=_d,bd=Nr,wd=G,$d="[object Map]";function Ed(r){return wd(r)&&bd(r)==$d}var Od=Ed,Ad=Od,Sd=jt,zi=er.exports,Yi=zi&&zi.isMap,Id=Yi?Sd(Yi):Ad,Td=Id,xd=Nr,Pd=G,Fd="[object Set]";function Rd(r){return Pd(r)&&xd(r)==Fd}var Md=Rd,Bd=Md,Ud=jt,Ki=er.exports,Zi=Ki&&Ki.isSet,Nd=Zi?Ud(Zi):Bd,Dd=Nd,Ld=Nt,Cd=gi,jd=wi,kd=Jh,Vd=dp,qd=Vt.exports,Gd=gp,Hd=xp,Wd=Vp,Xd=Bi,zd=Ui,Yd=Nr,Kd=Ay,Zd=cd,Jd=md,Qd=N,ev=Qe.exports,rv=Td,tv=ce,nv=Dd,iv=Le,av=Ur,ov=1,uv=2,fv=4,Ji="[object Arguments]",sv="[object Array]",lv="[object Boolean]",cv="[object Date]",hv="[object Error]",Qi="[object Function]",pv="[object GeneratorFunction]",yv="[object Map]",dv="[object Number]",ea="[object Object]",vv="[object RegExp]",gv="[object Set]",_v="[object String]",mv="[object Symbol]",bv="[object WeakMap]",wv="[object ArrayBuffer]",$v="[object DataView]",Ev="[object Float32Array]",Ov="[object Float64Array]",Av="[object Int8Array]",Sv="[object Int16Array]",Iv="[object Int32Array]",Tv="[object Uint8Array]",xv="[object Uint8ClampedArray]",Pv="[object Uint16Array]",Fv="[object Uint32Array]",x={};x[Ji]=x[sv]=x[wv]=x[$v]=x[lv]=x[cv]=x[Ev]=x[Ov]=x[Av]=x[Sv]=x[Iv]=x[yv]=x[dv]=x[ea]=x[vv]=x[gv]=x[_v]=x[mv]=x[Tv]=x[xv]=x[Pv]=x[Fv]=!0,x[hv]=x[Qi]=x[bv]=!1;function Dr(r,e,t,n,i,a){var o,f=e&ov,s=e&uv,l=e&fv;if(t&&(o=i?t(r,n,i,a):t(r)),o!==void 0)return o;if(!tv(r))return r;var c=Qd(r);if(c){if(o=Kd(r),!f)return Gd(r,o)}else{var u=Yd(r),h=u==Qi||u==pv;if(ev(r))return qd(r,f);if(u==ea||u==Ji||h&&!i){if(o=s||h?{}:Jd(r),!f)return s?Wd(r,Vd(o,r)):Hd(r,kd(o,r))}else{if(!x[u])return i?r:{};o=Zd(r,u,f)}}a||(a=new Ld);var d=a.get(r);if(d)return d;a.set(r,o),nv(r)?r.forEach(function($){o.add(Dr($,e,t,$,r,a))}):rv(r)&&r.forEach(function($,b){o.set(b,Dr($,e,t,b,r,a))});var _=l?s?zd:Xd:s?av:iv,E=c?void 0:_(r);return Cd(E||r,function($,b){E&&(b=$,$=r[b]),jd(o,b,Dr($,e,t,b,r,a))}),o}var Rv=Dr,Mv=ne,Bv=G,Uv="[object Symbol]";function Nv(r){return typeof r=="symbol"||Bv(r)&&Mv(r)==Uv}var Lr=Nv,Dv=N,Lv=Lr,Cv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jv=/^\w*$/;function kv(r,e){if(Dv(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||Lv(r)?!0:jv.test(r)||!Cv.test(r)||e!=null&&r in Object(e)}var Jt=kv,ra=Ut,Vv="Expected a function";function Qt(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(Vv);var t=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=t.cache;if(a.has(i))return a.get(i);var o=r.apply(this,n);return t.cache=a.set(i,o)||a,o};return t.cache=new(Qt.Cache||ra),t}Qt.Cache=ra;var qv=Qt,Gv=qv,Hv=500;function Wv(r){var e=Gv(r,function(n){return t.size===Hv&&t.clear(),n}),t=e.cache;return e}var Xv=Wv,zv=Xv,Yv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kv=/\\(\\)?/g,Zv=zv(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(Yv,function(t,n,i,a){e.push(i?a.replace(Kv,"$1"):n||t)}),e}),Jv=Zv,ta=Me,Qv=xr,eg=N,rg=Lr,tg=1/0,na=ta?ta.prototype:void 0,ia=na?na.toString:void 0;function aa(r){if(typeof r=="string")return r;if(eg(r))return Qv(r,aa)+"";if(rg(r))return ia?ia.call(r):"";var e=r+"";return e=="0"&&1/r==-tg?"-0":e}var en=aa,ng=en;function ig(r){return r==null?"":ng(r)}var rn=ig,ag=N,og=Jt,ug=Jv,fg=rn;function sg(r,e){return ag(r)?r:og(r,e)?[r]:ug(fg(r))}var Cr=sg;function lg(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var cg=lg,hg=Lr,pg=1/0;function yg(r){if(typeof r=="string"||hg(r))return r;var e=r+"";return e=="0"&&1/r==-pg?"-0":e}var tr=yg,dg=Cr,vg=tr;function gg(r,e){e=dg(e,r);for(var t=0,n=e.length;r!=null&&t<n;)r=r[vg(e[t++])];return t&&t==n?r:void 0}var tn=gg;function _g(r,e,t){var n=-1,i=r.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=r[n+e];return a}var oa=_g,mg=tn,bg=oa;function wg(r,e){return e.length<2?r:mg(r,bg(e,0,-1))}var $g=wg,Eg=Cr,Og=cg,Ag=$g,Sg=tr;function Ig(r,e){return e=Eg(e,r),r=Ag(r,e),r==null||delete r[Sg(Og(e))]}var Tg=Ig,xg=ne,Pg=Ht,Fg=G,Rg="[object Object]",Mg=Function.prototype,Bg=Object.prototype,ua=Mg.toString,Ug=Bg.hasOwnProperty,Ng=ua.call(Object);function Dg(r){if(!Fg(r)||xg(r)!=Rg)return!1;var e=Pg(r);if(e===null)return!0;var t=Ug.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ua.call(t)==Ng}var Lg=Dg,Cg=Lg;function jg(r){return Cg(r)?void 0:r}var kg=jg,fa=Me,Vg=Dt,qg=N,sa=fa?fa.isConcatSpreadable:void 0;function Gg(r){return qg(r)||Vg(r)||!!(sa&&r&&r[sa])}var Hg=Gg,Wg=Gt,Xg=Hg;function la(r,e,t,n,i){var a=-1,o=r.length;for(t||(t=Xg),i||(i=[]);++a<o;){var f=r[a];e>0&&t(f)?e>1?la(f,e-1,t,n,i):Wg(i,f):n||(i[i.length]=f)}return i}var zg=la,Yg=zg;function Kg(r){var e=r==null?0:r.length;return e?Yg(r,1):[]}var Zg=Kg;function Jg(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}var Qg=Jg,e_=Qg,ca=Math.max;function r_(r,e,t){return e=ca(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,a=ca(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var f=Array(e+1);++i<e;)f[i]=n[i];return f[e]=t(o),e_(r,this,f)}}var ha=r_;function t_(r){return function(){return r}}var n_=t_;function i_(r){return r}var jr=i_,a_=n_,pa=_i,o_=jr,u_=pa?function(r,e){return pa(r,"toString",{configurable:!0,enumerable:!1,value:a_(e),writable:!0})}:o_,f_=u_,s_=800,l_=16,c_=Date.now;function h_(r){var e=0,t=0;return function(){var n=c_(),i=l_-(n-t);if(t=n,i>0){if(++e>=s_)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var p_=h_,y_=f_,d_=p_,v_=d_(y_),ya=v_,g_=Zg,__=ha,m_=ya;function b_(r){return m_(__(r,void 0,g_),r+"")}var w_=b_,$_=xr,E_=Rv,O_=Tg,A_=Cr,S_=De,I_=kg,T_=w_,x_=Ui,P_=1,F_=2,R_=4,M_=T_(function(r,e){var t={};if(r==null)return t;var n=!1;e=$_(e,function(a){return a=A_(a,r),n||(n=a.length>1),a}),S_(r,x_(r),t),n&&(t=E_(t,P_|F_|R_,I_));for(var i=e.length;i--;)O_(t,e[i]);return t}),B_=M_,U_=Object.defineProperty,N_=Object.defineProperties,D_=Object.getOwnPropertyDescriptors,da=Object.getOwnPropertySymbols,L_=Object.prototype.hasOwnProperty,C_=Object.prototype.propertyIsEnumerable,va=(r,e,t)=>e in r?U_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,j_=(r,e)=>{for(var t in e||(e={}))L_.call(e,t)&&va(r,t,e[t]);if(da)for(var t of da(e))C_.call(e,t)&&va(r,t,e[t]);return r},k_=(r,e)=>N_(r,D_(e));function V_(r){try{return JSON.parse(r)}catch{return r}}function q_(r){return Object.entries(r).reduce((e,[t,n])=>k_(j_({},e),{[t]:V_(n)}),{})}var G_=Object.defineProperty,H_=Object.defineProperties,W_=Object.getOwnPropertyDescriptors,ga=Object.getOwnPropertySymbols,X_=Object.prototype.hasOwnProperty,z_=Object.prototype.propertyIsEnumerable,_a=(r,e,t)=>e in r?G_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ma=(r,e)=>{for(var t in e||(e={}))X_.call(e,t)&&_a(r,t,e[t]);if(ga)for(var t of ga(e))z_.call(e,t)&&_a(r,t,e[t]);return r},ba=(r,e)=>H_(r,W_(e));function wa(r){var e;const t=q_(r),n=t.auto_inject===void 0?!0:t.auto_inject,i=(e=t.display_on)!=null?e:[],a=t.first_option==="autodeliver";return ba(ma({},B_(t,["display_on","first_option"])),{auto_inject:n,valid_pages:i,is_subscription_first:a,autoInject:n,validPages:i,isSubscriptionFirst:a})}function $a(r){var e;const t=((e=r.subscription_options)==null?void 0:e.storefront_purchase_options)==="subscription_only";return ba(ma({},r),{is_subscription_only:t,isSubscriptionOnly:t})}function Y_(r){return r.map(e=>{const t={};return Object.entries(e).forEach(([n,i])=>{t[n]=$a(i)}),t})}var C=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof C<"u"&&C,k={searchParams:"URLSearchParams"in C,iterable:"Symbol"in C&&"iterator"in Symbol,blob:"FileReader"in C&&"Blob"in C&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in C,arrayBuffer:"ArrayBuffer"in C};function K_(r){return r&&DataView.prototype.isPrototypeOf(r)}if(k.arrayBuffer)var Z_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],J_=ArrayBuffer.isView||function(r){return r&&Z_.indexOf(Object.prototype.toString.call(r))>-1};function nr(r){if(typeof r!="string"&&(r=String(r)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(r)||r==="")throw new TypeError('Invalid character in header field name: "'+r+'"');return r.toLowerCase()}function nn(r){return typeof r!="string"&&(r=String(r)),r}function an(r){var e={next:function(){var t=r.shift();return{done:t===void 0,value:t}}};return k.iterable&&(e[Symbol.iterator]=function(){return e}),e}function M(r){this.map={},r instanceof M?r.forEach(function(e,t){this.append(t,e)},this):Array.isArray(r)?r.forEach(function(e){this.append(e[0],e[1])},this):r&&Object.getOwnPropertyNames(r).forEach(function(e){this.append(e,r[e])},this)}M.prototype.append=function(r,e){r=nr(r),e=nn(e);var t=this.map[r];this.map[r]=t?t+", "+e:e},M.prototype.delete=function(r){delete this.map[nr(r)]},M.prototype.get=function(r){return r=nr(r),this.has(r)?this.map[r]:null},M.prototype.has=function(r){return this.map.hasOwnProperty(nr(r))},M.prototype.set=function(r,e){this.map[nr(r)]=nn(e)},M.prototype.forEach=function(r,e){for(var t in this.map)this.map.hasOwnProperty(t)&&r.call(e,this.map[t],t,this)},M.prototype.keys=function(){var r=[];return this.forEach(function(e,t){r.push(t)}),an(r)},M.prototype.values=function(){var r=[];return this.forEach(function(e){r.push(e)}),an(r)},M.prototype.entries=function(){var r=[];return this.forEach(function(e,t){r.push([t,e])}),an(r)},k.iterable&&(M.prototype[Symbol.iterator]=M.prototype.entries);function on(r){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}function Ea(r){return new Promise(function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}})}function Q_(r){var e=new FileReader,t=Ea(e);return e.readAsArrayBuffer(r),t}function e0(r){var e=new FileReader,t=Ea(e);return e.readAsText(r),t}function r0(r){for(var e=new Uint8Array(r),t=new Array(e.length),n=0;n<e.length;n++)t[n]=String.fromCharCode(e[n]);return t.join("")}function Oa(r){if(r.slice)return r.slice(0);var e=new Uint8Array(r.byteLength);return e.set(new Uint8Array(r)),e.buffer}function Aa(){return this.bodyUsed=!1,this._initBody=function(r){this.bodyUsed=this.bodyUsed,this._bodyInit=r,r?typeof r=="string"?this._bodyText=r:k.blob&&Blob.prototype.isPrototypeOf(r)?this._bodyBlob=r:k.formData&&FormData.prototype.isPrototypeOf(r)?this._bodyFormData=r:k.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)?this._bodyText=r.toString():k.arrayBuffer&&k.blob&&K_(r)?(this._bodyArrayBuffer=Oa(r.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):k.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(r)||J_(r))?this._bodyArrayBuffer=Oa(r):this._bodyText=r=Object.prototype.toString.call(r):this._bodyText="",this.headers.get("content-type")||(typeof r=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):k.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},k.blob&&(this.blob=function(){var r=on(this);if(r)return r;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var r=on(this);return r||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(Q_)}),this.text=function(){var r=on(this);if(r)return r;if(this._bodyBlob)return e0(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(r0(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},k.formData&&(this.formData=function(){return this.text().then(i0)}),this.json=function(){return this.text().then(JSON.parse)},this}var t0=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function n0(r){var e=r.toUpperCase();return t0.indexOf(e)>-1?e:r}function we(r,e){if(!(this instanceof we))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{};var t=e.body;if(r instanceof we){if(r.bodyUsed)throw new TypeError("Already read");this.url=r.url,this.credentials=r.credentials,e.headers||(this.headers=new M(r.headers)),this.method=r.method,this.mode=r.mode,this.signal=r.signal,!t&&r._bodyInit!=null&&(t=r._bodyInit,r.bodyUsed=!0)}else this.url=String(r);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new M(e.headers)),this.method=n0(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&t)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(t),(this.method==="GET"||this.method==="HEAD")&&(e.cache==="no-store"||e.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}we.prototype.clone=function(){return new we(this,{body:this._bodyInit})};function i0(r){var e=new FormData;return r.trim().split("&").forEach(function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(a))}}),e}function a0(r){var e=new M,t=r.replace(/\r?\n[\t ]+/g," ");return t.split("\r").map(function(n){return n.indexOf(`
|
|
2
|
+
`)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),a=i.shift().trim();if(a){var o=i.join(":").trim();e.append(a,o)}}),e}Aa.call(we.prototype);function W(r,e){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new M(e.headers),this.url=e.url||"",this._initBody(r)}Aa.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new M(this.headers),url:this.url})},W.error=function(){var r=new W(null,{status:0,statusText:""});return r.type="error",r};var o0=[301,302,303,307,308];W.redirect=function(r,e){if(o0.indexOf(e)===-1)throw new RangeError("Invalid status code");return new W(null,{status:e,headers:{location:r}})};var $e=C.DOMException;try{new $e}catch{$e=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},$e.prototype=Object.create(Error.prototype),$e.prototype.constructor=$e}function Sa(r,e){return new Promise(function(t,n){var i=new we(r,e);if(i.signal&&i.signal.aborted)return n(new $e("Aborted","AbortError"));var a=new XMLHttpRequest;function o(){a.abort()}a.onload=function(){var s={status:a.status,statusText:a.statusText,headers:a0(a.getAllResponseHeaders()||"")};s.url="responseURL"in a?a.responseURL:s.headers.get("X-Request-URL");var l="response"in a?a.response:a.responseText;setTimeout(function(){t(new W(l,s))},0)},a.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.onabort=function(){setTimeout(function(){n(new $e("Aborted","AbortError"))},0)};function f(s){try{return s===""&&C.location.href?C.location.href:s}catch{return s}}a.open(i.method,f(i.url),!0),i.credentials==="include"?a.withCredentials=!0:i.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(k.blob?a.responseType="blob":k.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(a.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof M)?Object.getOwnPropertyNames(e.headers).forEach(function(s){a.setRequestHeader(s,nn(e.headers[s]))}):i.headers.forEach(function(s,l){a.setRequestHeader(l,s)}),i.signal&&(i.signal.addEventListener("abort",o),a.onreadystatechange=function(){a.readyState===4&&i.signal.removeEventListener("abort",o)}),a.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}Sa.polyfill=!0,C.fetch||(C.fetch=Sa,C.Headers=M,C.Request=we,C.Response=W),self.fetch.bind(self);var u0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==i||o.enumerable!==!0)return!1}return!0},Ia=typeof Symbol<"u"&&Symbol,f0=u0,s0=function(){return typeof Ia!="function"||typeof Symbol!="function"||typeof Ia("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:f0()},l0="Function.prototype.bind called on incompatible ",un=Array.prototype.slice,c0=Object.prototype.toString,h0="[object Function]",p0=function(e){var t=this;if(typeof t!="function"||c0.call(t)!==h0)throw new TypeError(l0+t);for(var n=un.call(arguments,1),i,a=function(){if(this instanceof i){var c=t.apply(this,n.concat(un.call(arguments)));return Object(c)===c?c:this}else return t.apply(e,n.concat(un.call(arguments)))},o=Math.max(0,t.length-n.length),f=[],s=0;s<o;s++)f.push("$"+s);if(i=Function("binder","return function ("+f.join(",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var l=function(){};l.prototype=t.prototype,i.prototype=new l,l.prototype=null}return i},y0=p0,fn=Function.prototype.bind||y0,d0=fn,v0=d0.call(Function.call,Object.prototype.hasOwnProperty),I,je=SyntaxError,Ta=Function,ke=TypeError,sn=function(r){try{return Ta('"use strict"; return ('+r+").constructor;")()}catch{}},Ee=Object.getOwnPropertyDescriptor;if(Ee)try{Ee({},"")}catch{Ee=null}var ln=function(){throw new ke},g0=Ee?function(){try{return arguments.callee,ln}catch{try{return Ee(arguments,"callee").get}catch{return ln}}}():ln,Ve=s0(),he=Object.getPrototypeOf||function(r){return r.__proto__},qe={},_0=typeof Uint8Array>"u"?I:he(Uint8Array),Ge={"%AggregateError%":typeof AggregateError>"u"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?I:ArrayBuffer,"%ArrayIteratorPrototype%":Ve?he([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":qe,"%AsyncGenerator%":qe,"%AsyncGeneratorFunction%":qe,"%AsyncIteratorPrototype%":qe,"%Atomics%":typeof Atomics>"u"?I:Atomics,"%BigInt%":typeof BigInt>"u"?I:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?I:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?I:Float32Array,"%Float64Array%":typeof Float64Array>"u"?I:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?I:FinalizationRegistry,"%Function%":Ta,"%GeneratorFunction%":qe,"%Int8Array%":typeof Int8Array>"u"?I:Int8Array,"%Int16Array%":typeof Int16Array>"u"?I:Int16Array,"%Int32Array%":typeof Int32Array>"u"?I:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ve?he(he([][Symbol.iterator]())):I,"%JSON%":typeof JSON=="object"?JSON:I,"%Map%":typeof Map>"u"?I:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ve?I:he(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?I:Promise,"%Proxy%":typeof Proxy>"u"?I:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?I:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?I:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ve?I:he(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?I:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ve?he(""[Symbol.iterator]()):I,"%Symbol%":Ve?Symbol:I,"%SyntaxError%":je,"%ThrowTypeError%":g0,"%TypedArray%":_0,"%TypeError%":ke,"%Uint8Array%":typeof Uint8Array>"u"?I:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?I:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?I:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?I:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?I:WeakMap,"%WeakRef%":typeof WeakRef>"u"?I:WeakRef,"%WeakSet%":typeof WeakSet>"u"?I:WeakSet},m0=function r(e){var t;if(e==="%AsyncFunction%")t=sn("async function () {}");else if(e==="%GeneratorFunction%")t=sn("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=sn("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&(t=he(i.prototype))}return Ge[e]=t,t},xa={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ir=fn,kr=v0,b0=ir.call(Function.call,Array.prototype.concat),w0=ir.call(Function.apply,Array.prototype.splice),Pa=ir.call(Function.call,String.prototype.replace),Vr=ir.call(Function.call,String.prototype.slice),$0=ir.call(Function.call,RegExp.prototype.exec),E0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O0=/\\(\\)?/g,A0=function(e){var t=Vr(e,0,1),n=Vr(e,-1);if(t==="%"&&n!=="%")throw new je("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new je("invalid intrinsic syntax, expected opening `%`");var i=[];return Pa(e,E0,function(a,o,f,s){i[i.length]=f?Pa(s,O0,"$1"):o||a}),i},S0=function(e,t){var n=e,i;if(kr(xa,n)&&(i=xa[n],n="%"+i[0]+"%"),kr(Ge,n)){var a=Ge[n];if(a===qe&&(a=m0(n)),typeof a>"u"&&!t)throw new ke("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new je("intrinsic "+e+" does not exist!")},cn=function(e,t){if(typeof e!="string"||e.length===0)throw new ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new ke('"allowMissing" argument must be a boolean');if($0(/^%?[^%]*%?$/g,e)===null)throw new je("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=A0(e),i=n.length>0?n[0]:"",a=S0("%"+i+"%",t),o=a.name,f=a.value,s=!1,l=a.alias;l&&(i=l[0],w0(n,b0([0,1],l)));for(var c=1,u=!0;c<n.length;c+=1){var h=n[c],d=Vr(h,0,1),_=Vr(h,-1);if((d==='"'||d==="'"||d==="`"||_==='"'||_==="'"||_==="`")&&d!==_)throw new je("property names with quotes must have matching quotes");if((h==="constructor"||!u)&&(s=!0),i+="."+h,o="%"+i+"%",kr(Ge,o))f=Ge[o];else if(f!=null){if(!(h in f)){if(!t)throw new ke("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ee&&c+1>=n.length){var E=Ee(f,h);u=!!E,u&&"get"in E&&!("originalValue"in E.get)?f=E.get:f=f[h]}else u=kr(f,h),f=f[h];u&&!s&&(Ge[o]=f)}}return f},Fa={exports:{}};(function(r){var e=fn,t=cn,n=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(i,n),o=t("%Object.getOwnPropertyDescriptor%",!0),f=t("%Object.defineProperty%",!0),s=t("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}r.exports=function(u){var h=a(e,i,arguments);if(o&&f){var d=o(h,"length");d.configurable&&f(h,"length",{value:1+s(0,u.length-(arguments.length-1))})}return h};var l=function(){return a(e,n,arguments)};f?f(r.exports,"apply",{value:l}):r.exports.apply=l})(Fa);var Ra=cn,Ma=Fa.exports,I0=Ma(Ra("String.prototype.indexOf")),T0=function(e,t){var n=Ra(e,!!t);return typeof n=="function"&&I0(e,".prototype.")>-1?Ma(n):n},He=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},X=[],q=[],x0=typeof Uint8Array<"u"?Uint8Array:Array,hn=!1;function Ba(){hn=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)X[e]=r[e],q[r.charCodeAt(e)]=e;q["-".charCodeAt(0)]=62,q["_".charCodeAt(0)]=63}function P0(r){hn||Ba();var e,t,n,i,a,o,f=r.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=r[f-2]==="="?2:r[f-1]==="="?1:0,o=new x0(f*3/4-a),n=a>0?f-4:f;var s=0;for(e=0,t=0;e<n;e+=4,t+=3)i=q[r.charCodeAt(e)]<<18|q[r.charCodeAt(e+1)]<<12|q[r.charCodeAt(e+2)]<<6|q[r.charCodeAt(e+3)],o[s++]=i>>16&255,o[s++]=i>>8&255,o[s++]=i&255;return a===2?(i=q[r.charCodeAt(e)]<<2|q[r.charCodeAt(e+1)]>>4,o[s++]=i&255):a===1&&(i=q[r.charCodeAt(e)]<<10|q[r.charCodeAt(e+1)]<<4|q[r.charCodeAt(e+2)]>>2,o[s++]=i>>8&255,o[s++]=i&255),o}function F0(r){return X[r>>18&63]+X[r>>12&63]+X[r>>6&63]+X[r&63]}function R0(r,e,t){for(var n,i=[],a=e;a<t;a+=3)n=(r[a]<<16)+(r[a+1]<<8)+r[a+2],i.push(F0(n));return i.join("")}function Ua(r){hn||Ba();for(var e,t=r.length,n=t%3,i="",a=[],o=16383,f=0,s=t-n;f<s;f+=o)a.push(R0(r,f,f+o>s?s:f+o));return n===1?(e=r[t-1],i+=X[e>>2],i+=X[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=X[e>>10],i+=X[e>>4&63],i+=X[e<<2&63],i+="="),a.push(i),a.join("")}function qr(r,e,t,n,i){var a,o,f=i*8-n-1,s=(1<<f)-1,l=s>>1,c=-7,u=t?i-1:0,h=t?-1:1,d=r[e+u];for(u+=h,a=d&(1<<-c)-1,d>>=-c,c+=f;c>0;a=a*256+r[e+u],u+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=o*256+r[e+u],u+=h,c-=8);if(a===0)a=1-l;else{if(a===s)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-l}return(d?-1:1)*o*Math.pow(2,a-n)}function Na(r,e,t,n,i,a){var o,f,s,l=a*8-i-1,c=(1<<l)-1,u=c>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,_=n?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-o))<1&&(o--,s*=2),o+u>=1?e+=h/s:e+=h*Math.pow(2,1-u),e*s>=2&&(o++,s/=2),o+u>=c?(f=0,o=c):o+u>=1?(f=(e*s-1)*Math.pow(2,i),o=o+u):(f=e*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;r[t+d]=f&255,d+=_,f/=256,i-=8);for(o=o<<i|f,l+=i;l>0;r[t+d]=o&255,d+=_,o/=256,l-=8);r[t+d-_]|=E*128}var M0={}.toString,Da=Array.isArray||function(r){return M0.call(r)=="[object Array]"};/*!
|
|
3
3
|
* The buffer module from node.js, for the browser.
|
|
4
4
|
*
|
|
5
5
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
6
6
|
* @license MIT
|
|
7
|
-
*/var N0=50;y.TYPED_ARRAY_SUPPORT=We.TYPED_ARRAY_SUPPORT!==void 0?We.TYPED_ARRAY_SUPPORT:!0,Hr();function Hr(){return y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ie(r,e){if(Hr()<e)throw new RangeError("Invalid typed array length");return y.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=y.prototype):(r===null&&(r=new y(e)),r.length=e),r}function y(r,e,t){if(!y.TYPED_ARRAY_SUPPORT&&!(this instanceof y))return new y(r,e,t);if(typeof r=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return yn(this,r)}return ja(this,r,e,t)}y.poolSize=8192,y._augment=function(r){return r.__proto__=y.prototype,r};function ja(r,e,t,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?C0(r,e,t,n):typeof e=="string"?L0(r,e,t):j0(r,e)}y.from=function(r,e,t){return ja(null,r,e,t)},y.TYPED_ARRAY_SUPPORT&&(y.prototype.__proto__=Uint8Array.prototype,y.__proto__=Uint8Array);function ka(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function D0(r,e,t,n){return ka(e),e<=0?ie(r,e):t!==void 0?typeof n=="string"?ie(r,e).fill(t,n):ie(r,e).fill(t):ie(r,e)}y.alloc=function(r,e,t){return D0(null,r,e,t)};function yn(r,e){if(ka(e),r=ie(r,e<0?0:vn(e)|0),!y.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}y.allocUnsafe=function(r){return yn(null,r)},y.allocUnsafeSlow=function(r){return yn(null,r)};function L0(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!y.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=Va(e,t)|0;r=ie(r,n);var i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function dn(r,e){var t=e.length<0?0:vn(e.length)|0;r=ie(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function C0(r,e,t,n){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return t===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,t):e=new Uint8Array(e,t,n),y.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=y.prototype):r=dn(r,e),r}function j0(r,e){if(z(e)){var t=vn(e.length)|0;return r=ie(r,t),r.length===0||e.copy(r,0,0,t),r}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||am(e.length)?ie(r,0):dn(r,e);if(e.type==="Buffer"&&Ca(e.data))return dn(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function vn(r){if(r>=Hr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Hr().toString(16)+" bytes");return r|0}y.isBuffer=om;function z(r){return!!(r!=null&&r._isBuffer)}y.compare=function(e,t){if(!z(e)||!z(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,a=0,o=Math.min(n,i);a<o;++a)if(e[a]!==t[a]){n=e[a],i=t[a];break}return n<i?-1:i<n?1:0},y.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},y.concat=function(e,t){if(!Ca(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return y.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=y.allocUnsafe(t),a=0;for(n=0;n<e.length;++n){var o=e[n];if(!z(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function Va(r,e){if(z(r))return r.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var t=r.length;if(t===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return zr(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Za(r).length;default:if(n)return zr(r).length;e=(""+e).toLowerCase(),n=!0}}y.byteLength=Va;function k0(r,e,t){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return Z0(this,e,t);case"utf8":case"utf-8":return Wa(this,e,t);case"ascii":return Y0(this,e,t);case"latin1":case"binary":return K0(this,e,t);case"base64":return X0(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J0(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}y.prototype._isBuffer=!0;function Oe(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}y.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Oe(this,t,t+1);return this},y.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Oe(this,t,t+3),Oe(this,t+1,t+2);return this},y.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Oe(this,t,t+7),Oe(this,t+1,t+6),Oe(this,t+2,t+5),Oe(this,t+3,t+4);return this},y.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Wa(this,0,e):k0.apply(this,arguments)},y.prototype.equals=function(e){if(!z(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:y.compare(this,e)===0},y.prototype.inspect=function(){var e="",t=N0;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},y.prototype.compare=function(e,t,n,i,a){if(!z(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),t<0||n>e.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&t>=n)return 0;if(i>=a)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,a>>>=0,this===e)return 0;for(var o=a-i,f=n-t,s=Math.min(o,f),l=this.slice(i,a),h=e.slice(t,n),u=0;u<s;++u)if(l[u]!==h[u]){o=l[u],f=h[u];break}return o<f?-1:f<o?1:0};function qa(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=y.from(e,n)),z(e))return e.length===0?-1:Ga(r,e,t,n,i);if(typeof e=="number")return e=e&255,y.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Ga(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Ga(r,e,t,n,i){var a=1,o=r.length,f=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;a=2,o/=2,f/=2,t/=2}function s(d,_){return a===1?d[_]:d.readUInt16BE(_*a)}var l;if(i){var h=-1;for(l=t;l<o;l++)if(s(r,l)===s(e,h===-1?0:l-h)){if(h===-1&&(h=l),l-h+1===f)return h*a}else h!==-1&&(l-=l-h),h=-1}else for(t+f>o&&(t=o-f),l=t;l>=0;l--){for(var u=!0,c=0;c<f;c++)if(s(r,l+c)!==s(e,c)){u=!1;break}if(u)return l}return-1}y.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},y.prototype.indexOf=function(e,t,n){return qa(this,e,t,n,!0)},y.prototype.lastIndexOf=function(e,t,n){return qa(this,e,t,n,!1)};function V0(r,e,t,n){t=Number(t)||0;var i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var a=e.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var f=parseInt(e.substr(o*2,2),16);if(isNaN(f))return o;r[t+o]=f}return o}function q0(r,e,t,n){return Yr(zr(e,r.length-t),r,t,n)}function Ha(r,e,t,n){return Yr(nm(e),r,t,n)}function G0(r,e,t,n){return Ha(r,e,t,n)}function H0(r,e,t,n){return Yr(Za(e),r,t,n)}function W0(r,e,t,n){return Yr(im(e,r.length-t),r,t,n)}y.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-t;if((n===void 0||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return V0(this,e,t,n);case"utf8":case"utf-8":return q0(this,e,t,n);case"ascii":return Ha(this,e,t,n);case"latin1":case"binary":return G0(this,e,t,n);case"base64":return H0(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W0(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X0(r,e,t){return e===0&&t===r.length?Da(r):Da(r.slice(e,t))}function Wa(r,e,t){t=Math.min(r.length,t);for(var n=[],i=e;i<t;){var a=r[i],o=null,f=a>239?4:a>223?3:a>191?2:1;if(i+f<=t){var s,l,h,u;switch(f){case 1:a<128&&(o=a);break;case 2:s=r[i+1],(s&192)===128&&(u=(a&31)<<6|s&63,u>127&&(o=u));break;case 3:s=r[i+1],l=r[i+2],(s&192)===128&&(l&192)===128&&(u=(a&15)<<12|(s&63)<<6|l&63,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:s=r[i+1],l=r[i+2],h=r[i+3],(s&192)===128&&(l&192)===128&&(h&192)===128&&(u=(a&15)<<18|(s&63)<<12|(l&63)<<6|h&63,u>65535&&u<1114112&&(o=u))}}o===null?(o=65533,f=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=f}return z0(n)}var Xa=4096;function z0(r){var e=r.length;if(e<=Xa)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=Xa));return t}function Y0(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function K0(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function Z0(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var i="",a=e;a<t;++a)i+=tm(r[a]);return i}function J0(r,e,t){for(var n=r.slice(e,t),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}y.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var i;if(y.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=y.prototype;else{var a=t-e;i=new y(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+e]}return i};function B(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}y.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return i},y.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=this[e+--t],a=1;t>0&&(a*=256);)i+=this[e+--t]*a;return i},y.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},y.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},y.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},y.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},y.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},y.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},y.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=t,a=1,o=this[e+--i];i>0&&(a*=256);)o+=this[e+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},y.prototype.readInt8=function(e,t){return t||B(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},y.prototype.readInt16LE=function(e,t){t||B(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},y.prototype.readInt16BE=function(e,t){t||B(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},y.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},y.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},y.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),Gr(this,e,!0,23,4)},y.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),Gr(this,e,!1,23,4)},y.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),Gr(this,e,!0,52,8)},y.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),Gr(this,e,!1,52,8)};function V(r,e,t,n,i,a){if(!z(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}y.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;V(this,e,t,n,a,0)}var o=1,f=0;for(this[t]=e&255;++f<n&&(o*=256);)this[t+f]=e/o&255;return t+n},y.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;V(this,e,t,n,a,0)}var o=n-1,f=1;for(this[t+o]=e&255;--o>=0&&(f*=256);)this[t+o]=e/f&255;return t+n},y.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,1,255,0),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};function Wr(r,e,t,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(r.length-t,2);i<a;++i)r[t+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}y.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Wr(this,e,t,!0),t+2},y.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Wr(this,e,t,!1),t+2};function Xr(r,e,t,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(r.length-t,4);i<a;++i)r[t+i]=e>>>(n?i:3-i)*8&255}y.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):Xr(this,e,t,!0),t+4},y.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Xr(this,e,t,!1),t+4},y.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);V(this,e,t,n,a-1,-a)}var o=0,f=1,s=0;for(this[t]=e&255;++o<n&&(f*=256);)e<0&&s===0&&this[t+o-1]!==0&&(s=1),this[t+o]=(e/f>>0)-s&255;return t+n},y.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);V(this,e,t,n,a-1,-a)}var o=n-1,f=1,s=0;for(this[t+o]=e&255;--o>=0&&(f*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/f>>0)-s&255;return t+n},y.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,1,127,-128),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1},y.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Wr(this,e,t,!0),t+2},y.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Wr(this,e,t,!1),t+2},y.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Xr(this,e,t,!0),t+4},y.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Xr(this,e,t,!1),t+4};function za(r,e,t,n,i,a){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Ya(r,e,t,n,i){return i||za(r,e,t,4),La(r,e,t,n,23,4),t+4}y.prototype.writeFloatLE=function(e,t,n){return Ya(this,e,t,!0,n)},y.prototype.writeFloatBE=function(e,t,n){return Ya(this,e,t,!1,n)};function Ka(r,e,t,n,i){return i||za(r,e,t,8),La(r,e,t,n,52,8),t+8}y.prototype.writeDoubleLE=function(e,t,n){return Ka(this,e,t,!0,n)},y.prototype.writeDoubleBE=function(e,t,n){return Ka(this,e,t,!1,n)},y.prototype.copy=function(e,t,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var a=i-n,o;if(this===e&&n<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!y.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},y.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var a=e.charCodeAt(0);a<256&&(e=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!y.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var o;if(typeof e=="number")for(o=t;o<n;++o)this[o]=e;else{var f=z(e)?e:zr(new y(e,i).toString()),s=f.length;for(o=0;o<n-t;++o)this[o+t]=f[o%s]}return this};var Q0=/[^+\/0-9A-Za-z-_]/g;function em(r){if(r=rm(r).replace(Q0,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function rm(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function tm(r){return r<16?"0"+r.toString(16):r.toString(16)}function zr(r,e){e=e||1/0;for(var t,n=r.length,i=null,a=[],o=0;o<n;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&a.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;a.push(t)}else if(t<2048){if((e-=2)<0)break;a.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;a.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return a}function nm(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function im(r,e){for(var t,n,i,a=[],o=0;o<r.length&&!((e-=2)<0);++o)t=r.charCodeAt(o),n=t>>8,i=t%256,a.push(i),a.push(n);return a}function Za(r){return R0(em(r))}function Yr(r,e,t,n){for(var i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function am(r){return r!==r}function om(r){return r!=null&&(!!r._isBuffer||Ja(r)||um(r))}function Ja(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function um(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Ja(r.slice(0,0))}function Qa(){throw new Error("setTimeout has not been defined")}function eo(){throw new Error("clearTimeout has not been defined")}var pe=Qa,ye=eo;typeof We.setTimeout=="function"&&(pe=setTimeout),typeof We.clearTimeout=="function"&&(ye=clearTimeout);function ro(r){if(pe===setTimeout)return setTimeout(r,0);if((pe===Qa||!pe)&&setTimeout)return pe=setTimeout,setTimeout(r,0);try{return pe(r,0)}catch{try{return pe.call(null,r,0)}catch{return pe.call(this,r,0)}}}function fm(r){if(ye===clearTimeout)return clearTimeout(r);if((ye===eo||!ye)&&clearTimeout)return ye=clearTimeout,clearTimeout(r);try{return ye(r)}catch{try{return ye.call(null,r)}catch{return ye.call(this,r)}}}var ae=[],Xe=!1,Ae,Kr=-1;function sm(){!Xe||!Ae||(Xe=!1,Ae.length?ae=Ae.concat(ae):Kr=-1,ae.length&&to())}function to(){if(!Xe){var r=ro(sm);Xe=!0;for(var e=ae.length;e;){for(Ae=ae,ae=[];++Kr<e;)Ae&&Ae[Kr].run();Kr=-1,e=ae.length}Ae=null,Xe=!1,fm(r)}}function lm(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ae.push(new no(r,e)),ae.length===1&&!Xe&&ro(to)}function no(r,e){this.fun=r,this.array=e}no.prototype.run=function(){this.fun.apply(null,this.array)};var cm="browser",hm="browser",pm=!0,ym={},dm=[],vm="",gm={},_m={},mm={};function Se(){}var bm=Se,wm=Se,$m=Se,Em=Se,Om=Se,Am=Se,Sm=Se;function Tm(r){throw new Error("process.binding is not supported")}function Im(){return"/"}function xm(r){throw new Error("process.chdir is not supported")}function Pm(){return 0}var ze=We.performance||{},Fm=ze.now||ze.mozNow||ze.msNow||ze.oNow||ze.webkitNow||function(){return new Date().getTime()};function Rm(r){var e=Fm.call(ze)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}var Mm=new Date;function Bm(){var r=new Date,e=r-Mm;return e/1e3}var Zr={nextTick:lm,title:cm,browser:pm,env:ym,argv:dm,version:vm,versions:gm,on:bm,addListener:wm,once:$m,off:Em,removeListener:Om,removeAllListeners:Am,emit:Sm,binding:Tm,cwd:Im,chdir:xm,umask:Pm,hrtime:Rm,platform:hm,release:_m,config:mm,uptime:Bm},gn;typeof Object.create=="function"?gn=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:gn=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};var io=gn,Um=/%[sdj%]/g;function Jr(r){if(!or(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(Y(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,i=n.length,a=String(r).replace(Um,function(f){if(f==="%%")return"%";if(t>=i)return f;switch(f){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch{return"[Circular]"}default:return f}}),o=n[t];t<i;o=n[++t])ar(o)||!Te(o)?a+=" "+o:a+=" "+Y(o);return a}function _n(r,e){if(K(We.process))return function(){return _n(r,e).apply(this,arguments)};if(Zr.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(Zr.throwDeprecation)throw new Error(e);Zr.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}var Qr={},mn;function ao(r){if(K(mn)&&(mn=Zr.env.NODE_DEBUG||""),r=r.toUpperCase(),!Qr[r])if(new RegExp("\\b"+r+"\\b","i").test(mn)){var e=0;Qr[r]=function(){var t=Jr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else Qr[r]=function(){};return Qr[r]}function Y(r,e){var t={seen:[],stylize:Dm};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),rt(e)?t.showHidden=e:e&&Sn(t,e),K(t.showHidden)&&(t.showHidden=!1),K(t.depth)&&(t.depth=2),K(t.colors)&&(t.colors=!1),K(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=Nm),et(t,r,t.depth)}Y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Nm(r,e){var t=Y.styles[e];return t?"\x1B["+Y.colors[t][0]+"m"+r+"\x1B["+Y.colors[t][1]+"m":r}function Dm(r,e){return r}function Lm(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function et(r,e,t){if(r.customInspect&&e&&sr(e.inspect)&&e.inspect!==Y&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return or(n)||(n=et(r,n,t)),n}var i=Cm(r,e);if(i)return i;var a=Object.keys(e),o=Lm(a);if(r.showHidden&&(a=Object.getOwnPropertyNames(e)),fr(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return bn(e);if(a.length===0){if(sr(e)){var f=e.name?": "+e.name:"";return r.stylize("[Function"+f+"]","special")}if(ur(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(tt(e))return r.stylize(Date.prototype.toString.call(e),"date");if(fr(e))return bn(e)}var s="",l=!1,h=["{","}"];if($n(e)&&(l=!0,h=["[","]"]),sr(e)){var u=e.name?": "+e.name:"";s=" [Function"+u+"]"}if(ur(e)&&(s=" "+RegExp.prototype.toString.call(e)),tt(e)&&(s=" "+Date.prototype.toUTCString.call(e)),fr(e)&&(s=" "+bn(e)),a.length===0&&(!l||e.length==0))return h[0]+s+h[1];if(t<0)return ur(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var c;return l?c=jm(r,e,t,o,a):c=a.map(function(d){return wn(r,e,t,o,d,l)}),r.seen.pop(),km(c,s,h)}function Cm(r,e){if(K(e))return r.stylize("undefined","undefined");if(or(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(En(e))return r.stylize(""+e,"number");if(rt(e))return r.stylize(""+e,"boolean");if(ar(e))return r.stylize("null","null")}function bn(r){return"["+Error.prototype.toString.call(r)+"]"}function jm(r,e,t,n,i){for(var a=[],o=0,f=e.length;o<f;++o)co(e,String(o))?a.push(wn(r,e,t,n,String(o),!0)):a.push("");return i.forEach(function(s){s.match(/^\d+$/)||a.push(wn(r,e,t,n,s,!0))}),a}function wn(r,e,t,n,i,a){var o,f,s;if(s=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},s.get?s.set?f=r.stylize("[Getter/Setter]","special"):f=r.stylize("[Getter]","special"):s.set&&(f=r.stylize("[Setter]","special")),co(n,i)||(o="["+i+"]"),f||(r.seen.indexOf(s.value)<0?(ar(t)?f=et(r,s.value,null):f=et(r,s.value,t-1),f.indexOf(`
|
|
7
|
+
*/var B0=50;y.TYPED_ARRAY_SUPPORT=He.TYPED_ARRAY_SUPPORT!==void 0?He.TYPED_ARRAY_SUPPORT:!0,Gr();function Gr(){return y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ie(r,e){if(Gr()<e)throw new RangeError("Invalid typed array length");return y.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=y.prototype):(r===null&&(r=new y(e)),r.length=e),r}function y(r,e,t){if(!y.TYPED_ARRAY_SUPPORT&&!(this instanceof y))return new y(r,e,t);if(typeof r=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return pn(this,r)}return La(this,r,e,t)}y.poolSize=8192,y._augment=function(r){return r.__proto__=y.prototype,r};function La(r,e,t,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?D0(r,e,t,n):typeof e=="string"?N0(r,e,t):L0(r,e)}y.from=function(r,e,t){return La(null,r,e,t)},y.TYPED_ARRAY_SUPPORT&&(y.prototype.__proto__=Uint8Array.prototype,y.__proto__=Uint8Array);function Ca(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function U0(r,e,t,n){return Ca(e),e<=0?ie(r,e):t!==void 0?typeof n=="string"?ie(r,e).fill(t,n):ie(r,e).fill(t):ie(r,e)}y.alloc=function(r,e,t){return U0(null,r,e,t)};function pn(r,e){if(Ca(e),r=ie(r,e<0?0:dn(e)|0),!y.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}y.allocUnsafe=function(r){return pn(null,r)},y.allocUnsafeSlow=function(r){return pn(null,r)};function N0(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!y.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=ja(e,t)|0;r=ie(r,n);var i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function yn(r,e){var t=e.length<0?0:dn(e.length)|0;r=ie(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function D0(r,e,t,n){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return t===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,t):e=new Uint8Array(e,t,n),y.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=y.prototype):r=yn(r,e),r}function L0(r,e){if(z(e)){var t=dn(e.length)|0;return r=ie(r,t),r.length===0||e.copy(r,0,0,t),r}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||nm(e.length)?ie(r,0):yn(r,e);if(e.type==="Buffer"&&Da(e.data))return yn(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function dn(r){if(r>=Gr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Gr().toString(16)+" bytes");return r|0}y.isBuffer=im;function z(r){return!!(r!=null&&r._isBuffer)}y.compare=function(e,t){if(!z(e)||!z(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,a=0,o=Math.min(n,i);a<o;++a)if(e[a]!==t[a]){n=e[a],i=t[a];break}return n<i?-1:i<n?1:0},y.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},y.concat=function(e,t){if(!Da(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return y.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=y.allocUnsafe(t),a=0;for(n=0;n<e.length;++n){var o=e[n];if(!z(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function ja(r,e){if(z(r))return r.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var t=r.length;if(t===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return Xr(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Ya(r).length;default:if(n)return Xr(r).length;e=(""+e).toLowerCase(),n=!0}}y.byteLength=ja;function C0(r,e,t){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return Y0(this,e,t);case"utf8":case"utf-8":return Ga(this,e,t);case"ascii":return X0(this,e,t);case"latin1":case"binary":return z0(this,e,t);case"base64":return H0(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K0(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}y.prototype._isBuffer=!0;function Oe(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}y.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)Oe(this,t,t+1);return this},y.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)Oe(this,t,t+3),Oe(this,t+1,t+2);return this},y.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)Oe(this,t,t+7),Oe(this,t+1,t+6),Oe(this,t+2,t+5),Oe(this,t+3,t+4);return this},y.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Ga(this,0,e):C0.apply(this,arguments)},y.prototype.equals=function(e){if(!z(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:y.compare(this,e)===0},y.prototype.inspect=function(){var e="",t=B0;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},y.prototype.compare=function(e,t,n,i,a){if(!z(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),t<0||n>e.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&t>=n)return 0;if(i>=a)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,a>>>=0,this===e)return 0;for(var o=a-i,f=n-t,s=Math.min(o,f),l=this.slice(i,a),c=e.slice(t,n),u=0;u<s;++u)if(l[u]!==c[u]){o=l[u],f=c[u];break}return o<f?-1:f<o?1:0};function ka(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=y.from(e,n)),z(e))return e.length===0?-1:Va(r,e,t,n,i);if(typeof e=="number")return e=e&255,y.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Va(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Va(r,e,t,n,i){var a=1,o=r.length,f=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;a=2,o/=2,f/=2,t/=2}function s(d,_){return a===1?d[_]:d.readUInt16BE(_*a)}var l;if(i){var c=-1;for(l=t;l<o;l++)if(s(r,l)===s(e,c===-1?0:l-c)){if(c===-1&&(c=l),l-c+1===f)return c*a}else c!==-1&&(l-=l-c),c=-1}else for(t+f>o&&(t=o-f),l=t;l>=0;l--){for(var u=!0,h=0;h<f;h++)if(s(r,l+h)!==s(e,h)){u=!1;break}if(u)return l}return-1}y.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},y.prototype.indexOf=function(e,t,n){return ka(this,e,t,n,!0)},y.prototype.lastIndexOf=function(e,t,n){return ka(this,e,t,n,!1)};function j0(r,e,t,n){t=Number(t)||0;var i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var a=e.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var f=parseInt(e.substr(o*2,2),16);if(isNaN(f))return o;r[t+o]=f}return o}function k0(r,e,t,n){return zr(Xr(e,r.length-t),r,t,n)}function qa(r,e,t,n){return zr(rm(e),r,t,n)}function V0(r,e,t,n){return qa(r,e,t,n)}function q0(r,e,t,n){return zr(Ya(e),r,t,n)}function G0(r,e,t,n){return zr(tm(e,r.length-t),r,t,n)}y.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-t;if((n===void 0||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return j0(this,e,t,n);case"utf8":case"utf-8":return k0(this,e,t,n);case"ascii":return qa(this,e,t,n);case"latin1":case"binary":return V0(this,e,t,n);case"base64":return q0(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G0(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H0(r,e,t){return e===0&&t===r.length?Ua(r):Ua(r.slice(e,t))}function Ga(r,e,t){t=Math.min(r.length,t);for(var n=[],i=e;i<t;){var a=r[i],o=null,f=a>239?4:a>223?3:a>191?2:1;if(i+f<=t){var s,l,c,u;switch(f){case 1:a<128&&(o=a);break;case 2:s=r[i+1],(s&192)===128&&(u=(a&31)<<6|s&63,u>127&&(o=u));break;case 3:s=r[i+1],l=r[i+2],(s&192)===128&&(l&192)===128&&(u=(a&15)<<12|(s&63)<<6|l&63,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:s=r[i+1],l=r[i+2],c=r[i+3],(s&192)===128&&(l&192)===128&&(c&192)===128&&(u=(a&15)<<18|(s&63)<<12|(l&63)<<6|c&63,u>65535&&u<1114112&&(o=u))}}o===null?(o=65533,f=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=f}return W0(n)}var Ha=4096;function W0(r){var e=r.length;if(e<=Ha)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=Ha));return t}function X0(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function z0(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function Y0(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var i="",a=e;a<t;++a)i+=em(r[a]);return i}function K0(r,e,t){for(var n=r.slice(e,t),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}y.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var i;if(y.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=y.prototype;else{var a=t-e;i=new y(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+e]}return i};function B(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}y.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return i},y.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=this[e+--t],a=1;t>0&&(a*=256);)i+=this[e+--t]*a;return i},y.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},y.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},y.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},y.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},y.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},y.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},y.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=t,a=1,o=this[e+--i];i>0&&(a*=256);)o+=this[e+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},y.prototype.readInt8=function(e,t){return t||B(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},y.prototype.readInt16LE=function(e,t){t||B(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},y.prototype.readInt16BE=function(e,t){t||B(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},y.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},y.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},y.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),qr(this,e,!0,23,4)},y.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),qr(this,e,!1,23,4)},y.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),qr(this,e,!0,52,8)},y.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),qr(this,e,!1,52,8)};function V(r,e,t,n,i,a){if(!z(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}y.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;V(this,e,t,n,a,0)}var o=1,f=0;for(this[t]=e&255;++f<n&&(o*=256);)this[t+f]=e/o&255;return t+n},y.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;V(this,e,t,n,a,0)}var o=n-1,f=1;for(this[t+o]=e&255;--o>=0&&(f*=256);)this[t+o]=e/f&255;return t+n},y.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,1,255,0),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};function Hr(r,e,t,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(r.length-t,2);i<a;++i)r[t+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}y.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Hr(this,e,t,!0),t+2},y.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Hr(this,e,t,!1),t+2};function Wr(r,e,t,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(r.length-t,4);i<a;++i)r[t+i]=e>>>(n?i:3-i)*8&255}y.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):Wr(this,e,t,!0),t+4},y.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Wr(this,e,t,!1),t+4},y.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);V(this,e,t,n,a-1,-a)}var o=0,f=1,s=0;for(this[t]=e&255;++o<n&&(f*=256);)e<0&&s===0&&this[t+o-1]!==0&&(s=1),this[t+o]=(e/f>>0)-s&255;return t+n},y.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);V(this,e,t,n,a-1,-a)}var o=n-1,f=1,s=0;for(this[t+o]=e&255;--o>=0&&(f*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/f>>0)-s&255;return t+n},y.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,1,127,-128),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1},y.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Hr(this,e,t,!0),t+2},y.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Hr(this,e,t,!1),t+2},y.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Wr(this,e,t,!0),t+4},y.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Wr(this,e,t,!1),t+4};function Wa(r,e,t,n,i,a){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Xa(r,e,t,n,i){return i||Wa(r,e,t,4),Na(r,e,t,n,23,4),t+4}y.prototype.writeFloatLE=function(e,t,n){return Xa(this,e,t,!0,n)},y.prototype.writeFloatBE=function(e,t,n){return Xa(this,e,t,!1,n)};function za(r,e,t,n,i){return i||Wa(r,e,t,8),Na(r,e,t,n,52,8),t+8}y.prototype.writeDoubleLE=function(e,t,n){return za(this,e,t,!0,n)},y.prototype.writeDoubleBE=function(e,t,n){return za(this,e,t,!1,n)},y.prototype.copy=function(e,t,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var a=i-n,o;if(this===e&&n<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!y.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},y.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var a=e.charCodeAt(0);a<256&&(e=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!y.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var o;if(typeof e=="number")for(o=t;o<n;++o)this[o]=e;else{var f=z(e)?e:Xr(new y(e,i).toString()),s=f.length;for(o=0;o<n-t;++o)this[o+t]=f[o%s]}return this};var Z0=/[^+\/0-9A-Za-z-_]/g;function J0(r){if(r=Q0(r).replace(Z0,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Q0(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function em(r){return r<16?"0"+r.toString(16):r.toString(16)}function Xr(r,e){e=e||1/0;for(var t,n=r.length,i=null,a=[],o=0;o<n;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&a.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;a.push(t)}else if(t<2048){if((e-=2)<0)break;a.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;a.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return a}function rm(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function tm(r,e){for(var t,n,i,a=[],o=0;o<r.length&&!((e-=2)<0);++o)t=r.charCodeAt(o),n=t>>8,i=t%256,a.push(i),a.push(n);return a}function Ya(r){return P0(J0(r))}function zr(r,e,t,n){for(var i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function nm(r){return r!==r}function im(r){return r!=null&&(!!r._isBuffer||Ka(r)||am(r))}function Ka(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function am(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Ka(r.slice(0,0))}function Za(){throw new Error("setTimeout has not been defined")}function Ja(){throw new Error("clearTimeout has not been defined")}var pe=Za,ye=Ja;typeof He.setTimeout=="function"&&(pe=setTimeout),typeof He.clearTimeout=="function"&&(ye=clearTimeout);function Qa(r){if(pe===setTimeout)return setTimeout(r,0);if((pe===Za||!pe)&&setTimeout)return pe=setTimeout,setTimeout(r,0);try{return pe(r,0)}catch{try{return pe.call(null,r,0)}catch{return pe.call(this,r,0)}}}function om(r){if(ye===clearTimeout)return clearTimeout(r);if((ye===Ja||!ye)&&clearTimeout)return ye=clearTimeout,clearTimeout(r);try{return ye(r)}catch{try{return ye.call(null,r)}catch{return ye.call(this,r)}}}var ae=[],We=!1,Ae,Yr=-1;function um(){!We||!Ae||(We=!1,Ae.length?ae=Ae.concat(ae):Yr=-1,ae.length&&eo())}function eo(){if(!We){var r=Qa(um);We=!0;for(var e=ae.length;e;){for(Ae=ae,ae=[];++Yr<e;)Ae&&Ae[Yr].run();Yr=-1,e=ae.length}Ae=null,We=!1,om(r)}}function fm(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ae.push(new ro(r,e)),ae.length===1&&!We&&Qa(eo)}function ro(r,e){this.fun=r,this.array=e}ro.prototype.run=function(){this.fun.apply(null,this.array)};var sm="browser",lm="browser",cm=!0,hm={},pm=[],ym="",dm={},vm={},gm={};function Se(){}var _m=Se,mm=Se,bm=Se,wm=Se,$m=Se,Em=Se,Om=Se;function Am(r){throw new Error("process.binding is not supported")}function Sm(){return"/"}function Im(r){throw new Error("process.chdir is not supported")}function Tm(){return 0}var Xe=He.performance||{},xm=Xe.now||Xe.mozNow||Xe.msNow||Xe.oNow||Xe.webkitNow||function(){return new Date().getTime()};function Pm(r){var e=xm.call(Xe)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}var Fm=new Date;function Rm(){var r=new Date,e=r-Fm;return e/1e3}var Kr={nextTick:fm,title:sm,browser:cm,env:hm,argv:pm,version:ym,versions:dm,on:_m,addListener:mm,once:bm,off:wm,removeListener:$m,removeAllListeners:Em,emit:Om,binding:Am,cwd:Sm,chdir:Im,umask:Tm,hrtime:Pm,platform:lm,release:vm,config:gm,uptime:Rm},vn;typeof Object.create=="function"?vn=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:vn=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};var to=vn,Mm=/%[sdj%]/g;function Zr(r){if(!or(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(Y(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,i=n.length,a=String(r).replace(Mm,function(f){if(f==="%%")return"%";if(t>=i)return f;switch(f){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch{return"[Circular]"}default:return f}}),o=n[t];t<i;o=n[++t])ar(o)||!Ie(o)?a+=" "+o:a+=" "+Y(o);return a}function gn(r,e){if(K(He.process))return function(){return gn(r,e).apply(this,arguments)};if(Kr.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(Kr.throwDeprecation)throw new Error(e);Kr.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}var Jr={},_n;function no(r){if(K(_n)&&(_n=Kr.env.NODE_DEBUG||""),r=r.toUpperCase(),!Jr[r])if(new RegExp("\\b"+r+"\\b","i").test(_n)){var e=0;Jr[r]=function(){var t=Zr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else Jr[r]=function(){};return Jr[r]}function Y(r,e){var t={seen:[],stylize:Um};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),et(e)?t.showHidden=e:e&&An(t,e),K(t.showHidden)&&(t.showHidden=!1),K(t.depth)&&(t.depth=2),K(t.colors)&&(t.colors=!1),K(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=Bm),Qr(t,r,t.depth)}Y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Bm(r,e){var t=Y.styles[e];return t?"\x1B["+Y.colors[t][0]+"m"+r+"\x1B["+Y.colors[t][1]+"m":r}function Um(r,e){return r}function Nm(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function Qr(r,e,t){if(r.customInspect&&e&&sr(e.inspect)&&e.inspect!==Y&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return or(n)||(n=Qr(r,n,t)),n}var i=Dm(r,e);if(i)return i;var a=Object.keys(e),o=Nm(a);if(r.showHidden&&(a=Object.getOwnPropertyNames(e)),fr(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return mn(e);if(a.length===0){if(sr(e)){var f=e.name?": "+e.name:"";return r.stylize("[Function"+f+"]","special")}if(ur(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(rt(e))return r.stylize(Date.prototype.toString.call(e),"date");if(fr(e))return mn(e)}var s="",l=!1,c=["{","}"];if(wn(e)&&(l=!0,c=["[","]"]),sr(e)){var u=e.name?": "+e.name:"";s=" [Function"+u+"]"}if(ur(e)&&(s=" "+RegExp.prototype.toString.call(e)),rt(e)&&(s=" "+Date.prototype.toUTCString.call(e)),fr(e)&&(s=" "+mn(e)),a.length===0&&(!l||e.length==0))return c[0]+s+c[1];if(t<0)return ur(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var h;return l?h=Lm(r,e,t,o,a):h=a.map(function(d){return bn(r,e,t,o,d,l)}),r.seen.pop(),Cm(h,s,c)}function Dm(r,e){if(K(e))return r.stylize("undefined","undefined");if(or(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if($n(e))return r.stylize(""+e,"number");if(et(e))return r.stylize(""+e,"boolean");if(ar(e))return r.stylize("null","null")}function mn(r){return"["+Error.prototype.toString.call(r)+"]"}function Lm(r,e,t,n,i){for(var a=[],o=0,f=e.length;o<f;++o)so(e,String(o))?a.push(bn(r,e,t,n,String(o),!0)):a.push("");return i.forEach(function(s){s.match(/^\d+$/)||a.push(bn(r,e,t,n,s,!0))}),a}function bn(r,e,t,n,i,a){var o,f,s;if(s=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},s.get?s.set?f=r.stylize("[Getter/Setter]","special"):f=r.stylize("[Getter]","special"):s.set&&(f=r.stylize("[Setter]","special")),so(n,i)||(o="["+i+"]"),f||(r.seen.indexOf(s.value)<0?(ar(t)?f=Qr(r,s.value,null):f=Qr(r,s.value,t-1),f.indexOf(`
|
|
8
8
|
`)>-1&&(a?f=f.split(`
|
|
9
9
|
`).map(function(l){return" "+l}).join(`
|
|
10
10
|
`).substr(2):f=`
|
|
11
11
|
`+f.split(`
|
|
12
12
|
`).map(function(l){return" "+l}).join(`
|
|
13
|
-
`))):f=r.stylize("[Circular]","special")),K(o)){if(a&&i.match(/^\d+$/))return f;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=r.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=r.stylize(o,"string"))}return o+": "+f}function
|
|
13
|
+
`))):f=r.stylize("[Circular]","special")),K(o)){if(a&&i.match(/^\d+$/))return f;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=r.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=r.stylize(o,"string"))}return o+": "+f}function Cm(r,e,t){var n=r.reduce(function(i,a){return a.indexOf(`
|
|
14
14
|
`)>=0,i+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?t[0]+(e===""?"":e+`
|
|
15
15
|
`)+" "+r.join(`,
|
|
16
|
-
`)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function $n(r){return Array.isArray(r)}function rt(r){return typeof r=="boolean"}function ar(r){return r===null}function oo(r){return r==null}function En(r){return typeof r=="number"}function or(r){return typeof r=="string"}function uo(r){return typeof r=="symbol"}function K(r){return r===void 0}function ur(r){return Te(r)&&On(r)==="[object RegExp]"}function Te(r){return typeof r=="object"&&r!==null}function tt(r){return Te(r)&&On(r)==="[object Date]"}function fr(r){return Te(r)&&(On(r)==="[object Error]"||r instanceof Error)}function sr(r){return typeof r=="function"}function fo(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}function so(r){return y.isBuffer(r)}function On(r){return Object.prototype.toString.call(r)}function An(r){return r<10?"0"+r.toString(10):r.toString(10)}var Vm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function qm(){var r=new Date,e=[An(r.getHours()),An(r.getMinutes()),An(r.getSeconds())].join(":");return[r.getDate(),Vm[r.getMonth()],e].join(" ")}function lo(){console.log("%s - %s",qm(),Jr.apply(null,arguments))}function Sn(r,e){if(!e||!Te(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function co(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var Gm={inherits:io,_extend:Sn,log:lo,isBuffer:so,isPrimitive:fo,isFunction:sr,isError:fr,isDate:tt,isObject:Te,isRegExp:ur,isUndefined:K,isSymbol:uo,isString:or,isNumber:En,isNullOrUndefined:oo,isNull:ar,isBoolean:rt,isArray:$n,inspect:Y,deprecate:_n,format:Jr,debuglog:ao},Hm=Object.freeze({__proto__:null,format:Jr,deprecate:_n,debuglog:ao,inspect:Y,isArray:$n,isBoolean:rt,isNull:ar,isNullOrUndefined:oo,isNumber:En,isString:or,isSymbol:uo,isUndefined:K,isRegExp:ur,isObject:Te,isDate:tt,isError:fr,isFunction:sr,isPrimitive:fo,isBuffer:so,log:lo,inherits:io,_extend:Sn,default:Gm}),Wm=bf(Hm),Xm=Wm.inspect,Tn=typeof Map=="function"&&Map.prototype,In=Object.getOwnPropertyDescriptor&&Tn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,nt=Tn&&In&&typeof In.get=="function"?In.get:null,zm=Tn&&Map.prototype.forEach,xn=typeof Set=="function"&&Set.prototype,Pn=Object.getOwnPropertyDescriptor&&xn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,it=xn&&Pn&&typeof Pn.get=="function"?Pn.get:null,Ym=xn&&Set.prototype.forEach,Km=typeof WeakMap=="function"&&WeakMap.prototype,lr=Km?WeakMap.prototype.has:null,Zm=typeof WeakSet=="function"&&WeakSet.prototype,cr=Zm?WeakSet.prototype.has:null,Jm=typeof WeakRef=="function"&&WeakRef.prototype,ho=Jm?WeakRef.prototype.deref:null,Qm=Boolean.prototype.valueOf,eb=Object.prototype.toString,rb=Function.prototype.toString,tb=String.prototype.match,Fn=String.prototype.slice,de=String.prototype.replace,nb=String.prototype.toUpperCase,po=String.prototype.toLowerCase,yo=RegExp.prototype.test,vo=Array.prototype.concat,Z=Array.prototype.join,ib=Array.prototype.slice,go=Math.floor,Rn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Mn=Object.getOwnPropertySymbols,Bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="object",j=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ye?"object":"symbol")?Symbol.toStringTag:null,_o=Object.prototype.propertyIsEnumerable,mo=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function bo(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||yo.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-go(-r):go(r);if(n!==r){var i=String(n),a=Fn.call(e,i.length+1);return de.call(i,t,"$&_")+"."+de.call(de.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return de.call(e,t,"$&_")}var Un=Xm,wo=Un.custom,$o=Ao(wo)?wo:null,ab=function r(e,t,n,i){var a=t||{};if(ve(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ve(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=ve(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ve(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ve(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return To(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var s=String(e);return f?bo(e,s):s}if(typeof e=="bigint"){var l=String(e)+"n";return f?bo(e,l):l}var h=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=h&&h>0&&typeof e=="object")return Nn(e)?"[Array]":"[Object]";var u=Eb(a,n);if(typeof i>"u")i=[];else if(So(i,e)>=0)return"[Circular]";function c(re,_e,se){if(_e&&(i=ib.call(i),i.push(_e)),se){var xr={depth:a.depth};return ve(a,"quoteStyle")&&(xr.quoteStyle=a.quoteStyle),r(re,xr,n+1,i)}return r(re,a,n+1,i)}if(typeof e=="function"&&!Oo(e)){var d=yb(e),_=at(e,c);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(_.length>0?" { "+Z.call(_,", ")+" }":"")}if(Ao(e)){var E=Ye?de.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Bn.call(e);return typeof e=="object"&&!Ye?hr(E):E}if(bb(e)){for(var $="<"+po.call(String(e.nodeName)),b=e.attributes||[],S=0;S<b.length;S++)$+=" "+b[S].name+"="+Eo(ob(b[S].value),"double",a);return $+=">",e.childNodes&&e.childNodes.length&&($+="..."),$+="</"+po.call(String(e.nodeName))+">",$}if(Nn(e)){if(e.length===0)return"[]";var p=at(e,c);return u&&!$b(p)?"["+Ln(p,u)+"]":"[ "+Z.call(p,", ")+" ]"}if(fb(e)){var A=at(e,c);return!("cause"in Error.prototype)&&"cause"in e&&!_o.call(e,"cause")?"{ ["+String(e)+"] "+Z.call(vo.call("[cause]: "+c(e.cause),A),", ")+" }":A.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Z.call(A,", ")+" }"}if(typeof e=="object"&&o){if($o&&typeof e[$o]=="function"&&Un)return Un(e,{depth:h-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(db(e)){var I=[];return zm.call(e,function(re,_e){I.push(c(_e,e,!0)+" => "+c(re,e))}),Io("Map",nt.call(e),I,u)}if(_b(e)){var F=[];return Ym.call(e,function(re){F.push(c(re,e))}),Io("Set",it.call(e),F,u)}if(vb(e))return Dn("WeakMap");if(mb(e))return Dn("WeakSet");if(gb(e))return Dn("WeakRef");if(lb(e))return hr(c(Number(e)));if(hb(e))return hr(c(Rn.call(e)));if(cb(e))return hr(Qm.call(e));if(sb(e))return hr(c(String(e)));if(!ub(e)&&!Oo(e)){var m=at(e,c),v=mo?mo(e)===Object.prototype:e instanceof Object||e.constructor===Object,g=e instanceof Object?"":"null prototype",w=!v&&j&&Object(e)===e&&j in e?Fn.call(ge(e),8,-1):g?"Object":"",O=v||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",L=O+(w||g?"["+Z.call(vo.call([],w||[],g||[]),": ")+"] ":"");return m.length===0?L+"{}":u?L+"{"+Ln(m,u)+"}":L+"{ "+Z.call(m,", ")+" }"}return String(e)};function Eo(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function ob(r){return de.call(String(r),/"/g,""")}function Nn(r){return ge(r)==="[object Array]"&&(!j||!(typeof r=="object"&&j in r))}function ub(r){return ge(r)==="[object Date]"&&(!j||!(typeof r=="object"&&j in r))}function Oo(r){return ge(r)==="[object RegExp]"&&(!j||!(typeof r=="object"&&j in r))}function fb(r){return ge(r)==="[object Error]"&&(!j||!(typeof r=="object"&&j in r))}function sb(r){return ge(r)==="[object String]"&&(!j||!(typeof r=="object"&&j in r))}function lb(r){return ge(r)==="[object Number]"&&(!j||!(typeof r=="object"&&j in r))}function cb(r){return ge(r)==="[object Boolean]"&&(!j||!(typeof r=="object"&&j in r))}function Ao(r){if(Ye)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Bn)return!1;try{return Bn.call(r),!0}catch{}return!1}function hb(r){if(!r||typeof r!="object"||!Rn)return!1;try{return Rn.call(r),!0}catch{}return!1}var pb=Object.prototype.hasOwnProperty||function(r){return r in this};function ve(r,e){return pb.call(r,e)}function ge(r){return eb.call(r)}function yb(r){if(r.name)return r.name;var e=tb.call(rb.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function So(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function db(r){if(!nt||!r||typeof r!="object")return!1;try{nt.call(r);try{it.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function vb(r){if(!lr||!r||typeof r!="object")return!1;try{lr.call(r,lr);try{cr.call(r,cr)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function gb(r){if(!ho||!r||typeof r!="object")return!1;try{return ho.call(r),!0}catch{}return!1}function _b(r){if(!it||!r||typeof r!="object")return!1;try{it.call(r);try{nt.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function mb(r){if(!cr||!r||typeof r!="object")return!1;try{cr.call(r,cr);try{lr.call(r,lr)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function bb(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function To(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return To(Fn.call(r,0,e.maxStringLength),e)+n}var i=de.call(de.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,wb);return Eo(i,"single",e)}function wb(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+nb.call(e.toString(16))}function hr(r){return"Object("+r+")"}function Dn(r){return r+" { ? }"}function Io(r,e,t,n){var i=n?Ln(t,n):Z.call(t,", ");return r+" ("+e+") {"+i+"}"}function $b(r){for(var e=0;e<r.length;e++)if(So(r[e],`
|
|
17
|
-
`)>=0)return!1;return!0}function
|
|
16
|
+
`)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function wn(r){return Array.isArray(r)}function et(r){return typeof r=="boolean"}function ar(r){return r===null}function io(r){return r==null}function $n(r){return typeof r=="number"}function or(r){return typeof r=="string"}function ao(r){return typeof r=="symbol"}function K(r){return r===void 0}function ur(r){return Ie(r)&&En(r)==="[object RegExp]"}function Ie(r){return typeof r=="object"&&r!==null}function rt(r){return Ie(r)&&En(r)==="[object Date]"}function fr(r){return Ie(r)&&(En(r)==="[object Error]"||r instanceof Error)}function sr(r){return typeof r=="function"}function oo(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}function uo(r){return y.isBuffer(r)}function En(r){return Object.prototype.toString.call(r)}function On(r){return r<10?"0"+r.toString(10):r.toString(10)}var jm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function km(){var r=new Date,e=[On(r.getHours()),On(r.getMinutes()),On(r.getSeconds())].join(":");return[r.getDate(),jm[r.getMonth()],e].join(" ")}function fo(){console.log("%s - %s",km(),Zr.apply(null,arguments))}function An(r,e){if(!e||!Ie(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function so(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var Vm={inherits:to,_extend:An,log:fo,isBuffer:uo,isPrimitive:oo,isFunction:sr,isError:fr,isDate:rt,isObject:Ie,isRegExp:ur,isUndefined:K,isSymbol:ao,isString:or,isNumber:$n,isNullOrUndefined:io,isNull:ar,isBoolean:et,isArray:wn,inspect:Y,deprecate:gn,format:Zr,debuglog:no},qm=Object.freeze({__proto__:null,format:Zr,deprecate:gn,debuglog:no,inspect:Y,isArray:wn,isBoolean:et,isNull:ar,isNullOrUndefined:io,isNumber:$n,isString:or,isSymbol:ao,isUndefined:K,isRegExp:ur,isObject:Ie,isDate:rt,isError:fr,isFunction:sr,isPrimitive:oo,isBuffer:uo,log:fo,inherits:to,_extend:An,default:Vm}),Gm=_f(qm),Hm=Gm.inspect,Sn=typeof Map=="function"&&Map.prototype,In=Object.getOwnPropertyDescriptor&&Sn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,tt=Sn&&In&&typeof In.get=="function"?In.get:null,Wm=Sn&&Map.prototype.forEach,Tn=typeof Set=="function"&&Set.prototype,xn=Object.getOwnPropertyDescriptor&&Tn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,nt=Tn&&xn&&typeof xn.get=="function"?xn.get:null,Xm=Tn&&Set.prototype.forEach,zm=typeof WeakMap=="function"&&WeakMap.prototype,lr=zm?WeakMap.prototype.has:null,Ym=typeof WeakSet=="function"&&WeakSet.prototype,cr=Ym?WeakSet.prototype.has:null,Km=typeof WeakRef=="function"&&WeakRef.prototype,lo=Km?WeakRef.prototype.deref:null,Zm=Boolean.prototype.valueOf,Jm=Object.prototype.toString,Qm=Function.prototype.toString,eb=String.prototype.match,Pn=String.prototype.slice,de=String.prototype.replace,rb=String.prototype.toUpperCase,co=String.prototype.toLowerCase,ho=RegExp.prototype.test,po=Array.prototype.concat,Z=Array.prototype.join,tb=Array.prototype.slice,yo=Math.floor,Fn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Rn=Object.getOwnPropertySymbols,Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ze=typeof Symbol=="function"&&typeof Symbol.iterator=="object",j=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ze?"object":"symbol")?Symbol.toStringTag:null,vo=Object.prototype.propertyIsEnumerable,go=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function _o(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||ho.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-yo(-r):yo(r);if(n!==r){var i=String(n),a=Pn.call(e,i.length+1);return de.call(i,t,"$&_")+"."+de.call(de.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return de.call(e,t,"$&_")}var Bn=Hm,mo=Bn.custom,bo=Eo(mo)?mo:null,nb=function r(e,t,n,i){var a=t||{};if(ve(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ve(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=ve(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ve(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ve(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Ao(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var s=String(e);return f?_o(e,s):s}if(typeof e=="bigint"){var l=String(e)+"n";return f?_o(e,l):l}var c=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof e=="object")return Un(e)?"[Array]":"[Object]";var u=wb(a,n);if(typeof i>"u")i=[];else if(Oo(i,e)>=0)return"[Circular]";function h(re,_e,se){if(_e&&(i=tb.call(i),i.push(_e)),se){var Tr={depth:a.depth};return ve(a,"quoteStyle")&&(Tr.quoteStyle=a.quoteStyle),r(re,Tr,n+1,i)}return r(re,a,n+1,i)}if(typeof e=="function"&&!$o(e)){var d=hb(e),_=it(e,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(_.length>0?" { "+Z.call(_,", ")+" }":"")}if(Eo(e)){var E=ze?de.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Mn.call(e);return typeof e=="object"&&!ze?hr(E):E}if(_b(e)){for(var $="<"+co.call(String(e.nodeName)),b=e.attributes||[],S=0;S<b.length;S++)$+=" "+b[S].name+"="+wo(ib(b[S].value),"double",a);return $+=">",e.childNodes&&e.childNodes.length&&($+="..."),$+="</"+co.call(String(e.nodeName))+">",$}if(Un(e)){if(e.length===0)return"[]";var p=it(e,h);return u&&!bb(p)?"["+Dn(p,u)+"]":"[ "+Z.call(p,", ")+" ]"}if(ob(e)){var A=it(e,h);return!("cause"in Error.prototype)&&"cause"in e&&!vo.call(e,"cause")?"{ ["+String(e)+"] "+Z.call(po.call("[cause]: "+h(e.cause),A),", ")+" }":A.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Z.call(A,", ")+" }"}if(typeof e=="object"&&o){if(bo&&typeof e[bo]=="function"&&Bn)return Bn(e,{depth:c-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(pb(e)){var T=[];return Wm.call(e,function(re,_e){T.push(h(_e,e,!0)+" => "+h(re,e))}),So("Map",tt.call(e),T,u)}if(vb(e)){var F=[];return Xm.call(e,function(re){F.push(h(re,e))}),So("Set",nt.call(e),F,u)}if(yb(e))return Nn("WeakMap");if(gb(e))return Nn("WeakSet");if(db(e))return Nn("WeakRef");if(fb(e))return hr(h(Number(e)));if(lb(e))return hr(h(Fn.call(e)));if(sb(e))return hr(Zm.call(e));if(ub(e))return hr(h(String(e)));if(!ab(e)&&!$o(e)){var m=it(e,h),v=go?go(e)===Object.prototype:e instanceof Object||e.constructor===Object,g=e instanceof Object?"":"null prototype",w=!v&&j&&Object(e)===e&&j in e?Pn.call(ge(e),8,-1):g?"Object":"",O=v||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",L=O+(w||g?"["+Z.call(po.call([],w||[],g||[]),": ")+"] ":"");return m.length===0?L+"{}":u?L+"{"+Dn(m,u)+"}":L+"{ "+Z.call(m,", ")+" }"}return String(e)};function wo(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function ib(r){return de.call(String(r),/"/g,""")}function Un(r){return ge(r)==="[object Array]"&&(!j||!(typeof r=="object"&&j in r))}function ab(r){return ge(r)==="[object Date]"&&(!j||!(typeof r=="object"&&j in r))}function $o(r){return ge(r)==="[object RegExp]"&&(!j||!(typeof r=="object"&&j in r))}function ob(r){return ge(r)==="[object Error]"&&(!j||!(typeof r=="object"&&j in r))}function ub(r){return ge(r)==="[object String]"&&(!j||!(typeof r=="object"&&j in r))}function fb(r){return ge(r)==="[object Number]"&&(!j||!(typeof r=="object"&&j in r))}function sb(r){return ge(r)==="[object Boolean]"&&(!j||!(typeof r=="object"&&j in r))}function Eo(r){if(ze)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Mn)return!1;try{return Mn.call(r),!0}catch{}return!1}function lb(r){if(!r||typeof r!="object"||!Fn)return!1;try{return Fn.call(r),!0}catch{}return!1}var cb=Object.prototype.hasOwnProperty||function(r){return r in this};function ve(r,e){return cb.call(r,e)}function ge(r){return Jm.call(r)}function hb(r){if(r.name)return r.name;var e=eb.call(Qm.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function Oo(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function pb(r){if(!tt||!r||typeof r!="object")return!1;try{tt.call(r);try{nt.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function yb(r){if(!lr||!r||typeof r!="object")return!1;try{lr.call(r,lr);try{cr.call(r,cr)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function db(r){if(!lo||!r||typeof r!="object")return!1;try{return lo.call(r),!0}catch{}return!1}function vb(r){if(!nt||!r||typeof r!="object")return!1;try{nt.call(r);try{tt.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function gb(r){if(!cr||!r||typeof r!="object")return!1;try{cr.call(r,cr);try{lr.call(r,lr)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function _b(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function Ao(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Ao(Pn.call(r,0,e.maxStringLength),e)+n}var i=de.call(de.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,mb);return wo(i,"single",e)}function mb(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+rb.call(e.toString(16))}function hr(r){return"Object("+r+")"}function Nn(r){return r+" { ? }"}function So(r,e,t,n){var i=n?Dn(t,n):Z.call(t,", ");return r+" ("+e+") {"+i+"}"}function bb(r){for(var e=0;e<r.length;e++)if(Oo(r[e],`
|
|
17
|
+
`)>=0)return!1;return!0}function wb(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Z.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Z.call(Array(e+1),t)}}function Dn(r,e){if(r.length===0)return"";var t=`
|
|
18
18
|
`+e.prev+e.base;return t+Z.call(r,","+t)+`
|
|
19
|
-
`+e.prev}function at(r,e){var t=Nn(r),n=[];if(t){n.length=r.length;for(var i=0;i<r.length;i++)n[i]=ve(r,i)?e(r[i],r):""}var a=typeof Mn=="function"?Mn(r):[],o;if(Ye){o={};for(var f=0;f<a.length;f++)o["$"+a[f]]=a[f]}for(var s in r)!ve(r,s)||t&&String(Number(s))===s&&s<r.length||Ye&&o["$"+s]instanceof Symbol||(yo.call(/[^\w$]/,s)?n.push(e(s,r)+": "+e(r[s],r)):n.push(s+": "+e(r[s],r)));if(typeof Mn=="function")for(var l=0;l<a.length;l++)_o.call(r,a[l])&&n.push("["+e(a[l])+"]: "+e(r[a[l]],r));return n}var Cn=hn,Ke=P0,Ob=ab,Ab=Cn("%TypeError%"),ot=Cn("%WeakMap%",!0),ut=Cn("%Map%",!0),Sb=Ke("WeakMap.prototype.get",!0),Tb=Ke("WeakMap.prototype.set",!0),Ib=Ke("WeakMap.prototype.has",!0),xb=Ke("Map.prototype.get",!0),Pb=Ke("Map.prototype.set",!0),Fb=Ke("Map.prototype.has",!0),jn=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},Rb=function(r,e){var t=jn(r,e);return t&&t.value},Mb=function(r,e,t){var n=jn(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Bb=function(r,e){return!!jn(r,e)},Ub=function(){var e,t,n,i={assert:function(a){if(!i.has(a))throw new Ab("Side channel does not contain "+Ob(a))},get:function(a){if(ot&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Sb(e,a)}else if(ut){if(t)return xb(t,a)}else if(n)return Rb(n,a)},has:function(a){if(ot&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Ib(e,a)}else if(ut){if(t)return Fb(t,a)}else if(n)return Bb(n,a);return!1},set:function(a,o){ot&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new ot),Tb(e,a,o)):ut?(t||(t=new ut),Pb(t,a,o)):(n||(n={key:{},next:null}),Mb(n,a,o))}};return i},Nb=String.prototype.replace,Db=/%20/g,kn={RFC1738:"RFC1738",RFC3986:"RFC3986"},Vn={default:kn.RFC3986,formatters:{RFC1738:function(r){return Nb.call(r,Db,"+")},RFC3986:function(r){return String(r)}},RFC1738:kn.RFC1738,RFC3986:kn.RFC3986},Lb=Vn,qn=Object.prototype.hasOwnProperty,Ie=Array.isArray,J=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),Cb=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Ie(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);t.obj[t.prop]=i}}},xo=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},jb=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Ie(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!qn.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var i=e;return Ie(e)&&!Ie(t)&&(i=xo(e,n)),Ie(e)&&Ie(t)?(t.forEach(function(a,o){if(qn.call(e,o)){var f=e[o];f&&typeof f=="object"&&a&&typeof a=="object"?e[o]=r(f,a,n):e.push(a)}else e[o]=a}),e):Object.keys(t).reduce(function(a,o){var f=t[o];return qn.call(a,o)?a[o]=r(a[o],f,n):a[o]=f,a},i)},kb=function(e,t){return Object.keys(t).reduce(function(n,i){return n[i]=t[i],n},e)},Vb=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},qb=function(e,t,n,i,a){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var f="",s=0;s<o.length;++s){var l=o.charCodeAt(s);if(l===45||l===46||l===95||l===126||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||a===Lb.RFC1738&&(l===40||l===41)){f+=o.charAt(s);continue}if(l<128){f=f+J[l];continue}if(l<2048){f=f+(J[192|l>>6]+J[128|l&63]);continue}if(l<55296||l>=57344){f=f+(J[224|l>>12]+J[128|l>>6&63]+J[128|l&63]);continue}s+=1,l=65536+((l&1023)<<10|o.charCodeAt(s)&1023),f+=J[240|l>>18]+J[128|l>>12&63]+J[128|l>>6&63]+J[128|l&63]}return f},Gb=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],f=Object.keys(o),s=0;s<f.length;++s){var l=f[s],h=o[l];typeof h=="object"&&h!==null&&n.indexOf(h)===-1&&(t.push({obj:o,prop:l}),n.push(h))}return Cb(t),e},Hb=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Wb=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Xb=function(e,t){return[].concat(e,t)},zb=function(e,t){if(Ie(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},Po={arrayToObject:xo,assign:kb,combine:Xb,compact:Gb,decode:Vb,encode:qb,isBuffer:Wb,isRegExp:Hb,maybeMap:zb,merge:jb},Fo=Ub,Gn=Po,pr=Vn,Yb=Object.prototype.hasOwnProperty,Ro={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},oe=Array.isArray,Kb=String.prototype.split,Zb=Array.prototype.push,Mo=function(r,e){Zb.apply(r,oe(e)?e:[e])},Jb=Date.prototype.toISOString,Bo=pr.default,D={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Gn.encode,encodeValuesOnly:!1,format:Bo,formatter:pr.formatters[Bo],indices:!1,serializeDate:function(e){return Jb.call(e)},skipNulls:!1,strictNullHandling:!1},Qb=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Hn={},ew=function r(e,t,n,i,a,o,f,s,l,h,u,c,d,_,E,$){for(var b=e,S=$,p=0,A=!1;(S=S.get(Hn))!==void 0&&!A;){var I=S.get(e);if(p+=1,typeof I<"u"){if(I===p)throw new RangeError("Cyclic object value");A=!0}typeof S.get(Hn)>"u"&&(p=0)}if(typeof s=="function"?b=s(t,b):b instanceof Date?b=u(b):n==="comma"&&oe(b)&&(b=Gn.maybeMap(b,function(si){return si instanceof Date?u(si):si})),b===null){if(a)return f&&!_?f(t,D.encoder,E,"key",c):t;b=""}if(Qb(b)||Gn.isBuffer(b)){if(f){var F=_?t:f(t,D.encoder,E,"key",c);if(n==="comma"&&_){for(var m=Kb.call(String(b),","),v="",g=0;g<m.length;++g)v+=(g===0?"":",")+d(f(m[g],D.encoder,E,"value",c));return[d(F)+(i&&oe(b)&&m.length===1?"[]":"")+"="+v]}return[d(F)+"="+d(f(b,D.encoder,E,"value",c))]}return[d(t)+"="+d(String(b))]}var w=[];if(typeof b>"u")return w;var O;if(n==="comma"&&oe(b))O=[{value:b.length>0?b.join(",")||null:void 0}];else if(oe(s))O=s;else{var L=Object.keys(b);O=l?L.sort(l):L}for(var re=i&&oe(b)&&b.length===1?t+"[]":t,_e=0;_e<O.length;++_e){var se=O[_e],xr=typeof se=="object"&&typeof se.value<"u"?se.value:b[se];if(!(o&&xr===null)){var YI=oe(b)?typeof n=="function"?n(re,se):re:re+(h?"."+se:"["+se+"]");$.set(e,p);var mf=Fo();mf.set(Hn,$),Mo(w,r(xr,YI,n,i,a,o,f,s,l,h,u,c,d,_,E,mf))}}return w},rw=function(e){if(!e)return D;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||D.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=pr.default;if(typeof e.format<"u"){if(!Yb.call(pr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=pr.formatters[n],a=D.filter;return(typeof e.filter=="function"||oe(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:D.addQueryPrefix,allowDots:typeof e.allowDots>"u"?D.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:D.charsetSentinel,delimiter:typeof e.delimiter>"u"?D.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:D.encode,encoder:typeof e.encoder=="function"?e.encoder:D.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:D.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:D.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:D.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:D.strictNullHandling}},tw=function(r,e){var t=r,n=rw(e),i,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):oe(n.filter)&&(a=n.filter,i=a);var o=[];if(typeof t!="object"||t===null)return"";var f;e&&e.arrayFormat in Ro?f=e.arrayFormat:e&&"indices"in e?f=e.indices?"indices":"repeat":f="indices";var s=Ro[f];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=s==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(t)),n.sort&&i.sort(n.sort);for(var h=Fo(),u=0;u<i.length;++u){var c=i[u];n.skipNulls&&t[c]===null||Mo(o,ew(t[c],c,s,l,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,h))}var d=o.join(n.delimiter),_=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),d.length>0?_+d:""},Ze=Po,Wn=Object.prototype.hasOwnProperty,nw=Array.isArray,U={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ze.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},iw=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Uo=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},aw="utf8=%26%2310003%3B",ow="utf8=%E2%9C%93",uw=function(e,t){var n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,a),f=-1,s,l=t.charset;if(t.charsetSentinel)for(s=0;s<o.length;++s)o[s].indexOf("utf8=")===0&&(o[s]===ow?l="utf-8":o[s]===aw&&(l="iso-8859-1"),f=s,s=o.length);for(s=0;s<o.length;++s)if(s!==f){var h=o[s],u=h.indexOf("]="),c=u===-1?h.indexOf("="):u+1,d,_;c===-1?(d=t.decoder(h,U.decoder,l,"key"),_=t.strictNullHandling?null:""):(d=t.decoder(h.slice(0,c),U.decoder,l,"key"),_=Ze.maybeMap(Uo(h.slice(c+1),t),function(E){return t.decoder(E,U.decoder,l,"value")})),_&&t.interpretNumericEntities&&l==="iso-8859-1"&&(_=iw(_)),h.indexOf("[]=")>-1&&(_=nw(_)?[_]:_),Wn.call(n,d)?n[d]=Ze.combine(n[d],_):n[d]=_}return n},fw=function(r,e,t,n){for(var i=n?e:Uo(e,t),a=r.length-1;a>=0;--a){var o,f=r[a];if(f==="[]"&&t.parseArrays)o=[].concat(i);else{o=t.plainObjects?Object.create(null):{};var s=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,l=parseInt(s,10);!t.parseArrays&&s===""?o={0:i}:!isNaN(l)&&f!==s&&String(l)===s&&l>=0&&t.parseArrays&&l<=t.arrayLimit?(o=[],o[l]=i):s!=="__proto__"&&(o[s]=i)}i=o}return i},sw=function(e,t,n,i){if(!!e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,f=/(\[[^[\]]*])/g,s=n.depth>0&&o.exec(a),l=s?a.slice(0,s.index):a,h=[];if(l){if(!n.plainObjects&&Wn.call(Object.prototype,l)&&!n.allowPrototypes)return;h.push(l)}for(var u=0;n.depth>0&&(s=f.exec(a))!==null&&u<n.depth;){if(u+=1,!n.plainObjects&&Wn.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;h.push(s[1])}return s&&h.push("["+a.slice(s.index)+"]"),fw(h,t,n,i)}},lw=function(e){if(!e)return U;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?U.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?U.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:U.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:U.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:U.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:U.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:U.comma,decoder:typeof e.decoder=="function"?e.decoder:U.decoder,delimiter:typeof e.delimiter=="string"||Ze.isRegExp(e.delimiter)?e.delimiter:U.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:U.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:U.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:U.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:U.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:U.strictNullHandling}},cw=function(r,e){var t=lw(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?uw(r,t):r,i=t.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o){var f=a[o],s=sw(f,n[f],t,typeof r=="string");i=Ze.merge(i,s,t)}return t.allowSparse===!0?i:Ze.compact(i)},hw=tw,pw=cw,yw=Vn,dw={formats:yw,parse:pw,stringify:hw},vw=fa;function gw(r,e,t){var n=r.length;return t=t===void 0?n:t,!e&&t>=n?r:vw(r,e,t)}var No=gw;function _w(r,e,t,n){for(var i=r.length,a=t+(n?1:-1);n?a--:++a<i;)if(e(r[a],a,r))return a;return-1}var mw=_w;function bw(r){return r!==r}var ww=bw;function $w(r,e,t){for(var n=t-1,i=r.length;++n<i;)if(r[n]===e)return n;return-1}var Ew=$w,Ow=mw,Aw=ww,Sw=Ew;function Tw(r,e,t){return e===e?Sw(r,e,t):Ow(r,Aw,t)}var Do=Tw,Iw=Do;function xw(r,e){for(var t=-1,n=r.length;++t<n&&Iw(e,r[t],0)>-1;);return t}var Pw=xw;function Fw(r){return r.split("")}var Rw=Fw,Mw="\\ud800-\\udfff",Bw="\\u0300-\\u036f",Uw="\\ufe20-\\ufe2f",Nw="\\u20d0-\\u20ff",Dw=Bw+Uw+Nw,Lw="\\ufe0e\\ufe0f",Cw="\\u200d",jw=RegExp("["+Cw+Mw+Dw+Lw+"]");function kw(r){return jw.test(r)}var Vw=kw,Lo="\\ud800-\\udfff",qw="\\u0300-\\u036f",Gw="\\ufe20-\\ufe2f",Hw="\\u20d0-\\u20ff",Ww=qw+Gw+Hw,Xw="\\ufe0e\\ufe0f",zw="["+Lo+"]",Xn="["+Ww+"]",zn="\\ud83c[\\udffb-\\udfff]",Yw="(?:"+Xn+"|"+zn+")",Co="[^"+Lo+"]",jo="(?:\\ud83c[\\udde6-\\uddff]){2}",ko="[\\ud800-\\udbff][\\udc00-\\udfff]",Kw="\\u200d",Vo=Yw+"?",qo="["+Xw+"]?",Zw="(?:"+Kw+"(?:"+[Co,jo,ko].join("|")+")"+qo+Vo+")*",Jw=qo+Vo+Zw,Qw="(?:"+[Co+Xn+"?",Xn,jo,ko,zw].join("|")+")",e1=RegExp(zn+"(?="+zn+")|"+Qw+Jw,"g");function r1(r){return r.match(e1)||[]}var t1=r1,n1=Rw,i1=Vw,a1=t1;function o1(r){return i1(r)?a1(r):n1(r)}var Go=o1,u1=rn,f1=No,s1=Pw,Ho=Go,l1=tn,c1=/^\s+/;function h1(r,e,t){if(r=l1(r),r&&(t||e===void 0))return r.replace(c1,"");if(!r||!(e=u1(e)))return r;var n=Ho(r),i=s1(n,Ho(e));return f1(n,i).join("")}var p1=h1,y1=Do;function d1(r,e){for(var t=r.length;t--&&y1(e,r[t],0)>-1;);return t}var v1=d1,g1=/\s/;function _1(r){for(var e=r.length;e--&&g1.test(r.charAt(e)););return e}var Wo=_1,m1=rn,b1=No,w1=v1,Xo=Go,$1=tn,E1=Wo;function O1(r,e,t){if(r=$1(r),r&&(t||e===void 0))return r.slice(0,E1(r)+1);if(!r||!(e=m1(e)))return r;var n=Xo(r),i=w1(n,Xo(e))+1;return b1(n,0,i).join("")}var A1=O1,S1=Object.defineProperty,zo=Object.getOwnPropertySymbols,T1=Object.prototype.hasOwnProperty,I1=Object.prototype.propertyIsEnumerable,Yo=(r,e,t)=>e in r?S1(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,x1=(r,e)=>{for(var t in e||(e={}))T1.call(e,t)&&Yo(r,t,e[t]);if(zo)for(var t of zo(e))I1.call(e,t)&&Yo(r,t,e[t]);return r},P1=(r,e,t)=>new Promise((n,i)=>{var a=s=>{try{f(t.next(s))}catch(l){i(l)}},o=s=>{try{f(t.throw(s))}catch(l){i(l)}},f=s=>s.done?n(s.value):Promise.resolve(s.value).then(a,o);f((t=t.apply(r,e)).next())});function F1(r){return dw.stringify(r,{encode:!1,indices:!1,arrayFormat:"comma"})}function Q(r,e){return P1(this,arguments,function*(t,n,{id:i,query:a,data:o,headers:f}={}){let s=n;i&&(s=[A1(n),p1(i)].join("/"));let l;if(t==="get"){let d;[s,d]=s.split("?");const _=[d,F1(a)].join("&").replace(/^&/,"");s=`${s}${_?`?${_}`:""}`}else l=JSON.stringify(o);const h=x1({Accept:"application/json"},f||{}),u=yield fetch(s,{method:t,headers:h,body:l,mode:"cors"}),c=yield u.json();if(!u.ok)throw c&&c.error?new Error(`${u.status}: ${c.error}`):new Error("A connection error occurred while making the request");return c})}let Ko={storeIdentifier:"",environment:"prod"};function R1(r){Ko=r}function yr(){return Ko}var xe=(r,e,t)=>new Promise((n,i)=>{var a=s=>{try{f(t.next(s))}catch(l){i(l)}},o=s=>{try{f(t.throw(s))}catch(l){i(l)}},f=s=>s.done?n(s.value):Promise.resolve(s.value).then(a,o);f((t=t.apply(r,e)).next())});const ft="2020-12",M1={store_currency:{currency_code:"USD",currency_symbol:"$",decimal_separator:".",thousands_separator:",",currency_symbol_location:"left"}},dr=new Map;function st(r,e){return dr.has(r)||dr.set(r,e()),dr.get(r)}const Yn=r=>xe(void 0,null,function*(){const e=yr(),{product:t}=yield st(`product.${r}`,()=>Q("get",`${le(e.environment)}/store/${e.storeIdentifier}/product/${ft}/${r}.json`));return Oa(t)}),Zo=()=>xe(void 0,null,function*(){const r=yr();return yield st("storeSettings",()=>Q("get",`${le(r.environment)}/store/${r.storeIdentifier}/${ft}/store_settings.json`).catch(()=>M1))}),Jo=()=>xe(void 0,null,function*(){const r=yr(),{widget_settings:e}=yield st("widgetSettings",()=>Q("get",`${le(r.environment)}/store/${r.storeIdentifier}/${ft}/widget_settings.json`));return Ea(e)}),Qo=()=>xe(void 0,null,function*(){const r=yr(),{products:e,widget_settings:t,store_settings:n,meta:i}=yield st("productsAndSettings",()=>Q("get",`${le(r.environment)}/store/${r.storeIdentifier}/product/${ft}/products.json`));return i?.status==="error"?Promise.reject(i.message):{products:Z_(e),widget_settings:Ea(t),store_settings:n}}),B1=()=>xe(void 0,null,function*(){const{products:r}=yield Qo();return r}),U1=r=>xe(void 0,null,function*(){const[e,t,n]=yield Promise.all([Yn(r),Zo(),Jo()]);return{product:e,store_settings:t,widget_settings:n,storeSettings:t,widgetSettings:n}}),eu=r=>xe(void 0,null,function*(){const{bundle_product:e}=yield Yn(r);return e}),ru=()=>Array.from(dr.keys()).forEach(r=>dr.delete(r));var N1=Object.freeze({__proto__:null,getProduct:Yn,getStoreSettings:Zo,getWidgetSettings:Jo,getProductsAndSettings:Qo,getProducts:B1,getProductAndSettings:U1,getBundleSettings:eu,resetCache:ru}),ue={},lt={},tu={},Kn={},fe={},D1=ne,L1=G,C1="[object Number]";function j1(r){return typeof r=="number"||L1(r)&&D1(r)==C1}var ct=j1,R={},nu={exports:{}},k1=kr,V1=ya,q1=va;function G1(r,e){return q1(V1(r,e,k1),r+"")}var H1=G1,W1=Fr,X1=rr,z1=Ct,Y1=ce;function K1(r,e,t){if(!Y1(t))return!1;var n=typeof e;return(n=="number"?X1(t)&&z1(e,t.length):n=="string"&&e in t)?W1(t[e],r):!1}var iu=K1,Z1=H1,J1=iu;function Q1(r){return Z1(function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=r.length>3&&typeof a=="function"?(i--,a):void 0,o&&J1(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var f=t[n];f&&r(e,f,n,a)}return e})}var e$=Q1,r$=Le,t$=e$,n$=Nr,i$=t$(function(r,e){r$(e,n$(e),r)}),a$=i$;(function(r){r.exports=a$})(nu);var ht={},Pe={};function o$(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(!e(r[t],t,r))return!1;return!0}var u$=o$;function f$(r){return function(e,t,n){for(var i=-1,a=Object(e),o=n(e),f=o.length;f--;){var s=o[r?f:++i];if(t(a[s],s,a)===!1)break}return e}}var s$=f$,l$=s$,c$=l$(),h$=c$,p$=h$,y$=Ce;function d$(r,e){return r&&p$(r,e,y$)}var v$=d$,g$=rr;function _$(r,e){return function(t,n){if(t==null)return t;if(!g$(t))return r(t,n);for(var i=t.length,a=e?i:-1,o=Object(t);(e?a--:++a<i)&&n(o[a],a,o)!==!1;);return t}}var m$=_$,b$=v$,w$=m$,$$=w$(b$),Zn=$$,E$=Zn;function O$(r,e){var t=!0;return E$(r,function(n,i,a){return t=!!e(n,i,a),t}),t}var A$=O$,S$="__lodash_hash_undefined__";function T$(r){return this.__data__.set(r,S$),this}var I$=T$;function x$(r){return this.__data__.has(r)}var P$=x$,F$=Nt,R$=I$,M$=P$;function pt(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new F$;++e<t;)this.add(r[e])}pt.prototype.add=pt.prototype.push=R$,pt.prototype.has=M$;var B$=pt;function U$(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}var N$=U$;function D$(r,e){return r.has(e)}var L$=D$,C$=B$,j$=N$,k$=L$,V$=1,q$=2;function G$(r,e,t,n,i,a){var o=t&V$,f=r.length,s=e.length;if(f!=s&&!(o&&s>f))return!1;var l=a.get(r),h=a.get(e);if(l&&h)return l==e&&h==r;var u=-1,c=!0,d=t&q$?new C$:void 0;for(a.set(r,e),a.set(e,r);++u<f;){var _=r[u],E=e[u];if(n)var $=o?n(E,_,u,e,r,a):n(_,E,u,r,e,a);if($!==void 0){if($)continue;c=!1;break}if(d){if(!j$(e,function(b,S){if(!k$(d,S)&&(_===b||i(_,b,t,n,a)))return d.push(S)})){c=!1;break}}else if(!(_===E||i(_,E,t,n,a))){c=!1;break}}return a.delete(r),a.delete(e),c}var au=G$;function H$(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}var W$=H$;function X$(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var z$=X$,ou=Be,uu=Gi,Y$=Fr,K$=au,Z$=W$,J$=z$,Q$=1,eE=2,rE="[object Boolean]",tE="[object Date]",nE="[object Error]",iE="[object Map]",aE="[object Number]",oE="[object RegExp]",uE="[object Set]",fE="[object String]",sE="[object Symbol]",lE="[object ArrayBuffer]",cE="[object DataView]",fu=ou?ou.prototype:void 0,Jn=fu?fu.valueOf:void 0;function hE(r,e,t,n,i,a,o){switch(t){case cE:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case lE:return!(r.byteLength!=e.byteLength||!a(new uu(r),new uu(e)));case rE:case tE:case aE:return Y$(+r,+e);case nE:return r.name==e.name&&r.message==e.message;case oE:case fE:return r==e+"";case iE:var f=Z$;case uE:var s=n&Q$;if(f||(f=J$),r.size!=e.size&&!s)return!1;var l=o.get(r);if(l)return l==e;n|=eE,o.set(r,e);var h=K$(f(r),f(e),n,i,a,o);return o.delete(r),h;case sE:if(Jn)return Jn.call(r)==Jn.call(e)}return!1}var pE=hE,su=Ni,yE=1,dE=Object.prototype,vE=dE.hasOwnProperty;function gE(r,e,t,n,i,a){var o=t&yE,f=su(r),s=f.length,l=su(e),h=l.length;if(s!=h&&!o)return!1;for(var u=s;u--;){var c=f[u];if(!(o?c in e:vE.call(e,c)))return!1}var d=a.get(r),_=a.get(e);if(d&&_)return d==e&&_==r;var E=!0;a.set(r,e),a.set(e,r);for(var $=o;++u<s;){c=f[u];var b=r[c],S=e[c];if(n)var p=o?n(S,b,c,e,r,a):n(b,S,c,r,e,a);if(!(p===void 0?b===S||i(b,S,t,n,a):p)){E=!1;break}$||($=c=="constructor")}if(E&&!$){var A=r.constructor,I=e.constructor;A!=I&&"constructor"in r&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof I=="function"&&I instanceof I)&&(E=!1)}return a.delete(r),a.delete(e),E}var _E=gE,Qn=Dt,mE=au,bE=pE,wE=_E,lu=Dr,cu=N,hu=Qe.exports,$E=xi,EE=1,pu="[object Arguments]",yu="[object Array]",yt="[object Object]",OE=Object.prototype,du=OE.hasOwnProperty;function AE(r,e,t,n,i,a){var o=cu(r),f=cu(e),s=o?yu:lu(r),l=f?yu:lu(e);s=s==pu?yt:s,l=l==pu?yt:l;var h=s==yt,u=l==yt,c=s==l;if(c&&hu(r)){if(!hu(e))return!1;o=!0,h=!1}if(c&&!h)return a||(a=new Qn),o||$E(r)?mE(r,e,t,n,i,a):bE(r,e,s,t,n,i,a);if(!(t&EE)){var d=h&&du.call(r,"__wrapped__"),_=u&&du.call(e,"__wrapped__");if(d||_){var E=d?r.value():r,$=_?e.value():e;return a||(a=new Qn),i(E,$,t,n,a)}}return c?(a||(a=new Qn),wE(r,e,t,n,i,a)):!1}var SE=AE,TE=SE,vu=G;function gu(r,e,t,n,i){return r===e?!0:r==null||e==null||!vu(r)&&!vu(e)?r!==r&&e!==e:TE(r,e,t,n,gu,i)}var _u=gu,IE=Dt,xE=_u,PE=1,FE=2;function RE(r,e,t,n){var i=t.length,a=i,o=!n;if(r==null)return!a;for(r=Object(r);i--;){var f=t[i];if(o&&f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++i<a;){f=t[i];var s=f[0],l=r[s],h=f[1];if(o&&f[2]){if(l===void 0&&!(s in r))return!1}else{var u=new IE;if(n)var c=n(l,h,s,r,e,u);if(!(c===void 0?xE(h,l,PE|FE,n,u):c))return!1}}return!0}var ME=RE,BE=ce;function UE(r){return r===r&&!BE(r)}var mu=UE,NE=mu,DE=Ce;function LE(r){for(var e=DE(r),t=e.length;t--;){var n=e[t],i=r[n];e[t]=[n,i,NE(i)]}return e}var CE=LE;function jE(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var bu=jE,kE=ME,VE=CE,qE=bu;function GE(r){var e=VE(r);return e.length==1&&e[0][2]?qE(e[0][0],e[0][1]):function(t){return t===r||kE(t,r,e)}}var HE=GE,WE=nn;function XE(r,e,t){var n=r==null?void 0:WE(r,e);return n===void 0?t:n}var zE=XE;function YE(r,e){return r!=null&&e in Object(r)}var KE=YE,ZE=jr,JE=Lt,QE=N,eO=Ct,rO=jt,tO=tr;function nO(r,e,t){e=ZE(e,r);for(var n=-1,i=e.length,a=!1;++n<i;){var o=tO(e[n]);if(!(a=r!=null&&t(r,o)))break;r=r[o]}return a||++n!=i?a:(i=r==null?0:r.length,!!i&&rO(i)&&eO(o,i)&&(QE(r)||JE(r)))}var iO=nO,aO=KE,oO=iO;function uO(r,e){return r!=null&&oO(r,e,aO)}var fO=uO,sO=_u,lO=zE,cO=fO,hO=Qt,pO=mu,yO=bu,dO=tr,vO=1,gO=2;function _O(r,e){return hO(r)&&pO(e)?yO(dO(r),e):function(t){var n=lO(t,r);return n===void 0&&n===e?cO(t,r):sO(e,n,vO|gO)}}var mO=_O;function bO(r){return function(e){return e?.[r]}}var wO=bO,$O=nn;function EO(r){return function(e){return $O(e,r)}}var OO=EO,AO=wO,SO=OO,TO=Qt,IO=tr;function xO(r){return TO(r)?AO(IO(r)):SO(r)}var PO=xO,FO=HE,RO=mO,MO=kr,BO=N,UO=PO;function NO(r){return typeof r=="function"?r:r==null?MO:typeof r=="object"?BO(r)?RO(r[0],r[1]):FO(r):UO(r)}var wu=NO,DO=u$,LO=A$,CO=wu,jO=N,kO=iu;function VO(r,e,t){var n=jO(r)?DO:LO;return t&&kO(r,e,t)&&(e=void 0),n(r,CO(e))}var ei=VO;Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.calculatePadding=WO,Pe.slicePadding=XO;var qO=ei,GO=HO(qO);function HO(r){return r&&r.__esModule?r:{default:r}}function WO(r){switch(r%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}}function XO(r,e){var t=r.slice(e),n=(0,GO.default)(t.buffer(),function(i){return i===0});if(n!==!0)throw new Error("XDR Read Error: invalid padding")}Object.defineProperty(ht,"__esModule",{value:!0}),ht.Cursor=void 0;var zO=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),YO=Pe;function KO(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var ri=function(){function r(e){KO(this,r),e instanceof y||(e=typeof e=="number"?y.alloc(e):y.from(e)),this._setBuffer(e),this.rewind()}return zO(r,[{key:"_setBuffer",value:function(t){this._buffer=t,this.length=t.length}},{key:"buffer",value:function(){return this._buffer}},{key:"tap",value:function(t){return t(this),this}},{key:"clone",value:function(t){var n=new this.constructor(this.buffer());return n.seek(arguments.length===0?this.tell():t),n}},{key:"tell",value:function(){return this._index}},{key:"seek",value:function(t,n){return arguments.length===1&&(n=t,t="="),t==="+"?this._index+=n:t==="-"?this._index-=n:this._index=n,this}},{key:"rewind",value:function(){return this.seek(0)}},{key:"eof",value:function(){return this.tell()===this.buffer().length}},{key:"write",value:function(t,n,i){return this.seek("+",this.buffer().write(t,this.tell(),n,i))}},{key:"fill",value:function(t,n){return arguments.length===1&&(n=this.buffer().length-this.tell()),this.buffer().fill(t,this.tell(),this.tell()+n),this.seek("+",n),this}},{key:"slice",value:function(t){arguments.length===0&&(t=this.length-this.tell());var n=new this.constructor(this.buffer().slice(this.tell(),this.tell()+t));return this.seek("+",t),n}},{key:"copyFrom",value:function(t){var n=t instanceof y?t:t.buffer();return n.copy(this.buffer(),this.tell(),0,n.length),this.seek("+",n.length),this}},{key:"concat",value:function(t){t.forEach(function(i,a){i instanceof r&&(t[a]=i.buffer())}),t.unshift(this.buffer());var n=y.concat(t);return this._setBuffer(n),this}},{key:"toString",value:function(t,n){arguments.length===0?(t="utf8",n=this.buffer().length-this.tell()):arguments.length===1&&(n=this.buffer().length-this.tell());var i=this.buffer().toString(t,this.tell(),this.tell()+n);return this.seek("+",n),i}},{key:"writeBufferPadded",value:function(t){var n=(0,YO.calculatePadding)(t.length),i=y.alloc(n);return this.copyFrom(new r(t)).copyFrom(new r(i))}}]),r}();[[1,["readInt8","readUInt8"]],[2,["readInt16BE","readInt16LE","readUInt16BE","readUInt16LE"]],[4,["readInt32BE","readInt32LE","readUInt32BE","readUInt32LE","readFloatBE","readFloatLE"]],[8,["readDoubleBE","readDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){ri.prototype[e]=function(){var n=this.buffer()[e](this.tell());return this.seek("+",r[0]),n}})}),[[1,["writeInt8","writeUInt8"]],[2,["writeInt16BE","writeInt16LE","writeUInt16BE","writeUInt16LE"]],[4,["writeInt32BE","writeInt32LE","writeUInt32BE","writeUInt32LE","writeFloatBE","writeFloatLE"]],[8,["writeDoubleBE","writeDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){ri.prototype[e]=function(n){return this.buffer()[e](n,this.tell()),this.seek("+",r[0]),this}})}),ht.Cursor=ri,Object.defineProperty(R,"__esModule",{value:!0}),R.default=nA;var ZO=nu.exports,$u=Ou(ZO),JO=Mt,QO=Ou(JO),Eu=ht;function Ou(r){return r&&r.__esModule?r:{default:r}}var eA=Math.pow(2,16),rA={toXDR:function(e){var t=new Eu.Cursor(eA);this.write(e,t);var n=t.tell();return t.rewind(),t.slice(n).buffer()},fromXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw",n=void 0;switch(t){case"raw":n=e;break;case"hex":n=y.from(e,"hex");break;case"base64":n=y.from(e,"base64");break;default:throw new Error("Invalid format "+t+', must be "raw", "hex", "base64"')}var i=new Eu.Cursor(n),a=this.read(i);return a},validateXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw";try{return this.fromXDR(e,t),!0}catch{return!1}}},tA={toXDR:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"raw",t=this.constructor.toXDR(this);switch(e){case"raw":return t;case"hex":return t.toString("hex");case"base64":return t.toString("base64");default:throw new Error("Invalid format "+e+', must be "raw", "hex", "base64"')}}};function nA(r){(0,$u.default)(r,rA),(0,QO.default)(r)&&(0,$u.default)(r.prototype,tA)}Object.defineProperty(fe,"__esModule",{value:!0}),fe.Int=void 0;var iA=ct,Au=Su(iA),aA=R,oA=Su(aA);function Su(r){return r&&r.__esModule?r:{default:r}}var vr=fe.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,Au.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");t.writeInt32BE(e)},isValid:function(e){return!(0,Au.default)(e)||Math.floor(e)!==e?!1:e>=vr.MIN_VALUE&&e<=vr.MAX_VALUE}};vr.MAX_VALUE=Math.pow(2,31)-1,vr.MIN_VALUE=-Math.pow(2,31),(0,oA.default)(vr);var dt={};function uA(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ti={exports:{}};(function(r){/**
|
|
19
|
+
`+e.prev}function it(r,e){var t=Un(r),n=[];if(t){n.length=r.length;for(var i=0;i<r.length;i++)n[i]=ve(r,i)?e(r[i],r):""}var a=typeof Rn=="function"?Rn(r):[],o;if(ze){o={};for(var f=0;f<a.length;f++)o["$"+a[f]]=a[f]}for(var s in r)!ve(r,s)||t&&String(Number(s))===s&&s<r.length||ze&&o["$"+s]instanceof Symbol||(ho.call(/[^\w$]/,s)?n.push(e(s,r)+": "+e(r[s],r)):n.push(s+": "+e(r[s],r)));if(typeof Rn=="function")for(var l=0;l<a.length;l++)vo.call(r,a[l])&&n.push("["+e(a[l])+"]: "+e(r[a[l]],r));return n}var Ln=cn,Ye=T0,$b=nb,Eb=Ln("%TypeError%"),at=Ln("%WeakMap%",!0),ot=Ln("%Map%",!0),Ob=Ye("WeakMap.prototype.get",!0),Ab=Ye("WeakMap.prototype.set",!0),Sb=Ye("WeakMap.prototype.has",!0),Ib=Ye("Map.prototype.get",!0),Tb=Ye("Map.prototype.set",!0),xb=Ye("Map.prototype.has",!0),Cn=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},Pb=function(r,e){var t=Cn(r,e);return t&&t.value},Fb=function(r,e,t){var n=Cn(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Rb=function(r,e){return!!Cn(r,e)},Mb=function(){var e,t,n,i={assert:function(a){if(!i.has(a))throw new Eb("Side channel does not contain "+$b(a))},get:function(a){if(at&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Ob(e,a)}else if(ot){if(t)return Ib(t,a)}else if(n)return Pb(n,a)},has:function(a){if(at&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Sb(e,a)}else if(ot){if(t)return xb(t,a)}else if(n)return Rb(n,a);return!1},set:function(a,o){at&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new at),Ab(e,a,o)):ot?(t||(t=new ot),Tb(t,a,o)):(n||(n={key:{},next:null}),Fb(n,a,o))}};return i},Bb=String.prototype.replace,Ub=/%20/g,jn={RFC1738:"RFC1738",RFC3986:"RFC3986"},kn={default:jn.RFC3986,formatters:{RFC1738:function(r){return Bb.call(r,Ub,"+")},RFC3986:function(r){return String(r)}},RFC1738:jn.RFC1738,RFC3986:jn.RFC3986},Nb=kn,Vn=Object.prototype.hasOwnProperty,Te=Array.isArray,J=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),Db=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Te(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);t.obj[t.prop]=i}}},Io=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},Lb=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Te(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Vn.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var i=e;return Te(e)&&!Te(t)&&(i=Io(e,n)),Te(e)&&Te(t)?(t.forEach(function(a,o){if(Vn.call(e,o)){var f=e[o];f&&typeof f=="object"&&a&&typeof a=="object"?e[o]=r(f,a,n):e.push(a)}else e[o]=a}),e):Object.keys(t).reduce(function(a,o){var f=t[o];return Vn.call(a,o)?a[o]=r(a[o],f,n):a[o]=f,a},i)},Cb=function(e,t){return Object.keys(t).reduce(function(n,i){return n[i]=t[i],n},e)},jb=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},kb=function(e,t,n,i,a){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var f="",s=0;s<o.length;++s){var l=o.charCodeAt(s);if(l===45||l===46||l===95||l===126||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||a===Nb.RFC1738&&(l===40||l===41)){f+=o.charAt(s);continue}if(l<128){f=f+J[l];continue}if(l<2048){f=f+(J[192|l>>6]+J[128|l&63]);continue}if(l<55296||l>=57344){f=f+(J[224|l>>12]+J[128|l>>6&63]+J[128|l&63]);continue}s+=1,l=65536+((l&1023)<<10|o.charCodeAt(s)&1023),f+=J[240|l>>18]+J[128|l>>12&63]+J[128|l>>6&63]+J[128|l&63]}return f},Vb=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],f=Object.keys(o),s=0;s<f.length;++s){var l=f[s],c=o[l];typeof c=="object"&&c!==null&&n.indexOf(c)===-1&&(t.push({obj:o,prop:l}),n.push(c))}return Db(t),e},qb=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Gb=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Hb=function(e,t){return[].concat(e,t)},Wb=function(e,t){if(Te(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},To={arrayToObject:Io,assign:Cb,combine:Hb,compact:Vb,decode:jb,encode:kb,isBuffer:Gb,isRegExp:qb,maybeMap:Wb,merge:Lb},xo=Mb,qn=To,pr=kn,Xb=Object.prototype.hasOwnProperty,Po={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},oe=Array.isArray,zb=String.prototype.split,Yb=Array.prototype.push,Fo=function(r,e){Yb.apply(r,oe(e)?e:[e])},Kb=Date.prototype.toISOString,Ro=pr.default,D={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:qn.encode,encodeValuesOnly:!1,format:Ro,formatter:pr.formatters[Ro],indices:!1,serializeDate:function(e){return Kb.call(e)},skipNulls:!1,strictNullHandling:!1},Zb=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Gn={},Jb=function r(e,t,n,i,a,o,f,s,l,c,u,h,d,_,E,$){for(var b=e,S=$,p=0,A=!1;(S=S.get(Gn))!==void 0&&!A;){var T=S.get(e);if(p+=1,typeof T<"u"){if(T===p)throw new RangeError("Cyclic object value");A=!0}typeof S.get(Gn)>"u"&&(p=0)}if(typeof s=="function"?b=s(t,b):b instanceof Date?b=u(b):n==="comma"&&oe(b)&&(b=qn.maybeMap(b,function(ui){return ui instanceof Date?u(ui):ui})),b===null){if(a)return f&&!_?f(t,D.encoder,E,"key",h):t;b=""}if(Zb(b)||qn.isBuffer(b)){if(f){var F=_?t:f(t,D.encoder,E,"key",h);if(n==="comma"&&_){for(var m=zb.call(String(b),","),v="",g=0;g<m.length;++g)v+=(g===0?"":",")+d(f(m[g],D.encoder,E,"value",h));return[d(F)+(i&&oe(b)&&m.length===1?"[]":"")+"="+v]}return[d(F)+"="+d(f(b,D.encoder,E,"value",h))]}return[d(t)+"="+d(String(b))]}var w=[];if(typeof b>"u")return w;var O;if(n==="comma"&&oe(b))O=[{value:b.length>0?b.join(",")||null:void 0}];else if(oe(s))O=s;else{var L=Object.keys(b);O=l?L.sort(l):L}for(var re=i&&oe(b)&&b.length===1?t+"[]":t,_e=0;_e<O.length;++_e){var se=O[_e],Tr=typeof se=="object"&&typeof se.value<"u"?se.value:b[se];if(!(o&&Tr===null)){var WT=oe(b)?typeof n=="function"?n(re,se):re:re+(c?"."+se:"["+se+"]");$.set(e,p);var gf=xo();gf.set(Gn,$),Fo(w,r(Tr,WT,n,i,a,o,f,s,l,c,u,h,d,_,E,gf))}}return w},Qb=function(e){if(!e)return D;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||D.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=pr.default;if(typeof e.format<"u"){if(!Xb.call(pr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=pr.formatters[n],a=D.filter;return(typeof e.filter=="function"||oe(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:D.addQueryPrefix,allowDots:typeof e.allowDots>"u"?D.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:D.charsetSentinel,delimiter:typeof e.delimiter>"u"?D.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:D.encode,encoder:typeof e.encoder=="function"?e.encoder:D.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:D.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:D.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:D.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:D.strictNullHandling}},ew=function(r,e){var t=r,n=Qb(e),i,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):oe(n.filter)&&(a=n.filter,i=a);var o=[];if(typeof t!="object"||t===null)return"";var f;e&&e.arrayFormat in Po?f=e.arrayFormat:e&&"indices"in e?f=e.indices?"indices":"repeat":f="indices";var s=Po[f];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=s==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(t)),n.sort&&i.sort(n.sort);for(var c=xo(),u=0;u<i.length;++u){var h=i[u];n.skipNulls&&t[h]===null||Fo(o,Jb(t[h],h,s,l,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,c))}var d=o.join(n.delimiter),_=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),d.length>0?_+d:""},Ke=To,Hn=Object.prototype.hasOwnProperty,rw=Array.isArray,U={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ke.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},tw=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Mo=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},nw="utf8=%26%2310003%3B",iw="utf8=%E2%9C%93",aw=function(e,t){var n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,a),f=-1,s,l=t.charset;if(t.charsetSentinel)for(s=0;s<o.length;++s)o[s].indexOf("utf8=")===0&&(o[s]===iw?l="utf-8":o[s]===nw&&(l="iso-8859-1"),f=s,s=o.length);for(s=0;s<o.length;++s)if(s!==f){var c=o[s],u=c.indexOf("]="),h=u===-1?c.indexOf("="):u+1,d,_;h===-1?(d=t.decoder(c,U.decoder,l,"key"),_=t.strictNullHandling?null:""):(d=t.decoder(c.slice(0,h),U.decoder,l,"key"),_=Ke.maybeMap(Mo(c.slice(h+1),t),function(E){return t.decoder(E,U.decoder,l,"value")})),_&&t.interpretNumericEntities&&l==="iso-8859-1"&&(_=tw(_)),c.indexOf("[]=")>-1&&(_=rw(_)?[_]:_),Hn.call(n,d)?n[d]=Ke.combine(n[d],_):n[d]=_}return n},ow=function(r,e,t,n){for(var i=n?e:Mo(e,t),a=r.length-1;a>=0;--a){var o,f=r[a];if(f==="[]"&&t.parseArrays)o=[].concat(i);else{o=t.plainObjects?Object.create(null):{};var s=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,l=parseInt(s,10);!t.parseArrays&&s===""?o={0:i}:!isNaN(l)&&f!==s&&String(l)===s&&l>=0&&t.parseArrays&&l<=t.arrayLimit?(o=[],o[l]=i):s!=="__proto__"&&(o[s]=i)}i=o}return i},uw=function(e,t,n,i){if(!!e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,f=/(\[[^[\]]*])/g,s=n.depth>0&&o.exec(a),l=s?a.slice(0,s.index):a,c=[];if(l){if(!n.plainObjects&&Hn.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var u=0;n.depth>0&&(s=f.exec(a))!==null&&u<n.depth;){if(u+=1,!n.plainObjects&&Hn.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(s[1])}return s&&c.push("["+a.slice(s.index)+"]"),ow(c,t,n,i)}},fw=function(e){if(!e)return U;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?U.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?U.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:U.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:U.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:U.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:U.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:U.comma,decoder:typeof e.decoder=="function"?e.decoder:U.decoder,delimiter:typeof e.delimiter=="string"||Ke.isRegExp(e.delimiter)?e.delimiter:U.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:U.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:U.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:U.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:U.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:U.strictNullHandling}},sw=function(r,e){var t=fw(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?aw(r,t):r,i=t.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o){var f=a[o],s=uw(f,n[f],t,typeof r=="string");i=Ke.merge(i,s,t)}return t.allowSparse===!0?i:Ke.compact(i)},lw=ew,cw=sw,hw=kn,pw={formats:hw,parse:cw,stringify:lw},yw=oa;function dw(r,e,t){var n=r.length;return t=t===void 0?n:t,!e&&t>=n?r:yw(r,e,t)}var Bo=dw;function vw(r,e,t,n){for(var i=r.length,a=t+(n?1:-1);n?a--:++a<i;)if(e(r[a],a,r))return a;return-1}var gw=vw;function _w(r){return r!==r}var mw=_w;function bw(r,e,t){for(var n=t-1,i=r.length;++n<i;)if(r[n]===e)return n;return-1}var ww=bw,$w=gw,Ew=mw,Ow=ww;function Aw(r,e,t){return e===e?Ow(r,e,t):$w(r,Ew,t)}var Uo=Aw,Sw=Uo;function Iw(r,e){for(var t=-1,n=r.length;++t<n&&Sw(e,r[t],0)>-1;);return t}var Tw=Iw;function xw(r){return r.split("")}var Pw=xw,Fw="\\ud800-\\udfff",Rw="\\u0300-\\u036f",Mw="\\ufe20-\\ufe2f",Bw="\\u20d0-\\u20ff",Uw=Rw+Mw+Bw,Nw="\\ufe0e\\ufe0f",Dw="\\u200d",Lw=RegExp("["+Dw+Fw+Uw+Nw+"]");function Cw(r){return Lw.test(r)}var jw=Cw,No="\\ud800-\\udfff",kw="\\u0300-\\u036f",Vw="\\ufe20-\\ufe2f",qw="\\u20d0-\\u20ff",Gw=kw+Vw+qw,Hw="\\ufe0e\\ufe0f",Ww="["+No+"]",Wn="["+Gw+"]",Xn="\\ud83c[\\udffb-\\udfff]",Xw="(?:"+Wn+"|"+Xn+")",Do="[^"+No+"]",Lo="(?:\\ud83c[\\udde6-\\uddff]){2}",Co="[\\ud800-\\udbff][\\udc00-\\udfff]",zw="\\u200d",jo=Xw+"?",ko="["+Hw+"]?",Yw="(?:"+zw+"(?:"+[Do,Lo,Co].join("|")+")"+ko+jo+")*",Kw=ko+jo+Yw,Zw="(?:"+[Do+Wn+"?",Wn,Lo,Co,Ww].join("|")+")",Jw=RegExp(Xn+"(?="+Xn+")|"+Zw+Kw,"g");function Qw(r){return r.match(Jw)||[]}var e1=Qw,r1=Pw,t1=jw,n1=e1;function i1(r){return t1(r)?n1(r):r1(r)}var Vo=i1,a1=en,o1=Bo,u1=Tw,qo=Vo,f1=rn,s1=/^\s+/;function l1(r,e,t){if(r=f1(r),r&&(t||e===void 0))return r.replace(s1,"");if(!r||!(e=a1(e)))return r;var n=qo(r),i=u1(n,qo(e));return o1(n,i).join("")}var c1=l1,h1=Uo;function p1(r,e){for(var t=r.length;t--&&h1(e,r[t],0)>-1;);return t}var y1=p1,d1=/\s/;function v1(r){for(var e=r.length;e--&&d1.test(r.charAt(e)););return e}var Go=v1,g1=en,_1=Bo,m1=y1,Ho=Vo,b1=rn,w1=Go;function $1(r,e,t){if(r=b1(r),r&&(t||e===void 0))return r.slice(0,w1(r)+1);if(!r||!(e=g1(e)))return r;var n=Ho(r),i=m1(n,Ho(e))+1;return _1(n,0,i).join("")}var E1=$1,O1=Object.defineProperty,Wo=Object.getOwnPropertySymbols,A1=Object.prototype.hasOwnProperty,S1=Object.prototype.propertyIsEnumerable,Xo=(r,e,t)=>e in r?O1(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,I1=(r,e)=>{for(var t in e||(e={}))A1.call(e,t)&&Xo(r,t,e[t]);if(Wo)for(var t of Wo(e))S1.call(e,t)&&Xo(r,t,e[t]);return r};function T1(r){return pw.stringify(r,{encode:!1,indices:!1,arrayFormat:"comma"})}async function Q(r,e,{id:t,query:n,data:i,headers:a}={}){let o=e;t&&(o=[E1(e),c1(t)].join("/"));let f;if(r==="get"){let u;[o,u]=o.split("?");const h=[u,T1(n)].join("&").replace(/^&/,"");o=`${o}${h?`?${h}`:""}`}else f=JSON.stringify(i);const s=I1({Accept:"application/json"},a||{}),l=await fetch(o,{method:r,headers:s,body:f,mode:"cors"}),c=await l.json();if(!l.ok)throw c&&c.error?new Error(`${l.status}: ${c.error}`):new Error("A connection error occurred while making the request");return c}let zo={storeIdentifier:"",environment:"prod"};function x1(r){zo=r}function Ze(){return zo}const ut="2020-12",P1={store_currency:{currency_code:"USD",currency_symbol:"$",decimal_separator:".",thousands_separator:",",currency_symbol_location:"left"}},yr=new Map;function ft(r,e){return yr.has(r)||yr.set(r,e()),yr.get(r)}const zn=async r=>{const e=Ze(),{product:t}=await ft(`product.${r}`,()=>Q("get",`${le(e.environment)}/store/${e.storeIdentifier}/product/${ut}/${r}.json`));return $a(t)},Yo=async()=>{const r=Ze();return await ft("storeSettings",()=>Q("get",`${le(r.environment)}/store/${r.storeIdentifier}/${ut}/store_settings.json`).catch(()=>P1))},Ko=async()=>{const r=Ze(),{widget_settings:e}=await ft("widgetSettings",()=>Q("get",`${le(r.environment)}/store/${r.storeIdentifier}/${ut}/widget_settings.json`));return wa(e)},Zo=async()=>{const r=Ze(),{products:e,widget_settings:t,store_settings:n,meta:i}=await ft("productsAndSettings",()=>Q("get",`${le(r.environment)}/store/${r.storeIdentifier}/product/${ut}/products.json`));return i?.status==="error"?Promise.reject(i.message):{products:Y_(e),widget_settings:wa(t),store_settings:n}},F1=async()=>{const{products:r}=await Zo();return r},R1=async r=>{const[e,t,n]=await Promise.all([zn(r),Yo(),Ko()]);return{product:e,store_settings:t,widget_settings:n,storeSettings:t,widgetSettings:n}},Jo=async r=>{const{bundle_product:e}=await zn(r);return e},Qo=()=>Array.from(yr.keys()).forEach(r=>yr.delete(r));var M1=Object.freeze({__proto__:null,getProduct:zn,getStoreSettings:Yo,getWidgetSettings:Ko,getProductsAndSettings:Zo,getProducts:F1,getProductAndSettings:R1,getBundleSettings:Jo,resetCache:Qo}),ue={},st={},eu={},Yn={},fe={},B1=ne,U1=G,N1="[object Number]";function D1(r){return typeof r=="number"||U1(r)&&B1(r)==N1}var lt=D1,R={},ru={exports:{}},L1=jr,C1=ha,j1=ya;function k1(r,e){return j1(C1(r,e,L1),r+"")}var V1=k1,q1=Pr,G1=rr,H1=Lt,W1=ce;function X1(r,e,t){if(!W1(t))return!1;var n=typeof e;return(n=="number"?G1(t)&&H1(e,t.length):n=="string"&&e in t)?q1(t[e],r):!1}var tu=X1,z1=V1,Y1=tu;function K1(r){return z1(function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=r.length>3&&typeof a=="function"?(i--,a):void 0,o&&Y1(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var f=t[n];f&&r(e,f,n,a)}return e})}var Z1=K1,J1=De,Q1=Z1,e$=Ur,r$=Q1(function(r,e){J1(e,e$(e),r)}),t$=r$;(function(r){r.exports=t$})(ru);var ct={},xe={};function n$(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(!e(r[t],t,r))return!1;return!0}var i$=n$;function a$(r){return function(e,t,n){for(var i=-1,a=Object(e),o=n(e),f=o.length;f--;){var s=o[r?f:++i];if(t(a[s],s,a)===!1)break}return e}}var o$=a$,u$=o$,f$=u$(),s$=f$,l$=s$,c$=Le;function h$(r,e){return r&&l$(r,e,c$)}var p$=h$,y$=rr;function d$(r,e){return function(t,n){if(t==null)return t;if(!y$(t))return r(t,n);for(var i=t.length,a=e?i:-1,o=Object(t);(e?a--:++a<i)&&n(o[a],a,o)!==!1;);return t}}var v$=d$,g$=p$,_$=v$,m$=_$(g$),Kn=m$,b$=Kn;function w$(r,e){var t=!0;return b$(r,function(n,i,a){return t=!!e(n,i,a),t}),t}var $$=w$,E$="__lodash_hash_undefined__";function O$(r){return this.__data__.set(r,E$),this}var A$=O$;function S$(r){return this.__data__.has(r)}var I$=S$,T$=Ut,x$=A$,P$=I$;function ht(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new T$;++e<t;)this.add(r[e])}ht.prototype.add=ht.prototype.push=x$,ht.prototype.has=P$;var F$=ht;function R$(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}var M$=R$;function B$(r,e){return r.has(e)}var U$=B$,N$=F$,D$=M$,L$=U$,C$=1,j$=2;function k$(r,e,t,n,i,a){var o=t&C$,f=r.length,s=e.length;if(f!=s&&!(o&&s>f))return!1;var l=a.get(r),c=a.get(e);if(l&&c)return l==e&&c==r;var u=-1,h=!0,d=t&j$?new N$:void 0;for(a.set(r,e),a.set(e,r);++u<f;){var _=r[u],E=e[u];if(n)var $=o?n(E,_,u,e,r,a):n(_,E,u,r,e,a);if($!==void 0){if($)continue;h=!1;break}if(d){if(!D$(e,function(b,S){if(!L$(d,S)&&(_===b||i(_,b,t,n,a)))return d.push(S)})){h=!1;break}}else if(!(_===E||i(_,E,t,n,a))){h=!1;break}}return a.delete(r),a.delete(e),h}var nu=k$;function V$(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}var q$=V$;function G$(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var H$=G$,iu=Me,au=Vi,W$=Pr,X$=nu,z$=q$,Y$=H$,K$=1,Z$=2,J$="[object Boolean]",Q$="[object Date]",eE="[object Error]",rE="[object Map]",tE="[object Number]",nE="[object RegExp]",iE="[object Set]",aE="[object String]",oE="[object Symbol]",uE="[object ArrayBuffer]",fE="[object DataView]",ou=iu?iu.prototype:void 0,Zn=ou?ou.valueOf:void 0;function sE(r,e,t,n,i,a,o){switch(t){case fE:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case uE:return!(r.byteLength!=e.byteLength||!a(new au(r),new au(e)));case J$:case Q$:case tE:return W$(+r,+e);case eE:return r.name==e.name&&r.message==e.message;case nE:case aE:return r==e+"";case rE:var f=z$;case iE:var s=n&K$;if(f||(f=Y$),r.size!=e.size&&!s)return!1;var l=o.get(r);if(l)return l==e;n|=Z$,o.set(r,e);var c=X$(f(r),f(e),n,i,a,o);return o.delete(r),c;case oE:if(Zn)return Zn.call(r)==Zn.call(e)}return!1}var lE=sE,uu=Bi,cE=1,hE=Object.prototype,pE=hE.hasOwnProperty;function yE(r,e,t,n,i,a){var o=t&cE,f=uu(r),s=f.length,l=uu(e),c=l.length;if(s!=c&&!o)return!1;for(var u=s;u--;){var h=f[u];if(!(o?h in e:pE.call(e,h)))return!1}var d=a.get(r),_=a.get(e);if(d&&_)return d==e&&_==r;var E=!0;a.set(r,e),a.set(e,r);for(var $=o;++u<s;){h=f[u];var b=r[h],S=e[h];if(n)var p=o?n(S,b,h,e,r,a):n(b,S,h,r,e,a);if(!(p===void 0?b===S||i(b,S,t,n,a):p)){E=!1;break}$||($=h=="constructor")}if(E&&!$){var A=r.constructor,T=e.constructor;A!=T&&"constructor"in r&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof T=="function"&&T instanceof T)&&(E=!1)}return a.delete(r),a.delete(e),E}var dE=yE,Jn=Nt,vE=nu,gE=lE,_E=dE,fu=Nr,su=N,lu=Qe.exports,mE=Ii,bE=1,cu="[object Arguments]",hu="[object Array]",pt="[object Object]",wE=Object.prototype,pu=wE.hasOwnProperty;function $E(r,e,t,n,i,a){var o=su(r),f=su(e),s=o?hu:fu(r),l=f?hu:fu(e);s=s==cu?pt:s,l=l==cu?pt:l;var c=s==pt,u=l==pt,h=s==l;if(h&&lu(r)){if(!lu(e))return!1;o=!0,c=!1}if(h&&!c)return a||(a=new Jn),o||mE(r)?vE(r,e,t,n,i,a):gE(r,e,s,t,n,i,a);if(!(t&bE)){var d=c&&pu.call(r,"__wrapped__"),_=u&&pu.call(e,"__wrapped__");if(d||_){var E=d?r.value():r,$=_?e.value():e;return a||(a=new Jn),i(E,$,t,n,a)}}return h?(a||(a=new Jn),_E(r,e,t,n,i,a)):!1}var EE=$E,OE=EE,yu=G;function du(r,e,t,n,i){return r===e?!0:r==null||e==null||!yu(r)&&!yu(e)?r!==r&&e!==e:OE(r,e,t,n,du,i)}var vu=du,AE=Nt,SE=vu,IE=1,TE=2;function xE(r,e,t,n){var i=t.length,a=i,o=!n;if(r==null)return!a;for(r=Object(r);i--;){var f=t[i];if(o&&f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++i<a;){f=t[i];var s=f[0],l=r[s],c=f[1];if(o&&f[2]){if(l===void 0&&!(s in r))return!1}else{var u=new AE;if(n)var h=n(l,c,s,r,e,u);if(!(h===void 0?SE(c,l,IE|TE,n,u):h))return!1}}return!0}var PE=xE,FE=ce;function RE(r){return r===r&&!FE(r)}var gu=RE,ME=gu,BE=Le;function UE(r){for(var e=BE(r),t=e.length;t--;){var n=e[t],i=r[n];e[t]=[n,i,ME(i)]}return e}var NE=UE;function DE(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var _u=DE,LE=PE,CE=NE,jE=_u;function kE(r){var e=CE(r);return e.length==1&&e[0][2]?jE(e[0][0],e[0][1]):function(t){return t===r||LE(t,r,e)}}var VE=kE,qE=tn;function GE(r,e,t){var n=r==null?void 0:qE(r,e);return n===void 0?t:n}var HE=GE;function WE(r,e){return r!=null&&e in Object(r)}var XE=WE,zE=Cr,YE=Dt,KE=N,ZE=Lt,JE=Ct,QE=tr;function eO(r,e,t){e=zE(e,r);for(var n=-1,i=e.length,a=!1;++n<i;){var o=QE(e[n]);if(!(a=r!=null&&t(r,o)))break;r=r[o]}return a||++n!=i?a:(i=r==null?0:r.length,!!i&&JE(i)&&ZE(o,i)&&(KE(r)||YE(r)))}var rO=eO,tO=XE,nO=rO;function iO(r,e){return r!=null&&nO(r,e,tO)}var aO=iO,oO=vu,uO=HE,fO=aO,sO=Jt,lO=gu,cO=_u,hO=tr,pO=1,yO=2;function dO(r,e){return sO(r)&&lO(e)?cO(hO(r),e):function(t){var n=uO(t,r);return n===void 0&&n===e?fO(t,r):oO(e,n,pO|yO)}}var vO=dO;function gO(r){return function(e){return e?.[r]}}var _O=gO,mO=tn;function bO(r){return function(e){return mO(e,r)}}var wO=bO,$O=_O,EO=wO,OO=Jt,AO=tr;function SO(r){return OO(r)?$O(AO(r)):EO(r)}var IO=SO,TO=VE,xO=vO,PO=jr,FO=N,RO=IO;function MO(r){return typeof r=="function"?r:r==null?PO:typeof r=="object"?FO(r)?xO(r[0],r[1]):TO(r):RO(r)}var mu=MO,BO=i$,UO=$$,NO=mu,DO=N,LO=tu;function CO(r,e,t){var n=DO(r)?BO:UO;return t&&LO(r,e,t)&&(e=void 0),n(r,NO(e))}var Qn=CO;Object.defineProperty(xe,"__esModule",{value:!0}),xe.calculatePadding=qO,xe.slicePadding=GO;var jO=Qn,kO=VO(jO);function VO(r){return r&&r.__esModule?r:{default:r}}function qO(r){switch(r%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}}function GO(r,e){var t=r.slice(e),n=(0,kO.default)(t.buffer(),function(i){return i===0});if(n!==!0)throw new Error("XDR Read Error: invalid padding")}Object.defineProperty(ct,"__esModule",{value:!0}),ct.Cursor=void 0;var HO=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),WO=xe;function XO(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var ei=function(){function r(e){XO(this,r),e instanceof y||(e=typeof e=="number"?y.alloc(e):y.from(e)),this._setBuffer(e),this.rewind()}return HO(r,[{key:"_setBuffer",value:function(t){this._buffer=t,this.length=t.length}},{key:"buffer",value:function(){return this._buffer}},{key:"tap",value:function(t){return t(this),this}},{key:"clone",value:function(t){var n=new this.constructor(this.buffer());return n.seek(arguments.length===0?this.tell():t),n}},{key:"tell",value:function(){return this._index}},{key:"seek",value:function(t,n){return arguments.length===1&&(n=t,t="="),t==="+"?this._index+=n:t==="-"?this._index-=n:this._index=n,this}},{key:"rewind",value:function(){return this.seek(0)}},{key:"eof",value:function(){return this.tell()===this.buffer().length}},{key:"write",value:function(t,n,i){return this.seek("+",this.buffer().write(t,this.tell(),n,i))}},{key:"fill",value:function(t,n){return arguments.length===1&&(n=this.buffer().length-this.tell()),this.buffer().fill(t,this.tell(),this.tell()+n),this.seek("+",n),this}},{key:"slice",value:function(t){arguments.length===0&&(t=this.length-this.tell());var n=new this.constructor(this.buffer().slice(this.tell(),this.tell()+t));return this.seek("+",t),n}},{key:"copyFrom",value:function(t){var n=t instanceof y?t:t.buffer();return n.copy(this.buffer(),this.tell(),0,n.length),this.seek("+",n.length),this}},{key:"concat",value:function(t){t.forEach(function(i,a){i instanceof r&&(t[a]=i.buffer())}),t.unshift(this.buffer());var n=y.concat(t);return this._setBuffer(n),this}},{key:"toString",value:function(t,n){arguments.length===0?(t="utf8",n=this.buffer().length-this.tell()):arguments.length===1&&(n=this.buffer().length-this.tell());var i=this.buffer().toString(t,this.tell(),this.tell()+n);return this.seek("+",n),i}},{key:"writeBufferPadded",value:function(t){var n=(0,WO.calculatePadding)(t.length),i=y.alloc(n);return this.copyFrom(new r(t)).copyFrom(new r(i))}}]),r}();[[1,["readInt8","readUInt8"]],[2,["readInt16BE","readInt16LE","readUInt16BE","readUInt16LE"]],[4,["readInt32BE","readInt32LE","readUInt32BE","readUInt32LE","readFloatBE","readFloatLE"]],[8,["readDoubleBE","readDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){ei.prototype[e]=function(){var n=this.buffer()[e](this.tell());return this.seek("+",r[0]),n}})}),[[1,["writeInt8","writeUInt8"]],[2,["writeInt16BE","writeInt16LE","writeUInt16BE","writeUInt16LE"]],[4,["writeInt32BE","writeInt32LE","writeUInt32BE","writeUInt32LE","writeFloatBE","writeFloatLE"]],[8,["writeDoubleBE","writeDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){ei.prototype[e]=function(n){return this.buffer()[e](n,this.tell()),this.seek("+",r[0]),this}})}),ct.Cursor=ei,Object.defineProperty(R,"__esModule",{value:!0}),R.default=eA;var zO=ru.exports,bu=$u(zO),YO=Rt,KO=$u(YO),wu=ct;function $u(r){return r&&r.__esModule?r:{default:r}}var ZO=Math.pow(2,16),JO={toXDR:function(e){var t=new wu.Cursor(ZO);this.write(e,t);var n=t.tell();return t.rewind(),t.slice(n).buffer()},fromXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw",n=void 0;switch(t){case"raw":n=e;break;case"hex":n=y.from(e,"hex");break;case"base64":n=y.from(e,"base64");break;default:throw new Error("Invalid format "+t+', must be "raw", "hex", "base64"')}var i=new wu.Cursor(n),a=this.read(i);return a},validateXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw";try{return this.fromXDR(e,t),!0}catch{return!1}}},QO={toXDR:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"raw",t=this.constructor.toXDR(this);switch(e){case"raw":return t;case"hex":return t.toString("hex");case"base64":return t.toString("base64");default:throw new Error("Invalid format "+e+', must be "raw", "hex", "base64"')}}};function eA(r){(0,bu.default)(r,JO),(0,KO.default)(r)&&(0,bu.default)(r.prototype,QO)}Object.defineProperty(fe,"__esModule",{value:!0}),fe.Int=void 0;var rA=lt,Eu=Ou(rA),tA=R,nA=Ou(tA);function Ou(r){return r&&r.__esModule?r:{default:r}}var dr=fe.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,Eu.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");t.writeInt32BE(e)},isValid:function(e){return!(0,Eu.default)(e)||Math.floor(e)!==e?!1:e>=dr.MIN_VALUE&&e<=dr.MAX_VALUE}};dr.MAX_VALUE=Math.pow(2,31)-1,dr.MIN_VALUE=-Math.pow(2,31),(0,nA.default)(dr);var yt={};function iA(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ri={exports:{}};(function(r){/**
|
|
20
20
|
* @license Long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
|
|
21
21
|
* Released under the Apache License, Version 2.0
|
|
22
22
|
* see: https://github.com/dcodeIO/Long.js for details
|
|
23
|
-
*/(function(e,t){typeof uA=="function"&&!0&&r&&r.exports?r.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t()})(te,function(){function e(h,u,c){this.low=h|0,this.high=u|0,this.unsigned=!!c}e.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=function(u){return(u&&u.__isLong__)===!0};var t={},n={};e.fromInt=function(u,c){var d,_;return c?(u=u>>>0,0<=u&&u<256&&(_=n[u],_)?_:(d=new e(u,(u|0)<0?-1:0,!0),0<=u&&u<256&&(n[u]=d),d)):(u=u|0,-128<=u&&u<128&&(_=t[u],_)?_:(d=new e(u,u<0?-1:0,!1),-128<=u&&u<128&&(t[u]=d),d))},e.fromNumber=function(u,c){return c=!!c,isNaN(u)||!isFinite(u)?e.ZERO:!c&&u<=-s?e.MIN_VALUE:!c&&u+1>=s?e.MAX_VALUE:c&&u>=f?e.MAX_UNSIGNED_VALUE:u<0?e.fromNumber(-u,c).negate():new e(u%o|0,u/o|0,c)},e.fromBits=function(u,c,d){return new e(u,c,d)},e.fromString=function(u,c,d){if(u.length===0)throw Error("number format error: empty string");if(u==="NaN"||u==="Infinity"||u==="+Infinity"||u==="-Infinity")return e.ZERO;if(typeof c=="number"&&(d=c,c=!1),d=d||10,d<2||36<d)throw Error("radix out of range: "+d);var _;if((_=u.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+u);if(_===0)return e.fromString(u.substring(1),c,d).negate();for(var E=e.fromNumber(Math.pow(d,8)),$=e.ZERO,b=0;b<u.length;b+=8){var S=Math.min(8,u.length-b),p=parseInt(u.substring(b,b+S),d);if(S<8){var A=e.fromNumber(Math.pow(d,S));$=$.multiply(A).add(e.fromNumber(p))}else $=$.multiply(E),$=$.add(e.fromNumber(p))}return $.unsigned=c,$},e.fromValue=function(u){return u instanceof e?u:typeof u=="number"?e.fromNumber(u):typeof u=="string"?e.fromString(u):new e(u.low,u.high,u.unsigned)};var i=1<<16,a=1<<24,o=i*i,f=o*o,s=f/2,l=e.fromInt(a);return e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*o+(this.low>>>0):this.high*o+(this.low>>>0)},e.prototype.toString=function(u){if(u=u||10,u<2||36<u)throw RangeError("radix out of range: "+u);if(this.isZero())return"0";var c;if(this.isNegative())if(this.equals(e.MIN_VALUE)){var d=e.fromNumber(u),_=this.divide(d);return c=_.multiply(d).subtract(this),_.toString(u)+c.toInt().toString(u)}else return"-"+this.negate().toString(u);var E=e.fromNumber(Math.pow(u,6),this.unsigned);c=this;for(var $="";;){var b=c.divide(E),S=c.subtract(b.multiply(E)).toInt()>>>0,p=S.toString(u);if(c=b,c.isZero())return p+$;for(;p.length<6;)p="0"+p;$=""+p+$}},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var u=this.high!=0?this.high:this.low,c=31;c>0&&(u&1<<c)==0;c--);return this.high!=0?c+33:c+1},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.equals=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.unsigned!==u.unsigned&&this.high>>>31===1&&u.high>>>31===1?!1:this.high===u.high&&this.low===u.low},e.eq=e.prototype.equals,e.prototype.notEquals=function(u){return!this.equals(u)},e.neq=e.prototype.notEquals,e.prototype.lessThan=function(u){return this.compare(u)<0},e.prototype.lt=e.prototype.lessThan,e.prototype.lessThanOrEqual=function(u){return this.compare(u)<=0},e.prototype.lte=e.prototype.lessThanOrEqual,e.prototype.greaterThan=function(u){return this.compare(u)>0},e.prototype.gt=e.prototype.greaterThan,e.prototype.greaterThanOrEqual=function(u){return this.compare(u)>=0},e.prototype.gte=e.prototype.greaterThanOrEqual,e.prototype.compare=function(u){if(e.isLong(u)||(u=e.fromValue(u)),this.equals(u))return 0;var c=this.isNegative(),d=u.isNegative();return c&&!d?-1:!c&&d?1:this.unsigned?u.high>>>0>this.high>>>0||u.high===this.high&&u.low>>>0>this.low>>>0?-1:1:this.subtract(u).isNegative()?-1:1},e.prototype.negate=function(){return!this.unsigned&&this.equals(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=e.prototype.negate,e.prototype.add=function(u){e.isLong(u)||(u=e.fromValue(u));var c=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,p=u.low&65535,A=0,I=0,F=0,m=0;return m+=E+p,F+=m>>>16,m&=65535,F+=_+S,I+=F>>>16,F&=65535,I+=d+b,A+=I>>>16,I&=65535,A+=c+$,A&=65535,e.fromBits(F<<16|m,A<<16|I,this.unsigned)},e.prototype.subtract=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.add(u.negate())},e.prototype.sub=e.prototype.subtract,e.prototype.multiply=function(u){if(this.isZero()||(e.isLong(u)||(u=e.fromValue(u)),u.isZero()))return e.ZERO;if(this.equals(e.MIN_VALUE))return u.isOdd()?e.MIN_VALUE:e.ZERO;if(u.equals(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().multiply(u.negate()):this.negate().multiply(u).negate();if(u.isNegative())return this.multiply(u.negate()).negate();if(this.lessThan(l)&&u.lessThan(l))return e.fromNumber(this.toNumber()*u.toNumber(),this.unsigned);var c=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,p=u.low&65535,A=0,I=0,F=0,m=0;return m+=E*p,F+=m>>>16,m&=65535,F+=_*p,I+=F>>>16,F&=65535,F+=E*S,I+=F>>>16,F&=65535,I+=d*p,A+=I>>>16,I&=65535,I+=_*S,A+=I>>>16,I&=65535,I+=E*b,A+=I>>>16,I&=65535,A+=c*p+d*S+_*b+E*$,A&=65535,e.fromBits(F<<16|m,A<<16|I,this.unsigned)},e.prototype.mul=e.prototype.multiply,e.prototype.divide=function(u){if(e.isLong(u)||(u=e.fromValue(u)),u.isZero())throw new Error("division by zero");if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var c,d,_;if(this.equals(e.MIN_VALUE)){if(u.equals(e.ONE)||u.equals(e.NEG_ONE))return e.MIN_VALUE;if(u.equals(e.MIN_VALUE))return e.ONE;var E=this.shiftRight(1);return c=E.divide(u).shiftLeft(1),c.equals(e.ZERO)?u.isNegative()?e.ONE:e.NEG_ONE:(d=this.subtract(u.multiply(c)),_=c.add(d.divide(u)),_)}else if(u.equals(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().divide(u.negate()):this.negate().divide(u).negate();if(u.isNegative())return this.divide(u.negate()).negate();for(_=e.ZERO,d=this;d.greaterThanOrEqual(u);){c=Math.max(1,Math.floor(d.toNumber()/u.toNumber()));for(var $=Math.ceil(Math.log(c)/Math.LN2),b=$<=48?1:Math.pow(2,$-48),S=e.fromNumber(c),p=S.multiply(u);p.isNegative()||p.greaterThan(d);)c-=b,S=e.fromNumber(c,this.unsigned),p=S.multiply(u);S.isZero()&&(S=e.ONE),_=_.add(S),d=d.subtract(p)}return _},e.prototype.div=e.prototype.divide,e.prototype.modulo=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.subtract(this.divide(u).multiply(u))},e.prototype.mod=e.prototype.modulo,e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.and=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low&u.low,this.high&u.high,this.unsigned)},e.prototype.or=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low|u.low,this.high|u.high,this.unsigned)},e.prototype.xor=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low^u.low,this.high^u.high,this.unsigned)},e.prototype.shiftLeft=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low<<u,this.high<<u|this.low>>>32-u,this.unsigned):e.fromBits(0,this.low<<u-32,this.unsigned)},e.prototype.shl=e.prototype.shiftLeft,e.prototype.shiftRight=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low>>>u|this.high<<32-u,this.high>>u,this.unsigned):e.fromBits(this.high>>u-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=e.prototype.shiftRight,e.prototype.shiftRightUnsigned=function(u){if(e.isLong(u)&&(u=u.toInt()),u&=63,u===0)return this;var c=this.high;if(u<32){var d=this.low;return e.fromBits(d>>>u|c<<32-u,c>>>u,this.unsigned)}else return u===32?e.fromBits(c,0,this.unsigned):e.fromBits(c>>>u-32,0,this.unsigned)},e.prototype.shru=e.prototype.shiftRightUnsigned,e.prototype.toSigned=function(){return this.unsigned?new e(this.low,this.high,!1):this},e.prototype.toUnsigned=function(){return this.unsigned?this:new e(this.low,this.high,!0)},e})})(ti),Object.defineProperty(dt,"__esModule",{value:!0}),dt.Hyper=void 0;var fA=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Tu=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},sA=ti.exports,gr=Iu(sA),lA=R,cA=Iu(lA);function Iu(r){return r&&r.__esModule?r:{default:r}}function hA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function pA(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function yA(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var _r=dt.Hyper=function(r){yA(e,r),fA(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not a Hyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^-?\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=Tu(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!1);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=Tu(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!1);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return hA(this,e),pA(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!1))}return e}(gr.default);(0,cA.default)(_r),_r.MAX_VALUE=new _r(gr.default.MAX_VALUE.low,gr.default.MAX_VALUE.high),_r.MIN_VALUE=new _r(gr.default.MIN_VALUE.low,gr.default.MIN_VALUE.high);var Fe={};Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.UnsignedInt=void 0;var dA=ct,xu=Pu(dA),vA=R,gA=Pu(vA);function Pu(r){return r&&r.__esModule?r:{default:r}}var mr=Fe.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,xu.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");if(e<0)throw new Error("XDR Write Error: negative number "+e);t.writeUInt32BE(e)},isValid:function(e){return!(0,xu.default)(e)||Math.floor(e)!==e?!1:e>=mr.MIN_VALUE&&e<=mr.MAX_VALUE}};mr.MAX_VALUE=Math.pow(2,32)-1,mr.MIN_VALUE=0,(0,gA.default)(mr);var vt={};Object.defineProperty(vt,"__esModule",{value:!0}),vt.UnsignedHyper=void 0;var _A=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Fu=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},mA=ti.exports,br=Ru(mA),bA=R,wA=Ru(bA);function Ru(r){return r&&r.__esModule?r:{default:r}}function $A(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function EA(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function OA(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var wr=vt.UnsignedHyper=function(r){OA(e,r),_A(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not an UnsignedHyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=Fu(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!0);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=Fu(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!0);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return $A(this,e),EA(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!0))}return e}(br.default);(0,wA.default)(wr),wr.MAX_VALUE=new wr(br.default.MAX_UNSIGNED_VALUE.low,br.default.MAX_UNSIGNED_VALUE.high),wr.MIN_VALUE=new wr(br.default.MIN_VALUE.low,br.default.MIN_VALUE.high);var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.Float=void 0;var AA=ct,Mu=Bu(AA),SA=R,TA=Bu(SA);function Bu(r){return r&&r.__esModule?r:{default:r}}var IA=gt.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,Mu.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,Mu.default)(e)}};(0,TA.default)(IA);var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.Double=void 0;var xA=ct,Uu=Nu(xA),PA=R,FA=Nu(PA);function Nu(r){return r&&r.__esModule?r:{default:r}}var RA=_t.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,Uu.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,Uu.default)(e)}};(0,FA.default)(RA);var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.Quadruple=void 0;var MA=R,BA=UA(MA);function UA(r){return r&&r.__esModule?r:{default:r}}var NA=mt.Quadruple={read:function(){throw new Error("XDR Read Error: quadruple not supported")},write:function(){throw new Error("XDR Write Error: quadruple not supported")},isValid:function(){return!1}};(0,BA.default)(NA);var $r={},DA=ne,LA=G,CA="[object Boolean]";function jA(r){return r===!0||r===!1||LA(r)&&DA(r)==CA}var kA=jA;Object.defineProperty($r,"__esModule",{value:!0}),$r.Bool=void 0;var VA=kA,qA=Lu(VA),Du=fe,GA=R,HA=Lu(GA);function Lu(r){return r&&r.__esModule?r:{default:r}}var WA=$r.Bool={read:function(e){var t=Du.Int.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new Error("XDR Read Error: Got "+t+" when trying to read a bool")}},write:function(e,t){var n=e?1:0;return Du.Int.write(n,t)},isValid:function(e){return(0,qA.default)(e)}};(0,HA.default)(WA);var bt={},XA=ne,zA=N,YA=G,KA="[object String]";function ZA(r){return typeof r=="string"||!zA(r)&&YA(r)&&XA(r)==KA}var Cu=ZA;Object.defineProperty(bt,"__esModule",{value:!0}),bt.String=void 0;var JA=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),QA=Cu,ju=ni(QA),eS=N,rS=ni(eS),ku=fe,tS=Fe,Vu=Pe,nS=R,iS=ni(nS);function ni(r){return r&&r.__esModule?r:{default:r}}function aS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var oS=bt.String=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tS.UnsignedInt.MAX_VALUE;aS(this,r),this._maxLength=e}return JA(r,[{key:"read",value:function(t){var n=ku.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length String,"+("max allowed is "+this._maxLength));var i=(0,Vu.calculatePadding)(n),a=t.slice(n);return(0,Vu.slicePadding)(t,i),a.buffer()}},{key:"readString",value:function(t){return this.read(t).toString("utf8")}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));var i=void 0;(0,ju.default)(t)?i=y.from(t,"utf8"):i=y.from(t),ku.Int.write(i.length,n),n.writeBufferPadded(i)}},{key:"isValid",value:function(t){var n=void 0;if((0,ju.default)(t))n=y.from(t,"utf8");else if((0,rS.default)(t)||y.isBuffer(t))n=y.from(t);else return!1;return n.length<=this._maxLength}}]),r}();(0,iS.default)(oS.prototype);var wt={};Object.defineProperty(wt,"__esModule",{value:!0}),wt.Opaque=void 0;var uS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),qu=Pe,fS=R,sS=lS(fS);function lS(r){return r&&r.__esModule?r:{default:r}}function cS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var hS=wt.Opaque=function(){function r(e){cS(this,r),this._length=e,this._padding=(0,qu.calculatePadding)(e)}return uS(r,[{key:"read",value:function(t){var n=t.slice(this._length);return(0,qu.slicePadding)(t,this._padding),n.buffer()}},{key:"write",value:function(t,n){if(t.length!==this._length)throw new Error("XDR Write Error: Got "+t.length+" bytes, expected "+this._length);n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length===this._length}}]),r}();(0,sS.default)(hS.prototype);var $t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.VarOpaque=void 0;var pS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Gu=fe,yS=Fe,Hu=Pe,dS=R,vS=gS(dS);function gS(r){return r&&r.__esModule?r:{default:r}}function _S(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var mS=$t.VarOpaque=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yS.UnsignedInt.MAX_VALUE;_S(this,r),this._maxLength=e}return pS(r,[{key:"read",value:function(t){var n=Gu.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length VarOpaque,"+("max allowed is "+this._maxLength));var i=(0,Hu.calculatePadding)(n),a=t.slice(n);return(0,Hu.slicePadding)(t,i),a.buffer()}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));Gu.Int.write(t.length,n),n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length<=this._maxLength}}]),r}();(0,vS.default)(mS.prototype);var Et={},Re={exports:{}},bS=kr;function wS(r){return typeof r=="function"?r:bS}var Wu=wS,$S=mi,ES=Zn,OS=Wu,AS=N;function SS(r,e){var t=AS(r)?$S:ES;return t(r,OS(e))}var TS=SS;(function(r){r.exports=TS})(Re);var IS=Wo,xS=/^\s+/;function PS(r){return r&&r.slice(0,IS(r)+1).replace(xS,"")}var FS=PS,RS=FS,Xu=ce,MS=Cr,zu=0/0,BS=/^[-+]0x[0-9a-f]+$/i,US=/^0b[01]+$/i,NS=/^0o[0-7]+$/i,DS=parseInt;function LS(r){if(typeof r=="number")return r;if(MS(r))return zu;if(Xu(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Xu(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=RS(r);var t=US.test(r);return t||NS.test(r)?DS(r.slice(2),t?2:8):BS.test(r)?zu:+r}var CS=LS,jS=CS,Yu=1/0,kS=17976931348623157e292;function VS(r){if(!r)return r===0?r:0;if(r=jS(r),r===Yu||r===-Yu){var e=r<0?-1:1;return e*kS}return r===r?r:0}var qS=VS,GS=qS;function HS(r){var e=GS(r),t=e%1;return e===e?t?e-t:e:0}var WS=HS,XS=Oi,zS=Wu,YS=WS,KS=9007199254740991,ii=4294967295,ZS=Math.min;function JS(r,e){if(r=YS(r),r<1||r>KS)return[];var t=ii,n=ZS(r,ii);e=zS(e),r-=ii;for(var i=XS(n,e);++t<r;)e(t);return i}var Ku=JS;Object.defineProperty(Et,"__esModule",{value:!0}),Et.Array=void 0;var QS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),eT=ei,rT=Er(eT),tT=Re.exports,nT=Er(tT),iT=Ku,aT=Er(iT),oT=N,Zu=Er(oT),uT=R,fT=Er(uT);function Er(r){return r&&r.__esModule?r:{default:r}}function sT(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var lT=Et.Array=function(){function r(e,t){sT(this,r),this._childType=e,this._length=t}return QS(r,[{key:"read",value:function(t){var n=this;return(0,aT.default)(this._length,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,Zu.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length!==this._length)throw new Error("XDR Write Error: Got array of size "+t.length+","+("expected "+this._length));(0,nT.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,Zu.default)(t)||t.length!==this._length?!1:(0,rT.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,fT.default)(lT.prototype);var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.VarArray=void 0;var cT=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),hT=ei,pT=Or(hT),yT=Re.exports,dT=Or(yT),vT=Ku,gT=Or(vT),_T=N,Ju=Or(_T),mT=Fe,Qu=fe,bT=R,wT=Or(bT);function Or(r){return r&&r.__esModule?r:{default:r}}function $T(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var ET=Ot.VarArray=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mT.UnsignedInt.MAX_VALUE;$T(this,r),this._childType=e,this._maxLength=t}return cT(r,[{key:"read",value:function(t){var n=this,i=Qu.Int.read(t);if(i>this._maxLength)throw new Error("XDR Read Error: Saw "+i+" length VarArray,"+("max allowed is "+this._maxLength));return(0,gT.default)(i,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,Ju.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length>this._maxLength)throw new Error("XDR Write Error: Got array of size "+t.length+","+("max allowed is "+this._maxLength));Qu.Int.write(t.length,n),(0,dT.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,Ju.default)(t)||t.length>this._maxLength?!1:(0,pT.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,wT.default)(ET.prototype);var At={};function OT(r){return r===null}var AT=OT;function ST(r){return r===void 0}var Ar=ST;Object.defineProperty(At,"__esModule",{value:!0}),At.Option=void 0;var TT=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),IT=AT,ef=ai(IT),xT=Ar,rf=ai(xT),tf=$r,PT=R,FT=ai(PT);function ai(r){return r&&r.__esModule?r:{default:r}}function RT(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var MT=At.Option=function(){function r(e){RT(this,r),this._childType=e}return TT(r,[{key:"read",value:function(t){if(tf.Bool.read(t))return this._childType.read(t)}},{key:"write",value:function(t,n){var i=!((0,ef.default)(t)||(0,rf.default)(t));tf.Bool.write(i,n),i&&this._childType.write(t,n)}},{key:"isValid",value:function(t){return(0,ef.default)(t)||(0,rf.default)(t)?!0:this._childType.isValid(t)}}]),r}();(0,FT.default)(MT.prototype);var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.Void=void 0;var BT=Ar,nf=af(BT),UT=R,NT=af(UT);function af(r){return r&&r.__esModule?r:{default:r}}var DT=Sr.Void={read:function(){},write:function(e){if(!(0,nf.default)(e))throw new Error("XDR Write Error: trying to write value to a void slot")},isValid:function(e){return(0,nf.default)(e)}};(0,NT.default)(DT);var St={},LT=Pr;function CT(r,e){return LT(e,function(t){return r[t]})}var jT=CT,kT=jT,VT=Ce;function qT(r){return r==null?[]:kT(r,VT(r))}var GT=qT;Object.defineProperty(St,"__esModule",{value:!0}),St.Enum=void 0;var HT=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),WT=Re.exports,XT=oi(WT),zT=GT,YT=oi(zT),of=fe,KT=R,ZT=oi(KT);function oi(r){return r&&r.__esModule?r:{default:r}}function JT(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function QT(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function uf(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var eI=St.Enum=function(){function r(e,t){uf(this,r),this.name=e,this.value=t}return HT(r,null,[{key:"read",value:function(t){var n=of.Int.read(t);if(!this._byValue.has(n))throw new Error("XDR Read Error: Unknown "+this.enumName+" member for value "+n);return this._byValue.get(n)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: Unknown "+t+" is not a "+this.enumName);of.Int.write(t.value,n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"members",value:function(){return this._members}},{key:"values",value:function(){return(0,YT.default)(this._members)}},{key:"fromName",value:function(t){var n=this._members[t];if(!n)throw new Error(t+" is not a member of "+this.enumName);return n}},{key:"fromValue",value:function(t){var n=this._byValue.get(t);if(!n)throw new Error(t+" is not a value of any member of "+this.enumName);return n}},{key:"create",value:function(t,n,i){var a=function(o){QT(f,o);function f(){return uf(this,f),JT(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);return a.enumName=n,t.results[n]=a,a._members={},a._byValue=new Map,(0,XT.default)(i,function(o,f){var s=new a(f,o);a._members[f]=s,a._byValue.set(o,s),a[f]=function(){return s}}),a}}]),r}();(0,ZT.default)(eI);var Tt={},rI=Zn,tI=rr;function nI(r,e){var t=-1,n=tI(r)?Array(r.length):[];return rI(r,function(i,a,o){n[++t]=e(i,a,o)}),n}var iI=nI,aI=Pr,oI=wu,uI=iI,fI=N;function sI(r,e){var t=fI(r)?aI:uI;return t(r,oI(e))}var lI=sI;function cI(r){for(var e=-1,t=r==null?0:r.length,n={};++e<t;){var i=r[e];n[i[0]]=i[1]}return n}var hI=cI,Tr={};Object.defineProperty(Tr,"__esModule",{value:!0});var pI=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function yI(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}Tr.Reference=function(){function r(){yI(this,r)}return pI(r,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),r}(),Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.Struct=void 0;var It=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var f=e[Symbol.iterator](),s;!(i=(s=f.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&f.return&&f.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),dI=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),vI=Re.exports,ff=Ir(vI),gI=lI,_I=Ir(gI),mI=Ar,bI=Ir(mI),wI=hI,$I=Ir(wI),EI=Tr,OI=R,AI=Ir(OI);function Ir(r){return r&&r.__esModule?r:{default:r}}function SI(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function TI(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function sf(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var II=Tt.Struct=function(){function r(e){sf(this,r),this._attributes=e||{}}return dI(r,null,[{key:"read",value:function(t){var n=(0,_I.default)(this._fields,function(i){var a=It(i,2),o=a[0],f=a[1],s=f.read(t);return[o,s]});return new this((0,$I.default)(n))}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.structName);(0,ff.default)(this._fields,function(i){var a=It(i,2),o=a[0],f=a[1],s=t._attributes[o];f.write(s,n)})}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(o){TI(f,o);function f(){return sf(this,f),SI(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);return a.structName=n,t.results[n]=a,a._fields=i.map(function(o){var f=It(o,2),s=f[0],l=f[1];return l instanceof EI.Reference&&(l=l.resolve(t)),[s,l]}),(0,ff.default)(a._fields,function(o){var f=It(o,1),s=f[0];a.prototype[s]=xI(s)}),a}}]),r}();(0,AI.default)(II);function xI(r){return function(t){return(0,bI.default)(t)||(this._attributes[r]=t),this._attributes[r]}}var xt={};Object.defineProperty(xt,"__esModule",{value:!0}),xt.Union=void 0;var PI=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var f=e[Symbol.iterator](),s;!(i=(s=f.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&f.return&&f.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),FI=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),RI=Re.exports,Pt=Rt(RI),MI=Ar,lf=Rt(MI),BI=Cu,cf=Rt(BI),Ft=Sr,ui=Tr,UI=R,NI=Rt(UI);function Rt(r){return r&&r.__esModule?r:{default:r}}function DI(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function LI(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function hf(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var CI=xt.Union=function(){function r(e,t){hf(this,r),this.set(e,t)}return FI(r,[{key:"set",value:function(t,n){(0,cf.default)(t)&&(t=this.constructor._switchOn.fromName(t)),this._switch=t,this._arm=this.constructor.armForSwitch(this._switch),this._armType=this.constructor.armTypeForArm(this._arm),this._value=n}},{key:"get",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._arm;if(this._arm!==Ft.Void&&this._arm!==t)throw new Error(t+" not set");return this._value}},{key:"switch",value:function(){return this._switch}},{key:"arm",value:function(){return this._arm}},{key:"armType",value:function(){return this._armType}},{key:"value",value:function(){return this._value}}],[{key:"armForSwitch",value:function(t){if(this._switches.has(t))return this._switches.get(t);if(this._defaultArm)return this._defaultArm;throw new Error("Bad union switch: "+t)}},{key:"armTypeForArm",value:function(t){return t===Ft.Void?Ft.Void:this._arms[t]}},{key:"read",value:function(t){var n=this._switchOn.read(t),i=this.armForSwitch(n),a=this.armTypeForArm(i),o=void 0;return(0,lf.default)(a)?o=i.read(t):o=a.read(t),new this(n,o)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.unionName);this._switchOn.write(t.switch(),n),t.armType().write(t.value(),n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(f){LI(s,f);function s(){return hf(this,s),DI(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return s}(r);a.unionName=n,t.results[n]=a,i.switchOn instanceof ui.Reference?a._switchOn=i.switchOn.resolve(t):a._switchOn=i.switchOn,a._switches=new Map,a._arms={},(0,Pt.default)(i.arms,function(f,s){f instanceof ui.Reference&&(f=f.resolve(t)),a._arms[s]=f});var o=i.defaultArm;return o instanceof ui.Reference&&(o=o.resolve(t)),a._defaultArm=o,(0,Pt.default)(i.switches,function(f){var s=PI(f,2),l=s[0],h=s[1];(0,cf.default)(l)&&(l=a._switchOn.fromName(l)),a._switches.set(l,h)}),(0,lf.default)(a._switchOn.values)||(0,Pt.default)(a._switchOn.values(),function(f){a[f.name]=function(s){return new a(f,s)},a.prototype[f.name]=function(l){return this.set(f,l)}}),(0,Pt.default)(a._arms,function(f,s){f!==Ft.Void&&(a.prototype[s]=function(){return this.get(s)})}),a}}]),r}();(0,NI.default)(CI),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=fe;Object.keys(e).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return e[p]}})});var t=dt;Object.keys(t).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return t[p]}})});var n=Fe;Object.keys(n).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return n[p]}})});var i=vt;Object.keys(i).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return i[p]}})});var a=gt;Object.keys(a).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return a[p]}})});var o=_t;Object.keys(o).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return o[p]}})});var f=mt;Object.keys(f).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return f[p]}})});var s=$r;Object.keys(s).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return s[p]}})});var l=bt;Object.keys(l).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return l[p]}})});var h=wt;Object.keys(h).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return h[p]}})});var u=$t;Object.keys(u).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return u[p]}})});var c=Et;Object.keys(c).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return c[p]}})});var d=Ot;Object.keys(d).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return d[p]}})});var _=At;Object.keys(_).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return _[p]}})});var E=Sr;Object.keys(E).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return E[p]}})});var $=St;Object.keys($).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return $[p]}})});var b=Tt;Object.keys(b).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return b[p]}})});var S=xt;Object.keys(S).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return S[p]}})})}(Kn);var pf={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function m(v,g){for(var w=0;w<g.length;w++){var O=g[w];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(v,O.key,O)}}return function(v,g,w){return g&&m(v.prototype,g),w&&m(v,w),v}}(),t=Tr;Object.keys(t).forEach(function(m){m==="default"||m==="__esModule"||Object.defineProperty(r,m,{enumerable:!0,get:function(){return t[m]}})}),r.config=_;var n=Ar,i=h(n),a=Re.exports,o=h(a),f=Kn,s=l(f);function l(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&(v[g]=m[g]);return v.default=m,v}function h(m){return m&&m.__esModule?m:{default:m}}function u(m,v){if(!(m instanceof v))throw new TypeError("Cannot call a class as a function")}function c(m,v){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:m}function d(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);m.prototype=Object.create(v&&v.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(m,v):m.__proto__=v)}function _(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(m){var g=new F(v);m(g),g.resolve()}return v}var E=function(m){d(v,m);function v(g){u(this,v);var w=c(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.name=g,w}return e(v,[{key:"resolve",value:function(w){var O=w.definitions[this.name];return O.resolve(w)}}]),v}(t.Reference),$=function(m){d(v,m);function v(g,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;u(this,v);var L=c(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return L.childReference=g,L.length=w,L.variable=O,L}return e(v,[{key:"resolve",value:function(w){var O=this.childReference,L=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),L instanceof t.Reference&&(L=L.resolve(w)),this.variable?new s.VarArray(O,L):new s.Array(O,L)}}]),v}(t.Reference),b=function(m){d(v,m);function v(g){u(this,v);var w=c(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.childReference=g,w.name=g.name,w}return e(v,[{key:"resolve",value:function(w){var O=this.childReference;return O instanceof t.Reference&&(O=O.resolve(w)),new s.Option(O)}}]),v}(t.Reference),S=function(m){d(v,m);function v(g,w){u(this,v);var O=c(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return O.sizedType=g,O.length=w,O}return e(v,[{key:"resolve",value:function(w){var O=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),new this.sizedType(O)}}]),v}(t.Reference),p=function(){function m(v,g,w){u(this,m),this.constructor=v,this.name=g,this.config=w}return e(m,[{key:"resolve",value:function(g){return this.name in g.results?g.results[this.name]:this.constructor(g,this.name,this.config)}}]),m}();function A(m,v,g){return g instanceof t.Reference&&(g=g.resolve(m)),m.results[v]=g,g}function I(m,v,g){return m.results[v]=g,g}var F=function(){function m(v){u(this,m),this._destination=v,this._definitions={}}return e(m,[{key:"enum",value:function(g,w){var O=new p(s.Enum.create,g,w);this.define(g,O)}},{key:"struct",value:function(g,w){var O=new p(s.Struct.create,g,w);this.define(g,O)}},{key:"union",value:function(g,w){var O=new p(s.Union.create,g,w);this.define(g,O)}},{key:"typedef",value:function(g,w){var O=new p(A,g,w);this.define(g,O)}},{key:"const",value:function(g,w){var O=new p(I,g,w);this.define(g,O)}},{key:"void",value:function(){return s.Void}},{key:"bool",value:function(){return s.Bool}},{key:"int",value:function(){return s.Int}},{key:"hyper",value:function(){return s.Hyper}},{key:"uint",value:function(){return s.UnsignedInt}},{key:"uhyper",value:function(){return s.UnsignedHyper}},{key:"float",value:function(){return s.Float}},{key:"double",value:function(){return s.Double}},{key:"quadruple",value:function(){return s.Quadruple}},{key:"string",value:function(g){return new S(s.String,g)}},{key:"opaque",value:function(g){return new S(s.Opaque,g)}},{key:"varOpaque",value:function(g){return new S(s.VarOpaque,g)}},{key:"array",value:function(g,w){return new $(g,w)}},{key:"varArray",value:function(g,w){return new $(g,w,!0)}},{key:"option",value:function(g){return new b(g)}},{key:"define",value:function(g,w){if((0,i.default)(this._destination[g]))this._definitions[g]=w;else throw new Error("XDRTypes Error:"+g+" is already defined")}},{key:"lookup",value:function(g){return new E(g)}},{key:"resolve",value:function(){var g=this;(0,o.default)(this._definitions,function(w){w.resolve({definitions:g._definitions,results:g._destination})})}}]),m}()})(pf),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=Kn;Object.keys(e).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[n]}})});var t=pf;Object.keys(t).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})}(tu),Object.defineProperty(lt,"__esModule",{value:!0}),lt.xdr=void 0;const jI=(0,tu.config)(r=>{r.enum("EnvelopeType",{envelopeTypeBundle:0}),r.typedef("Uint32",r.uint()),r.typedef("Uint64",r.uhyper()),r.union("BundleItemExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("BundleItem",[["collectionId",r.lookup("Uint64")],["productId",r.lookup("Uint64")],["variantId",r.lookup("Uint64")],["sku",r.string()],["quantity",r.lookup("Uint32")],["ext",r.lookup("BundleItemExt")]]),r.union("BundleExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("Bundle",[["variantId",r.lookup("Uint64")],["items",r.varArray(r.lookup("BundleItem"),500)],["version",r.lookup("Uint32")],["ext",r.lookup("BundleExt")]]),r.union("BundleEnvelope",{switchOn:r.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeBundle","v1"]],arms:{v1:r.lookup("Bundle")}})});lt.xdr=jI,Object.defineProperty(ue,"__esModule",{value:!0}),ue.decodeToLegacyBoxOrder=ue.encodeLegacyBoxOrder=ue.toBundle=df=ue.toLineItemProperty=void 0;const ee=lt;function yf(r){let e={variantId:ee.xdr.Uint64.fromString(r.variantId.toString()),version:r.version||Math.floor(Date.now()/1e3),items:r.items.map(n=>new ee.xdr.BundleItem({collectionId:ee.xdr.Uint64.fromString(n.collectionId.toString()),productId:ee.xdr.Uint64.fromString(n.productId.toString()),variantId:ee.xdr.Uint64.fromString(n.variantId.toString()),sku:n.sku||"",quantity:n.quantity,ext:new ee.xdr.BundleItemExt(0)})),ext:new ee.xdr.BundleExt(0)};const t=new ee.xdr.Bundle(e);return ee.xdr.BundleEnvelope.envelopeTypeBundle(t).toXDR("base64")}var df=ue.toLineItemProperty=yf;function vf(r){const e=ee.xdr.BundleEnvelope.fromXDR(r,"base64").v1();return{variantId:e.variantId().toString(),version:e.version(),items:e.items().map(t=>({collectionId:t.collectionId().toString(),productId:t.productId().toString(),variantId:t.variantId().toString(),sku:t.sku().toString(),quantity:t.quantity()}))}}ue.toBundle=vf;function kI(r,e,t=1){const n={variantId:r.toString(),version:t,items:[]};for(const i in e)if(Object.hasOwnProperty.call(e,i)){const a=e[i];n.items.push({collectionId:a.dsId.toString(),productId:a.pId.toString(),variantId:a.vId.toString(),sku:a.sku||"",quantity:a.qty})}return yf(n)}ue.encodeLegacyBoxOrder=kI;function VI(r){let e={};try{vf(r).items.forEach(n=>{e[n.variantId]={dsId:n.collectionId,pId:Number.parseInt(n.productId),vId:Number.parseInt(n.variantId),sku:n.sku,qty:n.quantity}})}catch{e=JSON.parse(y.from(r,"base64").toString())}return e}ue.decodeToLegacyBoxOrder=VI;var fi=(r,e,t)=>new Promise((n,i)=>{var a=s=>{try{f(t.next(s))}catch(l){i(l)}},o=s=>{try{f(t.throw(s))}catch(l){i(l)}},f=s=>s.done?n(s.value):Promise.resolve(s.value).then(a,o);f((t=t.apply(r,e)).next())});const gf="https://us-east4-recharge-prod-services-f818.cloudfunctions.net/bundling-storefront-manager";function qI(){return Math.ceil(Date.now()/1e3)}function GI(r){return fi(this,null,function*(){const e=`${gf}/t`;try{const{timestamp:t}=yield r("get",e,{headers:{"X-Recharge-App":"storefront-client"}});return t}catch(t){return console.error(`Fetch failed: ${t}. Using client-side date.`),qI()}})}const HI=r=>fi(void 0,null,function*(){const e=yr();if(!(yield _f(r)))throw new Error("Bundle selection is invalid.");const t=yield GI(Q),n=df({variantId:r.externalVariantId,version:t,items:r.selections.map(i=>({collectionId:i.collectionId,productId:i.externalProductId,variantId:i.externalVariantId,quantity:i.quantity,sku:""}))});try{const i=`${gf}/api/v1/bundles`,a=yield Q("post",i,{data:{bundle:n},headers:{"Content-Type":"application/json",Origin:`https://${e.storeIdentifier}`,"X-Recharge-App":"storefront-client"}});if(!a.id||a.code!==200)throw new Error(`1: failed generating rb_id: ${JSON.stringify(a)}`);return a.id}catch(i){throw new Error(`2: failed generating rb_id ${i}`)}}),_f=r=>fi(void 0,null,function*(){try{const e=yield eu(r.externalProductId);return!!r&&!!e}catch{return console.error("Error fetching bundle settings"),!1}});var WI=Object.freeze({__proto__:null,getBundleId:HI,validateBundle:_f});const XI={get(r,e){return Q("get",r,e)},post(r,e){return Q("post",r,e)},put(r,e){return Q("put",r,e)},delete(r,e){return Q("delete",r,e)}};function zI(r){R1({storeIdentifier:r.storeIdentifier,environment:r.environment?r.environment:"prod"}),ru()}return{init:zI,api:XI,cdn:N1,bundle:WI}});
|
|
23
|
+
*/(function(e,t){typeof iA=="function"&&!0&&r&&r.exports?r.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t()})(te,function(){function e(c,u,h){this.low=c|0,this.high=u|0,this.unsigned=!!h}e.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=function(u){return(u&&u.__isLong__)===!0};var t={},n={};e.fromInt=function(u,h){var d,_;return h?(u=u>>>0,0<=u&&u<256&&(_=n[u],_)?_:(d=new e(u,(u|0)<0?-1:0,!0),0<=u&&u<256&&(n[u]=d),d)):(u=u|0,-128<=u&&u<128&&(_=t[u],_)?_:(d=new e(u,u<0?-1:0,!1),-128<=u&&u<128&&(t[u]=d),d))},e.fromNumber=function(u,h){return h=!!h,isNaN(u)||!isFinite(u)?e.ZERO:!h&&u<=-s?e.MIN_VALUE:!h&&u+1>=s?e.MAX_VALUE:h&&u>=f?e.MAX_UNSIGNED_VALUE:u<0?e.fromNumber(-u,h).negate():new e(u%o|0,u/o|0,h)},e.fromBits=function(u,h,d){return new e(u,h,d)},e.fromString=function(u,h,d){if(u.length===0)throw Error("number format error: empty string");if(u==="NaN"||u==="Infinity"||u==="+Infinity"||u==="-Infinity")return e.ZERO;if(typeof h=="number"&&(d=h,h=!1),d=d||10,d<2||36<d)throw Error("radix out of range: "+d);var _;if((_=u.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+u);if(_===0)return e.fromString(u.substring(1),h,d).negate();for(var E=e.fromNumber(Math.pow(d,8)),$=e.ZERO,b=0;b<u.length;b+=8){var S=Math.min(8,u.length-b),p=parseInt(u.substring(b,b+S),d);if(S<8){var A=e.fromNumber(Math.pow(d,S));$=$.multiply(A).add(e.fromNumber(p))}else $=$.multiply(E),$=$.add(e.fromNumber(p))}return $.unsigned=h,$},e.fromValue=function(u){return u instanceof e?u:typeof u=="number"?e.fromNumber(u):typeof u=="string"?e.fromString(u):new e(u.low,u.high,u.unsigned)};var i=1<<16,a=1<<24,o=i*i,f=o*o,s=f/2,l=e.fromInt(a);return e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*o+(this.low>>>0):this.high*o+(this.low>>>0)},e.prototype.toString=function(u){if(u=u||10,u<2||36<u)throw RangeError("radix out of range: "+u);if(this.isZero())return"0";var h;if(this.isNegative())if(this.equals(e.MIN_VALUE)){var d=e.fromNumber(u),_=this.divide(d);return h=_.multiply(d).subtract(this),_.toString(u)+h.toInt().toString(u)}else return"-"+this.negate().toString(u);var E=e.fromNumber(Math.pow(u,6),this.unsigned);h=this;for(var $="";;){var b=h.divide(E),S=h.subtract(b.multiply(E)).toInt()>>>0,p=S.toString(u);if(h=b,h.isZero())return p+$;for(;p.length<6;)p="0"+p;$=""+p+$}},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var u=this.high!=0?this.high:this.low,h=31;h>0&&(u&1<<h)==0;h--);return this.high!=0?h+33:h+1},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.equals=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.unsigned!==u.unsigned&&this.high>>>31===1&&u.high>>>31===1?!1:this.high===u.high&&this.low===u.low},e.eq=e.prototype.equals,e.prototype.notEquals=function(u){return!this.equals(u)},e.neq=e.prototype.notEquals,e.prototype.lessThan=function(u){return this.compare(u)<0},e.prototype.lt=e.prototype.lessThan,e.prototype.lessThanOrEqual=function(u){return this.compare(u)<=0},e.prototype.lte=e.prototype.lessThanOrEqual,e.prototype.greaterThan=function(u){return this.compare(u)>0},e.prototype.gt=e.prototype.greaterThan,e.prototype.greaterThanOrEqual=function(u){return this.compare(u)>=0},e.prototype.gte=e.prototype.greaterThanOrEqual,e.prototype.compare=function(u){if(e.isLong(u)||(u=e.fromValue(u)),this.equals(u))return 0;var h=this.isNegative(),d=u.isNegative();return h&&!d?-1:!h&&d?1:this.unsigned?u.high>>>0>this.high>>>0||u.high===this.high&&u.low>>>0>this.low>>>0?-1:1:this.subtract(u).isNegative()?-1:1},e.prototype.negate=function(){return!this.unsigned&&this.equals(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=e.prototype.negate,e.prototype.add=function(u){e.isLong(u)||(u=e.fromValue(u));var h=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,p=u.low&65535,A=0,T=0,F=0,m=0;return m+=E+p,F+=m>>>16,m&=65535,F+=_+S,T+=F>>>16,F&=65535,T+=d+b,A+=T>>>16,T&=65535,A+=h+$,A&=65535,e.fromBits(F<<16|m,A<<16|T,this.unsigned)},e.prototype.subtract=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.add(u.negate())},e.prototype.sub=e.prototype.subtract,e.prototype.multiply=function(u){if(this.isZero()||(e.isLong(u)||(u=e.fromValue(u)),u.isZero()))return e.ZERO;if(this.equals(e.MIN_VALUE))return u.isOdd()?e.MIN_VALUE:e.ZERO;if(u.equals(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().multiply(u.negate()):this.negate().multiply(u).negate();if(u.isNegative())return this.multiply(u.negate()).negate();if(this.lessThan(l)&&u.lessThan(l))return e.fromNumber(this.toNumber()*u.toNumber(),this.unsigned);var h=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,p=u.low&65535,A=0,T=0,F=0,m=0;return m+=E*p,F+=m>>>16,m&=65535,F+=_*p,T+=F>>>16,F&=65535,F+=E*S,T+=F>>>16,F&=65535,T+=d*p,A+=T>>>16,T&=65535,T+=_*S,A+=T>>>16,T&=65535,T+=E*b,A+=T>>>16,T&=65535,A+=h*p+d*S+_*b+E*$,A&=65535,e.fromBits(F<<16|m,A<<16|T,this.unsigned)},e.prototype.mul=e.prototype.multiply,e.prototype.divide=function(u){if(e.isLong(u)||(u=e.fromValue(u)),u.isZero())throw new Error("division by zero");if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var h,d,_;if(this.equals(e.MIN_VALUE)){if(u.equals(e.ONE)||u.equals(e.NEG_ONE))return e.MIN_VALUE;if(u.equals(e.MIN_VALUE))return e.ONE;var E=this.shiftRight(1);return h=E.divide(u).shiftLeft(1),h.equals(e.ZERO)?u.isNegative()?e.ONE:e.NEG_ONE:(d=this.subtract(u.multiply(h)),_=h.add(d.divide(u)),_)}else if(u.equals(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().divide(u.negate()):this.negate().divide(u).negate();if(u.isNegative())return this.divide(u.negate()).negate();for(_=e.ZERO,d=this;d.greaterThanOrEqual(u);){h=Math.max(1,Math.floor(d.toNumber()/u.toNumber()));for(var $=Math.ceil(Math.log(h)/Math.LN2),b=$<=48?1:Math.pow(2,$-48),S=e.fromNumber(h),p=S.multiply(u);p.isNegative()||p.greaterThan(d);)h-=b,S=e.fromNumber(h,this.unsigned),p=S.multiply(u);S.isZero()&&(S=e.ONE),_=_.add(S),d=d.subtract(p)}return _},e.prototype.div=e.prototype.divide,e.prototype.modulo=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.subtract(this.divide(u).multiply(u))},e.prototype.mod=e.prototype.modulo,e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.and=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low&u.low,this.high&u.high,this.unsigned)},e.prototype.or=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low|u.low,this.high|u.high,this.unsigned)},e.prototype.xor=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low^u.low,this.high^u.high,this.unsigned)},e.prototype.shiftLeft=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low<<u,this.high<<u|this.low>>>32-u,this.unsigned):e.fromBits(0,this.low<<u-32,this.unsigned)},e.prototype.shl=e.prototype.shiftLeft,e.prototype.shiftRight=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low>>>u|this.high<<32-u,this.high>>u,this.unsigned):e.fromBits(this.high>>u-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=e.prototype.shiftRight,e.prototype.shiftRightUnsigned=function(u){if(e.isLong(u)&&(u=u.toInt()),u&=63,u===0)return this;var h=this.high;if(u<32){var d=this.low;return e.fromBits(d>>>u|h<<32-u,h>>>u,this.unsigned)}else return u===32?e.fromBits(h,0,this.unsigned):e.fromBits(h>>>u-32,0,this.unsigned)},e.prototype.shru=e.prototype.shiftRightUnsigned,e.prototype.toSigned=function(){return this.unsigned?new e(this.low,this.high,!1):this},e.prototype.toUnsigned=function(){return this.unsigned?this:new e(this.low,this.high,!0)},e})})(ri),Object.defineProperty(yt,"__esModule",{value:!0}),yt.Hyper=void 0;var aA=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Au=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},oA=ri.exports,vr=Su(oA),uA=R,fA=Su(uA);function Su(r){return r&&r.__esModule?r:{default:r}}function sA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function lA(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function cA(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var gr=yt.Hyper=function(r){cA(e,r),aA(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not a Hyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^-?\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=Au(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!1);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=Au(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!1);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return sA(this,e),lA(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!1))}return e}(vr.default);(0,fA.default)(gr),gr.MAX_VALUE=new gr(vr.default.MAX_VALUE.low,vr.default.MAX_VALUE.high),gr.MIN_VALUE=new gr(vr.default.MIN_VALUE.low,vr.default.MIN_VALUE.high);var Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.UnsignedInt=void 0;var hA=lt,Iu=Tu(hA),pA=R,yA=Tu(pA);function Tu(r){return r&&r.__esModule?r:{default:r}}var _r=Pe.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,Iu.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");if(e<0)throw new Error("XDR Write Error: negative number "+e);t.writeUInt32BE(e)},isValid:function(e){return!(0,Iu.default)(e)||Math.floor(e)!==e?!1:e>=_r.MIN_VALUE&&e<=_r.MAX_VALUE}};_r.MAX_VALUE=Math.pow(2,32)-1,_r.MIN_VALUE=0,(0,yA.default)(_r);var dt={};Object.defineProperty(dt,"__esModule",{value:!0}),dt.UnsignedHyper=void 0;var dA=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),xu=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},vA=ri.exports,mr=Pu(vA),gA=R,_A=Pu(gA);function Pu(r){return r&&r.__esModule?r:{default:r}}function mA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function bA(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function wA(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var br=dt.UnsignedHyper=function(r){wA(e,r),dA(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not an UnsignedHyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=xu(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!0);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=xu(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!0);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return mA(this,e),bA(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!0))}return e}(mr.default);(0,_A.default)(br),br.MAX_VALUE=new br(mr.default.MAX_UNSIGNED_VALUE.low,mr.default.MAX_UNSIGNED_VALUE.high),br.MIN_VALUE=new br(mr.default.MIN_VALUE.low,mr.default.MIN_VALUE.high);var vt={};Object.defineProperty(vt,"__esModule",{value:!0}),vt.Float=void 0;var $A=lt,Fu=Ru($A),EA=R,OA=Ru(EA);function Ru(r){return r&&r.__esModule?r:{default:r}}var AA=vt.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,Fu.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,Fu.default)(e)}};(0,OA.default)(AA);var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.Double=void 0;var SA=lt,Mu=Bu(SA),IA=R,TA=Bu(IA);function Bu(r){return r&&r.__esModule?r:{default:r}}var xA=gt.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,Mu.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,Mu.default)(e)}};(0,TA.default)(xA);var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.Quadruple=void 0;var PA=R,FA=RA(PA);function RA(r){return r&&r.__esModule?r:{default:r}}var MA=_t.Quadruple={read:function(){throw new Error("XDR Read Error: quadruple not supported")},write:function(){throw new Error("XDR Write Error: quadruple not supported")},isValid:function(){return!1}};(0,FA.default)(MA);var wr={},BA=ne,UA=G,NA="[object Boolean]";function DA(r){return r===!0||r===!1||UA(r)&&BA(r)==NA}var LA=DA;Object.defineProperty(wr,"__esModule",{value:!0}),wr.Bool=void 0;var CA=LA,jA=Nu(CA),Uu=fe,kA=R,VA=Nu(kA);function Nu(r){return r&&r.__esModule?r:{default:r}}var qA=wr.Bool={read:function(e){var t=Uu.Int.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new Error("XDR Read Error: Got "+t+" when trying to read a bool")}},write:function(e,t){var n=e?1:0;return Uu.Int.write(n,t)},isValid:function(e){return(0,jA.default)(e)}};(0,VA.default)(qA);var mt={},GA=ne,HA=N,WA=G,XA="[object String]";function zA(r){return typeof r=="string"||!HA(r)&&WA(r)&&GA(r)==XA}var Du=zA;Object.defineProperty(mt,"__esModule",{value:!0}),mt.String=void 0;var YA=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),KA=Du,Lu=ti(KA),ZA=N,JA=ti(ZA),Cu=fe,QA=Pe,ju=xe,eS=R,rS=ti(eS);function ti(r){return r&&r.__esModule?r:{default:r}}function tS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var nS=mt.String=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:QA.UnsignedInt.MAX_VALUE;tS(this,r),this._maxLength=e}return YA(r,[{key:"read",value:function(t){var n=Cu.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length String,"+("max allowed is "+this._maxLength));var i=(0,ju.calculatePadding)(n),a=t.slice(n);return(0,ju.slicePadding)(t,i),a.buffer()}},{key:"readString",value:function(t){return this.read(t).toString("utf8")}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));var i=void 0;(0,Lu.default)(t)?i=y.from(t,"utf8"):i=y.from(t),Cu.Int.write(i.length,n),n.writeBufferPadded(i)}},{key:"isValid",value:function(t){var n=void 0;if((0,Lu.default)(t))n=y.from(t,"utf8");else if((0,JA.default)(t)||y.isBuffer(t))n=y.from(t);else return!1;return n.length<=this._maxLength}}]),r}();(0,rS.default)(nS.prototype);var bt={};Object.defineProperty(bt,"__esModule",{value:!0}),bt.Opaque=void 0;var iS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),ku=xe,aS=R,oS=uS(aS);function uS(r){return r&&r.__esModule?r:{default:r}}function fS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var sS=bt.Opaque=function(){function r(e){fS(this,r),this._length=e,this._padding=(0,ku.calculatePadding)(e)}return iS(r,[{key:"read",value:function(t){var n=t.slice(this._length);return(0,ku.slicePadding)(t,this._padding),n.buffer()}},{key:"write",value:function(t,n){if(t.length!==this._length)throw new Error("XDR Write Error: Got "+t.length+" bytes, expected "+this._length);n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length===this._length}}]),r}();(0,oS.default)(sS.prototype);var wt={};Object.defineProperty(wt,"__esModule",{value:!0}),wt.VarOpaque=void 0;var lS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Vu=fe,cS=Pe,qu=xe,hS=R,pS=yS(hS);function yS(r){return r&&r.__esModule?r:{default:r}}function dS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var vS=wt.VarOpaque=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cS.UnsignedInt.MAX_VALUE;dS(this,r),this._maxLength=e}return lS(r,[{key:"read",value:function(t){var n=Vu.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length VarOpaque,"+("max allowed is "+this._maxLength));var i=(0,qu.calculatePadding)(n),a=t.slice(n);return(0,qu.slicePadding)(t,i),a.buffer()}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));Vu.Int.write(t.length,n),n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length<=this._maxLength}}]),r}();(0,pS.default)(vS.prototype);var $t={},Fe={exports:{}},gS=jr;function _S(r){return typeof r=="function"?r:gS}var Gu=_S,mS=gi,bS=Kn,wS=Gu,$S=N;function ES(r,e){var t=$S(r)?mS:bS;return t(r,wS(e))}var OS=ES;(function(r){r.exports=OS})(Fe);var AS=Go,SS=/^\s+/;function IS(r){return r&&r.slice(0,AS(r)+1).replace(SS,"")}var TS=IS,xS=TS,Hu=ce,PS=Lr,Wu=0/0,FS=/^[-+]0x[0-9a-f]+$/i,RS=/^0b[01]+$/i,MS=/^0o[0-7]+$/i,BS=parseInt;function US(r){if(typeof r=="number")return r;if(PS(r))return Wu;if(Hu(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Hu(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=xS(r);var t=RS.test(r);return t||MS.test(r)?BS(r.slice(2),t?2:8):FS.test(r)?Wu:+r}var NS=US,DS=NS,Xu=1/0,LS=17976931348623157e292;function CS(r){if(!r)return r===0?r:0;if(r=DS(r),r===Xu||r===-Xu){var e=r<0?-1:1;return e*LS}return r===r?r:0}var jS=CS,kS=jS;function VS(r){var e=kS(r),t=e%1;return e===e?t?e-t:e:0}var qS=VS,GS=$i,HS=Gu,WS=qS,XS=9007199254740991,ni=4294967295,zS=Math.min;function YS(r,e){if(r=WS(r),r<1||r>XS)return[];var t=ni,n=zS(r,ni);e=HS(e),r-=ni;for(var i=GS(n,e);++t<r;)e(t);return i}var zu=YS;Object.defineProperty($t,"__esModule",{value:!0}),$t.Array=void 0;var KS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),ZS=Qn,JS=$r(ZS),QS=Fe.exports,eI=$r(QS),rI=zu,tI=$r(rI),nI=N,Yu=$r(nI),iI=R,aI=$r(iI);function $r(r){return r&&r.__esModule?r:{default:r}}function oI(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var uI=$t.Array=function(){function r(e,t){oI(this,r),this._childType=e,this._length=t}return KS(r,[{key:"read",value:function(t){var n=this;return(0,tI.default)(this._length,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,Yu.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length!==this._length)throw new Error("XDR Write Error: Got array of size "+t.length+","+("expected "+this._length));(0,eI.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,Yu.default)(t)||t.length!==this._length?!1:(0,JS.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,aI.default)(uI.prototype);var Et={};Object.defineProperty(Et,"__esModule",{value:!0}),Et.VarArray=void 0;var fI=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),sI=Qn,lI=Er(sI),cI=Fe.exports,hI=Er(cI),pI=zu,yI=Er(pI),dI=N,Ku=Er(dI),vI=Pe,Zu=fe,gI=R,_I=Er(gI);function Er(r){return r&&r.__esModule?r:{default:r}}function mI(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var bI=Et.VarArray=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vI.UnsignedInt.MAX_VALUE;mI(this,r),this._childType=e,this._maxLength=t}return fI(r,[{key:"read",value:function(t){var n=this,i=Zu.Int.read(t);if(i>this._maxLength)throw new Error("XDR Read Error: Saw "+i+" length VarArray,"+("max allowed is "+this._maxLength));return(0,yI.default)(i,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,Ku.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length>this._maxLength)throw new Error("XDR Write Error: Got array of size "+t.length+","+("max allowed is "+this._maxLength));Zu.Int.write(t.length,n),(0,hI.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,Ku.default)(t)||t.length>this._maxLength?!1:(0,lI.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,_I.default)(bI.prototype);var Ot={};function wI(r){return r===null}var $I=wI;function EI(r){return r===void 0}var Or=EI;Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.Option=void 0;var OI=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),AI=$I,Ju=ii(AI),SI=Or,Qu=ii(SI),ef=wr,II=R,TI=ii(II);function ii(r){return r&&r.__esModule?r:{default:r}}function xI(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var PI=Ot.Option=function(){function r(e){xI(this,r),this._childType=e}return OI(r,[{key:"read",value:function(t){if(ef.Bool.read(t))return this._childType.read(t)}},{key:"write",value:function(t,n){var i=!((0,Ju.default)(t)||(0,Qu.default)(t));ef.Bool.write(i,n),i&&this._childType.write(t,n)}},{key:"isValid",value:function(t){return(0,Ju.default)(t)||(0,Qu.default)(t)?!0:this._childType.isValid(t)}}]),r}();(0,TI.default)(PI.prototype);var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.Void=void 0;var FI=Or,rf=tf(FI),RI=R,MI=tf(RI);function tf(r){return r&&r.__esModule?r:{default:r}}var BI=Ar.Void={read:function(){},write:function(e){if(!(0,rf.default)(e))throw new Error("XDR Write Error: trying to write value to a void slot")},isValid:function(e){return(0,rf.default)(e)}};(0,MI.default)(BI);var At={},UI=xr;function NI(r,e){return UI(e,function(t){return r[t]})}var DI=NI,LI=DI,CI=Le;function jI(r){return r==null?[]:LI(r,CI(r))}var kI=jI;Object.defineProperty(At,"__esModule",{value:!0}),At.Enum=void 0;var VI=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),qI=Fe.exports,GI=ai(qI),HI=kI,WI=ai(HI),nf=fe,XI=R,zI=ai(XI);function ai(r){return r&&r.__esModule?r:{default:r}}function YI(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function KI(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function af(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var ZI=At.Enum=function(){function r(e,t){af(this,r),this.name=e,this.value=t}return VI(r,null,[{key:"read",value:function(t){var n=nf.Int.read(t);if(!this._byValue.has(n))throw new Error("XDR Read Error: Unknown "+this.enumName+" member for value "+n);return this._byValue.get(n)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: Unknown "+t+" is not a "+this.enumName);nf.Int.write(t.value,n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"members",value:function(){return this._members}},{key:"values",value:function(){return(0,WI.default)(this._members)}},{key:"fromName",value:function(t){var n=this._members[t];if(!n)throw new Error(t+" is not a member of "+this.enumName);return n}},{key:"fromValue",value:function(t){var n=this._byValue.get(t);if(!n)throw new Error(t+" is not a value of any member of "+this.enumName);return n}},{key:"create",value:function(t,n,i){var a=function(o){KI(f,o);function f(){return af(this,f),YI(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);return a.enumName=n,t.results[n]=a,a._members={},a._byValue=new Map,(0,GI.default)(i,function(o,f){var s=new a(f,o);a._members[f]=s,a._byValue.set(o,s),a[f]=function(){return s}}),a}}]),r}();(0,zI.default)(ZI);var St={},JI=Kn,QI=rr;function eT(r,e){var t=-1,n=QI(r)?Array(r.length):[];return JI(r,function(i,a,o){n[++t]=e(i,a,o)}),n}var rT=eT,tT=xr,nT=mu,iT=rT,aT=N;function oT(r,e){var t=aT(r)?tT:iT;return t(r,nT(e))}var uT=oT;function fT(r){for(var e=-1,t=r==null?0:r.length,n={};++e<t;){var i=r[e];n[i[0]]=i[1]}return n}var sT=fT,Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});var lT=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function cT(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}Sr.Reference=function(){function r(){cT(this,r)}return lT(r,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),r}(),Object.defineProperty(St,"__esModule",{value:!0}),St.Struct=void 0;var It=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var f=e[Symbol.iterator](),s;!(i=(s=f.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&f.return&&f.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),hT=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),pT=Fe.exports,of=Ir(pT),yT=uT,dT=Ir(yT),vT=Or,gT=Ir(vT),_T=sT,mT=Ir(_T),bT=Sr,wT=R,$T=Ir(wT);function Ir(r){return r&&r.__esModule?r:{default:r}}function ET(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function OT(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function uf(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var AT=St.Struct=function(){function r(e){uf(this,r),this._attributes=e||{}}return hT(r,null,[{key:"read",value:function(t){var n=(0,dT.default)(this._fields,function(i){var a=It(i,2),o=a[0],f=a[1],s=f.read(t);return[o,s]});return new this((0,mT.default)(n))}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.structName);(0,of.default)(this._fields,function(i){var a=It(i,2),o=a[0],f=a[1],s=t._attributes[o];f.write(s,n)})}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(o){OT(f,o);function f(){return uf(this,f),ET(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);return a.structName=n,t.results[n]=a,a._fields=i.map(function(o){var f=It(o,2),s=f[0],l=f[1];return l instanceof bT.Reference&&(l=l.resolve(t)),[s,l]}),(0,of.default)(a._fields,function(o){var f=It(o,1),s=f[0];a.prototype[s]=ST(s)}),a}}]),r}();(0,$T.default)(AT);function ST(r){return function(t){return(0,gT.default)(t)||(this._attributes[r]=t),this._attributes[r]}}var Tt={};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.Union=void 0;var IT=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var f=e[Symbol.iterator](),s;!(i=(s=f.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&f.return&&f.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),TT=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),xT=Fe.exports,xt=Ft(xT),PT=Or,ff=Ft(PT),FT=Du,sf=Ft(FT),Pt=Ar,oi=Sr,RT=R,MT=Ft(RT);function Ft(r){return r&&r.__esModule?r:{default:r}}function BT(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function UT(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function lf(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var NT=Tt.Union=function(){function r(e,t){lf(this,r),this.set(e,t)}return TT(r,[{key:"set",value:function(t,n){(0,sf.default)(t)&&(t=this.constructor._switchOn.fromName(t)),this._switch=t,this._arm=this.constructor.armForSwitch(this._switch),this._armType=this.constructor.armTypeForArm(this._arm),this._value=n}},{key:"get",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._arm;if(this._arm!==Pt.Void&&this._arm!==t)throw new Error(t+" not set");return this._value}},{key:"switch",value:function(){return this._switch}},{key:"arm",value:function(){return this._arm}},{key:"armType",value:function(){return this._armType}},{key:"value",value:function(){return this._value}}],[{key:"armForSwitch",value:function(t){if(this._switches.has(t))return this._switches.get(t);if(this._defaultArm)return this._defaultArm;throw new Error("Bad union switch: "+t)}},{key:"armTypeForArm",value:function(t){return t===Pt.Void?Pt.Void:this._arms[t]}},{key:"read",value:function(t){var n=this._switchOn.read(t),i=this.armForSwitch(n),a=this.armTypeForArm(i),o=void 0;return(0,ff.default)(a)?o=i.read(t):o=a.read(t),new this(n,o)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.unionName);this._switchOn.write(t.switch(),n),t.armType().write(t.value(),n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(f){UT(s,f);function s(){return lf(this,s),BT(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return s}(r);a.unionName=n,t.results[n]=a,i.switchOn instanceof oi.Reference?a._switchOn=i.switchOn.resolve(t):a._switchOn=i.switchOn,a._switches=new Map,a._arms={},(0,xt.default)(i.arms,function(f,s){f instanceof oi.Reference&&(f=f.resolve(t)),a._arms[s]=f});var o=i.defaultArm;return o instanceof oi.Reference&&(o=o.resolve(t)),a._defaultArm=o,(0,xt.default)(i.switches,function(f){var s=IT(f,2),l=s[0],c=s[1];(0,sf.default)(l)&&(l=a._switchOn.fromName(l)),a._switches.set(l,c)}),(0,ff.default)(a._switchOn.values)||(0,xt.default)(a._switchOn.values(),function(f){a[f.name]=function(s){return new a(f,s)},a.prototype[f.name]=function(l){return this.set(f,l)}}),(0,xt.default)(a._arms,function(f,s){f!==Pt.Void&&(a.prototype[s]=function(){return this.get(s)})}),a}}]),r}();(0,MT.default)(NT),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=fe;Object.keys(e).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return e[p]}})});var t=yt;Object.keys(t).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return t[p]}})});var n=Pe;Object.keys(n).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return n[p]}})});var i=dt;Object.keys(i).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return i[p]}})});var a=vt;Object.keys(a).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return a[p]}})});var o=gt;Object.keys(o).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return o[p]}})});var f=_t;Object.keys(f).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return f[p]}})});var s=wr;Object.keys(s).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return s[p]}})});var l=mt;Object.keys(l).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return l[p]}})});var c=bt;Object.keys(c).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return c[p]}})});var u=wt;Object.keys(u).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return u[p]}})});var h=$t;Object.keys(h).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return h[p]}})});var d=Et;Object.keys(d).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return d[p]}})});var _=Ot;Object.keys(_).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return _[p]}})});var E=Ar;Object.keys(E).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return E[p]}})});var $=At;Object.keys($).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return $[p]}})});var b=St;Object.keys(b).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return b[p]}})});var S=Tt;Object.keys(S).forEach(function(p){p==="default"||p==="__esModule"||Object.defineProperty(r,p,{enumerable:!0,get:function(){return S[p]}})})}(Yn);var cf={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function m(v,g){for(var w=0;w<g.length;w++){var O=g[w];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(v,O.key,O)}}return function(v,g,w){return g&&m(v.prototype,g),w&&m(v,w),v}}(),t=Sr;Object.keys(t).forEach(function(m){m==="default"||m==="__esModule"||Object.defineProperty(r,m,{enumerable:!0,get:function(){return t[m]}})}),r.config=_;var n=Or,i=c(n),a=Fe.exports,o=c(a),f=Yn,s=l(f);function l(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&(v[g]=m[g]);return v.default=m,v}function c(m){return m&&m.__esModule?m:{default:m}}function u(m,v){if(!(m instanceof v))throw new TypeError("Cannot call a class as a function")}function h(m,v){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:m}function d(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);m.prototype=Object.create(v&&v.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(m,v):m.__proto__=v)}function _(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(m){var g=new F(v);m(g),g.resolve()}return v}var E=function(m){d(v,m);function v(g){u(this,v);var w=h(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.name=g,w}return e(v,[{key:"resolve",value:function(w){var O=w.definitions[this.name];return O.resolve(w)}}]),v}(t.Reference),$=function(m){d(v,m);function v(g,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;u(this,v);var L=h(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return L.childReference=g,L.length=w,L.variable=O,L}return e(v,[{key:"resolve",value:function(w){var O=this.childReference,L=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),L instanceof t.Reference&&(L=L.resolve(w)),this.variable?new s.VarArray(O,L):new s.Array(O,L)}}]),v}(t.Reference),b=function(m){d(v,m);function v(g){u(this,v);var w=h(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.childReference=g,w.name=g.name,w}return e(v,[{key:"resolve",value:function(w){var O=this.childReference;return O instanceof t.Reference&&(O=O.resolve(w)),new s.Option(O)}}]),v}(t.Reference),S=function(m){d(v,m);function v(g,w){u(this,v);var O=h(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return O.sizedType=g,O.length=w,O}return e(v,[{key:"resolve",value:function(w){var O=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),new this.sizedType(O)}}]),v}(t.Reference),p=function(){function m(v,g,w){u(this,m),this.constructor=v,this.name=g,this.config=w}return e(m,[{key:"resolve",value:function(g){return this.name in g.results?g.results[this.name]:this.constructor(g,this.name,this.config)}}]),m}();function A(m,v,g){return g instanceof t.Reference&&(g=g.resolve(m)),m.results[v]=g,g}function T(m,v,g){return m.results[v]=g,g}var F=function(){function m(v){u(this,m),this._destination=v,this._definitions={}}return e(m,[{key:"enum",value:function(g,w){var O=new p(s.Enum.create,g,w);this.define(g,O)}},{key:"struct",value:function(g,w){var O=new p(s.Struct.create,g,w);this.define(g,O)}},{key:"union",value:function(g,w){var O=new p(s.Union.create,g,w);this.define(g,O)}},{key:"typedef",value:function(g,w){var O=new p(A,g,w);this.define(g,O)}},{key:"const",value:function(g,w){var O=new p(T,g,w);this.define(g,O)}},{key:"void",value:function(){return s.Void}},{key:"bool",value:function(){return s.Bool}},{key:"int",value:function(){return s.Int}},{key:"hyper",value:function(){return s.Hyper}},{key:"uint",value:function(){return s.UnsignedInt}},{key:"uhyper",value:function(){return s.UnsignedHyper}},{key:"float",value:function(){return s.Float}},{key:"double",value:function(){return s.Double}},{key:"quadruple",value:function(){return s.Quadruple}},{key:"string",value:function(g){return new S(s.String,g)}},{key:"opaque",value:function(g){return new S(s.Opaque,g)}},{key:"varOpaque",value:function(g){return new S(s.VarOpaque,g)}},{key:"array",value:function(g,w){return new $(g,w)}},{key:"varArray",value:function(g,w){return new $(g,w,!0)}},{key:"option",value:function(g){return new b(g)}},{key:"define",value:function(g,w){if((0,i.default)(this._destination[g]))this._definitions[g]=w;else throw new Error("XDRTypes Error:"+g+" is already defined")}},{key:"lookup",value:function(g){return new E(g)}},{key:"resolve",value:function(){var g=this;(0,o.default)(this._definitions,function(w){w.resolve({definitions:g._definitions,results:g._destination})})}}]),m}()})(cf),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=Yn;Object.keys(e).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[n]}})});var t=cf;Object.keys(t).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})}(eu),Object.defineProperty(st,"__esModule",{value:!0}),st.xdr=void 0;const DT=(0,eu.config)(r=>{r.enum("EnvelopeType",{envelopeTypeBundle:0}),r.typedef("Uint32",r.uint()),r.typedef("Uint64",r.uhyper()),r.union("BundleItemExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("BundleItem",[["collectionId",r.lookup("Uint64")],["productId",r.lookup("Uint64")],["variantId",r.lookup("Uint64")],["sku",r.string()],["quantity",r.lookup("Uint32")],["ext",r.lookup("BundleItemExt")]]),r.union("BundleExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("Bundle",[["variantId",r.lookup("Uint64")],["items",r.varArray(r.lookup("BundleItem"),500)],["version",r.lookup("Uint32")],["ext",r.lookup("BundleExt")]]),r.union("BundleEnvelope",{switchOn:r.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeBundle","v1"]],arms:{v1:r.lookup("Bundle")}})});st.xdr=DT,Object.defineProperty(ue,"__esModule",{value:!0}),ue.decodeToLegacyBoxOrder=ue.encodeLegacyBoxOrder=ue.toBundle=pf=ue.toLineItemProperty=void 0;const ee=st;function hf(r){let e={variantId:ee.xdr.Uint64.fromString(r.variantId.toString()),version:r.version||Math.floor(Date.now()/1e3),items:r.items.map(n=>new ee.xdr.BundleItem({collectionId:ee.xdr.Uint64.fromString(n.collectionId.toString()),productId:ee.xdr.Uint64.fromString(n.productId.toString()),variantId:ee.xdr.Uint64.fromString(n.variantId.toString()),sku:n.sku||"",quantity:n.quantity,ext:new ee.xdr.BundleItemExt(0)})),ext:new ee.xdr.BundleExt(0)};const t=new ee.xdr.Bundle(e);return ee.xdr.BundleEnvelope.envelopeTypeBundle(t).toXDR("base64")}var pf=ue.toLineItemProperty=hf;function yf(r){const e=ee.xdr.BundleEnvelope.fromXDR(r,"base64").v1();return{variantId:e.variantId().toString(),version:e.version(),items:e.items().map(t=>({collectionId:t.collectionId().toString(),productId:t.productId().toString(),variantId:t.variantId().toString(),sku:t.sku().toString(),quantity:t.quantity()}))}}ue.toBundle=yf;function LT(r,e,t=1){const n={variantId:r.toString(),version:t,items:[]};for(const i in e)if(Object.hasOwnProperty.call(e,i)){const a=e[i];n.items.push({collectionId:a.dsId.toString(),productId:a.pId.toString(),variantId:a.vId.toString(),sku:a.sku||"",quantity:a.qty})}return hf(n)}ue.encodeLegacyBoxOrder=LT;function CT(r){let e={};try{yf(r).items.forEach(n=>{e[n.variantId]={dsId:n.collectionId,pId:Number.parseInt(n.productId),vId:Number.parseInt(n.variantId),sku:n.sku,qty:n.quantity}})}catch{e=JSON.parse(y.from(r,"base64").toString())}return e}ue.decodeToLegacyBoxOrder=CT;const df="/tools/recurring/bundling-storefront-manager";function jT(){return Math.ceil(Date.now()/1e3)}async function kT(r){const e=`https://${Ze().storeIdentifier}${df}/t`;try{const{timestamp:t}=await r("get",e,{headers:{"X-Recharge-App":"storefront-client"}});return t}catch(t){return console.error(`Fetch failed: ${t}. Using client-side date.`),jT()}}const VT=async r=>{const e=Ze();if(!await vf(r))throw new Error("Bundle selection is invalid.");const t=await kT(Q),n=pf({variantId:r.externalVariantId,version:t,items:r.selections.map(i=>({collectionId:i.collectionId,productId:i.externalProductId,variantId:i.externalVariantId,quantity:i.quantity,sku:""}))});try{const i=`https://${e.storeIdentifier}${df}/api/v1/bundles`,a=await Q("post",i,{data:{bundle:n},headers:{"Content-Type":"application/json",Origin:`https://${e.storeIdentifier}`,"X-Recharge-App":"storefront-client"}});if(!a.id||a.code!==200)throw new Error(`1: failed generating rb_id: ${JSON.stringify(a)}`);return a.id}catch(i){throw new Error(`2: failed generating rb_id ${i}`)}},vf=async r=>{try{const e=await Jo(r.externalProductId);return!!r&&!!e}catch{return console.error("Error fetching bundle settings"),!1}};var qT=Object.freeze({__proto__:null,getBundleId:VT,validateBundle:vf});const GT={get(r,e){return Q("get",r,e)},post(r,e){return Q("post",r,e)},put(r,e){return Q("put",r,e)},delete(r,e){return Q("delete",r,e)}};function HT(r){x1({storeIdentifier:r.storeIdentifier,environment:r.environment?r.environment:"prod"}),Qo()}return{init:HT,api:GT,cdn:M1,bundle:qT}});
|
|
24
24
|
//# sourceMappingURL=recharge-storefront-client.min.js.map
|