@persona/relay 0.1.5 → 0.1.6
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 +2 -2
- package/dist/relay.cjs.map +1 -1
- package/dist/relay.js +190 -190
- package/dist/relay.js.map +1 -1
- package/dist/relay.umd.js +2 -2
- package/dist/relay.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/relay.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(te,de){typeof exports=="object"&&typeof module<"u"?module.exports=de():typeof define=="function"&&define.amd?define(de):(te=typeof globalThis<"u"?globalThis:te||self,te.Relay=de())})(this,(function(){"use strict";var te=(e=>(e.Complete="complete",e.Error="error",e.WidgetResize="widget-resize",e.PopoverResize="popover-resize",e.FullscreenResize="fullscreen-resize",e.Expire="expire",e))(te||{}),de=(e=>(e.Resize="resize",e.Destroy="destroy",e))(de||{}),Oe=(e=>(e.Development="http://localhost:3000",e.Staging="https://relay.withpersona-staging.com",e.Production="https://relay.withpersona.com",e))(Oe||{});function Jt(e){try{const i=new URL(e);return i.hostname==="localhost"?!0:!(i.protocol!=="https:"||!i.hostname||!i.hostname.includes("."))}catch{return!1}}function Me(e){switch(e){case"development":return Oe.Development;case"staging":return Oe.Staging;case"production":case void 0:case null:return Oe.Production;default:if(typeof e=="string"){const i=e.startsWith("localhost")?`http://${e}`:`https://${e}`;if(Jt(i))return i.replace(/\/$/,"")}return console.warn(`[PersonaRelay] Invalid host: "${e}". Expected 'development', 'staging', 'production', or a valid hostname/URL. Falling back to 'production'.`),Oe.Production}}function Yt(){return"relay-widget-"+crypto.randomUUID()}class Xt{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=Nr("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 Nr(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 Zt=".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 Tr(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 en(e,{onComplete:i,onError:u,onExpire:l,onWidgetResize:g,onPopoverResize:w,onFullscreenResize:R,host:v}){const E=p=>{const m=Me(v??"production");if(p.origin!=="")try{const M=Tr(new URL(p.origin).host),A=Tr(new URL(m).host);if(M!==A)return}catch{return}if(e!==p.data.containerId)return;const y=p.data;switch(y.name){case te.Complete:i?.();break;case te.Error:u?.(y.error);break;case te.WidgetResize:g?.(y.metadata);break;case te.PopoverResize:w?.(y.metadata);break;case te.FullscreenResize:R?.(y.metadata);break;case te.Expire:l?.();break}};return window.addEventListener("message",E),()=>{window.removeEventListener("message",E)}}var Lr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rn(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 Fe,Br;function he(){return Br||(Br=1,Fe=TypeError),Fe}const tn=rn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var De,Ur;function Pe(){if(Ur)return De;Ur=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,E=typeof WeakMap=="function"&&WeakMap.prototype,p=E?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,O=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?-O(-r):O(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=tn,K=T.custom,X=Q(K)?K:null,oe={__proto__:null,double:'"',single:"'"},le={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};De=function r(t,N,B,z){var q=N||{};if(J(q,"quoteStyle")&&!J(oe,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 pe=J(q,"customInspect")?q.customInspect:!0;if(typeof pe!="boolean"&&pe!=="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 ve=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 Ut(t,q);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var Y=String(t);return ve?s(t,Y):Y}if(typeof t=="bigint"){var ye=String(t)+"n";return ve?s(t,ye):ye}var xr=typeof q.depth>"u"?5:q.depth;if(typeof B>"u"&&(B=0),B>=xr&&xr>0&&typeof t=="object")return ue(t)?"[Array]":"[Object]";var be=Wn(q,B);if(typeof z>"u")z=[];else if(se(z,t)>=0)return"[Circular]";function ae(Ee,qe,Gn){if(qe&&(z=d.call(z),z.push(qe)),Gn){var Vt={depth:q.depth};return J(q,"quoteStyle")&&(Vt.quoteStyle=q.quoteStyle),r(Ee,Vt,B+1,z)}return r(Ee,q,B+1,z)}if(typeof t=="function"&&!j(t)){var Wt=me(t),kt=_e(t,ae);return"[Function"+(Wt?": "+Wt:" (anonymous)")+"]"+(kt.length>0?" { "+c.call(kt,", ")+" }":"")}if(Q(t)){var Gt=F?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):U.call(t);return typeof t=="object"&&!F?Ae(Gt):Gt}if(Bn(t)){for(var Re="<"+P.call(String(t.nodeName)),qr=t.attributes||[],xe=0;xe<qr.length;xe++)Re+=" "+qr[xe].name+"="+fe(ie(qr[xe].value),"double",q);return Re+=">",t.childNodes&&t.childNodes.length&&(Re+="..."),Re+="</"+P.call(String(t.nodeName))+">",Re}if(ue(t)){if(t.length===0)return"[]";var Mr=_e(t,ae);return be&&!zn(Mr)?"["+_r(Mr,be)+"]":"[ "+c.call(Mr,", ")+" ]"}if(C(t)){var Fr=_e(t,ae);return!("cause"in Error.prototype)&&"cause"in t&&!$.call(t,"cause")?"{ ["+String(t)+"] "+c.call(n.call("[cause]: "+ae(t.cause),Fr),", ")+" }":Fr.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+c.call(Fr,", ")+" }"}if(typeof t=="object"&&pe){if(X&&typeof t[X]=="function"&&T)return T(t,{depth:xr-B});if(pe!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ne(t)){var Ht=[];return l&&l.call(t,function(Ee,qe){Ht.push(ae(qe,t,!0)+" => "+ae(Ee,t))}),zt("Map",u.call(t),Ht,be)}if(Se(t)){var jt=[];return v&&v.call(t,function(Ee){jt.push(ae(Ee,t))}),zt("Set",R.call(t),jt,be)}if(ge(t))return Ir("WeakMap");if(Ln(t))return Ir("WeakSet");if(we(t))return Ir("WeakRef");if(L(t))return Ae(ae(Number(t)));if(ee(t))return Ae(ae(_.call(t)));if(H(t))return Ae(a.call(t));if(k(t))return Ae(ae(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Lr<"u"&&t===Lr)return"{ [object globalThis] }";if(!ce(t)&&!j(t)){var Dr=_e(t,ae),Kt=G?G(t)===Object.prototype:t instanceof Object||t.constructor===Object,Cr=t instanceof Object?"":"null prototype",Qt=!Kt&&W&&Object(t)===t&&W in t?h.call(re(t),8,-1):Cr?"Object":"",kn=Kt||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",$r=kn+(Qt||Cr?"["+c.call(n.call([],Qt||[],Cr||[]),": ")+"] ":"");return Dr.length===0?$r+"{}":be?$r+"{"+_r(Dr,be)+"}":$r+"{ "+c.call(Dr,", ")+" }"}return String(t)};function fe(r,t,N){var B=N.quoteStyle||t,z=oe[B];return z+r+z}function ie(r){return S.call(String(r),/"/g,""")}function Z(r){return!W||!(typeof r=="object"&&(W in r||typeof r[W]<"u"))}function ue(r){return re(r)==="[object Array]"&&Z(r)}function ce(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 me(r){if(r.name)return r.name;var t=I.call(o.call(r),/^function\s*([\w$]+)/);return t?t[1]:null}function se(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 ne(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 ge(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 we(r){if(!A||!r||typeof r!="object")return!1;try{return A.call(r),!0}catch{}return!1}function Se(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 Ln(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 Bn(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function Ut(r,t){if(r.length>t.maxStringLength){var N=r.length-t.maxStringLength,B="... "+N+" more character"+(N>1?"s":"");return Ut(h.call(r,0,t.maxStringLength),t)+B}var z=le[t.quoteStyle||"single"];z.lastIndex=0;var q=S.call(S.call(r,z,"\\$1"),/[\x00-\x1f]/g,Un);return fe(q,"single",t)}function Un(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 Ae(r){return"Object("+r+")"}function Ir(r){return r+" { ? }"}function zt(r,t,N,B){var z=B?_r(N,B):c.call(N,", ");return r+" ("+t+") {"+z+"}"}function zn(r){for(var t=0;t<r.length;t++)if(se(r[t],`
|
|
1
|
+
(function(te,de){typeof exports=="object"&&typeof module<"u"?module.exports=de():typeof define=="function"&&define.amd?define(de):(te=typeof globalThis<"u"?globalThis:te||self,te.Relay=de())})(this,(function(){"use strict";var te=(e=>(e.Complete="complete",e.Error="error",e.WidgetResize="widget-resize",e.PopoverResize="popover-resize",e.FullscreenResize="fullscreen-resize",e.Expire="expire",e))(te||{}),de=(e=>(e.Resize="resize",e.Destroy="destroy",e))(de||{}),Oe=(e=>(e.Development="http://localhost:3000",e.Staging="https://relay.withpersona-staging.com",e.Production="https://relay.withpersona.com",e))(Oe||{});function Jt(e){try{const i=new URL(e);return i.hostname==="localhost"?!0:!(i.protocol!=="https:"||!i.hostname||!i.hostname.includes("."))}catch{return!1}}function Me(e){switch(e){case"development":return Oe.Development;case"staging":return Oe.Staging;case"production":case void 0:case null:return Oe.Production;default:if(typeof e=="string"){const i=e.startsWith("localhost")?`http://${e}`:`https://${e}`;if(Jt(i))return i.replace(/\/$/,"")}return console.warn(`[PersonaRelay] Invalid host: "${e}". Expected 'development', 'staging', 'production', or a valid hostname/URL. Falling back to 'production'.`),Oe.Production}}function Yt(){return"relay-widget-"+crypto.randomUUID()}class Xt{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=Nr("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 Nr(e,i,u=[]){const l=document.createElement(e);for(const[g,w]of Object.entries(i)){const A=g==="className"?"class":g;l.setAttribute(A,w)}for(const g of u)g!==!1&&(typeof g=="string"?l.appendChild(document.createTextNode(g)):l.appendChild(g));return l}const Zt=".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 Lr(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 en(e,{onComplete:i,onError:u,onExpire:l,onWidgetResize:g,onPopoverResize:w,onFullscreenResize:A,host:v}){const O=p=>{const h=Me(v??"production");if(p.origin!=="")try{const M=Lr(new URL(p.origin).host),R=Lr(new URL(h).host);if(M!==R)return}catch{return}if(e!==p.data.containerId)return;const y=p.data;switch(y.name){case te.Complete:i?.();break;case te.Error:u?.(y.error);break;case te.WidgetResize:g?.(y.metadata);break;case te.PopoverResize:w?.(y.metadata);break;case te.FullscreenResize:A?.(y.metadata);break;case te.Expire:l?.();break}};return window.addEventListener("message",O),()=>{window.removeEventListener("message",O)}}var Tr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rn(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 Fe,Br;function he(){return Br||(Br=1,Fe=TypeError),Fe}const tn=rn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var De,Ur;function Pe(){if(Ur)return De;Ur=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,A=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,h=typeof WeakSet=="function"&&WeakSet.prototype,y=h?WeakSet.prototype.has:null,M=typeof WeakRef=="function"&&WeakRef.prototype,R=M?WeakRef.prototype.deref:null,a=Boolean.prototype.valueOf,f=Object.prototype.toString,o=Function.prototype.toString,I=String.prototype.match,m=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=m.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 L=tn,K=L.custom,X=Q(K)?K:null,oe={__proto__:null,double:'"',single:"'"},le={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};De=function r(t,N,B,z){var q=N||{};if(J(q,"quoteStyle")&&!J(oe,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 pe=J(q,"customInspect")?q.customInspect:!0;if(typeof pe!="boolean"&&pe!=="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 ve=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 Ut(t,q);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var Y=String(t);return ve?s(t,Y):Y}if(typeof t=="bigint"){var ye=String(t)+"n";return ve?s(t,ye):ye}var xr=typeof q.depth>"u"?5:q.depth;if(typeof B>"u"&&(B=0),B>=xr&&xr>0&&typeof t=="object")return ue(t)?"[Array]":"[Object]";var be=Wn(q,B);if(typeof z>"u")z=[];else if(se(z,t)>=0)return"[Circular]";function ae(Ee,qe,Gn){if(qe&&(z=d.call(z),z.push(qe)),Gn){var Vt={depth:q.depth};return J(q,"quoteStyle")&&(Vt.quoteStyle=q.quoteStyle),r(Ee,Vt,B+1,z)}return r(Ee,q,B+1,z)}if(typeof t=="function"&&!j(t)){var Wt=me(t),kt=_e(t,ae);return"[Function"+(Wt?": "+Wt:" (anonymous)")+"]"+(kt.length>0?" { "+c.call(kt,", ")+" }":"")}if(Q(t)){var Gt=F?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):U.call(t);return typeof t=="object"&&!F?Re(Gt):Gt}if(Bn(t)){for(var Ae="<"+P.call(String(t.nodeName)),qr=t.attributes||[],xe=0;xe<qr.length;xe++)Ae+=" "+qr[xe].name+"="+fe(ie(qr[xe].value),"double",q);return Ae+=">",t.childNodes&&t.childNodes.length&&(Ae+="..."),Ae+="</"+P.call(String(t.nodeName))+">",Ae}if(ue(t)){if(t.length===0)return"[]";var Mr=_e(t,ae);return be&&!zn(Mr)?"["+_r(Mr,be)+"]":"[ "+c.call(Mr,", ")+" ]"}if(C(t)){var Fr=_e(t,ae);return!("cause"in Error.prototype)&&"cause"in t&&!$.call(t,"cause")?"{ ["+String(t)+"] "+c.call(n.call("[cause]: "+ae(t.cause),Fr),", ")+" }":Fr.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+c.call(Fr,", ")+" }"}if(typeof t=="object"&&pe){if(X&&typeof t[X]=="function"&&L)return L(t,{depth:xr-B});if(pe!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ne(t)){var Ht=[];return l&&l.call(t,function(Ee,qe){Ht.push(ae(qe,t,!0)+" => "+ae(Ee,t))}),zt("Map",u.call(t),Ht,be)}if(Se(t)){var jt=[];return v&&v.call(t,function(Ee){jt.push(ae(Ee,t))}),zt("Set",A.call(t),jt,be)}if(ge(t))return Ir("WeakMap");if(Tn(t))return Ir("WeakSet");if(we(t))return Ir("WeakRef");if(T(t))return Re(ae(Number(t)));if(ee(t))return Re(ae(_.call(t)));if(H(t))return Re(a.call(t));if(k(t))return Re(ae(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Tr<"u"&&t===Tr)return"{ [object globalThis] }";if(!ce(t)&&!j(t)){var Dr=_e(t,ae),Kt=G?G(t)===Object.prototype:t instanceof Object||t.constructor===Object,Cr=t instanceof Object?"":"null prototype",Qt=!Kt&&W&&Object(t)===t&&W in t?m.call(re(t),8,-1):Cr?"Object":"",kn=Kt||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",$r=kn+(Qt||Cr?"["+c.call(n.call([],Qt||[],Cr||[]),": ")+"] ":"");return Dr.length===0?$r+"{}":be?$r+"{"+_r(Dr,be)+"}":$r+"{ "+c.call(Dr,", ")+" }"}return String(t)};function fe(r,t,N){var B=N.quoteStyle||t,z=oe[B];return z+r+z}function ie(r){return S.call(String(r),/"/g,""")}function Z(r){return!W||!(typeof r=="object"&&(W in r||typeof r[W]<"u"))}function ue(r){return re(r)==="[object Array]"&&Z(r)}function ce(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 T(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 me(r){if(r.name)return r.name;var t=I.call(o.call(r),/^function\s*([\w$]+)/);return t?t[1]:null}function se(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 ne(r){if(!u||!r||typeof r!="object")return!1;try{u.call(r);try{A.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function ge(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 we(r){if(!R||!r||typeof r!="object")return!1;try{return R.call(r),!0}catch{}return!1}function Se(r){if(!A||!r||typeof r!="object")return!1;try{A.call(r);try{u.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Tn(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 Bn(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function Ut(r,t){if(r.length>t.maxStringLength){var N=r.length-t.maxStringLength,B="... "+N+" more character"+(N>1?"s":"");return Ut(m.call(r,0,t.maxStringLength),t)+B}var z=le[t.quoteStyle||"single"];z.lastIndex=0;var q=S.call(S.call(r,z,"\\$1"),/[\x00-\x1f]/g,Un);return fe(q,"single",t)}function Un(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 Re(r){return"Object("+r+")"}function Ir(r){return r+" { ? }"}function zt(r,t,N,B){var z=B?_r(N,B):c.call(N,", ");return r+" ("+t+") {"+z+"}"}function zn(r){for(var t=0;t<r.length;t++)if(se(r[t],`
|
|
2
2
|
`)>=0)return!1;return!0}function Wn(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 _r(r,t){if(r.length===0)return"";var N=`
|
|
3
3
|
`+t.prev+t.base;return N+c.call(r,","+N)+`
|
|
4
|
-
`+t.prev}function _e(r,t){var N=ue(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):[],pe;if(F){pe={};for(var ve=0;ve<q.length;ve++)pe["$"+q[ve]]=q[ve]}for(var Y in r)J(r,Y)&&(N&&String(Number(Y))===Y&&Y<r.length||F&&pe["$"+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 ye=0;ye<q.length;ye++)$.call(r,q[ye])&&B.push("["+t(q[ye])+"]: "+t(r[q[ye]],r));return B}return De}var Ce,zr;function nn(){if(zr)return Ce;zr=1;var e=Pe(),i=he(),u=function(v,E,p){for(var m=v,y;(y=m.next)!=null;m=y)if(y.key===E)return m.next=y.next,p||(y.next=v.next,v.next=y),y},l=function(v,E){if(v){var p=u(v,E);return p&&p.value}},g=function(v,E,p){var m=u(v,E);m?m.value=p:v.next={key:E,next:v.next,value:p}},w=function(v,E){return v?!!u(v,E):!1},R=function(v,E){if(v)return u(v,E,!0)};return Ce=function(){var E,p={assert:function(m){if(!p.has(m))throw new i("Side channel does not contain "+e(m))},delete:function(m){var y=R(E,m);return y&&E&&!E.next&&(E=void 0),!!y},get:function(m){return l(E,m)},has:function(m){return w(E,m)},set:function(m,y){E||(E={next:void 0}),g(E,m,y)}};return p},Ce}var $e,Wr;function kr(){return Wr||(Wr=1,$e=Object),$e}var Ne,Gr;function an(){return Gr||(Gr=1,Ne=Error),Ne}var Te,Hr;function on(){return Hr||(Hr=1,Te=EvalError),Te}var Le,jr;function ln(){return jr||(jr=1,Le=RangeError),Le}var Be,Kr;function fn(){return Kr||(Kr=1,Be=ReferenceError),Be}var Ue,Qr;function un(){return Qr||(Qr=1,Ue=SyntaxError),Ue}var ze,Vr;function cn(){return Vr||(Vr=1,ze=URIError),ze}var We,Jr;function sn(){return Jr||(Jr=1,We=Math.abs),We}var ke,Yr;function pn(){return Yr||(Yr=1,ke=Math.floor),ke}var Ge,Xr;function yn(){return Xr||(Xr=1,Ge=Math.max),Ge}var He,Zr;function dn(){return Zr||(Zr=1,He=Math.min),He}var je,et;function vn(){return et||(et=1,je=Math.pow),je}var Ke,rt;function hn(){return rt||(rt=1,Ke=Math.round),Ke}var Qe,tt;function mn(){return tt||(tt=1,Qe=Number.isNaN||function(i){return i!==i}),Qe}var Ve,nt;function gn(){if(nt)return Ve;nt=1;var e=mn();return Ve=function(u){return e(u)||u===0?u:u<0?-1:1},Ve}var Je,at;function wn(){return at||(at=1,Je=Object.getOwnPropertyDescriptor),Je}var Ye,it;function ot(){if(it)return Ye;it=1;var e=wn();if(e)try{e([],"length")}catch{e=null}return Ye=e,Ye}var Xe,lt;function Sn(){if(lt)return Xe;lt=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Xe=e,Xe}var Ze,ft;function bn(){return ft||(ft=1,Ze=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}),Ze}var er,ut;function En(){if(ut)return er;ut=1;var e=typeof Symbol<"u"&&Symbol,i=bn();return er=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i()},er}var rr,ct;function st(){return ct||(ct=1,rr=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),rr}var tr,pt;function yt(){if(pt)return tr;pt=1;var e=kr();return tr=e.getPrototypeOf||null,tr}var nr,dt;function On(){if(dt)return nr;dt=1;var e="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,u=Math.max,l="[object Function]",g=function(E,p){for(var m=[],y=0;y<E.length;y+=1)m[y]=E[y];for(var M=0;M<p.length;M+=1)m[M+E.length]=p[M];return m},w=function(E,p){for(var m=[],y=p,M=0;y<E.length;y+=1,M+=1)m[M]=E[y];return m},R=function(v,E){for(var p="",m=0;m<v.length;m+=1)p+=v[m],m+1<v.length&&(p+=E);return p};return nr=function(E){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(E,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},nr}var ar,vt;function Ie(){if(vt)return ar;vt=1;var e=On();return ar=Function.prototype.bind||e,ar}var ir,ht;function or(){return ht||(ht=1,ir=Function.prototype.call),ir}var lr,mt;function gt(){return mt||(mt=1,lr=Function.prototype.apply),lr}var fr,wt;function An(){return wt||(wt=1,fr=typeof Reflect<"u"&&Reflect&&Reflect.apply),fr}var ur,St;function Rn(){if(St)return ur;St=1;var e=Ie(),i=gt(),u=or(),l=An();return ur=l||e.call(u,i),ur}var cr,bt;function Et(){if(bt)return cr;bt=1;var e=Ie(),i=he(),u=or(),l=Rn();return cr=function(w){if(w.length<1||typeof w[0]!="function")throw new i("a function is required");return l(e,u,w)},cr}var sr,Ot;function Pn(){if(Ot)return sr;Ot=1;var e=Et(),i=ot(),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 sr=l&&typeof l.get=="function"?e([l.get]):typeof w=="function"?function(v){return w(v==null?v:g(v))}:!1,sr}var pr,At;function In(){if(At)return pr;At=1;var e=st(),i=yt(),u=Pn();return pr=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,pr}var yr,Rt;function _n(){if(Rt)return yr;Rt=1;var e=Function.prototype.call,i=Object.prototype.hasOwnProperty,u=Ie();return yr=u.call(e,i),yr}var dr,Pt;function vr(){if(Pt)return dr;Pt=1;var e,i=kr(),u=an(),l=on(),g=ln(),w=fn(),R=un(),v=he(),E=cn(),p=sn(),m=pn(),y=yn(),M=dn(),A=vn(),a=hn(),f=gn(),o=Function,I=function(j){try{return o('"use strict"; return ('+j+").constructor;")()}catch{}},h=ot(),S=Sn(),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=En()(),n=In(),c=yt(),d=st(),O=gt(),_=or(),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%":E,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":_,"%Function.prototype.apply%":O,"%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=Ie(),T=_n(),K=s.call(_,Array.prototype.concat),X=s.call(O,Array.prototype.splice),oe=s.call(_,String.prototype.replace),le=s.call(_,String.prototype.slice),fe=s.call(_,RegExp.prototype.exec),ie=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Z=/\\(\\)?/g,ue=function(C){var k=le(C,0,1),L=le(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 oe(C,ie,function(Q,ee,V,J){H[H.length]=V?oe(J,Z,"$1"):ee||Q}),H},ce=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 dr=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(fe(/^%?[^%]*%?$/,C)===null)throw new R("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var L=ue(C),H=L.length>0?L[0]:"",Q=ce("%"+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 me=1,se=!0;me<L.length;me+=1){var ne=L[me],ge=le(ne,0,1),we=le(ne,-1);if((ge==='"'||ge==="'"||ge==="`"||we==='"'||we==="'"||we==="`")&&ge!==we)throw new R("property names with quotes must have matching quotes");if((ne==="constructor"||!se)&&(J=!0),H+="."+ne,ee="%"+H+"%",T(F,ee))V=F[ee];else if(V!=null){if(!(ne in V)){if(!k)throw new v("base intrinsic for "+C+" exists, but the property is not available.");return}if(h&&me+1>=L.length){var Se=h(V,ne);se=!!Se,se&&"get"in Se&&!("originalValue"in Se.get)?V=Se.get:V=V[ne]}else se=T(V,ne),V=V[ne];se&&!J&&(F[ee]=V)}}return V},dr}var hr,It;function _t(){if(It)return hr;It=1;var e=vr(),i=Et(),u=i([e("%String.prototype.indexOf%")]);return hr=function(g,w){var R=e(g,!!w);return typeof R=="function"&&u(g,".prototype.")>-1?i([R]):R},hr}var mr,xt;function qt(){if(xt)return mr;xt=1;var e=vr(),i=_t(),u=Pe(),l=he(),g=e("%Map%",!0),w=i("Map.prototype.get",!0),R=i("Map.prototype.set",!0),v=i("Map.prototype.has",!0),E=i("Map.prototype.delete",!0),p=i("Map.prototype.size",!0);return mr=!!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=E(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},mr}var gr,Mt;function xn(){if(Mt)return gr;Mt=1;var e=vr(),i=_t(),u=Pe(),l=qt(),g=he(),w=e("%WeakMap%",!0),R=i("WeakMap.prototype.get",!0),v=i("WeakMap.prototype.set",!0),E=i("WeakMap.prototype.has",!0),p=i("WeakMap.prototype.delete",!0);return gr=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?E(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,gr}var wr,Ft;function Dt(){if(Ft)return wr;Ft=1;var e=he(),i=Pe(),u=nn(),l=qt(),g=xn(),w=g||l||u;return wr=function(){var v,E={assert:function(p){if(!E.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 E},wr}var Sr,Ct;function br(){if(Ct)return Sr;Ct=1;var e=String.prototype.replace,i=/%20/g,u={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Sr={default:u.RFC3986,formatters:{RFC1738:function(l){return e.call(l,i,"+")},RFC3986:function(l){return String(l)}},RFC1738:u.RFC1738,RFC3986:u.RFC3986},Sr}var Er,$t;function Nt(){if($t)return Er;$t=1;var e=br(),i=Dt(),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)},E=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 O=[],_=0;_<d.length;++_)typeof d[_]<"u"&&(O[O.length]=d[_]);c.obj[c.prop]=O}}},y=function(n,c){for(var d=c&&c.plainObjects?{__proto__:null}:{},O=0;O<n.length;++O)typeof n[O]<"u"&&(d[O]=n[O]);return d},M=function b(n,c,d){if(!c)return n;if(typeof c!="object"&&typeof c!="function"){if(l(n)){var O=n.length;if(d&&typeof d.arrayLimit=="number"&&O>d.arrayLimit)return w(y(n.concat(c),d),O);n[O]=c}else if(n&&typeof n=="object")if(R(n)){var _=v(n)+1;n[_]=c,E(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)&&E(s,X)}return s},G)},A=function(n,c){return Object.keys(c).reduce(function(d,O){return d[O]=c[O],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,O,_){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=[],O=0;O<c.length;++O)for(var _=c[O],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,O){if(R(n)){var _=v(n)+1;return n[_]=c,E(n,_),n}var x=[].concat(n,c);return x.length>d?w(y(x,{plainObjects:O}),x.length-1):x},P=function(n,c){if(l(n)){for(var d=[],O=0;O<n.length;O+=1)d[d.length]=c(n[O]);return d}return c(n)};return Er={arrayToObject:y,assign:A,combine:D,compact:I,decode:a,encode:o,isBuffer:S,isOverflow:R,isRegExp:h,markOverflow:w,maybeMap:P,merge:M},Er}var Or,Tt;function qn(){if(Tt)return Or;Tt=1;var e=Dt(),i=Nt(),u=br(),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])},E=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 E.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,O,_,x,U,F,W,$,G){for(var s=o,T=G,K=0,X=!1;(T=T.get(M))!==void 0&&!X;){var oe=T.get(o);if(K+=1,typeof oe<"u"){if(oe===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 le=W?I:c(I,m.encoder,$,"key",U);return[F(le)+"="+F(c(s,m.encoder,$,"value",U))]}return[F(I)+"="+F(String(s))]}var fe=[];if(typeof s>"u")return fe;var ie;if(h==="comma"&&w(s))W&&c&&(s=i.maybeMap(s,c)),ie=[{value:s.length>0?s.join(",")||null:void 0}];else if(w(d))ie=d;else{var Z=Object.keys(s);ie=O?Z.sort(O):Z}var ue=n?String(I).replace(/\./g,"%2E"):String(I),ce=S&&w(s)&&s.length===1?ue+"[]":ue;if(D&&w(s)&&s.length===0)return ce+"[]";for(var j=0;j<ie.length;++j){var C=ie[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(ce,L):ce:ce+(_?"."+L:"["+L+"]");G.set(o,K);var Q=e();Q.set(M,G),v(fe,f(k,H,h,S,D,P,b,n,h==="comma"&&W&&w(s)?null:c,d,O,_,x,U,F,W,$,Q))}}return fe},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 Or=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 O=S[d],_=I[O];h.skipNulls&&_===null||v(P,A(_,O,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:""},Or}var Ar,Lt;function Mn(){if(Lt)return Ar;Lt=1;var e=Nt(),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",E=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,O,_;if(d===-1?(O=f.decoder(n,l.decoder,b,"key"),_=f.strictNullHandling?null:""):(O=f.decoder(n.slice(0,d),l.decoder,b,"key"),O!==null&&(_=e.maybeMap(w(n.slice(d+1),f,u(o[O])?o[O].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(O!==null){var x=i.call(o,O);x&&(f.duplicates==="combine"||n.indexOf("[]=")>-1)?o[O]=e.combine(o[O],_,f.arrayLimit,f.plainObjects):(!x||f.duplicates==="last")&&(o[O]=_)}}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),O=!isNaN(d)&&b!==c&&String(d)===c&&d>=0&&f.parseArrays;if(!f.parseArrays&&c==="")P={0:S};else if(O&&d<f.arrayLimit)P=[],P[d]=S;else{if(O&&f.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");O?(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 Ar=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"?E(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)},Ar}var Rr,Bt;function Fn(){if(Bt)return Rr;Bt=1;var e=qn(),i=Mn(),u=br();return Rr={formats:u,parse:i,stringify:e},Rr}var Dn=Fn();const Cn="0.1.5",$n=["allow-scripts","allow-same-origin","allow-popups"],Nn=["allow-forms","allow-modals","allow-top-navigation-by-user-activation"];function Pr(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=Me(l),v=Dn.stringify({"client-version":Cn,"container-id":i,"relay-session-access-token":u,theme:g},{addQueryPrefix:!0,skipNulls:!0});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",$n.concat(Nn).join(" ")),e.referrerPolicy="no-referrer";const E=R+w+v,p=E.replace(/&/g,"&").replace(/"/g,""");return e.srcdoc=`<!doctype html><meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0;url=${p}">`,e.src=E,e}class Tn{constructor(i,u){this.relayCSS=new Xt("relay-widget-styles"),this.removeResizeListener=null,this.options=u,this.baseUrl=Me(this.options.host),this.containerParent=this.resolveContainer(i),this.containerId=Yt(),this.containerElement=Nr("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=en(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(Zt);try{Pr(this.iframeElement,this.containerId,this.options,"/relay-widget"),Pr(this.popoverIframeElement,this.containerId,this.options,"/relay-popover"),Pr(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(...i){const{clientWidth:u,clientHeight:l}=document.body,g={action:de.Resize,containerId:this.containerId,metadata:{width:u,height:l}};for(const w of i)w.contentWindow?.postMessage(g,this.baseUrl)}setupResizeObserver(){this.iframeElement.addEventListener("load",()=>this.sendResize(this.iframeElement)),this.popoverIframeElement.addEventListener("load",()=>this.sendResize(this.popoverIframeElement)),this.fullscreenIframeElement.addEventListener("load",()=>this.sendResize(this.fullscreenIframeElement));const i=()=>this.sendResize(this.iframeElement,this.popoverIframeElement,this.fullscreenIframeElement);window.addEventListener("resize",i),this.removeResizeListener=()=>window.removeEventListener("resize",i)}destroy(){const i={action:de.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.removeResizeListener?.(),this.removeResizeListener=null,this.containerElement.parentNode&&this.containerParent.removeChild(this.containerElement),this.fullscreenIframeElement.parentNode&&this.fullscreenIframeElement.parentNode.removeChild(this.fullscreenIframeElement),this.unsubscribeFromEvents()}}return Tn}));
|
|
4
|
+
`+t.prev}function _e(r,t){var N=ue(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):[],pe;if(F){pe={};for(var ve=0;ve<q.length;ve++)pe["$"+q[ve]]=q[ve]}for(var Y in r)J(r,Y)&&(N&&String(Number(Y))===Y&&Y<r.length||F&&pe["$"+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 ye=0;ye<q.length;ye++)$.call(r,q[ye])&&B.push("["+t(q[ye])+"]: "+t(r[q[ye]],r));return B}return De}var Ce,zr;function nn(){if(zr)return Ce;zr=1;var e=Pe(),i=he(),u=function(v,O,p){for(var h=v,y;(y=h.next)!=null;h=y)if(y.key===O)return h.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 h=u(v,O);h?h.value=p:v.next={key:O,next:v.next,value:p}},w=function(v,O){return v?!!u(v,O):!1},A=function(v,O){if(v)return u(v,O,!0)};return Ce=function(){var O,p={assert:function(h){if(!p.has(h))throw new i("Side channel does not contain "+e(h))},delete:function(h){var y=A(O,h);return y&&O&&!O.next&&(O=void 0),!!y},get:function(h){return l(O,h)},has:function(h){return w(O,h)},set:function(h,y){O||(O={next:void 0}),g(O,h,y)}};return p},Ce}var $e,Wr;function kr(){return Wr||(Wr=1,$e=Object),$e}var Ne,Gr;function an(){return Gr||(Gr=1,Ne=Error),Ne}var Le,Hr;function on(){return Hr||(Hr=1,Le=EvalError),Le}var Te,jr;function ln(){return jr||(jr=1,Te=RangeError),Te}var Be,Kr;function fn(){return Kr||(Kr=1,Be=ReferenceError),Be}var Ue,Qr;function un(){return Qr||(Qr=1,Ue=SyntaxError),Ue}var ze,Vr;function cn(){return Vr||(Vr=1,ze=URIError),ze}var We,Jr;function sn(){return Jr||(Jr=1,We=Math.abs),We}var ke,Yr;function pn(){return Yr||(Yr=1,ke=Math.floor),ke}var Ge,Xr;function yn(){return Xr||(Xr=1,Ge=Math.max),Ge}var He,Zr;function dn(){return Zr||(Zr=1,He=Math.min),He}var je,et;function vn(){return et||(et=1,je=Math.pow),je}var Ke,rt;function hn(){return rt||(rt=1,Ke=Math.round),Ke}var Qe,tt;function mn(){return tt||(tt=1,Qe=Number.isNaN||function(i){return i!==i}),Qe}var Ve,nt;function gn(){if(nt)return Ve;nt=1;var e=mn();return Ve=function(u){return e(u)||u===0?u:u<0?-1:1},Ve}var Je,at;function wn(){return at||(at=1,Je=Object.getOwnPropertyDescriptor),Je}var Ye,it;function ot(){if(it)return Ye;it=1;var e=wn();if(e)try{e([],"length")}catch{e=null}return Ye=e,Ye}var Xe,lt;function Sn(){if(lt)return Xe;lt=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Xe=e,Xe}var Ze,ft;function bn(){return ft||(ft=1,Ze=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 A=Object.getOwnPropertySymbols(i);if(A.length!==1||A[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}),Ze}var er,ut;function En(){if(ut)return er;ut=1;var e=typeof Symbol<"u"&&Symbol,i=bn();return er=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i()},er}var rr,ct;function st(){return ct||(ct=1,rr=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),rr}var tr,pt;function yt(){if(pt)return tr;pt=1;var e=kr();return tr=e.getPrototypeOf||null,tr}var nr,dt;function On(){if(dt)return nr;dt=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 h=[],y=0;y<O.length;y+=1)h[y]=O[y];for(var M=0;M<p.length;M+=1)h[M+O.length]=p[M];return h},w=function(O,p){for(var h=[],y=p,M=0;y<O.length;y+=1,M+=1)h[M]=O[y];return h},A=function(v,O){for(var p="",h=0;h<v.length;h+=1)p+=v[h],h+1<v.length&&(p+=O);return p};return nr=function(O){var p=this;if(typeof p!="function"||i.apply(p)!==l)throw new TypeError(e+p);for(var h=w(arguments,1),y,M=function(){if(this instanceof y){var I=p.apply(this,g(h,arguments));return Object(I)===I?I:this}return p.apply(O,g(h,arguments))},R=u(0,p.length-h.length),a=[],f=0;f<R;f++)a[f]="$"+f;if(y=Function("binder","return function ("+A(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},nr}var ar,vt;function Ie(){if(vt)return ar;vt=1;var e=On();return ar=Function.prototype.bind||e,ar}var ir,ht;function or(){return ht||(ht=1,ir=Function.prototype.call),ir}var lr,mt;function gt(){return mt||(mt=1,lr=Function.prototype.apply),lr}var fr,wt;function Rn(){return wt||(wt=1,fr=typeof Reflect<"u"&&Reflect&&Reflect.apply),fr}var ur,St;function An(){if(St)return ur;St=1;var e=Ie(),i=gt(),u=or(),l=Rn();return ur=l||e.call(u,i),ur}var cr,bt;function Et(){if(bt)return cr;bt=1;var e=Ie(),i=he(),u=or(),l=An();return cr=function(w){if(w.length<1||typeof w[0]!="function")throw new i("a function is required");return l(e,u,w)},cr}var sr,Ot;function Pn(){if(Ot)return sr;Ot=1;var e=Et(),i=ot(),u;try{u=[].__proto__===Array.prototype}catch(A){if(!A||typeof A!="object"||!("code"in A)||A.code!=="ERR_PROTO_ACCESS")throw A}var l=!!u&&i&&i(Object.prototype,"__proto__"),g=Object,w=g.getPrototypeOf;return sr=l&&typeof l.get=="function"?e([l.get]):typeof w=="function"?function(v){return w(v==null?v:g(v))}:!1,sr}var pr,Rt;function In(){if(Rt)return pr;Rt=1;var e=st(),i=yt(),u=Pn();return pr=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,pr}var yr,At;function _n(){if(At)return yr;At=1;var e=Function.prototype.call,i=Object.prototype.hasOwnProperty,u=Ie();return yr=u.call(e,i),yr}var dr,Pt;function vr(){if(Pt)return dr;Pt=1;var e,i=kr(),u=an(),l=on(),g=ln(),w=fn(),A=un(),v=he(),O=cn(),p=sn(),h=pn(),y=yn(),M=dn(),R=vn(),a=hn(),f=gn(),o=Function,I=function(j){try{return o('"use strict"; return ('+j+").constructor;")()}catch{}},m=ot(),S=Sn(),D=function(){throw new v},P=m?(function(){try{return arguments.callee,D}catch{try{return m(arguments,"callee").get}catch{return D}}})():D,b=En()(),n=In(),c=yt(),d=st(),E=gt(),_=or(),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%":m,"%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%":A,"%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%":h,"%Math.max%":y,"%Math.min%":M,"%Math.pow%":R,"%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 T=j("%AsyncGeneratorFunction%");T&&(k=T.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=Ie(),L=_n(),K=s.call(_,Array.prototype.concat),X=s.call(E,Array.prototype.splice),oe=s.call(_,String.prototype.replace),le=s.call(_,String.prototype.slice),fe=s.call(_,RegExp.prototype.exec),ie=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Z=/\\(\\)?/g,ue=function(C){var k=le(C,0,1),T=le(C,-1);if(k==="%"&&T!=="%")throw new A("invalid intrinsic syntax, expected closing `%`");if(T==="%"&&k!=="%")throw new A("invalid intrinsic syntax, expected opening `%`");var H=[];return oe(C,ie,function(Q,ee,V,J){H[H.length]=V?oe(J,Z,"$1"):ee||Q}),H},ce=function(C,k){var T=C,H;if(L(G,T)&&(H=G[T],T="%"+H[0]+"%"),L(F,T)){var Q=F[T];if(Q===x&&(Q=$(T)),typeof Q>"u"&&!k)throw new v("intrinsic "+C+" exists, but is not available. Please file an issue!");return{alias:H,name:T,value:Q}}throw new A("intrinsic "+C+" does not exist!")};return dr=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(fe(/^%?[^%]*%?$/,C)===null)throw new A("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var T=ue(C),H=T.length>0?T[0]:"",Q=ce("%"+H+"%",k),ee=Q.name,V=Q.value,J=!1,re=Q.alias;re&&(H=re[0],X(T,K([0,1],re)));for(var me=1,se=!0;me<T.length;me+=1){var ne=T[me],ge=le(ne,0,1),we=le(ne,-1);if((ge==='"'||ge==="'"||ge==="`"||we==='"'||we==="'"||we==="`")&&ge!==we)throw new A("property names with quotes must have matching quotes");if((ne==="constructor"||!se)&&(J=!0),H+="."+ne,ee="%"+H+"%",L(F,ee))V=F[ee];else if(V!=null){if(!(ne in V)){if(!k)throw new v("base intrinsic for "+C+" exists, but the property is not available.");return}if(m&&me+1>=T.length){var Se=m(V,ne);se=!!Se,se&&"get"in Se&&!("originalValue"in Se.get)?V=Se.get:V=V[ne]}else se=L(V,ne),V=V[ne];se&&!J&&(F[ee]=V)}}return V},dr}var hr,It;function _t(){if(It)return hr;It=1;var e=vr(),i=Et(),u=i([e("%String.prototype.indexOf%")]);return hr=function(g,w){var A=e(g,!!w);return typeof A=="function"&&u(g,".prototype.")>-1?i([A]):A},hr}var mr,xt;function qt(){if(xt)return mr;xt=1;var e=vr(),i=_t(),u=Pe(),l=he(),g=e("%Map%",!0),w=i("Map.prototype.get",!0),A=i("Map.prototype.set",!0),v=i("Map.prototype.has",!0),O=i("Map.prototype.delete",!0),p=i("Map.prototype.size",!0);return mr=!!g&&function(){var y,M={assert:function(R){if(!M.has(R))throw new l("Side channel does not contain "+u(R))},delete:function(R){if(y){var a=O(y,R);return p(y)===0&&(y=void 0),a}return!1},get:function(R){if(y)return w(y,R)},has:function(R){return y?v(y,R):!1},set:function(R,a){y||(y=new g),A(y,R,a)}};return M},mr}var gr,Mt;function xn(){if(Mt)return gr;Mt=1;var e=vr(),i=_t(),u=Pe(),l=qt(),g=he(),w=e("%WeakMap%",!0),A=i("WeakMap.prototype.get",!0),v=i("WeakMap.prototype.set",!0),O=i("WeakMap.prototype.has",!0),p=i("WeakMap.prototype.delete",!0);return gr=w?function(){var y,M,R={assert:function(a){if(!R.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?A(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 R}:l,gr}var wr,Ft;function Dt(){if(Ft)return wr;Ft=1;var e=he(),i=Pe(),u=nn(),l=qt(),g=xn(),w=g||l||u;return wr=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,h){v||(v=w()),v.set(p,h)}};return O},wr}var Sr,Ct;function br(){if(Ct)return Sr;Ct=1;var e=String.prototype.replace,i=/%20/g,u={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Sr={default:u.RFC3986,formatters:{RFC1738:function(l){return e.call(l,i,"+")},RFC3986:function(l){return String(l)}},RFC1738:u.RFC1738,RFC3986:u.RFC3986},Sr}var Er,$t;function Nt(){if($t)return Er;$t=1;var e=br(),i=Dt(),u=Object.prototype.hasOwnProperty,l=Array.isArray,g=i(),w=function(n,c){return g.set(n,c),n},A=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})(),h=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(A(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(A(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,L){if(u.call(n,L)){var K=n[L];K&&typeof K=="object"&&s&&typeof s=="object"?n[L]=b(K,s,d):n[n.length]=s}else n[L]=s}),n):Object.keys(c).reduce(function(s,L){var K=c[L];if(u.call(s,L)?s[L]=b(s[L],K,d):s[L]=K,A(c)&&!A(s)&&w(s,v(c)),A(s)){var X=parseInt(L,10);String(X)===L&&X>=0&&X>v(s)&&O(s,X)}return s},G)},R=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(L){return"%26%23"+parseInt(L.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 h(c),n},m=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(A(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 Er={arrayToObject:y,assign:R,combine:D,compact:I,decode:a,encode:o,isBuffer:S,isOverflow:A,isRegExp:m,markOverflow:w,maybeMap:P,merge:M},Er}var Or,Lt;function qn(){if(Lt)return Or;Lt=1;var e=Dt(),i=Nt(),u=br(),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,A=Array.prototype.push,v=function(f,o){A.apply(f,w(o)?o:[o])},O=Date.prototype.toISOString,p=u.default,h={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={},R=function f(o,I,m,S,D,P,b,n,c,d,E,_,x,U,F,W,$,G){for(var s=o,L=G,K=0,X=!1;(L=L.get(M))!==void 0&&!X;){var oe=L.get(o);if(K+=1,typeof oe<"u"){if(oe===K)throw new RangeError("Cyclic object value");X=!0}typeof L.get(M)>"u"&&(K=0)}if(typeof d=="function"?s=d(I,s):s instanceof Date?s=x(s):m==="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,h.encoder,$,"key",U):I;s=""}if(y(s)||i.isBuffer(s)){if(c){var le=W?I:c(I,h.encoder,$,"key",U);return[F(le)+"="+F(c(s,h.encoder,$,"value",U))]}return[F(I)+"="+F(String(s))]}var fe=[];if(typeof s>"u")return fe;var ie;if(m==="comma"&&w(s))W&&c&&(s=i.maybeMap(s,c)),ie=[{value:s.length>0?s.join(",")||null:void 0}];else if(w(d))ie=d;else{var Z=Object.keys(s);ie=E?Z.sort(E):Z}var ue=n?String(I).replace(/\./g,"%2E"):String(I),ce=S&&w(s)&&s.length===1?ue+"[]":ue;if(D&&w(s)&&s.length===0)return ce+"[]";for(var j=0;j<ie.length;++j){var C=ie[j],k=typeof C=="object"&&C&&typeof C.value<"u"?C.value:s[C];if(!(b&&k===null)){var T=_&&n?String(C).replace(/\./g,"%2E"):String(C),H=w(s)?typeof m=="function"?m(ce,T):ce:ce+(_?"."+T:"["+T+"]");G.set(o,K);var Q=e();Q.set(M,G),v(fe,f(k,H,m,S,D,P,b,n,m==="comma"&&W&&w(s)?null:c,d,E,_,x,U,F,W,$,Q))}}return fe},a=function(o){if(!o)return h;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||h.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 m=u.default;if(typeof o.format<"u"){if(!l.call(u.formatters,o.format))throw new TypeError("Unknown format option provided.");m=o.format}var S=u.formatters[m],D=h.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=h.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:h.allowDots:!!o.allowDots;return{addQueryPrefix:typeof o.addQueryPrefix=="boolean"?o.addQueryPrefix:h.addQueryPrefix,allowDots:b,allowEmptyArrays:typeof o.allowEmptyArrays=="boolean"?!!o.allowEmptyArrays:h.allowEmptyArrays,arrayFormat:P,charset:I,charsetSentinel:typeof o.charsetSentinel=="boolean"?o.charsetSentinel:h.charsetSentinel,commaRoundTrip:!!o.commaRoundTrip,delimiter:typeof o.delimiter>"u"?h.delimiter:o.delimiter,encode:typeof o.encode=="boolean"?o.encode:h.encode,encodeDotInKeys:typeof o.encodeDotInKeys=="boolean"?o.encodeDotInKeys:h.encodeDotInKeys,encoder:typeof o.encoder=="function"?o.encoder:h.encoder,encodeValuesOnly:typeof o.encodeValuesOnly=="boolean"?o.encodeValuesOnly:h.encodeValuesOnly,filter:D,format:m,formatter:S,serializeDate:typeof o.serializeDate=="function"?o.serializeDate:h.serializeDate,skipNulls:typeof o.skipNulls=="boolean"?o.skipNulls:h.skipNulls,sort:typeof o.sort=="function"?o.sort:null,strictNullHandling:typeof o.strictNullHandling=="boolean"?o.strictNullHandling:h.strictNullHandling}};return Or=function(f,o){var I=f,m=a(o),S,D;typeof m.filter=="function"?(D=m.filter,I=D("",I)):w(m.filter)&&(D=m.filter,S=D);var P=[];if(typeof I!="object"||I===null)return"";var b=g[m.arrayFormat],n=b==="comma"&&m.commaRoundTrip;S||(S=Object.keys(I)),m.sort&&S.sort(m.sort);for(var c=e(),d=0;d<S.length;++d){var E=S[d],_=I[E];m.skipNulls&&_===null||v(P,R(_,E,b,n,m.allowEmptyArrays,m.strictNullHandling,m.skipNulls,m.encodeDotInKeys,m.encode?m.encoder:null,m.filter,m.sort,m.allowDots,m.serializeDate,m.format,m.formatter,m.encodeValuesOnly,m.charset,c))}var x=P.join(m.delimiter),U=m.addQueryPrefix===!0?"?":"";return m.charsetSentinel&&(m.charset==="iso-8859-1"?U+="utf8=%26%2310003%3B&":U+="utf8=%E2%9C%93&"),x.length>0?U+x:""},Or}var Rr,Tt;function Mn(){if(Tt)return Rr;Tt=1;var e=Nt(),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(R){return R.replace(/&#(\d+);/g,function(a,f){return String.fromCharCode(parseInt(f,10))})},w=function(R,a,f){if(R&&typeof R=="string"&&a.comma&&R.indexOf(",")>-1)return R.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 R},A="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 m=f.parameterLimit===1/0?void 0:f.parameterLimit,S=I.split(f.delimiter,f.throwOnLimitExceeded&&typeof m<"u"?m+1:m);if(f.throwOnLimitExceeded&&typeof m<"u"&&S.length>m)throw new RangeError("Parameter limit exceeded. Only "+m+" parameter"+(m===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]===A&&(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(R,a,f,o){var I=0;if(R.length>0&&R[R.length-1]==="[]"){var m=R.slice(0,-1).join("");I=Array.isArray(a)&&a[m]?a[m].length:0}for(var S=o?a:w(a,f,I),D=R.length-1;D>=0;--D){var P,b=R[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},h=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=/(\[[^[\]]*])/,m=/(\[[^[\]]*])/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=m.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 m=h(a,o);if(m)return p(m,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 Rr=function(R,a){var f=M(a);if(R===""||R===null||typeof R>"u")return f.plainObjects?{__proto__:null}:{};for(var o=typeof R=="string"?O(R,f):R,I=f.plainObjects?{__proto__:null}:{},m=Object.keys(o),S=0;S<m.length;++S){var D=m[S],P=y(D,o[D],f,typeof R=="string");I=e.merge(I,P,f)}return f.allowSparse===!0?I:e.compact(I)},Rr}var Ar,Bt;function Fn(){if(Bt)return Ar;Bt=1;var e=qn(),i=Mn(),u=br();return Ar={formats:u,parse:i,stringify:e},Ar}var Dn=Fn();const Cn="0.1.6",$n=["allow-scripts","allow-same-origin","allow-popups"],Nn=["allow-forms","allow-modals","allow-top-navigation-by-user-activation"];function Pr(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 A=Me(l),v=Dn.stringify({"client-version":Cn,"container-id":i,"relay-session-access-token":u,theme:g},{addQueryPrefix:!0,skipNulls:!0}),O=new URL(A).origin,p=(...M)=>M.map(R=>`${R} ${O}`).join(";");w==="/relay-popover"?(e.title="Relay popover",e.className="relay-widget__popover-iframe",e.allow=p("clipboard-write")):w==="/relay-fullscreen"?(e.title="Relay fullscreen",e.className="relay-widget__fullscreen-iframe",e.allow=p("camera","microphone","clipboard-write")):(e.title="Verify via Relay",e.className="relay-widget__iframe",e.allow=p("clipboard-write")),e.setAttribute("sandbox",$n.concat(Nn).join(" ")),e.referrerPolicy="no-referrer";const h=A+w+v,y=h.replace(/&/g,"&").replace(/"/g,""");return e.srcdoc=`<!doctype html><meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0;url=${y}"><meta name="color-scheme" content="light dark">`,e.src=h,e}class Ln{constructor(i,u){this.relayCSS=new Xt("relay-widget-styles"),this.removeResizeListener=null,this.options=u,this.baseUrl=Me(this.options.host),this.containerParent=this.resolveContainer(i),this.containerId=Yt(),this.containerElement=Nr("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=en(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(Zt);try{Pr(this.iframeElement,this.containerId,this.options,"/relay-widget"),Pr(this.popoverIframeElement,this.containerId,this.options,"/relay-popover"),Pr(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(...i){const{clientWidth:u,clientHeight:l}=document.body,g={action:de.Resize,containerId:this.containerId,metadata:{width:u,height:l}};for(const w of i)w.contentWindow?.postMessage(g,this.baseUrl)}setupResizeObserver(){this.iframeElement.addEventListener("load",()=>this.sendResize(this.iframeElement)),this.popoverIframeElement.addEventListener("load",()=>this.sendResize(this.popoverIframeElement)),this.fullscreenIframeElement.addEventListener("load",()=>this.sendResize(this.fullscreenIframeElement));const i=()=>this.sendResize(this.iframeElement,this.popoverIframeElement,this.fullscreenIframeElement);window.addEventListener("resize",i),this.removeResizeListener=()=>window.removeEventListener("resize",i)}destroy(){const i={action:de.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.removeResizeListener?.(),this.removeResizeListener=null,this.containerElement.parentNode&&this.containerParent.removeChild(this.containerElement),this.fullscreenIframeElement.parentNode&&this.fullscreenIframeElement.parentNode.removeChild(this.fullscreenIframeElement),this.unsubscribeFromEvents()}}return Ln}));
|
|
5
5
|
//# sourceMappingURL=relay.umd.js.map
|