@rechargeapps/storefront-client 0.17.2 → 0.18.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/address.js +10 -0
- package/dist/cjs/api/address.js.map +1 -1
- package/dist/cjs/api/charge.js +8 -0
- package/dist/cjs/api/charge.js.map +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/address.js +9 -1
- package/dist/esm/api/address.js.map +1 -1
- package/dist/esm/api/charge.js +7 -1
- package/dist/esm/api/charge.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/index.d.ts +23 -15
- package/dist/umd/recharge-client.min.js +9 -9
- package/package.json +2 -3
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* recharge-client-0.
|
|
2
|
+
* recharge-client-0.18.0.min.js
|
|
3
3
|
* Copyright (c) Recharge
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
(function(re,Ke){typeof exports=="object"&&typeof module<"u"?module.exports=Ke():typeof define=="function"&&define.amd?define(Ke):(re=typeof globalThis<"u"?globalThis:re||self,re.recharge=Ke())})(this,function(){"use strict";var re=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 j=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof j<"u"&&j,q={searchParams:"URLSearchParams"in j,iterable:"Symbol"in j&&"iterator"in Symbol,blob:"FileReader"in j&&"Blob"in j&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in j,arrayBuffer:"ArrayBuffer"in j};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}fi.call(_e.prototype);function W(r,e){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new D(e.headers),this.url=e.url||"",this._initBody(r)}fi.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new D(this.headers),url:this.url})},W.error=function(){var r=new W(null,{status:0,statusText:""});return r.type="error",r};var ps=[301,302,303,307,308];W.redirect=function(r,e){if(ps.indexOf(e)===-1)throw new RangeError("Invalid status code");return new W(null,{status:e,headers:{location:r}})};var me=j.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 ci(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:ls(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 W(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===""&&j.location.href?j.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&&(q.blob?a.responseType="blob":q.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,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)})}ci.polyfill=!0,j.fetch||(j.fetch=ci,j.Headers=D,j.Request=_e,j.Response=W),self.fetch.bind(self);var hs=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},li=typeof Symbol<"u"&&Symbol,ys=hs,ds=function(){return typeof li!="function"||typeof Symbol!="function"||typeof li("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ys()},vs="Function.prototype.bind called on incompatible ",Bt=Array.prototype.slice,gs=Object.prototype.toString,_s="[object Function]",ms=function(e){var t=this;if(typeof t!="function"||gs.call(t)!==_s)throw new TypeError(vs+t);for(var n=Bt.call(arguments,1),i,a=function(){if(this instanceof i){var l=t.apply(this,n.concat(Bt.call(arguments)));return Object(l)===l?l:this}else return t.apply(e,n.concat(Bt.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},ws=ms,Ut=Function.prototype.bind||ws,bs=Ut,$s=bs.call(Function.call,Object.prototype.hasOwnProperty),I,Fe=SyntaxError,pi=Function,Re=TypeError,Ct=function(r){try{return pi('"use strict"; return ('+r+").constructor;")()}catch{}},we=Object.getOwnPropertyDescriptor;if(we)try{we({},"")}catch{we=null}var Lt=function(){throw new Re},Es=we?function(){try{return arguments.callee,Lt}catch{try{return we(arguments,"callee").get}catch{return Lt}}}():Lt,Me=ds(),ce=Object.getPrototypeOf||function(r){return r.__proto__},De={},As=typeof Uint8Array>"u"?I:ce(Uint8Array),Ne={"%AggregateError%":typeof AggregateError>"u"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?I:ArrayBuffer,"%ArrayIteratorPrototype%":Me?ce([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":De,"%AsyncGenerator%":De,"%AsyncGeneratorFunction%":De,"%AsyncIteratorPrototype%":De,"%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%":pi,"%GeneratorFunction%":De,"%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%":Es,"%TypedArray%":As,"%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},Os=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 Ne[e]=t,t},hi={"%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=Ut,xr=$s,Ss=Je.call(Function.call,Array.prototype.concat),Ts=Je.call(Function.apply,Array.prototype.splice),yi=Je.call(Function.call,String.prototype.replace),Pr=Je.call(Function.call,String.prototype.slice),Is=Je.call(Function.call,RegExp.prototype.exec),xs=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ps=/\\(\\)?/g,Fs=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 yi(e,xs,function(a,o,s,f){i[i.length]=s?yi(f,Ps,"$1"):o||a}),i},Rs=function(e,t){var n=e,i;if(xr(hi,n)&&(i=hi[n],n="%"+i[0]+"%"),xr(Ne,n)){var a=Ne[n];if(a===De&&(a=Os(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(Is(/^%?[^%]*%?$/,e)===null)throw new Fe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Fs(e),i=n.length>0?n[0]:"",a=Rs("%"+i+"%",t),o=a.name,s=a.value,f=!1,c=a.alias;c&&(i=c[0],Ts(n,Ss([0,1],c)));for(var l=1,u=!0;l<n.length;l+=1){var p=n[l],d=Pr(p,0,1),g=Pr(p,-1);if((d==='"'||d==="'"||d==="`"||g==='"'||g==="'"||g==="`")&&d!==g)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 Re("base intrinsic for "+e+" exists, but the property is not available.");return}if(we&&l+1>=n.length){var b=we(s,p);u=!!b,u&&"get"in b&&!("originalValue"in b.get)?s=b.get:s=s[p]}else u=xr(s,p),s=s[p];u&&!f&&(Ne[o]=s)}}return s},di={exports:{}};(function(r){var e=Ut,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 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})(di);var vi=jt,gi=di.exports,Ms=gi(vi("String.prototype.indexOf")),Ds=function(e,t){var n=vi(e,!!t);return typeof n=="function"&&Ms(e,".prototype.")>-1?gi(n):n},Be=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},z=[],G=[],Ns=typeof Uint8Array<"u"?Uint8Array:Array,kt=!1;function _i(){kt=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)z[e]=r[e],G[r.charCodeAt(e)]=e;G["-".charCodeAt(0)]=62,G["_".charCodeAt(0)]=63}function Bs(r){kt||_i();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 Ns(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=G[r.charCodeAt(e)]<<18|G[r.charCodeAt(e+1)]<<12|G[r.charCodeAt(e+2)]<<6|G[r.charCodeAt(e+3)],o[f++]=i>>16&255,o[f++]=i>>8&255,o[f++]=i&255;return a===2?(i=G[r.charCodeAt(e)]<<2|G[r.charCodeAt(e+1)]>>4,o[f++]=i&255):a===1&&(i=G[r.charCodeAt(e)]<<10|G[r.charCodeAt(e+1)]<<4|G[r.charCodeAt(e+2)]>>2,o[f++]=i>>8&255,o[f++]=i&255),o}function Us(r){return z[r>>18&63]+z[r>>12&63]+z[r>>6&63]+z[r&63]}function Cs(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(Us(n));return i.join("")}function mi(r){kt||_i();for(var e,t=r.length,n=t%3,i="",a=[],o=16383,s=0,f=t-n;s<f;s+=o)a.push(Cs(r,s,s+o>f?f:s+o));return n===1?(e=r[t-1],i+=z[e>>2],i+=z[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=z[e>>10],i+=z[e>>4&63],i+=z[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 wi(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,g=n?1:-1,b=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+=g,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;r[t+d]=o&255,d+=g,o/=256,c-=8);r[t+d-g]|=b*128}var Ls={}.toString,bi=Array.isArray||function(r){return Ls.call(r)=="[object Array]"};/*!
|
|
6
|
+
(function(re,Ke){typeof exports=="object"&&typeof module<"u"?module.exports=Ke():typeof define=="function"&&define.amd?define(Ke):(re=typeof globalThis<"u"?globalThis:re||self,re.recharge=Ke())})(this,function(){"use strict";var re=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 j=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof j<"u"&&j,q={searchParams:"URLSearchParams"in j,iterable:"Symbol"in j&&"iterator"in Symbol,blob:"FileReader"in j&&"Blob"in j&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in j,arrayBuffer:"ArrayBuffer"in j};function is(r){return r&&DataView.prototype.isPrototypeOf(r)}if(q.arrayBuffer)var as=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],os=ArrayBuffer.isView||function(r){return r&&as.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 Mt(r){return typeof r!="string"&&(r=String(r)),r}function Dt(r){var e={next:function(){var t=r.shift();return{done:t===void 0,value:t}}};return q.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=Mt(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)]=Mt(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)}),Dt(r)},D.prototype.values=function(){var r=[];return this.forEach(function(e){r.push(e)}),Dt(r)},D.prototype.entries=function(){var r=[];return this.forEach(function(e,t){r.push([t,e])}),Dt(r)},q.iterable&&(D.prototype[Symbol.iterator]=D.prototype.entries);function Nt(r){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}function ui(r){return new Promise(function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}})}function us(r){var e=new FileReader,t=ui(e);return e.readAsArrayBuffer(r),t}function ss(r){var e=new FileReader,t=ui(e);return e.readAsText(r),t}function fs(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 fi(){return this.bodyUsed=!1,this._initBody=function(r){this.bodyUsed=this.bodyUsed,this._bodyInit=r,r?typeof r=="string"?this._bodyText=r:q.blob&&Blob.prototype.isPrototypeOf(r)?this._bodyBlob=r:q.formData&&FormData.prototype.isPrototypeOf(r)?this._bodyFormData=r:q.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)?this._bodyText=r.toString():q.arrayBuffer&&q.blob&&is(r)?(this._bodyArrayBuffer=si(r.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):q.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(r)||os(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):q.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},q.blob&&(this.blob=function(){var r=Nt(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=Nt(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(us)}),this.text=function(){var r=Nt(this);if(r)return r;if(this._bodyBlob)return ss(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(fs(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},q.formData&&(this.formData=function(){return this.text().then(ps)}),this.json=function(){return this.text().then(JSON.parse)},this}var cs=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ls(r){var e=r.toUpperCase();return cs.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=ls(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 ps(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 hs(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}fi.call(_e.prototype);function W(r,e){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new D(e.headers),this.url=e.url||"",this._initBody(r)}fi.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new D(this.headers),url:this.url})},W.error=function(){var r=new W(null,{status:0,statusText:""});return r.type="error",r};var ys=[301,302,303,307,308];W.redirect=function(r,e){if(ys.indexOf(e)===-1)throw new RangeError("Invalid status code");return new W(null,{status:e,headers:{location:r}})};var me=j.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 ci(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:hs(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 W(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===""&&j.location.href?j.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&&(q.blob?a.responseType="blob":q.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,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)})}ci.polyfill=!0,j.fetch||(j.fetch=ci,j.Headers=D,j.Request=_e,j.Response=W),self.fetch.bind(self);var ds=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},li=typeof Symbol<"u"&&Symbol,vs=ds,gs=function(){return typeof li!="function"||typeof Symbol!="function"||typeof li("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:vs()},_s="Function.prototype.bind called on incompatible ",Bt=Array.prototype.slice,ms=Object.prototype.toString,ws="[object Function]",bs=function(e){var t=this;if(typeof t!="function"||ms.call(t)!==ws)throw new TypeError(_s+t);for(var n=Bt.call(arguments,1),i,a=function(){if(this instanceof i){var l=t.apply(this,n.concat(Bt.call(arguments)));return Object(l)===l?l:this}else return t.apply(e,n.concat(Bt.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},$s=bs,Ut=Function.prototype.bind||$s,Es=Ut,As=Es.call(Function.call,Object.prototype.hasOwnProperty),I,Fe=SyntaxError,pi=Function,Re=TypeError,Ct=function(r){try{return pi('"use strict"; return ('+r+").constructor;")()}catch{}},we=Object.getOwnPropertyDescriptor;if(we)try{we({},"")}catch{we=null}var Lt=function(){throw new Re},Os=we?function(){try{return arguments.callee,Lt}catch{try{return we(arguments,"callee").get}catch{return Lt}}}():Lt,Me=gs(),ce=Object.getPrototypeOf||function(r){return r.__proto__},De={},Ss=typeof Uint8Array>"u"?I:ce(Uint8Array),Ne={"%AggregateError%":typeof AggregateError>"u"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?I:ArrayBuffer,"%ArrayIteratorPrototype%":Me?ce([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":De,"%AsyncGenerator%":De,"%AsyncGeneratorFunction%":De,"%AsyncIteratorPrototype%":De,"%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%":pi,"%GeneratorFunction%":De,"%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%":Os,"%TypedArray%":Ss,"%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},Ts=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 Ne[e]=t,t},hi={"%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=Ut,xr=As,Is=Je.call(Function.call,Array.prototype.concat),xs=Je.call(Function.apply,Array.prototype.splice),yi=Je.call(Function.call,String.prototype.replace),Pr=Je.call(Function.call,String.prototype.slice),Ps=Je.call(Function.call,RegExp.prototype.exec),Fs=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Rs=/\\(\\)?/g,Ms=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 yi(e,Fs,function(a,o,s,f){i[i.length]=s?yi(f,Rs,"$1"):o||a}),i},Ds=function(e,t){var n=e,i;if(xr(hi,n)&&(i=hi[n],n="%"+i[0]+"%"),xr(Ne,n)){var a=Ne[n];if(a===De&&(a=Ts(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(Ps(/^%?[^%]*%?$/,e)===null)throw new Fe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ms(e),i=n.length>0?n[0]:"",a=Ds("%"+i+"%",t),o=a.name,s=a.value,f=!1,c=a.alias;c&&(i=c[0],xs(n,Is([0,1],c)));for(var l=1,u=!0;l<n.length;l+=1){var p=n[l],d=Pr(p,0,1),g=Pr(p,-1);if((d==='"'||d==="'"||d==="`"||g==='"'||g==="'"||g==="`")&&d!==g)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 Re("base intrinsic for "+e+" exists, but the property is not available.");return}if(we&&l+1>=n.length){var b=we(s,p);u=!!b,u&&"get"in b&&!("originalValue"in b.get)?s=b.get:s=s[p]}else u=xr(s,p),s=s[p];u&&!f&&(Ne[o]=s)}}return s},di={exports:{}};(function(r){var e=Ut,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 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})(di);var vi=jt,gi=di.exports,Ns=gi(vi("String.prototype.indexOf")),Bs=function(e,t){var n=vi(e,!!t);return typeof n=="function"&&Ns(e,".prototype.")>-1?gi(n):n},Be=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},z=[],G=[],Us=typeof Uint8Array<"u"?Uint8Array:Array,kt=!1;function _i(){kt=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)z[e]=r[e],G[r.charCodeAt(e)]=e;G["-".charCodeAt(0)]=62,G["_".charCodeAt(0)]=63}function Cs(r){kt||_i();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 Us(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=G[r.charCodeAt(e)]<<18|G[r.charCodeAt(e+1)]<<12|G[r.charCodeAt(e+2)]<<6|G[r.charCodeAt(e+3)],o[f++]=i>>16&255,o[f++]=i>>8&255,o[f++]=i&255;return a===2?(i=G[r.charCodeAt(e)]<<2|G[r.charCodeAt(e+1)]>>4,o[f++]=i&255):a===1&&(i=G[r.charCodeAt(e)]<<10|G[r.charCodeAt(e+1)]<<4|G[r.charCodeAt(e+2)]>>2,o[f++]=i>>8&255,o[f++]=i&255),o}function Ls(r){return z[r>>18&63]+z[r>>12&63]+z[r>>6&63]+z[r&63]}function js(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(Ls(n));return i.join("")}function mi(r){kt||_i();for(var e,t=r.length,n=t%3,i="",a=[],o=16383,s=0,f=t-n;s<f;s+=o)a.push(js(r,s,s+o>f?f:s+o));return n===1?(e=r[t-1],i+=z[e>>2],i+=z[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=z[e>>10],i+=z[e>>4&63],i+=z[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 wi(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,g=n?1:-1,b=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+=g,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;r[t+d]=o&255,d+=g,o/=256,c-=8);r[t+d-g]|=b*128}var ks={}.toString,bi=Array.isArray||function(r){return ks.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 js=50;y.TYPED_ARRAY_SUPPORT=Be.TYPED_ARRAY_SUPPORT!==void 0?Be.TYPED_ARRAY_SUPPORT:!0,Rr();function Rr(){return y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function te(r,e){if(Rr()<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 qt(this,r)}return $i(this,r,e,t)}y.poolSize=8192,y._augment=function(r){return r.__proto__=y.prototype,r};function $i(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?Vs(r,e,t,n):typeof e=="string"?qs(r,e,t):Gs(r,e)}y.from=function(r,e,t){return $i(null,r,e,t)},y.TYPED_ARRAY_SUPPORT&&(y.prototype.__proto__=Uint8Array.prototype,y.__proto__=Uint8Array);function Ei(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 ks(r,e,t,n){return Ei(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)}y.alloc=function(r,e,t){return ks(null,r,e,t)};function qt(r,e){if(Ei(e),r=te(r,e<0?0:Gt(e)|0),!y.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}y.allocUnsafe=function(r){return qt(null,r)},y.allocUnsafeSlow=function(r){return qt(null,r)};function qs(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=Ai(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 Vs(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=Vt(r,e),r}function Gs(r,e){if(X(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"||cf(e.length)?te(r,0):Vt(r,e);if(e.type==="Buffer"&&bi(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>=Rr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Rr().toString(16)+" bytes");return r|0}y.isBuffer=lf;function X(r){return!!(r!=null&&r._isBuffer)}y.compare=function(e,t){if(!X(e)||!X(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(!bi(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(!X(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function Ai(r,e){if(X(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 Mi(r).length;default:if(n)return Nr(r).length;e=(""+e).toLowerCase(),n=!0}}y.byteLength=Ai;function Hs(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 rf(this,e,t);case"utf8":case"utf-8":return Ii(this,e,t);case"ascii":return Qs(this,e,t);case"latin1":case"binary":return ef(this,e,t);case"base64":return Zs(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tf(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?Ii(this,0,e):Hs.apply(this,arguments)},y.prototype.equals=function(e){if(!X(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=js;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(!X(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 Oi(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)),X(e))return e.length===0?-1:Si(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):Si(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Si(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,g){return a===1?d[g]:d.readUInt16BE(g*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 Oi(this,e,t,n,!0)},y.prototype.lastIndexOf=function(e,t,n){return Oi(this,e,t,n,!1)};function Ws(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 zs(r,e,t,n){return Br(Nr(e,r.length-t),r,t,n)}function Ti(r,e,t,n){return Br(sf(e),r,t,n)}function Xs(r,e,t,n){return Ti(r,e,t,n)}function Ys(r,e,t,n){return Br(Mi(e),r,t,n)}function Ks(r,e,t,n){return Br(ff(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 Ws(this,e,t,n);case"utf8":case"utf-8":return zs(this,e,t,n);case"ascii":return Ti(this,e,t,n);case"latin1":case"binary":return Xs(this,e,t,n);case"base64":return Ys(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ks(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 Zs(r,e,t){return e===0&&t===r.length?mi(r):mi(r.slice(e,t))}function Ii(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 Js(n)}var xi=4096;function Js(r){var e=r.length;if(e<=xi)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=xi));return t}function Qs(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 ef(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 rf(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+=uf(r[a]);return i}function tf(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 V(r,e,t,n,i,a){if(!X(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}y.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;V(this,e,t,n,a,0)}var o=1,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;V(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||V(this,e,t,1,255,0),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};function Mr(r,e,t,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(r.length-t,2);i<a;++i)r[t+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}y.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Mr(this,e,t,!0),t+2},y.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Mr(this,e,t,!1),t+2};function Dr(r,e,t,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(r.length-t,4);i<a;++i)r[t+i]=e>>>(n?i:3-i)*8&255}y.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):Dr(this,e,t,!0),t+4},y.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Dr(this,e,t,!1),t+4},y.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);V(this,e,t,n,a-1,-a)}var o=0,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);V(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||V(this,e,t,1,127,-128),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1},y.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Mr(this,e,t,!0),t+2},y.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Mr(this,e,t,!1),t+2},y.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Dr(this,e,t,!0),t+4},y.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Dr(this,e,t,!1),t+4};function Pi(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 Fi(r,e,t,n,i){return i||Pi(r,e,t,4),wi(r,e,t,n,23,4),t+4}y.prototype.writeFloatLE=function(e,t,n){return Fi(this,e,t,!0,n)},y.prototype.writeFloatBE=function(e,t,n){return Fi(this,e,t,!1,n)};function Ri(r,e,t,n,i){return i||Pi(r,e,t,8),wi(r,e,t,n,52,8),t+8}y.prototype.writeDoubleLE=function(e,t,n){return Ri(this,e,t,!0,n)},y.prototype.writeDoubleBE=function(e,t,n){return Ri(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=X(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 nf=/[^+\/0-9A-Za-z-_]/g;function af(r){if(r=of(r).replace(nf,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function of(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function uf(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 sf(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function ff(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 Mi(r){return Bs(af(r))}function Br(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 cf(r){return r!==r}function lf(r){return r!=null&&(!!r._isBuffer||Di(r)||pf(r))}function Di(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function pf(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Di(r.slice(0,0))}function Ni(){throw new Error("setTimeout has not been defined")}function Bi(){throw new Error("clearTimeout has not been defined")}var le=Ni,pe=Bi;typeof Be.setTimeout=="function"&&(le=setTimeout),typeof Be.clearTimeout=="function"&&(pe=clearTimeout);function Ui(r){if(le===setTimeout)return setTimeout(r,0);if((le===Ni||!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 hf(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=[],Ue=!1,$e,Ur=-1;function yf(){!Ue||!$e||(Ue=!1,$e.length?ne=$e.concat(ne):Ur=-1,ne.length&&Ci())}function Ci(){if(!Ue){var r=Ui(yf);Ue=!0;for(var e=ne.length;e;){for($e=ne,ne=[];++Ur<e;)$e&&$e[Ur].run();Ur=-1,e=ne.length}$e=null,Ue=!1,hf(r)}}function df(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 Li(r,e)),ne.length===1&&!Ue&&Ui(Ci)}function Li(r,e){this.fun=r,this.array=e}Li.prototype.run=function(){this.fun.apply(null,this.array)};var vf="browser",gf="browser",_f=!0,mf={},wf=[],bf="",$f={},Ef={},Af={};function Ee(){}var Of=Ee,Sf=Ee,Tf=Ee,If=Ee,xf=Ee,Pf=Ee,Ff=Ee;function Rf(r){throw new Error("process.binding is not supported")}function Mf(){return"/"}function Df(r){throw new Error("process.chdir is not supported")}function Nf(){return 0}var Ce=Be.performance||{},Bf=Ce.now||Ce.mozNow||Ce.msNow||Ce.oNow||Ce.webkitNow||function(){return new Date().getTime()};function Uf(r){var e=Bf.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 Cf=new Date;function Lf(){var r=new Date,e=r-Cf;return e/1e3}var Cr={nextTick:df,title:vf,browser:_f,env:mf,argv:wf,version:bf,versions:$f,on:Of,addListener:Sf,once:Tf,off:If,removeListener:xf,removeAllListeners:Pf,emit:Ff,binding:Rf,cwd:Mf,chdir:Df,umask:Nf,hrtime:Uf,platform:gf,release:Ef,config:Af,uptime:Lf},Ht;typeof Object.create=="function"?Ht=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Ht=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};var ji=Ht,jf=/%[sdj%]/g;function Lr(r){if(!er(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(jf,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)||!Ae(o)?a+=" "+o:a+=" "+Y(o);return a}function Wt(r,e){if(K(Be.process))return function(){return Wt(r,e).apply(this,arguments)};if(Cr.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(Cr.throwDeprecation)throw new Error(e);Cr.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}var jr={},zt;function ki(r){if(K(zt)&&(zt=Cr.env.NODE_DEBUG||""),r=r.toUpperCase(),!jr[r])if(new RegExp("\\b"+r+"\\b","i").test(zt)){var e=0;jr[r]=function(){var t=Lr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else jr[r]=function(){};return jr[r]}function Y(r,e){var t={seen:[],stylize:qf};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),qr(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=kf),kr(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 kf(r,e){var t=Y.styles[e];return t?"\x1B["+Y.colors[t][0]+"m"+r+"\x1B["+Y.colors[t][1]+"m":r}function qf(r,e){return r}function Vf(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function kr(r,e,t){if(r.customInspect&&e&&nr(e.inspect)&&e.inspect!==Y&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return er(n)||(n=kr(r,n,t)),n}var i=Gf(r,e);if(i)return i;var a=Object.keys(e),o=Vf(a);if(r.showHidden&&(a=Object.getOwnPropertyNames(e)),tr(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Xt(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(Vr(e))return r.stylize(Date.prototype.toString.call(e),"date");if(tr(e))return Xt(e)}var f="",c=!1,l=["{","}"];if(Kt(e)&&(c=!0,l=["[","]"]),nr(e)){var u=e.name?": "+e.name:"";f=" [Function"+u+"]"}if(rr(e)&&(f=" "+RegExp.prototype.toString.call(e)),Vr(e)&&(f=" "+Date.prototype.toUTCString.call(e)),tr(e)&&(f=" "+Xt(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=Hf(r,e,t,o,a):p=a.map(function(d){return Yt(r,e,t,o,d,c)}),r.seen.pop(),Wf(p,f,l)}function Gf(r,e){if(K(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(Zt(e))return r.stylize(""+e,"number");if(qr(e))return r.stylize(""+e,"boolean");if(Qe(e))return r.stylize("null","null")}function Xt(r){return"["+Error.prototype.toString.call(r)+"]"}function Hf(r,e,t,n,i){for(var a=[],o=0,s=e.length;o<s;++o)zi(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")),zi(n,i)||(o="["+i+"]"),s||(r.seen.indexOf(f.value)<0?(Qe(t)?s=kr(r,f.value,null):s=kr(r,f.value,t-1),s.indexOf(`
|
|
12
|
+
*/var qs=50;y.TYPED_ARRAY_SUPPORT=Be.TYPED_ARRAY_SUPPORT!==void 0?Be.TYPED_ARRAY_SUPPORT:!0,Rr();function Rr(){return y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function te(r,e){if(Rr()<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 qt(this,r)}return $i(this,r,e,t)}y.poolSize=8192,y._augment=function(r){return r.__proto__=y.prototype,r};function $i(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?Hs(r,e,t,n):typeof e=="string"?Gs(r,e,t):Ws(r,e)}y.from=function(r,e,t){return $i(null,r,e,t)},y.TYPED_ARRAY_SUPPORT&&(y.prototype.__proto__=Uint8Array.prototype,y.__proto__=Uint8Array);function Ei(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 Vs(r,e,t,n){return Ei(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)}y.alloc=function(r,e,t){return Vs(null,r,e,t)};function qt(r,e){if(Ei(e),r=te(r,e<0?0:Gt(e)|0),!y.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}y.allocUnsafe=function(r){return qt(null,r)},y.allocUnsafeSlow=function(r){return qt(null,r)};function Gs(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=Ai(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 Hs(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=Vt(r,e),r}function Ws(r,e){if(X(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"||pf(e.length)?te(r,0):Vt(r,e);if(e.type==="Buffer"&&bi(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>=Rr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Rr().toString(16)+" bytes");return r|0}y.isBuffer=hf;function X(r){return!!(r!=null&&r._isBuffer)}y.compare=function(e,t){if(!X(e)||!X(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(!bi(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(!X(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function Ai(r,e){if(X(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 Mi(r).length;default:if(n)return Nr(r).length;e=(""+e).toLowerCase(),n=!0}}y.byteLength=Ai;function zs(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 nf(this,e,t);case"utf8":case"utf-8":return Ii(this,e,t);case"ascii":return rf(this,e,t);case"latin1":case"binary":return tf(this,e,t);case"base64":return Qs(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return af(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?Ii(this,0,e):zs.apply(this,arguments)},y.prototype.equals=function(e){if(!X(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=qs;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(!X(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 Oi(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)),X(e))return e.length===0?-1:Si(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):Si(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Si(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,g){return a===1?d[g]:d.readUInt16BE(g*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 Oi(this,e,t,n,!0)},y.prototype.lastIndexOf=function(e,t,n){return Oi(this,e,t,n,!1)};function Xs(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 Ys(r,e,t,n){return Br(Nr(e,r.length-t),r,t,n)}function Ti(r,e,t,n){return Br(cf(e),r,t,n)}function Ks(r,e,t,n){return Ti(r,e,t,n)}function Zs(r,e,t,n){return Br(Mi(e),r,t,n)}function Js(r,e,t,n){return Br(lf(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 Xs(this,e,t,n);case"utf8":case"utf-8":return Ys(this,e,t,n);case"ascii":return Ti(this,e,t,n);case"latin1":case"binary":return Ks(this,e,t,n);case"base64":return Zs(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Js(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 Qs(r,e,t){return e===0&&t===r.length?mi(r):mi(r.slice(e,t))}function Ii(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 ef(n)}var xi=4096;function ef(r){var e=r.length;if(e<=xi)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=xi));return t}function rf(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 tf(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 nf(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+=ff(r[a]);return i}function af(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 V(r,e,t,n,i,a){if(!X(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}y.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;V(this,e,t,n,a,0)}var o=1,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;V(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||V(this,e,t,1,255,0),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};function Mr(r,e,t,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(r.length-t,2);i<a;++i)r[t+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}y.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Mr(this,e,t,!0),t+2},y.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Mr(this,e,t,!1),t+2};function Dr(r,e,t,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(r.length-t,4);i<a;++i)r[t+i]=e>>>(n?i:3-i)*8&255}y.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):Dr(this,e,t,!0),t+4},y.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Dr(this,e,t,!1),t+4},y.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);V(this,e,t,n,a-1,-a)}var o=0,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);V(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||V(this,e,t,1,127,-128),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1},y.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Mr(this,e,t,!0),t+2},y.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Mr(this,e,t,!1),t+2},y.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Dr(this,e,t,!0),t+4},y.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Dr(this,e,t,!1),t+4};function Pi(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 Fi(r,e,t,n,i){return i||Pi(r,e,t,4),wi(r,e,t,n,23,4),t+4}y.prototype.writeFloatLE=function(e,t,n){return Fi(this,e,t,!0,n)},y.prototype.writeFloatBE=function(e,t,n){return Fi(this,e,t,!1,n)};function Ri(r,e,t,n,i){return i||Pi(r,e,t,8),wi(r,e,t,n,52,8),t+8}y.prototype.writeDoubleLE=function(e,t,n){return Ri(this,e,t,!0,n)},y.prototype.writeDoubleBE=function(e,t,n){return Ri(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=X(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 of=/[^+\/0-9A-Za-z-_]/g;function uf(r){if(r=sf(r).replace(of,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function sf(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function ff(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 cf(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function lf(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 Mi(r){return Cs(uf(r))}function Br(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 pf(r){return r!==r}function hf(r){return r!=null&&(!!r._isBuffer||Di(r)||yf(r))}function Di(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function yf(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Di(r.slice(0,0))}function Ni(){throw new Error("setTimeout has not been defined")}function Bi(){throw new Error("clearTimeout has not been defined")}var le=Ni,pe=Bi;typeof Be.setTimeout=="function"&&(le=setTimeout),typeof Be.clearTimeout=="function"&&(pe=clearTimeout);function Ui(r){if(le===setTimeout)return setTimeout(r,0);if((le===Ni||!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 df(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=[],Ue=!1,$e,Ur=-1;function vf(){!Ue||!$e||(Ue=!1,$e.length?ne=$e.concat(ne):Ur=-1,ne.length&&Ci())}function Ci(){if(!Ue){var r=Ui(vf);Ue=!0;for(var e=ne.length;e;){for($e=ne,ne=[];++Ur<e;)$e&&$e[Ur].run();Ur=-1,e=ne.length}$e=null,Ue=!1,df(r)}}function gf(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 Li(r,e)),ne.length===1&&!Ue&&Ui(Ci)}function Li(r,e){this.fun=r,this.array=e}Li.prototype.run=function(){this.fun.apply(null,this.array)};var _f="browser",mf="browser",wf=!0,bf={},$f=[],Ef="",Af={},Of={},Sf={};function Ee(){}var Tf=Ee,If=Ee,xf=Ee,Pf=Ee,Ff=Ee,Rf=Ee,Mf=Ee;function Df(r){throw new Error("process.binding is not supported")}function Nf(){return"/"}function Bf(r){throw new Error("process.chdir is not supported")}function Uf(){return 0}var Ce=Be.performance||{},Cf=Ce.now||Ce.mozNow||Ce.msNow||Ce.oNow||Ce.webkitNow||function(){return new Date().getTime()};function Lf(r){var e=Cf.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 jf=new Date;function kf(){var r=new Date,e=r-jf;return e/1e3}var Cr={nextTick:gf,title:_f,browser:wf,env:bf,argv:$f,version:Ef,versions:Af,on:Tf,addListener:If,once:xf,off:Pf,removeListener:Ff,removeAllListeners:Rf,emit:Mf,binding:Df,cwd:Nf,chdir:Bf,umask:Uf,hrtime:Lf,platform:mf,release:Of,config:Sf,uptime:kf},Ht;typeof Object.create=="function"?Ht=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Ht=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};var ji=Ht,qf=/%[sdj%]/g;function Lr(r){if(!er(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(qf,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)||!Ae(o)?a+=" "+o:a+=" "+Y(o);return a}function Wt(r,e){if(K(Be.process))return function(){return Wt(r,e).apply(this,arguments)};if(Cr.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(Cr.throwDeprecation)throw new Error(e);Cr.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}var jr={},zt;function ki(r){if(K(zt)&&(zt=Cr.env.NODE_DEBUG||""),r=r.toUpperCase(),!jr[r])if(new RegExp("\\b"+r+"\\b","i").test(zt)){var e=0;jr[r]=function(){var t=Lr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else jr[r]=function(){};return jr[r]}function Y(r,e){var t={seen:[],stylize:Gf};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),qr(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=Vf),kr(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 Vf(r,e){var t=Y.styles[e];return t?"\x1B["+Y.colors[t][0]+"m"+r+"\x1B["+Y.colors[t][1]+"m":r}function Gf(r,e){return r}function Hf(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function kr(r,e,t){if(r.customInspect&&e&&nr(e.inspect)&&e.inspect!==Y&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return er(n)||(n=kr(r,n,t)),n}var i=Wf(r,e);if(i)return i;var a=Object.keys(e),o=Hf(a);if(r.showHidden&&(a=Object.getOwnPropertyNames(e)),tr(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Xt(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(Vr(e))return r.stylize(Date.prototype.toString.call(e),"date");if(tr(e))return Xt(e)}var f="",c=!1,l=["{","}"];if(Kt(e)&&(c=!0,l=["[","]"]),nr(e)){var u=e.name?": "+e.name:"";f=" [Function"+u+"]"}if(rr(e)&&(f=" "+RegExp.prototype.toString.call(e)),Vr(e)&&(f=" "+Date.prototype.toUTCString.call(e)),tr(e)&&(f=" "+Xt(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=zf(r,e,t,o,a):p=a.map(function(d){return Yt(r,e,t,o,d,c)}),r.seen.pop(),Xf(p,f,l)}function Wf(r,e){if(K(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(Zt(e))return r.stylize(""+e,"number");if(qr(e))return r.stylize(""+e,"boolean");if(Qe(e))return r.stylize("null","null")}function Xt(r){return"["+Error.prototype.toString.call(r)+"]"}function zf(r,e,t,n,i){for(var a=[],o=0,s=e.length;o<s;++o)zi(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")),zi(n,i)||(o="["+i+"]"),s||(r.seen.indexOf(f.value)<0?(Qe(t)?s=kr(r,f.value,null):s=kr(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")),K(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
|
|
18
|
+
`))):s=r.stylize("[Circular]","special")),K(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 Xf(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 qr(r){return typeof r=="boolean"}function Qe(r){return r===null}function qi(r){return r==null}function Zt(r){return typeof r=="number"}function er(r){return typeof r=="string"}function Vi(r){return typeof r=="symbol"}function K(r){return r===void 0}function rr(r){return Ae(r)&&Jt(r)==="[object RegExp]"}function Ae(r){return typeof r=="object"&&r!==null}function Vr(r){return Ae(r)&&Jt(r)==="[object Date]"}function tr(r){return Ae(r)&&(Jt(r)==="[object Error]"||r instanceof Error)}function nr(r){return typeof r=="function"}function Gi(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}function Hi(r){return y.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 zf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Xf(){var r=new Date,e=[Qt(r.getHours()),Qt(r.getMinutes()),Qt(r.getSeconds())].join(":");return[r.getDate(),zf[r.getMonth()],e].join(" ")}function Wi(){console.log("%s - %s",Xf(),Lr.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 zi(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var Yf={inherits:ji,_extend:en,log:Wi,isBuffer:Hi,isPrimitive:Gi,isFunction:nr,isError:tr,isDate:Vr,isObject:Ae,isRegExp:rr,isUndefined:K,isSymbol:Vi,isString:er,isNumber:Zt,isNullOrUndefined:qi,isNull:Qe,isBoolean:qr,isArray:Kt,inspect:Y,deprecate:Wt,format:Lr,debuglog:ki},Kf=Object.freeze({__proto__:null,format:Lr,deprecate:Wt,debuglog:ki,inspect:Y,isArray:Kt,isBoolean:qr,isNull:Qe,isNullOrUndefined:qi,isNumber:Zt,isString:er,isSymbol:Vi,isUndefined:K,isRegExp:rr,isObject:Ae,isDate:Vr,isError:tr,isFunction:nr,isPrimitive:Gi,isBuffer:Hi,log:Wi,inherits:ji,_extend:en,default:Yf}),Zf=Ke(Kf),Jf=Zf.inspect,rn=typeof Map=="function"&&Map.prototype,tn=Object.getOwnPropertyDescriptor&&rn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Gr=rn&&tn&&typeof tn.get=="function"?tn.get:null,Qf=rn&&Map.prototype.forEach,nn=typeof Set=="function"&&Set.prototype,an=Object.getOwnPropertyDescriptor&&nn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Hr=nn&&an&&typeof an.get=="function"?an.get:null,ec=nn&&Set.prototype.forEach,rc=typeof WeakMap=="function"&&WeakMap.prototype,ir=rc?WeakMap.prototype.has:null,tc=typeof WeakSet=="function"&&WeakSet.prototype,ar=tc?WeakSet.prototype.has:null,nc=typeof WeakRef=="function"&&WeakRef.prototype,Xi=nc?WeakRef.prototype.deref:null,ic=Boolean.prototype.valueOf,ac=Object.prototype.toString,oc=Function.prototype.toString,uc=String.prototype.match,on=String.prototype.slice,he=String.prototype.replace,sc=String.prototype.toUpperCase,Yi=String.prototype.toLowerCase,Ki=RegExp.prototype.test,Zi=Array.prototype.concat,Z=Array.prototype.join,fc=Array.prototype.slice,Ji=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",k=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Le?"object":"symbol")?Symbol.toStringTag:null,Qi=Object.prototype.propertyIsEnumerable,ea=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function ra(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Ki.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Ji(-r):Ji(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=Jf,ta=cn.custom,na=oa(ta)?ta:null,cc=function r(e,t,n,i){var a=t||{};if(ye(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ye(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=ye(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(ye(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(ye(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?ra(e,f):f}if(typeof e=="bigint"){var c=String(e)+"n";return s?ra(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 ln(e)?"[Array]":"[Object]";var u=Ic(a,n);if(typeof i>"u")i=[];else if(ua(i,e)>=0)return"[Circular]";function p(ee,ge,fe){if(ge&&(i=fc.call(i),i.push(ge)),fe){var Ir={depth:a.depth};return ye(a,"quoteStyle")&&(Ir.quoteStyle=a.quoteStyle),r(ee,Ir,n+1,i)}return r(ee,a,n+1,i)}if(typeof e=="function"&&!aa(e)){var d=mc(e),g=Wr(e,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(g.length>0?" { "+Z.call(g,", ")+" }":"")}if(oa(e)){var b=Le?he.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):fn.call(e);return typeof e=="object"&&!Le?or(b):b}if(Oc(e)){for(var E="<"+Yi.call(String(e.nodeName)),w=e.attributes||[],S=0;S<w.length;S++)E+=" "+w[S].name+"="+ia(lc(w[S].value),"double",a);return E+=">",e.childNodes&&e.childNodes.length&&(E+="..."),E+="</"+Yi.call(String(e.nodeName))+">",E}if(ln(e)){if(e.length===0)return"[]";var h=Wr(e,p);return u&&!Tc(h)?"["+hn(h,u)+"]":"[ "+Z.call(h,", ")+" ]"}if(hc(e)){var O=Wr(e,p);return!("cause"in Error.prototype)&&"cause"in e&&!Qi.call(e,"cause")?"{ ["+String(e)+"] "+Z.call(Zi.call("[cause]: "+p(e.cause),O),", ")+" }":O.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Z.call(O,", ")+" }"}if(typeof e=="object"&&o){if(na&&typeof e[na]=="function"&&cn)return cn(e,{depth:l-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(wc(e)){var x=[];return Qf.call(e,function(ee,ge){x.push(p(ge,e,!0)+" => "+p(ee,e))}),fa("Map",Gr.call(e),x,u)}if(Ec(e)){var R=[];return ec.call(e,function(ee){R.push(p(ee,e))}),fa("Set",Hr.call(e),R,u)}if(bc(e))return pn("WeakMap");if(Ac(e))return pn("WeakSet");if($c(e))return pn("WeakRef");if(dc(e))return or(p(Number(e)));if(gc(e))return or(p(un.call(e)));if(vc(e))return or(ic.call(e));if(yc(e))return or(p(String(e)));if(!pc(e)&&!aa(e)){var m=Wr(e,p),v=ea?ea(e)===Object.prototype:e instanceof Object||e.constructor===Object,_=e instanceof Object?"":"null prototype",$=!v&&k&&Object(e)===e&&k in e?on.call(de(e),8,-1):_?"Object":"",A=v||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",L=A+($||_?"["+Z.call(Zi.call([],$||[],_||[]),": ")+"] ":"");return m.length===0?L+"{}":u?L+"{"+hn(m,u)+"}":L+"{ "+Z.call(m,", ")+" }"}return String(e)};function ia(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function lc(r){return he.call(String(r),/"/g,""")}function ln(r){return de(r)==="[object Array]"&&(!k||!(typeof r=="object"&&k in r))}function pc(r){return de(r)==="[object Date]"&&(!k||!(typeof r=="object"&&k in r))}function aa(r){return de(r)==="[object RegExp]"&&(!k||!(typeof r=="object"&&k in r))}function hc(r){return de(r)==="[object Error]"&&(!k||!(typeof r=="object"&&k in r))}function yc(r){return de(r)==="[object String]"&&(!k||!(typeof r=="object"&&k in r))}function dc(r){return de(r)==="[object Number]"&&(!k||!(typeof r=="object"&&k in r))}function vc(r){return de(r)==="[object Boolean]"&&(!k||!(typeof r=="object"&&k in r))}function oa(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 gc(r){if(!r||typeof r!="object"||!un)return!1;try{return un.call(r),!0}catch{}return!1}var _c=Object.prototype.hasOwnProperty||function(r){return r in this};function ye(r,e){return _c.call(r,e)}function de(r){return ac.call(r)}function mc(r){if(r.name)return r.name;var e=uc.call(oc.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function ua(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 wc(r){if(!Gr||!r||typeof r!="object")return!1;try{Gr.call(r);try{Hr.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function bc(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 $c(r){if(!Xi||!r||typeof r!="object")return!1;try{return Xi.call(r),!0}catch{}return!1}function Ec(r){if(!Hr||!r||typeof r!="object")return!1;try{Hr.call(r);try{Gr.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Ac(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 Oc(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(on.call(r,0,e.maxStringLength),e)+n}var i=he.call(he.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Sc);return ia(i,"single",e)}function Sc(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":"")+sc.call(e.toString(16))}function or(r){return"Object("+r+")"}function pn(r){return r+" { ? }"}function fa(r,e,t,n){var i=n?hn(t,n):Z.call(t,", ");return r+" ("+e+") {"+i+"}"}function Tc(r){for(var e=0;e<r.length;e++)if(ua(r[e],`
|
|
22
|
-
`)>=0)return!1;return!0}function
|
|
21
|
+
`)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function Kt(r){return Array.isArray(r)}function qr(r){return typeof r=="boolean"}function Qe(r){return r===null}function qi(r){return r==null}function Zt(r){return typeof r=="number"}function er(r){return typeof r=="string"}function Vi(r){return typeof r=="symbol"}function K(r){return r===void 0}function rr(r){return Ae(r)&&Jt(r)==="[object RegExp]"}function Ae(r){return typeof r=="object"&&r!==null}function Vr(r){return Ae(r)&&Jt(r)==="[object Date]"}function tr(r){return Ae(r)&&(Jt(r)==="[object Error]"||r instanceof Error)}function nr(r){return typeof r=="function"}function Gi(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}function Hi(r){return y.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 Yf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Kf(){var r=new Date,e=[Qt(r.getHours()),Qt(r.getMinutes()),Qt(r.getSeconds())].join(":");return[r.getDate(),Yf[r.getMonth()],e].join(" ")}function Wi(){console.log("%s - %s",Kf(),Lr.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 zi(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var Zf={inherits:ji,_extend:en,log:Wi,isBuffer:Hi,isPrimitive:Gi,isFunction:nr,isError:tr,isDate:Vr,isObject:Ae,isRegExp:rr,isUndefined:K,isSymbol:Vi,isString:er,isNumber:Zt,isNullOrUndefined:qi,isNull:Qe,isBoolean:qr,isArray:Kt,inspect:Y,deprecate:Wt,format:Lr,debuglog:ki},Jf=Object.freeze({__proto__:null,format:Lr,deprecate:Wt,debuglog:ki,inspect:Y,isArray:Kt,isBoolean:qr,isNull:Qe,isNullOrUndefined:qi,isNumber:Zt,isString:er,isSymbol:Vi,isUndefined:K,isRegExp:rr,isObject:Ae,isDate:Vr,isError:tr,isFunction:nr,isPrimitive:Gi,isBuffer:Hi,log:Wi,inherits:ji,_extend:en,default:Zf}),Qf=Ke(Jf),ec=Qf.inspect,rn=typeof Map=="function"&&Map.prototype,tn=Object.getOwnPropertyDescriptor&&rn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Gr=rn&&tn&&typeof tn.get=="function"?tn.get:null,rc=rn&&Map.prototype.forEach,nn=typeof Set=="function"&&Set.prototype,an=Object.getOwnPropertyDescriptor&&nn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Hr=nn&&an&&typeof an.get=="function"?an.get:null,tc=nn&&Set.prototype.forEach,nc=typeof WeakMap=="function"&&WeakMap.prototype,ir=nc?WeakMap.prototype.has:null,ic=typeof WeakSet=="function"&&WeakSet.prototype,ar=ic?WeakSet.prototype.has:null,ac=typeof WeakRef=="function"&&WeakRef.prototype,Xi=ac?WeakRef.prototype.deref:null,oc=Boolean.prototype.valueOf,uc=Object.prototype.toString,sc=Function.prototype.toString,fc=String.prototype.match,on=String.prototype.slice,he=String.prototype.replace,cc=String.prototype.toUpperCase,Yi=String.prototype.toLowerCase,Ki=RegExp.prototype.test,Zi=Array.prototype.concat,Z=Array.prototype.join,lc=Array.prototype.slice,Ji=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",k=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Le?"object":"symbol")?Symbol.toStringTag:null,Qi=Object.prototype.propertyIsEnumerable,ea=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function ra(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Ki.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Ji(-r):Ji(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=ec,ta=cn.custom,na=oa(ta)?ta:null,pc=function r(e,t,n,i){var a=t||{};if(ye(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ye(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=ye(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(ye(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(ye(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?ra(e,f):f}if(typeof e=="bigint"){var c=String(e)+"n";return s?ra(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 ln(e)?"[Array]":"[Object]";var u=Pc(a,n);if(typeof i>"u")i=[];else if(ua(i,e)>=0)return"[Circular]";function p(ee,ge,fe){if(ge&&(i=lc.call(i),i.push(ge)),fe){var Ir={depth:a.depth};return ye(a,"quoteStyle")&&(Ir.quoteStyle=a.quoteStyle),r(ee,Ir,n+1,i)}return r(ee,a,n+1,i)}if(typeof e=="function"&&!aa(e)){var d=bc(e),g=Wr(e,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(g.length>0?" { "+Z.call(g,", ")+" }":"")}if(oa(e)){var b=Le?he.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):fn.call(e);return typeof e=="object"&&!Le?or(b):b}if(Tc(e)){for(var E="<"+Yi.call(String(e.nodeName)),w=e.attributes||[],T=0;T<w.length;T++)E+=" "+w[T].name+"="+ia(hc(w[T].value),"double",a);return E+=">",e.childNodes&&e.childNodes.length&&(E+="..."),E+="</"+Yi.call(String(e.nodeName))+">",E}if(ln(e)){if(e.length===0)return"[]";var h=Wr(e,p);return u&&!xc(h)?"["+hn(h,u)+"]":"[ "+Z.call(h,", ")+" ]"}if(dc(e)){var O=Wr(e,p);return!("cause"in Error.prototype)&&"cause"in e&&!Qi.call(e,"cause")?"{ ["+String(e)+"] "+Z.call(Zi.call("[cause]: "+p(e.cause),O),", ")+" }":O.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Z.call(O,", ")+" }"}if(typeof e=="object"&&o){if(na&&typeof e[na]=="function"&&cn)return cn(e,{depth:l-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if($c(e)){var x=[];return rc.call(e,function(ee,ge){x.push(p(ge,e,!0)+" => "+p(ee,e))}),fa("Map",Gr.call(e),x,u)}if(Oc(e)){var R=[];return tc.call(e,function(ee){R.push(p(ee,e))}),fa("Set",Hr.call(e),R,u)}if(Ec(e))return pn("WeakMap");if(Sc(e))return pn("WeakSet");if(Ac(e))return pn("WeakRef");if(gc(e))return or(p(Number(e)));if(mc(e))return or(p(un.call(e)));if(_c(e))return or(oc.call(e));if(vc(e))return or(p(String(e)));if(!yc(e)&&!aa(e)){var m=Wr(e,p),v=ea?ea(e)===Object.prototype:e instanceof Object||e.constructor===Object,_=e instanceof Object?"":"null prototype",$=!v&&k&&Object(e)===e&&k in e?on.call(de(e),8,-1):_?"Object":"",A=v||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",L=A+($||_?"["+Z.call(Zi.call([],$||[],_||[]),": ")+"] ":"");return m.length===0?L+"{}":u?L+"{"+hn(m,u)+"}":L+"{ "+Z.call(m,", ")+" }"}return String(e)};function ia(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function hc(r){return he.call(String(r),/"/g,""")}function ln(r){return de(r)==="[object Array]"&&(!k||!(typeof r=="object"&&k in r))}function yc(r){return de(r)==="[object Date]"&&(!k||!(typeof r=="object"&&k in r))}function aa(r){return de(r)==="[object RegExp]"&&(!k||!(typeof r=="object"&&k in r))}function dc(r){return de(r)==="[object Error]"&&(!k||!(typeof r=="object"&&k in r))}function vc(r){return de(r)==="[object String]"&&(!k||!(typeof r=="object"&&k in r))}function gc(r){return de(r)==="[object Number]"&&(!k||!(typeof r=="object"&&k in r))}function _c(r){return de(r)==="[object Boolean]"&&(!k||!(typeof r=="object"&&k in r))}function oa(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 mc(r){if(!r||typeof r!="object"||!un)return!1;try{return un.call(r),!0}catch{}return!1}var wc=Object.prototype.hasOwnProperty||function(r){return r in this};function ye(r,e){return wc.call(r,e)}function de(r){return uc.call(r)}function bc(r){if(r.name)return r.name;var e=fc.call(sc.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function ua(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 $c(r){if(!Gr||!r||typeof r!="object")return!1;try{Gr.call(r);try{Hr.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function Ec(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 Ac(r){if(!Xi||!r||typeof r!="object")return!1;try{return Xi.call(r),!0}catch{}return!1}function Oc(r){if(!Hr||!r||typeof r!="object")return!1;try{Hr.call(r);try{Gr.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Sc(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 Tc(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(on.call(r,0,e.maxStringLength),e)+n}var i=he.call(he.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ic);return ia(i,"single",e)}function Ic(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":"")+cc.call(e.toString(16))}function or(r){return"Object("+r+")"}function pn(r){return r+" { ? }"}function fa(r,e,t,n){var i=n?hn(t,n):Z.call(t,", ");return r+" ("+e+") {"+i+"}"}function xc(r){for(var e=0;e<r.length;e++)if(ua(r[e],`
|
|
22
|
+
`)>=0)return!1;return!0}function Pc(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Z.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Z.call(Array(e+1),t)}}function hn(r,e){if(r.length===0)return"";var t=`
|
|
23
23
|
`+e.prev+e.base;return t+Z.call(r,","+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]=ye(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)!ye(r,f)||t&&String(Number(f))===f&&f<r.length||Le&&o["$"+f]instanceof Symbol||(Ki.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++)Qi.call(r,a[c])&&n.push("["+e(a[c])+"]: "+e(r[a[c]],r));return n}var yn=jt,je=Ds,xc=cc,Pc=yn("%TypeError%"),zr=yn("%WeakMap%",!0),Xr=yn("%Map%",!0),Fc=je("WeakMap.prototype.get",!0),Rc=je("WeakMap.prototype.set",!0),Mc=je("WeakMap.prototype.has",!0),Dc=je("Map.prototype.get",!0),Nc=je("Map.prototype.set",!0),Bc=je("Map.prototype.has",!0),dn=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},Uc=function(r,e){var t=dn(r,e);return t&&t.value},Cc=function(r,e,t){var n=dn(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Lc=function(r,e){return!!dn(r,e)},jc=function(){var e,t,n,i={assert:function(a){if(!i.has(a))throw new Pc("Side channel does not contain "+xc(a))},get:function(a){if(zr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Fc(e,a)}else if(Xr){if(t)return Dc(t,a)}else if(n)return Uc(n,a)},has:function(a){if(zr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Mc(e,a)}else if(Xr){if(t)return Bc(t,a)}else if(n)return Lc(n,a);return!1},set:function(a,o){zr&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new zr),Rc(e,a,o)):Xr?(t||(t=new Xr),Nc(t,a,o)):(n||(n={key:{},next:null}),Cc(n,a,o))}};return i},kc=String.prototype.replace,qc=/%20/g,vn={RFC1738:"RFC1738",RFC3986:"RFC3986"},gn={default:vn.RFC3986,formatters:{RFC1738:function(r){return kc.call(r,qc,"+")},RFC3986:function(r){return String(r)}},RFC1738:vn.RFC1738,RFC3986:vn.RFC3986},Vc=gn,_n=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}(),Gc=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}}},ca=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},Hc=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)||!_n.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=ca(e,n)),Oe(e)&&Oe(t)?(t.forEach(function(a,o){if(_n.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 _n.call(a,o)?a[o]=r(a[o],s,n):a[o]=s,a},i)},Wc=function(e,t){return Object.keys(t).reduce(function(n,i){return n[i]=t[i],n},e)},zc=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}},Xc=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===Vc.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},Yc=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 Gc(t),e},Kc=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))},Jc=function(e,t){return[].concat(e,t)},Qc=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)},la={arrayToObject:ca,assign:Wc,combine:Jc,compact:Yc,decode:zc,encode:Xc,isBuffer:Zc,isRegExp:Kc,maybeMap:Qc,merge:Hc},pa=jc,mn=la,ur=gn,el=Object.prototype.hasOwnProperty,ha={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},ie=Array.isArray,rl=String.prototype.split,tl=Array.prototype.push,ya=function(r,e){tl.apply(r,ie(e)?e:[e])},nl=Date.prototype.toISOString,da=ur.default,U={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:mn.encode,encodeValuesOnly:!1,format:da,formatter:ur.formatters[da],indices:!1,serializeDate:function(e){return nl.call(e)},skipNulls:!1,strictNullHandling:!1},il=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},wn={},al=function r(e,t,n,i,a,o,s,f,c,l,u,p,d,g,b,E){for(var w=e,S=E,h=0,O=!1;(S=S.get(wn))!==void 0&&!O;){var x=S.get(e);if(h+=1,typeof x<"u"){if(x===h)throw new RangeError("Cyclic object value");O=!0}typeof S.get(wn)>"u"&&(h=0)}if(typeof f=="function"?w=f(t,w):w instanceof Date?w=u(w):n==="comma"&&ie(w)&&(w=mn.maybeMap(w,function(oi){return oi instanceof Date?u(oi):oi})),w===null){if(a)return s&&!g?s(t,U.encoder,b,"key",p):t;w=""}if(il(w)||mn.isBuffer(w)){if(s){var R=g?t:s(t,U.encoder,b,"key",p);if(n==="comma"&&g){for(var m=rl.call(String(w),","),v="",_=0;_<m.length;++_)v+=(_===0?"":",")+d(s(m[_],U.encoder,b,"value",p));return[d(R)+(i&&ie(w)&&m.length===1?"[]":"")+"="+v]}return[d(R)+"="+d(s(w,U.encoder,b,"value",p))]}return[d(t)+"="+d(String(w))]}var $=[];if(typeof w>"u")return $;var A;if(n==="comma"&&ie(w))A=[{value:w.length>0?w.join(",")||null:void 0}];else if(ie(f))A=f;else{var L=Object.keys(w);A=c?L.sort(c):L}for(var ee=i&&ie(w)&&w.length===1?t+"[]":t,ge=0;ge<A.length;++ge){var fe=A[ge],Ir=typeof fe=="object"&&typeof fe.value<"u"?fe.value:w[fe];if(!(o&&Ir===null)){var N2=ie(w)?typeof n=="function"?n(ee,fe):ee:ee+(l?"."+fe:"["+fe+"]");E.set(e,h);var rs=pa();rs.set(wn,E),ya($,r(Ir,N2,n,i,a,o,s,f,c,l,u,p,d,g,b,rs))}}return $},ol=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=ur.default;if(typeof e.format<"u"){if(!el.call(ur.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=ur.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}},ul=function(r,e){var t=r,n=ol(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 ha?s=e.arrayFormat:e&&"indices"in e?s=e.indices?"indices":"repeat":s="indices";var f=ha[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=pa(),u=0;u<i.length;++u){var p=i[u];n.skipNulls&&t[p]===null||ya(o,al(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),g=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),d.length>0?g+d:""},ke=la,bn=Object.prototype.hasOwnProperty,sl=Array.isArray,B={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ke.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},fl=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},va=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},cl="utf8=%26%2310003%3B",ll="utf8=%E2%9C%93",pl=function(e,t){var n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,a),s=-1,f,c=t.charset;if(t.charsetSentinel)for(f=0;f<o.length;++f)o[f].indexOf("utf8=")===0&&(o[f]===ll?c="utf-8":o[f]===cl&&(c="iso-8859-1"),s=f,f=o.length);for(f=0;f<o.length;++f)if(f!==s){var l=o[f],u=l.indexOf("]="),p=u===-1?l.indexOf("="):u+1,d,g;p===-1?(d=t.decoder(l,B.decoder,c,"key"),g=t.strictNullHandling?null:""):(d=t.decoder(l.slice(0,p),B.decoder,c,"key"),g=ke.maybeMap(va(l.slice(p+1),t),function(b){return t.decoder(b,B.decoder,c,"value")})),g&&t.interpretNumericEntities&&c==="iso-8859-1"&&(g=fl(g)),l.indexOf("[]=")>-1&&(g=sl(g)?[g]:g),bn.call(n,d)?n[d]=ke.combine(n[d],g):n[d]=g}return n},hl=function(r,e,t,n){for(var i=n?e:va(e,t),a=r.length-1;a>=0;--a){var o,s=r[a];if(s==="[]"&&t.parseArrays)o=[].concat(i);else{o=t.plainObjects?Object.create(null):{};var f=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=parseInt(f,10);!t.parseArrays&&f===""?o={0:i}:!isNaN(c)&&s!==f&&String(c)===f&&c>=0&&t.parseArrays&&c<=t.arrayLimit?(o=[],o[c]=i):f!=="__proto__"&&(o[f]=i)}i=o}return i},yl=function(e,t,n,i){if(!!e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,f=n.depth>0&&o.exec(a),c=f?a.slice(0,f.index):a,l=[];if(c){if(!n.plainObjects&&bn.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var u=0;n.depth>0&&(f=s.exec(a))!==null&&u<n.depth;){if(u+=1,!n.plainObjects&&bn.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(f[1])}return f&&l.push("["+a.slice(f.index)+"]"),hl(l,t,n,i)}},dl=function(e){if(!e)return B;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?B.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?B.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:B.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:B.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:B.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:B.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:B.comma,decoder:typeof e.decoder=="function"?e.decoder:B.decoder,delimiter:typeof e.delimiter=="string"||ke.isRegExp(e.delimiter)?e.delimiter:B.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:B.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:B.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:B.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:B.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:B.strictNullHandling}},vl=function(r,e){var t=dl(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?pl(r,t):r,i=t.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o){var s=a[o],f=yl(s,n[s],t,typeof r=="string");i=ke.merge(i,f,t)}return t.allowSparse===!0?i:ke.compact(i)},gl=ul,_l=vl,ml=gn,wl={formats:ml,parse:_l,stringify:gl};let ga={storeIdentifier:"",environment:"prod"};function bl(r){ga=r}function sr(){return ga}const $l=r=>r==="stage"?"https://api.stage.rechargeapps.com":"https://api.rechargeapps.com",El=r=>r==="stage"?"https://admin.stage.rechargeapps.com":"https://admin.rechargeapps.com",Al=r=>r==="stage"?"https://static.stage.rechargecdn.com":"https://static.rechargecdn.com",Ol="/tools/recurring";class $n{constructor(e,t){this.name="RechargeRequestError",this.message=e,this.status=t}}var Sl=Object.defineProperty,Tl=Object.defineProperties,Il=Object.getOwnPropertyDescriptors,_a=Object.getOwnPropertySymbols,xl=Object.prototype.hasOwnProperty,Pl=Object.prototype.propertyIsEnumerable,ma=(r,e,t)=>e in r?Sl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Yr=(r,e)=>{for(var t in e||(e={}))xl.call(e,t)&&ma(r,t,e[t]);if(_a)for(var t of _a(e))Pl.call(e,t)&&ma(r,t,e[t]);return r},Fl=(r,e)=>Tl(r,Il(e));function Rl(r){return wl.stringify(r,{encode:!1,indices:!1,arrayFormat:"comma"})}async function Kr(r,e,t={}){const n=sr();return ae(r,`${Al(n.environment)}/store/${n.storeIdentifier}${e}`,t)}async function T(r,e,{id:t,query:n,data:i,headers:a}={},o){const{environment:s,storeIdentifier:f,loginRetryFn:c}=sr(),l=o.apiToken,u=$l(s),p=Yr({"X-Recharge-Access-Token":l,"X-Recharge-Version":"2021-11"},a||{}),d=Yr({shop_url:f},n);try{return await ae(r,`${u}${e}`,{id:t,query:d,data:i,headers:p})}catch(g){if(c&&g instanceof $n&&g.status===401)return c().then(b=>{if(b)return ae(r,`${u}${e}`,{id:t,query:d,data:i,headers:Fl(Yr({},p),{"X-Recharge-Access-Token":b.apiToken})});throw g});throw g}}async function En(r,e,t={}){return ae(r,`${Ol}${e}`,t)}async function ae(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,Rl(n)].join("&").replace(/^&/,"");o=`${o}${p?`?${p}`:""}`}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 l;try{l=await c.json()}catch{}if(!c.ok)throw l&&l.error?new $n(l.error,c.status):new $n("A connection error occurred while making the request");return l}function Ml(r,e){return T("get","/addresses",{query:e},r)}async function Dl(r,e){const{address:t}=await T("get","/addresses",{id:e},r);return t}async function Nl(r,e){const{address:t}=await T("post","/addresses",{data:e},r);return t}async function Bl(r,e,t){const{address:n}=await T("put","/addresses",{id:e,data:t},r);return n}function Ul(r,e){return T("delete","/addresses",{id:e},r)}async function Cl(r,e){const{address:t}=await T("post","/addresses/merge",{data:e},r);return t}async function Ll(r,e,t){const{charge:n}=await T("post",`/addresses/${e}/charges/skip`,{data:t},r);return n}var jl=Object.freeze({__proto__:null,listAddresses:Ml,getAddress:Dl,createAddress:Nl,updateAddress:Bl,deleteAddress:Ul,mergeAddresses:Cl,skipFutureCharge:Ll});async function kl(){const{storefrontAccessToken:r}=sr(),e={};r&&(e["X-Recharge-Storefront-Access-Token"]=r);const t=await En("get","/access",{headers:e});return{apiToken:t.api_token,customerId:t.customer_id}}async function ql(r,e){const{environment:t,storeIdentifier:n}=sr(),i=El(t),a=await ae("post",`${i}/shopify_storefront_access`,{data:{customer_token:e,storefront_token:r,shop_url:n},headers:{"X-Recharge-App":"storefront-client"}});return a.api_token?{apiToken:a.api_token,customerId:a.customer_id}:null}var Vl=Object.freeze({__proto__:null,loginShopifyAppProxy:kl,loginShopifyApi:ql}),wa={},An={},oe={},Gl=typeof re=="object"&&re&&re.Object===Object&&re,ba=Gl,Hl=ba,Wl=typeof self=="object"&&self&&self.Object===Object&&self,zl=Hl||Wl||Function("return this")(),Q=zl,Xl=Q,Yl=Xl.Symbol,qe=Yl,$a=qe,Ea=Object.prototype,Kl=Ea.hasOwnProperty,Zl=Ea.toString,fr=$a?$a.toStringTag:void 0;function Jl(r){var e=Kl.call(r,fr),t=r[fr];try{r[fr]=void 0;var n=!0}catch{}var i=Zl.call(r);return n&&(e?r[fr]=t:delete r[fr]),i}var Ql=Jl,ep=Object.prototype,rp=ep.toString;function tp(r){return rp.call(r)}var np=tp,Aa=qe,ip=Ql,ap=np,op="[object Null]",up="[object Undefined]",Oa=Aa?Aa.toStringTag:void 0;function sp(r){return r==null?r===void 0?up:op:Oa&&Oa in Object(r)?ip(r):ap(r)}var ue=sp;function fp(r){return r!=null&&typeof r=="object"}var H=fp,cp=ue,lp=H,pp="[object Number]";function hp(r){return typeof r=="number"||lp(r)&&cp(r)==pp}var Zr=hp,M={},Sa={exports:{}};function yp(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var ve=yp,dp=ue,vp=ve,gp="[object AsyncFunction]",_p="[object Function]",mp="[object GeneratorFunction]",wp="[object Proxy]";function bp(r){if(!vp(r))return!1;var e=dp(r);return e==_p||e==mp||e==gp||e==wp}var On=bp,$p=Q,Ep=$p["__core-js_shared__"],Ap=Ep,Sn=Ap,Ta=function(){var r=/[^.]+$/.exec(Sn&&Sn.keys&&Sn.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Op(r){return!!Ta&&Ta in r}var Sp=Op,Tp=Function.prototype,Ip=Tp.toString;function xp(r){if(r!=null){try{return Ip.call(r)}catch{}try{return r+""}catch{}}return""}var Ia=xp,Pp=On,Fp=Sp,Rp=ve,Mp=Ia,Dp=/[\\^$.*+?()[\]{}|]/g,Np=/^\[object .+?Constructor\]$/,Bp=Function.prototype,Up=Object.prototype,Cp=Bp.toString,Lp=Up.hasOwnProperty,jp=RegExp("^"+Cp.call(Lp).replace(Dp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kp(r){if(!Rp(r)||Fp(r))return!1;var e=Pp(r)?jp:Np;return e.test(Mp(r))}var qp=kp;function Vp(r,e){return r?.[e]}var Gp=Vp,Hp=qp,Wp=Gp;function zp(r,e){var t=Wp(r,e);return Hp(t)?t:void 0}var Se=zp,Xp=Se,Yp=function(){try{var r=Xp(Object,"defineProperty");return r({},"",{}),r}catch{}}(),xa=Yp,Pa=xa;function Kp(r,e,t){e=="__proto__"&&Pa?Pa(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var Fa=Kp;function Zp(r,e){return r===e||r!==r&&e!==e}var Jr=Zp,Jp=Fa,Qp=Jr,eh=Object.prototype,rh=eh.hasOwnProperty;function th(r,e,t){var n=r[e];(!(rh.call(r,e)&&Qp(n,t))||t===void 0&&!(e in r))&&Jp(r,e,t)}var Ra=th,nh=Ra,ih=Fa;function ah(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?ih(t,s,f):nh(t,s,f)}return t}var Ve=ah;function oh(r){return r}var Qr=oh;function uh(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 sh=uh,fh=sh,Ma=Math.max;function ch(r,e,t){return e=Ma(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,a=Ma(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),fh(r,this,s)}}var Da=ch;function lh(r){return function(){return r}}var ph=lh,hh=ph,Na=xa,yh=Qr,dh=Na?function(r,e){return Na(r,"toString",{configurable:!0,enumerable:!1,value:hh(e),writable:!0})}:yh,vh=dh,gh=800,_h=16,mh=Date.now;function wh(r){var e=0,t=0;return function(){var n=mh(),i=_h-(n-t);if(t=n,i>0){if(++e>=gh)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var bh=wh,$h=vh,Eh=bh,Ah=Eh($h),Ba=Ah,Oh=Qr,Sh=Da,Th=Ba;function Ih(r,e){return Th(Sh(r,e,Oh),r+"")}var xh=Ih,Ph=9007199254740991;function Fh(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Ph}var Tn=Fh,Rh=On,Mh=Tn;function Dh(r){return r!=null&&Mh(r.length)&&!Rh(r)}var cr=Dh,Nh=9007199254740991,Bh=/^(?:0|[1-9]\d*)$/;function Uh(r,e){var t=typeof r;return e=e??Nh,!!e&&(t=="number"||t!="symbol"&&Bh.test(r))&&r>-1&&r%1==0&&r<e}var In=Uh,Ch=Jr,Lh=cr,jh=In,kh=ve;function qh(r,e,t){if(!kh(t))return!1;var n=typeof e;return(n=="number"?Lh(t)&&jh(e,t.length):n=="string"&&e in t)?Ch(t[e],r):!1}var Ua=qh,Vh=xh,Gh=Ua;function Hh(r){return Vh(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&&Gh(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 Wh=Hh;function zh(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Ca=zh,Xh=ue,Yh=H,Kh="[object Arguments]";function Zh(r){return Yh(r)&&Xh(r)==Kh}var Jh=Zh,La=Jh,Qh=H,ja=Object.prototype,ey=ja.hasOwnProperty,ry=ja.propertyIsEnumerable,ty=La(function(){return arguments}())?La:function(r){return Qh(r)&&ey.call(r,"callee")&&!ry.call(r,"callee")},xn=ty,ny=Array.isArray,C=ny,lr={exports:{}};function iy(){return!1}var ay=iy;(function(r,e){var t=Q,n=ay,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})(lr,lr.exports);var oy=ue,uy=Tn,sy=H,fy="[object Arguments]",cy="[object Array]",ly="[object Boolean]",py="[object Date]",hy="[object Error]",yy="[object Function]",dy="[object Map]",vy="[object Number]",gy="[object Object]",_y="[object RegExp]",my="[object Set]",wy="[object String]",by="[object WeakMap]",$y="[object ArrayBuffer]",Ey="[object DataView]",Ay="[object Float32Array]",Oy="[object Float64Array]",Sy="[object Int8Array]",Ty="[object Int16Array]",Iy="[object Int32Array]",xy="[object Uint8Array]",Py="[object Uint8ClampedArray]",Fy="[object Uint16Array]",Ry="[object Uint32Array]",F={};F[Ay]=F[Oy]=F[Sy]=F[Ty]=F[Iy]=F[xy]=F[Py]=F[Fy]=F[Ry]=!0,F[fy]=F[cy]=F[$y]=F[ly]=F[Ey]=F[py]=F[hy]=F[yy]=F[dy]=F[vy]=F[gy]=F[_y]=F[my]=F[wy]=F[by]=!1;function My(r){return sy(r)&&uy(r.length)&&!!F[oy(r)]}var Dy=My;function Ny(r){return function(e){return r(e)}}var Pn=Ny,pr={exports:{}};(function(r,e){var t=ba,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})(pr,pr.exports);var By=Dy,Uy=Pn,ka=pr.exports,qa=ka&&ka.isTypedArray,Cy=qa?Uy(qa):By,Va=Cy,Ly=Ca,jy=xn,ky=C,qy=lr.exports,Vy=In,Gy=Va,Hy=Object.prototype,Wy=Hy.hasOwnProperty;function zy(r,e){var t=ky(r),n=!t&&jy(r),i=!t&&!n&&qy(r),a=!t&&!n&&!i&&Gy(r),o=t||n||i||a,s=o?Ly(r.length,String):[],f=s.length;for(var c in r)(e||Wy.call(r,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vy(c,f)))&&s.push(c);return s}var Ga=zy,Xy=Object.prototype;function Yy(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Xy;return r===t}var Fn=Yy;function Ky(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var Zy=Ky,Jy=ve,Qy=Fn,ed=Zy,rd=Object.prototype,td=rd.hasOwnProperty;function nd(r){if(!Jy(r))return ed(r);var e=Qy(r),t=[];for(var n in r)n=="constructor"&&(e||!td.call(r,n))||t.push(n);return t}var id=nd,ad=Ga,od=id,ud=cr;function sd(r){return ud(r)?ad(r,!0):od(r)}var et=sd,fd=Ve,cd=Wh,ld=et,pd=cd(function(r,e){fd(e,ld(e),r)}),hd=pd;(function(r){r.exports=hd})(Sa);var rt={},Te={};function yd(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 dd=yd;function vd(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 gd=vd,_d=gd,md=_d(),wd=md;function bd(r,e){return function(t){return r(e(t))}}var Ha=bd,$d=Ha,Ed=$d(Object.keys,Object),Ad=Ed,Od=Fn,Sd=Ad,Td=Object.prototype,Id=Td.hasOwnProperty;function xd(r){if(!Od(r))return Sd(r);var e=[];for(var t in Object(r))Id.call(r,t)&&t!="constructor"&&e.push(t);return e}var Pd=xd,Fd=Ga,Rd=Pd,Md=cr;function Dd(r){return Md(r)?Fd(r):Rd(r)}var Ge=Dd,Nd=wd,Bd=Ge;function Ud(r,e){return r&&Nd(r,e,Bd)}var Cd=Ud,Ld=cr;function jd(r,e){return function(t,n){if(t==null)return t;if(!Ld(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 kd=jd,qd=Cd,Vd=kd,Gd=Vd(qd),Rn=Gd,Hd=Rn;function Wd(r,e){var t=!0;return Hd(r,function(n,i,a){return t=!!e(n,i,a),t}),t}var zd=Wd;function Xd(){this.__data__=[],this.size=0}var Yd=Xd,Kd=Jr;function Zd(r,e){for(var t=r.length;t--;)if(Kd(r[t][0],e))return t;return-1}var tt=Zd,Jd=tt,Qd=Array.prototype,ev=Qd.splice;function rv(r){var e=this.__data__,t=Jd(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():ev.call(e,t,1),--this.size,!0}var tv=rv,nv=tt;function iv(r){var e=this.__data__,t=nv(e,r);return t<0?void 0:e[t][1]}var av=iv,ov=tt;function uv(r){return ov(this.__data__,r)>-1}var sv=uv,fv=tt;function cv(r,e){var t=this.__data__,n=fv(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var lv=cv,pv=Yd,hv=tv,yv=av,dv=sv,vv=lv;function He(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])}}He.prototype.clear=pv,He.prototype.delete=hv,He.prototype.get=yv,He.prototype.has=dv,He.prototype.set=vv;var nt=He,gv=nt;function _v(){this.__data__=new gv,this.size=0}var mv=_v;function wv(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var bv=wv;function $v(r){return this.__data__.get(r)}var Ev=$v;function Av(r){return this.__data__.has(r)}var Ov=Av,Sv=Se,Tv=Q,Iv=Sv(Tv,"Map"),Mn=Iv,xv=Se,Pv=xv(Object,"create"),it=Pv,Wa=it;function Fv(){this.__data__=Wa?Wa(null):{},this.size=0}var Rv=Fv;function Mv(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var Dv=Mv,Nv=it,Bv="__lodash_hash_undefined__",Uv=Object.prototype,Cv=Uv.hasOwnProperty;function Lv(r){var e=this.__data__;if(Nv){var t=e[r];return t===Bv?void 0:t}return Cv.call(e,r)?e[r]:void 0}var jv=Lv,kv=it,qv=Object.prototype,Vv=qv.hasOwnProperty;function Gv(r){var e=this.__data__;return kv?e[r]!==void 0:Vv.call(e,r)}var Hv=Gv,Wv=it,zv="__lodash_hash_undefined__";function Xv(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Wv&&e===void 0?zv:e,this}var Yv=Xv,Kv=Rv,Zv=Dv,Jv=jv,Qv=Hv,eg=Yv;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=Kv,We.prototype.delete=Zv,We.prototype.get=Jv,We.prototype.has=Qv,We.prototype.set=eg;var rg=We,za=rg,tg=nt,ng=Mn;function ig(){this.size=0,this.__data__={hash:new za,map:new(ng||tg),string:new za}}var ag=ig;function og(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var ug=og,sg=ug;function fg(r,e){var t=r.__data__;return sg(e)?t[typeof e=="string"?"string":"hash"]:t.map}var at=fg,cg=at;function lg(r){var e=cg(this,r).delete(r);return this.size-=e?1:0,e}var pg=lg,hg=at;function yg(r){return hg(this,r).get(r)}var dg=yg,vg=at;function gg(r){return vg(this,r).has(r)}var _g=gg,mg=at;function wg(r,e){var t=mg(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var bg=wg,$g=ag,Eg=pg,Ag=dg,Og=_g,Sg=bg;function ze(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])}}ze.prototype.clear=$g,ze.prototype.delete=Eg,ze.prototype.get=Ag,ze.prototype.has=Og,ze.prototype.set=Sg;var Dn=ze,Tg=nt,Ig=Mn,xg=Dn,Pg=200;function Fg(r,e){var t=this.__data__;if(t instanceof Tg){var n=t.__data__;if(!Ig||n.length<Pg-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new xg(n)}return t.set(r,e),this.size=t.size,this}var Rg=Fg,Mg=nt,Dg=mv,Ng=bv,Bg=Ev,Ug=Ov,Cg=Rg;function Xe(r){var e=this.__data__=new Mg(r);this.size=e.size}Xe.prototype.clear=Dg,Xe.prototype.delete=Ng,Xe.prototype.get=Bg,Xe.prototype.has=Ug,Xe.prototype.set=Cg;var Nn=Xe,Lg="__lodash_hash_undefined__";function jg(r){return this.__data__.set(r,Lg),this}var kg=jg;function qg(r){return this.__data__.has(r)}var Vg=qg,Gg=Dn,Hg=kg,Wg=Vg;function ot(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Gg;++e<t;)this.add(r[e])}ot.prototype.add=ot.prototype.push=Hg,ot.prototype.has=Wg;var zg=ot;function Xg(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 Yg=Xg;function Kg(r,e){return r.has(e)}var Zg=Kg,Jg=zg,Qg=Yg,e_=Zg,r_=1,t_=2;function n_(r,e,t,n,i,a){var o=t&r_,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&t_?new Jg:void 0;for(a.set(r,e),a.set(e,r);++u<s;){var g=r[u],b=e[u];if(n)var E=o?n(b,g,u,e,r,a):n(g,b,u,r,e,a);if(E!==void 0){if(E)continue;p=!1;break}if(d){if(!Qg(e,function(w,S){if(!e_(d,S)&&(g===w||i(g,w,t,n,a)))return d.push(S)})){p=!1;break}}else if(!(g===b||i(g,b,t,n,a))){p=!1;break}}return a.delete(r),a.delete(e),p}var Xa=n_,i_=Q,a_=i_.Uint8Array,Ya=a_;function o_(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}var u_=o_;function s_(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var f_=s_,Ka=qe,Za=Ya,c_=Jr,l_=Xa,p_=u_,h_=f_,y_=1,d_=2,v_="[object Boolean]",g_="[object Date]",__="[object Error]",m_="[object Map]",w_="[object Number]",b_="[object RegExp]",$_="[object Set]",E_="[object String]",A_="[object Symbol]",O_="[object ArrayBuffer]",S_="[object DataView]",Ja=Ka?Ka.prototype:void 0,Bn=Ja?Ja.valueOf:void 0;function T_(r,e,t,n,i,a,o){switch(t){case S_:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case O_:return!(r.byteLength!=e.byteLength||!a(new Za(r),new Za(e)));case v_:case g_:case w_:return c_(+r,+e);case __:return r.name==e.name&&r.message==e.message;case b_:case E_:return r==e+"";case m_:var s=p_;case $_:var f=n&y_;if(s||(s=h_),r.size!=e.size&&!f)return!1;var c=o.get(r);if(c)return c==e;n|=d_,o.set(r,e);var l=l_(s(r),s(e),n,i,a,o);return o.delete(r),l;case A_:if(Bn)return Bn.call(r)==Bn.call(e)}return!1}var I_=T_;function x_(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var Un=x_,P_=Un,F_=C;function R_(r,e,t){var n=e(r);return F_(r)?n:P_(n,t(r))}var Qa=R_;function M_(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 D_=M_;function N_(){return[]}var eo=N_,B_=D_,U_=eo,C_=Object.prototype,L_=C_.propertyIsEnumerable,ro=Object.getOwnPropertySymbols,j_=ro?function(r){return r==null?[]:(r=Object(r),B_(ro(r),function(e){return L_.call(r,e)}))}:U_,Cn=j_,k_=Qa,q_=Cn,V_=Ge;function G_(r){return k_(r,V_,q_)}var to=G_,no=to,H_=1,W_=Object.prototype,z_=W_.hasOwnProperty;function X_(r,e,t,n,i,a){var o=t&H_,s=no(r),f=s.length,c=no(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),g=a.get(e);if(d&&g)return d==e&&g==r;var b=!0;a.set(r,e),a.set(e,r);for(var E=o;++u<f;){p=s[u];var w=r[p],S=e[p];if(n)var h=o?n(S,w,p,e,r,a):n(w,S,p,r,e,a);if(!(h===void 0?w===S||i(w,S,t,n,a):h)){b=!1;break}E||(E=p=="constructor")}if(b&&!E){var O=r.constructor,x=e.constructor;O!=x&&"constructor"in r&&"constructor"in e&&!(typeof O=="function"&&O instanceof O&&typeof x=="function"&&x instanceof x)&&(b=!1)}return a.delete(r),a.delete(e),b}var Y_=X_,K_=Se,Z_=Q,J_=K_(Z_,"DataView"),Q_=J_,em=Se,rm=Q,tm=em(rm,"Promise"),nm=tm,im=Se,am=Q,om=im(am,"Set"),um=om,sm=Se,fm=Q,cm=sm(fm,"WeakMap"),lm=cm,Ln=Q_,jn=Mn,kn=nm,qn=um,Vn=lm,io=ue,Ye=Ia,ao="[object Map]",pm="[object Object]",oo="[object Promise]",uo="[object Set]",so="[object WeakMap]",fo="[object DataView]",hm=Ye(Ln),ym=Ye(jn),dm=Ye(kn),vm=Ye(qn),gm=Ye(Vn),Ie=io;(Ln&&Ie(new Ln(new ArrayBuffer(1)))!=fo||jn&&Ie(new jn)!=ao||kn&&Ie(kn.resolve())!=oo||qn&&Ie(new qn)!=uo||Vn&&Ie(new Vn)!=so)&&(Ie=function(r){var e=io(r),t=e==pm?r.constructor:void 0,n=t?Ye(t):"";if(n)switch(n){case hm:return fo;case ym:return ao;case dm:return oo;case vm:return uo;case gm:return so}return e});var ut=Ie,Gn=Nn,_m=Xa,mm=I_,wm=Y_,co=ut,lo=C,po=lr.exports,bm=Va,$m=1,ho="[object Arguments]",yo="[object Array]",st="[object Object]",Em=Object.prototype,vo=Em.hasOwnProperty;function Am(r,e,t,n,i,a){var o=lo(r),s=lo(e),f=o?yo:co(r),c=s?yo:co(e);f=f==ho?st:f,c=c==ho?st:c;var l=f==st,u=c==st,p=f==c;if(p&&po(r)){if(!po(e))return!1;o=!0,l=!1}if(p&&!l)return a||(a=new Gn),o||bm(r)?_m(r,e,t,n,i,a):mm(r,e,f,t,n,i,a);if(!(t&$m)){var d=l&&vo.call(r,"__wrapped__"),g=u&&vo.call(e,"__wrapped__");if(d||g){var b=d?r.value():r,E=g?e.value():e;return a||(a=new Gn),i(b,E,t,n,a)}}return p?(a||(a=new Gn),wm(r,e,t,n,i,a)):!1}var Om=Am,Sm=Om,go=H;function _o(r,e,t,n,i){return r===e?!0:r==null||e==null||!go(r)&&!go(e)?r!==r&&e!==e:Sm(r,e,t,n,_o,i)}var mo=_o,Tm=Nn,Im=mo,xm=1,Pm=2;function Fm(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 Tm;if(n)var p=n(c,l,f,r,e,u);if(!(p===void 0?Im(l,c,xm|Pm,n,u):p))return!1}}return!0}var Rm=Fm,Mm=ve;function Dm(r){return r===r&&!Mm(r)}var wo=Dm,Nm=wo,Bm=Ge;function Um(r){for(var e=Bm(r),t=e.length;t--;){var n=e[t],i=r[n];e[t]=[n,i,Nm(i)]}return e}var Cm=Um;function Lm(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var bo=Lm,jm=Rm,km=Cm,qm=bo;function Vm(r){var e=km(r);return e.length==1&&e[0][2]?qm(e[0][0],e[0][1]):function(t){return t===r||jm(t,r,e)}}var Gm=Vm,Hm=ue,Wm=H,zm="[object Symbol]";function Xm(r){return typeof r=="symbol"||Wm(r)&&Hm(r)==zm}var ft=Xm,Ym=C,Km=ft,Zm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jm=/^\w*$/;function Qm(r,e){if(Ym(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||Km(r)?!0:Jm.test(r)||!Zm.test(r)||e!=null&&r in Object(e)}var Hn=Qm,$o=Dn,e0="Expected a function";function Wn(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(e0);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(Wn.Cache||$o),t}Wn.Cache=$o;var r0=Wn,t0=r0,n0=500;function i0(r){var e=t0(r,function(n){return t.size===n0&&t.clear(),n}),t=e.cache;return e}var a0=i0,o0=a0,u0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s0=/\\(\\)?/g,f0=o0(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(u0,function(t,n,i,a){e.push(i?a.replace(s0,"$1"):n||t)}),e}),c0=f0;function l0(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 ct=l0,Eo=qe,p0=ct,h0=C,y0=ft,d0=1/0,Ao=Eo?Eo.prototype:void 0,Oo=Ao?Ao.toString:void 0;function So(r){if(typeof r=="string")return r;if(h0(r))return p0(r,So)+"";if(y0(r))return Oo?Oo.call(r):"";var e=r+"";return e=="0"&&1/r==-d0?"-0":e}var v0=So,g0=v0;function _0(r){return r==null?"":g0(r)}var m0=_0,w0=C,b0=Hn,$0=c0,E0=m0;function A0(r,e){return w0(r)?r:b0(r,e)?[r]:$0(E0(r))}var lt=A0,O0=ft,S0=1/0;function T0(r){if(typeof r=="string"||O0(r))return r;var e=r+"";return e=="0"&&1/r==-S0?"-0":e}var hr=T0,I0=lt,x0=hr;function P0(r,e){e=I0(e,r);for(var t=0,n=e.length;r!=null&&t<n;)r=r[x0(e[t++])];return t&&t==n?r:void 0}var zn=P0,F0=zn;function R0(r,e,t){var n=r==null?void 0:F0(r,e);return n===void 0?t:n}var M0=R0;function D0(r,e){return r!=null&&e in Object(r)}var N0=D0,B0=lt,U0=xn,C0=C,L0=In,j0=Tn,k0=hr;function q0(r,e,t){e=B0(e,r);for(var n=-1,i=e.length,a=!1;++n<i;){var o=k0(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&&j0(i)&&L0(o,i)&&(C0(r)||U0(r)))}var V0=q0,G0=N0,H0=V0;function W0(r,e){return r!=null&&H0(r,e,G0)}var z0=W0,X0=mo,Y0=M0,K0=z0,Z0=Hn,J0=wo,Q0=bo,ew=hr,rw=1,tw=2;function nw(r,e){return Z0(r)&&J0(e)?Q0(ew(r),e):function(t){var n=Y0(t,r);return n===void 0&&n===e?K0(t,r):X0(e,n,rw|tw)}}var iw=nw;function aw(r){return function(e){return e?.[r]}}var ow=aw,uw=zn;function sw(r){return function(e){return uw(e,r)}}var fw=sw,cw=ow,lw=fw,pw=Hn,hw=hr;function yw(r){return pw(r)?cw(hw(r)):lw(r)}var dw=yw,vw=Gm,gw=iw,_w=Qr,mw=C,ww=dw;function bw(r){return typeof r=="function"?r:r==null?_w:typeof r=="object"?mw(r)?gw(r[0],r[1]):vw(r):ww(r)}var To=bw,$w=dd,Ew=zd,Aw=To,Ow=C,Sw=Ua;function Tw(r,e,t){var n=Ow(r)?$w:Ew;return t&&Sw(r,e,t)&&(e=void 0),n(r,Aw(e))}var Xn=Tw;Object.defineProperty(Te,"__esModule",{value:!0}),Te.calculatePadding=Fw,Te.slicePadding=Rw;var Iw=Xn,xw=Pw(Iw);function Pw(r){return r&&r.__esModule?r:{default:r}}function Fw(r){switch(r%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}}function Rw(r,e){var t=r.slice(e),n=(0,xw.default)(t.buffer(),function(i){return i===0});if(n!==!0)throw new Error("XDR Read Error: invalid padding")}Object.defineProperty(rt,"__esModule",{value:!0}),rt.Cursor=void 0;var Mw=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}}(),Dw=Te;function Nw(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Yn=function(){function r(e){Nw(this,r),e instanceof y||(e=typeof e=="number"?y.alloc(e):y.from(e)),this._setBuffer(e),this.rewind()}return Mw(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,Dw.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){Yn.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){Yn.prototype[e]=function(n){return this.buffer()[e](n,this.tell()),this.seek("+",r[0]),this}})}),rt.Cursor=Yn,Object.defineProperty(M,"__esModule",{value:!0}),M.default=qw;var Bw=Sa.exports,Io=Po(Bw),Uw=On,Cw=Po(Uw),xo=rt;function Po(r){return r&&r.__esModule?r:{default:r}}var Lw=Math.pow(2,16),jw={toXDR:function(e){var t=new xo.Cursor(Lw);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 xo.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}}},kw={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 qw(r){(0,Io.default)(r,jw),(0,Cw.default)(r)&&(0,Io.default)(r.prototype,kw)}Object.defineProperty(oe,"__esModule",{value:!0}),oe.Int=void 0;var Vw=Zr,Fo=Ro(Vw),Gw=M,Hw=Ro(Gw);function Ro(r){return r&&r.__esModule?r:{default:r}}var yr=oe.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,Fo.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,Fo.default)(e)||Math.floor(e)!==e?!1:e>=yr.MIN_VALUE&&e<=yr.MAX_VALUE}};yr.MAX_VALUE=Math.pow(2,31)-1,yr.MIN_VALUE=-Math.pow(2,31),(0,Hw.default)(yr);var pt={};function Ww(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 Kn={exports:{}};(function(r){/**
|
|
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]=ye(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)!ye(r,f)||t&&String(Number(f))===f&&f<r.length||Le&&o["$"+f]instanceof Symbol||(Ki.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++)Qi.call(r,a[c])&&n.push("["+e(a[c])+"]: "+e(r[a[c]],r));return n}var yn=jt,je=Bs,Fc=pc,Rc=yn("%TypeError%"),zr=yn("%WeakMap%",!0),Xr=yn("%Map%",!0),Mc=je("WeakMap.prototype.get",!0),Dc=je("WeakMap.prototype.set",!0),Nc=je("WeakMap.prototype.has",!0),Bc=je("Map.prototype.get",!0),Uc=je("Map.prototype.set",!0),Cc=je("Map.prototype.has",!0),dn=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},Lc=function(r,e){var t=dn(r,e);return t&&t.value},jc=function(r,e,t){var n=dn(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},kc=function(r,e){return!!dn(r,e)},qc=function(){var e,t,n,i={assert:function(a){if(!i.has(a))throw new Rc("Side channel does not contain "+Fc(a))},get:function(a){if(zr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Mc(e,a)}else if(Xr){if(t)return Bc(t,a)}else if(n)return Lc(n,a)},has:function(a){if(zr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Nc(e,a)}else if(Xr){if(t)return Cc(t,a)}else if(n)return kc(n,a);return!1},set:function(a,o){zr&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new zr),Dc(e,a,o)):Xr?(t||(t=new Xr),Uc(t,a,o)):(n||(n={key:{},next:null}),jc(n,a,o))}};return i},Vc=String.prototype.replace,Gc=/%20/g,vn={RFC1738:"RFC1738",RFC3986:"RFC3986"},gn={default:vn.RFC3986,formatters:{RFC1738:function(r){return Vc.call(r,Gc,"+")},RFC3986:function(r){return String(r)}},RFC1738:vn.RFC1738,RFC3986:vn.RFC3986},Hc=gn,_n=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}(),Wc=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}}},ca=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},zc=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)||!_n.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=ca(e,n)),Oe(e)&&Oe(t)?(t.forEach(function(a,o){if(_n.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 _n.call(a,o)?a[o]=r(a[o],s,n):a[o]=s,a},i)},Xc=function(e,t){return Object.keys(t).reduce(function(n,i){return n[i]=t[i],n},e)},Yc=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}},Kc=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===Hc.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},Zc=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 Wc(t),e},Jc=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Qc=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},el=function(e,t){return[].concat(e,t)},rl=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)},la={arrayToObject:ca,assign:Xc,combine:el,compact:Zc,decode:Yc,encode:Kc,isBuffer:Qc,isRegExp:Jc,maybeMap:rl,merge:zc},pa=qc,mn=la,ur=gn,tl=Object.prototype.hasOwnProperty,ha={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},ie=Array.isArray,nl=String.prototype.split,il=Array.prototype.push,ya=function(r,e){il.apply(r,ie(e)?e:[e])},al=Date.prototype.toISOString,da=ur.default,U={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:mn.encode,encodeValuesOnly:!1,format:da,formatter:ur.formatters[da],indices:!1,serializeDate:function(e){return al.call(e)},skipNulls:!1,strictNullHandling:!1},ol=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},wn={},ul=function r(e,t,n,i,a,o,s,f,c,l,u,p,d,g,b,E){for(var w=e,T=E,h=0,O=!1;(T=T.get(wn))!==void 0&&!O;){var x=T.get(e);if(h+=1,typeof x<"u"){if(x===h)throw new RangeError("Cyclic object value");O=!0}typeof T.get(wn)>"u"&&(h=0)}if(typeof f=="function"?w=f(t,w):w instanceof Date?w=u(w):n==="comma"&&ie(w)&&(w=mn.maybeMap(w,function(oi){return oi instanceof Date?u(oi):oi})),w===null){if(a)return s&&!g?s(t,U.encoder,b,"key",p):t;w=""}if(ol(w)||mn.isBuffer(w)){if(s){var R=g?t:s(t,U.encoder,b,"key",p);if(n==="comma"&&g){for(var m=nl.call(String(w),","),v="",_=0;_<m.length;++_)v+=(_===0?"":",")+d(s(m[_],U.encoder,b,"value",p));return[d(R)+(i&&ie(w)&&m.length===1?"[]":"")+"="+v]}return[d(R)+"="+d(s(w,U.encoder,b,"value",p))]}return[d(t)+"="+d(String(w))]}var $=[];if(typeof w>"u")return $;var A;if(n==="comma"&&ie(w))A=[{value:w.length>0?w.join(",")||null:void 0}];else if(ie(f))A=f;else{var L=Object.keys(w);A=c?L.sort(c):L}for(var ee=i&&ie(w)&&w.length===1?t+"[]":t,ge=0;ge<A.length;++ge){var fe=A[ge],Ir=typeof fe=="object"&&typeof fe.value<"u"?fe.value:w[fe];if(!(o&&Ir===null)){var L2=ie(w)?typeof n=="function"?n(ee,fe):ee:ee+(l?"."+fe:"["+fe+"]");E.set(e,h);var ns=pa();ns.set(wn,E),ya($,r(Ir,L2,n,i,a,o,s,f,c,l,u,p,d,g,b,ns))}}return $},sl=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=ur.default;if(typeof e.format<"u"){if(!tl.call(ur.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=ur.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}},fl=function(r,e){var t=r,n=sl(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 ha?s=e.arrayFormat:e&&"indices"in e?s=e.indices?"indices":"repeat":s="indices";var f=ha[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=pa(),u=0;u<i.length;++u){var p=i[u];n.skipNulls&&t[p]===null||ya(o,ul(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),g=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),d.length>0?g+d:""},ke=la,bn=Object.prototype.hasOwnProperty,cl=Array.isArray,B={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ke.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},ll=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},va=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},pl="utf8=%26%2310003%3B",hl="utf8=%E2%9C%93",yl=function(e,t){var n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,a),s=-1,f,c=t.charset;if(t.charsetSentinel)for(f=0;f<o.length;++f)o[f].indexOf("utf8=")===0&&(o[f]===hl?c="utf-8":o[f]===pl&&(c="iso-8859-1"),s=f,f=o.length);for(f=0;f<o.length;++f)if(f!==s){var l=o[f],u=l.indexOf("]="),p=u===-1?l.indexOf("="):u+1,d,g;p===-1?(d=t.decoder(l,B.decoder,c,"key"),g=t.strictNullHandling?null:""):(d=t.decoder(l.slice(0,p),B.decoder,c,"key"),g=ke.maybeMap(va(l.slice(p+1),t),function(b){return t.decoder(b,B.decoder,c,"value")})),g&&t.interpretNumericEntities&&c==="iso-8859-1"&&(g=ll(g)),l.indexOf("[]=")>-1&&(g=cl(g)?[g]:g),bn.call(n,d)?n[d]=ke.combine(n[d],g):n[d]=g}return n},dl=function(r,e,t,n){for(var i=n?e:va(e,t),a=r.length-1;a>=0;--a){var o,s=r[a];if(s==="[]"&&t.parseArrays)o=[].concat(i);else{o=t.plainObjects?Object.create(null):{};var f=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=parseInt(f,10);!t.parseArrays&&f===""?o={0:i}:!isNaN(c)&&s!==f&&String(c)===f&&c>=0&&t.parseArrays&&c<=t.arrayLimit?(o=[],o[c]=i):f!=="__proto__"&&(o[f]=i)}i=o}return i},vl=function(e,t,n,i){if(!!e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,f=n.depth>0&&o.exec(a),c=f?a.slice(0,f.index):a,l=[];if(c){if(!n.plainObjects&&bn.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var u=0;n.depth>0&&(f=s.exec(a))!==null&&u<n.depth;){if(u+=1,!n.plainObjects&&bn.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(f[1])}return f&&l.push("["+a.slice(f.index)+"]"),dl(l,t,n,i)}},gl=function(e){if(!e)return B;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?B.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?B.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:B.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:B.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:B.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:B.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:B.comma,decoder:typeof e.decoder=="function"?e.decoder:B.decoder,delimiter:typeof e.delimiter=="string"||ke.isRegExp(e.delimiter)?e.delimiter:B.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:B.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:B.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:B.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:B.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:B.strictNullHandling}},_l=function(r,e){var t=gl(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?yl(r,t):r,i=t.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o){var s=a[o],f=vl(s,n[s],t,typeof r=="string");i=ke.merge(i,f,t)}return t.allowSparse===!0?i:ke.compact(i)},ml=fl,wl=_l,bl=gn,$l={formats:bl,parse:wl,stringify:ml};let ga={storeIdentifier:"",environment:"prod"};function El(r){ga=r}function sr(){return ga}const Al=r=>r==="stage"?"https://api.stage.rechargeapps.com":"https://api.rechargeapps.com",Ol=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",Tl="/tools/recurring";class $n{constructor(e,t){this.name="RechargeRequestError",this.message=e,this.status=t}}var Il=Object.defineProperty,xl=Object.defineProperties,Pl=Object.getOwnPropertyDescriptors,_a=Object.getOwnPropertySymbols,Fl=Object.prototype.hasOwnProperty,Rl=Object.prototype.propertyIsEnumerable,ma=(r,e,t)=>e in r?Il(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Yr=(r,e)=>{for(var t in e||(e={}))Fl.call(e,t)&&ma(r,t,e[t]);if(_a)for(var t of _a(e))Rl.call(e,t)&&ma(r,t,e[t]);return r},Ml=(r,e)=>xl(r,Pl(e));function Dl(r){return $l.stringify(r,{encode:!1,indices:!1,arrayFormat:"comma"})}async function Kr(r,e,t={}){const n=sr();return ae(r,`${Sl(n.environment)}/store/${n.storeIdentifier}${e}`,t)}async function S(r,e,{id:t,query:n,data:i,headers:a}={},o){const{environment:s,storeIdentifier:f,loginRetryFn:c}=sr(),l=o.apiToken,u=Al(s),p=Yr({"X-Recharge-Access-Token":l,"X-Recharge-Version":"2021-11"},a||{}),d=Yr({shop_url:f},n);try{return await ae(r,`${u}${e}`,{id:t,query:d,data:i,headers:p})}catch(g){if(c&&g instanceof $n&&g.status===401)return c().then(b=>{if(b)return ae(r,`${u}${e}`,{id:t,query:d,data:i,headers:Ml(Yr({},p),{"X-Recharge-Access-Token":b.apiToken})});throw g});throw g}}async function En(r,e,t={}){return ae(r,`${Tl}${e}`,t)}async function ae(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,Dl(n)].join("&").replace(/^&/,"");o=`${o}${p?`?${p}`:""}`}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 l;try{l=await c.json()}catch{}if(!c.ok)throw l&&l.error?new $n(l.error,c.status):new $n("A connection error occurred while making the request");return l}function Nl(r,e){return S("get","/addresses",{query:e},r)}async function Bl(r,e){const{address:t}=await S("get","/addresses",{id:e},r);return t}async function Ul(r,e){const{address:t}=await S("post","/addresses",{data:e},r);return t}async function Cl(r,e,t){const{address:n}=await S("put","/addresses",{id:e,data:t},r);return n}async function Ll(r,e,t){const{address:n}=await S("put","/addresses",{id:e,data:{discounts:[{id:t}]}},r);return n}async function jl(r,e){const{address:t}=await S("put","/addresses",{id:e,data:{discounts:[]}},r);return t}function kl(r,e){return S("delete","/addresses",{id:e},r)}async function ql(r,e){const{address:t}=await S("post","/addresses/merge",{data:e},r);return t}async function Vl(r,e,t){const{charge:n}=await S("post",`/addresses/${e}/charges/skip`,{data:t},r);return n}var Gl=Object.freeze({__proto__:null,listAddresses:Nl,getAddress:Bl,createAddress:Ul,updateAddress:Cl,applyDiscountToAddress:Ll,removeDiscountsFromAddress:jl,deleteAddress:kl,mergeAddresses:ql,skipFutureCharge:Vl});async function Hl(){const{storefrontAccessToken:r}=sr(),e={};r&&(e["X-Recharge-Storefront-Access-Token"]=r);const t=await En("get","/access",{headers:e});return{apiToken:t.api_token,customerId:t.customer_id}}async function Wl(r,e){const{environment:t,storeIdentifier:n}=sr(),i=Ol(t),a=await ae("post",`${i}/shopify_storefront_access`,{data:{customer_token:e,storefront_token:r,shop_url:n},headers:{"X-Recharge-App":"storefront-client"}});return a.api_token?{apiToken:a.api_token,customerId:a.customer_id}:null}var zl=Object.freeze({__proto__:null,loginShopifyAppProxy:Hl,loginShopifyApi:Wl}),wa={},An={},oe={},Xl=typeof re=="object"&&re&&re.Object===Object&&re,ba=Xl,Yl=ba,Kl=typeof self=="object"&&self&&self.Object===Object&&self,Zl=Yl||Kl||Function("return this")(),Q=Zl,Jl=Q,Ql=Jl.Symbol,qe=Ql,$a=qe,Ea=Object.prototype,ep=Ea.hasOwnProperty,rp=Ea.toString,fr=$a?$a.toStringTag:void 0;function tp(r){var e=ep.call(r,fr),t=r[fr];try{r[fr]=void 0;var n=!0}catch{}var i=rp.call(r);return n&&(e?r[fr]=t:delete r[fr]),i}var np=tp,ip=Object.prototype,ap=ip.toString;function op(r){return ap.call(r)}var up=op,Aa=qe,sp=np,fp=up,cp="[object Null]",lp="[object Undefined]",Oa=Aa?Aa.toStringTag:void 0;function pp(r){return r==null?r===void 0?lp:cp:Oa&&Oa in Object(r)?sp(r):fp(r)}var ue=pp;function hp(r){return r!=null&&typeof r=="object"}var H=hp,yp=ue,dp=H,vp="[object Number]";function gp(r){return typeof r=="number"||dp(r)&&yp(r)==vp}var Zr=gp,M={},Sa={exports:{}};function _p(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var ve=_p,mp=ue,wp=ve,bp="[object AsyncFunction]",$p="[object Function]",Ep="[object GeneratorFunction]",Ap="[object Proxy]";function Op(r){if(!wp(r))return!1;var e=mp(r);return e==$p||e==Ep||e==bp||e==Ap}var On=Op,Sp=Q,Tp=Sp["__core-js_shared__"],Ip=Tp,Sn=Ip,Ta=function(){var r=/[^.]+$/.exec(Sn&&Sn.keys&&Sn.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function xp(r){return!!Ta&&Ta in r}var Pp=xp,Fp=Function.prototype,Rp=Fp.toString;function Mp(r){if(r!=null){try{return Rp.call(r)}catch{}try{return r+""}catch{}}return""}var Ia=Mp,Dp=On,Np=Pp,Bp=ve,Up=Ia,Cp=/[\\^$.*+?()[\]{}|]/g,Lp=/^\[object .+?Constructor\]$/,jp=Function.prototype,kp=Object.prototype,qp=jp.toString,Vp=kp.hasOwnProperty,Gp=RegExp("^"+qp.call(Vp).replace(Cp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Hp(r){if(!Bp(r)||Np(r))return!1;var e=Dp(r)?Gp:Lp;return e.test(Up(r))}var Wp=Hp;function zp(r,e){return r?.[e]}var Xp=zp,Yp=Wp,Kp=Xp;function Zp(r,e){var t=Kp(r,e);return Yp(t)?t:void 0}var Se=Zp,Jp=Se,Qp=function(){try{var r=Jp(Object,"defineProperty");return r({},"",{}),r}catch{}}(),xa=Qp,Pa=xa;function eh(r,e,t){e=="__proto__"&&Pa?Pa(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var Fa=eh;function rh(r,e){return r===e||r!==r&&e!==e}var Jr=rh,th=Fa,nh=Jr,ih=Object.prototype,ah=ih.hasOwnProperty;function oh(r,e,t){var n=r[e];(!(ah.call(r,e)&&nh(n,t))||t===void 0&&!(e in r))&&th(r,e,t)}var Ra=oh,uh=Ra,sh=Fa;function fh(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?sh(t,s,f):uh(t,s,f)}return t}var Ve=fh;function ch(r){return r}var Qr=ch;function lh(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 ph=lh,hh=ph,Ma=Math.max;function yh(r,e,t){return e=Ma(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,a=Ma(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),hh(r,this,s)}}var Da=yh;function dh(r){return function(){return r}}var vh=dh,gh=vh,Na=xa,_h=Qr,mh=Na?function(r,e){return Na(r,"toString",{configurable:!0,enumerable:!1,value:gh(e),writable:!0})}:_h,wh=mh,bh=800,$h=16,Eh=Date.now;function Ah(r){var e=0,t=0;return function(){var n=Eh(),i=$h-(n-t);if(t=n,i>0){if(++e>=bh)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var Oh=Ah,Sh=wh,Th=Oh,Ih=Th(Sh),Ba=Ih,xh=Qr,Ph=Da,Fh=Ba;function Rh(r,e){return Fh(Ph(r,e,xh),r+"")}var Mh=Rh,Dh=9007199254740991;function Nh(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Dh}var Tn=Nh,Bh=On,Uh=Tn;function Ch(r){return r!=null&&Uh(r.length)&&!Bh(r)}var cr=Ch,Lh=9007199254740991,jh=/^(?:0|[1-9]\d*)$/;function kh(r,e){var t=typeof r;return e=e??Lh,!!e&&(t=="number"||t!="symbol"&&jh.test(r))&&r>-1&&r%1==0&&r<e}var In=kh,qh=Jr,Vh=cr,Gh=In,Hh=ve;function Wh(r,e,t){if(!Hh(t))return!1;var n=typeof e;return(n=="number"?Vh(t)&&Gh(e,t.length):n=="string"&&e in t)?qh(t[e],r):!1}var Ua=Wh,zh=Mh,Xh=Ua;function Yh(r){return zh(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&&Xh(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 Kh=Yh;function Zh(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Ca=Zh,Jh=ue,Qh=H,ey="[object Arguments]";function ry(r){return Qh(r)&&Jh(r)==ey}var ty=ry,La=ty,ny=H,ja=Object.prototype,iy=ja.hasOwnProperty,ay=ja.propertyIsEnumerable,oy=La(function(){return arguments}())?La:function(r){return ny(r)&&iy.call(r,"callee")&&!ay.call(r,"callee")},xn=oy,uy=Array.isArray,C=uy,lr={exports:{}};function sy(){return!1}var fy=sy;(function(r,e){var t=Q,n=fy,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})(lr,lr.exports);var cy=ue,ly=Tn,py=H,hy="[object Arguments]",yy="[object Array]",dy="[object Boolean]",vy="[object Date]",gy="[object Error]",_y="[object Function]",my="[object Map]",wy="[object Number]",by="[object Object]",$y="[object RegExp]",Ey="[object Set]",Ay="[object String]",Oy="[object WeakMap]",Sy="[object ArrayBuffer]",Ty="[object DataView]",Iy="[object Float32Array]",xy="[object Float64Array]",Py="[object Int8Array]",Fy="[object Int16Array]",Ry="[object Int32Array]",My="[object Uint8Array]",Dy="[object Uint8ClampedArray]",Ny="[object Uint16Array]",By="[object Uint32Array]",F={};F[Iy]=F[xy]=F[Py]=F[Fy]=F[Ry]=F[My]=F[Dy]=F[Ny]=F[By]=!0,F[hy]=F[yy]=F[Sy]=F[dy]=F[Ty]=F[vy]=F[gy]=F[_y]=F[my]=F[wy]=F[by]=F[$y]=F[Ey]=F[Ay]=F[Oy]=!1;function Uy(r){return py(r)&&ly(r.length)&&!!F[cy(r)]}var Cy=Uy;function Ly(r){return function(e){return r(e)}}var Pn=Ly,pr={exports:{}};(function(r,e){var t=ba,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})(pr,pr.exports);var jy=Cy,ky=Pn,ka=pr.exports,qa=ka&&ka.isTypedArray,qy=qa?ky(qa):jy,Va=qy,Vy=Ca,Gy=xn,Hy=C,Wy=lr.exports,zy=In,Xy=Va,Yy=Object.prototype,Ky=Yy.hasOwnProperty;function Zy(r,e){var t=Hy(r),n=!t&&Gy(r),i=!t&&!n&&Wy(r),a=!t&&!n&&!i&&Xy(r),o=t||n||i||a,s=o?Vy(r.length,String):[],f=s.length;for(var c in r)(e||Ky.call(r,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||zy(c,f)))&&s.push(c);return s}var Ga=Zy,Jy=Object.prototype;function Qy(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Jy;return r===t}var Fn=Qy;function ed(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var rd=ed,td=ve,nd=Fn,id=rd,ad=Object.prototype,od=ad.hasOwnProperty;function ud(r){if(!td(r))return id(r);var e=nd(r),t=[];for(var n in r)n=="constructor"&&(e||!od.call(r,n))||t.push(n);return t}var sd=ud,fd=Ga,cd=sd,ld=cr;function pd(r){return ld(r)?fd(r,!0):cd(r)}var et=pd,hd=Ve,yd=Kh,dd=et,vd=yd(function(r,e){hd(e,dd(e),r)}),gd=vd;(function(r){r.exports=gd})(Sa);var rt={},Te={};function _d(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 md=_d;function wd(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 bd=wd,$d=bd,Ed=$d(),Ad=Ed;function Od(r,e){return function(t){return r(e(t))}}var Ha=Od,Sd=Ha,Td=Sd(Object.keys,Object),Id=Td,xd=Fn,Pd=Id,Fd=Object.prototype,Rd=Fd.hasOwnProperty;function Md(r){if(!xd(r))return Pd(r);var e=[];for(var t in Object(r))Rd.call(r,t)&&t!="constructor"&&e.push(t);return e}var Dd=Md,Nd=Ga,Bd=Dd,Ud=cr;function Cd(r){return Ud(r)?Nd(r):Bd(r)}var Ge=Cd,Ld=Ad,jd=Ge;function kd(r,e){return r&&Ld(r,e,jd)}var qd=kd,Vd=cr;function Gd(r,e){return function(t,n){if(t==null)return t;if(!Vd(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 Hd=Gd,Wd=qd,zd=Hd,Xd=zd(Wd),Rn=Xd,Yd=Rn;function Kd(r,e){var t=!0;return Yd(r,function(n,i,a){return t=!!e(n,i,a),t}),t}var Zd=Kd;function Jd(){this.__data__=[],this.size=0}var Qd=Jd,ev=Jr;function rv(r,e){for(var t=r.length;t--;)if(ev(r[t][0],e))return t;return-1}var tt=rv,tv=tt,nv=Array.prototype,iv=nv.splice;function av(r){var e=this.__data__,t=tv(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():iv.call(e,t,1),--this.size,!0}var ov=av,uv=tt;function sv(r){var e=this.__data__,t=uv(e,r);return t<0?void 0:e[t][1]}var fv=sv,cv=tt;function lv(r){return cv(this.__data__,r)>-1}var pv=lv,hv=tt;function yv(r,e){var t=this.__data__,n=hv(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var dv=yv,vv=Qd,gv=ov,_v=fv,mv=pv,wv=dv;function He(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])}}He.prototype.clear=vv,He.prototype.delete=gv,He.prototype.get=_v,He.prototype.has=mv,He.prototype.set=wv;var nt=He,bv=nt;function $v(){this.__data__=new bv,this.size=0}var Ev=$v;function Av(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var Ov=Av;function Sv(r){return this.__data__.get(r)}var Tv=Sv;function Iv(r){return this.__data__.has(r)}var xv=Iv,Pv=Se,Fv=Q,Rv=Pv(Fv,"Map"),Mn=Rv,Mv=Se,Dv=Mv(Object,"create"),it=Dv,Wa=it;function Nv(){this.__data__=Wa?Wa(null):{},this.size=0}var Bv=Nv;function Uv(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var Cv=Uv,Lv=it,jv="__lodash_hash_undefined__",kv=Object.prototype,qv=kv.hasOwnProperty;function Vv(r){var e=this.__data__;if(Lv){var t=e[r];return t===jv?void 0:t}return qv.call(e,r)?e[r]:void 0}var Gv=Vv,Hv=it,Wv=Object.prototype,zv=Wv.hasOwnProperty;function Xv(r){var e=this.__data__;return Hv?e[r]!==void 0:zv.call(e,r)}var Yv=Xv,Kv=it,Zv="__lodash_hash_undefined__";function Jv(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Kv&&e===void 0?Zv:e,this}var Qv=Jv,eg=Bv,rg=Cv,tg=Gv,ng=Yv,ig=Qv;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=eg,We.prototype.delete=rg,We.prototype.get=tg,We.prototype.has=ng,We.prototype.set=ig;var ag=We,za=ag,og=nt,ug=Mn;function sg(){this.size=0,this.__data__={hash:new za,map:new(ug||og),string:new za}}var fg=sg;function cg(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var lg=cg,pg=lg;function hg(r,e){var t=r.__data__;return pg(e)?t[typeof e=="string"?"string":"hash"]:t.map}var at=hg,yg=at;function dg(r){var e=yg(this,r).delete(r);return this.size-=e?1:0,e}var vg=dg,gg=at;function _g(r){return gg(this,r).get(r)}var mg=_g,wg=at;function bg(r){return wg(this,r).has(r)}var $g=bg,Eg=at;function Ag(r,e){var t=Eg(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var Og=Ag,Sg=fg,Tg=vg,Ig=mg,xg=$g,Pg=Og;function ze(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])}}ze.prototype.clear=Sg,ze.prototype.delete=Tg,ze.prototype.get=Ig,ze.prototype.has=xg,ze.prototype.set=Pg;var Dn=ze,Fg=nt,Rg=Mn,Mg=Dn,Dg=200;function Ng(r,e){var t=this.__data__;if(t instanceof Fg){var n=t.__data__;if(!Rg||n.length<Dg-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Mg(n)}return t.set(r,e),this.size=t.size,this}var Bg=Ng,Ug=nt,Cg=Ev,Lg=Ov,jg=Tv,kg=xv,qg=Bg;function Xe(r){var e=this.__data__=new Ug(r);this.size=e.size}Xe.prototype.clear=Cg,Xe.prototype.delete=Lg,Xe.prototype.get=jg,Xe.prototype.has=kg,Xe.prototype.set=qg;var Nn=Xe,Vg="__lodash_hash_undefined__";function Gg(r){return this.__data__.set(r,Vg),this}var Hg=Gg;function Wg(r){return this.__data__.has(r)}var zg=Wg,Xg=Dn,Yg=Hg,Kg=zg;function ot(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Xg;++e<t;)this.add(r[e])}ot.prototype.add=ot.prototype.push=Yg,ot.prototype.has=Kg;var Zg=ot;function Jg(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 Qg=Jg;function e_(r,e){return r.has(e)}var r_=e_,t_=Zg,n_=Qg,i_=r_,a_=1,o_=2;function u_(r,e,t,n,i,a){var o=t&a_,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&o_?new t_:void 0;for(a.set(r,e),a.set(e,r);++u<s;){var g=r[u],b=e[u];if(n)var E=o?n(b,g,u,e,r,a):n(g,b,u,r,e,a);if(E!==void 0){if(E)continue;p=!1;break}if(d){if(!n_(e,function(w,T){if(!i_(d,T)&&(g===w||i(g,w,t,n,a)))return d.push(T)})){p=!1;break}}else if(!(g===b||i(g,b,t,n,a))){p=!1;break}}return a.delete(r),a.delete(e),p}var Xa=u_,s_=Q,f_=s_.Uint8Array,Ya=f_;function c_(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}var l_=c_;function p_(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var h_=p_,Ka=qe,Za=Ya,y_=Jr,d_=Xa,v_=l_,g_=h_,__=1,m_=2,w_="[object Boolean]",b_="[object Date]",$_="[object Error]",E_="[object Map]",A_="[object Number]",O_="[object RegExp]",S_="[object Set]",T_="[object String]",I_="[object Symbol]",x_="[object ArrayBuffer]",P_="[object DataView]",Ja=Ka?Ka.prototype:void 0,Bn=Ja?Ja.valueOf:void 0;function F_(r,e,t,n,i,a,o){switch(t){case P_:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case x_:return!(r.byteLength!=e.byteLength||!a(new Za(r),new Za(e)));case w_:case b_:case A_:return y_(+r,+e);case $_:return r.name==e.name&&r.message==e.message;case O_:case T_:return r==e+"";case E_:var s=v_;case S_:var f=n&__;if(s||(s=g_),r.size!=e.size&&!f)return!1;var c=o.get(r);if(c)return c==e;n|=m_,o.set(r,e);var l=d_(s(r),s(e),n,i,a,o);return o.delete(r),l;case I_:if(Bn)return Bn.call(r)==Bn.call(e)}return!1}var R_=F_;function M_(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var Un=M_,D_=Un,N_=C;function B_(r,e,t){var n=e(r);return N_(r)?n:D_(n,t(r))}var Qa=B_;function U_(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 C_=U_;function L_(){return[]}var eo=L_,j_=C_,k_=eo,q_=Object.prototype,V_=q_.propertyIsEnumerable,ro=Object.getOwnPropertySymbols,G_=ro?function(r){return r==null?[]:(r=Object(r),j_(ro(r),function(e){return V_.call(r,e)}))}:k_,Cn=G_,H_=Qa,W_=Cn,z_=Ge;function X_(r){return H_(r,z_,W_)}var to=X_,no=to,Y_=1,K_=Object.prototype,Z_=K_.hasOwnProperty;function J_(r,e,t,n,i,a){var o=t&Y_,s=no(r),f=s.length,c=no(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),g=a.get(e);if(d&&g)return d==e&&g==r;var b=!0;a.set(r,e),a.set(e,r);for(var E=o;++u<f;){p=s[u];var w=r[p],T=e[p];if(n)var h=o?n(T,w,p,e,r,a):n(w,T,p,r,e,a);if(!(h===void 0?w===T||i(w,T,t,n,a):h)){b=!1;break}E||(E=p=="constructor")}if(b&&!E){var O=r.constructor,x=e.constructor;O!=x&&"constructor"in r&&"constructor"in e&&!(typeof O=="function"&&O instanceof O&&typeof x=="function"&&x instanceof x)&&(b=!1)}return a.delete(r),a.delete(e),b}var Q_=J_,em=Se,rm=Q,tm=em(rm,"DataView"),nm=tm,im=Se,am=Q,om=im(am,"Promise"),um=om,sm=Se,fm=Q,cm=sm(fm,"Set"),lm=cm,pm=Se,hm=Q,ym=pm(hm,"WeakMap"),dm=ym,Ln=nm,jn=Mn,kn=um,qn=lm,Vn=dm,io=ue,Ye=Ia,ao="[object Map]",vm="[object Object]",oo="[object Promise]",uo="[object Set]",so="[object WeakMap]",fo="[object DataView]",gm=Ye(Ln),_m=Ye(jn),mm=Ye(kn),wm=Ye(qn),bm=Ye(Vn),Ie=io;(Ln&&Ie(new Ln(new ArrayBuffer(1)))!=fo||jn&&Ie(new jn)!=ao||kn&&Ie(kn.resolve())!=oo||qn&&Ie(new qn)!=uo||Vn&&Ie(new Vn)!=so)&&(Ie=function(r){var e=io(r),t=e==vm?r.constructor:void 0,n=t?Ye(t):"";if(n)switch(n){case gm:return fo;case _m:return ao;case mm:return oo;case wm:return uo;case bm:return so}return e});var ut=Ie,Gn=Nn,$m=Xa,Em=R_,Am=Q_,co=ut,lo=C,po=lr.exports,Om=Va,Sm=1,ho="[object Arguments]",yo="[object Array]",st="[object Object]",Tm=Object.prototype,vo=Tm.hasOwnProperty;function Im(r,e,t,n,i,a){var o=lo(r),s=lo(e),f=o?yo:co(r),c=s?yo:co(e);f=f==ho?st:f,c=c==ho?st:c;var l=f==st,u=c==st,p=f==c;if(p&&po(r)){if(!po(e))return!1;o=!0,l=!1}if(p&&!l)return a||(a=new Gn),o||Om(r)?$m(r,e,t,n,i,a):Em(r,e,f,t,n,i,a);if(!(t&Sm)){var d=l&&vo.call(r,"__wrapped__"),g=u&&vo.call(e,"__wrapped__");if(d||g){var b=d?r.value():r,E=g?e.value():e;return a||(a=new Gn),i(b,E,t,n,a)}}return p?(a||(a=new Gn),Am(r,e,t,n,i,a)):!1}var xm=Im,Pm=xm,go=H;function _o(r,e,t,n,i){return r===e?!0:r==null||e==null||!go(r)&&!go(e)?r!==r&&e!==e:Pm(r,e,t,n,_o,i)}var mo=_o,Fm=Nn,Rm=mo,Mm=1,Dm=2;function Nm(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 Fm;if(n)var p=n(c,l,f,r,e,u);if(!(p===void 0?Rm(l,c,Mm|Dm,n,u):p))return!1}}return!0}var Bm=Nm,Um=ve;function Cm(r){return r===r&&!Um(r)}var wo=Cm,Lm=wo,jm=Ge;function km(r){for(var e=jm(r),t=e.length;t--;){var n=e[t],i=r[n];e[t]=[n,i,Lm(i)]}return e}var qm=km;function Vm(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var bo=Vm,Gm=Bm,Hm=qm,Wm=bo;function zm(r){var e=Hm(r);return e.length==1&&e[0][2]?Wm(e[0][0],e[0][1]):function(t){return t===r||Gm(t,r,e)}}var Xm=zm,Ym=ue,Km=H,Zm="[object Symbol]";function Jm(r){return typeof r=="symbol"||Km(r)&&Ym(r)==Zm}var ft=Jm,Qm=C,e0=ft,r0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,t0=/^\w*$/;function n0(r,e){if(Qm(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||e0(r)?!0:t0.test(r)||!r0.test(r)||e!=null&&r in Object(e)}var Hn=n0,$o=Dn,i0="Expected a function";function Wn(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(i0);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(Wn.Cache||$o),t}Wn.Cache=$o;var a0=Wn,o0=a0,u0=500;function s0(r){var e=o0(r,function(n){return t.size===u0&&t.clear(),n}),t=e.cache;return e}var f0=s0,c0=f0,l0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p0=/\\(\\)?/g,h0=c0(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(l0,function(t,n,i,a){e.push(i?a.replace(p0,"$1"):n||t)}),e}),y0=h0;function d0(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 ct=d0,Eo=qe,v0=ct,g0=C,_0=ft,m0=1/0,Ao=Eo?Eo.prototype:void 0,Oo=Ao?Ao.toString:void 0;function So(r){if(typeof r=="string")return r;if(g0(r))return v0(r,So)+"";if(_0(r))return Oo?Oo.call(r):"";var e=r+"";return e=="0"&&1/r==-m0?"-0":e}var w0=So,b0=w0;function $0(r){return r==null?"":b0(r)}var E0=$0,A0=C,O0=Hn,S0=y0,T0=E0;function I0(r,e){return A0(r)?r:O0(r,e)?[r]:S0(T0(r))}var lt=I0,x0=ft,P0=1/0;function F0(r){if(typeof r=="string"||x0(r))return r;var e=r+"";return e=="0"&&1/r==-P0?"-0":e}var hr=F0,R0=lt,M0=hr;function D0(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 zn=D0,N0=zn;function B0(r,e,t){var n=r==null?void 0:N0(r,e);return n===void 0?t:n}var U0=B0;function C0(r,e){return r!=null&&e in Object(r)}var L0=C0,j0=lt,k0=xn,q0=C,V0=In,G0=Tn,H0=hr;function W0(r,e,t){e=j0(e,r);for(var n=-1,i=e.length,a=!1;++n<i;){var o=H0(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&&G0(i)&&V0(o,i)&&(q0(r)||k0(r)))}var z0=W0,X0=L0,Y0=z0;function K0(r,e){return r!=null&&Y0(r,e,X0)}var Z0=K0,J0=mo,Q0=U0,ew=Z0,rw=Hn,tw=wo,nw=bo,iw=hr,aw=1,ow=2;function uw(r,e){return rw(r)&&tw(e)?nw(iw(r),e):function(t){var n=Q0(t,r);return n===void 0&&n===e?ew(t,r):J0(e,n,aw|ow)}}var sw=uw;function fw(r){return function(e){return e?.[r]}}var cw=fw,lw=zn;function pw(r){return function(e){return lw(e,r)}}var hw=pw,yw=cw,dw=hw,vw=Hn,gw=hr;function _w(r){return vw(r)?yw(gw(r)):dw(r)}var mw=_w,ww=Xm,bw=sw,$w=Qr,Ew=C,Aw=mw;function Ow(r){return typeof r=="function"?r:r==null?$w:typeof r=="object"?Ew(r)?bw(r[0],r[1]):ww(r):Aw(r)}var To=Ow,Sw=md,Tw=Zd,Iw=To,xw=C,Pw=Ua;function Fw(r,e,t){var n=xw(r)?Sw:Tw;return t&&Pw(r,e,t)&&(e=void 0),n(r,Iw(e))}var Xn=Fw;Object.defineProperty(Te,"__esModule",{value:!0}),Te.calculatePadding=Nw,Te.slicePadding=Bw;var Rw=Xn,Mw=Dw(Rw);function Dw(r){return r&&r.__esModule?r:{default:r}}function Nw(r){switch(r%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}}function Bw(r,e){var t=r.slice(e),n=(0,Mw.default)(t.buffer(),function(i){return i===0});if(n!==!0)throw new Error("XDR Read Error: invalid padding")}Object.defineProperty(rt,"__esModule",{value:!0}),rt.Cursor=void 0;var Uw=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}}(),Cw=Te;function Lw(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Yn=function(){function r(e){Lw(this,r),e instanceof y||(e=typeof e=="number"?y.alloc(e):y.from(e)),this._setBuffer(e),this.rewind()}return Uw(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,Cw.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){Yn.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){Yn.prototype[e]=function(n){return this.buffer()[e](n,this.tell()),this.seek("+",r[0]),this}})}),rt.Cursor=Yn,Object.defineProperty(M,"__esModule",{value:!0}),M.default=Ww;var jw=Sa.exports,Io=Po(jw),kw=On,qw=Po(kw),xo=rt;function Po(r){return r&&r.__esModule?r:{default:r}}var Vw=Math.pow(2,16),Gw={toXDR:function(e){var t=new xo.Cursor(Vw);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 xo.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}}},Hw={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 Ww(r){(0,Io.default)(r,Gw),(0,qw.default)(r)&&(0,Io.default)(r.prototype,Hw)}Object.defineProperty(oe,"__esModule",{value:!0}),oe.Int=void 0;var zw=Zr,Fo=Ro(zw),Xw=M,Yw=Ro(Xw);function Ro(r){return r&&r.__esModule?r:{default:r}}var yr=oe.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,Fo.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,Fo.default)(e)||Math.floor(e)!==e?!1:e>=yr.MIN_VALUE&&e<=yr.MAX_VALUE}};yr.MAX_VALUE=Math.pow(2,31)-1,yr.MIN_VALUE=-Math.pow(2,31),(0,Yw.default)(yr);var pt={};function Kw(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 Kn={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 Ww=="function"&&!0&&r&&r.exports?r.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t()})(re,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,g;return p?(u=u>>>0,0<=u&&u<256&&(g=n[u],g)?g:(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&&(g=t[u],g)?g:(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 g;if((g=u.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+u);if(g===0)return e.fromString(u.substring(1),p,d).negate();for(var b=e.fromNumber(Math.pow(d,8)),E=e.ZERO,w=0;w<u.length;w+=8){var S=Math.min(8,u.length-w),h=parseInt(u.substring(w,w+S),d);if(S<8){var O=e.fromNumber(Math.pow(d,S));E=E.multiply(O).add(e.fromNumber(h))}else E=E.multiply(b),E=E.add(e.fromNumber(h))}return E.unsigned=p,E},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),g=this.divide(d);return p=g.multiply(d).subtract(this),g.toString(u)+p.toInt().toString(u)}else return"-"+this.negate().toString(u);var b=e.fromNumber(Math.pow(u,6),this.unsigned);p=this;for(var E="";;){var w=p.divide(b),S=p.subtract(w.multiply(b)).toInt()>>>0,h=S.toString(u);if(p=w,p.isZero())return h+E;for(;h.length<6;)h="0"+h;E=""+h+E}},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,g=this.low>>>16,b=this.low&65535,E=u.high>>>16,w=u.high&65535,S=u.low>>>16,h=u.low&65535,O=0,x=0,R=0,m=0;return m+=b+h,R+=m>>>16,m&=65535,R+=g+S,x+=R>>>16,R&=65535,x+=d+w,O+=x>>>16,x&=65535,O+=p+E,O&=65535,e.fromBits(R<<16|m,O<<16|x,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,g=this.low>>>16,b=this.low&65535,E=u.high>>>16,w=u.high&65535,S=u.low>>>16,h=u.low&65535,O=0,x=0,R=0,m=0;return m+=b*h,R+=m>>>16,m&=65535,R+=g*h,x+=R>>>16,R&=65535,R+=b*S,x+=R>>>16,R&=65535,x+=d*h,O+=x>>>16,x&=65535,x+=g*S,O+=x>>>16,x&=65535,x+=b*w,O+=x>>>16,x&=65535,O+=p*h+d*S+g*w+b*E,O&=65535,e.fromBits(R<<16|m,O<<16|x,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,g;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 b=this.shiftRight(1);return p=b.divide(u).shiftLeft(1),p.equals(e.ZERO)?u.isNegative()?e.ONE:e.NEG_ONE:(d=this.subtract(u.multiply(p)),g=p.add(d.divide(u)),g)}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(g=e.ZERO,d=this;d.greaterThanOrEqual(u);){p=Math.max(1,Math.floor(d.toNumber()/u.toNumber()));for(var E=Math.ceil(Math.log(p)/Math.LN2),w=E<=48?1:Math.pow(2,E-48),S=e.fromNumber(p),h=S.multiply(u);h.isNegative()||h.greaterThan(d);)p-=w,S=e.fromNumber(p,this.unsigned),h=S.multiply(u);S.isZero()&&(S=e.ONE),g=g.add(S),d=d.subtract(h)}return g},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})})(Kn),Object.defineProperty(pt,"__esModule",{value:!0}),pt.Hyper=void 0;var zw=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}}(),Mo=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)}},Xw=Kn.exports,dr=Do(Xw),Yw=M,Kw=Do(Yw);function Do(r){return r&&r.__esModule?r:{default:r}}function Zw(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Jw(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 Qw(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=pt.Hyper=function(r){Qw(e,r),zw(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=Mo(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=Mo(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 Zw(this,e),Jw(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!1))}return e}(dr.default);(0,Kw.default)(vr),vr.MAX_VALUE=new vr(dr.default.MAX_VALUE.low,dr.default.MAX_VALUE.high),vr.MIN_VALUE=new vr(dr.default.MIN_VALUE.low,dr.default.MIN_VALUE.high);var xe={};Object.defineProperty(xe,"__esModule",{value:!0}),xe.UnsignedInt=void 0;var eb=Zr,No=Bo(eb),rb=M,tb=Bo(rb);function Bo(r){return r&&r.__esModule?r:{default:r}}var gr=xe.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,No.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,No.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,tb.default)(gr);var ht={};Object.defineProperty(ht,"__esModule",{value:!0}),ht.UnsignedHyper=void 0;var nb=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}}(),Uo=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)}},ib=Kn.exports,_r=Co(ib),ab=M,ob=Co(ab);function Co(r){return r&&r.__esModule?r:{default:r}}function ub(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function sb(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 fb(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=ht.UnsignedHyper=function(r){fb(e,r),nb(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=Uo(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=Uo(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 ub(this,e),sb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!0))}return e}(_r.default);(0,ob.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 yt={};Object.defineProperty(yt,"__esModule",{value:!0}),yt.Float=void 0;var cb=Zr,Lo=jo(cb),lb=M,pb=jo(lb);function jo(r){return r&&r.__esModule?r:{default:r}}var hb=yt.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,Lo.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,Lo.default)(e)}};(0,pb.default)(hb);var dt={};Object.defineProperty(dt,"__esModule",{value:!0}),dt.Double=void 0;var yb=Zr,ko=qo(yb),db=M,vb=qo(db);function qo(r){return r&&r.__esModule?r:{default:r}}var gb=dt.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,ko.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,ko.default)(e)}};(0,vb.default)(gb);var vt={};Object.defineProperty(vt,"__esModule",{value:!0}),vt.Quadruple=void 0;var _b=M,mb=wb(_b);function wb(r){return r&&r.__esModule?r:{default:r}}var bb=vt.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,mb.default)(bb);var wr={},$b=ue,Eb=H,Ab="[object Boolean]";function Ob(r){return r===!0||r===!1||Eb(r)&&$b(r)==Ab}var Sb=Ob;Object.defineProperty(wr,"__esModule",{value:!0}),wr.Bool=void 0;var Tb=Sb,Ib=Go(Tb),Vo=oe,xb=M,Pb=Go(xb);function Go(r){return r&&r.__esModule?r:{default:r}}var Fb=wr.Bool={read:function(e){var t=Vo.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 Vo.Int.write(n,t)},isValid:function(e){return(0,Ib.default)(e)}};(0,Pb.default)(Fb);var gt={},Rb=ue,Mb=C,Db=H,Nb="[object String]";function Bb(r){return typeof r=="string"||!Mb(r)&&Db(r)&&Rb(r)==Nb}var Ho=Bb;Object.defineProperty(gt,"__esModule",{value:!0}),gt.String=void 0;var Ub=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}}(),Cb=Ho,Wo=Zn(Cb),Lb=C,jb=Zn(Lb),zo=oe,kb=xe,Xo=Te,qb=M,Vb=Zn(qb);function Zn(r){return r&&r.__esModule?r:{default:r}}function Gb(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Hb=gt.String=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kb.UnsignedInt.MAX_VALUE;Gb(this,r),this._maxLength=e}return Ub(r,[{key:"read",value:function(t){var n=zo.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,Xo.calculatePadding)(n),a=t.slice(n);return(0,Xo.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,Wo.default)(t)?i=y.from(t,"utf8"):i=y.from(t),zo.Int.write(i.length,n),n.writeBufferPadded(i)}},{key:"isValid",value:function(t){var n=void 0;if((0,Wo.default)(t))n=y.from(t,"utf8");else if((0,jb.default)(t)||y.isBuffer(t))n=y.from(t);else return!1;return n.length<=this._maxLength}}]),r}();(0,Vb.default)(Hb.prototype);var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.Opaque=void 0;var Wb=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Yo=Te,zb=M,Xb=Yb(zb);function Yb(r){return r&&r.__esModule?r:{default:r}}function Kb(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Zb=_t.Opaque=function(){function r(e){Kb(this,r),this._length=e,this._padding=(0,Yo.calculatePadding)(e)}return Wb(r,[{key:"read",value:function(t){var n=t.slice(this._length);return(0,Yo.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,Xb.default)(Zb.prototype);var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.VarOpaque=void 0;var Jb=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=oe,Qb=xe,Zo=Te,e1=M,r1=t1(e1);function t1(r){return r&&r.__esModule?r:{default:r}}function n1(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var i1=mt.VarOpaque=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qb.UnsignedInt.MAX_VALUE;n1(this,r),this._maxLength=e}return Jb(r,[{key:"read",value:function(t){var n=Ko.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,Zo.calculatePadding)(n),a=t.slice(n);return(0,Zo.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));Ko.Int.write(t.length,n),n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length<=this._maxLength}}]),r}();(0,r1.default)(i1.prototype);var wt={},Pe={exports:{}};function a1(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var Jo=a1,o1=Qr;function u1(r){return typeof r=="function"?r:o1}var Qo=u1,s1=Jo,f1=Rn,c1=Qo,l1=C;function p1(r,e){var t=l1(r)?s1:f1;return t(r,c1(e))}var h1=p1;(function(r){r.exports=h1})(Pe);var y1=/\s/;function d1(r){for(var e=r.length;e--&&y1.test(r.charAt(e)););return e}var v1=d1,g1=v1,_1=/^\s+/;function m1(r){return r&&r.slice(0,g1(r)+1).replace(_1,"")}var w1=m1,b1=w1,eu=ve,$1=ft,ru=0/0,E1=/^[-+]0x[0-9a-f]+$/i,A1=/^0b[01]+$/i,O1=/^0o[0-7]+$/i,S1=parseInt;function T1(r){if(typeof r=="number")return r;if($1(r))return ru;if(eu(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=eu(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=b1(r);var t=A1.test(r);return t||O1.test(r)?S1(r.slice(2),t?2:8):E1.test(r)?ru:+r}var I1=T1,x1=I1,tu=1/0,P1=17976931348623157e292;function F1(r){if(!r)return r===0?r:0;if(r=x1(r),r===tu||r===-tu){var e=r<0?-1:1;return e*P1}return r===r?r:0}var R1=F1,M1=R1;function D1(r){var e=M1(r),t=e%1;return e===e?t?e-t:e:0}var N1=D1,B1=Ca,U1=Qo,C1=N1,L1=9007199254740991,Jn=4294967295,j1=Math.min;function k1(r,e){if(r=C1(r),r<1||r>L1)return[];var t=Jn,n=j1(r,Jn);e=U1(e),r-=Jn;for(var i=B1(n,e);++t<r;)e(t);return i}var nu=k1;Object.defineProperty(wt,"__esModule",{value:!0}),wt.Array=void 0;var q1=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}}(),V1=Xn,G1=br(V1),H1=Pe.exports,W1=br(H1),z1=nu,X1=br(z1),Y1=C,iu=br(Y1),K1=M,Z1=br(K1);function br(r){return r&&r.__esModule?r:{default:r}}function J1(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Q1=wt.Array=function(){function r(e,t){J1(this,r),this._childType=e,this._length=t}return q1(r,[{key:"read",value:function(t){var n=this;return(0,X1.default)(this._length,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,iu.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,W1.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,iu.default)(t)||t.length!==this._length?!1:(0,G1.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,Z1.default)(Q1.prototype);var bt={};Object.defineProperty(bt,"__esModule",{value:!0}),bt.VarArray=void 0;var e$=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}}(),r$=Xn,t$=$r(r$),n$=Pe.exports,i$=$r(n$),a$=nu,o$=$r(a$),u$=C,au=$r(u$),s$=xe,ou=oe,f$=M,c$=$r(f$);function $r(r){return r&&r.__esModule?r:{default:r}}function l$(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var p$=bt.VarArray=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s$.UnsignedInt.MAX_VALUE;l$(this,r),this._childType=e,this._maxLength=t}return e$(r,[{key:"read",value:function(t){var n=this,i=ou.Int.read(t);if(i>this._maxLength)throw new Error("XDR Read Error: Saw "+i+" length VarArray,"+("max allowed is "+this._maxLength));return(0,o$.default)(i,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,au.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));ou.Int.write(t.length,n),(0,i$.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,au.default)(t)||t.length>this._maxLength?!1:(0,t$.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,c$.default)(p$.prototype);var $t={};function h$(r){return r===null}var y$=h$;function d$(r){return r===void 0}var Er=d$;Object.defineProperty($t,"__esModule",{value:!0}),$t.Option=void 0;var v$=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}}(),g$=y$,uu=Qn(g$),_$=Er,su=Qn(_$),fu=wr,m$=M,w$=Qn(m$);function Qn(r){return r&&r.__esModule?r:{default:r}}function b$(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var $$=$t.Option=function(){function r(e){b$(this,r),this._childType=e}return v$(r,[{key:"read",value:function(t){if(fu.Bool.read(t))return this._childType.read(t)}},{key:"write",value:function(t,n){var i=!((0,uu.default)(t)||(0,su.default)(t));fu.Bool.write(i,n),i&&this._childType.write(t,n)}},{key:"isValid",value:function(t){return(0,uu.default)(t)||(0,su.default)(t)?!0:this._childType.isValid(t)}}]),r}();(0,w$.default)($$.prototype);var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.Void=void 0;var E$=Er,cu=lu(E$),A$=M,O$=lu(A$);function lu(r){return r&&r.__esModule?r:{default:r}}var S$=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,O$.default)(S$);var Et={},T$=ct;function I$(r,e){return T$(e,function(t){return r[t]})}var x$=I$,P$=x$,F$=Ge;function R$(r){return r==null?[]:P$(r,F$(r))}var M$=R$;Object.defineProperty(Et,"__esModule",{value:!0}),Et.Enum=void 0;var D$=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}}(),N$=Pe.exports,B$=ei(N$),U$=M$,C$=ei(U$),pu=oe,L$=M,j$=ei(L$);function ei(r){return r&&r.__esModule?r:{default:r}}function k$(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 q$(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 V$=Et.Enum=function(){function r(e,t){hu(this,r),this.name=e,this.value=t}return D$(r,null,[{key:"read",value:function(t){var n=pu.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);pu.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,C$.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){q$(s,o);function s(){return hu(this,s),k$(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,B$.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,j$.default)(V$);var At={},G$=Rn,H$=cr;function W$(r,e){var t=-1,n=H$(r)?Array(r.length):[];return G$(r,function(i,a,o){n[++t]=e(i,a,o)}),n}var z$=W$,X$=ct,Y$=To,K$=z$,Z$=C;function J$(r,e){var t=Z$(r)?X$:K$;return t(r,Y$(e))}var Q$=J$;function eE(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 rE=eE,Or={};Object.defineProperty(Or,"__esModule",{value:!0});var tE=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 nE(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}Or.Reference=function(){function r(){nE(this,r)}return tE(r,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),r}(),Object.defineProperty(At,"__esModule",{value:!0}),At.Struct=void 0;var Ot=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")}}(),iE=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}}(),aE=Pe.exports,yu=Sr(aE),oE=Q$,uE=Sr(oE),sE=Er,fE=Sr(sE),cE=rE,lE=Sr(cE),pE=Or,hE=M,yE=Sr(hE);function Sr(r){return r&&r.__esModule?r:{default:r}}function dE(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)}function du(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var gE=At.Struct=function(){function r(e){du(this,r),this._attributes=e||{}}return iE(r,null,[{key:"read",value:function(t){var n=(0,uE.default)(this._fields,function(i){var a=Ot(i,2),o=a[0],s=a[1],f=s.read(t);return[o,f]});return new this((0,lE.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,yu.default)(this._fields,function(i){var a=Ot(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){vE(s,o);function s(){return du(this,s),dE(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=Ot(o,2),f=s[0],c=s[1];return c instanceof pE.Reference&&(c=c.resolve(t)),[f,c]}),(0,yu.default)(a._fields,function(o){var s=Ot(o,1),f=s[0];a.prototype[f]=_E(f)}),a}}]),r}();(0,yE.default)(gE);function _E(r){return function(t){return(0,fE.default)(t)||(this._attributes[r]=t),this._attributes[r]}}var St={};Object.defineProperty(St,"__esModule",{value:!0}),St.Union=void 0;var mE=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")}}(),wE=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}}(),bE=Pe.exports,Tt=xt(bE),$E=Er,vu=xt($E),EE=Ho,gu=xt(EE),It=Ar,ri=Or,AE=M,OE=xt(AE);function xt(r){return r&&r.__esModule?r:{default:r}}function SE(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 TE(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 _u(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var IE=St.Union=function(){function r(e,t){_u(this,r),this.set(e,t)}return wE(r,[{key:"set",value:function(t,n){(0,gu.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!==It.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===It.Void?It.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,vu.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){TE(f,s);function f(){return _u(this,f),SE(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);a.unionName=n,t.results[n]=a,i.switchOn instanceof ri.Reference?a._switchOn=i.switchOn.resolve(t):a._switchOn=i.switchOn,a._switches=new Map,a._arms={},(0,Tt.default)(i.arms,function(s,f){s instanceof ri.Reference&&(s=s.resolve(t)),a._arms[f]=s});var o=i.defaultArm;return o instanceof ri.Reference&&(o=o.resolve(t)),a._defaultArm=o,(0,Tt.default)(i.switches,function(s){var f=mE(s,2),c=f[0],l=f[1];(0,gu.default)(c)&&(c=a._switchOn.fromName(c)),a._switches.set(c,l)}),(0,vu.default)(a._switchOn.values)||(0,Tt.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,Tt.default)(a._arms,function(s,f){s!==It.Void&&(a.prototype[f]=function(){return this.get(f)})}),a}}]),r}();(0,OE.default)(IE),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=oe;Object.keys(e).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return e[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]}})});var n=xe;Object.keys(n).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return n[h]}})});var i=ht;Object.keys(i).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return i[h]}})});var a=yt;Object.keys(a).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return a[h]}})});var o=dt;Object.keys(o).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return o[h]}})});var s=vt;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=gt;Object.keys(c).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return c[h]}})});var l=_t;Object.keys(l).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return l[h]}})});var u=mt;Object.keys(u).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return u[h]}})});var p=wt;Object.keys(p).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return p[h]}})});var d=bt;Object.keys(d).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return d[h]}})});var g=$t;Object.keys(g).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return g[h]}})});var b=Ar;Object.keys(b).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return b[h]}})});var E=Et;Object.keys(E).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return E[h]}})});var w=At;Object.keys(w).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return w[h]}})});var S=St;Object.keys(S).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return S[h]}})})}(An);var mu={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function m(v,_){for(var $=0;$<_.length;$++){var A=_[$];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}return function(v,_,$){return _&&m(v.prototype,_),$&&m(v,$),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=g;var n=Er,i=l(n),a=Pe.exports,o=l(a),s=An,f=c(s);function c(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var _ in m)Object.prototype.hasOwnProperty.call(m,_)&&(v[_]=m[_]);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 g(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(m){var _=new R(v);m(_),_.resolve()}return v}var b=function(m){d(v,m);function v(_){u(this,v);var $=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return $.name=_,$}return e(v,[{key:"resolve",value:function($){var A=$.definitions[this.name];return A.resolve($)}}]),v}(t.Reference),E=function(m){d(v,m);function v(_,$){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;u(this,v);var L=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return L.childReference=_,L.length=$,L.variable=A,L}return e(v,[{key:"resolve",value:function($){var A=this.childReference,L=this.length;return A instanceof t.Reference&&(A=A.resolve($)),L instanceof t.Reference&&(L=L.resolve($)),this.variable?new f.VarArray(A,L):new f.Array(A,L)}}]),v}(t.Reference),w=function(m){d(v,m);function v(_){u(this,v);var $=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return $.childReference=_,$.name=_.name,$}return e(v,[{key:"resolve",value:function($){var A=this.childReference;return A instanceof t.Reference&&(A=A.resolve($)),new f.Option(A)}}]),v}(t.Reference),S=function(m){d(v,m);function v(_,$){u(this,v);var A=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return A.sizedType=_,A.length=$,A}return e(v,[{key:"resolve",value:function($){var A=this.length;return A instanceof t.Reference&&(A=A.resolve($)),new this.sizedType(A)}}]),v}(t.Reference),h=function(){function m(v,_,$){u(this,m),this.constructor=v,this.name=_,this.config=$}return e(m,[{key:"resolve",value:function(_){return this.name in _.results?_.results[this.name]:this.constructor(_,this.name,this.config)}}]),m}();function O(m,v,_){return _ instanceof t.Reference&&(_=_.resolve(m)),m.results[v]=_,_}function x(m,v,_){return m.results[v]=_,_}var R=function(){function m(v){u(this,m),this._destination=v,this._definitions={}}return e(m,[{key:"enum",value:function(_,$){var A=new h(f.Enum.create,_,$);this.define(_,A)}},{key:"struct",value:function(_,$){var A=new h(f.Struct.create,_,$);this.define(_,A)}},{key:"union",value:function(_,$){var A=new h(f.Union.create,_,$);this.define(_,A)}},{key:"typedef",value:function(_,$){var A=new h(O,_,$);this.define(_,A)}},{key:"const",value:function(_,$){var A=new h(x,_,$);this.define(_,A)}},{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(_){return new S(f.String,_)}},{key:"opaque",value:function(_){return new S(f.Opaque,_)}},{key:"varOpaque",value:function(_){return new S(f.VarOpaque,_)}},{key:"array",value:function(_,$){return new E(_,$)}},{key:"varArray",value:function(_,$){return new E(_,$,!0)}},{key:"option",value:function(_){return new w(_)}},{key:"define",value:function(_,$){if((0,i.default)(this._destination[_]))this._definitions[_]=$;else throw new Error("XDRTypes Error:"+_+" is already defined")}},{key:"lookup",value:function(_){return new b(_)}},{key:"resolve",value:function(){var _=this;(0,o.default)(this._definitions,function($){$.resolve({definitions:_._definitions,results:_._destination})})}}]),m}()})(mu),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=An;Object.keys(e).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[n]}})});var t=mu;Object.keys(t).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})}(wa);const xE=wa.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")}})}),se=xE;function PE(r){let 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)};const t=new se.Bundle(e);return se.BundleEnvelope.envelopeTypeBundle(t).toXDR("base64")}let FE=(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),"");var RE=Ve,ME=Ge;function DE(r,e){return r&&RE(e,ME(e),r)}var NE=DE,BE=Ve,UE=et;function CE(r,e){return r&&BE(e,UE(e),r)}var LE=CE,ti={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,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})(ti,ti.exports);function jE(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var kE=jE,qE=Ve,VE=Cn;function GE(r,e){return qE(r,VE(r),e)}var HE=GE,WE=Ha,zE=WE(Object.getPrototypeOf,Object),ni=zE,XE=Un,YE=ni,KE=Cn,ZE=eo,JE=Object.getOwnPropertySymbols,QE=JE?function(r){for(var e=[];r;)XE(e,KE(r)),r=YE(r);return e}:ZE,wu=QE,eA=Ve,rA=wu;function tA(r,e){return eA(r,rA(r),e)}var nA=tA,iA=Qa,aA=wu,oA=et;function uA(r){return iA(r,oA,aA)}var bu=uA,sA=Object.prototype,fA=sA.hasOwnProperty;function cA(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&fA.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var lA=cA,$u=Ya;function pA(r){var e=new r.constructor(r.byteLength);return new $u(e).set(new $u(r)),e}var ii=pA,hA=ii;function yA(r,e){var t=e?hA(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var dA=yA,vA=/\w*$/;function gA(r){var e=new r.constructor(r.source,vA.exec(r));return e.lastIndex=r.lastIndex,e}var _A=gA,Eu=qe,Au=Eu?Eu.prototype:void 0,Ou=Au?Au.valueOf:void 0;function mA(r){return Ou?Object(Ou.call(r)):{}}var wA=mA,bA=ii;function $A(r,e){var t=e?bA(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var EA=$A,AA=ii,OA=dA,SA=_A,TA=wA,IA=EA,xA="[object Boolean]",PA="[object Date]",FA="[object Map]",RA="[object Number]",MA="[object RegExp]",DA="[object Set]",NA="[object String]",BA="[object Symbol]",UA="[object ArrayBuffer]",CA="[object DataView]",LA="[object Float32Array]",jA="[object Float64Array]",kA="[object Int8Array]",qA="[object Int16Array]",VA="[object Int32Array]",GA="[object Uint8Array]",HA="[object Uint8ClampedArray]",WA="[object Uint16Array]",zA="[object Uint32Array]";function XA(r,e,t){var n=r.constructor;switch(e){case UA:return AA(r);case xA:case PA:return new n(+r);case CA:return OA(r,t);case LA:case jA:case kA:case qA:case VA:case GA:case HA:case WA:case zA:return IA(r,t);case FA:return new n;case RA:case NA:return new n(r);case MA:return SA(r);case DA:return new n;case BA:return TA(r)}}var YA=XA,KA=ve,Su=Object.create,ZA=function(){function r(){}return function(e){if(!KA(e))return{};if(Su)return Su(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),JA=ZA,QA=JA,eO=ni,rO=Fn;function tO(r){return typeof r.constructor=="function"&&!rO(r)?QA(eO(r)):{}}var nO=tO,iO=ut,aO=H,oO="[object Map]";function uO(r){return aO(r)&&iO(r)==oO}var sO=uO,fO=sO,cO=Pn,Tu=pr.exports,Iu=Tu&&Tu.isMap,lO=Iu?cO(Iu):fO,pO=lO,hO=ut,yO=H,dO="[object Set]";function vO(r){return yO(r)&&hO(r)==dO}var gO=vO,_O=gO,mO=Pn,xu=pr.exports,Pu=xu&&xu.isSet,wO=Pu?mO(Pu):_O,bO=wO,$O=Nn,EO=Jo,AO=Ra,OO=NE,SO=LE,TO=ti.exports,IO=kE,xO=HE,PO=nA,FO=to,RO=bu,MO=ut,DO=lA,NO=YA,BO=nO,UO=C,CO=lr.exports,LO=pO,jO=ve,kO=bO,qO=Ge,VO=et,GO=1,HO=2,WO=4,Fu="[object Arguments]",zO="[object Array]",XO="[object Boolean]",YO="[object Date]",KO="[object Error]",Ru="[object Function]",ZO="[object GeneratorFunction]",JO="[object Map]",QO="[object Number]",Mu="[object Object]",eS="[object RegExp]",rS="[object Set]",tS="[object String]",nS="[object Symbol]",iS="[object WeakMap]",aS="[object ArrayBuffer]",oS="[object DataView]",uS="[object Float32Array]",sS="[object Float64Array]",fS="[object Int8Array]",cS="[object Int16Array]",lS="[object Int32Array]",pS="[object Uint8Array]",hS="[object Uint8ClampedArray]",yS="[object Uint16Array]",dS="[object Uint32Array]",P={};P[Fu]=P[zO]=P[aS]=P[oS]=P[XO]=P[YO]=P[uS]=P[sS]=P[fS]=P[cS]=P[lS]=P[JO]=P[QO]=P[Mu]=P[eS]=P[rS]=P[tS]=P[nS]=P[pS]=P[hS]=P[yS]=P[dS]=!0,P[KO]=P[Ru]=P[iS]=!1;function Pt(r,e,t,n,i,a){var o,s=e&GO,f=e&HO,c=e&WO;if(t&&(o=i?t(r,n,i,a):t(r)),o!==void 0)return o;if(!jO(r))return r;var l=UO(r);if(l){if(o=DO(r),!s)return IO(r,o)}else{var u=MO(r),p=u==Ru||u==ZO;if(CO(r))return TO(r,s);if(u==Mu||u==Fu||p&&!i){if(o=f||p?{}:BO(r),!s)return f?PO(r,SO(o,r)):xO(r,OO(o,r))}else{if(!P[u])return i?r:{};o=NO(r,u,s)}}a||(a=new $O);var d=a.get(r);if(d)return d;a.set(r,o),kO(r)?r.forEach(function(E){o.add(Pt(E,e,t,E,r,a))}):LO(r)&&r.forEach(function(E,w){o.set(w,Pt(E,e,t,w,r,a))});var g=c?f?RO:FO:f?VO:qO,b=l?void 0:g(r);return EO(b||r,function(E,w){b&&(w=E,E=r[w]),AO(o,w,Pt(E,e,t,w,r,a))}),o}var vS=Pt;function gS(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var _S=gS;function mS(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 wS=mS,bS=zn,$S=wS;function ES(r,e){return e.length<2?r:bS(r,$S(e,0,-1))}var AS=ES,OS=lt,SS=_S,TS=AS,IS=hr;function xS(r,e){return e=OS(e,r),r=TS(r,e),r==null||delete r[IS(SS(e))]}var PS=xS,FS=ue,RS=ni,MS=H,DS="[object Object]",NS=Function.prototype,BS=Object.prototype,Du=NS.toString,US=BS.hasOwnProperty,CS=Du.call(Object);function LS(r){if(!MS(r)||FS(r)!=DS)return!1;var e=RS(r);if(e===null)return!0;var t=US.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Du.call(t)==CS}var jS=LS,kS=jS;function qS(r){return kS(r)?void 0:r}var VS=qS,Nu=qe,GS=xn,HS=C,Bu=Nu?Nu.isConcatSpreadable:void 0;function WS(r){return HS(r)||GS(r)||!!(Bu&&r&&r[Bu])}var zS=WS,XS=Un,YS=zS;function Uu(r,e,t,n,i){var a=-1,o=r.length;for(t||(t=YS),i||(i=[]);++a<o;){var s=r[a];e>0&&t(s)?e>1?Uu(s,e-1,t,n,i):XS(i,s):n||(i[i.length]=s)}return i}var KS=Uu,ZS=KS;function JS(r){var e=r==null?0:r.length;return e?ZS(r,1):[]}var QS=JS,eT=QS,rT=Da,tT=Ba;function nT(r){return tT(rT(r,void 0,eT),r+"")}var iT=nT,aT=ct,oT=vS,uT=PS,sT=lt,fT=Ve,cT=VS,lT=iT,pT=bu,hT=1,yT=2,dT=4,vT=lT(function(r,e){var t={};if(r==null)return t;var n=!1;e=aT(e,function(a){return a=sT(a,r),n||(n=a.length>1),a}),fT(r,pT(r),t),n&&(t=oT(t,hT|yT|dT,cT));for(var i=e.length;i--;)uT(t,e[i]);return t}),gT=vT,_T=Object.defineProperty,mT=Object.defineProperties,wT=Object.getOwnPropertyDescriptors,Cu=Object.getOwnPropertySymbols,bT=Object.prototype.hasOwnProperty,$T=Object.prototype.propertyIsEnumerable,Lu=(r,e,t)=>e in r?_T(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ET=(r,e)=>{for(var t in e||(e={}))bT.call(e,t)&&Lu(r,t,e[t]);if(Cu)for(var t of Cu(e))$T.call(e,t)&&Lu(r,t,e[t]);return r},AT=(r,e)=>mT(r,wT(e));function OT(r){try{return JSON.parse(r)}catch{return r}}function ST(r){return Object.entries(r).reduce((e,[t,n])=>AT(ET({},e),{[t]:OT(n)}),{})}var TT=Object.defineProperty,IT=Object.defineProperties,xT=Object.getOwnPropertyDescriptors,ju=Object.getOwnPropertySymbols,PT=Object.prototype.hasOwnProperty,FT=Object.prototype.propertyIsEnumerable,ku=(r,e,t)=>e in r?TT(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,qu=(r,e)=>{for(var t in e||(e={}))PT.call(e,t)&&ku(r,t,e[t]);if(ju)for(var t of ju(e))FT.call(e,t)&&ku(r,t,e[t]);return r},Vu=(r,e)=>IT(r,xT(e));function Gu(r){var e;const t=ST(r),n=t.auto_inject===void 0?!0:t.auto_inject,i=(e=t.display_on)!=null?e:[],a=t.first_option==="autodeliver";return Vu(qu({},gT(t,["display_on","first_option"])),{auto_inject:n,valid_pages:i,is_subscription_first:a,autoInject:n,validPages:i,isSubscriptionFirst:a})}function Hu(r){var e;const t=((e=r.subscription_options)==null?void 0:e.storefront_purchase_options)==="subscription_only";return Vu(qu({},r),{is_subscription_only:t,isSubscriptionOnly:t})}function RT(r){return r.map(e=>{const t={};return Object.entries(e).forEach(([n,i])=>{t[n]=Hu(i)}),t})}const Ft="2020-12",MT={store_currency:{currency_code:"USD",currency_symbol:"$",decimal_separator:".",thousands_separator:",",currency_symbol_location:"left"}},Tr=new Map;function Rt(r,e){return Tr.has(r)||Tr.set(r,e()),Tr.get(r)}async function ai(r){const{product:e}=await Rt(`product.${r}`,()=>Kr("get",`/product/${Ft}/${r}.json`));return Hu(e)}async function Wu(){return await Rt("storeSettings",()=>Kr("get",`/${Ft}/store_settings.json`).catch(()=>MT))}async function zu(){const{widget_settings:r}=await Rt("widgetSettings",()=>Kr("get",`/${Ft}/widget_settings.json`));return Gu(r)}async function Xu(){const{products:r,widget_settings:e,store_settings:t,meta:n}=await Rt("productsAndSettings",()=>Kr("get",`/product/${Ft}/products.json`));return n?.status==="error"?Promise.reject(n.message):{products:RT(r),widget_settings:Gu(e),store_settings:t??{}}}async function DT(){const{products:r}=await Xu();return r}async function NT(r){const[e,t,n]=await Promise.all([ai(r),Wu(),zu()]);return{product:e,store_settings:t,widget_settings:n,storeSettings:t,widgetSettings:n}}async function Yu(r){const{bundle_product:e}=await ai(r);return e}async function Ku(){return Array.from(Tr.keys()).forEach(r=>Tr.delete(r))}var BT=Object.freeze({__proto__:null,getCDNProduct:ai,getCDNStoreSettings:Wu,getCDNWidgetSettings:zu,getCDNProductsAndSettings:Xu,getCDNProducts:DT,getCDNProductAndSettings:NT,getCDNBundleSettings:Yu,resetCDNCache:Ku});const Zu="/bundling-storefront-manager";function UT(){return Math.ceil(Date.now()/1e3)}async function CT(){try{const{timestamp:r}=await En("get",`${Zu}/t`,{headers:{"X-Recharge-App":"storefront-client"}});return r}catch(r){return console.error(`Fetch failed: ${r}. Using client-side date.`),UT()}}async function LT(r){const e=sr();if(!await Ju(r))throw new Error("Bundle is invalid.");const t=await CT(),n=PE({variantId:r.externalVariantId,version:t,items:r.selections.map(i=>({collectionId:i.collectionId,productId:i.externalProductId,variantId:i.externalVariantId,quantity:i.quantity,sku:""}))});try{const i=await En("post",`${Zu}/api/v1/bundles`,{data:{bundle:n},headers:{Origin:`https://${e.storeIdentifier}`}});if(!i.id||i.code!==200)throw new Error(`1: failed generating rb_id: ${JSON.stringify(i)}`);return i.id}catch(i){throw new Error(`2: failed generating rb_id ${i}`)}}function jT(r,e){const t=Qu(r);if(t!==!0)throw new Error(`Dynamic Bundle is invalid. ${t}`);const n=`${FE(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 Ju(r){try{const e=await Yu(r.externalProductId);return!!r&&!!e}catch{return console.error("Error fetching bundle settings"),!1}}const kT={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 Qu(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=kT[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}var qT=Object.freeze({__proto__:null,getBundleId:LT,getDynamicBundleItems:jT,validateBundle:Ju,validateDynamicBundle:Qu});async function VT(r,e){const{charge:t}=await T("get","/charges",{id:e},r);return t}function GT(r,e){return T("get","/charges",{query:e},r)}async function HT(r,e,t){const{charge:n}=await T("post",`/charges/${e}/apply_discount`,{data:t},r);return n}async function WT(r,e){const{charge:t}=await T("post",`/charges/${e}/remove_discount`,{},r);return t}async function zT(r,e){const{charge:t}=await T("post",`/charges/${e}/skip`,{},r);return t}async function XT(r,e){const{charge:t}=await T("post",`/charges/${e}/unskip`,{},r);return t}async function YT(r,e){const{charge:t}=await T("post",`/charges/${e}/process`,{},r);return t}var KT=Object.freeze({__proto__:null,getCharge:VT,listCharges:GT,applyDiscount:HT,removeDiscount:WT,skipCharge:zT,unskipCharge:XT,processCharge:YT});async function ZT(r,e){const{membership:t}=await T("get","/memberships",{id:e},r);return t}function JT(r,e){return T("get","/memberships",{query:e},r)}async function QT(r,e,t){const{membership:n}=await T("post",`/memberships/${e}/cancel`,{data:t},r);return n}async function e2(r,e,t){const{membership:n}=await T("post",`/memberships/${e}/activate`,{data:t},r);return n}var r2=Object.freeze({__proto__:null,getMembership:ZT,listMemberships:JT,cancelMembership:QT,activateMembership:e2});async function t2(r,e){const{onetime:t}=await T("get","/onetimes",{id:e},r);return t}function n2(r,e){return T("get","/onetimes",{query:e},r)}async function i2(r,e){const{onetime:t}=await T("post","/onetimes",{data:e},r);return t}async function a2(r,e,t){const{onetime:n}=await T("put","/onetimes",{id:e,data:t},r);return n}function o2(r,e){return T("delete","/onetime",{id:e},r)}var u2=Object.freeze({__proto__:null,getOnetime:t2,listOnetimes:n2,createOnetime:i2,updateOnetime:a2,deleteOnetime:o2});async function s2(r,e){const{order:t}=await T("get","/orders",{id:e},r);return t}function f2(r,e){return T("get","/orders",{query:e},r)}var c2=Object.freeze({__proto__:null,getOrder:s2,listOrders:f2});async function l2(r,e){const{payment_method:t}=await T("get","/payment_methods",{id:e},r);return t}async function p2(r,e,t){const{payment_method:n}=await T("put","/payment_methods",{id:e,data:t},r);return n}function h2(r,e){return T("get","/payment_methods",{query:e},r)}var y2=Object.freeze({__proto__:null,getPaymentMethod:l2,updatePaymentMethod:p2,listPaymentMethods:h2});async function d2(r,e){const{plan:t}=await T("get","/plans",{id:e},r);return t}function v2(r,e){return T("get","/plans",{query:e},r)}var g2=Object.freeze({__proto__:null,getPlan:d2,listPlans:v2});async function _2(r,e){const{subscription:t}=await T("get","/subscriptions",{id:e},r);return t}function m2(r,e){return T("get","/subscriptions",{query:e},r)}async function w2(r,e){const{subscription:t}=await T("post","/subscriptions",{data:e},r);return t}async function b2(r,e,t,n){const{subscription:i}=await T("put","/subscriptions",{id:e,data:t,query:n},r);return i}async function $2(r,e,t){const{subscription:n}=await T("post",`/subscriptions/${e}/set_next_charge_date`,{data:{date:t}},r);return n}async function E2(r,e,t){const{subscription:n}=await T("post",`/subscriptions/${e}/change_address`,{data:{address_id:t}},r);return n}async function A2(r,e,t){const{subscription:n}=await T("post",`/subscriptions/${e}/cancel`,{data:t},r);return n}async function O2(r,e){const{subscription:t}=await T("post",`/subscriptions/${e}/activate`,{},r);return t}async function S2(r,e,t){const{charge:n}=await T("post",`/subscriptions/${e}/charges/skip`,{data:{date:t,subscription_id:`${e}`}},r);return n}var T2=Object.freeze({__proto__:null,getSubscription:_2,listSubscriptions:m2,createSubscription:w2,updateSubscription:b2,updateSubscriptionChargeDate:$2,updateSubscriptionAddress:E2,cancelSubscription:A2,activateSubscription:O2,skipSubscriptionCharge:S2});async function I2(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{customer:n}=await T("get","/customers",{id:t,query:{include:e?.include}},r);return n}async function x2(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{customer:n}=await T("put","/customers",{id:t,data:e},r);return n}async function P2(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{deliveries:n}=await T("get",`/customers/${t}/delivery_schedule`,{query:e},r);return n}var F2=Object.freeze({__proto__:null,getCustomer:I2,updateCustomer:x2,getDeliverySchedule:P2});const R2={get(r,e){return ae("get",r,e)},post(r,e){return ae("post",r,e)},put(r,e){return ae("put",r,e)},delete(r,e){return ae("delete",r,e)}};function M2(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 D2(r={}){const e=r;bl({storeIdentifier:M2(r.storeIdentifier),loginRetryFn:r.loginRetryFn,storefrontAccessToken:r.storefrontAccessToken,environment:e.environment?e.environment:"prod"}),Ku()}const es={init:D2,api:R2,address:jl,auth:Vl,bundle:qT,charge:KT,cdn:BT,customer:F2,membership:r2,onetime:u2,order:c2,paymentMethod:y2,plan:g2,subscription:T2};try{es.init()}catch{}return es});
|
|
28
|
+
*/(function(e,t){typeof Kw=="function"&&!0&&r&&r.exports?r.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t()})(re,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,g;return p?(u=u>>>0,0<=u&&u<256&&(g=n[u],g)?g:(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&&(g=t[u],g)?g:(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 g;if((g=u.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+u);if(g===0)return e.fromString(u.substring(1),p,d).negate();for(var b=e.fromNumber(Math.pow(d,8)),E=e.ZERO,w=0;w<u.length;w+=8){var T=Math.min(8,u.length-w),h=parseInt(u.substring(w,w+T),d);if(T<8){var O=e.fromNumber(Math.pow(d,T));E=E.multiply(O).add(e.fromNumber(h))}else E=E.multiply(b),E=E.add(e.fromNumber(h))}return E.unsigned=p,E},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),g=this.divide(d);return p=g.multiply(d).subtract(this),g.toString(u)+p.toInt().toString(u)}else return"-"+this.negate().toString(u);var b=e.fromNumber(Math.pow(u,6),this.unsigned);p=this;for(var E="";;){var w=p.divide(b),T=p.subtract(w.multiply(b)).toInt()>>>0,h=T.toString(u);if(p=w,p.isZero())return h+E;for(;h.length<6;)h="0"+h;E=""+h+E}},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,g=this.low>>>16,b=this.low&65535,E=u.high>>>16,w=u.high&65535,T=u.low>>>16,h=u.low&65535,O=0,x=0,R=0,m=0;return m+=b+h,R+=m>>>16,m&=65535,R+=g+T,x+=R>>>16,R&=65535,x+=d+w,O+=x>>>16,x&=65535,O+=p+E,O&=65535,e.fromBits(R<<16|m,O<<16|x,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,g=this.low>>>16,b=this.low&65535,E=u.high>>>16,w=u.high&65535,T=u.low>>>16,h=u.low&65535,O=0,x=0,R=0,m=0;return m+=b*h,R+=m>>>16,m&=65535,R+=g*h,x+=R>>>16,R&=65535,R+=b*T,x+=R>>>16,R&=65535,x+=d*h,O+=x>>>16,x&=65535,x+=g*T,O+=x>>>16,x&=65535,x+=b*w,O+=x>>>16,x&=65535,O+=p*h+d*T+g*w+b*E,O&=65535,e.fromBits(R<<16|m,O<<16|x,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,g;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 b=this.shiftRight(1);return p=b.divide(u).shiftLeft(1),p.equals(e.ZERO)?u.isNegative()?e.ONE:e.NEG_ONE:(d=this.subtract(u.multiply(p)),g=p.add(d.divide(u)),g)}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(g=e.ZERO,d=this;d.greaterThanOrEqual(u);){p=Math.max(1,Math.floor(d.toNumber()/u.toNumber()));for(var E=Math.ceil(Math.log(p)/Math.LN2),w=E<=48?1:Math.pow(2,E-48),T=e.fromNumber(p),h=T.multiply(u);h.isNegative()||h.greaterThan(d);)p-=w,T=e.fromNumber(p,this.unsigned),h=T.multiply(u);T.isZero()&&(T=e.ONE),g=g.add(T),d=d.subtract(h)}return g},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})})(Kn),Object.defineProperty(pt,"__esModule",{value:!0}),pt.Hyper=void 0;var Zw=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}}(),Mo=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)}},Jw=Kn.exports,dr=Do(Jw),Qw=M,eb=Do(Qw);function Do(r){return r&&r.__esModule?r:{default:r}}function rb(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function tb(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 nb(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=pt.Hyper=function(r){nb(e,r),Zw(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=Mo(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=Mo(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 rb(this,e),tb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!1))}return e}(dr.default);(0,eb.default)(vr),vr.MAX_VALUE=new vr(dr.default.MAX_VALUE.low,dr.default.MAX_VALUE.high),vr.MIN_VALUE=new vr(dr.default.MIN_VALUE.low,dr.default.MIN_VALUE.high);var xe={};Object.defineProperty(xe,"__esModule",{value:!0}),xe.UnsignedInt=void 0;var ib=Zr,No=Bo(ib),ab=M,ob=Bo(ab);function Bo(r){return r&&r.__esModule?r:{default:r}}var gr=xe.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,No.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,No.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,ob.default)(gr);var ht={};Object.defineProperty(ht,"__esModule",{value:!0}),ht.UnsignedHyper=void 0;var ub=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}}(),Uo=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)}},sb=Kn.exports,_r=Co(sb),fb=M,cb=Co(fb);function Co(r){return r&&r.__esModule?r:{default:r}}function lb(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function pb(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 hb(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=ht.UnsignedHyper=function(r){hb(e,r),ub(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=Uo(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=Uo(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 lb(this,e),pb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!0))}return e}(_r.default);(0,cb.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 yt={};Object.defineProperty(yt,"__esModule",{value:!0}),yt.Float=void 0;var yb=Zr,Lo=jo(yb),db=M,vb=jo(db);function jo(r){return r&&r.__esModule?r:{default:r}}var gb=yt.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,Lo.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,Lo.default)(e)}};(0,vb.default)(gb);var dt={};Object.defineProperty(dt,"__esModule",{value:!0}),dt.Double=void 0;var _b=Zr,ko=qo(_b),mb=M,wb=qo(mb);function qo(r){return r&&r.__esModule?r:{default:r}}var bb=dt.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,ko.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,ko.default)(e)}};(0,wb.default)(bb);var vt={};Object.defineProperty(vt,"__esModule",{value:!0}),vt.Quadruple=void 0;var $b=M,Eb=Ab($b);function Ab(r){return r&&r.__esModule?r:{default:r}}var Ob=vt.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,Eb.default)(Ob);var wr={},Sb=ue,Tb=H,Ib="[object Boolean]";function xb(r){return r===!0||r===!1||Tb(r)&&Sb(r)==Ib}var Pb=xb;Object.defineProperty(wr,"__esModule",{value:!0}),wr.Bool=void 0;var Fb=Pb,Rb=Go(Fb),Vo=oe,Mb=M,Db=Go(Mb);function Go(r){return r&&r.__esModule?r:{default:r}}var Nb=wr.Bool={read:function(e){var t=Vo.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 Vo.Int.write(n,t)},isValid:function(e){return(0,Rb.default)(e)}};(0,Db.default)(Nb);var gt={},Bb=ue,Ub=C,Cb=H,Lb="[object String]";function jb(r){return typeof r=="string"||!Ub(r)&&Cb(r)&&Bb(r)==Lb}var Ho=jb;Object.defineProperty(gt,"__esModule",{value:!0}),gt.String=void 0;var kb=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}}(),qb=Ho,Wo=Zn(qb),Vb=C,Gb=Zn(Vb),zo=oe,Hb=xe,Xo=Te,Wb=M,zb=Zn(Wb);function Zn(r){return r&&r.__esModule?r:{default:r}}function Xb(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Yb=gt.String=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hb.UnsignedInt.MAX_VALUE;Xb(this,r),this._maxLength=e}return kb(r,[{key:"read",value:function(t){var n=zo.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,Xo.calculatePadding)(n),a=t.slice(n);return(0,Xo.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,Wo.default)(t)?i=y.from(t,"utf8"):i=y.from(t),zo.Int.write(i.length,n),n.writeBufferPadded(i)}},{key:"isValid",value:function(t){var n=void 0;if((0,Wo.default)(t))n=y.from(t,"utf8");else if((0,Gb.default)(t)||y.isBuffer(t))n=y.from(t);else return!1;return n.length<=this._maxLength}}]),r}();(0,zb.default)(Yb.prototype);var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.Opaque=void 0;var Kb=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Yo=Te,Zb=M,Jb=Qb(Zb);function Qb(r){return r&&r.__esModule?r:{default:r}}function e1(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var r1=_t.Opaque=function(){function r(e){e1(this,r),this._length=e,this._padding=(0,Yo.calculatePadding)(e)}return Kb(r,[{key:"read",value:function(t){var n=t.slice(this._length);return(0,Yo.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,Jb.default)(r1.prototype);var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.VarOpaque=void 0;var t1=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=oe,n1=xe,Zo=Te,i1=M,a1=o1(i1);function o1(r){return r&&r.__esModule?r:{default:r}}function u1(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var s1=mt.VarOpaque=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n1.UnsignedInt.MAX_VALUE;u1(this,r),this._maxLength=e}return t1(r,[{key:"read",value:function(t){var n=Ko.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,Zo.calculatePadding)(n),a=t.slice(n);return(0,Zo.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));Ko.Int.write(t.length,n),n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length<=this._maxLength}}]),r}();(0,a1.default)(s1.prototype);var wt={},Pe={exports:{}};function f1(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var Jo=f1,c1=Qr;function l1(r){return typeof r=="function"?r:c1}var Qo=l1,p1=Jo,h1=Rn,y1=Qo,d1=C;function v1(r,e){var t=d1(r)?p1:h1;return t(r,y1(e))}var g1=v1;(function(r){r.exports=g1})(Pe);var _1=/\s/;function m1(r){for(var e=r.length;e--&&_1.test(r.charAt(e)););return e}var w1=m1,b1=w1,$1=/^\s+/;function E1(r){return r&&r.slice(0,b1(r)+1).replace($1,"")}var A1=E1,O1=A1,eu=ve,S1=ft,ru=0/0,T1=/^[-+]0x[0-9a-f]+$/i,I1=/^0b[01]+$/i,x1=/^0o[0-7]+$/i,P1=parseInt;function F1(r){if(typeof r=="number")return r;if(S1(r))return ru;if(eu(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=eu(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=O1(r);var t=I1.test(r);return t||x1.test(r)?P1(r.slice(2),t?2:8):T1.test(r)?ru:+r}var R1=F1,M1=R1,tu=1/0,D1=17976931348623157e292;function N1(r){if(!r)return r===0?r:0;if(r=M1(r),r===tu||r===-tu){var e=r<0?-1:1;return e*D1}return r===r?r:0}var B1=N1,U1=B1;function C1(r){var e=U1(r),t=e%1;return e===e?t?e-t:e:0}var L1=C1,j1=Ca,k1=Qo,q1=L1,V1=9007199254740991,Jn=4294967295,G1=Math.min;function H1(r,e){if(r=q1(r),r<1||r>V1)return[];var t=Jn,n=G1(r,Jn);e=k1(e),r-=Jn;for(var i=j1(n,e);++t<r;)e(t);return i}var nu=H1;Object.defineProperty(wt,"__esModule",{value:!0}),wt.Array=void 0;var W1=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}}(),z1=Xn,X1=br(z1),Y1=Pe.exports,K1=br(Y1),Z1=nu,J1=br(Z1),Q1=C,iu=br(Q1),e$=M,r$=br(e$);function br(r){return r&&r.__esModule?r:{default:r}}function t$(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var n$=wt.Array=function(){function r(e,t){t$(this,r),this._childType=e,this._length=t}return W1(r,[{key:"read",value:function(t){var n=this;return(0,J1.default)(this._length,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,iu.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,K1.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,iu.default)(t)||t.length!==this._length?!1:(0,X1.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,r$.default)(n$.prototype);var bt={};Object.defineProperty(bt,"__esModule",{value:!0}),bt.VarArray=void 0;var i$=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}}(),a$=Xn,o$=$r(a$),u$=Pe.exports,s$=$r(u$),f$=nu,c$=$r(f$),l$=C,au=$r(l$),p$=xe,ou=oe,h$=M,y$=$r(h$);function $r(r){return r&&r.__esModule?r:{default:r}}function d$(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var v$=bt.VarArray=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p$.UnsignedInt.MAX_VALUE;d$(this,r),this._childType=e,this._maxLength=t}return i$(r,[{key:"read",value:function(t){var n=this,i=ou.Int.read(t);if(i>this._maxLength)throw new Error("XDR Read Error: Saw "+i+" length VarArray,"+("max allowed is "+this._maxLength));return(0,c$.default)(i,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,au.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));ou.Int.write(t.length,n),(0,s$.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,au.default)(t)||t.length>this._maxLength?!1:(0,o$.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,y$.default)(v$.prototype);var $t={};function g$(r){return r===null}var _$=g$;function m$(r){return r===void 0}var Er=m$;Object.defineProperty($t,"__esModule",{value:!0}),$t.Option=void 0;var w$=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}}(),b$=_$,uu=Qn(b$),$$=Er,su=Qn($$),fu=wr,E$=M,A$=Qn(E$);function Qn(r){return r&&r.__esModule?r:{default:r}}function O$(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var S$=$t.Option=function(){function r(e){O$(this,r),this._childType=e}return w$(r,[{key:"read",value:function(t){if(fu.Bool.read(t))return this._childType.read(t)}},{key:"write",value:function(t,n){var i=!((0,uu.default)(t)||(0,su.default)(t));fu.Bool.write(i,n),i&&this._childType.write(t,n)}},{key:"isValid",value:function(t){return(0,uu.default)(t)||(0,su.default)(t)?!0:this._childType.isValid(t)}}]),r}();(0,A$.default)(S$.prototype);var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.Void=void 0;var T$=Er,cu=lu(T$),I$=M,x$=lu(I$);function lu(r){return r&&r.__esModule?r:{default:r}}var P$=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,x$.default)(P$);var Et={},F$=ct;function R$(r,e){return F$(e,function(t){return r[t]})}var M$=R$,D$=M$,N$=Ge;function B$(r){return r==null?[]:D$(r,N$(r))}var U$=B$;Object.defineProperty(Et,"__esModule",{value:!0}),Et.Enum=void 0;var C$=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}}(),L$=Pe.exports,j$=ei(L$),k$=U$,q$=ei(k$),pu=oe,V$=M,G$=ei(V$);function ei(r){return r&&r.__esModule?r:{default:r}}function H$(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 W$(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 z$=Et.Enum=function(){function r(e,t){hu(this,r),this.name=e,this.value=t}return C$(r,null,[{key:"read",value:function(t){var n=pu.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);pu.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,q$.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){W$(s,o);function s(){return hu(this,s),H$(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,j$.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,G$.default)(z$);var At={},X$=Rn,Y$=cr;function K$(r,e){var t=-1,n=Y$(r)?Array(r.length):[];return X$(r,function(i,a,o){n[++t]=e(i,a,o)}),n}var Z$=K$,J$=ct,Q$=To,eE=Z$,rE=C;function tE(r,e){var t=rE(r)?J$:eE;return t(r,Q$(e))}var nE=tE;function iE(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 aE=iE,Or={};Object.defineProperty(Or,"__esModule",{value:!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}}();function uE(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}Or.Reference=function(){function r(){uE(this,r)}return oE(r,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),r}(),Object.defineProperty(At,"__esModule",{value:!0}),At.Struct=void 0;var Ot=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")}}(),sE=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}}(),fE=Pe.exports,yu=Sr(fE),cE=nE,lE=Sr(cE),pE=Er,hE=Sr(pE),yE=aE,dE=Sr(yE),vE=Or,gE=M,_E=Sr(gE);function Sr(r){return r&&r.__esModule?r:{default:r}}function mE(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 wE(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 du(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var bE=At.Struct=function(){function r(e){du(this,r),this._attributes=e||{}}return sE(r,null,[{key:"read",value:function(t){var n=(0,lE.default)(this._fields,function(i){var a=Ot(i,2),o=a[0],s=a[1],f=s.read(t);return[o,f]});return new this((0,dE.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,yu.default)(this._fields,function(i){var a=Ot(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){wE(s,o);function s(){return du(this,s),mE(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=Ot(o,2),f=s[0],c=s[1];return c instanceof vE.Reference&&(c=c.resolve(t)),[f,c]}),(0,yu.default)(a._fields,function(o){var s=Ot(o,1),f=s[0];a.prototype[f]=$E(f)}),a}}]),r}();(0,_E.default)(bE);function $E(r){return function(t){return(0,hE.default)(t)||(this._attributes[r]=t),this._attributes[r]}}var St={};Object.defineProperty(St,"__esModule",{value:!0}),St.Union=void 0;var EE=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")}}(),AE=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}}(),OE=Pe.exports,Tt=xt(OE),SE=Er,vu=xt(SE),TE=Ho,gu=xt(TE),It=Ar,ri=Or,IE=M,xE=xt(IE);function xt(r){return r&&r.__esModule?r:{default:r}}function PE(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 FE(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 _u(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var RE=St.Union=function(){function r(e,t){_u(this,r),this.set(e,t)}return AE(r,[{key:"set",value:function(t,n){(0,gu.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!==It.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===It.Void?It.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,vu.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){FE(f,s);function f(){return _u(this,f),PE(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);a.unionName=n,t.results[n]=a,i.switchOn instanceof ri.Reference?a._switchOn=i.switchOn.resolve(t):a._switchOn=i.switchOn,a._switches=new Map,a._arms={},(0,Tt.default)(i.arms,function(s,f){s instanceof ri.Reference&&(s=s.resolve(t)),a._arms[f]=s});var o=i.defaultArm;return o instanceof ri.Reference&&(o=o.resolve(t)),a._defaultArm=o,(0,Tt.default)(i.switches,function(s){var f=EE(s,2),c=f[0],l=f[1];(0,gu.default)(c)&&(c=a._switchOn.fromName(c)),a._switches.set(c,l)}),(0,vu.default)(a._switchOn.values)||(0,Tt.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,Tt.default)(a._arms,function(s,f){s!==It.Void&&(a.prototype[f]=function(){return this.get(f)})}),a}}]),r}();(0,xE.default)(RE),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=oe;Object.keys(e).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return e[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]}})});var n=xe;Object.keys(n).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return n[h]}})});var i=ht;Object.keys(i).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return i[h]}})});var a=yt;Object.keys(a).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return a[h]}})});var o=dt;Object.keys(o).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return o[h]}})});var s=vt;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=gt;Object.keys(c).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return c[h]}})});var l=_t;Object.keys(l).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return l[h]}})});var u=mt;Object.keys(u).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return u[h]}})});var p=wt;Object.keys(p).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return p[h]}})});var d=bt;Object.keys(d).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return d[h]}})});var g=$t;Object.keys(g).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return g[h]}})});var b=Ar;Object.keys(b).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return b[h]}})});var E=Et;Object.keys(E).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return E[h]}})});var w=At;Object.keys(w).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return w[h]}})});var T=St;Object.keys(T).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return T[h]}})})}(An);var mu={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function m(v,_){for(var $=0;$<_.length;$++){var A=_[$];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(v,A.key,A)}}return function(v,_,$){return _&&m(v.prototype,_),$&&m(v,$),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=g;var n=Er,i=l(n),a=Pe.exports,o=l(a),s=An,f=c(s);function c(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var _ in m)Object.prototype.hasOwnProperty.call(m,_)&&(v[_]=m[_]);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 g(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(m){var _=new R(v);m(_),_.resolve()}return v}var b=function(m){d(v,m);function v(_){u(this,v);var $=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return $.name=_,$}return e(v,[{key:"resolve",value:function($){var A=$.definitions[this.name];return A.resolve($)}}]),v}(t.Reference),E=function(m){d(v,m);function v(_,$){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;u(this,v);var L=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return L.childReference=_,L.length=$,L.variable=A,L}return e(v,[{key:"resolve",value:function($){var A=this.childReference,L=this.length;return A instanceof t.Reference&&(A=A.resolve($)),L instanceof t.Reference&&(L=L.resolve($)),this.variable?new f.VarArray(A,L):new f.Array(A,L)}}]),v}(t.Reference),w=function(m){d(v,m);function v(_){u(this,v);var $=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return $.childReference=_,$.name=_.name,$}return e(v,[{key:"resolve",value:function($){var A=this.childReference;return A instanceof t.Reference&&(A=A.resolve($)),new f.Option(A)}}]),v}(t.Reference),T=function(m){d(v,m);function v(_,$){u(this,v);var A=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return A.sizedType=_,A.length=$,A}return e(v,[{key:"resolve",value:function($){var A=this.length;return A instanceof t.Reference&&(A=A.resolve($)),new this.sizedType(A)}}]),v}(t.Reference),h=function(){function m(v,_,$){u(this,m),this.constructor=v,this.name=_,this.config=$}return e(m,[{key:"resolve",value:function(_){return this.name in _.results?_.results[this.name]:this.constructor(_,this.name,this.config)}}]),m}();function O(m,v,_){return _ instanceof t.Reference&&(_=_.resolve(m)),m.results[v]=_,_}function x(m,v,_){return m.results[v]=_,_}var R=function(){function m(v){u(this,m),this._destination=v,this._definitions={}}return e(m,[{key:"enum",value:function(_,$){var A=new h(f.Enum.create,_,$);this.define(_,A)}},{key:"struct",value:function(_,$){var A=new h(f.Struct.create,_,$);this.define(_,A)}},{key:"union",value:function(_,$){var A=new h(f.Union.create,_,$);this.define(_,A)}},{key:"typedef",value:function(_,$){var A=new h(O,_,$);this.define(_,A)}},{key:"const",value:function(_,$){var A=new h(x,_,$);this.define(_,A)}},{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(_){return new T(f.String,_)}},{key:"opaque",value:function(_){return new T(f.Opaque,_)}},{key:"varOpaque",value:function(_){return new T(f.VarOpaque,_)}},{key:"array",value:function(_,$){return new E(_,$)}},{key:"varArray",value:function(_,$){return new E(_,$,!0)}},{key:"option",value:function(_){return new w(_)}},{key:"define",value:function(_,$){if((0,i.default)(this._destination[_]))this._definitions[_]=$;else throw new Error("XDRTypes Error:"+_+" is already defined")}},{key:"lookup",value:function(_){return new b(_)}},{key:"resolve",value:function(){var _=this;(0,o.default)(this._definitions,function($){$.resolve({definitions:_._definitions,results:_._destination})})}}]),m}()})(mu),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=An;Object.keys(e).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[n]}})});var t=mu;Object.keys(t).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})}(wa);const ME=wa.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")}})}),se=ME;function DE(r){let 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)};const t=new se.Bundle(e);return se.BundleEnvelope.envelopeTypeBundle(t).toXDR("base64")}let NE=(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),"");var BE=Ve,UE=Ge;function CE(r,e){return r&&BE(e,UE(e),r)}var LE=CE,jE=Ve,kE=et;function qE(r,e){return r&&jE(e,kE(e),r)}var VE=qE,ti={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,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})(ti,ti.exports);function GE(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var HE=GE,WE=Ve,zE=Cn;function XE(r,e){return WE(r,zE(r),e)}var YE=XE,KE=Ha,ZE=KE(Object.getPrototypeOf,Object),ni=ZE,JE=Un,QE=ni,eA=Cn,rA=eo,tA=Object.getOwnPropertySymbols,nA=tA?function(r){for(var e=[];r;)JE(e,eA(r)),r=QE(r);return e}:rA,wu=nA,iA=Ve,aA=wu;function oA(r,e){return iA(r,aA(r),e)}var uA=oA,sA=Qa,fA=wu,cA=et;function lA(r){return sA(r,cA,fA)}var bu=lA,pA=Object.prototype,hA=pA.hasOwnProperty;function yA(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&hA.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var dA=yA,$u=Ya;function vA(r){var e=new r.constructor(r.byteLength);return new $u(e).set(new $u(r)),e}var ii=vA,gA=ii;function _A(r,e){var t=e?gA(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var mA=_A,wA=/\w*$/;function bA(r){var e=new r.constructor(r.source,wA.exec(r));return e.lastIndex=r.lastIndex,e}var $A=bA,Eu=qe,Au=Eu?Eu.prototype:void 0,Ou=Au?Au.valueOf:void 0;function EA(r){return Ou?Object(Ou.call(r)):{}}var AA=EA,OA=ii;function SA(r,e){var t=e?OA(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var TA=SA,IA=ii,xA=mA,PA=$A,FA=AA,RA=TA,MA="[object Boolean]",DA="[object Date]",NA="[object Map]",BA="[object Number]",UA="[object RegExp]",CA="[object Set]",LA="[object String]",jA="[object Symbol]",kA="[object ArrayBuffer]",qA="[object DataView]",VA="[object Float32Array]",GA="[object Float64Array]",HA="[object Int8Array]",WA="[object Int16Array]",zA="[object Int32Array]",XA="[object Uint8Array]",YA="[object Uint8ClampedArray]",KA="[object Uint16Array]",ZA="[object Uint32Array]";function JA(r,e,t){var n=r.constructor;switch(e){case kA:return IA(r);case MA:case DA:return new n(+r);case qA:return xA(r,t);case VA:case GA:case HA:case WA:case zA:case XA:case YA:case KA:case ZA:return RA(r,t);case NA:return new n;case BA:case LA:return new n(r);case UA:return PA(r);case CA:return new n;case jA:return FA(r)}}var QA=JA,eO=ve,Su=Object.create,rO=function(){function r(){}return function(e){if(!eO(e))return{};if(Su)return Su(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),tO=rO,nO=tO,iO=ni,aO=Fn;function oO(r){return typeof r.constructor=="function"&&!aO(r)?nO(iO(r)):{}}var uO=oO,sO=ut,fO=H,cO="[object Map]";function lO(r){return fO(r)&&sO(r)==cO}var pO=lO,hO=pO,yO=Pn,Tu=pr.exports,Iu=Tu&&Tu.isMap,dO=Iu?yO(Iu):hO,vO=dO,gO=ut,_O=H,mO="[object Set]";function wO(r){return _O(r)&&gO(r)==mO}var bO=wO,$O=bO,EO=Pn,xu=pr.exports,Pu=xu&&xu.isSet,AO=Pu?EO(Pu):$O,OO=AO,SO=Nn,TO=Jo,IO=Ra,xO=LE,PO=VE,FO=ti.exports,RO=HE,MO=YE,DO=uA,NO=to,BO=bu,UO=ut,CO=dA,LO=QA,jO=uO,kO=C,qO=lr.exports,VO=vO,GO=ve,HO=OO,WO=Ge,zO=et,XO=1,YO=2,KO=4,Fu="[object Arguments]",ZO="[object Array]",JO="[object Boolean]",QO="[object Date]",eS="[object Error]",Ru="[object Function]",rS="[object GeneratorFunction]",tS="[object Map]",nS="[object Number]",Mu="[object Object]",iS="[object RegExp]",aS="[object Set]",oS="[object String]",uS="[object Symbol]",sS="[object WeakMap]",fS="[object ArrayBuffer]",cS="[object DataView]",lS="[object Float32Array]",pS="[object Float64Array]",hS="[object Int8Array]",yS="[object Int16Array]",dS="[object Int32Array]",vS="[object Uint8Array]",gS="[object Uint8ClampedArray]",_S="[object Uint16Array]",mS="[object Uint32Array]",P={};P[Fu]=P[ZO]=P[fS]=P[cS]=P[JO]=P[QO]=P[lS]=P[pS]=P[hS]=P[yS]=P[dS]=P[tS]=P[nS]=P[Mu]=P[iS]=P[aS]=P[oS]=P[uS]=P[vS]=P[gS]=P[_S]=P[mS]=!0,P[eS]=P[Ru]=P[sS]=!1;function Pt(r,e,t,n,i,a){var o,s=e&XO,f=e&YO,c=e&KO;if(t&&(o=i?t(r,n,i,a):t(r)),o!==void 0)return o;if(!GO(r))return r;var l=kO(r);if(l){if(o=CO(r),!s)return RO(r,o)}else{var u=UO(r),p=u==Ru||u==rS;if(qO(r))return FO(r,s);if(u==Mu||u==Fu||p&&!i){if(o=f||p?{}:jO(r),!s)return f?DO(r,PO(o,r)):MO(r,xO(o,r))}else{if(!P[u])return i?r:{};o=LO(r,u,s)}}a||(a=new SO);var d=a.get(r);if(d)return d;a.set(r,o),HO(r)?r.forEach(function(E){o.add(Pt(E,e,t,E,r,a))}):VO(r)&&r.forEach(function(E,w){o.set(w,Pt(E,e,t,w,r,a))});var g=c?f?BO:NO:f?zO:WO,b=l?void 0:g(r);return TO(b||r,function(E,w){b&&(w=E,E=r[w]),IO(o,w,Pt(E,e,t,w,r,a))}),o}var wS=Pt;function bS(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var $S=bS;function ES(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 AS=ES,OS=zn,SS=AS;function TS(r,e){return e.length<2?r:OS(r,SS(e,0,-1))}var IS=TS,xS=lt,PS=$S,FS=IS,RS=hr;function MS(r,e){return e=xS(e,r),r=FS(r,e),r==null||delete r[RS(PS(e))]}var DS=MS,NS=ue,BS=ni,US=H,CS="[object Object]",LS=Function.prototype,jS=Object.prototype,Du=LS.toString,kS=jS.hasOwnProperty,qS=Du.call(Object);function VS(r){if(!US(r)||NS(r)!=CS)return!1;var e=BS(r);if(e===null)return!0;var t=kS.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Du.call(t)==qS}var GS=VS,HS=GS;function WS(r){return HS(r)?void 0:r}var zS=WS,Nu=qe,XS=xn,YS=C,Bu=Nu?Nu.isConcatSpreadable:void 0;function KS(r){return YS(r)||XS(r)||!!(Bu&&r&&r[Bu])}var ZS=KS,JS=Un,QS=ZS;function Uu(r,e,t,n,i){var a=-1,o=r.length;for(t||(t=QS),i||(i=[]);++a<o;){var s=r[a];e>0&&t(s)?e>1?Uu(s,e-1,t,n,i):JS(i,s):n||(i[i.length]=s)}return i}var eT=Uu,rT=eT;function tT(r){var e=r==null?0:r.length;return e?rT(r,1):[]}var nT=tT,iT=nT,aT=Da,oT=Ba;function uT(r){return oT(aT(r,void 0,iT),r+"")}var sT=uT,fT=ct,cT=wS,lT=DS,pT=lt,hT=Ve,yT=zS,dT=sT,vT=bu,gT=1,_T=2,mT=4,wT=dT(function(r,e){var t={};if(r==null)return t;var n=!1;e=fT(e,function(a){return a=pT(a,r),n||(n=a.length>1),a}),hT(r,vT(r),t),n&&(t=cT(t,gT|_T|mT,yT));for(var i=e.length;i--;)lT(t,e[i]);return t}),bT=wT,$T=Object.defineProperty,ET=Object.defineProperties,AT=Object.getOwnPropertyDescriptors,Cu=Object.getOwnPropertySymbols,OT=Object.prototype.hasOwnProperty,ST=Object.prototype.propertyIsEnumerable,Lu=(r,e,t)=>e in r?$T(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,TT=(r,e)=>{for(var t in e||(e={}))OT.call(e,t)&&Lu(r,t,e[t]);if(Cu)for(var t of Cu(e))ST.call(e,t)&&Lu(r,t,e[t]);return r},IT=(r,e)=>ET(r,AT(e));function xT(r){try{return JSON.parse(r)}catch{return r}}function PT(r){return Object.entries(r).reduce((e,[t,n])=>IT(TT({},e),{[t]:xT(n)}),{})}var FT=Object.defineProperty,RT=Object.defineProperties,MT=Object.getOwnPropertyDescriptors,ju=Object.getOwnPropertySymbols,DT=Object.prototype.hasOwnProperty,NT=Object.prototype.propertyIsEnumerable,ku=(r,e,t)=>e in r?FT(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,qu=(r,e)=>{for(var t in e||(e={}))DT.call(e,t)&&ku(r,t,e[t]);if(ju)for(var t of ju(e))NT.call(e,t)&&ku(r,t,e[t]);return r},Vu=(r,e)=>RT(r,MT(e));function Gu(r){var e;const t=PT(r),n=t.auto_inject===void 0?!0:t.auto_inject,i=(e=t.display_on)!=null?e:[],a=t.first_option==="autodeliver";return Vu(qu({},bT(t,["display_on","first_option"])),{auto_inject:n,valid_pages:i,is_subscription_first:a,autoInject:n,validPages:i,isSubscriptionFirst:a})}function Hu(r){var e;const t=((e=r.subscription_options)==null?void 0:e.storefront_purchase_options)==="subscription_only";return Vu(qu({},r),{is_subscription_only:t,isSubscriptionOnly:t})}function BT(r){return r.map(e=>{const t={};return Object.entries(e).forEach(([n,i])=>{t[n]=Hu(i)}),t})}const Ft="2020-12",UT={store_currency:{currency_code:"USD",currency_symbol:"$",decimal_separator:".",thousands_separator:",",currency_symbol_location:"left"}},Tr=new Map;function Rt(r,e){return Tr.has(r)||Tr.set(r,e()),Tr.get(r)}async function ai(r){const{product:e}=await Rt(`product.${r}`,()=>Kr("get",`/product/${Ft}/${r}.json`));return Hu(e)}async function Wu(){return await Rt("storeSettings",()=>Kr("get",`/${Ft}/store_settings.json`).catch(()=>UT))}async function zu(){const{widget_settings:r}=await Rt("widgetSettings",()=>Kr("get",`/${Ft}/widget_settings.json`));return Gu(r)}async function Xu(){const{products:r,widget_settings:e,store_settings:t,meta:n}=await Rt("productsAndSettings",()=>Kr("get",`/product/${Ft}/products.json`));return n?.status==="error"?Promise.reject(n.message):{products:BT(r),widget_settings:Gu(e),store_settings:t??{}}}async function CT(){const{products:r}=await Xu();return r}async function LT(r){const[e,t,n]=await Promise.all([ai(r),Wu(),zu()]);return{product:e,store_settings:t,widget_settings:n,storeSettings:t,widgetSettings:n}}async function Yu(r){const{bundle_product:e}=await ai(r);return e}async function Ku(){return Array.from(Tr.keys()).forEach(r=>Tr.delete(r))}var jT=Object.freeze({__proto__:null,getCDNProduct:ai,getCDNStoreSettings:Wu,getCDNWidgetSettings:zu,getCDNProductsAndSettings:Xu,getCDNProducts:CT,getCDNProductAndSettings:LT,getCDNBundleSettings:Yu,resetCDNCache:Ku});const Zu="/bundling-storefront-manager";function kT(){return Math.ceil(Date.now()/1e3)}async function qT(){try{const{timestamp:r}=await En("get",`${Zu}/t`,{headers:{"X-Recharge-App":"storefront-client"}});return r}catch(r){return console.error(`Fetch failed: ${r}. Using client-side date.`),kT()}}async function VT(r){const e=sr();if(!await Ju(r))throw new Error("Bundle is invalid.");const t=await qT(),n=DE({variantId:r.externalVariantId,version:t,items:r.selections.map(i=>({collectionId:i.collectionId,productId:i.externalProductId,variantId:i.externalVariantId,quantity:i.quantity,sku:""}))});try{const i=await En("post",`${Zu}/api/v1/bundles`,{data:{bundle:n},headers:{Origin:`https://${e.storeIdentifier}`}});if(!i.id||i.code!==200)throw new Error(`1: failed generating rb_id: ${JSON.stringify(i)}`);return i.id}catch(i){throw new Error(`2: failed generating rb_id ${i}`)}}function GT(r,e){const t=Qu(r);if(t!==!0)throw new Error(`Dynamic Bundle is invalid. ${t}`);const n=`${NE(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 Ju(r){try{const e=await Yu(r.externalProductId);return!!r&&!!e}catch{return console.error("Error fetching bundle settings"),!1}}const HT={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 Qu(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=HT[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}var WT=Object.freeze({__proto__:null,getBundleId:VT,getDynamicBundleItems:GT,validateBundle:Ju,validateDynamicBundle:Qu});async function zT(r,e){const{charge:t}=await S("get","/charges",{id:e},r);return t}function XT(r,e){return S("get","/charges",{query:e},r)}async function YT(r,e,t){return es(r,e,t)}async function es(r,e,t){const{charge:n}=await S("post",`/charges/${e}/apply_discount`,{data:t},r);return n}async function KT(r,e){return rs(r,e)}async function rs(r,e){const{charge:t}=await S("post",`/charges/${e}/remove_discount`,{},r);return t}async function ZT(r,e){const{charge:t}=await S("post",`/charges/${e}/skip`,{},r);return t}async function JT(r,e){const{charge:t}=await S("post",`/charges/${e}/unskip`,{},r);return t}async function QT(r,e){const{charge:t}=await S("post",`/charges/${e}/process`,{},r);return t}var e2=Object.freeze({__proto__:null,getCharge:zT,listCharges:XT,applyDiscount:YT,applyDiscountToCharge:es,removeDiscount:KT,removeDiscountsFromCharge:rs,skipCharge:ZT,unskipCharge:JT,processCharge:QT});async function r2(r,e){const{membership:t}=await S("get","/memberships",{id:e},r);return t}function t2(r,e){return S("get","/memberships",{query:e},r)}async function n2(r,e,t){const{membership:n}=await S("post",`/memberships/${e}/cancel`,{data:t},r);return n}async function i2(r,e,t){const{membership:n}=await S("post",`/memberships/${e}/activate`,{data:t},r);return n}var a2=Object.freeze({__proto__:null,getMembership:r2,listMemberships:t2,cancelMembership:n2,activateMembership:i2});async function o2(r,e){const{onetime:t}=await S("get","/onetimes",{id:e},r);return t}function u2(r,e){return S("get","/onetimes",{query:e},r)}async function s2(r,e){const{onetime:t}=await S("post","/onetimes",{data:e},r);return t}async function f2(r,e,t){const{onetime:n}=await S("put","/onetimes",{id:e,data:t},r);return n}function c2(r,e){return S("delete","/onetime",{id:e},r)}var l2=Object.freeze({__proto__:null,getOnetime:o2,listOnetimes:u2,createOnetime:s2,updateOnetime:f2,deleteOnetime:c2});async function p2(r,e){const{order:t}=await S("get","/orders",{id:e},r);return t}function h2(r,e){return S("get","/orders",{query:e},r)}var y2=Object.freeze({__proto__:null,getOrder:p2,listOrders:h2});async function d2(r,e){const{payment_method:t}=await S("get","/payment_methods",{id:e},r);return t}async function v2(r,e,t){const{payment_method:n}=await S("put","/payment_methods",{id:e,data:t},r);return n}function g2(r,e){return S("get","/payment_methods",{query:e},r)}var _2=Object.freeze({__proto__:null,getPaymentMethod:d2,updatePaymentMethod:v2,listPaymentMethods:g2});async function m2(r,e){const{plan:t}=await S("get","/plans",{id:e},r);return t}function w2(r,e){return S("get","/plans",{query:e},r)}var b2=Object.freeze({__proto__:null,getPlan:m2,listPlans:w2});async function $2(r,e){const{subscription:t}=await S("get","/subscriptions",{id:e},r);return t}function E2(r,e){return S("get","/subscriptions",{query:e},r)}async function A2(r,e){const{subscription:t}=await S("post","/subscriptions",{data:e},r);return t}async function O2(r,e,t,n){const{subscription:i}=await S("put","/subscriptions",{id:e,data:t,query:n},r);return i}async function S2(r,e,t){const{subscription:n}=await S("post",`/subscriptions/${e}/set_next_charge_date`,{data:{date:t}},r);return n}async function T2(r,e,t){const{subscription:n}=await S("post",`/subscriptions/${e}/change_address`,{data:{address_id:t}},r);return n}async function I2(r,e,t){const{subscription:n}=await S("post",`/subscriptions/${e}/cancel`,{data:t},r);return n}async function x2(r,e){const{subscription:t}=await S("post",`/subscriptions/${e}/activate`,{},r);return t}async function P2(r,e,t){const{charge:n}=await S("post",`/subscriptions/${e}/charges/skip`,{data:{date:t,subscription_id:`${e}`}},r);return n}var F2=Object.freeze({__proto__:null,getSubscription:$2,listSubscriptions:E2,createSubscription:A2,updateSubscription:O2,updateSubscriptionChargeDate:S2,updateSubscriptionAddress:T2,cancelSubscription:I2,activateSubscription:x2,skipSubscriptionCharge:P2});async function R2(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{customer:n}=await S("get","/customers",{id:t,query:{include:e?.include}},r);return n}async function M2(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{customer:n}=await S("put","/customers",{id:t,data:e},r);return n}async function D2(r,e){const t=r.customerId;if(!t)throw new Error("Not logged in.");const{deliveries:n}=await S("get",`/customers/${t}/delivery_schedule`,{query:e},r);return n}var N2=Object.freeze({__proto__:null,getCustomer:R2,updateCustomer:M2,getDeliverySchedule:D2});const B2={get(r,e){return ae("get",r,e)},post(r,e){return ae("post",r,e)},put(r,e){return ae("put",r,e)},delete(r,e){return ae("delete",r,e)}};function U2(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 C2(r={}){const e=r;El({storeIdentifier:U2(r.storeIdentifier),loginRetryFn:r.loginRetryFn,storefrontAccessToken:r.storefrontAccessToken,environment:e.environment?e.environment:"prod"}),Ku()}const ts={init:C2,api:B2,address:Gl,auth:zl,bundle:WT,charge:e2,cdn:jT,customer:N2,membership:a2,onetime:l2,order:y2,paymentMethod:_2,plan:b2,subscription:F2};try{ts.init()}catch{}return ts});
|