@rechargeapps/storefront-client 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/subscription.js +50 -0
- package/dist/cjs/api/subscription.js.map +1 -1
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/mappers/subscription.js +141 -0
- package/dist/cjs/mappers/subscription.js.map +1 -0
- package/dist/cjs/mappers/utils.js +7 -0
- package/dist/cjs/mappers/utils.js.map +1 -1
- package/dist/esm/api/subscription.js +45 -1
- package/dist/esm/api/subscription.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/mappers/subscription.js +131 -0
- package/dist/esm/mappers/subscription.js.map +1 -0
- package/dist/esm/mappers/utils.js +7 -1
- package/dist/esm/mappers/utils.js.map +1 -1
- package/dist/index.d.ts +68 -1
- package/dist/umd/recharge-client.min.js +12 -10
- package/package.json +1 -1
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* recharge-client-0.
|
|
2
|
+
* recharge-client-0.29.0.min.js
|
|
3
3
|
* Copyright (c) Recharge
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
(function(
|
|
7
|
-
`)===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}ui.call(_e.prototype);function H(r,e){if(!(this instanceof H))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 B(e.headers),this.url=e.url||"",this._initBody(r)}ui.call(H.prototype),H.prototype.clone=function(){return new H(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new B(this.headers),url:this.url})},H.error=function(){var r=new H(null,{status:0,statusText:""});return r.type="error",r};var fs=[301,302,303,307,308];H.redirect=function(r,e){if(fs.indexOf(e)===-1)throw new RangeError("Invalid status code");return new H(null,{status:e,headers:{location:r}})};var me=L.DOMException;try{new me}catch{me=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},me.prototype=Object.create(Error.prototype),me.prototype.constructor=me}function si(r,e){return new Promise(function(t,n){var i=new _e(r,e);if(i.signal&&i.signal.aborted)return n(new me("Aborted","AbortError"));var a=new XMLHttpRequest;function o(){a.abort()}a.onload=function(){var f={status:a.status,statusText:a.statusText,headers:ss(a.getAllResponseHeaders()||"")};f.url="responseURL"in a?a.responseURL:f.headers.get("X-Request-URL");var c="response"in a?a.response:a.responseText;setTimeout(function(){t(new H(c,f))},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 me("Aborted","AbortError"))},0)};function s(f){try{return f===""&&L.location.href?L.location.href:f}catch{return f}}a.open(i.method,s(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 B)?Object.getOwnPropertyNames(e.headers).forEach(function(f){a.setRequestHeader(f,Mt(e.headers[f]))}):i.headers.forEach(function(f,c){a.setRequestHeader(c,f)}),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)})}si.polyfill=!0,L.fetch||(L.fetch=si,L.Headers=B,L.Request=_e,L.Response=H),self.fetch.bind(self);var cs=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},fi=typeof Symbol<"u"&&Symbol,ls=cs,ps=function(){return typeof fi!="function"||typeof Symbol!="function"||typeof fi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ls()},hs="Function.prototype.bind called on incompatible ",Ut=Array.prototype.slice,ds=Object.prototype.toString,ys="[object Function]",vs=function(e){var t=this;if(typeof t!="function"||ds.call(t)!==ys)throw new TypeError(hs+t);for(var n=Ut.call(arguments,1),i,a=function(){if(this instanceof i){var p=t.apply(this,n.concat(Ut.call(arguments)));return Object(p)===p?p:this}else return t.apply(e,n.concat(Ut.call(arguments)))},o=Math.max(0,t.length-n.length),s=[],f=0;f<o;f++)s.push("$"+f);if(i=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var c=function(){};c.prototype=t.prototype,i.prototype=new c,c.prototype=null}return i},gs=vs,Nt=Function.prototype.bind||gs,_s=Nt,ms=_s.call(Function.call,Object.prototype.hasOwnProperty),I,Fe=SyntaxError,ci=Function,Re=TypeError,Ct=function(r){try{return ci('"use strict"; return ('+r+").constructor;")()}catch{}},we=Object.getOwnPropertyDescriptor;if(we)try{we({},"")}catch{we=null}var Lt=function(){throw new Re},ws=we?function(){try{return arguments.callee,Lt}catch{try{return we(arguments,"callee").get}catch{return Lt}}}():Lt,Me=ps(),ce=Object.getPrototypeOf||function(r){return r.__proto__},Be={},bs=typeof Uint8Array>"u"?I:ce(Uint8Array),De={"%AggregateError%":typeof AggregateError>"u"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?I:ArrayBuffer,"%ArrayIteratorPrototype%":Me?ce([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":Be,"%AsyncGenerator%":Be,"%AsyncGeneratorFunction%":Be,"%AsyncIteratorPrototype%":Be,"%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%":ci,"%GeneratorFunction%":Be,"%Int8Array%":typeof Int8Array>"u"?I:Int8Array,"%Int16Array%":typeof Int16Array>"u"?I:Int16Array,"%Int32Array%":typeof Int32Array>"u"?I:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Me?ce(ce([][Symbol.iterator]())):I,"%JSON%":typeof JSON=="object"?JSON:I,"%Map%":typeof Map>"u"?I:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Me?I:ce(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"||!Me?I:ce(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?I:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Me?ce(""[Symbol.iterator]()):I,"%Symbol%":Me?Symbol:I,"%SyntaxError%":Fe,"%ThrowTypeError%":ws,"%TypedArray%":bs,"%TypeError%":Re,"%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},$s=function r(e){var t;if(e==="%AsyncFunction%")t=Ct("async function () {}");else if(e==="%GeneratorFunction%")t=Ct("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Ct("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&(t=ce(i.prototype))}return De[e]=t,t},li={"%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"]},Ze=Nt,Ir=ms,Es=Ze.call(Function.call,Array.prototype.concat),As=Ze.call(Function.apply,Array.prototype.splice),pi=Ze.call(Function.call,String.prototype.replace),Pr=Ze.call(Function.call,String.prototype.slice),Os=Ze.call(Function.call,RegExp.prototype.exec),Ss=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ts=/\\(\\)?/g,Is=function(e){var t=Pr(e,0,1),n=Pr(e,-1);if(t==="%"&&n!=="%")throw new Fe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Fe("invalid intrinsic syntax, expected opening `%`");var i=[];return pi(e,Ss,function(a,o,s,f){i[i.length]=s?pi(f,Ts,"$1"):o||a}),i},Ps=function(e,t){var n=e,i;if(Ir(li,n)&&(i=li[n],n="%"+i[0]+"%"),Ir(De,n)){var a=De[n];if(a===Be&&(a=$s(n)),typeof a>"u"&&!t)throw new Re("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Fe("intrinsic "+e+" does not exist!")},jt=function(e,t){if(typeof e!="string"||e.length===0)throw new Re("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Re('"allowMissing" argument must be a boolean');if(Os(/^%?[^%]*%?$/,e)===null)throw new Fe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Is(e),i=n.length>0?n[0]:"",a=Ps("%"+i+"%",t),o=a.name,s=a.value,f=!1,c=a.alias;c&&(i=c[0],As(n,Es([0,1],c)));for(var p=1,u=!0;p<n.length;p+=1){var l=n[p],y=Pr(l,0,1),_=Pr(l,-1);if((y==='"'||y==="'"||y==="`"||_==='"'||_==="'"||_==="`")&&y!==_)throw new Fe("property names with quotes must have matching quotes");if((l==="constructor"||!u)&&(f=!0),i+="."+l,o="%"+i+"%",Ir(De,o))s=De[o];else if(s!=null){if(!(l in s)){if(!t)throw new Re("base intrinsic for "+e+" exists, but the property is not available.");return}if(we&&p+1>=n.length){var E=we(s,l);u=!!E,u&&"get"in E&&!("originalValue"in E.get)?s=E.get:s=s[l]}else u=Ir(s,l),s=s[l];u&&!f&&(De[o]=s)}}return s},hi={exports:{}};(function(r){var e=Nt,t=jt,n=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(i,n),o=t("%Object.getOwnPropertyDescriptor%",!0),s=t("%Object.defineProperty%",!0),f=t("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}r.exports=function(u){var l=a(e,i,arguments);if(o&&s){var y=o(l,"length");y.configurable&&s(l,"length",{value:1+f(0,u.length-(arguments.length-1))})}return l};var c=function(){return a(e,n,arguments)};s?s(r.exports,"apply",{value:c}):r.exports.apply=c})(hi);var di=jt,yi=hi.exports,xs=yi(di("String.prototype.indexOf")),Fs=function(e,t){var n=di(e,!!t);return typeof n=="function"&&xs(e,".prototype.")>-1?yi(n):n},Ue=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},X=[],V=[],Rs=typeof Uint8Array<"u"?Uint8Array:Array,kt=!1;function vi(){kt=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)X[e]=r[e],V[r.charCodeAt(e)]=e;V["-".charCodeAt(0)]=62,V["_".charCodeAt(0)]=63}function Ms(r){kt||vi();var e,t,n,i,a,o,s=r.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=r[s-2]==="="?2:r[s-1]==="="?1:0,o=new Rs(s*3/4-a),n=a>0?s-4:s;var f=0;for(e=0,t=0;e<n;e+=4,t+=3)i=V[r.charCodeAt(e)]<<18|V[r.charCodeAt(e+1)]<<12|V[r.charCodeAt(e+2)]<<6|V[r.charCodeAt(e+3)],o[f++]=i>>16&255,o[f++]=i>>8&255,o[f++]=i&255;return a===2?(i=V[r.charCodeAt(e)]<<2|V[r.charCodeAt(e+1)]>>4,o[f++]=i&255):a===1&&(i=V[r.charCodeAt(e)]<<10|V[r.charCodeAt(e+1)]<<4|V[r.charCodeAt(e+2)]>>2,o[f++]=i>>8&255,o[f++]=i&255),o}function Bs(r){return X[r>>18&63]+X[r>>12&63]+X[r>>6&63]+X[r&63]}function Ds(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(Bs(n));return i.join("")}function gi(r){kt||vi();for(var e,t=r.length,n=t%3,i="",a=[],o=16383,s=0,f=t-n;s<f;s+=o)a.push(Ds(r,s,s+o>f?f:s+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 xr(r,e,t,n,i){var a,o,s=i*8-n-1,f=(1<<s)-1,c=f>>1,p=-7,u=t?i-1:0,l=t?-1:1,y=r[e+u];for(u+=l,a=y&(1<<-p)-1,y>>=-p,p+=s;p>0;a=a*256+r[e+u],u+=l,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=n;p>0;o=o*256+r[e+u],u+=l,p-=8);if(a===0)a=1-c;else{if(a===f)return o?NaN:(y?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-c}return(y?-1:1)*o*Math.pow(2,a-n)}function _i(r,e,t,n,i,a){var o,s,f,c=a*8-i-1,p=(1<<c)-1,u=p>>1,l=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=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?(s=isNaN(e)?1:0,o=p):(o=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-o))<1&&(o--,f*=2),o+u>=1?e+=l/f:e+=l*Math.pow(2,1-u),e*f>=2&&(o++,f/=2),o+u>=p?(s=0,o=p):o+u>=1?(s=(e*f-1)*Math.pow(2,i),o=o+u):(s=e*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;r[t+y]=s&255,y+=_,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;r[t+y]=o&255,y+=_,o/=256,c-=8);r[t+y-_]|=E*128}var Us={}.toString,mi=Array.isArray||function(r){return Us.call(r)=="[object Array]"};/*!
|
|
6
|
+
(function(ne,Ke){typeof exports=="object"&&typeof module<"u"?module.exports=Ke():typeof define=="function"&&define.amd?define(Ke):(ne=typeof globalThis<"u"?globalThis:ne||self,ne.recharge=Ke())})(this,function(){"use strict";var ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ke(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}var L=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof L<"u"&&L,k={searchParams:"URLSearchParams"in L,iterable:"Symbol"in L&&"iterator"in Symbol,blob:"FileReader"in L&&"Blob"in L&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in L,arrayBuffer:"ArrayBuffer"in L};function tf(r){return r&&DataView.prototype.isPrototypeOf(r)}if(k.arrayBuffer)var nf=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],af=ArrayBuffer.isView||function(r){return r&&nf.indexOf(Object.prototype.toString.call(r))>-1};function Ze(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 kt(r){return typeof r!="string"&&(r=String(r)),r}function qt(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 D(r){this.map={},r instanceof D?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)}D.prototype.append=function(r,e){r=Ze(r),e=kt(e);var t=this.map[r];this.map[r]=t?t+", "+e:e},D.prototype.delete=function(r){delete this.map[Ze(r)]},D.prototype.get=function(r){return r=Ze(r),this.has(r)?this.map[r]:null},D.prototype.has=function(r){return this.map.hasOwnProperty(Ze(r))},D.prototype.set=function(r,e){this.map[Ze(r)]=kt(e)},D.prototype.forEach=function(r,e){for(var t in this.map)this.map.hasOwnProperty(t)&&r.call(e,this.map[t],t,this)},D.prototype.keys=function(){var r=[];return this.forEach(function(e,t){r.push(t)}),qt(r)},D.prototype.values=function(){var r=[];return this.forEach(function(e){r.push(e)}),qt(r)},D.prototype.entries=function(){var r=[];return this.forEach(function(e,t){r.push([t,e])}),qt(r)},k.iterable&&(D.prototype[Symbol.iterator]=D.prototype.entries);function Gt(r){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}function Oi(r){return new Promise(function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}})}function of(r){var e=new FileReader,t=Oi(e);return e.readAsArrayBuffer(r),t}function uf(r){var e=new FileReader,t=Oi(e);return e.readAsText(r),t}function sf(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 Si(r){if(r.slice)return r.slice(0);var e=new Uint8Array(r.byteLength);return e.set(new Uint8Array(r)),e.buffer}function Ii(){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&&tf(r)?(this._bodyArrayBuffer=Si(r.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):k.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(r)||af(r))?this._bodyArrayBuffer=Si(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=Gt(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=Gt(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(of)}),this.text=function(){var r=Gt(this);if(r)return r;if(this._bodyBlob)return uf(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(sf(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(lf)}),this.json=function(){return this.text().then(JSON.parse)},this}var ff=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function cf(r){var e=r.toUpperCase();return ff.indexOf(e)>-1?e:r}function _e(r,e){if(!(this instanceof _e))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 _e){if(r.bodyUsed)throw new TypeError("Already read");this.url=r.url,this.credentials=r.credentials,e.headers||(this.headers=new D(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 D(e.headers)),this.method=cf(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()}}}_e.prototype.clone=function(){return new _e(this,{body:this._bodyInit})};function lf(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 pf(r){var e=new D,t=r.replace(/\r?\n[\t ]+/g," ");return t.split("\r").map(function(n){return n.indexOf(`
|
|
7
|
+
`)===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}Ii.call(_e.prototype);function Y(r,e){if(!(this instanceof Y))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 D(e.headers),this.url=e.url||"",this._initBody(r)}Ii.call(Y.prototype),Y.prototype.clone=function(){return new Y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new D(this.headers),url:this.url})},Y.error=function(){var r=new Y(null,{status:0,statusText:""});return r.type="error",r};var hf=[301,302,303,307,308];Y.redirect=function(r,e){if(hf.indexOf(e)===-1)throw new RangeError("Invalid status code");return new Y(null,{status:e,headers:{location:r}})};var me=L.DOMException;try{new me}catch{me=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},me.prototype=Object.create(Error.prototype),me.prototype.constructor=me}function Pi(r,e){return new Promise(function(t,n){var i=new _e(r,e);if(i.signal&&i.signal.aborted)return n(new me("Aborted","AbortError"));var a=new XMLHttpRequest;function o(){a.abort()}a.onload=function(){var f={status:a.status,statusText:a.statusText,headers:pf(a.getAllResponseHeaders()||"")};f.url="responseURL"in a?a.responseURL:f.headers.get("X-Request-URL");var c="response"in a?a.response:a.responseText;setTimeout(function(){t(new Y(c,f))},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 me("Aborted","AbortError"))},0)};function s(f){try{return f===""&&L.location.href?L.location.href:f}catch{return f}}a.open(i.method,s(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 D)?Object.getOwnPropertyNames(e.headers).forEach(function(f){a.setRequestHeader(f,kt(e.headers[f]))}):i.headers.forEach(function(f,c){a.setRequestHeader(c,f)}),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)})}Pi.polyfill=!0,L.fetch||(L.fetch=Pi,L.Headers=D,L.Request=_e,L.Response=Y),self.fetch.bind(self);var df=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},Ti=typeof Symbol<"u"&&Symbol,yf=df,vf=function(){return typeof Ti!="function"||typeof Symbol!="function"||typeof Ti("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:yf()},gf="Function.prototype.bind called on incompatible ",Wt=Array.prototype.slice,_f=Object.prototype.toString,mf="[object Function]",wf=function(e){var t=this;if(typeof t!="function"||_f.call(t)!==mf)throw new TypeError(gf+t);for(var n=Wt.call(arguments,1),i,a=function(){if(this instanceof i){var l=t.apply(this,n.concat(Wt.call(arguments)));return Object(l)===l?l:this}else return t.apply(e,n.concat(Wt.call(arguments)))},o=Math.max(0,t.length-n.length),s=[],f=0;f<o;f++)s.push("$"+f);if(i=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var c=function(){};c.prototype=t.prototype,i.prototype=new c,c.prototype=null}return i},bf=wf,Vt=Function.prototype.bind||bf,$f=Vt,Af=$f.call(Function.call,Object.prototype.hasOwnProperty),T,Fe=SyntaxError,xi=Function,Me=TypeError,Ht=function(r){try{return xi('"use strict"; return ('+r+").constructor;")()}catch{}},we=Object.getOwnPropertyDescriptor;if(we)try{we({},"")}catch{we=null}var zt=function(){throw new Me},Ef=we?function(){try{return arguments.callee,zt}catch{try{return we(arguments,"callee").get}catch{return zt}}}():zt,De=vf(),pe=Object.getPrototypeOf||function(r){return r.__proto__},Be={},Of=typeof Uint8Array>"u"?T:pe(Uint8Array),Ne={"%AggregateError%":typeof AggregateError>"u"?T:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?T:ArrayBuffer,"%ArrayIteratorPrototype%":De?pe([][Symbol.iterator]()):T,"%AsyncFromSyncIteratorPrototype%":T,"%AsyncFunction%":Be,"%AsyncGenerator%":Be,"%AsyncGeneratorFunction%":Be,"%AsyncIteratorPrototype%":Be,"%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%":xi,"%GeneratorFunction%":Be,"%Int8Array%":typeof Int8Array>"u"?T:Int8Array,"%Int16Array%":typeof Int16Array>"u"?T:Int16Array,"%Int32Array%":typeof Int32Array>"u"?T:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":De?pe(pe([][Symbol.iterator]())):T,"%JSON%":typeof JSON=="object"?JSON:T,"%Map%":typeof Map>"u"?T:Map,"%MapIteratorPrototype%":typeof Map>"u"||!De?T:pe(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"||!De?T:pe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?T:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":De?pe(""[Symbol.iterator]()):T,"%Symbol%":De?Symbol:T,"%SyntaxError%":Fe,"%ThrowTypeError%":Ef,"%TypedArray%":Of,"%TypeError%":Me,"%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},Sf=function r(e){var t;if(e==="%AsyncFunction%")t=Ht("async function () {}");else if(e==="%GeneratorFunction%")t=Ht("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Ht("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&(t=pe(i.prototype))}return Ne[e]=t,t},Ri={"%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"]},Je=Vt,xr=Af,If=Je.call(Function.call,Array.prototype.concat),Pf=Je.call(Function.apply,Array.prototype.splice),Fi=Je.call(Function.call,String.prototype.replace),Rr=Je.call(Function.call,String.prototype.slice),Tf=Je.call(Function.call,RegExp.prototype.exec),xf=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Rf=/\\(\\)?/g,Ff=function(e){var t=Rr(e,0,1),n=Rr(e,-1);if(t==="%"&&n!=="%")throw new Fe("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Fe("invalid intrinsic syntax, expected opening `%`");var i=[];return Fi(e,xf,function(a,o,s,f){i[i.length]=s?Fi(f,Rf,"$1"):o||a}),i},Mf=function(e,t){var n=e,i;if(xr(Ri,n)&&(i=Ri[n],n="%"+i[0]+"%"),xr(Ne,n)){var a=Ne[n];if(a===Be&&(a=Sf(n)),typeof a>"u"&&!t)throw new Me("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Fe("intrinsic "+e+" does not exist!")},Xt=function(e,t){if(typeof e!="string"||e.length===0)throw new Me("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Me('"allowMissing" argument must be a boolean');if(Tf(/^%?[^%]*%?$/,e)===null)throw new Fe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ff(e),i=n.length>0?n[0]:"",a=Mf("%"+i+"%",t),o=a.name,s=a.value,f=!1,c=a.alias;c&&(i=c[0],Pf(n,If([0,1],c)));for(var l=1,u=!0;l<n.length;l+=1){var p=n[l],d=Rr(p,0,1),_=Rr(p,-1);if((d==='"'||d==="'"||d==="`"||_==='"'||_==="'"||_==="`")&&d!==_)throw new Fe("property names with quotes must have matching quotes");if((p==="constructor"||!u)&&(f=!0),i+="."+p,o="%"+i+"%",xr(Ne,o))s=Ne[o];else if(s!=null){if(!(p in s)){if(!t)throw new Me("base intrinsic for "+e+" exists, but the property is not available.");return}if(we&&l+1>=n.length){var $=we(s,p);u=!!$,u&&"get"in $&&!("originalValue"in $.get)?s=$.get:s=s[p]}else u=xr(s,p),s=s[p];u&&!f&&(Ne[o]=s)}}return s},Mi={exports:{}};(function(r){var e=Vt,t=Xt,n=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(i,n),o=t("%Object.getOwnPropertyDescriptor%",!0),s=t("%Object.defineProperty%",!0),f=t("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}r.exports=function(u){var p=a(e,i,arguments);if(o&&s){var d=o(p,"length");d.configurable&&s(p,"length",{value:1+f(0,u.length-(arguments.length-1))})}return p};var c=function(){return a(e,n,arguments)};s?s(r.exports,"apply",{value:c}):r.exports.apply=c})(Mi);var Di=Xt,Bi=Mi.exports,Df=Bi(Di("String.prototype.indexOf")),Bf=function(e,t){var n=Di(e,!!t);return typeof n=="function"&&Df(e,".prototype.")>-1?Bi(n):n},Ue=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},K=[],W=[],Nf=typeof Uint8Array<"u"?Uint8Array:Array,Yt=!1;function Ni(){Yt=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)K[e]=r[e],W[r.charCodeAt(e)]=e;W["-".charCodeAt(0)]=62,W["_".charCodeAt(0)]=63}function Uf(r){Yt||Ni();var e,t,n,i,a,o,s=r.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=r[s-2]==="="?2:r[s-1]==="="?1:0,o=new Nf(s*3/4-a),n=a>0?s-4:s;var f=0;for(e=0,t=0;e<n;e+=4,t+=3)i=W[r.charCodeAt(e)]<<18|W[r.charCodeAt(e+1)]<<12|W[r.charCodeAt(e+2)]<<6|W[r.charCodeAt(e+3)],o[f++]=i>>16&255,o[f++]=i>>8&255,o[f++]=i&255;return a===2?(i=W[r.charCodeAt(e)]<<2|W[r.charCodeAt(e+1)]>>4,o[f++]=i&255):a===1&&(i=W[r.charCodeAt(e)]<<10|W[r.charCodeAt(e+1)]<<4|W[r.charCodeAt(e+2)]>>2,o[f++]=i>>8&255,o[f++]=i&255),o}function Cf(r){return K[r>>18&63]+K[r>>12&63]+K[r>>6&63]+K[r&63]}function Lf(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(Cf(n));return i.join("")}function Ui(r){Yt||Ni();for(var e,t=r.length,n=t%3,i="",a=[],o=16383,s=0,f=t-n;s<f;s+=o)a.push(Lf(r,s,s+o>f?f:s+o));return n===1?(e=r[t-1],i+=K[e>>2],i+=K[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=K[e>>10],i+=K[e>>4&63],i+=K[e<<2&63],i+="="),a.push(i),a.join("")}function Fr(r,e,t,n,i){var a,o,s=i*8-n-1,f=(1<<s)-1,c=f>>1,l=-7,u=t?i-1:0,p=t?-1:1,d=r[e+u];for(u+=p,a=d&(1<<-l)-1,d>>=-l,l+=s;l>0;a=a*256+r[e+u],u+=p,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=o*256+r[e+u],u+=p,l-=8);if(a===0)a=1-c;else{if(a===f)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-c}return(d?-1:1)*o*Math.pow(2,a-n)}function Ci(r,e,t,n,i,a){var o,s,f,c=a*8-i-1,l=(1<<c)-1,u=l>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,_=n?1:-1,$=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-o))<1&&(o--,f*=2),o+u>=1?e+=p/f:e+=p*Math.pow(2,1-u),e*f>=2&&(o++,f/=2),o+u>=l?(s=0,o=l):o+u>=1?(s=(e*f-1)*Math.pow(2,i),o=o+u):(s=e*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;r[t+d]=s&255,d+=_,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;r[t+d]=o&255,d+=_,o/=256,c-=8);r[t+d-_]|=$*128}var jf={}.toString,Li=Array.isArray||function(r){return jf.call(r)=="[object Array]"};/*!
|
|
8
8
|
* The buffer module from node.js, for the browser.
|
|
9
9
|
*
|
|
10
10
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
11
11
|
* @license MIT
|
|
12
|
-
*/var Ns=50;d.TYPED_ARRAY_SUPPORT=Ue.TYPED_ARRAY_SUPPORT!==void 0?Ue.TYPED_ARRAY_SUPPORT:!0,Fr();function Fr(){return d.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function te(r,e){if(Fr()<e)throw new RangeError("Invalid typed array length");return d.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=d.prototype):(r===null&&(r=new d(e)),r.length=e),r}function d(r,e,t){if(!d.TYPED_ARRAY_SUPPORT&&!(this instanceof d))return new d(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 qt(this,r)}return wi(this,r,e,t)}d.poolSize=8192,d._augment=function(r){return r.__proto__=d.prototype,r};function wi(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?js(r,e,t,n):typeof e=="string"?Ls(r,e,t):ks(r,e)}d.from=function(r,e,t){return wi(null,r,e,t)},d.TYPED_ARRAY_SUPPORT&&(d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array);function bi(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 Cs(r,e,t,n){return bi(e),e<=0?te(r,e):t!==void 0?typeof n=="string"?te(r,e).fill(t,n):te(r,e).fill(t):te(r,e)}d.alloc=function(r,e,t){return Cs(null,r,e,t)};function qt(r,e){if(bi(e),r=te(r,e<0?0:Gt(e)|0),!d.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}d.allocUnsafe=function(r){return qt(null,r)},d.allocUnsafeSlow=function(r){return qt(null,r)};function Ls(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!d.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=$i(e,t)|0;r=te(r,n);var i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function Vt(r,e){var t=e.length<0?0:Gt(e.length)|0;r=te(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function js(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),d.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=d.prototype):r=Vt(r,e),r}function ks(r,e){if(z(e)){var t=Gt(e.length)|0;return r=te(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"||uf(e.length)?te(r,0):Vt(r,e);if(e.type==="Buffer"&&mi(e.data))return Vt(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Gt(r){if(r>=Fr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Fr().toString(16)+" bytes");return r|0}d.isBuffer=sf;function z(r){return!!(r!=null&&r._isBuffer)}d.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},d.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}},d.concat=function(e,t){if(!mi(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return d.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=d.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 $i(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 Br(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Fi(r).length;default:if(n)return Br(r).length;e=(""+e).toLowerCase(),n=!0}}d.byteLength=$i;function qs(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 Js(this,e,t);case"utf8":case"utf-8":return Si(this,e,t);case"ascii":return Ks(this,e,t);case"latin1":case"binary":return Zs(this,e,t);case"base64":return zs(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qs(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}d.prototype._isBuffer=!0;function be(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}d.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)be(this,t,t+1);return this},d.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)be(this,t,t+3),be(this,t+1,t+2);return this},d.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)be(this,t,t+7),be(this,t+1,t+6),be(this,t+2,t+5),be(this,t+3,t+4);return this},d.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Si(this,0,e):qs.apply(this,arguments)},d.prototype.equals=function(e){if(!z(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:d.compare(this,e)===0},d.prototype.inspect=function(){var e="",t=Ns;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},d.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,s=n-t,f=Math.min(o,s),c=this.slice(i,a),p=e.slice(t,n),u=0;u<f;++u)if(c[u]!==p[u]){o=c[u],s=p[u];break}return o<s?-1:s<o?1:0};function Ei(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=d.from(e,n)),z(e))return e.length===0?-1:Ai(r,e,t,n,i);if(typeof e=="number")return e=e&255,d.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Ai(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Ai(r,e,t,n,i){var a=1,o=r.length,s=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,s/=2,t/=2}function f(y,_){return a===1?y[_]:y.readUInt16BE(_*a)}var c;if(i){var p=-1;for(c=t;c<o;c++)if(f(r,c)===f(e,p===-1?0:c-p)){if(p===-1&&(p=c),c-p+1===s)return p*a}else p!==-1&&(c-=c-p),p=-1}else for(t+s>o&&(t=o-s),c=t;c>=0;c--){for(var u=!0,l=0;l<s;l++)if(f(r,c+l)!==f(e,l)){u=!1;break}if(u)return c}return-1}d.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},d.prototype.indexOf=function(e,t,n){return Ei(this,e,t,n,!0)},d.prototype.lastIndexOf=function(e,t,n){return Ei(this,e,t,n,!1)};function Vs(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 s=parseInt(e.substr(o*2,2),16);if(isNaN(s))return o;r[t+o]=s}return o}function Gs(r,e,t,n){return Dr(Br(e,r.length-t),r,t,n)}function Oi(r,e,t,n){return Dr(af(e),r,t,n)}function Ws(r,e,t,n){return Oi(r,e,t,n)}function Hs(r,e,t,n){return Dr(Fi(e),r,t,n)}function Xs(r,e,t,n){return Dr(of(e,r.length-t),r,t,n)}d.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 Vs(this,e,t,n);case"utf8":case"utf-8":return Gs(this,e,t,n);case"ascii":return Oi(this,e,t,n);case"latin1":case"binary":return Ws(this,e,t,n);case"base64":return Hs(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xs(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function zs(r,e,t){return e===0&&t===r.length?gi(r):gi(r.slice(e,t))}function Si(r,e,t){t=Math.min(r.length,t);for(var n=[],i=e;i<t;){var a=r[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=t){var f,c,p,u;switch(s){case 1:a<128&&(o=a);break;case 2:f=r[i+1],(f&192)===128&&(u=(a&31)<<6|f&63,u>127&&(o=u));break;case 3:f=r[i+1],c=r[i+2],(f&192)===128&&(c&192)===128&&(u=(a&15)<<12|(f&63)<<6|c&63,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:f=r[i+1],c=r[i+2],p=r[i+3],(f&192)===128&&(c&192)===128&&(p&192)===128&&(u=(a&15)<<18|(f&63)<<12|(c&63)<<6|p&63,u>65535&&u<1114112&&(o=u))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return Ys(n)}var Ti=4096;function Ys(r){var e=r.length;if(e<=Ti)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=Ti));return t}function Ks(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 Zs(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 Js(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+=nf(r[a]);return i}function Qs(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}d.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(d.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=d.prototype;else{var a=t-e;i=new d(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+e]}return i};function D(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")}d.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||D(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return i},d.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||D(e,t,this.length);for(var i=this[e+--t],a=1;t>0&&(a*=256);)i+=this[e+--t]*a;return i},d.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},d.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},d.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||D(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},d.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||D(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},d.prototype.readInt8=function(e,t){return t||D(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},d.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},d.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},d.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),xr(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),xr(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),xr(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),xr(this,e,!1,52,8)};function q(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")}d.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;q(this,e,t,n,a,0)}var o=1,s=0;for(this[t]=e&255;++s<n&&(o*=256);)this[t+s]=e/o&255;return t+n},d.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;q(this,e,t,n,a,0)}var o=n-1,s=1;for(this[t+o]=e&255;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+n},d.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,1,255,0),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};function Rr(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}d.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Rr(this,e,t,!0),t+2},d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Rr(this,e,t,!1),t+2};function Mr(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}d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):Mr(this,e,t,!0),t+4},d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Mr(this,e,t,!1),t+4},d.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);q(this,e,t,n,a-1,-a)}var o=0,s=1,f=0;for(this[t]=e&255;++o<n&&(s*=256);)e<0&&f===0&&this[t+o-1]!==0&&(f=1),this[t+o]=(e/s>>0)-f&255;return t+n},d.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);q(this,e,t,n,a-1,-a)}var o=n-1,s=1,f=0;for(this[t+o]=e&255;--o>=0&&(s*=256);)e<0&&f===0&&this[t+o+1]!==0&&(f=1),this[t+o]=(e/s>>0)-f&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,1,127,-128),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Rr(this,e,t,!0),t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Rr(this,e,t,!1),t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Mr(this,e,t,!0),t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Mr(this,e,t,!1),t+4};function Ii(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 Pi(r,e,t,n,i){return i||Ii(r,e,t,4),_i(r,e,t,n,23,4),t+4}d.prototype.writeFloatLE=function(e,t,n){return Pi(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return Pi(this,e,t,!1,n)};function xi(r,e,t,n,i){return i||Ii(r,e,t,8),_i(r,e,t,n,52,8),t+8}d.prototype.writeDoubleLE=function(e,t,n){return xi(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return xi(this,e,t,!1,n)},d.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||!d.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},d.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"&&!d.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 s=z(e)?e:Br(new d(e,i).toString()),f=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%f]}return this};var ef=/[^+\/0-9A-Za-z-_]/g;function rf(r){if(r=tf(r).replace(ef,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function tf(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function nf(r){return r<16?"0"+r.toString(16):r.toString(16)}function Br(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 af(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function of(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 Fi(r){return Ms(rf(r))}function Dr(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 uf(r){return r!==r}function sf(r){return r!=null&&(!!r._isBuffer||Ri(r)||ff(r))}function Ri(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function ff(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Ri(r.slice(0,0))}function Mi(){throw new Error("setTimeout has not been defined")}function Bi(){throw new Error("clearTimeout has not been defined")}var le=Mi,pe=Bi;typeof Ue.setTimeout=="function"&&(le=setTimeout),typeof Ue.clearTimeout=="function"&&(pe=clearTimeout);function Di(r){if(le===setTimeout)return setTimeout(r,0);if((le===Mi||!le)&&setTimeout)return le=setTimeout,setTimeout(r,0);try{return le(r,0)}catch{try{return le.call(null,r,0)}catch{return le.call(this,r,0)}}}function cf(r){if(pe===clearTimeout)return clearTimeout(r);if((pe===Bi||!pe)&&clearTimeout)return pe=clearTimeout,clearTimeout(r);try{return pe(r)}catch{try{return pe.call(null,r)}catch{return pe.call(this,r)}}}var ne=[],Ne=!1,$e,Ur=-1;function lf(){!Ne||!$e||(Ne=!1,$e.length?ne=$e.concat(ne):Ur=-1,ne.length&&Ui())}function Ui(){if(!Ne){var r=Di(lf);Ne=!0;for(var e=ne.length;e;){for($e=ne,ne=[];++Ur<e;)$e&&$e[Ur].run();Ur=-1,e=ne.length}$e=null,Ne=!1,cf(r)}}function pf(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];ne.push(new Ni(r,e)),ne.length===1&&!Ne&&Di(Ui)}function Ni(r,e){this.fun=r,this.array=e}Ni.prototype.run=function(){this.fun.apply(null,this.array)};var hf="browser",df="browser",yf=!0,vf={},gf=[],_f="",mf={},wf={},bf={};function Ee(){}var $f=Ee,Ef=Ee,Af=Ee,Of=Ee,Sf=Ee,Tf=Ee,If=Ee;function Pf(r){throw new Error("process.binding is not supported")}function xf(){return"/"}function Ff(r){throw new Error("process.chdir is not supported")}function Rf(){return 0}var Ce=Ue.performance||{},Mf=Ce.now||Ce.mozNow||Ce.msNow||Ce.oNow||Ce.webkitNow||function(){return new Date().getTime()};function Bf(r){var e=Mf.call(Ce)*.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 Df=new Date;function Uf(){var r=new Date,e=r-Df;return e/1e3}var Nr={nextTick:pf,title:hf,browser:yf,env:vf,argv:gf,version:_f,versions:mf,on:$f,addListener:Ef,once:Af,off:Of,removeListener:Sf,removeAllListeners:Tf,emit:If,binding:Pf,cwd:xf,chdir:Ff,umask:Rf,hrtime:Bf,platform:df,release:wf,config:bf,uptime:Uf},Wt;typeof Object.create=="function"?Wt=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Wt=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};var Ci=Wt,Nf=/%[sdj%]/g;function Cr(r){if(!Qe(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(Nf,function(s){if(s==="%%")return"%";if(t>=i)return s;switch(s){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 s}}),o=n[t];t<i;o=n[++t])Je(o)||!Ae(o)?a+=" "+o:a+=" "+Y(o);return a}function Ht(r,e){if(K(Ue.process))return function(){return Ht(r,e).apply(this,arguments)};if(Nr.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(Nr.throwDeprecation)throw new Error(e);Nr.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}var Lr={},Xt;function Li(r){if(K(Xt)&&(Xt=Nr.env.NODE_DEBUG||""),r=r.toUpperCase(),!Lr[r])if(new RegExp("\\b"+r+"\\b","i").test(Xt)){var e=0;Lr[r]=function(){var t=Cr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else Lr[r]=function(){};return Lr[r]}function Y(r,e){var t={seen:[],stylize:Lf};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),kr(e)?t.showHidden=e:e&&en(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=Cf),jr(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 Cf(r,e){var t=Y.styles[e];return t?"\x1B["+Y.colors[t][0]+"m"+r+"\x1B["+Y.colors[t][1]+"m":r}function Lf(r,e){return r}function jf(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function jr(r,e,t){if(r.customInspect&&e&&tr(e.inspect)&&e.inspect!==Y&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return Qe(n)||(n=jr(r,n,t)),n}var i=kf(r,e);if(i)return i;var a=Object.keys(e),o=jf(a);if(r.showHidden&&(a=Object.getOwnPropertyNames(e)),rr(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return zt(e);if(a.length===0){if(tr(e)){var s=e.name?": "+e.name:"";return r.stylize("[Function"+s+"]","special")}if(er(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(qr(e))return r.stylize(Date.prototype.toString.call(e),"date");if(rr(e))return zt(e)}var f="",c=!1,p=["{","}"];if(Kt(e)&&(c=!0,p=["[","]"]),tr(e)){var u=e.name?": "+e.name:"";f=" [Function"+u+"]"}if(er(e)&&(f=" "+RegExp.prototype.toString.call(e)),qr(e)&&(f=" "+Date.prototype.toUTCString.call(e)),rr(e)&&(f=" "+zt(e)),a.length===0&&(!c||e.length==0))return p[0]+f+p[1];if(t<0)return er(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var l;return c?l=qf(r,e,t,o,a):l=a.map(function(y){return Yt(r,e,t,o,y,c)}),r.seen.pop(),Vf(l,f,p)}function kf(r,e){if(K(e))return r.stylize("undefined","undefined");if(Qe(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(Zt(e))return r.stylize(""+e,"number");if(kr(e))return r.stylize(""+e,"boolean");if(Je(e))return r.stylize("null","null")}function zt(r){return"["+Error.prototype.toString.call(r)+"]"}function qf(r,e,t,n,i){for(var a=[],o=0,s=e.length;o<s;++o)Wi(e,String(o))?a.push(Yt(r,e,t,n,String(o),!0)):a.push("");return i.forEach(function(f){f.match(/^\d+$/)||a.push(Yt(r,e,t,n,f,!0))}),a}function Yt(r,e,t,n,i,a){var o,s,f;if(f=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},f.get?f.set?s=r.stylize("[Getter/Setter]","special"):s=r.stylize("[Getter]","special"):f.set&&(s=r.stylize("[Setter]","special")),Wi(n,i)||(o="["+i+"]"),s||(r.seen.indexOf(f.value)<0?(Je(t)?s=jr(r,f.value,null):s=jr(r,f.value,t-1),s.indexOf(`
|
|
12
|
+
*/var kf=50;y.TYPED_ARRAY_SUPPORT=Ue.TYPED_ARRAY_SUPPORT!==void 0?Ue.TYPED_ARRAY_SUPPORT:!0,Mr();function Mr(){return y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ie(r,e){if(Mr()<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 Kt(this,r)}return ji(this,r,e,t)}y.poolSize=8192,y._augment=function(r){return r.__proto__=y.prototype,r};function ji(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?Wf(r,e,t,n):typeof e=="string"?Gf(r,e,t):Vf(r,e)}y.from=function(r,e,t){return ji(null,r,e,t)},y.TYPED_ARRAY_SUPPORT&&(y.prototype.__proto__=Uint8Array.prototype,y.__proto__=Uint8Array);function ki(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 qf(r,e,t,n){return ki(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 qf(null,r,e,t)};function Kt(r,e){if(ki(e),r=ie(r,e<0?0:Jt(e)|0),!y.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}y.allocUnsafe=function(r){return Kt(null,r)},y.allocUnsafeSlow=function(r){return Kt(null,r)};function Gf(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=qi(e,t)|0;r=ie(r,n);var i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function Zt(r,e){var t=e.length<0?0:Jt(e.length)|0;r=ie(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Wf(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=Zt(r,e),r}function Vf(r,e){if(Z(e)){var t=Jt(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"||cc(e.length)?ie(r,0):Zt(r,e);if(e.type==="Buffer"&&Li(e.data))return Zt(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Jt(r){if(r>=Mr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Mr().toString(16)+" bytes");return r|0}y.isBuffer=lc;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(!Li(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 qi(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 Nr(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Zi(r).length;default:if(n)return Nr(r).length;e=(""+e).toLowerCase(),n=!0}}y.byteLength=qi;function Hf(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 tc(this,e,t);case"utf8":case"utf-8":return Hi(this,e,t);case"ascii":return ec(this,e,t);case"latin1":case"binary":return rc(this,e,t);case"base64":return Jf(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nc(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}y.prototype._isBuffer=!0;function be(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)be(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)be(this,t,t+3),be(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)be(this,t,t+7),be(this,t+1,t+6),be(this,t+2,t+5),be(this,t+3,t+4);return this},y.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Hi(this,0,e):Hf.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=kf;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,s=n-t,f=Math.min(o,s),c=this.slice(i,a),l=e.slice(t,n),u=0;u<f;++u)if(c[u]!==l[u]){o=c[u],s=l[u];break}return o<s?-1:s<o?1:0};function Gi(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:Wi(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):Wi(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Wi(r,e,t,n,i){var a=1,o=r.length,s=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,s/=2,t/=2}function f(d,_){return a===1?d[_]:d.readUInt16BE(_*a)}var c;if(i){var l=-1;for(c=t;c<o;c++)if(f(r,c)===f(e,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===s)return l*a}else l!==-1&&(c-=c-l),l=-1}else for(t+s>o&&(t=o-s),c=t;c>=0;c--){for(var u=!0,p=0;p<s;p++)if(f(r,c+p)!==f(e,p)){u=!1;break}if(u)return c}return-1}y.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},y.prototype.indexOf=function(e,t,n){return Gi(this,e,t,n,!0)},y.prototype.lastIndexOf=function(e,t,n){return Gi(this,e,t,n,!1)};function zf(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 s=parseInt(e.substr(o*2,2),16);if(isNaN(s))return o;r[t+o]=s}return o}function Xf(r,e,t,n){return Ur(Nr(e,r.length-t),r,t,n)}function Vi(r,e,t,n){return Ur(sc(e),r,t,n)}function Yf(r,e,t,n){return Vi(r,e,t,n)}function Kf(r,e,t,n){return Ur(Zi(e),r,t,n)}function Zf(r,e,t,n){return Ur(fc(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 zf(this,e,t,n);case"utf8":case"utf-8":return Xf(this,e,t,n);case"ascii":return Vi(this,e,t,n);case"latin1":case"binary":return Yf(this,e,t,n);case"base64":return Kf(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Zf(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 Jf(r,e,t){return e===0&&t===r.length?Ui(r):Ui(r.slice(e,t))}function Hi(r,e,t){t=Math.min(r.length,t);for(var n=[],i=e;i<t;){var a=r[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=t){var f,c,l,u;switch(s){case 1:a<128&&(o=a);break;case 2:f=r[i+1],(f&192)===128&&(u=(a&31)<<6|f&63,u>127&&(o=u));break;case 3:f=r[i+1],c=r[i+2],(f&192)===128&&(c&192)===128&&(u=(a&15)<<12|(f&63)<<6|c&63,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:f=r[i+1],c=r[i+2],l=r[i+3],(f&192)===128&&(c&192)===128&&(l&192)===128&&(u=(a&15)<<18|(f&63)<<12|(c&63)<<6|l&63,u>65535&&u<1114112&&(o=u))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return Qf(n)}var zi=4096;function Qf(r){var e=r.length;if(e<=zi)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=zi));return t}function ec(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 rc(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 tc(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+=uc(r[a]);return i}function nc(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 N(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||N(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||N(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||N(e,1,this.length),this[e]},y.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},y.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},y.prototype.readUInt32LE=function(e,t){return t||N(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||N(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||N(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||N(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||N(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},y.prototype.readInt16LE=function(e,t){t||N(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||N(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||N(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||N(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||N(e,4,this.length),Fr(this,e,!0,23,4)},y.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),Fr(this,e,!1,23,4)},y.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),Fr(this,e,!0,52,8)},y.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),Fr(this,e,!1,52,8)};function q(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;q(this,e,t,n,a,0)}var o=1,s=0;for(this[t]=e&255;++s<n&&(o*=256);)this[t+s]=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;q(this,e,t,n,a,0)}var o=n-1,s=1;for(this[t+o]=e&255;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+n},y.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,1,255,0),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};function Dr(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||q(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Dr(this,e,t,!0),t+2},y.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Dr(this,e,t,!1),t+2};function Br(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||q(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):Br(this,e,t,!0),t+4},y.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||q(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):Br(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);q(this,e,t,n,a-1,-a)}var o=0,s=1,f=0;for(this[t]=e&255;++o<n&&(s*=256);)e<0&&f===0&&this[t+o-1]!==0&&(f=1),this[t+o]=(e/s>>0)-f&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);q(this,e,t,n,a-1,-a)}var o=n-1,s=1,f=0;for(this[t+o]=e&255;--o>=0&&(s*=256);)e<0&&f===0&&this[t+o+1]!==0&&(f=1),this[t+o]=(e/s>>0)-f&255;return t+n},y.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||q(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||q(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Dr(this,e,t,!0),t+2},y.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Dr(this,e,t,!1),t+2},y.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||q(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):Br(this,e,t,!0),t+4},y.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||q(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):Br(this,e,t,!1),t+4};function Xi(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 Yi(r,e,t,n,i){return i||Xi(r,e,t,4),Ci(r,e,t,n,23,4),t+4}y.prototype.writeFloatLE=function(e,t,n){return Yi(this,e,t,!0,n)},y.prototype.writeFloatBE=function(e,t,n){return Yi(this,e,t,!1,n)};function Ki(r,e,t,n,i){return i||Xi(r,e,t,8),Ci(r,e,t,n,52,8),t+8}y.prototype.writeDoubleLE=function(e,t,n){return Ki(this,e,t,!0,n)},y.prototype.writeDoubleBE=function(e,t,n){return Ki(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 s=Z(e)?e:Nr(new y(e,i).toString()),f=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%f]}return this};var ic=/[^+\/0-9A-Za-z-_]/g;function ac(r){if(r=oc(r).replace(ic,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function oc(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function uc(r){return r<16?"0"+r.toString(16):r.toString(16)}function Nr(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 sc(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function fc(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 Zi(r){return Uf(ac(r))}function Ur(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 cc(r){return r!==r}function lc(r){return r!=null&&(!!r._isBuffer||Ji(r)||pc(r))}function Ji(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function pc(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Ji(r.slice(0,0))}function Qi(){throw new Error("setTimeout has not been defined")}function ea(){throw new Error("clearTimeout has not been defined")}var he=Qi,de=ea;typeof Ue.setTimeout=="function"&&(he=setTimeout),typeof Ue.clearTimeout=="function"&&(de=clearTimeout);function ra(r){if(he===setTimeout)return setTimeout(r,0);if((he===Qi||!he)&&setTimeout)return he=setTimeout,setTimeout(r,0);try{return he(r,0)}catch{try{return he.call(null,r,0)}catch{return he.call(this,r,0)}}}function hc(r){if(de===clearTimeout)return clearTimeout(r);if((de===ea||!de)&&clearTimeout)return de=clearTimeout,clearTimeout(r);try{return de(r)}catch{try{return de.call(null,r)}catch{return de.call(this,r)}}}var ae=[],Ce=!1,$e,Cr=-1;function dc(){!Ce||!$e||(Ce=!1,$e.length?ae=$e.concat(ae):Cr=-1,ae.length&&ta())}function ta(){if(!Ce){var r=ra(dc);Ce=!0;for(var e=ae.length;e;){for($e=ae,ae=[];++Cr<e;)$e&&$e[Cr].run();Cr=-1,e=ae.length}$e=null,Ce=!1,hc(r)}}function yc(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 na(r,e)),ae.length===1&&!Ce&&ra(ta)}function na(r,e){this.fun=r,this.array=e}na.prototype.run=function(){this.fun.apply(null,this.array)};var vc="browser",gc="browser",_c=!0,mc={},wc=[],bc="",$c={},Ac={},Ec={};function Ae(){}var Oc=Ae,Sc=Ae,Ic=Ae,Pc=Ae,Tc=Ae,xc=Ae,Rc=Ae;function Fc(r){throw new Error("process.binding is not supported")}function Mc(){return"/"}function Dc(r){throw new Error("process.chdir is not supported")}function Bc(){return 0}var Le=Ue.performance||{},Nc=Le.now||Le.mozNow||Le.msNow||Le.oNow||Le.webkitNow||function(){return new Date().getTime()};function Uc(r){var e=Nc.call(Le)*.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 Cc=new Date;function Lc(){var r=new Date,e=r-Cc;return e/1e3}var Lr={nextTick:yc,title:vc,browser:_c,env:mc,argv:wc,version:bc,versions:$c,on:Oc,addListener:Sc,once:Ic,off:Pc,removeListener:Tc,removeAllListeners:xc,emit:Rc,binding:Fc,cwd:Mc,chdir:Dc,umask:Bc,hrtime:Uc,platform:gc,release:Ac,config:Ec,uptime:Lc},Qt;typeof Object.create=="function"?Qt=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Qt=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};var ia=Qt,jc=/%[sdj%]/g;function jr(r){if(!er(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(J(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,i=n.length,a=String(r).replace(jc,function(s){if(s==="%%")return"%";if(t>=i)return s;switch(s){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 s}}),o=n[t];t<i;o=n[++t])Qe(o)||!Ee(o)?a+=" "+o:a+=" "+J(o);return a}function en(r,e){if(Q(Ue.process))return function(){return en(r,e).apply(this,arguments)};if(Lr.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(Lr.throwDeprecation)throw new Error(e);Lr.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}var kr={},rn;function aa(r){if(Q(rn)&&(rn=Lr.env.NODE_DEBUG||""),r=r.toUpperCase(),!kr[r])if(new RegExp("\\b"+r+"\\b","i").test(rn)){var e=0;kr[r]=function(){var t=jr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else kr[r]=function(){};return kr[r]}function J(r,e){var t={seen:[],stylize:qc};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),Gr(e)?t.showHidden=e:e&&fn(t,e),Q(t.showHidden)&&(t.showHidden=!1),Q(t.depth)&&(t.depth=2),Q(t.colors)&&(t.colors=!1),Q(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=kc),qr(t,r,t.depth)}J.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]},J.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function kc(r,e){var t=J.styles[e];return t?"\x1B["+J.colors[t][0]+"m"+r+"\x1B["+J.colors[t][1]+"m":r}function qc(r,e){return r}function Gc(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function qr(r,e,t){if(r.customInspect&&e&&nr(e.inspect)&&e.inspect!==J&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return er(n)||(n=qr(r,n,t)),n}var i=Wc(r,e);if(i)return i;var a=Object.keys(e),o=Gc(a);if(r.showHidden&&(a=Object.getOwnPropertyNames(e)),tr(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return tn(e);if(a.length===0){if(nr(e)){var s=e.name?": "+e.name:"";return r.stylize("[Function"+s+"]","special")}if(rr(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(Wr(e))return r.stylize(Date.prototype.toString.call(e),"date");if(tr(e))return tn(e)}var f="",c=!1,l=["{","}"];if(an(e)&&(c=!0,l=["[","]"]),nr(e)){var u=e.name?": "+e.name:"";f=" [Function"+u+"]"}if(rr(e)&&(f=" "+RegExp.prototype.toString.call(e)),Wr(e)&&(f=" "+Date.prototype.toUTCString.call(e)),tr(e)&&(f=" "+tn(e)),a.length===0&&(!c||e.length==0))return l[0]+f+l[1];if(t<0)return rr(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var p;return c?p=Vc(r,e,t,o,a):p=a.map(function(d){return nn(r,e,t,o,d,c)}),r.seen.pop(),Hc(p,f,l)}function Wc(r,e){if(Q(e))return r.stylize("undefined","undefined");if(er(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(on(e))return r.stylize(""+e,"number");if(Gr(e))return r.stylize(""+e,"boolean");if(Qe(e))return r.stylize("null","null")}function tn(r){return"["+Error.prototype.toString.call(r)+"]"}function Vc(r,e,t,n,i){for(var a=[],o=0,s=e.length;o<s;++o)la(e,String(o))?a.push(nn(r,e,t,n,String(o),!0)):a.push("");return i.forEach(function(f){f.match(/^\d+$/)||a.push(nn(r,e,t,n,f,!0))}),a}function nn(r,e,t,n,i,a){var o,s,f;if(f=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},f.get?f.set?s=r.stylize("[Getter/Setter]","special"):s=r.stylize("[Getter]","special"):f.set&&(s=r.stylize("[Setter]","special")),la(n,i)||(o="["+i+"]"),s||(r.seen.indexOf(f.value)<0?(Qe(t)?s=qr(r,f.value,null):s=qr(r,f.value,t-1),s.indexOf(`
|
|
13
13
|
`)>-1&&(a?s=s.split(`
|
|
14
14
|
`).map(function(c){return" "+c}).join(`
|
|
15
15
|
`).substr(2):s=`
|
|
16
16
|
`+s.split(`
|
|
17
17
|
`).map(function(c){return" "+c}).join(`
|
|
18
|
-
`))):s=r.stylize("[Circular]","special")),
|
|
18
|
+
`))):s=r.stylize("[Circular]","special")),Q(o)){if(a&&i.match(/^\d+$/))return s;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+": "+s}function Hc(r,e,t){var n=r.reduce(function(i,a){return a.indexOf(`
|
|
19
19
|
`)>=0,i+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?t[0]+(e===""?"":e+`
|
|
20
20
|
`)+" "+r.join(`,
|
|
21
|
-
`)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function Kt(r){return Array.isArray(r)}function kr(r){return typeof r=="boolean"}function Je(r){return r===null}function ji(r){return r==null}function Zt(r){return typeof r=="number"}function Qe(r){return typeof r=="string"}function ki(r){return typeof r=="symbol"}function K(r){return r===void 0}function er(r){return Ae(r)&&Jt(r)==="[object RegExp]"}function Ae(r){return typeof r=="object"&&r!==null}function qr(r){return Ae(r)&&Jt(r)==="[object Date]"}function rr(r){return Ae(r)&&(Jt(r)==="[object Error]"||r instanceof Error)}function tr(r){return typeof r=="function"}function qi(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}function Vi(r){return d.isBuffer(r)}function Jt(r){return Object.prototype.toString.call(r)}function Qt(r){return r<10?"0"+r.toString(10):r.toString(10)}var Gf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Wf(){var r=new Date,e=[Qt(r.getHours()),Qt(r.getMinutes()),Qt(r.getSeconds())].join(":");return[r.getDate(),Gf[r.getMonth()],e].join(" ")}function Gi(){console.log("%s - %s",Wf(),Cr.apply(null,arguments))}function en(r,e){if(!e||!Ae(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function Wi(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var Hf={inherits:Ci,_extend:en,log:Gi,isBuffer:Vi,isPrimitive:qi,isFunction:tr,isError:rr,isDate:qr,isObject:Ae,isRegExp:er,isUndefined:K,isSymbol:ki,isString:Qe,isNumber:Zt,isNullOrUndefined:ji,isNull:Je,isBoolean:kr,isArray:Kt,inspect:Y,deprecate:Ht,format:Cr,debuglog:Li},Xf=Object.freeze({__proto__:null,format:Cr,deprecate:Ht,debuglog:Li,inspect:Y,isArray:Kt,isBoolean:kr,isNull:Je,isNullOrUndefined:ji,isNumber:Zt,isString:Qe,isSymbol:ki,isUndefined:K,isRegExp:er,isObject:Ae,isDate:qr,isError:rr,isFunction:tr,isPrimitive:qi,isBuffer:Vi,log:Gi,inherits:Ci,_extend:en,default:Hf}),zf=Ye(Xf),Yf=zf.inspect,rn=typeof Map=="function"&&Map.prototype,tn=Object.getOwnPropertyDescriptor&&rn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Vr=rn&&tn&&typeof tn.get=="function"?tn.get:null,Kf=rn&&Map.prototype.forEach,nn=typeof Set=="function"&&Set.prototype,an=Object.getOwnPropertyDescriptor&&nn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Gr=nn&&an&&typeof an.get=="function"?an.get:null,Zf=nn&&Set.prototype.forEach,Jf=typeof WeakMap=="function"&&WeakMap.prototype,nr=Jf?WeakMap.prototype.has:null,Qf=typeof WeakSet=="function"&&WeakSet.prototype,ir=Qf?WeakSet.prototype.has:null,ec=typeof WeakRef=="function"&&WeakRef.prototype,Hi=ec?WeakRef.prototype.deref:null,rc=Boolean.prototype.valueOf,tc=Object.prototype.toString,nc=Function.prototype.toString,ic=String.prototype.match,on=String.prototype.slice,he=String.prototype.replace,ac=String.prototype.toUpperCase,Xi=String.prototype.toLowerCase,zi=RegExp.prototype.test,Yi=Array.prototype.concat,Z=Array.prototype.join,oc=Array.prototype.slice,Ki=Math.floor,un=typeof BigInt=="function"?BigInt.prototype.valueOf:null,sn=Object.getOwnPropertySymbols,fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Le=typeof Symbol=="function"&&typeof Symbol.iterator=="object",j=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Le?"object":"symbol")?Symbol.toStringTag:null,Zi=Object.prototype.propertyIsEnumerable,Ji=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Qi(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||zi.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Ki(-r):Ki(r);if(n!==r){var i=String(n),a=on.call(e,i.length+1);return he.call(i,t,"$&_")+"."+he.call(he.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return he.call(e,t,"$&_")}var cn=Yf,ea=cn.custom,ra=ia(ea)?ea:null,uc=function r(e,t,n,i){var a=t||{};if(de(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(de(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=de(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(de(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(de(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=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 oa(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var f=String(e);return s?Qi(e,f):f}if(typeof e=="bigint"){var c=String(e)+"n";return s?Qi(e,c):c}var p=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=p&&p>0&&typeof e=="object")return ln(e)?"[Array]":"[Object]";var u=Oc(a,n);if(typeof i>"u")i=[];else if(aa(i,e)>=0)return"[Circular]";function l(ee,ge,fe){if(ge&&(i=oc.call(i),i.push(ge)),fe){var Tr={depth:a.depth};return de(a,"quoteStyle")&&(Tr.quoteStyle=a.quoteStyle),r(ee,Tr,n+1,i)}return r(ee,a,n+1,i)}if(typeof e=="function"&&!na(e)){var y=vc(e),_=Wr(e,l);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(_.length>0?" { "+Z.call(_,", ")+" }":"")}if(ia(e)){var E=Le?he.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):fn.call(e);return typeof e=="object"&&!Le?ar(E):E}if($c(e)){for(var $="<"+Xi.call(String(e.nodeName)),w=e.attributes||[],T=0;T<w.length;T++)$+=" "+w[T].name+"="+ta(sc(w[T].value),"double",a);return $+=">",e.childNodes&&e.childNodes.length&&($+="..."),$+="</"+Xi.call(String(e.nodeName))+">",$}if(ln(e)){if(e.length===0)return"[]";var h=Wr(e,l);return u&&!Ac(h)?"["+hn(h,u)+"]":"[ "+Z.call(h,", ")+" ]"}if(cc(e)){var S=Wr(e,l);return!("cause"in Error.prototype)&&"cause"in e&&!Zi.call(e,"cause")?"{ ["+String(e)+"] "+Z.call(Yi.call("[cause]: "+l(e.cause),S),", ")+" }":S.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Z.call(S,", ")+" }"}if(typeof e=="object"&&o){if(ra&&typeof e[ra]=="function"&&cn)return cn(e,{depth:p-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(gc(e)){var P=[];return Kf.call(e,function(ee,ge){P.push(l(ge,e,!0)+" => "+l(ee,e))}),ua("Map",Vr.call(e),P,u)}if(wc(e)){var R=[];return Zf.call(e,function(ee){R.push(l(ee,e))}),ua("Set",Gr.call(e),R,u)}if(_c(e))return pn("WeakMap");if(bc(e))return pn("WeakSet");if(mc(e))return pn("WeakRef");if(pc(e))return ar(l(Number(e)));if(dc(e))return ar(l(un.call(e)));if(hc(e))return ar(rc.call(e));if(lc(e))return ar(l(String(e)));if(!fc(e)&&!na(e)){var m=Wr(e,l),v=Ji?Ji(e)===Object.prototype:e instanceof Object||e.constructor===Object,g=e instanceof Object?"":"null prototype",b=!v&&j&&Object(e)===e&&j in e?on.call(ye(e),8,-1):g?"Object":"",O=v||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",C=O+(b||g?"["+Z.call(Yi.call([],b||[],g||[]),": ")+"] ":"");return m.length===0?C+"{}":u?C+"{"+hn(m,u)+"}":C+"{ "+Z.call(m,", ")+" }"}return String(e)};function ta(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function sc(r){return he.call(String(r),/"/g,""")}function ln(r){return ye(r)==="[object Array]"&&(!j||!(typeof r=="object"&&j in r))}function fc(r){return ye(r)==="[object Date]"&&(!j||!(typeof r=="object"&&j in r))}function na(r){return ye(r)==="[object RegExp]"&&(!j||!(typeof r=="object"&&j in r))}function cc(r){return ye(r)==="[object Error]"&&(!j||!(typeof r=="object"&&j in r))}function lc(r){return ye(r)==="[object String]"&&(!j||!(typeof r=="object"&&j in r))}function pc(r){return ye(r)==="[object Number]"&&(!j||!(typeof r=="object"&&j in r))}function hc(r){return ye(r)==="[object Boolean]"&&(!j||!(typeof r=="object"&&j in r))}function ia(r){if(Le)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!fn)return!1;try{return fn.call(r),!0}catch{}return!1}function dc(r){if(!r||typeof r!="object"||!un)return!1;try{return un.call(r),!0}catch{}return!1}var yc=Object.prototype.hasOwnProperty||function(r){return r in this};function de(r,e){return yc.call(r,e)}function ye(r){return tc.call(r)}function vc(r){if(r.name)return r.name;var e=ic.call(nc.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function aa(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 gc(r){if(!Vr||!r||typeof r!="object")return!1;try{Vr.call(r);try{Gr.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function _c(r){if(!nr||!r||typeof r!="object")return!1;try{nr.call(r,nr);try{ir.call(r,ir)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function mc(r){if(!Hi||!r||typeof r!="object")return!1;try{return Hi.call(r),!0}catch{}return!1}function wc(r){if(!Gr||!r||typeof r!="object")return!1;try{Gr.call(r);try{Vr.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function bc(r){if(!ir||!r||typeof r!="object")return!1;try{ir.call(r,ir);try{nr.call(r,nr)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function $c(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function oa(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return oa(on.call(r,0,e.maxStringLength),e)+n}var i=he.call(he.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ec);return ta(i,"single",e)}function Ec(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":"")+ac.call(e.toString(16))}function ar(r){return"Object("+r+")"}function pn(r){return r+" { ? }"}function ua(r,e,t,n){var i=n?hn(t,n):Z.call(t,", ");return r+" ("+e+") {"+i+"}"}function Ac(r){for(var e=0;e<r.length;e++)if(aa(r[e],`
|
|
22
|
-
`)>=0)return!1;return!0}function
|
|
23
|
-
`+e.prev+e.base;return t+
|
|
24
|
-
`+e.prev}function Wr(r,e){var t=ln(r),n=[];if(t){n.length=r.length;for(var i=0;i<r.length;i++)n[i]=de(r,i)?e(r[i],r):""}var a=typeof sn=="function"?sn(r):[],o;if(Le){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var f in r)!de(r,f)||t&&String(Number(f))===f&&f<r.length||Le&&o["$"+f]instanceof Symbol||(zi.call(/[^\w$]/,f)?n.push(e(f,r)+": "+e(r[f],r)):n.push(f+": "+e(r[f],r)));if(typeof sn=="function")for(var c=0;c<a.length;c++)Zi.call(r,a[c])&&n.push("["+e(a[c])+"]: "+e(r[a[c]],r));return n}var dn=jt,je=Fs,Sc=uc,Tc=dn("%TypeError%"),Hr=dn("%WeakMap%",!0),Xr=dn("%Map%",!0),Ic=je("WeakMap.prototype.get",!0),Pc=je("WeakMap.prototype.set",!0),xc=je("WeakMap.prototype.has",!0),Fc=je("Map.prototype.get",!0),Rc=je("Map.prototype.set",!0),Mc=je("Map.prototype.has",!0),yn=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},Bc=function(r,e){var t=yn(r,e);return t&&t.value},Dc=function(r,e,t){var n=yn(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Uc=function(r,e){return!!yn(r,e)},Nc=function(){var e,t,n,i={assert:function(a){if(!i.has(a))throw new Tc("Side channel does not contain "+Sc(a))},get:function(a){if(Hr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Ic(e,a)}else if(Xr){if(t)return Fc(t,a)}else if(n)return Bc(n,a)},has:function(a){if(Hr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return xc(e,a)}else if(Xr){if(t)return Mc(t,a)}else if(n)return Uc(n,a);return!1},set:function(a,o){Hr&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new Hr),Pc(e,a,o)):Xr?(t||(t=new Xr),Rc(t,a,o)):(n||(n={key:{},next:null}),Dc(n,a,o))}};return i},Cc=String.prototype.replace,Lc=/%20/g,vn={RFC1738:"RFC1738",RFC3986:"RFC3986"},sa={default:vn.RFC3986,formatters:{RFC1738:function(r){return Cc.call(r,Lc,"+")},RFC3986:function(r){return String(r)}},RFC1738:vn.RFC1738,RFC3986:vn.RFC3986},jc=sa,gn=Object.prototype.hasOwnProperty,Oe=Array.isArray,J=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),kc=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Oe(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);t.obj[t.prop]=i}}},fa=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},qc=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Oe(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!gn.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 Oe(e)&&!Oe(t)&&(i=fa(e,n)),Oe(e)&&Oe(t)?(t.forEach(function(a,o){if(gn.call(e,o)){var s=e[o];s&&typeof s=="object"&&a&&typeof a=="object"?e[o]=r(s,a,n):e.push(a)}else e[o]=a}),e):Object.keys(t).reduce(function(a,o){var s=t[o];return gn.call(a,o)?a[o]=r(a[o],s,n):a[o]=s,a},i)},Vc=function(e,t){return Object.keys(t).reduce(function(n,i){return n[i]=t[i],n},e)},Gc=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}},Wc=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(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var s="",f=0;f<o.length;++f){var c=o.charCodeAt(f);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||a===jc.RFC1738&&(c===40||c===41)){s+=o.charAt(f);continue}if(c<128){s=s+J[c];continue}if(c<2048){s=s+(J[192|c>>6]+J[128|c&63]);continue}if(c<55296||c>=57344){s=s+(J[224|c>>12]+J[128|c>>6&63]+J[128|c&63]);continue}f+=1,c=65536+((c&1023)<<10|o.charCodeAt(f)&1023),s+=J[240|c>>18]+J[128|c>>12&63]+J[128|c>>6&63]+J[128|c&63]}return s},Hc=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],s=Object.keys(o),f=0;f<s.length;++f){var c=s[f],p=o[c];typeof p=="object"&&p!==null&&n.indexOf(p)===-1&&(t.push({obj:o,prop:c}),n.push(p))}return kc(t),e},Xc=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},zc=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Yc=function(e,t){return[].concat(e,t)},Kc=function(e,t){if(Oe(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},Zc={arrayToObject:fa,assign:Vc,combine:Yc,compact:Hc,decode:Gc,encode:Wc,isBuffer:zc,isRegExp:Xc,maybeMap:Kc,merge:qc},ca=Nc,_n=Zc,or=sa,Jc=Object.prototype.hasOwnProperty,la={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},ie=Array.isArray,Qc=String.prototype.split,el=Array.prototype.push,pa=function(r,e){el.apply(r,ie(e)?e:[e])},rl=Date.prototype.toISOString,ha=or.default,U={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:_n.encode,encodeValuesOnly:!1,format:ha,formatter:or.formatters[ha],indices:!1,serializeDate:function(e){return rl.call(e)},skipNulls:!1,strictNullHandling:!1},tl=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},mn={},nl=function r(e,t,n,i,a,o,s,f,c,p,u,l,y,_,E,$){for(var w=e,T=$,h=0,S=!1;(T=T.get(mn))!==void 0&&!S;){var P=T.get(e);if(h+=1,typeof P<"u"){if(P===h)throw new RangeError("Cyclic object value");S=!0}typeof T.get(mn)>"u"&&(h=0)}if(typeof f=="function"?w=f(t,w):w instanceof Date?w=u(w):n==="comma"&&ie(w)&&(w=_n.maybeMap(w,function(ii){return ii instanceof Date?u(ii):ii})),w===null){if(a)return s&&!_?s(t,U.encoder,E,"key",l):t;w=""}if(tl(w)||_n.isBuffer(w)){if(s){var R=_?t:s(t,U.encoder,E,"key",l);if(n==="comma"&&_){for(var m=Qc.call(String(w),","),v="",g=0;g<m.length;++g)v+=(g===0?"":",")+y(s(m[g],U.encoder,E,"value",l));return[y(R)+(i&&ie(w)&&m.length===1?"[]":"")+"="+v]}return[y(R)+"="+y(s(w,U.encoder,E,"value",l))]}return[y(t)+"="+y(String(w))]}var b=[];if(typeof w>"u")return b;var O;if(n==="comma"&&ie(w))O=[{value:w.length>0?w.join(",")||null:void 0}];else if(ie(f))O=f;else{var C=Object.keys(w);O=c?C.sort(c):C}for(var ee=i&&ie(w)&&w.length===1?t+"[]":t,ge=0;ge<O.length;++ge){var fe=O[ge],Tr=typeof fe=="object"&&typeof fe.value<"u"?fe.value:w[fe];if(!(o&&Tr===null)){var M2=ie(w)?typeof n=="function"?n(ee,fe):ee:ee+(p?"."+fe:"["+fe+"]");$.set(e,h);var Ju=ca();Ju.set(mn,$),pa(b,r(Tr,M2,n,i,a,o,s,f,c,p,u,l,y,_,E,Ju))}}return b},il=function(e){if(!e)return U;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||U.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=or.default;if(typeof e.format<"u"){if(!Jc.call(or.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=or.formatters[n],a=U.filter;return(typeof e.filter=="function"||ie(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:U.addQueryPrefix,allowDots:typeof e.allowDots>"u"?U.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:U.charsetSentinel,delimiter:typeof e.delimiter>"u"?U.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:U.encode,encoder:typeof e.encoder=="function"?e.encoder:U.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:U.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:U.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:U.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:U.strictNullHandling}},al=function(r,e){var t=r,n=il(e),i,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):ie(n.filter)&&(a=n.filter,i=a);var o=[];if(typeof t!="object"||t===null)return"";var s;e&&e.arrayFormat in la?s=e.arrayFormat:e&&"indices"in e?s=e.indices?"indices":"repeat":s="indices";var f=la[s];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=f==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(t)),n.sort&&i.sort(n.sort);for(var p=ca(),u=0;u<i.length;++u){var l=i[u];n.skipNulls&&t[l]===null||pa(o,nl(t[l],l,f,c,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,p))}var y=o.join(n.delimiter),_=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),y.length>0?_+y:""};let da={storeIdentifier:"",environment:"prod"};function ol(r){da=r}function ae(){return da}const ul=r=>r==="stage"?"https://api.stage.rechargeapps.com":"https://api.rechargeapps.com",wn=r=>r==="stage"?"https://admin.stage.rechargeapps.com":"https://admin.rechargeapps.com",sl=r=>r==="stage"?"https://static.stage.rechargecdn.com":"https://static.rechargecdn.com",fl="/tools/recurring";class zr{constructor(e,t){this.name="RechargeRequestError",this.message=e,this.status=t}}var cl=Object.defineProperty,ll=Object.defineProperties,pl=Object.getOwnPropertyDescriptors,ya=Object.getOwnPropertySymbols,hl=Object.prototype.hasOwnProperty,dl=Object.prototype.propertyIsEnumerable,va=(r,e,t)=>e in r?cl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Yr=(r,e)=>{for(var t in e||(e={}))hl.call(e,t)&&va(r,t,e[t]);if(ya)for(var t of ya(e))dl.call(e,t)&&va(r,t,e[t]);return r},yl=(r,e)=>ll(r,pl(e));function vl(r){return al(r,{encode:!1,indices:!1,arrayFormat:"comma"})}async function Kr(r,e,t={}){const n=ae();return G(r,`${sl(n.environment)}/store/${n.storeIdentifier}${e}`,t)}async function A(r,e,{id:t,query:n,data:i,headers:a}={},o){const{environment:s,storeIdentifier:f,loginRetryFn:c}=ae(),p=o.apiToken,u=ul(s),l=Yr({"X-Recharge-Access-Token":p,"X-Recharge-Version":"2021-11"},a||{}),y=Yr({shop_url:f},n);try{return await G(r,`${u}${e}`,{id:t,query:y,data:i,headers:l})}catch(_){if(c&&_ instanceof zr&&_.status===401)return c().then(E=>{if(E)return G(r,`${u}${e}`,{id:t,query:y,data:i,headers:yl(Yr({},l),{"X-Recharge-Access-Token":E.apiToken})});throw _});throw _}}async function ur(r,e,t={}){return G(r,`${fl}${e}`,t)}async function G(r,e,{id:t,query:n,data:i,headers:a}={}){let o=e.trim();if(t&&(o=[o,`${t}`.trim()].join("/")),n){let u;[o,u]=o.split("?");const l=[u,vl(n)].join("&").replace(/^&/,"");o=`${o}${l?`?${l}`:""}`}let s;i&&r!=="get"&&(s=JSON.stringify(i));const f=Yr({Accept:"application/json","Content-Type":"application/json","X-Recharge-App":"storefront-client"},a||{}),c=await fetch(o,{method:r,headers:f,body:s,mode:"cors"});let p;try{p=await c.json()}catch{}if(!c.ok)throw p&&p.error?new zr(p.error,c.status):p&&p.errors?new zr(JSON.stringify(p.errors),c.status):new zr("A connection error occurred while making the request");return p}function gl(r,e){return A("get","/addresses",{query:e},r)}async function _l(r,e,t){const{address:n}=await A("get","/addresses",{id:e,query:{include:t?.include}},r);return n}async function ml(r,e){const{address:t}=await A("post","/addresses",{data:e},r);return t}async function bn(r,e,t){const{address:n}=await A("put","/addresses",{id:e,data:t},r);return n}async function wl(r,e,t){return bn(r,e,{discounts:[{code:t}]})}async function bl(r,e){return bn(r,e,{discounts:[]})}function $l(r,e){return A("delete","/addresses",{id:e},r)}async function El(r,e){const{address:t}=await A("post","/addresses/merge",{data:e},r);return t}async function Al(r,e,t){const{charge:n}=await A("post",`/addresses/${e}/charges/skip`,{data:t},r);return n}var Ol=Object.freeze({__proto__:null,listAddresses:gl,getAddress:_l,createAddress:ml,updateAddress:bn,applyDiscountToAddress:wl,removeDiscountsFromAddress:bl,deleteAddress:$l,mergeAddresses:El,skipFutureCharge:Al});async function Sl(){const{storefrontAccessToken:r}=ae(),e={};r&&(e["X-Recharge-Storefront-Access-Token"]=r);const t=await ur("get","/access",{headers:e});return{apiToken:t.api_token,customerId:t.customer_id}}async function Tl(r,e){const{environment:t,storefrontAccessToken:n,storeIdentifier:i}=ae(),a=wn(t),o={};n&&(o["X-Recharge-Storefront-Access-Token"]=n);const s=await G("post",`${a}/shopify_storefront_access`,{data:{customer_token:e,storefront_token:r,shop_url:i},headers:o});return s.api_token?{apiToken:s.api_token,customerId:s.customer_id}:null}async function Il(r){const{environment:e,storefrontAccessToken:t,storeIdentifier:n}=ae(),i=wn(e),a={};t&&(a["X-Recharge-Storefront-Access-Token"]=t);const o=await G("post",`${i}/attempt_login`,{data:{email:r,shop:n},headers:a});if(o.errors)throw new Error(o.errors);return o.session_token}async function Pl(r){const{storefrontAccessToken:e,storeIdentifier:t}=ae(),n={};e&&(n["X-Recharge-Storefront-Access-Token"]=e);const i=await ur("post","/attempt_login",{data:{email:r,shop:t},headers:n});if(i.errors)throw new Error(i.errors);return i.session_token}async function xl(r,e,t){const{environment:n,storefrontAccessToken:i,storeIdentifier:a}=ae(),o=wn(n),s={};i&&(s["X-Recharge-Storefront-Access-Token"]=i);const f=await G("post",`${o}/validate_login`,{data:{code:t,email:r,session_token:e,shop:a},headers:s});if(f.errors)throw new Error(f.errors);return{apiToken:f.api_token,customerId:f.customer_id}}async function Fl(r,e,t){const{storefrontAccessToken:n,storeIdentifier:i}=ae(),a={};n&&(a["X-Recharge-Storefront-Access-Token"]=n);const o=await ur("post","/validate_login",{data:{code:t,email:r,session_token:e,shop:i},headers:a});if(o.errors)throw new Error(o.errors);return{apiToken:o.api_token,customerId:o.customer_id}}var Rl=Object.freeze({__proto__:null,loginShopifyAppProxy:Sl,loginShopifyApi:Tl,sendPasswordlessCode:Il,sendPasswordlessCodeAppProxy:Pl,validatePasswordlessCode:xl,validatePasswordlessCodeAppProxy:Fl});let Ml=(r=21)=>crypto.getRandomValues(new Uint8Array(r)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");function Bl(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 Zr=Bl;function Dl(){this.__data__=[],this.size=0}var Ul=Dl;function Nl(r,e){return r===e||r!==r&&e!==e}var Jr=Nl,Cl=Jr;function Ll(r,e){for(var t=r.length;t--;)if(Cl(r[t][0],e))return t;return-1}var Qr=Ll,jl=Qr,kl=Array.prototype,ql=kl.splice;function Vl(r){var e=this.__data__,t=jl(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():ql.call(e,t,1),--this.size,!0}var Gl=Vl,Wl=Qr;function Hl(r){var e=this.__data__,t=Wl(e,r);return t<0?void 0:e[t][1]}var Xl=Hl,zl=Qr;function Yl(r){return zl(this.__data__,r)>-1}var Kl=Yl,Zl=Qr;function Jl(r,e){var t=this.__data__,n=Zl(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var Ql=Jl,ep=Ul,rp=Gl,tp=Xl,np=Kl,ip=Ql;function ke(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])}}ke.prototype.clear=ep,ke.prototype.delete=rp,ke.prototype.get=tp,ke.prototype.has=np,ke.prototype.set=ip;var et=ke,ap=et;function op(){this.__data__=new ap,this.size=0}var up=op;function sp(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var fp=sp;function cp(r){return this.__data__.get(r)}var lp=cp;function pp(r){return this.__data__.has(r)}var hp=pp,dp=typeof re=="object"&&re&&re.Object===Object&&re,ga=dp,yp=ga,vp=typeof self=="object"&&self&&self.Object===Object&&self,gp=yp||vp||Function("return this")(),Q=gp,_p=Q,mp=_p.Symbol,qe=mp,_a=qe,ma=Object.prototype,wp=ma.hasOwnProperty,bp=ma.toString,sr=_a?_a.toStringTag:void 0;function $p(r){var e=wp.call(r,sr),t=r[sr];try{r[sr]=void 0;var n=!0}catch{}var i=bp.call(r);return n&&(e?r[sr]=t:delete r[sr]),i}var Ep=$p,Ap=Object.prototype,Op=Ap.toString;function Sp(r){return Op.call(r)}var Tp=Sp,wa=qe,Ip=Ep,Pp=Tp,xp="[object Null]",Fp="[object Undefined]",ba=wa?wa.toStringTag:void 0;function Rp(r){return r==null?r===void 0?Fp:xp:ba&&ba in Object(r)?Ip(r):Pp(r)}var oe=Rp;function Mp(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var ve=Mp,Bp=oe,Dp=ve,Up="[object AsyncFunction]",Np="[object Function]",Cp="[object GeneratorFunction]",Lp="[object Proxy]";function jp(r){if(!Dp(r))return!1;var e=Bp(r);return e==Np||e==Cp||e==Up||e==Lp}var $n=jp,kp=Q,qp=kp["__core-js_shared__"],Vp=qp,En=Vp,$a=function(){var r=/[^.]+$/.exec(En&&En.keys&&En.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Gp(r){return!!$a&&$a in r}var Wp=Gp,Hp=Function.prototype,Xp=Hp.toString;function zp(r){if(r!=null){try{return Xp.call(r)}catch{}try{return r+""}catch{}}return""}var Ea=zp,Yp=$n,Kp=Wp,Zp=ve,Jp=Ea,Qp=/[\\^$.*+?()[\]{}|]/g,eh=/^\[object .+?Constructor\]$/,rh=Function.prototype,th=Object.prototype,nh=rh.toString,ih=th.hasOwnProperty,ah=RegExp("^"+nh.call(ih).replace(Qp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oh(r){if(!Zp(r)||Kp(r))return!1;var e=Yp(r)?ah:eh;return e.test(Jp(r))}var uh=oh;function sh(r,e){return r?.[e]}var fh=sh,ch=uh,lh=fh;function ph(r,e){var t=lh(r,e);return ch(t)?t:void 0}var Se=ph,hh=Se,dh=Q,yh=hh(dh,"Map"),An=yh,vh=Se,gh=vh(Object,"create"),rt=gh,Aa=rt;function _h(){this.__data__=Aa?Aa(null):{},this.size=0}var mh=_h;function wh(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var bh=wh,$h=rt,Eh="__lodash_hash_undefined__",Ah=Object.prototype,Oh=Ah.hasOwnProperty;function Sh(r){var e=this.__data__;if($h){var t=e[r];return t===Eh?void 0:t}return Oh.call(e,r)?e[r]:void 0}var Th=Sh,Ih=rt,Ph=Object.prototype,xh=Ph.hasOwnProperty;function Fh(r){var e=this.__data__;return Ih?e[r]!==void 0:xh.call(e,r)}var Rh=Fh,Mh=rt,Bh="__lodash_hash_undefined__";function Dh(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Mh&&e===void 0?Bh:e,this}var Uh=Dh,Nh=mh,Ch=bh,Lh=Th,jh=Rh,kh=Uh;function Ve(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])}}Ve.prototype.clear=Nh,Ve.prototype.delete=Ch,Ve.prototype.get=Lh,Ve.prototype.has=jh,Ve.prototype.set=kh;var qh=Ve,Oa=qh,Vh=et,Gh=An;function Wh(){this.size=0,this.__data__={hash:new Oa,map:new(Gh||Vh),string:new Oa}}var Hh=Wh;function Xh(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var zh=Xh,Yh=zh;function Kh(r,e){var t=r.__data__;return Yh(e)?t[typeof e=="string"?"string":"hash"]:t.map}var tt=Kh,Zh=tt;function Jh(r){var e=Zh(this,r).delete(r);return this.size-=e?1:0,e}var Qh=Jh,ed=tt;function rd(r){return ed(this,r).get(r)}var td=rd,nd=tt;function id(r){return nd(this,r).has(r)}var ad=id,od=tt;function ud(r,e){var t=od(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var sd=ud,fd=Hh,cd=Qh,ld=td,pd=ad,hd=sd;function Ge(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])}}Ge.prototype.clear=fd,Ge.prototype.delete=cd,Ge.prototype.get=ld,Ge.prototype.has=pd,Ge.prototype.set=hd;var On=Ge,dd=et,yd=An,vd=On,gd=200;function _d(r,e){var t=this.__data__;if(t instanceof dd){var n=t.__data__;if(!yd||n.length<gd-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new vd(n)}return t.set(r,e),this.size=t.size,this}var md=_d,wd=et,bd=up,$d=fp,Ed=lp,Ad=hp,Od=md;function We(r){var e=this.__data__=new wd(r);this.size=e.size}We.prototype.clear=bd,We.prototype.delete=$d,We.prototype.get=Ed,We.prototype.has=Ad,We.prototype.set=Od;var Sn=We;function Sd(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var Sa=Sd,Td=Se,Id=function(){try{var r=Td(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Ta=Id,Ia=Ta;function Pd(r,e,t){e=="__proto__"&&Ia?Ia(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var Pa=Pd,xd=Pa,Fd=Jr,Rd=Object.prototype,Md=Rd.hasOwnProperty;function Bd(r,e,t){var n=r[e];(!(Md.call(r,e)&&Fd(n,t))||t===void 0&&!(e in r))&&xd(r,e,t)}var xa=Bd,Dd=xa,Ud=Pa;function Nd(r,e,t,n){var i=!t;t||(t={});for(var a=-1,o=e.length;++a<o;){var s=e[a],f=n?n(t[s],r[s],s,t,r):void 0;f===void 0&&(f=r[s]),i?Ud(t,s,f):Dd(t,s,f)}return t}var He=Nd;function Cd(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Fa=Cd;function Ld(r){return r!=null&&typeof r=="object"}var W=Ld,jd=oe,kd=W,qd="[object Arguments]";function Vd(r){return kd(r)&&jd(r)==qd}var Gd=Vd,Ra=Gd,Wd=W,Ma=Object.prototype,Hd=Ma.hasOwnProperty,Xd=Ma.propertyIsEnumerable,zd=Ra(function(){return arguments}())?Ra:function(r){return Wd(r)&&Hd.call(r,"callee")&&!Xd.call(r,"callee")},Tn=zd,Yd=Array.isArray,N=Yd,fr={exports:{}};function Kd(){return!1}var Zd=Kd;(function(r,e){var t=Q,n=Zd,i=e&&!e.nodeType&&e,a=i&&!0&&r&&!r.nodeType&&r,o=a&&a.exports===i,s=o?t.Buffer:void 0,f=s?s.isBuffer:void 0,c=f||n;r.exports=c})(fr,fr.exports);var Jd=9007199254740991,Qd=/^(?:0|[1-9]\d*)$/;function ey(r,e){var t=typeof r;return e=e??Jd,!!e&&(t=="number"||t!="symbol"&&Qd.test(r))&&r>-1&&r%1==0&&r<e}var In=ey,ry=9007199254740991;function ty(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ry}var Pn=ty,ny=oe,iy=Pn,ay=W,oy="[object Arguments]",uy="[object Array]",sy="[object Boolean]",fy="[object Date]",cy="[object Error]",ly="[object Function]",py="[object Map]",hy="[object Number]",dy="[object Object]",yy="[object RegExp]",vy="[object Set]",gy="[object String]",_y="[object WeakMap]",my="[object ArrayBuffer]",wy="[object DataView]",by="[object Float32Array]",$y="[object Float64Array]",Ey="[object Int8Array]",Ay="[object Int16Array]",Oy="[object Int32Array]",Sy="[object Uint8Array]",Ty="[object Uint8ClampedArray]",Iy="[object Uint16Array]",Py="[object Uint32Array]",F={};F[by]=F[$y]=F[Ey]=F[Ay]=F[Oy]=F[Sy]=F[Ty]=F[Iy]=F[Py]=!0,F[oy]=F[uy]=F[my]=F[sy]=F[wy]=F[fy]=F[cy]=F[ly]=F[py]=F[hy]=F[dy]=F[yy]=F[vy]=F[gy]=F[_y]=!1;function xy(r){return ay(r)&&iy(r.length)&&!!F[ny(r)]}var Fy=xy;function Ry(r){return function(e){return r(e)}}var xn=Ry,cr={exports:{}};(function(r,e){var t=ga,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,s=function(){try{var f=i&&i.require&&i.require("util").types;return f||o&&o.binding&&o.binding("util")}catch{}}();r.exports=s})(cr,cr.exports);var My=Fy,By=xn,Ba=cr.exports,Da=Ba&&Ba.isTypedArray,Dy=Da?By(Da):My,Ua=Dy,Uy=Fa,Ny=Tn,Cy=N,Ly=fr.exports,jy=In,ky=Ua,qy=Object.prototype,Vy=qy.hasOwnProperty;function Gy(r,e){var t=Cy(r),n=!t&&Ny(r),i=!t&&!n&&Ly(r),a=!t&&!n&&!i&&ky(r),o=t||n||i||a,s=o?Uy(r.length,String):[],f=s.length;for(var c in r)(e||Vy.call(r,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||jy(c,f)))&&s.push(c);return s}var Na=Gy,Wy=Object.prototype;function Hy(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Wy;return r===t}var Fn=Hy;function Xy(r,e){return function(t){return r(e(t))}}var Ca=Xy,zy=Ca,Yy=zy(Object.keys,Object),Ky=Yy,Zy=Fn,Jy=Ky,Qy=Object.prototype,ev=Qy.hasOwnProperty;function rv(r){if(!Zy(r))return Jy(r);var e=[];for(var t in Object(r))ev.call(r,t)&&t!="constructor"&&e.push(t);return e}var tv=rv,nv=$n,iv=Pn;function av(r){return r!=null&&iv(r.length)&&!nv(r)}var lr=av,ov=Na,uv=tv,sv=lr;function fv(r){return sv(r)?ov(r):uv(r)}var Xe=fv,cv=He,lv=Xe;function pv(r,e){return r&&cv(e,lv(e),r)}var hv=pv;function dv(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var yv=dv,vv=ve,gv=Fn,_v=yv,mv=Object.prototype,wv=mv.hasOwnProperty;function bv(r){if(!vv(r))return _v(r);var e=gv(r),t=[];for(var n in r)n=="constructor"&&(e||!wv.call(r,n))||t.push(n);return t}var $v=bv,Ev=Na,Av=$v,Ov=lr;function Sv(r){return Ov(r)?Ev(r,!0):Av(r)}var nt=Sv,Tv=He,Iv=nt;function Pv(r,e){return r&&Tv(e,Iv(e),r)}var xv=Pv,Rn={exports:{}};(function(r,e){var t=Q,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a?t.Buffer:void 0,s=o?o.allocUnsafe:void 0;function f(c,p){if(p)return c.slice();var u=c.length,l=s?s(u):new c.constructor(u);return c.copy(l),l}r.exports=f})(Rn,Rn.exports);function Fv(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var Rv=Fv;function Mv(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 Bv=Mv;function Dv(){return[]}var La=Dv,Uv=Bv,Nv=La,Cv=Object.prototype,Lv=Cv.propertyIsEnumerable,ja=Object.getOwnPropertySymbols,jv=ja?function(r){return r==null?[]:(r=Object(r),Uv(ja(r),function(e){return Lv.call(r,e)}))}:Nv,Mn=jv,kv=He,qv=Mn;function Vv(r,e){return kv(r,qv(r),e)}var Gv=Vv;function Wv(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var Bn=Wv,Hv=Ca,Xv=Hv(Object.getPrototypeOf,Object),Dn=Xv,zv=Bn,Yv=Dn,Kv=Mn,Zv=La,Jv=Object.getOwnPropertySymbols,Qv=Jv?function(r){for(var e=[];r;)zv(e,Kv(r)),r=Yv(r);return e}:Zv,ka=Qv,eg=He,rg=ka;function tg(r,e){return eg(r,rg(r),e)}var ng=tg,ig=Bn,ag=N;function og(r,e,t){var n=e(r);return ag(r)?n:ig(n,t(r))}var qa=og,ug=qa,sg=Mn,fg=Xe;function cg(r){return ug(r,fg,sg)}var Va=cg,lg=qa,pg=ka,hg=nt;function dg(r){return lg(r,hg,pg)}var Ga=dg,yg=Se,vg=Q,gg=yg(vg,"DataView"),_g=gg,mg=Se,wg=Q,bg=mg(wg,"Promise"),$g=bg,Eg=Se,Ag=Q,Og=Eg(Ag,"Set"),Sg=Og,Tg=Se,Ig=Q,Pg=Tg(Ig,"WeakMap"),xg=Pg,Un=_g,Nn=An,Cn=$g,Ln=Sg,jn=xg,Wa=oe,ze=Ea,Ha="[object Map]",Fg="[object Object]",Xa="[object Promise]",za="[object Set]",Ya="[object WeakMap]",Ka="[object DataView]",Rg=ze(Un),Mg=ze(Nn),Bg=ze(Cn),Dg=ze(Ln),Ug=ze(jn),Te=Wa;(Un&&Te(new Un(new ArrayBuffer(1)))!=Ka||Nn&&Te(new Nn)!=Ha||Cn&&Te(Cn.resolve())!=Xa||Ln&&Te(new Ln)!=za||jn&&Te(new jn)!=Ya)&&(Te=function(r){var e=Wa(r),t=e==Fg?r.constructor:void 0,n=t?ze(t):"";if(n)switch(n){case Rg:return Ka;case Mg:return Ha;case Bg:return Xa;case Dg:return za;case Ug:return Ya}return e});var it=Te,Ng=Object.prototype,Cg=Ng.hasOwnProperty;function Lg(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&Cg.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var jg=Lg,kg=Q,qg=kg.Uint8Array,Za=qg,Ja=Za;function Vg(r){var e=new r.constructor(r.byteLength);return new Ja(e).set(new Ja(r)),e}var kn=Vg,Gg=kn;function Wg(r,e){var t=e?Gg(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var Hg=Wg,Xg=/\w*$/;function zg(r){var e=new r.constructor(r.source,Xg.exec(r));return e.lastIndex=r.lastIndex,e}var Yg=zg,Qa=qe,eo=Qa?Qa.prototype:void 0,ro=eo?eo.valueOf:void 0;function Kg(r){return ro?Object(ro.call(r)):{}}var Zg=Kg,Jg=kn;function Qg(r,e){var t=e?Jg(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var e_=Qg,r_=kn,t_=Hg,n_=Yg,i_=Zg,a_=e_,o_="[object Boolean]",u_="[object Date]",s_="[object Map]",f_="[object Number]",c_="[object RegExp]",l_="[object Set]",p_="[object String]",h_="[object Symbol]",d_="[object ArrayBuffer]",y_="[object DataView]",v_="[object Float32Array]",g_="[object Float64Array]",__="[object Int8Array]",m_="[object Int16Array]",w_="[object Int32Array]",b_="[object Uint8Array]",$_="[object Uint8ClampedArray]",E_="[object Uint16Array]",A_="[object Uint32Array]";function O_(r,e,t){var n=r.constructor;switch(e){case d_:return r_(r);case o_:case u_:return new n(+r);case y_:return t_(r,t);case v_:case g_:case __:case m_:case w_:case b_:case $_:case E_:case A_:return a_(r,t);case s_:return new n;case f_:case p_:return new n(r);case c_:return n_(r);case l_:return new n;case h_:return i_(r)}}var S_=O_,T_=ve,to=Object.create,I_=function(){function r(){}return function(e){if(!T_(e))return{};if(to)return to(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),P_=I_,x_=P_,F_=Dn,R_=Fn;function M_(r){return typeof r.constructor=="function"&&!R_(r)?x_(F_(r)):{}}var B_=M_,D_=it,U_=W,N_="[object Map]";function C_(r){return U_(r)&&D_(r)==N_}var L_=C_,j_=L_,k_=xn,no=cr.exports,io=no&&no.isMap,q_=io?k_(io):j_,V_=q_,G_=it,W_=W,H_="[object Set]";function X_(r){return W_(r)&&G_(r)==H_}var z_=X_,Y_=z_,K_=xn,ao=cr.exports,oo=ao&&ao.isSet,Z_=oo?K_(oo):Y_,J_=Z_,Q_=Sn,em=Sa,rm=xa,tm=hv,nm=xv,im=Rn.exports,am=Rv,om=Gv,um=ng,sm=Va,fm=Ga,cm=it,lm=jg,pm=S_,hm=B_,dm=N,ym=fr.exports,vm=V_,gm=ve,_m=J_,mm=Xe,wm=nt,bm=1,$m=2,Em=4,uo="[object Arguments]",Am="[object Array]",Om="[object Boolean]",Sm="[object Date]",Tm="[object Error]",so="[object Function]",Im="[object GeneratorFunction]",Pm="[object Map]",xm="[object Number]",fo="[object Object]",Fm="[object RegExp]",Rm="[object Set]",Mm="[object String]",Bm="[object Symbol]",Dm="[object WeakMap]",Um="[object ArrayBuffer]",Nm="[object DataView]",Cm="[object Float32Array]",Lm="[object Float64Array]",jm="[object Int8Array]",km="[object Int16Array]",qm="[object Int32Array]",Vm="[object Uint8Array]",Gm="[object Uint8ClampedArray]",Wm="[object Uint16Array]",Hm="[object Uint32Array]",x={};x[uo]=x[Am]=x[Um]=x[Nm]=x[Om]=x[Sm]=x[Cm]=x[Lm]=x[jm]=x[km]=x[qm]=x[Pm]=x[xm]=x[fo]=x[Fm]=x[Rm]=x[Mm]=x[Bm]=x[Vm]=x[Gm]=x[Wm]=x[Hm]=!0,x[Tm]=x[so]=x[Dm]=!1;function at(r,e,t,n,i,a){var o,s=e&bm,f=e&$m,c=e&Em;if(t&&(o=i?t(r,n,i,a):t(r)),o!==void 0)return o;if(!gm(r))return r;var p=dm(r);if(p){if(o=lm(r),!s)return am(r,o)}else{var u=cm(r),l=u==so||u==Im;if(ym(r))return im(r,s);if(u==fo||u==uo||l&&!i){if(o=f||l?{}:hm(r),!s)return f?um(r,nm(o,r)):om(r,tm(o,r))}else{if(!x[u])return i?r:{};o=pm(r,u,s)}}a||(a=new Q_);var y=a.get(r);if(y)return y;a.set(r,o),_m(r)?r.forEach(function($){o.add(at($,e,t,$,r,a))}):vm(r)&&r.forEach(function($,w){o.set(w,at($,e,t,w,r,a))});var _=c?f?fm:sm:f?wm:mm,E=p?void 0:_(r);return em(E||r,function($,w){E&&(w=$,$=r[w]),rm(o,w,at($,e,t,w,r,a))}),o}var Xm=at,zm=oe,Ym=W,Km="[object Symbol]";function Zm(r){return typeof r=="symbol"||Ym(r)&&zm(r)==Km}var ot=Zm,Jm=N,Qm=ot,e0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r0=/^\w*$/;function t0(r,e){if(Jm(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||Qm(r)?!0:r0.test(r)||!e0.test(r)||e!=null&&r in Object(e)}var qn=t0,co=On,n0="Expected a function";function Vn(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(n0);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(Vn.Cache||co),t}Vn.Cache=co;var i0=Vn,a0=i0,o0=500;function u0(r){var e=a0(r,function(n){return t.size===o0&&t.clear(),n}),t=e.cache;return e}var s0=u0,f0=s0,c0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l0=/\\(\\)?/g,p0=f0(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(c0,function(t,n,i,a){e.push(i?a.replace(l0,"$1"):n||t)}),e}),h0=p0,lo=qe,d0=Zr,y0=N,v0=ot,g0=1/0,po=lo?lo.prototype:void 0,ho=po?po.toString:void 0;function yo(r){if(typeof r=="string")return r;if(y0(r))return d0(r,yo)+"";if(v0(r))return ho?ho.call(r):"";var e=r+"";return e=="0"&&1/r==-g0?"-0":e}var _0=yo,m0=_0;function w0(r){return r==null?"":m0(r)}var b0=w0,$0=N,E0=qn,A0=h0,O0=b0;function S0(r,e){return $0(r)?r:E0(r,e)?[r]:A0(O0(r))}var ut=S0;function T0(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var I0=T0,P0=ot,x0=1/0;function F0(r){if(typeof r=="string"||P0(r))return r;var e=r+"";return e=="0"&&1/r==-x0?"-0":e}var pr=F0,R0=ut,M0=pr;function B0(r,e){e=R0(e,r);for(var t=0,n=e.length;r!=null&&t<n;)r=r[M0(e[t++])];return t&&t==n?r:void 0}var Gn=B0;function D0(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 U0=D0,N0=Gn,C0=U0;function L0(r,e){return e.length<2?r:N0(r,C0(e,0,-1))}var j0=L0,k0=ut,q0=I0,V0=j0,G0=pr;function W0(r,e){return e=k0(e,r),r=V0(r,e),r==null||delete r[G0(q0(e))]}var H0=W0,X0=oe,z0=Dn,Y0=W,K0="[object Object]",Z0=Function.prototype,J0=Object.prototype,vo=Z0.toString,Q0=J0.hasOwnProperty,ew=vo.call(Object);function rw(r){if(!Y0(r)||X0(r)!=K0)return!1;var e=z0(r);if(e===null)return!0;var t=Q0.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&vo.call(t)==ew}var tw=rw,nw=tw;function iw(r){return nw(r)?void 0:r}var aw=iw,go=qe,ow=Tn,uw=N,_o=go?go.isConcatSpreadable:void 0;function sw(r){return uw(r)||ow(r)||!!(_o&&r&&r[_o])}var fw=sw,cw=Bn,lw=fw;function mo(r,e,t,n,i){var a=-1,o=r.length;for(t||(t=lw),i||(i=[]);++a<o;){var s=r[a];e>0&&t(s)?e>1?mo(s,e-1,t,n,i):cw(i,s):n||(i[i.length]=s)}return i}var pw=mo,hw=pw;function dw(r){var e=r==null?0:r.length;return e?hw(r,1):[]}var yw=dw;function vw(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 gw=vw,_w=gw,wo=Math.max;function mw(r,e,t){return e=wo(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,a=wo(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=t(o),_w(r,this,s)}}var bo=mw;function ww(r){return function(){return r}}var bw=ww;function $w(r){return r}var st=$w,Ew=bw,$o=Ta,Aw=st,Ow=$o?function(r,e){return $o(r,"toString",{configurable:!0,enumerable:!1,value:Ew(e),writable:!0})}:Aw,Sw=Ow,Tw=800,Iw=16,Pw=Date.now;function xw(r){var e=0,t=0;return function(){var n=Pw(),i=Iw-(n-t);if(t=n,i>0){if(++e>=Tw)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var Fw=xw,Rw=Sw,Mw=Fw,Bw=Mw(Rw),Eo=Bw,Dw=yw,Uw=bo,Nw=Eo;function Cw(r){return Nw(Uw(r,void 0,Dw),r+"")}var Lw=Cw,jw=Zr,kw=Xm,qw=H0,Vw=ut,Gw=He,Ww=aw,Hw=Lw,Xw=Ga,zw=1,Yw=2,Kw=4,Zw=Hw(function(r,e){var t={};if(r==null)return t;var n=!1;e=jw(e,function(a){return a=Vw(a,r),n||(n=a.length>1),a}),Gw(r,Xw(r),t),n&&(t=kw(t,zw|Yw|Kw,Ww));for(var i=e.length;i--;)qw(t,e[i]);return t}),Jw=Zw,Qw=Object.defineProperty,eb=Object.defineProperties,rb=Object.getOwnPropertyDescriptors,Ao=Object.getOwnPropertySymbols,tb=Object.prototype.hasOwnProperty,nb=Object.prototype.propertyIsEnumerable,Oo=(r,e,t)=>e in r?Qw(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ib=(r,e)=>{for(var t in e||(e={}))tb.call(e,t)&&Oo(r,t,e[t]);if(Ao)for(var t of Ao(e))nb.call(e,t)&&Oo(r,t,e[t]);return r},ab=(r,e)=>eb(r,rb(e));function ob(r){try{return JSON.parse(r)}catch{return r}}function ub(r){return Object.entries(r).reduce((e,[t,n])=>ab(ib({},e),{[t]:ob(n)}),{})}var sb=Object.defineProperty,fb=Object.defineProperties,cb=Object.getOwnPropertyDescriptors,So=Object.getOwnPropertySymbols,lb=Object.prototype.hasOwnProperty,pb=Object.prototype.propertyIsEnumerable,To=(r,e,t)=>e in r?sb(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Io=(r,e)=>{for(var t in e||(e={}))lb.call(e,t)&&To(r,t,e[t]);if(So)for(var t of So(e))pb.call(e,t)&&To(r,t,e[t]);return r},Po=(r,e)=>fb(r,cb(e));function xo(r){var e;const t=ub(r),n=t.auto_inject===void 0?!0:t.auto_inject,i=(e=t.display_on)!=null?e:[],a=t.first_option==="autodeliver";return Po(Io({},Jw(t,["display_on","first_option"])),{auto_inject:n,valid_pages:i,is_subscription_first:a,autoInject:n,validPages:i,isSubscriptionFirst:a})}function Fo(r){var e;const t=((e=r.subscription_options)==null?void 0:e.storefront_purchase_options)==="subscription_only";return Po(Io({},r),{is_subscription_only:t,isSubscriptionOnly:t})}function hb(r){return r.map(e=>{const t={};return Object.entries(e).forEach(([n,i])=>{t[n]=Fo(i)}),t})}const ft="2020-12",db={store_currency:{currency_code:"USD",currency_symbol:"$",decimal_separator:".",thousands_separator:",",currency_symbol_location:"left"}},hr=new Map;function ct(r,e){return hr.has(r)||hr.set(r,e()),hr.get(r)}async function Wn(r){const{product:e}=await ct(`product.${r}`,()=>Kr("get",`/product/${ft}/${r}.json`));return Fo(e)}async function Ro(){return await ct("storeSettings",()=>Kr("get",`/${ft}/store_settings.json`).catch(()=>db))}async function Mo(){const{widget_settings:r}=await ct("widgetSettings",()=>Kr("get",`/${ft}/widget_settings.json`));return xo(r)}async function Bo(){const{products:r,widget_settings:e,store_settings:t,meta:n}=await ct("productsAndSettings",()=>Kr("get",`/product/${ft}/products.json`));return n?.status==="error"?Promise.reject(n.message):{products:hb(r),widget_settings:xo(e),store_settings:t??{}}}async function yb(){const{products:r}=await Bo();return r}async function vb(r){const[e,t,n]=await Promise.all([Wn(r),Ro(),Mo()]);return{product:e,store_settings:t,widget_settings:n,storeSettings:t,widgetSettings:n}}async function Do(r){const{bundle_product:e}=await Wn(r);return e}async function Uo(){return Array.from(hr.keys()).forEach(r=>hr.delete(r))}var gb=Object.freeze({__proto__:null,getCDNProduct:Wn,getCDNStoreSettings:Ro,getCDNWidgetSettings:Mo,getCDNProductsAndSettings:Bo,getCDNProducts:yb,getCDNProductAndSettings:vb,getCDNBundleSettings:Do,resetCDNCache:Uo}),No={},Hn={},ue={},_b=oe,mb=W,wb="[object Number]";function bb(r){return typeof r=="number"||mb(r)&&_b(r)==wb}var lt=bb,M={},Co={exports:{}},$b=st,Eb=bo,Ab=Eo;function Ob(r,e){return Ab(Eb(r,e,$b),r+"")}var Sb=Ob,Tb=Jr,Ib=lr,Pb=In,xb=ve;function Fb(r,e,t){if(!xb(t))return!1;var n=typeof e;return(n=="number"?Ib(t)&&Pb(e,t.length):n=="string"&&e in t)?Tb(t[e],r):!1}var Lo=Fb,Rb=Sb,Mb=Lo;function Bb(r){return Rb(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&&Mb(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var s=t[n];s&&r(e,s,n,a)}return e})}var Db=Bb,Ub=He,Nb=Db,Cb=nt,Lb=Nb(function(r,e){Ub(e,Cb(e),r)}),jb=Lb;(function(r){r.exports=jb})(Co);var pt={},Ie={};function kb(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 qb=kb;function Vb(r){return function(e,t,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var f=o[r?s:++i];if(t(a[f],f,a)===!1)break}return e}}var Gb=Vb,Wb=Gb,Hb=Wb(),Xb=Hb,zb=Xb,Yb=Xe;function Kb(r,e){return r&&zb(r,e,Yb)}var Zb=Kb,Jb=lr;function Qb(r,e){return function(t,n){if(t==null)return t;if(!Jb(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 e1=Qb,r1=Zb,t1=e1,n1=t1(r1),Xn=n1,i1=Xn;function a1(r,e){var t=!0;return i1(r,function(n,i,a){return t=!!e(n,i,a),t}),t}var o1=a1,u1="__lodash_hash_undefined__";function s1(r){return this.__data__.set(r,u1),this}var f1=s1;function c1(r){return this.__data__.has(r)}var l1=c1,p1=On,h1=f1,d1=l1;function ht(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new p1;++e<t;)this.add(r[e])}ht.prototype.add=ht.prototype.push=h1,ht.prototype.has=d1;var y1=ht;function v1(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 g1=v1;function _1(r,e){return r.has(e)}var m1=_1,w1=y1,b1=g1,$1=m1,E1=1,A1=2;function O1(r,e,t,n,i,a){var o=t&E1,s=r.length,f=e.length;if(s!=f&&!(o&&f>s))return!1;var c=a.get(r),p=a.get(e);if(c&&p)return c==e&&p==r;var u=-1,l=!0,y=t&A1?new w1:void 0;for(a.set(r,e),a.set(e,r);++u<s;){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;l=!1;break}if(y){if(!b1(e,function(w,T){if(!$1(y,T)&&(_===w||i(_,w,t,n,a)))return y.push(T)})){l=!1;break}}else if(!(_===E||i(_,E,t,n,a))){l=!1;break}}return a.delete(r),a.delete(e),l}var jo=O1;function S1(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}var T1=S1;function I1(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var P1=I1,ko=qe,qo=Za,x1=Jr,F1=jo,R1=T1,M1=P1,B1=1,D1=2,U1="[object Boolean]",N1="[object Date]",C1="[object Error]",L1="[object Map]",j1="[object Number]",k1="[object RegExp]",q1="[object Set]",V1="[object String]",G1="[object Symbol]",W1="[object ArrayBuffer]",H1="[object DataView]",Vo=ko?ko.prototype:void 0,zn=Vo?Vo.valueOf:void 0;function X1(r,e,t,n,i,a,o){switch(t){case H1:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case W1:return!(r.byteLength!=e.byteLength||!a(new qo(r),new qo(e)));case U1:case N1:case j1:return x1(+r,+e);case C1:return r.name==e.name&&r.message==e.message;case k1:case V1:return r==e+"";case L1:var s=R1;case q1:var f=n&B1;if(s||(s=M1),r.size!=e.size&&!f)return!1;var c=o.get(r);if(c)return c==e;n|=D1,o.set(r,e);var p=F1(s(r),s(e),n,i,a,o);return o.delete(r),p;case G1:if(zn)return zn.call(r)==zn.call(e)}return!1}var z1=X1,Go=Va,Y1=1,K1=Object.prototype,Z1=K1.hasOwnProperty;function J1(r,e,t,n,i,a){var o=t&Y1,s=Go(r),f=s.length,c=Go(e),p=c.length;if(f!=p&&!o)return!1;for(var u=f;u--;){var l=s[u];if(!(o?l in e:Z1.call(e,l)))return!1}var y=a.get(r),_=a.get(e);if(y&&_)return y==e&&_==r;var E=!0;a.set(r,e),a.set(e,r);for(var $=o;++u<f;){l=s[u];var w=r[l],T=e[l];if(n)var h=o?n(T,w,l,e,r,a):n(w,T,l,r,e,a);if(!(h===void 0?w===T||i(w,T,t,n,a):h)){E=!1;break}$||($=l=="constructor")}if(E&&!$){var S=r.constructor,P=e.constructor;S!=P&&"constructor"in r&&"constructor"in e&&!(typeof S=="function"&&S instanceof S&&typeof P=="function"&&P instanceof P)&&(E=!1)}return a.delete(r),a.delete(e),E}var Q1=J1,Yn=Sn,e$=jo,r$=z1,t$=Q1,Wo=it,Ho=N,Xo=fr.exports,n$=Ua,i$=1,zo="[object Arguments]",Yo="[object Array]",dt="[object Object]",a$=Object.prototype,Ko=a$.hasOwnProperty;function o$(r,e,t,n,i,a){var o=Ho(r),s=Ho(e),f=o?Yo:Wo(r),c=s?Yo:Wo(e);f=f==zo?dt:f,c=c==zo?dt:c;var p=f==dt,u=c==dt,l=f==c;if(l&&Xo(r)){if(!Xo(e))return!1;o=!0,p=!1}if(l&&!p)return a||(a=new Yn),o||n$(r)?e$(r,e,t,n,i,a):r$(r,e,f,t,n,i,a);if(!(t&i$)){var y=p&&Ko.call(r,"__wrapped__"),_=u&&Ko.call(e,"__wrapped__");if(y||_){var E=y?r.value():r,$=_?e.value():e;return a||(a=new Yn),i(E,$,t,n,a)}}return l?(a||(a=new Yn),t$(r,e,t,n,i,a)):!1}var u$=o$,s$=u$,Zo=W;function Jo(r,e,t,n,i){return r===e?!0:r==null||e==null||!Zo(r)&&!Zo(e)?r!==r&&e!==e:s$(r,e,t,n,Jo,i)}var Qo=Jo,f$=Sn,c$=Qo,l$=1,p$=2;function h$(r,e,t,n){var i=t.length,a=i,o=!n;if(r==null)return!a;for(r=Object(r);i--;){var s=t[i];if(o&&s[2]?s[1]!==r[s[0]]:!(s[0]in r))return!1}for(;++i<a;){s=t[i];var f=s[0],c=r[f],p=s[1];if(o&&s[2]){if(c===void 0&&!(f in r))return!1}else{var u=new f$;if(n)var l=n(c,p,f,r,e,u);if(!(l===void 0?c$(p,c,l$|p$,n,u):l))return!1}}return!0}var d$=h$,y$=ve;function v$(r){return r===r&&!y$(r)}var eu=v$,g$=eu,_$=Xe;function m$(r){for(var e=_$(r),t=e.length;t--;){var n=e[t],i=r[n];e[t]=[n,i,g$(i)]}return e}var w$=m$;function b$(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var ru=b$,$$=d$,E$=w$,A$=ru;function O$(r){var e=E$(r);return e.length==1&&e[0][2]?A$(e[0][0],e[0][1]):function(t){return t===r||$$(t,r,e)}}var S$=O$,T$=Gn;function I$(r,e,t){var n=r==null?void 0:T$(r,e);return n===void 0?t:n}var P$=I$;function x$(r,e){return r!=null&&e in Object(r)}var F$=x$,R$=ut,M$=Tn,B$=N,D$=In,U$=Pn,N$=pr;function C$(r,e,t){e=R$(e,r);for(var n=-1,i=e.length,a=!1;++n<i;){var o=N$(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&&U$(i)&&D$(o,i)&&(B$(r)||M$(r)))}var L$=C$,j$=F$,k$=L$;function q$(r,e){return r!=null&&k$(r,e,j$)}var V$=q$,G$=Qo,W$=P$,H$=V$,X$=qn,z$=eu,Y$=ru,K$=pr,Z$=1,J$=2;function Q$(r,e){return X$(r)&&z$(e)?Y$(K$(r),e):function(t){var n=W$(t,r);return n===void 0&&n===e?H$(t,r):G$(e,n,Z$|J$)}}var eE=Q$;function rE(r){return function(e){return e?.[r]}}var tE=rE,nE=Gn;function iE(r){return function(e){return nE(e,r)}}var aE=iE,oE=tE,uE=aE,sE=qn,fE=pr;function cE(r){return sE(r)?oE(fE(r)):uE(r)}var lE=cE,pE=S$,hE=eE,dE=st,yE=N,vE=lE;function gE(r){return typeof r=="function"?r:r==null?dE:typeof r=="object"?yE(r)?hE(r[0],r[1]):pE(r):vE(r)}var tu=gE,_E=qb,mE=o1,wE=tu,bE=N,$E=Lo;function EE(r,e,t){var n=bE(r)?_E:mE;return t&&$E(r,e,t)&&(e=void 0),n(r,wE(e))}var Kn=EE;Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.calculatePadding=TE,Ie.slicePadding=IE;var AE=Kn,OE=SE(AE);function SE(r){return r&&r.__esModule?r:{default:r}}function TE(r){switch(r%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}}function IE(r,e){var t=r.slice(e),n=(0,OE.default)(t.buffer(),function(i){return i===0});if(n!==!0)throw new Error("XDR Read Error: invalid padding")}Object.defineProperty(pt,"__esModule",{value:!0}),pt.Cursor=void 0;var PE=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}}(),xE=Ie;function FE(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Zn=function(){function r(e){FE(this,r),e instanceof d||(e=typeof e=="number"?d.alloc(e):d.from(e)),this._setBuffer(e),this.rewind()}return PE(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 d?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=d.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,xE.calculatePadding)(t.length),i=d.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){Zn.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){Zn.prototype[e]=function(n){return this.buffer()[e](n,this.tell()),this.seek("+",r[0]),this}})}),pt.Cursor=Zn,Object.defineProperty(M,"__esModule",{value:!0}),M.default=CE;var RE=Co.exports,nu=au(RE),ME=$n,BE=au(ME),iu=pt;function au(r){return r&&r.__esModule?r:{default:r}}var DE=Math.pow(2,16),UE={toXDR:function(e){var t=new iu.Cursor(DE);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=d.from(e,"hex");break;case"base64":n=d.from(e,"base64");break;default:throw new Error("Invalid format "+t+', must be "raw", "hex", "base64"')}var i=new iu.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}}},NE={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 CE(r){(0,nu.default)(r,UE),(0,BE.default)(r)&&(0,nu.default)(r.prototype,NE)}Object.defineProperty(ue,"__esModule",{value:!0}),ue.Int=void 0;var LE=lt,ou=uu(LE),jE=M,kE=uu(jE);function uu(r){return r&&r.__esModule?r:{default:r}}var dr=ue.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,ou.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,ou.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,kE.default)(dr);var yt={};function qE(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 Jn={exports:{}};(function(r){/**
|
|
21
|
+
`)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function an(r){return Array.isArray(r)}function Gr(r){return typeof r=="boolean"}function Qe(r){return r===null}function oa(r){return r==null}function on(r){return typeof r=="number"}function er(r){return typeof r=="string"}function ua(r){return typeof r=="symbol"}function Q(r){return r===void 0}function rr(r){return Ee(r)&&un(r)==="[object RegExp]"}function Ee(r){return typeof r=="object"&&r!==null}function Wr(r){return Ee(r)&&un(r)==="[object Date]"}function tr(r){return Ee(r)&&(un(r)==="[object Error]"||r instanceof Error)}function nr(r){return typeof r=="function"}function sa(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}function fa(r){return y.isBuffer(r)}function un(r){return Object.prototype.toString.call(r)}function sn(r){return r<10?"0"+r.toString(10):r.toString(10)}var zc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Xc(){var r=new Date,e=[sn(r.getHours()),sn(r.getMinutes()),sn(r.getSeconds())].join(":");return[r.getDate(),zc[r.getMonth()],e].join(" ")}function ca(){console.log("%s - %s",Xc(),jr.apply(null,arguments))}function fn(r,e){if(!e||!Ee(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function la(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var Yc={inherits:ia,_extend:fn,log:ca,isBuffer:fa,isPrimitive:sa,isFunction:nr,isError:tr,isDate:Wr,isObject:Ee,isRegExp:rr,isUndefined:Q,isSymbol:ua,isString:er,isNumber:on,isNullOrUndefined:oa,isNull:Qe,isBoolean:Gr,isArray:an,inspect:J,deprecate:en,format:jr,debuglog:aa},Kc=Object.freeze({__proto__:null,format:jr,deprecate:en,debuglog:aa,inspect:J,isArray:an,isBoolean:Gr,isNull:Qe,isNullOrUndefined:oa,isNumber:on,isString:er,isSymbol:ua,isUndefined:Q,isRegExp:rr,isObject:Ee,isDate:Wr,isError:tr,isFunction:nr,isPrimitive:sa,isBuffer:fa,log:ca,inherits:ia,_extend:fn,default:Yc}),Zc=Ke(Kc),Jc=Zc.inspect,cn=typeof Map=="function"&&Map.prototype,ln=Object.getOwnPropertyDescriptor&&cn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Vr=cn&&ln&&typeof ln.get=="function"?ln.get:null,Qc=cn&&Map.prototype.forEach,pn=typeof Set=="function"&&Set.prototype,hn=Object.getOwnPropertyDescriptor&&pn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Hr=pn&&hn&&typeof hn.get=="function"?hn.get:null,el=pn&&Set.prototype.forEach,rl=typeof WeakMap=="function"&&WeakMap.prototype,ir=rl?WeakMap.prototype.has:null,tl=typeof WeakSet=="function"&&WeakSet.prototype,ar=tl?WeakSet.prototype.has:null,nl=typeof WeakRef=="function"&&WeakRef.prototype,pa=nl?WeakRef.prototype.deref:null,il=Boolean.prototype.valueOf,al=Object.prototype.toString,ol=Function.prototype.toString,ul=String.prototype.match,dn=String.prototype.slice,ye=String.prototype.replace,sl=String.prototype.toUpperCase,ha=String.prototype.toLowerCase,da=RegExp.prototype.test,ya=Array.prototype.concat,ee=Array.prototype.join,fl=Array.prototype.slice,va=Math.floor,yn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,vn=Object.getOwnPropertySymbols,gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,je=typeof Symbol=="function"&&typeof Symbol.iterator=="object",j=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===je?"object":"symbol")?Symbol.toStringTag:null,ga=Object.prototype.propertyIsEnumerable,_a=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function ma(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||da.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-va(-r):va(r);if(n!==r){var i=String(n),a=dn.call(e,i.length+1);return ye.call(i,t,"$&_")+"."+ye.call(ye.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ye.call(e,t,"$&_")}var _n=Jc,wa=_n.custom,ba=Ea(wa)?wa:null,cl=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 s=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 Sa(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var f=String(e);return s?ma(e,f):f}if(typeof e=="bigint"){var c=String(e)+"n";return s?ma(e,c):c}var l=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=l&&l>0&&typeof e=="object")return mn(e)?"[Array]":"[Object]";var u=Pl(a,n);if(typeof i>"u")i=[];else if(Oa(i,e)>=0)return"[Circular]";function p(H,te,X){if(te&&(i=fl.call(i),i.push(te)),X){var Re={depth:a.depth};return ve(a,"quoteStyle")&&(Re.quoteStyle=a.quoteStyle),r(H,Re,n+1,i)}return r(H,a,n+1,i)}if(typeof e=="function"&&!Aa(e)){var d=ml(e),_=zr(e,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(_.length>0?" { "+ee.call(_,", ")+" }":"")}if(Ea(e)){var $=je?ye.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):gn.call(e);return typeof e=="object"&&!je?or($):$}if(Ol(e)){for(var b="<"+ha.call(String(e.nodeName)),w=e.attributes||[],A=0;A<w.length;A++)b+=" "+w[A].name+"="+$a(ll(w[A].value),"double",a);return b+=">",e.childNodes&&e.childNodes.length&&(b+="..."),b+="</"+ha.call(String(e.nodeName))+">",b}if(mn(e)){if(e.length===0)return"[]";var h=zr(e,p);return u&&!Il(h)?"["+bn(h,u)+"]":"[ "+ee.call(h,", ")+" ]"}if(hl(e)){var I=zr(e,p);return!("cause"in Error.prototype)&&"cause"in e&&!ga.call(e,"cause")?"{ ["+String(e)+"] "+ee.call(ya.call("[cause]: "+p(e.cause),I),", ")+" }":I.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+ee.call(I,", ")+" }"}if(typeof e=="object"&&o){if(ba&&typeof e[ba]=="function"&&_n)return _n(e,{depth:l-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(wl(e)){var P=[];return Qc.call(e,function(H,te){P.push(p(te,e,!0)+" => "+p(H,e))}),Ia("Map",Vr.call(e),P,u)}if(Al(e)){var R=[];return el.call(e,function(H){R.push(p(H,e))}),Ia("Set",Hr.call(e),R,u)}if(bl(e))return wn("WeakMap");if(El(e))return wn("WeakSet");if($l(e))return wn("WeakRef");if(yl(e))return or(p(Number(e)));if(gl(e))return or(p(yn.call(e)));if(vl(e))return or(il.call(e));if(dl(e))return or(p(String(e)));if(!pl(e)&&!Aa(e)){var m=zr(e,p),v=_a?_a(e)===Object.prototype:e instanceof Object||e.constructor===Object,g=e instanceof Object?"":"null prototype",E=!v&&j&&Object(e)===e&&j in e?dn.call(ge(e),8,-1):g?"Object":"",S=v||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",B=S+(E||g?"["+ee.call(ya.call([],E||[],g||[]),": ")+"] ":"");return m.length===0?B+"{}":u?B+"{"+bn(m,u)+"}":B+"{ "+ee.call(m,", ")+" }"}return String(e)};function $a(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function ll(r){return ye.call(String(r),/"/g,""")}function mn(r){return ge(r)==="[object Array]"&&(!j||!(typeof r=="object"&&j in r))}function pl(r){return ge(r)==="[object Date]"&&(!j||!(typeof r=="object"&&j in r))}function Aa(r){return ge(r)==="[object RegExp]"&&(!j||!(typeof r=="object"&&j in r))}function hl(r){return ge(r)==="[object Error]"&&(!j||!(typeof r=="object"&&j in r))}function dl(r){return ge(r)==="[object String]"&&(!j||!(typeof r=="object"&&j in r))}function yl(r){return ge(r)==="[object Number]"&&(!j||!(typeof r=="object"&&j in r))}function vl(r){return ge(r)==="[object Boolean]"&&(!j||!(typeof r=="object"&&j in r))}function Ea(r){if(je)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!gn)return!1;try{return gn.call(r),!0}catch{}return!1}function gl(r){if(!r||typeof r!="object"||!yn)return!1;try{return yn.call(r),!0}catch{}return!1}var _l=Object.prototype.hasOwnProperty||function(r){return r in this};function ve(r,e){return _l.call(r,e)}function ge(r){return al.call(r)}function ml(r){if(r.name)return r.name;var e=ul.call(ol.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function Oa(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 wl(r){if(!Vr||!r||typeof r!="object")return!1;try{Vr.call(r);try{Hr.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function bl(r){if(!ir||!r||typeof r!="object")return!1;try{ir.call(r,ir);try{ar.call(r,ar)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function $l(r){if(!pa||!r||typeof r!="object")return!1;try{return pa.call(r),!0}catch{}return!1}function Al(r){if(!Hr||!r||typeof r!="object")return!1;try{Hr.call(r);try{Vr.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function El(r){if(!ar||!r||typeof r!="object")return!1;try{ar.call(r,ar);try{ir.call(r,ir)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function Ol(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function Sa(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Sa(dn.call(r,0,e.maxStringLength),e)+n}var i=ye.call(ye.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Sl);return $a(i,"single",e)}function Sl(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":"")+sl.call(e.toString(16))}function or(r){return"Object("+r+")"}function wn(r){return r+" { ? }"}function Ia(r,e,t,n){var i=n?bn(t,n):ee.call(t,", ");return r+" ("+e+") {"+i+"}"}function Il(r){for(var e=0;e<r.length;e++)if(Oa(r[e],`
|
|
22
|
+
`)>=0)return!1;return!0}function Pl(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=ee.call(Array(r.indent+1)," ");else return null;return{base:t,prev:ee.call(Array(e+1),t)}}function bn(r,e){if(r.length===0)return"";var t=`
|
|
23
|
+
`+e.prev+e.base;return t+ee.call(r,","+t)+`
|
|
24
|
+
`+e.prev}function zr(r,e){var t=mn(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 vn=="function"?vn(r):[],o;if(je){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var f in r)!ve(r,f)||t&&String(Number(f))===f&&f<r.length||je&&o["$"+f]instanceof Symbol||(da.call(/[^\w$]/,f)?n.push(e(f,r)+": "+e(r[f],r)):n.push(f+": "+e(r[f],r)));if(typeof vn=="function")for(var c=0;c<a.length;c++)ga.call(r,a[c])&&n.push("["+e(a[c])+"]: "+e(r[a[c]],r));return n}var $n=Xt,ke=Bf,Tl=cl,xl=$n("%TypeError%"),Xr=$n("%WeakMap%",!0),Yr=$n("%Map%",!0),Rl=ke("WeakMap.prototype.get",!0),Fl=ke("WeakMap.prototype.set",!0),Ml=ke("WeakMap.prototype.has",!0),Dl=ke("Map.prototype.get",!0),Bl=ke("Map.prototype.set",!0),Nl=ke("Map.prototype.has",!0),An=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},Ul=function(r,e){var t=An(r,e);return t&&t.value},Cl=function(r,e,t){var n=An(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Ll=function(r,e){return!!An(r,e)},jl=function(){var e,t,n,i={assert:function(a){if(!i.has(a))throw new xl("Side channel does not contain "+Tl(a))},get:function(a){if(Xr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Rl(e,a)}else if(Yr){if(t)return Dl(t,a)}else if(n)return Ul(n,a)},has:function(a){if(Xr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Ml(e,a)}else if(Yr){if(t)return Nl(t,a)}else if(n)return Ll(n,a);return!1},set:function(a,o){Xr&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new Xr),Fl(e,a,o)):Yr?(t||(t=new Yr),Bl(t,a,o)):(n||(n={key:{},next:null}),Cl(n,a,o))}};return i},kl=String.prototype.replace,ql=/%20/g,En={RFC1738:"RFC1738",RFC3986:"RFC3986"},Pa={default:En.RFC3986,formatters:{RFC1738:function(r){return kl.call(r,ql,"+")},RFC3986:function(r){return String(r)}},RFC1738:En.RFC1738,RFC3986:En.RFC3986},Gl=Pa,On=Object.prototype.hasOwnProperty,Oe=Array.isArray,re=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),Wl=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Oe(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);t.obj[t.prop]=i}}},Ta=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},Vl=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Oe(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!On.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 Oe(e)&&!Oe(t)&&(i=Ta(e,n)),Oe(e)&&Oe(t)?(t.forEach(function(a,o){if(On.call(e,o)){var s=e[o];s&&typeof s=="object"&&a&&typeof a=="object"?e[o]=r(s,a,n):e.push(a)}else e[o]=a}),e):Object.keys(t).reduce(function(a,o){var s=t[o];return On.call(a,o)?a[o]=r(a[o],s,n):a[o]=s,a},i)},Hl=function(e,t){return Object.keys(t).reduce(function(n,i){return n[i]=t[i],n},e)},zl=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}},Xl=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(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var s="",f=0;f<o.length;++f){var c=o.charCodeAt(f);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||a===Gl.RFC1738&&(c===40||c===41)){s+=o.charAt(f);continue}if(c<128){s=s+re[c];continue}if(c<2048){s=s+(re[192|c>>6]+re[128|c&63]);continue}if(c<55296||c>=57344){s=s+(re[224|c>>12]+re[128|c>>6&63]+re[128|c&63]);continue}f+=1,c=65536+((c&1023)<<10|o.charCodeAt(f)&1023),s+=re[240|c>>18]+re[128|c>>12&63]+re[128|c>>6&63]+re[128|c&63]}return s},Yl=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],s=Object.keys(o),f=0;f<s.length;++f){var c=s[f],l=o[c];typeof l=="object"&&l!==null&&n.indexOf(l)===-1&&(t.push({obj:o,prop:c}),n.push(l))}return Wl(t),e},Kl=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Zl=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Jl=function(e,t){return[].concat(e,t)},Ql=function(e,t){if(Oe(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},ep={arrayToObject:Ta,assign:Hl,combine:Jl,compact:Yl,decode:zl,encode:Xl,isBuffer:Zl,isRegExp:Kl,maybeMap:Ql,merge:Vl},xa=jl,Sn=ep,ur=Pa,rp=Object.prototype.hasOwnProperty,Ra={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},oe=Array.isArray,tp=String.prototype.split,np=Array.prototype.push,Fa=function(r,e){np.apply(r,oe(e)?e:[e])},ip=Date.prototype.toISOString,Ma=ur.default,C={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Sn.encode,encodeValuesOnly:!1,format:Ma,formatter:ur.formatters[Ma],indices:!1,serializeDate:function(e){return ip.call(e)},skipNulls:!1,strictNullHandling:!1},ap=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},In={},op=function r(e,t,n,i,a,o,s,f,c,l,u,p,d,_,$,b){for(var w=e,A=b,h=0,I=!1;(A=A.get(In))!==void 0&&!I;){var P=A.get(e);if(h+=1,typeof P<"u"){if(P===h)throw new RangeError("Cyclic object value");I=!0}typeof A.get(In)>"u"&&(h=0)}if(typeof f=="function"?w=f(t,w):w instanceof Date?w=u(w):n==="comma"&&oe(w)&&(w=Sn.maybeMap(w,function(Ei){return Ei instanceof Date?u(Ei):Ei})),w===null){if(a)return s&&!_?s(t,C.encoder,$,"key",p):t;w=""}if(ap(w)||Sn.isBuffer(w)){if(s){var R=_?t:s(t,C.encoder,$,"key",p);if(n==="comma"&&_){for(var m=tp.call(String(w),","),v="",g=0;g<m.length;++g)v+=(g===0?"":",")+d(s(m[g],C.encoder,$,"value",p));return[d(R)+(i&&oe(w)&&m.length===1?"[]":"")+"="+v]}return[d(R)+"="+d(s(w,C.encoder,$,"value",p))]}return[d(t)+"="+d(String(w))]}var E=[];if(typeof w>"u")return E;var S;if(n==="comma"&&oe(w))S=[{value:w.length>0?w.join(",")||null:void 0}];else if(oe(f))S=f;else{var B=Object.keys(w);S=c?B.sort(c):B}for(var H=i&&oe(w)&&w.length===1?t+"[]":t,te=0;te<S.length;++te){var X=S[te],Re=typeof X=="object"&&typeof X.value<"u"?X.value:w[X];if(!(o&&Re===null)){var LR=oe(w)?typeof n=="function"?n(H,X):H:H+(l?"."+X:"["+X+"]");b.set(e,h);var rf=xa();rf.set(In,b),Fa(E,r(Re,LR,n,i,a,o,s,f,c,l,u,p,d,_,$,rf))}}return E},up=function(e){if(!e)return C;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||C.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=ur.default;if(typeof e.format<"u"){if(!rp.call(ur.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=ur.formatters[n],a=C.filter;return(typeof e.filter=="function"||oe(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:C.addQueryPrefix,allowDots:typeof e.allowDots>"u"?C.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:C.charsetSentinel,delimiter:typeof e.delimiter>"u"?C.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:C.encode,encoder:typeof e.encoder=="function"?e.encoder:C.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:C.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:C.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:C.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:C.strictNullHandling}},sp=function(r,e){var t=r,n=up(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 s;e&&e.arrayFormat in Ra?s=e.arrayFormat:e&&"indices"in e?s=e.indices?"indices":"repeat":s="indices";var f=Ra[s];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=f==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(t)),n.sort&&i.sort(n.sort);for(var l=xa(),u=0;u<i.length;++u){var p=i[u];n.skipNulls&&t[p]===null||Fa(o,op(t[p],p,f,c,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,l))}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:""};let Da={storeIdentifier:"",environment:"prod"};function fp(r){Da=r}function ue(){return Da}const cp=r=>r==="stage"?"https://api.stage.rechargeapps.com":"https://api.rechargeapps.com",Pn=r=>r==="stage"?"https://admin.stage.rechargeapps.com":"https://admin.rechargeapps.com",lp=r=>r==="stage"?"https://static.stage.rechargecdn.com":"https://static.rechargecdn.com",pp="/tools/recurring";class Kr{constructor(e,t){this.name="RechargeRequestError",this.message=e,this.status=t}}var hp=Object.defineProperty,dp=Object.defineProperties,yp=Object.getOwnPropertyDescriptors,Ba=Object.getOwnPropertySymbols,vp=Object.prototype.hasOwnProperty,gp=Object.prototype.propertyIsEnumerable,Na=(r,e,t)=>e in r?hp(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Zr=(r,e)=>{for(var t in e||(e={}))vp.call(e,t)&&Na(r,t,e[t]);if(Ba)for(var t of Ba(e))gp.call(e,t)&&Na(r,t,e[t]);return r},_p=(r,e)=>dp(r,yp(e));function mp(r){return sp(r,{encode:!1,indices:!1,arrayFormat:"comma"})}async function Jr(r,e,t={}){const n=ue();return z(r,`${lp(n.environment)}/store/${n.storeIdentifier}${e}`,t)}async function O(r,e,{id:t,query:n,data:i,headers:a}={},o){const{environment:s,storeIdentifier:f,loginRetryFn:c}=ue(),l=o.apiToken,u=cp(s),p=Zr({"X-Recharge-Access-Token":l,"X-Recharge-Version":"2021-11"},a||{}),d=Zr({shop_url:f},n);try{return await z(r,`${u}${e}`,{id:t,query:d,data:i,headers:p})}catch(_){if(c&&_ instanceof Kr&&_.status===401)return c().then($=>{if($)return z(r,`${u}${e}`,{id:t,query:d,data:i,headers:_p(Zr({},p),{"X-Recharge-Access-Token":$.apiToken})});throw _});throw _}}async function sr(r,e,t={}){return z(r,`${pp}${e}`,t)}async function z(r,e,{id:t,query:n,data:i,headers:a}={}){let o=e.trim();if(t&&(o=[o,`${t}`.trim()].join("/")),n){let u;[o,u]=o.split("?");const p=[u,mp(n)].join("&").replace(/^&/,"");o=`${o}${p?`?${p}`:""}`}let s;i&&r!=="get"&&(s=JSON.stringify(i));const f=Zr({Accept:"application/json","Content-Type":"application/json","X-Recharge-App":"storefront-client"},a||{}),c=await fetch(o,{method:r,headers:f,body:s,mode:"cors"});let l;try{l=await c.json()}catch{}if(!c.ok)throw l&&l.error?new Kr(l.error,c.status):l&&l.errors?new Kr(JSON.stringify(l.errors),c.status):new Kr("A connection error occurred while making the request");return l}function wp(r,e){return O("get","/addresses",{query:e},r)}async function bp(r,e,t){const{address:n}=await O("get","/addresses",{id:e,query:{include:t?.include}},r);return n}async function $p(r,e){const{address:t}=await O("post","/addresses",{data:e},r);return t}async function Tn(r,e,t){const{address:n}=await O("put","/addresses",{id:e,data:t},r);return n}async function Ap(r,e,t){return Tn(r,e,{discounts:[{code:t}]})}async function Ep(r,e){return Tn(r,e,{discounts:[]})}function Op(r,e){return O("delete","/addresses",{id:e},r)}async function Sp(r,e){const{address:t}=await O("post","/addresses/merge",{data:e},r);return t}async function Ip(r,e,t){const{charge:n}=await O("post",`/addresses/${e}/charges/skip`,{data:t},r);return n}var Pp=Object.freeze({__proto__:null,listAddresses:wp,getAddress:bp,createAddress:$p,updateAddress:Tn,applyDiscountToAddress:Ap,removeDiscountsFromAddress:Ep,deleteAddress:Op,mergeAddresses:Sp,skipFutureCharge:Ip});async function Tp(){const{storefrontAccessToken:r}=ue(),e={};r&&(e["X-Recharge-Storefront-Access-Token"]=r);const t=await sr("get","/access",{headers:e});return{apiToken:t.api_token,customerId:t.customer_id}}async function xp(r,e){const{environment:t,storefrontAccessToken:n,storeIdentifier:i}=ue(),a=Pn(t),o={};n&&(o["X-Recharge-Storefront-Access-Token"]=n);const s=await z("post",`${a}/shopify_storefront_access`,{data:{customer_token:e,storefront_token:r,shop_url:i},headers:o});return s.api_token?{apiToken:s.api_token,customerId:s.customer_id}:null}async function Rp(r){const{environment:e,storefrontAccessToken:t,storeIdentifier:n}=ue(),i=Pn(e),a={};t&&(a["X-Recharge-Storefront-Access-Token"]=t);const o=await z("post",`${i}/attempt_login`,{data:{email:r,shop:n},headers:a});if(o.errors)throw new Error(o.errors);return o.session_token}async function Fp(r){const{storefrontAccessToken:e,storeIdentifier:t}=ue(),n={};e&&(n["X-Recharge-Storefront-Access-Token"]=e);const i=await sr("post","/attempt_login",{data:{email:r,shop:t},headers:n});if(i.errors)throw new Error(i.errors);return i.session_token}async function Mp(r,e,t){const{environment:n,storefrontAccessToken:i,storeIdentifier:a}=ue(),o=Pn(n),s={};i&&(s["X-Recharge-Storefront-Access-Token"]=i);const f=await z("post",`${o}/validate_login`,{data:{code:t,email:r,session_token:e,shop:a},headers:s});if(f.errors)throw new Error(f.errors);return{apiToken:f.api_token,customerId:f.customer_id}}async function Dp(r,e,t){const{storefrontAccessToken:n,storeIdentifier:i}=ue(),a={};n&&(a["X-Recharge-Storefront-Access-Token"]=n);const o=await sr("post","/validate_login",{data:{code:t,email:r,session_token:e,shop:i},headers:a});if(o.errors)throw new Error(o.errors);return{apiToken:o.api_token,customerId:o.customer_id}}var Bp=Object.freeze({__proto__:null,loginShopifyAppProxy:Tp,loginShopifyApi:xp,sendPasswordlessCode:Rp,sendPasswordlessCodeAppProxy:Fp,validatePasswordlessCode:Mp,validatePasswordlessCodeAppProxy:Dp});let Np=(r=21)=>crypto.getRandomValues(new Uint8Array(r)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");function Up(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 Qr=Up;function Cp(){this.__data__=[],this.size=0}var Lp=Cp;function jp(r,e){return r===e||r!==r&&e!==e}var et=jp,kp=et;function qp(r,e){for(var t=r.length;t--;)if(kp(r[t][0],e))return t;return-1}var rt=qp,Gp=rt,Wp=Array.prototype,Vp=Wp.splice;function Hp(r){var e=this.__data__,t=Gp(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Vp.call(e,t,1),--this.size,!0}var zp=Hp,Xp=rt;function Yp(r){var e=this.__data__,t=Xp(e,r);return t<0?void 0:e[t][1]}var Kp=Yp,Zp=rt;function Jp(r){return Zp(this.__data__,r)>-1}var Qp=Jp,eh=rt;function rh(r,e){var t=this.__data__,n=eh(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var th=rh,nh=Lp,ih=zp,ah=Kp,oh=Qp,uh=th;function qe(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])}}qe.prototype.clear=nh,qe.prototype.delete=ih,qe.prototype.get=ah,qe.prototype.has=oh,qe.prototype.set=uh;var tt=qe,sh=tt;function fh(){this.__data__=new sh,this.size=0}var ch=fh;function lh(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var ph=lh;function hh(r){return this.__data__.get(r)}var dh=hh;function yh(r){return this.__data__.has(r)}var vh=yh,gh=typeof ne=="object"&&ne&&ne.Object===Object&&ne,Ua=gh,_h=Ua,mh=typeof self=="object"&&self&&self.Object===Object&&self,wh=_h||mh||Function("return this")(),G=wh,bh=G,$h=bh.Symbol,Ge=$h,Ca=Ge,La=Object.prototype,Ah=La.hasOwnProperty,Eh=La.toString,fr=Ca?Ca.toStringTag:void 0;function Oh(r){var e=Ah.call(r,fr),t=r[fr];try{r[fr]=void 0;var n=!0}catch{}var i=Eh.call(r);return n&&(e?r[fr]=t:delete r[fr]),i}var Sh=Oh,Ih=Object.prototype,Ph=Ih.toString;function Th(r){return Ph.call(r)}var xh=Th,ja=Ge,Rh=Sh,Fh=xh,Mh="[object Null]",Dh="[object Undefined]",ka=ja?ja.toStringTag:void 0;function Bh(r){return r==null?r===void 0?Dh:Mh:ka&&ka in Object(r)?Rh(r):Fh(r)}var se=Bh;function Nh(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var fe=Nh,Uh=se,Ch=fe,Lh="[object AsyncFunction]",jh="[object Function]",kh="[object GeneratorFunction]",qh="[object Proxy]";function Gh(r){if(!Ch(r))return!1;var e=Uh(r);return e==jh||e==kh||e==Lh||e==qh}var xn=Gh,Wh=G,Vh=Wh["__core-js_shared__"],Hh=Vh,Rn=Hh,qa=function(){var r=/[^.]+$/.exec(Rn&&Rn.keys&&Rn.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function zh(r){return!!qa&&qa in r}var Xh=zh,Yh=Function.prototype,Kh=Yh.toString;function Zh(r){if(r!=null){try{return Kh.call(r)}catch{}try{return r+""}catch{}}return""}var Ga=Zh,Jh=xn,Qh=Xh,ed=fe,rd=Ga,td=/[\\^$.*+?()[\]{}|]/g,nd=/^\[object .+?Constructor\]$/,id=Function.prototype,ad=Object.prototype,od=id.toString,ud=ad.hasOwnProperty,sd=RegExp("^"+od.call(ud).replace(td,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fd(r){if(!ed(r)||Qh(r))return!1;var e=Jh(r)?sd:nd;return e.test(rd(r))}var cd=fd;function ld(r,e){return r?.[e]}var pd=ld,hd=cd,dd=pd;function yd(r,e){var t=dd(r,e);return hd(t)?t:void 0}var Se=yd,vd=Se,gd=G,_d=vd(gd,"Map"),Fn=_d,md=Se,wd=md(Object,"create"),nt=wd,Wa=nt;function bd(){this.__data__=Wa?Wa(null):{},this.size=0}var $d=bd;function Ad(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var Ed=Ad,Od=nt,Sd="__lodash_hash_undefined__",Id=Object.prototype,Pd=Id.hasOwnProperty;function Td(r){var e=this.__data__;if(Od){var t=e[r];return t===Sd?void 0:t}return Pd.call(e,r)?e[r]:void 0}var xd=Td,Rd=nt,Fd=Object.prototype,Md=Fd.hasOwnProperty;function Dd(r){var e=this.__data__;return Rd?e[r]!==void 0:Md.call(e,r)}var Bd=Dd,Nd=nt,Ud="__lodash_hash_undefined__";function Cd(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Nd&&e===void 0?Ud:e,this}var Ld=Cd,jd=$d,kd=Ed,qd=xd,Gd=Bd,Wd=Ld;function We(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])}}We.prototype.clear=jd,We.prototype.delete=kd,We.prototype.get=qd,We.prototype.has=Gd,We.prototype.set=Wd;var Vd=We,Va=Vd,Hd=tt,zd=Fn;function Xd(){this.size=0,this.__data__={hash:new Va,map:new(zd||Hd),string:new Va}}var Yd=Xd;function Kd(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var Zd=Kd,Jd=Zd;function Qd(r,e){var t=r.__data__;return Jd(e)?t[typeof e=="string"?"string":"hash"]:t.map}var it=Qd,ey=it;function ry(r){var e=ey(this,r).delete(r);return this.size-=e?1:0,e}var ty=ry,ny=it;function iy(r){return ny(this,r).get(r)}var ay=iy,oy=it;function uy(r){return oy(this,r).has(r)}var sy=uy,fy=it;function cy(r,e){var t=fy(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var ly=cy,py=Yd,hy=ty,dy=ay,yy=sy,vy=ly;function Ve(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])}}Ve.prototype.clear=py,Ve.prototype.delete=hy,Ve.prototype.get=dy,Ve.prototype.has=yy,Ve.prototype.set=vy;var Mn=Ve,gy=tt,_y=Fn,my=Mn,wy=200;function by(r,e){var t=this.__data__;if(t instanceof gy){var n=t.__data__;if(!_y||n.length<wy-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new my(n)}return t.set(r,e),this.size=t.size,this}var $y=by,Ay=tt,Ey=ch,Oy=ph,Sy=dh,Iy=vh,Py=$y;function He(r){var e=this.__data__=new Ay(r);this.size=e.size}He.prototype.clear=Ey,He.prototype.delete=Oy,He.prototype.get=Sy,He.prototype.has=Iy,He.prototype.set=Py;var Dn=He;function Ty(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var Bn=Ty,xy=Se,Ry=function(){try{var r=xy(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Ha=Ry,za=Ha;function Fy(r,e,t){e=="__proto__"&&za?za(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var Xa=Fy,My=Xa,Dy=et,By=Object.prototype,Ny=By.hasOwnProperty;function Uy(r,e,t){var n=r[e];(!(Ny.call(r,e)&&Dy(n,t))||t===void 0&&!(e in r))&&My(r,e,t)}var Ya=Uy,Cy=Ya,Ly=Xa;function jy(r,e,t,n){var i=!t;t||(t={});for(var a=-1,o=e.length;++a<o;){var s=e[a],f=n?n(t[s],r[s],s,t,r):void 0;f===void 0&&(f=r[s]),i?Ly(t,s,f):Cy(t,s,f)}return t}var ze=jy;function ky(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Ka=ky;function qy(r){return r!=null&&typeof r=="object"}var V=qy,Gy=se,Wy=V,Vy="[object Arguments]";function Hy(r){return Wy(r)&&Gy(r)==Vy}var zy=Hy,Za=zy,Xy=V,Ja=Object.prototype,Yy=Ja.hasOwnProperty,Ky=Ja.propertyIsEnumerable,Zy=Za(function(){return arguments}())?Za:function(r){return Xy(r)&&Yy.call(r,"callee")&&!Ky.call(r,"callee")},Nn=Zy,Jy=Array.isArray,U=Jy,cr={exports:{}};function Qy(){return!1}var ev=Qy;(function(r,e){var t=G,n=ev,i=e&&!e.nodeType&&e,a=i&&!0&&r&&!r.nodeType&&r,o=a&&a.exports===i,s=o?t.Buffer:void 0,f=s?s.isBuffer:void 0,c=f||n;r.exports=c})(cr,cr.exports);var rv=9007199254740991,tv=/^(?:0|[1-9]\d*)$/;function nv(r,e){var t=typeof r;return e=e??rv,!!e&&(t=="number"||t!="symbol"&&tv.test(r))&&r>-1&&r%1==0&&r<e}var at=nv,iv=9007199254740991;function av(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=iv}var Un=av,ov=se,uv=Un,sv=V,fv="[object Arguments]",cv="[object Array]",lv="[object Boolean]",pv="[object Date]",hv="[object Error]",dv="[object Function]",yv="[object Map]",vv="[object Number]",gv="[object Object]",_v="[object RegExp]",mv="[object Set]",wv="[object String]",bv="[object WeakMap]",$v="[object ArrayBuffer]",Av="[object DataView]",Ev="[object Float32Array]",Ov="[object Float64Array]",Sv="[object Int8Array]",Iv="[object Int16Array]",Pv="[object Int32Array]",Tv="[object Uint8Array]",xv="[object Uint8ClampedArray]",Rv="[object Uint16Array]",Fv="[object Uint32Array]",F={};F[Ev]=F[Ov]=F[Sv]=F[Iv]=F[Pv]=F[Tv]=F[xv]=F[Rv]=F[Fv]=!0,F[fv]=F[cv]=F[$v]=F[lv]=F[Av]=F[pv]=F[hv]=F[dv]=F[yv]=F[vv]=F[gv]=F[_v]=F[mv]=F[wv]=F[bv]=!1;function Mv(r){return sv(r)&&uv(r.length)&&!!F[ov(r)]}var Dv=Mv;function Bv(r){return function(e){return r(e)}}var Cn=Bv,lr={exports:{}};(function(r,e){var t=Ua,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,s=function(){try{var f=i&&i.require&&i.require("util").types;return f||o&&o.binding&&o.binding("util")}catch{}}();r.exports=s})(lr,lr.exports);var Nv=Dv,Uv=Cn,Qa=lr.exports,eo=Qa&&Qa.isTypedArray,Cv=eo?Uv(eo):Nv,ro=Cv,Lv=Ka,jv=Nn,kv=U,qv=cr.exports,Gv=at,Wv=ro,Vv=Object.prototype,Hv=Vv.hasOwnProperty;function zv(r,e){var t=kv(r),n=!t&&jv(r),i=!t&&!n&&qv(r),a=!t&&!n&&!i&&Wv(r),o=t||n||i||a,s=o?Lv(r.length,String):[],f=s.length;for(var c in r)(e||Hv.call(r,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Gv(c,f)))&&s.push(c);return s}var to=zv,Xv=Object.prototype;function Yv(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Xv;return r===t}var Ln=Yv;function Kv(r,e){return function(t){return r(e(t))}}var no=Kv,Zv=no,Jv=Zv(Object.keys,Object),Qv=Jv,eg=Ln,rg=Qv,tg=Object.prototype,ng=tg.hasOwnProperty;function ig(r){if(!eg(r))return rg(r);var e=[];for(var t in Object(r))ng.call(r,t)&&t!="constructor"&&e.push(t);return e}var ag=ig,og=xn,ug=Un;function sg(r){return r!=null&&ug(r.length)&&!og(r)}var pr=sg,fg=to,cg=ag,lg=pr;function pg(r){return lg(r)?fg(r):cg(r)}var Xe=pg,hg=ze,dg=Xe;function yg(r,e){return r&&hg(e,dg(e),r)}var vg=yg;function gg(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var _g=gg,mg=fe,wg=Ln,bg=_g,$g=Object.prototype,Ag=$g.hasOwnProperty;function Eg(r){if(!mg(r))return bg(r);var e=wg(r),t=[];for(var n in r)n=="constructor"&&(e||!Ag.call(r,n))||t.push(n);return t}var Og=Eg,Sg=to,Ig=Og,Pg=pr;function Tg(r){return Pg(r)?Sg(r,!0):Ig(r)}var ot=Tg,xg=ze,Rg=ot;function Fg(r,e){return r&&xg(e,Rg(e),r)}var Mg=Fg,jn={exports:{}};(function(r,e){var t=G,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a?t.Buffer:void 0,s=o?o.allocUnsafe:void 0;function f(c,l){if(l)return c.slice();var u=c.length,p=s?s(u):new c.constructor(u);return c.copy(p),p}r.exports=f})(jn,jn.exports);function Dg(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var kn=Dg;function Bg(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 Ng=Bg;function Ug(){return[]}var io=Ug,Cg=Ng,Lg=io,jg=Object.prototype,kg=jg.propertyIsEnumerable,ao=Object.getOwnPropertySymbols,qg=ao?function(r){return r==null?[]:(r=Object(r),Cg(ao(r),function(e){return kg.call(r,e)}))}:Lg,qn=qg,Gg=ze,Wg=qn;function Vg(r,e){return Gg(r,Wg(r),e)}var Hg=Vg;function zg(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var Gn=zg,Xg=no,Yg=Xg(Object.getPrototypeOf,Object),Wn=Yg,Kg=Gn,Zg=Wn,Jg=qn,Qg=io,e_=Object.getOwnPropertySymbols,r_=e_?function(r){for(var e=[];r;)Kg(e,Jg(r)),r=Zg(r);return e}:Qg,oo=r_,t_=ze,n_=oo;function i_(r,e){return t_(r,n_(r),e)}var a_=i_,o_=Gn,u_=U;function s_(r,e,t){var n=e(r);return u_(r)?n:o_(n,t(r))}var uo=s_,f_=uo,c_=qn,l_=Xe;function p_(r){return f_(r,l_,c_)}var so=p_,h_=uo,d_=oo,y_=ot;function v_(r){return h_(r,y_,d_)}var fo=v_,g_=Se,__=G,m_=g_(__,"DataView"),w_=m_,b_=Se,$_=G,A_=b_($_,"Promise"),E_=A_,O_=Se,S_=G,I_=O_(S_,"Set"),P_=I_,T_=Se,x_=G,R_=T_(x_,"WeakMap"),co=R_,Vn=w_,Hn=Fn,zn=E_,Xn=P_,Yn=co,lo=se,Ye=Ga,po="[object Map]",F_="[object Object]",ho="[object Promise]",yo="[object Set]",vo="[object WeakMap]",go="[object DataView]",M_=Ye(Vn),D_=Ye(Hn),B_=Ye(zn),N_=Ye(Xn),U_=Ye(Yn),Ie=lo;(Vn&&Ie(new Vn(new ArrayBuffer(1)))!=go||Hn&&Ie(new Hn)!=po||zn&&Ie(zn.resolve())!=ho||Xn&&Ie(new Xn)!=yo||Yn&&Ie(new Yn)!=vo)&&(Ie=function(r){var e=lo(r),t=e==F_?r.constructor:void 0,n=t?Ye(t):"";if(n)switch(n){case M_:return go;case D_:return po;case B_:return ho;case N_:return yo;case U_:return vo}return e});var ut=Ie,C_=Object.prototype,L_=C_.hasOwnProperty;function j_(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&L_.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var k_=j_,q_=G,G_=q_.Uint8Array,_o=G_,mo=_o;function W_(r){var e=new r.constructor(r.byteLength);return new mo(e).set(new mo(r)),e}var Kn=W_,V_=Kn;function H_(r,e){var t=e?V_(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var z_=H_,X_=/\w*$/;function Y_(r){var e=new r.constructor(r.source,X_.exec(r));return e.lastIndex=r.lastIndex,e}var K_=Y_,wo=Ge,bo=wo?wo.prototype:void 0,$o=bo?bo.valueOf:void 0;function Z_(r){return $o?Object($o.call(r)):{}}var J_=Z_,Q_=Kn;function em(r,e){var t=e?Q_(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var rm=em,tm=Kn,nm=z_,im=K_,am=J_,om=rm,um="[object Boolean]",sm="[object Date]",fm="[object Map]",cm="[object Number]",lm="[object RegExp]",pm="[object Set]",hm="[object String]",dm="[object Symbol]",ym="[object ArrayBuffer]",vm="[object DataView]",gm="[object Float32Array]",_m="[object Float64Array]",mm="[object Int8Array]",wm="[object Int16Array]",bm="[object Int32Array]",$m="[object Uint8Array]",Am="[object Uint8ClampedArray]",Em="[object Uint16Array]",Om="[object Uint32Array]";function Sm(r,e,t){var n=r.constructor;switch(e){case ym:return tm(r);case um:case sm:return new n(+r);case vm:return nm(r,t);case gm:case _m:case mm:case wm:case bm:case $m:case Am:case Em:case Om:return om(r,t);case fm:return new n;case cm:case hm:return new n(r);case lm:return im(r);case pm:return new n;case dm:return am(r)}}var Im=Sm,Pm=fe,Ao=Object.create,Tm=function(){function r(){}return function(e){if(!Pm(e))return{};if(Ao)return Ao(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),st=Tm,xm=st,Rm=Wn,Fm=Ln;function Mm(r){return typeof r.constructor=="function"&&!Fm(r)?xm(Rm(r)):{}}var Dm=Mm,Bm=ut,Nm=V,Um="[object Map]";function Cm(r){return Nm(r)&&Bm(r)==Um}var Lm=Cm,jm=Lm,km=Cn,Eo=lr.exports,Oo=Eo&&Eo.isMap,qm=Oo?km(Oo):jm,Gm=qm,Wm=ut,Vm=V,Hm="[object Set]";function zm(r){return Vm(r)&&Wm(r)==Hm}var Xm=zm,Ym=Xm,Km=Cn,So=lr.exports,Io=So&&So.isSet,Zm=Io?Km(Io):Ym,Jm=Zm,Qm=Dn,ew=Bn,rw=Ya,tw=vg,nw=Mg,iw=jn.exports,aw=kn,ow=Hg,uw=a_,sw=so,fw=fo,cw=ut,lw=k_,pw=Im,hw=Dm,dw=U,yw=cr.exports,vw=Gm,gw=fe,_w=Jm,mw=Xe,ww=ot,bw=1,$w=2,Aw=4,Po="[object Arguments]",Ew="[object Array]",Ow="[object Boolean]",Sw="[object Date]",Iw="[object Error]",To="[object Function]",Pw="[object GeneratorFunction]",Tw="[object Map]",xw="[object Number]",xo="[object Object]",Rw="[object RegExp]",Fw="[object Set]",Mw="[object String]",Dw="[object Symbol]",Bw="[object WeakMap]",Nw="[object ArrayBuffer]",Uw="[object DataView]",Cw="[object Float32Array]",Lw="[object Float64Array]",jw="[object Int8Array]",kw="[object Int16Array]",qw="[object Int32Array]",Gw="[object Uint8Array]",Ww="[object Uint8ClampedArray]",Vw="[object Uint16Array]",Hw="[object Uint32Array]",x={};x[Po]=x[Ew]=x[Nw]=x[Uw]=x[Ow]=x[Sw]=x[Cw]=x[Lw]=x[jw]=x[kw]=x[qw]=x[Tw]=x[xw]=x[xo]=x[Rw]=x[Fw]=x[Mw]=x[Dw]=x[Gw]=x[Ww]=x[Vw]=x[Hw]=!0,x[Iw]=x[To]=x[Bw]=!1;function ft(r,e,t,n,i,a){var o,s=e&bw,f=e&$w,c=e&Aw;if(t&&(o=i?t(r,n,i,a):t(r)),o!==void 0)return o;if(!gw(r))return r;var l=dw(r);if(l){if(o=lw(r),!s)return aw(r,o)}else{var u=cw(r),p=u==To||u==Pw;if(yw(r))return iw(r,s);if(u==xo||u==Po||p&&!i){if(o=f||p?{}:hw(r),!s)return f?uw(r,nw(o,r)):ow(r,tw(o,r))}else{if(!x[u])return i?r:{};o=pw(r,u,s)}}a||(a=new Qm);var d=a.get(r);if(d)return d;a.set(r,o),_w(r)?r.forEach(function(b){o.add(ft(b,e,t,b,r,a))}):vw(r)&&r.forEach(function(b,w){o.set(w,ft(b,e,t,w,r,a))});var _=c?f?fw:sw:f?ww:mw,$=l?void 0:_(r);return ew($||r,function(b,w){$&&(w=b,b=r[w]),rw(o,w,ft(b,e,t,w,r,a))}),o}var zw=ft,Xw=se,Yw=V,Kw="[object Symbol]";function Zw(r){return typeof r=="symbol"||Yw(r)&&Xw(r)==Kw}var ct=Zw,Jw=U,Qw=ct,e0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r0=/^\w*$/;function t0(r,e){if(Jw(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||Qw(r)?!0:r0.test(r)||!e0.test(r)||e!=null&&r in Object(e)}var Zn=t0,Ro=Mn,n0="Expected a function";function Jn(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(n0);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(Jn.Cache||Ro),t}Jn.Cache=Ro;var i0=Jn,a0=i0,o0=500;function u0(r){var e=a0(r,function(n){return t.size===o0&&t.clear(),n}),t=e.cache;return e}var s0=u0,f0=s0,c0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l0=/\\(\\)?/g,p0=f0(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(c0,function(t,n,i,a){e.push(i?a.replace(l0,"$1"):n||t)}),e}),h0=p0,Fo=Ge,d0=Qr,y0=U,v0=ct,g0=1/0,Mo=Fo?Fo.prototype:void 0,Do=Mo?Mo.toString:void 0;function Bo(r){if(typeof r=="string")return r;if(y0(r))return d0(r,Bo)+"";if(v0(r))return Do?Do.call(r):"";var e=r+"";return e=="0"&&1/r==-g0?"-0":e}var _0=Bo,m0=_0;function w0(r){return r==null?"":m0(r)}var b0=w0,$0=U,A0=Zn,E0=h0,O0=b0;function S0(r,e){return $0(r)?r:A0(r,e)?[r]:E0(O0(r))}var lt=S0;function I0(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var P0=I0,T0=ct,x0=1/0;function R0(r){if(typeof r=="string"||T0(r))return r;var e=r+"";return e=="0"&&1/r==-x0?"-0":e}var hr=R0,F0=lt,M0=hr;function D0(r,e){e=F0(e,r);for(var t=0,n=e.length;r!=null&&t<n;)r=r[M0(e[t++])];return t&&t==n?r:void 0}var Qn=D0;function B0(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 N0=B0,U0=Qn,C0=N0;function L0(r,e){return e.length<2?r:U0(r,C0(e,0,-1))}var j0=L0,k0=lt,q0=P0,G0=j0,W0=hr;function V0(r,e){return e=k0(e,r),r=G0(r,e),r==null||delete r[W0(q0(e))]}var H0=V0,z0=se,X0=Wn,Y0=V,K0="[object Object]",Z0=Function.prototype,J0=Object.prototype,No=Z0.toString,Q0=J0.hasOwnProperty,eb=No.call(Object);function rb(r){if(!Y0(r)||z0(r)!=K0)return!1;var e=X0(r);if(e===null)return!0;var t=Q0.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&No.call(t)==eb}var tb=rb,nb=tb;function ib(r){return nb(r)?void 0:r}var ab=ib,Uo=Ge,ob=Nn,ub=U,Co=Uo?Uo.isConcatSpreadable:void 0;function sb(r){return ub(r)||ob(r)||!!(Co&&r&&r[Co])}var fb=sb,cb=Gn,lb=fb;function Lo(r,e,t,n,i){var a=-1,o=r.length;for(t||(t=lb),i||(i=[]);++a<o;){var s=r[a];e>0&&t(s)?e>1?Lo(s,e-1,t,n,i):cb(i,s):n||(i[i.length]=s)}return i}var pb=Lo,hb=pb;function db(r){var e=r==null?0:r.length;return e?hb(r,1):[]}var yb=db;function vb(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 ei=vb,gb=ei,jo=Math.max;function _b(r,e,t){return e=jo(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,a=jo(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=t(o),gb(r,this,s)}}var ko=_b;function mb(r){return function(){return r}}var wb=mb;function bb(r){return r}var dr=bb,$b=wb,qo=Ha,Ab=dr,Eb=qo?function(r,e){return qo(r,"toString",{configurable:!0,enumerable:!1,value:$b(e),writable:!0})}:Ab,Ob=Eb,Sb=800,Ib=16,Pb=Date.now;function Tb(r){var e=0,t=0;return function(){var n=Pb(),i=Ib-(n-t);if(t=n,i>0){if(++e>=Sb)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var Go=Tb,xb=Ob,Rb=Go,Fb=Rb(xb),ri=Fb,Mb=yb,Db=ko,Bb=ri;function Nb(r){return Bb(Db(r,void 0,Mb),r+"")}var Ub=Nb,Cb=Qr,Lb=zw,jb=H0,kb=lt,qb=ze,Gb=ab,Wb=Ub,Vb=fo,Hb=1,zb=2,Xb=4,Yb=Wb(function(r,e){var t={};if(r==null)return t;var n=!1;e=Cb(e,function(a){return a=kb(a,r),n||(n=a.length>1),a}),qb(r,Vb(r),t),n&&(t=Lb(t,Hb|zb|Xb,Gb));for(var i=e.length;i--;)jb(t,e[i]);return t}),ti=Yb,Kb=Object.defineProperty,Zb=Object.defineProperties,Jb=Object.getOwnPropertyDescriptors,Wo=Object.getOwnPropertySymbols,Qb=Object.prototype.hasOwnProperty,e1=Object.prototype.propertyIsEnumerable,Vo=(r,e,t)=>e in r?Kb(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,r1=(r,e)=>{for(var t in e||(e={}))Qb.call(e,t)&&Vo(r,t,e[t]);if(Wo)for(var t of Wo(e))e1.call(e,t)&&Vo(r,t,e[t]);return r},t1=(r,e)=>Zb(r,Jb(e));function n1(r){try{return JSON.parse(r)}catch{return r}}function i1(r){return Object.entries(r).reduce((e,[t,n])=>t1(r1({},e),{[t]:n1(n)}),{})}const Ho=r=>typeof r=="string"?r!=="0"&&r!=="false":!!r;var a1=Object.defineProperty,o1=Object.defineProperties,u1=Object.getOwnPropertyDescriptors,zo=Object.getOwnPropertySymbols,s1=Object.prototype.hasOwnProperty,f1=Object.prototype.propertyIsEnumerable,Xo=(r,e,t)=>e in r?a1(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Yo=(r,e)=>{for(var t in e||(e={}))s1.call(e,t)&&Xo(r,t,e[t]);if(zo)for(var t of zo(e))f1.call(e,t)&&Xo(r,t,e[t]);return r},Ko=(r,e)=>o1(r,u1(e));function Zo(r){var e;const t=i1(r),n=t.auto_inject===void 0?!0:t.auto_inject,i=(e=t.display_on)!=null?e:[],a=t.first_option==="autodeliver";return Ko(Yo({},ti(t,["display_on","first_option"])),{auto_inject:n,valid_pages:i,is_subscription_first:a,autoInject:n,validPages:i,isSubscriptionFirst:a})}function Jo(r){var e;const t=((e=r.subscription_options)==null?void 0:e.storefront_purchase_options)==="subscription_only";return Ko(Yo({},r),{is_subscription_only:t,isSubscriptionOnly:t})}function c1(r){return r.map(e=>{const t={};return Object.entries(e).forEach(([n,i])=>{t[n]=Jo(i)}),t})}const pt="2020-12",l1={store_currency:{currency_code:"USD",currency_symbol:"$",decimal_separator:".",thousands_separator:",",currency_symbol_location:"left"}},yr=new Map;function ht(r,e){return yr.has(r)||yr.set(r,e()),yr.get(r)}async function ni(r){const{product:e}=await ht(`product.${r}`,()=>Jr("get",`/product/${pt}/${r}.json`));return Jo(e)}async function Qo(){return await ht("storeSettings",()=>Jr("get",`/${pt}/store_settings.json`).catch(()=>l1))}async function eu(){const{widget_settings:r}=await ht("widgetSettings",()=>Jr("get",`/${pt}/widget_settings.json`));return Zo(r)}async function ru(){const{products:r,widget_settings:e,store_settings:t,meta:n}=await ht("productsAndSettings",()=>Jr("get",`/product/${pt}/products.json`));return n?.status==="error"?Promise.reject(n.message):{products:c1(r),widget_settings:Zo(e),store_settings:t??{}}}async function p1(){const{products:r}=await ru();return r}async function h1(r){const[e,t,n]=await Promise.all([ni(r),Qo(),eu()]);return{product:e,store_settings:t,widget_settings:n,storeSettings:t,widgetSettings:n}}async function tu(r){const{bundle_product:e}=await ni(r);return e}async function nu(){return Array.from(yr.keys()).forEach(r=>yr.delete(r))}var d1=Object.freeze({__proto__:null,getCDNProduct:ni,getCDNStoreSettings:Qo,getCDNWidgetSettings:eu,getCDNProductsAndSettings:ru,getCDNProducts:p1,getCDNProductAndSettings:h1,getCDNBundleSettings:tu,resetCDNCache:nu}),iu={},ii={},ce={},y1=se,v1=V,g1="[object Number]";function _1(r){return typeof r=="number"||v1(r)&&y1(r)==g1}var dt=_1,M={},au={exports:{}},m1=dr,w1=ko,b1=ri;function $1(r,e){return b1(w1(r,e,m1),r+"")}var ou=$1,A1=et,E1=pr,O1=at,S1=fe;function I1(r,e,t){if(!S1(t))return!1;var n=typeof e;return(n=="number"?E1(t)&&O1(e,t.length):n=="string"&&e in t)?A1(t[e],r):!1}var uu=I1,P1=ou,T1=uu;function x1(r){return P1(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&&T1(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var s=t[n];s&&r(e,s,n,a)}return e})}var R1=x1,F1=ze,M1=R1,D1=ot,B1=M1(function(r,e){F1(e,D1(e),r)}),N1=B1;(function(r){r.exports=N1})(au);var yt={},Pe={};function U1(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 C1=U1;function L1(r){return function(e,t,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var f=o[r?s:++i];if(t(a[f],f,a)===!1)break}return e}}var j1=L1,k1=j1,q1=k1(),G1=q1,W1=G1,V1=Xe;function H1(r,e){return r&&W1(r,e,V1)}var z1=H1,X1=pr;function Y1(r,e){return function(t,n){if(t==null)return t;if(!X1(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 K1=Y1,Z1=z1,J1=K1,Q1=J1(Z1),ai=Q1,e$=ai;function r$(r,e){var t=!0;return e$(r,function(n,i,a){return t=!!e(n,i,a),t}),t}var t$=r$,n$="__lodash_hash_undefined__";function i$(r){return this.__data__.set(r,n$),this}var a$=i$;function o$(r){return this.__data__.has(r)}var u$=o$,s$=Mn,f$=a$,c$=u$;function vt(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new s$;++e<t;)this.add(r[e])}vt.prototype.add=vt.prototype.push=f$,vt.prototype.has=c$;var l$=vt;function p$(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 h$=p$;function d$(r,e){return r.has(e)}var y$=d$,v$=l$,g$=h$,_$=y$,m$=1,w$=2;function b$(r,e,t,n,i,a){var o=t&m$,s=r.length,f=e.length;if(s!=f&&!(o&&f>s))return!1;var c=a.get(r),l=a.get(e);if(c&&l)return c==e&&l==r;var u=-1,p=!0,d=t&w$?new v$:void 0;for(a.set(r,e),a.set(e,r);++u<s;){var _=r[u],$=e[u];if(n)var b=o?n($,_,u,e,r,a):n(_,$,u,r,e,a);if(b!==void 0){if(b)continue;p=!1;break}if(d){if(!g$(e,function(w,A){if(!_$(d,A)&&(_===w||i(_,w,t,n,a)))return d.push(A)})){p=!1;break}}else if(!(_===$||i(_,$,t,n,a))){p=!1;break}}return a.delete(r),a.delete(e),p}var su=b$;function $$(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}var A$=$$;function E$(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var O$=E$,fu=Ge,cu=_o,S$=et,I$=su,P$=A$,T$=O$,x$=1,R$=2,F$="[object Boolean]",M$="[object Date]",D$="[object Error]",B$="[object Map]",N$="[object Number]",U$="[object RegExp]",C$="[object Set]",L$="[object String]",j$="[object Symbol]",k$="[object ArrayBuffer]",q$="[object DataView]",lu=fu?fu.prototype:void 0,oi=lu?lu.valueOf:void 0;function G$(r,e,t,n,i,a,o){switch(t){case q$:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case k$:return!(r.byteLength!=e.byteLength||!a(new cu(r),new cu(e)));case F$:case M$:case N$:return S$(+r,+e);case D$:return r.name==e.name&&r.message==e.message;case U$:case L$:return r==e+"";case B$:var s=P$;case C$:var f=n&x$;if(s||(s=T$),r.size!=e.size&&!f)return!1;var c=o.get(r);if(c)return c==e;n|=R$,o.set(r,e);var l=I$(s(r),s(e),n,i,a,o);return o.delete(r),l;case j$:if(oi)return oi.call(r)==oi.call(e)}return!1}var W$=G$,pu=so,V$=1,H$=Object.prototype,z$=H$.hasOwnProperty;function X$(r,e,t,n,i,a){var o=t&V$,s=pu(r),f=s.length,c=pu(e),l=c.length;if(f!=l&&!o)return!1;for(var u=f;u--;){var p=s[u];if(!(o?p in e:z$.call(e,p)))return!1}var d=a.get(r),_=a.get(e);if(d&&_)return d==e&&_==r;var $=!0;a.set(r,e),a.set(e,r);for(var b=o;++u<f;){p=s[u];var w=r[p],A=e[p];if(n)var h=o?n(A,w,p,e,r,a):n(w,A,p,r,e,a);if(!(h===void 0?w===A||i(w,A,t,n,a):h)){$=!1;break}b||(b=p=="constructor")}if($&&!b){var I=r.constructor,P=e.constructor;I!=P&&"constructor"in r&&"constructor"in e&&!(typeof I=="function"&&I instanceof I&&typeof P=="function"&&P instanceof P)&&($=!1)}return a.delete(r),a.delete(e),$}var Y$=X$,ui=Dn,K$=su,Z$=W$,J$=Y$,hu=ut,du=U,yu=cr.exports,Q$=ro,eA=1,vu="[object Arguments]",gu="[object Array]",gt="[object Object]",rA=Object.prototype,_u=rA.hasOwnProperty;function tA(r,e,t,n,i,a){var o=du(r),s=du(e),f=o?gu:hu(r),c=s?gu:hu(e);f=f==vu?gt:f,c=c==vu?gt:c;var l=f==gt,u=c==gt,p=f==c;if(p&&yu(r)){if(!yu(e))return!1;o=!0,l=!1}if(p&&!l)return a||(a=new ui),o||Q$(r)?K$(r,e,t,n,i,a):Z$(r,e,f,t,n,i,a);if(!(t&eA)){var d=l&&_u.call(r,"__wrapped__"),_=u&&_u.call(e,"__wrapped__");if(d||_){var $=d?r.value():r,b=_?e.value():e;return a||(a=new ui),i($,b,t,n,a)}}return p?(a||(a=new ui),J$(r,e,t,n,i,a)):!1}var nA=tA,iA=nA,mu=V;function wu(r,e,t,n,i){return r===e?!0:r==null||e==null||!mu(r)&&!mu(e)?r!==r&&e!==e:iA(r,e,t,n,wu,i)}var bu=wu,aA=Dn,oA=bu,uA=1,sA=2;function fA(r,e,t,n){var i=t.length,a=i,o=!n;if(r==null)return!a;for(r=Object(r);i--;){var s=t[i];if(o&&s[2]?s[1]!==r[s[0]]:!(s[0]in r))return!1}for(;++i<a;){s=t[i];var f=s[0],c=r[f],l=s[1];if(o&&s[2]){if(c===void 0&&!(f in r))return!1}else{var u=new aA;if(n)var p=n(c,l,f,r,e,u);if(!(p===void 0?oA(l,c,uA|sA,n,u):p))return!1}}return!0}var cA=fA,lA=fe;function pA(r){return r===r&&!lA(r)}var $u=pA,hA=$u,dA=Xe;function yA(r){for(var e=dA(r),t=e.length;t--;){var n=e[t],i=r[n];e[t]=[n,i,hA(i)]}return e}var vA=yA;function gA(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var Au=gA,_A=cA,mA=vA,wA=Au;function bA(r){var e=mA(r);return e.length==1&&e[0][2]?wA(e[0][0],e[0][1]):function(t){return t===r||_A(t,r,e)}}var $A=bA,AA=Qn;function EA(r,e,t){var n=r==null?void 0:AA(r,e);return n===void 0?t:n}var OA=EA;function SA(r,e){return r!=null&&e in Object(r)}var IA=SA,PA=lt,TA=Nn,xA=U,RA=at,FA=Un,MA=hr;function DA(r,e,t){e=PA(e,r);for(var n=-1,i=e.length,a=!1;++n<i;){var o=MA(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&&FA(i)&&RA(o,i)&&(xA(r)||TA(r)))}var BA=DA,NA=IA,UA=BA;function CA(r,e){return r!=null&&UA(r,e,NA)}var LA=CA,jA=bu,kA=OA,qA=LA,GA=Zn,WA=$u,VA=Au,HA=hr,zA=1,XA=2;function YA(r,e){return GA(r)&&WA(e)?VA(HA(r),e):function(t){var n=kA(t,r);return n===void 0&&n===e?qA(t,r):jA(e,n,zA|XA)}}var KA=YA;function ZA(r){return function(e){return e?.[r]}}var JA=ZA,QA=Qn;function eE(r){return function(e){return QA(e,r)}}var rE=eE,tE=JA,nE=rE,iE=Zn,aE=hr;function oE(r){return iE(r)?tE(aE(r)):nE(r)}var uE=oE,sE=$A,fE=KA,cE=dr,lE=U,pE=uE;function hE(r){return typeof r=="function"?r:r==null?cE:typeof r=="object"?lE(r)?fE(r[0],r[1]):sE(r):pE(r)}var Eu=hE,dE=C1,yE=t$,vE=Eu,gE=U,_E=uu;function mE(r,e,t){var n=gE(r)?dE:yE;return t&&_E(r,e,t)&&(e=void 0),n(r,vE(e))}var si=mE;Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.calculatePadding=AE,Pe.slicePadding=EE;var wE=si,bE=$E(wE);function $E(r){return r&&r.__esModule?r:{default:r}}function AE(r){switch(r%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}}function EE(r,e){var t=r.slice(e),n=(0,bE.default)(t.buffer(),function(i){return i===0});if(n!==!0)throw new Error("XDR Read Error: invalid padding")}Object.defineProperty(yt,"__esModule",{value:!0}),yt.Cursor=void 0;var OE=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}}(),SE=Pe;function IE(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var fi=function(){function r(e){IE(this,r),e instanceof y||(e=typeof e=="number"?y.alloc(e):y.from(e)),this._setBuffer(e),this.rewind()}return OE(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,SE.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){fi.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){fi.prototype[e]=function(n){return this.buffer()[e](n,this.tell()),this.seek("+",r[0]),this}})}),yt.Cursor=fi,Object.defineProperty(M,"__esModule",{value:!0}),M.default=DE;var PE=au.exports,Ou=Iu(PE),TE=xn,xE=Iu(TE),Su=yt;function Iu(r){return r&&r.__esModule?r:{default:r}}var RE=Math.pow(2,16),FE={toXDR:function(e){var t=new Su.Cursor(RE);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 Su.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}}},ME={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 DE(r){(0,Ou.default)(r,FE),(0,xE.default)(r)&&(0,Ou.default)(r.prototype,ME)}Object.defineProperty(ce,"__esModule",{value:!0}),ce.Int=void 0;var BE=dt,Pu=Tu(BE),NE=M,UE=Tu(NE);function Tu(r){return r&&r.__esModule?r:{default:r}}var vr=ce.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,Pu.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,Pu.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,UE.default)(vr);var _t={};function CE(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 ci={exports:{}};(function(r){/**
|
|
25
25
|
* @license Long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
|
|
26
26
|
* Released under the Apache License, Version 2.0
|
|
27
27
|
* see: https://github.com/dcodeIO/Long.js for details
|
|
28
|
-
*/(function(e,t){typeof qE=="function"&&!0&&r&&r.exports?r.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t()})(re,function(){function e(p,u,l){this.low=p|0,this.high=u|0,this.unsigned=!!l}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,l){var y,_;return l?(u=u>>>0,0<=u&&u<256&&(_=n[u],_)?_:(y=new e(u,(u|0)<0?-1:0,!0),0<=u&&u<256&&(n[u]=y),y)):(u=u|0,-128<=u&&u<128&&(_=t[u],_)?_:(y=new e(u,u<0?-1:0,!1),-128<=u&&u<128&&(t[u]=y),y))},e.fromNumber=function(u,l){return l=!!l,isNaN(u)||!isFinite(u)?e.ZERO:!l&&u<=-f?e.MIN_VALUE:!l&&u+1>=f?e.MAX_VALUE:l&&u>=s?e.MAX_UNSIGNED_VALUE:u<0?e.fromNumber(-u,l).negate():new e(u%o|0,u/o|0,l)},e.fromBits=function(u,l,y){return new e(u,l,y)},e.fromString=function(u,l,y){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 l=="number"&&(y=l,l=!1),y=y||10,y<2||36<y)throw Error("radix out of range: "+y);var _;if((_=u.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+u);if(_===0)return e.fromString(u.substring(1),l,y).negate();for(var E=e.fromNumber(Math.pow(y,8)),$=e.ZERO,w=0;w<u.length;w+=8){var T=Math.min(8,u.length-w),h=parseInt(u.substring(w,w+T),y);if(T<8){var S=e.fromNumber(Math.pow(y,T));$=$.multiply(S).add(e.fromNumber(h))}else $=$.multiply(E),$=$.add(e.fromNumber(h))}return $.unsigned=l,$},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,s=o*o,f=s/2,c=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 l;if(this.isNegative())if(this.equals(e.MIN_VALUE)){var y=e.fromNumber(u),_=this.divide(y);return l=_.multiply(y).subtract(this),_.toString(u)+l.toInt().toString(u)}else return"-"+this.negate().toString(u);var E=e.fromNumber(Math.pow(u,6),this.unsigned);l=this;for(var $="";;){var w=l.divide(E),T=l.subtract(w.multiply(E)).toInt()>>>0,h=T.toString(u);if(l=w,l.isZero())return h+$;for(;h.length<6;)h="0"+h;$=""+h+$}},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,l=31;l>0&&(u&1<<l)==0;l--);return this.high!=0?l+33:l+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 l=this.isNegative(),y=u.isNegative();return l&&!y?-1:!l&&y?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 l=this.high>>>16,y=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,w=u.high&65535,T=u.low>>>16,h=u.low&65535,S=0,P=0,R=0,m=0;return m+=E+h,R+=m>>>16,m&=65535,R+=_+T,P+=R>>>16,R&=65535,P+=y+w,S+=P>>>16,P&=65535,S+=l+$,S&=65535,e.fromBits(R<<16|m,S<<16|P,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(c)&&u.lessThan(c))return e.fromNumber(this.toNumber()*u.toNumber(),this.unsigned);var l=this.high>>>16,y=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,w=u.high&65535,T=u.low>>>16,h=u.low&65535,S=0,P=0,R=0,m=0;return m+=E*h,R+=m>>>16,m&=65535,R+=_*h,P+=R>>>16,R&=65535,R+=E*T,P+=R>>>16,R&=65535,P+=y*h,S+=P>>>16,P&=65535,P+=_*T,S+=P>>>16,P&=65535,P+=E*w,S+=P>>>16,P&=65535,S+=l*h+y*T+_*w+E*$,S&=65535,e.fromBits(R<<16|m,S<<16|P,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 l,y,_;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 l=E.divide(u).shiftLeft(1),l.equals(e.ZERO)?u.isNegative()?e.ONE:e.NEG_ONE:(y=this.subtract(u.multiply(l)),_=l.add(y.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,y=this;y.greaterThanOrEqual(u);){l=Math.max(1,Math.floor(y.toNumber()/u.toNumber()));for(var $=Math.ceil(Math.log(l)/Math.LN2),w=$<=48?1:Math.pow(2,$-48),T=e.fromNumber(l),h=T.multiply(u);h.isNegative()||h.greaterThan(y);)l-=w,T=e.fromNumber(l,this.unsigned),h=T.multiply(u);T.isZero()&&(T=e.ONE),_=_.add(T),y=y.subtract(h)}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 l=this.high;if(u<32){var y=this.low;return e.fromBits(y>>>u|l<<32-u,l>>>u,this.unsigned)}else return u===32?e.fromBits(l,0,this.unsigned):e.fromBits(l>>>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})})(Jn),Object.defineProperty(yt,"__esModule",{value:!0}),yt.Hyper=void 0;var VE=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}}(),su=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)}},GE=Jn.exports,yr=fu(GE),WE=M,HE=fu(WE);function fu(r){return r&&r.__esModule?r:{default:r}}function XE(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function zE(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 YE(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 vr=yt.Hyper=function(r){YE(e,r),VE(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=su(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=su(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 XE(this,e),zE(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!1))}return e}(yr.default);(0,HE.default)(vr),vr.MAX_VALUE=new vr(yr.default.MAX_VALUE.low,yr.default.MAX_VALUE.high),vr.MIN_VALUE=new vr(yr.default.MIN_VALUE.low,yr.default.MIN_VALUE.high);var Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.UnsignedInt=void 0;var KE=lt,cu=lu(KE),ZE=M,JE=lu(ZE);function lu(r){return r&&r.__esModule?r:{default:r}}var gr=Pe.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,cu.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,cu.default)(e)||Math.floor(e)!==e?!1:e>=gr.MIN_VALUE&&e<=gr.MAX_VALUE}};gr.MAX_VALUE=Math.pow(2,32)-1,gr.MIN_VALUE=0,(0,JE.default)(gr);var vt={};Object.defineProperty(vt,"__esModule",{value:!0}),vt.UnsignedHyper=void 0;var QE=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}}(),pu=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)}},eA=Jn.exports,_r=hu(eA),rA=M,tA=hu(rA);function hu(r){return r&&r.__esModule?r:{default:r}}function nA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function iA(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 aA(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 mr=vt.UnsignedHyper=function(r){aA(e,r),QE(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=pu(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=pu(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 nA(this,e),iA(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!0))}return e}(_r.default);(0,tA.default)(mr),mr.MAX_VALUE=new mr(_r.default.MAX_UNSIGNED_VALUE.low,_r.default.MAX_UNSIGNED_VALUE.high),mr.MIN_VALUE=new mr(_r.default.MIN_VALUE.low,_r.default.MIN_VALUE.high);var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.Float=void 0;var oA=lt,du=yu(oA),uA=M,sA=yu(uA);function yu(r){return r&&r.__esModule?r:{default:r}}var fA=gt.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,du.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,du.default)(e)}};(0,sA.default)(fA);var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.Double=void 0;var cA=lt,vu=gu(cA),lA=M,pA=gu(lA);function gu(r){return r&&r.__esModule?r:{default:r}}var hA=_t.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,vu.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,vu.default)(e)}};(0,pA.default)(hA);var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.Quadruple=void 0;var dA=M,yA=vA(dA);function vA(r){return r&&r.__esModule?r:{default:r}}var gA=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,yA.default)(gA);var wr={},_A=oe,mA=W,wA="[object Boolean]";function bA(r){return r===!0||r===!1||mA(r)&&_A(r)==wA}var $A=bA;Object.defineProperty(wr,"__esModule",{value:!0}),wr.Bool=void 0;var EA=$A,AA=mu(EA),_u=ue,OA=M,SA=mu(OA);function mu(r){return r&&r.__esModule?r:{default:r}}var TA=wr.Bool={read:function(e){var t=_u.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 _u.Int.write(n,t)},isValid:function(e){return(0,AA.default)(e)}};(0,SA.default)(TA);var wt={},IA=oe,PA=N,xA=W,FA="[object String]";function RA(r){return typeof r=="string"||!PA(r)&&xA(r)&&IA(r)==FA}var wu=RA;Object.defineProperty(wt,"__esModule",{value:!0}),wt.String=void 0;var MA=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}}(),BA=wu,bu=Qn(BA),DA=N,UA=Qn(DA),$u=ue,NA=Pe,Eu=Ie,CA=M,LA=Qn(CA);function Qn(r){return r&&r.__esModule?r:{default:r}}function jA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var kA=wt.String=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NA.UnsignedInt.MAX_VALUE;jA(this,r),this._maxLength=e}return MA(r,[{key:"read",value:function(t){var n=$u.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,Eu.calculatePadding)(n),a=t.slice(n);return(0,Eu.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,bu.default)(t)?i=d.from(t,"utf8"):i=d.from(t),$u.Int.write(i.length,n),n.writeBufferPadded(i)}},{key:"isValid",value:function(t){var n=void 0;if((0,bu.default)(t))n=d.from(t,"utf8");else if((0,UA.default)(t)||d.isBuffer(t))n=d.from(t);else return!1;return n.length<=this._maxLength}}]),r}();(0,LA.default)(kA.prototype);var bt={};Object.defineProperty(bt,"__esModule",{value:!0}),bt.Opaque=void 0;var qA=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=Ie,VA=M,GA=WA(VA);function WA(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")}var XA=bt.Opaque=function(){function r(e){HA(this,r),this._length=e,this._padding=(0,Au.calculatePadding)(e)}return qA(r,[{key:"read",value:function(t){var n=t.slice(this._length);return(0,Au.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 d.isBuffer(t)&&t.length===this._length}}]),r}();(0,GA.default)(XA.prototype);var $t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.VarOpaque=void 0;var zA=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}}(),Ou=ue,YA=Pe,Su=Ie,KA=M,ZA=JA(KA);function JA(r){return r&&r.__esModule?r:{default:r}}function QA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var eO=$t.VarOpaque=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:YA.UnsignedInt.MAX_VALUE;QA(this,r),this._maxLength=e}return zA(r,[{key:"read",value:function(t){var n=Ou.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,Su.calculatePadding)(n),a=t.slice(n);return(0,Su.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));Ou.Int.write(t.length,n),n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return d.isBuffer(t)&&t.length<=this._maxLength}}]),r}();(0,ZA.default)(eO.prototype);var Et={},xe={exports:{}},rO=st;function tO(r){return typeof r=="function"?r:rO}var Tu=tO,nO=Sa,iO=Xn,aO=Tu,oO=N;function uO(r,e){var t=oO(r)?nO:iO;return t(r,aO(e))}var sO=uO;(function(r){r.exports=sO})(xe);var fO=/\s/;function cO(r){for(var e=r.length;e--&&fO.test(r.charAt(e)););return e}var lO=cO,pO=lO,hO=/^\s+/;function dO(r){return r&&r.slice(0,pO(r)+1).replace(hO,"")}var yO=dO,vO=yO,Iu=ve,gO=ot,Pu=0/0,_O=/^[-+]0x[0-9a-f]+$/i,mO=/^0b[01]+$/i,wO=/^0o[0-7]+$/i,bO=parseInt;function $O(r){if(typeof r=="number")return r;if(gO(r))return Pu;if(Iu(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Iu(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=vO(r);var t=mO.test(r);return t||wO.test(r)?bO(r.slice(2),t?2:8):_O.test(r)?Pu:+r}var EO=$O,AO=EO,xu=1/0,OO=17976931348623157e292;function SO(r){if(!r)return r===0?r:0;if(r=AO(r),r===xu||r===-xu){var e=r<0?-1:1;return e*OO}return r===r?r:0}var TO=SO,IO=TO;function PO(r){var e=IO(r),t=e%1;return e===e?t?e-t:e:0}var xO=PO,FO=Fa,RO=Tu,MO=xO,BO=9007199254740991,ei=4294967295,DO=Math.min;function UO(r,e){if(r=MO(r),r<1||r>BO)return[];var t=ei,n=DO(r,ei);e=RO(e),r-=ei;for(var i=FO(n,e);++t<r;)e(t);return i}var Fu=UO;Object.defineProperty(Et,"__esModule",{value:!0}),Et.Array=void 0;var NO=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}}(),CO=Kn,LO=br(CO),jO=xe.exports,kO=br(jO),qO=Fu,VO=br(qO),GO=N,Ru=br(GO),WO=M,HO=br(WO);function br(r){return r&&r.__esModule?r:{default:r}}function XO(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var zO=Et.Array=function(){function r(e,t){XO(this,r),this._childType=e,this._length=t}return NO(r,[{key:"read",value:function(t){var n=this;return(0,VO.default)(this._length,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,Ru.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,kO.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,Ru.default)(t)||t.length!==this._length?!1:(0,LO.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,HO.default)(zO.prototype);var At={};Object.defineProperty(At,"__esModule",{value:!0}),At.VarArray=void 0;var YO=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}}(),KO=Kn,ZO=$r(KO),JO=xe.exports,QO=$r(JO),eS=Fu,rS=$r(eS),tS=N,Mu=$r(tS),nS=Pe,Bu=ue,iS=M,aS=$r(iS);function $r(r){return r&&r.__esModule?r:{default:r}}function oS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var uS=At.VarArray=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nS.UnsignedInt.MAX_VALUE;oS(this,r),this._childType=e,this._maxLength=t}return YO(r,[{key:"read",value:function(t){var n=this,i=Bu.Int.read(t);if(i>this._maxLength)throw new Error("XDR Read Error: Saw "+i+" length VarArray,"+("max allowed is "+this._maxLength));return(0,rS.default)(i,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,Mu.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));Bu.Int.write(t.length,n),(0,QO.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,Mu.default)(t)||t.length>this._maxLength?!1:(0,ZO.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,aS.default)(uS.prototype);var Ot={};function sS(r){return r===null}var fS=sS;function cS(r){return r===void 0}var Er=cS;Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.Option=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}}(),pS=fS,Du=ri(pS),hS=Er,Uu=ri(hS),Nu=wr,dS=M,yS=ri(dS);function ri(r){return r&&r.__esModule?r:{default:r}}function vS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var gS=Ot.Option=function(){function r(e){vS(this,r),this._childType=e}return lS(r,[{key:"read",value:function(t){if(Nu.Bool.read(t))return this._childType.read(t)}},{key:"write",value:function(t,n){var i=!((0,Du.default)(t)||(0,Uu.default)(t));Nu.Bool.write(i,n),i&&this._childType.write(t,n)}},{key:"isValid",value:function(t){return(0,Du.default)(t)||(0,Uu.default)(t)?!0:this._childType.isValid(t)}}]),r}();(0,yS.default)(gS.prototype);var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.Void=void 0;var _S=Er,Cu=Lu(_S),mS=M,wS=Lu(mS);function Lu(r){return r&&r.__esModule?r:{default:r}}var bS=Ar.Void={read:function(){},write:function(e){if(!(0,Cu.default)(e))throw new Error("XDR Write Error: trying to write value to a void slot")},isValid:function(e){return(0,Cu.default)(e)}};(0,wS.default)(bS);var St={},$S=Zr;function ES(r,e){return $S(e,function(t){return r[t]})}var AS=ES,OS=AS,SS=Xe;function TS(r){return r==null?[]:OS(r,SS(r))}var IS=TS;Object.defineProperty(St,"__esModule",{value:!0}),St.Enum=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}}(),xS=xe.exports,FS=ti(xS),RS=IS,MS=ti(RS),ju=ue,BS=M,DS=ti(BS);function ti(r){return r&&r.__esModule?r:{default:r}}function US(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 NS(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 ku(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var CS=St.Enum=function(){function r(e,t){ku(this,r),this.name=e,this.value=t}return PS(r,null,[{key:"read",value:function(t){var n=ju.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);ju.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,MS.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){NS(s,o);function s(){return ku(this,s),US(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return s}(r);return a.enumName=n,t.results[n]=a,a._members={},a._byValue=new Map,(0,FS.default)(i,function(o,s){var f=new a(s,o);a._members[s]=f,a._byValue.set(o,f),a[s]=function(){return f}}),a}}]),r}();(0,DS.default)(CS);var Tt={},LS=Xn,jS=lr;function kS(r,e){var t=-1,n=jS(r)?Array(r.length):[];return LS(r,function(i,a,o){n[++t]=e(i,a,o)}),n}var qS=kS,VS=Zr,GS=tu,WS=qS,HS=N;function XS(r,e){var t=HS(r)?VS:WS;return t(r,GS(e))}var zS=XS;function YS(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 KS=YS,Or={};Object.defineProperty(Or,"__esModule",{value:!0});var ZS=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 JS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}Or.Reference=function(){function r(){JS(this,r)}return ZS(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 s=e[Symbol.iterator](),f;!(i=(f=s.next()).done)&&(n.push(f.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&s.return&&s.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")}}(),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=xe.exports,qu=Sr(eT),rT=zS,tT=Sr(rT),nT=Er,iT=Sr(nT),aT=KS,oT=Sr(aT),uT=Or,sT=M,fT=Sr(sT);function Sr(r){return r&&r.__esModule?r:{default:r}}function cT(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 lT(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 Vu(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var pT=Tt.Struct=function(){function r(e){Vu(this,r),this._attributes=e||{}}return QS(r,null,[{key:"read",value:function(t){var n=(0,tT.default)(this._fields,function(i){var a=It(i,2),o=a[0],s=a[1],f=s.read(t);return[o,f]});return new this((0,oT.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,qu.default)(this._fields,function(i){var a=It(i,2),o=a[0],s=a[1],f=t._attributes[o];s.write(f,n)})}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(o){lT(s,o);function s(){return Vu(this,s),cT(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return s}(r);return a.structName=n,t.results[n]=a,a._fields=i.map(function(o){var s=It(o,2),f=s[0],c=s[1];return c instanceof uT.Reference&&(c=c.resolve(t)),[f,c]}),(0,qu.default)(a._fields,function(o){var s=It(o,1),f=s[0];a.prototype[f]=hT(f)}),a}}]),r}();(0,fT.default)(pT);function hT(r){return function(t){return(0,iT.default)(t)||(this._attributes[r]=t),this._attributes[r]}}var Pt={};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.Union=void 0;var dT=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),f;!(i=(f=s.next()).done)&&(n.push(f.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&s.return&&s.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")}}(),yT=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}}(),vT=xe.exports,xt=Rt(vT),gT=Er,Gu=Rt(gT),_T=wu,Wu=Rt(_T),Ft=Ar,ni=Or,mT=M,wT=Rt(mT);function Rt(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 $T(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 Hu(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var ET=Pt.Union=function(){function r(e,t){Hu(this,r),this.set(e,t)}return yT(r,[{key:"set",value:function(t,n){(0,Wu.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,Gu.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(s){$T(f,s);function f(){return Hu(this,f),bT(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);a.unionName=n,t.results[n]=a,i.switchOn instanceof ni.Reference?a._switchOn=i.switchOn.resolve(t):a._switchOn=i.switchOn,a._switches=new Map,a._arms={},(0,xt.default)(i.arms,function(s,f){s instanceof ni.Reference&&(s=s.resolve(t)),a._arms[f]=s});var o=i.defaultArm;return o instanceof ni.Reference&&(o=o.resolve(t)),a._defaultArm=o,(0,xt.default)(i.switches,function(s){var f=dT(s,2),c=f[0],p=f[1];(0,Wu.default)(c)&&(c=a._switchOn.fromName(c)),a._switches.set(c,p)}),(0,Gu.default)(a._switchOn.values)||(0,xt.default)(a._switchOn.values(),function(s){a[s.name]=function(f){return new a(s,f)},a.prototype[s.name]=function(c){return this.set(s,c)}}),(0,xt.default)(a._arms,function(s,f){s!==Ft.Void&&(a.prototype[f]=function(){return this.get(f)})}),a}}]),r}();(0,wT.default)(ET),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=ue;Object.keys(e).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return e[h]}})});var t=yt;Object.keys(t).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return t[h]}})});var n=Pe;Object.keys(n).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return n[h]}})});var i=vt;Object.keys(i).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return i[h]}})});var a=gt;Object.keys(a).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return a[h]}})});var o=_t;Object.keys(o).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return o[h]}})});var s=mt;Object.keys(s).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return s[h]}})});var f=wr;Object.keys(f).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return f[h]}})});var c=wt;Object.keys(c).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return c[h]}})});var p=bt;Object.keys(p).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return p[h]}})});var u=$t;Object.keys(u).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return u[h]}})});var l=Et;Object.keys(l).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return l[h]}})});var y=At;Object.keys(y).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return y[h]}})});var _=Ot;Object.keys(_).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return _[h]}})});var E=Ar;Object.keys(E).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return E[h]}})});var $=St;Object.keys($).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return $[h]}})});var w=Tt;Object.keys(w).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return w[h]}})});var T=Pt;Object.keys(T).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return T[h]}})})}(Hn);var Xu={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function m(v,g){for(var b=0;b<g.length;b++){var O=g[b];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(v,O.key,O)}}return function(v,g,b){return g&&m(v.prototype,g),b&&m(v,b),v}}(),t=Or;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=Er,i=p(n),a=xe.exports,o=p(a),s=Hn,f=c(s);function c(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 p(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 l(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 y(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 R(v);m(g),g.resolve()}return v}var E=function(m){y(v,m);function v(g){u(this,v);var b=l(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return b.name=g,b}return e(v,[{key:"resolve",value:function(b){var O=b.definitions[this.name];return O.resolve(b)}}]),v}(t.Reference),$=function(m){y(v,m);function v(g,b){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;u(this,v);var C=l(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return C.childReference=g,C.length=b,C.variable=O,C}return e(v,[{key:"resolve",value:function(b){var O=this.childReference,C=this.length;return O instanceof t.Reference&&(O=O.resolve(b)),C instanceof t.Reference&&(C=C.resolve(b)),this.variable?new f.VarArray(O,C):new f.Array(O,C)}}]),v}(t.Reference),w=function(m){y(v,m);function v(g){u(this,v);var b=l(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return b.childReference=g,b.name=g.name,b}return e(v,[{key:"resolve",value:function(b){var O=this.childReference;return O instanceof t.Reference&&(O=O.resolve(b)),new f.Option(O)}}]),v}(t.Reference),T=function(m){y(v,m);function v(g,b){u(this,v);var O=l(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return O.sizedType=g,O.length=b,O}return e(v,[{key:"resolve",value:function(b){var O=this.length;return O instanceof t.Reference&&(O=O.resolve(b)),new this.sizedType(O)}}]),v}(t.Reference),h=function(){function m(v,g,b){u(this,m),this.constructor=v,this.name=g,this.config=b}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 S(m,v,g){return g instanceof t.Reference&&(g=g.resolve(m)),m.results[v]=g,g}function P(m,v,g){return m.results[v]=g,g}var R=function(){function m(v){u(this,m),this._destination=v,this._definitions={}}return e(m,[{key:"enum",value:function(g,b){var O=new h(f.Enum.create,g,b);this.define(g,O)}},{key:"struct",value:function(g,b){var O=new h(f.Struct.create,g,b);this.define(g,O)}},{key:"union",value:function(g,b){var O=new h(f.Union.create,g,b);this.define(g,O)}},{key:"typedef",value:function(g,b){var O=new h(S,g,b);this.define(g,O)}},{key:"const",value:function(g,b){var O=new h(P,g,b);this.define(g,O)}},{key:"void",value:function(){return f.Void}},{key:"bool",value:function(){return f.Bool}},{key:"int",value:function(){return f.Int}},{key:"hyper",value:function(){return f.Hyper}},{key:"uint",value:function(){return f.UnsignedInt}},{key:"uhyper",value:function(){return f.UnsignedHyper}},{key:"float",value:function(){return f.Float}},{key:"double",value:function(){return f.Double}},{key:"quadruple",value:function(){return f.Quadruple}},{key:"string",value:function(g){return new T(f.String,g)}},{key:"opaque",value:function(g){return new T(f.Opaque,g)}},{key:"varOpaque",value:function(g){return new T(f.VarOpaque,g)}},{key:"array",value:function(g,b){return new $(g,b)}},{key:"varArray",value:function(g,b){return new $(g,b,!0)}},{key:"option",value:function(g){return new w(g)}},{key:"define",value:function(g,b){if((0,i.default)(this._destination[g]))this._definitions[g]=b;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(b){b.resolve({definitions:g._definitions,results:g._destination})})}}]),m}()})(Xu),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=Hn;Object.keys(e).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[n]}})});var t=Xu;Object.keys(t).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})}(No);function AT(r){const e={variantId:se.Uint64.fromString(r.variantId.toString()),version:r.version||Math.floor(Date.now()/1e3),items:r.items.map(n=>new se.BundleItem({collectionId:se.Uint64.fromString(n.collectionId.toString()),productId:se.Uint64.fromString(n.productId.toString()),variantId:se.Uint64.fromString(n.variantId.toString()),sku:n.sku||"",quantity:n.quantity,ext:new se.BundleItemExt(0)})),ext:new se.BundleExt(0)},t=new se.Bundle(e);return se.BundleEnvelope.envelopeTypeBundle(t).toXDR("base64")}const se=No.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")}})}),zu="/bundling-storefront-manager";function OT(){return Math.ceil(Date.now()/1e3)}async function ST(){try{const{timestamp:r}=await ur("get",`${zu}/t`,{headers:{"X-Recharge-App":"storefront-client"}});return r}catch(r){return console.error(`Fetch failed: ${r}. Using client-side date.`),OT()}}async function TT(r){const e=ae(),t=await Yu(r);if(t!==!0)throw new Error(t);const n=await ST(),i=AT({variantId:r.externalVariantId,version:n,items:r.selections.map(a=>({collectionId:a.collectionId,productId:a.externalProductId,variantId:a.externalVariantId,quantity:a.quantity,sku:""}))});try{const a=await ur("post",`${zu}/api/v1/bundles`,{data:{bundle:i},headers:{Origin:`https://${e.storeIdentifier}`}});if(!a.id||a.code!==200)throw new Error(`1: failed generating rb_id: ${JSON.stringify(a)}`);return a.id}catch(a){throw new Error(`2: failed generating rb_id ${a}`)}}function IT(r,e){const t=Ku(r);if(t!==!0)throw new Error(`Dynamic Bundle is invalid. ${t}`);const n=`${Ml(9)}:${r.externalProductId}`;return r.selections.map(i=>{const a={id:i.externalVariantId,quantity:i.quantity,properties:{_rc_bundle:n,_rc_bundle_variant:r.externalVariantId,_rc_bundle_parent:e,_rc_bundle_collection_id:i.collectionId}};return i.sellingPlan?a.selling_plan=i.sellingPlan:i.shippingIntervalFrequency&&(a.properties.shipping_interval_frequency=i.shippingIntervalFrequency,a.properties.shipping_interval_unit_type=i.shippingIntervalUnitType,a.id=`${i.discountedVariantId}`),a})}async function Yu(r){try{return r?await Do(r.externalProductId)?!0:"Bundle settings do not exist for the given product":"Bundle is not defined"}catch(e){return`Error fetching bundle settings: ${e}`}}const PT={day:["day","days","Days"],days:["day","days","Days"],Days:["day","days","Days"],week:["week","weeks","Weeks"],weeks:["week","weeks","Weeks"],Weeks:["week","weeks","Weeks"],month:["month","months","Months"],months:["month","months","Months"],Months:["month","months","Months"]};function Ku(r){if(!r)return"No bundle defined.";if(r.selections.length===0)return"No selections defined.";const{shippingIntervalFrequency:e,shippingIntervalUnitType:t}=r.selections.find(n=>n.shippingIntervalFrequency||n.shippingIntervalUnitType)||{};if(e||t){if(!e||!t)return"Shipping intervals do not match on selections.";{const n=PT[t];for(let i=0;i<r.selections.length;i++){const{shippingIntervalFrequency:a,shippingIntervalUnitType:o}=r.selections[i];if(a&&a!==e||o&&!n.includes(o))return"Shipping intervals do not match on selections."}}}return!0}async function xT(r,e){const{bundle_selection:t}=await A("get","/bundle_selections",{id:e},r);return t}function FT(r,e){return A("get","/bundle_selections",{query:e},r)}async function RT(r,e){const{bundle_selection:t}=await A("post","/bundle_selections",{data:e},r);return t}async function MT(r,e,t){const{bundle_selection:n}=await A("put","/bundle_selections",{id:e,data:t},r);return n}function BT(r,e){return A("delete","/bundle_selections",{id:e},r)}var DT=Object.freeze({__proto__:null,getBundleId:TT,getDynamicBundleItems:IT,validateBundle:Yu,validateDynamicBundle:Ku,getBundleSelection:xT,listBundleSelections:FT,createBundleSelection:RT,updateBundleSelection:MT,deleteBundleSelection:BT});async function UT(r,e,t){const{charge:n}=await A("get","/charges",{id:e,query:{include:t?.include}},r);return n}function NT(r,e){return A("get","/charges",{query:e},r)}async function CT(r,e,t){const{charge:n}=await A("post",`/charges/${e}/apply_discount`,{data:{discount_code:t}},r);return n}async function LT(r,e){const{charge:t}=await A("post",`/charges/${e}/remove_discount`,{},r);return t}async function jT(r,e){const{charge:t}=await A("post",`/charges/${e}/skip`,{},r);return t}async function kT(r,e){const{charge:t}=await A("post",`/charges/${e}/unskip`,{},r);return t}async function qT(r,e){const{charge:t}=await A("post",`/charges/${e}/process`,{},r);return t}var VT=Object.freeze({__proto__:null,getCharge:UT,listCharges:NT,applyDiscountToCharge:CT,removeDiscountsFromCharge:LT,skipCharge:jT,unskipCharge:kT,processCharge:qT});async function GT(r,e){const{membership:t}=await A("get","/memberships",{id:e},r);return t}function WT(r,e){return A("get","/memberships",{query:e},r)}async function HT(r,e,t){const{membership:n}=await A("post",`/memberships/${e}/cancel`,{data:t},r);return n}async function XT(r,e,t){const{membership:n}=await A("post",`/memberships/${e}/activate`,{data:t},r);return n}var zT=Object.freeze({__proto__:null,getMembership:GT,listMemberships:WT,cancelMembership:HT,activateMembership:XT});async function YT(r,e){const{metafield:t}=await A("post","/metafields",{data:{metafield:e}},r);return t}async function KT(r,e,t){const{metafield:n}=await A("put","/metafields",{id:e,data:{metafield:t}},r);return n}function ZT(r,e){return A("delete","/metafields",{id:e},r)}var JT=Object.freeze({__proto__:null,createMetafield:YT,updateMetafield:KT,deleteMetafield:ZT});async function QT(r,e){const{onetime:t}=await A("get","/onetimes",{id:e},r);return t}function e2(r,e){return A("get","/onetimes",{query:e},r)}async function r2(r,e){const{onetime:t}=await A("post","/onetimes",{data:e},r);return t}async function t2(r,e,t){const{onetime:n}=await A("put","/onetimes",{id:e,data:t},r);return n}function n2(r,e){return A("delete","/onetimes",{id:e},r)}var i2=Object.freeze({__proto__:null,getOnetime:QT,listOnetimes:e2,createOnetime:r2,updateOnetime:t2,deleteOnetime:n2});async function a2(r,e){const{order:t}=await A("get","/orders",{id:e},r);return t}function o2(r,e){return A("get","/orders",{query:e},r)}var u2=Object.freeze({__proto__:null,getOrder:a2,listOrders:o2});async function s2(r,e,t){const{payment_method:n}=await A("get","/payment_methods",{id:e,query:{include:t?.include}},r);return n}async function f2(r,e,t){const{payment_method:n}=await A("put","/payment_methods",{id:e,data:t},r);return n}function c2(r,e){return A("get","/payment_methods",{query:e},r)}var l2=Object.freeze({__proto__:null,getPaymentMethod:s2,updatePaymentMethod:f2,listPaymentMethods:c2});async function p2(r,e){const{plan:t}=await A("get","/plans",{id:e},r);return t}function h2(r,e){return A("get","/plans",{query:e},r)}var d2=Object.freeze({__proto__:null,getPlan:p2,listPlans:h2});async function y2(r,e,t){const{subscription:n}=await A("get","/subscriptions",{id:e,query:{include:t?.include}},r);return n}function v2(r,e){return A("get","/subscriptions",{query:e},r)}async function g2(r,e,t){const{subscription:n}=await A("post","/subscriptions",{data:e,query:t},r);return n}async function _2(r,e,t,n){const{subscription:i}=await A("put","/subscriptions",{id:e,data:t,query:n},r);return i}async function m2(r,e,t,n){const{subscription:i}=await A("post",`/subscriptions/${e}/set_next_charge_date`,{data:{date:t},query:n},r);return i}async function w2(r,e,t){const{subscription:n}=await A("post",`/subscriptions/${e}/change_address`,{data:{address_id:t}},r);return n}async function b2(r,e,t,n){const{subscription:i}=await A("post",`/subscriptions/${e}/cancel`,{data:t,query:n},r);return i}async function $2(r,e,t){const{subscription:n}=await A("post",`/subscriptions/${e}/activate`,{query:t},r);return n}async function E2(r,e,t){const{charge:n}=await A("post",`/subscriptions/${e}/charges/skip`,{data:{date:t,subscription_id:`${e}`}},r);return n}var A2=Object.freeze({__proto__:null,getSubscription:y2,listSubscriptions:v2,createSubscription:g2,updateSubscription:_2,updateSubscriptionChargeDate:m2,updateSubscriptionAddress:w2,cancelSubscription:b2,activateSubscription:$2,skipSubscriptionCharge:E2});async function O2(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{customer:n}=await A("get","/customers",{id:t,query:{include:e?.include}},r);return n}async function S2(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{customer:n}=await A("put","/customers",{id:t,data:e},r);return n}async function T2(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{deliveries:n}=await A("get",`/customers/${t}/delivery_schedule`,{query:e},r);return n}async function I2(r){return await A("get","/portal_access",{},r)}var P2=Object.freeze({__proto__:null,getCustomer:O2,updateCustomer:S2,getDeliverySchedule:T2,getCustomerPortalAccess:I2});const x2={get(r,e){return G("get",r,e)},post(r,e){return G("post",r,e)},put(r,e){return G("put",r,e)},delete(r,e){return G("delete",r,e)}};function F2(r){var e,t;if(r)return r;if((e=window?.Shopify)!=null&&e.shop)return window.Shopify.shop;let n=window?.domain;if(!n){const i=(t=location?.href.match(/(?:http[s]*:\/\/)*(.*?)\.(?=admin\.rechargeapps\.com)/i))==null?void 0:t[1].replace(/-sp$/,"");i&&(n=`${i}.myshopify.com`)}if(n)return n;throw new Error("No storeIdentifier was passed into init.")}function R2(r={}){const e=r;ol({storeIdentifier:F2(r.storeIdentifier),loginRetryFn:r.loginRetryFn,storefrontAccessToken:r.storefrontAccessToken,environment:e.environment?e.environment:"prod"}),Uo()}const Zu={init:R2,api:x2,address:Ol,auth:Rl,bundle:DT,charge:VT,cdn:gb,customer:P2,membership:zT,metafield:JT,onetime:i2,order:u2,paymentMethod:l2,plan:d2,subscription:A2};try{Zu.init()}catch{}return Zu});
|
|
28
|
+
*/(function(e,t){typeof CE=="function"&&!0&&r&&r.exports?r.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t()})(ne,function(){function e(l,u,p){this.low=l|0,this.high=u|0,this.unsigned=!!p}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,p){var d,_;return p?(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,p){return p=!!p,isNaN(u)||!isFinite(u)?e.ZERO:!p&&u<=-f?e.MIN_VALUE:!p&&u+1>=f?e.MAX_VALUE:p&&u>=s?e.MAX_UNSIGNED_VALUE:u<0?e.fromNumber(-u,p).negate():new e(u%o|0,u/o|0,p)},e.fromBits=function(u,p,d){return new e(u,p,d)},e.fromString=function(u,p,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 p=="number"&&(d=p,p=!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),p,d).negate();for(var $=e.fromNumber(Math.pow(d,8)),b=e.ZERO,w=0;w<u.length;w+=8){var A=Math.min(8,u.length-w),h=parseInt(u.substring(w,w+A),d);if(A<8){var I=e.fromNumber(Math.pow(d,A));b=b.multiply(I).add(e.fromNumber(h))}else b=b.multiply($),b=b.add(e.fromNumber(h))}return b.unsigned=p,b},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,s=o*o,f=s/2,c=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 p;if(this.isNegative())if(this.equals(e.MIN_VALUE)){var d=e.fromNumber(u),_=this.divide(d);return p=_.multiply(d).subtract(this),_.toString(u)+p.toInt().toString(u)}else return"-"+this.negate().toString(u);var $=e.fromNumber(Math.pow(u,6),this.unsigned);p=this;for(var b="";;){var w=p.divide($),A=p.subtract(w.multiply($)).toInt()>>>0,h=A.toString(u);if(p=w,p.isZero())return h+b;for(;h.length<6;)h="0"+h;b=""+h+b}},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,p=31;p>0&&(u&1<<p)==0;p--);return this.high!=0?p+33:p+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 p=this.isNegative(),d=u.isNegative();return p&&!d?-1:!p&&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 p=this.high>>>16,d=this.high&65535,_=this.low>>>16,$=this.low&65535,b=u.high>>>16,w=u.high&65535,A=u.low>>>16,h=u.low&65535,I=0,P=0,R=0,m=0;return m+=$+h,R+=m>>>16,m&=65535,R+=_+A,P+=R>>>16,R&=65535,P+=d+w,I+=P>>>16,P&=65535,I+=p+b,I&=65535,e.fromBits(R<<16|m,I<<16|P,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(c)&&u.lessThan(c))return e.fromNumber(this.toNumber()*u.toNumber(),this.unsigned);var p=this.high>>>16,d=this.high&65535,_=this.low>>>16,$=this.low&65535,b=u.high>>>16,w=u.high&65535,A=u.low>>>16,h=u.low&65535,I=0,P=0,R=0,m=0;return m+=$*h,R+=m>>>16,m&=65535,R+=_*h,P+=R>>>16,R&=65535,R+=$*A,P+=R>>>16,R&=65535,P+=d*h,I+=P>>>16,P&=65535,P+=_*A,I+=P>>>16,P&=65535,P+=$*w,I+=P>>>16,P&=65535,I+=p*h+d*A+_*w+$*b,I&=65535,e.fromBits(R<<16|m,I<<16|P,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 p,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 $=this.shiftRight(1);return p=$.divide(u).shiftLeft(1),p.equals(e.ZERO)?u.isNegative()?e.ONE:e.NEG_ONE:(d=this.subtract(u.multiply(p)),_=p.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);){p=Math.max(1,Math.floor(d.toNumber()/u.toNumber()));for(var b=Math.ceil(Math.log(p)/Math.LN2),w=b<=48?1:Math.pow(2,b-48),A=e.fromNumber(p),h=A.multiply(u);h.isNegative()||h.greaterThan(d);)p-=w,A=e.fromNumber(p,this.unsigned),h=A.multiply(u);A.isZero()&&(A=e.ONE),_=_.add(A),d=d.subtract(h)}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 p=this.high;if(u<32){var d=this.low;return e.fromBits(d>>>u|p<<32-u,p>>>u,this.unsigned)}else return u===32?e.fromBits(p,0,this.unsigned):e.fromBits(p>>>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})})(ci),Object.defineProperty(_t,"__esModule",{value:!0}),_t.Hyper=void 0;var LE=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)}},jE=ci.exports,gr=Ru(jE),kE=M,qE=Ru(kE);function Ru(r){return r&&r.__esModule?r:{default:r}}function GE(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function WE(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 VE(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=_t.Hyper=function(r){VE(e,r),LE(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=xu(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=xu(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 GE(this,e),WE(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!1))}return e}(gr.default);(0,qE.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 Te={};Object.defineProperty(Te,"__esModule",{value:!0}),Te.UnsignedInt=void 0;var HE=dt,Fu=Mu(HE),zE=M,XE=Mu(zE);function Mu(r){return r&&r.__esModule?r:{default:r}}var mr=Te.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,Fu.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,Fu.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,XE.default)(mr);var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.UnsignedHyper=void 0;var YE=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}}(),Du=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)}},KE=ci.exports,wr=Bu(KE),ZE=M,JE=Bu(ZE);function Bu(r){return r&&r.__esModule?r:{default:r}}function QE(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function eO(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 rO(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=mt.UnsignedHyper=function(r){rO(e,r),YE(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=Du(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=Du(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 QE(this,e),eO(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!0))}return e}(wr.default);(0,JE.default)(br),br.MAX_VALUE=new br(wr.default.MAX_UNSIGNED_VALUE.low,wr.default.MAX_UNSIGNED_VALUE.high),br.MIN_VALUE=new br(wr.default.MIN_VALUE.low,wr.default.MIN_VALUE.high);var wt={};Object.defineProperty(wt,"__esModule",{value:!0}),wt.Float=void 0;var tO=dt,Nu=Uu(tO),nO=M,iO=Uu(nO);function Uu(r){return r&&r.__esModule?r:{default:r}}var aO=wt.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,Nu.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,Nu.default)(e)}};(0,iO.default)(aO);var bt={};Object.defineProperty(bt,"__esModule",{value:!0}),bt.Double=void 0;var oO=dt,Cu=Lu(oO),uO=M,sO=Lu(uO);function Lu(r){return r&&r.__esModule?r:{default:r}}var fO=bt.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,Cu.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,Cu.default)(e)}};(0,sO.default)(fO);var $t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.Quadruple=void 0;var cO=M,lO=pO(cO);function pO(r){return r&&r.__esModule?r:{default:r}}var hO=$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,lO.default)(hO);var $r={},dO=se,yO=V,vO="[object Boolean]";function gO(r){return r===!0||r===!1||yO(r)&&dO(r)==vO}var _O=gO;Object.defineProperty($r,"__esModule",{value:!0}),$r.Bool=void 0;var mO=_O,wO=ku(mO),ju=ce,bO=M,$O=ku(bO);function ku(r){return r&&r.__esModule?r:{default:r}}var AO=$r.Bool={read:function(e){var t=ju.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 ju.Int.write(n,t)},isValid:function(e){return(0,wO.default)(e)}};(0,$O.default)(AO);var At={},EO=se,OO=U,SO=V,IO="[object String]";function PO(r){return typeof r=="string"||!OO(r)&&SO(r)&&EO(r)==IO}var qu=PO;Object.defineProperty(At,"__esModule",{value:!0}),At.String=void 0;var TO=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}}(),xO=qu,Gu=li(xO),RO=U,FO=li(RO),Wu=ce,MO=Te,Vu=Pe,DO=M,BO=li(DO);function li(r){return r&&r.__esModule?r:{default:r}}function NO(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var UO=At.String=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:MO.UnsignedInt.MAX_VALUE;NO(this,r),this._maxLength=e}return TO(r,[{key:"read",value:function(t){var n=Wu.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,Gu.default)(t)?i=y.from(t,"utf8"):i=y.from(t),Wu.Int.write(i.length,n),n.writeBufferPadded(i)}},{key:"isValid",value:function(t){var n=void 0;if((0,Gu.default)(t))n=y.from(t,"utf8");else if((0,FO.default)(t)||y.isBuffer(t))n=y.from(t);else return!1;return n.length<=this._maxLength}}]),r}();(0,BO.default)(UO.prototype);var Et={};Object.defineProperty(Et,"__esModule",{value:!0}),Et.Opaque=void 0;var CO=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}}(),Hu=Pe,LO=M,jO=kO(LO);function kO(r){return r&&r.__esModule?r:{default:r}}function qO(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var GO=Et.Opaque=function(){function r(e){qO(this,r),this._length=e,this._padding=(0,Hu.calculatePadding)(e)}return CO(r,[{key:"read",value:function(t){var n=t.slice(this._length);return(0,Hu.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,jO.default)(GO.prototype);var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.VarOpaque=void 0;var WO=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}}(),zu=ce,VO=Te,Xu=Pe,HO=M,zO=XO(HO);function XO(r){return r&&r.__esModule?r:{default:r}}function YO(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var KO=Ot.VarOpaque=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:VO.UnsignedInt.MAX_VALUE;YO(this,r),this._maxLength=e}return WO(r,[{key:"read",value:function(t){var n=zu.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,Xu.calculatePadding)(n),a=t.slice(n);return(0,Xu.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));zu.Int.write(t.length,n),n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length<=this._maxLength}}]),r}();(0,zO.default)(KO.prototype);var St={},xe={exports:{}},ZO=dr;function JO(r){return typeof r=="function"?r:ZO}var Yu=JO,QO=Bn,eS=ai,rS=Yu,tS=U;function nS(r,e){var t=tS(r)?QO:eS;return t(r,rS(e))}var iS=nS;(function(r){r.exports=iS})(xe);var aS=/\s/;function oS(r){for(var e=r.length;e--&&aS.test(r.charAt(e)););return e}var uS=oS,sS=uS,fS=/^\s+/;function cS(r){return r&&r.slice(0,sS(r)+1).replace(fS,"")}var lS=cS,pS=lS,Ku=fe,hS=ct,Zu=0/0,dS=/^[-+]0x[0-9a-f]+$/i,yS=/^0b[01]+$/i,vS=/^0o[0-7]+$/i,gS=parseInt;function _S(r){if(typeof r=="number")return r;if(hS(r))return Zu;if(Ku(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Ku(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=pS(r);var t=yS.test(r);return t||vS.test(r)?gS(r.slice(2),t?2:8):dS.test(r)?Zu:+r}var mS=_S,wS=mS,Ju=1/0,bS=17976931348623157e292;function $S(r){if(!r)return r===0?r:0;if(r=wS(r),r===Ju||r===-Ju){var e=r<0?-1:1;return e*bS}return r===r?r:0}var AS=$S,ES=AS;function OS(r){var e=ES(r),t=e%1;return e===e?t?e-t:e:0}var Qu=OS,SS=Ka,IS=Yu,PS=Qu,TS=9007199254740991,pi=4294967295,xS=Math.min;function RS(r,e){if(r=PS(r),r<1||r>TS)return[];var t=pi,n=xS(r,pi);e=IS(e),r-=pi;for(var i=SS(n,e);++t<r;)e(t);return i}var es=RS;Object.defineProperty(St,"__esModule",{value:!0}),St.Array=void 0;var FS=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}}(),MS=si,DS=Ar(MS),BS=xe.exports,NS=Ar(BS),US=es,CS=Ar(US),LS=U,rs=Ar(LS),jS=M,kS=Ar(jS);function Ar(r){return r&&r.__esModule?r:{default:r}}function qS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var GS=St.Array=function(){function r(e,t){qS(this,r),this._childType=e,this._length=t}return FS(r,[{key:"read",value:function(t){var n=this;return(0,CS.default)(this._length,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,rs.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,NS.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,rs.default)(t)||t.length!==this._length?!1:(0,DS.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,kS.default)(GS.prototype);var It={};Object.defineProperty(It,"__esModule",{value:!0}),It.VarArray=void 0;var WS=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}}(),VS=si,HS=Er(VS),zS=xe.exports,XS=Er(zS),YS=es,KS=Er(YS),ZS=U,ts=Er(ZS),JS=Te,ns=ce,QS=M,e2=Er(QS);function Er(r){return r&&r.__esModule?r:{default:r}}function r2(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var t2=It.VarArray=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:JS.UnsignedInt.MAX_VALUE;r2(this,r),this._childType=e,this._maxLength=t}return WS(r,[{key:"read",value:function(t){var n=this,i=ns.Int.read(t);if(i>this._maxLength)throw new Error("XDR Read Error: Saw "+i+" length VarArray,"+("max allowed is "+this._maxLength));return(0,KS.default)(i,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,ts.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));ns.Int.write(t.length,n),(0,XS.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,ts.default)(t)||t.length>this._maxLength?!1:(0,HS.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,e2.default)(t2.prototype);var Pt={};function n2(r){return r===null}var i2=n2;function a2(r){return r===void 0}var Or=a2;Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.Option=void 0;var o2=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}}(),u2=i2,is=hi(u2),s2=Or,as=hi(s2),os=$r,f2=M,c2=hi(f2);function hi(r){return r&&r.__esModule?r:{default:r}}function l2(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var p2=Pt.Option=function(){function r(e){l2(this,r),this._childType=e}return o2(r,[{key:"read",value:function(t){if(os.Bool.read(t))return this._childType.read(t)}},{key:"write",value:function(t,n){var i=!((0,is.default)(t)||(0,as.default)(t));os.Bool.write(i,n),i&&this._childType.write(t,n)}},{key:"isValid",value:function(t){return(0,is.default)(t)||(0,as.default)(t)?!0:this._childType.isValid(t)}}]),r}();(0,c2.default)(p2.prototype);var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.Void=void 0;var h2=Or,us=ss(h2),d2=M,y2=ss(d2);function ss(r){return r&&r.__esModule?r:{default:r}}var v2=Sr.Void={read:function(){},write:function(e){if(!(0,us.default)(e))throw new Error("XDR Write Error: trying to write value to a void slot")},isValid:function(e){return(0,us.default)(e)}};(0,y2.default)(v2);var Tt={},g2=Qr;function _2(r,e){return g2(e,function(t){return r[t]})}var m2=_2,w2=m2,b2=Xe;function $2(r){return r==null?[]:w2(r,b2(r))}var A2=$2;Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.Enum=void 0;var E2=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}}(),O2=xe.exports,S2=di(O2),I2=A2,P2=di(I2),fs=ce,T2=M,x2=di(T2);function di(r){return r&&r.__esModule?r:{default:r}}function R2(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 F2(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 cs(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var M2=Tt.Enum=function(){function r(e,t){cs(this,r),this.name=e,this.value=t}return E2(r,null,[{key:"read",value:function(t){var n=fs.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);fs.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,P2.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){F2(s,o);function s(){return cs(this,s),R2(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return s}(r);return a.enumName=n,t.results[n]=a,a._members={},a._byValue=new Map,(0,S2.default)(i,function(o,s){var f=new a(s,o);a._members[s]=f,a._byValue.set(o,f),a[s]=function(){return f}}),a}}]),r}();(0,x2.default)(M2);var xt={},D2=ai,B2=pr;function N2(r,e){var t=-1,n=B2(r)?Array(r.length):[];return D2(r,function(i,a,o){n[++t]=e(i,a,o)}),n}var U2=N2,C2=Qr,L2=Eu,j2=U2,k2=U;function q2(r,e){var t=k2(r)?C2:j2;return t(r,L2(e))}var G2=q2;function W2(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 V2=W2,Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});var H2=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 z2(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}Ir.Reference=function(){function r(){z2(this,r)}return H2(r,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),r}(),Object.defineProperty(xt,"__esModule",{value:!0}),xt.Struct=void 0;var Rt=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),f;!(i=(f=s.next()).done)&&(n.push(f.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&s.return&&s.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")}}(),X2=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}}(),Y2=xe.exports,ls=Pr(Y2),K2=G2,Z2=Pr(K2),J2=Or,Q2=Pr(J2),eI=V2,rI=Pr(eI),tI=Ir,nI=M,iI=Pr(nI);function Pr(r){return r&&r.__esModule?r:{default:r}}function aI(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 oI(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 ps(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var uI=xt.Struct=function(){function r(e){ps(this,r),this._attributes=e||{}}return X2(r,null,[{key:"read",value:function(t){var n=(0,Z2.default)(this._fields,function(i){var a=Rt(i,2),o=a[0],s=a[1],f=s.read(t);return[o,f]});return new this((0,rI.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,ls.default)(this._fields,function(i){var a=Rt(i,2),o=a[0],s=a[1],f=t._attributes[o];s.write(f,n)})}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(o){oI(s,o);function s(){return ps(this,s),aI(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return s}(r);return a.structName=n,t.results[n]=a,a._fields=i.map(function(o){var s=Rt(o,2),f=s[0],c=s[1];return c instanceof tI.Reference&&(c=c.resolve(t)),[f,c]}),(0,ls.default)(a._fields,function(o){var s=Rt(o,1),f=s[0];a.prototype[f]=sI(f)}),a}}]),r}();(0,iI.default)(uI);function sI(r){return function(t){return(0,Q2.default)(t)||(this._attributes[r]=t),this._attributes[r]}}var Ft={};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.Union=void 0;var fI=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),f;!(i=(f=s.next()).done)&&(n.push(f.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&s.return&&s.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")}}(),cI=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}}(),lI=xe.exports,Mt=Bt(lI),pI=Or,hs=Bt(pI),hI=qu,ds=Bt(hI),Dt=Sr,yi=Ir,dI=M,yI=Bt(dI);function Bt(r){return r&&r.__esModule?r:{default:r}}function vI(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 gI(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 ys(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var _I=Ft.Union=function(){function r(e,t){ys(this,r),this.set(e,t)}return cI(r,[{key:"set",value:function(t,n){(0,ds.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!==Dt.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===Dt.Void?Dt.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,hs.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(s){gI(f,s);function f(){return ys(this,f),vI(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);a.unionName=n,t.results[n]=a,i.switchOn instanceof yi.Reference?a._switchOn=i.switchOn.resolve(t):a._switchOn=i.switchOn,a._switches=new Map,a._arms={},(0,Mt.default)(i.arms,function(s,f){s instanceof yi.Reference&&(s=s.resolve(t)),a._arms[f]=s});var o=i.defaultArm;return o instanceof yi.Reference&&(o=o.resolve(t)),a._defaultArm=o,(0,Mt.default)(i.switches,function(s){var f=fI(s,2),c=f[0],l=f[1];(0,ds.default)(c)&&(c=a._switchOn.fromName(c)),a._switches.set(c,l)}),(0,hs.default)(a._switchOn.values)||(0,Mt.default)(a._switchOn.values(),function(s){a[s.name]=function(f){return new a(s,f)},a.prototype[s.name]=function(c){return this.set(s,c)}}),(0,Mt.default)(a._arms,function(s,f){s!==Dt.Void&&(a.prototype[f]=function(){return this.get(f)})}),a}}]),r}();(0,yI.default)(_I),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=ce;Object.keys(e).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return e[h]}})});var t=_t;Object.keys(t).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return t[h]}})});var n=Te;Object.keys(n).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return n[h]}})});var i=mt;Object.keys(i).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return i[h]}})});var a=wt;Object.keys(a).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return a[h]}})});var o=bt;Object.keys(o).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return o[h]}})});var s=$t;Object.keys(s).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return s[h]}})});var f=$r;Object.keys(f).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return f[h]}})});var c=At;Object.keys(c).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return c[h]}})});var l=Et;Object.keys(l).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return l[h]}})});var u=Ot;Object.keys(u).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return u[h]}})});var p=St;Object.keys(p).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return p[h]}})});var d=It;Object.keys(d).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return d[h]}})});var _=Pt;Object.keys(_).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return _[h]}})});var $=Sr;Object.keys($).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return $[h]}})});var b=Tt;Object.keys(b).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return b[h]}})});var w=xt;Object.keys(w).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return w[h]}})});var A=Ft;Object.keys(A).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return A[h]}})})}(ii);var vs={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function m(v,g){for(var E=0;E<g.length;E++){var S=g[E];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(v,S.key,S)}}return function(v,g,E){return g&&m(v.prototype,g),E&&m(v,E),v}}(),t=Ir;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=l(n),a=xe.exports,o=l(a),s=ii,f=c(s);function c(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 l(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 p(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 R(v);m(g),g.resolve()}return v}var $=function(m){d(v,m);function v(g){u(this,v);var E=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return E.name=g,E}return e(v,[{key:"resolve",value:function(E){var S=E.definitions[this.name];return S.resolve(E)}}]),v}(t.Reference),b=function(m){d(v,m);function v(g,E){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;u(this,v);var B=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return B.childReference=g,B.length=E,B.variable=S,B}return e(v,[{key:"resolve",value:function(E){var S=this.childReference,B=this.length;return S instanceof t.Reference&&(S=S.resolve(E)),B instanceof t.Reference&&(B=B.resolve(E)),this.variable?new f.VarArray(S,B):new f.Array(S,B)}}]),v}(t.Reference),w=function(m){d(v,m);function v(g){u(this,v);var E=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return E.childReference=g,E.name=g.name,E}return e(v,[{key:"resolve",value:function(E){var S=this.childReference;return S instanceof t.Reference&&(S=S.resolve(E)),new f.Option(S)}}]),v}(t.Reference),A=function(m){d(v,m);function v(g,E){u(this,v);var S=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return S.sizedType=g,S.length=E,S}return e(v,[{key:"resolve",value:function(E){var S=this.length;return S instanceof t.Reference&&(S=S.resolve(E)),new this.sizedType(S)}}]),v}(t.Reference),h=function(){function m(v,g,E){u(this,m),this.constructor=v,this.name=g,this.config=E}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 I(m,v,g){return g instanceof t.Reference&&(g=g.resolve(m)),m.results[v]=g,g}function P(m,v,g){return m.results[v]=g,g}var R=function(){function m(v){u(this,m),this._destination=v,this._definitions={}}return e(m,[{key:"enum",value:function(g,E){var S=new h(f.Enum.create,g,E);this.define(g,S)}},{key:"struct",value:function(g,E){var S=new h(f.Struct.create,g,E);this.define(g,S)}},{key:"union",value:function(g,E){var S=new h(f.Union.create,g,E);this.define(g,S)}},{key:"typedef",value:function(g,E){var S=new h(I,g,E);this.define(g,S)}},{key:"const",value:function(g,E){var S=new h(P,g,E);this.define(g,S)}},{key:"void",value:function(){return f.Void}},{key:"bool",value:function(){return f.Bool}},{key:"int",value:function(){return f.Int}},{key:"hyper",value:function(){return f.Hyper}},{key:"uint",value:function(){return f.UnsignedInt}},{key:"uhyper",value:function(){return f.UnsignedHyper}},{key:"float",value:function(){return f.Float}},{key:"double",value:function(){return f.Double}},{key:"quadruple",value:function(){return f.Quadruple}},{key:"string",value:function(g){return new A(f.String,g)}},{key:"opaque",value:function(g){return new A(f.Opaque,g)}},{key:"varOpaque",value:function(g){return new A(f.VarOpaque,g)}},{key:"array",value:function(g,E){return new b(g,E)}},{key:"varArray",value:function(g,E){return new b(g,E,!0)}},{key:"option",value:function(g){return new w(g)}},{key:"define",value:function(g,E){if((0,i.default)(this._destination[g]))this._definitions[g]=E;else throw new Error("XDRTypes Error:"+g+" is already defined")}},{key:"lookup",value:function(g){return new $(g)}},{key:"resolve",value:function(){var g=this;(0,o.default)(this._definitions,function(E){E.resolve({definitions:g._definitions,results:g._destination})})}}]),m}()})(vs),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=ii;Object.keys(e).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[n]}})});var t=vs;Object.keys(t).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})}(iu);function mI(r){const e={variantId:le.Uint64.fromString(r.variantId.toString()),version:r.version||Math.floor(Date.now()/1e3),items:r.items.map(n=>new le.BundleItem({collectionId:le.Uint64.fromString(n.collectionId.toString()),productId:le.Uint64.fromString(n.productId.toString()),variantId:le.Uint64.fromString(n.variantId.toString()),sku:n.sku||"",quantity:n.quantity,ext:new le.BundleItemExt(0)})),ext:new le.BundleExt(0)},t=new le.Bundle(e);return le.BundleEnvelope.envelopeTypeBundle(t).toXDR("base64")}const le=iu.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")}})}),gs="/bundling-storefront-manager";function wI(){return Math.ceil(Date.now()/1e3)}async function bI(){try{const{timestamp:r}=await sr("get",`${gs}/t`,{headers:{"X-Recharge-App":"storefront-client"}});return r}catch(r){return console.error(`Fetch failed: ${r}. Using client-side date.`),wI()}}async function $I(r){const e=ue(),t=await _s(r);if(t!==!0)throw new Error(t);const n=await bI(),i=mI({variantId:r.externalVariantId,version:n,items:r.selections.map(a=>({collectionId:a.collectionId,productId:a.externalProductId,variantId:a.externalVariantId,quantity:a.quantity,sku:""}))});try{const a=await sr("post",`${gs}/api/v1/bundles`,{data:{bundle:i},headers:{Origin:`https://${e.storeIdentifier}`}});if(!a.id||a.code!==200)throw new Error(`1: failed generating rb_id: ${JSON.stringify(a)}`);return a.id}catch(a){throw new Error(`2: failed generating rb_id ${a}`)}}function AI(r,e){const t=ms(r);if(t!==!0)throw new Error(`Dynamic Bundle is invalid. ${t}`);const n=`${Np(9)}:${r.externalProductId}`;return r.selections.map(i=>{const a={id:i.externalVariantId,quantity:i.quantity,properties:{_rc_bundle:n,_rc_bundle_variant:r.externalVariantId,_rc_bundle_parent:e,_rc_bundle_collection_id:i.collectionId}};return i.sellingPlan?a.selling_plan=i.sellingPlan:i.shippingIntervalFrequency&&(a.properties.shipping_interval_frequency=i.shippingIntervalFrequency,a.properties.shipping_interval_unit_type=i.shippingIntervalUnitType,a.id=`${i.discountedVariantId}`),a})}async function _s(r){try{return r?await tu(r.externalProductId)?!0:"Bundle settings do not exist for the given product":"Bundle is not defined"}catch(e){return`Error fetching bundle settings: ${e}`}}const EI={day:["day","days","Days"],days:["day","days","Days"],Days:["day","days","Days"],week:["week","weeks","Weeks"],weeks:["week","weeks","Weeks"],Weeks:["week","weeks","Weeks"],month:["month","months","Months"],months:["month","months","Months"],Months:["month","months","Months"]};function ms(r){if(!r)return"No bundle defined.";if(r.selections.length===0)return"No selections defined.";const{shippingIntervalFrequency:e,shippingIntervalUnitType:t}=r.selections.find(n=>n.shippingIntervalFrequency||n.shippingIntervalUnitType)||{};if(e||t){if(!e||!t)return"Shipping intervals do not match on selections.";{const n=EI[t];for(let i=0;i<r.selections.length;i++){const{shippingIntervalFrequency:a,shippingIntervalUnitType:o}=r.selections[i];if(a&&a!==e||o&&!n.includes(o))return"Shipping intervals do not match on selections."}}}return!0}async function OI(r,e){const{bundle_selection:t}=await O("get","/bundle_selections",{id:e},r);return t}function SI(r,e){return O("get","/bundle_selections",{query:e},r)}async function II(r,e){const{bundle_selection:t}=await O("post","/bundle_selections",{data:e},r);return t}async function PI(r,e,t){const{bundle_selection:n}=await O("put","/bundle_selections",{id:e,data:t},r);return n}function TI(r,e){return O("delete","/bundle_selections",{id:e},r)}var xI=Object.freeze({__proto__:null,getBundleId:$I,getDynamicBundleItems:AI,validateBundle:_s,validateDynamicBundle:ms,getBundleSelection:OI,listBundleSelections:SI,createBundleSelection:II,updateBundleSelection:PI,deleteBundleSelection:TI});async function RI(r,e,t){const{charge:n}=await O("get","/charges",{id:e,query:{include:t?.include}},r);return n}function FI(r,e){return O("get","/charges",{query:e},r)}async function MI(r,e,t){const{charge:n}=await O("post",`/charges/${e}/apply_discount`,{data:{discount_code:t}},r);return n}async function DI(r,e){const{charge:t}=await O("post",`/charges/${e}/remove_discount`,{},r);return t}async function BI(r,e){const{charge:t}=await O("post",`/charges/${e}/skip`,{},r);return t}async function NI(r,e){const{charge:t}=await O("post",`/charges/${e}/unskip`,{},r);return t}async function UI(r,e){const{charge:t}=await O("post",`/charges/${e}/process`,{},r);return t}var CI=Object.freeze({__proto__:null,getCharge:RI,listCharges:FI,applyDiscountToCharge:MI,removeDiscountsFromCharge:DI,skipCharge:BI,unskipCharge:NI,processCharge:UI});async function LI(r,e){const{membership:t}=await O("get","/memberships",{id:e},r);return t}function jI(r,e){return O("get","/memberships",{query:e},r)}async function kI(r,e,t){const{membership:n}=await O("post",`/memberships/${e}/cancel`,{data:t},r);return n}async function qI(r,e,t){const{membership:n}=await O("post",`/memberships/${e}/activate`,{data:t},r);return n}var GI=Object.freeze({__proto__:null,getMembership:LI,listMemberships:jI,cancelMembership:kI,activateMembership:qI});async function WI(r,e){const{metafield:t}=await O("post","/metafields",{data:{metafield:e}},r);return t}async function VI(r,e,t){const{metafield:n}=await O("put","/metafields",{id:e,data:{metafield:t}},r);return n}function HI(r,e){return O("delete","/metafields",{id:e},r)}var zI=Object.freeze({__proto__:null,createMetafield:WI,updateMetafield:VI,deleteMetafield:HI});async function XI(r,e){const{onetime:t}=await O("get","/onetimes",{id:e},r);return t}function YI(r,e){return O("get","/onetimes",{query:e},r)}async function KI(r,e){const{onetime:t}=await O("post","/onetimes",{data:e},r);return t}async function ZI(r,e,t){const{onetime:n}=await O("put","/onetimes",{id:e,data:t},r);return n}function JI(r,e){return O("delete","/onetimes",{id:e},r)}var QI=Object.freeze({__proto__:null,getOnetime:XI,listOnetimes:YI,createOnetime:KI,updateOnetime:ZI,deleteOnetime:JI});async function eP(r,e){const{order:t}=await O("get","/orders",{id:e},r);return t}function rP(r,e){return O("get","/orders",{query:e},r)}var tP=Object.freeze({__proto__:null,getOrder:eP,listOrders:rP});async function nP(r,e,t){const{payment_method:n}=await O("get","/payment_methods",{id:e,query:{include:t?.include}},r);return n}async function iP(r,e,t){const{payment_method:n}=await O("put","/payment_methods",{id:e,data:t},r);return n}function aP(r,e){return O("get","/payment_methods",{query:e},r)}var oP=Object.freeze({__proto__:null,getPaymentMethod:nP,updatePaymentMethod:iP,listPaymentMethods:aP});async function uP(r,e){const{plan:t}=await O("get","/plans",{id:e},r);return t}function sP(r,e){return O("get","/plans",{query:e},r)}var fP=Object.freeze({__proto__:null,getPlan:uP,listPlans:sP}),ws=co,cP=ws&&new ws,bs=cP,lP=dr,$s=bs,pP=$s?function(r,e){return $s.set(r,e),r}:lP,As=pP,hP=st,dP=fe;function yP(r){return function(){var e=arguments;switch(e.length){case 0:return new r;case 1:return new r(e[0]);case 2:return new r(e[0],e[1]);case 3:return new r(e[0],e[1],e[2]);case 4:return new r(e[0],e[1],e[2],e[3]);case 5:return new r(e[0],e[1],e[2],e[3],e[4]);case 6:return new r(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new r(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var t=hP(r.prototype),n=r.apply(t,e);return dP(n)?n:t}}var Nt=yP,vP=Nt,gP=G,_P=1;function mP(r,e,t){var n=e&_P,i=vP(r);function a(){var o=this&&this!==gP&&this instanceof a?i:r;return o.apply(n?t:this,arguments)}return a}var wP=mP,bP=Math.max;function $P(r,e,t,n){for(var i=-1,a=r.length,o=t.length,s=-1,f=e.length,c=bP(a-o,0),l=Array(f+c),u=!n;++s<f;)l[s]=e[s];for(;++i<o;)(u||i<a)&&(l[t[i]]=r[i]);for(;c--;)l[s++]=r[i++];return l}var Es=$P,AP=Math.max;function EP(r,e,t,n){for(var i=-1,a=r.length,o=-1,s=t.length,f=-1,c=e.length,l=AP(a-s,0),u=Array(l+c),p=!n;++i<l;)u[i]=r[i];for(var d=i;++f<c;)u[d+f]=e[f];for(;++o<s;)(p||i<a)&&(u[d+t[o]]=r[i++]);return u}var Os=EP;function OP(r,e){for(var t=r.length,n=0;t--;)r[t]===e&&++n;return n}var SP=OP;function IP(){}var vi=IP,PP=st,TP=vi,xP=4294967295;function Ut(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=xP,this.__views__=[]}Ut.prototype=PP(TP.prototype),Ut.prototype.constructor=Ut;var gi=Ut;function RP(){}var FP=RP,Ss=bs,MP=FP,DP=Ss?function(r){return Ss.get(r)}:MP,Is=DP,BP={},NP=BP,Ps=NP,UP=Object.prototype,CP=UP.hasOwnProperty;function LP(r){for(var e=r.name+"",t=Ps[e],n=CP.call(Ps,e)?t.length:0;n--;){var i=t[n],a=i.func;if(a==null||a==r)return i.name}return e}var jP=LP,kP=st,qP=vi;function Ct(r,e){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}Ct.prototype=kP(qP.prototype),Ct.prototype.constructor=Ct;var Ts=Ct,GP=gi,WP=Ts,VP=kn;function HP(r){if(r instanceof GP)return r.clone();var e=new WP(r.__wrapped__,r.__chain__);return e.__actions__=VP(r.__actions__),e.__index__=r.__index__,e.__values__=r.__values__,e}var zP=HP,XP=gi,xs=Ts,YP=vi,KP=U,ZP=V,JP=zP,QP=Object.prototype,eT=QP.hasOwnProperty;function Lt(r){if(ZP(r)&&!KP(r)&&!(r instanceof XP)){if(r instanceof xs)return r;if(eT.call(r,"__wrapped__"))return JP(r)}return new xs(r)}Lt.prototype=YP.prototype,Lt.prototype.constructor=Lt;var rT=Lt,tT=gi,nT=Is,iT=jP,aT=rT;function oT(r){var e=iT(r),t=aT[e];if(typeof t!="function"||!(e in tT.prototype))return!1;if(r===t)return!0;var n=nT(t);return!!n&&r===n[0]}var uT=oT,sT=As,fT=Go,cT=fT(sT),Rs=cT,lT=/\{\n\/\* \[wrapped with (.+)\] \*/,pT=/,? & /;function hT(r){var e=r.match(lT);return e?e[1].split(pT):[]}var dT=hT,yT=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function vT(r,e){var t=e.length;if(!t)return r;var n=t-1;return e[n]=(t>1?"& ":"")+e[n],e=e.join(t>2?", ":" "),r.replace(yT,`{
|
|
29
|
+
/* [wrapped with `+e+`] */
|
|
30
|
+
`)}var gT=vT;function _T(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 mT=_T;function wT(r){return r!==r}var bT=wT;function $T(r,e,t){for(var n=t-1,i=r.length;++n<i;)if(r[n]===e)return n;return-1}var AT=$T,ET=mT,OT=bT,ST=AT;function IT(r,e,t){return e===e?ST(r,e,t):ET(r,OT,t)}var PT=IT,TT=PT;function xT(r,e){var t=r==null?0:r.length;return!!t&&TT(r,e,0)>-1}var RT=xT,FT=Bn,MT=RT,DT=1,BT=2,NT=8,UT=16,CT=32,LT=64,jT=128,kT=256,qT=512,GT=[["ary",jT],["bind",DT],["bindKey",BT],["curry",NT],["curryRight",UT],["flip",qT],["partial",CT],["partialRight",LT],["rearg",kT]];function WT(r,e){return FT(GT,function(t){var n="_."+t[0];e&t[1]&&!MT(r,n)&&r.push(n)}),r.sort()}var VT=WT,HT=dT,zT=gT,XT=ri,YT=VT;function KT(r,e,t){var n=e+"";return XT(r,zT(n,YT(HT(n),t)))}var Fs=KT,ZT=uT,JT=Rs,QT=Fs,ex=1,rx=2,tx=4,nx=8,Ms=32,Ds=64;function ix(r,e,t,n,i,a,o,s,f,c){var l=e&nx,u=l?o:void 0,p=l?void 0:o,d=l?a:void 0,_=l?void 0:a;e|=l?Ms:Ds,e&=~(l?Ds:Ms),e&tx||(e&=~(ex|rx));var $=[r,e,i,d,u,_,p,s,f,c],b=t.apply(void 0,$);return ZT(r)&&JT(b,$),b.placeholder=n,QT(b,r,e)}var Bs=ix;function ax(r){var e=r;return e.placeholder}var _i=ax,ox=kn,ux=at,sx=Math.min;function fx(r,e){for(var t=r.length,n=sx(e.length,t),i=ox(r);n--;){var a=e[n];r[n]=ux(a,t)?i[a]:void 0}return r}var cx=fx,Ns="__lodash_placeholder__";function lx(r,e){for(var t=-1,n=r.length,i=0,a=[];++t<n;){var o=r[t];(o===e||o===Ns)&&(r[t]=Ns,a[i++]=t)}return a}var jt=lx,px=Es,hx=Os,dx=SP,Us=Nt,yx=Bs,vx=_i,gx=cx,_x=jt,mx=G,wx=1,bx=2,$x=8,Ax=16,Ex=128,Ox=512;function Cs(r,e,t,n,i,a,o,s,f,c){var l=e&Ex,u=e&wx,p=e&bx,d=e&($x|Ax),_=e&Ox,$=p?void 0:Us(r);function b(){for(var w=arguments.length,A=Array(w),h=w;h--;)A[h]=arguments[h];if(d)var I=vx(b),P=dx(A,I);if(n&&(A=px(A,n,i,d)),a&&(A=hx(A,a,o,d)),w-=P,d&&w<c){var R=_x(A,I);return yx(r,e,Cs,b.placeholder,t,A,R,s,f,c-w)}var m=u?t:this,v=p?m[r]:r;return w=A.length,s?A=gx(A,s):_&&w>1&&A.reverse(),l&&f<w&&(A.length=f),this&&this!==mx&&this instanceof b&&(v=$||Us(v)),v.apply(m,A)}return b}var Ls=Cs,Sx=ei,Ix=Nt,Px=Ls,Tx=Bs,xx=_i,Rx=jt,Fx=G;function Mx(r,e,t){var n=Ix(r);function i(){for(var a=arguments.length,o=Array(a),s=a,f=xx(i);s--;)o[s]=arguments[s];var c=a<3&&o[0]!==f&&o[a-1]!==f?[]:Rx(o,f);if(a-=c.length,a<t)return Tx(r,e,Px,i.placeholder,void 0,o,c,void 0,void 0,t-a);var l=this&&this!==Fx&&this instanceof i?n:r;return Sx(l,this,o)}return i}var Dx=Mx,Bx=ei,Nx=Nt,Ux=G,Cx=1;function Lx(r,e,t,n){var i=e&Cx,a=Nx(r);function o(){for(var s=-1,f=arguments.length,c=-1,l=n.length,u=Array(l+f),p=this&&this!==Ux&&this instanceof o?a:r;++c<l;)u[c]=n[c];for(;f--;)u[c++]=arguments[++s];return Bx(p,i?t:this,u)}return o}var jx=Lx,kx=Es,qx=Os,js=jt,ks="__lodash_placeholder__",mi=1,Gx=2,Wx=4,qs=8,Tr=128,Gs=256,Vx=Math.min;function Hx(r,e){var t=r[1],n=e[1],i=t|n,a=i<(mi|Gx|Tr),o=n==Tr&&t==qs||n==Tr&&t==Gs&&r[7].length<=e[8]||n==(Tr|Gs)&&e[7].length<=e[8]&&t==qs;if(!(a||o))return r;n&mi&&(r[2]=e[2],i|=t&mi?0:Wx);var s=e[3];if(s){var f=r[3];r[3]=f?kx(f,s,e[4]):s,r[4]=f?js(r[3],ks):e[4]}return s=e[5],s&&(f=r[5],r[5]=f?qx(f,s,e[6]):s,r[6]=f?js(r[5],ks):e[6]),s=e[7],s&&(r[7]=s),n&Tr&&(r[8]=r[8]==null?e[8]:Vx(r[8],e[8])),r[9]==null&&(r[9]=e[9]),r[0]=e[0],r[1]=i,r}var zx=Hx,Xx=As,Yx=wP,Kx=Dx,Zx=Ls,Jx=jx,Qx=Is,eR=zx,rR=Rs,tR=Fs,Ws=Qu,nR="Expected a function",Vs=1,iR=2,wi=8,bi=16,$i=32,Hs=64,zs=Math.max;function aR(r,e,t,n,i,a,o,s){var f=e&iR;if(!f&&typeof r!="function")throw new TypeError(nR);var c=n?n.length:0;if(c||(e&=~($i|Hs),n=i=void 0),o=o===void 0?o:zs(Ws(o),0),s=s===void 0?s:Ws(s),c-=i?i.length:0,e&Hs){var l=n,u=i;n=i=void 0}var p=f?void 0:Qx(r),d=[r,e,t,n,i,l,u,a,o,s];if(p&&eR(d,p),r=d[0],e=d[1],t=d[2],n=d[3],i=d[4],s=d[9]=d[9]===void 0?f?0:r.length:zs(d[9]-c,0),!s&&e&(wi|bi)&&(e&=~(wi|bi)),!e||e==Vs)var _=Yx(r,e,t);else e==wi||e==bi?_=Kx(r,e,s):(e==$i||e==(Vs|$i))&&!i.length?_=Jx(r,e,t,n):_=Zx.apply(void 0,d);var $=p?Xx:rR;return tR($(_,d),r,e)}var oR=aR,uR=ou,sR=oR,fR=_i,cR=jt,lR=32,Ai=uR(function(r,e){var t=cR(e,fR(Ai));return sR(r,lR,void 0,e,t)});Ai.placeholder={};var Xs=Ai,pR=Object.defineProperty,hR=Object.defineProperties,dR=Object.getOwnPropertyDescriptors,Ys=Object.getOwnPropertySymbols,yR=Object.prototype.hasOwnProperty,vR=Object.prototype.propertyIsEnumerable,Ks=(r,e,t)=>e in r?pR(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Zs=(r,e)=>{for(var t in e||(e={}))yR.call(e,t)&&Ks(r,t,e[t]);if(Ys)for(var t of Ys(e))vR.call(e,t)&&Ks(r,t,e[t]);return r},Js=(r,e)=>hR(r,dR(e));function gR(r,e){return Js(Zs({},ti(e,["address_id","external_variant_id","external_product_id","charge_interval_frequency","order_interval_frequency","price","status"])),{customer_id:parseInt(r,10),shopify_variant_id:e.external_variant_id.ecommerce?parseInt(e.external_variant_id.ecommerce,10):void 0,charge_interval_frequency:`${e.charge_interval_frequency}`,order_interval_frequency:`${e.order_interval_frequency}`,price:e.price?parseFloat(e.price):void 0,status:e.status?e.status.toUpperCase():void 0})}function _R(r,e){var t;return Js(Zs({},ti(e,["external_variant_id","external_product_id","charge_interval_frequency","order_interval_frequency","price","use_external_variant_defaults"])),{shopify_variant_id:(t=e.external_variant_id)!=null&&t.ecommerce?parseInt(e.external_variant_id.ecommerce,10):void 0,charge_interval_frequency:e.charge_interval_frequency?`${e.charge_interval_frequency}`:void 0,order_interval_frequency:e.order_interval_frequency?`${e.order_interval_frequency}`:void 0,price:e.price?parseFloat(e.price):void 0,use_shopify_variant_defaults:e.use_external_variant_defaults,force_update:r})}function Qs(r){const{id:e,address_id:t,customer_id:n,analytics_data:i,cancellation_reason:a,cancellation_reason_comments:o,cancelled_at:s,charge_interval_frequency:f,created_at:c,expire_after_specific_number_of_charges:l,shopify_product_id:u,shopify_variant_id:p,has_queued_charges:d,is_prepaid:_,is_skippable:$,is_swappable:b,max_retries_reached:w,next_charge_scheduled_at:A,order_day_of_month:h,order_day_of_week:I,order_interval_frequency:P,order_interval_unit:R,presentment_currency:m,price:v,product_title:g,properties:E,quantity:S,sku:B,sku_override:H,status:te,updated_at:X,variant_title:Re}=r;return{id:e,address_id:t,customer_id:n,analytics_data:i,cancellation_reason:a,cancellation_reason_comments:o,cancelled_at:s,charge_interval_frequency:parseInt(f,10),created_at:c,expire_after_specific_number_of_charges:l,external_product_id:{ecommerce:`${u}`},external_variant_id:{ecommerce:`${p}`},has_queued_charges:Ho(d),is_prepaid:_,is_skippable:$,is_swappable:b,max_retries_reached:Ho(w),next_charge_scheduled_at:A,order_day_of_month:h,order_day_of_week:I,order_interval_frequency:parseInt(P,10),order_interval_unit:R,presentment_currency:m,price:`${v}`,product_title:g??"",properties:E,quantity:S,sku:B,sku_override:H,status:te.toLowerCase(),updated_at:X,variant_title:Re}}async function mR(r,e,t){const{subscription:n}=await O("get","/subscriptions",{id:e,query:{include:t?.include}},r);return n}function wR(r,e){return O("get","/subscriptions",{query:e},r)}async function bR(r,e,t){const{subscription:n}=await O("post","/subscriptions",{data:e,query:t},r);return n}async function $R(r,e,t,n){const{subscription:i}=await O("put","/subscriptions",{id:e,data:t,query:n},r);return i}async function AR(r,e,t,n){const{subscription:i}=await O("post",`/subscriptions/${e}/set_next_charge_date`,{data:{date:t},query:n},r);return i}async function ER(r,e,t){const{subscription:n}=await O("post",`/subscriptions/${e}/change_address`,{data:{address_id:t}},r);return n}async function OR(r,e,t,n){const{subscription:i}=await O("post",`/subscriptions/${e}/cancel`,{data:t,query:n},r);return i}async function SR(r,e,t){const{subscription:n}=await O("post",`/subscriptions/${e}/activate`,{query:t},r);return n}async function IR(r,e,t){const{charge:n}=await O("post",`/subscriptions/${e}/charges/skip`,{data:{date:t,subscription_id:`${e}`}},r);return n}async function PR(r,e){const t=e.length;if(t<1||t>21)throw new Error("Number of subscriptions must be between 1 and 20.");const{customerId:n}=r;if(!n)throw new Error("No customerId in session.");const i=e[0].address_id;if(!e.every(f=>f.address_id===i))throw new Error("All subscriptions must have the same address_id.");const a=Xs(gR,n),o=e.map(a),{subscriptions:s}=await O("post",`/addresses/${i}/subscriptions-bulk`,{data:{subscriptions:o},headers:{"X-Recharge-Version":"2021-01"}},r);return s.map(Qs)}async function TR(r,e,t,n){const i=t.length;if(i<1||i>21)throw new Error("Number of subscriptions must be between 1 and 20.");const{customerId:a}=r;if(!a)throw new Error("No customerId in session.");const o=Xs(_R,!!(n!=null&&n.force_update)),s=t.map(o),{subscriptions:f}=await O("put",`/addresses/${e}/subscriptions-bulk`,{data:{subscriptions:s},headers:{"X-Recharge-Version":"2021-01"}},r);return f.map(Qs)}var xR=Object.freeze({__proto__:null,getSubscription:mR,listSubscriptions:wR,createSubscription:bR,updateSubscription:$R,updateSubscriptionChargeDate:AR,updateSubscriptionAddress:ER,cancelSubscription:OR,activateSubscription:SR,skipSubscriptionCharge:IR,createSubscriptions:PR,updateSubscriptions:TR});async function RR(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{customer:n}=await O("get","/customers",{id:t,query:{include:e?.include}},r);return n}async function FR(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{customer:n}=await O("put","/customers",{id:t,data:e},r);return n}async function MR(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{deliveries:n}=await O("get",`/customers/${t}/delivery_schedule`,{query:e},r);return n}async function DR(r){return await O("get","/portal_access",{},r)}var BR=Object.freeze({__proto__:null,getCustomer:RR,updateCustomer:FR,getDeliverySchedule:MR,getCustomerPortalAccess:DR});const NR={get(r,e){return z("get",r,e)},post(r,e){return z("post",r,e)},put(r,e){return z("put",r,e)},delete(r,e){return z("delete",r,e)}};function UR(r){var e,t;if(r)return r;if((e=window?.Shopify)!=null&&e.shop)return window.Shopify.shop;let n=window?.domain;if(!n){const i=(t=location?.href.match(/(?:http[s]*:\/\/)*(.*?)\.(?=admin\.rechargeapps\.com)/i))==null?void 0:t[1].replace(/-sp$/,"");i&&(n=`${i}.myshopify.com`)}if(n)return n;throw new Error("No storeIdentifier was passed into init.")}function CR(r={}){const e=r;fp({storeIdentifier:UR(r.storeIdentifier),loginRetryFn:r.loginRetryFn,storefrontAccessToken:r.storefrontAccessToken,environment:e.environment?e.environment:"prod"}),nu()}const ef={init:CR,api:NR,address:Pp,auth:Bp,bundle:xI,charge:CI,cdn:d1,customer:BR,membership:GI,metafield:zI,onetime:QI,order:tP,paymentMethod:oP,plan:fP,subscription:xR};try{ef.init()}catch{}return ef});
|