@persona/relay 0.1.2 → 0.1.3

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/relay.cjs CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";var Jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cn(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var a=e.default;if(typeof a=="function"){var f=function l(){var g=!1;try{g=this instanceof l}catch{}return g?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};f.prototype=a.prototype}else f={};return Object.defineProperty(f,"__esModule",{value:!0}),Object.keys(e).forEach(function(l){var g=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(f,l,g.get?g:{enumerable:!0,get:function(){return e[l]}})}),f}var Ue,Yr;function be(){return Yr||(Yr=1,Ue=TypeError),Ue}const sn={},pn=Object.freeze(Object.defineProperty({__proto__:null,default:sn},Symbol.toStringTag,{value:"Module"})),yn=cn(pn);var ze,Xr;function xe(){if(Xr)return ze;Xr=1;var e=typeof Map=="function"&&Map.prototype,a=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,f=e&&a&&typeof a.get=="function"?a.get:null,l=e&&Map.prototype.forEach,g=typeof Set=="function"&&Set.prototype,b=Object.getOwnPropertyDescriptor&&g?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,P=g&&b&&typeof b.get=="function"?b.get:null,v=g&&Set.prototype.forEach,O=typeof WeakMap=="function"&&WeakMap.prototype,y=O?WeakMap.prototype.has:null,m=typeof WeakSet=="function"&&WeakSet.prototype,d=m?WeakSet.prototype.has:null,F=typeof WeakRef=="function"&&WeakRef.prototype,A=F?WeakRef.prototype.deref:null,n=Boolean.prototype.valueOf,u=Object.prototype.toString,i=Function.prototype.toString,I=String.prototype.match,w=String.prototype.slice,E=String.prototype.replace,M=String.prototype.toUpperCase,h=String.prototype.toLowerCase,R=RegExp.prototype.test,o=Array.prototype.concat,c=Array.prototype.join,p=Array.prototype.slice,S=Math.floor,_=typeof BigInt=="function"?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,N=typeof Symbol=="function"&&typeof Symbol.iterator=="object",k=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||!0)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,K=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function s(r,t){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||R.call(/e/,t))return t;var C=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var L=r<0?-S(-r):S(r);if(L!==r){var U=String(L),q=w.call(t,U.length+1);return E.call(U,C,"$&_")+"."+E.call(E.call(q,/([0-9]{3})/g,"$&_"),/_$/,"")}}return E.call(t,C,"$&_")}var $=yn,j=$.custom,X=H(j)?j:null,ce={__proto__:null,double:'"',single:"'"},ve={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ze=function r(t,C,L,U){var q=C||{};if(W(q,"quoteStyle")&&!W(ce,q.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(q,"maxStringLength")&&(typeof q.maxStringLength=="number"?q.maxStringLength<0&&q.maxStringLength!==1/0:q.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ue=W(q,"customInspect")?q.customInspect:!0;if(typeof ue!="boolean"&&ue!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(q,"indent")&&q.indent!==null&&q.indent!==" "&&!(parseInt(q.indent,10)===q.indent&&q.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(q,"numericSeparator")&&typeof q.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ye=q.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Ur(t,q);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var Y=String(t);return ye?s(t,Y):Y}if(typeof t=="bigint"){var fe=String(t)+"n";return ye?s(t,fe):fe}var De=typeof q.depth>"u"?5:q.depth;if(typeof L>"u"&&(L=0),L>=De&&De>0&&typeof t=="object")return ae(t)?"[Array]":"[Object]";var we=ln(q,L);if(typeof U>"u")U=[];else if(se(U,t)>=0)return"[Circular]";function te(Se,_e,fn){if(_e&&(U=p.call(U),U.push(_e)),fn){var Vr={depth:q.depth};return W(q,"quoteStyle")&&(Vr.quoteStyle=q.quoteStyle),r(Se,Vr,L+1,U)}return r(Se,q,L+1,U)}if(typeof t=="function"&&!oe(t)){var Wr=Ee(t),kr=Pe(t,te);return"[Function"+(Wr?": "+Wr:" (anonymous)")+"]"+(kr.length>0?" { "+c.call(kr,", ")+" }":"")}if(H(t)){var Gr=N?E.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(t);return typeof t=="object"&&!N?Oe(Gr):Gr}if(nn(t)){for(var Ae="<"+h.call(String(t.nodeName)),Ce=t.attributes||[],Ie=0;Ie<Ce.length;Ie++)Ae+=" "+Ce[Ie].name+"="+ee(ne(Ce[Ie].value),"double",q);return Ae+=">",t.childNodes&&t.childNodes.length&&(Ae+="..."),Ae+="</"+h.call(String(t.nodeName))+">",Ae}if(ae(t)){if(t.length===0)return"[]";var $e=Pe(t,te);return we&&!on($e)?"["+Me($e,we)+"]":"[ "+c.call($e,", ")+" ]"}if(Q(t)){var Ne=Pe(t,te);return!("cause"in Error.prototype)&&"cause"in t&&!D.call(t,"cause")?"{ ["+String(t)+"] "+c.call(o.call("[cause]: "+te(t.cause),Ne),", ")+" }":Ne.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+c.call(Ne,", ")+" }"}if(typeof t=="object"&&ue){if(X&&typeof t[X]=="function"&&$)return $(t,{depth:De-L});if(ue!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(pe(t)){var Hr=[];return l&&l.call(t,function(Se,_e){Hr.push(te(_e,t,!0)+" => "+te(Se,t))}),zr("Map",f.call(t),Hr,we)}if(me(t)){var jr=[];return v&&v.call(t,function(Se){jr.push(te(Se,t))}),zr("Set",P.call(t),jr,we)}if(re(t))return qe("WeakMap");if(ge(t))return qe("WeakSet");if(he(t))return qe("WeakRef");if(G(t))return Oe(te(Number(t)));if(V(t))return Oe(te(_.call(t)));if(z(t))return Oe(n.call(t));if(T(t))return Oe(te(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Jr<"u"&&t===Jr)return"{ [object globalThis] }";if(!ie(t)&&!oe(t)){var Te=Pe(t,te),Kr=K?K(t)===Object.prototype:t instanceof Object||t.constructor===Object,Le=t instanceof Object?"":"null prototype",Qr=!Kr&&k&&Object(t)===t&&k in t?w.call(J(t),8,-1):Le?"Object":"",un=Kr||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Be=un+(Qr||Le?"["+c.call(o.call([],Qr||[],Le||[]),": ")+"] ":"");return Te.length===0?Be+"{}":we?Be+"{"+Me(Te,we)+"}":Be+"{ "+c.call(Te,", ")+" }"}return String(t)};function ee(r,t,C){var L=C.quoteStyle||t,U=ce[L];return U+r+U}function ne(r){return E.call(String(r),/"/g,"&quot;")}function Z(r){return!k||!(typeof r=="object"&&(k in r||typeof r[k]<"u"))}function ae(r){return J(r)==="[object Array]"&&Z(r)}function ie(r){return J(r)==="[object Date]"&&Z(r)}function oe(r){return J(r)==="[object RegExp]"&&Z(r)}function Q(r){return J(r)==="[object Error]"&&Z(r)}function T(r){return J(r)==="[object String]"&&Z(r)}function G(r){return J(r)==="[object Number]"&&Z(r)}function z(r){return J(r)==="[object Boolean]"&&Z(r)}function H(r){if(N)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!B)return!1;try{return B.call(r),!0}catch{}return!1}function V(r){if(!r||typeof r!="object"||!_)return!1;try{return _.call(r),!0}catch{}return!1}var le=Object.prototype.hasOwnProperty||function(r){return r in this};function W(r,t){return le.call(r,t)}function J(r){return u.call(r)}function Ee(r){if(r.name)return r.name;var t=I.call(i.call(r),/^function\s*([\w$]+)/);return t?t[1]:null}function se(r,t){if(r.indexOf)return r.indexOf(t);for(var C=0,L=r.length;C<L;C++)if(r[C]===t)return C;return-1}function pe(r){if(!f||!r||typeof r!="object")return!1;try{f.call(r);try{P.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function re(r){if(!y||!r||typeof r!="object")return!1;try{y.call(r,y);try{d.call(r,d)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function he(r){if(!A||!r||typeof r!="object")return!1;try{return A.call(r),!0}catch{}return!1}function me(r){if(!P||!r||typeof r!="object")return!1;try{P.call(r);try{f.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function ge(r){if(!d||!r||typeof r!="object")return!1;try{d.call(r,d);try{y.call(r,y)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function nn(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function Ur(r,t){if(r.length>t.maxStringLength){var C=r.length-t.maxStringLength,L="... "+C+" more character"+(C>1?"s":"");return Ur(w.call(r,0,t.maxStringLength),t)+L}var U=ve[t.quoteStyle||"single"];U.lastIndex=0;var q=E.call(E.call(r,U,"\\$1"),/[\x00-\x1f]/g,an);return ee(q,"single",t)}function an(r){var t=r.charCodeAt(0),C={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return C?"\\"+C:"\\x"+(t<16?"0":"")+M.call(t.toString(16))}function Oe(r){return"Object("+r+")"}function qe(r){return r+" { ? }"}function zr(r,t,C,L){var U=L?Me(C,L):c.call(C,", ");return r+" ("+t+") {"+U+"}"}function on(r){for(var t=0;t<r.length;t++)if(se(r[t],`
2
- `)>=0)return!1;return!0}function ln(r,t){var C;if(r.indent===" ")C=" ";else if(typeof r.indent=="number"&&r.indent>0)C=c.call(Array(r.indent+1)," ");else return null;return{base:C,prev:c.call(Array(t+1),C)}}function Me(r,t){if(r.length===0)return"";var C=`
3
- `+t.prev+t.base;return C+c.call(r,","+C)+`
4
- `+t.prev}function Pe(r,t){var C=ae(r),L=[];if(C){L.length=r.length;for(var U=0;U<r.length;U++)L[U]=W(r,U)?t(r[U],r):""}var q=typeof x=="function"?x(r):[],ue;if(N){ue={};for(var ye=0;ye<q.length;ye++)ue["$"+q[ye]]=q[ye]}for(var Y in r)W(r,Y)&&(C&&String(Number(Y))===Y&&Y<r.length||N&&ue["$"+Y]instanceof Symbol||(R.call(/[^\w$]/,Y)?L.push(t(Y,r)+": "+t(r[Y],r)):L.push(Y+": "+t(r[Y],r))));if(typeof x=="function")for(var fe=0;fe<q.length;fe++)D.call(r,q[fe])&&L.push("["+t(q[fe])+"]: "+t(r[q[fe]],r));return L}return ze}var We,Zr;function dn(){if(Zr)return We;Zr=1;var e=xe(),a=be(),f=function(v,O,y){for(var m=v,d;(d=m.next)!=null;m=d)if(d.key===O)return m.next=d.next,y||(d.next=v.next,v.next=d),d},l=function(v,O){if(v){var y=f(v,O);return y&&y.value}},g=function(v,O,y){var m=f(v,O);m?m.value=y:v.next={key:O,next:v.next,value:y}},b=function(v,O){return v?!!f(v,O):!1},P=function(v,O){if(v)return f(v,O,!0)};return We=function(){var O,y={assert:function(m){if(!y.has(m))throw new a("Side channel does not contain "+e(m))},delete:function(m){var d=O&&O.next,F=P(O,m);return F&&d&&d===F&&(O=void 0),!!F},get:function(m){return l(O,m)},has:function(m){return b(O,m)},set:function(m,d){O||(O={next:void 0}),g(O,m,d)}};return y},We}var ke,et;function jt(){return et||(et=1,ke=Object),ke}var Ge,rt;function vn(){return rt||(rt=1,Ge=Error),Ge}var He,tt;function hn(){return tt||(tt=1,He=EvalError),He}var je,nt;function mn(){return nt||(nt=1,je=RangeError),je}var Ke,at;function gn(){return at||(at=1,Ke=ReferenceError),Ke}var Qe,it;function wn(){return it||(it=1,Qe=SyntaxError),Qe}var Ve,ot;function Sn(){return ot||(ot=1,Ve=URIError),Ve}var Je,lt;function bn(){return lt||(lt=1,Je=Math.abs),Je}var Ye,ut;function En(){return ut||(ut=1,Ye=Math.floor),Ye}var Xe,ft;function On(){return ft||(ft=1,Xe=Math.max),Xe}var Ze,ct;function An(){return ct||(ct=1,Ze=Math.min),Ze}var er,st;function Rn(){return st||(st=1,er=Math.pow),er}var rr,pt;function Pn(){return pt||(pt=1,rr=Math.round),rr}var tr,yt;function In(){return yt||(yt=1,tr=Number.isNaN||function(a){return a!==a}),tr}var nr,dt;function _n(){if(dt)return nr;dt=1;var e=In();return nr=function(f){return e(f)||f===0?f:f<0?-1:1},nr}var ar,vt;function xn(){return vt||(vt=1,ar=Object.getOwnPropertyDescriptor),ar}var ir,ht;function Kt(){if(ht)return ir;ht=1;var e=xn();if(e)try{e([],"length")}catch{e=null}return ir=e,ir}var or,mt;function Fn(){if(mt)return or;mt=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return or=e,or}var lr,gt;function qn(){return gt||(gt=1,lr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var a={},f=Symbol("test"),l=Object(f);if(typeof f=="string"||Object.prototype.toString.call(f)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var g=42;a[f]=g;for(var b in a)return!1;if(typeof Object.keys=="function"&&Object.keys(a).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(a).length!==0)return!1;var P=Object.getOwnPropertySymbols(a);if(P.length!==1||P[0]!==f||!Object.prototype.propertyIsEnumerable.call(a,f))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(a,f);if(v.value!==g||v.enumerable!==!0)return!1}return!0}),lr}var ur,wt;function Mn(){if(wt)return ur;wt=1;var e=typeof Symbol<"u"&&Symbol,a=qn();return ur=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:a()},ur}var fr,St;function Qt(){return St||(St=1,fr=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),fr}var cr,bt;function Vt(){if(bt)return cr;bt=1;var e=jt();return cr=e.getPrototypeOf||null,cr}var sr,Et;function Dn(){if(Et)return sr;Et=1;var e="Function.prototype.bind called on incompatible ",a=Object.prototype.toString,f=Math.max,l="[object Function]",g=function(O,y){for(var m=[],d=0;d<O.length;d+=1)m[d]=O[d];for(var F=0;F<y.length;F+=1)m[F+O.length]=y[F];return m},b=function(O,y){for(var m=[],d=y,F=0;d<O.length;d+=1,F+=1)m[F]=O[d];return m},P=function(v,O){for(var y="",m=0;m<v.length;m+=1)y+=v[m],m+1<v.length&&(y+=O);return y};return sr=function(O){var y=this;if(typeof y!="function"||a.apply(y)!==l)throw new TypeError(e+y);for(var m=b(arguments,1),d,F=function(){if(this instanceof d){var I=y.apply(this,g(m,arguments));return Object(I)===I?I:this}return y.apply(O,g(m,arguments))},A=f(0,y.length-m.length),n=[],u=0;u<A;u++)n[u]="$"+u;if(d=Function("binder","return function ("+P(n,",")+"){ return binder.apply(this,arguments); }")(F),y.prototype){var i=function(){};i.prototype=y.prototype,d.prototype=new i,i.prototype=null}return d},sr}var pr,Ot;function Fe(){if(Ot)return pr;Ot=1;var e=Dn();return pr=Function.prototype.bind||e,pr}var yr,At;function Nr(){return At||(At=1,yr=Function.prototype.call),yr}var dr,Rt;function Jt(){return Rt||(Rt=1,dr=Function.prototype.apply),dr}var vr,Pt;function Cn(){return Pt||(Pt=1,vr=typeof Reflect<"u"&&Reflect&&Reflect.apply),vr}var hr,It;function $n(){if(It)return hr;It=1;var e=Fe(),a=Jt(),f=Nr(),l=Cn();return hr=l||e.call(f,a),hr}var mr,_t;function Yt(){if(_t)return mr;_t=1;var e=Fe(),a=be(),f=Nr(),l=$n();return mr=function(b){if(b.length<1||typeof b[0]!="function")throw new a("a function is required");return l(e,f,b)},mr}var gr,xt;function Nn(){if(xt)return gr;xt=1;var e=Yt(),a=Kt(),f;try{f=[].__proto__===Array.prototype}catch(P){if(!P||typeof P!="object"||!("code"in P)||P.code!=="ERR_PROTO_ACCESS")throw P}var l=!!f&&a&&a(Object.prototype,"__proto__"),g=Object,b=g.getPrototypeOf;return gr=l&&typeof l.get=="function"?e([l.get]):typeof b=="function"?function(v){return b(v==null?v:g(v))}:!1,gr}var wr,Ft;function Tn(){if(Ft)return wr;Ft=1;var e=Qt(),a=Vt(),f=Nn();return wr=e?function(g){return e(g)}:a?function(g){if(!g||typeof g!="object"&&typeof g!="function")throw new TypeError("getProto: not an object");return a(g)}:f?function(g){return f(g)}:null,wr}var Sr,qt;function Ln(){if(qt)return Sr;qt=1;const e=(async function(){}).constructor;return Sr=()=>e,Sr}var br,Mt;function Bn(){if(Mt)return br;Mt=1;const e=(function*(){}).constructor;return br=()=>e,br}var Er,Dt;function Un(){if(Dt)return Er;Dt=1;const e=(async function*(){}).constructor;return Er=()=>e,Er}var Or,Ct;function zn(){if(Ct)return Or;Ct=1;var e=Function.prototype.call,a=Object.prototype.hasOwnProperty,f=Fe();return Or=f.call(e,a),Or}var Ar,$t;function Tr(){if($t)return Ar;$t=1;var e,a=jt(),f=vn(),l=hn(),g=mn(),b=gn(),P=wn(),v=be(),O=Sn(),y=bn(),m=En(),d=On(),F=An(),A=Rn(),n=Pn(),u=_n(),i=Kt(),I=Fn(),w=function(){throw new v},E=i?(function(){try{return arguments.callee,w}catch{try{return i(arguments,"callee").get}catch{return w}}})():w,M=Mn()(),h=Tn(),R=Vt(),o=Qt(),c=Jt(),p=Nr(),S={},_=typeof Uint8Array>"u"||!h?e:h(Uint8Array),x={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":M&&h?h([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":f,"%eval%":eval,"%EvalError%":l,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":Function,"%GeneratorFunction%":S,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&h?h(h([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!M||!h?e:h(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":a,"%Object.getOwnPropertyDescriptor%":i,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":g,"%ReferenceError%":b,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!M||!h?e:h(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&h?h(""[Symbol.iterator]()):e,"%Symbol%":M?Symbol:e,"%SyntaxError%":P,"%ThrowTypeError%":E,"%TypedArray%":_,"%TypeError%":v,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":O,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":p,"%Function.prototype.apply%":c,"%Object.defineProperty%":I,"%Object.getPrototypeOf%":R,"%Math.abs%":y,"%Math.floor%":m,"%Math.max%":d,"%Math.min%":F,"%Math.pow%":A,"%Math.round%":n,"%Math.sign%":u,"%Reflect.getPrototypeOf%":o};if(h)try{null.error}catch(Q){var B=h(h(Q));x["%Error.prototype%"]=B}var N=Ln(),k=Bn(),D=Un(),K=function Q(T){var G;if(T==="%AsyncFunction%")G=N()||void 0;else if(T==="%GeneratorFunction%")G=k()||void 0;else if(T==="%AsyncGeneratorFunction%")G=D()||void 0;else if(T==="%AsyncGenerator%"){var z=Q("%AsyncGeneratorFunction%");z&&(G=z.prototype)}else if(T==="%AsyncIteratorPrototype%"){var H=Q("%AsyncGenerator%");H&&h&&(G=h(H.prototype))}return x[T]=G,G},s={__proto__:null,"%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"]},$=Fe(),j=zn(),X=$.call(p,Array.prototype.concat),ce=$.call(c,Array.prototype.splice),ve=$.call(p,String.prototype.replace),ee=$.call(p,String.prototype.slice),ne=$.call(p,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ae=/\\(\\)?/g,ie=function(T){var G=ee(T,0,1),z=ee(T,-1);if(G==="%"&&z!=="%")throw new P("invalid intrinsic syntax, expected closing `%`");if(z==="%"&&G!=="%")throw new P("invalid intrinsic syntax, expected opening `%`");var H=[];return ve(T,Z,function(V,le,W,J){H[H.length]=W?ve(J,ae,"$1"):le||V}),H},oe=function(T,G){var z=T,H;if(j(s,z)&&(H=s[z],z="%"+H[0]+"%"),j(x,z)){var V=x[z];if(V===S&&(V=K(z)),typeof V>"u"&&!G)throw new v("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:H,name:z,value:V}}throw new P("intrinsic "+T+" does not exist!")};return Ar=function(T,G){if(typeof T!="string"||T.length===0)throw new v("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof G!="boolean")throw new v('"allowMissing" argument must be a boolean');if(ne(/^%?[^%]*%?$/,T)===null)throw new P("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var z=ie(T),H=z.length>0?z[0]:"",V=oe("%"+H+"%",G),le=V.name,W=V.value,J=!1,Ee=V.alias;Ee&&(H=Ee[0],ce(z,X([0,1],Ee)));for(var se=1,pe=!0;se<z.length;se+=1){var re=z[se],he=ee(re,0,1),me=ee(re,-1);if((he==='"'||he==="'"||he==="`"||me==='"'||me==="'"||me==="`")&&he!==me)throw new P("property names with quotes must have matching quotes");if((re==="constructor"||!pe)&&(J=!0),H+="."+re,le="%"+H+"%",j(x,le))W=x[le];else if(W!=null){if(!(re in W)){if(!G)throw new v("base intrinsic for "+T+" exists, but the property is not available.");return}if(i&&se+1>=z.length){var ge=i(W,re);pe=!!ge,pe&&"get"in ge&&!("originalValue"in ge.get)?W=ge.get:W=W[re]}else pe=j(W,re),W=W[re];pe&&!J&&(x[le]=W)}}return W},Ar}var Rr,Nt;function Xt(){if(Nt)return Rr;Nt=1;var e=Tr(),a=Yt(),f=a([e("%String.prototype.indexOf%")]);return Rr=function(g,b){var P=e(g,!!b);return typeof P=="function"&&f(g,".prototype.")>-1?a([P]):P},Rr}var Pr,Tt;function Zt(){if(Tt)return Pr;Tt=1;var e=Tr(),a=Xt(),f=xe(),l=be(),g=e("%Map%",!0),b=a("Map.prototype.get",!0),P=a("Map.prototype.set",!0),v=a("Map.prototype.has",!0),O=a("Map.prototype.delete",!0),y=a("Map.prototype.size",!0);return Pr=!!g&&function(){var d,F={assert:function(A){if(!F.has(A))throw new l("Side channel does not contain "+f(A))},delete:function(A){if(d){var n=O(d,A);return y(d)===0&&(d=void 0),n}return!1},get:function(A){if(d)return b(d,A)},has:function(A){return d?v(d,A):!1},set:function(A,n){d||(d=new g),P(d,A,n)}};return F},Pr}var Ir,Lt;function Wn(){if(Lt)return Ir;Lt=1;var e=Tr(),a=Xt(),f=xe(),l=Zt(),g=be(),b=e("%WeakMap%",!0),P=a("WeakMap.prototype.get",!0),v=a("WeakMap.prototype.set",!0),O=a("WeakMap.prototype.has",!0),y=a("WeakMap.prototype.delete",!0);return Ir=b?function(){var d,F,A={assert:function(n){if(!A.has(n))throw new g("Side channel does not contain "+f(n))},delete:function(n){if(b&&n&&(typeof n=="object"||typeof n=="function")){if(d)return y(d,n)}else if(l&&F)return F.delete(n);return!1},get:function(n){return b&&n&&(typeof n=="object"||typeof n=="function")&&d?P(d,n):F&&F.get(n)},has:function(n){return b&&n&&(typeof n=="object"||typeof n=="function")&&d?O(d,n):!!F&&F.has(n)},set:function(n,u){b&&n&&(typeof n=="object"||typeof n=="function")?(d||(d=new b),v(d,n,u)):l&&(F||(F=l()),F.set(n,u))}};return A}:l,Ir}var _r,Bt;function en(){if(Bt)return _r;Bt=1;var e=be(),a=xe(),f=dn(),l=Zt(),g=Wn(),b=g||l||f;return _r=function(){var v,O={assert:function(y){if(!O.has(y))throw new e("Side channel does not contain "+a(y))},delete:function(y){return!!v&&v.delete(y)},get:function(y){return v&&v.get(y)},has:function(y){return!!v&&v.has(y)},set:function(y,m){v||(v=b()),v.set(y,m)}};return O},_r}var xr,Ut;function Lr(){if(Ut)return xr;Ut=1;var e=String.prototype.replace,a=/%20/g,f={RFC1738:"RFC1738",RFC3986:"RFC3986"};return xr={default:f.RFC3986,formatters:{RFC1738:function(l){return e.call(l,a,"+")},RFC3986:function(l){return String(l)}},RFC1738:f.RFC1738,RFC3986:f.RFC3986},xr}var Fr,zt;function rn(){if(zt)return Fr;zt=1;var e=Lr(),a=en(),f=Object.prototype.hasOwnProperty,l=Array.isArray,g=a(),b=function(o,c){return g.set(o,c),o},P=function(o){return g.has(o)},v=function(o){return g.get(o)},O=function(o,c){g.set(o,c)},y=(function(){for(var R=[],o=0;o<256;++o)R[R.length]="%"+((o<16?"0":"")+o.toString(16)).toUpperCase();return R})(),m=function(o){for(;o.length>1;){var c=o.pop(),p=c.obj[c.prop];if(l(p)){for(var S=[],_=0;_<p.length;++_)typeof p[_]<"u"&&(S[S.length]=p[_]);c.obj[c.prop]=S}}},d=function(o,c){for(var p=c&&c.plainObjects?{__proto__:null}:{},S=0;S<o.length;++S)typeof o[S]<"u"&&(p[S]=o[S]);return p},F=function R(o,c,p){if(!c)return o;if(typeof c!="object"&&typeof c!="function"){if(l(o)){var S=o.length;if(p&&typeof p.arrayLimit=="number"&&S>p.arrayLimit)return b(d(o.concat(c),p),S);o[S]=c}else if(o&&typeof o=="object")if(P(o)){var _=v(o)+1;o[_]=c,O(o,_)}else{if(p&&p.strictMerge)return[o,c];(p&&(p.plainObjects||p.allowPrototypes)||!f.call(Object.prototype,c))&&(o[c]=!0)}else return[o,c];return o}if(!o||typeof o!="object"){if(P(c)){for(var x=Object.keys(c),B=p&&p.plainObjects?{__proto__:null,0:o}:{0:o},N=0;N<x.length;N++){var k=parseInt(x[N],10);B[k+1]=c[x[N]]}return b(B,v(c)+1)}var D=[o].concat(c);return p&&typeof p.arrayLimit=="number"&&D.length>p.arrayLimit?b(d(D,p),D.length-1):D}var K=o;return l(o)&&!l(c)&&(K=d(o,p)),l(o)&&l(c)?(c.forEach(function(s,$){if(f.call(o,$)){var j=o[$];j&&typeof j=="object"&&s&&typeof s=="object"?o[$]=R(j,s,p):o[o.length]=s}else o[$]=s}),o):Object.keys(c).reduce(function(s,$){var j=c[$];if(f.call(s,$)?s[$]=R(s[$],j,p):s[$]=j,P(c)&&!P(s)&&b(s,v(c)),P(s)){var X=parseInt($,10);String(X)===$&&X>=0&&X>v(s)&&O(s,X)}return s},K)},A=function(o,c){return Object.keys(c).reduce(function(p,S){return p[S]=c[S],p},o)},n=function(R,o,c){var p=R.replace(/\+/g," ");if(c==="iso-8859-1")return p.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(p)}catch{return p}},u=1024,i=function(o,c,p,S,_){if(o.length===0)return o;var x=o;if(typeof o=="symbol"?x=Symbol.prototype.toString.call(o):typeof o!="string"&&(x=String(o)),p==="iso-8859-1")return escape(x).replace(/%u[0-9a-f]{4}/gi,function($){return"%26%23"+parseInt($.slice(2),16)+"%3B"});for(var B="",N=0;N<x.length;N+=u){for(var k=x.length>=u?x.slice(N,N+u):x,D=[],K=0;K<k.length;++K){var s=k.charCodeAt(K);if(s===45||s===46||s===95||s===126||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||_===e.RFC1738&&(s===40||s===41)){D[D.length]=k.charAt(K);continue}if(s<128){D[D.length]=y[s];continue}if(s<2048){D[D.length]=y[192|s>>6]+y[128|s&63];continue}if(s<55296||s>=57344){D[D.length]=y[224|s>>12]+y[128|s>>6&63]+y[128|s&63];continue}K+=1,s=65536+((s&1023)<<10|k.charCodeAt(K)&1023),D[D.length]=y[240|s>>18]+y[128|s>>12&63]+y[128|s>>6&63]+y[128|s&63]}B+=D.join("")}return B},I=function(o){for(var c=[{obj:{o},prop:"o"}],p=[],S=0;S<c.length;++S)for(var _=c[S],x=_.obj[_.prop],B=Object.keys(x),N=0;N<B.length;++N){var k=B[N],D=x[k];typeof D=="object"&&D!==null&&p.indexOf(D)===-1&&(c[c.length]={obj:x,prop:k},p[p.length]=D)}return m(c),o},w=function(o){return Object.prototype.toString.call(o)==="[object RegExp]"},E=function(o){return!o||typeof o!="object"?!1:!!(o.constructor&&o.constructor.isBuffer&&o.constructor.isBuffer(o))},M=function(o,c,p,S){if(P(o)){var _=v(o)+1;return o[_]=c,O(o,_),o}var x=[].concat(o,c);return x.length>p?b(d(x,{plainObjects:S}),x.length-1):x},h=function(o,c){if(l(o)){for(var p=[],S=0;S<o.length;S+=1)p[p.length]=c(o[S]);return p}return c(o)};return Fr={arrayToObject:d,assign:A,combine:M,compact:I,decode:n,encode:i,isBuffer:E,isOverflow:P,isRegExp:w,markOverflow:b,maybeMap:h,merge:F},Fr}var qr,Wt;function kn(){if(Wt)return qr;Wt=1;var e=en(),a=rn(),f=Lr(),l=Object.prototype.hasOwnProperty,g={brackets:function(i){return i+"[]"},comma:"comma",indices:function(i,I){return i+"["+I+"]"},repeat:function(i){return i}},b=Array.isArray,P=Array.prototype.push,v=function(u,i){P.apply(u,b(i)?i:[i])},O=Date.prototype.toISOString,y=f.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:a.encode,encodeValuesOnly:!1,filter:void 0,format:y,formatter:f.formatters[y],indices:!1,serializeDate:function(i){return O.call(i)},skipNulls:!1,strictNullHandling:!1},d=function(i){return typeof i=="string"||typeof i=="number"||typeof i=="boolean"||typeof i=="symbol"||typeof i=="bigint"},F={},A=function u(i,I,w,E,M,h,R,o,c,p,S,_,x,B,N,k,D,K){for(var s=i,$=K,j=0,X=!1;($=$.get(F))!==void 0&&!X;){var ce=$.get(i);if(j+=1,typeof ce<"u"){if(ce===j)throw new RangeError("Cyclic object value");X=!0}typeof $.get(F)>"u"&&(j=0)}if(typeof p=="function"?s=p(I,s):s instanceof Date?s=x(s):w==="comma"&&b(s)&&(s=a.maybeMap(s,function(V){return V instanceof Date?x(V):V})),s===null){if(h)return c&&!k?c(I,m.encoder,D,"key",B):I;s=""}if(d(s)||a.isBuffer(s)){if(c){var ve=k?I:c(I,m.encoder,D,"key",B);return[N(ve)+"="+N(c(s,m.encoder,D,"value",B))]}return[N(I)+"="+N(String(s))]}var ee=[];if(typeof s>"u")return ee;var ne;if(w==="comma"&&b(s))k&&c&&(s=a.maybeMap(s,c)),ne=[{value:s.length>0?s.join(",")||null:void 0}];else if(b(p))ne=p;else{var Z=Object.keys(s);ne=S?Z.sort(S):Z}var ae=o?String(I).replace(/\./g,"%2E"):String(I),ie=E&&b(s)&&s.length===1?ae+"[]":ae;if(M&&b(s)&&s.length===0)return ie+"[]";for(var oe=0;oe<ne.length;++oe){var Q=ne[oe],T=typeof Q=="object"&&Q&&typeof Q.value<"u"?Q.value:s[Q];if(!(R&&T===null)){var G=_&&o?String(Q).replace(/\./g,"%2E"):String(Q),z=b(s)?typeof w=="function"?w(ie,G):ie:ie+(_?"."+G:"["+G+"]");K.set(i,j);var H=e();H.set(F,K),v(ee,u(T,z,w,E,M,h,R,o,w==="comma"&&k&&b(s)?null:c,p,S,_,x,B,N,k,D,H))}}return ee},n=function(i){if(!i)return m;if(typeof i.allowEmptyArrays<"u"&&typeof i.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof i.encodeDotInKeys<"u"&&typeof i.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(i.encoder!==null&&typeof i.encoder<"u"&&typeof i.encoder!="function")throw new TypeError("Encoder has to be a function.");var I=i.charset||m.charset;if(typeof i.charset<"u"&&i.charset!=="utf-8"&&i.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var w=f.default;if(typeof i.format<"u"){if(!l.call(f.formatters,i.format))throw new TypeError("Unknown format option provided.");w=i.format}var E=f.formatters[w],M=m.filter;(typeof i.filter=="function"||b(i.filter))&&(M=i.filter);var h;if(i.arrayFormat in g?h=i.arrayFormat:"indices"in i?h=i.indices?"indices":"repeat":h=m.arrayFormat,"commaRoundTrip"in i&&typeof i.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var R=typeof i.allowDots>"u"?i.encodeDotInKeys===!0?!0:m.allowDots:!!i.allowDots;return{addQueryPrefix:typeof i.addQueryPrefix=="boolean"?i.addQueryPrefix:m.addQueryPrefix,allowDots:R,allowEmptyArrays:typeof i.allowEmptyArrays=="boolean"?!!i.allowEmptyArrays:m.allowEmptyArrays,arrayFormat:h,charset:I,charsetSentinel:typeof i.charsetSentinel=="boolean"?i.charsetSentinel:m.charsetSentinel,commaRoundTrip:!!i.commaRoundTrip,delimiter:typeof i.delimiter>"u"?m.delimiter:i.delimiter,encode:typeof i.encode=="boolean"?i.encode:m.encode,encodeDotInKeys:typeof i.encodeDotInKeys=="boolean"?i.encodeDotInKeys:m.encodeDotInKeys,encoder:typeof i.encoder=="function"?i.encoder:m.encoder,encodeValuesOnly:typeof i.encodeValuesOnly=="boolean"?i.encodeValuesOnly:m.encodeValuesOnly,filter:M,format:w,formatter:E,serializeDate:typeof i.serializeDate=="function"?i.serializeDate:m.serializeDate,skipNulls:typeof i.skipNulls=="boolean"?i.skipNulls:m.skipNulls,sort:typeof i.sort=="function"?i.sort:null,strictNullHandling:typeof i.strictNullHandling=="boolean"?i.strictNullHandling:m.strictNullHandling}};return qr=function(u,i){var I=u,w=n(i),E,M;typeof w.filter=="function"?(M=w.filter,I=M("",I)):b(w.filter)&&(M=w.filter,E=M);var h=[];if(typeof I!="object"||I===null)return"";var R=g[w.arrayFormat],o=R==="comma"&&w.commaRoundTrip;E||(E=Object.keys(I)),w.sort&&E.sort(w.sort);for(var c=e(),p=0;p<E.length;++p){var S=E[p],_=I[S];w.skipNulls&&_===null||v(h,A(_,S,R,o,w.allowEmptyArrays,w.strictNullHandling,w.skipNulls,w.encodeDotInKeys,w.encode?w.encoder:null,w.filter,w.sort,w.allowDots,w.serializeDate,w.format,w.formatter,w.encodeValuesOnly,w.charset,c))}var x=h.join(w.delimiter),B=w.addQueryPrefix===!0?"?":"";return w.charsetSentinel&&(w.charset==="iso-8859-1"?B+="utf8=%26%2310003%3B&":B+="utf8=%E2%9C%93&"),x.length>0?B+x:""},qr}var Mr,kt;function Gn(){if(kt)return Mr;kt=1;var e=rn(),a=Object.prototype.hasOwnProperty,f=Array.isArray,l={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},g=function(A){return A.replace(/&#(\d+);/g,function(n,u){return String.fromCharCode(parseInt(u,10))})},b=function(A,n,u){if(A&&typeof A=="string"&&n.comma&&A.indexOf(",")>-1)return A.split(",");if(n.throwOnLimitExceeded&&u>=n.arrayLimit)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");return A},P="utf8=%26%2310003%3B",v="utf8=%E2%9C%93",O=function(n,u){var i={__proto__:null},I=u.ignoreQueryPrefix?n.replace(/^\?/,""):n;I=I.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var w=u.parameterLimit===1/0?void 0:u.parameterLimit,E=I.split(u.delimiter,u.throwOnLimitExceeded?w+1:w);if(u.throwOnLimitExceeded&&E.length>w)throw new RangeError("Parameter limit exceeded. Only "+w+" parameter"+(w===1?"":"s")+" allowed.");var M=-1,h,R=u.charset;if(u.charsetSentinel)for(h=0;h<E.length;++h)E[h].indexOf("utf8=")===0&&(E[h]===v?R="utf-8":E[h]===P&&(R="iso-8859-1"),M=h,h=E.length);for(h=0;h<E.length;++h)if(h!==M){var o=E[h],c=o.indexOf("]="),p=c===-1?o.indexOf("="):c+1,S,_;if(p===-1?(S=u.decoder(o,l.decoder,R,"key"),_=u.strictNullHandling?null:""):(S=u.decoder(o.slice(0,p),l.decoder,R,"key"),S!==null&&(_=e.maybeMap(b(o.slice(p+1),u,f(i[S])?i[S].length:0),function(B){return u.decoder(B,l.decoder,R,"value")}))),_&&u.interpretNumericEntities&&R==="iso-8859-1"&&(_=g(String(_))),o.indexOf("[]=")>-1&&(_=f(_)?[_]:_),u.comma&&f(_)&&_.length>u.arrayLimit){if(u.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+u.arrayLimit+" element"+(u.arrayLimit===1?"":"s")+" allowed in an array.");_=e.combine([],_,u.arrayLimit,u.plainObjects)}if(S!==null){var x=a.call(i,S);x&&(u.duplicates==="combine"||o.indexOf("[]=")>-1)?i[S]=e.combine(i[S],_,u.arrayLimit,u.plainObjects):(!x||u.duplicates==="last")&&(i[S]=_)}}return i},y=function(A,n,u,i){var I=0;if(A.length>0&&A[A.length-1]==="[]"){var w=A.slice(0,-1).join("");I=Array.isArray(n)&&n[w]?n[w].length:0}for(var E=i?n:b(n,u,I),M=A.length-1;M>=0;--M){var h,R=A[M];if(R==="[]"&&u.parseArrays)e.isOverflow(E)?h=E:h=u.allowEmptyArrays&&(E===""||u.strictNullHandling&&E===null)?[]:e.combine([],E,u.arrayLimit,u.plainObjects);else{h=u.plainObjects?{__proto__:null}:{};var o=R.charAt(0)==="["&&R.charAt(R.length-1)==="]"?R.slice(1,-1):R,c=u.decodeDotInKeys?o.replace(/%2E/g,"."):o,p=parseInt(c,10),S=!isNaN(p)&&R!==c&&String(p)===c&&p>=0&&u.parseArrays;if(!u.parseArrays&&c==="")h={0:E};else if(S&&p<u.arrayLimit)h=[],h[p]=E;else{if(S&&u.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+u.arrayLimit+" element"+(u.arrayLimit===1?"":"s")+" allowed in an array.");S?(h[p]=E,e.markOverflow(h,p)):c!=="__proto__"&&(h[c]=E)}}E=h}return E},m=function(n,u){var i=u.allowDots?n.replace(/\.([^.[]+)/g,"[$1]"):n;if(u.depth<=0)return!u.plainObjects&&a.call(Object.prototype,i)&&!u.allowPrototypes?void 0:[i];var I=/(\[[^[\]]*])/,w=/(\[[^[\]]*])/g,E=I.exec(i),M=E?i.slice(0,E.index):i,h=[];if(M){if(!u.plainObjects&&a.call(Object.prototype,M)&&!u.allowPrototypes)return;h[h.length]=M}for(var R=0;(E=w.exec(i))!==null&&R<u.depth;){R+=1;var o=E[1].slice(1,-1);if(!u.plainObjects&&a.call(Object.prototype,o)&&!u.allowPrototypes)return;h[h.length]=E[1]}if(E){if(u.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+u.depth+" and strictDepth is true");h[h.length]="["+i.slice(E.index)+"]"}return h},d=function(n,u,i,I){if(n){var w=m(n,i);if(w)return y(w,u,i,I)}},F=function(n){if(!n)return l;if(typeof n.allowEmptyArrays<"u"&&typeof n.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof n.decodeDotInKeys<"u"&&typeof n.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(n.decoder!==null&&typeof n.decoder<"u"&&typeof n.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof n.charset<"u"&&n.charset!=="utf-8"&&n.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof n.throwOnLimitExceeded<"u"&&typeof n.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var u=typeof n.charset>"u"?l.charset:n.charset,i=typeof n.duplicates>"u"?l.duplicates:n.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var I=typeof n.allowDots>"u"?n.decodeDotInKeys===!0?!0:l.allowDots:!!n.allowDots;return{allowDots:I,allowEmptyArrays:typeof n.allowEmptyArrays=="boolean"?!!n.allowEmptyArrays:l.allowEmptyArrays,allowPrototypes:typeof n.allowPrototypes=="boolean"?n.allowPrototypes:l.allowPrototypes,allowSparse:typeof n.allowSparse=="boolean"?n.allowSparse:l.allowSparse,arrayLimit:typeof n.arrayLimit=="number"?n.arrayLimit:l.arrayLimit,charset:u,charsetSentinel:typeof n.charsetSentinel=="boolean"?n.charsetSentinel:l.charsetSentinel,comma:typeof n.comma=="boolean"?n.comma:l.comma,decodeDotInKeys:typeof n.decodeDotInKeys=="boolean"?n.decodeDotInKeys:l.decodeDotInKeys,decoder:typeof n.decoder=="function"?n.decoder:l.decoder,delimiter:typeof n.delimiter=="string"||e.isRegExp(n.delimiter)?n.delimiter:l.delimiter,depth:typeof n.depth=="number"||n.depth===!1?+n.depth:l.depth,duplicates:i,ignoreQueryPrefix:n.ignoreQueryPrefix===!0,interpretNumericEntities:typeof n.interpretNumericEntities=="boolean"?n.interpretNumericEntities:l.interpretNumericEntities,parameterLimit:typeof n.parameterLimit=="number"?n.parameterLimit:l.parameterLimit,parseArrays:n.parseArrays!==!1,plainObjects:typeof n.plainObjects=="boolean"?n.plainObjects:l.plainObjects,strictDepth:typeof n.strictDepth=="boolean"?!!n.strictDepth:l.strictDepth,strictMerge:typeof n.strictMerge=="boolean"?!!n.strictMerge:l.strictMerge,strictNullHandling:typeof n.strictNullHandling=="boolean"?n.strictNullHandling:l.strictNullHandling,throwOnLimitExceeded:typeof n.throwOnLimitExceeded=="boolean"?n.throwOnLimitExceeded:!1}};return Mr=function(A,n){var u=F(n);if(A===""||A===null||typeof A>"u")return u.plainObjects?{__proto__:null}:{};for(var i=typeof A=="string"?O(A,u):A,I=u.plainObjects?{__proto__:null}:{},w=Object.keys(i),E=0;E<w.length;++E){var M=w[E],h=d(M,i[M],u,typeof A=="string");I=e.merge(I,h,u)}return u.allowSparse===!0?I:e.compact(I)},Mr}var Dr,Gt;function Hn(){if(Gt)return Dr;Gt=1;var e=kn(),a=Gn(),f=Lr();return Dr={formats:f,parse:a,stringify:e},Dr}var jn=Hn(),de=(e=>(e.Complete="complete",e.Error="error",e.WidgetResize="widget-resize",e.PopoverResize="popover-resize",e.FullscreenResize="fullscreen-resize",e.Expire="expire",e))(de||{}),$r=(e=>(e.Resize="resize",e.Destroy="destroy",e))($r||{}),Re=(e=>(e.Development="http://localhost:3000",e.Staging="https://relay.withpersona-staging.com",e.Production="https://relay.withpersona.com",e))(Re||{});function Kn(e){try{const a=new URL(e);return a.hostname==="localhost"?!0:!(a.protocol!=="https:"||!a.hostname||!a.hostname.includes("."))}catch{return!1}}function Br(e){switch(e){case"development":return Re.Development;case"staging":return Re.Staging;case"production":case void 0:case null:return Re.Production;default:if(typeof e=="string"){const a=e.startsWith("localhost")?`http://${e}`:`https://${e}`;if(Kn(a))return a.replace(/\/$/,"")}return console.warn(`[PersonaRelay] Invalid host: "${e}". Expected 'development', 'staging', 'production', or a valid hostname/URL. Falling back to 'production'.`),Re.Production}}const Qn="0.1.2",Vn=["allow-scripts","allow-same-origin","allow-popups"],Jn=["allow-forms","allow-modals","allow-top-navigation-by-user-activation"];function Cr(e,a,{accessToken:f,host:l,theme:g},b="/relay-widget"){if(!f)throw new Error("[PersonaRelay] accessToken is required to initialize the relay widget");const P=Br(l),v=jn.stringify({"client-version":Qn,"container-id":a,"relay-session-access-token":f,theme:g},{addQueryPrefix:!0,skipNulls:!0});return b==="/relay-popover"?(e.title="Relay popover",e.className="relay-widget__popover-iframe",e.allow="clipboard-write"):b==="/relay-fullscreen"?(e.title="Relay fullscreen",e.className="relay-widget__fullscreen-iframe",e.allow="camera;microphone;clipboard-write"):(e.title="Verify via Relay",e.className="relay-widget__iframe",e.allow="clipboard-write"),e.setAttribute("sandbox",Vn.concat(Jn).join(" ")),e.referrerPolicy="no-referrer",e.src=P+b+v,e}function Ht(e){if(e==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(e))return e;const a=e.split(".");return a.length<=1?e:a.slice(-2).join(".")}function Yn(e,{onComplete:a,onError:f,onExpire:l,onWidgetResize:g,onPopoverResize:b,onFullscreenResize:P,host:v}){const O=y=>{const m=Br(v??"production");if(y.origin!=="")try{const F=Ht(new URL(y.origin).host),A=Ht(new URL(m).host);if(F!==A)return}catch{return}if(e!==y.data.containerId)return;const d=y.data;switch(d.name){case de.Complete:a?.();break;case de.Error:f?.(d.error);break;case de.WidgetResize:g?.(d.metadata);break;case de.PopoverResize:b?.(d.metadata);break;case de.FullscreenResize:P?.(d.metadata);break;case de.Expire:l?.();break}};return window.addEventListener("message",O),()=>{window.removeEventListener("message",O)}}function Xn(){return"relay-widget-"+crypto.randomUUID()}class Zn{constructor(a){this.id=a}isMounted(){return document.getElementById(this.id)!=null}mount(a){if(document.getElementById(this.id)){console.warn(`[PersonaRelay] Stylesheet ${this.id} already appended. Skipping.`);return}const f=tn("style",{id:this.id},[document.createTextNode(a)]);document.head.appendChild(f)}unmount(){const a=document.getElementById(this.id);if(a==null){console.warn(`[PersonaRelay] No stylesheet ${this.id} to remove. Skipping.`);return}a.parentNode?.removeChild(a)}}function tn(e,a,f=[]){const l=document.createElement(e);for(let[g,b]of Object.entries(a))g==="className"&&(g="class"),l.setAttribute(g,b);for(const g of f)g!==!1&&(typeof g=="string"?l.appendChild(document.createTextNode(g)):l.appendChild(g));return l}const ea=".relay-widget__container{position:relative;width:100%;color-scheme:light dark}.relay-widget__iframe{border:none;background:transparent;display:block;width:100%;height:0px}.relay-widget__popover-iframe{border:none;background:transparent;display:block;position:absolute;bottom:100%;left:-32px;transform:translateY(28px);width:calc(100% + 64px);height:0px}.relay-widget__fullscreen-iframe{border:none;background:transparent;display:none;height:0px}.relay-widget__fullscreen-iframe--visible{display:block;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483647}.relay-widget__scroll-locked{overflow:hidden!important}";class ra{constructor(a,f){this.relayCSS=new Zn("relay-widget-styles"),this.resizeObserver=null,this.removeResizeListener=null,this.options=f,this.baseUrl=Br(this.options.host),this.containerParent=this.resolveContainer(a),this.containerId=Xn(),this.containerElement=tn("div",{class:"relay-widget__container",id:this.containerId}),this.iframeElement=document.createElement("iframe"),this.popoverIframeElement=document.createElement("iframe"),this.fullscreenIframeElement=document.createElement("iframe"),this.unsubscribeFromEvents=Yn(this.containerId,{onComplete:this.options.onComplete??null,onError:this.options.onError??null,onExpire:this.options.onExpire??null,onWidgetResize:l=>this.handleWidgetResize(l),onPopoverResize:l=>this.handlePopoverResize(l),onFullscreenResize:l=>this.handleFullscreenResize(l),host:this.options.host??null}),this.containerElement.appendChild(this.iframeElement),this.containerElement.appendChild(this.popoverIframeElement),this.containerParent.appendChild(this.containerElement),document.body.appendChild(this.fullscreenIframeElement),this.relayCSS.mount(ea);try{Cr(this.iframeElement,this.containerId,this.options,"/relay-widget"),Cr(this.popoverIframeElement,this.containerId,this.options,"/relay-popover"),Cr(this.fullscreenIframeElement,this.containerId,this.options,"/relay-fullscreen")}catch(l){throw console.error("[PersonaRelay]",l),this.destroy(),l}this.setupResizeObserver()}resolveContainer(a){if(a instanceof HTMLElement)return a;const f=document.querySelector(a);if(!f)throw new Error(`[PersonaRelay] Container element not found for selector: "${a}"`);return f}handleWidgetResize({height:a}){this.iframeElement.style.height=`${a}px`}handlePopoverResize({height:a}){const f=a>0?a+64:0;this.popoverIframeElement.style.height=`${f}px`}handleFullscreenResize({fullscreen:a}){a?(this.lockScroll(),this.fullscreenIframeElement.classList.add("relay-widget__fullscreen-iframe--visible")):(this.fullscreenIframeElement.classList.remove("relay-widget__fullscreen-iframe--visible"),this.unlockScroll())}lockScroll(){document.body.classList.add("relay-widget__scroll-locked")}unlockScroll(){document.body.classList.remove("relay-widget__scroll-locked")}sendResize(){const{clientWidth:a,clientHeight:f}=document.body,l={action:$r.Resize,containerId:this.containerId,metadata:{width:a,height:f}};this.iframeElement.contentWindow?.postMessage(l,this.baseUrl),this.popoverIframeElement.contentWindow?.postMessage(l,this.baseUrl),this.fullscreenIframeElement.contentWindow?.postMessage(l,this.baseUrl)}setupResizeObserver(){this.iframeElement.addEventListener("load",()=>this.sendResize(),{once:!0});const a=()=>this.sendResize();window.addEventListener("resize",a),this.removeResizeListener=()=>window.removeEventListener("resize",a)}destroy(){const a={action:$r.Destroy,metadata:{}};this.iframeElement.contentWindow?.postMessage(a,this.baseUrl),this.popoverIframeElement.contentWindow?.postMessage(a,this.baseUrl),this.fullscreenIframeElement.contentWindow?.postMessage(a,this.baseUrl),this.relayCSS.unmount(),this.unlockScroll(),this.resizeObserver?.disconnect(),this.resizeObserver=null,this.removeResizeListener?.(),this.removeResizeListener=null,this.containerElement.parentNode&&this.containerParent.removeChild(this.containerElement),this.fullscreenIframeElement.parentNode&&this.fullscreenIframeElement.parentNode.removeChild(this.fullscreenIframeElement),this.unsubscribeFromEvents()}}module.exports=ra;
1
+ "use strict";var de=(e=>(e.Complete="complete",e.Error="error",e.WidgetResize="widget-resize",e.PopoverResize="popover-resize",e.FullscreenResize="fullscreen-resize",e.Expire="expire",e))(de||{}),Mr=(e=>(e.Resize="resize",e.Destroy="destroy",e))(Mr||{}),Ae=(e=>(e.Development="http://localhost:3000",e.Staging="https://relay.withpersona-staging.com",e.Production="https://relay.withpersona.com",e))(Ae||{});function nn(e){try{const i=new URL(e);return i.hostname==="localhost"?!0:!(i.protocol!=="https:"||!i.hostname||!i.hostname.includes("."))}catch{return!1}}function Fr(e){switch(e){case"development":return Ae.Development;case"staging":return Ae.Staging;case"production":case void 0:case null:return Ae.Production;default:if(typeof e=="string"){const i=e.startsWith("localhost")?`http://${e}`:`https://${e}`;if(nn(i))return i.replace(/\/$/,"")}return console.warn(`[PersonaRelay] Invalid host: "${e}". Expected 'development', 'staging', 'production', or a valid hostname/URL. Falling back to 'production'.`),Ae.Production}}function an(){return"relay-widget-"+crypto.randomUUID()}class on{constructor(i){this.id=i}isMounted(){return document.getElementById(this.id)!=null}mount(i){if(document.getElementById(this.id)){console.warn(`[PersonaRelay] Stylesheet ${this.id} already appended. Skipping.`);return}const u=Bt("style",{id:this.id},[document.createTextNode(i)]);document.head.appendChild(u)}unmount(){const i=document.getElementById(this.id);if(i==null){console.warn(`[PersonaRelay] No stylesheet ${this.id} to remove. Skipping.`);return}i.parentNode?.removeChild(i)}}function Bt(e,i,u=[]){const l=document.createElement(e);for(const[g,w]of Object.entries(i)){const R=g==="className"?"class":g;l.setAttribute(R,w)}for(const g of u)g!==!1&&(typeof g=="string"?l.appendChild(document.createTextNode(g)):l.appendChild(g));return l}const ln=".relay-widget__container{position:relative;width:100%;color-scheme:light dark}.relay-widget__iframe{border:none;background:transparent;display:block;width:100%;height:0px}.relay-widget__popover-iframe{border:none;background:transparent;display:block;position:absolute;bottom:100%;left:-32px;transform:translateY(28px);width:calc(100% + 64px);height:0px}.relay-widget__fullscreen-iframe{border:none;background:transparent;display:none;height:0px;color-scheme:light dark}.relay-widget__fullscreen-iframe--visible{display:block;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483647}.relay-widget__scroll-locked{overflow:hidden!important}";function jr(e){if(e==="localhost"||/^\d+\.\d+\.\d+\.\d+$/.test(e))return e;const i=e.split(".");return i.length<=1?e:i.slice(-2).join(".")}function fn(e,{onComplete:i,onError:u,onExpire:l,onWidgetResize:g,onPopoverResize:w,onFullscreenResize:R,host:v}){const O=p=>{const m=Fr(v??"production");if(p.origin!=="")try{const M=jr(new URL(p.origin).host),A=jr(new URL(m).host);if(M!==A)return}catch{return}if(e!==p.data.containerId)return;const y=p.data;switch(y.name){case de.Complete:i?.();break;case de.Error:u?.(y.error);break;case de.WidgetResize:g?.(y.metadata);break;case de.PopoverResize:w?.(y.metadata);break;case de.FullscreenResize:R?.(y.metadata);break;case de.Expire:l?.();break}};return window.addEventListener("message",O),()=>{window.removeEventListener("message",O)}}var Kr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function un(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var i=e.default;if(typeof i=="function"){var u=function l(){var g=!1;try{g=this instanceof l}catch{}return g?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};u.prototype=i.prototype}else u={};return Object.defineProperty(u,"__esModule",{value:!0}),Object.keys(e).forEach(function(l){var g=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(u,l,g.get?g:{enumerable:!0,get:function(){return e[l]}})}),u}var Be,Qr;function be(){return Qr||(Qr=1,Be=TypeError),Be}const cn={},sn=Object.freeze(Object.defineProperty({__proto__:null,default:cn},Symbol.toStringTag,{value:"Module"})),pn=un(sn);var Ue,Vr;function _e(){if(Vr)return Ue;Vr=1;var e=typeof Map=="function"&&Map.prototype,i=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,u=e&&i&&typeof i.get=="function"?i.get:null,l=e&&Map.prototype.forEach,g=typeof Set=="function"&&Set.prototype,w=Object.getOwnPropertyDescriptor&&g?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,R=g&&w&&typeof w.get=="function"?w.get:null,v=g&&Set.prototype.forEach,O=typeof WeakMap=="function"&&WeakMap.prototype,p=O?WeakMap.prototype.has:null,m=typeof WeakSet=="function"&&WeakSet.prototype,y=m?WeakSet.prototype.has:null,M=typeof WeakRef=="function"&&WeakRef.prototype,A=M?WeakRef.prototype.deref:null,a=Boolean.prototype.valueOf,f=Object.prototype.toString,o=Function.prototype.toString,I=String.prototype.match,h=String.prototype.slice,S=String.prototype.replace,D=String.prototype.toUpperCase,P=String.prototype.toLowerCase,b=RegExp.prototype.test,n=Array.prototype.concat,c=Array.prototype.join,d=Array.prototype.slice,E=Math.floor,_=typeof BigInt=="function"?BigInt.prototype.valueOf:null,x=Object.getOwnPropertySymbols,U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,F=typeof Symbol=="function"&&typeof Symbol.iterator=="object",W=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===F||!0)?Symbol.toStringTag:null,$=Object.prototype.propertyIsEnumerable,G=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function s(r,t){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||b.call(/e/,t))return t;var N=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var B=r<0?-E(-r):E(r);if(B!==r){var z=String(B),q=h.call(t,z.length+1);return S.call(z,N,"$&_")+"."+S.call(S.call(q,/([0-9]{3})/g,"$&_"),/_$/,"")}}return S.call(t,N,"$&_")}var T=pn,K=T.custom,X=Q(K)?K:null,ie={__proto__:null,double:'"',single:"'"},oe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Ue=function r(t,N,B,z){var q=N||{};if(J(q,"quoteStyle")&&!J(ie,q.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(J(q,"maxStringLength")&&(typeof q.maxStringLength=="number"?q.maxStringLength<0&&q.maxStringLength!==1/0:q.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var se=J(q,"customInspect")?q.customInspect:!0;if(typeof se!="boolean"&&se!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(J(q,"indent")&&q.indent!==null&&q.indent!==" "&&!(parseInt(q.indent,10)===q.indent&&q.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(J(q,"numericSeparator")&&typeof q.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ye=q.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Nr(t,q);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var Y=String(t);return ye?s(t,Y):Y}if(typeof t=="bigint"){var pe=String(t)+"n";return ye?s(t,pe):pe}var Fe=typeof q.depth>"u"?5:q.depth;if(typeof B>"u"&&(B=0),B>=Fe&&Fe>0&&typeof t=="object")return fe(t)?"[Array]":"[Object]";var we=en(q,B);if(typeof z>"u")z=[];else if(ce(z,t)>=0)return"[Circular]";function ne(Se,Ie,tn){if(Ie&&(z=d.call(z),z.push(Ie)),tn){var Hr={depth:q.depth};return J(q,"quoteStyle")&&(Hr.quoteStyle=q.quoteStyle),r(Se,Hr,B+1,z)}return r(Se,q,B+1,z)}if(typeof t=="function"&&!j(t)){var Lr=ve(t),Br=Re(t,ne);return"[Function"+(Lr?": "+Lr:" (anonymous)")+"]"+(Br.length>0?" { "+c.call(Br,", ")+" }":"")}if(Q(t)){var Ur=F?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):U.call(t);return typeof t=="object"&&!F?Ee(Ur):Ur}if(Yt(t)){for(var Oe="<"+P.call(String(t.nodeName)),De=t.attributes||[],Pe=0;Pe<De.length;Pe++)Oe+=" "+De[Pe].name+"="+le(ae(De[Pe].value),"double",q);return Oe+=">",t.childNodes&&t.childNodes.length&&(Oe+="..."),Oe+="</"+P.call(String(t.nodeName))+">",Oe}if(fe(t)){if(t.length===0)return"[]";var Ce=Re(t,ne);return we&&!Zt(Ce)?"["+Me(Ce,we)+"]":"[ "+c.call(Ce,", ")+" ]"}if(C(t)){var $e=Re(t,ne);return!("cause"in Error.prototype)&&"cause"in t&&!$.call(t,"cause")?"{ ["+String(t)+"] "+c.call(n.call("[cause]: "+ne(t.cause),$e),", ")+" }":$e.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+c.call($e,", ")+" }"}if(typeof t=="object"&&se){if(X&&typeof t[X]=="function"&&T)return T(t,{depth:Fe-B});if(se!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(te(t)){var zr=[];return l&&l.call(t,function(Se,Ie){zr.push(ne(Ie,t,!0)+" => "+ne(Se,t))}),Tr("Map",u.call(t),zr,we)}if(ge(t)){var Wr=[];return v&&v.call(t,function(Se){Wr.push(ne(Se,t))}),Tr("Set",R.call(t),Wr,we)}if(he(t))return qe("WeakMap");if(Jt(t))return qe("WeakSet");if(me(t))return qe("WeakRef");if(L(t))return Ee(ne(Number(t)));if(ee(t))return Ee(ne(_.call(t)));if(H(t))return Ee(a.call(t));if(k(t))return Ee(ne(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Kr<"u"&&t===Kr)return"{ [object globalThis] }";if(!ue(t)&&!j(t)){var Ne=Re(t,ne),kr=G?G(t)===Object.prototype:t instanceof Object||t.constructor===Object,Te=t instanceof Object?"":"null prototype",Gr=!kr&&W&&Object(t)===t&&W in t?h.call(re(t),8,-1):Te?"Object":"",rn=kr||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Le=rn+(Gr||Te?"["+c.call(n.call([],Gr||[],Te||[]),": ")+"] ":"");return Ne.length===0?Le+"{}":we?Le+"{"+Me(Ne,we)+"}":Le+"{ "+c.call(Ne,", ")+" }"}return String(t)};function le(r,t,N){var B=N.quoteStyle||t,z=ie[B];return z+r+z}function ae(r){return S.call(String(r),/"/g,"&quot;")}function Z(r){return!W||!(typeof r=="object"&&(W in r||typeof r[W]<"u"))}function fe(r){return re(r)==="[object Array]"&&Z(r)}function ue(r){return re(r)==="[object Date]"&&Z(r)}function j(r){return re(r)==="[object RegExp]"&&Z(r)}function C(r){return re(r)==="[object Error]"&&Z(r)}function k(r){return re(r)==="[object String]"&&Z(r)}function L(r){return re(r)==="[object Number]"&&Z(r)}function H(r){return re(r)==="[object Boolean]"&&Z(r)}function Q(r){if(F)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!U)return!1;try{return U.call(r),!0}catch{}return!1}function ee(r){if(!r||typeof r!="object"||!_)return!1;try{return _.call(r),!0}catch{}return!1}var V=Object.prototype.hasOwnProperty||function(r){return r in this};function J(r,t){return V.call(r,t)}function re(r){return f.call(r)}function ve(r){if(r.name)return r.name;var t=I.call(o.call(r),/^function\s*([\w$]+)/);return t?t[1]:null}function ce(r,t){if(r.indexOf)return r.indexOf(t);for(var N=0,B=r.length;N<B;N++)if(r[N]===t)return N;return-1}function te(r){if(!u||!r||typeof r!="object")return!1;try{u.call(r);try{R.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function he(r){if(!p||!r||typeof r!="object")return!1;try{p.call(r,p);try{y.call(r,y)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function me(r){if(!A||!r||typeof r!="object")return!1;try{return A.call(r),!0}catch{}return!1}function ge(r){if(!R||!r||typeof r!="object")return!1;try{R.call(r);try{u.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Jt(r){if(!y||!r||typeof r!="object")return!1;try{y.call(r,y);try{p.call(r,p)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function Yt(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function Nr(r,t){if(r.length>t.maxStringLength){var N=r.length-t.maxStringLength,B="... "+N+" more character"+(N>1?"s":"");return Nr(h.call(r,0,t.maxStringLength),t)+B}var z=oe[t.quoteStyle||"single"];z.lastIndex=0;var q=S.call(S.call(r,z,"\\$1"),/[\x00-\x1f]/g,Xt);return le(q,"single",t)}function Xt(r){var t=r.charCodeAt(0),N={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return N?"\\"+N:"\\x"+(t<16?"0":"")+D.call(t.toString(16))}function Ee(r){return"Object("+r+")"}function qe(r){return r+" { ? }"}function Tr(r,t,N,B){var z=B?Me(N,B):c.call(N,", ");return r+" ("+t+") {"+z+"}"}function Zt(r){for(var t=0;t<r.length;t++)if(ce(r[t],`
2
+ `)>=0)return!1;return!0}function en(r,t){var N;if(r.indent===" ")N=" ";else if(typeof r.indent=="number"&&r.indent>0)N=c.call(Array(r.indent+1)," ");else return null;return{base:N,prev:c.call(Array(t+1),N)}}function Me(r,t){if(r.length===0)return"";var N=`
3
+ `+t.prev+t.base;return N+c.call(r,","+N)+`
4
+ `+t.prev}function Re(r,t){var N=fe(r),B=[];if(N){B.length=r.length;for(var z=0;z<r.length;z++)B[z]=J(r,z)?t(r[z],r):""}var q=typeof x=="function"?x(r):[],se;if(F){se={};for(var ye=0;ye<q.length;ye++)se["$"+q[ye]]=q[ye]}for(var Y in r)J(r,Y)&&(N&&String(Number(Y))===Y&&Y<r.length||F&&se["$"+Y]instanceof Symbol||(b.call(/[^\w$]/,Y)?B.push(t(Y,r)+": "+t(r[Y],r)):B.push(Y+": "+t(r[Y],r))));if(typeof x=="function")for(var pe=0;pe<q.length;pe++)$.call(r,q[pe])&&B.push("["+t(q[pe])+"]: "+t(r[q[pe]],r));return B}return Ue}var ze,Jr;function yn(){if(Jr)return ze;Jr=1;var e=_e(),i=be(),u=function(v,O,p){for(var m=v,y;(y=m.next)!=null;m=y)if(y.key===O)return m.next=y.next,p||(y.next=v.next,v.next=y),y},l=function(v,O){if(v){var p=u(v,O);return p&&p.value}},g=function(v,O,p){var m=u(v,O);m?m.value=p:v.next={key:O,next:v.next,value:p}},w=function(v,O){return v?!!u(v,O):!1},R=function(v,O){if(v)return u(v,O,!0)};return ze=function(){var O,p={assert:function(m){if(!p.has(m))throw new i("Side channel does not contain "+e(m))},delete:function(m){var y=R(O,m);return y&&O&&!O.next&&(O=void 0),!!y},get:function(m){return l(O,m)},has:function(m){return w(O,m)},set:function(m,y){O||(O={next:void 0}),g(O,m,y)}};return p},ze}var We,Yr;function Ut(){return Yr||(Yr=1,We=Object),We}var ke,Xr;function dn(){return Xr||(Xr=1,ke=Error),ke}var Ge,Zr;function vn(){return Zr||(Zr=1,Ge=EvalError),Ge}var He,et;function hn(){return et||(et=1,He=RangeError),He}var je,rt;function mn(){return rt||(rt=1,je=ReferenceError),je}var Ke,tt;function gn(){return tt||(tt=1,Ke=SyntaxError),Ke}var Qe,nt;function wn(){return nt||(nt=1,Qe=URIError),Qe}var Ve,at;function Sn(){return at||(at=1,Ve=Math.abs),Ve}var Je,it;function bn(){return it||(it=1,Je=Math.floor),Je}var Ye,ot;function En(){return ot||(ot=1,Ye=Math.max),Ye}var Xe,lt;function On(){return lt||(lt=1,Xe=Math.min),Xe}var Ze,ft;function An(){return ft||(ft=1,Ze=Math.pow),Ze}var er,ut;function Rn(){return ut||(ut=1,er=Math.round),er}var rr,ct;function Pn(){return ct||(ct=1,rr=Number.isNaN||function(i){return i!==i}),rr}var tr,st;function In(){if(st)return tr;st=1;var e=Pn();return tr=function(u){return e(u)||u===0?u:u<0?-1:1},tr}var nr,pt;function _n(){return pt||(pt=1,nr=Object.getOwnPropertyDescriptor),nr}var ar,yt;function zt(){if(yt)return ar;yt=1;var e=_n();if(e)try{e([],"length")}catch{e=null}return ar=e,ar}var ir,dt;function xn(){if(dt)return ir;dt=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ir=e,ir}var or,vt;function qn(){return vt||(vt=1,or=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var i={},u=Symbol("test"),l=Object(u);if(typeof u=="string"||Object.prototype.toString.call(u)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var g=42;i[u]=g;for(var w in i)return!1;if(typeof Object.keys=="function"&&Object.keys(i).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(i).length!==0)return!1;var R=Object.getOwnPropertySymbols(i);if(R.length!==1||R[0]!==u||!Object.prototype.propertyIsEnumerable.call(i,u))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(i,u);if(v.value!==g||v.enumerable!==!0)return!1}return!0}),or}var lr,ht;function Mn(){if(ht)return lr;ht=1;var e=typeof Symbol<"u"&&Symbol,i=qn();return lr=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i()},lr}var fr,mt;function Wt(){return mt||(mt=1,fr=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),fr}var ur,gt;function kt(){if(gt)return ur;gt=1;var e=Ut();return ur=e.getPrototypeOf||null,ur}var cr,wt;function Fn(){if(wt)return cr;wt=1;var e="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,u=Math.max,l="[object Function]",g=function(O,p){for(var m=[],y=0;y<O.length;y+=1)m[y]=O[y];for(var M=0;M<p.length;M+=1)m[M+O.length]=p[M];return m},w=function(O,p){for(var m=[],y=p,M=0;y<O.length;y+=1,M+=1)m[M]=O[y];return m},R=function(v,O){for(var p="",m=0;m<v.length;m+=1)p+=v[m],m+1<v.length&&(p+=O);return p};return cr=function(O){var p=this;if(typeof p!="function"||i.apply(p)!==l)throw new TypeError(e+p);for(var m=w(arguments,1),y,M=function(){if(this instanceof y){var I=p.apply(this,g(m,arguments));return Object(I)===I?I:this}return p.apply(O,g(m,arguments))},A=u(0,p.length-m.length),a=[],f=0;f<A;f++)a[f]="$"+f;if(y=Function("binder","return function ("+R(a,",")+"){ return binder.apply(this,arguments); }")(M),p.prototype){var o=function(){};o.prototype=p.prototype,y.prototype=new o,o.prototype=null}return y},cr}var sr,St;function xe(){if(St)return sr;St=1;var e=Fn();return sr=Function.prototype.bind||e,sr}var pr,bt;function Dr(){return bt||(bt=1,pr=Function.prototype.call),pr}var yr,Et;function Gt(){return Et||(Et=1,yr=Function.prototype.apply),yr}var dr,Ot;function Dn(){return Ot||(Ot=1,dr=typeof Reflect<"u"&&Reflect&&Reflect.apply),dr}var vr,At;function Cn(){if(At)return vr;At=1;var e=xe(),i=Gt(),u=Dr(),l=Dn();return vr=l||e.call(u,i),vr}var hr,Rt;function Ht(){if(Rt)return hr;Rt=1;var e=xe(),i=be(),u=Dr(),l=Cn();return hr=function(w){if(w.length<1||typeof w[0]!="function")throw new i("a function is required");return l(e,u,w)},hr}var mr,Pt;function $n(){if(Pt)return mr;Pt=1;var e=Ht(),i=zt(),u;try{u=[].__proto__===Array.prototype}catch(R){if(!R||typeof R!="object"||!("code"in R)||R.code!=="ERR_PROTO_ACCESS")throw R}var l=!!u&&i&&i(Object.prototype,"__proto__"),g=Object,w=g.getPrototypeOf;return mr=l&&typeof l.get=="function"?e([l.get]):typeof w=="function"?function(v){return w(v==null?v:g(v))}:!1,mr}var gr,It;function Nn(){if(It)return gr;It=1;var e=Wt(),i=kt(),u=$n();return gr=e?function(g){return e(g)}:i?function(g){if(!g||typeof g!="object"&&typeof g!="function")throw new TypeError("getProto: not an object");return i(g)}:u?function(g){return u(g)}:null,gr}var wr,_t;function Tn(){if(_t)return wr;_t=1;var e=Function.prototype.call,i=Object.prototype.hasOwnProperty,u=xe();return wr=u.call(e,i),wr}var Sr,xt;function Cr(){if(xt)return Sr;xt=1;var e,i=Ut(),u=dn(),l=vn(),g=hn(),w=mn(),R=gn(),v=be(),O=wn(),p=Sn(),m=bn(),y=En(),M=On(),A=An(),a=Rn(),f=In(),o=Function,I=function(j){try{return o('"use strict"; return ('+j+").constructor;")()}catch{}},h=zt(),S=xn(),D=function(){throw new v},P=h?(function(){try{return arguments.callee,D}catch{try{return h(arguments,"callee").get}catch{return D}}})():D,b=Mn()(),n=Nn(),c=kt(),d=Wt(),E=Gt(),_=Dr(),x={},U=typeof Uint8Array>"u"||!n?e:n(Uint8Array),F={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":b&&n?n([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":x,"%AsyncGenerator%":x,"%AsyncGeneratorFunction%":x,"%AsyncIteratorPrototype%":x,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":u,"%eval%":eval,"%EvalError%":l,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":x,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":b&&n?n(n([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!b||!n?e:n(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":h,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":g,"%ReferenceError%":w,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!b||!n?e:n(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":b&&n?n(""[Symbol.iterator]()):e,"%Symbol%":b?Symbol:e,"%SyntaxError%":R,"%ThrowTypeError%":P,"%TypedArray%":U,"%TypeError%":v,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":O,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":_,"%Function.prototype.apply%":E,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":c,"%Math.abs%":p,"%Math.floor%":m,"%Math.max%":y,"%Math.min%":M,"%Math.pow%":A,"%Math.round%":a,"%Math.sign%":f,"%Reflect.getPrototypeOf%":d};if(n)try{null.error}catch(j){var W=n(n(j));F["%Error.prototype%"]=W}var $=function j(C){var k;if(C==="%AsyncFunction%")k=I("async function () {}");else if(C==="%GeneratorFunction%")k=I("function* () {}");else if(C==="%AsyncGeneratorFunction%")k=I("async function* () {}");else if(C==="%AsyncGenerator%"){var L=j("%AsyncGeneratorFunction%");L&&(k=L.prototype)}else if(C==="%AsyncIteratorPrototype%"){var H=j("%AsyncGenerator%");H&&n&&(k=n(H.prototype))}return F[C]=k,k},G={__proto__:null,"%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"]},s=xe(),T=Tn(),K=s.call(_,Array.prototype.concat),X=s.call(E,Array.prototype.splice),ie=s.call(_,String.prototype.replace),oe=s.call(_,String.prototype.slice),le=s.call(_,RegExp.prototype.exec),ae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Z=/\\(\\)?/g,fe=function(C){var k=oe(C,0,1),L=oe(C,-1);if(k==="%"&&L!=="%")throw new R("invalid intrinsic syntax, expected closing `%`");if(L==="%"&&k!=="%")throw new R("invalid intrinsic syntax, expected opening `%`");var H=[];return ie(C,ae,function(Q,ee,V,J){H[H.length]=V?ie(J,Z,"$1"):ee||Q}),H},ue=function(C,k){var L=C,H;if(T(G,L)&&(H=G[L],L="%"+H[0]+"%"),T(F,L)){var Q=F[L];if(Q===x&&(Q=$(L)),typeof Q>"u"&&!k)throw new v("intrinsic "+C+" exists, but is not available. Please file an issue!");return{alias:H,name:L,value:Q}}throw new R("intrinsic "+C+" does not exist!")};return Sr=function(C,k){if(typeof C!="string"||C.length===0)throw new v("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof k!="boolean")throw new v('"allowMissing" argument must be a boolean');if(le(/^%?[^%]*%?$/,C)===null)throw new R("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var L=fe(C),H=L.length>0?L[0]:"",Q=ue("%"+H+"%",k),ee=Q.name,V=Q.value,J=!1,re=Q.alias;re&&(H=re[0],X(L,K([0,1],re)));for(var ve=1,ce=!0;ve<L.length;ve+=1){var te=L[ve],he=oe(te,0,1),me=oe(te,-1);if((he==='"'||he==="'"||he==="`"||me==='"'||me==="'"||me==="`")&&he!==me)throw new R("property names with quotes must have matching quotes");if((te==="constructor"||!ce)&&(J=!0),H+="."+te,ee="%"+H+"%",T(F,ee))V=F[ee];else if(V!=null){if(!(te in V)){if(!k)throw new v("base intrinsic for "+C+" exists, but the property is not available.");return}if(h&&ve+1>=L.length){var ge=h(V,te);ce=!!ge,ce&&"get"in ge&&!("originalValue"in ge.get)?V=ge.get:V=V[te]}else ce=T(V,te),V=V[te];ce&&!J&&(F[ee]=V)}}return V},Sr}var br,qt;function jt(){if(qt)return br;qt=1;var e=Cr(),i=Ht(),u=i([e("%String.prototype.indexOf%")]);return br=function(g,w){var R=e(g,!!w);return typeof R=="function"&&u(g,".prototype.")>-1?i([R]):R},br}var Er,Mt;function Kt(){if(Mt)return Er;Mt=1;var e=Cr(),i=jt(),u=_e(),l=be(),g=e("%Map%",!0),w=i("Map.prototype.get",!0),R=i("Map.prototype.set",!0),v=i("Map.prototype.has",!0),O=i("Map.prototype.delete",!0),p=i("Map.prototype.size",!0);return Er=!!g&&function(){var y,M={assert:function(A){if(!M.has(A))throw new l("Side channel does not contain "+u(A))},delete:function(A){if(y){var a=O(y,A);return p(y)===0&&(y=void 0),a}return!1},get:function(A){if(y)return w(y,A)},has:function(A){return y?v(y,A):!1},set:function(A,a){y||(y=new g),R(y,A,a)}};return M},Er}var Or,Ft;function Ln(){if(Ft)return Or;Ft=1;var e=Cr(),i=jt(),u=_e(),l=Kt(),g=be(),w=e("%WeakMap%",!0),R=i("WeakMap.prototype.get",!0),v=i("WeakMap.prototype.set",!0),O=i("WeakMap.prototype.has",!0),p=i("WeakMap.prototype.delete",!0);return Or=w?function(){var y,M,A={assert:function(a){if(!A.has(a))throw new g("Side channel does not contain "+u(a))},delete:function(a){if(w&&a&&(typeof a=="object"||typeof a=="function")){if(y)return p(y,a)}else if(l&&M)return M.delete(a);return!1},get:function(a){return w&&a&&(typeof a=="object"||typeof a=="function")&&y?R(y,a):M&&M.get(a)},has:function(a){return w&&a&&(typeof a=="object"||typeof a=="function")&&y?O(y,a):!!M&&M.has(a)},set:function(a,f){w&&a&&(typeof a=="object"||typeof a=="function")?(y||(y=new w),v(y,a,f)):l&&(M||(M=l()),M.set(a,f))}};return A}:l,Or}var Ar,Dt;function Qt(){if(Dt)return Ar;Dt=1;var e=be(),i=_e(),u=yn(),l=Kt(),g=Ln(),w=g||l||u;return Ar=function(){var v,O={assert:function(p){if(!O.has(p))throw new e("Side channel does not contain "+i(p))},delete:function(p){return!!v&&v.delete(p)},get:function(p){return v&&v.get(p)},has:function(p){return!!v&&v.has(p)},set:function(p,m){v||(v=w()),v.set(p,m)}};return O},Ar}var Rr,Ct;function $r(){if(Ct)return Rr;Ct=1;var e=String.prototype.replace,i=/%20/g,u={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Rr={default:u.RFC3986,formatters:{RFC1738:function(l){return e.call(l,i,"+")},RFC3986:function(l){return String(l)}},RFC1738:u.RFC1738,RFC3986:u.RFC3986},Rr}var Pr,$t;function Vt(){if($t)return Pr;$t=1;var e=$r(),i=Qt(),u=Object.prototype.hasOwnProperty,l=Array.isArray,g=i(),w=function(n,c){return g.set(n,c),n},R=function(n){return g.has(n)},v=function(n){return g.get(n)},O=function(n,c){g.set(n,c)},p=(function(){for(var b=[],n=0;n<256;++n)b[b.length]="%"+((n<16?"0":"")+n.toString(16)).toUpperCase();return b})(),m=function(n){for(;n.length>1;){var c=n.pop(),d=c.obj[c.prop];if(l(d)){for(var E=[],_=0;_<d.length;++_)typeof d[_]<"u"&&(E[E.length]=d[_]);c.obj[c.prop]=E}}},y=function(n,c){for(var d=c&&c.plainObjects?{__proto__:null}:{},E=0;E<n.length;++E)typeof n[E]<"u"&&(d[E]=n[E]);return d},M=function b(n,c,d){if(!c)return n;if(typeof c!="object"&&typeof c!="function"){if(l(n)){var E=n.length;if(d&&typeof d.arrayLimit=="number"&&E>d.arrayLimit)return w(y(n.concat(c),d),E);n[E]=c}else if(n&&typeof n=="object")if(R(n)){var _=v(n)+1;n[_]=c,O(n,_)}else{if(d&&d.strictMerge)return[n,c];(d&&(d.plainObjects||d.allowPrototypes)||!u.call(Object.prototype,c))&&(n[c]=!0)}else return[n,c];return n}if(!n||typeof n!="object"){if(R(c)){for(var x=Object.keys(c),U=d&&d.plainObjects?{__proto__:null,0:n}:{0:n},F=0;F<x.length;F++){var W=parseInt(x[F],10);U[W+1]=c[x[F]]}return w(U,v(c)+1)}var $=[n].concat(c);return d&&typeof d.arrayLimit=="number"&&$.length>d.arrayLimit?w(y($,d),$.length-1):$}var G=n;return l(n)&&!l(c)&&(G=y(n,d)),l(n)&&l(c)?(c.forEach(function(s,T){if(u.call(n,T)){var K=n[T];K&&typeof K=="object"&&s&&typeof s=="object"?n[T]=b(K,s,d):n[n.length]=s}else n[T]=s}),n):Object.keys(c).reduce(function(s,T){var K=c[T];if(u.call(s,T)?s[T]=b(s[T],K,d):s[T]=K,R(c)&&!R(s)&&w(s,v(c)),R(s)){var X=parseInt(T,10);String(X)===T&&X>=0&&X>v(s)&&O(s,X)}return s},G)},A=function(n,c){return Object.keys(c).reduce(function(d,E){return d[E]=c[E],d},n)},a=function(b,n,c){var d=b.replace(/\+/g," ");if(c==="iso-8859-1")return d.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(d)}catch{return d}},f=1024,o=function(n,c,d,E,_){if(n.length===0)return n;var x=n;if(typeof n=="symbol"?x=Symbol.prototype.toString.call(n):typeof n!="string"&&(x=String(n)),d==="iso-8859-1")return escape(x).replace(/%u[0-9a-f]{4}/gi,function(T){return"%26%23"+parseInt(T.slice(2),16)+"%3B"});for(var U="",F=0;F<x.length;F+=f){for(var W=x.length>=f?x.slice(F,F+f):x,$=[],G=0;G<W.length;++G){var s=W.charCodeAt(G);if(s===45||s===46||s===95||s===126||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||_===e.RFC1738&&(s===40||s===41)){$[$.length]=W.charAt(G);continue}if(s<128){$[$.length]=p[s];continue}if(s<2048){$[$.length]=p[192|s>>6]+p[128|s&63];continue}if(s<55296||s>=57344){$[$.length]=p[224|s>>12]+p[128|s>>6&63]+p[128|s&63];continue}G+=1,s=65536+((s&1023)<<10|W.charCodeAt(G)&1023),$[$.length]=p[240|s>>18]+p[128|s>>12&63]+p[128|s>>6&63]+p[128|s&63]}U+=$.join("")}return U},I=function(n){for(var c=[{obj:{o:n},prop:"o"}],d=[],E=0;E<c.length;++E)for(var _=c[E],x=_.obj[_.prop],U=Object.keys(x),F=0;F<U.length;++F){var W=U[F],$=x[W];typeof $=="object"&&$!==null&&d.indexOf($)===-1&&(c[c.length]={obj:x,prop:W},d[d.length]=$)}return m(c),n},h=function(n){return Object.prototype.toString.call(n)==="[object RegExp]"},S=function(n){return!n||typeof n!="object"?!1:!!(n.constructor&&n.constructor.isBuffer&&n.constructor.isBuffer(n))},D=function(n,c,d,E){if(R(n)){var _=v(n)+1;return n[_]=c,O(n,_),n}var x=[].concat(n,c);return x.length>d?w(y(x,{plainObjects:E}),x.length-1):x},P=function(n,c){if(l(n)){for(var d=[],E=0;E<n.length;E+=1)d[d.length]=c(n[E]);return d}return c(n)};return Pr={arrayToObject:y,assign:A,combine:D,compact:I,decode:a,encode:o,isBuffer:S,isOverflow:R,isRegExp:h,markOverflow:w,maybeMap:P,merge:M},Pr}var Ir,Nt;function Bn(){if(Nt)return Ir;Nt=1;var e=Qt(),i=Vt(),u=$r(),l=Object.prototype.hasOwnProperty,g={brackets:function(o){return o+"[]"},comma:"comma",indices:function(o,I){return o+"["+I+"]"},repeat:function(o){return o}},w=Array.isArray,R=Array.prototype.push,v=function(f,o){R.apply(f,w(o)?o:[o])},O=Date.prototype.toISOString,p=u.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,filter:void 0,format:p,formatter:u.formatters[p],indices:!1,serializeDate:function(o){return O.call(o)},skipNulls:!1,strictNullHandling:!1},y=function(o){return typeof o=="string"||typeof o=="number"||typeof o=="boolean"||typeof o=="symbol"||typeof o=="bigint"},M={},A=function f(o,I,h,S,D,P,b,n,c,d,E,_,x,U,F,W,$,G){for(var s=o,T=G,K=0,X=!1;(T=T.get(M))!==void 0&&!X;){var ie=T.get(o);if(K+=1,typeof ie<"u"){if(ie===K)throw new RangeError("Cyclic object value");X=!0}typeof T.get(M)>"u"&&(K=0)}if(typeof d=="function"?s=d(I,s):s instanceof Date?s=x(s):h==="comma"&&w(s)&&(s=i.maybeMap(s,function(ee){return ee instanceof Date?x(ee):ee})),s===null){if(P)return c&&!W?c(I,m.encoder,$,"key",U):I;s=""}if(y(s)||i.isBuffer(s)){if(c){var oe=W?I:c(I,m.encoder,$,"key",U);return[F(oe)+"="+F(c(s,m.encoder,$,"value",U))]}return[F(I)+"="+F(String(s))]}var le=[];if(typeof s>"u")return le;var ae;if(h==="comma"&&w(s))W&&c&&(s=i.maybeMap(s,c)),ae=[{value:s.length>0?s.join(",")||null:void 0}];else if(w(d))ae=d;else{var Z=Object.keys(s);ae=E?Z.sort(E):Z}var fe=n?String(I).replace(/\./g,"%2E"):String(I),ue=S&&w(s)&&s.length===1?fe+"[]":fe;if(D&&w(s)&&s.length===0)return ue+"[]";for(var j=0;j<ae.length;++j){var C=ae[j],k=typeof C=="object"&&C&&typeof C.value<"u"?C.value:s[C];if(!(b&&k===null)){var L=_&&n?String(C).replace(/\./g,"%2E"):String(C),H=w(s)?typeof h=="function"?h(ue,L):ue:ue+(_?"."+L:"["+L+"]");G.set(o,K);var Q=e();Q.set(M,G),v(le,f(k,H,h,S,D,P,b,n,h==="comma"&&W&&w(s)?null:c,d,E,_,x,U,F,W,$,Q))}}return le},a=function(o){if(!o)return m;if(typeof o.allowEmptyArrays<"u"&&typeof o.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof o.encodeDotInKeys<"u"&&typeof o.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(o.encoder!==null&&typeof o.encoder<"u"&&typeof o.encoder!="function")throw new TypeError("Encoder has to be a function.");var I=o.charset||m.charset;if(typeof o.charset<"u"&&o.charset!=="utf-8"&&o.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var h=u.default;if(typeof o.format<"u"){if(!l.call(u.formatters,o.format))throw new TypeError("Unknown format option provided.");h=o.format}var S=u.formatters[h],D=m.filter;(typeof o.filter=="function"||w(o.filter))&&(D=o.filter);var P;if(o.arrayFormat in g?P=o.arrayFormat:"indices"in o?P=o.indices?"indices":"repeat":P=m.arrayFormat,"commaRoundTrip"in o&&typeof o.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var b=typeof o.allowDots>"u"?o.encodeDotInKeys===!0?!0:m.allowDots:!!o.allowDots;return{addQueryPrefix:typeof o.addQueryPrefix=="boolean"?o.addQueryPrefix:m.addQueryPrefix,allowDots:b,allowEmptyArrays:typeof o.allowEmptyArrays=="boolean"?!!o.allowEmptyArrays:m.allowEmptyArrays,arrayFormat:P,charset:I,charsetSentinel:typeof o.charsetSentinel=="boolean"?o.charsetSentinel:m.charsetSentinel,commaRoundTrip:!!o.commaRoundTrip,delimiter:typeof o.delimiter>"u"?m.delimiter:o.delimiter,encode:typeof o.encode=="boolean"?o.encode:m.encode,encodeDotInKeys:typeof o.encodeDotInKeys=="boolean"?o.encodeDotInKeys:m.encodeDotInKeys,encoder:typeof o.encoder=="function"?o.encoder:m.encoder,encodeValuesOnly:typeof o.encodeValuesOnly=="boolean"?o.encodeValuesOnly:m.encodeValuesOnly,filter:D,format:h,formatter:S,serializeDate:typeof o.serializeDate=="function"?o.serializeDate:m.serializeDate,skipNulls:typeof o.skipNulls=="boolean"?o.skipNulls:m.skipNulls,sort:typeof o.sort=="function"?o.sort:null,strictNullHandling:typeof o.strictNullHandling=="boolean"?o.strictNullHandling:m.strictNullHandling}};return Ir=function(f,o){var I=f,h=a(o),S,D;typeof h.filter=="function"?(D=h.filter,I=D("",I)):w(h.filter)&&(D=h.filter,S=D);var P=[];if(typeof I!="object"||I===null)return"";var b=g[h.arrayFormat],n=b==="comma"&&h.commaRoundTrip;S||(S=Object.keys(I)),h.sort&&S.sort(h.sort);for(var c=e(),d=0;d<S.length;++d){var E=S[d],_=I[E];h.skipNulls&&_===null||v(P,A(_,E,b,n,h.allowEmptyArrays,h.strictNullHandling,h.skipNulls,h.encodeDotInKeys,h.encode?h.encoder:null,h.filter,h.sort,h.allowDots,h.serializeDate,h.format,h.formatter,h.encodeValuesOnly,h.charset,c))}var x=P.join(h.delimiter),U=h.addQueryPrefix===!0?"?":"";return h.charsetSentinel&&(h.charset==="iso-8859-1"?U+="utf8=%26%2310003%3B&":U+="utf8=%E2%9C%93&"),x.length>0?U+x:""},Ir}var _r,Tt;function Un(){if(Tt)return _r;Tt=1;var e=Vt(),i=Object.prototype.hasOwnProperty,u=Array.isArray,l={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},g=function(A){return A.replace(/&#(\d+);/g,function(a,f){return String.fromCharCode(parseInt(f,10))})},w=function(A,a,f){if(A&&typeof A=="string"&&a.comma&&A.indexOf(",")>-1)return A.split(",");if(a.throwOnLimitExceeded&&f>=a.arrayLimit)throw new RangeError("Array limit exceeded. Only "+a.arrayLimit+" element"+(a.arrayLimit===1?"":"s")+" allowed in an array.");return A},R="utf8=%26%2310003%3B",v="utf8=%E2%9C%93",O=function(a,f){var o={__proto__:null},I=f.ignoreQueryPrefix?a.replace(/^\?/,""):a;I=I.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var h=f.parameterLimit===1/0?void 0:f.parameterLimit,S=I.split(f.delimiter,f.throwOnLimitExceeded&&typeof h<"u"?h+1:h);if(f.throwOnLimitExceeded&&typeof h<"u"&&S.length>h)throw new RangeError("Parameter limit exceeded. Only "+h+" parameter"+(h===1?"":"s")+" allowed.");var D=-1,P,b=f.charset;if(f.charsetSentinel)for(P=0;P<S.length;++P)S[P].indexOf("utf8=")===0&&(S[P]===v?b="utf-8":S[P]===R&&(b="iso-8859-1"),D=P,P=S.length);for(P=0;P<S.length;++P)if(P!==D){var n=S[P],c=n.indexOf("]="),d=c===-1?n.indexOf("="):c+1,E,_;if(d===-1?(E=f.decoder(n,l.decoder,b,"key"),_=f.strictNullHandling?null:""):(E=f.decoder(n.slice(0,d),l.decoder,b,"key"),E!==null&&(_=e.maybeMap(w(n.slice(d+1),f,u(o[E])?o[E].length:0),function(U){return f.decoder(U,l.decoder,b,"value")}))),_&&f.interpretNumericEntities&&b==="iso-8859-1"&&(_=g(String(_))),n.indexOf("[]=")>-1&&(_=u(_)?[_]:_),f.comma&&u(_)&&_.length>f.arrayLimit){if(f.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");_=e.combine([],_,f.arrayLimit,f.plainObjects)}if(E!==null){var x=i.call(o,E);x&&(f.duplicates==="combine"||n.indexOf("[]=")>-1)?o[E]=e.combine(o[E],_,f.arrayLimit,f.plainObjects):(!x||f.duplicates==="last")&&(o[E]=_)}}return o},p=function(A,a,f,o){var I=0;if(A.length>0&&A[A.length-1]==="[]"){var h=A.slice(0,-1).join("");I=Array.isArray(a)&&a[h]?a[h].length:0}for(var S=o?a:w(a,f,I),D=A.length-1;D>=0;--D){var P,b=A[D];if(b==="[]"&&f.parseArrays)e.isOverflow(S)?P=S:P=f.allowEmptyArrays&&(S===""||f.strictNullHandling&&S===null)?[]:e.combine([],S,f.arrayLimit,f.plainObjects);else{P=f.plainObjects?{__proto__:null}:{};var n=b.charAt(0)==="["&&b.charAt(b.length-1)==="]"?b.slice(1,-1):b,c=f.decodeDotInKeys?n.replace(/%2E/g,"."):n,d=parseInt(c,10),E=!isNaN(d)&&b!==c&&String(d)===c&&d>=0&&f.parseArrays;if(!f.parseArrays&&c==="")P={0:S};else if(E&&d<f.arrayLimit)P=[],P[d]=S;else{if(E&&f.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");E?(P[d]=S,e.markOverflow(P,d)):c!=="__proto__"&&(P[c]=S)}}S=P}return S},m=function(a,f){var o=f.allowDots?a.replace(/\.([^.[]+)/g,"[$1]"):a;if(f.depth<=0)return!f.plainObjects&&i.call(Object.prototype,o)&&!f.allowPrototypes?void 0:[o];var I=/(\[[^[\]]*])/,h=/(\[[^[\]]*])/g,S=I.exec(o),D=S?o.slice(0,S.index):o,P=[];if(D){if(!f.plainObjects&&i.call(Object.prototype,D)&&!f.allowPrototypes)return;P[P.length]=D}for(var b=0;(S=h.exec(o))!==null&&b<f.depth;){b+=1;var n=S[1].slice(1,-1);if(!f.plainObjects&&i.call(Object.prototype,n)&&!f.allowPrototypes)return;P[P.length]=S[1]}if(S){if(f.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+f.depth+" and strictDepth is true");P[P.length]="["+o.slice(S.index)+"]"}return P},y=function(a,f,o,I){if(a){var h=m(a,o);if(h)return p(h,f,o,I)}},M=function(a){if(!a)return l;if(typeof a.allowEmptyArrays<"u"&&typeof a.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof a.decodeDotInKeys<"u"&&typeof a.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(a.decoder!==null&&typeof a.decoder<"u"&&typeof a.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof a.charset<"u"&&a.charset!=="utf-8"&&a.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof a.throwOnLimitExceeded<"u"&&typeof a.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var f=typeof a.charset>"u"?l.charset:a.charset,o=typeof a.duplicates>"u"?l.duplicates:a.duplicates;if(o!=="combine"&&o!=="first"&&o!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var I=typeof a.allowDots>"u"?a.decodeDotInKeys===!0?!0:l.allowDots:!!a.allowDots;return{allowDots:I,allowEmptyArrays:typeof a.allowEmptyArrays=="boolean"?!!a.allowEmptyArrays:l.allowEmptyArrays,allowPrototypes:typeof a.allowPrototypes=="boolean"?a.allowPrototypes:l.allowPrototypes,allowSparse:typeof a.allowSparse=="boolean"?a.allowSparse:l.allowSparse,arrayLimit:typeof a.arrayLimit=="number"?a.arrayLimit:l.arrayLimit,charset:f,charsetSentinel:typeof a.charsetSentinel=="boolean"?a.charsetSentinel:l.charsetSentinel,comma:typeof a.comma=="boolean"?a.comma:l.comma,decodeDotInKeys:typeof a.decodeDotInKeys=="boolean"?a.decodeDotInKeys:l.decodeDotInKeys,decoder:typeof a.decoder=="function"?a.decoder:l.decoder,delimiter:typeof a.delimiter=="string"||e.isRegExp(a.delimiter)?a.delimiter:l.delimiter,depth:typeof a.depth=="number"||a.depth===!1?+a.depth:l.depth,duplicates:o,ignoreQueryPrefix:a.ignoreQueryPrefix===!0,interpretNumericEntities:typeof a.interpretNumericEntities=="boolean"?a.interpretNumericEntities:l.interpretNumericEntities,parameterLimit:typeof a.parameterLimit=="number"?a.parameterLimit:l.parameterLimit,parseArrays:a.parseArrays!==!1,plainObjects:typeof a.plainObjects=="boolean"?a.plainObjects:l.plainObjects,strictDepth:typeof a.strictDepth=="boolean"?!!a.strictDepth:l.strictDepth,strictMerge:typeof a.strictMerge=="boolean"?!!a.strictMerge:l.strictMerge,strictNullHandling:typeof a.strictNullHandling=="boolean"?a.strictNullHandling:l.strictNullHandling,throwOnLimitExceeded:typeof a.throwOnLimitExceeded=="boolean"?a.throwOnLimitExceeded:!1}};return _r=function(A,a){var f=M(a);if(A===""||A===null||typeof A>"u")return f.plainObjects?{__proto__:null}:{};for(var o=typeof A=="string"?O(A,f):A,I=f.plainObjects?{__proto__:null}:{},h=Object.keys(o),S=0;S<h.length;++S){var D=h[S],P=y(D,o[D],f,typeof A=="string");I=e.merge(I,P,f)}return f.allowSparse===!0?I:e.compact(I)},_r}var xr,Lt;function zn(){if(Lt)return xr;Lt=1;var e=Bn(),i=Un(),u=$r();return xr={formats:u,parse:i,stringify:e},xr}var Wn=zn();const kn="0.1.3",Gn=["allow-scripts","allow-same-origin","allow-popups"],Hn=["allow-forms","allow-modals","allow-top-navigation-by-user-activation"];function qr(e,i,{accessToken:u,host:l,theme:g},w="/relay-widget"){if(!u)throw new Error("[PersonaRelay] accessToken is required to initialize the relay widget");const R=Fr(l),v=Wn.stringify({"client-version":kn,"container-id":i,"relay-session-access-token":u,theme:g},{addQueryPrefix:!0,skipNulls:!0});return w==="/relay-popover"?(e.title="Relay popover",e.className="relay-widget__popover-iframe",e.allow="clipboard-write"):w==="/relay-fullscreen"?(e.title="Relay fullscreen",e.className="relay-widget__fullscreen-iframe",e.allow="camera;microphone;clipboard-write"):(e.title="Verify via Relay",e.className="relay-widget__iframe",e.allow="clipboard-write"),e.setAttribute("sandbox",Gn.concat(Hn).join(" ")),e.referrerPolicy="no-referrer",e.src=R+w+v,e}class jn{constructor(i,u){this.relayCSS=new on("relay-widget-styles"),this.resizeObserver=null,this.removeResizeListener=null,this.options=u,this.baseUrl=Fr(this.options.host),this.containerParent=this.resolveContainer(i),this.containerId=an(),this.containerElement=Bt("div",{class:"relay-widget__container",id:this.containerId}),this.iframeElement=document.createElement("iframe"),this.popoverIframeElement=document.createElement("iframe"),this.fullscreenIframeElement=document.createElement("iframe"),this.unsubscribeFromEvents=fn(this.containerId,{onComplete:this.options.onComplete??null,onError:this.options.onError??null,onExpire:this.options.onExpire??null,onWidgetResize:l=>this.handleWidgetResize(l),onPopoverResize:l=>this.handlePopoverResize(l),onFullscreenResize:l=>this.handleFullscreenResize(l),host:this.options.host??null}),this.containerElement.appendChild(this.iframeElement),this.containerElement.appendChild(this.popoverIframeElement),this.containerParent.appendChild(this.containerElement),document.body.appendChild(this.fullscreenIframeElement),this.relayCSS.mount(ln);try{qr(this.iframeElement,this.containerId,this.options,"/relay-widget"),qr(this.popoverIframeElement,this.containerId,this.options,"/relay-popover"),qr(this.fullscreenIframeElement,this.containerId,this.options,"/relay-fullscreen")}catch(l){throw console.error("[PersonaRelay]",l),this.destroy(),l}this.setupResizeObserver()}resolveContainer(i){if(i instanceof HTMLElement)return i;const u=document.querySelector(i);if(!u)throw new Error(`[PersonaRelay] Container element not found for selector: "${i}"`);return u}handleWidgetResize({height:i}){this.iframeElement.style.height=`${i}px`}handlePopoverResize({height:i}){const u=i>0?i+64:0;this.popoverIframeElement.style.height=`${u}px`}handleFullscreenResize({fullscreen:i}){i?(this.lockScroll(),this.fullscreenIframeElement.classList.add("relay-widget__fullscreen-iframe--visible")):(this.fullscreenIframeElement.classList.remove("relay-widget__fullscreen-iframe--visible"),this.unlockScroll())}lockScroll(){document.body.classList.add("relay-widget__scroll-locked")}unlockScroll(){document.body.classList.remove("relay-widget__scroll-locked")}sendResize(){const{clientWidth:i,clientHeight:u}=document.body,l={action:Mr.Resize,containerId:this.containerId,metadata:{width:i,height:u}};this.iframeElement.contentWindow?.postMessage(l,this.baseUrl),this.popoverIframeElement.contentWindow?.postMessage(l,this.baseUrl),this.fullscreenIframeElement.contentWindow?.postMessage(l,this.baseUrl)}setupResizeObserver(){this.iframeElement.addEventListener("load",()=>this.sendResize(),{once:!0});const i=()=>this.sendResize();window.addEventListener("resize",i),this.removeResizeListener=()=>window.removeEventListener("resize",i)}destroy(){const i={action:Mr.Destroy,metadata:{}};this.iframeElement.contentWindow?.postMessage(i,this.baseUrl),this.popoverIframeElement.contentWindow?.postMessage(i,this.baseUrl),this.fullscreenIframeElement.contentWindow?.postMessage(i,this.baseUrl),this.relayCSS.unmount(),this.unlockScroll(),this.resizeObserver?.disconnect(),this.resizeObserver=null,this.removeResizeListener?.(),this.removeResizeListener=null,this.containerElement.parentNode&&this.containerParent.removeChild(this.containerElement),this.fullscreenIframeElement.parentNode&&this.fullscreenIframeElement.parentNode.removeChild(this.fullscreenIframeElement),this.unsubscribeFromEvents()}}module.exports=jn;
5
5
  //# sourceMappingURL=relay.cjs.map