@dcl/auth-site 1.2.4-7572518993.commit-ba9c520 → 1.2.4-7585137333.commit-93eebf0
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/assets/{index-9869a0b6.css → index-954b94d9.css} +3 -3
- package/assets/{index-571a2353.js → index-98b84772.js} +2 -2
- package/assets/{index-571a2353.js.map → index-98b84772.js.map} +1 -1
- package/assets/index-b5cbbcfd.js +188 -0
- package/assets/index-b5cbbcfd.js.map +1 -0
- package/assets/{index-45c54bb2.js → index-fdf526b8.js} +2 -2
- package/assets/{index-45c54bb2.js.map → index-fdf526b8.js.map} +1 -1
- package/index.html +2 -2
- package/package.json +3 -3
- package/assets/index-409d6258.js +0 -187
- package/assets/index-409d6258.js.map +0 -1
package/assets/index-409d6258.js
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
var d0e=Object.defineProperty;var h0e=(t,e,r)=>e in t?d0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var He=(t,e,r)=>(h0e(t,typeof e!="symbol"?e+"":e,r),r),kO=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var Y=(t,e,r)=>(kO(t,e,"read from private field"),r?r.call(t):e.get(t)),Ze=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Te=(t,e,r,n)=>(kO(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Nm=(t,e,r,n)=>({set _(i){Te(t,e,i,r)},get _(){return Y(t,e,n)}}),Et=(t,e,r)=>(kO(t,e,"access private method"),r);function p0e(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function lo(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var JQ={exports:{}},dw={};/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/var A7=Object.getOwnPropertySymbols,g0e=Object.prototype.hasOwnProperty,y0e=Object.prototype.propertyIsEnumerable;function m0e(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function v0e(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(e).map(function(a){return e[a]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var XQ=v0e()?Object.assign:function(t,e){for(var r,n=m0e(t),i,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var o in r)g0e.call(r,o)&&(n[o]=r[o]);if(A7){i=A7(r);for(var s=0;s<i.length;s++)y0e.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n},ZQ={exports:{}},hn={};/** @license React v17.0.2
|
|
6
|
-
* react.production.min.js
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var K4=XQ,Hy=60103,eJ=60106;hn.Fragment=60107;hn.StrictMode=60108;hn.Profiler=60114;var tJ=60109,rJ=60110,nJ=60112;hn.Suspense=60113;var iJ=60115,aJ=60116;if(typeof Symbol=="function"&&Symbol.for){var sc=Symbol.for;Hy=sc("react.element"),eJ=sc("react.portal"),hn.Fragment=sc("react.fragment"),hn.StrictMode=sc("react.strict_mode"),hn.Profiler=sc("react.profiler"),tJ=sc("react.provider"),rJ=sc("react.context"),nJ=sc("react.forward_ref"),hn.Suspense=sc("react.suspense"),iJ=sc("react.memo"),aJ=sc("react.lazy")}var S7=typeof Symbol=="function"&&Symbol.iterator;function b0e(t){return t===null||typeof t!="object"?null:(t=S7&&t[S7]||t["@@iterator"],typeof t=="function"?t:null)}function hw(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var oJ={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sJ={};function Vy(t,e,r){this.props=t,this.context=e,this.refs=sJ,this.updater=r||oJ}Vy.prototype.isReactComponent={};Vy.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error(hw(85));this.updater.enqueueSetState(this,t,e,"setState")};Vy.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function cJ(){}cJ.prototype=Vy.prototype;function Y4(t,e,r){this.props=t,this.context=e,this.refs=sJ,this.updater=r||oJ}var Q4=Y4.prototype=new cJ;Q4.constructor=Y4;K4(Q4,Vy.prototype);Q4.isPureReactComponent=!0;var J4={current:null},uJ=Object.prototype.hasOwnProperty,lJ={key:!0,ref:!0,__self:!0,__source:!0};function fJ(t,e,r){var n,i={},a=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(a=""+e.key),e)uJ.call(e,n)&&!lJ.hasOwnProperty(n)&&(i[n]=e[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];i.children=c}if(t&&t.defaultProps)for(n in s=t.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:Hy,type:t,key:a,ref:o,props:i,_owner:J4.current}}function w0e(t,e){return{$$typeof:Hy,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function X4(t){return typeof t=="object"&&t!==null&&t.$$typeof===Hy}function _0e(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var I7=/\/+/g;function LO(t,e){return typeof t=="object"&&t!==null&&t.key!=null?_0e(""+t.key):e.toString(36)}function zE(t,e,r,n,i){var a=typeof t;(a==="undefined"||a==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Hy:case eJ:o=!0}}if(o)return o=t,i=i(o),t=n===""?"."+LO(o,0):n,Array.isArray(i)?(r="",t!=null&&(r=t.replace(I7,"$&/")+"/"),zE(i,e,r,"",function(u){return u})):i!=null&&(X4(i)&&(i=w0e(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(I7,"$&/")+"/")+t)),e.push(i)),1;if(o=0,n=n===""?".":n+":",Array.isArray(t))for(var s=0;s<t.length;s++){a=t[s];var c=n+LO(a,s);o+=zE(a,e,r,c,i)}else if(c=b0e(t),typeof c=="function")for(t=c.call(t),s=0;!(a=t.next()).done;)a=a.value,c=n+LO(a,s++),o+=zE(a,e,r,c,i);else if(a==="object")throw e=""+t,Error(hw(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e));return o}function M_(t,e,r){if(t==null)return t;var n=[],i=0;return zE(t,n,"","",function(a){return e.call(r,a,i++)}),n}function E0e(t){if(t._status===-1){var e=t._result;e=e(),t._status=0,t._result=e,e.then(function(r){t._status===0&&(r=r.default,t._status=1,t._result=r)},function(r){t._status===0&&(t._status=2,t._result=r)})}if(t._status===1)return t._result;throw t._result}var dJ={current:null};function Bl(){var t=dJ.current;if(t===null)throw Error(hw(321));return t}var x0e={ReactCurrentDispatcher:dJ,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:J4,IsSomeRendererActing:{current:!1},assign:K4};hn.Children={map:M_,forEach:function(t,e,r){M_(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return M_(t,function(){e++}),e},toArray:function(t){return M_(t,function(e){return e})||[]},only:function(t){if(!X4(t))throw Error(hw(143));return t}};hn.Component=Vy;hn.PureComponent=Y4;hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=x0e;hn.cloneElement=function(t,e,r){if(t==null)throw Error(hw(267,t));var n=K4({},t.props),i=t.key,a=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(a=e.ref,o=J4.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var s=t.type.defaultProps;for(c in e)uJ.call(e,c)&&!lJ.hasOwnProperty(c)&&(n[c]=e[c]===void 0&&s!==void 0?s[c]:e[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){s=Array(c);for(var u=0;u<c;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:Hy,type:t.type,key:i,ref:a,props:n,_owner:o}};hn.createContext=function(t,e){return e===void 0&&(e=null),t={$$typeof:rJ,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider={$$typeof:tJ,_context:t},t.Consumer=t};hn.createElement=fJ;hn.createFactory=function(t){var e=fJ.bind(null,t);return e.type=t,e};hn.createRef=function(){return{current:null}};hn.forwardRef=function(t){return{$$typeof:nJ,render:t}};hn.isValidElement=X4;hn.lazy=function(t){return{$$typeof:aJ,_payload:{_status:-1,_result:t},_init:E0e}};hn.memo=function(t,e){return{$$typeof:iJ,type:t,compare:e===void 0?null:e}};hn.useCallback=function(t,e){return Bl().useCallback(t,e)};hn.useContext=function(t,e){return Bl().useContext(t,e)};hn.useDebugValue=function(){};hn.useEffect=function(t,e){return Bl().useEffect(t,e)};hn.useImperativeHandle=function(t,e,r){return Bl().useImperativeHandle(t,e,r)};hn.useLayoutEffect=function(t,e){return Bl().useLayoutEffect(t,e)};hn.useMemo=function(t,e){return Bl().useMemo(t,e)};hn.useReducer=function(t,e,r){return Bl().useReducer(t,e,r)};hn.useRef=function(t){return Bl().useRef(t)};hn.useState=function(t){return Bl().useState(t)};hn.version="17.0.2";ZQ.exports=hn;var Be=ZQ.exports;const hJ=kc(Be),A0e=p0e({__proto__:null,default:hJ},[Be]);/** @license React v17.0.2
|
|
13
|
-
* react-jsx-runtime.production.min.js
|
|
14
|
-
*
|
|
15
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the MIT license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var S0e=Be,pJ=60103;dw.Fragment=60107;if(typeof Symbol=="function"&&Symbol.for){var O7=Symbol.for;pJ=O7("react.element"),dw.Fragment=O7("react.fragment")}var I0e=S0e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,O0e=Object.prototype.hasOwnProperty,P0e={key:!0,ref:!0,__self:!0,__source:!0};function gJ(t,e,r){var n,i={},a=null,o=null;r!==void 0&&(a=""+r),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)O0e.call(e,n)&&!P0e.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:pJ,type:t,key:a,ref:o,props:i,_owner:I0e.current}}dw.jsx=gJ;dw.jsxs=gJ;JQ.exports=dw;var Fe=JQ.exports;var yJ={exports:{}},Ks={},mJ={exports:{}},vJ={};/** @license React v0.20.2
|
|
20
|
-
* scheduler.production.min.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/(function(t){var e,r,n,i;if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}if(typeof window>"u"||typeof MessageChannel!="function"){var c=null,u=null,f=function(){if(c!==null)try{var $=t.unstable_now();c(!0,$),c=null}catch(H){throw setTimeout(f,0),H}};e=function($){c!==null?setTimeout(e,0,$):(c=$,setTimeout(f,0))},r=function($,H){u=setTimeout($,H)},n=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,g=window.clearTimeout;if(typeof console<"u"){var m=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof m!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var w=!1,v=null,y=-1,_=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},i=function(){},t.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<$?Math.floor(1e3/$):5};var S=new MessageChannel,x=S.port2;S.port1.onmessage=function(){if(v!==null){var $=t.unstable_now();b=$+_;try{v(!0,$)?x.postMessage(null):(w=!1,v=null)}catch(H){throw x.postMessage(null),H}}else w=!1},e=function($){v=$,w||(w=!0,x.postMessage(null))},r=function($,H){y=d(function(){$(t.unstable_now())},H)},n=function(){g(y),y=-1}}function I($,H){var L=$.length;$.push(H);e:for(;;){var k=L-1>>>1,G=$[k];if(G!==void 0&&0<O(G,H))$[k]=H,$[L]=G,L=k;else break e}}function E($){return $=$[0],$===void 0?null:$}function p($){var H=$[0];if(H!==void 0){var L=$.pop();if(L!==H){$[0]=L;e:for(var k=0,G=$.length;k<G;){var ge=2*(k+1)-1,Q=$[ge],te=ge+1,ue=$[te];if(Q!==void 0&&0>O(Q,L))ue!==void 0&&0>O(ue,Q)?($[k]=ue,$[te]=L,k=te):($[k]=Q,$[ge]=L,k=ge);else if(ue!==void 0&&0>O(ue,L))$[k]=ue,$[te]=L,k=te;else break e}}return H}return null}function O($,H){var L=$.sortIndex-H.sortIndex;return L!==0?L:$.id-H.id}var C=[],M=[],B=1,ce=null,he=3,F=!1,U=!1,K=!1;function ne($){for(var H=E(M);H!==null;){if(H.callback===null)p(M);else if(H.startTime<=$)p(M),H.sortIndex=H.expirationTime,I(C,H);else break;H=E(M)}}function j($){if(K=!1,ne($),!U)if(E(C)!==null)U=!0,e(q);else{var H=E(M);H!==null&&r(j,H.startTime-$)}}function q($,H){U=!1,K&&(K=!1,n()),F=!0;var L=he;try{for(ne(H),ce=E(C);ce!==null&&(!(ce.expirationTime>H)||$&&!t.unstable_shouldYield());){var k=ce.callback;if(typeof k=="function"){ce.callback=null,he=ce.priorityLevel;var G=k(ce.expirationTime<=H);H=t.unstable_now(),typeof G=="function"?ce.callback=G:ce===E(C)&&p(C),ne(H)}else p(C);ce=E(C)}if(ce!==null)var ge=!0;else{var Q=E(M);Q!==null&&r(j,Q.startTime-H),ge=!1}return ge}finally{ce=null,he=L,F=!1}}var V=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function($){$.callback=null},t.unstable_continueExecution=function(){U||F||(U=!0,e(q))},t.unstable_getCurrentPriorityLevel=function(){return he},t.unstable_getFirstCallbackNode=function(){return E(C)},t.unstable_next=function($){switch(he){case 1:case 2:case 3:var H=3;break;default:H=he}var L=he;he=H;try{return $()}finally{he=L}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=V,t.unstable_runWithPriority=function($,H){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var L=he;he=$;try{return H()}finally{he=L}},t.unstable_scheduleCallback=function($,H,L){var k=t.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?k+L:k):L=k,$){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=L+G,$={id:B++,callback:H,priorityLevel:$,startTime:L,expirationTime:G,sortIndex:-1},L>k?($.sortIndex=L,I(M,$),E(C)===null&&$===E(M)&&(K?n():K=!0,r(j,L-k))):($.sortIndex=G,I(C,$),U||F||(U=!0,e(q))),$},t.unstable_wrapCallback=function($){var H=he;return function(){var L=he;he=H;try{return $.apply(this,arguments)}finally{he=L}}}})(vJ);mJ.exports=vJ;var T0e=mJ.exports;/** @license React v17.0.2
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var E2=Be,ni=XQ,Xi=T0e;function bt(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!E2)throw Error(bt(227));var bJ=new Set,i1={};function vp(t,e){py(t,e),py(t+"Capture",e)}function py(t,e){for(i1[t]=e,t=0;t<e.length;t++)bJ.add(e[t])}var Nl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),R0e=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,P7=Object.prototype.hasOwnProperty,T7={},R7={};function C0e(t){return P7.call(R7,t)?!0:P7.call(T7,t)?!1:R0e.test(t)?R7[t]=!0:(T7[t]=!0,!1)}function N0e(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function D0e(t,e,r,n){if(e===null||typeof e>"u"||N0e(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function fo(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var va={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){va[t]=new fo(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];va[e]=new fo(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){va[t]=new fo(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){va[t]=new fo(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){va[t]=new fo(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){va[t]=new fo(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){va[t]=new fo(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){va[t]=new fo(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){va[t]=new fo(t,5,!1,t.toLowerCase(),null,!1,!1)});var Z4=/[\-:]([a-z])/g;function eD(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Z4,eD);va[e]=new fo(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Z4,eD);va[e]=new fo(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Z4,eD);va[e]=new fo(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){va[t]=new fo(t,1,!1,t.toLowerCase(),null,!1,!1)});va.xlinkHref=new fo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){va[t]=new fo(t,1,!1,t.toLowerCase(),null,!0,!0)});function tD(t,e,r,n){var i=va.hasOwnProperty(e)?va[e]:null,a=i!==null?i.type===0:n?!1:!(!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N");a||(D0e(e,r,i,n)&&(r=null),n||i===null?C0e(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var bp=E2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,nb=60103,mh=60106,Sf=60107,rD=60108,Ib=60114,nD=60109,iD=60110,x2=60112,Ob=60113,Hx=60120,A2=60115,aD=60116,oD=60121,sD=60128,wJ=60129,cD=60130,f6=60131;if(typeof Symbol=="function"&&Symbol.for){var Gi=Symbol.for;nb=Gi("react.element"),mh=Gi("react.portal"),Sf=Gi("react.fragment"),rD=Gi("react.strict_mode"),Ib=Gi("react.profiler"),nD=Gi("react.provider"),iD=Gi("react.context"),x2=Gi("react.forward_ref"),Ob=Gi("react.suspense"),Hx=Gi("react.suspense_list"),A2=Gi("react.memo"),aD=Gi("react.lazy"),oD=Gi("react.block"),Gi("react.scope"),sD=Gi("react.opaque.id"),wJ=Gi("react.debug_trace_mode"),cD=Gi("react.offscreen"),f6=Gi("react.legacy_hidden")}var C7=typeof Symbol=="function"&&Symbol.iterator;function Dm(t){return t===null||typeof t!="object"?null:(t=C7&&t[C7]||t["@@iterator"],typeof t=="function"?t:null)}var UO;function ib(t){if(UO===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);UO=e&&e[1]||""}return`
|
|
34
|
-
`+UO+t}var BO=!1;function k_(t,e){if(!t||BO)return"";BO=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var n=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){n=c}t.call(e.prototype)}else{try{throw Error()}catch(c){n=c}t()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
|
35
|
-
`),a=n.stack.split(`
|
|
36
|
-
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s])return`
|
|
37
|
-
`+i[o].replace(" at new "," at ");while(1<=o&&0<=s);break}}}finally{BO=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ib(t):""}function $0e(t){switch(t.tag){case 5:return ib(t.type);case 16:return ib("Lazy");case 13:return ib("Suspense");case 19:return ib("SuspenseList");case 0:case 2:case 15:return t=k_(t.type,!1),t;case 11:return t=k_(t.type.render,!1),t;case 22:return t=k_(t.type._render,!1),t;case 1:return t=k_(t.type,!0),t;default:return""}}function rg(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Sf:return"Fragment";case mh:return"Portal";case Ib:return"Profiler";case rD:return"StrictMode";case Ob:return"Suspense";case Hx:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case iD:return(t.displayName||"Context")+".Consumer";case nD:return(t._context.displayName||"Context")+".Provider";case x2:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case A2:return rg(t.type);case oD:return rg(t._render);case aD:e=t._payload,t=t._init;try{return rg(t(e))}catch{}}return null}function od(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function _J(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function M0e(t){var e=_J(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function L_(t){t._valueTracker||(t._valueTracker=M0e(t))}function EJ(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=_J(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Vx(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function d6(t,e){var r=e.checked;return ni({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function N7(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=od(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function xJ(t,e){e=e.checked,e!=null&&tD(t,"checked",e,!1)}function h6(t,e){xJ(t,e);var r=od(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?p6(t,e.type,r):e.hasOwnProperty("defaultValue")&&p6(t,e.type,od(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function D7(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function p6(t,e,r){(e!=="number"||Vx(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}function k0e(t){var e="";return E2.Children.forEach(t,function(r){r!=null&&(e+=r)}),e}function g6(t,e){return t=ni({children:void 0},e),(e=k0e(e.children))&&(t.children=e),t}function ng(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+od(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function y6(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(bt(91));return ni({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function $7(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(bt(92));if(Array.isArray(r)){if(!(1>=r.length))throw Error(bt(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:od(r)}}function AJ(t,e){var r=od(e.value),n=od(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function M7(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}var m6={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function SJ(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function v6(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?SJ(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var U_,IJ=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!==m6.svg||"innerHTML"in t)t.innerHTML=e;else{for(U_=U_||document.createElement("div"),U_.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=U_.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function a1(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Pb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},L0e=["Webkit","ms","Moz","O"];Object.keys(Pb).forEach(function(t){L0e.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Pb[e]=Pb[t]})});function OJ(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Pb.hasOwnProperty(t)&&Pb[t]?(""+e).trim():e+"px"}function PJ(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=OJ(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var U0e=ni({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function b6(t,e){if(e){if(U0e[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(bt(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(bt(60));if(!(typeof e.dangerouslySetInnerHTML=="object"&&"__html"in e.dangerouslySetInnerHTML))throw Error(bt(61))}if(e.style!=null&&typeof e.style!="object")throw Error(bt(62))}}function w6(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function uD(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var _6=null,ig=null,ag=null;function k7(t){if(t=gw(t)){if(typeof _6!="function")throw Error(bt(280));var e=t.stateNode;e&&(e=R2(e),_6(t.stateNode,t.type,e))}}function TJ(t){ig?ag?ag.push(t):ag=[t]:ig=t}function RJ(){if(ig){var t=ig,e=ag;if(ag=ig=null,k7(t),e)for(t=0;t<e.length;t++)k7(e[t])}}function lD(t,e){return t(e)}function CJ(t,e,r,n,i){return t(e,r,n,i)}function fD(){}var NJ=lD,vh=!1,FO=!1;function dD(){(ig!==null||ag!==null)&&(fD(),RJ())}function B0e(t,e,r){if(FO)return t(e,r);FO=!0;try{return NJ(t,e,r)}finally{FO=!1,dD()}}function o1(t,e){var r=t.stateNode;if(r===null)return null;var n=R2(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(bt(231,e,typeof r));return r}var E6=!1;if(Nl)try{var $m={};Object.defineProperty($m,"passive",{get:function(){E6=!0}}),window.addEventListener("test",$m,$m),window.removeEventListener("test",$m,$m)}catch{E6=!1}function F0e(t,e,r,n,i,a,o,s,c){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(f){this.onError(f)}}var Tb=!1,zx=null,Gx=!1,x6=null,j0e={onError:function(t){Tb=!0,zx=t}};function q0e(t,e,r,n,i,a,o,s,c){Tb=!1,zx=null,F0e.apply(j0e,arguments)}function H0e(t,e,r,n,i,a,o,s,c){if(q0e.apply(this,arguments),Tb){if(Tb){var u=zx;Tb=!1,zx=null}else throw Error(bt(198));Gx||(Gx=!0,x6=u)}}function wp(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&1026&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function DJ(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function L7(t){if(wp(t)!==t)throw Error(bt(188))}function V0e(t){var e=t.alternate;if(!e){if(e=wp(t),e===null)throw Error(bt(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return L7(i),t;if(a===n)return L7(i),e;a=a.sibling}throw Error(bt(188))}if(r.return!==n.return)r=i,n=a;else{for(var o=!1,s=i.child;s;){if(s===r){o=!0,r=i,n=a;break}if(s===n){o=!0,n=i,r=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===r){o=!0,r=a,n=i;break}if(s===n){o=!0,n=a,r=i;break}s=s.sibling}if(!o)throw Error(bt(189))}}if(r.alternate!==n)throw Error(bt(190))}if(r.tag!==3)throw Error(bt(188));return r.stateNode.current===r?t:e}function $J(t){if(t=V0e(t),!t)return null;for(var e=t;;){if(e.tag===5||e.tag===6)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function U7(t,e){for(var r=t.alternate;e!==null;){if(e===t||e===r)return!0;e=e.return}return!1}var MJ,hD,kJ,LJ,A6=!1,hu=[],Yf=null,Qf=null,Jf=null,s1=new Map,c1=new Map,Mm=[],B7="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function S6(t,e,r,n,i){return{blockedOn:t,domEventName:e,eventSystemFlags:r|16,nativeEvent:i,targetContainers:[n]}}function F7(t,e){switch(t){case"focusin":case"focusout":Yf=null;break;case"dragenter":case"dragleave":Qf=null;break;case"mouseover":case"mouseout":Jf=null;break;case"pointerover":case"pointerout":s1.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":c1.delete(e.pointerId)}}function km(t,e,r,n,i,a){return t===null||t.nativeEvent!==a?(t=S6(e,r,n,i,a),e!==null&&(e=gw(e),e!==null&&hD(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function z0e(t,e,r,n,i){switch(e){case"focusin":return Yf=km(Yf,t,e,r,n,i),!0;case"dragenter":return Qf=km(Qf,t,e,r,n,i),!0;case"mouseover":return Jf=km(Jf,t,e,r,n,i),!0;case"pointerover":var a=i.pointerId;return s1.set(a,km(s1.get(a)||null,t,e,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,c1.set(a,km(c1.get(a)||null,t,e,r,n,i)),!0}return!1}function G0e(t){var e=bh(t.target);if(e!==null){var r=wp(e);if(r!==null){if(e=r.tag,e===13){if(e=DJ(r),e!==null){t.blockedOn=e,LJ(t.lanePriority,function(){Xi.unstable_runWithPriority(t.priority,function(){kJ(r)})});return}}else if(e===3&&r.stateNode.hydrate){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function GE(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=mD(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r!==null)return e=gw(r),e!==null&&hD(e),t.blockedOn=r,!1;e.shift()}return!0}function j7(t,e,r){GE(t)&&r.delete(e)}function W0e(){for(A6=!1;0<hu.length;){var t=hu[0];if(t.blockedOn!==null){t=gw(t.blockedOn),t!==null&&MJ(t);break}for(var e=t.targetContainers;0<e.length;){var r=mD(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r!==null){t.blockedOn=r;break}e.shift()}t.blockedOn===null&&hu.shift()}Yf!==null&&GE(Yf)&&(Yf=null),Qf!==null&&GE(Qf)&&(Qf=null),Jf!==null&&GE(Jf)&&(Jf=null),s1.forEach(j7),c1.forEach(j7)}function Lm(t,e){t.blockedOn===e&&(t.blockedOn=null,A6||(A6=!0,Xi.unstable_scheduleCallback(Xi.unstable_NormalPriority,W0e)))}function UJ(t){function e(i){return Lm(i,t)}if(0<hu.length){Lm(hu[0],t);for(var r=1;r<hu.length;r++){var n=hu[r];n.blockedOn===t&&(n.blockedOn=null)}}for(Yf!==null&&Lm(Yf,t),Qf!==null&&Lm(Qf,t),Jf!==null&&Lm(Jf,t),s1.forEach(e),c1.forEach(e),r=0;r<Mm.length;r++)n=Mm[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<Mm.length&&(r=Mm[0],r.blockedOn===null);)G0e(r),r.blockedOn===null&&Mm.shift()}function B_(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var U0={animationend:B_("Animation","AnimationEnd"),animationiteration:B_("Animation","AnimationIteration"),animationstart:B_("Animation","AnimationStart"),transitionend:B_("Transition","TransitionEnd")},jO={},BJ={};Nl&&(BJ=document.createElement("div").style,"AnimationEvent"in window||(delete U0.animationend.animation,delete U0.animationiteration.animation,delete U0.animationstart.animation),"TransitionEvent"in window||delete U0.transitionend.transition);function S2(t){if(jO[t])return jO[t];if(!U0[t])return t;var e=U0[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in BJ)return jO[t]=e[r];return t}var FJ=S2("animationend"),jJ=S2("animationiteration"),qJ=S2("animationstart"),HJ=S2("transitionend"),VJ=new Map,pD=new Map,K0e=["abort","abort",FJ,"animationEnd",jJ,"animationIteration",qJ,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",HJ,"transitionEnd","waiting","waiting"];function gD(t,e){for(var r=0;r<t.length;r+=2){var n=t[r],i=t[r+1];i="on"+(i[0].toUpperCase()+i.slice(1)),pD.set(n,e),VJ.set(n,i),vp(i,[n])}}var Y0e=Xi.unstable_now;Y0e();var qn=8;function S0(t){if(1&t)return qn=15,1;if(2&t)return qn=14,2;if(4&t)return qn=13,4;var e=24&t;return e!==0?(qn=12,e):t&32?(qn=11,32):(e=192&t,e!==0?(qn=10,e):t&256?(qn=9,256):(e=3584&t,e!==0?(qn=8,e):t&4096?(qn=7,4096):(e=4186112&t,e!==0?(qn=6,e):(e=62914560&t,e!==0?(qn=5,e):t&67108864?(qn=4,67108864):t&134217728?(qn=3,134217728):(e=805306368&t,e!==0?(qn=2,e):1073741824&t?(qn=1,1073741824):(qn=8,t))))))}function Q0e(t){switch(t){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function J0e(t){switch(t){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(bt(358,t))}}function u1(t,e){var r=t.pendingLanes;if(r===0)return qn=0;var n=0,i=0,a=t.expiredLanes,o=t.suspendedLanes,s=t.pingedLanes;if(a!==0)n=a,i=qn=15;else if(a=r&134217727,a!==0){var c=a&~o;c!==0?(n=S0(c),i=qn):(s&=a,s!==0&&(n=S0(s),i=qn))}else a=r&~o,a!==0?(n=S0(a),i=qn):s!==0&&(n=S0(s),i=qn);if(n===0)return 0;if(n=31-sd(n),n=r&((0>n?0:1<<n)<<1)-1,e!==0&&e!==n&&!(e&o)){if(S0(e),i<=qn)return e;qn=i}if(e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-sd(e),i=1<<r,n|=t[r],e&=~i;return n}function zJ(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Wx(t,e){switch(t){case 15:return 1;case 14:return 2;case 12:return t=I0(24&~e),t===0?Wx(10,e):t;case 10:return t=I0(192&~e),t===0?Wx(8,e):t;case 8:return t=I0(3584&~e),t===0&&(t=I0(4186112&~e),t===0&&(t=512)),t;case 2:return e=I0(805306368&~e),e===0&&(e=268435456),e}throw Error(bt(358,t))}function I0(t){return t&-t}function qO(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function I2(t,e,r){t.pendingLanes|=e;var n=e-1;t.suspendedLanes&=n,t.pingedLanes&=n,t=t.eventTimes,e=31-sd(e),t[e]=r}var sd=Math.clz32?Math.clz32:ege,X0e=Math.log,Z0e=Math.LN2;function ege(t){return t===0?32:31-(X0e(t)/Z0e|0)|0}var tge=Xi.unstable_UserBlockingPriority,rge=Xi.unstable_runWithPriority,WE=!0;function nge(t,e,r,n){vh||fD();var i=yD,a=vh;vh=!0;try{CJ(i,t,e,r,n)}finally{(vh=a)||dD()}}function ige(t,e,r,n){rge(tge,yD.bind(null,t,e,r,n))}function yD(t,e,r,n){if(WE){var i;if((i=(e&4)===0)&&0<hu.length&&-1<B7.indexOf(t))t=S6(null,t,e,r,n),hu.push(t);else{var a=mD(t,e,r,n);if(a===null)i&&F7(t,n);else{if(i){if(-1<B7.indexOf(t)){t=S6(a,t,e,r,n),hu.push(t);return}if(z0e(a,t,e,r,n))return;F7(t,n)}iX(t,e,n,null,r)}}}}function mD(t,e,r,n){var i=uD(n);if(i=bh(i),i!==null){var a=wp(i);if(a===null)i=null;else{var o=a.tag;if(o===13){if(i=DJ(a),i!==null)return i;i=null}else if(o===3){if(a.stateNode.hydrate)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return iX(t,e,n,i,r),null}var jf=null,vD=null,KE=null;function GJ(){if(KE)return KE;var t,e=vD,r=e.length,n,i="value"in jf?jf.value:jf.textContent,a=i.length;for(t=0;t<r&&e[t]===i[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===i[a-n];n++);return KE=i.slice(t,1<n?1-n:void 0)}function YE(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function F_(){return!0}function q7(){return!1}function ns(t){function e(r,n,i,a,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in t)t.hasOwnProperty(s)&&(r=t[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?F_:q7,this.isPropagationStopped=q7,this}return ni(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=F_)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=F_)},persist:function(){},isPersistent:F_}),e}var zy={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bD=ns(zy),pw=ni({},zy,{view:0,detail:0}),age=ns(pw),HO,VO,Um,O2=ni({},pw,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wD,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Um&&(Um&&t.type==="mousemove"?(HO=t.screenX-Um.screenX,VO=t.screenY-Um.screenY):VO=HO=0,Um=t),HO)},movementY:function(t){return"movementY"in t?t.movementY:VO}}),H7=ns(O2),oge=ni({},O2,{dataTransfer:0}),sge=ns(oge),cge=ni({},pw,{relatedTarget:0}),zO=ns(cge),uge=ni({},zy,{animationName:0,elapsedTime:0,pseudoElement:0}),lge=ns(uge),fge=ni({},zy,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),dge=ns(fge),hge=ni({},zy,{data:0}),V7=ns(hge),pge={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gge={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},yge={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mge(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=yge[t])?!!e[t]:!1}function wD(){return mge}var vge=ni({},pw,{key:function(t){if(t.key){var e=pge[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=YE(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?gge[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wD,charCode:function(t){return t.type==="keypress"?YE(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?YE(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),bge=ns(vge),wge=ni({},O2,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),z7=ns(wge),_ge=ni({},pw,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wD}),Ege=ns(_ge),xge=ni({},zy,{propertyName:0,elapsedTime:0,pseudoElement:0}),Age=ns(xge),Sge=ni({},O2,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Ige=ns(Sge),Oge=[9,13,27,32],_D=Nl&&"CompositionEvent"in window,Rb=null;Nl&&"documentMode"in document&&(Rb=document.documentMode);var Pge=Nl&&"TextEvent"in window&&!Rb,WJ=Nl&&(!_D||Rb&&8<Rb&&11>=Rb),G7=String.fromCharCode(32),W7=!1;function KJ(t,e){switch(t){case"keyup":return Oge.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YJ(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var B0=!1;function Tge(t,e){switch(t){case"compositionend":return YJ(e);case"keypress":return e.which!==32?null:(W7=!0,G7);case"textInput":return t=e.data,t===G7&&W7?null:t;default:return null}}function Rge(t,e){if(B0)return t==="compositionend"||!_D&&KJ(t,e)?(t=GJ(),KE=vD=jf=null,B0=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return WJ&&e.locale!=="ko"?null:e.data;default:return null}}var Cge={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function K7(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Cge[t.type]:e==="textarea"}function QJ(t,e,r,n){TJ(n),e=Kx(e,"onChange"),0<e.length&&(r=new bD("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var Cb=null,l1=null;function Nge(t){tX(t,0)}function P2(t){var e=j0(t);if(EJ(e))return t}function Dge(t,e){if(t==="change")return e}var JJ=!1;if(Nl){var GO;if(Nl){var WO="oninput"in document;if(!WO){var Y7=document.createElement("div");Y7.setAttribute("oninput","return;"),WO=typeof Y7.oninput=="function"}GO=WO}else GO=!1;JJ=GO&&(!document.documentMode||9<document.documentMode)}function Q7(){Cb&&(Cb.detachEvent("onpropertychange",XJ),l1=Cb=null)}function XJ(t){if(t.propertyName==="value"&&P2(l1)){var e=[];if(QJ(e,l1,t,uD(t)),t=Nge,vh)t(e);else{vh=!0;try{lD(t,e)}finally{vh=!1,dD()}}}}function $ge(t,e,r){t==="focusin"?(Q7(),Cb=e,l1=r,Cb.attachEvent("onpropertychange",XJ)):t==="focusout"&&Q7()}function Mge(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return P2(l1)}function kge(t,e){if(t==="click")return P2(e)}function Lge(t,e){if(t==="input"||t==="change")return P2(e)}function Uge(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ms=typeof Object.is=="function"?Object.is:Uge,Bge=Object.prototype.hasOwnProperty;function f1(t,e){if(Ms(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++)if(!Bge.call(e,r[n])||!Ms(t[r[n]],e[r[n]]))return!1;return!0}function J7(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function X7(t,e){var r=J7(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=J7(r)}}function ZJ(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?ZJ(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Z7(){for(var t=window,e=Vx();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Vx(t.document)}return e}function I6(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Fge=Nl&&"documentMode"in document&&11>=document.documentMode,F0=null,O6=null,Nb=null,P6=!1;function eU(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;P6||F0==null||F0!==Vx(n)||(n=F0,"selectionStart"in n&&I6(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Nb&&f1(Nb,n)||(Nb=n,n=Kx(O6,"onSelect"),0<n.length&&(e=new bD("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=F0)))}gD("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);gD("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);gD(K0e,2);for(var tU="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),KO=0;KO<tU.length;KO++)pD.set(tU[KO],0);py("onMouseEnter",["mouseout","mouseover"]);py("onMouseLeave",["mouseout","mouseover"]);py("onPointerEnter",["pointerout","pointerover"]);py("onPointerLeave",["pointerout","pointerover"]);vp("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vp("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vp("onBeforeInput",["compositionend","keypress","textInput","paste"]);vp("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vp("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vp("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ab="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),eX=new Set("cancel close invalid load scroll toggle".split(" ").concat(ab));function rU(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,H0e(n,e,void 0,t),t.currentTarget=null}function tX(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var a=void 0;if(e)for(var o=n.length-1;0<=o;o--){var s=n[o],c=s.instance,u=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break e;rU(i,s,u),a=c}else for(o=0;o<n.length;o++){if(s=n[o],c=s.instance,u=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break e;rU(i,s,u),a=c}}}if(Gx)throw t=x6,Gx=!1,x6=null,t}function Yn(t,e){var r=oX(e),n=t+"__bubble";r.has(n)||(nX(e,t,2,!1),r.add(n))}var nU="_reactListening"+Math.random().toString(36).slice(2);function rX(t){t[nU]||(t[nU]=!0,bJ.forEach(function(e){eX.has(e)||iU(e,!1,t,null),iU(e,!0,t,null)}))}function iU(t,e,r,n){var i=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,a=r;if(t==="selectionchange"&&r.nodeType!==9&&(a=r.ownerDocument),n!==null&&!e&&eX.has(t)){if(t!=="scroll")return;i|=2,a=n}var o=oX(a),s=t+"__"+(e?"capture":"bubble");o.has(s)||(e&&(i|=4),nX(a,t,i,e),o.add(s))}function nX(t,e,r,n){var i=pD.get(e);switch(i===void 0?2:i){case 0:i=nge;break;case 1:i=ige;break;default:i=yD}r=i.bind(null,e,r,t),i=void 0,!E6||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function iX(t,e,r,n,i){var a=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var s=n.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=bh(s),o===null)return;if(c=o.tag,c===5||c===6){n=a=o;continue e}s=s.parentNode}}n=n.return}B0e(function(){var u=a,f=uD(r),d=[];e:{var g=VJ.get(t);if(g!==void 0){var m=bD,w=t;switch(t){case"keypress":if(YE(r)===0)break e;case"keydown":case"keyup":m=bge;break;case"focusin":w="focus",m=zO;break;case"focusout":w="blur",m=zO;break;case"beforeblur":case"afterblur":m=zO;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=H7;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=sge;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Ege;break;case FJ:case jJ:case qJ:m=lge;break;case HJ:m=Age;break;case"scroll":m=age;break;case"wheel":m=Ige;break;case"copy":case"cut":case"paste":m=dge;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=z7}var v=(e&4)!==0,y=!v&&t==="scroll",_=v?g!==null?g+"Capture":null:g;v=[];for(var b=u,S;b!==null;){S=b;var x=S.stateNode;if(S.tag===5&&x!==null&&(S=x,_!==null&&(x=o1(b,_),x!=null&&v.push(d1(b,x,S)))),y)break;b=b.return}0<v.length&&(g=new m(g,w,null,r,f),d.push({event:g,listeners:v}))}}if(!(e&7)){e:{if(g=t==="mouseover"||t==="pointerover",m=t==="mouseout"||t==="pointerout",g&&!(e&16)&&(w=r.relatedTarget||r.fromElement)&&(bh(w)||w[Gy]))break e;if((m||g)&&(g=f.window===f?f:(g=f.ownerDocument)?g.defaultView||g.parentWindow:window,m?(w=r.relatedTarget||r.toElement,m=u,w=w?bh(w):null,w!==null&&(y=wp(w),w!==y||w.tag!==5&&w.tag!==6)&&(w=null)):(m=null,w=u),m!==w)){if(v=H7,x="onMouseLeave",_="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(v=z7,x="onPointerLeave",_="onPointerEnter",b="pointer"),y=m==null?g:j0(m),S=w==null?g:j0(w),g=new v(x,b+"leave",m,r,f),g.target=y,g.relatedTarget=S,x=null,bh(f)===u&&(v=new v(_,b+"enter",w,r,f),v.target=S,v.relatedTarget=y,x=v),y=x,m&&w)t:{for(v=m,_=w,b=0,S=v;S;S=s0(S))b++;for(S=0,x=_;x;x=s0(x))S++;for(;0<b-S;)v=s0(v),b--;for(;0<S-b;)_=s0(_),S--;for(;b--;){if(v===_||_!==null&&v===_.alternate)break t;v=s0(v),_=s0(_)}v=null}else v=null;m!==null&&aU(d,g,m,v,!1),w!==null&&y!==null&&aU(d,y,w,v,!0)}}e:{if(g=u?j0(u):window,m=g.nodeName&&g.nodeName.toLowerCase(),m==="select"||m==="input"&&g.type==="file")var I=Dge;else if(K7(g))if(JJ)I=Lge;else{I=Mge;var E=$ge}else(m=g.nodeName)&&m.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(I=kge);if(I&&(I=I(t,u))){QJ(d,I,r,f);break e}E&&E(t,g,u),t==="focusout"&&(E=g._wrapperState)&&E.controlled&&g.type==="number"&&p6(g,"number",g.value)}switch(E=u?j0(u):window,t){case"focusin":(K7(E)||E.contentEditable==="true")&&(F0=E,O6=u,Nb=null);break;case"focusout":Nb=O6=F0=null;break;case"mousedown":P6=!0;break;case"contextmenu":case"mouseup":case"dragend":P6=!1,eU(d,r,f);break;case"selectionchange":if(Fge)break;case"keydown":case"keyup":eU(d,r,f)}var p;if(_D)e:{switch(t){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else B0?KJ(t,r)&&(O="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(O="onCompositionStart");O&&(WJ&&r.locale!=="ko"&&(B0||O!=="onCompositionStart"?O==="onCompositionEnd"&&B0&&(p=GJ()):(jf=f,vD="value"in jf?jf.value:jf.textContent,B0=!0)),E=Kx(u,O),0<E.length&&(O=new V7(O,t,null,r,f),d.push({event:O,listeners:E}),p?O.data=p:(p=YJ(r),p!==null&&(O.data=p)))),(p=Pge?Tge(t,r):Rge(t,r))&&(u=Kx(u,"onBeforeInput"),0<u.length&&(f=new V7("onBeforeInput","beforeinput",null,r,f),d.push({event:f,listeners:u}),f.data=p))}tX(d,e)})}function d1(t,e,r){return{instance:t,listener:e,currentTarget:r}}function Kx(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=o1(t,r),a!=null&&n.unshift(d1(t,a,i)),a=o1(t,e),a!=null&&n.push(d1(t,a,i))),t=t.return}return n}function s0(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function aU(t,e,r,n,i){for(var a=e._reactName,o=[];r!==null&&r!==n;){var s=r,c=s.alternate,u=s.stateNode;if(c!==null&&c===n)break;s.tag===5&&u!==null&&(s=u,i?(c=o1(r,a),c!=null&&o.unshift(d1(r,c,s))):i||(c=o1(r,a),c!=null&&o.push(d1(r,c,s)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}function Yx(){}var YO=null,QO=null;function aX(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function T6(t,e){return t==="textarea"||t==="option"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var oU=typeof setTimeout=="function"?setTimeout:void 0,jge=typeof clearTimeout=="function"?clearTimeout:void 0;function ED(t){t.nodeType===1?t.textContent="":t.nodeType===9&&(t=t.body,t!=null&&(t.textContent=""))}function og(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break}return t}function sU(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var JO=0;function qge(t){return{$$typeof:sD,toString:t,valueOf:t}}var T2=Math.random().toString(36).slice(2),qf="__reactFiber$"+T2,Qx="__reactProps$"+T2,Gy="__reactContainer$"+T2,cU="__reactEvents$"+T2;function bh(t){var e=t[qf];if(e)return e;for(var r=t.parentNode;r;){if(e=r[Gy]||r[qf]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=sU(t);t!==null;){if(r=t[qf])return r;t=sU(t)}return e}t=r,r=t.parentNode}return null}function gw(t){return t=t[qf]||t[Gy],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function j0(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(bt(33))}function R2(t){return t[Qx]||null}function oX(t){var e=t[cU];return e===void 0&&(e=t[cU]=new Set),e}var R6=[],q0=-1;function yd(t){return{current:t}}function Xn(t){0>q0||(t.current=R6[q0],R6[q0]=null,q0--)}function yi(t,e){q0++,R6[q0]=t.current,t.current=e}var cd={},za=yd(cd),Do=yd(!1),ip=cd;function gy(t,e){var r=t.type.contextTypes;if(!r)return cd;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function $o(t){return t=t.childContextTypes,t!=null}function Jx(){Xn(Do),Xn(za)}function uU(t,e,r){if(za.current!==cd)throw Error(bt(168));yi(za,e),yi(Do,r)}function sX(t,e,r){var n=t.stateNode;if(t=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(bt(108,rg(e)||"Unknown",i));return ni({},r,n)}function QE(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||cd,ip=za.current,yi(za,t),yi(Do,Do.current),!0}function lU(t,e,r){var n=t.stateNode;if(!n)throw Error(bt(169));r?(t=sX(t,e,ip),n.__reactInternalMemoizedMergedChildContext=t,Xn(Do),Xn(za),yi(za,t)):Xn(Do),yi(Do,r)}var xD=null,Qh=null,Hge=Xi.unstable_runWithPriority,AD=Xi.unstable_scheduleCallback,C6=Xi.unstable_cancelCallback,Vge=Xi.unstable_shouldYield,fU=Xi.unstable_requestPaint,N6=Xi.unstable_now,zge=Xi.unstable_getCurrentPriorityLevel,C2=Xi.unstable_ImmediatePriority,cX=Xi.unstable_UserBlockingPriority,uX=Xi.unstable_NormalPriority,lX=Xi.unstable_LowPriority,fX=Xi.unstable_IdlePriority,XO={},Gge=fU!==void 0?fU:function(){},rl=null,JE=null,ZO=!1,dU=N6(),ja=1e4>dU?N6:function(){return N6()-dU};function yy(){switch(zge()){case C2:return 99;case cX:return 98;case uX:return 97;case lX:return 96;case fX:return 95;default:throw Error(bt(332))}}function dX(t){switch(t){case 99:return C2;case 98:return cX;case 97:return uX;case 96:return lX;case 95:return fX;default:throw Error(bt(332))}}function ap(t,e){return t=dX(t),Hge(t,e)}function h1(t,e,r){return t=dX(t),AD(t,e,r)}function Pu(){if(JE!==null){var t=JE;JE=null,C6(t)}hX()}function hX(){if(!ZO&&rl!==null){ZO=!0;var t=0;try{var e=rl;ap(99,function(){for(;t<e.length;t++){var r=e[t];do r=r(!0);while(r!==null)}}),rl=null}catch(r){throw rl!==null&&(rl=rl.slice(t+1)),AD(C2,Pu),r}finally{ZO=!1}}}var Wge=bp.ReactCurrentBatchConfig;function pc(t,e){if(t&&t.defaultProps){e=ni({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}var Xx=yd(null),Zx=null,H0=null,eA=null;function SD(){eA=H0=Zx=null}function ID(t){var e=Xx.current;Xn(Xx),t.type._context._currentValue=e}function pX(t,e){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)===e){if(r===null||(r.childLanes&e)===e)break;r.childLanes|=e}else t.childLanes|=e,r!==null&&(r.childLanes|=e);t=t.return}}function sg(t,e){Zx=t,eA=H0=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Pc=!0),t.firstContext=null)}function qs(t,e){if(eA!==t&&e!==!1&&e!==0)if((typeof e!="number"||e===1073741823)&&(eA=t,e=1073741823),e={context:t,observedBits:e,next:null},H0===null){if(Zx===null)throw Error(bt(308));H0=e,Zx.dependencies={lanes:0,firstContext:e,responders:null}}else H0=H0.next=e;return t._currentValue}var wf=!1;function OD(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function gX(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Xf(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Zf(t,e){if(t=t.updateQueue,t!==null){t=t.shared;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}}function hU(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=e:a=a.next=e}else i=a=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function p1(t,e,r,n){var i=t.updateQueue;wf=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var f=t.alternate;if(f!==null){f=f.updateQueue;var d=f.lastBaseUpdate;d!==o&&(d===null?f.firstBaseUpdate=u:d.next=u,f.lastBaseUpdate=c)}}if(a!==null){d=i.baseState,o=0,f=u=c=null;do{s=a.lane;var g=a.eventTime;if((n&s)===s){f!==null&&(f=f.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=t,w=a;switch(s=e,g=r,w.tag){case 1:if(m=w.payload,typeof m=="function"){d=m.call(g,d,s);break e}d=m;break e;case 3:m.flags=m.flags&-4097|64;case 0:if(m=w.payload,s=typeof m=="function"?m.call(g,d,s):m,s==null)break e;d=ni({},d,s);break e;case 2:wf=!0}}a.callback!==null&&(t.flags|=32,s=i.effects,s===null?i.effects=[a]:s.push(a))}else g={eventTime:g,lane:s,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=g,c=d):f=f.next=g,o|=s;if(a=a.next,a===null){if(s=i.shared.pending,s===null)break;a=s.next,s.next=null,i.lastBaseUpdate=s,i.shared.pending=null}}while(1);f===null&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=f,mw|=o,t.lanes=o,t.memoizedState=d}}function pU(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(bt(191,i));i.call(n)}}}var yX=new E2.Component().refs;function tA(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:ni({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var N2={isMounted:function(t){return(t=t._reactInternals)?wp(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=ts(),i=ed(t),a=Xf(n,i);a.payload=e,r!=null&&(a.callback=r),Zf(t,a),td(t,i,n)},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=ts(),i=ed(t),a=Xf(n,i);a.tag=1,a.payload=e,r!=null&&(a.callback=r),Zf(t,a),td(t,i,n)},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=ts(),n=ed(t),i=Xf(r,n);i.tag=2,e!=null&&(i.callback=e),Zf(t,i),td(t,n,r)}};function gU(t,e,r,n,i,a,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,a,o):e.prototype&&e.prototype.isPureReactComponent?!f1(r,n)||!f1(i,a):!0}function mX(t,e,r){var n=!1,i=cd,a=e.contextType;return typeof a=="object"&&a!==null?a=qs(a):(i=$o(e)?ip:za.current,n=e.contextTypes,a=(n=n!=null)?gy(t,i):cd),e=new e(r,a),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=N2,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=a),e}function yU(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&N2.enqueueReplaceState(e,e.state,null)}function D6(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs=yX,OD(t);var a=e.contextType;typeof a=="object"&&a!==null?i.context=qs(a):(a=$o(e)?ip:za.current,i.context=gy(t,a)),p1(t,r,i,n),i.state=t.memoizedState,a=e.getDerivedStateFromProps,typeof a=="function"&&(tA(t,e,a,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&N2.enqueueReplaceState(i,i.state,null),p1(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4)}var j_=Array.isArray;function Bm(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(bt(309));var n=r.stateNode}if(!n)throw Error(bt(147,t));var i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(a){var o=n.refs;o===yX&&(o=n.refs={}),a===null?delete o[i]:o[i]=a},e._stringRef=i,e)}if(typeof t!="string")throw Error(bt(284));if(!r._owner)throw Error(bt(290,t))}return t}function q_(t,e){if(t.type!=="textarea")throw Error(bt(31,Object.prototype.toString.call(e)==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":e))}function vX(t){function e(y,_){if(t){var b=y.lastEffect;b!==null?(b.nextEffect=_,y.lastEffect=_):y.firstEffect=y.lastEffect=_,_.nextEffect=null,_.flags=8}}function r(y,_){if(!t)return null;for(;_!==null;)e(y,_),_=_.sibling;return null}function n(y,_){for(y=new Map;_!==null;)_.key!==null?y.set(_.key,_):y.set(_.index,_),_=_.sibling;return y}function i(y,_){return y=ld(y,_),y.index=0,y.sibling=null,y}function a(y,_,b){return y.index=b,t?(b=y.alternate,b!==null?(b=b.index,b<_?(y.flags=2,_):b):(y.flags=2,_)):_}function o(y){return t&&y.alternate===null&&(y.flags=2),y}function s(y,_,b,S){return _===null||_.tag!==6?(_=iP(b,y.mode,S),_.return=y,_):(_=i(_,b),_.return=y,_)}function c(y,_,b,S){return _!==null&&_.elementType===b.type?(S=i(_,b.props),S.ref=Bm(y,_,b),S.return=y,S):(S=tx(b.type,b.key,b.props,null,y.mode,S),S.ref=Bm(y,_,b),S.return=y,S)}function u(y,_,b,S){return _===null||_.tag!==4||_.stateNode.containerInfo!==b.containerInfo||_.stateNode.implementation!==b.implementation?(_=aP(b,y.mode,S),_.return=y,_):(_=i(_,b.children||[]),_.return=y,_)}function f(y,_,b,S,x){return _===null||_.tag!==7?(_=fg(b,y.mode,S,x),_.return=y,_):(_=i(_,b),_.return=y,_)}function d(y,_,b){if(typeof _=="string"||typeof _=="number")return _=iP(""+_,y.mode,b),_.return=y,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case nb:return b=tx(_.type,_.key,_.props,null,y.mode,b),b.ref=Bm(y,null,_),b.return=y,b;case mh:return _=aP(_,y.mode,b),_.return=y,_}if(j_(_)||Dm(_))return _=fg(_,y.mode,b,null),_.return=y,_;q_(y,_)}return null}function g(y,_,b,S){var x=_!==null?_.key:null;if(typeof b=="string"||typeof b=="number")return x!==null?null:s(y,_,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case nb:return b.key===x?b.type===Sf?f(y,_,b.props.children,S,x):c(y,_,b,S):null;case mh:return b.key===x?u(y,_,b,S):null}if(j_(b)||Dm(b))return x!==null?null:f(y,_,b,S,null);q_(y,b)}return null}function m(y,_,b,S,x){if(typeof S=="string"||typeof S=="number")return y=y.get(b)||null,s(_,y,""+S,x);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case nb:return y=y.get(S.key===null?b:S.key)||null,S.type===Sf?f(_,y,S.props.children,x,S.key):c(_,y,S,x);case mh:return y=y.get(S.key===null?b:S.key)||null,u(_,y,S,x)}if(j_(S)||Dm(S))return y=y.get(b)||null,f(_,y,S,x,null);q_(_,S)}return null}function w(y,_,b,S){for(var x=null,I=null,E=_,p=_=0,O=null;E!==null&&p<b.length;p++){E.index>p?(O=E,E=null):O=E.sibling;var C=g(y,E,b[p],S);if(C===null){E===null&&(E=O);break}t&&E&&C.alternate===null&&e(y,E),_=a(C,_,p),I===null?x=C:I.sibling=C,I=C,E=O}if(p===b.length)return r(y,E),x;if(E===null){for(;p<b.length;p++)E=d(y,b[p],S),E!==null&&(_=a(E,_,p),I===null?x=E:I.sibling=E,I=E);return x}for(E=n(y,E);p<b.length;p++)O=m(E,y,p,b[p],S),O!==null&&(t&&O.alternate!==null&&E.delete(O.key===null?p:O.key),_=a(O,_,p),I===null?x=O:I.sibling=O,I=O);return t&&E.forEach(function(M){return e(y,M)}),x}function v(y,_,b,S){var x=Dm(b);if(typeof x!="function")throw Error(bt(150));if(b=x.call(b),b==null)throw Error(bt(151));for(var I=x=null,E=_,p=_=0,O=null,C=b.next();E!==null&&!C.done;p++,C=b.next()){E.index>p?(O=E,E=null):O=E.sibling;var M=g(y,E,C.value,S);if(M===null){E===null&&(E=O);break}t&&E&&M.alternate===null&&e(y,E),_=a(M,_,p),I===null?x=M:I.sibling=M,I=M,E=O}if(C.done)return r(y,E),x;if(E===null){for(;!C.done;p++,C=b.next())C=d(y,C.value,S),C!==null&&(_=a(C,_,p),I===null?x=C:I.sibling=C,I=C);return x}for(E=n(y,E);!C.done;p++,C=b.next())C=m(E,y,p,C.value,S),C!==null&&(t&&C.alternate!==null&&E.delete(C.key===null?p:C.key),_=a(C,_,p),I===null?x=C:I.sibling=C,I=C);return t&&E.forEach(function(B){return e(y,B)}),x}return function(y,_,b,S){var x=typeof b=="object"&&b!==null&&b.type===Sf&&b.key===null;x&&(b=b.props.children);var I=typeof b=="object"&&b!==null;if(I)switch(b.$$typeof){case nb:e:{for(I=b.key,x=_;x!==null;){if(x.key===I){switch(x.tag){case 7:if(b.type===Sf){r(y,x.sibling),_=i(x,b.props.children),_.return=y,y=_;break e}break;default:if(x.elementType===b.type){r(y,x.sibling),_=i(x,b.props),_.ref=Bm(y,x,b),_.return=y,y=_;break e}}r(y,x);break}else e(y,x);x=x.sibling}b.type===Sf?(_=fg(b.props.children,y.mode,S,b.key),_.return=y,y=_):(S=tx(b.type,b.key,b.props,null,y.mode,S),S.ref=Bm(y,_,b),S.return=y,y=S)}return o(y);case mh:e:{for(x=b.key;_!==null;){if(_.key===x)if(_.tag===4&&_.stateNode.containerInfo===b.containerInfo&&_.stateNode.implementation===b.implementation){r(y,_.sibling),_=i(_,b.children||[]),_.return=y,y=_;break e}else{r(y,_);break}else e(y,_);_=_.sibling}_=aP(b,y.mode,S),_.return=y,y=_}return o(y)}if(typeof b=="string"||typeof b=="number")return b=""+b,_!==null&&_.tag===6?(r(y,_.sibling),_=i(_,b),_.return=y,y=_):(r(y,_),_=iP(b,y.mode,S),_.return=y,y=_),o(y);if(j_(b))return w(y,_,b,S);if(Dm(b))return v(y,_,b,S);if(I&&q_(y,b),typeof b>"u"&&!x)switch(y.tag){case 1:case 22:case 0:case 11:case 15:throw Error(bt(152,rg(y.type)||"Component"))}return r(y,_)}}var rA=vX(!0),bX=vX(!1),yw={},vu=yd(yw),g1=yd(yw),y1=yd(yw);function wh(t){if(t===yw)throw Error(bt(174));return t}function $6(t,e){switch(yi(y1,e),yi(g1,t),yi(vu,yw),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:v6(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=v6(e,t)}Xn(vu),yi(vu,e)}function my(){Xn(vu),Xn(g1),Xn(y1)}function mU(t){wh(y1.current);var e=wh(vu.current),r=v6(e,t.type);e!==r&&(yi(g1,t),yi(vu,r))}function PD(t){g1.current===t&&(Xn(vu),Xn(g1))}var gi=yd(0);function nA(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&64)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var bl=null,Hf=null,bu=!1;function wX(t,e){var r=ks(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=e,r.return=t,r.flags=8,t.lastEffect!==null?(t.lastEffect.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r}function vU(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,!0):!1;case 13:return!1;default:return!1}}function M6(t){if(bu){var e=Hf;if(e){var r=e;if(!vU(t,e)){if(e=og(r.nextSibling),!e||!vU(t,e)){t.flags=t.flags&-1025|2,bu=!1,bl=t;return}wX(bl,r)}bl=t,Hf=og(e.firstChild)}else t.flags=t.flags&-1025|2,bu=!1,bl=t}}function bU(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;bl=t}function H_(t){if(t!==bl)return!1;if(!bu)return bU(t),bu=!0,!1;var e=t.type;if(t.tag!==5||e!=="head"&&e!=="body"&&!T6(e,t.memoizedProps))for(e=Hf;e;)wX(t,e),e=og(e.nextSibling);if(bU(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(bt(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Hf=og(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Hf=null}}else Hf=bl?og(t.stateNode.nextSibling):null;return!0}function eP(){Hf=bl=null,bu=!1}var cg=[];function TD(){for(var t=0;t<cg.length;t++)cg[t]._workInProgressVersionPrimary=null;cg.length=0}var Db=bp.ReactCurrentDispatcher,Ls=bp.ReactCurrentBatchConfig,m1=0,Si=null,$a=null,la=null,iA=!1,$b=!1;function wo(){throw Error(bt(321))}function RD(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!Ms(t[r],e[r]))return!1;return!0}function CD(t,e,r,n,i,a){if(m1=a,Si=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Db.current=t===null||t.memoizedState===null?Yge:Qge,t=r(n,i),$b){a=0;do{if($b=!1,!(25>a))throw Error(bt(301));a+=1,la=$a=null,e.updateQueue=null,Db.current=Jge,t=r(n,i)}while($b)}if(Db.current=cA,e=$a!==null&&$a.next!==null,m1=0,la=$a=Si=null,iA=!1,e)throw Error(bt(300));return t}function _h(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return la===null?Si.memoizedState=la=t:la=la.next=t,la}function _p(){if($a===null){var t=Si.alternate;t=t!==null?t.memoizedState:null}else t=$a.next;var e=la===null?Si.memoizedState:la.next;if(e!==null)la=e,$a=t;else{if(t===null)throw Error(bt(310));$a=t,t={memoizedState:$a.memoizedState,baseState:$a.baseState,baseQueue:$a.baseQueue,queue:$a.queue,next:null},la===null?Si.memoizedState=la=t:la=la.next=t}return la}function pu(t,e){return typeof e=="function"?e(t):e}function Fm(t){var e=_p(),r=e.queue;if(r===null)throw Error(bt(311));r.lastRenderedReducer=t;var n=$a,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){i=i.next,n=n.baseState;var s=o=a=null,c=i;do{var u=c.lane;if((m1&u)===u)s!==null&&(s=s.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),n=c.eagerReducer===t?c.eagerState:t(n,c.action);else{var f={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};s===null?(o=s=f,a=n):s=s.next=f,Si.lanes|=u,mw|=u}c=c.next}while(c!==null&&c!==i);s===null?a=n:s.next=o,Ms(n,e.memoizedState)||(Pc=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=s,r.lastRenderedState=n}return[e.memoizedState,r.dispatch]}function jm(t){var e=_p(),r=e.queue;if(r===null)throw Error(bt(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,a=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=t(a,o.action),o=o.next;while(o!==i);Ms(a,e.memoizedState)||(Pc=!0),e.memoizedState=a,e.baseQueue===null&&(e.baseState=a),r.lastRenderedState=a}return[a,n]}function wU(t,e,r){var n=e._getVersion;n=n(e._source);var i=e._workInProgressVersionPrimary;if(i!==null?t=i===n:(t=t.mutableReadLanes,(t=(m1&t)===t)&&(e._workInProgressVersionPrimary=n,cg.push(e))),t)return r(e._source);throw cg.push(e),Error(bt(350))}function _X(t,e,r,n){var i=oo;if(i===null)throw Error(bt(349));var a=e._getVersion,o=a(e._source),s=Db.current,c=s.useState(function(){return wU(i,e,r)}),u=c[1],f=c[0];c=la;var d=t.memoizedState,g=d.refs,m=g.getSnapshot,w=d.source;d=d.subscribe;var v=Si;return t.memoizedState={refs:g,source:e,subscribe:n},s.useEffect(function(){g.getSnapshot=r,g.setSnapshot=u;var y=a(e._source);if(!Ms(o,y)){y=r(e._source),Ms(f,y)||(u(y),y=ed(v),i.mutableReadLanes|=y&i.pendingLanes),y=i.mutableReadLanes,i.entangledLanes|=y;for(var _=i.entanglements,b=y;0<b;){var S=31-sd(b),x=1<<S;_[S]|=y,b&=~x}}},[r,e,n]),s.useEffect(function(){return n(e._source,function(){var y=g.getSnapshot,_=g.setSnapshot;try{_(y(e._source));var b=ed(v);i.mutableReadLanes|=b&i.pendingLanes}catch(S){_(function(){throw S})}})},[e,n]),Ms(m,r)&&Ms(w,e)&&Ms(d,n)||(t={pending:null,dispatch:null,lastRenderedReducer:pu,lastRenderedState:f},t.dispatch=u=$D.bind(null,Si,t),c.queue=t,c.baseQueue=null,f=wU(i,e,r),c.memoizedState=c.baseState=f),f}function EX(t,e,r){var n=_p();return _X(n,t,e,r)}function qm(t){var e=_h();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t=e.queue={pending:null,dispatch:null,lastRenderedReducer:pu,lastRenderedState:t},t=t.dispatch=$D.bind(null,Si,t),[e.memoizedState,t]}function aA(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Si.updateQueue,e===null?(e={lastEffect:null},Si.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function _U(t){var e=_h();return t={current:t},e.memoizedState=t}function oA(){return _p().memoizedState}function k6(t,e,r,n){var i=_h();Si.flags|=t,i.memoizedState=aA(1|e,r,void 0,n===void 0?null:n)}function ND(t,e,r,n){var i=_p();n=n===void 0?null:n;var a=void 0;if($a!==null){var o=$a.memoizedState;if(a=o.destroy,n!==null&&RD(n,o.deps)){aA(e,r,a,n);return}}Si.flags|=t,i.memoizedState=aA(1|e,r,a,n)}function EU(t,e){return k6(516,4,t,e)}function sA(t,e){return ND(516,4,t,e)}function xX(t,e){return ND(4,2,t,e)}function AX(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function SX(t,e,r){return r=r!=null?r.concat([t]):null,ND(4,2,AX.bind(null,e,t),r)}function DD(){}function IX(t,e){var r=_p();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&RD(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function OX(t,e){var r=_p();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&RD(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function Kge(t,e){var r=yy();ap(98>r?98:r,function(){t(!0)}),ap(97<r?97:r,function(){var n=Ls.transition;Ls.transition=1;try{t(!1),e()}finally{Ls.transition=n}})}function $D(t,e,r){var n=ts(),i=ed(t),a={lane:i,action:r,eagerReducer:null,eagerState:null,next:null},o=e.pending;if(o===null?a.next=a:(a.next=o.next,o.next=a),e.pending=a,o=t.alternate,t===Si||o!==null&&o===Si)$b=iA=!0;else{if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,c=o(s,r);if(a.eagerReducer=o,a.eagerState=c,Ms(c,s))return}catch{}finally{}td(t,i,n)}}var cA={readContext:qs,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useMutableSource:wo,useOpaqueIdentifier:wo,unstable_isNewReconciler:!1},Yge={readContext:qs,useCallback:function(t,e){return _h().memoizedState=[t,e===void 0?null:e],t},useContext:qs,useEffect:EU,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,k6(4,2,AX.bind(null,e,t),r)},useLayoutEffect:function(t,e){return k6(4,2,t,e)},useMemo:function(t,e){var r=_h();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=_h();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t=n.queue={pending:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},t=t.dispatch=$D.bind(null,Si,t),[n.memoizedState,t]},useRef:_U,useState:qm,useDebugValue:DD,useDeferredValue:function(t){var e=qm(t),r=e[0],n=e[1];return EU(function(){var i=Ls.transition;Ls.transition=1;try{n(t)}finally{Ls.transition=i}},[t]),r},useTransition:function(){var t=qm(!1),e=t[0];return t=Kge.bind(null,t[1]),_U(t),[t,e]},useMutableSource:function(t,e,r){var n=_h();return n.memoizedState={refs:{getSnapshot:e,setSnapshot:null},source:t,subscribe:r},_X(n,t,e,r)},useOpaqueIdentifier:function(){if(bu){var t=!1,e=qge(function(){throw t||(t=!0,r("r:"+(JO++).toString(36))),Error(bt(355))}),r=qm(e)[1];return!(Si.mode&2)&&(Si.flags|=516,aA(5,function(){r("r:"+(JO++).toString(36))},void 0,null)),e}return e="r:"+(JO++).toString(36),qm(e),e},unstable_isNewReconciler:!1},Qge={readContext:qs,useCallback:IX,useContext:qs,useEffect:sA,useImperativeHandle:SX,useLayoutEffect:xX,useMemo:OX,useReducer:Fm,useRef:oA,useState:function(){return Fm(pu)},useDebugValue:DD,useDeferredValue:function(t){var e=Fm(pu),r=e[0],n=e[1];return sA(function(){var i=Ls.transition;Ls.transition=1;try{n(t)}finally{Ls.transition=i}},[t]),r},useTransition:function(){var t=Fm(pu)[0];return[oA().current,t]},useMutableSource:EX,useOpaqueIdentifier:function(){return Fm(pu)[0]},unstable_isNewReconciler:!1},Jge={readContext:qs,useCallback:IX,useContext:qs,useEffect:sA,useImperativeHandle:SX,useLayoutEffect:xX,useMemo:OX,useReducer:jm,useRef:oA,useState:function(){return jm(pu)},useDebugValue:DD,useDeferredValue:function(t){var e=jm(pu),r=e[0],n=e[1];return sA(function(){var i=Ls.transition;Ls.transition=1;try{n(t)}finally{Ls.transition=i}},[t]),r},useTransition:function(){var t=jm(pu)[0];return[oA().current,t]},useMutableSource:EX,useOpaqueIdentifier:function(){return jm(pu)[0]},unstable_isNewReconciler:!1},Xge=bp.ReactCurrentOwner,Pc=!1;function Io(t,e,r,n){e.child=t===null?bX(e,null,r,n):rA(e,t.child,r,n)}function xU(t,e,r,n,i){r=r.render;var a=e.ref;return sg(e,i),n=CD(t,e,r,n,a,i),t!==null&&!Pc?(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,wl(t,e,i)):(e.flags|=1,Io(t,e,n,i),e.child)}function AU(t,e,r,n,i,a){if(t===null){var o=r.type;return typeof o=="function"&&!FD(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,PX(t,e,o,n,i,a)):(t=tx(r.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}return o=t.child,!(i&a)&&(i=o.memoizedProps,r=r.compare,r=r!==null?r:f1,r(i,n)&&t.ref===e.ref)?wl(t,e,a):(e.flags|=1,t=ld(o,n),t.ref=e.ref,t.return=e,e.child=t)}function PX(t,e,r,n,i,a){if(t!==null&&f1(t.memoizedProps,n)&&t.ref===e.ref)if(Pc=!1,(a&i)!==0)t.flags&16384&&(Pc=!0);else return e.lanes=t.lanes,wl(t,e,a);return L6(t,e,r,n,a)}function tP(t,e,r){var n=e.pendingProps,i=n.children,a=t!==null?t.memoizedState:null;if(n.mode==="hidden"||n.mode==="unstable-defer-without-hiding")if(!(e.mode&4))e.memoizedState={baseLanes:0},z_(e,r);else if(r&1073741824)e.memoizedState={baseLanes:0},z_(e,a!==null?a.baseLanes:r);else return t=a!==null?a.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t},z_(e,t),null;else a!==null?(n=a.baseLanes|r,e.memoizedState=null):n=r,z_(e,n);return Io(t,e,i,r),e.child}function TX(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=128)}function L6(t,e,r,n,i){var a=$o(r)?ip:za.current;return a=gy(e,a),sg(e,i),r=CD(t,e,r,n,a,i),t!==null&&!Pc?(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,wl(t,e,i)):(e.flags|=1,Io(t,e,r,i),e.child)}function SU(t,e,r,n,i){if($o(r)){var a=!0;QE(e)}else a=!1;if(sg(e,i),e.stateNode===null)t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),mX(e,r,n),D6(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,s=e.memoizedProps;o.props=s;var c=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=qs(u):(u=$o(r)?ip:za.current,u=gy(e,u));var f=r.getDerivedStateFromProps,d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||c!==u)&&yU(e,o,n,u),wf=!1;var g=e.memoizedState;o.state=g,p1(e,n,o,i),c=e.memoizedState,s!==n||g!==c||Do.current||wf?(typeof f=="function"&&(tA(e,r,f,n),c=e.memoizedState),(s=wf||gU(e,r,s,n,g,c,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4)):(typeof o.componentDidMount=="function"&&(e.flags|=4),e.memoizedProps=n,e.memoizedState=c),o.props=n,o.state=c,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(e.flags|=4),n=!1)}else{o=e.stateNode,gX(t,e),s=e.memoizedProps,u=e.type===e.elementType?s:pc(e.type,s),o.props=u,d=e.pendingProps,g=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=qs(c):(c=$o(r)?ip:za.current,c=gy(e,c));var m=r.getDerivedStateFromProps;(f=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==d||g!==c)&&yU(e,o,n,c),wf=!1,g=e.memoizedState,o.state=g,p1(e,n,o,i);var w=e.memoizedState;s!==d||g!==w||Do.current||wf?(typeof m=="function"&&(tA(e,r,m,n),w=e.memoizedState),(u=wf||gU(e,r,u,n,g,w,c))?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,w,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,w,c)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=256)):(typeof o.componentDidUpdate!="function"||s===t.memoizedProps&&g===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&g===t.memoizedState||(e.flags|=256),e.memoizedProps=n,e.memoizedState=w),o.props=n,o.state=w,o.context=c,n=u):(typeof o.componentDidUpdate!="function"||s===t.memoizedProps&&g===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&g===t.memoizedState||(e.flags|=256),n=!1)}return U6(t,e,r,n,a,i)}function U6(t,e,r,n,i,a){TX(t,e);var o=(e.flags&64)!==0;if(!n&&!o)return i&&lU(e,r,!1),wl(t,e,a);n=e.stateNode,Xge.current=e;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=rA(e,t.child,null,a),e.child=rA(e,null,s,a)):Io(t,e,s,a),e.memoizedState=n.state,i&&lU(e,r,!0),e.child}function IU(t){var e=t.stateNode;e.pendingContext?uU(t,e.pendingContext,e.pendingContext!==e.context):e.context&&uU(t,e.context,!1),$6(t,e.containerInfo)}var V_={dehydrated:null,retryLane:0};function OU(t,e,r){var n=e.pendingProps,i=gi.current,a=!1,o;return(o=(e.flags&64)!==0)||(o=t!==null&&t.memoizedState===null?!1:(i&2)!==0),o?(a=!0,e.flags&=-65):t!==null&&t.memoizedState===null||n.fallback===void 0||n.unstable_avoidThisFallback===!0||(i|=1),yi(gi,i&1),t===null?(n.fallback!==void 0&&M6(e),t=n.children,i=n.fallback,a?(t=PU(e,t,i,r),e.child.memoizedState={baseLanes:r},e.memoizedState=V_,t):typeof n.unstable_expectedLoadTime=="number"?(t=PU(e,t,i,r),e.child.memoizedState={baseLanes:r},e.memoizedState=V_,e.lanes=33554432,t):(r=jD({mode:"visible",children:t},e.mode,r,null),r.return=e,e.child=r)):t.memoizedState!==null?a?(n=RU(t,e,n.children,n.fallback,r),a=e.child,i=t.child.memoizedState,a.memoizedState=i===null?{baseLanes:r}:{baseLanes:i.baseLanes|r},a.childLanes=t.childLanes&~r,e.memoizedState=V_,n):(r=TU(t,e,n.children,r),e.memoizedState=null,r):a?(n=RU(t,e,n.children,n.fallback,r),a=e.child,i=t.child.memoizedState,a.memoizedState=i===null?{baseLanes:r}:{baseLanes:i.baseLanes|r},a.childLanes=t.childLanes&~r,e.memoizedState=V_,n):(r=TU(t,e,n.children,r),e.memoizedState=null,r)}function PU(t,e,r,n){var i=t.mode,a=t.child;return e={mode:"hidden",children:e},!(i&2)&&a!==null?(a.childLanes=0,a.pendingProps=e):a=jD(e,i,0,null),r=fg(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r}function TU(t,e,r,n){var i=t.child;return t=i.sibling,r=ld(i,{mode:"visible",children:r}),!(e.mode&2)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(t.nextEffect=null,t.flags=8,e.firstEffect=e.lastEffect=t),e.child=r}function RU(t,e,r,n,i){var a=e.mode,o=t.child;t=o.sibling;var s={mode:"hidden",children:r};return!(a&2)&&e.child!==o?(r=e.child,r.childLanes=0,r.pendingProps=s,o=r.lastEffect,o!==null?(e.firstEffect=r.firstEffect,e.lastEffect=o,o.nextEffect=null):e.firstEffect=e.lastEffect=null):r=ld(o,s),t!==null?n=ld(t,n):(n=fg(n,a,i,null),n.flags|=2),n.return=e,r.return=e,r.sibling=n,e.child=r,n}function CU(t,e){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),pX(t.return,e)}function rP(t,e,r,n,i,a){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i,lastEffect:a}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i,o.lastEffect=a)}function NU(t,e,r){var n=e.pendingProps,i=n.revealOrder,a=n.tail;if(Io(t,e,n.children,r),n=gi.current,n&2)n=n&1|2,e.flags|=64;else{if(t!==null&&t.flags&64)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&CU(t,r);else if(t.tag===19)CU(t,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(yi(gi,n),!(e.mode&2))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&nA(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),rP(e,!1,i,r,a,e.lastEffect);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&nA(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}rP(e,!0,r,null,a,e.lastEffect);break;case"together":rP(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function wl(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),mw|=e.lanes,r&e.childLanes){if(t!==null&&e.child!==t.child)throw Error(bt(153));if(e.child!==null){for(t=e.child,r=ld(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=ld(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}return null}var RX,B6,CX,NX;RX=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};B6=function(){};CX=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,wh(vu.current);var a=null;switch(r){case"input":i=d6(t,i),n=d6(t,n),a=[];break;case"option":i=g6(t,i),n=g6(t,n),a=[];break;case"select":i=ni({},i,{value:void 0}),n=ni({},n,{value:void 0}),a=[];break;case"textarea":i=y6(t,i),n=y6(t,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Yx)}b6(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(i1.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var c=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&c!==s&&(c!=null||s!=null))if(u==="style")if(s){for(o in s)!s.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&s[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(a||(a=[]),a.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,s=s?s.__html:void 0,c!=null&&s!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(i1.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Yn("scroll",t),a||s===c||(a=[])):typeof c=="object"&&c!==null&&c.$$typeof===sD?c.toString():(a=a||[]).push(u,c))}r&&(a=a||[]).push("style",r);var u=a;(e.updateQueue=u)&&(e.flags|=4)}};NX=function(t,e,r,n){r!==n&&(e.flags|=4)};function Hm(t,e){if(!bu)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Zge(t,e,r){var n=e.pendingProps;switch(e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return $o(e.type)&&Jx(),null;case 3:return my(),Xn(Do),Xn(za),TD(),n=e.stateNode,n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(H_(e)?e.flags|=4:n.hydrate||(e.flags|=256)),B6(e),null;case 5:PD(e);var i=wh(y1.current);if(r=e.type,t!==null&&e.stateNode!=null)CX(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=128);else{if(!n){if(e.stateNode===null)throw Error(bt(166));return null}if(t=wh(vu.current),H_(e)){n=e.stateNode,r=e.type;var a=e.memoizedProps;switch(n[qf]=e,n[Qx]=a,r){case"dialog":Yn("cancel",n),Yn("close",n);break;case"iframe":case"object":case"embed":Yn("load",n);break;case"video":case"audio":for(t=0;t<ab.length;t++)Yn(ab[t],n);break;case"source":Yn("error",n);break;case"img":case"image":case"link":Yn("error",n),Yn("load",n);break;case"details":Yn("toggle",n);break;case"input":N7(n,a),Yn("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Yn("invalid",n);break;case"textarea":$7(n,a),Yn("invalid",n)}b6(r,a),t=null;for(var o in a)a.hasOwnProperty(o)&&(i=a[o],o==="children"?typeof i=="string"?n.textContent!==i&&(t=["children",i]):typeof i=="number"&&n.textContent!==""+i&&(t=["children",""+i]):i1.hasOwnProperty(o)&&i!=null&&o==="onScroll"&&Yn("scroll",n));switch(r){case"input":L_(n),D7(n,a,!0);break;case"textarea":L_(n),M7(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Yx)}n=t,e.updateQueue=n,n!==null&&(e.flags|=4)}else{switch(o=i.nodeType===9?i:i.ownerDocument,t===m6.html&&(t=SJ(r)),t===m6.html?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[qf]=e,t[Qx]=n,RX(t,e,!1,!1),e.stateNode=t,o=w6(r,n),r){case"dialog":Yn("cancel",t),Yn("close",t),i=n;break;case"iframe":case"object":case"embed":Yn("load",t),i=n;break;case"video":case"audio":for(i=0;i<ab.length;i++)Yn(ab[i],t);i=n;break;case"source":Yn("error",t),i=n;break;case"img":case"image":case"link":Yn("error",t),Yn("load",t),i=n;break;case"details":Yn("toggle",t),i=n;break;case"input":N7(t,n),i=d6(t,n),Yn("invalid",t);break;case"option":i=g6(t,n);break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=ni({},n,{value:void 0}),Yn("invalid",t);break;case"textarea":$7(t,n),i=y6(t,n),Yn("invalid",t);break;default:i=n}b6(r,i);var s=i;for(a in s)if(s.hasOwnProperty(a)){var c=s[a];a==="style"?PJ(t,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&IJ(t,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&a1(t,c):typeof c=="number"&&a1(t,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(i1.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Yn("scroll",t):c!=null&&tD(t,a,c,o))}switch(r){case"input":L_(t),D7(t,n,!1);break;case"textarea":L_(t),M7(t);break;case"option":n.value!=null&&t.setAttribute("value",""+od(n.value));break;case"select":t.multiple=!!n.multiple,a=n.value,a!=null?ng(t,!!n.multiple,a,!1):n.defaultValue!=null&&ng(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=Yx)}aX(r,n)&&(e.flags|=4)}e.ref!==null&&(e.flags|=128)}return null;case 6:if(t&&e.stateNode!=null)NX(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(bt(166));r=wh(y1.current),wh(vu.current),H_(e)?(n=e.stateNode,r=e.memoizedProps,n[qf]=e,n.nodeValue!==r&&(e.flags|=4)):(n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[qf]=e,e.stateNode=n)}return null;case 13:return Xn(gi),n=e.memoizedState,e.flags&64?(e.lanes=r,e):(n=n!==null,r=!1,t===null?e.memoizedProps.fallback!==void 0&&H_(e):r=t.memoizedState!==null,n&&!r&&e.mode&2&&(t===null&&e.memoizedProps.unstable_avoidThisFallback!==!0||gi.current&1?ha===0&&(ha=3):((ha===0||ha===3)&&(ha=4),oo===null||!(mw&134217727)&&!(Ky&134217727)||ug(oo,qa))),(n||r)&&(e.flags|=4),null);case 4:return my(),B6(e),t===null&&rX(e.stateNode.containerInfo),null;case 10:return ID(e),null;case 17:return $o(e.type)&&Jx(),null;case 19:if(Xn(gi),n=e.memoizedState,n===null)return null;if(a=(e.flags&64)!==0,o=n.rendering,o===null)if(a)Hm(n,!1);else{if(ha!==0||t!==null&&t.flags&64)for(t=e.child;t!==null;){if(o=nA(t),o!==null){for(e.flags|=64,Hm(n,!1),a=o.updateQueue,a!==null&&(e.updateQueue=a,e.flags|=4),n.lastEffect===null&&(e.firstEffect=null),e.lastEffect=n.lastEffect,n=r,r=e.child;r!==null;)a=r,t=n,a.flags&=2,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null,o=a.alternate,o===null?(a.childLanes=0,a.lanes=t,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,t=o.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return yi(gi,gi.current&1|2),e.child}t=t.sibling}n.tail!==null&&ja()>z6&&(e.flags|=64,a=!0,Hm(n,!1),e.lanes=33554432)}else{if(!a)if(t=nA(o),t!==null){if(e.flags|=64,a=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Hm(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!bu)return e=e.lastEffect=n.lastEffect,e!==null&&(e.nextEffect=null),null}else 2*ja()-n.renderingStartTime>z6&&r!==1073741824&&(e.flags|=64,a=!0,Hm(n,!1),e.lanes=33554432);n.isBackwards?(o.sibling=e.child,e.child=o):(r=n.last,r!==null?r.sibling=o:e.child=o,n.last=o)}return n.tail!==null?(r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=e.lastEffect,n.renderingStartTime=ja(),r.sibling=null,e=gi.current,yi(gi,a?e&1|2:e&1),r):null;case 23:case 24:return BD(),t!==null&&t.memoizedState!==null!=(e.memoizedState!==null)&&n.mode!=="unstable-defer-without-hiding"&&(e.flags|=4),null}throw Error(bt(156,e.tag))}function eye(t){switch(t.tag){case 1:$o(t.type)&&Jx();var e=t.flags;return e&4096?(t.flags=e&-4097|64,t):null;case 3:if(my(),Xn(Do),Xn(za),TD(),e=t.flags,e&64)throw Error(bt(285));return t.flags=e&-4097|64,t;case 5:return PD(t),null;case 13:return Xn(gi),e=t.flags,e&4096?(t.flags=e&-4097|64,t):null;case 19:return Xn(gi),null;case 4:return my(),null;case 10:return ID(t),null;case 23:case 24:return BD(),null;default:return null}}function MD(t,e){try{var r="",n=e;do r+=$0e(n),n=n.return;while(n);var i=r}catch(a){i=`
|
|
38
|
-
Error generating stack: `+a.message+`
|
|
39
|
-
`+a.stack}return{value:t,source:e,stack:i}}function F6(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var tye=typeof WeakMap=="function"?WeakMap:Map;function DX(t,e,r){r=Xf(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){lA||(lA=!0,G6=n),F6(t,e)},r}function $X(t,e,r){r=Xf(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return F6(t,e),n(i)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){typeof n!="function"&&(gu===null?gu=new Set([this]):gu.add(this),F6(t,e));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}var rye=typeof WeakSet=="function"?WeakSet:Set;function DU(t){var e=t.ref;if(e!==null)if(typeof e=="function")try{e(null)}catch(r){rd(t,r)}else e.current=null}function nye(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(e.flags&256&&t!==null){var r=t.memoizedProps,n=t.memoizedState;t=e.stateNode,e=t.getSnapshotBeforeUpdate(e.elementType===e.type?r:pc(e.type,r),n),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:e.flags&256&&ED(e.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(bt(163))}function iye(t,e,r){switch(r.tag){case 0:case 11:case 15:case 22:if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{if((t.tag&3)===3){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{var i=t;n=i.next,i=i.tag,i&4&&i&1&&(HX(r,t),dye(r,t)),t=n}while(t!==e)}return;case 1:t=r.stateNode,r.flags&4&&(e===null?t.componentDidMount():(n=r.elementType===r.type?e.memoizedProps:pc(r.type,e.memoizedProps),t.componentDidUpdate(n,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),e=r.updateQueue,e!==null&&pU(r,e,t);return;case 3:if(e=r.updateQueue,e!==null){if(t=null,r.child!==null)switch(r.child.tag){case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}pU(r,e,t)}return;case 5:t=r.stateNode,e===null&&r.flags&4&&aX(r.type,r.memoizedProps)&&t.focus();return;case 6:return;case 4:return;case 12:return;case 13:r.memoizedState===null&&(r=r.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&UJ(r))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(bt(163))}function $U(t,e){for(var r=t;;){if(r.tag===5){var n=r.stateNode;if(e)n=n.style,typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none";else{n=r.stateNode;var i=r.memoizedProps.style;i=i!=null&&i.hasOwnProperty("display")?i.display:null,n.style.display=OJ("display",i)}}else if(r.tag===6)r.stateNode.nodeValue=e?"":r.memoizedProps;else if((r.tag!==23&&r.tag!==24||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function MU(t,e){if(Qh&&typeof Qh.onCommitFiberUnmount=="function")try{Qh.onCommitFiberUnmount(xD,e)}catch{}switch(e.tag){case 0:case 11:case 14:case 15:case 22:if(t=e.updateQueue,t!==null&&(t=t.lastEffect,t!==null)){var r=t=t.next;do{var n=r,i=n.destroy;if(n=n.tag,i!==void 0)if(n&4)HX(e,r);else{n=e;try{i()}catch(a){rd(n,a)}}r=r.next}while(r!==t)}break;case 1:if(DU(e),t=e.stateNode,typeof t.componentWillUnmount=="function")try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(a){rd(e,a)}break;case 5:DU(e);break;case 4:MX(t,e)}}function kU(t){t.alternate=null,t.child=null,t.dependencies=null,t.firstEffect=null,t.lastEffect=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.return=null,t.updateQueue=null}function LU(t){return t.tag===5||t.tag===3||t.tag===4}function UU(t){e:{for(var e=t.return;e!==null;){if(LU(e))break e;e=e.return}throw Error(bt(160))}var r=e;switch(e=r.stateNode,r.tag){case 5:var n=!1;break;case 3:e=e.containerInfo,n=!0;break;case 4:e=e.containerInfo,n=!0;break;default:throw Error(bt(161))}r.flags&16&&(a1(e,""),r.flags&=-17);e:t:for(r=t;;){for(;r.sibling===null;){if(r.return===null||LU(r.return)){r=null;break e}r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue t;r.child.return=r,r=r.child}if(!(r.flags&2)){r=r.stateNode;break e}}n?j6(t,r,e):q6(t,r,e)}function j6(t,e,r){var n=t.tag,i=n===5||n===6;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Yx));else if(n!==4&&(t=t.child,t!==null))for(j6(t,e,r),t=t.sibling;t!==null;)j6(t,e,r),t=t.sibling}function q6(t,e,r){var n=t.tag,i=n===5||n===6;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(q6(t,e,r),t=t.sibling;t!==null;)q6(t,e,r),t=t.sibling}function MX(t,e){for(var r=e,n=!1,i,a;;){if(!n){n=r.return;e:for(;;){if(n===null)throw Error(bt(160));switch(i=n.stateNode,n.tag){case 5:a=!1;break e;case 3:i=i.containerInfo,a=!0;break e;case 4:i=i.containerInfo,a=!0;break e}n=n.return}n=!0}if(r.tag===5||r.tag===6){e:for(var o=t,s=r,c=s;;)if(MU(o,c),c.child!==null&&c.tag!==4)c.child.return=c,c=c.child;else{if(c===s)break e;for(;c.sibling===null;){if(c.return===null||c.return===s)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}a?(o=i,s=r.stateNode,o.nodeType===8?o.parentNode.removeChild(s):o.removeChild(s)):i.removeChild(r.stateNode)}else if(r.tag===4){if(r.child!==null){i=r.stateNode.containerInfo,a=!0,r.child.return=r,r=r.child;continue}}else if(MU(t,r),r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return,r.tag===4&&(n=!1)}r.sibling.return=r.return,r=r.sibling}}function nP(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do(n.tag&3)===3&&(t=n.destroy,n.destroy=void 0,t!==void 0&&t()),n=n.next;while(n!==r)}return;case 1:return;case 5:if(r=e.stateNode,r!=null){n=e.memoizedProps;var i=t!==null?t.memoizedProps:n;t=e.type;var a=e.updateQueue;if(e.updateQueue=null,a!==null){for(r[Qx]=n,t==="input"&&n.type==="radio"&&n.name!=null&&xJ(r,n),w6(t,i),e=w6(t,n),i=0;i<a.length;i+=2){var o=a[i],s=a[i+1];o==="style"?PJ(r,s):o==="dangerouslySetInnerHTML"?IJ(r,s):o==="children"?a1(r,s):tD(r,o,s,e)}switch(t){case"input":h6(r,n);break;case"textarea":AJ(r,n);break;case"select":t=r._wrapperState.wasMultiple,r._wrapperState.wasMultiple=!!n.multiple,a=n.value,a!=null?ng(r,!!n.multiple,a,!1):t!==!!n.multiple&&(n.defaultValue!=null?ng(r,!!n.multiple,n.defaultValue,!0):ng(r,!!n.multiple,n.multiple?[]:"",!1))}}}return;case 6:if(e.stateNode===null)throw Error(bt(162));e.stateNode.nodeValue=e.memoizedProps;return;case 3:r=e.stateNode,r.hydrate&&(r.hydrate=!1,UJ(r.containerInfo));return;case 12:return;case 13:e.memoizedState!==null&&(UD=ja(),$U(e.child,!0)),BU(e);return;case 19:BU(e);return;case 17:return;case 23:case 24:$U(e,e.memoizedState!==null);return}throw Error(bt(163))}function BU(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new rye),e.forEach(function(n){var i=gye.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function aye(t,e){return t!==null&&(t=t.memoizedState,t===null||t.dehydrated!==null)?(e=e.memoizedState,e!==null&&e.dehydrated===null):!1}var oye=Math.ceil,uA=bp.ReactCurrentDispatcher,kD=bp.ReactCurrentOwner,Pr=0,oo=null,Fi=null,qa=0,op=0,H6=yd(0),ha=0,D2=null,Wy=0,mw=0,Ky=0,LD=0,V6=null,UD=0,z6=1/0;function Yy(){z6=ja()+500}var Ht=null,lA=!1,G6=null,gu=null,ud=!1,Mb=null,ob=90,W6=[],K6=[],Sl=null,kb=0,Y6=null,XE=-1,ml=0,ZE=0,Lb=null,ex=!1;function ts(){return Pr&48?ja():XE!==-1?XE:XE=ja()}function ed(t){if(t=t.mode,!(t&2))return 1;if(!(t&4))return yy()===99?1:2;if(ml===0&&(ml=Wy),Wge.transition!==0){ZE!==0&&(ZE=V6!==null?V6.pendingLanes:0),t=ml;var e=4186112&~ZE;return e&=-e,e===0&&(t=4186112&~t,e=t&-t,e===0&&(e=8192)),e}return t=yy(),Pr&4&&t===98?t=Wx(12,ml):(t=Q0e(t),t=Wx(t,ml)),t}function td(t,e,r){if(50<kb)throw kb=0,Y6=null,Error(bt(185));if(t=$2(t,e),t===null)return null;I2(t,e,r),t===oo&&(Ky|=e,ha===4&&ug(t,qa));var n=yy();e===1?Pr&8&&!(Pr&48)?Q6(t):(Hs(t,r),Pr===0&&(Yy(),Pu())):(!(Pr&4)||n!==98&&n!==99||(Sl===null?Sl=new Set([t]):Sl.add(t)),Hs(t,r)),V6=t}function $2(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}function Hs(t,e){for(var r=t.callbackNode,n=t.suspendedLanes,i=t.pingedLanes,a=t.expirationTimes,o=t.pendingLanes;0<o;){var s=31-sd(o),c=1<<s,u=a[s];if(u===-1){if(!(c&n)||c&i){u=e,S0(c);var f=qn;a[s]=10<=f?u+250:6<=f?u+5e3:-1}}else u<=e&&(t.expiredLanes|=c);o&=~c}if(n=u1(t,t===oo?qa:0),e=qn,n===0)r!==null&&(r!==XO&&C6(r),t.callbackNode=null,t.callbackPriority=0);else{if(r!==null){if(t.callbackPriority===e)return;r!==XO&&C6(r)}e===15?(r=Q6.bind(null,t),rl===null?(rl=[r],JE=AD(C2,hX)):rl.push(r),r=XO):e===14?r=h1(99,Q6.bind(null,t)):(r=J0e(e),r=h1(r,kX.bind(null,t))),t.callbackPriority=e,t.callbackNode=r}}function kX(t){if(XE=-1,ZE=ml=0,Pr&48)throw Error(bt(327));var e=t.callbackNode;if(md()&&t.callbackNode!==e)return null;var r=u1(t,t===oo?qa:0);if(r===0)return null;var n=r,i=Pr;Pr|=16;var a=FX();(oo!==t||qa!==n)&&(Yy(),lg(t,n));do try{uye();break}catch(s){BX(t,s)}while(1);if(SD(),uA.current=a,Pr=i,Fi!==null?n=0:(oo=null,qa=0,n=ha),Wy&Ky)lg(t,0);else if(n!==0){if(n===2&&(Pr|=64,t.hydrate&&(t.hydrate=!1,ED(t.containerInfo)),r=zJ(t),r!==0&&(n=sb(t,r))),n===1)throw e=D2,lg(t,0),ug(t,r),Hs(t,ja()),e;switch(t.finishedWork=t.current.alternate,t.finishedLanes=r,n){case 0:case 1:throw Error(bt(345));case 2:uh(t);break;case 3:if(ug(t,r),(r&62914560)===r&&(n=UD+500-ja(),10<n)){if(u1(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){ts(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=oU(uh.bind(null,t),n);break}uh(t);break;case 4:if(ug(t,r),(r&4186112)===r)break;for(n=t.eventTimes,i=-1;0<r;){var o=31-sd(r);a=1<<o,o=n[o],o>i&&(i=o),r&=~a}if(r=i,r=ja()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oye(r/1960))-r,10<r){t.timeoutHandle=oU(uh.bind(null,t),r);break}uh(t);break;case 5:uh(t);break;default:throw Error(bt(329))}}return Hs(t,ja()),t.callbackNode===e?kX.bind(null,t):null}function ug(t,e){for(e&=~LD,e&=~Ky,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-sd(e),n=1<<r;t[r]=-1,e&=~n}}function Q6(t){if(Pr&48)throw Error(bt(327));if(md(),t===oo&&t.expiredLanes&qa){var e=qa,r=sb(t,e);Wy&Ky&&(e=u1(t,e),r=sb(t,e))}else e=u1(t,0),r=sb(t,e);if(t.tag!==0&&r===2&&(Pr|=64,t.hydrate&&(t.hydrate=!1,ED(t.containerInfo)),e=zJ(t),e!==0&&(r=sb(t,e))),r===1)throw r=D2,lg(t,0),ug(t,e),Hs(t,ja()),r;return t.finishedWork=t.current.alternate,t.finishedLanes=e,uh(t),Hs(t,ja()),null}function sye(){if(Sl!==null){var t=Sl;Sl=null,t.forEach(function(e){e.expiredLanes|=24&e.pendingLanes,Hs(e,ja())})}Pu()}function LX(t,e){var r=Pr;Pr|=1;try{return t(e)}finally{Pr=r,Pr===0&&(Yy(),Pu())}}function UX(t,e){var r=Pr;Pr&=-2,Pr|=8;try{return t(e)}finally{Pr=r,Pr===0&&(Yy(),Pu())}}function z_(t,e){yi(H6,op),op|=e,Wy|=e}function BD(){op=H6.current,Xn(H6)}function lg(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,jge(r)),Fi!==null)for(r=Fi.return;r!==null;){var n=r;switch(n.tag){case 1:n=n.type.childContextTypes,n!=null&&Jx();break;case 3:my(),Xn(Do),Xn(za),TD();break;case 5:PD(n);break;case 4:my();break;case 13:Xn(gi);break;case 19:Xn(gi);break;case 10:ID(n);break;case 23:case 24:BD()}r=r.return}oo=t,Fi=ld(t.current,null),qa=op=Wy=e,ha=0,D2=null,LD=Ky=mw=0}function BX(t,e){do{var r=Fi;try{if(SD(),Db.current=cA,iA){for(var n=Si.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}iA=!1}if(m1=0,la=$a=Si=null,$b=!1,kD.current=null,r===null||r.return===null){ha=1,D2=e,Fi=null;break}e:{var a=t,o=r.return,s=r,c=e;if(e=qa,s.flags|=2048,s.firstEffect=s.lastEffect=null,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c;if(!(s.mode&2)){var f=s.alternate;f?(s.updateQueue=f.updateQueue,s.memoizedState=f.memoizedState,s.lanes=f.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=(gi.current&1)!==0,g=o;do{var m;if(m=g.tag===13){var w=g.memoizedState;if(w!==null)m=w.dehydrated!==null;else{var v=g.memoizedProps;m=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!d}}if(m){var y=g.updateQueue;if(y===null){var _=new Set;_.add(u),g.updateQueue=_}else y.add(u);if(!(g.mode&2)){if(g.flags|=64,s.flags|=16384,s.flags&=-2981,s.tag===1)if(s.alternate===null)s.tag=17;else{var b=Xf(-1,1);b.tag=2,Zf(s,b)}s.lanes|=1;break e}c=void 0,s=e;var S=a.pingCache;if(S===null?(S=a.pingCache=new tye,c=new Set,S.set(u,c)):(c=S.get(u),c===void 0&&(c=new Set,S.set(u,c))),!c.has(s)){c.add(s);var x=pye.bind(null,a,u,s);u.then(x,x)}g.flags|=4096,g.lanes=e;break e}g=g.return}while(g!==null);c=Error((rg(s.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
40
|
-
|
|
41
|
-
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}ha!==5&&(ha=2),c=MD(c,s),g=o;do{switch(g.tag){case 3:a=c,g.flags|=4096,e&=-e,g.lanes|=e;var I=DX(g,a,e);hU(g,I);break e;case 1:a=c;var E=g.type,p=g.stateNode;if(!(g.flags&64)&&(typeof E.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(gu===null||!gu.has(p)))){g.flags|=4096,e&=-e,g.lanes|=e;var O=$X(g,a,e);hU(g,O);break e}}g=g.return}while(g!==null)}qX(r)}catch(C){e=C,Fi===r&&r!==null&&(Fi=r=r.return);continue}break}while(1)}function FX(){var t=uA.current;return uA.current=cA,t===null?cA:t}function sb(t,e){var r=Pr;Pr|=16;var n=FX();oo===t&&qa===e||lg(t,e);do try{cye();break}catch(i){BX(t,i)}while(1);if(SD(),Pr=r,uA.current=n,Fi!==null)throw Error(bt(261));return oo=null,qa=0,ha}function cye(){for(;Fi!==null;)jX(Fi)}function uye(){for(;Fi!==null&&!Vge();)jX(Fi)}function jX(t){var e=VX(t.alternate,t,op);t.memoizedProps=t.pendingProps,e===null?qX(t):Fi=e,kD.current=null}function qX(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&2048){if(r=eye(e),r!==null){r.flags&=2047,Fi=r;return}t!==null&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}else{if(r=Zge(r,e,op),r!==null){Fi=r;return}if(r=e,r.tag!==24&&r.tag!==23||r.memoizedState===null||op&1073741824||!(r.mode&4)){for(var n=0,i=r.child;i!==null;)n|=i.lanes|i.childLanes,i=i.sibling;r.childLanes=n}t!==null&&!(t.flags&2048)&&(t.firstEffect===null&&(t.firstEffect=e.firstEffect),e.lastEffect!==null&&(t.lastEffect!==null&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1<e.flags&&(t.lastEffect!==null?t.lastEffect.nextEffect=e:t.firstEffect=e,t.lastEffect=e))}if(e=e.sibling,e!==null){Fi=e;return}Fi=e=t}while(e!==null);ha===0&&(ha=5)}function uh(t){var e=yy();return ap(99,lye.bind(null,t,e)),null}function lye(t,e){do md();while(Mb!==null);if(Pr&48)throw Error(bt(327));var r=t.finishedWork;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(bt(177));t.callbackNode=null;var n=r.lanes|r.childLanes,i=n,a=t.pendingLanes&~i;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=i,t.mutableReadLanes&=i,t.entangledLanes&=i,i=t.entanglements;for(var o=t.eventTimes,s=t.expirationTimes;0<a;){var c=31-sd(a),u=1<<c;i[c]=0,o[c]=-1,s[c]=-1,a&=~u}if(Sl!==null&&!(n&24)&&Sl.has(t)&&Sl.delete(t),t===oo&&(Fi=oo=null,qa=0),1<r.flags?r.lastEffect!==null?(r.lastEffect.nextEffect=r,n=r.firstEffect):n=r:n=r.firstEffect,n!==null){if(i=Pr,Pr|=32,kD.current=null,YO=WE,o=Z7(),I6(o)){if("selectionStart"in o)s={start:o.selectionStart,end:o.selectionEnd};else e:if(s=(s=o.ownerDocument)&&s.defaultView||window,(u=s.getSelection&&s.getSelection())&&u.rangeCount!==0){s=u.anchorNode,a=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{s.nodeType,c.nodeType}catch{s=null;break e}var f=0,d=-1,g=-1,m=0,w=0,v=o,y=null;t:for(;;){for(var _;v!==s||a!==0&&v.nodeType!==3||(d=f+a),v!==c||u!==0&&v.nodeType!==3||(g=f+u),v.nodeType===3&&(f+=v.nodeValue.length),(_=v.firstChild)!==null;)y=v,v=_;for(;;){if(v===o)break t;if(y===s&&++m===a&&(d=f),y===c&&++w===u&&(g=f),(_=v.nextSibling)!==null)break;v=y,y=v.parentNode}v=_}s=d===-1||g===-1?null:{start:d,end:g}}else s=null;s=s||{start:0,end:0}}else s=null;QO={focusedElem:o,selectionRange:s},WE=!1,Lb=null,ex=!1,Ht=n;do try{fye()}catch(C){if(Ht===null)throw Error(bt(330));rd(Ht,C),Ht=Ht.nextEffect}while(Ht!==null);Lb=null,Ht=n;do try{for(o=t;Ht!==null;){var b=Ht.flags;if(b&16&&a1(Ht.stateNode,""),b&128){var S=Ht.alternate;if(S!==null){var x=S.ref;x!==null&&(typeof x=="function"?x(null):x.current=null)}}switch(b&1038){case 2:UU(Ht),Ht.flags&=-3;break;case 6:UU(Ht),Ht.flags&=-3,nP(Ht.alternate,Ht);break;case 1024:Ht.flags&=-1025;break;case 1028:Ht.flags&=-1025,nP(Ht.alternate,Ht);break;case 4:nP(Ht.alternate,Ht);break;case 8:s=Ht,MX(o,s);var I=s.alternate;kU(s),I!==null&&kU(I)}Ht=Ht.nextEffect}}catch(C){if(Ht===null)throw Error(bt(330));rd(Ht,C),Ht=Ht.nextEffect}while(Ht!==null);if(x=QO,S=Z7(),b=x.focusedElem,o=x.selectionRange,S!==b&&b&&b.ownerDocument&&ZJ(b.ownerDocument.documentElement,b)){for(o!==null&&I6(b)&&(S=o.start,x=o.end,x===void 0&&(x=S),"selectionStart"in b?(b.selectionStart=S,b.selectionEnd=Math.min(x,b.value.length)):(x=(S=b.ownerDocument||document)&&S.defaultView||window,x.getSelection&&(x=x.getSelection(),s=b.textContent.length,I=Math.min(o.start,s),o=o.end===void 0?I:Math.min(o.end,s),!x.extend&&I>o&&(s=o,o=I,I=s),s=X7(b,I),a=X7(b,o),s&&a&&(x.rangeCount!==1||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==a.node||x.focusOffset!==a.offset)&&(S=S.createRange(),S.setStart(s.node,s.offset),x.removeAllRanges(),I>o?(x.addRange(S),x.extend(a.node,a.offset)):(S.setEnd(a.node,a.offset),x.addRange(S)))))),S=[],x=b;x=x.parentNode;)x.nodeType===1&&S.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<S.length;b++)x=S[b],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}WE=!!YO,QO=YO=null,t.current=r,Ht=n;do try{for(b=t;Ht!==null;){var E=Ht.flags;if(E&36&&iye(b,Ht.alternate,Ht),E&128){S=void 0;var p=Ht.ref;if(p!==null){var O=Ht.stateNode;switch(Ht.tag){case 5:S=O;break;default:S=O}typeof p=="function"?p(S):p.current=S}}Ht=Ht.nextEffect}}catch(C){if(Ht===null)throw Error(bt(330));rd(Ht,C),Ht=Ht.nextEffect}while(Ht!==null);Ht=null,Gge(),Pr=i}else t.current=r;if(ud)ud=!1,Mb=t,ob=e;else for(Ht=n;Ht!==null;)e=Ht.nextEffect,Ht.nextEffect=null,Ht.flags&8&&(E=Ht,E.sibling=null,E.stateNode=null),Ht=e;if(n=t.pendingLanes,n===0&&(gu=null),n===1?t===Y6?kb++:(kb=0,Y6=t):kb=0,r=r.stateNode,Qh&&typeof Qh.onCommitFiberRoot=="function")try{Qh.onCommitFiberRoot(xD,r,void 0,(r.current.flags&64)===64)}catch{}if(Hs(t,ja()),lA)throw lA=!1,t=G6,G6=null,t;return Pr&8||Pu(),null}function fye(){for(;Ht!==null;){var t=Ht.alternate;ex||Lb===null||(Ht.flags&8?U7(Ht,Lb)&&(ex=!0):Ht.tag===13&&aye(t,Ht)&&U7(Ht,Lb)&&(ex=!0));var e=Ht.flags;e&256&&nye(t,Ht),!(e&512)||ud||(ud=!0,h1(97,function(){return md(),null})),Ht=Ht.nextEffect}}function md(){if(ob!==90){var t=97<ob?97:ob;return ob=90,ap(t,hye)}return!1}function dye(t,e){W6.push(e,t),ud||(ud=!0,h1(97,function(){return md(),null}))}function HX(t,e){K6.push(e,t),ud||(ud=!0,h1(97,function(){return md(),null}))}function hye(){if(Mb===null)return!1;var t=Mb;if(Mb=null,Pr&48)throw Error(bt(331));var e=Pr;Pr|=32;var r=K6;K6=[];for(var n=0;n<r.length;n+=2){var i=r[n],a=r[n+1],o=i.destroy;if(i.destroy=void 0,typeof o=="function")try{o()}catch(c){if(a===null)throw Error(bt(330));rd(a,c)}}for(r=W6,W6=[],n=0;n<r.length;n+=2){i=r[n],a=r[n+1];try{var s=i.create;i.destroy=s()}catch(c){if(a===null)throw Error(bt(330));rd(a,c)}}for(s=t.current.firstEffect;s!==null;)t=s.nextEffect,s.nextEffect=null,s.flags&8&&(s.sibling=null,s.stateNode=null),s=t;return Pr=e,Pu(),!0}function FU(t,e,r){e=MD(r,e),e=DX(t,e,1),Zf(t,e),e=ts(),t=$2(t,1),t!==null&&(I2(t,1,e),Hs(t,e))}function rd(t,e){if(t.tag===3)FU(t,t,e);else for(var r=t.return;r!==null;){if(r.tag===3){FU(r,t,e);break}else if(r.tag===1){var n=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(gu===null||!gu.has(n))){t=MD(e,t);var i=$X(r,t,1);if(Zf(r,i),i=ts(),r=$2(r,1),r!==null)I2(r,1,i),Hs(r,i);else if(typeof n.componentDidCatch=="function"&&(gu===null||!gu.has(n)))try{n.componentDidCatch(e,t)}catch{}break}}r=r.return}}function pye(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=ts(),t.pingedLanes|=t.suspendedLanes&r,oo===t&&(qa&r)===r&&(ha===4||ha===3&&(qa&62914560)===qa&&500>ja()-UD?lg(t,0):LD|=r),Hs(t,e)}function gye(t,e){var r=t.stateNode;r!==null&&r.delete(e),e=0,e===0&&(e=t.mode,e&2?e&4?(ml===0&&(ml=Wy),e=I0(62914560&~ml),e===0&&(e=4194304)):e=yy()===99?1:2:e=1),r=ts(),t=$2(t,e),t!==null&&(I2(t,e,r),Hs(t,r))}var VX;VX=function(t,e,r){var n=e.lanes;if(t!==null)if(t.memoizedProps!==e.pendingProps||Do.current)Pc=!0;else if(r&n)Pc=!!(t.flags&16384);else{switch(Pc=!1,e.tag){case 3:IU(e),eP();break;case 5:mU(e);break;case 1:$o(e.type)&&QE(e);break;case 4:$6(e,e.stateNode.containerInfo);break;case 10:n=e.memoizedProps.value;var i=e.type._context;yi(Xx,i._currentValue),i._currentValue=n;break;case 13:if(e.memoizedState!==null)return r&e.child.childLanes?OU(t,e,r):(yi(gi,gi.current&1),e=wl(t,e,r),e!==null?e.sibling:null);yi(gi,gi.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&64){if(n)return NU(t,e,r);e.flags|=64}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),yi(gi,gi.current),n)break;return null;case 23:case 24:return e.lanes=0,tP(t,e,r)}return wl(t,e,r)}else Pc=!1;switch(e.lanes=0,e.tag){case 2:if(n=e.type,t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=gy(e,za.current),sg(e,r),i=CD(null,e,n,t,i,r),e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,$o(n)){var a=!0;QE(e)}else a=!1;e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,OD(e);var o=n.getDerivedStateFromProps;typeof o=="function"&&tA(e,n,o,t),i.updater=N2,e.stateNode=i,i._reactInternals=e,D6(e,n,t,r),e=U6(null,e,n,!0,a,r)}else e.tag=0,Io(null,e,i,r),e=e.child;return e;case 16:i=e.elementType;e:{switch(t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,a=i._init,i=a(i._payload),e.type=i,a=e.tag=mye(i),t=pc(i,t),a){case 0:e=L6(null,e,i,t,r);break e;case 1:e=SU(null,e,i,t,r);break e;case 11:e=xU(null,e,i,t,r);break e;case 14:e=AU(null,e,i,pc(i.type,t),n,r);break e}throw Error(bt(306,i,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:pc(n,i),L6(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:pc(n,i),SU(t,e,n,i,r);case 3:if(IU(e),n=e.updateQueue,t===null||n===null)throw Error(bt(282));if(n=e.pendingProps,i=e.memoizedState,i=i!==null?i.element:null,gX(t,e),p1(e,n,null,r),n=e.memoizedState.element,n===i)eP(),e=wl(t,e,r);else{if(i=e.stateNode,(a=i.hydrate)&&(Hf=og(e.stateNode.containerInfo.firstChild),bl=e,a=bu=!0),a){if(t=i.mutableSourceEagerHydrationData,t!=null)for(i=0;i<t.length;i+=2)a=t[i],a._workInProgressVersionPrimary=t[i+1],cg.push(a);for(r=bX(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|1024,r=r.sibling}else Io(t,e,n,r),eP();e=e.child}return e;case 5:return mU(e),t===null&&M6(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,T6(n,i)?o=null:a!==null&&T6(n,a)&&(e.flags|=16),TX(t,e),Io(t,e,o,r),e.child;case 6:return t===null&&M6(e),null;case 13:return OU(t,e,r);case 4:return $6(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=rA(e,null,n,r):Io(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:pc(n,i),xU(t,e,n,i,r);case 7:return Io(t,e,e.pendingProps,r),e.child;case 8:return Io(t,e,e.pendingProps.children,r),e.child;case 12:return Io(t,e,e.pendingProps.children,r),e.child;case 10:e:{n=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=i.value;var s=e.type._context;if(yi(Xx,s._currentValue),s._currentValue=a,o!==null)if(s=o.value,a=Ms(s,a)?0:(typeof n._calculateChangedBits=="function"?n._calculateChangedBits(s,a):1073741823)|0,a===0){if(o.children===i.children&&!Do.current){e=wl(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var c=s.dependencies;if(c!==null){o=s.child;for(var u=c.firstContext;u!==null;){if(u.context===n&&u.observedBits&a){s.tag===1&&(u=Xf(-1,r&-r),u.tag=2,Zf(s,u)),s.lanes|=r,u=s.alternate,u!==null&&(u.lanes|=r),pX(s.return,r),c.lanes|=r;break}u=u.next}}else o=s.tag===10&&s.type===e.type?null:s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Io(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,a=e.pendingProps,n=a.children,sg(e,r),i=qs(i,a.unstable_observedBits),n=n(i),e.flags|=1,Io(t,e,n,r),e.child;case 14:return i=e.type,a=pc(i,e.pendingProps),a=pc(i.type,a),AU(t,e,i,a,n,r);case 15:return PX(t,e,e.type,e.pendingProps,n,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:pc(n,i),t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),e.tag=1,$o(n)?(t=!0,QE(e)):t=!1,sg(e,r),mX(e,n,i),D6(e,n,i,r),U6(null,e,n,!0,t,r);case 19:return NU(t,e,r);case 23:return tP(t,e,r);case 24:return tP(t,e,r)}throw Error(bt(156,e.tag))};function yye(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function ks(t,e,r,n){return new yye(t,e,r,n)}function FD(t){return t=t.prototype,!(!t||!t.isReactComponent)}function mye(t){if(typeof t=="function")return FD(t)?1:0;if(t!=null){if(t=t.$$typeof,t===x2)return 11;if(t===A2)return 14}return 2}function ld(t,e){var r=t.alternate;return r===null?(r=ks(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function tx(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")FD(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Sf:return fg(r.children,i,a,e);case wJ:o=8,i|=16;break;case rD:o=8,i|=1;break;case Ib:return t=ks(12,r,e,i|8),t.elementType=Ib,t.type=Ib,t.lanes=a,t;case Ob:return t=ks(13,r,e,i),t.type=Ob,t.elementType=Ob,t.lanes=a,t;case Hx:return t=ks(19,r,e,i),t.elementType=Hx,t.lanes=a,t;case cD:return jD(r,i,a,e);case f6:return t=ks(24,r,e,i),t.elementType=f6,t.lanes=a,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case nD:o=10;break e;case iD:o=9;break e;case x2:o=11;break e;case A2:o=14;break e;case aD:o=16,n=null;break e;case oD:o=22;break e}throw Error(bt(130,t==null?t:typeof t,""))}return e=ks(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function fg(t,e,r,n){return t=ks(7,t,n,e),t.lanes=r,t}function jD(t,e,r,n){return t=ks(23,t,n,e),t.elementType=cD,t.lanes=r,t}function iP(t,e,r){return t=ks(6,t,null,e),t.lanes=r,t}function aP(t,e,r){return e=ks(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function vye(t,e,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=r,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=qO(0),this.expirationTimes=qO(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qO(0),this.mutableSourceEagerHydrationData=null}function bye(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:mh,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function fA(t,e,r,n){var i=e.current,a=ts(),o=ed(i);e:if(r){r=r._reactInternals;t:{if(wp(r)!==r||r.tag!==1)throw Error(bt(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if($o(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(s!==null);throw Error(bt(171))}if(r.tag===1){var c=r.type;if($o(c)){r=sX(r,c,s);break e}}r=s}else r=cd;return e.context===null?e.context=r:e.pendingContext=r,e=Xf(a,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),Zf(i,e),td(i,o,a),o}function oP(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function jU(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function qD(t,e){jU(t,e),(t=t.alternate)&&jU(t,e)}function wye(){return null}function HD(t,e,r){var n=r!=null&&r.hydrationOptions!=null&&r.hydrationOptions.mutableSources||null;if(r=new vye(t,e,r!=null&&r.hydrate===!0),e=ks(3,null,null,e===2?7:e===1?3:0),r.current=e,e.stateNode=r,OD(e),t[Gy]=r.current,rX(t.nodeType===8?t.parentNode:t),n)for(t=0;t<n.length;t++){e=n[t];var i=e._getVersion;i=i(e._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[e,i]:r.mutableSourceEagerHydrationData.push(e,i)}this._internalRoot=r}HD.prototype.render=function(t){fA(t,this._internalRoot,null,null)};HD.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;fA(null,t,null,function(){e[Gy]=null})};function vw(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function _ye(t,e){if(e||(e=t?t.nodeType===9?t.documentElement:t.firstChild:null,e=!(!e||e.nodeType!==1||!e.hasAttribute("data-reactroot"))),!e)for(var r;r=t.lastChild;)t.removeChild(r);return new HD(t,0,e?{hydrate:!0}:void 0)}function M2(t,e,r,n,i){var a=r._reactRootContainer;if(a){var o=a._internalRoot;if(typeof i=="function"){var s=i;i=function(){var u=oP(o);s.call(u)}}fA(e,o,t,i)}else{if(a=r._reactRootContainer=_ye(r,n),o=a._internalRoot,typeof i=="function"){var c=i;i=function(){var u=oP(o);c.call(u)}}UX(function(){fA(e,o,t,i)})}return oP(o)}MJ=function(t){if(t.tag===13){var e=ts();td(t,4,e),qD(t,4)}};hD=function(t){if(t.tag===13){var e=ts();td(t,67108864,e),qD(t,67108864)}};kJ=function(t){if(t.tag===13){var e=ts(),r=ed(t);td(t,r,e),qD(t,r)}};LJ=function(t,e){return e()};_6=function(t,e,r){switch(e){case"input":if(h6(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=R2(n);if(!i)throw Error(bt(90));EJ(n),h6(n,i)}}}break;case"textarea":AJ(t,r);break;case"select":e=r.value,e!=null&&ng(t,!!r.multiple,e,!1)}};lD=LX;CJ=function(t,e,r,n,i){var a=Pr;Pr|=4;try{return ap(98,t.bind(null,e,r,n,i))}finally{Pr=a,Pr===0&&(Yy(),Pu())}};fD=function(){!(Pr&49)&&(sye(),md())};NJ=function(t,e){var r=Pr;Pr|=2;try{return t(e)}finally{Pr=r,Pr===0&&(Yy(),Pu())}};function zX(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vw(e))throw Error(bt(200));return bye(t,e,null,r)}var Eye={Events:[gw,j0,R2,TJ,RJ,md,{current:!1}]},Vm={findFiberByHostInstance:bh,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},xye={bundleType:Vm.bundleType,version:Vm.version,rendererPackageName:Vm.rendererPackageName,rendererConfig:Vm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:bp.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=$J(t),t===null?null:t.stateNode},findFiberByHostInstance:Vm.findFiberByHostInstance||wye,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var G_=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!G_.isDisabled&&G_.supportsFiber)try{xD=G_.inject(xye),Qh=G_}catch{}}Ks.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Eye;Ks.createPortal=zX;Ks.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(bt(188)):Error(bt(268,Object.keys(t)));return t=$J(e),t=t===null?null:t.stateNode,t};Ks.flushSync=function(t,e){var r=Pr;if(r&48)return t(e);Pr|=1;try{if(t)return ap(99,t.bind(null,e))}finally{Pr=r,Pu()}};Ks.hydrate=function(t,e,r){if(!vw(e))throw Error(bt(200));return M2(null,t,e,!0,r)};Ks.render=function(t,e,r){if(!vw(e))throw Error(bt(200));return M2(null,t,e,!1,r)};Ks.unmountComponentAtNode=function(t){if(!vw(t))throw Error(bt(40));return t._reactRootContainer?(UX(function(){M2(null,null,t,!1,function(){t._reactRootContainer=null,t[Gy]=null})}),!0):!1};Ks.unstable_batchedUpdates=LX;Ks.unstable_createPortal=function(t,e){return zX(t,e,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Ks.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!vw(r))throw Error(bt(200));if(t==null||t._reactInternals===void 0)throw Error(bt(38));return M2(t,e,r,!1,n)};Ks.version="17.0.2";function GX(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(GX)}catch(t){console.error(t)}}GX(),yJ.exports=Ks;var v1=yJ.exports;const Aye=kc(v1);/**
|
|
42
|
-
* @remix-run/router v1.10.0
|
|
43
|
-
*
|
|
44
|
-
* Copyright (c) Remix Software Inc.
|
|
45
|
-
*
|
|
46
|
-
* This source code is licensed under the MIT license found in the
|
|
47
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
48
|
-
*
|
|
49
|
-
* @license MIT
|
|
50
|
-
*/function b1(){return b1=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},b1.apply(this,arguments)}var Vf;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Vf||(Vf={}));const qU="popstate";function Sye(t){t===void 0&&(t={});function e(n,i){let{pathname:a,search:o,hash:s}=n.location;return J6("",{pathname:a,search:o,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:WX(i)}return Oye(e,r,null,t)}function ji(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function VD(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Iye(){return Math.random().toString(36).substr(2,8)}function HU(t,e){return{usr:t.state,key:t.key,idx:e}}function J6(t,e,r,n){return r===void 0&&(r=null),b1({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Qy(e):e,{state:r,key:e&&e.key||n||Iye()})}function WX(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Qy(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function Oye(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Vf.Pop,c=null,u=f();u==null&&(u=0,o.replaceState(b1({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function d(){s=Vf.Pop;let y=f(),_=y==null?null:y-u;u=y,c&&c({action:s,location:v.location,delta:_})}function g(y,_){s=Vf.Push;let b=J6(v.location,y,_);r&&r(b,y),u=f()+1;let S=HU(b,u),x=v.createHref(b);try{o.pushState(S,"",x)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;i.location.assign(x)}a&&c&&c({action:s,location:v.location,delta:1})}function m(y,_){s=Vf.Replace;let b=J6(v.location,y,_);r&&r(b,y),u=f();let S=HU(b,u),x=v.createHref(b);o.replaceState(S,"",x),a&&c&&c({action:s,location:v.location,delta:0})}function w(y){let _=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:WX(y);return ji(_,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,_)}let v={get action(){return s},get location(){return t(i,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(qU,d),c=y,()=>{i.removeEventListener(qU,d),c=null}},createHref(y){return e(i,y)},createURL:w,encodeLocation(y){let _=w(y);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:g,replace:m,go(y){return o.go(y)}};return v}var VU;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(VU||(VU={}));function Pye(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?Qy(e):e,i=QX(n.pathname||"/",r);if(i==null)return null;let a=KX(t);Tye(a);let o=null;for(let s=0;o==null&&s<a.length;++s)o=Uye(a[s],jye(i));return o}function KX(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,o,s)=>{let c={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(ji(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=Jh([n,c.relativePath]),f=r.concat(c);a.children&&a.children.length>0&&(ji(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),KX(a.children,e,f,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:kye(u,a.index),routesMeta:f})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let c of YX(a.path))i(a,o,c)}),e}function YX(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=YX(n.join("/")),s=[];return s.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&s.push(...o),s.map(c=>t.startsWith("/")&&c===""?"/":c)}function Tye(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Lye(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Rye=/^:\w+$/,Cye=3,Nye=2,Dye=1,$ye=10,Mye=-2,zU=t=>t==="*";function kye(t,e){let r=t.split("/"),n=r.length;return r.some(zU)&&(n+=Mye),e&&(n+=Nye),r.filter(i=>!zU(i)).reduce((i,a)=>i+(Rye.test(a)?Cye:a===""?Dye:$ye),n)}function Lye(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function Uye(t,e){let{routesMeta:r}=t,n={},i="/",a=[];for(let o=0;o<r.length;++o){let s=r[o],c=o===r.length-1,u=i==="/"?e:e.slice(i.length)||"/",f=Bye({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},u);if(!f)return null;Object.assign(n,f.params);let d=s.route;a.push({params:n,pathname:Jh([i,f.pathname]),pathnameBase:Wye(Jh([i,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(i=Jh([i,f.pathnameBase]))}return a}function Bye(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=Fye(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((u,f,d)=>{if(f==="*"){let g=s[d]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}return u[f]=qye(s[d]||"",f),u},{}),pathname:a,pathnameBase:o,pattern:t}}function Fye(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),VD(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,s)=>(n.push(s),"/([^\\/]+)"));return t.endsWith("*")?(n.push("*"),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function jye(t){try{return decodeURI(t)}catch(e){return VD(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function qye(t,e){try{return decodeURIComponent(t)}catch(r){return VD(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),t}}function QX(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Hye(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Qy(t):t;return{pathname:r?r.startsWith("/")?r:Vye(r,e):e,search:Kye(n),hash:Yye(i)}}function Vye(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function sP(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function zye(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Gye(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Qy(t):(i=b1({},t),ji(!i.pathname||!i.pathname.includes("?"),sP("?","pathname","search",i)),ji(!i.pathname||!i.pathname.includes("#"),sP("#","pathname","hash",i)),ji(!i.search||!i.search.includes("#"),sP("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(n||o==null)s=r;else{let d=e.length-1;if(o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),d-=1;i.pathname=g.join("/")}s=d>=0?e[d]:"/"}let c=Hye(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const Jh=t=>t.join("/").replace(/\/\/+/g,"/"),Wye=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Kye=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Yye=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Qye(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const JX=["post","put","patch","delete"];new Set(JX);const Jye=["get",...JX];new Set(Jye);/**
|
|
51
|
-
* React Router v6.17.0
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Remix Software Inc.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
-
*
|
|
58
|
-
* @license MIT
|
|
59
|
-
*/function dA(){return dA=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},dA.apply(this,arguments)}const zD=Be.createContext(null),Xye=Be.createContext(null),k2=Be.createContext(null),L2=Be.createContext(null),Ep=Be.createContext({outlet:null,matches:[],isDataRoute:!1}),XX=Be.createContext(null);function U2(){return Be.useContext(L2)!=null}function bw(){return U2()||ji(!1),Be.useContext(L2).location}function ZX(t){Be.useContext(k2).static||Be.useLayoutEffect(t)}function B2(){let{isDataRoute:t}=Be.useContext(Ep);return t?dme():Zye()}function Zye(){U2()||ji(!1);let t=Be.useContext(zD),{basename:e,navigator:r}=Be.useContext(k2),{matches:n}=Be.useContext(Ep),{pathname:i}=bw(),a=JSON.stringify(zye(n).map(c=>c.pathnameBase)),o=Be.useRef(!1);return ZX(()=>{o.current=!0}),Be.useCallback(function(c,u){if(u===void 0&&(u={}),!o.current)return;if(typeof c=="number"){r.go(c);return}let f=Gye(c,JSON.parse(a),i,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Jh([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,a,i,t])}function eme(){let{matches:t}=Be.useContext(Ep),e=t[t.length-1];return e?e.params:{}}function tme(t,e){return rme(t,e)}function rme(t,e,r){U2()||ji(!1);let{navigator:n}=Be.useContext(k2),{matches:i}=Be.useContext(Ep),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let c=bw(),u;if(e){var f;let v=typeof e=="string"?Qy(e):e;s==="/"||(f=v.pathname)!=null&&f.startsWith(s)||ji(!1),u=v}else u=c;let d=u.pathname||"/",g=s==="/"?d:d.slice(s.length)||"/",m=Pye(t,{pathname:g}),w=sme(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},o,v.params),pathname:Jh([s,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:Jh([s,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,r);return e&&w?Be.createElement(L2.Provider,{value:{location:dA({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Vf.Pop}},w):w}function nme(){let t=fme(),e=Qye(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return Be.createElement(Be.Fragment,null,Be.createElement("h2",null,"Unexpected Application Error!"),Be.createElement("h3",{style:{fontStyle:"italic"}},e),r?Be.createElement("pre",{style:i},r):null,a)}const ime=Be.createElement(nme,null);class ame extends Be.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error?Be.createElement(Ep.Provider,{value:this.props.routeContext},Be.createElement(XX.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ome(t){let{routeContext:e,match:r,children:n}=t,i=Be.useContext(zD);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),Be.createElement(Ep.Provider,{value:e},n)}function sme(t,e,r){var n;if(e===void 0&&(e=[]),r===void 0&&(r=null),t==null){var i;if((i=r)!=null&&i.errors)t=r.matches;else return null}let a=t,o=(n=r)==null?void 0:n.errors;if(o!=null){let s=a.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id]));s>=0||ji(!1),a=a.slice(0,Math.min(a.length,s+1))}return a.reduceRight((s,c,u)=>{let f=c.route.id?o==null?void 0:o[c.route.id]:null,d=null;r&&(d=c.route.errorElement||ime);let g=e.concat(a.slice(0,u+1)),m=()=>{let w;return f?w=d:c.route.Component?w=Be.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=s,Be.createElement(ome,{match:c,routeContext:{outlet:s,matches:g,isDataRoute:r!=null},children:w})};return r&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?Be.createElement(ame,{location:r.location,revalidation:r.revalidation,component:d,error:f,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var eZ=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(eZ||{}),hA=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(hA||{});function cme(t){let e=Be.useContext(zD);return e||ji(!1),e}function ume(t){let e=Be.useContext(Xye);return e||ji(!1),e}function lme(t){let e=Be.useContext(Ep);return e||ji(!1),e}function tZ(t){let e=lme(),r=e.matches[e.matches.length-1];return r.route.id||ji(!1),r.route.id}function fme(){var t;let e=Be.useContext(XX),r=ume(hA.UseRouteError),n=tZ(hA.UseRouteError);return e||((t=r.errors)==null?void 0:t[n])}function dme(){let{router:t}=cme(eZ.UseNavigateStable),e=tZ(hA.UseNavigateStable),r=Be.useRef(!1);return ZX(()=>{r.current=!0}),Be.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,dA({fromRouteId:e},a)))},[t,e])}function O0(t){ji(!1)}function hme(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Vf.Pop,navigator:a,static:o=!1}=t;U2()&&ji(!1);let s=e.replace(/^\/*/,"/"),c=Be.useMemo(()=>({basename:s,navigator:a,static:o}),[s,a,o]);typeof n=="string"&&(n=Qy(n));let{pathname:u="/",search:f="",hash:d="",state:g=null,key:m="default"}=n,w=Be.useMemo(()=>{let v=QX(u,s);return v==null?null:{location:{pathname:v,search:f,hash:d,state:g,key:m},navigationType:i}},[s,u,f,d,g,m,i]);return w==null?null:Be.createElement(k2.Provider,{value:c},Be.createElement(L2.Provider,{children:r,value:w}))}function pme(t){let{children:e,location:r}=t;return tme(X6(e),r)}new Promise(()=>{});function X6(t,e){e===void 0&&(e=[]);let r=[];return Be.Children.forEach(t,(n,i)=>{if(!Be.isValidElement(n))return;let a=[...e,i];if(n.type===Be.Fragment){r.push.apply(r,X6(n.props.children,a));return}n.type!==O0&&ji(!1),!n.props.index||!n.props.children||ji(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=X6(n.props.children,a)),r.push(o)}),r}/**
|
|
60
|
-
* React Router DOM v6.17.0
|
|
61
|
-
*
|
|
62
|
-
* Copyright (c) Remix Software Inc.
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the MIT license found in the
|
|
65
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
66
|
-
*
|
|
67
|
-
* @license MIT
|
|
68
|
-
*/function Z6(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,r)=>{let n=t[r];return e.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function gme(t,e){let r=Z6(t);return e&&e.forEach((n,i)=>{r.has(i)||e.getAll(i).forEach(a=>{r.append(i,a)})}),r}const yme="startTransition",GU=A0e[yme];function mme(t){let{basename:e,children:r,future:n,window:i}=t,a=Be.useRef();a.current==null&&(a.current=Sye({window:i,v5Compat:!0}));let o=a.current,[s,c]=Be.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},f=Be.useCallback(d=>{u&&GU?GU(()=>c(d)):c(d)},[c,u]);return Be.useLayoutEffect(()=>o.listen(f),[o,f]),Be.createElement(hme,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o})}var WU;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(WU||(WU={}));var KU;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(KU||(KU={}));function vme(t){let e=Be.useRef(Z6(t)),r=Be.useRef(!1),n=bw(),i=Be.useMemo(()=>gme(n.search,r.current?null:e.current),[n.search]),a=B2(),o=Be.useCallback((s,c)=>{const u=Z6(typeof s=="function"?s(i):s);r.current=!0,a("?"+u,c)},[a,i]);return[i,o]}const rZ="6.8.0";function bme(t,e,r){const n=e.split("|").map(a=>a.trim());for(let a=0;a<n.length;a++)switch(e){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof t===e)return}const i=new Error(`invalid value for type ${e}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${r}`,i.value=t,i}async function Na(t){const e=Object.keys(t);return(await Promise.all(e.map(n=>Promise.resolve(t[n])))).reduce((n,i,a)=>(n[e[a]]=i,n),{})}function Zt(t,e,r){for(let n in e){let i=e[n];const a=r?r[n]:null;a&&bme(i,a,n),Object.defineProperty(t,n,{enumerable:!0,value:i,writable:!1})}}function V0(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(V0).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let n=0;n<t.length;n++)r+=e[t[n]>>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return V0(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${V0(r)}: ${V0(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Us(t,e){return t&&t.code===e}function GD(t){return Us(t,"CALL_EXCEPTION")}function Bi(t,e,r){let n=t;{const a=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${V0(r)}`);for(const o in r){if(o==="shortMessage")continue;const s=r[o];a.push(o+"="+V0(s))}}a.push(`code=${e}`),a.push(`version=${rZ}`),a.length&&(t+=" ("+a.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(t);break;default:i=new Error(t)}return Zt(i,{code:e}),r&&Object.assign(i,r),i.shortMessage==null&&Zt(i,{shortMessage:n}),i}function ct(t,e,r,n){if(!t)throw Bi(e,r,n)}function $e(t,e,r,n){ct(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function nZ(t,e,r){r==null&&(r=""),r&&(r=": "+r),ct(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),ct(t<=e,"too many arguemnts"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const wme=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"){const r=String.fromCharCode(233).normalize("NFD"),n=String.fromCharCode(101,769);if(r!==n)throw new Error("broken")}t.push(e)}catch{}return t},[]);function iZ(t){ct(wme.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function xp(t,e,r){if(r==null&&(r=""),t!==e){let n=r,i="new";r&&(n+=".",i+=" "+r),ct(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function aZ(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x([0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((t.length-2)/2);let i=2;for(let a=0;a<n.length;a++)n[a]=parseInt(t.substring(i,i+2),16),i+=2;return n}$e(!1,"invalid BytesLike value",e||"value",t)}function Gt(t,e){return aZ(t,e,!1)}function Fa(t,e){return aZ(t,e,!0)}function di(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&t.length!==2+2*e||e===!0&&t.length%2!==0)}function oZ(t){return di(t,!0)||t instanceof Uint8Array}const YU="0123456789abcdef";function xt(t){const e=Gt(t);let r="0x";for(let n=0;n<e.length;n++){const i=e[n];r+=YU[(i&240)>>4]+YU[i&15]}return r}function Gn(t){return"0x"+t.map(e=>xt(e).substring(2)).join("")}function dg(t){return di(t,!0)?(t.length-2)/2:Gt(t).length}function Qn(t,e,r){const n=Gt(t);return r!=null&&r>n.length&&ct(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),xt(n.slice(e??0,r??n.length))}function sZ(t,e,r){const n=Gt(t);ct(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),r?i.set(n,e-n.length):i.set(n,0),xt(i)}function sp(t,e){return sZ(t,e,!0)}function _me(t,e){return sZ(t,e,!1)}const F2=BigInt(0),Ac=BigInt(1),z0=9007199254740991;function Eme(t,e){const r=j2(t,"value"),n=BigInt(Gr(e,"width"));if(ct(r>>n===F2,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Ac){const i=(Ac<<n)-Ac;return-((~r&i)+Ac)}return r}function cZ(t,e){let r=or(t,"value");const n=BigInt(Gr(e,"width")),i=Ac<<n-Ac;if(r<F2){r=-r,ct(r<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});const a=(Ac<<n)-Ac;return(~r&a)+Ac}else ct(r<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});return r}function cb(t,e){const r=j2(t,"value"),n=BigInt(Gr(e,"bits"));return r&(Ac<<n)-Ac}function or(t,e){switch(typeof t){case"bigint":return t;case"number":return $e(Number.isInteger(t),"underflow",e||"value",t),$e(t>=-z0&&t<=z0,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){$e(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}$e(!1,"invalid BigNumberish value",e||"value",t)}function j2(t,e){const r=or(t,e);return ct(r>=F2,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const QU="0123456789abcdef";function q2(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=QU[r>>4],e+=QU[r&15];return BigInt(e)}return or(t)}function Gr(t,e){switch(typeof t){case"bigint":return $e(t>=-z0&&t<=z0,"overflow",e||"value",t),Number(t);case"number":return $e(Number.isInteger(t),"underflow",e||"value",t),$e(t>=-z0&&t<=z0,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return Gr(BigInt(t),e)}catch(r){$e(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}$e(!1,"invalid numeric value",e||"value",t)}function xme(t){return Gr(q2(t))}function Dl(t,e){let n=j2(t,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const i=Gr(e,"width");for(ct(i*2>=n.length,`value exceeds width (${i} bits)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});n.length<i*2;)n="0"+n}return"0x"+n}function Co(t){const e=j2(t,"value");if(e===F2)return new Uint8Array([]);let r=e.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let i=0;i<n.length;i++){const a=i*2;n[i]=parseInt(r.substring(a,a+2),16)}return n}function G0(t){let e=xt(oZ(t)?t:Co(t)).substring(2);for(;e.startsWith("0");)e=e.substring(1);return e===""&&(e="0"),"0x"+e}const e8="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let W_=null;function Ame(t){if(W_==null){W_={};for(let r=0;r<e8.length;r++)W_[e8[r]]=BigInt(r)}const e=W_[t];return $e(e!=null,"invalid base58 value","letter",t),e}const Sme=BigInt(0),t8=BigInt(58);function uZ(t){let e=q2(Gt(t)),r="";for(;e;)r=e8[Number(e%t8)]+r,e/=t8;return r}function Ime(t){let e=Sme;for(let r=0;r<t.length;r++)e*=t8,e+=Ame(t[r]);return e}function Ome(t){t=atob(t);const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return Gt(e)}function Pme(t){const e=Gt(t);let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}var Ig;class lZ{constructor(e,r,n){He(this,"filter");He(this,"emitter");Ze(this,Ig,void 0);Te(this,Ig,r),Zt(this,{emitter:e,filter:n})}async removeListener(){Y(this,Ig)!=null&&await this.emitter.off(this.filter,Y(this,Ig))}}Ig=new WeakMap;function Tme(t,e,r,n,i){$e(!1,`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function fZ(t,e,r,n,i){if(t==="BAD_PREFIX"||t==="UNEXPECTED_CONTINUE"){let a=0;for(let o=e+1;o<r.length&&r[o]>>6===2;o++)a++;return a}return t==="OVERRUN"?r.length-e-1:0}function Rme(t,e,r,n,i){return t==="OVERLONG"?($e(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),fZ(t,e,r))}const Cme=Object.freeze({error:Tme,ignore:fZ,replace:Rme});function Nme(t,e){e==null&&(e=Cme.error);const r=Gt(t,"bytes"),n=[];let i=0;for(;i<r.length;){const a=r[i++];if(!(a>>7)){n.push(a);continue}let o=null,s=null;if((a&224)===192)o=1,s=127;else if((a&240)===224)o=2,s=2047;else if((a&248)===240)o=3,s=65535;else{(a&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,r,n):i+=e("BAD_PREFIX",i-1,r,n);continue}if(i-1+o>=r.length){i+=e("OVERRUN",i-1,r,n);continue}let c=a&(1<<8-o-1)-1;for(let u=0;u<o;u++){let f=r[i];if((f&192)!=128){i+=e("MISSING_CONTINUE",i,r,n),c=null;break}c=c<<6|f&63,i++}if(c!==null){if(c>1114111){i+=e("OUT_OF_RANGE",i-1-o,r,n,c);continue}if(c>=55296&&c<=57343){i+=e("UTF16_SURROGATE",i-1-o,r,n,c);continue}if(c<=s){i+=e("OVERLONG",i-1-o,r,n,c);continue}n.push(c)}}return n}function so(t,e){e!=null&&(iZ(e),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);if(i<128)r.push(i);else if(i<2048)r.push(i>>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const a=t.charCodeAt(n);$e(n<t.length&&(a&64512)===56320,"invalid surrogate pair","str",t);const o=65536+((i&1023)<<10)+(a&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return new Uint8Array(r)}function Dme(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function WD(t,e){return Dme(Nme(t,e))}function dZ(t){async function e(r,n){const i=r.url.split(":")[0].toLowerCase();ct(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),ct(i==="https"||!r.credentials||r.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let a;if(n){const d=new AbortController;a=d.signal,n.addListener(()=>{d.abort()})}const o={method:r.method,headers:new Headers(Array.from(r)),body:r.body||void 0,signal:a},s=await fetch(r.url,o),c={};s.headers.forEach((d,g)=>{c[g.toLowerCase()]=d});const u=await s.arrayBuffer(),f=u==null?null:new Uint8Array(u);return{statusCode:s.status,statusMessage:s.statusText,headers:c,body:f}}return e}const $me=12,Mme=250;let JU=dZ();const kme=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Lme=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let cP=!1;async function hZ(t,e){try{const r=t.match(kme);if(!r)throw new Error("invalid data");return new nd(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?Ome(r[3]):Bme(r[3]))}catch{return new nd(599,"BAD REQUEST (invalid data: URI)",{},null,new fd(t))}}function pZ(t){async function e(r,n){try{const i=r.match(Lme);if(!i)throw new Error("invalid link");return new fd(`${t}${i[2]}`)}catch{return new nd(599,"BAD REQUEST (invalid IPFS URI)",{},null,new fd(r))}}return e}const K_={data:hZ,ipfs:pZ("https://gateway.ipfs.io/ipfs/")},gZ=new WeakMap;var Th,If;class Ume{constructor(e){Ze(this,Th,void 0);Ze(this,If,void 0);Te(this,Th,[]),Te(this,If,!1),gZ.set(e,()=>{if(!Y(this,If)){Te(this,If,!0);for(const r of Y(this,Th))setTimeout(()=>{r()},0);Te(this,Th,[])}})}addListener(e){ct(!Y(this,If),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),Y(this,Th).push(e)}get cancelled(){return Y(this,If)}checkSignal(){ct(!this.cancelled,"cancelled","CANCELLED",{})}}Th=new WeakMap,If=new WeakMap;function Y_(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var Og,Pg,mc,il,Tg,Rg,Ki,Yo,al,Rh,Ch,Nh,tu,ol,Of,Dh,ub;const p2=class p2{constructor(e){Ze(this,Dh);Ze(this,Og,void 0);Ze(this,Pg,void 0);Ze(this,mc,void 0);Ze(this,il,void 0);Ze(this,Tg,void 0);Ze(this,Rg,void 0);Ze(this,Ki,void 0);Ze(this,Yo,void 0);Ze(this,al,void 0);Ze(this,Rh,void 0);Ze(this,Ch,void 0);Ze(this,Nh,void 0);Ze(this,tu,void 0);Ze(this,ol,void 0);Ze(this,Of,void 0);Te(this,Rg,String(e)),Te(this,Og,!1),Te(this,Pg,!0),Te(this,mc,{}),Te(this,il,""),Te(this,Tg,3e5),Te(this,ol,{slotInterval:Mme,maxAttempts:$me}),Te(this,Of,null)}get url(){return Y(this,Rg)}set url(e){Te(this,Rg,String(e))}get body(){return Y(this,Ki)==null?null:new Uint8Array(Y(this,Ki))}set body(e){if(e==null)Te(this,Ki,void 0),Te(this,Yo,void 0);else if(typeof e=="string")Te(this,Ki,so(e)),Te(this,Yo,"text/plain");else if(e instanceof Uint8Array)Te(this,Ki,e),Te(this,Yo,"application/octet-stream");else if(typeof e=="object")Te(this,Ki,so(JSON.stringify(e))),Te(this,Yo,"application/json");else throw new Error("invalid body")}hasBody(){return Y(this,Ki)!=null}get method(){return Y(this,il)?Y(this,il):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),Te(this,il,String(e).toUpperCase())}get headers(){const e=Object.assign({},Y(this,mc));return Y(this,al)&&(e.authorization=`Basic ${Pme(so(Y(this,al)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&Y(this,Yo)&&(e["content-type"]=Y(this,Yo)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){Y(this,mc)[String(e).toLowerCase()]=String(r)}clearHeaders(){Te(this,mc,{})}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n<r.length){const i=r[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return Y(this,al)||null}setCredentials(e,r){$e(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),Te(this,al,`${e}:${r}`)}get allowGzip(){return Y(this,Pg)}set allowGzip(e){Te(this,Pg,!!e)}get allowInsecureAuthentication(){return!!Y(this,Og)}set allowInsecureAuthentication(e){Te(this,Og,!!e)}get timeout(){return Y(this,Tg)}set timeout(e){$e(e>=0,"timeout must be non-zero","timeout",e),Te(this,Tg,e)}get preflightFunc(){return Y(this,Rh)||null}set preflightFunc(e){Te(this,Rh,e)}get processFunc(){return Y(this,Ch)||null}set processFunc(e){Te(this,Ch,e)}get retryFunc(){return Y(this,Nh)||null}set retryFunc(e){Te(this,Nh,e)}get getUrlFunc(){return Y(this,Of)||JU}set getUrlFunc(e){Te(this,Of,e)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${Y(this,Ki)?xt(Y(this,Ki)):"null"}>`}setThrottleParams(e){e.slotInterval!=null&&(Y(this,ol).slotInterval=e.slotInterval),e.maxAttempts!=null&&(Y(this,ol).maxAttempts=e.maxAttempts)}send(){return ct(Y(this,tu)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),Te(this,tu,new Ume(this)),Et(this,Dh,ub).call(this,0,XU()+this.timeout,0,this,new nd(0,"",{},null,this))}cancel(){ct(Y(this,tu)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=gZ.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();ct(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new p2(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,Te(i,mc,Object.assign({},Y(this,mc))),Y(this,Ki)&&Te(i,Ki,new Uint8Array(Y(this,Ki))),Te(i,Yo,Y(this,Yo)),i}clone(){const e=new p2(this.url);return Te(e,il,Y(this,il)),Y(this,Ki)&&Te(e,Ki,Y(this,Ki)),Te(e,Yo,Y(this,Yo)),Te(e,mc,Object.assign({},Y(this,mc))),Te(e,al,Y(this,al)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),Te(e,Rh,Y(this,Rh)),Te(e,Ch,Y(this,Ch)),Te(e,Nh,Y(this,Nh)),Te(e,Of,Y(this,Of)),e}static lockConfig(){cP=!0}static getGateway(e){return K_[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(cP)throw new Error("gateways locked");K_[e]=r}static registerGetUrl(e){if(cP)throw new Error("gateways locked");JU=e}static createGetUrlFunc(e){return dZ()}static createDataGateway(){return hZ}static createIpfsGatewayFunc(e){return pZ(e)}};Og=new WeakMap,Pg=new WeakMap,mc=new WeakMap,il=new WeakMap,Tg=new WeakMap,Rg=new WeakMap,Ki=new WeakMap,Yo=new WeakMap,al=new WeakMap,Rh=new WeakMap,Ch=new WeakMap,Nh=new WeakMap,tu=new WeakMap,ol=new WeakMap,Of=new WeakMap,Dh=new WeakSet,ub=async function(e,r,n,i,a){var f,d,g;if(e>=Y(this,ol).maxAttempts)return a.makeServerError("exceeded maximum retry limit");ct(XU()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await Fme(n);let o=this.clone();const s=(o.url.split(":")[0]||"").toLowerCase();if(s in K_){const m=await K_[s](o.url,Y_(Y(i,tu)));if(m instanceof nd){let w=m;if(this.processFunc){Y_(Y(i,tu));try{w=await this.processFunc(o,w)}catch(v){(v.throttle==null||typeof v.stall!="number")&&w.makeServerError("error in post-processing function",v).assertOk()}}return w}o=m}this.preflightFunc&&(o=await this.preflightFunc(o));const c=await this.getUrlFunc(o,Y_(Y(i,tu)));let u=new nd(c.statusCode,c.statusMessage,c.headers,c.body,i);if(u.statusCode===301||u.statusCode===302){try{const m=u.headers.location||"";return Et(f=o.redirect(m),Dh,ub).call(f,e+1,r,0,i,u)}catch{}return u}else if(u.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,u,e))){const m=u.headers["retry-after"];let w=Y(this,ol).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof m=="string"&&m.match(/^[1-9][0-9]*$/)&&(w=parseInt(m)),Et(d=o.clone(),Dh,ub).call(d,e+1,r,w,i,u)}if(this.processFunc){Y_(Y(i,tu));try{u=await this.processFunc(o,u)}catch(m){(m.throttle==null||typeof m.stall!="number")&&u.makeServerError("error in post-processing function",m).assertOk();let w=Y(this,ol).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return m.stall>=0&&(w=m.stall),Et(g=o.clone(),Dh,ub).call(g,e+1,r,w,i,u)}}return u};let fd=p2;var z1,G1,W1,vc,Cg,$h;const RL=class RL{constructor(e,r,n,i,a){Ze(this,z1,void 0);Ze(this,G1,void 0);Ze(this,W1,void 0);Ze(this,vc,void 0);Ze(this,Cg,void 0);Ze(this,$h,void 0);Te(this,z1,e),Te(this,G1,r),Te(this,W1,Object.keys(n).reduce((o,s)=>(o[s.toLowerCase()]=String(n[s]),o),{})),Te(this,vc,i==null?null:new Uint8Array(i)),Te(this,Cg,a||null),Te(this,$h,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${Y(this,vc)?xt(Y(this,vc)):"null"}>`}get statusCode(){return Y(this,z1)}get statusMessage(){return Y(this,G1)}get headers(){return Object.assign({},Y(this,W1))}get body(){return Y(this,vc)==null?null:new Uint8Array(Y(this,vc))}get bodyText(){try{return Y(this,vc)==null?"":WD(Y(this,vc))}catch{ct(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{ct(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n<r.length){const i=r[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}makeServerError(e,r){let n;e?n=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:(e=`${this.statusCode} ${this.statusMessage}`,n=`CLIENT ESCALATED SERVER ERROR (${e})`);const i=new RL(599,n,this.headers,this.body,Y(this,Cg)||void 0);return Te(i,$h,{message:e,error:r}),i}throwThrottleError(e,r){r==null?r=-1:$e(Number.isInteger(r)&&r>=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw Zt(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return Y(this,vc)!=null}get request(){return Y(this,Cg)}ok(){return Y(this,$h).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=Y(this,$h);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`),ct(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r})}};z1=new WeakMap,G1=new WeakMap,W1=new WeakMap,vc=new WeakMap,Cg=new WeakMap,$h=new WeakMap;let nd=RL;function XU(){return new Date().getTime()}function Bme(t){return so(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function Fme(t){return new Promise(e=>setTimeout(e,t))}function jme(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function ZU(t,e,r){let n=0;for(let i=0;i<r;i++)n=n*256+t[e+i];return n}function eB(t,e,r,n){const i=[];for(;r<e+1+n;){const a=yZ(t,r);i.push(a.result),r+=a.consumed,ct(r<=e+1+n,"child data too short","BUFFER_OVERRUN",{buffer:t,length:n,offset:e})}return{consumed:1+n,result:i}}function yZ(t,e){ct(t.length!==0,"data too short","BUFFER_OVERRUN",{buffer:t,length:0,offset:1});const r=n=>{ct(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){const n=t[e]-247;r(e+1+n);const i=ZU(t,e+1,n);return r(e+1+n+i),eB(t,e,e+1+n,n+i)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),eB(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const i=ZU(t,e+1,n);r(e+1+n+i);const a=xt(t.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:a}}else if(t[e]>=128){const n=t[e]-128;r(e+1+n);const i=xt(t.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:jme(t[e])}}function KD(t){const e=Gt(t,"data"),r=yZ(e,0);return $e(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function tB(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function mZ(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(a){n=n.concat(mZ(a))}),n.length<=55)return n.unshift(192+n.length),n;const i=tB(n.length);return i.unshift(247+i.length),i.concat(n)}const e=Array.prototype.slice.call(Gt(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=tB(e.length);return r.unshift(183+r.length),r.concat(e)}const rB="0123456789abcdef";function w1(t){let e="0x";for(const r of mZ(t))e+=rB[r>>4],e+=rB[r&15];return e}function qme(t){const e=Gt(t,"randomBytes");e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=xt(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const io=32,r8=new Uint8Array(io),Hme=["then"],Q_={};function zm(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}var Pf;const r1=class r1 extends Array{constructor(...r){const n=r[0];let i=r[1],a=(r[2]||[]).slice(),o=!0;n!==Q_&&(i=r,a=[],o=!1);super(i.length);Ze(this,Pf,void 0);i.forEach((c,u)=>{this[u]=c});const s=a.reduce((c,u)=>(typeof u=="string"&&c.set(u,(c.get(u)||0)+1),c),new Map);if(Te(this,Pf,Object.freeze(i.map((c,u)=>{const f=a[u];return f!=null&&s.get(f)===1?f:null}))),!!o)return Object.freeze(this),new Proxy(this,{get:(c,u,f)=>{if(typeof u=="string"){if(u.match(/^[0-9]+$/)){const g=Gr(u,"%index");if(g<0||g>=this.length)throw new RangeError("out of result range");const m=c[g];return m instanceof Error&&zm(`index ${g}`,m),m}if(Hme.indexOf(u)>=0)return Reflect.get(c,u,f);const d=c[u];if(d instanceof Function)return function(...g){return d.apply(this===f?c:this,g)};if(!(u in c))return c.getValue.apply(this===f?c:this,[u])}return Reflect.get(c,u,f)}})}toArray(){const r=[];return this.forEach((n,i)=>{n instanceof Error&&zm(`index ${i}`,n),r.push(n)}),r}toObject(){return Y(this,Pf).reduce((r,n,i)=>(ct(n!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),n in r||(r[n]=this.getValue(n)),r),{})}slice(r,n){r==null&&(r=0),r<0&&(r+=this.length,r<0&&(r=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const i=[],a=[];for(let o=r;o<n;o++)i.push(this[o]),a.push(Y(this,Pf)[o]);return new r1(Q_,i,a)}filter(r,n){const i=[],a=[];for(let o=0;o<this.length;o++){const s=this[o];s instanceof Error&&zm(`index ${o}`,s),r.call(n,s,o,this)&&(i.push(s),a.push(Y(this,Pf)[o]))}return new r1(Q_,i,a)}map(r,n){const i=[];for(let a=0;a<this.length;a++){const o=this[a];o instanceof Error&&zm(`index ${a}`,o),i.push(r.call(n,o,a,this))}return i}getValue(r){const n=Y(this,Pf).indexOf(r);if(n===-1)return;const i=this[n];return i instanceof Error&&zm(`property ${JSON.stringify(r)}`,i.error),i}static fromItems(r,n){return new r1(Q_,r,n)}};Pf=new WeakMap;let pA=r1;function nB(t){let e=Co(t);return ct(e.length<=io,"value out-of-bounds","BUFFER_OVERRUN",{buffer:e,length:io,offset:e.length}),e.length!==io&&(e=Fa(Gn([r8.slice(e.length%io),e]))),e}class Fl{constructor(e,r,n,i){He(this,"name");He(this,"type");He(this,"localName");He(this,"dynamic");Zt(this,{name:e,type:r,localName:n,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,r){$e(!1,e,this.localName,r)}}var sl,Mh,Ng,rx;class n8{constructor(){Ze(this,Ng);Ze(this,sl,void 0);Ze(this,Mh,void 0);Te(this,sl,[]),Te(this,Mh,0)}get data(){return Gn(Y(this,sl))}get length(){return Y(this,Mh)}appendWriter(e){return Et(this,Ng,rx).call(this,Fa(e.data))}writeBytes(e){let r=Fa(e);const n=r.length%io;return n&&(r=Fa(Gn([r,r8.slice(n)]))),Et(this,Ng,rx).call(this,r)}writeValue(e){return Et(this,Ng,rx).call(this,nB(e))}writeUpdatableValue(){const e=Y(this,sl).length;return Y(this,sl).push(r8),Te(this,Mh,Y(this,Mh)+io),r=>{Y(this,sl)[e]=nB(r)}}}sl=new WeakMap,Mh=new WeakMap,Ng=new WeakSet,rx=function(e){return Y(this,sl).push(e),Te(this,Mh,Y(this,Mh)+e.length),e.length};var Qo,Ps,g2,vZ;const CL=class CL{constructor(e,r){Ze(this,g2);He(this,"allowLoose");Ze(this,Qo,void 0);Ze(this,Ps,void 0);Zt(this,{allowLoose:!!r}),Te(this,Qo,Fa(e)),Te(this,Ps,0)}get data(){return xt(Y(this,Qo))}get dataLength(){return Y(this,Qo).length}get consumed(){return Y(this,Ps)}get bytes(){return new Uint8Array(Y(this,Qo))}subReader(e){return new CL(Y(this,Qo).slice(Y(this,Ps)+e),this.allowLoose)}readBytes(e,r){let n=Et(this,g2,vZ).call(this,0,e,!!r);return Te(this,Ps,Y(this,Ps)+n.length),n.slice(0,e)}readValue(){return q2(this.readBytes(io))}readIndex(){return xme(this.readBytes(io))}};Qo=new WeakMap,Ps=new WeakMap,g2=new WeakSet,vZ=function(e,r,n){let i=Math.ceil(r/io)*io;return Y(this,Ps)+i>Y(this,Qo).length&&(this.allowLoose&&n&&Y(this,Ps)+r<=Y(this,Qo).length?i=r:ct(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Fa(Y(this,Qo)),length:Y(this,Qo).length,offset:Y(this,Ps)+i})),Y(this,Qo).slice(Y(this,Ps),Y(this,Ps)+i)};let i8=CL;const bn=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{};function Xo(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function YD(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function bZ(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Xo(t.outputLen),Xo(t.blockLen)}function vy(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function wZ(t,e){YD(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const uP=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _Z=t=>t instanceof Uint8Array,nx=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),ix=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Gc=(t,e)=>t<<32-e|t>>>e,Vme=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Vme)throw new Error("Non little-endian hardware is not supported");const zme=async()=>{};async function iB(t,e,r){let n=Date.now();for(let i=0;i<t;i++){r(i);const a=Date.now()-n;a>=0&&a<e||(await zme(),n+=a)}}function Gme(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function by(t){if(typeof t=="string"&&(t=Gme(t)),!_Z(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function Wme(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!_Z(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class QD{clone(){return this._cloneInto()}}const Kme={}.toString;function EZ(t,e){if(e!==void 0&&Kme.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function H2(t){const e=n=>t().update(by(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Yme(t=32){if(uP&&typeof uP.getRandomValues=="function")return uP.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}let xZ=class extends QD{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,bZ(e);const n=by(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,a=new Uint8Array(i);a.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<a.length;o++)a[o]^=54;this.iHash.update(a),this.oHash=e.create();for(let o=0;o<a.length;o++)a[o]^=106;this.oHash.update(a),a.fill(0)}update(e){return vy(this),this.iHash.update(e),this}digestInto(e){vy(this),YD(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:i,destroyed:a,blockLen:o,outputLen:s}=this;return e=e,e.finished=i,e.destroyed=a,e.blockLen=o,e.outputLen=s,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const V2=(t,e,r)=>new xZ(t,e).update(r).digest();V2.create=(t,e)=>new xZ(t,e);function Qme(t,e,r,n){bZ(t);const i=EZ({dkLen:32,asyncTick:10},n),{c:a,dkLen:o,asyncTick:s}=i;if(Xo(a),Xo(o),Xo(s),a<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=by(e),u=by(r),f=new Uint8Array(o),d=V2.create(t,c),g=d._cloneInto().update(u);return{c:a,dkLen:o,asyncTick:s,DK:f,PRF:d,PRFSalt:g}}function Jme(t,e,r,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),i.fill(0),r}function JD(t,e,r,n){const{c:i,dkLen:a,DK:o,PRF:s,PRFSalt:c}=Qme(t,e,r,n);let u;const f=new Uint8Array(4),d=ix(f),g=new Uint8Array(s.outputLen);for(let m=1,w=0;w<a;m++,w+=s.outputLen){const v=o.subarray(w,w+s.outputLen);d.setInt32(0,m,!1),(u=c._cloneInto(u)).update(f).digestInto(g),v.set(g.subarray(0,v.length));for(let y=1;y<i;y++){s._cloneInto(u).update(g).digestInto(g);for(let _=0;_<v.length;_++)v[_]^=g[_]}}return Jme(s,c,o,u,g)}function Xme(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),a=BigInt(4294967295),o=Number(r>>i&a),s=Number(r&a),c=n?4:0,u=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+u,s,n)}let XD=class extends QD{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=ix(this.buffer)}update(e){vy(this);const{view:r,buffer:n,blockLen:i}=this;e=by(e);const a=e.length;for(let o=0;o<a;){const s=Math.min(i-this.pos,a-o);if(s===i){const c=ix(e);for(;i<=a-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){vy(this),wZ(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:a}=this;let{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;Xme(n,i-8,BigInt(this.length*8),a),this.process(n,0);const s=ix(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)s.setUint32(4*d,f[d],a)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:a,destroyed:o,pos:s}=this;return e.length=i,e.pos=s,e.finished=a,e.destroyed=o,i%r&&e.buffer.set(n),e}};const Zme=(t,e,r)=>t&e^~t&r,eve=(t,e,r)=>t&e^t&r^e&r,tve=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),sf=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),cf=new Uint32Array(64);let rve=class extends XD{constructor(){super(64,32,8,!1),this.A=sf[0]|0,this.B=sf[1]|0,this.C=sf[2]|0,this.D=sf[3]|0,this.E=sf[4]|0,this.F=sf[5]|0,this.G=sf[6]|0,this.H=sf[7]|0}get(){const{A:e,B:r,C:n,D:i,E:a,F:o,G:s,H:c}=this;return[e,r,n,i,a,o,s,c]}set(e,r,n,i,a,o,s,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=a|0,this.F=o|0,this.G=s|0,this.H=c|0}process(e,r){for(let d=0;d<16;d++,r+=4)cf[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const g=cf[d-15],m=cf[d-2],w=Gc(g,7)^Gc(g,18)^g>>>3,v=Gc(m,17)^Gc(m,19)^m>>>10;cf[d]=v+cf[d-7]+w+cf[d-16]|0}let{A:n,B:i,C:a,D:o,E:s,F:c,G:u,H:f}=this;for(let d=0;d<64;d++){const g=Gc(s,6)^Gc(s,11)^Gc(s,25),m=f+g+Zme(s,c,u)+tve[d]+cf[d]|0,v=(Gc(n,2)^Gc(n,13)^Gc(n,22))+eve(n,i,a)|0;f=u,u=c,c=s,s=o+m|0,o=a,a=i,i=n,n=m+v|0}n=n+this.A|0,i=i+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(n,i,a,o,s,c,u,f)}roundClean(){cf.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const Jy=H2(()=>new rve),J_=BigInt(2**32-1),a8=BigInt(32);function AZ(t,e=!1){return e?{h:Number(t&J_),l:Number(t>>a8&J_)}:{h:Number(t>>a8&J_)|0,l:Number(t&J_)|0}}function SZ(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:a,l:o}=AZ(t[i],e);[r[i],n[i]]=[a,o]}return[r,n]}const nve=(t,e)=>BigInt(t>>>0)<<a8|BigInt(e>>>0),ive=(t,e,r)=>t>>>r,ave=(t,e,r)=>t<<32-r|e>>>r,ove=(t,e,r)=>t>>>r|e<<32-r,sve=(t,e,r)=>t<<32-r|e>>>r,cve=(t,e,r)=>t<<64-r|e>>>r-32,uve=(t,e,r)=>t>>>r-32|e<<64-r,lve=(t,e)=>e,fve=(t,e)=>t,IZ=(t,e,r)=>t<<r|e>>>32-r,OZ=(t,e,r)=>e<<r|t>>>32-r,PZ=(t,e,r)=>e<<r-32|t>>>64-r,TZ=(t,e,r)=>t<<r-32|e>>>64-r;function dve(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const hve=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),pve=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,gve=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),yve=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,mve=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),vve=(t,e,r,n,i,a)=>e+r+n+i+a+(t/2**32|0)|0,bve={fromBig:AZ,split:SZ,toBig:nve,shrSH:ive,shrSL:ave,rotrSH:ove,rotrSL:sve,rotrBH:cve,rotrBL:uve,rotr32H:lve,rotr32L:fve,rotlSH:IZ,rotlSL:OZ,rotlBH:PZ,rotlBL:TZ,add:dve,add3L:hve,add3H:pve,add4L:gve,add4H:yve,add5H:vve,add5L:mve},Vr=bve,[wve,_ve]=(()=>Vr.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))))(),uf=new Uint32Array(80),lf=new Uint32Array(80);class Eve extends XD{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:a,Cl:o,Dh:s,Dl:c,Eh:u,El:f,Fh:d,Fl:g,Gh:m,Gl:w,Hh:v,Hl:y}=this;return[e,r,n,i,a,o,s,c,u,f,d,g,m,w,v,y]}set(e,r,n,i,a,o,s,c,u,f,d,g,m,w,v,y){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=a|0,this.Cl=o|0,this.Dh=s|0,this.Dl=c|0,this.Eh=u|0,this.El=f|0,this.Fh=d|0,this.Fl=g|0,this.Gh=m|0,this.Gl=w|0,this.Hh=v|0,this.Hl=y|0}process(e,r){for(let S=0;S<16;S++,r+=4)uf[S]=e.getUint32(r),lf[S]=e.getUint32(r+=4);for(let S=16;S<80;S++){const x=uf[S-15]|0,I=lf[S-15]|0,E=Vr.rotrSH(x,I,1)^Vr.rotrSH(x,I,8)^Vr.shrSH(x,I,7),p=Vr.rotrSL(x,I,1)^Vr.rotrSL(x,I,8)^Vr.shrSL(x,I,7),O=uf[S-2]|0,C=lf[S-2]|0,M=Vr.rotrSH(O,C,19)^Vr.rotrBH(O,C,61)^Vr.shrSH(O,C,6),B=Vr.rotrSL(O,C,19)^Vr.rotrBL(O,C,61)^Vr.shrSL(O,C,6),ce=Vr.add4L(p,B,lf[S-7],lf[S-16]),he=Vr.add4H(ce,E,M,uf[S-7],uf[S-16]);uf[S]=he|0,lf[S]=ce|0}let{Ah:n,Al:i,Bh:a,Bl:o,Ch:s,Cl:c,Dh:u,Dl:f,Eh:d,El:g,Fh:m,Fl:w,Gh:v,Gl:y,Hh:_,Hl:b}=this;for(let S=0;S<80;S++){const x=Vr.rotrSH(d,g,14)^Vr.rotrSH(d,g,18)^Vr.rotrBH(d,g,41),I=Vr.rotrSL(d,g,14)^Vr.rotrSL(d,g,18)^Vr.rotrBL(d,g,41),E=d&m^~d&v,p=g&w^~g&y,O=Vr.add5L(b,I,p,_ve[S],lf[S]),C=Vr.add5H(O,_,x,E,wve[S],uf[S]),M=O|0,B=Vr.rotrSH(n,i,28)^Vr.rotrBH(n,i,34)^Vr.rotrBH(n,i,39),ce=Vr.rotrSL(n,i,28)^Vr.rotrBL(n,i,34)^Vr.rotrBL(n,i,39),he=n&a^n&s^a&s,F=i&o^i&c^o&c;_=v|0,b=y|0,v=m|0,y=w|0,m=d|0,w=g|0,{h:d,l:g}=Vr.add(u|0,f|0,C|0,M|0),u=s|0,f=c|0,s=a|0,c=o|0,a=n|0,o=i|0;const U=Vr.add3L(M,ce,F);n=Vr.add3H(U,C,B,he),i=U|0}({h:n,l:i}=Vr.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:a,l:o}=Vr.add(this.Bh|0,this.Bl|0,a|0,o|0),{h:s,l:c}=Vr.add(this.Ch|0,this.Cl|0,s|0,c|0),{h:u,l:f}=Vr.add(this.Dh|0,this.Dl|0,u|0,f|0),{h:d,l:g}=Vr.add(this.Eh|0,this.El|0,d|0,g|0),{h:m,l:w}=Vr.add(this.Fh|0,this.Fl|0,m|0,w|0),{h:v,l:y}=Vr.add(this.Gh|0,this.Gl|0,v|0,y|0),{h:_,l:b}=Vr.add(this.Hh|0,this.Hl|0,_|0,b|0),this.set(n,i,a,o,s,c,u,f,d,g,m,w,v,y,_,b)}roundClean(){uf.fill(0),lf.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const ZD=H2(()=>new Eve);function xve(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof bn<"u")return bn;throw new Error("unable to locate global object")}const aB=xve(),oB=aB.crypto||aB.msCrypto;function Ave(t){switch(t){case"sha256":return Jy.create();case"sha512":return ZD.create()}$e(!1,"invalid hashing algorithm name","algorithm",t)}function Sve(t,e){const r={sha256:Jy,sha512:ZD}[t];return $e(r!=null,"invalid hmac algorithm","algorithm",t),V2.create(r,e)}function Ive(t,e,r,n,i){const a={sha256:Jy,sha512:ZD}[i];return $e(a!=null,"invalid pbkdf2 algorithm","algorithm",i),JD(a,t,e,{c:r,dkLen:n})}function Ove(t){ct(oB!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),$e(Number.isInteger(t)&&t>0&&t<=1024,"invalid length","length",t);const e=new Uint8Array(t);return oB.getRandomValues(e),e}let RZ=!1;const CZ=function(t,e,r){return Sve(t,e).update(r).digest()};let NZ=CZ;function Xy(t,e,r){const n=Gt(e,"key"),i=Gt(r,"data");return xt(NZ(t,n,i))}Xy._=CZ;Xy.lock=function(){RZ=!0};Xy.register=function(t){if(RZ)throw new Error("computeHmac is locked");NZ=t};Object.freeze(Xy);const[DZ,$Z,MZ]=[[],[],[]],Pve=BigInt(0),Gm=BigInt(1),Tve=BigInt(2),Rve=BigInt(7),Cve=BigInt(256),Nve=BigInt(113);for(let t=0,e=Gm,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],DZ.push(2*(5*n+r)),$Z.push((t+1)*(t+2)/2%64);let i=Pve;for(let a=0;a<7;a++)e=(e<<Gm^(e>>Rve)*Nve)%Cve,e&Tve&&(i^=Gm<<(Gm<<BigInt(a))-Gm);MZ.push(i)}const[Dve,$ve]=SZ(MZ,!0),sB=(t,e,r)=>r>32?PZ(t,e,r):IZ(t,e,r),cB=(t,e,r)=>r>32?TZ(t,e,r):OZ(t,e,r);function Mve(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const s=(o+8)%10,c=(o+2)%10,u=r[c],f=r[c+1],d=sB(u,f,1)^r[s],g=cB(u,f,1)^r[s+1];for(let m=0;m<50;m+=10)t[o+m]^=d,t[o+m+1]^=g}let i=t[2],a=t[3];for(let o=0;o<24;o++){const s=$Z[o],c=sB(i,a,s),u=cB(i,a,s),f=DZ[o];i=t[f],a=t[f+1],t[f]=c,t[f+1]=u}for(let o=0;o<50;o+=10){for(let s=0;s<10;s++)r[s]=t[o+s];for(let s=0;s<10;s++)t[o+s]^=~r[(s+2)%10]&r[(s+4)%10]}t[0]^=Dve[n],t[1]^=$ve[n]}r.fill(0)}class e$ extends QD{constructor(e,r,n,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Xo(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=nx(this.state)}keccak(){Mve(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){vy(this);const{blockLen:r,state:n}=this;e=by(e);const i=e.length;for(let a=0;a<i;){const o=Math.min(r-this.pos,i-a);for(let s=0;s<o;s++)n[this.pos++]^=e[a++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,r&128&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){vy(this,!1),YD(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,a=e.length;i<a;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,a-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Xo(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(wZ(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:a,enableXOF:o}=this;return e||(e=new e$(r,n,i,o,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}const kve=(t,e,r)=>H2(()=>new e$(e,t,r)),Lve=kve(1,136,256/8);let kZ=!1;const LZ=function(t){return Lve(t)};let UZ=LZ;function zn(t){const e=Gt(t,"data");return xt(UZ(e))}zn._=LZ;zn.lock=function(){kZ=!0};zn.register=function(t){if(kZ)throw new TypeError("keccak256 is locked");UZ=t};Object.freeze(zn);const Uve=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),BZ=Uint8Array.from({length:16},(t,e)=>e),Bve=BZ.map(t=>(9*t+5)%16);let t$=[BZ],r$=[Bve];for(let t=0;t<4;t++)for(let e of[t$,r$])e.push(e[t].map(r=>Uve[r]));const FZ=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>new Uint8Array(t)),Fve=t$.map((t,e)=>t.map(r=>FZ[e][r])),jve=r$.map((t,e)=>t.map(r=>FZ[e][r])),qve=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),Hve=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),X_=(t,e)=>t<<e|t>>>32-e;function uB(t,e,r,n){return t===0?e^r^n:t===1?e&r|~e&n:t===2?(e|~r)^n:t===3?e&n|r&~n:e^(r|~n)}const Z_=new Uint32Array(16);class Vve extends XD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:r,h2:n,h3:i,h4:a}=this;return[e,r,n,i,a]}set(e,r,n,i,a){this.h0=e|0,this.h1=r|0,this.h2=n|0,this.h3=i|0,this.h4=a|0}process(e,r){for(let m=0;m<16;m++,r+=4)Z_[m]=e.getUint32(r,!0);let n=this.h0|0,i=n,a=this.h1|0,o=a,s=this.h2|0,c=s,u=this.h3|0,f=u,d=this.h4|0,g=d;for(let m=0;m<5;m++){const w=4-m,v=qve[m],y=Hve[m],_=t$[m],b=r$[m],S=Fve[m],x=jve[m];for(let I=0;I<16;I++){const E=X_(n+uB(m,a,s,u)+Z_[_[I]]+v,S[I])+d|0;n=d,d=u,u=X_(s,10)|0,s=a,a=E}for(let I=0;I<16;I++){const E=X_(i+uB(w,o,c,f)+Z_[b[I]]+y,x[I])+g|0;i=g,g=f,f=X_(c,10)|0,c=o,o=E}}this.set(this.h1+s+f|0,this.h2+u+g|0,this.h3+d+i|0,this.h4+n+o|0,this.h0+a+c|0)}roundClean(){Z_.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const zve=H2(()=>new Vve);let jZ=!1;const qZ=function(t){return zve(t)};let HZ=qZ;function Zy(t){const e=Gt(t,"data");return xt(HZ(e))}Zy._=qZ;Zy.lock=function(){jZ=!0};Zy.register=function(t){if(jZ)throw new TypeError("ripemd160 is locked");HZ=t};Object.freeze(Zy);let VZ=!1;const zZ=function(t,e,r,n,i){return Ive(t,e,r,n,i)};let GZ=zZ;function vd(t,e,r,n,i){const a=Gt(t,"password"),o=Gt(e,"salt");return xt(GZ(a,o,r,n,i))}vd._=zZ;vd.lock=function(){VZ=!0};vd.register=function(t){if(VZ)throw new Error("pbkdf2 is locked");GZ=t};Object.freeze(vd);let WZ=!1;const KZ=function(t){return new Uint8Array(Ove(t))};let YZ=KZ;function Il(t){return YZ(t)}Il._=KZ;Il.lock=function(){WZ=!0};Il.register=function(t){if(WZ)throw new Error("randomBytes is locked");YZ=t};Object.freeze(Il);const mn=(t,e)=>t<<e|t>>>32-e;function lB(t,e,r,n,i,a){let o=t[e++]^r[n++],s=t[e++]^r[n++],c=t[e++]^r[n++],u=t[e++]^r[n++],f=t[e++]^r[n++],d=t[e++]^r[n++],g=t[e++]^r[n++],m=t[e++]^r[n++],w=t[e++]^r[n++],v=t[e++]^r[n++],y=t[e++]^r[n++],_=t[e++]^r[n++],b=t[e++]^r[n++],S=t[e++]^r[n++],x=t[e++]^r[n++],I=t[e++]^r[n++],E=o,p=s,O=c,C=u,M=f,B=d,ce=g,he=m,F=w,U=v,K=y,ne=_,j=b,q=S,V=x,$=I;for(let H=0;H<8;H+=2)M^=mn(E+j|0,7),F^=mn(M+E|0,9),j^=mn(F+M|0,13),E^=mn(j+F|0,18),U^=mn(B+p|0,7),q^=mn(U+B|0,9),p^=mn(q+U|0,13),B^=mn(p+q|0,18),V^=mn(K+ce|0,7),O^=mn(V+K|0,9),ce^=mn(O+V|0,13),K^=mn(ce+O|0,18),C^=mn($+ne|0,7),he^=mn(C+$|0,9),ne^=mn(he+C|0,13),$^=mn(ne+he|0,18),p^=mn(E+C|0,7),O^=mn(p+E|0,9),C^=mn(O+p|0,13),E^=mn(C+O|0,18),ce^=mn(B+M|0,7),he^=mn(ce+B|0,9),M^=mn(he+ce|0,13),B^=mn(M+he|0,18),ne^=mn(K+U|0,7),F^=mn(ne+K|0,9),U^=mn(F+ne|0,13),K^=mn(U+F|0,18),j^=mn($+V|0,7),q^=mn(j+$|0,9),V^=mn(q+j|0,13),$^=mn(V+q|0,18);i[a++]=o+E|0,i[a++]=s+p|0,i[a++]=c+O|0,i[a++]=u+C|0,i[a++]=f+M|0,i[a++]=d+B|0,i[a++]=g+ce|0,i[a++]=m+he|0,i[a++]=w+F|0,i[a++]=v+U|0,i[a++]=y+K|0,i[a++]=_+ne|0,i[a++]=b+j|0,i[a++]=S+q|0,i[a++]=x+V|0,i[a++]=I+$|0}function hg(t,e,r,n,i){let a=n+0,o=n+16*i;for(let s=0;s<16;s++)r[o+s]=t[e+(2*i-1)*16+s];for(let s=0;s<i;s++,a+=16,e+=16)lB(r,o,t,e,r,a),s>0&&(o+=16),lB(r,a,t,e+=16,r,o)}function QZ(t,e,r){const n=EZ({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:i,r:a,p:o,dkLen:s,asyncTick:c,maxmem:u,onProgress:f}=n;if(Xo(i),Xo(a),Xo(o),Xo(s),Xo(c),Xo(u),f!==void 0&&typeof f!="function")throw new Error("progressCb should be function");const d=128*a,g=d/4;if(i<=1||i&i-1||i>=2**(d/8)||i>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(o<0||o>(2**32-1)*32/d)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(s<0||s>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const m=d*(i+o);if(m>u)throw new Error(`Scrypt: parameters too large, ${m} (128 * r * (N + p)) > ${u} (maxmem)`);const w=JD(Jy,t,e,{c:1,dkLen:d*o}),v=nx(w),y=nx(new Uint8Array(d*i)),_=nx(new Uint8Array(d));let b=()=>{};if(f){const S=2*i*o,x=Math.max(Math.floor(S/1e4),1);let I=0;b=()=>{I++,f&&(!(I%x)||I===S)&&f(I/S)}}return{N:i,r:a,p:o,dkLen:s,blockSize32:g,V:y,B32:v,B:w,tmp:_,blockMixCb:b,asyncTick:c}}function JZ(t,e,r,n,i){const a=JD(Jy,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),i.fill(0),a}function Gve(t,e,r){const{N:n,r:i,p:a,dkLen:o,blockSize32:s,V:c,B32:u,B:f,tmp:d,blockMixCb:g}=QZ(t,e,r);for(let m=0;m<a;m++){const w=s*m;for(let v=0;v<s;v++)c[v]=u[w+v];for(let v=0,y=0;v<n-1;v++)hg(c,y,c,y+=s,i),g();hg(c,(n-1)*s,u,w,i),g();for(let v=0;v<n;v++){const y=u[w+s-16]%n;for(let _=0;_<s;_++)d[_]=u[w+_]^c[y*s+_];hg(d,0,u,w,i),g()}}return JZ(t,o,f,c,d)}async function Wve(t,e,r){const{N:n,r:i,p:a,dkLen:o,blockSize32:s,V:c,B32:u,B:f,tmp:d,blockMixCb:g,asyncTick:m}=QZ(t,e,r);for(let w=0;w<a;w++){const v=s*w;for(let _=0;_<s;_++)c[_]=u[v+_];let y=0;await iB(n-1,m,()=>{hg(c,y,c,y+=s,i),g()}),hg(c,(n-1)*s,u,v,i),g(),await iB(n,m,()=>{const _=u[v+s-16]%n;for(let b=0;b<s;b++)d[b]=u[v+b]^c[_*s+b];hg(d,0,u,v,i),g()})}return JZ(t,o,f,c,d)}let XZ=!1,ZZ=!1;const eee=async function(t,e,r,n,i,a,o){return await Wve(t,e,{N:r,r:n,p:i,dkLen:a,onProgress:o})},tee=function(t,e,r,n,i,a){return Gve(t,e,{N:r,r:n,p:i,dkLen:a})};let ree=eee,nee=tee;async function em(t,e,r,n,i,a,o){const s=Gt(t,"passwd"),c=Gt(e,"salt");return xt(await ree(s,c,r,n,i,a,o))}em._=eee;em.lock=function(){ZZ=!0};em.register=function(t){if(ZZ)throw new Error("scrypt is locked");ree=t};Object.freeze(em);function tm(t,e,r,n,i,a){const o=Gt(t,"passwd"),s=Gt(e,"salt");return xt(nee(o,s,r,n,i,a))}tm._=tee;tm.lock=function(){XZ=!0};tm.register=function(t){if(XZ)throw new Error("scryptSync is locked");nee=t};Object.freeze(tm);const iee=function(t){return Ave("sha256").update(t).digest()};let aee=iee,oee=!1;function Dc(t){const e=Gt(t,"data");return xt(aee(e))}Dc._=iee;Dc.lock=function(){oee=!0};Dc.register=function(t){if(oee)throw new Error("sha256 is locked");aee=t};Object.freeze(Dc);Object.freeze(Dc);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const see=BigInt(0),z2=BigInt(1),Kve=BigInt(2),G2=t=>t instanceof Uint8Array,Yve=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function wy(t){if(!G2(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=Yve[t[r]];return e}function cee(t){const e=t.toString(16);return e.length&1?`0${e}`:e}function n$(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function _y(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(e/2);for(let n=0;n<r.length;n++){const i=n*2,a=t.slice(i,i+2),o=Number.parseInt(a,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[n]=o}return r}function Xh(t){return n$(wy(t))}function i$(t){if(!G2(t))throw new Error("Uint8Array expected");return n$(wy(Uint8Array.from(t).reverse()))}function Ey(t,e){return _y(t.toString(16).padStart(e*2,"0"))}function a$(t,e){return Ey(t,e).reverse()}function Qve(t){return _y(cee(t))}function gc(t,e,r){let n;if(typeof e=="string")try{n=_y(e)}catch(a){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${a}`)}else if(G2(e))n=Uint8Array.from(e);else throw new Error(`${t} must be hex string or Uint8Array`);const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(`${t} expected ${r} bytes, got ${i}`);return n}function _1(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!G2(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function Jve(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function Xve(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Zve(t){let e;for(e=0;t>see;t>>=z2,e+=1);return e}function ebe(t,e){return t>>BigInt(e)&z2}const tbe=(t,e,r)=>t|(r?z2:see)<<BigInt(e),o$=t=>(Kve<<BigInt(t-1))-z2,lP=t=>new Uint8Array(t),fB=t=>Uint8Array.from(t);function uee(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=lP(t),i=lP(t),a=0;const o=()=>{n.fill(1),i.fill(0),a=0},s=(...d)=>r(i,n,...d),c=(d=lP())=>{i=s(fB([0]),d),n=s(),d.length!==0&&(i=s(fB([1]),d),n=s())},u=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const g=[];for(;d<e;){n=s();const m=n.slice();g.push(m),d+=n.length}return _1(...g)};return(d,g)=>{o(),c(d);let m;for(;!(m=g(u()));)c();return o(),m}}const rbe={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function ww(t,e,r={}){const n=(i,a,o)=>{const s=rbe[a];if(typeof s!="function")throw new Error(`Invalid validator "${a}", expected function`);const c=t[i];if(!(o&&c===void 0)&&!s(c,t))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${a}`)};for(const[i,a]of Object.entries(e))n(i,a,!1);for(const[i,a]of Object.entries(r))n(i,a,!0);return t}const nbe=Object.freeze(Object.defineProperty({__proto__:null,bitGet:ebe,bitLen:Zve,bitMask:o$,bitSet:tbe,bytesToHex:wy,bytesToNumberBE:Xh,bytesToNumberLE:i$,concatBytes:_1,createHmacDrbg:uee,ensureBytes:gc,equalBytes:Jve,hexToBytes:_y,hexToNumber:n$,numberToBytesBE:Ey,numberToBytesLE:a$,numberToHexUnpadded:cee,numberToVarBytesBE:Qve,utf8ToBytes:Xve,validateObject:ww},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ji=BigInt(0),Ai=BigInt(1),fh=BigInt(2),ibe=BigInt(3),o8=BigInt(4),dB=BigInt(5),hB=BigInt(8);BigInt(9);BigInt(16);function Oo(t,e){const r=t%e;return r>=Ji?r:e+r}function abe(t,e,r){if(r<=Ji||e<Ji)throw new Error("Expected power/modulo > 0");if(r===Ai)return Ji;let n=Ai;for(;e>Ji;)e&Ai&&(n=n*t%r),t=t*t%r,e>>=Ai;return n}function ys(t,e,r){let n=t;for(;e-- >Ji;)n*=n,n%=r;return n}function s8(t,e){if(t===Ji||e<=Ji)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=Oo(t,e),n=e,i=Ji,a=Ai;for(;r!==Ji;){const s=n/r,c=n%r,u=i-a*s;n=r,r=c,i=a,a=u}if(n!==Ai)throw new Error("invert: does not exist");return Oo(i,e)}function obe(t){const e=(t-Ai)/fh;let r,n,i;for(r=t-Ai,n=0;r%fh===Ji;r/=fh,n++);for(i=fh;i<t&&abe(i,e,t)!==t-Ai;i++);if(n===1){const o=(t+Ai)/o8;return function(c,u){const f=c.pow(u,o);if(!c.eql(c.sqr(f),u))throw new Error("Cannot find square root");return f}}const a=(r+Ai)/fh;return function(s,c){if(s.pow(c,e)===s.neg(s.ONE))throw new Error("Cannot find square root");let u=n,f=s.pow(s.mul(s.ONE,i),r),d=s.pow(c,a),g=s.pow(c,r);for(;!s.eql(g,s.ONE);){if(s.eql(g,s.ZERO))return s.ZERO;let m=1;for(let v=s.sqr(g);m<u&&!s.eql(v,s.ONE);m++)v=s.sqr(v);const w=s.pow(f,Ai<<BigInt(u-m-1));f=s.sqr(w),d=s.mul(d,w),g=s.mul(g,f),u=m}return d}}function sbe(t){if(t%o8===ibe){const e=(t+Ai)/o8;return function(n,i){const a=n.pow(i,e);if(!n.eql(n.sqr(a),i))throw new Error("Cannot find square root");return a}}if(t%hB===dB){const e=(t-dB)/hB;return function(n,i){const a=n.mul(i,fh),o=n.pow(a,e),s=n.mul(i,o),c=n.mul(n.mul(s,fh),o),u=n.mul(s,n.sub(c,n.ONE));if(!n.eql(n.sqr(u),i))throw new Error("Cannot find square root");return u}}return obe(t)}const cbe=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function ube(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=cbe.reduce((n,i)=>(n[i]="function",n),e);return ww(t,r)}function lbe(t,e,r){if(r<Ji)throw new Error("Expected power > 0");if(r===Ji)return t.ONE;if(r===Ai)return e;let n=t.ONE,i=e;for(;r>Ji;)r&Ai&&(n=t.mul(n,i)),i=t.sqr(i),r>>=Ai;return n}function fbe(t,e){const r=new Array(e.length),n=e.reduce((a,o,s)=>t.is0(o)?a:(r[s]=a,t.mul(a,o)),t.ONE),i=t.inv(n);return e.reduceRight((a,o,s)=>t.is0(o)?a:(r[s]=t.mul(a,r[s]),t.mul(a,o)),i),r}function lee(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function dbe(t,e,r=!1,n={}){if(t<=Ji)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:a}=lee(t,e);if(a>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=sbe(t),s=Object.freeze({ORDER:t,BITS:i,BYTES:a,MASK:o$(i),ZERO:Ji,ONE:Ai,create:c=>Oo(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return Ji<=c&&c<t},is0:c=>c===Ji,isOdd:c=>(c&Ai)===Ai,neg:c=>Oo(-c,t),eql:(c,u)=>c===u,sqr:c=>Oo(c*c,t),add:(c,u)=>Oo(c+u,t),sub:(c,u)=>Oo(c-u,t),mul:(c,u)=>Oo(c*u,t),pow:(c,u)=>lbe(s,c,u),div:(c,u)=>Oo(c*s8(u,t),t),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>s8(c,t),sqrt:n.sqrt||(c=>o(s,c)),invertBatch:c=>fbe(s,c),cmov:(c,u,f)=>f?u:c,toBytes:c=>r?a$(c,a):Ey(c,a),fromBytes:c=>{if(c.length!==a)throw new Error(`Fp.fromBytes: expected ${a}, got ${c.length}`);return r?i$(c):Xh(c)}});return Object.freeze(s)}function fee(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function dee(t){const e=fee(t);return e+Math.ceil(e/2)}function hbe(t,e,r=!1){const n=t.length,i=fee(e),a=dee(e);if(n<16||n<a||n>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${n}`);const o=r?Xh(t):i$(t),s=Oo(o,e-Ai)+Ai;return r?a$(s,i):Ey(s,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const pbe=BigInt(0),fP=BigInt(1);function gbe(t,e){const r=(i,a)=>{const o=a.negate();return i?o:a},n=i=>{const a=Math.ceil(e/i)+1,o=2**(i-1);return{windows:a,windowSize:o}};return{constTimeNegate:r,unsafeLadder(i,a){let o=t.ZERO,s=i;for(;a>pbe;)a&fP&&(o=o.add(s)),s=s.double(),a>>=fP;return o},precomputeWindow(i,a){const{windows:o,windowSize:s}=n(a),c=[];let u=i,f=u;for(let d=0;d<o;d++){f=u,c.push(f);for(let g=1;g<s;g++)f=f.add(u),c.push(f);u=f.double()}return c},wNAF(i,a,o){const{windows:s,windowSize:c}=n(i);let u=t.ZERO,f=t.BASE;const d=BigInt(2**i-1),g=2**i,m=BigInt(i);for(let w=0;w<s;w++){const v=w*c;let y=Number(o&d);o>>=m,y>c&&(y-=g,o+=fP);const _=v,b=v+Math.abs(y)-1,S=w%2!==0,x=y<0;y===0?f=f.add(r(S,a[_])):u=u.add(r(x,a[b]))}return{p:u,f}},wNAFCached(i,a,o,s){const c=i._WINDOW_SIZE||1;let u=a.get(i);return u||(u=this.precomputeWindow(i,c),c!==1&&a.set(i,s(u))),this.wNAF(c,u,o)}}}function hee(t){return ube(t.Fp),ww(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...lee(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ybe(t){const e=hee(t);ww(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:mbe,hexToBytes:vbe}=nbe,Eh={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=Eh;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:mbe(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=Eh,r=typeof t=="string"?vbe(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:a}=Eh._parseInt(r.subarray(2)),{d:o,l:s}=Eh._parseInt(a);if(s.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(t){const e=u=>Number.parseInt(u[0],16)&8?"00"+u:u,r=u=>{const f=u.toString(16);return f.length&1?`0${f}`:f},n=e(r(t.s)),i=e(r(t.r)),a=n.length/2,o=i.length/2,s=r(a),c=r(o);return`30${r(o+a+4)}02${c}${i}02${s}${n}`}},vl=BigInt(0),Ns=BigInt(1);BigInt(2);const pB=BigInt(3);BigInt(4);function bbe(t){const e=ybe(t),{Fp:r}=e,n=e.toBytes||((w,v,y)=>{const _=v.toAffine();return _1(Uint8Array.from([4]),r.toBytes(_.x),r.toBytes(_.y))}),i=e.fromBytes||(w=>{const v=w.subarray(1),y=r.fromBytes(v.subarray(0,r.BYTES)),_=r.fromBytes(v.subarray(r.BYTES,2*r.BYTES));return{x:y,y:_}});function a(w){const{a:v,b:y}=e,_=r.sqr(w),b=r.mul(_,w);return r.add(r.add(b,r.mul(w,v)),y)}if(!r.eql(r.sqr(e.Gy),a(e.Gx)))throw new Error("bad generator point: equation left != right");function o(w){return typeof w=="bigint"&&vl<w&&w<e.n}function s(w){if(!o(w))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(w){const{allowedPrivateKeyLengths:v,nByteLength:y,wrapPrivateKey:_,n:b}=e;if(v&&typeof w!="bigint"){if(w instanceof Uint8Array&&(w=wy(w)),typeof w!="string"||!v.includes(w.length))throw new Error("Invalid key");w=w.padStart(y*2,"0")}let S;try{S=typeof w=="bigint"?w:Xh(gc("private key",w,y))}catch{throw new Error(`private key must be ${y} bytes, hex or bigint, not ${typeof w}`)}return _&&(S=Oo(S,b)),s(S),S}const u=new Map;function f(w){if(!(w instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(v,y,_){if(this.px=v,this.py=y,this.pz=_,v==null||!r.isValid(v))throw new Error("x required");if(y==null||!r.isValid(y))throw new Error("y required");if(_==null||!r.isValid(_))throw new Error("z required")}static fromAffine(v){const{x:y,y:_}=v||{};if(!v||!r.isValid(y)||!r.isValid(_))throw new Error("invalid affine point");if(v instanceof d)throw new Error("projective point not allowed");const b=S=>r.eql(S,r.ZERO);return b(y)&&b(_)?d.ZERO:new d(y,_,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(v){const y=r.invertBatch(v.map(_=>_.pz));return v.map((_,b)=>_.toAffine(y[b])).map(d.fromAffine)}static fromHex(v){const y=d.fromAffine(i(gc("pointHex",v)));return y.assertValidity(),y}static fromPrivateKey(v){return d.BASE.multiply(c(v))}_setWindowSize(v){this._WINDOW_SIZE=v,u.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:v,y}=this.toAffine();if(!r.isValid(v)||!r.isValid(y))throw new Error("bad point: x or y not FE");const _=r.sqr(y),b=a(v);if(!r.eql(_,b))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:v}=this.toAffine();if(r.isOdd)return!r.isOdd(v);throw new Error("Field doesn't support isOdd")}equals(v){f(v);const{px:y,py:_,pz:b}=this,{px:S,py:x,pz:I}=v,E=r.eql(r.mul(y,I),r.mul(S,b)),p=r.eql(r.mul(_,I),r.mul(x,b));return E&&p}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:v,b:y}=e,_=r.mul(y,pB),{px:b,py:S,pz:x}=this;let I=r.ZERO,E=r.ZERO,p=r.ZERO,O=r.mul(b,b),C=r.mul(S,S),M=r.mul(x,x),B=r.mul(b,S);return B=r.add(B,B),p=r.mul(b,x),p=r.add(p,p),I=r.mul(v,p),E=r.mul(_,M),E=r.add(I,E),I=r.sub(C,E),E=r.add(C,E),E=r.mul(I,E),I=r.mul(B,I),p=r.mul(_,p),M=r.mul(v,M),B=r.sub(O,M),B=r.mul(v,B),B=r.add(B,p),p=r.add(O,O),O=r.add(p,O),O=r.add(O,M),O=r.mul(O,B),E=r.add(E,O),M=r.mul(S,x),M=r.add(M,M),O=r.mul(M,B),I=r.sub(I,O),p=r.mul(M,C),p=r.add(p,p),p=r.add(p,p),new d(I,E,p)}add(v){f(v);const{px:y,py:_,pz:b}=this,{px:S,py:x,pz:I}=v;let E=r.ZERO,p=r.ZERO,O=r.ZERO;const C=e.a,M=r.mul(e.b,pB);let B=r.mul(y,S),ce=r.mul(_,x),he=r.mul(b,I),F=r.add(y,_),U=r.add(S,x);F=r.mul(F,U),U=r.add(B,ce),F=r.sub(F,U),U=r.add(y,b);let K=r.add(S,I);return U=r.mul(U,K),K=r.add(B,he),U=r.sub(U,K),K=r.add(_,b),E=r.add(x,I),K=r.mul(K,E),E=r.add(ce,he),K=r.sub(K,E),O=r.mul(C,U),E=r.mul(M,he),O=r.add(E,O),E=r.sub(ce,O),O=r.add(ce,O),p=r.mul(E,O),ce=r.add(B,B),ce=r.add(ce,B),he=r.mul(C,he),U=r.mul(M,U),ce=r.add(ce,he),he=r.sub(B,he),he=r.mul(C,he),U=r.add(U,he),B=r.mul(ce,U),p=r.add(p,B),B=r.mul(K,U),E=r.mul(F,E),E=r.sub(E,B),B=r.mul(F,ce),O=r.mul(K,O),O=r.add(O,B),new d(E,p,O)}subtract(v){return this.add(v.negate())}is0(){return this.equals(d.ZERO)}wNAF(v){return m.wNAFCached(this,u,v,y=>{const _=r.invertBatch(y.map(b=>b.pz));return y.map((b,S)=>b.toAffine(_[S])).map(d.fromAffine)})}multiplyUnsafe(v){const y=d.ZERO;if(v===vl)return y;if(s(v),v===Ns)return this;const{endo:_}=e;if(!_)return m.unsafeLadder(this,v);let{k1neg:b,k1:S,k2neg:x,k2:I}=_.splitScalar(v),E=y,p=y,O=this;for(;S>vl||I>vl;)S&Ns&&(E=E.add(O)),I&Ns&&(p=p.add(O)),O=O.double(),S>>=Ns,I>>=Ns;return b&&(E=E.negate()),x&&(p=p.negate()),p=new d(r.mul(p.px,_.beta),p.py,p.pz),E.add(p)}multiply(v){s(v);let y=v,_,b;const{endo:S}=e;if(S){const{k1neg:x,k1:I,k2neg:E,k2:p}=S.splitScalar(y);let{p:O,f:C}=this.wNAF(I),{p:M,f:B}=this.wNAF(p);O=m.constTimeNegate(x,O),M=m.constTimeNegate(E,M),M=new d(r.mul(M.px,S.beta),M.py,M.pz),_=O.add(M),b=C.add(B)}else{const{p:x,f:I}=this.wNAF(y);_=x,b=I}return d.normalizeZ([_,b])[0]}multiplyAndAddUnsafe(v,y,_){const b=d.BASE,S=(I,E)=>E===vl||E===Ns||!I.equals(b)?I.multiplyUnsafe(E):I.multiply(E),x=S(this,y).add(S(v,_));return x.is0()?void 0:x}toAffine(v){const{px:y,py:_,pz:b}=this,S=this.is0();v==null&&(v=S?r.ONE:r.inv(b));const x=r.mul(y,v),I=r.mul(_,v),E=r.mul(b,v);if(S)return{x:r.ZERO,y:r.ZERO};if(!r.eql(E,r.ONE))throw new Error("invZ was invalid");return{x,y:I}}isTorsionFree(){const{h:v,isTorsionFree:y}=e;if(v===Ns)return!0;if(y)return y(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:v,clearCofactor:y}=e;return v===Ns?this:y?y(d,this):this.multiplyUnsafe(e.h)}toRawBytes(v=!0){return this.assertValidity(),n(d,this,v)}toHex(v=!0){return wy(this.toRawBytes(v))}}d.BASE=new d(e.Gx,e.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const g=e.nBitLength,m=gbe(d,e.endo?Math.ceil(g/2):g);return{CURVE:e,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:a,isWithinCurveOrder:o}}function wbe(t){const e=hee(t);return ww(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function _be(t){const e=wbe(t),{Fp:r,n}=e,i=r.BYTES+1,a=2*r.BYTES+1;function o(U){return vl<U&&U<r.ORDER}function s(U){return Oo(U,n)}function c(U){return s8(U,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:f,weierstrassEquation:d,isWithinCurveOrder:g}=bbe({...e,toBytes(U,K,ne){const j=K.toAffine(),q=r.toBytes(j.x),V=_1;return ne?V(Uint8Array.from([K.hasEvenY()?2:3]),q):V(Uint8Array.from([4]),q,r.toBytes(j.y))},fromBytes(U){const K=U.length,ne=U[0],j=U.subarray(1);if(K===i&&(ne===2||ne===3)){const q=Xh(j);if(!o(q))throw new Error("Point is not on curve");const V=d(q);let $=r.sqrt(V);const H=($&Ns)===Ns;return(ne&1)===1!==H&&($=r.neg($)),{x:q,y:$}}else if(K===a&&ne===4){const q=r.fromBytes(j.subarray(0,r.BYTES)),V=r.fromBytes(j.subarray(r.BYTES,2*r.BYTES));return{x:q,y:V}}else throw new Error(`Point of length ${K} was invalid. Expected ${i} compressed bytes or ${a} uncompressed bytes`)}}),m=U=>wy(Ey(U,e.nByteLength));function w(U){const K=n>>Ns;return U>K}function v(U){return w(U)?s(-U):U}const y=(U,K,ne)=>Xh(U.slice(K,ne));class _{constructor(K,ne,j){this.r=K,this.s=ne,this.recovery=j,this.assertValidity()}static fromCompact(K){const ne=e.nByteLength;return K=gc("compactSignature",K,ne*2),new _(y(K,0,ne),y(K,ne,2*ne))}static fromDER(K){const{r:ne,s:j}=Eh.toSig(gc("DER",K));return new _(ne,j)}assertValidity(){if(!g(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!g(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(K){return new _(this.r,this.s,K)}recoverPublicKey(K){const{r:ne,s:j,recovery:q}=this,V=p(gc("msgHash",K));if(q==null||![0,1,2,3].includes(q))throw new Error("recovery id invalid");const $=q===2||q===3?ne+e.n:ne;if($>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const H=q&1?"03":"02",L=u.fromHex(H+m($)),k=c($),G=s(-V*k),ge=s(j*k),Q=u.BASE.multiplyAndAddUnsafe(L,G,ge);if(!Q)throw new Error("point at infinify");return Q.assertValidity(),Q}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new _(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return _y(this.toDERHex())}toDERHex(){return Eh.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return _y(this.toCompactHex())}toCompactHex(){return m(this.r)+m(this.s)}}const b={isValidPrivateKey(U){try{return f(U),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const U=dee(e.n);return hbe(e.randomBytes(U),e.n)},precompute(U=8,K=u.BASE){return K._setWindowSize(U),K.multiply(BigInt(3)),K}};function S(U,K=!0){return u.fromPrivateKey(U).toRawBytes(K)}function x(U){const K=U instanceof Uint8Array,ne=typeof U=="string",j=(K||ne)&&U.length;return K?j===i||j===a:ne?j===2*i||j===2*a:U instanceof u}function I(U,K,ne=!0){if(x(U))throw new Error("first arg must be private key");if(!x(K))throw new Error("second arg must be public key");return u.fromHex(K).multiply(f(U)).toRawBytes(ne)}const E=e.bits2int||function(U){const K=Xh(U),ne=U.length*8-e.nBitLength;return ne>0?K>>BigInt(ne):K},p=e.bits2int_modN||function(U){return s(E(U))},O=o$(e.nBitLength);function C(U){if(typeof U!="bigint")throw new Error("bigint expected");if(!(vl<=U&&U<O))throw new Error(`bigint expected < 2^${e.nBitLength}`);return Ey(U,e.nByteLength)}function M(U,K,ne=B){if(["recovered","canonical"].some(ue=>ue in ne))throw new Error("sign() legacy options not supported");const{hash:j,randomBytes:q}=e;let{lowS:V,prehash:$,extraEntropy:H}=ne;V==null&&(V=!0),U=gc("msgHash",U),$&&(U=gc("prehashed msgHash",j(U)));const L=p(U),k=f(K),G=[C(k),C(L)];if(H!=null){const ue=H===!0?q(r.BYTES):H;G.push(gc("extraEntropy",ue))}const ge=_1(...G),Q=L;function te(ue){const T=E(ue);if(!g(T))return;const fe=c(T),Ge=u.BASE.multiply(T).toAffine(),tt=s(Ge.x);if(tt===vl)return;const mt=s(fe*s(Q+tt*k));if(mt===vl)return;let vt=(Ge.x===tt?0:2)|Number(Ge.y&Ns),gt=mt;return V&&w(mt)&&(gt=v(mt),vt^=1),new _(tt,gt,vt)}return{seed:ge,k2sig:te}}const B={lowS:e.lowS,prehash:!1},ce={lowS:e.lowS,prehash:!1};function he(U,K,ne=B){const{seed:j,k2sig:q}=M(U,K,ne),V=e;return uee(V.hash.outputLen,V.nByteLength,V.hmac)(j,q)}u.BASE._setWindowSize(8);function F(U,K,ne,j=ce){var Ge;const q=U;if(K=gc("msgHash",K),ne=gc("publicKey",ne),"strict"in j)throw new Error("options.strict was renamed to lowS");const{lowS:V,prehash:$}=j;let H,L;try{if(typeof q=="string"||q instanceof Uint8Array)try{H=_.fromDER(q)}catch(tt){if(!(tt instanceof Eh.Err))throw tt;H=_.fromCompact(q)}else if(typeof q=="object"&&typeof q.r=="bigint"&&typeof q.s=="bigint"){const{r:tt,s:mt}=q;H=new _(tt,mt)}else throw new Error("PARSE");L=u.fromHex(ne)}catch(tt){if(tt.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(V&&H.hasHighS())return!1;$&&(K=e.hash(K));const{r:k,s:G}=H,ge=p(K),Q=c(G),te=s(ge*Q),ue=s(k*Q),T=(Ge=u.BASE.multiplyAndAddUnsafe(L,te,ue))==null?void 0:Ge.toAffine();return T?s(T.x)===k:!1}return{CURVE:e,getPublicKey:S,getSharedSecret:I,sign:he,verify:F,ProjectivePoint:u,Signature:_,utils:b}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ebe(t){return{hash:t,hmac:(e,...r)=>V2(t,e,Wme(...r)),randomBytes:Yme}}function xbe(t,e){const r=n=>_be({...t,...Ebe(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const pee=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),gB=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Abe=BigInt(1),c8=BigInt(2),yB=(t,e)=>(t+e/c8)/e;function Sbe(t){const e=pee,r=BigInt(3),n=BigInt(6),i=BigInt(11),a=BigInt(22),o=BigInt(23),s=BigInt(44),c=BigInt(88),u=t*t*t%e,f=u*u*t%e,d=ys(f,r,e)*f%e,g=ys(d,r,e)*f%e,m=ys(g,c8,e)*u%e,w=ys(m,i,e)*m%e,v=ys(w,a,e)*w%e,y=ys(v,s,e)*v%e,_=ys(y,c,e)*y%e,b=ys(_,s,e)*v%e,S=ys(b,r,e)*f%e,x=ys(S,o,e)*w%e,I=ys(x,n,e)*u%e,E=ys(I,c8,e);if(!u8.eql(u8.sqr(E),t))throw new Error("Cannot find square root");return E}const u8=dbe(pee,void 0,void 0,{sqrt:Sbe}),mf=xbe({a:BigInt(0),b:BigInt(7),Fp:u8,n:gB,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=gB,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Abe*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,o=BigInt("0x100000000000000000000000000000000"),s=yB(a*t,e),c=yB(-n*t,e);let u=Oo(t-s*r-c*i,e),f=Oo(-s*n-c*a,e);const d=u>o,g=f>o;if(d&&(u=e-u),g&&(f=e-f),u>o||f>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:d,k1:u,k2neg:g,k2:f}}}},Jy);BigInt(0);mf.ProjectivePoint;const l8="0x0000000000000000000000000000000000000000",mB="0x0000000000000000000000000000000000000000000000000000000000000000",Ibe=`Ethereum Signed Message:
|
|
69
|
-
`,vB=BigInt(0),bB=BigInt(1),wB=BigInt(2),_B=BigInt(27),EB=BigInt(28),eE=BigInt(35),c0={};function xB(t){return sp(Co(t),32)}var Dg,$g,Mg,kh;const dc=class dc{constructor(e,r,n,i){Ze(this,Dg,void 0);Ze(this,$g,void 0);Ze(this,Mg,void 0);Ze(this,kh,void 0);xp(e,c0,"Signature"),Te(this,Dg,r),Te(this,$g,n),Te(this,Mg,i),Te(this,kh,null)}get r(){return Y(this,Dg)}set r(e){$e(dg(e)===32,"invalid r","value",e),Te(this,Dg,xt(e))}get s(){return Y(this,$g)}set s(e){$e(dg(e)===32,"invalid s","value",e);const r=xt(e);$e(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),Te(this,$g,r)}get v(){return Y(this,Mg)}set v(e){const r=Gr(e,"value");$e(r===27||r===28,"invalid v","v",e),Te(this,Mg,r)}get networkV(){return Y(this,kh)}get legacyChainId(){const e=this.networkV;return e==null?null:dc.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=Gt(this.s);return this.yParity&&(e[0]|=128),xt(e)}get compactSerialized(){return Gn([this.r,this.yParityAndS])}get serialized(){return Gn([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new dc(c0,this.r,this.s,this.v);return this.networkV&&Te(e,kh,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const r=or(e,"v");return r==_B||r==EB?vB:($e(r>=eE,"invalid EIP-155 v","v",e),(r-eE)/wB)}static getChainIdV(e,r){return or(e)*wB+BigInt(35+r-27)}static getNormalizedV(e){const r=or(e);return r===vB||r===_B?27:r===bB||r===EB?28:($e(r>=eE,"invalid v","v",e),r&bB?27:28)}static from(e){function r(u,f){$e(u,f,"signature",e)}if(e==null)return new dc(c0,mB,mB,27);if(typeof e=="string"){const u=Gt(e,"signature");if(u.length===64){const f=xt(u.slice(0,32)),d=u.slice(32,64),g=d[0]&128?28:27;return d[0]&=127,new dc(c0,f,xt(d),g)}if(u.length===65){const f=xt(u.slice(0,32)),d=u.slice(32,64);r((d[0]&128)===0,"non-canonical s");const g=dc.getNormalizedV(u[64]);return new dc(c0,f,xt(d),g)}r(!1,"invalid raw signature length")}if(e instanceof dc)return e.clone();const n=e.r;r(n!=null,"missing r");const i=xB(n),a=function(u,f){if(u!=null)return xB(u);if(f!=null){r(di(f,32),"invalid yParityAndS");const d=Gt(f);return d[0]&=127,xt(d)}r(!1,"missing s")}(e.s,e.yParityAndS);r((Gt(a)[0]&128)==0,"non-canonical s");const{networkV:o,v:s}=function(u,f,d){if(u!=null){const g=or(u);return{networkV:g>=eE?g:void 0,v:dc.getNormalizedV(g)}}if(f!=null)return r(di(f,32),"invalid yParityAndS"),{v:Gt(f)[0]&128?28:27};if(d!=null){switch(Gr(d,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new dc(c0,i,a,s);return o&&Te(c,kh,o),r(e.yParity==null||Gr(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};Dg=new WeakMap,$g=new WeakMap,Mg=new WeakMap,kh=new WeakMap;let $c=dc;var cl;const gh=class gh{constructor(e){Ze(this,cl,void 0);$e(dg(e)===32,"invalid private key","privateKey","[REDACTED]"),Te(this,cl,xt(e))}get privateKey(){return Y(this,cl)}get publicKey(){return gh.computePublicKey(Y(this,cl))}get compressedPublicKey(){return gh.computePublicKey(Y(this,cl),!0)}sign(e){$e(dg(e)===32,"invalid digest length","digest",e);const r=mf.sign(Fa(e),Fa(Y(this,cl)),{lowS:!0});return $c.from({r:Dl(r.r,32),s:Dl(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=gh.computePublicKey(e);return xt(mf.getSharedSecret(Fa(Y(this,cl)),Gt(r),!1))}static computePublicKey(e,r){let n=Gt(e,"key");if(n.length===32){const a=mf.getPublicKey(n,!!r);return xt(a)}if(n.length===64){const a=new Uint8Array(65);a[0]=4,a.set(n,1),n=a}const i=mf.ProjectivePoint.fromHex(n);return xt(i.toRawBytes(r))}static recoverPublicKey(e,r){$e(dg(e)===32,"invalid digest length","digest",e);const n=$c.from(r);let i=mf.Signature.fromCompact(Fa(Gn([n.r,n.s])));i=i.addRecoveryBit(n.yParity);const a=i.recoverPublicKey(Fa(e));return $e(a!=null,"invalid signautre for digest","signature",r),"0x"+a.toHex(!1)}static addPoints(e,r,n){const i=mf.ProjectivePoint.fromHex(gh.computePublicKey(e).substring(2)),a=mf.ProjectivePoint.fromHex(gh.computePublicKey(r).substring(2));return"0x"+i.add(a).toHex(!!n)}};cl=new WeakMap;let wu=gh;const Obe=BigInt(0),Pbe=BigInt(36);function AB(t){t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=Gt(zn(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const s$={};for(let t=0;t<10;t++)s$[String(t)]=String(t);for(let t=0;t<26;t++)s$[String.fromCharCode(65+t)]=String(10+t);const SB=15;function Tbe(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>s$[n]).join("");for(;e.length>=SB;){let n=e.substring(0,SB);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}const Rbe=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function Cbe(t){t=t.toLowerCase();let e=Obe;for(let r=0;r<t.length;r++)e=e*Pbe+Rbe[t[r]];return e}function ln(t){if($e(typeof t=="string","invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);const e=AB(t);return $e(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,"bad address checksum","address",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){$e(t.substring(2,4)===Tbe(t),"bad icap checksum","address",t);let e=Cbe(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return AB("0x"+e)}$e(!1,"invalid address","address",t)}function Nbe(t){const e=ln(t.from);let n=or(t.nonce,"tx.nonce").toString(16);return n==="0"?n="0x":n.length%2?n="0x0"+n:n="0x"+n,ln(Qn(zn(w1([e,n])),12))}function gee(t){return t&&typeof t.getAddress=="function"}async function dP(t,e){const r=await e;return(r==null||r==="0x0000000000000000000000000000000000000000")&&(ct(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),$e(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),ln(r)}function ya(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?ln(t):(ct(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),dP(t,e.resolveName(t)));if(gee(t))return dP(t,t.getAddress());if(t&&typeof t.then=="function")return dP(t,t);$e(!1,"unsupported addressable value","target",t)}const Zu={};function jt(t,e){let r=!1;return e<0&&(r=!0,e*=-1),new Ha(Zu,`${r?"":"u"}int${e}`,t,{signed:r,width:e})}function vn(t,e){return new Ha(Zu,`bytes${e||""}`,t,{size:e})}const IB=Symbol.for("_ethers_typed");var Lh;const tl=class tl{constructor(e,r,n,i){He(this,"type");He(this,"value");Ze(this,Lh,void 0);He(this,"_typedSymbol");i==null&&(i=null),xp(Zu,e,"Typed"),Zt(this,{_typedSymbol:IB,type:r,value:n}),Te(this,Lh,i),this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(e=>e.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return Y(this,Lh)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return Y(this,Lh)===!0?-1:Y(this,Lh)===!1?this.value.length:null}static from(e,r){return new tl(Zu,e,r)}static uint8(e){return jt(e,8)}static uint16(e){return jt(e,16)}static uint24(e){return jt(e,24)}static uint32(e){return jt(e,32)}static uint40(e){return jt(e,40)}static uint48(e){return jt(e,48)}static uint56(e){return jt(e,56)}static uint64(e){return jt(e,64)}static uint72(e){return jt(e,72)}static uint80(e){return jt(e,80)}static uint88(e){return jt(e,88)}static uint96(e){return jt(e,96)}static uint104(e){return jt(e,104)}static uint112(e){return jt(e,112)}static uint120(e){return jt(e,120)}static uint128(e){return jt(e,128)}static uint136(e){return jt(e,136)}static uint144(e){return jt(e,144)}static uint152(e){return jt(e,152)}static uint160(e){return jt(e,160)}static uint168(e){return jt(e,168)}static uint176(e){return jt(e,176)}static uint184(e){return jt(e,184)}static uint192(e){return jt(e,192)}static uint200(e){return jt(e,200)}static uint208(e){return jt(e,208)}static uint216(e){return jt(e,216)}static uint224(e){return jt(e,224)}static uint232(e){return jt(e,232)}static uint240(e){return jt(e,240)}static uint248(e){return jt(e,248)}static uint256(e){return jt(e,256)}static uint(e){return jt(e,256)}static int8(e){return jt(e,-8)}static int16(e){return jt(e,-16)}static int24(e){return jt(e,-24)}static int32(e){return jt(e,-32)}static int40(e){return jt(e,-40)}static int48(e){return jt(e,-48)}static int56(e){return jt(e,-56)}static int64(e){return jt(e,-64)}static int72(e){return jt(e,-72)}static int80(e){return jt(e,-80)}static int88(e){return jt(e,-88)}static int96(e){return jt(e,-96)}static int104(e){return jt(e,-104)}static int112(e){return jt(e,-112)}static int120(e){return jt(e,-120)}static int128(e){return jt(e,-128)}static int136(e){return jt(e,-136)}static int144(e){return jt(e,-144)}static int152(e){return jt(e,-152)}static int160(e){return jt(e,-160)}static int168(e){return jt(e,-168)}static int176(e){return jt(e,-176)}static int184(e){return jt(e,-184)}static int192(e){return jt(e,-192)}static int200(e){return jt(e,-200)}static int208(e){return jt(e,-208)}static int216(e){return jt(e,-216)}static int224(e){return jt(e,-224)}static int232(e){return jt(e,-232)}static int240(e){return jt(e,-240)}static int248(e){return jt(e,-248)}static int256(e){return jt(e,-256)}static int(e){return jt(e,-256)}static bytes1(e){return vn(e,1)}static bytes2(e){return vn(e,2)}static bytes3(e){return vn(e,3)}static bytes4(e){return vn(e,4)}static bytes5(e){return vn(e,5)}static bytes6(e){return vn(e,6)}static bytes7(e){return vn(e,7)}static bytes8(e){return vn(e,8)}static bytes9(e){return vn(e,9)}static bytes10(e){return vn(e,10)}static bytes11(e){return vn(e,11)}static bytes12(e){return vn(e,12)}static bytes13(e){return vn(e,13)}static bytes14(e){return vn(e,14)}static bytes15(e){return vn(e,15)}static bytes16(e){return vn(e,16)}static bytes17(e){return vn(e,17)}static bytes18(e){return vn(e,18)}static bytes19(e){return vn(e,19)}static bytes20(e){return vn(e,20)}static bytes21(e){return vn(e,21)}static bytes22(e){return vn(e,22)}static bytes23(e){return vn(e,23)}static bytes24(e){return vn(e,24)}static bytes25(e){return vn(e,25)}static bytes26(e){return vn(e,26)}static bytes27(e){return vn(e,27)}static bytes28(e){return vn(e,28)}static bytes29(e){return vn(e,29)}static bytes30(e){return vn(e,30)}static bytes31(e){return vn(e,31)}static bytes32(e){return vn(e,32)}static address(e){return new tl(Zu,"address",e)}static bool(e){return new tl(Zu,"bool",!!e)}static bytes(e){return new tl(Zu,"bytes",e)}static string(e){return new tl(Zu,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new tl(Zu,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===IB}static dereference(e,r){if(tl.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Lh=new WeakMap;let Ha=tl;class Dbe extends Fl{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=Ha.dereference(r,"string");try{n=ln(n)}catch(i){return this._throwError(i.message,r)}return e.writeValue(n)}decode(e){return ln(Dl(e.readValue(),20))}}class $be extends Fl{constructor(r){super(r.name,r.type,"_",r.dynamic);He(this,"coder");this.coder=r}defaultValue(){return this.coder.defaultValue()}encode(r,n){return this.coder.encode(r,n)}decode(r){return this.coder.decode(r)}}function yee(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(u=>{const f=u.localName;return ct(f,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:r}),ct(!c[f],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:r}),c[f]=!0,r[f]})}else $e(!1,"invalid tuple value","tuple",r);$e(e.length===n.length,"types/value length mismatch","tuple",r);let i=new n8,a=new n8,o=[];e.forEach((c,u)=>{let f=n[u];if(c.dynamic){let d=a.length;c.encode(a,f);let g=i.writeUpdatableValue();o.push(m=>{g(m+d)})}else c.encode(i,f)}),o.forEach(c=>{c(i.length)});let s=t.appendWriter(i);return s+=t.appendWriter(a),s}function mee(t,e){let r=[],n=[],i=t.subReader(0);return e.forEach(a=>{let o=null;if(a.dynamic){let s=t.readIndex(),c=i.subReader(s);try{o=a.decode(c)}catch(u){if(Us(u,"BUFFER_OVERRUN"))throw u;o=u,o.baseType=a.name,o.name=a.localName,o.type=a.type}}else try{o=a.decode(t)}catch(s){if(Us(s,"BUFFER_OVERRUN"))throw s;o=s,o.baseType=a.name,o.name=a.localName,o.type=a.type}if(o==null)throw new Error("investigate");r.push(o),n.push(a.localName||null)}),pA.fromItems(r,n)}class Mbe extends Fl{constructor(r,n,i){const a=r.type+"["+(n>=0?n:"")+"]",o=n===-1||r.dynamic;super("array",a,i,o);He(this,"coder");He(this,"length");Zt(this,{coder:r,length:n})}defaultValue(){const r=this.coder.defaultValue(),n=[];for(let i=0;i<this.length;i++)n.push(r);return n}encode(r,n){const i=Ha.dereference(n,"array");Array.isArray(i)||this._throwError("expected array value",i);let a=this.length;a===-1&&(a=i.length,r.writeValue(i.length)),nZ(i.length,a,"coder array"+(this.localName?" "+this.localName:""));let o=[];for(let s=0;s<i.length;s++)o.push(this.coder);return yee(r,o,i)}decode(r){let n=this.length;n===-1&&(n=r.readIndex(),ct(n*io<=r.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:r.bytes,offset:n*io,length:r.dataLength}));let i=[];for(let a=0;a<n;a++)i.push(new $be(this.coder));return mee(r,i)}}class kbe extends Fl{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,r){const n=Ha.dereference(r,"bool");return e.writeValue(n?1:0)}decode(e){return!!e.readValue()}}class vee extends Fl{constructor(e,r){super(e,e,r,!0)}defaultValue(){return"0x"}encode(e,r){r=Fa(r);let n=e.writeValue(r.length);return n+=e.writeBytes(r),n}decode(e){return e.readBytes(e.readIndex(),!0)}}class Lbe extends vee{constructor(e){super("bytes",e)}decode(e){return xt(super.decode(e))}}class Ube extends Fl{constructor(r,n){let i="bytes"+String(r);super(i,i,n,!1);He(this,"size");Zt(this,{size:r},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(r,n){let i=Fa(Ha.dereference(n,this.type));return i.length!==this.size&&this._throwError("incorrect data length",n),r.writeBytes(i)}decode(r){return xt(r.readBytes(this.size))}}const Bbe=new Uint8Array([]);class Fbe extends Fl{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes(Bbe)}decode(e){return e.readBytes(0),null}}const jbe=BigInt(0),qbe=BigInt(1),Hbe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class Vbe extends Fl{constructor(r,n,i){const a=(n?"int":"uint")+r*8;super(a,a,i,!1);He(this,"size");He(this,"signed");Zt(this,{size:r,signed:n},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(r,n){let i=or(Ha.dereference(n,this.type)),a=cb(Hbe,io*8);if(this.signed){let o=cb(a,this.size*8-1);(i>o||i<-(o+qbe))&&this._throwError("value out-of-bounds",n),i=cZ(i,8*io)}else(i<jbe||i>cb(a,this.size*8))&&this._throwError("value out-of-bounds",n);return r.writeValue(i)}decode(r){let n=cb(r.readValue(),this.size*8);return this.signed&&(n=Eme(n,this.size*8)),n}}class zbe extends vee{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,so(Ha.dereference(r,"string")))}decode(e){return WD(super.decode(e))}}class tE extends Fl{constructor(r,n){let i=!1;const a=[];r.forEach(s=>{s.dynamic&&(i=!0),a.push(s.type)});const o="tuple("+a.join(",")+")";super("tuple",o,n,i);He(this,"coders");Zt(this,{coders:Object.freeze(r.slice())})}defaultValue(){const r=[];this.coders.forEach(i=>{r.push(i.defaultValue())});const n=this.coders.reduce((i,a)=>{const o=a.localName;return o&&(i[o]||(i[o]=0),i[o]++),i},{});return this.coders.forEach((i,a)=>{let o=i.localName;!o||n[o]!==1||(o==="length"&&(o="_length"),r[o]==null&&(r[o]=r[a]))}),Object.freeze(r)}encode(r,n){const i=Ha.dereference(n,"tuple");return yee(r,this.coders,i)}decode(r){return mee(r,this.coders)}}function $l(t){return zn(so(t))}var Gbe="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const OB=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),PB=4;function Wbe(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,a=[0,1];for(let I=1;I<n;I++)a.push(i+=r());let o=r(),s=e;e+=o;let c=0,u=0;function f(){return c==0&&(u=u<<8|t[e++],c=8),u>>--c&1}const d=31,g=2**d,m=g>>>1,w=m>>1,v=g-1;let y=0;for(let I=0;I<d;I++)y=y<<1|f();let _=[],b=0,S=g;for(;;){let I=Math.floor(((y-b+1)*i-1)/S),E=0,p=n;for(;p-E>1;){let M=E+p>>>1;I<a[M]?p=M:E=M}if(E==0)break;_.push(E);let O=b+Math.floor(S*a[E]/i),C=b+Math.floor(S*a[E+1]/i)-1;for(;!((O^C)&m);)y=y<<1&v|f(),O=O<<1&v,C=C<<1&v|1;for(;O&~C&w;)y=y&m|y<<1&v>>>1|f(),O=O<<1^m,C=(C^m)<<1|m|1;b=O,S=1+C-O}let x=n-4;return _.map(I=>{switch(I-x){case 3:return x+65792+(t[s++]<<16|t[s++]<<8|t[s++]);case 2:return x+256+(t[s++]<<8|t[s++]);case 1:return x+t[s++];default:return I-1}})}function Kbe(t){let e=0;return()=>t[e++]}function bee(t){return Kbe(Wbe(Ybe(t)))}function Ybe(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,a)=>e[i.charCodeAt(0)]=a);let r=t.length,n=new Uint8Array(6*r>>3);for(let i=0,a=0,o=0,s=0;i<r;i++)s=s<<6|e[t.charCodeAt(i)],o+=6,o>=8&&(n[a++]=s>>(o-=8));return n}function Qbe(t){return t&1?~t>>1:t>>1}function Jbe(t,e){let r=Array(t);for(let n=0,i=0;n<t;n++)r[n]=i+=Qbe(e());return r}function E1(t,e=0){let r=[];for(;;){let n=t(),i=t();if(!i)break;e+=n;for(let a=0;a<i;a++)r.push(e+a);e+=i+1}return r}function wee(t){return x1(()=>{let e=E1(t);if(e.length)return e})}function _ee(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(Xbe(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Zbe(r,t))}return e.flat()}function x1(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function Eee(t,e,r){let n=Array(t).fill().map(()=>[]);for(let i=0;i<e;i++)Jbe(t,r).forEach((a,o)=>n[o].push(a));return n}function Xbe(t,e){let r=1+e(),n=e(),i=x1(e);return Eee(i.length,1+t,e).flatMap((o,s)=>{let[c,...u]=o;return Array(i[s]).fill().map((f,d)=>{let g=d*n;return[c+d*r,u.map(m=>m+g)]})})}function Zbe(t,e){let r=1+e();return Eee(r,1+t,e).map(i=>[i[0],i.slice(1)])}function e1e(t){let e=[],r=E1(t);return i(n([]),[]),e;function n(a){let o=t(),s=x1(()=>{let c=E1(t).map(u=>r[u]);if(c.length)return n(c)});return{S:o,B:s,Q:a}}function i({S:a,B:o},s,c){if(!(a&4&&c===s[s.length-1])){a&2&&(c=s[s.length-1]),a&1&&e.push(s);for(let u of o)for(let f of u.Q)i(u,[...s,f],c)}}}function t1e(t){return t.toString(16).toUpperCase().padStart(2,"0")}function xee(t){return`{${t1e(t)}}`}function r1e(t){let e=[];for(let r=0,n=t.length;r<n;){let i=t.codePointAt(r);r+=i<65536?1:2,e.push(i)}return e}function xy(t){let r=t.length;if(r<4096)return String.fromCodePoint(...t);let n=[];for(let i=0;i<r;)n.push(String.fromCodePoint(...t.slice(i,i+=4096)));return n.join("")}function n1e(t,e){let r=t.length,n=r-e.length;for(let i=0;n==0&&i<r;i++)n=t[i]-e[i];return n}var i1e="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g";const A1=44032,gA=4352,yA=4449,mA=4519,Aee=19,See=21,Ay=28,vA=See*Ay,a1e=Aee*vA,o1e=A1+a1e,s1e=gA+Aee,c1e=yA+See,u1e=mA+Ay;function lb(t){return t>>24&255}function Iee(t){return t&16777215}let f8,TB,d8,ax;function l1e(){let t=bee(i1e);f8=new Map(wee(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),TB=new Set(E1(t)),d8=new Map,ax=new Map;for(let[e,r]of _ee(t)){if(!TB.has(e)&&r.length==2){let[n,i]=r,a=ax.get(n);a||(a=new Map,ax.set(n,a)),a.set(i,e)}d8.set(e,r.reverse())}}function Oee(t){return t>=A1&&t<o1e}function f1e(t,e){if(t>=gA&&t<s1e&&e>=yA&&e<c1e)return A1+(t-gA)*vA+(e-yA)*Ay;if(Oee(t)&&e>mA&&e<u1e&&(t-A1)%Ay==0)return t+(e-mA);{let r=ax.get(t);return r&&(r=r.get(e),r)?r:-1}}function Pee(t){f8||l1e();let e=[],r=[],n=!1;function i(a){let o=f8.get(a);o&&(n=!0,a|=o),e.push(a)}for(let a of t)for(;;){if(a<128)e.push(a);else if(Oee(a)){let o=a-A1,s=o/vA|0,c=o%vA/Ay|0,u=o%Ay;i(gA+s),i(yA+c),u>0&&i(mA+u)}else{let o=d8.get(a);o?r.push(...o):i(a)}if(!r.length)break;a=r.pop()}if(n&&e.length>1){let a=lb(e[0]);for(let o=1;o<e.length;o++){let s=lb(e[o]);if(s==0||a<=s){a=s;continue}let c=o-1;for(;;){let u=e[c+1];if(e[c+1]=e[c],e[c]=u,!c||(a=lb(e[--c]),a<=s))break}a=lb(e[o])}}return e}function d1e(t){let e=[],r=[],n=-1,i=0;for(let a of t){let o=lb(a),s=Iee(a);if(n==-1)o==0?n=s:e.push(s);else if(i>0&&i>=o)o==0?(e.push(n,...r),r.length=0,n=s):r.push(s),i=o;else{let c=f1e(n,s);c>=0?n=c:i==0&&o==0?(e.push(n),n=s):(r.push(s),i=o)}}return n>=0&&e.push(n,...r),e}function Tee(t){return Pee(t).map(Iee)}function h1e(t){return d1e(Pee(t))}const RB=45,Ree=".",Cee=65039,Nee=1,W0=t=>Array.from(t);function S1(t,e){return t.P.has(e)||t.Q.has(e)}class p1e extends Array{get is_emoji(){return!0}}let h8,Dee,xh,p8,$ee,pg,hP,P0,Mee,CB,g8;function c$(){if(h8)return;let t=bee(Gbe);const e=()=>E1(t),r=()=>new Set(e());h8=new Map(_ee(t)),Dee=r(),xh=e(),p8=new Set(e().map(f=>xh[f])),xh=new Set(xh),$ee=r(),r();let n=wee(t),i=t();const a=()=>new Set(e().flatMap(f=>n[f]).concat(e()));pg=x1(f=>{let d=x1(t).map(g=>g+96);if(d.length){let g=f>=i;d[0]-=32,d=xy(d),g&&(d=`Restricted[${d}]`);let m=a(),w=a(),v=!t();return{N:d,P:m,Q:w,M:v,R:g}}}),hP=r(),P0=new Map;let o=e().concat(W0(hP)).sort((f,d)=>f-d);o.forEach((f,d)=>{let g=t(),m=o[d]=g?o[d-g]:{V:[],M:new Map};m.V.push(f),hP.has(f)||P0.set(f,m)});for(let{V:f,M:d}of new Set(P0.values())){let g=[];for(let w of f){let v=pg.filter(_=>S1(_,w)),y=g.find(({G:_})=>v.some(b=>_.has(b)));y||(y={G:new Set,V:[]},g.push(y)),y.V.push(w),v.forEach(_=>y.G.add(_))}let m=g.flatMap(w=>W0(w.G));for(let{G:w,V:v}of g){let y=new Set(m.filter(_=>!w.has(_)));for(let _ of v)d.set(_,y)}}let s=new Set,c=new Set;const u=f=>s.has(f)?c.add(f):s.add(f);for(let f of pg){for(let d of f.P)u(d);for(let d of f.Q)u(d)}for(let f of s)!P0.has(f)&&!c.has(f)&&P0.set(f,Nee);Mee=new Set(W0(s).concat(W0(Tee(s)))),CB=e1e(t).map(f=>p1e.from(f)).sort(n1e),g8=new Map;for(let f of CB){let d=[g8];for(let g of f){let m=d.map(w=>{let v=w.get(g);return v||(v=new Map,w.set(g,v)),v});g===Cee?d.push(...m):d=m}for(let g of d)g.V=f}}function u$(t){return(kee(t)?"":`${l$(W2([t]))} `)+xee(t)}function l$(t){return`"${t}"`}function g1e(t){if(t.length>=4&&t[2]==RB&&t[3]==RB)throw new Error(`invalid label extension: "${xy(t.slice(0,4))}"`)}function y1e(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function m1e(t){let e=t[0],r=OB.get(e);if(r)throw Ub(`leading ${r}`);let n=t.length,i=-1;for(let a=1;a<n;a++){e=t[a];let o=OB.get(e);if(o){if(i==a)throw Ub(`${r} + ${o}`);i=a+1,r=o}}if(i==n)throw Ub(`trailing ${r}`)}function W2(t,e=xee){let r=[];v1e(t[0])&&r.push("◌");let n=0,i=t.length;for(let a=0;a<i;a++){let o=t[a];kee(o)&&(r.push(xy(t.slice(n,a))),r.push(e(o)),n=a+1)}return r.push(xy(t.slice(n,i))),r.join("")}function v1e(t){return c$(),xh.has(t)}function kee(t){return c$(),$ee.has(t)}function b1e(t){return x1e(w1e(t,h1e,I1e))}function w1e(t,e,r){if(!t)return[];c$();let n=0;return t.split(Ree).map(i=>{let a=r1e(i),o={input:a,offset:n};n+=a.length+1;try{let s=o.tokens=S1e(a,e,r),c=s.length,u;if(!c)throw new Error("empty label");let f=o.output=s.flat();if(y1e(f),!(o.emoji=c>1||s[0].is_emoji)&&f.every(g=>g<128))g1e(f),u="ASCII";else{let g=s.flatMap(m=>m.is_emoji?[]:m);if(!g.length)u="Emoji";else{if(xh.has(f[0]))throw Ub("leading combining mark");for(let v=1;v<c;v++){let y=s[v];if(!y.is_emoji&&xh.has(y[0]))throw Ub(`emoji + combining mark: "${xy(s[v-1])} + ${W2([y[0]])}"`)}m1e(f);let m=W0(new Set(g)),[w]=E1e(m);A1e(w,g),_1e(w,m),u=w.N}}o.type=u}catch(s){o.error=s}return o})}function _1e(t,e){let r,n=[];for(let i of e){let a=P0.get(i);if(a===Nee)return;if(a){let o=a.M.get(i);if(r=r?r.filter(s=>o.has(s)):W0(o),!r.length)return}else n.push(i)}if(r){for(let i of r)if(n.every(a=>S1(i,a)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function E1e(t){let e=pg;for(let r of t){let n=e.filter(i=>S1(i,r));if(!n.length)throw pg.some(i=>S1(i,r))?Uee(e[0],r):Lee(r);if(e=n,n.length==1)break}return e}function x1e(t){return t.map(({input:e,error:r,output:n})=>{if(r){let i=r.message;throw new Error(t.length==1?i:`Invalid label ${l$(W2(e))}: ${i}`)}return xy(n)}).join(Ree)}function Lee(t){return new Error(`disallowed character: ${u$(t)}`)}function Uee(t,e){let r=u$(e),n=pg.find(i=>i.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function Ub(t){return new Error(`illegal placement: ${t}`)}function A1e(t,e){for(let r of e)if(!S1(t,r))throw Uee(t,r);if(t.M){let r=Tee(e);for(let n=1,i=r.length;n<i;n++)if(p8.has(r[n])){let a=n+1;for(let o;a<i&&p8.has(o=r[a]);a++)for(let s=n;s<a;s++)if(r[s]==o)throw new Error(`duplicate non-spacing marks: ${u$(o)}`);if(a-n>PB)throw new Error(`excessive non-spacing marks: ${l$(W2(r.slice(n-1,a)))} (${a-n}/${PB})`);n=a}}}function S1e(t,e,r){let n=[],i=[];for(t=t.slice().reverse();t.length;){let a=O1e(t);if(a)i.length&&(n.push(e(i)),i=[]),n.push(r(a));else{let o=t.pop();if(Mee.has(o))i.push(o);else{let s=h8.get(o);if(s)i.push(...s);else if(!Dee.has(o))throw Lee(o)}}}return i.length&&n.push(e(i)),n}function I1e(t){return t.filter(e=>e!=Cee)}function O1e(t,e){let r=g8,n,i=t.length;for(;i&&(r=r.get(t[--i]),!!r);){let{V:a}=r;a&&(n=a,e&&e.push(...t.slice(i).reverse()),t.length=i)}return n}const Bee=new Uint8Array(32);Bee.fill(0);function NB(t){return $e(t.length!==0,"invalid ENS name; empty component","comp",t),t}function Fee(t){const e=so(P1e(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i<e.length;i++)e[i]===46&&(r.push(NB(e.slice(n,i))),n=i+1);return $e(n<e.length,"invalid ENS name; empty component","name",t),r.push(NB(e.slice(n))),r}function P1e(t){try{if(t.length===0)throw new Error("empty label");return b1e(t)}catch(e){$e(!1,`invalid ENS name (${e.message})`,"name",t)}}function y8(t){$e(typeof t=="string","invalid ENS name; not a string","name",t),$e(t.length,"invalid ENS name (empty label)","name",t);let e=Bee;const r=Fee(t);for(;r.length;)e=zn(Gn([e,zn(r.pop())]));return xt(e)}function T1e(t){return xt(Gn(Fee(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}function pP(t,e){return{address:ln(t),storageKeys:e.map((r,n)=>($e(di(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function Ap(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?($e(r.length===2,"invalid slot set",`value[${n}]`,r),pP(r[0],r[1])):($e(r!=null&&typeof r=="object","invalid address-slot set","value",t),pP(r.address,r.storageKeys)));$e(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,a)=>(i[a]=!0,i),{});return pP(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function _w(t){let e;return typeof t=="string"?e=wu.computePublicKey(t,!1):e=t.publicKey,ln(zn("0x"+e.substring(4)).substring(26))}function R1e(t,e){return _w(wu.recoverPublicKey(t,e))}const Po=BigInt(0),C1e=BigInt(2),N1e=BigInt(27),D1e=BigInt(28),$1e=BigInt(35),M1e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function f$(t){return t==="0x"?null:ln(t)}function jee(t,e){try{return Ap(t)}catch(r){$e(!1,r.message,e,t)}}function K2(t,e){return t==="0x"?0:Gr(t,e)}function eo(t,e){if(t==="0x")return Po;const r=or(t,e);return $e(r<=M1e,"value exceeds uint size",e,r),r}function da(t,e){const r=or(t,"value"),n=Co(r);return $e(n.length<=32,"value too large",`tx.${e}`,r),n}function qee(t){return Ap(t).map(e=>[e.address,e.storageKeys])}function k1e(t){const e=KD(t);$e(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);const r={type:0,nonce:K2(e[0],"nonce"),gasPrice:eo(e[1],"gasPrice"),gasLimit:eo(e[2],"gasLimit"),to:f$(e[3]),value:eo(e[4],"value"),data:xt(e[5]),chainId:Po};if(e.length===6)return r;const n=eo(e[6],"v"),i=eo(e[7],"r"),a=eo(e[8],"s");if(i===Po&&a===Po)r.chainId=n;else{let o=(n-$1e)/C1e;o<Po&&(o=Po),r.chainId=o,$e(o!==Po||n===N1e||n===D1e,"non-canonical legacy v","v",e[6]),r.signature=$c.from({r:sp(e[7],32),s:sp(e[8],32),v:n}),r.hash=zn(t)}return r}function DB(t,e){const r=[da(t.nonce||0,"nonce"),da(t.gasPrice||0,"gasPrice"),da(t.gasLimit||0,"gasLimit"),t.to!=null?ln(t.to):"0x",da(t.value||0,"value"),t.data||"0x"];let n=Po;if(t.chainId!=Po)n=or(t.chainId,"tx.chainId"),$e(!e||e.networkV==null||e.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",e);else if(t.signature){const a=t.signature.legacyChainId;a!=null&&(n=a)}if(!e)return n!==Po&&(r.push(Co(n)),r.push("0x"),r.push("0x")),w1(r);let i=BigInt(27+e.yParity);return n!==Po?i=$c.getChainIdV(n,e.v):BigInt(e.v)!==i&&$e(!1,"tx.chainId/sig.v mismatch","sig",e),r.push(Co(i)),r.push(Co(e.r)),r.push(Co(e.s)),w1(r)}function Hee(t,e){let r;try{if(r=K2(e[0],"yParity"),r!==0&&r!==1)throw new Error("bad yParity")}catch{$e(!1,"invalid yParity","yParity",e[0])}const n=sp(e[1],32),i=sp(e[2],32),a=$c.from({r:n,s:i,yParity:r});t.signature=a}function L1e(t){const e=KD(Gt(t).slice(1));$e(Array.isArray(e)&&(e.length===9||e.length===12),"invalid field count for transaction type: 2","data",xt(t));const r=eo(e[2],"maxPriorityFeePerGas"),n=eo(e[3],"maxFeePerGas"),i={type:2,chainId:eo(e[0],"chainId"),nonce:K2(e[1],"nonce"),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:eo(e[4],"gasLimit"),to:f$(e[5]),value:eo(e[6],"value"),data:xt(e[7]),accessList:jee(e[8],"accessList")};return e.length===9||(i.hash=zn(t),Hee(i,e.slice(9))),i}function $B(t,e){const r=[da(t.chainId||0,"chainId"),da(t.nonce||0,"nonce"),da(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),da(t.maxFeePerGas||0,"maxFeePerGas"),da(t.gasLimit||0,"gasLimit"),t.to!=null?ln(t.to):"0x",da(t.value||0,"value"),t.data||"0x",qee(t.accessList||[])];return e&&(r.push(da(e.yParity,"yParity")),r.push(Co(e.r)),r.push(Co(e.s))),Gn(["0x02",w1(r)])}function U1e(t){const e=KD(Gt(t).slice(1));$e(Array.isArray(e)&&(e.length===8||e.length===11),"invalid field count for transaction type: 1","data",xt(t));const r={type:1,chainId:eo(e[0],"chainId"),nonce:K2(e[1],"nonce"),gasPrice:eo(e[2],"gasPrice"),gasLimit:eo(e[3],"gasLimit"),to:f$(e[4]),value:eo(e[5],"value"),data:xt(e[6]),accessList:jee(e[7],"accessList")};return e.length===8||(r.hash=zn(t),Hee(r,e.slice(8))),r}function MB(t,e){const r=[da(t.chainId||0,"chainId"),da(t.nonce||0,"nonce"),da(t.gasPrice||0,"gasPrice"),da(t.gasLimit||0,"gasLimit"),t.to!=null?ln(t.to):"0x",da(t.value||0,"value"),t.data||"0x",qee(t.accessList||[])];return e&&(r.push(da(e.yParity,"recoveryParam")),r.push(Co(e.r)),r.push(Co(e.s))),Gn(["0x01",w1(r)])}var ul,kg,Lg,Ug,Bg,Fg,jg,qg,Hg,Vg,zg,Gg;const Af=class Af{constructor(){Ze(this,ul,void 0);Ze(this,kg,void 0);Ze(this,Lg,void 0);Ze(this,Ug,void 0);Ze(this,Bg,void 0);Ze(this,Fg,void 0);Ze(this,jg,void 0);Ze(this,qg,void 0);Ze(this,Hg,void 0);Ze(this,Vg,void 0);Ze(this,zg,void 0);Ze(this,Gg,void 0);Te(this,ul,null),Te(this,kg,null),Te(this,Ug,0),Te(this,Bg,BigInt(0)),Te(this,Fg,null),Te(this,jg,null),Te(this,qg,null),Te(this,Lg,"0x"),Te(this,Hg,BigInt(0)),Te(this,Vg,BigInt(0)),Te(this,zg,null),Te(this,Gg,null)}get type(){return Y(this,ul)}set type(e){switch(e){case null:Te(this,ul,null);break;case 0:case"legacy":Te(this,ul,0);break;case 1:case"berlin":case"eip-2930":Te(this,ul,1);break;case 2:case"london":case"eip-1559":Te(this,ul,2);break;default:$e(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559"}return null}get to(){return Y(this,kg)}set to(e){Te(this,kg,e==null?null:ln(e))}get nonce(){return Y(this,Ug)}set nonce(e){Te(this,Ug,Gr(e,"value"))}get gasLimit(){return Y(this,Bg)}set gasLimit(e){Te(this,Bg,or(e))}get gasPrice(){const e=Y(this,Fg);return e==null&&(this.type===0||this.type===1)?Po:e}set gasPrice(e){Te(this,Fg,e==null?null:or(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=Y(this,jg);return e??(this.type===2?Po:null)}set maxPriorityFeePerGas(e){Te(this,jg,e==null?null:or(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=Y(this,qg);return e??(this.type===2?Po:null)}set maxFeePerGas(e){Te(this,qg,e==null?null:or(e,"maxFeePerGas"))}get data(){return Y(this,Lg)}set data(e){Te(this,Lg,xt(e))}get value(){return Y(this,Hg)}set value(e){Te(this,Hg,or(e,"value"))}get chainId(){return Y(this,Vg)}set chainId(e){Te(this,Vg,or(e))}get signature(){return Y(this,zg)||null}set signature(e){Te(this,zg,e==null?null:$c.from(e))}get accessList(){const e=Y(this,Gg)||null;return e??(this.type===1||this.type===2?[]:null)}set accessList(e){Te(this,Gg,e==null?null:Ap(e))}get hash(){return this.signature==null?null:zn(this.serialized)}get unsignedHash(){return zn(this.unsignedSerialized)}get from(){return this.signature==null?null:R1e(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:wu.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){switch(ct(this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"}),this.inferType()){case 0:return DB(this,this.signature);case 1:return MB(this,this.signature);case 2:return $B(this,this.signature)}ct(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get unsignedSerialized(){switch(this.inferType()){case 0:return DB(this);case 1:return MB(this);case 2:return $B(this)}ct(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".unsignedSerialized"})}inferType(){return this.inferTypes().pop()}inferTypes(){const e=this.gasPrice!=null,r=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null;this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&ct(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),ct(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),ct(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):r?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(i.push(0),i.push(1),i.push(2)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}clone(){return Af.from(this)}toJSON(){const e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Af;if(typeof e=="string"){const n=Gt(e);if(n[0]>=127)return Af.from(k1e(n));switch(n[0]){case 1:return Af.from(U1e(n));case 2:return Af.from(L1e(n))}ct(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new Af;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=$c.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.hash!=null&&($e(r.isSigned(),"unsigned transaction cannot define hash","tx",e),$e(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&($e(r.isSigned(),"unsigned transaction cannot define from","tx",e),$e(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};ul=new WeakMap,kg=new WeakMap,Lg=new WeakMap,Ug=new WeakMap,Bg=new WeakMap,Fg=new WeakMap,jg=new WeakMap,qg=new WeakMap,Hg=new WeakMap,Vg=new WeakMap,zg=new WeakMap,Gg=new WeakMap;let I1=Af;function B1e(t){return typeof t=="string"&&(t=so(t)),zn(Gn([so(Ibe),so(String(t.length)),t]))}const Vee=new Uint8Array(32);Vee.fill(0);const F1e=BigInt(-1),zee=BigInt(0),Gee=BigInt(1),j1e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function q1e(t){const e=Gt(t),r=e.length%32;return r?Gn([e,Vee.slice(r)]):xt(e)}const H1e=Dl(Gee,32),V1e=Dl(zee,32),kB={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},gP=["name","version","chainId","verifyingContract","salt"];function LB(t){return function(e){return $e(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const z1e={name:LB("name"),version:LB("version"),chainId:function(t){const e=or(t,"domain.chainId");return $e(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):G0(e)},verifyingContract:function(t){try{return ln(t).toLowerCase()}catch{}$e(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=Gt(t,"domain.salt");return $e(e.length===32,'invalid domain value "salt"',"domain.salt",t),xt(e)}};function yP(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");$e(n%8===0&&n!==0&&n<=256&&(e[2]==null||e[2]===String(n)),"invalid numeric width","type",t);const i=cb(j1e,r?n-1:n),a=r?(i+Gee)*F1e:zee;return function(o){const s=or(o,"value");return $e(s>=a&&s<=i,`value out-of-bounds for ${t}`,"value",s),Dl(r?cZ(s,256):s,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return $e(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const i=Gt(n);return $e(i.length===r,`invalid length for ${t}`,"value",n),q1e(n)}}}switch(t){case"address":return function(e){return sp(ln(e),32)};case"bool":return function(e){return e?H1e:V1e};case"bytes":return function(e){return zn(e)};case"string":return function(e){return $l(e)}}return null}function UB(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}var K1,ll,Wg,y2,Wee;const Ss=class Ss{constructor(e){Ze(this,y2);He(this,"primaryType");Ze(this,K1,void 0);Ze(this,ll,void 0);Ze(this,Wg,void 0);Te(this,K1,JSON.stringify(e)),Te(this,ll,new Map),Te(this,Wg,new Map);const r=new Map,n=new Map,i=new Map;Object.keys(e).forEach(s=>{r.set(s,new Set),n.set(s,[]),i.set(s,new Set)});for(const s in e){const c=new Set;for(const u of e[s]){$e(!c.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(s)}`,"types",e),c.add(u.name);const f=u.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;$e(f!==s,`circular type reference to ${JSON.stringify(f)}`,"types",e),!yP(f)&&($e(n.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),n.get(f).push(s),r.get(s).add(f))}}const a=Array.from(n.keys()).filter(s=>n.get(s).length===0);$e(a.length!==0,"missing primary type","types",e),$e(a.length===1,`ambiguous primary types or unused types: ${a.map(s=>JSON.stringify(s)).join(", ")}`,"types",e),Zt(this,{primaryType:a[0]});function o(s,c){$e(!c.has(s),`circular type reference to ${JSON.stringify(s)}`,"types",e),c.add(s);for(const u of r.get(s))if(n.has(u)){o(u,c);for(const f of c)i.get(f).add(u)}c.delete(s)}o(this.primaryType,new Set);for(const[s,c]of i){const u=Array.from(c);u.sort(),Y(this,ll).set(s,UB(s,e[s])+u.map(f=>UB(f,e[f])).join(""))}}get types(){return JSON.parse(Y(this,K1))}getEncoder(e){let r=Y(this,Wg).get(e);return r||(r=Et(this,y2,Wee).call(this,e),Y(this,Wg).set(e,r)),r}encodeType(e){const r=Y(this,ll).get(e);return $e(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return zn(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(yP(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i)return $e(!i[3]||parseInt(i[3])===r.length,`array length mismatch; expected length ${parseInt(i[3])}`,"value",r),r.map(o=>this._visit(i[1],o,n));const a=this.types[e];if(a)return a.reduce((o,{name:s,type:c})=>(o[s]=this._visit(c,r[s],n),o),{});$e(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Ss(e)}static getPrimaryType(e){return Ss.from(e).primaryType}static hashStruct(e,r,n){return Ss.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const i=kB[n];$e(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>gP.indexOf(n.name)-gP.indexOf(i.name)),Ss.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Gn(["0x1901",Ss.hashDomain(e),Ss.from(r).hash(n)])}static hash(e,r,n){return zn(Ss.encode(e,r,n))}static async resolveNames(e,r,n,i){e=Object.assign({},e);for(const s in e)e[s]==null&&delete e[s];const a={};e.verifyingContract&&!di(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");const o=Ss.from(r);o.visit(n,(s,c)=>(s==="address"&&!di(c,20)&&(a[c]="0x"),c));for(const s in a)a[s]=await i(s);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=o.visit(n,(s,c)=>s==="address"&&a[c]?a[c]:c),{domain:e,value:n}}static getPayload(e,r,n){Ss.hashDomain(e);const i={},a=[];gP.forEach(c=>{const u=e[c];u!=null&&(i[c]=z1e[c](u),a.push({name:c,type:kB[c]}))});const o=Ss.from(r),s=Object.assign({},r);return $e(s.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),s.EIP712Domain=a,o.encode(n),{types:s,domain:i,primaryType:o.primaryType,message:o.visit(n,(c,u)=>{if(c.match(/^bytes(\d*)/))return xt(Gt(u));if(c.match(/^u?int/))return or(u).toString();switch(c){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return $e(typeof u=="string","invalid string","value",u),u}$e(!1,"unsupported type","type",c)})}}};K1=new WeakMap,ll=new WeakMap,Wg=new WeakMap,y2=new WeakSet,Wee=function(e){{const i=yP(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],a=this.getEncoder(i);return o=>{$e(!r[3]||parseInt(r[3])===o.length,`array length mismatch; expected length ${parseInt(r[3])}`,"value",o);let s=o.map(a);return Y(this,ll).has(i)&&(s=s.map(zn)),zn(Gn(s))}}const n=this.types[e];if(n){const i=$l(Y(this,ll).get(e));return a=>{const o=n.map(({name:s,type:c})=>{const u=this.getEncoder(c)(a[s]);return Y(this,ll).has(c)?zn(u):u});return o.unshift(i),Gn(o)}}$e(!1,`unknown type: ${e}`,"type",e)};let Sy=Ss;function ao(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const G1e="external public payable",W1e=ao(G1e.split(" ")),Kee="constant external internal payable private public pure view",K1e=ao(Kee.split(" ")),Yee="constructor error event fallback function receive struct",Qee=ao(Yee.split(" ")),Jee="calldata memory storage payable indexed",Y1e=ao(Jee.split(" ")),Q1e="tuple returns",J1e=[Yee,Jee,Q1e,Kee].join(" "),X1e=ao(J1e.split(" ")),Z1e={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},ewe=new RegExp("^(\\s*)"),twe=new RegExp("^([0-9]+)"),rwe=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),Xee=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),Zee=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var ca,bc,Y1,m8;const m2=class m2{constructor(e){Ze(this,Y1);Ze(this,ca,void 0);Ze(this,bc,void 0);Te(this,ca,0),Te(this,bc,e.slice())}get offset(){return Y(this,ca)}get length(){return Y(this,bc).length-Y(this,ca)}clone(){return new m2(Y(this,bc))}reset(){Te(this,ca,0)}popKeyword(e){const r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e)throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=Et(this,Y1,m8).call(this,Y(this,ca)+1,e.match+1);return Te(this,ca,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;Y(this,ca)<e.match-1;){const n=this.peek().linkNext;r.push(Et(this,Y1,m8).call(this,Y(this,ca)+1,n)),Te(this,ca,n)}return Te(this,ca,e.match+1),r}peek(){if(Y(this,ca)>=Y(this,bc).length)throw new Error("out-of-bounds");return Y(this,bc)[Y(this,ca)]}peekKeyword(e){const r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;const r=this.peek();return r.type===e?r.text:null}pop(){const e=this.peek();return Nm(this,ca)._++,e}toString(){const e=[];for(let r=Y(this,ca);r<Y(this,bc).length;r++){const n=Y(this,bc)[r];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(" ")}>`}};ca=new WeakMap,bc=new WeakMap,Y1=new WeakSet,m8=function(e=0,r=0){return new m2(Y(this,bc).slice(e,r).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let Mc=m2;function bd(t){const e=[],r=o=>{const s=a<t.length?JSON.stringify(t[a]):"$EOI";throw new Error(`invalid token ${s} at ${a}: ${o}`)};let n=[],i=[],a=0;for(;a<t.length;){let o=t.substring(a),s=o.match(ewe);s&&(a+=s[1].length,o=t.substring(a));const c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:a,value:-1};e.push(c);let u=Z1e[o[0]]||"";if(u){if(c.type=u,c.text=o[0],a++,u==="OPEN_PAREN")n.push(e.length-1),i.push(e.length-1);else if(u=="CLOSE_PAREN")n.length===0&&r("no matching open bracket"),c.match=n.pop(),e[c.match].match=e.length-1,c.depth--,c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1;else if(u==="COMMA")c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1,i.push(e.length-1);else if(u==="OPEN_BRACKET")c.type="BRACKET";else if(u==="CLOSE_BRACKET"){let f=e.pop().text;if(e.length>0&&e[e.length-1].type==="NUMBER"){const d=e.pop().text;f=d+f,e[e.length-1].value=Gr(d)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=f}continue}if(s=o.match(rwe),s){if(c.text=s[1],a+=c.text.length,X1e.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(Zee)){c.type="TYPE";continue}c.type="ID";continue}if(s=o.match(twe),s){c.text=s[1],c.type="NUMBER",a+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${a}`)}return new Mc(e.map(o=>Object.freeze(o)))}function BB(t,e){let r=[];for(const n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function Y2(t,e){if(e.peekKeyword(Qee)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function Ml(t,e){const r=new Set;for(;;){const n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function ete(t){let e=Ml(t,K1e);return BB(e,ao("constant payable nonpayable".split(" "))),BB(e,ao("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function Ol(t,e){return t.popParams().map(r=>ma.from(r,e))}function tte(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return or(t.pop().text);throw new Error("invalid gas")}return null}function cp(t){if(t.length)throw new Error(`unexpected tokens: ${t.toString()}`)}const nwe=new RegExp(/^(.*)\[([0-9]*)\]$/);function FB(t){const e=t.match(Zee);if($e(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);$e(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);$e(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const li={},Uo=Symbol.for("_ethers_internal"),jB="_ParamTypeInternal",qB="_ErrorInternal",HB="_EventInternal",VB="_ConstructorInternal",zB="_FallbackInternal",GB="_FunctionInternal",WB="_StructInternal";var Kg,ox;const Is=class Is{constructor(e,r,n,i,a,o,s,c){Ze(this,Kg);He(this,"name");He(this,"type");He(this,"baseType");He(this,"indexed");He(this,"components");He(this,"arrayLength");He(this,"arrayChildren");if(xp(e,li,"ParamType"),Object.defineProperty(this,Uo,{value:jB}),o&&(o=Object.freeze(o.slice())),i==="array"){if(s==null||c==null)throw new Error("")}else if(s!=null||c!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");Zt(this,{name:r,type:n,baseType:i,indexed:a,components:o,arrayLength:s,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const a=JSON.parse(this.arrayChildren.format("json"));return a.name=n,a.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(a)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(a=>JSON.parse(a.format(e)))),JSON.stringify(i)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?(e!=="sighash"&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")"):r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(i=>n.arrayChildren.walk(i,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((i,a)=>n.components[a].walk(i,r))}return r(this.type,e)}async walkAsync(e,r){const n=[],i=[e];return Et(this,Kg,ox).call(this,n,e,r,a=>{i[0]=a}),n.length&&await Promise.all(n),i[0]}static from(e,r){if(Is.isParamType(e))return e;if(typeof e=="string")try{return Is.from(bd(e),r)}catch{$e(!1,"invalid param type","obj",e)}else if(e instanceof Mc){let s="",c="",u=null;Ml(e,ao(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",u=e.popParams().map(v=>Is.from(v)),s=`tuple(${u.map(v=>v.format()).join(",")})`):(s=FB(e.popType("TYPE")),c=s);let f=null,d=null;for(;e.length&&e.peekType("BRACKET");){const v=e.pop();f=new Is(li,"",s,c,null,u,d,f),d=v.value,s+=v.text,c="array",u=null}let g=null;if(Ml(e,Y1e).has("indexed")){if(!r)throw new Error("");g=!0}const w=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Is(li,w,s,c,g,u,d,f)}const n=e.name;$e(!n||typeof n=="string"&&n.match(Xee),"invalid name","obj.name",n);let i=e.indexed;i!=null&&($e(r,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let a=e.type,o=a.match(nwe);if(o){const s=parseInt(o[2]||"-1"),c=Is.from({type:o[1],components:e.components});return new Is(li,n||"",a,"array",i,null,s,c)}if(a==="tuple"||a.startsWith("tuple(")||a.startsWith("(")){const s=e.components!=null?e.components.map(u=>Is.from(u)):null;return new Is(li,n||"",a,"tuple",i,s,null,null)}return a=FB(e.type),new Is(li,n||"",a,a,i,null,null,null)}static isParamType(e){return e&&e[Uo]===jB}};Kg=new WeakSet,ox=function(e,r,n,i){if(this.isArray()){if(!Array.isArray(r))throw new Error("invalid array value");if(this.arrayLength!==-1&&r.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,s=r.slice();s.forEach((c,u)=>{var f;Et(f=o,Kg,ox).call(f,e,c,n,d=>{s[u]=d})}),i(s);return}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(r))s=r.slice();else{if(r==null||typeof r!="object")throw new Error("invalid tuple value");s=o.map(c=>{if(!c.name)throw new Error("cannot use object value with unnamed components");if(!(c.name in r))throw new Error(`missing value for component ${c.name}`);return r[c.name]})}if(s.length!==this.components.length)throw new Error("array is wrong length");s.forEach((c,u)=>{var f;Et(f=o[u],Kg,ox).call(f,e,c,n,d=>{s[u]=d})}),i(s);return}const a=n(this.type,r);a.then?e.push(async function(){i(await a)}()):i(a)};let ma=Is;class up{constructor(e,r,n){He(this,"type");He(this,"inputs");xp(e,li,"Fragment"),n=Object.freeze(n.slice()),Zt(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{up.from(JSON.parse(e))}catch{}return up.from(bd(e))}if(e instanceof Mc)switch(e.peekKeyword(Qee)){case"constructor":return _l.from(e);case"error":return To.from(e);case"event":return uu.from(e);case"fallback":case"receive":return nl.from(e);case"function":return lu.from(e);case"struct":return Zh.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return _l.from(e);case"error":return To.from(e);case"event":return uu.from(e);case"fallback":case"receive":return nl.from(e);case"function":return lu.from(e);case"struct":return Zh.from(e)}ct(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}$e(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return _l.isFragment(e)}static isError(e){return To.isFragment(e)}static isEvent(e){return uu.isFragment(e)}static isFunction(e){return lu.isFragment(e)}static isStruct(e){return Zh.isFragment(e)}}class Q2 extends up{constructor(r,n,i,a){super(r,n,a);He(this,"name");$e(typeof i=="string"&&i.match(Xee),"invalid identifier","name",i),a=Object.freeze(a.slice()),Zt(this,{name:i})}}function O1(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}class To extends Q2{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,Uo,{value:qB})}get selector(){return $l(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+O1(e,this.inputs)),r.join(" ")}static from(e){if(To.isFragment(e))return e;if(typeof e=="string")return To.from(bd(e));if(e instanceof Mc){const r=Y2("error",e),n=Ol(e);return cp(e),new To(li,r,n)}return new To(li,e.name,e.inputs?e.inputs.map(ma.from):[])}static isFragment(e){return e&&e[Uo]===qB}}class uu extends Q2{constructor(r,n,i,a){super(r,"event",n,i);He(this,"anonymous");Object.defineProperty(this,Uo,{value:HB}),Zt(this,{anonymous:a})}get topicHash(){return $l(this.format("sighash"))}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(r)))});const n=[];return r!=="sighash"&&n.push("event"),n.push(this.name+O1(r,this.inputs)),r!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(r,n){return n=(n||[]).map(a=>ma.from(a)),new uu(li,r,n,!1).topicHash}static from(r){if(uu.isFragment(r))return r;if(typeof r=="string")try{return uu.from(bd(r))}catch{$e(!1,"invalid event fragment","obj",r)}else if(r instanceof Mc){const n=Y2("event",r),i=Ol(r,!0),a=!!Ml(r,ao(["anonymous"])).has("anonymous");return cp(r),new uu(li,n,i,a)}return new uu(li,r.name,r.inputs?r.inputs.map(n=>ma.from(n,!0)):[],!!r.anonymous)}static isFragment(r){return r&&r[Uo]===HB}}class _l extends up{constructor(r,n,i,a,o){super(r,n,i);He(this,"payable");He(this,"gas");Object.defineProperty(this,Uo,{value:VB}),Zt(this,{payable:a,gas:o})}format(r){if(ct(r!=null&&r!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),r==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(r)))});const n=[`constructor${O1(r,this.inputs)}`];return n.push(this.payable?"payable":"nonpayable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(r){if(_l.isFragment(r))return r;if(typeof r=="string")try{return _l.from(bd(r))}catch{$e(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof Mc){Ml(r,ao(["constructor"]));const n=Ol(r),i=!!Ml(r,W1e).has("payable"),a=tte(r);return cp(r),new _l(li,"constructor",n,i,a)}return new _l(li,"constructor",r.inputs?r.inputs.map(ma.from):[],!!r.payable,r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[Uo]===VB}}class nl extends up{constructor(r,n,i){super(r,"fallback",n);He(this,"payable");Object.defineProperty(this,Uo,{value:zB}),Zt(this,{payable:i})}format(r){const n=this.inputs.length===0?"receive":"fallback";if(r==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:i})}return`${n}()${this.payable?" payable":""}`}static from(r){if(nl.isFragment(r))return r;if(typeof r=="string")try{return nl.from(bd(r))}catch{$e(!1,"invalid fallback fragment","obj",r)}else if(r instanceof Mc){const n=r.toString(),i=r.peekKeyword(ao(["fallback","receive"]));if($e(i,"type must be fallback or receive","obj",n),r.popKeyword(ao(["fallback","receive"]))==="receive"){const c=Ol(r);return $e(c.length===0,"receive cannot have arguments","obj.inputs",c),Ml(r,ao(["payable"])),cp(r),new nl(li,[],!0)}let o=Ol(r);o.length?$e(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(c=>c.format("minimal")).join(", ")):o=[ma.from("bytes")];const s=ete(r);if($e(s==="nonpayable"||s==="payable","fallback cannot be constants","obj.stateMutability",s),Ml(r,ao(["returns"])).has("returns")){const c=Ol(r);$e(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(u=>u.format("minimal")).join(", "))}return cp(r),new nl(li,o,s==="payable")}if(r.type==="receive")return new nl(li,[],!0);if(r.type==="fallback"){const n=[ma.from("bytes")],i=r.stateMutability==="payable";return new nl(li,n,i)}$e(!1,"invalid fallback description","obj",r)}static isFragment(r){return r&&r[Uo]===zB}}class lu extends Q2{constructor(r,n,i,a,o,s){super(r,"function",n,a);He(this,"constant");He(this,"outputs");He(this,"stateMutability");He(this,"payable");He(this,"gas");Object.defineProperty(this,Uo,{value:GB}),o=Object.freeze(o.slice()),Zt(this,{constant:i==="view"||i==="pure",gas:s,outputs:o,payable:i==="payable",stateMutability:i})}get selector(){return $l(this.format("sighash")).substring(0,10)}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(r))),outputs:this.outputs.map(i=>JSON.parse(i.format(r)))});const n=[];return r!=="sighash"&&n.push("function"),n.push(this.name+O1(r,this.inputs)),r!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(O1(r,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(r,n){return n=(n||[]).map(a=>ma.from(a)),new lu(li,r,"view",n,[],null).selector}static from(r){if(lu.isFragment(r))return r;if(typeof r=="string")try{return lu.from(bd(r))}catch{$e(!1,"invalid function fragment","obj",r)}else if(r instanceof Mc){const i=Y2("function",r),a=Ol(r),o=ete(r);let s=[];Ml(r,ao(["returns"])).has("returns")&&(s=Ol(r));const c=tte(r);return cp(r),new lu(li,i,o,a,s,c)}let n=r.stateMutability;return n==null&&(n="payable",typeof r.constant=="boolean"?(n="view",r.constant||(n="payable",typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable"))):typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable")),new lu(li,r.name,n,r.inputs?r.inputs.map(ma.from):[],r.outputs?r.outputs.map(ma.from):[],r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[Uo]===GB}}class Zh extends Q2{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,Uo,{value:WB})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return Zh.from(bd(e))}catch{$e(!1,"invalid struct fragment","obj",e)}else if(e instanceof Mc){const r=Y2("struct",e),n=Ol(e);return cp(e),new Zh(li,r,n)}return new Zh(li,e.name,e.inputs?e.inputs.map(ma.from):[])}static isFragment(e){return e&&e[Uo]===WB}}const Lc=new Map;Lc.set(0,"GENERIC_PANIC");Lc.set(1,"ASSERT_FALSE");Lc.set(17,"OVERFLOW");Lc.set(18,"DIVIDE_BY_ZERO");Lc.set(33,"ENUM_RANGE_ERROR");Lc.set(34,"BAD_STORAGE_DATA");Lc.set(49,"STACK_UNDERFLOW");Lc.set(50,"ARRAY_RANGE_ERROR");Lc.set(65,"OUT_OF_MEMORY");Lc.set(81,"UNINITIALIZED_FUNCTION_CALL");const iwe=new RegExp(/^bytes([0-9]*)$/),awe=new RegExp(/^(u?int)([0-9]*)$/);let mP=null;function owe(t,e,r,n){let i="missing revert data",a=null;const o=null;let s=null;if(r){i="execution reverted";const u=Gt(r);if(r=xt(r),u.length===0)i+=" (no data present; likely require(false) occurred",a="require(false)";else if(u.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(xt(u.slice(0,4))==="0x08c379a0")try{a=n.decode(["string"],u.slice(4))[0],s={signature:"Error(string)",name:"Error",args:[a]},i+=`: ${JSON.stringify(a)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(xt(u.slice(0,4))==="0x4e487b71")try{const f=Number(n.decode(["uint256"],u.slice(4))[0]);s={signature:"Panic(uint256)",name:"Panic",args:[f]},a=`Panic due to ${Lc.get(f)||"UNKNOWN"}(${f})`,i+=`: ${a}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const c={to:e.to?ln(e.to):null,data:e.data||"0x"};return e.from&&(c.from=ln(e.from)),Bi(i,"CALL_EXCEPTION",{action:t,data:r,reason:a,transaction:c,invocation:o,revert:s})}var Tf,T0;const v2=class v2{constructor(){Ze(this,Tf)}getDefaultValue(e){const r=e.map(i=>Et(this,Tf,T0).call(this,ma.from(i)));return new tE(r,"_").defaultValue()}encode(e,r){nZ(r.length,e.length,"types/values length mismatch");const n=e.map(o=>Et(this,Tf,T0).call(this,ma.from(o))),i=new tE(n,"_"),a=new n8;return i.encode(a,r),a.data}decode(e,r,n){const i=e.map(o=>Et(this,Tf,T0).call(this,ma.from(o)));return new tE(i,"_").decode(new i8(r,n))}static defaultAbiCoder(){return mP==null&&(mP=new v2),mP}static getBuiltinCallException(e,r,n){return owe(e,r,n,v2.defaultAbiCoder())}};Tf=new WeakSet,T0=function(e){if(e.isArray())return new Mbe(Et(this,Tf,T0).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new tE(e.components.map(n=>Et(this,Tf,T0).call(this,n)),e.name);switch(e.baseType){case"address":return new Dbe(e.name);case"bool":return new kbe(e.name);case"string":return new zbe(e.name);case"bytes":return new Lbe(e.name);case"":return new Fbe(e.name)}let r=e.type.match(awe);if(r){let n=parseInt(r[2]||"256");return $e(n!==0&&n<=256&&n%8===0,"invalid "+r[1]+" bit length","param",e),new Vbe(n/8,r[1]==="int",e.name)}if(r=e.type.match(iwe),r){let n=parseInt(r[1]);return $e(n!==0&&n<=32,"invalid bytes length","param",e),new Ube(n,e.name)}$e(!1,"invalid type","type",e.type)};let P1=v2;class swe{constructor(e,r,n){He(this,"fragment");He(this,"name");He(this,"signature");He(this,"topic");He(this,"args");const i=e.name,a=e.format();Zt(this,{fragment:e,name:i,signature:a,topic:r,args:n})}}class cwe{constructor(e,r,n,i){He(this,"fragment");He(this,"name");He(this,"args");He(this,"signature");He(this,"selector");He(this,"value");const a=e.name,o=e.format();Zt(this,{fragment:e,name:a,args:n,signature:o,selector:r,value:i})}}class uwe{constructor(e,r,n){He(this,"fragment");He(this,"name");He(this,"args");He(this,"signature");He(this,"selector");const i=e.name,a=e.format();Zt(this,{fragment:e,name:i,args:n,signature:a,selector:r})}}class KB{constructor(e){He(this,"hash");He(this,"_isIndexed");Zt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const YB={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},QB={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&YB[t.toString()]&&(e=YB[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var ru,nu,iu,Ta,Yg,sx,Qg,cx;const Z0=class Z0{constructor(e){Ze(this,Yg);Ze(this,Qg);He(this,"fragments");He(this,"deploy");He(this,"fallback");He(this,"receive");Ze(this,ru,void 0);Ze(this,nu,void 0);Ze(this,iu,void 0);Ze(this,Ta,void 0);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,Te(this,iu,new Map),Te(this,ru,new Map),Te(this,nu,new Map);const n=[];for(const o of r)try{n.push(up.from(o))}catch(s){console.log("EE",s)}Zt(this,{fragments:Object.freeze(n)});let i=null,a=!1;Te(this,Ta,this.getAbiCoder()),this.fragments.forEach((o,s)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}Zt(this,{deploy:o});return;case"fallback":o.inputs.length===0?a=!0:($e(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${s}]`,o),i=o,a=i.payable);return;case"function":c=Y(this,iu);break;case"event":c=Y(this,nu);break;case"error":c=Y(this,ru);break;default:return}const u=o.format();c.has(u)||c.set(u,o)}),this.deploy||Zt(this,{deploy:_l.from("constructor()")}),Zt(this,{fallback:i,receive:a})}format(e){const r=e?"minimal":"full";return this.fragments.map(i=>i.format(r))}formatJson(){const e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return P1.defaultAbiCoder()}getFunctionName(e){const r=Et(this,Yg,sx).call(this,e,null,!1);return $e(r,"no matching function","key",e),r.name}hasFunction(e){return!!Et(this,Yg,sx).call(this,e,null,!1)}getFunction(e,r){return Et(this,Yg,sx).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(Y(this,iu).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(Y(this,iu).get(i),n)}}getEventName(e){const r=Et(this,Qg,cx).call(this,e,null,!1);return $e(r,"no matching event","key",e),r.name}hasEvent(e){return!!Et(this,Qg,cx).call(this,e,null,!1)}getEvent(e,r){return Et(this,Qg,cx).call(this,e,r||null,!0)}forEachEvent(e){const r=Array.from(Y(this,nu).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(Y(this,nu).get(i),n)}}getError(e,r){if(di(e)){const i=e.toLowerCase();if(QB[i])return To.from(QB[i].signature);for(const a of Y(this,ru).values())if(i===a.selector)return a;return null}if(e.indexOf("(")===-1){const i=[];for(const[a,o]of Y(this,ru))a.split("(")[0]===e&&i.push(o);if(i.length===0)return e==="Error"?To.from("error Error(string)"):e==="Panic"?To.from("error Panic(uint256)"):null;if(i.length>1){const a=i.map(o=>JSON.stringify(o.format())).join(", ");$e(!1,`ambiguous error description (i.e. ${a})`,"name",e)}return i[0]}if(e=To.from(e).format(),e==="Error(string)")return To.from("error Error(string)");if(e==="Panic(uint256)")return To.from("error Panic(uint256)");const n=Y(this,ru).get(e);return n||null}forEachError(e){const r=Array.from(Y(this,ru).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(Y(this,ru).get(i),n)}}_decodeParams(e,r){return Y(this,Ta).decode(e,r)}_encodeParams(e,r){return Y(this,Ta).encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);$e(n,"unknown error","fragment",e),e=n}return $e(Qn(r,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",r),this._decodeParams(e.inputs,Qn(r,4))}encodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);$e(n,"unknown error","fragment",e),e=n}return Gn([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);$e(n,"unknown function","fragment",e),e=n}return $e(Qn(r,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",r),this._decodeParams(e.inputs,Qn(r,4))}encodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);$e(n,"unknown function","fragment",e),e=n}return Gn([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionResult(e,r){if(typeof e=="string"){const a=this.getFunction(e);$e(a,"unknown function","fragment",e),e=a}let n="invalid length for result data";const i=Fa(r);if(i.length%32===0)try{return Y(this,Ta).decode(e.outputs,i)}catch{n="could not decode result data"}ct(!1,n,"BAD_DATA",{value:xt(i),info:{method:e.name,signature:e.format()}})}makeError(e,r){const n=Gt(e,"data"),i=P1.getBuiltinCallException("call",r,n),a="execution reverted (unknown custom error)";if(i.message.startsWith(a)){const s=xt(n.slice(0,4)),c=this.getError(s);if(c)try{const u=Y(this,Ta).decode(c.inputs,n.slice(4));i.revert={name:c.name,signature:c.format(),args:u},i.reason=i.revert.signature,i.message=`execution reverted: ${i.reason}`}catch{i.message="execution reverted (coult not decode custom error)"}}const o=this.parseTransaction(r);return o&&(i.invocation={method:o.name,signature:o.signature,args:o.args}),i}encodeFunctionResult(e,r){if(typeof e=="string"){const n=this.getFunction(e);$e(n,"unknown function","fragment",e),e=n}return xt(Y(this,Ta).encode(e.outputs,r||[]))}encodeFilterTopics(e,r){if(typeof e=="string"){const a=this.getEvent(e);$e(a,"unknown event","eventFragment",e),e=a}ct(r.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:r.length,expectedCount:e.inputs.length});const n=[];e.anonymous||n.push(e.topicHash);const i=(a,o)=>a.type==="string"?$l(o):a.type==="bytes"?zn(xt(o)):(a.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":a.type.match(/^u?int/)?o=Dl(o):a.type.match(/^bytes/)?o=_me(o,32):a.type==="address"&&Y(this,Ta).encode(["address"],[o]),sp(xt(o),32));for(r.forEach((a,o)=>{const s=e.inputs[o];if(!s.indexed){$e(a==null,"cannot filter non-indexed parameters; must be null","contract."+s.name,a);return}a==null?n.push(null):s.baseType==="array"||s.baseType==="tuple"?$e(!1,"filtering with tuples or arrays not supported","contract."+s.name,a):Array.isArray(a)?n.push(a.map(c=>i(s,c))):n.push(i(s,a))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){const o=this.getEvent(e);$e(o,"unknown event","eventFragment",e),e=o}const n=[],i=[],a=[];return e.anonymous||n.push(e.topicHash),$e(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((o,s)=>{const c=r[s];if(o.indexed)if(o.type==="string")n.push($l(c));else if(o.type==="bytes")n.push(zn(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(Y(this,Ta).encode([o.type],[c]))}else i.push(o),a.push(c)}),{data:Y(this,Ta).encode(i,a),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const m=this.getEvent(e);$e(m,"unknown event","eventFragment",e),e=m}if(n!=null&&!e.anonymous){const m=e.topicHash;$e(di(n[0],32)&&n[0].toLowerCase()===m,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const i=[],a=[],o=[];e.inputs.forEach((m,w)=>{m.indexed?m.type==="string"||m.type==="bytes"||m.baseType==="tuple"||m.baseType==="array"?(i.push(ma.from({type:"bytes32",name:m.name})),o.push(!0)):(i.push(m),o.push(!1)):(a.push(m),o.push(!1))});const s=n!=null?Y(this,Ta).decode(i,Gn(n)):null,c=Y(this,Ta).decode(a,r,!0),u=[],f=[];let d=0,g=0;return e.inputs.forEach((m,w)=>{let v=null;if(m.indexed)if(s==null)v=new KB(null);else if(o[w])v=new KB(s[g++]);else try{v=s[g++]}catch(y){v=y}else try{v=c[d++]}catch(y){v=y}u.push(v),f.push(m.name||null)}),pA.fromItems(u,f)}parseTransaction(e){const r=Gt(e.data,"tx.data"),n=or(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(xt(r.slice(0,4)));if(!i)return null;const a=Y(this,Ta).decode(i.inputs,r.slice(4));return new cwe(i,i.selector,a,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new swe(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=xt(e),n=this.getError(Qn(r,0,4));if(!n)return null;const i=Y(this,Ta).decode(n.inputs,Qn(r,4));return new uwe(n,n.selector,i)}static from(e){return e instanceof Z0?e:typeof e=="string"?new Z0(JSON.parse(e)):typeof e.format=="function"?new Z0(e.format("json")):new Z0(e)}};ru=new WeakMap,nu=new WeakMap,iu=new WeakMap,Ta=new WeakMap,Yg=new WeakSet,sx=function(e,r,n){if(di(e)){const a=e.toLowerCase();for(const o of Y(this,iu).values())if(a===o.selector)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of Y(this,iu))o.split("(")[0]===e&&a.push(s);if(r){const o=r.length>0?r[r.length-1]:null;let s=r.length,c=!0;Ha.isTyped(o)&&o.type==="overrides"&&(c=!1,s--);for(let u=a.length-1;u>=0;u--){const f=a[u].inputs.length;f!==s&&(!c||f!==s-1)&&a.splice(u,1)}for(let u=a.length-1;u>=0;u--){const f=a[u].inputs;for(let d=0;d<r.length;d++)if(Ha.isTyped(r[d])){if(d>=f.length){if(r[d].type==="overrides")continue;a.splice(u,1);break}if(r[d].type!==f[d].baseType){a.splice(u,1);break}}}}if(a.length===1&&r&&r.length!==a[0].inputs.length){const o=r[r.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&a.splice(0,1)}if(a.length===0)return null;if(a.length>1&&n){const o=a.map(s=>JSON.stringify(s.format())).join(", ");$e(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return a[0]}const i=Y(this,iu).get(lu.from(e).format());return i||null},Qg=new WeakSet,cx=function(e,r,n){if(di(e)){const a=e.toLowerCase();for(const o of Y(this,nu).values())if(a===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of Y(this,nu))o.split("(")[0]===e&&a.push(s);if(r){for(let o=a.length-1;o>=0;o--)a[o].inputs.length<r.length&&a.splice(o,1);for(let o=a.length-1;o>=0;o--){const s=a[o].inputs;for(let c=0;c<r.length;c++)if(Ha.isTyped(r[c])&&r[c].type!==s[c].baseType){a.splice(o,1);break}}}if(a.length===0)return null;if(a.length>1&&n){const o=a.map(s=>JSON.stringify(s.format())).join(", ");$e(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return a[0]}const i=Y(this,nu).get(uu.from(e).format());return i||null};let v8=Z0;const rte=BigInt(0);function Bb(t){return t??null}function Ua(t){return t==null?null:t.toString()}class JB{constructor(e,r,n){He(this,"gasPrice");He(this,"maxFeePerGas");He(this,"maxPriorityFeePerGas");Zt(this,{gasPrice:Bb(e),maxFeePerGas:Bb(r),maxPriorityFeePerGas:Bb(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Ua(e),maxFeePerGas:Ua(r),maxPriorityFeePerGas:Ua(n)}}}function bA(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=xt(t.data));const r="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of r)!(i in t)||t[i]==null||(e[i]=or(t[i],`request.${i}`));const n="type,nonce".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=Gr(t[i],`request.${i}`));return t.accessList&&(e.accessList=Ap(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),e}var fl;class lwe{constructor(e,r){He(this,"provider");He(this,"number");He(this,"hash");He(this,"timestamp");He(this,"parentHash");He(this,"nonce");He(this,"difficulty");He(this,"gasLimit");He(this,"gasUsed");He(this,"miner");He(this,"extraData");He(this,"baseFeePerGas");Ze(this,fl,void 0);Te(this,fl,e.transactions.map(n=>typeof n!="string"?new T1(n,r):n)),Zt(this,{provider:r,hash:Bb(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,miner:e.miner,extraData:e.extraData,baseFeePerGas:Bb(e.baseFeePerGas)})}get transactions(){return Y(this,fl).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=Y(this,fl).slice();return e.length===0?[]:(ct(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:i,gasUsed:a,hash:o,miner:s,nonce:c,number:u,parentHash:f,timestamp:d,transactions:g}=this;return{_type:"Block",baseFeePerGas:Ua(e),difficulty:Ua(r),extraData:n,gasLimit:Ua(i),gasUsed:Ua(a),hash:o,miner:s,nonce:c,number:u,parentHash:f,timestamp:d,transactions:g}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>e<this.length?{value:r[e++],done:!1}:{value:void 0,done:!0}}}get length(){return Y(this,fl).length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(e){let r;if(typeof e=="number")r=Y(this,fl)[e];else{const n=e.toLowerCase();for(const i of Y(this,fl))if(typeof i=="string"){if(i!==n)continue;r=i;break}else{if(i.hash===n)continue;r=i;break}}if(r==null)throw new Error("no such tx");return typeof r=="string"?await this.provider.getTransaction(r):r}getPrefetchedTransaction(e){const r=this.prefetchedTransactions;if(typeof e=="number")return r[e];e=e.toLowerCase();for(const n of r)if(n.hash===e)return n;$e(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return fwe(this)}}fl=new WeakMap;class Ew{constructor(e,r){He(this,"provider");He(this,"transactionHash");He(this,"blockHash");He(this,"blockNumber");He(this,"removed");He(this,"address");He(this,"data");He(this,"topics");He(this,"index");He(this,"transactionIndex");this.provider=r;const n=Object.freeze(e.topics.slice());Zt(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:n,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:r,blockNumber:n,data:i,index:a,removed:o,topics:s,transactionHash:c,transactionIndex:u}=this;return{_type:"log",address:e,blockHash:r,blockNumber:n,data:i,index:a,removed:o,topics:s,transactionHash:c,transactionIndex:u}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return ct(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return ct(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return ct(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return dwe(this)}}var Q1;class nte{constructor(e,r){He(this,"provider");He(this,"to");He(this,"from");He(this,"contractAddress");He(this,"hash");He(this,"index");He(this,"blockHash");He(this,"blockNumber");He(this,"logsBloom");He(this,"gasUsed");He(this,"cumulativeGasUsed");He(this,"gasPrice");He(this,"type");He(this,"status");He(this,"root");Ze(this,Q1,void 0);Te(this,Q1,Object.freeze(e.logs.map(i=>new Ew(i,r))));let n=rte;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),Zt(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,gasPrice:n,type:e.type,status:e.status,root:e.root})}get logs(){return Y(this,Q1)}toJSON(){const{to:e,from:r,contractAddress:n,hash:i,index:a,blockHash:o,blockNumber:s,logsBloom:c,logs:u,status:f,root:d}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:s,contractAddress:n,cumulativeGasUsed:Ua(this.cumulativeGasUsed),from:r,gasPrice:Ua(this.gasPrice),gasUsed:Ua(this.gasUsed),hash:i,index:a,logs:u,logsBloom:c,root:d,status:f,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(e==null)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(e==null)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return ate(this)}reorderedEvent(e){return ct(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),ite(this,e)}}Q1=new WeakMap;var Rf;const NL=class NL{constructor(e,r){He(this,"provider");He(this,"blockNumber");He(this,"blockHash");He(this,"index");He(this,"hash");He(this,"type");He(this,"to");He(this,"from");He(this,"nonce");He(this,"gasLimit");He(this,"gasPrice");He(this,"maxPriorityFeePerGas");He(this,"maxFeePerGas");He(this,"data");He(this,"value");He(this,"chainId");He(this,"signature");He(this,"accessList");Ze(this,Rf,void 0);this.provider=r,this.blockNumber=e.blockNumber!=null?e.blockNumber:null,this.blockHash=e.blockHash!=null?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=e.maxPriorityFeePerGas!=null?e.maxPriorityFeePerGas:null,this.maxFeePerGas=e.maxFeePerGas!=null?e.maxFeePerGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=e.accessList!=null?e.accessList:null,Te(this,Rf,-1)}toJSON(){const{blockNumber:e,blockHash:r,index:n,hash:i,type:a,to:o,from:s,nonce:c,data:u,signature:f,accessList:d}=this;return{_type:"TransactionReceipt",accessList:d,blockNumber:e,blockHash:r,chainId:Ua(this.chainId),data:u,from:s,gasLimit:Ua(this.gasLimit),gasPrice:Ua(this.gasPrice),hash:i,maxFeePerGas:Ua(this.maxFeePerGas),maxPriorityFeePerGas:Ua(this.maxPriorityFeePerGas),nonce:c,signature:f,to:o,index:n,type:a,value:Ua(this.value)}}async getBlock(){let e=this.blockNumber;if(e==null){const n=await this.getTransaction();n&&(e=n.blockNumber)}if(e==null)return null;const r=this.provider.getBlock(e);if(r==null)throw new Error("TODO");return r}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:r,blockNumber:n}=await Na({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return r==null||r.blockNumber==null?0:n-r.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,r){const n=e??1,i=r??0;let a=Y(this,Rf),o=-1,s=a===-1;const c=async()=>{if(s)return null;const{blockNumber:g,nonce:m}=await Na({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(m<this.nonce){a=g;return}if(s)return null;const w=await this.getTransaction();if(!(w&&w.blockNumber!=null))for(o===-1&&(o=a-3,o<Y(this,Rf)&&(o=Y(this,Rf)));o<=g;){if(s)return null;const v=await this.provider.getBlock(o,!0);if(v==null)return;for(const y of v)if(y===this.hash)return;for(let y=0;y<v.length;y++){const _=await v.getTransaction(y);if(_.from===this.from&&_.nonce===this.nonce){if(s)return null;const b=await this.provider.getTransactionReceipt(_.hash);if(b==null||g-b.blockNumber+1<n)return;let S="replaced";_.data===this.data&&_.to===this.to&&_.value===this.value?S="repriced":_.data==="0x"&&_.from===_.to&&_.value===rte&&(S="cancelled"),ct(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:S==="replaced"||S==="cancelled",reason:S,replacement:_.replaceableTransaction(a),hash:_.hash,receipt:b})}}o++}},u=g=>{if(g==null||g.status!==0)return g;ct(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:g.to,from:g.from,data:""},receipt:g})},f=await this.provider.getTransactionReceipt(this.hash);if(n===0)return u(f);if(f){if(await f.confirmations()>=n)return u(f)}else if(await c(),n===0)return null;return await new Promise((g,m)=>{const w=[],v=()=>{w.forEach(_=>_())};if(w.push(()=>{s=!0}),i>0){const _=setTimeout(()=>{v(),m(Bi("wait for transaction timeout","TIMEOUT"))},i);w.push(()=>{clearTimeout(_)})}const y=async _=>{if(await _.confirmations()>=n){v();try{g(u(_))}catch(b){m(b)}}};if(w.push(()=>{this.provider.off(this.hash,y)}),this.provider.on(this.hash,y),a>=0){const _=async()=>{try{await c()}catch(b){if(Us(b,"TRANSACTION_REPLACED")){v(),m(b);return}}s||this.provider.once("block",_)};w.push(()=>{this.provider.off("block",_)}),this.provider.once("block",_)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}removedEvent(){return ct(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ate(this)}reorderedEvent(e){return ct(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ct(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ite(this,e)}replaceableTransaction(e){$e(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new NL(this,this.provider);return Te(r,Rf,e),r}};Rf=new WeakMap;let T1=NL;function fwe(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function ite(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function ate(t){return{orphan:"drop-transaction",tx:t}}function dwe(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class d$ extends Ew{constructor(r,n,i){super(r,r.provider);He(this,"interface");He(this,"fragment");He(this,"args");const a=n.decodeEventLog(i,r.data,r.topics);Zt(this,{args:a,fragment:i,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class ote extends Ew{constructor(r,n){super(r,r.provider);He(this,"error");Zt(this,{error:n})}}var Jg;class hwe extends nte{constructor(r,n,i){super(i,n);Ze(this,Jg,void 0);Te(this,Jg,r)}get logs(){return super.logs.map(r=>{const n=r.topics.length?Y(this,Jg).getEvent(r.topics[0]):null;if(n)try{return new d$(r,Y(this,Jg),n)}catch(i){return new ote(r,i)}return r})}}Jg=new WeakMap;var J1;class h$ extends T1{constructor(r,n,i){super(i,n);Ze(this,J1,void 0);Te(this,J1,r)}async wait(r){const n=await super.wait(r);return n==null?null:new hwe(Y(this,J1),this.provider,n)}}J1=new WeakMap;class ste extends lZ{constructor(r,n,i,a){super(r,n,i);He(this,"log");Zt(this,{log:a})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class pwe extends ste{constructor(e,r,n,i,a){super(e,r,n,new d$(a,e.interface,i));const o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);Zt(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const XB=BigInt(0);function cte(t){return t&&typeof t.call=="function"}function ute(t){return t&&typeof t.estimateGas=="function"}function J2(t){return t&&typeof t.resolveName=="function"}function lte(t){return t&&typeof t.sendTransaction=="function"}function fte(t){if(t!=null){if(J2(t))return t;if(t.provider)return t.provider}}var X1;class gwe{constructor(e,r,n){Ze(this,X1,void 0);He(this,"fragment");if(Zt(this,{fragment:r}),r.inputs.length<n.length)throw new Error("too many arguments");const i=lp(e.runner,"resolveName"),a=J2(i)?i:null;Te(this,X1,async function(){const o=await Promise.all(r.inputs.map((s,c)=>n[c]==null?null:s.walkAsync(n[c],(f,d)=>f==="address"?Array.isArray(d)?Promise.all(d.map(g=>ya(g,a))):ya(d,a):d)));return e.interface.encodeFilterTopics(r,o)}())}getTopicFilter(){return Y(this,X1)}}X1=new WeakMap;function lp(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function Ah(t){return t==null?null:t.provider||null}async function dte(t,e){const r=Ha.dereference(t,"overrides");$e(typeof r=="object","invalid overrides parameter","overrides",t);const n=bA(r);return $e(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),$e(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function ywe(t,e,r){const n=lp(t,"resolveName"),i=J2(n)?n:null;return await Promise.all(e.map((a,o)=>a.walkAsync(r[o],(s,c)=>(c=Ha.dereference(c,s),s==="address"?ya(c,i):c))))}function mwe(t){const e=async function(o){const s=await dte(o,["data"]);s.to=await t.getAddress(),s.from&&(s.from=await ya(s.from,fte(t.runner)));const c=t.interface,u=or(s.value||XB,"overrides.value")===XB,f=(s.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!f&&!u&&$e(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),$e(c.fallback||f,"cannot send data to receive-only contract","overrides.data",s.data);const d=c.receive||c.fallback&&c.fallback.payable;return $e(d||u,"cannot send value to non-payable fallback","overrides.value",s.value),$e(c.fallback||f,"cannot send data to receive-only contract","overrides.data",s.data),s},r=async function(o){const s=lp(t.runner,"call");ct(cte(s),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await e(o);try{return await s.call(c)}catch(u){throw GD(u)&&u.data?t.interface.makeError(u.data,c):u}},n=async function(o){const s=t.runner;ct(lte(s),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await s.sendTransaction(await e(o)),u=Ah(t.runner);return new h$(t.interface,u,c)},i=async function(o){const s=lp(t.runner,"estimateGas");return ct(ute(s),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await s.estimateGas(await e(o))},a=async o=>await n(o);return Zt(a,{_contract:t,estimateGas:i,populateTransaction:e,send:n,staticCall:r}),a}function vwe(t,e){const r=function(...u){const f=t.interface.getFunction(e,u);return ct(f,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:u}}),f},n=async function(...u){const f=r(...u);let d={};if(f.inputs.length+1===u.length&&(d=await dte(u.pop()),d.from&&(d.from=await ya(d.from,fte(t.runner)))),f.inputs.length!==u.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const g=await ywe(t.runner,f.inputs,u);return Object.assign({},d,await Na({to:t.getAddress(),data:t.interface.encodeFunctionData(f,g)}))},i=async function(...u){const f=await s(...u);return f.length===1?f[0]:f},a=async function(...u){const f=t.runner;ct(lte(f),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const d=await f.sendTransaction(await n(...u)),g=Ah(t.runner);return new h$(t.interface,g,d)},o=async function(...u){const f=lp(t.runner,"estimateGas");return ct(ute(f),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await f.estimateGas(await n(...u))},s=async function(...u){const f=lp(t.runner,"call");ct(cte(f),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const d=await n(...u);let g="0x";try{g=await f.call(d)}catch(w){throw GD(w)&&w.data?t.interface.makeError(w.data,d):w}const m=r(...u);return t.interface.decodeFunctionResult(m,g)},c=async(...u)=>r(...u).constant?await i(...u):await a(...u);return Zt(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:o,populateTransaction:n,send:a,staticCall:i,staticCallResult:s}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const u=t.interface.getFunction(e);return ct(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),u}}),c}function bwe(t,e){const r=function(...i){const a=t.interface.getEvent(e,i);return ct(a,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),a},n=function(...i){return new gwe(t,r(...i),i)};return Zt(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=t.interface.getEvent(e);return ct(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}const wA=Symbol.for("_ethersInternal_contract"),hte=new WeakMap;function wwe(t,e){hte.set(t[wA],e)}function Ko(t){return hte.get(t[wA])}function _we(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function p$(t,e){let r,n=null;if(Array.isArray(e)){const a=function(o){if(di(o,32))return o;const s=t.interface.getEvent(o);return $e(s,"unknown fragment","name",o),s.topicHash};r=e.map(o=>o==null?null:Array.isArray(o)?o.map(a):a(o))}else e==="*"?r=[null]:typeof e=="string"?di(e,32)?r=[e]:(n=t.interface.getEvent(e),$e(n,"unknown fragment","event",e),r=[n.topicHash]):_we(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):$e(!1,"unknown event name","event",e);r=r.map(a=>{if(a==null)return null;if(Array.isArray(a)){const o=Array.from(new Set(a.map(s=>s.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return a.toLowerCase()});const i=r.map(a=>a==null?"null":Array.isArray(a)?a.join("|"):a).join("&");return{fragment:n,tag:i,topics:r}}async function fb(t,e){const{subs:r}=Ko(t);return r.get((await p$(t,e)).tag)||null}async function ZB(t,e,r){const n=Ah(t.runner);ct(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:a,topics:o}=await p$(t,r),{addr:s,subs:c}=Ko(t);let u=c.get(a);if(!u){const d={address:s||t,topics:o},g=y=>{let _=i;if(_==null)try{_=t.interface.getEvent(y.topics[0])}catch{}if(_){const b=_,S=i?t.interface.decodeEventLog(i,y.data,y.topics):[];w8(t,r,S,x=>new pwe(t,x,r,b,y))}else w8(t,r,[],b=>new ste(t,b,r,y))};let m=[];u={tag:a,listeners:[],start:()=>{m.length||m.push(n.on(d,g))},stop:async()=>{if(m.length==0)return;let y=m;m=[],await Promise.all(y),n.off(d,g)}},c.set(a,u)}return u}let b8=Promise.resolve();async function Ewe(t,e,r,n){await b8;const i=await fb(t,e);if(!i)return!1;const a=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:s})=>{const c=Array.from(r);n&&c.push(n(s?null:o));try{o.call(t,...c)}catch{}return!s}),i.listeners.length===0&&(i.stop(),Ko(t).subs.delete(i.tag)),a>0}async function w8(t,e,r,n){try{await b8}catch{}const i=Ewe(t,e,r,n);return b8=i,await i}const rE=["then"];var fKe;const n1=class n1{constructor(e,r,n,i){He(this,"target");He(this,"interface");He(this,"runner");He(this,"filters");He(this,fKe);He(this,"fallback");$e(typeof e=="string"||gee(e),"invalid value for Contract target","target",e),n==null&&(n=null);const a=v8.from(r);Zt(this,{target:e,runner:n,interface:a}),Object.defineProperty(this,wA,{value:{}});let o,s=null,c=null;if(i){const d=Ah(n);c=new h$(this.interface,d,i)}let u=new Map;if(typeof e=="string")if(di(e))s=e,o=Promise.resolve(e);else{const d=lp(n,"resolveName");if(!J2(d))throw Bi("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=d.resolveName(e).then(g=>{if(g==null)throw Bi("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Ko(this).addr=g,g})}else o=e.getAddress().then(d=>{if(d==null)throw new Error("TODO");return Ko(this).addr=d,d});wwe(this,{addrPromise:o,addr:s,deployTx:c,subs:u});const f=new Proxy({},{get:(d,g,m)=>{if(typeof g=="symbol"||rE.indexOf(g)>=0)return Reflect.get(d,g,m);try{return this.getEvent(g)}catch(w){if(!Us(w,"INVALID_ARGUMENT")||w.argument!=="key")throw w}},has:(d,g)=>rE.indexOf(g)>=0?Reflect.has(d,g):Reflect.has(d,g)||this.interface.hasEvent(String(g))});return Zt(this,{filters:f}),Zt(this,{fallback:a.receive||a.fallback?mwe(this):null}),new Proxy(this,{get:(d,g,m)=>{if(typeof g=="symbol"||g in d||rE.indexOf(g)>=0)return Reflect.get(d,g,m);try{return d.getFunction(g)}catch(w){if(!Us(w,"INVALID_ARGUMENT")||w.argument!=="key")throw w}},has:(d,g)=>typeof g=="symbol"||g in d||rE.indexOf(g)>=0?Reflect.has(d,g):d.interface.hasFunction(g)})}connect(e){return new n1(this.target,this.interface,e)}attach(e){return new n1(e,this.interface,this.runner)}async getAddress(){return await Ko(this).addrPromise}async getDeployedCode(){const e=Ah(this.runner);ct(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const r=await e.getCode(await this.getAddress());return r==="0x"?null:r}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=Ah(this.runner);return ct(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,a)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);n.once("block",o)}catch(s){a(s)}};o()})}deploymentTransaction(){return Ko(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),vwe(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),bwe(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:i,addrPromise:a}=Ko(this),o=i||await a,{fragment:s,topics:c}=await p$(this,e),u={address:o,topics:c,fromBlock:r,toBlock:n},f=Ah(this.runner);return ct(f,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await f.getLogs(u)).map(d=>{let g=s;if(g==null)try{g=this.interface.getEvent(d.topics[0])}catch{}if(g)try{return new d$(d,this.interface,g)}catch(m){return new ote(d,m)}return new Ew(d,f)})}async on(e,r){const n=await ZB(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await ZB(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await w8(this,e,r,null)}async listenerCount(e){if(e){const i=await fb(this,e);return i?i.listeners.length:0}const{subs:r}=Ko(this);let n=0;for(const{listeners:i}of r.values())n+=i.length;return n}async listeners(e){if(e){const i=await fb(this,e);return i?i.listeners.map(({listener:a})=>a):[]}const{subs:r}=Ko(this);let n=[];for(const{listeners:i}of r.values())n=n.concat(i.map(({listener:a})=>a));return n}async off(e,r){const n=await fb(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:a})=>a).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(r==null||n.listeners.length===0)&&(n.stop(),Ko(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await fb(this,e);if(!r)return this;r.stop(),Ko(this).subs.delete(r.tag)}else{const{subs:r}=Ko(this);for(const{tag:n,stop:i}of r.values())i(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends n1{constructor(i,a=null){super(i,e,a)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};fKe=wA;let _8=n1;function xwe(){return _8}class Fb extends xwe(){}function vP(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):$e(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class Awe{constructor(e){He(this,"name");Zt(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,r){throw new Error("unsupported coin")}async decodeAddress(e,r){throw new Error("unsupported coin")}}const pte=new RegExp("^(ipfs)://(.*)$","i"),eF=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),pte,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Cf,Uh,Nf,R0,b2,gte;const eg=class eg{constructor(e,r,n){Ze(this,Nf);He(this,"provider");He(this,"address");He(this,"name");Ze(this,Cf,void 0);Ze(this,Uh,void 0);Zt(this,{provider:e,address:r,name:n}),Te(this,Cf,null),Te(this,Uh,new Fb(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return Y(this,Cf)==null&&Te(this,Cf,(async()=>{try{return await Y(this,Uh).supportsInterface("0x9061b923")}catch(e){if(Us(e,"CALL_EXCEPTION"))return!1;throw Te(this,Cf,null),e}})()),await Y(this,Cf)}async getAddress(e){if(e==null&&(e=60),e===60)try{const a=await Et(this,Nf,R0).call(this,"addr(bytes32)");return a==null||a===l8?null:a}catch(a){if(Us(a,"CALL_EXCEPTION"))return null;throw a}if(e>=0&&e<2147483648){let a=e+2147483648;const o=await Et(this,Nf,R0).call(this,"addr(bytes32,uint)",[a]);if(di(o,20))return ln(o)}let r=null;for(const a of this.provider.plugins)if(a instanceof Awe&&a.supportsCoinType(e)){r=a;break}if(r==null)return null;const n=await Et(this,Nf,R0).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const i=await r.decodeAddress(e,n);if(i!=null)return i;ct(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await Et(this,Nf,R0).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await Et(this,Nf,R0).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const i=r[1]==="e3010170"?"ipfs":"ipns",a=parseInt(r[4],16);if(r[5].length===a*2)return`${i}://${uZ("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;ct(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const r=await this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n<eF.length;n++){const i=r.match(eF[n]);if(i==null)continue;const a=i[1].toLowerCase();switch(a){case"https":case"data":return e.push({type:"url",value:r}),{linkage:e,url:r};case"ipfs":{const o=vP(r);return e.push({type:"ipfs",value:r}),e.push({type:"url",value:o}),{linkage:e,url:o}}case"erc721":case"erc1155":{const o=a==="erc721"?"tokenURI(uint256)":"uri(uint256)";e.push({type:a,value:r});const s=await this.getAddress();if(s==null)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const c=(i[2]||"").split("/");if(c.length!==2)return e.push({type:`!${a}caip`,value:i[2]||""}),{url:null,linkage:e};const u=c[1],f=new Fb(c[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(a==="erc721"){const v=await f.ownerOf(u);if(s!==v)return e.push({type:"!owner",value:v}),{url:null,linkage:e};e.push({type:"owner",value:v})}else if(a==="erc1155"){const v=await f.balanceOf(s,u);if(!v)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:v.toString()})}let d=await f[o](u);if(d==null||d==="0x")return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:d}),a==="erc1155"&&(d=d.replace("{id}",Dl(u,32).substring(2)),e.push({type:"metadata-url-expanded",value:d})),d.match(/^ipfs:/i)&&(d=vP(d)),e.push({type:"metadata-url",value:d});let g={};const m=await new fd(d).send();m.assertOk();try{g=m.bodyJson}catch{try{e.push({type:"!metadata",value:m.bodyText})}catch{const _=m.body;return _&&e.push({type:"!metadata",value:xt(_)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!g)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(g)});let w=g.image;if(typeof w!="string")return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(!w.match(/^(https:\/\/|data:)/i)){if(w.match(pte)==null)return e.push({type:"!imageUrl-ipfs",value:w}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:w}),w=vP(w)}return e.push({type:"url",value:w}),{linkage:e,url:w}}}}}catch{}return{linkage:e,url:null}}static async getEnsAddress(e){const r=await e.getNetwork(),n=r.getPlugin("org.ethers.plugins.network.Ens");return ct(n,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:r}}),n.address}static async fromName(e,r){var i;let n=r;for(;;){if(n===""||n==="."||r!=="eth"&&n==="eth")return null;const a=await Et(i=eg,b2,gte).call(i,e,n);if(a!=null){const o=new eg(e,a,r);return n!==r&&!await o.supportsWildcard()?null:o}n=n.split(".").slice(1).join(".")}}};Cf=new WeakMap,Uh=new WeakMap,Nf=new WeakSet,R0=async function(e,r){r=(r||[]).slice();const n=Y(this,Uh).interface;r.unshift(y8(this.name));let i=null;await this.supportsWildcard()&&(i=n.getFunction(e),ct(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),r=[T1e(this.name),n.encodeFunctionData(i,r)],e="resolve(bytes,bytes)"),r.push({enableCcipRead:!0});try{const a=await Y(this,Uh)[e](...r);return i?n.decodeFunctionResult(i,a)[0]:a}catch(a){if(!Us(a,"CALL_EXCEPTION"))throw a}return null},b2=new WeakSet,gte=async function(e,r){const n=await eg.getEnsAddress(e);try{const a=await new Fb(n,["function resolver(bytes32) view returns (address)"],e).resolver(y8(r),{enableCcipRead:!0});return a===l8?null:a}catch(i){throw i}return null},Ze(eg,b2);let _A=eg;const tF=BigInt(0);function ui(t,e){return function(r){return r==null?e:t(r)}}function g$(t){return e=>{if(!Array.isArray(e))throw new Error("not an array");return e.map(r=>t(r))}}function xw(t,e){return r=>{const n={};for(const i in t){let a=i;if(e&&i in e&&!(a in r)){for(const o of e[i])if(o in r){a=o;break}}try{const o=t[i](r[a]);o!==void 0&&(n[i]=o)}catch(o){const s=o instanceof Error?o.message:"not-an-error";ct(!1,`invalid value for value.${i} (${s})`,"BAD_DATA",{value:r})}}return n}}function Swe(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}$e(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Iy(t){return $e(di(t,!0),"invalid data","value",t),t}function Bs(t){return $e(di(t,32),"invalid hash","value",t),t}const Iwe=xw({address:ln,blockHash:Bs,blockNumber:Gr,data:Iy,index:Gr,removed:ui(Swe,!1),topics:g$(Bs),transactionHash:Bs,transactionIndex:Gr},{index:["logIndex"]});function Owe(t){return Iwe(t)}const Pwe=xw({hash:ui(Bs),parentHash:Bs,number:Gr,timestamp:Gr,nonce:ui(Iy),difficulty:or,gasLimit:or,gasUsed:or,miner:ui(ln),extraData:Iy,baseFeePerGas:ui(or)});function Twe(t){const e=Pwe(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:yte(r)),e}const Rwe=xw({transactionIndex:Gr,blockNumber:Gr,transactionHash:Bs,address:ln,topics:g$(Bs),data:Iy,index:Gr,blockHash:Bs},{index:["logIndex"]});function Cwe(t){return Rwe(t)}const Nwe=xw({to:ui(ln,null),from:ui(ln,null),contractAddress:ui(ln,null),index:Gr,root:ui(xt),gasUsed:or,logsBloom:ui(Iy),blockHash:Bs,hash:Bs,logs:g$(Cwe),blockNumber:Gr,cumulativeGasUsed:or,effectiveGasPrice:ui(or),status:ui(Gr),type:ui(Gr,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function Dwe(t){return Nwe(t)}function yte(t){t.to&&or(t.to)===tF&&(t.to="0x0000000000000000000000000000000000000000");const e=xw({hash:Bs,type:r=>r==="0x"||r==null?0:Gr(r),accessList:ui(Ap,null),blockHash:ui(Bs,null),blockNumber:ui(Gr,null),transactionIndex:ui(Gr,null),from:ln,gasPrice:ui(or),maxPriorityFeePerGas:ui(or),maxFeePerGas:ui(or),gasLimit:or,to:ui(ln,null),value:or,nonce:Gr,data:Iy,creates:ui(ln,null),chainId:ui(or,null)},{data:["input"],gasLimit:["gas"]})(t);if(e.to==null&&e.creates==null&&(e.creates=Nbe(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=$c.from(t.signature):e.signature=$c.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&or(e.blockHash)===tF&&(e.blockHash=null),e}const $we="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Aw{constructor(e){He(this,"name");Zt(this,{name:e})}clone(){return new Aw(this.name)}}class X2 extends Aw{constructor(r,n){r==null&&(r=0);super(`org.ethers.network.plugins.GasCost#${r||0}`);He(this,"effectiveBlock");He(this,"txBase");He(this,"txCreate");He(this,"txDataZero");He(this,"txDataNonzero");He(this,"txAccessListStorageKey");He(this,"txAccessListAddress");const i={effectiveBlock:r};function a(o,s){let c=(n||{})[o];c==null&&(c=s),$e(typeof c=="number",`invalud value for ${o}`,"costs",n),i[o]=c}a("txBase",21e3),a("txCreate",32e3),a("txDataZero",4),a("txDataNonzero",16),a("txAccessListStorageKey",1900),a("txAccessListAddress",2400),Zt(this,i)}clone(){return new X2(this.effectiveBlock,this)}}class Z2 extends Aw{constructor(r,n){super("org.ethers.plugins.network.Ens");He(this,"address");He(this,"targetNetwork");Zt(this,{address:r||$we,targetNetwork:n??1})}clone(){return new Z2(this.address,this.targetNetwork)}}var Z1,ew;class mte extends Aw{constructor(r,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");Ze(this,Z1,void 0);Ze(this,ew,void 0);Te(this,Z1,r),Te(this,ew,n)}get url(){return Y(this,Z1)}get processFunc(){return Y(this,ew)}clone(){return this}}Z1=new WeakMap,ew=new WeakMap;const bP=new Map;var Xg,Zg,Df;const tg=class tg{constructor(e,r){Ze(this,Xg,void 0);Ze(this,Zg,void 0);Ze(this,Df,void 0);Te(this,Xg,e),Te(this,Zg,or(r)),Te(this,Df,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return Y(this,Xg)}set name(e){Te(this,Xg,e)}get chainId(){return Y(this,Zg)}set chainId(e){Te(this,Zg,or(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===or(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===or(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===or(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(Y(this,Df).values())}attachPlugin(e){if(Y(this,Df).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return Y(this,Df).set(e.name,e.clone()),this}getPlugin(e){return Y(this,Df).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new tg(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){const r=this.getPlugin("org.ethers.plugins.network.GasCost")||new X2;let n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let i=2;i<e.data.length;i+=2)e.data.substring(i,i+2)==="00"?n+=r.txDataZero:n+=r.txDataNonzero;if(e.accessList){const i=Ap(e.accessList);for(const a in i)n+=r.txAccessListAddress+r.txAccessListStorageKey*i[a].storageKeys.length}return n}static from(e){if(kwe(),e==null)return tg.from("mainnet");if(typeof e=="number"&&(e=BigInt(e)),typeof e=="string"||typeof e=="bigint"){const r=bP.get(e);if(r)return r();if(typeof e=="bigint")return new tg("unknown",e);$e(!1,"unknown network","network",e)}if(typeof e.clone=="function")return e.clone();if(typeof e=="object"){$e(typeof e.name=="string"&&typeof e.chainId=="number","invalid network object name or chainId","network",e);const r=new tg(e.name,e.chainId);return(e.ensAddress||e.ensNetwork!=null)&&r.attachPlugin(new Z2(e.ensAddress,e.ensNetwork)),r}$e(!1,"invalid network","network",e)}static register(e,r){typeof e=="number"&&(e=BigInt(e));const n=bP.get(e);n&&$e(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",e),bP.set(e,r)}};Xg=new WeakMap,Zg=new WeakMap,Df=new WeakMap;let El=tg;function rF(t,e){const r=String(t);if(!r.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${t}`);const n=r.split(".");if(n.length===1&&n.push(""),n.length!==2)throw new Error(`invalid gwei value: ${t}`);for(;n[1].length<e;)n[1]+="0";if(n[1].length>9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function nF(t){return new mte(t,async(e,r,n)=>{n.setHeader("User-Agent","ethers");let i;try{const[a,o]=await Promise.all([n.send(),e()]);i=a;const s=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:rF(s.maxFee,9),maxPriorityFeePerGas:rF(s.maxPriorityFee,9)}}catch(a){ct(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:a})}})}function Mwe(t){return new mte("data:",async(e,r,n)=>{const i=await e();if(i.maxFeePerGas==null||i.maxPriorityFeePerGas==null)return i;const a=i.maxFeePerGas-i.maxPriorityFeePerGas;return{gasPrice:i.gasPrice,maxFeePerGas:a+t,maxPriorityFeePerGas:t}})}let iF=!1;function kwe(){if(iF)return;iF=!0;function t(e,r,n){const i=function(){const a=new El(e,r);return n.ensNetwork!=null&&a.attachPlugin(new Z2(null,n.ensNetwork)),a.attachPlugin(new X2),(n.plugins||[]).forEach(o=>{a.attachPlugin(o)}),a};El.register(e,i),El.register(r,i),n.altNames&&n.altNames.forEach(a=>{El.register(a,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("matic",137,{ensNetwork:1,plugins:[nF("https://gasstation.polygon.technology/v2")]}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[nF("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[Mwe(BigInt("1000000"))]}),t("optimism-goerli",420,{}),t("xdai",100,{ensNetwork:1})}function E8(t){return JSON.parse(JSON.stringify(t))}var dl,Ts,$f,au,ey,ux;class Lwe{constructor(e){Ze(this,ey);Ze(this,dl,void 0);Ze(this,Ts,void 0);Ze(this,$f,void 0);Ze(this,au,void 0);Te(this,dl,e),Te(this,Ts,null),Te(this,$f,4e3),Te(this,au,-2)}get pollingInterval(){return Y(this,$f)}set pollingInterval(e){Te(this,$f,e)}start(){Y(this,Ts)||(Te(this,Ts,Y(this,dl)._setTimeout(Et(this,ey,ux).bind(this),Y(this,$f))),Et(this,ey,ux).call(this))}stop(){Y(this,Ts)&&(Y(this,dl)._clearTimeout(Y(this,Ts)),Te(this,Ts,null))}pause(e){this.stop(),e&&Te(this,au,-2)}resume(){this.start()}}dl=new WeakMap,Ts=new WeakMap,$f=new WeakMap,au=new WeakMap,ey=new WeakSet,ux=async function(){try{const e=await Y(this,dl).getBlockNumber();if(Y(this,au)===-2){Te(this,au,e);return}if(e!==Y(this,au)){for(let r=Y(this,au)+1;r<=e;r++){if(Y(this,Ts)==null)return;await Y(this,dl).emit("block",r)}Te(this,au,e)}}catch{}Y(this,Ts)!=null&&Te(this,Ts,Y(this,dl)._setTimeout(Et(this,ey,ux).bind(this),Y(this,$f)))};var Bh,Fh,Mf;class vte{constructor(e){Ze(this,Bh,void 0);Ze(this,Fh,void 0);Ze(this,Mf,void 0);Te(this,Bh,e),Te(this,Mf,!1),Te(this,Fh,r=>{this._poll(r,Y(this,Bh))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){Y(this,Mf)||(Te(this,Mf,!0),Y(this,Fh).call(this,-2),Y(this,Bh).on("block",Y(this,Fh)))}stop(){Y(this,Mf)&&(Te(this,Mf,!1),Y(this,Bh).off("block",Y(this,Fh)))}pause(e){this.stop()}resume(){this.start()}}Bh=new WeakMap,Fh=new WeakMap,Mf=new WeakMap;var w2;class Uwe extends vte{constructor(r,n){super(r);Ze(this,w2,void 0);Te(this,w2,E8(n))}async _poll(r,n){throw new Error("@TODO")}}w2=new WeakMap;var ty;class Bwe extends vte{constructor(r,n){super(r);Ze(this,ty,void 0);Te(this,ty,n)}async _poll(r,n){const i=await n.getTransactionReceipt(Y(this,ty));i&&n.emit(Y(this,ty),i)}}ty=new WeakMap;var hl,ry,ny,kf,Rs,_2,bte;class y${constructor(e,r){Ze(this,_2);Ze(this,hl,void 0);Ze(this,ry,void 0);Ze(this,ny,void 0);Ze(this,kf,void 0);Ze(this,Rs,void 0);Te(this,hl,e),Te(this,ry,E8(r)),Te(this,ny,Et(this,_2,bte).bind(this)),Te(this,kf,!1),Te(this,Rs,-2)}start(){Y(this,kf)||(Te(this,kf,!0),Y(this,Rs)===-2&&Y(this,hl).getBlockNumber().then(e=>{Te(this,Rs,e)}),Y(this,hl).on("block",Y(this,ny)))}stop(){Y(this,kf)&&(Te(this,kf,!1),Y(this,hl).off("block",Y(this,ny)))}pause(e){this.stop(),e&&Te(this,Rs,-2)}resume(){this.start()}}hl=new WeakMap,ry=new WeakMap,ny=new WeakMap,kf=new WeakMap,Rs=new WeakMap,_2=new WeakSet,bte=async function(e){if(Y(this,Rs)===-2)return;const r=E8(Y(this,ry));r.fromBlock=Y(this,Rs)+1,r.toBlock=e;const n=await Y(this,hl).getLogs(r);if(n.length===0){Y(this,Rs)<e-60&&Te(this,Rs,e-60);return}for(const i of n)Y(this,hl).emit(Y(this,ry),i),Te(this,Rs,i.blockNumber)};const Fwe=BigInt(2),jwe=10;function nE(t){return t&&typeof t.then=="function"}function lx(t,e){return t+":"+JSON.stringify(e,(r,n)=>{if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const i=Object.keys(n);return i.sort(),i.reduce((a,o)=>(a[o]=n[o],a),{})}return n})}class wte{constructor(e){He(this,"name");Zt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function qwe(t){return JSON.parse(JSON.stringify(t))}function x8(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function wP(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"pending":case"debug":case"error":case"network":return{type:t,tag:t}}if(di(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:lx("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:lx("orphan",r),filter:qwe(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(i=>i==null?null:Array.isArray(i)?x8(i.map(a=>a.toLowerCase())):i.toLowerCase())};if(r.address){const i=[],a=[],o=s=>{di(s)?i.push(s):a.push((async()=>{i.push(await ya(s,e))})())};Array.isArray(r.address)?r.address.forEach(o):o(r.address),a.length&&await Promise.all(a),n.address=x8(i.map(s=>s.toLowerCase()))}return{filter:n,tag:lx("event",n),type:"event"}}$e(!1,"unknown ProviderEvent","event",t)}function _P(){return new Date().getTime()}const Hwe={cacheTimeout:250,pollingInterval:4e3};var Ra,Lf,Ca,iy,Jo,jh,Uf,pl,tw,Cs,ay,oy,xo,bs,rw,A8,nw,S8,qh,db,iw,I8,Hh,hb,sy,fx;class Vwe{constructor(e,r){Ze(this,xo);Ze(this,rw);Ze(this,nw);Ze(this,qh);Ze(this,iw);Ze(this,Hh);Ze(this,sy);Ze(this,Ra,void 0);Ze(this,Lf,void 0);Ze(this,Ca,void 0);Ze(this,iy,void 0);Ze(this,Jo,void 0);Ze(this,jh,void 0);Ze(this,Uf,void 0);Ze(this,pl,void 0);Ze(this,tw,void 0);Ze(this,Cs,void 0);Ze(this,ay,void 0);Ze(this,oy,void 0);if(Te(this,oy,Object.assign({},Hwe,r||{})),e==="any")Te(this,jh,!0),Te(this,Jo,null);else if(e){const n=El.from(e);Te(this,jh,!1),Te(this,Jo,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else Te(this,jh,!1),Te(this,Jo,null);Te(this,pl,-1),Te(this,Uf,new Map),Te(this,Ra,new Map),Te(this,Lf,new Map),Te(this,Ca,null),Te(this,iy,!1),Te(this,tw,1),Te(this,Cs,new Map),Te(this,ay,!1)}get pollingInterval(){return Y(this,oy).pollingInterval}get provider(){return this}get plugins(){return Array.from(Y(this,Lf).values())}attachPlugin(e){if(Y(this,Lf).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return Y(this,Lf).set(e.name,e.connect(this)),this}getPlugin(e){return Y(this,Lf).get(e)||null}get disableCcipRead(){return Y(this,ay)}set disableCcipRead(e){Te(this,ay,!!e)}async ccipReadFetch(e,r,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const i=e.to.toLowerCase(),a=r.toLowerCase(),o=[];for(let s=0;s<n.length;s++){const c=n[s],u=c.replace("{sender}",i).replace("{data}",a),f=new fd(u);c.indexOf("{data}")===-1&&(f.body={data:a,sender:i}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:f,index:s,urls:n});let d="unknown error";const g=await f.send();try{const m=g.bodyJson;if(m.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:f,result:m}),m.data;m.message&&(d=m.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:f,result:m})}catch{}ct(g.statusCode<400||g.statusCode>=500,`response not found during CCIP fetch: ${d}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:d}}),o.push(d)}ct(!1,`error encountered during CCIP fetch: ${o.map(s=>JSON.stringify(s)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,r){return new lwe(Twe(e),this)}_wrapLog(e,r){return new Ew(Owe(e),this)}_wrapTransactionReceipt(e,r){return new nte(Dwe(e),this)}_wrapTransactionResponse(e,r){return new T1(yte(e),this)}_detectNetwork(){ct(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){ct(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Gr(await Et(this,xo,bs).call(this,{method:"getBlockNumber"}),"%response");return Y(this,pl)>=0&&Te(this,pl,e),e}_getAddress(e){return ya(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(di(e))return di(e,32)?e:G0(e);if(typeof e=="bigint"&&(e=Gr(e,"blockTag")),typeof e=="number")return e>=0?G0(e):Y(this,pl)>=0?G0(Y(this,pl)+e):this.getBlockNumber().then(r=>G0(r+e));$e(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?x8(c.map(u=>u.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(c,u,f)=>{let d;switch(c.length){case 0:break;case 1:d=c[0];break;default:c.sort(),d=c}if(n&&(u!=null||f!=null))throw new Error("invalid filter");const g={};return d&&(g.address=d),r.length&&(g.topics=r),u&&(g.fromBlock=u),f&&(g.toBlock=f),n&&(g.blockHash=n),g};let a=[];if(e.address)if(Array.isArray(e.address))for(const c of e.address)a.push(this._getAddress(c));else a.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let s;return"toBlock"in e&&(s=this._getBlockTag(e.toBlock)),a.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||s!=null&&typeof s!="string"?Promise.all([Promise.all(a),o,s]).then(c=>i(c[0],c[1],c[2])):i(a,o,s)}_getTransactionRequest(e){const r=bA(e),n=[];if(["to","from"].forEach(i=>{if(r[i]==null)return;const a=ya(r[i],this);nE(a)?n.push(async function(){r[i]=await a}()):r[i]=a}),r.blockTag!=null){const i=this._getBlockTag(r.blockTag);nE(i)?n.push(async function(){r.blockTag=await i}()):r.blockTag=i}return n.length?async function(){return await Promise.all(n),r}():r}async getNetwork(){if(Y(this,Jo)==null){const i=this._detectNetwork().then(a=>(this.emit("network",a,null),a),a=>{throw Y(this,Jo)===i&&Te(this,Jo,null),a});return Te(this,Jo,i),(await i).clone()}const e=Y(this,Jo),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(Y(this,jh)?(this.emit("network",n,r),Y(this,Jo)===e&&Te(this,Jo,Promise.resolve(n))):ct(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()}async getFeeData(){const e=await this.getNetwork(),r=async()=>{const{_block:i,gasPrice:a}=await Na({_block:Et(this,iw,I8).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await Et(this,xo,bs).call(this,{method:"getGasPrice"});return or(u,"%response")}catch{}return null})()});let o=null,s=null;const c=this._wrapBlock(i,e);return c&&c.baseFeePerGas&&(s=BigInt("1000000000"),o=c.baseFeePerGas*Fwe+s),new JB(a,o,s)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new fd(n.url),a=await n.processFunc(r,this,i);return new JB(a.gasPrice,a.maxFeePerGas,a.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return nE(r)&&(r=await r),or(await Et(this,xo,bs).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await Na({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await Et(this,nw,S8).call(this,Et(this,rw,A8).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return or(await Et(this,qh,db).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return Gr(await Et(this,qh,db).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return xt(await Et(this,qh,db).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const i=or(r,"position");return xt(await Et(this,qh,db).call(this,{method:"getStorage",position:i},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:i}=await Na({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),a=I1.from(e);if(a.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(a,i).replaceableTransaction(r)}async getBlock(e,r){const{network:n,params:i}=await Na({network:this.getNetwork(),params:Et(this,iw,I8).call(this,e,!!r)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){const{network:r,params:n}=await Na({network:this.getNetwork(),params:Et(this,xo,bs).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await Na({network:this.getNetwork(),params:Et(this,xo,bs).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await Et(this,xo,bs).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await Na({network:this.getNetwork(),result:Et(this,xo,bs).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:xt(r)}async getLogs(e){let r=this._getFilter(e);nE(r)&&(r=await r);const{network:n,params:i}=await Na({network:this.getNetwork(),params:Et(this,xo,bs).call(this,{method:"getLogs",filter:r})});return i.map(a=>this._wrapLog(a,n))}_getProvider(e){ct(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await _A.fromName(this,e)}async getAvatar(e){const r=await this.getResolver(e);return r?await r.getAvatar():null}async resolveName(e){const r=await this.getResolver(e);return r?await r.getAddress():null}async lookupAddress(e){e=ln(e);const r=y8(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await _A.getEnsAddress(this),a=await new Fb(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(a==null||a===l8)return null;const s=await new Fb(a,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(s)!==e?null:s}catch(n){if(Us(n,"BAD_DATA")&&n.value==="0x"||Us(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,r,n){const i=r??1;return i===0?this.getTransactionReceipt(e):new Promise(async(a,o)=>{let s=null;const c=async u=>{try{const f=await this.getTransactionReceipt(e);if(f!=null&&u-f.blockNumber+1>=i){a(f),s&&(clearTimeout(s),s=null);return}}catch(f){console.log("EEE",f)}this.once("block",c)};n!=null&&(s=setTimeout(()=>{s!=null&&(s=null,this.off("block",c),o(Bi("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){ct(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=Y(this,Cs).get(e);r&&(r.timer&&clearTimeout(r.timer),Y(this,Cs).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=Nm(this,tw)._++,i=()=>{Y(this,Cs).delete(n),e()};if(this.paused)Y(this,Cs).set(n,{timer:null,func:i,time:r});else{const a=setTimeout(i,r);Y(this,Cs).set(n,{timer:a,func:i,time:_P()})}return n}_forEachSubscriber(e){for(const r of Y(this,Ra).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new wte(e.type);case"block":{const r=new Lwe(this);return r.pollingInterval=this.pollingInterval,r}case"event":return new y$(this,e.filter);case"transaction":return new Bwe(this,e.hash);case"orphan":return new Uwe(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of Y(this,Ra).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),Y(this,Ca)!=null&&r.pause(Y(this,Ca));break}}async on(e,r){const n=await Et(this,sy,fx).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,Y(this,Ca)!=null&&n.subscriber.pause(Y(this,Ca))),this}async once(e,r){const n=await Et(this,sy,fx).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,Y(this,Ca)!=null&&n.subscriber.pause(Y(this,Ca))),this}async emit(e,...r){const n=await Et(this,Hh,hb).call(this,e,r);if(!n||n.listeners.length===0)return!1;const i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:a,once:o})=>{const s=new lZ(this,o?null:a,e);try{a.call(this,...r,s)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),Y(this,Ra).delete(n.tag)),i>0}async listenerCount(e){if(e){const n=await Et(this,Hh,hb).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of Y(this,Ra).values())r+=n.length;return r}async listeners(e){if(e){const n=await Et(this,Hh,hb).call(this,e);return n?n.listeners.map(({listener:i})=>i):[]}let r=[];for(const{listeners:n}of Y(this,Ra).values())r=r.concat(n.map(({listener:i})=>i));return r}async off(e,r){const n=await Et(this,Hh,hb).call(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:a})=>a).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),Y(this,Ra).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:i}=await Et(this,sy,fx).call(this,e);n&&i.stop(),Y(this,Ra).delete(r)}else for(const[r,{started:n,subscriber:i}]of Y(this,Ra))n&&i.stop(),Y(this,Ra).delete(r);return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return this.off(e,r)}get destroyed(){return Y(this,iy)}destroy(){this.removeAllListeners();for(const e of Y(this,Cs).keys())this._clearTimeout(e);Te(this,iy,!0)}get paused(){return Y(this,Ca)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(Te(this,pl,-1),Y(this,Ca)!=null){if(Y(this,Ca)==!!e)return;ct(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),Te(this,Ca,!!e);for(const r of Y(this,Cs).values())r.timer&&clearTimeout(r.timer),r.time=_P()-r.time}resume(){if(Y(this,Ca)!=null){this._forEachSubscriber(e=>e.resume()),Te(this,Ca,null);for(const e of Y(this,Cs).values()){let r=e.time;r<0&&(r=0),e.time=_P(),setTimeout(e.func,r)}}}}Ra=new WeakMap,Lf=new WeakMap,Ca=new WeakMap,iy=new WeakMap,Jo=new WeakMap,jh=new WeakMap,Uf=new WeakMap,pl=new WeakMap,tw=new WeakMap,Cs=new WeakMap,ay=new WeakMap,oy=new WeakMap,xo=new WeakSet,bs=async function(e){const r=Y(this,oy).cacheTimeout;if(r<0)return await this._perform(e);const n=lx(e.method,e);let i=Y(this,Uf).get(n);return i||(i=this._perform(e),Y(this,Uf).set(n,i),setTimeout(()=>{Y(this,Uf).get(n)===i&&Y(this,Uf).delete(n)},r)),await i},rw=new WeakSet,A8=async function(e,r,n){ct(n<jwe,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:r,enableCcipRead:!0})});const i=bA(e);try{return xt(await this._perform({method:"call",transaction:i,blockTag:r}))}catch(a){if(!this.disableCcipRead&&GD(a)&&a.data&&n>=0&&r==="latest"&&i.to!=null&&Qn(a.data,0,4)==="0x556f1830"){const o=a.data,s=await ya(i.to,this);let c;try{c=Ywe(Qn(a.data,4))}catch(d){ct(!1,d.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}ct(c.sender.toLowerCase()===s.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});const u=await this.ccipReadFetch(i,c.calldata,c.urls);ct(u!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:a.data,errorArgs:c.errorArgs}});const f={to:s,data:Gn([c.selector,Kwe([u,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:f});try{const d=await Et(this,rw,A8).call(this,f,r,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},f),result:d}),d}catch(d){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},f),error:d}),d}}throw a}},nw=new WeakSet,S8=async function(e){const{value:r}=await Na({network:this.getNetwork(),value:e});return r},qh=new WeakSet,db=async function(e,r,n){let i=this._getAddress(r),a=this._getBlockTag(n);return(typeof i!="string"||typeof a!="string")&&([i,a]=await Promise.all([i,a])),await Et(this,nw,S8).call(this,Et(this,xo,bs).call(this,Object.assign(e,{address:i,blockTag:a})))},iw=new WeakSet,I8=async function(e,r){if(di(e,32))return await Et(this,xo,bs).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await Et(this,xo,bs).call(this,{method:"getBlock",blockTag:n,includeTransactions:r})},Hh=new WeakSet,hb=async function(e,r){let n=await wP(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=await wP({orphan:"drop-log",log:r[0]},this)),Y(this,Ra).get(n.tag)||null},sy=new WeakSet,fx=async function(e){const r=await wP(e,this),n=r.tag;let i=Y(this,Ra).get(n);return i||(i={subscriber:this._getSubscriber(r),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},Y(this,Ra).set(n,i)),i};function zwe(t,e){try{const r=O8(t,e);if(r)return WD(r)}catch{}return null}function O8(t,e){if(t==="0x")return null;try{const r=Gr(Qn(t,e,e+32)),n=Gr(Qn(t,r,r+32));return Qn(t,r+32,r+32+n)}catch{}return null}function aF(t){const e=Co(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function Gwe(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const Wwe=new Uint8Array([]);function Kwe(t){const e=[];let r=0;for(let n=0;n<t.length;n++)e.push(Wwe),r+=32;for(let n=0;n<t.length;n++){const i=Gt(t[n]);e[n]=aF(r),e.push(aF(i.length)),e.push(Gwe(i)),r+=32+Math.ceil(i.length/32)*32}return Gn(e)}const oF="0x0000000000000000000000000000000000000000000000000000000000000000";function Ywe(t){const e={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};ct(dg(t)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=Qn(t,0,32);ct(Qn(r,0,12)===Qn(oF,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=Qn(r,12);try{const n=[],i=Gr(Qn(t,32,64)),a=Gr(Qn(t,i,i+32)),o=Qn(t,i+32);for(let s=0;s<a;s++){const c=zwe(o,s*32);if(c==null)throw new Error("abort");n.push(c)}e.urls=n}catch{ct(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const n=O8(t,64);if(n==null)throw new Error("abort");e.calldata=n}catch{ct(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}ct(Qn(t,100,128)===Qn(oF,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),e.selector=Qn(t,96,100);try{const n=O8(t,128);if(n==null)throw new Error("abort");e.extraData=n}catch{ct(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return e.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(n=>e[n]),e}function u0(t,e){if(t.provider)return t.provider;ct(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function sF(t,e){let r=bA(e);if(r.to!=null&&(r.to=ya(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),ya(n,t)]).then(([i,a])=>($e(i.toLowerCase()===a.toLowerCase(),"transaction from mismatch","tx.from",a),i))}else r.from=t.getAddress();return await Na(r)}class m${constructor(e){He(this,"provider");Zt(this,{provider:e||null})}async getNonce(e){return u0(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await sF(this,e)}async populateTransaction(e){const r=u0(this,"populateTransaction"),n=await sF(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const i=await this.provider.getNetwork();if(n.chainId!=null){const o=or(n.chainId);$e(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;const a=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||a)?$e(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&a&&$e(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await r.getFeeData();ct(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await r.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const s=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=s,n.maxPriorityFeePerGas=s}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(ct(!a,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):ct(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else n.type===2&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await Na(n)}async estimateGas(e){return u0(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return u0(this,"call").call(await this.populateCall(e))}async resolveName(e){return await u0(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=u0(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=I1.from(n);return await r.broadcastTransaction(await this.signTransaction(i))}}var cy,dx;const DL=class DL extends m${constructor(r,n){super(n);Ze(this,cy);He(this,"address");Zt(this,{address:r})}async getAddress(){return this.address}connect(r){return new DL(this.address,r)}async signTransaction(r){Et(this,cy,dx).call(this,"transactions","signTransaction")}async signMessage(r){Et(this,cy,dx).call(this,"messages","signMessage")}async signTypedData(r,n,i){Et(this,cy,dx).call(this,"typed-data","signTypedData")}};cy=new WeakSet,dx=function(r,n){ct(!1,`VoidSigner cannot sign ${r}`,"UNSUPPORTED_OPERATION",{operation:n})};let P8=DL;function Qwe(t){return JSON.parse(JSON.stringify(t))}var Ao,ou,Vh,Bf,zh,uy,aw,T8,ow,R8;class _te{constructor(e){Ze(this,aw);Ze(this,ow);Ze(this,Ao,void 0);Ze(this,ou,void 0);Ze(this,Vh,void 0);Ze(this,Bf,void 0);Ze(this,zh,void 0);Ze(this,uy,void 0);Te(this,Ao,e),Te(this,ou,null),Te(this,Vh,Et(this,aw,T8).bind(this)),Te(this,Bf,!1),Te(this,zh,null),Te(this,uy,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){Y(this,Bf)||(Te(this,Bf,!0),Et(this,aw,T8).call(this,-2))}stop(){Y(this,Bf)&&(Te(this,Bf,!1),Te(this,uy,!0),Et(this,ow,R8).call(this),Y(this,Ao).off("block",Y(this,Vh)))}pause(e){e&&Et(this,ow,R8).call(this),Y(this,Ao).off("block",Y(this,Vh))}resume(){this.start()}}Ao=new WeakMap,ou=new WeakMap,Vh=new WeakMap,Bf=new WeakMap,zh=new WeakMap,uy=new WeakMap,aw=new WeakSet,T8=async function(e){try{Y(this,ou)==null&&Te(this,ou,this._subscribe(Y(this,Ao)));let r=null;try{r=await Y(this,ou)}catch(a){if(!Us(a,"UNSUPPORTED_OPERATION")||a.operation!=="eth_newFilter")throw a}if(r==null){Te(this,ou,null),Y(this,Ao)._recoverSubscriber(this,this._recover(Y(this,Ao)));return}const n=await Y(this,Ao).getNetwork();if(Y(this,zh)||Te(this,zh,n),Y(this,zh).chainId!==n.chainId)throw new Error("chaid changed");if(Y(this,uy))return;const i=await Y(this,Ao).send("eth_getFilterChanges",[r]);await this._emitResults(Y(this,Ao),i)}catch(r){console.log("@TODO",r)}Y(this,Ao).once("block",Y(this,Vh))},ow=new WeakSet,R8=function(){const e=Y(this,ou);e&&(Te(this,ou,null),e.then(r=>{Y(this,Ao).send("eth_uninstallFilter",[r])}))};var Gh;class Jwe extends _te{constructor(r,n){super(r);Ze(this,Gh,void 0);Te(this,Gh,Qwe(n))}_recover(r){return new y$(r,Y(this,Gh))}async _subscribe(r){return await r.send("eth_newFilter",[Y(this,Gh)])}async _emitResults(r,n){for(const i of n)r.emit(Y(this,Gh),r._wrapLog(i,r._network))}}Gh=new WeakMap;class Xwe extends _te{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const Zwe="bigint,boolean,function,number,string,symbol".split(/,/g);function hx(t){if(t==null||Zwe.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(hx);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function e_e(t){return new Promise(e=>{setTimeout(e,t)})}function l0(t){return t&&t.toLowerCase()}function cF(t){return t&&typeof t.pollingInterval=="number"}const t_e={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class EP extends m${constructor(r,n){super(r);He(this,"address");n=ln(n),Zt(this,{address:n})}connect(r){ct(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(r){return await this.populateCall(r)}async sendUncheckedTransaction(r){const n=hx(r),i=[];if(n.from){const o=n.from;i.push((async()=>{const s=await ya(o,this.provider);$e(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=s})())}else n.from=this.address;if(n.gasLimit==null&&i.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const o=n.to;i.push((async()=>{n.to=await ya(o,this.provider)})())}i.length&&await Promise.all(i);const a=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[a])}async sendTransaction(r){const n=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(r);return await new Promise((a,o)=>{const s=[1e3,100],c=async()=>{const u=await this.provider.getTransaction(i);if(u!=null){a(u.replaceableTransaction(n));return}this.provider._setTimeout(()=>{c()},s.pop()||4e3)};c()})}async signTransaction(r){const n=hx(r);if(n.from){const a=await ya(n.from,this.provider);$e(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=a}else n.from=this.address;const i=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[i])}async signMessage(r){const n=typeof r=="string"?so(r):r;return await this.provider.send("personal_sign",[xt(n),this.address.toLowerCase()])}async signTypedData(r,n,i){const a=hx(i),o=await Sy.resolveNames(r,n,a,async s=>{const c=await ya(s);return $e(c!=null,"TypedData does not support null address","value",s),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(Sy.getPayload(o.domain,n,o.value))])}async unlock(r){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),r,null])}async _legacySignMessage(r){const n=typeof r=="string"?so(r):r;return await this.provider.send("eth_sign",[this.address.toLowerCase(),xt(n)])}}var Wh,ly,gl,su,wc,yl,sw,C8;class r_e extends Vwe{constructor(r,n){super(r,n);Ze(this,sw);Ze(this,Wh,void 0);Ze(this,ly,void 0);Ze(this,gl,void 0);Ze(this,su,void 0);Ze(this,wc,void 0);Ze(this,yl,void 0);Te(this,ly,1),Te(this,Wh,Object.assign({},t_e,n||{})),Te(this,gl,[]),Te(this,su,null),Te(this,yl,null);{let a=null;const o=new Promise(s=>{a=s});Te(this,wc,{promise:o,resolve:a})}const i=this._getOption("staticNetwork");i&&($e(r==null||i.matches(r),"staticNetwork MUST match network object","options",n),Te(this,yl,i))}_getOption(r){return Y(this,Wh)[r]}get _network(){return ct(Y(this,yl),"network is not available yet","NETWORK_ERROR"),Y(this,yl)}async _perform(r){if(r.method==="call"||r.method==="estimateGas"){let i=r.transaction;if(i&&i.type!=null&&or(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const a=await this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(r=Object.assign({},r,{transaction:Object.assign({},i,{type:void 0})}))}}const n=this.getRpcRequest(r);return n!=null?await this.send(n.method,n.args):super._perform(r)}async _detectNetwork(){const r=this._getOption("staticNetwork");if(r)return r;if(this.ready)return El.from(or(await this.send("eth_chainId",[])));const n={id:Nm(this,ly)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let i;try{i=(await this._send(n))[0]}catch(a){throw this.emit("debug",{action:"receiveRpcError",error:a}),a}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return El.from(or(i.result));throw this.getRpcError(n,i)}_start(){Y(this,wc)==null||Y(this,wc).resolve==null||(Y(this,wc).resolve(),Te(this,wc,null),(async()=>{for(;Y(this,yl)==null&&!this.destroyed;)try{Te(this,yl,await this._detectNetwork())}catch(r){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",Bi("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:r}})),await e_e(1e3)}Et(this,sw,C8).call(this)})())}async _waitUntilReady(){if(Y(this,wc)!=null)return await Y(this,wc).promise}_getSubscriber(r){return r.type==="pending"?new Xwe(this):r.type==="event"?this._getOption("polling")?new y$(this,r.filter):new Jwe(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new wte("orphan"):super._getSubscriber(r)}get ready(){return Y(this,wc)==null}getRpcTransaction(r){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(r[i]==null)return;let a=i;i==="gasLimit"&&(a="gas"),n[a]=G0(or(r[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{r[i]!=null&&(n[i]=xt(r[i]))}),r.accessList&&(n.accessList=Ap(r.accessList)),n}getRpcRequest(r){switch(r.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getBalance":return{method:"eth_getBalance",args:[l0(r.address),r.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[l0(r.address),r.blockTag]};case"getCode":return{method:"eth_getCode",args:[l0(r.address),r.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[l0(r.address),"0x"+r.position.toString(16),r.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[r.signedTransaction]};case"getBlock":if("blockTag"in r)return{method:"eth_getBlockByNumber",args:[r.blockTag,!!r.includeTransactions]};if("blockHash"in r)return{method:"eth_getBlockByHash",args:[r.blockHash,!!r.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[r.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[r.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(r.transaction),r.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(r.transaction)]};case"getLogs":return r.filter&&r.filter.address!=null&&(Array.isArray(r.filter.address)?r.filter.address=r.filter.address.map(l0):r.filter.address=l0(r.filter.address)),{method:"eth_getLogs",args:[r.filter]}}return null}getRpcError(r,n){const{method:i}=r,{error:a}=n;if(i==="eth_estimateGas"&&a.message){const c=a.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return Bi("insufficient funds","INSUFFICIENT_FUNDS",{transaction:r.params[0],info:{payload:r,error:a}})}if(i==="eth_call"||i==="eth_estimateGas"){const c=N8(a),u=P1.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",r.params[0],c?c.data:null);return u.info={error:a,payload:r},u}const o=JSON.stringify(i_e(a));if(typeof a.message=="string"&&a.message.match(/user denied|ethers-user-denied/i))return Bi("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:r,error:a}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const c=r.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return Bi("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:a}});if(o.match(/nonce/i)&&o.match(/too low/i))return Bi("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:a}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return Bi("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:a}});if(o.match(/only replay-protected/i))return Bi("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:c,info:{error:a}}})}let s=!!o.match(/the method .* does not exist/i);return s||a&&a.details&&a.details.startsWith("Unauthorized method:")&&(s=!0),s?Bi("unsupported operation","UNSUPPORTED_OPERATION",{operation:r.method,info:{error:a,payload:r}}):Bi("could not coalesce error","UNKNOWN_ERROR",{error:a,payload:r})}send(r,n){if(this.destroyed)return Promise.reject(Bi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r}));const i=Nm(this,ly)._++,a=new Promise((o,s)=>{Y(this,gl).push({resolve:o,reject:s,payload:{method:r,params:n,id:i,jsonrpc:"2.0"}})});return Et(this,sw,C8).call(this),a}async getSigner(r){r==null&&(r=0);const n=this.send("eth_accounts",[]);if(typeof r=="number"){const a=await n;if(r>=a.length)throw new Error("no such account");return new EP(this,a[r])}const{accounts:i}=await Na({network:this.getNetwork(),accounts:n});r=ln(r);for(const a of i)if(ln(a)===r)return new EP(this,r);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new EP(this,n))}destroy(){Y(this,su)&&(clearTimeout(Y(this,su)),Te(this,su,null));for(const{payload:r,reject:n}of Y(this,gl))n(Bi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r.method}));Te(this,gl,[]),super.destroy()}}Wh=new WeakMap,ly=new WeakMap,gl=new WeakMap,su=new WeakMap,wc=new WeakMap,yl=new WeakMap,sw=new WeakSet,C8=function(){if(Y(this,su))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");Te(this,su,setTimeout(()=>{Te(this,su,null);const n=Y(this,gl);for(Te(this,gl,[]);n.length;){const i=[n.shift()];for(;n.length&&i.length!==Y(this,Wh).batchMaxCount;)if(i.push(n.shift()),JSON.stringify(i.map(o=>o.payload)).length>Y(this,Wh).batchMaxSize){n.unshift(i.pop());break}(async()=>{const a=i.length===1?i[0].payload:i.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:a});try{const o=await this._send(a);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:s,reject:c,payload:u}of i){if(this.destroyed){c(Bi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:u.method}));continue}const f=o.filter(d=>d.id===u.id)[0];if(f==null){const d=Bi("missing response for request","BAD_DATA",{value:o,info:{payload:u}});this.emit("error",d),c(d);continue}if("error"in f){c(this.getRpcError(u,f));continue}s(f.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:s}of i)s(o)}})()}},r))};var Ff;class n_e extends r_e{constructor(r,n){super(r,n);Ze(this,Ff,void 0);Te(this,Ff,4e3)}_getSubscriber(r){const n=super._getSubscriber(r);return cF(n)&&(n.pollingInterval=Y(this,Ff)),n}get pollingInterval(){return Y(this,Ff)}set pollingInterval(r){if(!Number.isInteger(r)||r<0)throw new Error("invalid interval");Te(this,Ff,r),this._forEachSubscriber(n=>{cF(n)&&(n.pollingInterval=Y(this,Ff))})}}Ff=new WeakMap;function N8(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&di(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=N8(t[e]);if(r)return r}return null}if(typeof t=="string")try{return N8(JSON.parse(t))}catch{}return null}function D8(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)D8(t[r],e);if(typeof t=="string")try{return D8(JSON.parse(t),e)}catch{}}}function i_e(t){const e=[];return D8(t,e),e}var fy;class Ete extends n_e{constructor(r,n){super(n,{batchMaxCount:1});Ze(this,fy,void 0);Te(this,fy,async(i,a)=>{const o={method:i,params:a};this.emit("debug",{action:"sendEip1193Request",payload:o});try{const s=await r.request(o);return this.emit("debug",{action:"receiveEip1193Result",result:s}),s}catch(s){const c=new Error(s.message);throw c.code=s.code,c.data=s.data,c.payload=o,this.emit("debug",{action:"receiveEip1193Error",error:c}),c}})}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){$e(!Array.isArray(r),"EIP-1193 does not support batch request","payload",r);try{const n=await Y(this,fy).call(this,r.method,r.params||[]);return[{id:r.id,result:n}]}catch(n){return[{id:r.id,error:{code:n.code,data:n.data,message:n.message}}]}}getRpcError(r,n){switch(n=JSON.parse(JSON.stringify(n)),n.error.code||-1){case 4001:n.error.message=`ethers-user-denied: ${n.error.message}`;break;case 4200:n.error.message=`ethers-unsupported: ${n.error.message}`;break}return super.getRpcError(r,n)}async hasSigner(r){r==null&&(r=0);const n=await this.send("eth_accounts",[]);return typeof r=="number"?n.length>r:(r=r.toLowerCase(),n.filter(i=>i.toLowerCase()===r).length!==0)}async getSigner(r){if(r==null&&(r=0),!await this.hasSigner(r))try{await Y(this,fy).call(this,"eth_requestAccounts",[])}catch(n){const i=n.payload;throw this.getRpcError(i,{id:i.id,error:n})}return await super.getSigner(r)}}fy=new WeakMap;var dy;const $L=class $L extends m${constructor(r,n){super(n);He(this,"address");Ze(this,dy,void 0);$e(r&&typeof r.sign=="function","invalid private key","privateKey","[ REDACTED ]"),Te(this,dy,r);const i=_w(this.signingKey.publicKey);Zt(this,{address:i})}get signingKey(){return Y(this,dy)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(r){return new $L(Y(this,dy),r)}async signTransaction(r){const{to:n,from:i}=await Na({to:r.to?ya(r.to,this.provider):void 0,from:r.from?ya(r.from,this.provider):void 0});n!=null&&(r.to=n),i!=null&&(r.from=i),r.from!=null&&($e(ln(r.from)===this.address,"transaction from address mismatch","tx.from",r.from),delete r.from);const a=I1.from(r);return a.signature=this.signingKey.sign(a.unsignedHash),a.serialized}async signMessage(r){return this.signMessageSync(r)}signMessageSync(r){return this.signingKey.sign(B1e(r)).serialized}async signTypedData(r,n,i){const a=await Sy.resolveNames(r,n,i,async o=>{ct(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:o}});const s=await this.provider.resolveName(o);return ct(s!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:o}),s});return this.signingKey.sign(Sy.hash(a.domain,n,a.value)).serialized}};dy=new WeakMap;let EA=$L;const xA=" !#$%&'()*+,-./<=>?@[]^_`{|}~",a_e=/^[a-z]*$/i;function uF(t,e){let r=97;return t.reduce((n,i)=>(i===e?r++:i.match(a_e)?n.push(String.fromCharCode(r)+i):(r=97,n.push(i)),n),[])}function o_e(t,e){for(let i=xA.length-1;i>=0;i--)t=t.split(xA[i]).join(e.substring(2*i,2*i+2));const r=[],n=t.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(i,a,o,s)=>{if(o)for(let c=parseInt(o);c>=0;c--)r.push(";");else r.push(a.toLowerCase());return""});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return uF(uF(r,";"),":")}function s_e(t){return $e(t[0]==="0","unsupported auwl data","data",t),o_e(t.substring(1+2*xA.length),t.substring(1,1+2*xA.length))}class c_e{constructor(e){He(this,"locale");Zt(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var hy,cw,Kh,uw,$8;class u_e extends c_e{constructor(r,n,i){super(r);Ze(this,uw);Ze(this,hy,void 0);Ze(this,cw,void 0);Ze(this,Kh,void 0);Te(this,hy,n),Te(this,cw,i),Te(this,Kh,null)}get _data(){return Y(this,hy)}_decodeWords(){return s_e(Y(this,hy))}getWord(r){const n=Et(this,uw,$8).call(this);return $e(r>=0&&r<n.length,`invalid word index: ${r}`,"index",r),n[r]}getWordIndex(r){return Et(this,uw,$8).call(this).indexOf(r)}}hy=new WeakMap,cw=new WeakMap,Kh=new WeakMap,uw=new WeakSet,$8=function(){if(Y(this,Kh)==null){const r=this._decodeWords();if($l(r.join(`
|
|
70
|
-
`)+`
|
|
71
|
-
`)!==Y(this,cw))throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);Te(this,Kh,r)}return Y(this,Kh)};const l_e="0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO",f_e="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60";let xP=null;class fp extends u_e{constructor(){super("en",l_e,f_e)}static wordlist(){return xP==null&&(xP=new fp),xP}}function xte(t){return(1<<t)-1<<8-t&255}function d_e(t){return(1<<t)-1&255}function AP(t,e){iZ("NFKD"),e==null&&(e=fp.wordlist());const r=e.split(t);$e(r.length%3===0&&r.length>=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const n=new Uint8Array(Math.ceil(11*r.length/8));let i=0;for(let u=0;u<r.length;u++){let f=e.getWordIndex(r[u].normalize("NFKD"));$e(f>=0,`invalid mnemonic word at index ${u}`,"mnemonic","[ REDACTED ]");for(let d=0;d<11;d++)f&1<<10-d&&(n[i>>3]|=1<<7-i%8),i++}const a=32*r.length/3,o=r.length/3,s=xte(o),c=Gt(Dc(n.slice(0,a/8)))[0]&s;return $e(c===(n[n.length-1]&s),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),xt(n.slice(0,a/8))}function SP(t,e){$e(t.length%4===0&&t.length>=16&&t.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),e==null&&(e=fp.wordlist());const r=[0];let n=11;for(let o=0;o<t.length;o++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&d_e(8-n)),n+=3);const i=t.length/4,a=parseInt(Dc(t).substring(2,4),16)&xte(i);return r[r.length-1]<<=i,r[r.length-1]|=a>>8-i,e.join(r.map(o=>e.getWord(o)))}const IP={};class Oy{constructor(e,r,n,i,a){He(this,"phrase");He(this,"password");He(this,"wordlist");He(this,"entropy");i==null&&(i=""),a==null&&(a=fp.wordlist()),xp(e,IP,"Mnemonic"),Zt(this,{phrase:n,password:i,wordlist:a,entropy:r})}computeSeed(){const e=so("mnemonic"+this.password,"NFKD");return vd(so(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,r,n){const i=AP(e,n);return e=SP(Gt(i),n),new Oy(IP,i,e,r,n)}static fromEntropy(e,r,n){const i=Gt(e,"entropy"),a=SP(i,n);return new Oy(IP,xt(i),a,r,n)}static entropyToPhrase(e,r){const n=Gt(e,"entropy");return SP(n,r)}static phraseToEntropy(e,r){return AP(e,r)}static isValidMnemonic(e,r){try{return AP(e,r),!0}catch{}return!1}}/*! MIT License. Copyright 2015-2022 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */var ia=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},OP=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},px,ws,Zc;const h_e={16:10,24:12,32:14},p_e=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],ms=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],iE=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],g_e=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],y_e=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m_e=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],v_e=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],b_e=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],w_e=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],__e=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],E_e=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],x_e=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A_e=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],S_e=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],I_e=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function PP(t){const e=[];for(let r=0;r<t.length;r+=4)e.push(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]);return e}class v${get key(){return ia(this,px,"f").slice()}constructor(e){if(px.set(this,void 0),ws.set(this,void 0),Zc.set(this,void 0),!(this instanceof v$))throw Error("AES must be instanitated with `new`");OP(this,px,new Uint8Array(e),"f");const r=h_e[this.key.length];if(r==null)throw new TypeError("invalid key size (must be 16, 24 or 32 bytes)");OP(this,Zc,[],"f"),OP(this,ws,[],"f");for(let f=0;f<=r;f++)ia(this,Zc,"f").push([0,0,0,0]),ia(this,ws,"f").push([0,0,0,0]);const n=(r+1)*4,i=this.key.length/4,a=PP(this.key);let o;for(let f=0;f<i;f++)o=f>>2,ia(this,Zc,"f")[o][f%4]=a[f],ia(this,ws,"f")[r-o][f%4]=a[f];let s=0,c=i,u;for(;c<n;){if(u=a[i-1],a[0]^=ms[u>>16&255]<<24^ms[u>>8&255]<<16^ms[u&255]<<8^ms[u>>24&255]^p_e[s]<<24,s+=1,i!=8)for(let m=1;m<i;m++)a[m]^=a[m-1];else{for(let m=1;m<i/2;m++)a[m]^=a[m-1];u=a[i/2-1],a[i/2]^=ms[u&255]^ms[u>>8&255]<<8^ms[u>>16&255]<<16^ms[u>>24&255]<<24;for(let m=i/2+1;m<i;m++)a[m]^=a[m-1]}let f=0,d,g;for(;f<i&&c<n;)d=c>>2,g=c%4,ia(this,Zc,"f")[d][g]=a[f],ia(this,ws,"f")[r-d][g]=a[f++],c++}for(let f=1;f<r;f++)for(let d=0;d<4;d++)u=ia(this,ws,"f")[f][d],ia(this,ws,"f")[f][d]=x_e[u>>24&255]^A_e[u>>16&255]^S_e[u>>8&255]^I_e[u&255]}encrypt(e){if(e.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const r=ia(this,Zc,"f").length-1,n=[0,0,0,0];let i=PP(e);for(let s=0;s<4;s++)i[s]^=ia(this,Zc,"f")[0][s];for(let s=1;s<r;s++){for(let c=0;c<4;c++)n[c]=g_e[i[c]>>24&255]^y_e[i[(c+1)%4]>>16&255]^m_e[i[(c+2)%4]>>8&255]^v_e[i[(c+3)%4]&255]^ia(this,Zc,"f")[s][c];i=n.slice()}const a=new Uint8Array(16);let o=0;for(let s=0;s<4;s++)o=ia(this,Zc,"f")[r][s],a[4*s]=(ms[i[s]>>24&255]^o>>24)&255,a[4*s+1]=(ms[i[(s+1)%4]>>16&255]^o>>16)&255,a[4*s+2]=(ms[i[(s+2)%4]>>8&255]^o>>8)&255,a[4*s+3]=(ms[i[(s+3)%4]&255]^o)&255;return a}decrypt(e){if(e.length!=16)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const r=ia(this,ws,"f").length-1,n=[0,0,0,0];let i=PP(e);for(let s=0;s<4;s++)i[s]^=ia(this,ws,"f")[0][s];for(let s=1;s<r;s++){for(let c=0;c<4;c++)n[c]=b_e[i[c]>>24&255]^w_e[i[(c+3)%4]>>16&255]^__e[i[(c+2)%4]>>8&255]^E_e[i[(c+1)%4]&255]^ia(this,ws,"f")[s][c];i=n.slice()}const a=new Uint8Array(16);let o=0;for(let s=0;s<4;s++)o=ia(this,ws,"f")[r][s],a[4*s]=(iE[i[s]>>24&255]^o>>24)&255,a[4*s+1]=(iE[i[(s+3)%4]>>16&255]^o>>16)&255,a[4*s+2]=(iE[i[(s+2)%4]>>8&255]^o>>8)&255,a[4*s+3]=(iE[i[(s+1)%4]&255]^o)&255;return a}}px=new WeakMap,ws=new WeakMap,Zc=new WeakMap;class Ate{constructor(e,r,n){if(n&&!(this instanceof n))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new v$(r)},name:{enumerable:!0,value:e}})}}var aE=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},f0=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},pb,Xu;class b$ extends Ate{constructor(e,r){if(super("ECC",e,b$),pb.set(this,void 0),Xu.set(this,void 0),r){if(r.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");aE(this,pb,new Uint8Array(r),"f")}else aE(this,pb,new Uint8Array(16),"f");aE(this,Xu,this.iv,"f")}get iv(){return new Uint8Array(f0(this,pb,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const r=new Uint8Array(e.length);for(let n=0;n<e.length;n+=16){for(let i=0;i<16;i++)f0(this,Xu,"f")[i]^=e[n+i];aE(this,Xu,this.aes.encrypt(f0(this,Xu,"f")),"f"),r.set(f0(this,Xu,"f"),n)}return r}decrypt(e){if(e.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");const r=new Uint8Array(e.length);for(let n=0;n<e.length;n+=16){const i=this.aes.decrypt(e.subarray(n,n+16));for(let a=0;a<16;a++)r[n+a]=i[a]^f0(this,Xu,"f")[a],f0(this,Xu,"f")[a]=e[n+a]}return r}}pb=new WeakMap,Xu=new WeakMap;var d0=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},vs=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},gb,lh,_s;class Py extends Ate{constructor(e,r){super("CTR",e,Py),gb.set(this,void 0),lh.set(this,void 0),_s.set(this,void 0),d0(this,_s,new Uint8Array(16),"f"),vs(this,_s,"f").fill(0),d0(this,gb,vs(this,_s,"f"),"f"),d0(this,lh,16,"f"),r==null&&(r=1),typeof r=="number"?this.setCounterValue(r):this.setCounterBytes(r)}get counter(){return new Uint8Array(vs(this,_s,"f"))}setCounterValue(e){if(!Number.isInteger(e)||e<0||e>Number.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let r=15;r>=0;--r)vs(this,_s,"f")[r]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(e.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");vs(this,_s,"f").set(e)}increment(){for(let e=15;e>=0;e--)if(vs(this,_s,"f")[e]===255)vs(this,_s,"f")[e]=0;else{vs(this,_s,"f")[e]++;break}}encrypt(e){var r,n;const i=new Uint8Array(e);for(let a=0;a<i.length;a++)vs(this,lh,"f")===16&&(d0(this,gb,this.aes.encrypt(vs(this,_s,"f")),"f"),d0(this,lh,0,"f"),this.increment()),i[a]^=vs(this,gb,"f")[d0(this,lh,(n=vs(this,lh,"f"),r=n++,n),"f"),r];return i}decrypt(e){return this.encrypt(e)}}gb=new WeakMap,lh=new WeakMap,_s=new WeakMap;function O_e(t){if(t.length<16)throw new TypeError("PKCS#7 invalid length");const e=t[t.length-1];if(e>16)throw new TypeError("PKCS#7 padding byte out of range");const r=t.length-e;for(let n=0;n<e;n++)if(t[r+n]!==e)throw new TypeError("PKCS#7 invalid padding byte");return new Uint8Array(t.subarray(0,r))}function Ste(t){return typeof t=="string"&&!t.startsWith("0x")&&(t="0x"+t),Fa(t)}function Wm(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}function Sw(t){return typeof t=="string"?so(t,"NFKC"):Fa(t)}function Ei(t,e){const r=e.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);$e(r!=null,"invalid path","path",e);const n=r[1],i=r[3],a=r[4]==="!";let o=t;for(const s of n.toLowerCase().split(".")){if(Array.isArray(o)){if(!s.match(/^[0-9]+$/))break;o=o[parseInt(s)]}else if(typeof o=="object"){let c=null;for(const u in o)if(u.toLowerCase()===s){c=o[u];break}o=c}else o=null;if(o==null)break}if($e(!a||o!=null,"missing required value","path",n),i&&o!=null){if(i==="int"){if(typeof o=="string"&&o.match(/^-?[0-9]+$/))return parseInt(o);if(Number.isSafeInteger(o))return o}if(i==="number"&&typeof o=="string"&&o.match(/^-?[0-9.]*$/))return parseFloat(o);if(i==="data"&&typeof o=="string")return Ste(o);if(i==="array"&&Array.isArray(o)||i===typeof o)return o;$e(!1,`wrong type found for ${i} `,"path",n)}return o}const Ite="m/44'/60'/0'/0/0";function lF(t){try{const e=JSON.parse(t);if((e.version!=null?parseInt(e.version):0)===3)return!0}catch{}return!1}function P_e(t,e,r){if(Ei(t,"crypto.cipher:string")==="aes-128-ctr"){const i=Ei(t,"crypto.cipherparams.iv:data!"),a=new Py(e,i);return xt(a.decrypt(r))}ct(!1,"unsupported cipher","UNSUPPORTED_OPERATION",{operation:"decrypt"})}function AA(t,e){const r=Gt(e),n=Ei(t,"crypto.ciphertext:data!"),i=xt(zn(Gn([r.slice(16,32),n]))).substring(2);$e(i===Ei(t,"crypto.mac:string!").toLowerCase(),"incorrect password","password","[ REDACTED ]");const a=P_e(t,r.slice(0,16),n),o=_w(a);if(t.address){let u=t.address.toLowerCase();u.startsWith("0x")||(u="0x"+u),$e(ln(u)===o,"keystore address/privateKey mismatch","address",t.address)}const s={address:o,privateKey:a};if(Ei(t,"x-ethers.version:string")==="0.1"){const u=r.slice(32,64),f=Ei(t,"x-ethers.mnemonicCiphertext:data!"),d=Ei(t,"x-ethers.mnemonicCounter:data!"),g=new Py(u,d);s.mnemonic={path:Ei(t,"x-ethers.path:string")||Ite,locale:Ei(t,"x-ethers.locale:string")||"en",entropy:xt(Gt(g.decrypt(f)))}}return s}function Ote(t){const e=Ei(t,"crypto.kdf:string");if(e&&typeof e=="string"){if(e.toLowerCase()==="scrypt"){const r=Ei(t,"crypto.kdfparams.salt:data!"),n=Ei(t,"crypto.kdfparams.n:int!"),i=Ei(t,"crypto.kdfparams.r:int!"),a=Ei(t,"crypto.kdfparams.p:int!");$e(n>0&&(n&n-1)===0,"invalid kdf.N","kdf.N",n),$e(i>0&&a>0,"invalid kdf","kdf",e);const o=Ei(t,"crypto.kdfparams.dklen:int!");return $e(o===32,"invalid kdf.dklen","kdf.dflen",o),{name:"scrypt",salt:r,N:n,r:i,p:a,dkLen:64}}else if(e.toLowerCase()==="pbkdf2"){const r=Ei(t,"crypto.kdfparams.salt:data!"),n=Ei(t,"crypto.kdfparams.prf:string!"),i=n.split("-").pop();$e(i==="sha256"||i==="sha512","invalid kdf.pdf","kdf.pdf",n);const a=Ei(t,"crypto.kdfparams.c:int!"),o=Ei(t,"crypto.kdfparams.dklen:int!");return $e(o===32,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:r,count:a,dkLen:o,algorithm:i}}}$e(!1,"unsupported key-derivation function","kdf",e)}function T_e(t,e){const r=JSON.parse(t),n=Sw(e),i=Ote(r);if(i.name==="pbkdf2"){const{salt:d,count:g,dkLen:m,algorithm:w}=i,v=vd(n,d,g,m,w);return AA(r,v)}ct(i.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:a,N:o,r:s,p:c,dkLen:u}=i,f=tm(n,a,o,s,c,u);return AA(r,f)}function fF(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}async function R_e(t,e,r){const n=JSON.parse(t),i=Sw(e),a=Ote(n);if(a.name==="pbkdf2"){r&&(r(0),await fF(0));const{salt:g,count:m,dkLen:w,algorithm:v}=a,y=vd(i,g,m,w,v);return r&&(r(1),await fF(0)),AA(n,y)}ct(a.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:a});const{salt:o,N:s,r:c,p:u,dkLen:f}=a,d=await em(i,o,s,c,u,f,r);return AA(n,d)}function Pte(t){const e=t.salt!=null?Gt(t.salt,"options.salt"):Il(32);let r=1<<17,n=8,i=1;return t.scrypt&&(t.scrypt.N&&(r=t.scrypt.N),t.scrypt.r&&(n=t.scrypt.r),t.scrypt.p&&(i=t.scrypt.p)),$e(typeof r=="number"&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),$e(typeof n=="number"&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),$e(typeof i=="number"&&i>0&&Number.isSafeInteger(i),"invalid scrypt p parameter","options.p",i),{name:"scrypt",dkLen:32,salt:e,N:r,r:n,p:i}}function Tte(t,e,r,n){const i=Gt(r.privateKey,"privateKey"),a=n.iv!=null?Gt(n.iv,"options.iv"):Il(16);$e(a.length===16,"invalid options.iv length","options.iv",n.iv);const o=n.uuid!=null?Gt(n.uuid,"options.uuid"):Il(16);$e(o.length===16,"invalid options.uuid length","options.uuid",n.iv);const s=t.slice(0,16),c=t.slice(16,32),u=new Py(s,a),f=Gt(u.encrypt(i)),d=zn(Gn([c,f])),g={address:r.address.substring(2).toLowerCase(),id:qme(o),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:xt(a).substring(2)},ciphertext:xt(f).substring(2),kdf:"scrypt",kdfparams:{salt:xt(e.salt).substring(2),n:e.N,dklen:32,p:e.p,r:e.r},mac:d.substring(2)}};if(r.mnemonic){const m=n.client!=null?n.client:`ethers/${rZ}`,w=r.mnemonic.path||Ite,v=r.mnemonic.locale||"en",y=t.slice(32,64),_=Gt(r.mnemonic.entropy,"account.mnemonic.entropy"),b=Il(16),S=new Py(y,b),x=Gt(S.encrypt(_)),I=new Date,p="UTC--"+(I.getUTCFullYear()+"-"+Wm(I.getUTCMonth()+1,2)+"-"+Wm(I.getUTCDate(),2)+"T"+Wm(I.getUTCHours(),2)+"-"+Wm(I.getUTCMinutes(),2)+"-"+Wm(I.getUTCSeconds(),2)+".0Z")+"--"+g.address;g["x-ethers"]={client:m,gethFilename:p,path:w,locale:v,mnemonicCounter:xt(b).substring(2),mnemonicCiphertext:xt(x).substring(2),version:"0.1"}}return JSON.stringify(g)}function Rte(t,e,r){r==null&&(r={});const n=Sw(e),i=Pte(r),a=tm(n,i.salt,i.N,i.r,i.p,64);return Tte(Gt(a),i,t,r)}async function Cte(t,e,r){r==null&&(r={});const n=Sw(e),i=Pte(r),a=await em(n,i.salt,i.N,i.r,i.p,64,r.progressCallback);return Tte(Gt(a),i,t,r)}const TP="m/44'/60'/0'/0/0",C_e=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),id=2147483648,N_e=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),D_e="0123456789abcdef";function SA(t,e){let r="";for(;t;)r=D_e[t%16]+r,t=Math.trunc(t/16);for(;r.length<e*2;)r="0"+r;return"0x"+r}function M8(t){const e=Gt(t),r=Qn(Dc(Dc(e)),0,4),n=Gn([e,r]);return uZ(n)}const eu={};function Nte(t,e,r,n){const i=new Uint8Array(37);t&id?(ct(n!=null,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),i.set(Gt(n),1)):i.set(Gt(r));for(let o=24;o>=0;o-=8)i[33+(o>>3)]=t>>24-o&255;const a=Gt(Xy("sha512",e,i));return{IL:a.slice(0,32),IR:a.slice(32)}}function Dte(t,e){const r=e.split("/");$e(r.length>0&&(r[0]==="m"||t.depth>0),"invalid path","path",e),r[0]==="m"&&r.shift();let n=t;for(let i=0;i<r.length;i++){const a=r[i];if(a.match(/^[0-9]+'$/)){const o=parseInt(a.substring(0,a.length-1));$e(o<id,"invalid path index",`path[${i}]`,a),n=n.deriveChild(id+o)}else if(a.match(/^[0-9]+$/)){const o=parseInt(a);$e(o<id,"invalid path index",`path[${i}]`,a),n=n.deriveChild(o)}else $e(!1,"invalid path component",`path[${i}]`,a)}return n}var lw,k8,Yh,yb;const hc=class hc extends EA{constructor(r,n,i,a,o,s,c,u,f){super(n,f);Ze(this,lw);He(this,"publicKey");He(this,"fingerprint");He(this,"parentFingerprint");He(this,"mnemonic");He(this,"chainCode");He(this,"path");He(this,"index");He(this,"depth");xp(r,eu,"HDNodeWallet"),Zt(this,{publicKey:n.compressedPublicKey});const d=Qn(Zy(Dc(this.publicKey)),0,4);Zt(this,{parentFingerprint:i,fingerprint:d,chainCode:a,path:o,index:s,depth:c}),Zt(this,{mnemonic:u})}connect(r){return new hc(eu,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,r)}async encrypt(r,n){return await Cte(Et(this,lw,k8).call(this),r,{progressCallback:n})}encryptSync(r){return Rte(Et(this,lw,k8).call(this),r)}get extendedKey(){return ct(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),M8(Gn(["0x0488ADE4",SA(this.depth,1),this.parentFingerprint,SA(this.index,4),this.chainCode,Gn(["0x00",this.privateKey])]))}hasPath(){return this.path!=null}neuter(){return new R1(eu,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(r){const n=Gr(r,"index");$e(n<=4294967295,"invalid index","index",n);let i=this.path;i&&(i+="/"+(n&~id),n&id&&(i+="'"));const{IR:a,IL:o}=Nte(n,this.chainCode,this.publicKey,this.privateKey),s=new wu(Dl((q2(o)+BigInt(this.privateKey))%N_e,32));return new hc(eu,s,this.fingerprint,xt(a),i,n,this.depth+1,this.mnemonic,this.provider)}derivePath(r){return Dte(this,r)}static fromExtendedKey(r){const n=Co(Ime(r));$e(n.length===82||M8(n.slice(0,78))===r,"invalid extended key","extendedKey","[ REDACTED ]");const i=n[4],a=xt(n.slice(5,9)),o=parseInt(xt(n.slice(9,13)).substring(2),16),s=xt(n.slice(13,45)),c=n.slice(45,78);switch(xt(n.slice(0,4))){case"0x0488b21e":case"0x043587cf":{const u=xt(c);return new R1(eu,_w(u),u,a,s,null,o,i,null)}case"0x0488ade4":case"0x04358394 ":if(c[0]!==0)break;return new hc(eu,new wu(c.slice(1)),a,s,null,o,i,null,null)}$e(!1,"invalid extended key prefix","extendedKey","[ REDACTED ]")}static createRandom(r,n,i){var o;r==null&&(r=""),n==null&&(n=TP),i==null&&(i=fp.wordlist());const a=Oy.fromEntropy(Il(16),r,i);return Et(o=hc,Yh,yb).call(o,a.computeSeed(),a).derivePath(n)}static fromMnemonic(r,n){var i;return n||(n=TP),Et(i=hc,Yh,yb).call(i,r.computeSeed(),r).derivePath(n)}static fromPhrase(r,n,i,a){var s;n==null&&(n=""),i==null&&(i=TP),a==null&&(a=fp.wordlist());const o=Oy.fromPhrase(r,n,a);return Et(s=hc,Yh,yb).call(s,o.computeSeed(),o).derivePath(i)}static fromSeed(r){var n;return Et(n=hc,Yh,yb).call(n,r,null)}};lw=new WeakSet,k8=function(){const r={address:this.address,privateKey:this.privateKey},n=this.mnemonic;return this.path&&n&&n.wordlist.locale==="en"&&n.password===""&&(r.mnemonic={path:this.path,locale:"en",entropy:n.entropy}),r},Yh=new WeakSet,yb=function(r,n){$e(oZ(r),"invalid seed","seed","[REDACTED]");const i=Gt(r,"seed");$e(i.length>=16&&i.length<=64,"invalid seed","seed","[REDACTED]");const a=Gt(Xy("sha512",C_e,i)),o=new wu(xt(a.slice(0,32)));return new hc(eu,o,"0x00000000",xt(a.slice(32)),"m",0,0,n,null)},Ze(hc,Yh);let jb=hc;class R1 extends P8{constructor(r,n,i,a,o,s,c,u,f){super(n,f);He(this,"publicKey");He(this,"fingerprint");He(this,"parentFingerprint");He(this,"chainCode");He(this,"path");He(this,"index");He(this,"depth");xp(r,eu,"HDNodeVoidWallet"),Zt(this,{publicKey:i});const d=Qn(Zy(Dc(i)),0,4);Zt(this,{publicKey:i,fingerprint:d,parentFingerprint:a,chainCode:o,path:s,index:c,depth:u})}connect(r){return new R1(eu,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,r)}get extendedKey(){return ct(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),M8(Gn(["0x0488B21E",SA(this.depth,1),this.parentFingerprint,SA(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(r){const n=Gr(r,"index");$e(n<=4294967295,"invalid index","index",n);let i=this.path;i&&(i+="/"+(n&~id),n&id&&(i+="'"));const{IR:a,IL:o}=Nte(n,this.chainCode,this.publicKey,null),s=wu.addPoints(o,this.publicKey,!0),c=_w(s);return new R1(eu,c,s,this.fingerprint,xt(a),i,n,this.depth+1,this.provider)}derivePath(r){return Dte(this,r)}}function dF(t){try{if(JSON.parse(t).encseed)return!0}catch{}return!1}function hF(t,e){const r=JSON.parse(t),n=Sw(e),i=ln(Ei(r,"ethaddr:string!")),a=Ste(Ei(r,"encseed:string!"));$e(a&&a.length%16===0,"invalid encseed","json",t);const o=Gt(vd(n,n,2e3,32,"sha256")).slice(0,16),s=a.slice(0,16),c=a.slice(16),u=new b$(o,s),f=O_e(Gt(u.decrypt(c)));let d="";for(let g=0;g<f.length;g++)d+=String.fromCharCode(f[g]);return{address:i,privateKey:$l(d)}}function pF(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}var fw,U8;const yh=class yh extends EA{constructor(e,r){typeof e=="string"&&!e.startsWith("0x")&&(e="0x"+e);let n=typeof e=="string"?new wu(e):e;super(n,r)}connect(e){return new yh(this.signingKey,e)}async encrypt(e,r){const n={address:this.address,privateKey:this.privateKey};return await Cte(n,e,{progressCallback:r})}encryptSync(e){const r={address:this.address,privateKey:this.privateKey};return Rte(r,e)}static async fromEncryptedJson(e,r,n){var a;let i=null;return lF(e)?i=await R_e(e,r,n):dF(e)&&(n&&(n(0),await pF(0)),i=hF(e,r),n&&(n(1),await pF(0))),Et(a=yh,fw,U8).call(a,i)}static fromEncryptedJsonSync(e,r){var i;let n=null;return lF(e)?n=T_e(e,r):dF(e)?n=hF(e,r):$e(!1,"invalid JSON wallet","json","[ REDACTED ]"),Et(i=yh,fw,U8).call(i,n)}static createRandom(e){const r=jb.createRandom();return e?r.connect(e):r}static fromPhrase(e,r){const n=jb.fromPhrase(e);return r?n.connect(r):n}};fw=new WeakSet,U8=function(e){if($e(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&e.mnemonic.locale==="en"){const n=Oy.fromEntropy(e.mnemonic.entropy),i=jb.fromMnemonic(n,e.mnemonic.path);if(i.address===e.address&&i.privateKey===e.privateKey)return i;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const r=new yh(e.privateKey);return $e(r.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),r},Ze(yh,fw);let L8=yh;var rm={},$te={exports:{}},Mte={exports:{}};(function(t){function e(r){"@babel/helpers - typeof";return t.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(Mte);var w$=Mte.exports;(function(t){var e=w$.default;function r(i){if(typeof WeakMap!="function")return null;var a=new WeakMap,o=new WeakMap;return(r=function(c){return c?o:a})(i)}function n(i,a){if(!a&&i&&i.__esModule)return i;if(i===null||e(i)!="object"&&typeof i!="function")return{default:i};var o=r(a);if(o&&o.has(i))return o.get(i);var s={__proto__:null},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in i)if(u!=="default"&&Object.prototype.hasOwnProperty.call(i,u)){var f=c?Object.getOwnPropertyDescriptor(i,u):null;f&&(f.get||f.set)?Object.defineProperty(s,u,f):s[u]=i[u]}return s.default=i,o&&o.set(i,s),s}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})($te);var Ys=$te.exports,kte={exports:{}};(function(t){function e(r){return r&&r.__esModule?r:{default:r}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(kte);var wr=kte.exports,RP={exports:{}},gF;function Fn(){return gF||(gF=1,function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(this,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(RP)),RP.exports}var CP={exports:{}},NP={exports:{}},yF;function $_e(){return yF||(yF=1,function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,o){return a.__proto__=o,a},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(NP)),NP.exports}var mF;function Uc(){return mF||(mF=1,function(t){var e=$_e();function r(n,i){n.prototype=Object.create(i.prototype),n.prototype.constructor=n,e(n,i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(CP)),CP.exports}var DP,vF;function Lte(){if(vF)return DP;vF=1;var t=typeof Ne=="object"&&Ne&&Ne.Object===Object&&Ne;return DP=t,DP}var $P,bF;function jl(){if(bF)return $P;bF=1;var t=Lte(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return $P=r,$P}var MP,wF;function Iw(){if(wF)return MP;wF=1;var t=jl(),e=t.Symbol;return MP=e,MP}var kP,_F;function M_e(){if(_F)return kP;_F=1;var t=Iw(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;function a(o){var s=r.call(o,i),c=o[i];try{o[i]=void 0;var u=!0}catch{}var f=n.call(o);return u&&(s?o[i]=c:delete o[i]),f}return kP=a,kP}var LP,EF;function k_e(){if(EF)return LP;EF=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return LP=r,LP}var UP,xF;function ql(){if(xF)return UP;xF=1;var t=Iw(),e=M_e(),r=k_e(),n="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function o(s){return s==null?s===void 0?i:n:a&&a in Object(s)?e(s):r(s)}return UP=o,UP}var BP,AF;function Hl(){if(AF)return BP;AF=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return BP=t,BP}var FP,SF;function eS(){if(SF)return FP;SF=1;var t=ql(),e=Hl(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!e(s))return!1;var c=t(s);return c==n||c==i||c==r||c==a}return FP=o,FP}var jP,IF;function L_e(){if(IF)return jP;IF=1;var t=jl(),e=t["__core-js_shared__"];return jP=e,jP}var qP,OF;function U_e(){if(OF)return qP;OF=1;var t=L_e(),e=function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!e&&e in n}return qP=r,qP}var HP,PF;function Ute(){if(PF)return HP;PF=1;var t=Function.prototype,e=t.toString;function r(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return HP=r,HP}var VP,TF;function B_e(){if(TF)return VP;TF=1;var t=eS(),e=U_e(),r=Hl(),n=Ute(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,c=o.toString,u=s.hasOwnProperty,f=RegExp("^"+c.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(g){if(!r(g)||e(g))return!1;var m=t(g)?f:a;return m.test(n(g))}return VP=d,VP}var zP,RF;function F_e(){if(RF)return zP;RF=1;function t(e,r){return e==null?void 0:e[r]}return zP=t,zP}var GP,CF;function Sp(){if(CF)return GP;CF=1;var t=B_e(),e=F_e();function r(n,i){var a=e(n,i);return t(a)?a:void 0}return GP=r,GP}var WP,NF;function tS(){if(NF)return WP;NF=1;var t=Sp(),e=t(Object,"create");return WP=e,WP}var KP,DF;function j_e(){if(DF)return KP;DF=1;var t=tS();function e(){this.__data__=t?t(null):{},this.size=0}return KP=e,KP}var YP,$F;function q_e(){if($F)return YP;$F=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return YP=t,YP}var QP,MF;function H_e(){if(MF)return QP;MF=1;var t=tS(),e="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(t){var s=o[a];return s===e?void 0:s}return n.call(o,a)?o[a]:void 0}return QP=i,QP}var JP,kF;function V_e(){if(kF)return JP;kF=1;var t=tS(),e=Object.prototype,r=e.hasOwnProperty;function n(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return JP=n,JP}var XP,LF;function z_e(){if(LF)return XP;LF=1;var t=tS(),e="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=t&&i===void 0?e:i,this}return XP=r,XP}var ZP,UF;function G_e(){if(UF)return ZP;UF=1;var t=j_e(),e=q_e(),r=H_e(),n=V_e(),i=z_e();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var u=o[s];this.set(u[0],u[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,ZP=a,ZP}var e3,BF;function W_e(){if(BF)return e3;BF=1;function t(){this.__data__=[],this.size=0}return e3=t,e3}var t3,FF;function rS(){if(FF)return t3;FF=1;function t(e,r){return e===r||e!==e&&r!==r}return t3=t,t3}var r3,jF;function nS(){if(jF)return r3;jF=1;var t=rS();function e(r,n){for(var i=r.length;i--;)if(t(r[i][0],n))return i;return-1}return r3=e,r3}var n3,qF;function K_e(){if(qF)return n3;qF=1;var t=nS(),e=Array.prototype,r=e.splice;function n(i){var a=this.__data__,o=t(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():r.call(a,o,1),--this.size,!0}return n3=n,n3}var i3,HF;function Y_e(){if(HF)return i3;HF=1;var t=nS();function e(r){var n=this.__data__,i=t(n,r);return i<0?void 0:n[i][1]}return i3=e,i3}var a3,VF;function Q_e(){if(VF)return a3;VF=1;var t=nS();function e(r){return t(this.__data__,r)>-1}return a3=e,a3}var o3,zF;function J_e(){if(zF)return o3;zF=1;var t=nS();function e(r,n){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return o3=e,o3}var s3,GF;function iS(){if(GF)return s3;GF=1;var t=W_e(),e=K_e(),r=Y_e(),n=Q_e(),i=J_e();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var u=o[s];this.set(u[0],u[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,s3=a,s3}var c3,WF;function _$(){if(WF)return c3;WF=1;var t=Sp(),e=jl(),r=t(e,"Map");return c3=r,c3}var u3,KF;function X_e(){if(KF)return u3;KF=1;var t=G_e(),e=iS(),r=_$();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return u3=n,u3}var l3,YF;function Z_e(){if(YF)return l3;YF=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return l3=t,l3}var f3,QF;function aS(){if(QF)return f3;QF=1;var t=Z_e();function e(r,n){var i=r.__data__;return t(n)?i[typeof n=="string"?"string":"hash"]:i.map}return f3=e,f3}var d3,JF;function eEe(){if(JF)return d3;JF=1;var t=aS();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return d3=e,d3}var h3,XF;function tEe(){if(XF)return h3;XF=1;var t=aS();function e(r){return t(this,r).get(r)}return h3=e,h3}var p3,ZF;function rEe(){if(ZF)return p3;ZF=1;var t=aS();function e(r){return t(this,r).has(r)}return p3=e,p3}var g3,ej;function nEe(){if(ej)return g3;ej=1;var t=aS();function e(r,n){var i=t(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return g3=e,g3}var y3,tj;function E$(){if(tj)return y3;tj=1;var t=X_e(),e=eEe(),r=tEe(),n=rEe(),i=nEe();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var u=o[s];this.set(u[0],u[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,y3=a,y3}var m3,rj;function iEe(){if(rj)return m3;rj=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return m3=e,m3}var v3,nj;function aEe(){if(nj)return v3;nj=1;function t(e){return this.__data__.has(e)}return v3=t,v3}var b3,ij;function oS(){if(ij)return b3;ij=1;var t=E$(),e=iEe(),r=aEe();function n(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new t;++a<o;)this.add(i[a])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,b3=n,b3}var w3,aj;function Bte(){if(aj)return w3;aj=1;function t(e,r,n,i){for(var a=e.length,o=n+(i?1:-1);i?o--:++o<a;)if(r(e[o],o,e))return o;return-1}return w3=t,w3}var _3,oj;function oEe(){if(oj)return _3;oj=1;function t(e){return e!==e}return _3=t,_3}var E3,sj;function sEe(){if(sj)return E3;sj=1;function t(e,r,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===r)return i;return-1}return E3=t,E3}var x3,cj;function sS(){if(cj)return x3;cj=1;var t=Bte(),e=oEe(),r=sEe();function n(i,a,o){return a===a?r(i,a,o):t(i,e,o)}return x3=n,x3}var A3,uj;function x$(){if(uj)return A3;uj=1;var t=sS();function e(r,n){var i=r==null?0:r.length;return!!i&&t(r,n,0)>-1}return A3=e,A3}var S3,lj;function A$(){if(lj)return S3;lj=1;function t(e,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;)if(n(r,e[i]))return!0;return!1}return S3=t,S3}var I3,fj;function Ip(){if(fj)return I3;fj=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=Array(i);++n<i;)a[n]=r(e[n],n,e);return a}return I3=t,I3}var O3,dj;function cS(){if(dj)return O3;dj=1;function t(e){return function(r){return e(r)}}return O3=t,O3}var P3,hj;function uS(){if(hj)return P3;hj=1;function t(e,r){return e.has(r)}return P3=t,P3}var T3,pj;function Fte(){if(pj)return T3;pj=1;var t=oS(),e=x$(),r=A$(),n=Ip(),i=cS(),a=uS(),o=200;function s(c,u,f,d){var g=-1,m=e,w=!0,v=c.length,y=[],_=u.length;if(!v)return y;f&&(u=n(u,i(f))),d?(m=r,w=!1):u.length>=o&&(m=a,w=!1,u=new t(u));e:for(;++g<v;){var b=c[g],S=f==null?b:f(b);if(b=d||b!==0?b:0,w&&S===S){for(var x=_;x--;)if(u[x]===S)continue e;y.push(b)}else m(u,S,d)||y.push(b)}return y}return T3=s,T3}var R3,gj;function wd(){if(gj)return R3;gj=1;function t(e){return e}return R3=t,R3}var C3,yj;function jte(){if(yj)return C3;yj=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return C3=t,C3}var N3,mj;function qte(){if(mj)return N3;mj=1;var t=jte(),e=Math.max;function r(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var o=arguments,s=-1,c=e(o.length-i,0),u=Array(c);++s<c;)u[s]=o[i+s];s=-1;for(var f=Array(i+1);++s<i;)f[s]=o[s];return f[i]=a(u),t(n,this,f)}}return N3=r,N3}var D3,vj;function Hte(){if(vj)return D3;vj=1;function t(e){return function(){return e}}return D3=t,D3}var $3,bj;function Vte(){if(bj)return $3;bj=1;var t=Sp(),e=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}}();return $3=e,$3}var M3,wj;function cEe(){if(wj)return M3;wj=1;var t=Hte(),e=Vte(),r=wd(),n=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return M3=n,M3}var k3,_j;function uEe(){if(_j)return k3;_j=1;var t=800,e=16,r=Date.now;function n(i){var a=0,o=0;return function(){var s=r(),c=e-(s-o);if(o=s,c>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return k3=n,k3}var L3,Ej;function zte(){if(Ej)return L3;Ej=1;var t=cEe(),e=uEe(),r=e(t);return L3=r,L3}var U3,xj;function Ow(){if(xj)return U3;xj=1;var t=wd(),e=qte(),r=zte();function n(i,a){return r(e(i,a,t),i+"")}return U3=n,U3}var B3,Aj;function S$(){if(Aj)return B3;Aj=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return B3=e,B3}var F3,Sj;function _d(){if(Sj)return F3;Sj=1;var t=eS(),e=S$();function r(n){return n!=null&&e(n.length)&&!t(n)}return F3=r,F3}var j3,Ij;function Bc(){if(Ij)return j3;Ij=1;function t(e){return e!=null&&typeof e=="object"}return j3=t,j3}var q3,Oj;function I$(){if(Oj)return q3;Oj=1;var t=_d(),e=Bc();function r(n){return e(n)&&t(n)}return q3=r,q3}var H3,Pj;function O$(){if(Pj)return H3;Pj=1;var t=Fte(),e=Ow(),r=I$(),n=e(function(i,a){return r(i)?t(i,a):[]});return H3=n,H3}var V3,Tj;function Di(){if(Tj)return V3;Tj=1;var t=Array.isArray;return V3=t,V3}var z3,Rj;function nm(){if(Rj)return z3;Rj=1;var t=ql(),e=Bc(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return z3=n,z3}var G3,Cj;function P$(){if(Cj)return G3;Cj=1;var t=Di(),e=nm(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(t(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||e(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return G3=i,G3}var W3,Nj;function T$(){if(Nj)return W3;Nj=1;var t=E$(),e="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var o=arguments,s=i?i.apply(this,o):o[0],c=a.cache;if(c.has(s))return c.get(s);var u=n.apply(this,o);return a.cache=c.set(s,u)||c,u};return a.cache=new(r.Cache||t),a}return r.Cache=t,W3=r,W3}var K3,Dj;function lEe(){if(Dj)return K3;Dj=1;var t=T$(),e=500;function r(n){var i=t(n,function(o){return a.size===e&&a.clear(),o}),a=i.cache;return i}return K3=r,K3}var Y3,$j;function fEe(){if($j)return Y3;$j=1;var t=lEe(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(o,s,c,u){a.push(c?u.replace(r,"$1"):s||o)}),a});return Y3=n,Y3}var Q3,Mj;function R$(){if(Mj)return Q3;Mj=1;var t=Iw(),e=Ip(),r=Di(),n=nm(),i=1/0,a=t?t.prototype:void 0,o=a?a.toString:void 0;function s(c){if(typeof c=="string")return c;if(r(c))return e(c,s)+"";if(n(c))return o?o.call(c):"";var u=c+"";return u=="0"&&1/c==-i?"-0":u}return Q3=s,Q3}var J3,kj;function C$(){if(kj)return J3;kj=1;var t=R$();function e(r){return r==null?"":t(r)}return J3=e,J3}var X3,Lj;function Pw(){if(Lj)return X3;Lj=1;var t=Di(),e=P$(),r=fEe(),n=C$();function i(a,o){return t(a)?a:e(a,o)?[a]:r(n(a))}return X3=i,X3}var Z3,Uj;function dEe(){if(Uj)return Z3;Uj=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return Z3=t,Z3}var eT,Bj;function im(){if(Bj)return eT;Bj=1;var t=nm(),e=1/0;function r(n){if(typeof n=="string"||t(n))return n;var i=n+"";return i=="0"&&1/n==-e?"-0":i}return eT=r,eT}var tT,Fj;function Tw(){if(Fj)return tT;Fj=1;var t=Pw(),e=im();function r(n,i){i=t(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[e(i[a++])];return a&&a==o?n:void 0}return tT=r,tT}var rT,jj;function N$(){if(jj)return rT;jj=1;function t(e,r,n){var i=-1,a=e.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=e[i+r];return o}return rT=t,rT}var nT,qj;function hEe(){if(qj)return nT;qj=1;var t=Tw(),e=N$();function r(n,i){return i.length<2?n:t(n,e(i,0,-1))}return nT=r,nT}var iT,Hj;function pEe(){if(Hj)return iT;Hj=1;var t=jte(),e=Pw(),r=dEe(),n=hEe(),i=im();function a(o,s,c){s=e(s,o),o=n(o,s);var u=o==null?o:o[i(r(s))];return u==null?void 0:t(u,o,c)}return iT=a,iT}var aT,Vj;function Qs(){if(Vj)return aT;Vj=1;var t=pEe(),e=Ow(),r=e(t);return aT=r,aT}var oT,zj;function Vl(){if(zj)return oT;zj=1;function t(e){return e==null}return oT=t,oT}function Gte(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=Gte(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function Gj(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=Gte(t))&&(n&&(n+=" "),n+=e);return n}const gEe=Object.freeze(Object.defineProperty({__proto__:null,clsx:Gj,default:Gj},Symbol.toStringTag,{value:"Module"})),ii=lo(gEe);var sT={exports:{}},cT,Wj;function yEe(){if(Wj)return cT;Wj=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return cT=t,cT}var uT,Kj;function mEe(){if(Kj)return uT;Kj=1;var t=yEe();function e(){}function r(){}return r.resetWarningCache=e,uT=function(){function n(o,s,c,u,f,d){if(d!==t){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},uT}var Yj;function Ln(){return Yj||(Yj=1,sT.exports=mEe()()),sT.exports}var lT={},Km={},fT={exports:{}},Qj;function vEe(){return Qj||(Qj=1,function(t){function e(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(fT)),fT.exports}var dT,Jj;function D$(){if(Jj)return dT;Jj=1;function t(e){return e===void 0}return dT=t,dT}var hT,Xj;function bEe(){if(Xj)return hT;Xj=1;function t(e,r,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),r!==void 0&&(e=e>=r?e:r)),e}return hT=t,hT}var pT,Zj;function wEe(){if(Zj)return pT;Zj=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return pT=e,pT}var gT,eq;function Wte(){if(eq)return gT;eq=1;var t=wEe(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return gT=r,gT}var yT,tq;function Kte(){if(tq)return yT;tq=1;var t=Wte(),e=Hl(),r=nm(),n=0/0,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function c(u){if(typeof u=="number")return u;if(r(u))return n;if(e(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=e(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=t(u);var d=a.test(u);return d||o.test(u)?s(u.slice(2),d?2:8):i.test(u)?n:+u}return yT=c,yT}var mT,rq;function $$(){if(rq)return mT;rq=1;var t=Kte(),e=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=t(i),i===e||i===-e){var a=i<0?-1:1;return a*r}return i===i?i:0}return mT=n,mT}var vT,nq;function lS(){if(nq)return vT;nq=1;var t=$$();function e(r){var n=t(r),i=n%1;return n===n?i?n-i:n:0}return vT=e,vT}var bT,iq;function _Ee(){if(iq)return bT;iq=1;var t=bEe(),e=R$(),r=lS(),n=C$();function i(a,o,s){return a=n(a),s=s==null?0:t(r(s),0,a.length),o=e(o),a.slice(s,s+o.length)==o}return bT=i,bT}var wT,aq;function Yte(){if(aq)return wT;aq=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=0,o=[];++n<i;){var s=e[n];r(s,n,e)&&(o[a++]=s)}return o}return wT=t,wT}var _T,oq;function EEe(){if(oq)return _T;oq=1;function t(e){return function(r,n,i){for(var a=-1,o=Object(r),s=i(r),c=s.length;c--;){var u=s[e?c:++a];if(n(o[u],u,o)===!1)break}return r}}return _T=t,_T}var ET,sq;function xEe(){if(sq)return ET;sq=1;var t=EEe(),e=t();return ET=e,ET}var xT,cq;function AEe(){if(cq)return xT;cq=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return xT=t,xT}var AT,uq;function SEe(){if(uq)return AT;uq=1;var t=ql(),e=Bc(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return AT=n,AT}var ST,lq;function fS(){if(lq)return ST;lq=1;var t=SEe(),e=Bc(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=t(function(){return arguments}())?t:function(o){return e(o)&&n.call(o,"callee")&&!i.call(o,"callee")};return ST=a,ST}var mb={exports:{}},IT,fq;function IEe(){if(fq)return IT;fq=1;function t(){return!1}return IT=t,IT}mb.exports;var dq;function dS(){return dq||(dq=1,function(t,e){var r=jl(),n=IEe(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,o=a&&a.exports===i,s=o?r.Buffer:void 0,c=s?s.isBuffer:void 0,u=c||n;t.exports=u}(mb,mb.exports)),mb.exports}var OT,hq;function hS(){if(hq)return OT;hq=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<i}return OT=r,OT}var PT,pq;function OEe(){if(pq)return PT;pq=1;var t=ql(),e=S$(),r=Bc(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",c="[object Function]",u="[object Map]",f="[object Number]",d="[object Object]",g="[object RegExp]",m="[object Set]",w="[object String]",v="[object WeakMap]",y="[object ArrayBuffer]",_="[object DataView]",b="[object Float32Array]",S="[object Float64Array]",x="[object Int8Array]",I="[object Int16Array]",E="[object Int32Array]",p="[object Uint8Array]",O="[object Uint8ClampedArray]",C="[object Uint16Array]",M="[object Uint32Array]",B={};B[b]=B[S]=B[x]=B[I]=B[E]=B[p]=B[O]=B[C]=B[M]=!0,B[n]=B[i]=B[y]=B[a]=B[_]=B[o]=B[s]=B[c]=B[u]=B[f]=B[d]=B[g]=B[m]=B[w]=B[v]=!1;function ce(he){return r(he)&&e(he.length)&&!!B[t(he)]}return PT=ce,PT}var vb={exports:{}};vb.exports;var gq;function PEe(){return gq||(gq=1,function(t,e){var r=Lte(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s}(vb,vb.exports)),vb.exports}var TT,yq;function pS(){if(yq)return TT;yq=1;var t=OEe(),e=cS(),r=PEe(),n=r&&r.isTypedArray,i=n?e(n):t;return TT=i,TT}var RT,mq;function TEe(){if(mq)return RT;mq=1;var t=AEe(),e=fS(),r=Di(),n=dS(),i=hS(),a=pS(),o=Object.prototype,s=o.hasOwnProperty;function c(u,f){var d=r(u),g=!d&&e(u),m=!d&&!g&&n(u),w=!d&&!g&&!m&&a(u),v=d||g||m||w,y=v?t(u.length,String):[],_=y.length;for(var b in u)(f||s.call(u,b))&&!(v&&(b=="length"||m&&(b=="offset"||b=="parent")||w&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||i(b,_)))&&y.push(b);return y}return RT=c,RT}var CT,vq;function Qte(){if(vq)return CT;vq=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return CT=e,CT}var NT,bq;function Jte(){if(bq)return NT;bq=1;function t(e,r){return function(n){return e(r(n))}}return NT=t,NT}var DT,wq;function REe(){if(wq)return DT;wq=1;var t=Jte(),e=t(Object.keys,Object);return DT=e,DT}var $T,_q;function Xte(){if(_q)return $T;_q=1;var t=Qte(),e=REe(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var o=[];for(var s in Object(a))n.call(a,s)&&s!="constructor"&&o.push(s);return o}return $T=i,$T}var MT,Eq;function zl(){if(Eq)return MT;Eq=1;var t=TEe(),e=Xte(),r=_d();function n(i){return r(i)?t(i):e(i)}return MT=n,MT}var kT,xq;function M$(){if(xq)return kT;xq=1;var t=xEe(),e=zl();function r(n,i){return n&&t(n,i,e)}return kT=r,kT}var LT,Aq;function CEe(){if(Aq)return LT;Aq=1;var t=_d();function e(r,n){return function(i,a){if(i==null)return i;if(!t(i))return r(i,a);for(var o=i.length,s=n?o:-1,c=Object(i);(n?s--:++s<o)&&a(c[s],s,c)!==!1;);return i}}return LT=e,LT}var UT,Sq;function Rw(){if(Sq)return UT;Sq=1;var t=M$(),e=CEe(),r=e(t);return UT=r,UT}var BT,Iq;function NEe(){if(Iq)return BT;Iq=1;var t=Rw();function e(r,n){var i=[];return t(r,function(a,o,s){n(a,o,s)&&i.push(a)}),i}return BT=e,BT}var FT,Oq;function DEe(){if(Oq)return FT;Oq=1;var t=iS();function e(){this.__data__=new t,this.size=0}return FT=e,FT}var jT,Pq;function $Ee(){if(Pq)return jT;Pq=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return jT=t,jT}var qT,Tq;function MEe(){if(Tq)return qT;Tq=1;function t(e){return this.__data__.get(e)}return qT=t,qT}var HT,Rq;function kEe(){if(Rq)return HT;Rq=1;function t(e){return this.__data__.has(e)}return HT=t,HT}var VT,Cq;function LEe(){if(Cq)return VT;Cq=1;var t=iS(),e=_$(),r=E$(),n=200;function i(a,o){var s=this.__data__;if(s instanceof t){var c=s.__data__;if(!e||c.length<n-1)return c.push([a,o]),this.size=++s.size,this;s=this.__data__=new r(c)}return s.set(a,o),this.size=s.size,this}return VT=i,VT}var zT,Nq;function Zte(){if(Nq)return zT;Nq=1;var t=iS(),e=DEe(),r=$Ee(),n=MEe(),i=kEe(),a=LEe();function o(s){var c=this.__data__=new t(s);this.size=c.size}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=i,o.prototype.set=a,zT=o,zT}var GT,Dq;function ere(){if(Dq)return GT;Dq=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(e[n],n,e))return!0;return!1}return GT=t,GT}var WT,$q;function tre(){if($q)return WT;$q=1;var t=oS(),e=ere(),r=uS(),n=1,i=2;function a(o,s,c,u,f,d){var g=c&n,m=o.length,w=s.length;if(m!=w&&!(g&&w>m))return!1;var v=d.get(o),y=d.get(s);if(v&&y)return v==s&&y==o;var _=-1,b=!0,S=c&i?new t:void 0;for(d.set(o,s),d.set(s,o);++_<m;){var x=o[_],I=s[_];if(u)var E=g?u(I,x,_,s,o,d):u(x,I,_,o,s,d);if(E!==void 0){if(E)continue;b=!1;break}if(S){if(!e(s,function(p,O){if(!r(S,O)&&(x===p||f(x,p,c,u,d)))return S.push(O)})){b=!1;break}}else if(!(x===I||f(x,I,c,u,d))){b=!1;break}}return d.delete(o),d.delete(s),b}return WT=a,WT}var KT,Mq;function UEe(){if(Mq)return KT;Mq=1;var t=jl(),e=t.Uint8Array;return KT=e,KT}var YT,kq;function BEe(){if(kq)return YT;kq=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return YT=t,YT}var QT,Lq;function k$(){if(Lq)return QT;Lq=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return QT=t,QT}var JT,Uq;function FEe(){if(Uq)return JT;Uq=1;var t=Iw(),e=UEe(),r=rS(),n=tre(),i=BEe(),a=k$(),o=1,s=2,c="[object Boolean]",u="[object Date]",f="[object Error]",d="[object Map]",g="[object Number]",m="[object RegExp]",w="[object Set]",v="[object String]",y="[object Symbol]",_="[object ArrayBuffer]",b="[object DataView]",S=t?t.prototype:void 0,x=S?S.valueOf:void 0;function I(E,p,O,C,M,B,ce){switch(O){case b:if(E.byteLength!=p.byteLength||E.byteOffset!=p.byteOffset)return!1;E=E.buffer,p=p.buffer;case _:return!(E.byteLength!=p.byteLength||!B(new e(E),new e(p)));case c:case u:case g:return r(+E,+p);case f:return E.name==p.name&&E.message==p.message;case m:case v:return E==p+"";case d:var he=i;case w:var F=C&o;if(he||(he=a),E.size!=p.size&&!F)return!1;var U=ce.get(E);if(U)return U==p;C|=s,ce.set(E,p);var K=n(he(E),he(p),C,M,B,ce);return ce.delete(E),K;case y:if(x)return x.call(E)==x.call(p)}return!1}return JT=I,JT}var XT,Bq;function rre(){if(Bq)return XT;Bq=1;function t(e,r){for(var n=-1,i=r.length,a=e.length;++n<i;)e[a+n]=r[n];return e}return XT=t,XT}var ZT,Fq;function jEe(){if(Fq)return ZT;Fq=1;var t=rre(),e=Di();function r(n,i,a){var o=i(n);return e(n)?o:t(o,a(n))}return ZT=r,ZT}var eR,jq;function qEe(){if(jq)return eR;jq=1;function t(){return[]}return eR=t,eR}var tR,qq;function HEe(){if(qq)return tR;qq=1;var t=Yte(),e=qEe(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),t(i(o),function(s){return n.call(o,s)}))}:e;return tR=a,tR}var rR,Hq;function VEe(){if(Hq)return rR;Hq=1;var t=jEe(),e=HEe(),r=zl();function n(i){return t(i,r,e)}return rR=n,rR}var nR,Vq;function zEe(){if(Vq)return nR;Vq=1;var t=VEe(),e=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,o,s,c,u,f){var d=s&e,g=t(a),m=g.length,w=t(o),v=w.length;if(m!=v&&!d)return!1;for(var y=m;y--;){var _=g[y];if(!(d?_ in o:n.call(o,_)))return!1}var b=f.get(a),S=f.get(o);if(b&&S)return b==o&&S==a;var x=!0;f.set(a,o),f.set(o,a);for(var I=d;++y<m;){_=g[y];var E=a[_],p=o[_];if(c)var O=d?c(p,E,_,o,a,f):c(E,p,_,a,o,f);if(!(O===void 0?E===p||u(E,p,s,c,f):O)){x=!1;break}I||(I=_=="constructor")}if(x&&!I){var C=a.constructor,M=o.constructor;C!=M&&"constructor"in a&&"constructor"in o&&!(typeof C=="function"&&C instanceof C&&typeof M=="function"&&M instanceof M)&&(x=!1)}return f.delete(a),f.delete(o),x}return nR=i,nR}var iR,zq;function GEe(){if(zq)return iR;zq=1;var t=Sp(),e=jl(),r=t(e,"DataView");return iR=r,iR}var aR,Gq;function WEe(){if(Gq)return aR;Gq=1;var t=Sp(),e=jl(),r=t(e,"Promise");return aR=r,aR}var oR,Wq;function nre(){if(Wq)return oR;Wq=1;var t=Sp(),e=jl(),r=t(e,"Set");return oR=r,oR}var sR,Kq;function KEe(){if(Kq)return sR;Kq=1;var t=Sp(),e=jl(),r=t(e,"WeakMap");return sR=r,sR}var cR,Yq;function ire(){if(Yq)return cR;Yq=1;var t=GEe(),e=_$(),r=WEe(),n=nre(),i=KEe(),a=ql(),o=Ute(),s="[object Map]",c="[object Object]",u="[object Promise]",f="[object Set]",d="[object WeakMap]",g="[object DataView]",m=o(t),w=o(e),v=o(r),y=o(n),_=o(i),b=a;return(t&&b(new t(new ArrayBuffer(1)))!=g||e&&b(new e)!=s||r&&b(r.resolve())!=u||n&&b(new n)!=f||i&&b(new i)!=d)&&(b=function(S){var x=a(S),I=x==c?S.constructor:void 0,E=I?o(I):"";if(E)switch(E){case m:return g;case w:return s;case v:return u;case y:return f;case _:return d}return x}),cR=b,cR}var uR,Qq;function YEe(){if(Qq)return uR;Qq=1;var t=Zte(),e=tre(),r=FEe(),n=zEe(),i=ire(),a=Di(),o=dS(),s=pS(),c=1,u="[object Arguments]",f="[object Array]",d="[object Object]",g=Object.prototype,m=g.hasOwnProperty;function w(v,y,_,b,S,x){var I=a(v),E=a(y),p=I?f:i(v),O=E?f:i(y);p=p==u?d:p,O=O==u?d:O;var C=p==d,M=O==d,B=p==O;if(B&&o(v)){if(!o(y))return!1;I=!0,C=!1}if(B&&!C)return x||(x=new t),I||s(v)?e(v,y,_,b,S,x):r(v,y,p,_,b,S,x);if(!(_&c)){var ce=C&&m.call(v,"__wrapped__"),he=M&&m.call(y,"__wrapped__");if(ce||he){var F=ce?v.value():v,U=he?y.value():y;return x||(x=new t),S(F,U,_,b,x)}}return B?(x||(x=new t),n(v,y,_,b,S,x)):!1}return uR=w,uR}var lR,Jq;function L$(){if(Jq)return lR;Jq=1;var t=YEe(),e=Bc();function r(n,i,a,o,s){return n===i?!0:n==null||i==null||!e(n)&&!e(i)?n!==n&&i!==i:t(n,i,a,o,r,s)}return lR=r,lR}var fR,Xq;function QEe(){if(Xq)return fR;Xq=1;var t=Zte(),e=L$(),r=1,n=2;function i(a,o,s,c){var u=s.length,f=u,d=!c;if(a==null)return!f;for(a=Object(a);u--;){var g=s[u];if(d&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++u<f;){g=s[u];var m=g[0],w=a[m],v=g[1];if(d&&g[2]){if(w===void 0&&!(m in a))return!1}else{var y=new t;if(c)var _=c(w,v,m,a,o,y);if(!(_===void 0?e(v,w,r|n,c,y):_))return!1}}return!0}return fR=i,fR}var dR,Zq;function are(){if(Zq)return dR;Zq=1;var t=Hl();function e(r){return r===r&&!t(r)}return dR=e,dR}var hR,eH;function JEe(){if(eH)return hR;eH=1;var t=are(),e=zl();function r(n){for(var i=e(n),a=i.length;a--;){var o=i[a],s=n[o];i[a]=[o,s,t(s)]}return i}return hR=r,hR}var pR,tH;function ore(){if(tH)return pR;tH=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return pR=t,pR}var gR,rH;function XEe(){if(rH)return gR;rH=1;var t=QEe(),e=JEe(),r=ore();function n(i){var a=e(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(o){return o===i||t(o,i,a)}}return gR=n,gR}var yR,nH;function ZEe(){if(nH)return yR;nH=1;var t=Tw();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return yR=e,yR}var mR,iH;function exe(){if(iH)return mR;iH=1;function t(e,r){return e!=null&&r in Object(e)}return mR=t,mR}var vR,aH;function sre(){if(aH)return vR;aH=1;var t=Pw(),e=fS(),r=Di(),n=hS(),i=S$(),a=im();function o(s,c,u){c=t(c,s);for(var f=-1,d=c.length,g=!1;++f<d;){var m=a(c[f]);if(!(g=s!=null&&u(s,m)))break;s=s[m]}return g||++f!=d?g:(d=s==null?0:s.length,!!d&&i(d)&&n(m,d)&&(r(s)||e(s)))}return vR=o,vR}var bR,oH;function cre(){if(oH)return bR;oH=1;var t=exe(),e=sre();function r(n,i){return n!=null&&e(n,i,t)}return bR=r,bR}var wR,sH;function txe(){if(sH)return wR;sH=1;var t=L$(),e=ZEe(),r=cre(),n=P$(),i=are(),a=ore(),o=im(),s=1,c=2;function u(f,d){return n(f)&&i(d)?a(o(f),d):function(g){var m=e(g,f);return m===void 0&&m===d?r(g,f):t(d,m,s|c)}}return wR=u,wR}var _R,cH;function rxe(){if(cH)return _R;cH=1;function t(e){return function(r){return r==null?void 0:r[e]}}return _R=t,_R}var ER,uH;function nxe(){if(uH)return ER;uH=1;var t=Tw();function e(r){return function(n){return t(n,r)}}return ER=e,ER}var xR,lH;function ixe(){if(lH)return xR;lH=1;var t=rxe(),e=nxe(),r=P$(),n=im();function i(a){return r(a)?t(n(a)):e(a)}return xR=i,xR}var AR,fH;function Ed(){if(fH)return AR;fH=1;var t=XEe(),e=txe(),r=wd(),n=Di(),i=ixe();function a(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?e(o[0],o[1]):t(o):i(o)}return AR=a,AR}var SR,dH;function axe(){if(dH)return SR;dH=1;var t=Yte(),e=NEe(),r=Ed(),n=Di();function i(a,o){var s=n(a)?t:e;return s(a,r(o,3))}return SR=i,SR}var IR,hH;function ure(){if(hH)return IR;hH=1;var t=Xte(),e=ire(),r=fS(),n=Di(),i=_d(),a=dS(),o=Qte(),s=pS(),c="[object Map]",u="[object Set]",f=Object.prototype,d=f.hasOwnProperty;function g(m){if(m==null)return!0;if(i(m)&&(n(m)||typeof m=="string"||typeof m.splice=="function"||a(m)||s(m)||r(m)))return!m.length;var w=e(m);if(w==c||w==u)return!m.size;if(o(m))return!t(m).length;for(var v in m)if(d.call(m,v))return!1;return!0}return IR=g,IR}var OR,pH;function oxe(){if(pH)return OR;pH=1;var t=oS(),e=x$(),r=A$(),n=Ip(),i=cS(),a=uS(),o=Math.min;function s(c,u,f){for(var d=f?r:e,g=c[0].length,m=c.length,w=m,v=Array(m),y=1/0,_=[];w--;){var b=c[w];w&&u&&(b=n(b,i(u))),y=o(b.length,y),v[w]=!f&&(u||g>=120&&b.length>=120)?new t(w&&b):void 0}b=c[0];var S=-1,x=v[0];e:for(;++S<g&&_.length<y;){var I=b[S],E=u?u(I):I;if(I=f||I!==0?I:0,!(x?a(x,E):d(_,E,f))){for(w=m;--w;){var p=v[w];if(!(p?a(p,E):d(c[w],E,f)))continue e}x&&x.push(E),_.push(I)}}return _}return OR=s,OR}var PR,gH;function sxe(){if(gH)return PR;gH=1;var t=I$();function e(r){return t(r)?r:[]}return PR=e,PR}var TR,yH;function cxe(){if(yH)return TR;yH=1;var t=Ip(),e=oxe(),r=Ow(),n=sxe(),i=r(function(a){var o=t(a,n);return o.length&&o[0]===a[0]?e(o):[]});return TR=i,TR}var RR,mH;function uxe(){if(mH)return RR;mH=1;var t=Object.prototype,e=t.hasOwnProperty;function r(n,i){return n!=null&&e.call(n,i)}return RR=r,RR}var CR,vH;function lre(){if(vH)return CR;vH=1;var t=uxe(),e=sre();function r(n,i){return n!=null&&e(n,i,t)}return CR=r,CR}var NR,bH;function fre(){if(bH)return NR;bH=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i&&r(e[n],n,e)!==!1;);return e}return NR=t,NR}var DR,wH;function lxe(){if(wH)return DR;wH=1;var t=wd();function e(r){return typeof r=="function"?r:t}return DR=e,DR}var $R,_H;function dre(){if(_H)return $R;_H=1;var t=fre(),e=Rw(),r=lxe(),n=Di();function i(a,o){var s=n(a)?t:e;return s(a,r(o))}return $R=i,$R}var MR,EH;function fxe(){return EH||(EH=1,MR=dre()),MR}var xH;function dxe(){if(xH)return Km;xH=1;var t=wr;Km.__esModule=!0,Km.default=void 0;var e=t(Fn()),r=t(vEe()),n=t(Uc()),i=t(D$());t(_Ee()),t(axe()),t(ure()),t(zl()),t(cxe()),t(lre()),t(fxe());var a=t(Qs()),o=t(Be),s=function(d){return"default"+(d[0].toUpperCase()+d.slice(1))},c=function(d,g,m,w){w===void 0&&(w=!1);var v=g[d];if(v!==void 0)return v;if(w){var y=g[s(d)];if(y!==void 0)return y;if(m){var _=m[d];if(_!==void 0)return _}}if(d==="checked")return!1;if(d==="value")return g.multiple?[]:""},u=function(f){(0,n.default)(d,f);function d(){for(var g,m=arguments.length,w=new Array(m),v=0;v<m;v++)w[v]=arguments[v];g=f.call.apply(f,[this].concat(w))||this;var y=g.constructor,_=y.autoControlledProps,b=y.getAutoControlledStateFromProps,S=(0,a.default)((0,r.default)(g),"getInitialAutoControlledState",g.props)||{},x=_.reduce(function(I,E){return I[E]=c(E,g.props,S,!0),I},{});return g.state=(0,e.default)({},S,x,{autoControlledProps:_,getAutoControlledStateFromProps:b}),g}return d.getDerivedStateFromProps=function(m,w){var v=w.autoControlledProps,y=w.getAutoControlledStateFromProps,_=v.reduce(function(S,x){var I=!(0,i.default)(m[x]);return I&&(S[x]=m[x]),S},{});if(y){var b=y(m,(0,e.default)({},w,_),w);return(0,e.default)({},_,b)}return _},d.getAutoControlledStateFromProps=function(){return null},d}(o.default.Component);return Km.default=u,Km}var qu={},kR,AH;function hxe(){if(AH)return kR;AH=1;var t=Ed(),e=_d(),r=zl();function n(i){return function(a,o,s){var c=Object(a);if(!e(a)){var u=t(o,3);a=r(a),o=function(d){return u(c[d],d,c)}}var f=i(a,o,s);return f>-1?c[u?a[f]:f]:void 0}}return kR=n,kR}var LR,SH;function pxe(){if(SH)return LR;SH=1;var t=Bte(),e=Ed(),r=lS(),n=Math.max;function i(a,o,s){var c=a==null?0:a.length;if(!c)return-1;var u=s==null?0:r(s);return u<0&&(u=n(c+u,0)),t(a,e(o,3),u)}return LR=i,LR}var UR,IH;function gxe(){if(IH)return UR;IH=1;var t=hxe(),e=pxe(),r=t(e);return UR=r,UR}var BR,OH;function yxe(){if(OH)return BR;OH=1;var t=Rw();function e(r,n){var i;return t(r,function(a,o,s){return i=n(a,o,s),!i}),!!i}return BR=e,BR}var FR,PH;function U$(){if(PH)return FR;PH=1;var t=rS(),e=_d(),r=hS(),n=Hl();function i(a,o,s){if(!n(s))return!1;var c=typeof o;return(c=="number"?e(s)&&r(o,s.length):c=="string"&&o in s)?t(s[o],a):!1}return FR=i,FR}var jR,TH;function hre(){if(TH)return jR;TH=1;var t=ere(),e=Ed(),r=yxe(),n=Di(),i=U$();function a(o,s,c){var u=n(o)?t:r;return c&&i(o,s,c)&&(s=void 0),u(o,e(s,3))}return jR=a,jR}var RH;function mxe(){if(RH)return qu;RH=1;var t=wr;qu.__esModule=!0,qu.isNil=qu.findByType=qu.someByType=void 0;var e=t(gxe()),r=t(hre()),n=Be,i=function(c,u){return(0,r.default)(n.Children.toArray(c),{type:u})};qu.someByType=i;var a=function(c,u){return(0,e.default)(n.Children.toArray(c),{type:u})};qu.findByType=a;var o=function(c){return c==null||Array.isArray(c)&&c.length===0};return qu.isNil=o,qu}var aa={},h0={},CH;function B$(){if(CH)return h0;CH=1,h0.__esModule=!0,h0.numberToWord=e,h0.numberToWordMap=void 0;var t={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};h0.numberToWordMap=t;function e(r){var n=typeof r;return n==="string"||n==="number"?t[r]||r:""}return h0}var NH;function vxe(){if(NH)return aa;NH=1,aa.__esModule=!0,aa.useWidthProp=aa.useVerticalAlignProp=aa.useTextAlignProp=aa.useMultipleProp=aa.useKeyOrValueAndKey=aa.useValueAndKey=aa.useKeyOnly=void 0;var t=B$(),e=function(u,f){return u&&f};aa.useKeyOnly=e;var r=function(u,f){return u&&u!==!0&&u+" "+f};aa.useValueAndKey=r;var n=function(u,f){return u&&(u===!0?f:u+" "+f)};aa.useKeyOrValueAndKey=n;var i=function(u,f){return!u||u===!0?null:u.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(d){return d.replace("-"," ")+" "+f}).join(" ")};aa.useMultipleProp=i;var a=function(u){return u==="justified"?"justified":r(u,"aligned")};aa.useTextAlignProp=a;var o=function(u){return r(u,"aligned")};aa.useVerticalAlignProp=o;var s=function(u,f,d){if(f===void 0&&(f=""),d===void 0&&(d=!1),d&&u==="equal")return"equal width";var g=typeof u;return(g==="string"||g==="number")&&f?(0,t.numberToWord)(u)+" "+f:(0,t.numberToWord)(u)};return aa.useWidthProp=s,aa}var Rn={},qR,DH;function bxe(){if(DH)return qR;DH=1;var t=Iw(),e=fS(),r=Di(),n=t?t.isConcatSpreadable:void 0;function i(a){return r(a)||e(a)||!!(n&&a&&a[n])}return qR=i,qR}var HR,$H;function F$(){if($H)return HR;$H=1;var t=rre(),e=bxe();function r(n,i,a,o,s){var c=-1,u=n.length;for(a||(a=e),s||(s=[]);++c<u;){var f=n[c];i>0&&a(f)?i>1?r(f,i-1,a,o,s):t(s,f):o||(s[s.length]=f)}return s}return HR=r,HR}var VR,MH;function wxe(){if(MH)return VR;MH=1;var t=Fte(),e=F$(),r=Ow(),n=I$(),i=r(function(a,o){return n(a)?t(a,e(o,1,n,!0)):[]});return VR=i,VR}var zR,kH;function _xe(){if(kH)return zR;kH=1;var t=N$();function e(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:t(r,n,i)}return zR=e,zR}var GR,LH;function Exe(){if(LH)return GR;LH=1;var t=sS();function e(r,n){for(var i=r.length;i--&&t(n,r[i],0)>-1;);return i}return GR=e,GR}var WR,UH;function xxe(){if(UH)return WR;UH=1;var t=sS();function e(r,n){for(var i=-1,a=r.length;++i<a&&t(n,r[i],0)>-1;);return i}return WR=e,WR}var KR,BH;function Axe(){if(BH)return KR;BH=1;function t(e){return e.split("")}return KR=t,KR}var YR,FH;function Sxe(){if(FH)return YR;FH=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+t+i+a+"]");function c(u){return s.test(u)}return YR=c,YR}var QR,jH;function Ixe(){if(jH)return QR;jH=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",o="["+t+"]",s="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+s+"|"+c+")",f="[^"+t+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",w=u+"?",v="["+a+"]?",y="(?:"+m+"(?:"+[f,d,g].join("|")+")"+v+w+")*",_=v+w+y,b="(?:"+[f+s+"?",s,d,g,o].join("|")+")",S=RegExp(c+"(?="+c+")|"+b+_,"g");function x(I){return I.match(S)||[]}return QR=x,QR}var JR,qH;function Oxe(){if(qH)return JR;qH=1;var t=Axe(),e=Sxe(),r=Ixe();function n(i){return e(i)?r(i):t(i)}return JR=n,JR}var XR,HH;function Pxe(){if(HH)return XR;HH=1;var t=R$(),e=Wte(),r=_xe(),n=Exe(),i=xxe(),a=Oxe(),o=C$();function s(c,u,f){if(c=o(c),c&&(f||u===void 0))return e(c);if(!c||!(u=t(u)))return c;var d=a(c),g=a(u),m=i(d,g),w=n(d,g)+1;return r(d,m,w).join("")}return XR=s,XR}var ZR,VH;function Txe(){if(VH)return ZR;VH=1;var t=Vte();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return ZR=e,ZR}var eC,zH;function Rxe(){if(zH)return eC;zH=1;var t=Txe(),e=rS(),r=Object.prototype,n=r.hasOwnProperty;function i(a,o,s){var c=a[o];(!(n.call(a,o)&&e(c,s))||s===void 0&&!(o in a))&&t(a,o,s)}return eC=i,eC}var tC,GH;function Cxe(){if(GH)return tC;GH=1;var t=Rxe(),e=Pw(),r=hS(),n=Hl(),i=im();function a(o,s,c,u){if(!n(o))return o;s=e(s,o);for(var f=-1,d=s.length,g=d-1,m=o;m!=null&&++f<d;){var w=i(s[f]),v=c;if(w==="__proto__"||w==="constructor"||w==="prototype")return o;if(f!=g){var y=m[w];v=u?u(y,w,m):void 0,v===void 0&&(v=n(y)?y:r(s[f+1])?[]:{})}t(m,w,v),m=m[w]}return o}return tC=a,tC}var rC,WH;function Nxe(){if(WH)return rC;WH=1;var t=Tw(),e=Cxe(),r=Pw();function n(i,a,o){for(var s=-1,c=a.length,u={};++s<c;){var f=a[s],d=t(i,f);o(d,f)&&e(u,r(f,i),d)}return u}return rC=n,rC}var nC,KH;function Dxe(){if(KH)return nC;KH=1;var t=Nxe(),e=cre();function r(n,i){return t(n,i,function(a,o){return e(n,o)})}return nC=r,nC}var iC,YH;function $xe(){if(YH)return iC;YH=1;var t=F$();function e(r){var n=r==null?0:r.length;return n?t(r,1):[]}return iC=e,iC}var aC,QH;function Mxe(){if(QH)return aC;QH=1;var t=$xe(),e=qte(),r=zte();function n(i){return r(e(i,void 0,t),i+"")}return aC=n,aC}var oC,JH;function j$(){if(JH)return oC;JH=1;var t=Dxe(),e=Mxe(),r=e(function(n,i){return n==null?{}:t(n,i)});return oC=r,oC}var sC,XH;function pre(){if(XH)return sC;XH=1;var t=Jte(),e=t(Object.getPrototypeOf,Object);return sC=e,sC}var cC,ZH;function gS(){if(ZH)return cC;ZH=1;var t=ql(),e=pre(),r=Bc(),n="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,s=a.hasOwnProperty,c=o.call(Object);function u(f){if(!r(f)||t(f)!=n)return!1;var d=e(f);if(d===null)return!0;var g=s.call(d,"constructor")&&d.constructor;return typeof g=="function"&&g instanceof g&&o.call(g)==c}return cC=u,cC}var uC,eV;function kxe(){if(eV)return uC;eV=1;var t=nm();function e(r,n,i){for(var a=-1,o=r.length;++a<o;){var s=r[a],c=n(s);if(c!=null&&(u===void 0?c===c&&!t(c):i(c,u)))var u=c,f=s}return f}return uC=e,uC}var lC,tV;function Lxe(){if(tV)return lC;tV=1;function t(e,r){return e<r}return lC=t,lC}var fC,rV;function Uxe(){if(rV)return fC;rV=1;var t=kxe(),e=Lxe(),r=wd();function n(i){return i&&i.length?t(i,r,e):void 0}return fC=n,fC}var dC,nV;function Bxe(){if(nV)return dC;nV=1;function t(e,r){for(var n,i=-1,a=e.length;++i<a;){var o=r(e[i]);o!==void 0&&(n=n===void 0?o:n+o)}return n}return dC=t,dC}var hC,iV;function Fxe(){if(iV)return hC;iV=1;var t=Bxe(),e=wd();function r(n){return n&&n.length?t(n,e):0}return hC=r,hC}var pC,aV;function gre(){if(aV)return pC;aV=1;var t=Rw(),e=_d();function r(n,i){var a=-1,o=e(n)?Array(n.length):[];return t(n,function(s,c,u){o[++a]=i(s,c,u)}),o}return pC=r,pC}var gC,oV;function yS(){if(oV)return gC;oV=1;var t=Ip(),e=Ed(),r=gre(),n=Di();function i(a,o){var s=n(a)?t:r;return s(a,e(o,3))}return gC=i,gC}var yC,sV;function jxe(){if(sV)return yC;sV=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return yC=t,yC}var mC,cV;function qxe(){if(cV)return mC;cV=1;var t=nm();function e(r,n){if(r!==n){var i=r!==void 0,a=r===null,o=r===r,s=t(r),c=n!==void 0,u=n===null,f=n===n,d=t(n);if(!u&&!d&&!s&&r>n||s&&c&&f&&!u&&!d||a&&c&&f||!i&&f||!o)return 1;if(!a&&!s&&!d&&r<n||d&&i&&o&&!a&&!s||u&&i&&o||!c&&o||!f)return-1}return 0}return mC=e,mC}var vC,uV;function Hxe(){if(uV)return vC;uV=1;var t=qxe();function e(r,n,i){for(var a=-1,o=r.criteria,s=n.criteria,c=o.length,u=i.length;++a<c;){var f=t(o[a],s[a]);if(f){if(a>=u)return f;var d=i[a];return f*(d=="desc"?-1:1)}}return r.index-n.index}return vC=e,vC}var bC,lV;function Vxe(){if(lV)return bC;lV=1;var t=Ip(),e=Tw(),r=Ed(),n=gre(),i=jxe(),a=cS(),o=Hxe(),s=wd(),c=Di();function u(f,d,g){d.length?d=t(d,function(v){return c(v)?function(y){return e(y,v.length===1?v[0]:v)}:v}):d=[s];var m=-1;d=t(d,a(r));var w=n(f,function(v,y,_){var b=t(d,function(S){return S(v)});return{criteria:b,index:++m,value:v}});return i(w,function(v,y){return o(v,y,g)})}return bC=u,bC}var wC,fV;function zxe(){if(fV)return wC;fV=1;var t=F$(),e=Vxe(),r=Ow(),n=U$(),i=r(function(a,o){if(a==null)return[];var s=o.length;return s>1&&n(a,o[0],o[1])?o=[]:s>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),e(a,t(o,1),[])});return wC=i,wC}var _C,dV;function Gxe(){if(dV)return _C;dV=1;var t=N$(),e=lS();function r(n,i,a){return n&&n.length?(i=a||i===void 0?1:e(i),t(n,0,i<0?0:i)):[]}return _C=r,_C}var Ym={},hV;function yre(){if(hV)return Ym;hV=1,Ym.__esModule=!0,Ym.default=void 0;var t=function(){return 0},e=t;return Ym.default=e,Ym}var pV;function Wxe(){if(pV)return Rn;pV=1;var t=wr;Rn.__esModule=!0,Rn.ref=Rn.refObject=Rn.deprecate=Rn.collectionShorthand=Rn.itemShorthand=Rn.contentShorthand=Rn.multipleProp=Rn.demand=Rn.givenProps=Rn.every=Rn.disallow=Rn.suggest=Rn.domNode=void 0;var e=t(wxe()),r=t(Pxe()),n=t(Hl()),i=t(j$()),a=t(zl()),o=t(gS()),s=t(Vl()),c=t(Uxe()),u=t(Fxe()),f=t(yS()),d=t(zxe()),g=t(Gxe()),m=t(T$()),w=t(Ln()),v=t(yre()),y=function(){var U;return(U=Object.prototype.toString).call.apply(U,arguments)},_=function(U,K){if(U[K]!==void 0&&!(typeof Element>"u")&&!(U[K]instanceof Element))return new Error('Invalid prop "'+K+'" supplied, expected a DOM node.')};Rn.domNode=_;var b=function(U){if(!Array.isArray(U))throw new Error("Invalid argument supplied to suggest, expected an instance of array.");var K=(0,m.default)(function(j){var q=j.split(" ");return(0,g.default)((0,d.default)((0,f.default)(U,function(V){var $=V.split(" "),H=(0,u.default)((0,f.default)((0,f.default)(q,function(k){return(0,f.default)($,function(G){return(0,v.default)(k,G)})}),c.default)),L=(0,u.default)((0,f.default)((0,f.default)($,function(k){return(0,f.default)(q,function(G){return(0,v.default)(k,G)})}),c.default));return{suggestion:V,score:H+L}}),["score","suggestion"]),3)}),ne=U.reduce(function(j,q){return j[q.split(" ").sort().join(" ")]=!0,j},{});return function(j,q,V){var $=j[q];if(!(!$||ne[$])){var H=$.split(" ").sort().join(" ");if(!ne[H]){var L=K($);if(!L.some(function(k){return k.score===0}))return new Error(["Invalid prop `"+q+"` of value `"+$+"` supplied to `"+V+"`.",`
|
|
72
|
-
|
|
73
|
-
Instead of \``+$+"`, did you mean:",L.map(function(k){return`
|
|
74
|
-
- `+k.suggestion}).join(""),`
|
|
75
|
-
`].join(""))}}}};Rn.suggest=b;var S=function(U){return function(K,ne,j){if(!Array.isArray(U))throw new Error(["Invalid argument supplied to disallow, expected an instance of array."," See `"+ne+"` prop in `"+j+"`."].join(""));if(!((0,s.default)(K[ne])||K[ne]===!1)){var q=U.reduce(function(V,$){return!(0,s.default)(K[$])&&K[$]!==!1?[].concat(V,[$]):V},[]);if(q.length>0)return new Error(["Prop `"+ne+"` in `"+j+"` conflicts with props: `"+q.join("`, `")+"`.","They cannot be defined together, choose one or the other."].join(" "))}}};Rn.disallow=S;var x=function(U){return function(K,ne,j){for(var q=arguments.length,V=new Array(q>3?q-3:0),$=3;$<q;$++)V[$-3]=arguments[$];if(!Array.isArray(U))throw new Error(["Invalid argument supplied to every, expected an instance of array.","See `"+ne+"` prop in `"+j+"`."].join(" "));var H=[];return U.forEach(function(L){if(typeof L!="function")throw new Error('every() argument "validators" should contain functions, found: '+y(L)+".");var k=L.apply(void 0,[K,ne,j].concat(V));k&&H.push(k)}),H[0]}};Rn.every=x;var I=function(U,K){return function(ne,j,q){for(var V=arguments.length,$=new Array(V>3?V-3:0),H=3;H<V;H++)$[H-3]=arguments[H];if(!(0,o.default)(U))throw new Error(["Invalid argument supplied to givenProps, expected an object.","See `"+j+"` prop in `"+q+"`."].join(" "));if(typeof K!="function")throw new Error(["Invalid argument supplied to givenProps, expected a function.","See `"+j+"` prop in `"+q+"`."].join(" "));var L=(0,a.default)(U).every(function(ge){var Q=U[ge];return typeof Q=="function"?!Q.apply(void 0,[ne,ge,q].concat($)):Q===ne[j]});if(L){var k=K.apply(void 0,[ne,j,q].concat($));if(k){var G="{ "+(0,a.default)((0,i.default)((0,a.default)(U),ne)).map(function(ge){var Q=ne[ge],te=Q;return typeof Q=="string"?te='"'+Q+'"':Array.isArray(Q)?te="["+Q.join(", ")+"]":(0,n.default)(Q)&&(te="{...}"),ge+": "+te}).join(", ")+" }";return k.message="Given props "+G+": "+k.message,k}}}};Rn.givenProps=I;var E=function(U){return function(K,ne,j){if(!Array.isArray(U))throw new Error(["Invalid `requiredProps` argument supplied to require, expected an instance of array."," See `"+ne+"` prop in `"+j+"`."].join(""));if(K[ne]!==void 0){var q=U.filter(function(V){return K[V]===void 0});if(q.length>0)return new Error("`"+ne+"` prop in `"+j+"` requires props: `"+q.join("`, `")+"`.")}}};Rn.demand=E;var p=function(U){return function(K,ne,j){if(!Array.isArray(U))throw new Error(["Invalid argument supplied to some, expected an instance of array.","See `"+ne+"` prop in `"+j+"`."].join(" "));var q=K[ne];if(!((0,s.default)(q)||q===!1)){var V=q.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(H){return(0,r.default)(H).replace("-"," ")}),$=(0,e.default)(V,U);if($.length>0)return new Error("`"+ne+"` prop in `"+j+"` has invalid values: `"+$.join("`, `")+"`.")}}};Rn.multipleProp=p;var O=function(){return x([S(["children"]),w.default.node]).apply(void 0,arguments)};Rn.contentShorthand=O;var C=function(){return x([S(["children"]),w.default.oneOfType([w.default.func,w.default.node,w.default.object,w.default.arrayOf(w.default.oneOfType([w.default.node,w.default.object]))])]).apply(void 0,arguments)};Rn.itemShorthand=C;var M=function(){return x([S(["children"]),w.default.arrayOf(C)]).apply(void 0,arguments)};Rn.collectionShorthand=M;var B=function(U,K){return function(ne,j,q){if(typeof U!="string")throw new Error(["Invalid `help` argument supplied to deprecate, expected a string.","See `"+j+"` prop in `"+q+"`."].join(" "));if(ne[j]!==void 0){var V=new Error("The `"+j+"` prop in `"+q+"` is deprecated.");if(U&&(V.message+=" "+U),K)if(typeof K=="function"){for(var $=arguments.length,H=new Array($>3?$-3:0),L=3;L<$;L++)H[L-3]=arguments[L];var k=K.apply(void 0,[ne,j,q].concat(H));k&&(V.message=V.message+" "+k.message)}else throw new Error(["Invalid argument supplied to deprecate, expected a function.","See `"+j+"` prop in `"+q+"`."].join(" "));return V}}};Rn.deprecate=B;var ce=w.default.shape({current:w.default.object});Rn.refObject=ce;var he=w.default.oneOfType([w.default.func,ce]);return Rn.ref=he,Rn}var Qm={},oE={exports:{}},Jm={},EC={exports:{}};/*!
|
|
76
|
-
Copyright (c) 2015 Jed Watson.
|
|
77
|
-
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
|
78
|
-
All rights reserved.
|
|
79
|
-
*/var gV;function Kxe(){return gV||(gV=1,function(t){(function(){var e=!!(typeof window<"u"&&window.document&&window.document.createElement),r={canUseDOM:e,canUseWorkers:typeof Worker<"u",canUseEventListeners:e&&!!(window.addEventListener||window.attachEvent),canUseViewport:e&&!!window.screen};t.exports?t.exports=r:window.ExecutionEnvironment=r})()}(EC)),EC.exports}var yV;function Yxe(){if(yV)return Jm;yV=1,Object.defineProperty(Jm,"__esModule",{value:!0});var t=Kxe();Ln();var e=Be;function r(E){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(E)}function n(E,p){if(!(E instanceof p))throw new TypeError("Cannot call a class as a function")}function i(E,p){for(var O=0;O<p.length;O++){var C=p[O];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(E,C.key,C)}}function a(E,p,O){return p&&i(E.prototype,p),O&&i(E,O),E}function o(E,p,O){return p in E?Object.defineProperty(E,p,{value:O,enumerable:!0,configurable:!0,writable:!0}):E[p]=O,E}function s(E,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(p&&p.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),p&&u(E,p)}function c(E){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)})(E)}function u(E,p){return(u=Object.setPrototypeOf||function(O,C){return O.__proto__=C,O})(E,p)}function f(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function d(E,p){return!p||typeof p!="object"&&typeof p!="function"?f(E):p}var g=function(){function E(p){n(this,E),o(this,"handlers",void 0),this.handlers=p.slice(0)}return a(E,[{key:"addHandlers",value:function(p){for(var O=this.handlers.slice(0),C=p.length,M=0;M<C;M+=1)O.push(p[M]);return new E(O)}},{key:"dispatchEvent",value:function(p,O){var C=this.handlers.length-1;if(O){for(var M=C;M>=0;M-=1)this.handlers[M].called||(this.handlers[M].called=!0,this.handlers[M](p));for(var B=C;B>=0;B-=1)this.handlers[B].called=!1}else(0,this.handlers[C])(p)}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(p){for(var O=[],C=this.handlers.length,M=0;M<C;M+=1){var B=this.handlers[M];p.indexOf(B)===-1&&O.push(B)}return new E(O)}}]),E}();function m(E){var p=new Map;return E.forEach(function(O,C){p.set(C,O)}),p}function w(E){return Array.isArray(E)?E:[E]}var v=function(E){return E!==null&&r(E)==="object"&&E.hasOwnProperty("current")};function y(E){return E==="document"?document:E==="window"?window:v(E)?E.current||document:E||document}var _=function(){function E(p,O){n(this,E),o(this,"handlerSets",void 0),o(this,"poolName",void 0),this.handlerSets=O,this.poolName=p}return a(E,[{key:"addHandlers",value:function(p,O){var C=m(this.handlerSets);if(C.has(p)){var M=C.get(p);C.set(p,M.addHandlers(O))}else C.set(p,new g(O));return new E(this.poolName,C)}},{key:"dispatchEvent",value:function(p,O){var C=this.handlerSets.get(p),M=this.poolName==="default";C&&C.dispatchEvent(O,M)}},{key:"hasHandlers",value:function(p){if(!p)return this.handlerSets.size>0;var O=this.handlerSets.get(p);return!!O&&O.hasHandlers()}},{key:"removeHandlers",value:function(p,O){var C=m(this.handlerSets);if(!C.has(p))return new E(this.poolName,C);var M=C.get(p).removeHandlers(O);return M.hasHandlers()?C.set(p,M):C.delete(p),new E(this.poolName,C)}}]),E}();o(_,"createByType",function(E,p,O){var C=new Map;return C.set(p,new g(O)),new _(E,C)});var b=function(){function E(p){var O=this;n(this,E),o(this,"handlers",new Map),o(this,"pools",new Map),o(this,"target",void 0),o(this,"createEmitter",function(C){return function(M){O.pools.forEach(function(B){B.dispatchEvent(C,M)})}}),this.target=p}return a(E,[{key:"addHandlers",value:function(p,O,C){if(this.pools.has(p)){var M=this.pools.get(p);this.pools.set(p,M.addHandlers(O,C))}else this.pools.set(p,_.createByType(p,O,C));this.handlers.has(O)||this.addTargetHandler(O)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(p,O,C){if(this.pools.has(p)){var M=this.pools.get(p).removeHandlers(O,C);M.hasHandlers()?this.pools.set(p,M):this.pools.delete(p);var B=!1;this.pools.forEach(function(ce){return B=B||ce.hasHandlers(O)}),B||this.removeTargetHandler(O)}}},{key:"addTargetHandler",value:function(p){var O=this.createEmitter(p);this.handlers.set(p,O),this.target.addEventListener(p,O,!0)}},{key:"removeTargetHandler",value:function(p){this.handlers.has(p)&&(this.target.removeEventListener(p,this.handlers.get(p),!0),this.handlers.delete(p))}}]),E}(),S=function(){function E(){var p=this;n(this,E),o(this,"targets",new Map),o(this,"getTarget",function(O){var C=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],M=y(O);if(p.targets.has(M))return p.targets.get(M);if(!C)return null;var B=new b(M);return p.targets.set(M,B),B}),o(this,"removeTarget",function(O){p.targets.delete(y(O))})}return a(E,[{key:"sub",value:function(p,O){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t.canUseDOM){var M=C.target,B=M===void 0?document:M,ce=C.pool,he=ce===void 0?"default":ce;this.getTarget(B).addHandlers(he,p,w(O))}}},{key:"unsub",value:function(p,O){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t.canUseDOM){var M=C.target,B=M===void 0?document:M,ce=C.pool,he=ce===void 0?"default":ce,F=this.getTarget(B,!1);F&&(F.removeHandlers(he,p,w(O)),F.hasHandlers()||this.removeTarget(B))}}}]),E}(),x=new S,I=function(E){function p(){return n(this,p),d(this,c(p).apply(this,arguments))}return s(p,e.PureComponent),a(p,[{key:"componentDidMount",value:function(){this.subscribe(this.props)}},{key:"componentDidUpdate",value:function(O){this.unsubscribe(O),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(O){var C=O.name,M=O.on,B=O.pool,ce=O.target;x.sub(C,M,{pool:B,target:ce})}},{key:"unsubscribe",value:function(O){var C=O.name,M=O.on,B=O.pool,ce=O.target;x.unsub(C,M,{pool:B,target:ce})}},{key:"render",value:function(){return null}}]),p}();return o(I,"defaultProps",{pool:"default",target:"document"}),I.propTypes={},Jm.instance=x,Jm.default=I,Jm}var mV;function q$(){if(mV)return oE.exports;mV=1;var t;return t=Yxe(),oE.exports=t.default,oE.exports.instance=t.instance,oE.exports}var vV;function Qxe(){if(vV)return Qm;vV=1,Qm.__esModule=!0,Qm.default=void 0;var t=q$(),e=t.instance;return Qm.default=e,Qm}var oa={},xC,bV;function Jxe(){if(bV)return xC;bV=1;function t(){}return xC=t,xC}var AC,wV;function Xxe(){if(wV)return AC;wV=1;var t=nre(),e=Jxe(),r=k$(),n=1/0,i=t&&1/r(new t([,-0]))[1]==n?function(a){return new t(a)}:e;return AC=i,AC}var SC,_V;function Zxe(){if(_V)return SC;_V=1;var t=oS(),e=x$(),r=A$(),n=uS(),i=Xxe(),a=k$(),o=200;function s(c,u,f){var d=-1,g=e,m=c.length,w=!0,v=[],y=v;if(f)w=!1,g=r;else if(m>=o){var _=u?null:i(c);if(_)return a(_);w=!1,g=n,y=new t}else y=u?[]:v;e:for(;++d<m;){var b=c[d],S=u?u(b):b;if(b=f||b!==0?b:0,w&&S===S){for(var x=y.length;x--;)if(y[x]===S)continue e;u&&y.push(S),v.push(b)}else g(y,S,f)||(y!==v&&y.push(S),v.push(b))}return v}return SC=s,SC}var IC,EV;function mre(){if(EV)return IC;EV=1;var t=Zxe();function e(r){return r&&r.length?t(r):[]}return IC=e,IC}var OC,xV;function eAe(){if(xV)return OC;xV=1;var t=ql(),e=Bc(),r="[object Number]";function n(i){return typeof i=="number"||e(i)&&t(i)==r}return OC=n,OC}var PC,AV;function vre(){if(AV)return PC;AV=1;var t=ql(),e=Di(),r=Bc(),n="[object String]";function i(a){return typeof a=="string"||!e(a)&&r(a)&&t(a)==n}return PC=i,PC}var TC,SV;function tAe(){if(SV)return TC;SV=1;var t=ql(),e=Bc(),r="[object Boolean]";function n(i){return i===!0||i===!1||e(i)&&t(i)==r}return TC=n,TC}var IV;function rAe(){if(IV)return oa;IV=1;var t=Ys,e=wr;oa.__esModule=!0,oa.createShorthand=m,oa.createShorthandFactory=w,oa.createHTMLParagraph=oa.createHTMLLabel=oa.createHTMLInput=oa.createHTMLImage=oa.createHTMLIframe=oa.createHTMLDivision=void 0;var r=e(Fn()),n=e(mre()),i=e(Di()),a=e(gS()),o=e(eS()),s=e(eAe()),c=e(vre()),u=e(tAe()),f=e(Vl()),d=e(ii),g=t(Be);function m(I,E,p,O){if(O===void 0&&(O={}),typeof I!="function"&&typeof I!="string")throw new Error("createShorthand() Component must be a string or function.");if((0,f.default)(p)||(0,u.default)(p))return null;var C=(0,c.default)(p),M=(0,s.default)(p),B=(0,o.default)(p),ce=g.isValidElement(p),he=(0,a.default)(p),F=C||M||(0,i.default)(p);if(!B&&!ce&&!he&&!F)return null;var U=O,K=U.defaultProps,ne=K===void 0?{}:K,j=ce&&p.props||he&&p||F&&E(p),q=O,V=q.overrideProps,$=V===void 0?{}:V;$=(0,o.default)($)?$((0,r.default)({},ne,j)):$;var H=(0,r.default)({},ne,j,$);if(ne.className||$.className||j.className){var L=(0,d.default)(ne.className,$.className,j.className);H.className=(0,n.default)(L.split(" ")).join(" ")}if((ne.style||$.style||j.style)&&(H.style=(0,r.default)({},ne.style,j.style,$.style)),(0,f.default)(H.key)){var k=H.childKey,G=O,ge=G.autoGenerateKey,Q=ge===void 0?!0:ge;(0,f.default)(k)?Q&&(C||M)&&(H.key=p):(H.key=typeof k=="function"?k(H):k,delete H.childKey)}if(ce)return g.cloneElement(p,H);if(typeof H.children=="function")return H.children(I,(0,r.default)({},H,{children:void 0}));if(F||he)return g.createElement(I,H);if(B)return p(I,H,H.children)}function w(I,E){if(typeof I!="function"&&typeof I!="string")throw new Error("createShorthandFactory() Component must be a string or function.");return function(p,O){return m(I,E,p,O)}}var v=w("div",function(I){return{children:I}});oa.createHTMLDivision=v;var y=w("iframe",function(I){return{src:I}});oa.createHTMLIframe=y;var _=w("img",function(I){return{src:I}});oa.createHTMLImage=_;var b=w("input",function(I){return{type:I}});oa.createHTMLInput=b;var S=w("label",function(I){return{children:I}});oa.createHTMLLabel=S;var x=w("p",function(I){return{children:I}});return oa.createHTMLParagraph=x,oa}var Xm={},OV;function nAe(){if(OV)return Xm;OV=1,Xm.__esModule=!0,Xm.default=void 0;var t=function(n,i){var a=n.handledProps,o=a===void 0?[]:a;return Object.keys(i).reduce(function(s,c){return c==="childKey"||o.indexOf(c)===-1&&(s[c]=i[c]),s},{})},e=t;return Xm.default=e,Xm}var Zm={},PV;function iAe(){if(PV)return Zm;PV=1,Zm.__esModule=!0,Zm.default=void 0;function t(r,n,i){var a=r.defaultProps,o=a===void 0?{}:a;if(n.as&&n.as!==o.as)return n.as;if(i){var s=i();if(s)return s}return n.href?"a":o.as||"div"}var e=t;return Zm.default=e,Zm}var zo={},RC,TV;function aAe(){if(TV)return RC;TV=1;var t=Ip();function e(r,n){return t(n,function(i){return r[i]})}return RC=e,RC}var CC,RV;function bre(){if(RV)return CC;RV=1;var t=aAe(),e=zl();function r(n){return n==null?[]:t(n,e(n))}return CC=r,CC}var NC,CV;function H$(){if(CV)return NC;CV=1;var t=sS(),e=_d(),r=vre(),n=lS(),i=bre(),a=Math.max;function o(s,c,u,f){s=e(s)?s:i(s),u=u&&!f?n(u):0;var d=s.length;return u<0&&(u=a(d+u,0)),r(s)?u<=d&&s.indexOf(c,u)>-1:!!d&&t(s,c,u)>-1}return NC=o,NC}var NV;function oAe(){if(NV)return zo;NV=1;var t=wr;zo.__esModule=!0,zo.partitionHTMLProps=zo.htmlImageProps=zo.htmlInputProps=zo.htmlInputEvents=zo.htmlInputAttrs=void 0;var e=t(H$()),r=t(dre()),n=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","enterKeyHint","form","id","inputMode","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"];zo.htmlInputAttrs=n;var i=["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"];zo.htmlInputEvents=i;var a=[].concat(n,i);zo.htmlInputProps=a;var o=["alt","height","src","srcSet","width","loading"];zo.htmlImageProps=o;var s=function(u,f){f===void 0&&(f={});var d=f,g=d.htmlProps,m=g===void 0?a:g,w=d.includeAria,v=w===void 0?!0:w,y={},_={};return(0,r.default)(u,function(b,S){var x=v&&(/^aria-.*$/.test(S)||S==="role"),I=(0,e.default)(m,S)||x?y:_;I[S]=b}),[y,_]};return zo.partitionHTMLProps=s,zo}var ev={},DV;function wre(){if(DV)return ev;DV=1;var t=wr;ev.__esModule=!0,ev.default=void 0;var e=t(Vl()),r=typeof document=="object"&&document!==null,n=typeof window=="object"&&window!==null&&window.self===window,i=function o(){return(0,e.default)(o.override)?r&&n:o.override},a=i;return ev.default=a,ev}var tv={},DC,$V;function sAe(){if($V)return DC;$V=1;var t=Math.max,e=Math.min;function r(n,i,a){return n>=e(i,a)&&n<t(i,a)}return DC=r,DC}var $C,MV;function cAe(){if(MV)return $C;MV=1;var t=sAe(),e=$$(),r=Kte();function n(i,a,o){return a=e(a),o===void 0?(o=a,a=0):o=e(o),i=r(i),t(i,a,o)}return $C=n,$C}var MC,kV;function uAe(){if(kV)return MC;kV=1;function t(e){return e&&e.length?e[0]:void 0}return MC=t,MC}var kC,LV;function lAe(){return LV||(LV=1,kC=uAe()),kC}var UV;function fAe(){if(UV)return tv;UV=1;var t=wr;tv.__esModule=!0,tv.default=void 0;var e=t(cAe()),r=t(lAe()),n=t(Qs()),i=t(Vl()),a=t(hre()),o=function(u,f){if((0,a.default)([f,u],i.default))return!1;if(f.target&&((0,n.default)(f.target,"setAttribute","data-suir-click-target",!0),document.querySelector("[data-suir-click-target=true]")))return(0,n.default)(f.target,"removeAttribute","data-suir-click-target"),u.contains(f.target);var d=f.clientX,g=f.clientY;if((0,a.default)([d,g],i.default))return!1;var m=u.getClientRects();if(!u.offsetWidth||!u.offsetHeight||!m||!m.length)return!1;var w=(0,r.default)(m),v=w.top,y=w.bottom,_=w.left,b=w.right;return(0,a.default)([v,y,_,b],i.default)?!1:(0,e.default)(g,v,y+.001)&&(0,e.default)(d,_,b+.001)},s=o;return tv.default=s,tv}var sE={},rv={},Qa={},BV;function _re(){if(BV)return Qa;BV=1,Qa.__esModule=!0,Qa.createLastItem=Qa.createNextItem=Qa.createPageFactory=Qa.createPrevItem=Qa.createFirstPage=Qa.createEllipsisItem=void 0;var t=function(s){return{active:!1,type:"ellipsisItem",value:s}};Qa.createEllipsisItem=t;var e=function(){return{active:!1,type:"firstItem",value:1}};Qa.createFirstPage=e;var r=function(s){return{active:!1,type:"prevItem",value:Math.max(1,s-1)}};Qa.createPrevItem=r;var n=function(s){return function(c){return{active:s===c,type:"pageItem",value:c}}};Qa.createPageFactory=n;var i=function(s,c){return{active:!1,type:"nextItem",value:Math.min(s+1,c)}};Qa.createNextItem=i;var a=function(s){return{active:!1,type:"lastItem",value:s}};return Qa.createLastItem=a,Qa}var Qd={},LC,FV;function dAe(){if(FV)return LC;FV=1;var t=Math.ceil,e=Math.max;function r(n,i,a,o){for(var s=-1,c=e(t((i-n)/(a||1)),0),u=Array(c);c--;)u[o?c:++s]=n,n+=a;return u}return LC=r,LC}var UC,jV;function hAe(){if(jV)return UC;jV=1;var t=dAe(),e=U$(),r=$$();function n(i){return function(a,o,s){return s&&typeof s!="number"&&e(a,o,s)&&(o=s=void 0),a=r(a),o===void 0?(o=a,a=0):o=r(o),s=s===void 0?a<o?1:-1:r(s),t(a,o,s,i)}}return UC=n,UC}var BC,qV;function pAe(){if(qV)return BC;qV=1;var t=hAe(),e=t();return BC=e,BC}var Jd={},HV;function gAe(){if(HV)return Jd;HV=1,Jd.__esModule=!0,Jd.createInnerSuffix=Jd.createInnerPrefix=void 0;var t=_re(),e=function(i,a,o){var s=a-1,c=s!==i+1,u=c?t.createEllipsisItem:o;return u(s)};Jd.createInnerPrefix=e;var r=function(i,a,o){var s=i+1,c=s!==a-1,u=c?t.createEllipsisItem:o;return u(s)};return Jd.createInnerSuffix=r,Jd}var VV;function yAe(){if(VV)return Qd;VV=1;var t=wr;Qd.__esModule=!0,Qd.createComplexRange=Qd.createSimpleRange=void 0;var e=t(pAe()),r=t(yS()),n=gAe(),i=function(s,c,u){return(0,r.default)((0,e.default)(s,c+1),u)};Qd.createSimpleRange=i;var a=function(s,c){var u=s.activePage,f=s.boundaryRange,d=s.hideEllipsis,g=s.siblingRange,m=s.totalPages,w=d?0:1,v=f,y=i(1,v,c),_=m+1-f,b=i(_,m,c),S=Math.min(Math.max(u-g,v+w+1),_-w-2*g-1),x=S+2*g,I=i(S,x,c);return[].concat(y,[!d&&(0,n.createInnerPrefix)(v,S,c)],I,[!d&&(0,n.createInnerSuffix)(x,_,c)],b).filter(Boolean)};return Qd.createComplexRange=a,Qd}var Xd={},zV;function mAe(){if(zV)return Xd;zV=1,Xd.__esModule=!0,Xd.typifyOptions=Xd.isSimplePagination=void 0;var t=function(n){var i=n.boundaryRange,a=n.hideEllipsis,o=n.siblingRange,s=n.totalPages,c=2*i,u=a?0:2,f=2*o;return 1+u+f+c>=s};Xd.isSimplePagination=t;var e=function(n){var i=n.activePage,a=n.boundaryRange,o=n.hideEllipsis,s=n.siblingRange,c=n.totalPages;return{activePage:+i,boundaryRange:+a,hideEllipsis:!!o,siblingRange:+s,totalPages:+c}};return Xd.typifyOptions=e,Xd}var GV;function vAe(){if(GV)return rv;GV=1,rv.__esModule=!0,rv.default=void 0;var t=_re(),e=yAe(),r=mAe(),n=function(o){var s=(0,r.typifyOptions)(o),c=s.activePage,u=s.totalPages,f=(0,t.createPageFactory)(c),d=(0,r.isSimplePagination)(s)?(0,e.createSimpleRange)(1,u,f):(0,e.createComplexRange)(s,f);return[(0,t.createFirstPage)(),(0,t.createPrevItem)(c)].concat(d,[(0,t.createNextItem)(c,u),(0,t.createLastItem)(u)])},i=n;return rv.default=i,rv}var WV;function bAe(){if(WV)return sE;WV=1;var t=wr;sE.__esModule=!0;var e=t(vAe());return sE.default=e.default,sE}var yt={},KV;function wAe(){if(KV)return yt;KV=1;var t=wr;yt.__esModule=!0,yt.ALL_ICONS_IN_ALL_CONTEXTS=yt.COMPONENT_CONTEXT_SPECIFIC_ICONS=yt.ICONS_AND_ALIASES=yt.ICON_ALIASES=yt.ICONS=yt.BRANDS=yt.WRITING=yt.VEHICLES=yt.USERS_PEOPLE=yt.STATUS=yt.SPORTS=yt.SPINNERS=yt.SHAPES=yt.PAYMENTS_SHOPPING=yt.OBJECTS=yt.MEDICAL=yt.MAPS=yt.LOGISTICS=yt.INTERFACES=yt.IMAGES=yt.HEALTH=yt.HANDS_GESTURES=yt.GENDERS=yt.FILES=yt.EDITORS=yt.DESIGN=yt.DATE_TIME=yt.CURRENCY=yt.COMPUTERS=yt.COMMUNICATION=yt.CODE=yt.CHESS=yt.BUSINESS=yt.AUDIO_VIDEO=yt.ARROWS=yt.ACCESSIBILITY=yt.TRANSITIONS=yt.STATIC_TRANSITIONS=yt.DIRECTIONAL_TRANSITIONS=yt.WIDTHS=yt.VISIBILITY=yt.VERTICAL_ALIGNMENTS=yt.TEXT_ALIGNMENTS=yt.SIZES=yt.FLOATS=yt.COLORS=void 0;var e=t(mre()),r=t(bre()),n=t(zl()),i=B$(),a=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","black"];yt.COLORS=a;var o=["left","right"];yt.FLOATS=o;var s=["mini","tiny","small","medium","large","big","huge","massive"];yt.SIZES=s;var c=["left","center","right","justified"];yt.TEXT_ALIGNMENTS=c;var u=["bottom","middle","top"];yt.VERTICAL_ALIGNMENTS=u;var f=["mobile","tablet","computer","large screen","widescreen"];yt.VISIBILITY=f;var d=[].concat((0,n.default)(i.numberToWordMap),(0,n.default)(i.numberToWordMap).map(Number),(0,r.default)(i.numberToWordMap));yt.WIDTHS=d;var g=["browse","browse right","drop","fade","fade up","fade down","fade left","fade right","fly up","fly down","fly left","fly right","horizontal flip","vertical flip","scale","slide up","slide down","slide left","slide right","swing up","swing down","swing left","swing right","zoom"];yt.DIRECTIONAL_TRANSITIONS=g;var m=["jiggle","flash","shake","pulse","tada","bounce","glow"];yt.STATIC_TRANSITIONS=m;var w=[].concat(g,m);yt.TRANSITIONS=w;var v=["american sign language interpreting","assistive listening systems","audio description","blind","braille","closed captioning","closed captioning outline","deaf","low vision","phone volume","question circle","question circle outline","sign language","tty","universal access","wheelchair"];yt.ACCESSIBILITY=v;var y=["angle double down","angle double left","angle double right","angle double up","angle down","angle left","angle right","angle up","arrow alternate circle down","arrow alternate circle down outline","arrow alternate circle left","arrow alternate circle left outline","arrow alternate circle right","arrow alternate circle right outline","arrow alternate circle up","arrow alternate circle up outline","arrow circle down","arrow circle left","arrow circle right","arrow circle up","arrow down","arrow left","arrow right","arrow up","arrows alternate","arrows alternate horizontal","arrows alternate vertical","caret down","caret left","caret right","caret square down","caret square down outline","caret square left","caret square left outline","caret square right","caret square right outline","caret square up","caret square up outline","caret up","cart arrow down","chart line","chevron circle down","chevron circle left","chevron circle right","chevron circle up","chevron down","chevron left","chevron right","chevron up","cloud download","cloud upload","download","exchange","expand arrows alternate","external alternate","external square alternate","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","history","level down alternate","level up alternate","location arrow","long arrow alternate down","long arrow alternate left","long arrow alternate right","long arrow alternate up","mouse pointer","play","random","recycle","redo","redo alternate","reply","reply all","retweet","share","share square","share square outline","sign-in","sign-out","sign-in alternate","sign-out alternate","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","sync","sync alternate","text height","text width","undo","undo alternate","upload","zoom-in","zoom-out"];yt.ARROWS=y;var _=["audio description","backward","circle","circle outline","closed captioning","closed captioning outline","compress","eject","expand","expand arrows alternate","fast backward","fast forward","file audio","file audio outline","file video","file video outline","film","forward","headphones","microphone","microphone slash","music","pause","pause circle","pause circle outline","phone volume","play","play circle","play circle outline","podcast","random","redo","redo alternate","rss","rss square","step backward","step forward","stop","stop circle","stop circle outline","sync","sync alternate","undo","undo alternate","video","volume down","volume off","volume up"];yt.AUDIO_VIDEO=_;var b=["address book","address book outline","address card","address card outline","archive","balance scale","birthday cake","book","briefcase","building","building outline","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","certificate","chart area","chart bar","chart bar outline","chart line","chart pie","clipboard","clipboard outline","coffee","columns","compass","compass outline","copy","copy outline","copyright","copyright outline","cut","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","eraser","fax","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","globe","industry","paperclip","paste","pen square","pencil alternate","percent","phone","phone square","phone volume","registered","registered outline","save","save outline","sitemap","sticky note","sticky note outline","suitcase","table","tag","tags","tasks","thumbtack","trademark"];yt.BUSINESS=b;var S=["chess","chess bishop","chess board","chess king","chess knight","chess pawn","chess queen","chess rook","square full"];yt.CHESS=S;var x=["archive","barcode","bath","bug","code","code branch","coffee","file","file outline","file alternate","file alternate outline","file code","file code outline","filter","fire extinguisher","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","microchip","qrcode","shield alternate","sitemap","terminal","user secret","window close","window close outline","window maximize","window maximize outline","window minimize","window minimize outline","window restore","window restore outline"];yt.CODE=x;var I=["address book","address book outline","address card","address card outline","american sign language interpreting","assistive listening systems","at","bell","bell outline","bell slash","bell slash outline","bullhorn","comment","comment outline","comment alternate","comment alternate outline","comments","comments outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","fax","inbox","language","microphone","microphone slash","mobile","mobile alternate","paper plane","paper plane outline","phone","phone square","phone volume","rss","rss square","tty","wifi"];yt.COMMUNICATION=I;var E=["desktop","download","hdd","hdd outline","headphones","keyboard","keyboard outline","laptop","microchip","mobile","mobile alternate","plug","power off","print","save","save outline","server","tablet","tablet alternate","tv","upload"];yt.COMPUTERS=E;var p=["dollar sign","euro sign","lira sign","money bill alternate","money bill alternate outline","pound sign","ruble sign","rupee sign","shekel sign","won sign","yen sign"];yt.CURRENCY=p;var O=["bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","clock","clock outline","hourglass","hourglass outline","hourglass end","hourglass half","hourglass start","stopwatch"];yt.DATE_TIME=O;var C=["adjust","clone","clone outline","copy","copy outline","crop","crosshairs","cut","edit","edit outline","eraser","eye","eye dropper","eye slash","eye slash outline","object group","object group outline","object ungroup","object ungroup outline","paint brush","paste","pencil alternate","save","save outline","tint"];yt.DESIGN=C;var M=["align center","align justify","align left","align right","bold","clipboard","clipboard outline","clone","clone outline","columns","copy","copy outline","cut","edit","edit outline","eraser","file","file outline","file alternate","file alternate outline","font","heading","i cursor","indent","italic","linkify","list","list alternate","list alternate outline","list ol","list ul","outdent","paper plane","paper plane outline","paperclip","paragraph","paste","pencil alternate","print","quote left","quote right","redo","redo alternate","reply","reply all","share","strikethrough","subscript","superscript","sync","sync alternate","table","tasks","text height","text width","th","th large","th list","trash","trash alternate","trash alternate outline","underline","undo","undo alternate","unlink"];yt.EDITORS=M;var B=["archive","clone","clone outline","copy","copy outline","cut","file","file outline","file alternate","file alternate outline","file archive","file archive outline","file audio","file audio outline","file code","file code outline","file excel","file excel outline","file image","file image outline","file pdf","file pdf outline","file powerpoint","file powerpoint outline","file video","file video outline","file word","file word outline","folder","folder outline","folder open","folder open outline","paste","save","save outline","sticky note","sticky note outline"];yt.FILES=B;var ce=["genderless","mars","mars double","mars stroke","mars stroke horizontal","mars stroke vertical","mercury","neuter","transgender","transgender alternate","venus","venus double","venus mars"];yt.GENDERS=ce;var he=["hand lizard","hand lizard outline","hand paper","hand paper outline","hand peace","hand peace outline","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","hand rock","hand rock outline","hand scissors","hand scissors outline","hand spock","hand spock outline","handshake","handshake outline","thumbs down","thumbs down outline","thumbs up","thumbs up outline"];yt.HANDS_GESTURES=he;var F=["ambulance","h square","heart","heart outline","heartbeat","hospital","hospital outline","medkit","plus square","plus square outline","stethoscope","user md","wheelchair"];yt.HEALTH=F;var U=["adjust","bolt","camera","camera retro","clone","clone outline","compress","expand","eye","eye dropper","eye slash","eye slash outline","file image","file image outline","film","id badge","id badge outline","id card","id card outline","image","image outline","images","images outline","sliders horizontal","tint"];yt.IMAGES=U;var K=["ban","barcode","bars","beer","bell","bell outline","bell slash","bell slash outline","bug","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","certificate","check","check circle","check circle outline","check square","check square outline","circle","circle outline","clipboard","clipboard outline","clone","clone outline","cloud","cloud download","cloud upload","coffee","cog","cogs","copy","copy outline","cut","database","dot circle","dot circle outline","download","edit","edit outline","ellipsis horizontal","ellipsis vertical","envelope","envelope outline","envelope open","envelope open outline","eraser","exclamation","exclamation circle","exclamation triangle","external alternate","external square alternate","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","filter","flag","flag outline","flag checkered","folder","folder outline","folder open","folder open outline","frown","frown outline","hashtag","heart","heart outline","history","home","i cursor","info","info circle","language","magic","meh","meh outline","microphone","microphone slash","minus","minus circle","minus square","minus square outline","paste","pencil alternate","plus","plus circle","plus square","plus square outline","qrcode","question","question circle","question circle outline","quote left","quote right","redo","redo alternate","reply","reply all","rss","rss square","save","save outline","search","search minus","search plus","share","share alternate","share alternate square","share square","share square outline","shield alternate","sign-in","sign-out","signal","sitemap","sliders horizontal","smile","smile outline","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","star","star outline","star half","star half outline","sync","sync alternate","thumbs down","thumbs down outline","thumbs up","thumbs up outline","times","times circle","times circle outline","toggle off","toggle on","trash","trash alternate","trash alternate outline","trophy","undo","undo alternate","upload","user","user outline","user circle","user circle outline","wifi"];yt.INTERFACES=K;var ne=["box","boxes","clipboard check","clipboard list","dolly","dolly flatbed","pallet","shipping fast","truck","warehouse"];yt.LOGISTICS=ne;var j=["ambulance","anchor","balance scale","bath","bed","beer","bell","bell outline","bell slash","bell slash outline","bicycle","binoculars","birthday cake","blind","bomb","book","bookmark","bookmark outline","briefcase","building","building outline","car","coffee","crosshairs","dollar sign","eye","eye slash","eye slash outline","fighter jet","fire","fire extinguisher","flag","flag outline","flag checkered","flask","gamepad","gavel","gift","glass martini","globe","graduation cap","h square","heart","heart outline","heartbeat","home","hospital","hospital outline","image","image outline","images","images outline","industry","info","info circle","key","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","location arrow","low vision","magnet","male","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","money bill alternate","money bill alternate outline","motorcycle","music","newspaper","newspaper outline","paw","phone","phone square","phone volume","plane","plug","plus","plus square","plus square outline","print","recycle","road","rocket","search","search minus","search plus","ship","shopping bag","shopping basket","shopping cart","shower","street view","subway","suitcase","tag","tags","taxi","thumbtack","ticket alternate","tint","train","tree","trophy","truck","tty","umbrella","university","utensil spoon","utensils","wheelchair","wifi","wrench"];yt.MAPS=j;var q=["ambulance","band aid","dna","first aid","heart","heart outline","heartbeat","hospital","hospital outline","hospital symbol","pills","plus","stethoscope","syringe","thermometer","user md","weight"];yt.MEDICAL=q;var V=["ambulance","anchor","archive","balance scale","bath","bed","beer","bell","bell outline","bicycle","binoculars","birthday cake","bomb","book","bookmark","bookmark outline","briefcase","bug","building","building outline","bullhorn","bullseye","bus","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","camera","camera retro","car","clipboard","clipboard outline","cloud","coffee","cog","cogs","compass","compass outline","copy","copy outline","cube","cubes","cut","envelope","envelope outline","envelope open","envelope open outline","eraser","eye","eye dropper","fax","fighter jet","file","file outline","file alternate","file alternate outline","film","fire","fire extinguisher","flag","flag outline","flag checkered","flask","futbol","futbol outline","gamepad","gavel","gem","gem outline","gift","glass martini","globe","graduation cap","hdd","hdd outline","headphones","heart","heart outline","home","hospital","hospital outline","hourglass","hourglass outline","image","image outline","images","images outline","industry","key","keyboard","keyboard outline","laptop","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","lock","lock open","magic","magnet","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","microchip","microphone","mobile","mobile alternate","money bill alternate","money bill alternate outline","moon","moon outline","motorcycle","newspaper","newspaper outline","paint brush","paper plane","paper plane outline","paperclip","paste","paw","pencil alternate","phone","plane","plug","print","puzzle piece","road","rocket","save","save outline","search","shield alternate","shopping bag","shopping basket","shopping cart","shower","snowflake","snowflake outline","space shuttle","star","star outline","sticky note","sticky note outline","stopwatch","subway","suitcase","sun","sun outline","tablet","tablet alternate","tachometer alternate","tag","tags","taxi","thumbtack","ticket alternate","train","trash","trash alternate","trash alternate outline","tree","trophy","truck","tv","umbrella","university","unlock","unlock alternate","utensil spoon","utensils","wheelchair","wrench"];yt.OBJECTS=V;var $=["bell","bell outline","bookmark","bookmark outline","bullhorn","camera","camera retro","cart arrow down","cart plus","certificate","credit card","credit card outline","gem","gem outline","gift","handshake","handshake outline","heart","heart outline","key","shopping bag","shopping basket","shopping cart","star","star outline","tag","tags","thumbs down","thumbs down outline","thumbs up","thumbs up outline","trophy"];yt.PAYMENTS_SHOPPING=$;var H=["bookmark","bookmark outline","calendar","calendar outline","certificate","circle","circle outline","cloud","comment","comment outline","file","file outline","folder","folder outline","heart","heart outline","map marker","play","square","square outline","star","star outline"];yt.SHAPES=H;var L=["asterisk","certificate","circle notch","cog","compass","compass outline","crosshairs","life ring","life ring outline","snowflake","snowflake outline","spinner","sun","sun outline","sync"];yt.SPINNERS=L;var k=["baseball ball","basketball ball","bowling ball","football ball","futbol","futbol outline","golf ball","hockey puck","quidditch","table tennis","volleyball ball"];yt.SPORTS=k;var G=["ban","battery empty","battery full","battery half","battery quarter","battery three quarters","bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","cart arrow down","cart plus","exclamation","exclamation circle","exclamation triangle","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","info","info circle","lock","lock open","minus","minus circle","minus square","minus square outline","plus","plus circle","plus square","plus square outline","question","question circle","question circle outline","shield alternate","shopping cart","sign in alternate","sign out alternate","thermometer empty","thermometer full","thermometer half","thermometer quarter","thermometer three quarters","thumbs down","thumbs down outline","thumbs up","thumbs up outline","toggle off","toggle on","unlock","unlock alternate"];yt.STATUS=G;var ge=["address book","address book outline","address card","address card outline","bed","blind","child","female","frown","frown outline","id badge","id badge outline","id card","id card outline","male","meh","meh outline","power off","smile","smile outline","street view","user","user outline","user circle","user circle outline","user md","user plus","user secret","user times","users","wheelchair"];yt.USERS_PEOPLE=ge;var Q=["ambulance","bicycle","bus","car","fighter jet","motorcycle","paper plane","paper plane outline","plane","rocket","ship","shopping cart","space shuttle","subway","taxi","train","truck","wheelchair"];yt.VEHICLES=Q;var te=["archive","book","bookmark","bookmark outline","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","eraser","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","newspaper","newspaper outline","paper plane","paper plane outline","paperclip","paragraph","pen square","pencil alternate","quote left","quote right","sticky note","sticky note outline","thumbtack"];yt.WRITING=te;var ue=["500px","accessible","accusoft","adn","adversal","affiliatetheme","algolia","amazon","amazon pay","amilia","android","angellist","angrycreative","angular","app store","app store ios","apper","apple","apple pay","asymmetrik","audible","autoprefixer","avianex","aviato","aws","bandcamp","behance","behance square","bimobject","bitbucket","bitcoin","bity","black tie","blackberry","blogger","blogger b","bluetooth","bluetooth b","btc","buromobelexperte","buysellads","cc amazon pay","cc amex","cc apple pay","cc diners club","cc discover","cc jcb","cc mastercard","cc paypal","cc stripe","cc visa","centercode","chrome","cloudscale","cloudsmith","cloudversify","codepen","codiepie","connectdevelop","contao","cpanel","creative commons","css3","css3 alternate","cuttlefish","d and d","dashcube","delicious","deploydog","deskpro","deviantart","digg","digital ocean","discord","discourse","dochub","docker","draft2digital","dribbble","dribbble square","dropbox","drupal","dyalog","earlybirds","edge","elementor","ember","empire","envira","erlang","ethereum","etsy","expeditedssl","facebook","facebook f","facebook messenger","facebook square","firefox","first order","firstdraft","flickr","flipboard","fly","font awesome","font awesome alternate","font awesome flag","fonticons","fonticons fi","fort awesome","fort awesome alternate","forumbee","foursquare","free code camp","freebsd","get pocket","gg","gg circle","git","git square","github","github alternate","github square","gitkraken","gitlab","gitter","glide","glide g","gofore","goodreads","goodreads g","google","google drive","google play","google plus","google plus g","google plus square","google wallet","gratipay","grav","gripfire","grunt","gulp","hacker news","hacker news square","hips","hire a helper","hooli","hotjar","houzz","html5","hubspot","imdb","instagram","internet explorer","ioxhost","itunes","itunes note","jenkins","joget","joomla","js","js square","jsfiddle","keycdn","kickstarter","kickstarter k","korvue","laravel","lastfm","lastfm square","leanpub","less","linechat","linkedin","linkedin alternate","linode","linux","lyft","magento","maxcdn","medapps","medium","medium m","medrt","meetup","microsoft","mix","mixcloud","mizuni","modx","monero","napster","nintendo switch","node","node js","npm","ns8","nutritionix","odnoklassniki","odnoklassniki square","opencart","openid","opera","optin monster","osi","page4","pagelines","palfed","patreon","paypal","periscope","phabricator","phoenix framework","php","pied piper","pied piper alternate","pied piper pp","pinterest","pinterest p","pinterest square","playstation","product hunt","pushed","python","qq","quinscape","quora","ravelry","react","rebel","redriver","reddit","reddit alien","reddit square","rendact","renren","replyd","resolving","rocketchat","rockrms","safari","sass","schlix","scribd","searchengin","sellcast","sellsy","servicestack","shirtsinbulk","simplybuilt","sistrix","skyatlas","skype","slack","slack hash","slideshare","snapchat","snapchat ghost","snapchat square","soundcloud","speakap","spotify","stack exchange","stack overflow","staylinked","steam","steam square","steam symbol","sticker mule","strava","stripe","stripe s","studiovinari","stumbleupon","stumbleupon circle","superpowers","supple","telegram","telegram plane","tencent weibo","themeisle","trello","tripadvisor","tumblr","tumblr square","twitch","twitter","twitter square","typo3","uber","uikit","uniregistry","untappd","usb","ussunnah","vaadin","viacoin","viadeo","viadeo square","viber","vimeo","vimeo square","vimeo v","vine","vk","vnv","vuejs","wechat","weibo","weixin","whatsapp","whatsapp square","whmcs","wikipedia w","windows","wordpress","wordpress simple","wpbeginner","wpexplorer","wpforms","xbox","xing","xing square","y combinator","yahoo","yandex","yandex international","yelp","yoast","youtube","youtube square"];yt.BRANDS=ue;var T=(0,e.default)([].concat(v,y,_,b,S,x,I,E,p,O,C,M,B,ce,he,F,U,K,ne,j,q,V,$,H,L,k,G,ge,Q,te,ue));yt.ICONS=T;var fe=["chess rock","ordered list","unordered list","user doctor","shield","puzzle","add circle","add square","add to calendar","add to cart","add user","add","alarm mute","alarm","ald","als","announcement","area chart","area graph","arrow down cart","asexual","asl interpreting","asl","assistive listening devices","attach","attention","balance","bar","bathtub","battery four","battery high","battery low","battery one","battery three","battery two","battery zero","birthday","block layout","bluetooth alternative","broken chain","browser","call square","call","cancel","cart","cc","chain","chat","checked calendar","checkmark","circle notched","close","cny","cocktail","commenting","computer","configure","content","deafness","delete calendar","delete","detective","discussions","doctor","dollar","dont","drivers license","dropdown","emergency","envira gallery","erase","eur","euro","eyedropper","factory","favorite","feed","female homosexual","file text","file text outline","find","first aid","fork","game","gay","gbp","google plus circle","google plus official","grab","graduation","grid layout","group","h","hand victory","handicap","hard of hearing","header","help circle","help","heterosexual","hide","hotel","hourglass four","hourglass full","hourglass one","hourglass three","hourglass two","idea","ils","in cart","inr","intergender","intersex","jpy","krw","lab","law","legal","lesbian","lightning","like","line graph","linkedin square","linkify","lira","list layout","magnify","mail forward","mail outline","mail square","mail","male homosexual","man","marker","mars alternate","mars horizontal","mars vertical","microsoft edge","military","ms edge","mute","new pied piper","non binary transgender","numbered list","options","other gender horizontal","other gender vertical","other gender","payment","paypal card","pencil square","photo","picture","pie chart","pie graph","pied piper hat","pin","plus cart","point","pointing down","pointing left","pointing right","pointing up","pound","power cord","power","privacy","r circle","rain","record","refresh","remove circle","remove from calendar","remove user","remove","repeat","rmb","rouble","rub","ruble","rupee","s15","selected radio","send","setting","settings","shekel","sheqel","shipping","shop","shuffle","shutdown","sidebar","signing","signup","sliders","soccer","sort alphabet ascending","sort alphabet descending","sort ascending","sort content ascending","sort content descending","sort descending","sort numeric ascending","sort numeric descending","sound","spy","stripe card","student","talk","target","teletype","television","text cursor","text telephone","theme","thermometer","thumb tack","time","tm","toggle down","toggle left","toggle right","toggle up","translate","travel","treatment","triangle down","triangle left","triangle right","triangle up","try","unhide","unlinkify","unmute","usd","user cancel","user close","user delete","user x","vcard","video camera","video play","volume control phone","wait","warning circle","warning sign","warning","wi-fi","winner","wizard","woman","won","wordpress beginner","wordpress forms","world","write square","x","yen","zip","zoom in","zoom out","zoom","bitbucket square","checkmark box","circle thin","cloud download","cloud upload","compose","conversation","credit card alternative","currency","dashboard","diamond","disk","exchange","external share","external square","external","facebook official","food","hourglass zero","level down","level up","log out","meanpath","money","move","pencil","protect","radio","remove bookmark","resize horizontal","resize vertical","sign in","sign out","spoon","star half empty","star half full","ticket","times rectangle","write","youtube play"];yt.ICON_ALIASES=fe;var Ge=(0,e.default)([].concat(T,fe));yt.ICONS_AND_ALIASES=Ge;var tt=["left dropdown"];yt.COMPONENT_CONTEXT_SPECIFIC_ICONS=tt;var mt=(0,e.default)([].concat(Ge,tt));return yt.ALL_ICONS_IN_ALL_CONTEXTS=mt,yt}var nv={},YV;function _Ae(){if(YV)return nv;YV=1,nv.__esModule=!0,nv.default=void 0;var t=function(r){return typeof r=="number"||typeof r=="string"?[r,r]:r};return nv.default=t,nv}var iv={},QV;function EAe(){if(QV)return iv;QV=1,iv.__esModule=!0,iv.default=void 0;var t=function(r,n){return typeof r=="number"||typeof r=="string"?r:r[n]};return iv.default=t,iv}var av={},FC,JV;function xAe(){if(JV)return FC;JV=1;var t=L$();function e(r,n){return t(r,n)}return FC=e,FC}var jC,XV;function AAe(){if(XV)return jC;XV=1;var t=Hl(),e=Object.create,r=function(){function n(){}return function(i){if(!t(i))return{};if(e)return e(i);n.prototype=i;var a=new n;return n.prototype=void 0,a}}();return jC=r,jC}var qC,ZV;function SAe(){if(ZV)return qC;ZV=1;var t=fre(),e=AAe(),r=M$(),n=Ed(),i=pre(),a=Di(),o=dS(),s=eS(),c=Hl(),u=pS();function f(d,g,m){var w=a(d),v=w||o(d)||u(d);if(g=n(g,4),m==null){var y=d&&d.constructor;v?m=w?new y:[]:c(d)?m=s(y)?e(i(d)):{}:m={}}return(v?t:r)(d,function(_,b,S){return g(m,_,b,S)}),m}return qC=f,qC}var ez;function IAe(){if(ez)return av;ez=1;var t=wr;av.__esModule=!0,av.default=void 0;var e=t(xAe()),r=t(lre()),n=t(SAe()),i=function(o,s){return(0,n.default)(o,function(c,u,f){(0,r.default)(s,f)?(0,e.default)(u,s[f])||(c[f]=s[f]):c[f]="[DELETED]"},{})};return av.default=i,av}var Wc={};function OAe(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var Ere={exports:{}},Nn={};/** @license React v16.13.1
|
|
80
|
-
* react-is.production.min.js
|
|
81
|
-
*
|
|
82
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the MIT license found in the
|
|
85
|
-
* LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/var Zi=typeof Symbol=="function"&&Symbol.for,V$=Zi?Symbol.for("react.element"):60103,z$=Zi?Symbol.for("react.portal"):60106,mS=Zi?Symbol.for("react.fragment"):60107,vS=Zi?Symbol.for("react.strict_mode"):60108,bS=Zi?Symbol.for("react.profiler"):60114,wS=Zi?Symbol.for("react.provider"):60109,_S=Zi?Symbol.for("react.context"):60110,G$=Zi?Symbol.for("react.async_mode"):60111,ES=Zi?Symbol.for("react.concurrent_mode"):60111,xS=Zi?Symbol.for("react.forward_ref"):60112,AS=Zi?Symbol.for("react.suspense"):60113,PAe=Zi?Symbol.for("react.suspense_list"):60120,SS=Zi?Symbol.for("react.memo"):60115,IS=Zi?Symbol.for("react.lazy"):60116,TAe=Zi?Symbol.for("react.block"):60121,RAe=Zi?Symbol.for("react.fundamental"):60117,CAe=Zi?Symbol.for("react.responder"):60118,NAe=Zi?Symbol.for("react.scope"):60119;function is(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case V$:switch(t=t.type,t){case G$:case ES:case mS:case bS:case vS:case AS:return t;default:switch(t=t&&t.$$typeof,t){case _S:case xS:case IS:case SS:case wS:return t;default:return e}}case z$:return e}}}function xre(t){return is(t)===ES}Nn.AsyncMode=G$;Nn.ConcurrentMode=ES;Nn.ContextConsumer=_S;Nn.ContextProvider=wS;Nn.Element=V$;Nn.ForwardRef=xS;Nn.Fragment=mS;Nn.Lazy=IS;Nn.Memo=SS;Nn.Portal=z$;Nn.Profiler=bS;Nn.StrictMode=vS;Nn.Suspense=AS;Nn.isAsyncMode=function(t){return xre(t)||is(t)===G$};Nn.isConcurrentMode=xre;Nn.isContextConsumer=function(t){return is(t)===_S};Nn.isContextProvider=function(t){return is(t)===wS};Nn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===V$};Nn.isForwardRef=function(t){return is(t)===xS};Nn.isFragment=function(t){return is(t)===mS};Nn.isLazy=function(t){return is(t)===IS};Nn.isMemo=function(t){return is(t)===SS};Nn.isPortal=function(t){return is(t)===z$};Nn.isProfiler=function(t){return is(t)===bS};Nn.isStrictMode=function(t){return is(t)===vS};Nn.isSuspense=function(t){return is(t)===AS};Nn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===mS||t===ES||t===bS||t===vS||t===AS||t===PAe||typeof t=="object"&&t!==null&&(t.$$typeof===IS||t.$$typeof===SS||t.$$typeof===wS||t.$$typeof===_S||t.$$typeof===xS||t.$$typeof===RAe||t.$$typeof===CAe||t.$$typeof===NAe||t.$$typeof===TAe)};Nn.typeOf=is;Ere.exports=Nn;var DAe=Ere.exports;function B8(t,e){return B8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},B8(t,e)}function Are(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,B8(t,e)}var zf=function(e,r){if(typeof e=="function"){e(r);return}e!==null&&typeof e=="object"&&(e.current=r)},$Ae=function(e){return e!==null&&typeof e=="object"&&e.hasOwnProperty("current")},Sre=function(t){Are(e,t);function e(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a))||this,n.prevNode=void 0,n}var r=e.prototype;return r.componentDidMount=function(){var i=v1.findDOMNode(this);this.prevNode=i,zf(this.props.innerRef,i)},r.componentDidUpdate=function(i){var a=v1.findDOMNode(this);this.prevNode!==a&&(this.prevNode=a,zf(this.props.innerRef,a)),i.innerRef!==this.props.innerRef&&zf(this.props.innerRef,a)},r.componentWillUnmount=function(){zf(this.props.innerRef,null),delete this.prevNode},r.render=function(){var i=this.props.children;return i},e}(Be.Component),Ire=function(t){Are(e,t);function e(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a))||this,n.currentNode=void 0,n.handleRefOverride=function(s){var c=n.props,u=c.children,f=c.innerRef;zf(u.ref,s),zf(f,s),n.currentNode=s},n}var r=e.prototype;return r.componentDidUpdate=function(i){i.innerRef!==this.props.innerRef&&zf(this.props.innerRef,this.currentNode)},r.componentWillUnmount=function(){delete this.currentNode},r.render=function(){var i=this.props.children;return Be.cloneElement(i,{ref:this.handleRefOverride})},e}(Be.Component),MAe=["children","innerRef"],kAe=function(e){var r=e.children,n=e.innerRef,i=OAe(e,MAe),a=Be.Children.only(r),o=DAe.isForwardRef(a)?Ire:Sre,s=a&&i&&Object.keys(i).length>0?Be.cloneElement(a,i):a;return Be.createElement(o,{innerRef:n},s)};const LAe=Object.freeze(Object.defineProperty({__proto__:null,Ref:kAe,RefFindNode:Sre,RefForward:Ire,handleRef:zf,isRefObject:$Ae},Symbol.toStringTag,{value:"Module"})),xd=lo(LAe);var ov={},tz;function UAe(){if(tz)return ov;tz=1;var t=wr;ov.__esModule=!0,ov.default=void 0;var e=t(Be),r=t(wre()),n=(0,r.default)()?e.default.useLayoutEffect:e.default.useEffect,i=n;return ov.default=i,ov}var rz;function BAe(){if(rz)return Wc;rz=1;var t=wr;Wc.__esModule=!0,Wc.computeClassNames=a,Wc.computeClassNamesDifference=o,Wc.default=d,Wc.NodeRegistry=Wc.handleClassNamesChange=void 0;var e=xd,r=t(Be),n=t(UAe()),i=/\s+/;function a(g){var m=[];return g?(g.forEach(function(w){if(typeof w.current=="string"){var v=w.current.split(i);v.forEach(function(y){m.push(y)})}}),m.filter(function(w,v,y){return w.length>0&&y.indexOf(w)===v})):[]}function o(g,m){return[m.filter(function(w){return g.indexOf(w)===-1}),g.filter(function(w){return m.indexOf(w)===-1})]}var s=new Map,c=function(m,w){var v=a(w),y=o(s.get(m)||[],v),_=y[0],b=y[1];m&&(_.forEach(function(S){return m.classList.add(S)}),b.forEach(function(S){return m.classList.remove(S)})),s.set(m,v)};Wc.handleClassNamesChange=c;var u=function(){var m=this;this.add=function(w,v){if(m.nodes.has(w)){var y=m.nodes.get(w);y.add(v);return}var _=new Set;_.add(v),m.nodes.set(w,_)},this.del=function(w,v){if(m.nodes.has(w)){var y=m.nodes.get(w);if(y.size===1){m.nodes.delete(w);return}y.delete(v)}},this.emit=function(w,v){v(w,m.nodes.get(w))},this.nodes=new Map};Wc.NodeRegistry=u;var f=new u;function d(g,m){var w=r.default.useRef(),v=r.default.useRef(!1);(0,n.default)(function(){if(w.current=m,v.current){var y=(0,e.isRefObject)(g)?g.current:g;f.emit(y,c)}v.current=!0},[m]),(0,n.default)(function(){var y=(0,e.isRefObject)(g)?g.current:g;return f.add(y,w),f.emit(y,c),function(){f.del(y,w),f.emit(y,c)}},[g])}return Wc}var nz;function Wn(){return nz||(nz=1,function(t){var e=Ys,r=wr;t.__esModule=!0;var n={useKeyOnly:!0,useKeyOrValueAndKey:!0,useValueAndKey:!0,useMultipleProp:!0,useTextAlignProp:!0,useVerticalAlignProp:!0,useWidthProp:!0,htmlInputAttrs:!0,htmlInputEvents:!0,htmlInputProps:!0,htmlImageProps:!0,partitionHTMLProps:!0,numberToWordMap:!0,numberToWord:!0,ModernAutoControlledComponent:!0,childrenUtils:!0,customPropTypes:!0,eventStack:!0,getUnhandledProps:!0,getElementType:!0,isBrowser:!0,doesNodeContainClick:!0,leven:!0,createPaginationItems:!0,SUI:!0,normalizeOffset:!0,normalizeTransitionDuration:!0,objectDiff:!0,useClassNamesOnNode:!0};t.SUI=t.customPropTypes=t.childrenUtils=t.numberToWord=t.numberToWordMap=t.partitionHTMLProps=t.htmlImageProps=t.htmlInputProps=t.htmlInputEvents=t.htmlInputAttrs=t.useWidthProp=t.useVerticalAlignProp=t.useTextAlignProp=t.useMultipleProp=t.useValueAndKey=t.useKeyOrValueAndKey=t.useKeyOnly=void 0;var i=r(dxe());t.ModernAutoControlledComponent=i.default;var a=e(mxe());t.childrenUtils=a;var o=vxe();t.useKeyOnly=o.useKeyOnly,t.useKeyOrValueAndKey=o.useKeyOrValueAndKey,t.useValueAndKey=o.useValueAndKey,t.useMultipleProp=o.useMultipleProp,t.useTextAlignProp=o.useTextAlignProp,t.useVerticalAlignProp=o.useVerticalAlignProp,t.useWidthProp=o.useWidthProp;var s=e(Wxe());t.customPropTypes=s;var c=r(Qxe());t.eventStack=c.default;var u=rAe();Object.keys(u).forEach(function(p){p==="default"||p==="__esModule"||Object.prototype.hasOwnProperty.call(n,p)||(t[p]=u[p])});var f=r(nAe());t.getUnhandledProps=f.default;var d=r(iAe());t.getElementType=d.default;var g=oAe();t.htmlInputAttrs=g.htmlInputAttrs,t.htmlInputEvents=g.htmlInputEvents,t.htmlInputProps=g.htmlInputProps,t.htmlImageProps=g.htmlImageProps,t.partitionHTMLProps=g.partitionHTMLProps;var m=r(wre());t.isBrowser=m.default;var w=r(fAe());t.doesNodeContainClick=w.default;var v=r(yre());t.leven=v.default;var y=r(bAe());t.createPaginationItems=y.default;var _=e(wAe());t.SUI=_;var b=B$();t.numberToWordMap=b.numberToWordMap,t.numberToWord=b.numberToWord;var S=r(_Ae());t.normalizeOffset=S.default;var x=r(EAe());t.normalizeTransitionDuration=x.default;var I=r(IAe());t.objectDiff=I.default;var E=r(BAe());t.useClassNamesOnNode=E.default}(lT)),lT}var sv={},iz;function FAe(){if(iz)return sv;iz=1;var t=wr;sv.__esModule=!0,sv.default=void 0;var e=t(Fn());t(O$());var r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(s){var c=s.children,u=s.className,f=s.content,d=s.size,g=(0,r.default)(d,"icons",u),m=(0,i.getUnhandledProps)(a,s),w=(0,i.getElementType)(a,s);return n.default.createElement(w,(0,e.default)({},m,{className:g}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content","size"],a.propTypes={},a.defaultProps={as:"i"};var o=a;return sv.default=o,sv}var jAe=Ys,Ad=wr;rm.__esModule=!0;var qb=rm.default=void 0,qAe=Ad(Fn()),HAe=Ad(Uc());Ad(O$());var VAe=Ad(Qs()),az=Ad(Vl()),zAe=Ad(ii);Ad(Ln());var oz=jAe(Be),Wo=Wn(),GAe=Ad(FAe()),dp=function(t){(0,HAe.default)(e,t);function e(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a))||this,n.handleClick=function(s){var c=n.props.disabled;if(c){s.preventDefault();return}(0,VAe.default)(n.props,"onClick",s,n.props)},n}var r=e.prototype;return r.getIconAriaOptions=function(){var i={},a=this.props,o=a["aria-label"],s=a["aria-hidden"];return(0,az.default)(o)?i["aria-hidden"]="true":i["aria-label"]=o,(0,az.default)(s)||(i["aria-hidden"]=s),i},r.render=function(){var i=this.props,a=i.bordered,o=i.circular,s=i.className,c=i.color,u=i.corner,f=i.disabled,d=i.fitted,g=i.flipped,m=i.inverted,w=i.link,v=i.loading,y=i.name,_=i.rotated,b=i.size,S=(0,zAe.default)(c,y,b,(0,Wo.useKeyOnly)(a,"bordered"),(0,Wo.useKeyOnly)(o,"circular"),(0,Wo.useKeyOnly)(f,"disabled"),(0,Wo.useKeyOnly)(d,"fitted"),(0,Wo.useKeyOnly)(m,"inverted"),(0,Wo.useKeyOnly)(w,"link"),(0,Wo.useKeyOnly)(v,"loading"),(0,Wo.useKeyOrValueAndKey)(u,"corner"),(0,Wo.useValueAndKey)(g,"flipped"),(0,Wo.useValueAndKey)(_,"rotated"),"icon",s),x=(0,Wo.getUnhandledProps)(e,this.props),I=(0,Wo.getElementType)(e,this.props),E=this.getIconAriaOptions();return oz.default.createElement(I,(0,qAe.default)({},x,E,{className:S,onClick:this.handleClick}))},e}(oz.PureComponent);dp.handledProps=["aria-hidden","aria-label","as","bordered","circular","className","color","corner","disabled","fitted","flipped","inverted","link","loading","name","rotated","size"];dp.propTypes={};dp.defaultProps={as:"i"};dp.Group=GAe.default;dp.create=(0,Wo.createShorthandFactory)(dp,function(t){return{name:t}});var WAe=dp;qb=rm.default=WAe;const xu=Object.create(null);xu.open="0";xu.close="1";xu.ping="2";xu.pong="3";xu.message="4";xu.upgrade="5";xu.noop="6";const gx=Object.create(null);Object.keys(xu).forEach(t=>{gx[xu[t]]=t});const F8={type:"error",data:"parser error"},Ore=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Pre=typeof ArrayBuffer=="function",Tre=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,W$=({type:t,data:e},r,n)=>Ore&&e instanceof Blob?r?n(e):sz(e,n):Pre&&(e instanceof ArrayBuffer||Tre(e))?r?n(e):sz(new Blob([e]),n):n(xu[t]+(e||"")),sz=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function cz(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let HC;function KAe(t,e){if(Ore&&t.data instanceof Blob)return t.data.arrayBuffer().then(cz).then(e);if(Pre&&(t.data instanceof ArrayBuffer||Tre(t.data)))return e(cz(t.data));W$(t,!1,r=>{HC||(HC=new TextEncoder),e(HC.encode(r))})}const uz="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bb=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<uz.length;t++)bb[uz.charCodeAt(t)]=t;const YAe=t=>{let e=t.length*.75,r=t.length,n,i=0,a,o,s,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const u=new ArrayBuffer(e),f=new Uint8Array(u);for(n=0;n<r;n+=4)a=bb[t.charCodeAt(n)],o=bb[t.charCodeAt(n+1)],s=bb[t.charCodeAt(n+2)],c=bb[t.charCodeAt(n+3)],f[i++]=a<<2|o>>4,f[i++]=(o&15)<<4|s>>2,f[i++]=(s&3)<<6|c&63;return u},QAe=typeof ArrayBuffer=="function",K$=(t,e)=>{if(typeof t!="string")return{type:"message",data:Rre(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:JAe(t.substring(1),e)}:gx[r]?t.length>1?{type:gx[r],data:t.substring(1)}:{type:gx[r]}:F8},JAe=(t,e)=>{if(QAe){const r=YAe(t);return Rre(r,e)}else return{base64:!0,data:t}},Rre=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},Cre=String.fromCharCode(30),XAe=(t,e)=>{const r=t.length,n=new Array(r);let i=0;t.forEach((a,o)=>{W$(a,!1,s=>{n[o]=s,++i===r&&e(n.join(Cre))})})},ZAe=(t,e)=>{const r=t.split(Cre),n=[];for(let i=0;i<r.length;i++){const a=K$(r[i],e);if(n.push(a),a.type==="error")break}return n};function e2e(){return new TransformStream({transform(t,e){KAe(t,r=>{const n=r.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,n)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(r)})}})}let VC;function cE(t){return t.reduce((e,r)=>e+r.length,0)}function uE(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let i=0;i<e;i++)r[i]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function t2e(t,e){VC||(VC=new TextDecoder);const r=[];let n=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(r.push(o);;){if(n===0){if(cE(r)<1)break;const c=uE(r,1);a=(c[0]&128)===128,i=c[0]&127,i<126?n=3:i===126?n=1:n=2}else if(n===1){if(cE(r)<2)break;const c=uE(r,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(cE(r)<8)break;const c=uE(r,8),u=new DataView(c.buffer,c.byteOffset,c.length),f=u.getUint32(0);if(f>Math.pow(2,53-32)-1){s.enqueue(F8);break}i=f*Math.pow(2,32)+u.getUint32(4),n=3}else{if(cE(r)<i)break;const c=uE(r,i);s.enqueue(K$(a?c:VC.decode(c),e)),n=0}if(i===0||i>t){s.enqueue(F8);break}}}})}const Nre=4;function Ni(t){if(t)return r2e(t)}function r2e(t){for(var e in Ni.prototype)t[e]=Ni.prototype[e];return t}Ni.prototype.on=Ni.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};Ni.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};Ni.prototype.off=Ni.prototype.removeListener=Ni.prototype.removeAllListeners=Ni.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,i=0;i<r.length;i++)if(n=r[i],n===e||n.fn===e){r.splice(i,1);break}return r.length===0&&delete this._callbacks["$"+t],this};Ni.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,i=r.length;n<i;++n)r[n].apply(this,e)}return this};Ni.prototype.emitReserved=Ni.prototype.emit;Ni.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};Ni.prototype.hasListeners=function(t){return!!this.listeners(t).length};const $s=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function Dre(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const n2e=$s.setTimeout,i2e=$s.clearTimeout;function OS(t,e){e.useNativeTimers?(t.setTimeoutFn=n2e.bind($s),t.clearTimeoutFn=i2e.bind($s)):(t.setTimeoutFn=$s.setTimeout.bind($s),t.clearTimeoutFn=$s.clearTimeout.bind($s))}const a2e=1.33;function o2e(t){return typeof t=="string"?s2e(t):Math.ceil((t.byteLength||t.size)*a2e)}function s2e(t){let e=0,r=0;for(let n=0,i=t.length;n<i;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function c2e(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function u2e(t){let e={},r=t.split("&");for(let n=0,i=r.length;n<i;n++){let a=r[n].split("=");e[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return e}class l2e extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class Y$ extends Ni{constructor(e){super(),this.writable=!1,OS(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,r,n){return super.emitReserved("error",new l2e(e,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const r=K$(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const r=c2e(e);return r.length?"?"+r:""}}const $re="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),j8=64,f2e={};let lz=0,lE=0,fz;function dz(t){let e="";do e=$re[t%j8]+e,t=Math.floor(t/j8);while(t>0);return e}function Mre(){const t=dz(+new Date);return t!==fz?(lz=0,fz=t):t+"."+dz(lz++)}for(;lE<j8;lE++)f2e[$re[lE]]=lE;let kre=!1;try{kre=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const d2e=kre;function Lre(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||d2e))return new XMLHttpRequest}catch{}if(!e)try{return new $s[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function h2e(){}const p2e=function(){return new Lre({xdomain:!1}).responseType!=null}();class g2e extends Y${constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const n=location.protocol==="https:";let i=location.port;i||(i=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}const r=e&&e.forceBase64;this.supportsBinary=p2e&&!r,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let n=0;this.polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};ZAe(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,XAe(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Mre()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new _u(this.uri(),e)}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class _u extends Ni{constructor(e,r){super(),OS(this,r),this.opts=r,this.method=r.method||"GET",this.uri=e,this.data=r.data!==void 0?r.data:null,this.create()}create(){var e;const r=Dre(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const n=this.xhr=new Lre(r);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var i;n.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(n)),n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=_u.requestsCount++,_u.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=h2e,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete _u.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}_u.requestsCount=0;_u.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",hz);else if(typeof addEventListener=="function"){const t="onpagehide"in $s?"pagehide":"unload";addEventListener(t,hz,!1)}}function hz(){for(let t in _u.requests)_u.requests.hasOwnProperty(t)&&_u.requests[t].abort()}var fu=[],Os=[],y2e=typeof Uint8Array<"u"?Uint8Array:Array,Q$=!1;function Ure(){Q$=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)fu[e]=t[e],Os[t.charCodeAt(e)]=e;Os["-".charCodeAt(0)]=62,Os["_".charCodeAt(0)]=63}function m2e(t){Q$||Ure();var e,r,n,i,a,o,s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=t[s-2]==="="?2:t[s-1]==="="?1:0,o=new y2e(s*3/4-a),n=a>0?s-4:s;var c=0;for(e=0,r=0;e<n;e+=4,r+=3)i=Os[t.charCodeAt(e)]<<18|Os[t.charCodeAt(e+1)]<<12|Os[t.charCodeAt(e+2)]<<6|Os[t.charCodeAt(e+3)],o[c++]=i>>16&255,o[c++]=i>>8&255,o[c++]=i&255;return a===2?(i=Os[t.charCodeAt(e)]<<2|Os[t.charCodeAt(e+1)]>>4,o[c++]=i&255):a===1&&(i=Os[t.charCodeAt(e)]<<10|Os[t.charCodeAt(e+1)]<<4|Os[t.charCodeAt(e+2)]>>2,o[c++]=i>>8&255,o[c++]=i&255),o}function v2e(t){return fu[t>>18&63]+fu[t>>12&63]+fu[t>>6&63]+fu[t&63]}function b2e(t,e,r){for(var n,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(v2e(n));return i.join("")}function pz(t){Q$||Ure();for(var e,r=t.length,n=r%3,i="",a=[],o=16383,s=0,c=r-n;s<c;s+=o)a.push(b2e(t,s,s+o>c?c:s+o));return n===1?(e=t[r-1],i+=fu[e>>2],i+=fu[e<<4&63],i+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],i+=fu[e>>10],i+=fu[e>>4&63],i+=fu[e<<2&63],i+="="),a.push(i),a.join("")}function PS(t,e,r,n,i){var a,o,s=i*8-n-1,c=(1<<s)-1,u=c>>1,f=-7,d=r?i-1:0,g=r?-1:1,m=t[e+d];for(d+=g,a=m&(1<<-f)-1,m>>=-f,f+=s;f>0;a=a*256+t[e+d],d+=g,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=n;f>0;o=o*256+t[e+d],d+=g,f-=8);if(a===0)a=1-u;else{if(a===c)return o?NaN:(m?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-u}return(m?-1:1)*o*Math.pow(2,a-n)}function Bre(t,e,r,n,i,a){var o,s,c,u=a*8-i-1,f=(1<<u)-1,d=f>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:a-1,w=n?1:-1,v=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+d>=1?e+=g/c:e+=g*Math.pow(2,1-d),e*c>=2&&(o++,c/=2),o+d>=f?(s=0,o=f):o+d>=1?(s=(e*c-1)*Math.pow(2,i),o=o+d):(s=e*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;t[r+m]=s&255,m+=w,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;t[r+m]=o&255,m+=w,o/=256,u-=8);t[r+m-w]|=v*128}var w2e={}.toString,Fre=Array.isArray||function(t){return w2e.call(t)=="[object Array]"};/*!
|
|
87
|
-
* The buffer module from node.js, for the browser.
|
|
88
|
-
*
|
|
89
|
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
90
|
-
* @license MIT
|
|
91
|
-
*/var _2e=50;ut.TYPED_ARRAY_SUPPORT=bn.TYPED_ARRAY_SUPPORT!==void 0?bn.TYPED_ARRAY_SUPPORT:!0;IA();function IA(){return ut.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function xl(t,e){if(IA()<e)throw new RangeError("Invalid typed array length");return ut.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=ut.prototype):(t===null&&(t=new ut(e)),t.length=e),t}function ut(t,e,r){if(!ut.TYPED_ARRAY_SUPPORT&&!(this instanceof ut))return new ut(t,e,r);if(typeof t=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return J$(this,t)}return jre(this,t,e,r)}ut.poolSize=8192;ut._augment=function(t){return t.__proto__=ut.prototype,t};function jre(t,e,r,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?A2e(t,e,r,n):typeof e=="string"?x2e(t,e,r):S2e(t,e)}ut.from=function(t,e,r){return jre(null,t,e,r)};ut.TYPED_ARRAY_SUPPORT&&(ut.prototype.__proto__=Uint8Array.prototype,ut.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&ut[Symbol.species]);function qre(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function E2e(t,e,r,n){return qre(e),e<=0?xl(t,e):r!==void 0?typeof n=="string"?xl(t,e).fill(r,n):xl(t,e).fill(r):xl(t,e)}ut.alloc=function(t,e,r){return E2e(null,t,e,r)};function J$(t,e){if(qre(e),t=xl(t,e<0?0:X$(e)|0),!ut.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}ut.allocUnsafe=function(t){return J$(null,t)};ut.allocUnsafeSlow=function(t){return J$(null,t)};function x2e(t,e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!ut.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=Hre(e,r)|0;t=xl(t,n);var i=t.write(e,r);return i!==n&&(t=t.slice(0,i)),t}function q8(t,e){var r=e.length<0?0:X$(e.length)|0;t=xl(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function A2e(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return r===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,r):e=new Uint8Array(e,r,n),ut.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=ut.prototype):t=q8(t,e),t}function S2e(t,e){if(Au(e)){var r=X$(e.length)|0;return t=xl(t,r),t.length===0||e.copy(t,0,0,r),t}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||V2e(e.length)?xl(t,0):q8(t,e);if(e.type==="Buffer"&&Fre(e.data))return q8(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function X$(t){if(t>=IA())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+IA().toString(16)+" bytes");return t|0}ut.isBuffer=z2e;function Au(t){return!!(t!=null&&t._isBuffer)}ut.compare=function(e,r){if(!Au(e)||!Au(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,a=0,o=Math.min(n,i);a<o;++a)if(e[a]!==r[a]){n=e[a],i=r[a];break}return n<i?-1:i<n?1:0};ut.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};ut.concat=function(e,r){if(!Fre(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return ut.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=ut.allocUnsafe(r),a=0;for(n=0;n<e.length;++n){var o=e[n];if(!Au(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function Hre(t,e){if(Au(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var r=t.length;if(r===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return OA(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Qre(t).length;default:if(n)return OA(t).length;e=(""+e).toLowerCase(),n=!0}}ut.byteLength=Hre;function I2e(t,e,r){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return k2e(this,e,r);case"utf8":case"utf-8":return Gre(this,e,r);case"ascii":return $2e(this,e,r);case"latin1":case"binary":return M2e(this,e,r);case"base64":return N2e(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L2e(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}ut.prototype._isBuffer=!0;function Sh(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}ut.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)Sh(this,r,r+1);return this};ut.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)Sh(this,r,r+3),Sh(this,r+1,r+2);return this};ut.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)Sh(this,r,r+7),Sh(this,r+1,r+6),Sh(this,r+2,r+5),Sh(this,r+3,r+4);return this};ut.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Gre(this,0,e):I2e.apply(this,arguments)};ut.prototype.equals=function(e){if(!Au(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:ut.compare(this,e)===0};ut.prototype.inspect=function(){var e="",r=_2e;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"};ut.prototype.compare=function(e,r,n,i,a){if(!Au(e))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>e.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===e)return 0;for(var o=a-i,s=n-r,c=Math.min(o,s),u=this.slice(i,a),f=e.slice(r,n),d=0;d<c;++d)if(u[d]!==f[d]){o=u[d],s=f[d];break}return o<s?-1:s<o?1:0};function Vre(t,e,r,n,i){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=ut.from(e,n)),Au(e))return e.length===0?-1:gz(t,e,r,n,i);if(typeof e=="number")return e=e&255,ut.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):gz(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function gz(t,e,r,n,i){var a=1,o=t.length,s=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;a=2,o/=2,s/=2,r/=2}function c(m,w){return a===1?m[w]:m.readUInt16BE(w*a)}var u;if(i){var f=-1;for(u=r;u<o;u++)if(c(t,u)===c(e,f===-1?0:u-f)){if(f===-1&&(f=u),u-f+1===s)return f*a}else f!==-1&&(u-=u-f),f=-1}else for(r+s>o&&(r=o-s),u=r;u>=0;u--){for(var d=!0,g=0;g<s;g++)if(c(t,u+g)!==c(e,g)){d=!1;break}if(d)return u}return-1}ut.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};ut.prototype.indexOf=function(e,r,n){return Vre(this,e,r,n,!0)};ut.prototype.lastIndexOf=function(e,r,n){return Vre(this,e,r,n,!1)};function O2e(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var a=e.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(e.substr(o*2,2),16);if(isNaN(s))return o;t[r+o]=s}return o}function P2e(t,e,r,n){return CS(OA(e,t.length-r),t,r,n)}function zre(t,e,r,n){return CS(q2e(e),t,r,n)}function T2e(t,e,r,n){return zre(t,e,r,n)}function R2e(t,e,r,n){return CS(Qre(e),t,r,n)}function C2e(t,e,r,n){return CS(H2e(e,t.length-r),t,r,n)}ut.prototype.write=function(e,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-r;if((n===void 0||n>a)&&(n=a),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return O2e(this,e,r,n);case"utf8":case"utf-8":return P2e(this,e,r,n);case"ascii":return zre(this,e,r,n);case"latin1":case"binary":return T2e(this,e,r,n);case"base64":return R2e(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C2e(this,e,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};ut.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function N2e(t,e,r){return e===0&&r===t.length?pz(t):pz(t.slice(e,r))}function Gre(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a=t[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=r){var c,u,f,d;switch(s){case 1:a<128&&(o=a);break;case 2:c=t[i+1],(c&192)===128&&(d=(a&31)<<6|c&63,d>127&&(o=d));break;case 3:c=t[i+1],u=t[i+2],(c&192)===128&&(u&192)===128&&(d=(a&15)<<12|(c&63)<<6|u&63,d>2047&&(d<55296||d>57343)&&(o=d));break;case 4:c=t[i+1],u=t[i+2],f=t[i+3],(c&192)===128&&(u&192)===128&&(f&192)===128&&(d=(a&15)<<18|(c&63)<<12|(u&63)<<6|f&63,d>65535&&d<1114112&&(o=d))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return D2e(n)}var yz=4096;function D2e(t){var e=t.length;if(e<=yz)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=yz));return r}function $2e(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function M2e(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function k2e(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=e;a<r;++a)i+=j2e(t[a]);return i}function L2e(t,e,r){for(var n=t.slice(e,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}ut.prototype.slice=function(e,r){var n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i;if(ut.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=ut.prototype;else{var a=r-e;i=new ut(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+e]}return i};function ea(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}ut.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||ea(e,r,this.length);for(var i=this[e],a=1,o=0;++o<r&&(a*=256);)i+=this[e+o]*a;return i};ut.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||ea(e,r,this.length);for(var i=this[e+--r],a=1;r>0&&(a*=256);)i+=this[e+--r]*a;return i};ut.prototype.readUInt8=function(e,r){return r||ea(e,1,this.length),this[e]};ut.prototype.readUInt16LE=function(e,r){return r||ea(e,2,this.length),this[e]|this[e+1]<<8};ut.prototype.readUInt16BE=function(e,r){return r||ea(e,2,this.length),this[e]<<8|this[e+1]};ut.prototype.readUInt32LE=function(e,r){return r||ea(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};ut.prototype.readUInt32BE=function(e,r){return r||ea(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};ut.prototype.readIntLE=function(e,r,n){e=e|0,r=r|0,n||ea(e,r,this.length);for(var i=this[e],a=1,o=0;++o<r&&(a*=256);)i+=this[e+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*r)),i};ut.prototype.readIntBE=function(e,r,n){e=e|0,r=r|0,n||ea(e,r,this.length);for(var i=r,a=1,o=this[e+--i];i>0&&(a*=256);)o+=this[e+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};ut.prototype.readInt8=function(e,r){return r||ea(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};ut.prototype.readInt16LE=function(e,r){r||ea(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};ut.prototype.readInt16BE=function(e,r){r||ea(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};ut.prototype.readInt32LE=function(e,r){return r||ea(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};ut.prototype.readInt32BE=function(e,r){return r||ea(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};ut.prototype.readFloatLE=function(e,r){return r||ea(e,4,this.length),PS(this,e,!0,23,4)};ut.prototype.readFloatBE=function(e,r){return r||ea(e,4,this.length),PS(this,e,!1,23,4)};ut.prototype.readDoubleLE=function(e,r){return r||ea(e,8,this.length),PS(this,e,!0,52,8)};ut.prototype.readDoubleBE=function(e,r){return r||ea(e,8,this.length),PS(this,e,!1,52,8)};function Bo(t,e,r,n,i,a){if(!Au(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}ut.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;Bo(this,e,r,n,a,0)}var o=1,s=0;for(this[r]=e&255;++s<n&&(o*=256);)this[r+s]=e/o&255;return r+n};ut.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;Bo(this,e,r,n,a,0)}var o=n-1,s=1;for(this[r+o]=e&255;--o>=0&&(s*=256);)this[r+o]=e/s&255;return r+n};ut.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||Bo(this,e,r,1,255,0),ut.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};function TS(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-r,2);i<a;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}ut.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r|0,n||Bo(this,e,r,2,65535,0),ut.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):TS(this,e,r,!0),r+2};ut.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||Bo(this,e,r,2,65535,0),ut.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):TS(this,e,r,!1),r+2};function RS(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-r,4);i<a;++i)t[r+i]=e>>>(n?i:3-i)*8&255}ut.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||Bo(this,e,r,4,4294967295,0),ut.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255):RS(this,e,r,!0),r+4};ut.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||Bo(this,e,r,4,4294967295,0),ut.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):RS(this,e,r,!1),r+4};ut.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r|0,!i){var a=Math.pow(2,8*n-1);Bo(this,e,r,n,a-1,-a)}var o=0,s=1,c=0;for(this[r]=e&255;++o<n&&(s*=256);)e<0&&c===0&&this[r+o-1]!==0&&(c=1),this[r+o]=(e/s>>0)-c&255;return r+n};ut.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r|0,!i){var a=Math.pow(2,8*n-1);Bo(this,e,r,n,a-1,-a)}var o=n-1,s=1,c=0;for(this[r+o]=e&255;--o>=0&&(s*=256);)e<0&&c===0&&this[r+o+1]!==0&&(c=1),this[r+o]=(e/s>>0)-c&255;return r+n};ut.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||Bo(this,e,r,1,127,-128),ut.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=e&255,r+1};ut.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r|0,n||Bo(this,e,r,2,32767,-32768),ut.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):TS(this,e,r,!0),r+2};ut.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||Bo(this,e,r,2,32767,-32768),ut.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):TS(this,e,r,!1),r+2};ut.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||Bo(this,e,r,4,2147483647,-2147483648),ut.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):RS(this,e,r,!0),r+4};ut.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||Bo(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),ut.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):RS(this,e,r,!1),r+4};function Wre(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Kre(t,e,r,n,i){return i||Wre(t,e,r,4),Bre(t,e,r,n,23,4),r+4}ut.prototype.writeFloatLE=function(e,r,n){return Kre(this,e,r,!0,n)};ut.prototype.writeFloatBE=function(e,r,n){return Kre(this,e,r,!1,n)};function Yre(t,e,r,n,i){return i||Wre(t,e,r,8),Bre(t,e,r,n,52,8),r+8}ut.prototype.writeDoubleLE=function(e,r,n){return Yre(this,e,r,!0,n)};ut.prototype.writeDoubleBE=function(e,r,n){return Yre(this,e,r,!1,n)};ut.prototype.copy=function(e,r,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var a=i-n,o;if(this===e&&n<r&&r<i)for(o=a-1;o>=0;--o)e[o+r]=this[o+n];else if(a<1e3||!ut.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),r);return a};ut.prototype.fill=function(e,r,n,i){if(typeof e=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var a=e.charCodeAt(0);a<256&&(e=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!ut.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var o;if(typeof e=="number")for(o=r;o<n;++o)this[o]=e;else{var s=Au(e)?e:OA(new ut(e,i).toString()),c=s.length;for(o=0;o<n-r;++o)this[o+r]=s[o%c]}return this};var U2e=/[^+\/0-9A-Za-z-_]/g;function B2e(t){if(t=F2e(t).replace(U2e,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function F2e(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function j2e(t){return t<16?"0"+t.toString(16):t.toString(16)}function OA(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o<n;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function q2e(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function H2e(t,e){for(var r,n,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function Qre(t){return m2e(B2e(t))}function CS(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function V2e(t){return t!==t}function z2e(t){return t!=null&&(!!t._isBuffer||Jre(t)||G2e(t))}function Jre(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function G2e(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Jre(t.slice(0,0))}const Z$=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0))(),fE=$s.WebSocket||$s.MozWebSocket,mz=!0,W2e="arraybuffer",vz=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";let K2e=class extends Y${constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),r=this.opts.protocols,n=vz?{}:Dre(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=mz&&!vz?r?new fE(e,r):new fE(e):new fE(e,r,n)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],i=r===e.length-1;W$(n,this.supportsBinary,a=>{const o={};try{mz&&this.ws.send(a)}catch{}i&&Z$(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Mre()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}check(){return!!fE}};class Y2e extends Y${get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const r=t2e(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),i=e2e();i.readable.pipeTo(e.writable),this.writer=i.writable.getWriter();const a=()=>{n.read().then(({done:s,value:c})=>{s||(this.onPacket(c),a())}).catch(s=>{})};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],i=r===e.length-1;this.writer.write(n).then(()=>{i&&Z$(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const Q2e={websocket:K2e,webtransport:Y2e,polling:g2e},J2e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X2e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function H8(t){if(t.length>2e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let i=J2e.exec(t||""),a={},o=14;for(;o--;)a[X2e[o]]=i[o]||"";return r!=-1&&n!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=Z2e(a,a.path),a.queryKey=eSe(a,a.query),a}function Z2e(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function eSe(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,a){i&&(r[i]=a)}),r}let Xre=class C0 extends Ni{constructor(e,r={}){super(),this.binaryType=W2e,this.writeBuffer=[],e&&typeof e=="object"&&(r=e,e=null),e?(e=H8(e),r.hostname=e.host,r.secure=e.protocol==="https"||e.protocol==="wss",r.port=e.port,e.query&&(r.query=e.query)):r.host&&(r.hostname=H8(r.host).host),OS(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=u2e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=Nre,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new Q2e[e](n)}open(){let e;if(this.opts.rememberUpgrade&&C0.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",r=>this.onClose("transport close",r))}probe(e){let r=this.createTransport(e),n=!1;C0.priorWebsocketSuccess=!1;const i=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",d=>{if(!n)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;C0.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=r.name,this.emitReserved("upgradeError",g)}}))};function a(){n||(n=!0,f(),r.close(),r=null)}const o=d=>{const g=new Error("probe error: "+d);g.transport=r.name,a(),this.emitReserved("upgradeError",g)};function s(){o("transport closed")}function c(){o("socket closed")}function u(d){r&&d.name!==r.name&&a()}const f=()=>{r.removeListener("open",i),r.removeListener("error",o),r.removeListener("close",s),this.off("close",c),this.off("upgrading",u)};r.once("open",i),r.once("error",o),r.once("close",s),this.once("close",c),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onOpen(){if(this.readyState="open",C0.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const r=this.upgrades.length;for(;e<r;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const r=new Error("server error");r.code=e.data,this.onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const i=this.writeBuffer[n].data;if(i&&(r+=o2e(i)),n>0&&r>this.maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}write(e,r,n){return this.sendPacket("message",e,r,n),this}send(e,r,n){return this.sendPacket("message",e,r,n),this}sendPacket(e,r,n,i){if(typeof r=="function"&&(i=r,r=void 0),typeof n=="function"&&(i=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const a={type:e,data:r,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}onError(e){C0.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,r){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const r=[];let n=0;const i=e.length;for(;n<i;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}};Xre.protocol=Nre;function tSe(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=H8(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+e,n.href=n.protocol+"://"+a+(r&&r.port===n.port?"":":"+n.port),n}const rSe=typeof ArrayBuffer=="function",nSe=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Zre=Object.prototype.toString,iSe=typeof Blob=="function"||typeof Blob<"u"&&Zre.call(Blob)==="[object BlobConstructor]",aSe=typeof File=="function"||typeof File<"u"&&Zre.call(File)==="[object FileConstructor]";function eM(t){return rSe&&(t instanceof ArrayBuffer||nSe(t))||iSe&&t instanceof Blob||aSe&&t instanceof File}function yx(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(yx(t[r]))return!0;return!1}if(eM(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return yx(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&yx(t[r]))return!0;return!1}function oSe(t){const e=[],r=t.data,n=t;return n.data=V8(r,e),n.attachments=e.length,{packet:n,buffers:e}}function V8(t,e){if(!t)return t;if(eM(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=V8(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=V8(t[n],e));return r}return t}function sSe(t,e){return t.data=z8(t.data,e),delete t.attachments,t}function z8(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=z8(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=z8(t[r],e));return t}const cSe=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],uSe=5;var cn;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(cn||(cn={}));let lSe=class{constructor(e){this.replacer=e}encode(e){return(e.type===cn.EVENT||e.type===cn.ACK)&&yx(e)?this.encodeAsBinary({type:e.type===cn.EVENT?cn.BINARY_EVENT:cn.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===cn.BINARY_EVENT||e.type===cn.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=oSe(e),n=this.encodeAsString(r.packet),i=r.buffers;return i.unshift(n),i}};function bz(t){return Object.prototype.toString.call(t)==="[object Object]"}let fSe=class ene extends Ni{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===cn.BINARY_EVENT;n||r.type===cn.BINARY_ACK?(r.type=n?cn.EVENT:cn.ACK,this.reconstructor=new dSe(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(eM(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(cn[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===cn.BINARY_EVENT||n.type===cn.BINARY_ACK){const a=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const o=e.substring(a,r);if(o!=Number(o)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(o)}if(e.charAt(r+1)==="/"){const a=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(a,r)}else n.nsp="/";const i=e.charAt(r+1);if(i!==""&&Number(i)==i){const a=r+1;for(;++r;){const o=e.charAt(r);if(o==null||Number(o)!=o){--r;break}if(r===e.length)break}n.id=Number(e.substring(a,r+1))}if(e.charAt(++r)){const a=this.tryParse(e.substr(r));if(ene.isPayloadValid(n.type,a))n.data=a;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case cn.CONNECT:return bz(r);case cn.DISCONNECT:return r===void 0;case cn.CONNECT_ERROR:return typeof r=="string"||bz(r);case cn.EVENT:case cn.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&cSe.indexOf(r[0])===-1);case cn.ACK:case cn.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}};class dSe{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=sSe(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const hSe=Object.freeze(Object.defineProperty({__proto__:null,Decoder:fSe,Encoder:lSe,get PacketType(){return cn},protocol:uSe},Symbol.toStringTag,{value:"Module"}));function _c(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const pSe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class tne extends Ni{constructor(e,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[_c(e,"open",this.onopen.bind(this)),_c(e,"packet",this.onpacket.bind(this)),_c(e,"error",this.onerror.bind(this)),_c(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){if(pSe.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const n={type:cn.EVENT,data:r};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const o=this.ids++,s=r.pop();this._registerAckCallback(o,s),n.id=o}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,r){var n;const i=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(i===void 0){this.acks[e]=r;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===e&&this.sendBuffer.splice(o,1);r.call(this,new Error("operation has timed out"))},i);this.acks[e]=(...o)=>{this.io.clearTimeoutFn(a),r.apply(this,[null,...o])}}emitWithAck(e,...r){const n=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,a)=>{r.push((o,s)=>n?o?a(o):i(s):i(o)),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...a)=>n!==this._queue[0]?void 0:(i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(i)):(this._queue.shift(),r&&r(null,...a)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:cn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case cn.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case cn.EVENT:case cn.BINARY_EVENT:this.onevent(e);break;case cn.ACK:case cn.BINARY_ACK:this.onack(e);break;case cn.DISCONNECT:this.ondisconnect();break;case cn.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let n=!1;return function(...i){n||(n=!0,r.packet({type:cn.ACK,id:e,data:i}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(r.apply(this,e.data),delete this.acks[e.id])}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:cn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function am(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}am.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+r:t-r}return Math.min(t,this.max)|0};am.prototype.reset=function(){this.attempts=0};am.prototype.setMin=function(t){this.ms=t};am.prototype.setMax=function(t){this.max=t};am.prototype.setJitter=function(t){this.jitter=t};let G8=class extends Ni{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,OS(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new am({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const i=r.parser||hSe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Xre(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=_c(r,"open",function(){n.onopen(),e&&e()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),e?e(s):this.maybeReconnectOnOpen()},o=_c(r,"error",a);if(this._timeout!==!1){const s=this._timeout,c=this.setTimeoutFn(()=>{i(),a(new Error("timeout")),r.close()},s);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(_c(e,"ping",this.onping.bind(this)),_c(e,"data",this.ondata.bind(this)),_c(e,"error",this.onerror.bind(this)),_c(e,"close",this.onclose.bind(this)),_c(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){Z$(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new tne(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,r){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};const cv={};function mx(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=tSe(t,e.path||"/socket.io"),n=r.source,i=r.id,a=r.path,o=cv[i]&&a in cv[i].nsps,s=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let c;return s?c=new G8(n,e):(cv[i]||(cv[i]=new G8(n,e)),c=cv[i]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(mx,{Manager:G8,Socket:tne,io:mx,connect:mx});var Tc={},uv={},lv={},fv={},dE={},dv={},hE={},hv={},zC,wz;function gSe(){if(wz)return zC;wz=1;for(var t=function(s){return s!==null&&!Array.isArray(s)&&typeof s=="object"},e={3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"},r=0;r<24;r+=1)e[112+r]="F"+(r+1);for(var n=0;n<26;n+=1){var i=n+65;e[i]=[String.fromCharCode(i+32),String.fromCharCode(i)]}var a={codes:e,getCode:function(s){return t(s)?s.keyCode||s.which||this[s.key]:this[s]},getKey:function(s){var c=t(s);if(c&&s.key)return s.key;var u=e[c?s.keyCode||s.which:s];return Array.isArray(u)&&(c?u=u[s.shiftKey?1:0]:u=u[0]),u},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};return a.Spacebar=a[" "],a.Digit0=a[0],a.Digit1=a[1],a.Digit2=a[2],a.Digit3=a[3],a.Digit4=a[4],a.Digit5=a[5],a.Digit6=a[6],a.Digit7=a[7],a.Digit8=a[8],a.Digit9=a[9],a.Tilde=a["~"],a.GraveAccent=a["`"],a.ExclamationPoint=a["!"],a.AtSign=a["@"],a.PoundSign=a["#"],a.PercentSign=a["%"],a.Caret=a["^"],a.Ampersand=a["&"],a.PlusSign=a["+"],a.MinusSign=a["-"],a.EqualsSign=a["="],a.DivisionSign=a["/"],a.MultiplicationSign=a["*"],a.Comma=a[","],a.Decimal=a["."],a.Colon=a[":"],a.Semicolon=a[";"],a.Pipe=a["|"],a.BackSlash=a["\\"],a.QuestionMark=a["?"],a.SingleQuote=a["'"],a.DoubleQuote=a['"'],a.LeftCurlyBrace=a["{"],a.RightCurlyBrace=a["}"],a.LeftParenthesis=a["("],a.RightParenthesis=a[")"],a.LeftAngleBracket=a["<"],a.RightAngleBracket=a[">"],a.LeftSquareBracket=a["["],a.RightSquareBracket=a["]"],zC=a,zC}var pE={},GC={exports:{}},On={};/**
|
|
92
|
-
* @license React
|
|
93
|
-
* react-is.production.min.js
|
|
94
|
-
*
|
|
95
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
96
|
-
*
|
|
97
|
-
* This source code is licensed under the MIT license found in the
|
|
98
|
-
* LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/var _z;function ySe(){if(_z)return On;_z=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function v(y){if(typeof y=="object"&&y!==null){var _=y.$$typeof;switch(_){case t:switch(y=y.type,y){case r:case i:case n:case u:case f:return y;default:switch(y=y&&y.$$typeof,y){case s:case o:case c:case g:case d:case a:return y;default:return _}}case e:return _}}}return On.ContextConsumer=o,On.ContextProvider=a,On.Element=t,On.ForwardRef=c,On.Fragment=r,On.Lazy=g,On.Memo=d,On.Portal=e,On.Profiler=i,On.StrictMode=n,On.Suspense=u,On.SuspenseList=f,On.isAsyncMode=function(){return!1},On.isConcurrentMode=function(){return!1},On.isContextConsumer=function(y){return v(y)===o},On.isContextProvider=function(y){return v(y)===a},On.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},On.isForwardRef=function(y){return v(y)===c},On.isFragment=function(y){return v(y)===r},On.isLazy=function(y){return v(y)===g},On.isMemo=function(y){return v(y)===d},On.isPortal=function(y){return v(y)===e},On.isProfiler=function(y){return v(y)===i},On.isStrictMode=function(y){return v(y)===n},On.isSuspense=function(y){return v(y)===u},On.isSuspenseList=function(y){return v(y)===f},On.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===i||y===n||y===u||y===f||y===m||typeof y=="object"&&y!==null&&(y.$$typeof===g||y.$$typeof===d||y.$$typeof===a||y.$$typeof===o||y.$$typeof===c||y.$$typeof===w||y.getModuleId!==void 0)},On.typeOf=v,On}var Ez;function mSe(){return Ez||(Ez=1,GC.exports=ySe()),GC.exports}var xz;function vSe(){if(xz)return pE;xz=1;var t=Ys,e=wr;pE.__esModule=!0,pE.default=i;var r=e(Be),n=t(mSe());function i(a){if(a&&(r.default.Children.only(a),n.isFragment(a)))throw new Error('An "React.Fragment" cannot be used as a `trigger`.')}return pE}var pv={},Az;function bSe(){if(Az)return pv;Az=1;var t=Ys,e=wr;pv.__esModule=!0,pv.default=void 0;var r=e(Uc()),n=e(Qs()),i=xd;e(Ln());var a=t(Be),o=v1,s=Wn(),c=function(f){(0,r.default)(d,f);function d(){for(var m,w=arguments.length,v=new Array(w),y=0;y<w;y++)v[y]=arguments[y];return m=f.call.apply(f,[this].concat(v))||this,m.handleRef=function(_){(0,i.handleRef)(m.props.innerRef,_)},m}var g=d.prototype;return g.componentDidMount=function(){(0,n.default)(this.props,"onMount",null,this.props)},g.componentWillUnmount=function(){(0,n.default)(this.props,"onUnmount",null,this.props)},g.render=function(){if(!(0,s.isBrowser)())return null;var w=this.props,v=w.children,y=w.mountNode,_=y===void 0?document.body:y;return(0,o.createPortal)(a.default.createElement(i.Ref,{innerRef:this.handleRef},v),_)},d}(a.Component);c.handledProps=["children","innerRef","mountNode","onMount","onUnmount"],c.propTypes={};var u=c;return pv.default=u,pv}var Sz;function wSe(){if(Sz)return hv;Sz=1;var t=wr;hv.__esModule=!0,hv.default=void 0;var e=t(Fn()),r=t(Uc()),n=t(Qs()),i=t(q$()),a=xd,o=t(gSe());t(Ln());var s=t(Be),c=Wn();t(vSe());var u=t(bSe()),f=function(g){(0,r.default)(m,g);function m(){for(var v,y=arguments.length,_=new Array(y),b=0;b<y;b++)_[b]=arguments[b];return v=g.call.apply(g,[this].concat(_))||this,v.contentRef=s.default.createRef(),v.triggerRef=s.default.createRef(),v.latestDocumentMouseDownEvent=null,v.handleDocumentMouseDown=function(S){v.latestDocumentMouseDownEvent=S},v.handleDocumentClick=function(S){var x=v.props.closeOnDocumentClick,I=v.latestDocumentMouseDownEvent;v.latestDocumentMouseDownEvent=null,!(!v.contentRef.current||(0,c.doesNodeContainClick)(v.triggerRef.current,S)||I&&(0,c.doesNodeContainClick)(v.contentRef.current,I)||(0,c.doesNodeContainClick)(v.contentRef.current,S))&&x&&v.close(S)},v.handleEscape=function(S){v.props.closeOnEscape&&o.default.getCode(S)===o.default.Escape&&v.close(S)},v.handlePortalMouseLeave=function(S){var x=v.props,I=x.closeOnPortalMouseLeave,E=x.mouseLeaveDelay;I&&S.target===v.contentRef.current&&(v.mouseLeaveTimer=v.closeWithTimeout(S,E))},v.handlePortalMouseEnter=function(){var S=v.props.closeOnPortalMouseLeave;S&&clearTimeout(v.mouseLeaveTimer)},v.handleTriggerBlur=function(S){for(var x=v.props,I=x.trigger,E=x.closeOnTriggerBlur,p=arguments.length,O=new Array(p>1?p-1:0),C=1;C<p;C++)O[C-1]=arguments[C];n.default.apply(void 0,[I,"props.onBlur",S].concat(O));var M=S.relatedTarget||document.activeElement,B=(0,n.default)(v.contentRef.current,"contains",M);!E||B||v.close(S)},v.handleTriggerClick=function(S){for(var x=v.props,I=x.trigger,E=x.closeOnTriggerClick,p=x.openOnTriggerClick,O=v.state.open,C=arguments.length,M=new Array(C>1?C-1:0),B=1;B<C;B++)M[B-1]=arguments[B];n.default.apply(void 0,[I,"props.onClick",S].concat(M)),O&&E?v.close(S):!O&&p&&v.open(S)},v.handleTriggerFocus=function(S){for(var x=v.props,I=x.trigger,E=x.openOnTriggerFocus,p=arguments.length,O=new Array(p>1?p-1:0),C=1;C<p;C++)O[C-1]=arguments[C];n.default.apply(void 0,[I,"props.onFocus",S].concat(O)),E&&v.open(S)},v.handleTriggerMouseLeave=function(S){clearTimeout(v.mouseEnterTimer);for(var x=v.props,I=x.trigger,E=x.closeOnTriggerMouseLeave,p=x.mouseLeaveDelay,O=arguments.length,C=new Array(O>1?O-1:0),M=1;M<O;M++)C[M-1]=arguments[M];n.default.apply(void 0,[I,"props.onMouseLeave",S].concat(C)),E&&(v.mouseLeaveTimer=v.closeWithTimeout(S,p))},v.handleTriggerMouseEnter=function(S){clearTimeout(v.mouseLeaveTimer);for(var x=v.props,I=x.trigger,E=x.mouseEnterDelay,p=x.openOnTriggerMouseEnter,O=arguments.length,C=new Array(O>1?O-1:0),M=1;M<O;M++)C[M-1]=arguments[M];n.default.apply(void 0,[I,"props.onMouseEnter",S].concat(C)),p&&(v.mouseEnterTimer=v.openWithTimeout(S,E))},v.open=function(S){(0,n.default)(v.props,"onOpen",S,(0,e.default)({},v.props,{open:!0})),v.setState({open:!0})},v.openWithTimeout=function(S,x){var I=(0,e.default)({},S);return setTimeout(function(){return v.open(I)},x||0)},v.close=function(S){v.setState({open:!1}),(0,n.default)(v.props,"onClose",S,(0,e.default)({},v.props,{open:!1}))},v.closeWithTimeout=function(S,x){var I=(0,e.default)({},S);return setTimeout(function(){return v.close(I)},x||0)},v.handleMount=function(){(0,n.default)(v.props,"onMount",null,v.props)},v.handleUnmount=function(){(0,n.default)(v.props,"onUnmount",null,v.props)},v.handleTriggerRef=function(S){v.triggerRef.current=S,(0,a.handleRef)(v.props.triggerRef,S)},v}var w=m.prototype;return w.componentWillUnmount=function(){clearTimeout(this.mouseEnterTimer),clearTimeout(this.mouseLeaveTimer)},w.render=function(){var y=this.props,_=y.children,b=y.eventPool,S=y.mountNode,x=y.trigger,I=this.state.open;return s.default.createElement(s.default.Fragment,null,I&&s.default.createElement(s.default.Fragment,null,s.default.createElement(u.default,{innerRef:this.contentRef,mountNode:S,onMount:this.handleMount,onUnmount:this.handleUnmount},_),s.default.createElement(i.default,{name:"mouseleave",on:this.handlePortalMouseLeave,pool:b,target:this.contentRef}),s.default.createElement(i.default,{name:"mouseenter",on:this.handlePortalMouseEnter,pool:b,target:this.contentRef}),s.default.createElement(i.default,{name:"mousedown",on:this.handleDocumentMouseDown,pool:b}),s.default.createElement(i.default,{name:"click",on:this.handleDocumentClick,pool:b}),s.default.createElement(i.default,{name:"keydown",on:this.handleEscape,pool:b})),x&&s.default.createElement(a.Ref,{innerRef:this.handleTriggerRef},s.default.cloneElement(x,{onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onFocus:this.handleTriggerFocus,onMouseLeave:this.handleTriggerMouseLeave,onMouseEnter:this.handleTriggerMouseEnter})))},m}(c.ModernAutoControlledComponent);f.handledProps=["children","closeOnDocumentClick","closeOnEscape","closeOnPortalMouseLeave","closeOnTriggerBlur","closeOnTriggerClick","closeOnTriggerMouseLeave","defaultOpen","eventPool","mountNode","mouseEnterDelay","mouseLeaveDelay","onClose","onMount","onOpen","onUnmount","open","openOnTriggerClick","openOnTriggerFocus","openOnTriggerMouseEnter","trigger","triggerRef"],f.propTypes={},f.defaultProps={closeOnDocumentClick:!0,closeOnEscape:!0,eventPool:"default",openOnTriggerClick:!0},f.autoControlledProps=["open"],f.Inner=u.default;var d=f;return hv.default=d,hv}var Iz;function tM(){if(Iz)return hE;Iz=1;var t=wr;hE.__esModule=!0;var e=t(wSe());return hE.default=e.default,hE}var gv={},Oz;function _Se(){if(Oz)return gv;Oz=1;var t=wr;gv.__esModule=!0,gv.default=void 0;var e=t(Fn()),r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(s){var c=s.blurring,u=s.className,f=s.children,d=s.content,g=s.dimmed,m=(0,r.default)((0,i.useKeyOnly)(c,"blurring"),(0,i.useKeyOnly)(g,"dimmed"),"dimmable",u),w=(0,i.getUnhandledProps)(a,s),v=(0,i.getElementType)(a,s);return n.default.createElement(v,(0,e.default)({},w,{className:m}),i.childrenUtils.isNil(f)?d:f)}a.handledProps=["as","blurring","children","className","content","dimmed"],a.propTypes={};var o=a;return gv.default=o,gv}var yv={},Pz;function ESe(){if(Pz)return yv;Pz=1;var t=Ys,e=wr;yv.__esModule=!0,yv.default=void 0;var r=e(Fn()),n=e(Uc()),i=e(Qs()),a=xd,o=e(ii);e(Ln());var s=t(Be),c=Wn(),u=function(f){(0,n.default)(d,f);function d(){for(var m,w=arguments.length,v=new Array(w),y=0;y<w;y++)v[y]=arguments[y];return m=f.call.apply(f,[this].concat(v))||this,m.containerRef=(0,s.createRef)(),m.contentRef=(0,s.createRef)(),m.handleClick=function(_){var b=m.contentRef.current;(0,i.default)(m.props,"onClick",_,m.props),!(b&&b!==_.target&&(0,c.doesNodeContainClick)(b,_))&&(0,i.default)(m.props,"onClickOutside",_,m.props)},m}var g=d.prototype;return g.componentDidMount=function(){var w=this.props.active;this.toggleStyles(w)},g.componentDidUpdate=function(w){var v=this.props.active,y=w.active;y!==v&&this.toggleStyles(v)},g.toggleStyles=function(w){var v=this.containerRef.current;!v||!v.style||(w?v.style.setProperty("display","flex","important"):v.style.removeProperty("display"))},g.render=function(){var w=this.props,v=w.active,y=w.children,_=w.className,b=w.content,S=w.disabled,x=w.inverted,I=w.page,E=w.simple,p=w.verticalAlign,O=(0,o.default)("ui",(0,c.useKeyOnly)(v,"active transition visible"),(0,c.useKeyOnly)(S,"disabled"),(0,c.useKeyOnly)(x,"inverted"),(0,c.useKeyOnly)(I,"page"),(0,c.useKeyOnly)(E,"simple"),(0,c.useVerticalAlignProp)(p),"dimmer",_),C=(0,c.getUnhandledProps)(d,this.props),M=(0,c.getElementType)(d,this.props),B=c.childrenUtils.isNil(y)?b:y;return s.default.createElement(a.Ref,{innerRef:this.containerRef},s.default.createElement(M,(0,r.default)({},C,{className:O,onClick:this.handleClick}),B&&s.default.createElement("div",{className:"content",ref:this.contentRef},B)))},d}(s.Component);return yv.default=u,u.handledProps=["active","as","children","className","content","disabled","inverted","onClick","onClickOutside","page","simple","verticalAlign"],u.propTypes={},yv}var Tz;function xSe(){if(Tz)return dv;Tz=1;var t=Ys,e=wr;dv.__esModule=!0,dv.default=void 0;var r=e(Fn()),n=e(Uc());e(Ln());var i=t(Be),a=Wn(),o=e(tM()),s=e(_Se()),c=e(ESe()),u=function(f){(0,n.default)(d,f);function d(){for(var m,w=arguments.length,v=new Array(w),y=0;y<w;y++)v[y]=arguments[y];return m=f.call.apply(f,[this].concat(v))||this,m.handlePortalMount=function(){(0,a.isBrowser)()&&(document.body.classList.add("dimmed"),document.body.classList.add("dimmable"))},m.handlePortalUnmount=function(){(0,a.isBrowser)()&&(document.body.classList.remove("dimmed"),document.body.classList.remove("dimmable"))},m}var g=d.prototype;return g.render=function(){var w=this.props,v=w.active,y=w.page,_=(0,a.getUnhandledProps)(d,this.props);return y?i.default.createElement(o.default,{closeOnEscape:!1,closeOnDocumentClick:!1,onMount:this.handlePortalMount,onUnmount:this.handlePortalUnmount,open:v,openOnTriggerClick:!1},i.default.createElement(c.default,(0,r.default)({},_,{active:v,page:y}))):i.default.createElement(c.default,(0,r.default)({},_,{active:v,page:y}))},d}(i.Component);return dv.default=u,u.handledProps=["active","page"],u.propTypes={},u.Dimmable=s.default,u.Inner=c.default,u.create=(0,a.createShorthandFactory)(u,function(f){return{content:f}}),dv}var Rz;function ASe(){if(Rz)return dE;Rz=1;var t=wr;dE.__esModule=!0;var e=t(xSe());return dE.default=e.default,dE}var mv={},Cz;function SSe(){if(Cz)return mv;Cz=1;var t=wr;mv.__esModule=!0,mv.default=void 0;var e=t(Fn()),r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(s){var c=s.children,u=s.className,f=s.content,d=s.size,g=(0,r.default)("ui",d,u,"images"),m=(0,i.getUnhandledProps)(a,s),w=(0,i.getElementType)(a,s);return n.default.createElement(w,(0,e.default)({},m,{className:g}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content","size"],a.propTypes={};var o=a;return mv.default=o,mv}var Nz;function ISe(){if(Nz)return fv;Nz=1;var t=wr;fv.__esModule=!0,fv.default=void 0;var e=t(Fn()),r=t(Vl()),n=t(ii);t(Ln());var i=t(Be),a=Wn(),o=t(ASe()),s=t(rne()),c=t(SSe());function u(d){var g=d.avatar,m=d.bordered,w=d.centered,v=d.children,y=d.circular,_=d.className,b=d.content,S=d.dimmer,x=d.disabled,I=d.floated,E=d.fluid,p=d.hidden,O=d.href,C=d.inline,M=d.label,B=d.rounded,ce=d.size,he=d.spaced,F=d.verticalAlign,U=d.wrapped,K=d.ui,ne=(0,n.default)((0,a.useKeyOnly)(K,"ui"),ce,(0,a.useKeyOnly)(g,"avatar"),(0,a.useKeyOnly)(m,"bordered"),(0,a.useKeyOnly)(y,"circular"),(0,a.useKeyOnly)(w,"centered"),(0,a.useKeyOnly)(x,"disabled"),(0,a.useKeyOnly)(E,"fluid"),(0,a.useKeyOnly)(p,"hidden"),(0,a.useKeyOnly)(C,"inline"),(0,a.useKeyOnly)(B,"rounded"),(0,a.useKeyOrValueAndKey)(he,"spaced"),(0,a.useValueAndKey)(I,"floated"),(0,a.useVerticalAlignProp)(F,"aligned"),"image",_),j=(0,a.getUnhandledProps)(u,d),q=(0,a.partitionHTMLProps)(j,{htmlProps:a.htmlImageProps}),V=q[0],$=q[1],H=(0,a.getElementType)(u,d,function(){if(!(0,r.default)(S)||!(0,r.default)(M)||!(0,r.default)(U)||!a.childrenUtils.isNil(v))return"div"});return a.childrenUtils.isNil(v)?a.childrenUtils.isNil(b)?H==="img"?i.default.createElement(H,(0,e.default)({},$,V,{className:ne})):i.default.createElement(H,(0,e.default)({},$,{className:ne,href:O}),o.default.create(S,{autoGenerateKey:!1}),s.default.create(M,{autoGenerateKey:!1}),i.default.createElement("img",V)):i.default.createElement(H,(0,e.default)({},j,{className:ne}),b):i.default.createElement(H,(0,e.default)({},j,{className:ne}),v)}u.handledProps=["as","avatar","bordered","centered","children","circular","className","content","dimmer","disabled","floated","fluid","hidden","href","inline","label","rounded","size","spaced","ui","verticalAlign","wrapped"],u.Group=c.default,u.propTypes={},u.defaultProps={as:"img",ui:!0},u.create=(0,a.createShorthandFactory)(u,function(d){return{src:d}});var f=u;return fv.default=f,fv}var vv={},Dz;function OSe(){if(Dz)return vv;Dz=1;var t=wr;vv.__esModule=!0,vv.default=void 0;var e=t(Fn()),r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(s){var c=s.children,u=s.className,f=s.content,d=(0,r.default)("detail",u),g=(0,i.getUnhandledProps)(a,s),m=(0,i.getElementType)(a,s);return n.default.createElement(m,(0,e.default)({},g,{className:d}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content"],a.propTypes={},a.create=(0,i.createShorthandFactory)(a,function(s){return{content:s}});var o=a;return vv.default=o,vv}var bv={},$z;function PSe(){if($z)return bv;$z=1;var t=wr;bv.__esModule=!0,bv.default=void 0;var e=t(Fn()),r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(s){var c=s.children,u=s.circular,f=s.className,d=s.color,g=s.content,m=s.size,w=s.tag,v=(0,r.default)("ui",d,m,(0,i.useKeyOnly)(u,"circular"),(0,i.useKeyOnly)(w,"tag"),"labels",f),y=(0,i.getUnhandledProps)(a,s),_=(0,i.getElementType)(a,s);return n.default.createElement(_,(0,e.default)({},y,{className:v}),i.childrenUtils.isNil(c)?g:c)}a.handledProps=["as","children","circular","className","color","content","size","tag"],a.propTypes={};var o=a;return bv.default=o,bv}var Mz;function rne(){if(Mz)return lv;Mz=1;var t=Ys,e=wr;lv.__esModule=!0,lv.default=void 0;var r=e(Fn()),n=e(Uc()),i=e(D$()),a=e(Qs()),o=e(ii);e(Ln());var s=t(Be),c=Wn(),u=e(rm),f=e(ISe()),d=e(OSe()),g=e(PSe()),m=function(w){(0,n.default)(v,w);function v(){for(var _,b=arguments.length,S=new Array(b),x=0;x<b;x++)S[x]=arguments[x];return _=w.call.apply(w,[this].concat(S))||this,_.handleClick=function(I){var E=_.props.onClick;E&&E(I,_.props)},_.handleIconOverrides=function(I){return{onClick:function(p){(0,a.default)(I,"onClick",p),(0,a.default)(_.props,"onRemove",p,_.props)}}},_}var y=v.prototype;return y.render=function(){var b=this.props,S=b.active,x=b.attached,I=b.basic,E=b.children,p=b.circular,O=b.className,C=b.color,M=b.content,B=b.corner,ce=b.detail,he=b.empty,F=b.floating,U=b.horizontal,K=b.icon,ne=b.image,j=b.onRemove,q=b.pointing,V=b.prompt,$=b.removeIcon,H=b.ribbon,L=b.size,k=b.tag,G=q===!0&&"pointing"||(q==="left"||q==="right")&&q+" pointing"||(q==="above"||q==="below")&&"pointing "+q,ge=(0,o.default)("ui",C,G,L,(0,c.useKeyOnly)(S,"active"),(0,c.useKeyOnly)(I,"basic"),(0,c.useKeyOnly)(p,"circular"),(0,c.useKeyOnly)(he,"empty"),(0,c.useKeyOnly)(F,"floating"),(0,c.useKeyOnly)(U,"horizontal"),(0,c.useKeyOnly)(ne===!0,"image"),(0,c.useKeyOnly)(V,"prompt"),(0,c.useKeyOnly)(k,"tag"),(0,c.useKeyOrValueAndKey)(B,"corner"),(0,c.useKeyOrValueAndKey)(H,"ribbon"),(0,c.useValueAndKey)(x,"attached"),"label",O),Q=(0,c.getUnhandledProps)(v,this.props),te=(0,c.getElementType)(v,this.props);if(!c.childrenUtils.isNil(E))return s.default.createElement(te,(0,r.default)({},Q,{className:ge,onClick:this.handleClick}),E);var ue=(0,i.default)($)?"delete":$;return s.default.createElement(te,(0,r.default)({className:ge,onClick:this.handleClick},Q),u.default.create(K,{autoGenerateKey:!1}),typeof ne!="boolean"&&f.default.create(ne,{autoGenerateKey:!1}),M,d.default.create(ce,{autoGenerateKey:!1}),j&&u.default.create(ue,{autoGenerateKey:!1,overrideProps:this.handleIconOverrides}))},v}(s.Component);return lv.default=m,m.handledProps=["active","as","attached","basic","children","circular","className","color","content","corner","detail","empty","floating","horizontal","icon","image","onClick","onRemove","pointing","prompt","removeIcon","ribbon","size","tag"],m.propTypes={},m.Detail=d.default,m.Group=g.default,m.create=(0,c.createShorthandFactory)(m,function(w){return{content:w}}),lv}var wv={},kz;function TSe(){if(kz)return wv;kz=1;var t=wr;wv.__esModule=!0,wv.default=void 0;var e=t(Fn()),r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(s){var c=s.children,u=s.className,f=s.content,d=s.hidden,g=s.visible,m=(0,r.default)((0,i.useKeyOnly)(g,"visible"),(0,i.useKeyOnly)(d,"hidden"),"content",u),w=(0,i.getUnhandledProps)(a,s),v=(0,i.getElementType)(a,s);return n.default.createElement(v,(0,e.default)({},w,{className:m}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content","hidden","visible"],a.propTypes={};var o=a;return wv.default=o,wv}var _v={},Lz;function RSe(){if(Lz)return _v;Lz=1;var t=wr;_v.__esModule=!0,_v.default=void 0;var e=t(Fn()),r=t(yS()),n=t(Vl()),i=t(ii);t(Ln());var a=t(Be),o=Wn(),s=t(rM());function c(f){var d=f.attached,g=f.basic,m=f.buttons,w=f.children,v=f.className,y=f.color,_=f.compact,b=f.content,S=f.floated,x=f.fluid,I=f.icon,E=f.inverted,p=f.labeled,O=f.negative,C=f.positive,M=f.primary,B=f.secondary,ce=f.size,he=f.toggle,F=f.vertical,U=f.widths,K=(0,i.default)("ui",y,ce,(0,o.useKeyOnly)(g,"basic"),(0,o.useKeyOnly)(_,"compact"),(0,o.useKeyOnly)(x,"fluid"),(0,o.useKeyOnly)(I,"icon"),(0,o.useKeyOnly)(E,"inverted"),(0,o.useKeyOnly)(p,"labeled"),(0,o.useKeyOnly)(O,"negative"),(0,o.useKeyOnly)(C,"positive"),(0,o.useKeyOnly)(M,"primary"),(0,o.useKeyOnly)(B,"secondary"),(0,o.useKeyOnly)(he,"toggle"),(0,o.useKeyOnly)(F,"vertical"),(0,o.useKeyOrValueAndKey)(d,"attached"),(0,o.useValueAndKey)(S,"floated"),(0,o.useWidthProp)(U),"buttons",v),ne=(0,o.getUnhandledProps)(c,f),j=(0,o.getElementType)(c,f);return(0,n.default)(m)?a.default.createElement(j,(0,e.default)({},ne,{className:K}),o.childrenUtils.isNil(w)?b:w):a.default.createElement(j,(0,e.default)({},ne,{className:K}),(0,r.default)(m,function(q){return s.default.create(q)}))}c.handledProps=["as","attached","basic","buttons","children","className","color","compact","content","floated","fluid","icon","inverted","labeled","negative","positive","primary","secondary","size","toggle","vertical","widths"],c.propTypes={};var u=c;return _v.default=u,_v}var Ev={},Uz;function CSe(){if(Uz)return Ev;Uz=1;var t=wr;Ev.__esModule=!0,Ev.default=void 0;var e=t(Fn()),r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(s){var c=s.className,u=s.text,f=(0,r.default)("or",c),d=(0,i.getUnhandledProps)(a,s),g=(0,i.getElementType)(a,s);return n.default.createElement(g,(0,e.default)({},d,{className:f,"data-text":u}))}a.handledProps=["as","className","text"],a.propTypes={};var o=a;return Ev.default=o,Ev}var Bz;function rM(){if(Bz)return uv;Bz=1;var t=Ys,e=wr;uv.__esModule=!0,uv.default=void 0;var r=e(Fn()),n=e(Uc()),i=e(Qs()),a=e(Vl()),o=xd,s=e(ii);e(Ln());var c=t(Be),u=Wn(),f=e(rm),d=e(rne()),g=e(TSe()),m=e(RSe()),w=e(CSe()),v=function(_){(0,n.default)(b,_);function b(){for(var x,I=arguments.length,E=new Array(I),p=0;p<I;p++)E[p]=arguments[p];return x=_.call.apply(_,[this].concat(E))||this,x.ref=(0,c.createRef)(),x.computeElementType=function(){var O=x.props,C=O.attached,M=O.label;if(!(0,a.default)(C)||!(0,a.default)(M))return"div"},x.computeTabIndex=function(O){var C=x.props,M=C.disabled,B=C.tabIndex;if(!(0,a.default)(B))return B;if(M)return-1;if(O==="div")return 0},x.focus=function(O){return(0,i.default)(x.ref.current,"focus",O)},x.handleClick=function(O){var C=x.props.disabled;if(C){O.preventDefault();return}(0,i.default)(x.props,"onClick",O,x.props)},x.hasIconClass=function(){var O=x.props,C=O.labelPosition,M=O.children,B=O.content,ce=O.icon;return ce===!0?!0:ce&&(C||u.childrenUtils.isNil(M)&&(0,a.default)(B))},x}var S=b.prototype;return S.computeButtonAriaRole=function(I){var E=this.props.role;if(!(0,a.default)(E))return E;if(I!=="button")return"button"},S.render=function(){var I=this.props,E=I.active,p=I.animated,O=I.attached,C=I.basic,M=I.children,B=I.circular,ce=I.className,he=I.color,F=I.compact,U=I.content,K=I.disabled,ne=I.floated,j=I.fluid,q=I.icon,V=I.inverted,$=I.label,H=I.labelPosition,L=I.loading,k=I.negative,G=I.positive,ge=I.primary,Q=I.secondary,te=I.size,ue=I.toggle,T=I.type,fe=(0,s.default)(he,te,(0,u.useKeyOnly)(E,"active"),(0,u.useKeyOnly)(C,"basic"),(0,u.useKeyOnly)(B,"circular"),(0,u.useKeyOnly)(F,"compact"),(0,u.useKeyOnly)(j,"fluid"),(0,u.useKeyOnly)(this.hasIconClass(),"icon"),(0,u.useKeyOnly)(V,"inverted"),(0,u.useKeyOnly)(L,"loading"),(0,u.useKeyOnly)(k,"negative"),(0,u.useKeyOnly)(G,"positive"),(0,u.useKeyOnly)(ge,"primary"),(0,u.useKeyOnly)(Q,"secondary"),(0,u.useKeyOnly)(ue,"toggle"),(0,u.useKeyOrValueAndKey)(p,"animated"),(0,u.useKeyOrValueAndKey)(O,"attached")),Ge=(0,s.default)((0,u.useKeyOrValueAndKey)(H||!!$,"labeled")),tt=(0,s.default)((0,u.useKeyOnly)(K,"disabled"),(0,u.useValueAndKey)(ne,"floated")),mt=(0,u.getUnhandledProps)(b,this.props),vt=(0,u.getElementType)(b,this.props,this.computeElementType),gt=this.computeTabIndex(vt);if(!(0,a.default)($)){var Lt=(0,s.default)("ui",fe,"button",ce),Yt=(0,s.default)("ui",Ge,"button",ce,tt),_r=d.default.create($,{defaultProps:{basic:!0,pointing:H==="left"?"right":"left"},autoGenerateKey:!1});return c.default.createElement(vt,(0,r.default)({},mt,{className:Yt,onClick:this.handleClick}),H==="left"&&_r,c.default.createElement(o.Ref,{innerRef:this.ref},c.default.createElement("button",{className:Lt,"aria-pressed":ue?!!E:void 0,disabled:K,type:T,tabIndex:gt},f.default.create(q,{autoGenerateKey:!1})," ",U)),(H==="right"||!H)&&_r)}var Rt=(0,s.default)("ui",fe,tt,Ge,"button",ce),Pt=!u.childrenUtils.isNil(M),kt=this.computeButtonAriaRole(vt);return c.default.createElement(o.Ref,{innerRef:this.ref},c.default.createElement(vt,(0,r.default)({},mt,{className:Rt,"aria-pressed":ue?!!E:void 0,disabled:K&&vt==="button"||void 0,onClick:this.handleClick,role:kt,type:T,tabIndex:gt}),Pt&&M,!Pt&&f.default.create(q,{autoGenerateKey:!1}),!Pt&&U))},b}(c.Component);v.handledProps=["active","animated","as","attached","basic","children","circular","className","color","compact","content","disabled","floated","fluid","icon","inverted","label","labelPosition","loading","negative","onClick","positive","primary","role","secondary","size","tabIndex","toggle","type"],v.propTypes={},v.defaultProps={as:"button"},v.Content=g.default,v.Group=m.default,v.Or=w.default,v.create=(0,u.createShorthandFactory)(v,function(_){return{content:_}});var y=v;return uv.default=y,uv}(function(t){var e=Ne&&Ne.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0;var r=rM();Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return e(r).default}})})(Tc);var nM={},NS={},DS=wr;NS.__esModule=!0;NS.default=void 0;var NSe=DS(Fn()),DSe=DS(ii);DS(Ln());var $Se=DS(Be),Hu=Wn();function C1(t){var e=t.active,r=t.children,n=t.className,i=t.content,a=t.disabled,o=t.indeterminate,s=t.inline,c=t.inverted,u=t.size,f=(0,DSe.default)("ui",u,(0,Hu.useKeyOnly)(e,"active"),(0,Hu.useKeyOnly)(a,"disabled"),(0,Hu.useKeyOnly)(o,"indeterminate"),(0,Hu.useKeyOnly)(c,"inverted"),(0,Hu.useKeyOnly)(r||i,"text"),(0,Hu.useKeyOrValueAndKey)(s,"inline"),"loader",n),d=(0,Hu.getUnhandledProps)(C1,t),g=(0,Hu.getElementType)(C1,t);return $Se.default.createElement(g,(0,NSe.default)({},d,{className:f}),Hu.childrenUtils.isNil(r)?i:r)}C1.handledProps=["active","as","children","className","content","disabled","indeterminate","inline","inverted","size"];C1.propTypes={};var MSe=C1;NS.default=MSe;var kSe=Ne&&Ne.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),W8=Ne&&Ne.__assign||function(){return W8=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},W8.apply(this,arguments)},LSe=Ne&&Ne.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),USe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),BSe=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&LSe(e,t,r);return USe(e,t),e},FSe=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nM,"__esModule",{value:!0});var $S=nM.Loader=void 0,Fz=BSe(Be),jSe=FSe(NS),qSe=function(t){kSe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getClassName=function(){return[this.props.className||"",this.props.provider||""].join(" ").trim()},e.prototype.render=function(){return Fz.createElement(jSe.default,W8({"aria-live":"polite","aria-label":"Loading",role:"status"},this.props,{className:this.getClassName()}))},e}(Fz.PureComponent);$S=nM.Loader=qSe;var iM={},jz=Object.prototype.toString,nne=function(e){var r=jz.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&jz.call(e.callee)==="[object Function]"),n},WC,qz;function HSe(){if(qz)return WC;qz=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=nne,i=Object.prototype.propertyIsEnumerable,a=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(g){var m=g.constructor;return m&&m.prototype===g},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if(typeof window>"u")return!1;for(var g in window)try{if(!u["$"+g]&&e.call(window,g)&&window[g]!==null&&typeof window[g]=="object")try{c(window[g])}catch{return!0}}catch{return!0}return!1}(),d=function(g){if(typeof window>"u"||!f)return c(g);try{return c(g)}catch{return!1}};t=function(m){var w=m!==null&&typeof m=="object",v=r.call(m)==="[object Function]",y=n(m),_=w&&r.call(m)==="[object String]",b=[];if(!w&&!v&&!y)throw new TypeError("Object.keys called on a non-object");var S=o&&v;if(_&&m.length>0&&!e.call(m,0))for(var x=0;x<m.length;++x)b.push(String(x));if(y&&m.length>0)for(var I=0;I<m.length;++I)b.push(String(I));else for(var E in m)!(S&&E==="prototype")&&e.call(m,E)&&b.push(String(E));if(a)for(var p=d(m),O=0;O<s.length;++O)!(p&&s[O]==="constructor")&&e.call(m,s[O])&&b.push(s[O]);return b}}return WC=t,WC}var VSe=Array.prototype.slice,zSe=nne,Hz=Object.keys,vx=Hz?function(e){return Hz(e)}:HSe(),Vz=Object.keys;vx.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return zSe(n)?Vz(VSe.call(n)):Vz(n)})}else Object.keys=vx;return Object.keys||vx};var aM=vx,MS=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0},zz=typeof Symbol<"u"&&Symbol,GSe=MS,oM=function(){return typeof zz!="function"||typeof Symbol!="function"||typeof zz("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:GSe()},Gz={foo:{}},WSe=Object,KSe=function(){return{__proto__:Gz}.foo===Gz.foo&&!({__proto__:null}instanceof WSe)},YSe="Function.prototype.bind called on incompatible ",QSe=Object.prototype.toString,JSe=Math.max,XSe="[object Function]",Wz=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var a=0;a<r.length;a+=1)n[a+e.length]=r[a];return n},ZSe=function(e,r){for(var n=[],i=r||0,a=0;i<e.length;i+=1,a+=1)n[a]=e[i];return n},eIe=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},tIe=function(e){var r=this;if(typeof r!="function"||QSe.apply(r)!==XSe)throw new TypeError(YSe+r);for(var n=ZSe(arguments,1),i,a=function(){if(this instanceof i){var f=r.apply(this,Wz(n,arguments));return Object(f)===f?f:this}return r.apply(e,Wz(n,arguments))},o=JSe(0,r.length-n.length),s=[],c=0;c<o;c++)s[c]="$"+c;if(i=Function("binder","return function ("+eIe(s,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var u=function(){};u.prototype=r.prototype,i.prototype=new u,u.prototype=null}return i},rIe=tIe,sM=Function.prototype.bind||rIe,nIe=Function.prototype.call,iIe=Object.prototype.hasOwnProperty,aIe=sM,ine=aIe.call(nIe,iIe),nn,Ty=SyntaxError,ane=Function,gg=TypeError,KC=function(t){try{return ane('"use strict"; return ('+t+").constructor;")()}catch{}},ep=Object.getOwnPropertyDescriptor;if(ep)try{ep({},"")}catch{ep=null}var YC=function(){throw new gg},oIe=ep?function(){try{return arguments.callee,YC}catch{try{return ep(arguments,"callee").get}catch{return YC}}}():YC,p0=oM(),sIe=KSe(),Yi=Object.getPrototypeOf||(sIe?function(t){return t.__proto__}:null),N0={},cIe=typeof Uint8Array>"u"||!Yi?nn:Yi(Uint8Array),tp={"%AggregateError%":typeof AggregateError>"u"?nn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?nn:ArrayBuffer,"%ArrayIteratorPrototype%":p0&&Yi?Yi([][Symbol.iterator]()):nn,"%AsyncFromSyncIteratorPrototype%":nn,"%AsyncFunction%":N0,"%AsyncGenerator%":N0,"%AsyncGeneratorFunction%":N0,"%AsyncIteratorPrototype%":N0,"%Atomics%":typeof Atomics>"u"?nn:Atomics,"%BigInt%":typeof BigInt>"u"?nn:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?nn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?nn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?nn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?nn:Float32Array,"%Float64Array%":typeof Float64Array>"u"?nn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?nn:FinalizationRegistry,"%Function%":ane,"%GeneratorFunction%":N0,"%Int8Array%":typeof Int8Array>"u"?nn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?nn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?nn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p0&&Yi?Yi(Yi([][Symbol.iterator]())):nn,"%JSON%":typeof JSON=="object"?JSON:nn,"%Map%":typeof Map>"u"?nn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!p0||!Yi?nn:Yi(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?nn:Promise,"%Proxy%":typeof Proxy>"u"?nn:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?nn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?nn:Set,"%SetIteratorPrototype%":typeof Set>"u"||!p0||!Yi?nn:Yi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?nn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p0&&Yi?Yi(""[Symbol.iterator]()):nn,"%Symbol%":p0?Symbol:nn,"%SyntaxError%":Ty,"%ThrowTypeError%":oIe,"%TypedArray%":cIe,"%TypeError%":gg,"%Uint8Array%":typeof Uint8Array>"u"?nn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?nn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?nn:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?nn:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?nn:WeakMap,"%WeakRef%":typeof WeakRef>"u"?nn:WeakRef,"%WeakSet%":typeof WeakSet>"u"?nn:WeakSet};if(Yi)try{null.error}catch(t){var uIe=Yi(Yi(t));tp["%Error.prototype%"]=uIe}var lIe=function t(e){var r;if(e==="%AsyncFunction%")r=KC("async function () {}");else if(e==="%GeneratorFunction%")r=KC("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=KC("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Yi&&(r=Yi(i.prototype))}return tp[e]=r,r},Kz={"%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"]},Cw=sM,PA=ine,fIe=Cw.call(Function.call,Array.prototype.concat),dIe=Cw.call(Function.apply,Array.prototype.splice),Yz=Cw.call(Function.call,String.prototype.replace),TA=Cw.call(Function.call,String.prototype.slice),hIe=Cw.call(Function.call,RegExp.prototype.exec),pIe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,gIe=/\\(\\)?/g,yIe=function(e){var r=TA(e,0,1),n=TA(e,-1);if(r==="%"&&n!=="%")throw new Ty("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ty("invalid intrinsic syntax, expected opening `%`");var i=[];return Yz(e,pIe,function(a,o,s,c){i[i.length]=s?Yz(c,gIe,"$1"):o||a}),i},mIe=function(e,r){var n=e,i;if(PA(Kz,n)&&(i=Kz[n],n="%"+i[0]+"%"),PA(tp,n)){var a=tp[n];if(a===N0&&(a=lIe(n)),typeof a>"u"&&!r)throw new gg("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Ty("intrinsic "+e+" does not exist!")},Js=function(e,r){if(typeof e!="string"||e.length===0)throw new gg("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new gg('"allowMissing" argument must be a boolean');if(hIe(/^%?[^%]*%?$/,e)===null)throw new Ty("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=yIe(e),i=n.length>0?n[0]:"",a=mIe("%"+i+"%",r),o=a.name,s=a.value,c=!1,u=a.alias;u&&(i=u[0],dIe(n,fIe([0,1],u)));for(var f=1,d=!0;f<n.length;f+=1){var g=n[f],m=TA(g,0,1),w=TA(g,-1);if((m==='"'||m==="'"||m==="`"||w==='"'||w==="'"||w==="`")&&m!==w)throw new Ty("property names with quotes must have matching quotes");if((g==="constructor"||!d)&&(c=!0),i+="."+g,o="%"+i+"%",PA(tp,o))s=tp[o];else if(s!=null){if(!(g in s)){if(!r)throw new gg("base intrinsic for "+e+" exists, but the property is not available.");return}if(ep&&f+1>=n.length){var v=ep(s,g);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[g]}else d=PA(s,g),s=s[g];d&&!c&&(tp[o]=s)}}return s},vIe=Js,K8=vIe("%Object.defineProperty%",!0),Y8=function(){if(K8)try{return K8({},"a",{value:1}),!0}catch{return!1}return!1};Y8.hasArrayLengthDefineBug=function(){if(!Y8())return null;try{return K8([],"length",{value:1}).length!==1}catch{return!0}};var kS=Y8,bIe=Js,bx=bIe("%Object.getOwnPropertyDescriptor%",!0);if(bx)try{bx([],"length")}catch{bx=null}var cM=bx,wIe=kS(),uM=Js,Hb=wIe&&uM("%Object.defineProperty%",!0);if(Hb)try{Hb({},"a",{value:1})}catch{Hb=!1}var _Ie=uM("%SyntaxError%"),g0=uM("%TypeError%"),Qz=cM,lM=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new g0("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new g0("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new g0("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new g0("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new g0("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new g0("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!Qz&&Qz(e,r);if(Hb)Hb(e,r,{configurable:o===null&&c?c.configurable:!o,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:a===null&&c?c.writable:!a});else if(s||!i&&!a&&!o)e[r]=n;else throw new _Ie("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},EIe=aM,xIe=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",AIe=Object.prototype.toString,SIe=Array.prototype.concat,Jz=lM,IIe=function(t){return typeof t=="function"&&AIe.call(t)==="[object Function]"},one=kS(),OIe=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!IIe(n)||!n())return}one?Jz(t,e,r,!0):Jz(t,e,r)},sne=function(t,e){var r=arguments.length>2?arguments[2]:{},n=EIe(e);xIe&&(n=SIe.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)OIe(t,n[i],e[n[i]],r[n[i]])};sne.supportsDescriptors=!!one;var Op=sne,cne={exports:{}},une=Js,Xz=lM,PIe=kS(),Zz=cM,eG=une("%TypeError%"),TIe=une("%Math.floor%"),RIe=function(e,r){if(typeof e!="function")throw new eG("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||TIe(r)!==r)throw new eG("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in e&&Zz){var o=Zz(e,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(PIe?Xz(e,"length",r,!0,!0):Xz(e,"length",r)),e};(function(t){var e=sM,r=Js,n=RIe,i=r("%TypeError%"),a=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||e.call(o,a),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch{c=null}t.exports=function(g){if(typeof g!="function")throw new i("a function is required");var m=s(e,o,arguments);return n(m,1+u(0,g.length-(arguments.length-1)),!0)};var f=function(){return s(e,a,arguments)};c?c(t.exports,"apply",{value:f}):t.exports.apply=f})(cne);var om=cne.exports,lne=Js,fne=om,CIe=fne(lne("String.prototype.indexOf")),Xs=function(e,r){var n=lne(e,!!r);return typeof n=="function"&&CIe(e,".prototype.")>-1?fne(n):n},NIe=aM,dne=MS(),hne=Xs,tG=Object,DIe=hne("Array.prototype.push"),rG=hne("Object.prototype.propertyIsEnumerable"),$Ie=dne?Object.getOwnPropertySymbols:null,pne=function(e,r){if(e==null)throw new TypeError("target must be an object");var n=tG(e);if(arguments.length===1)return n;for(var i=1;i<arguments.length;++i){var a=tG(arguments[i]),o=NIe(a),s=dne&&(Object.getOwnPropertySymbols||$Ie);if(s)for(var c=s(a),u=0;u<c.length;++u){var f=c[u];rG(a,f)&&DIe(o,f)}for(var d=0;d<o.length;++d){var g=o[d];if(rG(a,g)){var m=a[g];n[g]=m}}}return n},QC=pne,MIe=function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n<e.length;++n)r[e[n]]=e[n];var i=Object.assign({},r),a="";for(var o in i)a+=o;return t!==a},kIe=function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch{return t[1]==="y"}return!1},gne=function(){return!Object.assign||MIe()||kIe()?QC:Object.assign},LIe=Op,UIe=gne,BIe=function(){var e=UIe();return LIe(Object,{assign:e},{assign:function(){return Object.assign!==e}}),e},FIe=Op,jIe=om,qIe=pne,yne=gne,HIe=BIe,VIe=jIe.apply(yne()),mne=function(e,r){return VIe(Object,arguments)};FIe(mne,{getPolyfill:yne,implementation:qIe,shim:HIe});var zIe=mne,N1=function(){return typeof(function(){}).name=="string"},Vb=Object.getOwnPropertyDescriptor;if(Vb)try{Vb([],"length")}catch{Vb=null}N1.functionsHaveConfigurableNames=function(){if(!N1()||!Vb)return!1;var e=Vb(function(){},"name");return!!e&&!!e.configurable};var GIe=Function.prototype.bind;N1.boundFunctionsHaveNames=function(){return N1()&&typeof GIe=="function"&&(function(){}).bind().name!==""};var WIe=N1,nG=lM,KIe=kS(),YIe=WIe.functionsHaveConfigurableNames(),QIe=TypeError,JIe=function(e,r){if(typeof e!="function")throw new QIe("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||YIe)&&(KIe?nG(e,"name",r,!0,!0):nG(e,"name",r)),e},XIe=JIe,ZIe=Object,eOe=TypeError,vne=XIe(function(){if(this!=null&&this!==ZIe(this))throw new eOe("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},"get flags",!0),tOe=vne,rOe=Op.supportsDescriptors,nOe=Object.getOwnPropertyDescriptor,bne=function(){if(rOe&&/a/mig.flags==="gim"){var e=nOe(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),r==="dy")return e.get}}return tOe},iOe=Op.supportsDescriptors,aOe=bne,oOe=Object.getOwnPropertyDescriptor,sOe=Object.defineProperty,cOe=TypeError,iG=Object.getPrototypeOf,uOe=/a/,lOe=function(){if(!iOe||!iG)throw new cOe("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=aOe(),r=iG(uOe),n=oOe(r,"flags");return(!n||n.get!==e)&&sOe(r,"flags",{configurable:!0,enumerable:!1,get:e}),e},fOe=Op,dOe=om,hOe=vne,wne=bne,pOe=lOe,_ne=dOe(wne());fOe(_ne,{getPolyfill:wne,implementation:hOe,shim:pOe});var gOe=_ne;function Ene(){throw new Error("setTimeout has not been defined")}function xne(){throw new Error("clearTimeout has not been defined")}var vf=Ene,bf=xne;typeof bn.setTimeout=="function"&&(vf=setTimeout);typeof bn.clearTimeout=="function"&&(bf=clearTimeout);function Ane(t){if(vf===setTimeout)return setTimeout(t,0);if((vf===Ene||!vf)&&setTimeout)return vf=setTimeout,setTimeout(t,0);try{return vf(t,0)}catch{try{return vf.call(null,t,0)}catch{return vf.call(this,t,0)}}}function yOe(t){if(bf===clearTimeout)return clearTimeout(t);if((bf===xne||!bf)&&clearTimeout)return bf=clearTimeout,clearTimeout(t);try{return bf(t)}catch{try{return bf.call(null,t)}catch{return bf.call(this,t)}}}var Al=[],yg=!1,Ih,wx=-1;function mOe(){!yg||!Ih||(yg=!1,Ih.length?Al=Ih.concat(Al):wx=-1,Al.length&&Sne())}function Sne(){if(!yg){var t=Ane(mOe);yg=!0;for(var e=Al.length;e;){for(Ih=Al,Al=[];++wx<e;)Ih&&Ih[wx].run();wx=-1,e=Al.length}Ih=null,yg=!1,yOe(t)}}function vOe(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];Al.push(new Ine(t,e)),Al.length===1&&!yg&&Ane(Sne)}function Ine(t,e){this.fun=t,this.array=e}Ine.prototype.run=function(){this.fun.apply(null,this.array)};var bOe="browser",wOe="browser",_Oe=!0,EOe={},xOe=[],AOe="",SOe={},IOe={},OOe={};function Pp(){}var POe=Pp,TOe=Pp,ROe=Pp,COe=Pp,NOe=Pp,DOe=Pp,$Oe=Pp;function MOe(t){throw new Error("process.binding is not supported")}function kOe(){return"/"}function LOe(t){throw new Error("process.chdir is not supported")}function UOe(){return 0}var D0=bn.performance||{},BOe=D0.now||D0.mozNow||D0.msNow||D0.oNow||D0.webkitNow||function(){return new Date().getTime()};function FOe(t){var e=BOe.call(D0)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}var jOe=new Date;function qOe(){var t=new Date,e=t-jOe;return e/1e3}var Va={nextTick:vOe,title:bOe,browser:_Oe,env:EOe,argv:xOe,version:AOe,versions:SOe,on:POe,addListener:TOe,once:ROe,off:COe,removeListener:NOe,removeAllListeners:DOe,emit:$Oe,binding:MOe,cwd:kOe,chdir:LOe,umask:UOe,hrtime:FOe,platform:wOe,release:IOe,config:OOe,uptime:qOe},_x={exports:{}},HOe=MS,Tp=function(){return HOe()&&!!Symbol.toStringTag},VOe=Tp(),zOe=Xs,Q8=zOe("Object.prototype.toString"),LS=function(e){return VOe&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Q8(e)==="[object Arguments]"},One=function(e){return LS(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Q8(e)!=="[object Array]"&&Q8(e.callee)==="[object Function]"},GOe=function(){return LS(arguments)}();LS.isLegacyArguments=One;var Pne=GOe?LS:One;const WOe={},KOe=Object.freeze(Object.defineProperty({__proto__:null,default:WOe},Symbol.toStringTag,{value:"Module"})),fM=lo(KOe);var dM=typeof Map=="function"&&Map.prototype,JC=Object.getOwnPropertyDescriptor&&dM?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,RA=dM&&JC&&typeof JC.get=="function"?JC.get:null,aG=dM&&Map.prototype.forEach,hM=typeof Set=="function"&&Set.prototype,XC=Object.getOwnPropertyDescriptor&&hM?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,CA=hM&&XC&&typeof XC.get=="function"?XC.get:null,oG=hM&&Set.prototype.forEach,YOe=typeof WeakMap=="function"&&WeakMap.prototype,zb=YOe?WeakMap.prototype.has:null,QOe=typeof WeakSet=="function"&&WeakSet.prototype,Gb=QOe?WeakSet.prototype.has:null,JOe=typeof WeakRef=="function"&&WeakRef.prototype,sG=JOe?WeakRef.prototype.deref:null,XOe=Boolean.prototype.valueOf,ZOe=Object.prototype.toString,ePe=Function.prototype.toString,tPe=String.prototype.match,pM=String.prototype.slice,Gf=String.prototype.replace,rPe=String.prototype.toUpperCase,cG=String.prototype.toLowerCase,Tne=RegExp.prototype.test,uG=Array.prototype.concat,cu=Array.prototype.join,nPe=Array.prototype.slice,lG=Math.floor,J8=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ZC=Object.getOwnPropertySymbols,X8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ry=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ga=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ry||"symbol")?Symbol.toStringTag:null,Rne=Object.prototype.propertyIsEnumerable,fG=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function dG(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Tne.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-lG(-t):lG(t);if(n!==t){var i=String(n),a=pM.call(e,i.length+1);return Gf.call(i,r,"$&_")+"."+Gf.call(Gf.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Gf.call(e,r,"$&_")}var Z8=fM,hG=Z8.custom,pG=Nne(hG)?hG:null,iPe=function t(e,r,n,i){var a=r||{};if(_f(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(_f(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=_f(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(_f(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(_f(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return $ne(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return s?dG(e,c):c}if(typeof e=="bigint"){var u=String(e)+"n";return s?dG(e,u):u}var f=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=f&&f>0&&typeof e=="object")return e5(e)?"[Array]":"[Object]";var d=EPe(a,n);if(typeof i>"u")i=[];else if(Dne(i,e)>=0)return"[Circular]";function g(he,F,U){if(F&&(i=nPe.call(i),i.push(F)),U){var K={depth:a.depth};return _f(a,"quoteStyle")&&(K.quoteStyle=a.quoteStyle),t(he,K,n+1,i)}return t(he,a,n+1,i)}if(typeof e=="function"&&!gG(e)){var m=hPe(e),w=gE(e,g);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(w.length>0?" { "+cu.call(w,", ")+" }":"")}if(Nne(e)){var v=Ry?Gf.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):X8.call(e);return typeof e=="object"&&!Ry?xv(v):v}if(bPe(e)){for(var y="<"+cG.call(String(e.nodeName)),_=e.attributes||[],b=0;b<_.length;b++)y+=" "+_[b].name+"="+Cne(aPe(_[b].value),"double",a);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+cG.call(String(e.nodeName))+">",y}if(e5(e)){if(e.length===0)return"[]";var S=gE(e,g);return d&&!_Pe(S)?"["+t5(S,d)+"]":"[ "+cu.call(S,", ")+" ]"}if(sPe(e)){var x=gE(e,g);return!("cause"in Error.prototype)&&"cause"in e&&!Rne.call(e,"cause")?"{ ["+String(e)+"] "+cu.call(uG.call("[cause]: "+g(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+cu.call(x,", ")+" }"}if(typeof e=="object"&&o){if(pG&&typeof e[pG]=="function"&&Z8)return Z8(e,{depth:f-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(pPe(e)){var I=[];return aG&&aG.call(e,function(he,F){I.push(g(F,e,!0)+" => "+g(he,e))}),yG("Map",RA.call(e),I,d)}if(mPe(e)){var E=[];return oG&&oG.call(e,function(he){E.push(g(he,e))}),yG("Set",CA.call(e),E,d)}if(gPe(e))return eN("WeakMap");if(vPe(e))return eN("WeakSet");if(yPe(e))return eN("WeakRef");if(uPe(e))return xv(g(Number(e)));if(fPe(e))return xv(g(J8.call(e)));if(lPe(e))return xv(XOe.call(e));if(cPe(e))return xv(g(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===Ne)return"{ [object globalThis] }";if(!oPe(e)&&!gG(e)){var p=gE(e,g),O=fG?fG(e)===Object.prototype:e instanceof Object||e.constructor===Object,C=e instanceof Object?"":"null prototype",M=!O&&Ga&&Object(e)===e&&Ga in e?pM.call(Sd(e),8,-1):C?"Object":"",B=O||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",ce=B+(M||C?"["+cu.call(uG.call([],M||[],C||[]),": ")+"] ":"");return p.length===0?ce+"{}":d?ce+"{"+t5(p,d)+"}":ce+"{ "+cu.call(p,", ")+" }"}return String(e)};function Cne(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function aPe(t){return Gf.call(String(t),/"/g,""")}function e5(t){return Sd(t)==="[object Array]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function oPe(t){return Sd(t)==="[object Date]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function gG(t){return Sd(t)==="[object RegExp]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function sPe(t){return Sd(t)==="[object Error]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function cPe(t){return Sd(t)==="[object String]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function uPe(t){return Sd(t)==="[object Number]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function lPe(t){return Sd(t)==="[object Boolean]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function Nne(t){if(Ry)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!X8)return!1;try{return X8.call(t),!0}catch{}return!1}function fPe(t){if(!t||typeof t!="object"||!J8)return!1;try{return J8.call(t),!0}catch{}return!1}var dPe=Object.prototype.hasOwnProperty||function(t){return t in this};function _f(t,e){return dPe.call(t,e)}function Sd(t){return ZOe.call(t)}function hPe(t){if(t.name)return t.name;var e=tPe.call(ePe.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Dne(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function pPe(t){if(!RA||!t||typeof t!="object")return!1;try{RA.call(t);try{CA.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function gPe(t){if(!zb||!t||typeof t!="object")return!1;try{zb.call(t,zb);try{Gb.call(t,Gb)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function yPe(t){if(!sG||!t||typeof t!="object")return!1;try{return sG.call(t),!0}catch{}return!1}function mPe(t){if(!CA||!t||typeof t!="object")return!1;try{CA.call(t);try{RA.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function vPe(t){if(!Gb||!t||typeof t!="object")return!1;try{Gb.call(t,Gb);try{zb.call(t,zb)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function bPe(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function $ne(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return $ne(pM.call(t,0,e.maxStringLength),e)+n}var i=Gf.call(Gf.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,wPe);return Cne(i,"single",e)}function wPe(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+rPe.call(e.toString(16))}function xv(t){return"Object("+t+")"}function eN(t){return t+" { ? }"}function yG(t,e,r,n){var i=n?t5(r,n):cu.call(r,", ");return t+" ("+e+") {"+i+"}"}function _Pe(t){for(var e=0;e<t.length;e++)if(Dne(t[e],`
|
|
100
|
-
`)>=0)return!1;return!0}function EPe(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=cu.call(Array(t.indent+1)," ");else return null;return{base:r,prev:cu.call(Array(e+1),r)}}function t5(t,e){if(t.length===0)return"";var r=`
|
|
101
|
-
`+e.prev+e.base;return r+cu.call(t,","+r)+`
|
|
102
|
-
`+e.prev}function gE(t,e){var r=e5(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=_f(t,i)?e(t[i],t):""}var a=typeof ZC=="function"?ZC(t):[],o;if(Ry){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var c in t)_f(t,c)&&(r&&String(Number(c))===c&&c<t.length||Ry&&o["$"+c]instanceof Symbol||(Tne.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof ZC=="function")for(var u=0;u<a.length;u++)Rne.call(t,a[u])&&n.push("["+e(a[u])+"]: "+e(t[a[u]],t));return n}var gM=Js,sm=Xs,xPe=iPe,APe=gM("%TypeError%"),yE=gM("%WeakMap%",!0),mE=gM("%Map%",!0),SPe=sm("WeakMap.prototype.get",!0),IPe=sm("WeakMap.prototype.set",!0),OPe=sm("WeakMap.prototype.has",!0),PPe=sm("Map.prototype.get",!0),TPe=sm("Map.prototype.set",!0),RPe=sm("Map.prototype.has",!0),yM=function(t,e){for(var r=t,n;(n=r.next)!==null;r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n},CPe=function(t,e){var r=yM(t,e);return r&&r.value},NPe=function(t,e,r){var n=yM(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},DPe=function(t,e){return!!yM(t,e)},Mne=function(){var e,r,n,i={assert:function(a){if(!i.has(a))throw new APe("Side channel does not contain "+xPe(a))},get:function(a){if(yE&&a&&(typeof a=="object"||typeof a=="function")){if(e)return SPe(e,a)}else if(mE){if(r)return PPe(r,a)}else if(n)return CPe(n,a)},has:function(a){if(yE&&a&&(typeof a=="object"||typeof a=="function")){if(e)return OPe(e,a)}else if(mE){if(r)return RPe(r,a)}else if(n)return DPe(n,a);return!1},set:function(a,o){yE&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new yE),IPe(e,a,o)):mE?(r||(r=new mE),TPe(r,a,o)):(n||(n={key:{},next:null}),NPe(n,a,o))}};return i},$Pe=Js,MPe=ine,Av=Mne(),Vu=$Pe("%TypeError%"),mM={assert:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Vu("`O` is not an object");if(typeof e!="string")throw new Vu("`slot` must be a string");if(Av.assert(t),!mM.has(t,e))throw new Vu("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Vu("`O` is not an object");if(typeof e!="string")throw new Vu("`slot` must be a string");var r=Av.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Vu("`O` is not an object");if(typeof e!="string")throw new Vu("`slot` must be a string");var r=Av.get(t);return!!r&&MPe(r,"$"+e)},set:function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Vu("`O` is not an object");if(typeof e!="string")throw new Vu("`slot` must be a string");var n=Av.get(t);n||(n={},Av.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(mM);var kPe=mM,Sv=kPe,LPe=SyntaxError,mG=typeof StopIteration=="object"?StopIteration:null,UPe=function(e){if(!mG)throw new LPe("this environment lacks StopIteration");Sv.set(e,"[[Done]]",!1);var r={next:function(){var i=Sv.get(this,"[[Iterator]]"),a=Sv.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(o){if(Sv.set(i,"[[Done]]",!0),o!==mG)throw o;return{done:!0,value:void 0}}}};return Sv.set(r,"[[Iterator]]",e),r},BPe={}.toString,kne=Array.isArray||function(t){return BPe.call(t)=="[object Array]"},FPe=String.prototype.valueOf,jPe=function(e){try{return FPe.call(e),!0}catch{return!1}},qPe=Object.prototype.toString,HPe="[object String]",VPe=Tp(),Lne=function(e){return typeof e=="string"?!0:typeof e!="object"?!1:VPe?jPe(e):qPe.call(e)===HPe},vM=typeof Map=="function"&&Map.prototype?Map:null,zPe=typeof Set=="function"&&Set.prototype?Set:null,NA;vM||(NA=function(e){return!1});var Une=vM?Map.prototype.has:null,vG=zPe?Set.prototype.has:null;!NA&&!Une&&(NA=function(e){return!1});var Bne=NA||function(e){if(!e||typeof e!="object")return!1;try{if(Une.call(e),vG)try{vG.call(e)}catch{return!0}return e instanceof vM}catch{}return!1},GPe=typeof Map=="function"&&Map.prototype?Map:null,bM=typeof Set=="function"&&Set.prototype?Set:null,DA;bM||(DA=function(e){return!1});var bG=GPe?Map.prototype.has:null,Fne=bM?Set.prototype.has:null;!DA&&!Fne&&(DA=function(e){return!1});var jne=DA||function(e){if(!e||typeof e!="object")return!1;try{if(Fne.call(e),bG)try{bG.call(e)}catch{return!0}return e instanceof bM}catch{}return!1},wG=Pne,_G=UPe;if(oM()||MS()){var tN=Symbol.iterator;_x.exports=function(e){if(e!=null&&typeof e[tN]<"u")return e[tN]();if(wG(e))return Array.prototype[tN].call(e)}}else{var WPe=kne,KPe=Lne,EG=Js,YPe=EG("%Map%",!0),QPe=EG("%Set%",!0),cc=Xs,xG=cc("Array.prototype.push"),AG=cc("String.prototype.charCodeAt"),JPe=cc("String.prototype.slice"),XPe=function(e,r){var n=e.length;if(r+1>=n)return r+1;var i=AG(e,r);if(i<55296||i>56319)return r+1;var a=AG(e,r+1);return a<56320||a>57343?r+1:r+2},rN=function(e){var r=0;return{next:function(){var i=r>=e.length,a;return i||(a=e[r],r+=1),{done:i,value:a}}}},SG=function(e,r){if(WPe(e)||wG(e))return rN(e);if(KPe(e)){var n=0;return{next:function(){var a=XPe(e,n),o=JPe(e,n,a);return n=a,{done:a>e.length,value:o}}}}if(r&&typeof e["_es6-shim iterator_"]<"u")return e["_es6-shim iterator_"]()};if(!YPe&&!QPe)_x.exports=function(e){if(e!=null)return SG(e,!0)};else{var ZPe=Bne,e3e=jne,IG=cc("Map.prototype.forEach",!0),OG=cc("Set.prototype.forEach",!0);if(typeof Va>"u"||!Va.versions||!Va.versions.node)var PG=cc("Map.prototype.iterator",!0),TG=cc("Set.prototype.iterator",!0);var RG=cc("Map.prototype.@@iterator",!0)||cc("Map.prototype._es6-shim iterator_",!0),CG=cc("Set.prototype.@@iterator",!0)||cc("Set.prototype._es6-shim iterator_",!0),t3e=function(e){if(ZPe(e)){if(PG)return _G(PG(e));if(RG)return RG(e);if(IG){var r=[];return IG(e,function(i,a){xG(r,[a,i])}),rN(r)}}if(e3e(e)){if(TG)return _G(TG(e));if(CG)return CG(e);if(OG){var n=[];return OG(e,function(i){xG(n,i)}),rN(n)}}};_x.exports=function(e){return t3e(e)||SG(e)}}}var r3e=_x.exports,NG=function(t){return t!==t},qne=function(e,r){return e===0&&r===0?1/e===1/r:!!(e===r||NG(e)&&NG(r))},n3e=qne,Hne=function(){return typeof Object.is=="function"?Object.is:n3e},i3e=Hne,a3e=Op,o3e=function(){var e=i3e();return a3e(Object,{is:e},{is:function(){return Object.is!==e}}),e},s3e=Op,c3e=om,u3e=qne,Vne=Hne,l3e=o3e,zne=c3e(Vne(),Object);s3e(zne,{getPolyfill:Vne,implementation:u3e,shim:l3e});var f3e=zne,Gne=Function.prototype.toString,K0=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,r5,Ex;if(typeof K0=="function"&&typeof Object.defineProperty=="function")try{r5=Object.defineProperty({},"length",{get:function(){throw Ex}}),Ex={},K0(function(){throw 42},null,r5)}catch(t){t!==Ex&&(K0=null)}else K0=null;var d3e=/^\s*class\b/,n5=function(e){try{var r=Gne.call(e);return d3e.test(r)}catch{return!1}},nN=function(e){try{return n5(e)?!1:(Gne.call(e),!0)}catch{return!1}},xx=Object.prototype.toString,h3e="[object Object]",p3e="[object Function]",g3e="[object GeneratorFunction]",y3e="[object HTMLAllCollection]",m3e="[object HTML document.all class]",v3e="[object HTMLCollection]",b3e=typeof Symbol=="function"&&!!Symbol.toStringTag,w3e=!(0 in[,]),i5=function(){return!1};if(typeof document=="object"){var _3e=document.all;xx.call(_3e)===xx.call(document.all)&&(i5=function(e){if((w3e||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=xx.call(e);return(r===y3e||r===m3e||r===v3e||r===h3e)&&e("")==null}catch{}return!1})}var E3e=K0?function(e){if(i5(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{K0(e,null,r5)}catch(r){if(r!==Ex)return!1}return!n5(e)&&nN(e)}:function(e){if(i5(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(b3e)return nN(e);if(n5(e))return!1;var r=xx.call(e);return r!==p3e&&r!==g3e&&!/^\[object HTML/.test(r)?!1:nN(e)},x3e=E3e,A3e=Object.prototype.toString,Wne=Object.prototype.hasOwnProperty,S3e=function(e,r,n){for(var i=0,a=e.length;i<a;i++)Wne.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},I3e=function(e,r,n){for(var i=0,a=e.length;i<a;i++)n==null?r(e.charAt(i),i,e):r.call(n,e.charAt(i),i,e)},O3e=function(e,r,n){for(var i in e)Wne.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},P3e=function(e,r,n){if(!x3e(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),A3e.call(e)==="[object Array]"?S3e(e,r,i):typeof e=="string"?I3e(e,r,i):O3e(e,r,i)},T3e=P3e,iN=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],R3e=typeof globalThis>"u"?Ne:globalThis,C3e=function(){for(var e=[],r=0;r<iN.length;r++)typeof R3e[iN[r]]=="function"&&(e[e.length]=iN[r]);return e},$A=T3e,N3e=C3e,DG=om,wM=Xs,Ax=cM,D3e=wM("Object.prototype.toString"),Kne=Tp(),$G=typeof globalThis>"u"?Ne:globalThis,a5=N3e(),_M=wM("String.prototype.slice"),aN=Object.getPrototypeOf,$3e=wM("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n<e.length;n+=1)if(e[n]===r)return n;return-1},MA={__proto__:null};Kne&&Ax&&aN?$A(a5,function(t){var e=new $G[t];if(Symbol.toStringTag in e){var r=aN(e),n=Ax(r,Symbol.toStringTag);if(!n){var i=aN(r);n=Ax(i,Symbol.toStringTag)}MA["$"+t]=DG(n.get)}}):$A(a5,function(t){var e=new $G[t],r=e.slice||e.set;r&&(MA["$"+t]=DG(r))});var M3e=function(e){var r=!1;return $A(MA,function(n,i){if(!r)try{"$"+n(e)===i&&(r=_M(i,1))}catch{}}),r},k3e=function(e){var r=!1;return $A(MA,function(n,i){if(!r)try{n(e),r=_M(i,1)}catch{}}),r},Yne=function(e){if(!e||typeof e!="object")return!1;if(!Kne){var r=_M(D3e(e),8,-1);return $3e(a5,r)>-1?r:r!=="Object"?!1:k3e(e)}return Ax?M3e(e):null},L3e=Yne,U3e=function(e){return!!L3e(e)},B3e=om,F3e=Xs,Qne=Js,j3e=U3e,MG=Qne("ArrayBuffer",!0),kG=Qne("Float32Array",!0),Sx=F3e("ArrayBuffer.prototype.byteLength",!0),LG=MG&&!Sx&&new MG().slice,UG=LG&&B3e(LG),Jne=Sx||UG?function(e){if(!e||typeof e!="object")return!1;try{return Sx?Sx(e):UG(e,0),!0}catch{return!1}}:kG?function(e){try{return new kG(e).buffer===e&&!j3e(e)}catch(r){return typeof e=="object"&&r.name==="RangeError"}}:function(e){return!1},q3e=Date.prototype.getDay,H3e=function(e){try{return q3e.call(e),!0}catch{return!1}},V3e=Object.prototype.toString,z3e="[object Date]",G3e=Tp(),W3e=function(e){return typeof e!="object"||e===null?!1:G3e?H3e(e):V3e.call(e)===z3e},o5=Xs,Xne=Tp(),Zne,eie,s5,c5;if(Xne){Zne=o5("Object.prototype.hasOwnProperty"),eie=o5("RegExp.prototype.exec"),s5={};var oN=function(){throw s5};c5={toString:oN,valueOf:oN},typeof Symbol.toPrimitive=="symbol"&&(c5[Symbol.toPrimitive]=oN)}var K3e=o5("Object.prototype.toString"),Y3e=Object.getOwnPropertyDescriptor,Q3e="[object RegExp]",J3e=Xne?function(e){if(!e||typeof e!="object")return!1;var r=Y3e(e,"lastIndex"),n=r&&Zne(r,"value");if(!n)return!1;try{eie(e,c5)}catch(i){return i===s5}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:K3e(e)===Q3e},X3e=Xs,BG=X3e("SharedArrayBuffer.prototype.byteLength",!0),Z3e=BG?function(e){if(!e||typeof e!="object")return!1;try{return BG(e),!0}catch{return!1}}:function(e){return!1},eTe=Number.prototype.toString,tTe=function(e){try{return eTe.call(e),!0}catch{return!1}},rTe=Object.prototype.toString,nTe="[object Number]",iTe=Tp(),aTe=function(e){return typeof e=="number"?!0:typeof e!="object"?!1:iTe?tTe(e):rTe.call(e)===nTe},tie=Xs,oTe=tie("Boolean.prototype.toString"),sTe=tie("Object.prototype.toString"),cTe=function(e){try{return oTe(e),!0}catch{return!1}},uTe="[object Boolean]",lTe=Tp(),fTe=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:lTe&&Symbol.toStringTag in e?cTe(e):sTe(e)===uTe},u5={exports:{}},dTe=Object.prototype.toString,hTe=oM();if(hTe){var pTe=Symbol.prototype.toString,gTe=/^Symbol\(.*\)$/,yTe=function(e){return typeof e.valueOf()!="symbol"?!1:gTe.test(pTe.call(e))};u5.exports=function(e){if(typeof e=="symbol")return!0;if(dTe.call(e)!=="[object Symbol]")return!1;try{return yTe(e)}catch{return!1}}}else u5.exports=function(e){return!1};var mTe=u5.exports,l5={exports:{}},FG=typeof BigInt<"u"&&BigInt,vTe=function(){return typeof FG=="function"&&typeof BigInt=="function"&&typeof FG(42)=="bigint"&&typeof BigInt(42)=="bigint"},bTe=vTe();if(bTe){var wTe=BigInt.prototype.valueOf,_Te=function(e){try{return wTe.call(e),!0}catch{}return!1};l5.exports=function(e){return e===null||typeof e>"u"||typeof e=="boolean"||typeof e=="string"||typeof e=="number"||typeof e=="symbol"||typeof e=="function"?!1:typeof e=="bigint"?!0:_Te(e)}}else l5.exports=function(e){return!1};var ETe=l5.exports,xTe=Lne,ATe=aTe,STe=fTe,ITe=mTe,OTe=ETe,PTe=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(xTe(e))return"String";if(ATe(e))return"Number";if(STe(e))return"Boolean";if(ITe(e))return"Symbol";if(OTe(e))return"BigInt"},kA=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,jG=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,LA;kA||(LA=function(e){return!1});var f5=kA?kA.prototype.has:null,sN=jG?jG.prototype.has:null;!LA&&!f5&&(LA=function(e){return!1});var TTe=LA||function(e){if(!e||typeof e!="object")return!1;try{if(f5.call(e,f5),sN)try{sN.call(e,sN)}catch{return!0}return e instanceof kA}catch{}return!1},d5={exports:{}},RTe=Js,rie=Xs,CTe=RTe("%WeakSet%",!0),cN=rie("WeakSet.prototype.has",!0);if(cN){var uN=rie("WeakMap.prototype.has",!0);d5.exports=function(e){if(!e||typeof e!="object")return!1;try{if(cN(e,cN),uN)try{uN(e,uN)}catch{return!0}return e instanceof CTe}catch{}return!1}}else d5.exports=function(e){return!1};var NTe=d5.exports,DTe=Bne,$Te=jne,MTe=TTe,kTe=NTe,LTe=function(e){if(e&&typeof e=="object"){if(DTe(e))return"Map";if($Te(e))return"Set";if(MTe(e))return"WeakMap";if(kTe(e))return"WeakSet"}return!1},UTe=Xs,qG=UTe("ArrayBuffer.prototype.byteLength",!0),BTe=Jne,FTe=function(e){return BTe(e)?qG?qG(e):e.byteLength:NaN},nie=zIe,Tu=Xs,HG=gOe,jTe=Js,Cy=r3e,qTe=Mne,VG=f3e,zG=Pne,GG=kne,WG=Jne,KG=W3e,YG=J3e,QG=Z3e,JG=aM,XG=PTe,ZG=LTe,eW=Yne,tW=FTe,rW=Tu("SharedArrayBuffer.prototype.byteLength",!0),nW=Tu("Date.prototype.getTime"),lN=Object.getPrototypeOf,iW=Tu("Object.prototype.toString"),UA=jTe("%Set%",!0),h5=Tu("Map.prototype.has",!0),BA=Tu("Map.prototype.get",!0),aW=Tu("Map.prototype.size",!0),FA=Tu("Set.prototype.add",!0),iie=Tu("Set.prototype.delete",!0),jA=Tu("Set.prototype.has",!0),Ix=Tu("Set.prototype.size",!0);function oW(t,e,r,n){for(var i=Cy(t),a;(a=i.next())&&!a.done;)if(Cc(e,a.value,r,n))return iie(t,a.value),!0;return!1}function aie(t){if(typeof t>"u")return null;if(typeof t!="object")return typeof t=="symbol"?!1:typeof t=="string"||typeof t=="number"?+t==+t:!0}function HTe(t,e,r,n,i,a){var o=aie(r);if(o!=null)return o;var s=BA(e,o),c=nie({},i,{strict:!1});return typeof s>"u"&&!h5(e,o)||!Cc(n,s,c,a)?!1:!h5(t,o)&&Cc(n,s,c,a)}function VTe(t,e,r){var n=aie(r);return n??(jA(e,n)&&!jA(t,n))}function sW(t,e,r,n,i,a){for(var o=Cy(t),s,c;(s=o.next())&&!s.done;)if(c=s.value,Cc(r,c,i,a)&&Cc(n,BA(e,c),i,a))return iie(t,c),!0;return!1}function Cc(t,e,r,n){var i=r||{};if(i.strict?VG(t,e):t===e)return!0;var a=XG(t),o=XG(e);if(a!==o)return!1;if(!t||!e||typeof t!="object"&&typeof e!="object")return i.strict?VG(t,e):t==e;var s=n.has(t),c=n.has(e),u;if(s&&c){if(n.get(t)===n.get(e))return!0}else u={};return s||n.set(t,u),c||n.set(e,u),WTe(t,e,i,n)}function cW(t){return!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}function zTe(t,e,r,n){if(Ix(t)!==Ix(e))return!1;for(var i=Cy(t),a=Cy(e),o,s,c;(o=i.next())&&!o.done;)if(o.value&&typeof o.value=="object")c||(c=new UA),FA(c,o.value);else if(!jA(e,o.value)){if(r.strict||!VTe(t,e,o.value))return!1;c||(c=new UA),FA(c,o.value)}if(c){for(;(s=a.next())&&!s.done;)if(s.value&&typeof s.value=="object"){if(!oW(c,s.value,r.strict,n))return!1}else if(!r.strict&&!jA(t,s.value)&&!oW(c,s.value,r.strict,n))return!1;return Ix(c)===0}return!0}function GTe(t,e,r,n){if(aW(t)!==aW(e))return!1;for(var i=Cy(t),a=Cy(e),o,s,c,u,f,d;(o=i.next())&&!o.done;)if(u=o.value[0],f=o.value[1],u&&typeof u=="object")c||(c=new UA),FA(c,u);else if(d=BA(e,u),typeof d>"u"&&!h5(e,u)||!Cc(f,d,r,n)){if(r.strict||!HTe(t,e,u,f,r,n))return!1;c||(c=new UA),FA(c,u)}if(c){for(;(s=a.next())&&!s.done;)if(u=s.value[0],d=s.value[1],u&&typeof u=="object"){if(!sW(c,t,u,d,r,n))return!1}else if(!r.strict&&(!t.has(u)||!Cc(BA(t,u),d,r,n))&&!sW(c,t,u,d,nie({},r,{strict:!1}),n))return!1;return Ix(c)===0}return!0}function WTe(t,e,r,n){var i,a;if(typeof t!=typeof e||t==null||e==null||iW(t)!==iW(e)||zG(t)!==zG(e))return!1;var o=GG(t),s=GG(e);if(o!==s)return!1;var c=t instanceof Error,u=e instanceof Error;if(c!==u||(c||u)&&(t.name!==e.name||t.message!==e.message))return!1;var f=YG(t),d=YG(e);if(f!==d||(f||d)&&(t.source!==e.source||HG(t)!==HG(e)))return!1;var g=KG(t),m=KG(e);if(g!==m||(g||m)&&nW(t)!==nW(e)||r.strict&&lN&&lN(t)!==lN(e))return!1;var w=eW(t),v=eW(e);if(w!==v)return!1;if(w||v){if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}var y=cW(t),_=cW(e);if(y!==_)return!1;if(y||_){if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}var b=WG(t),S=WG(e);if(b!==S)return!1;if(b||S)return tW(t)!==tW(e)?!1:typeof Uint8Array=="function"&&Cc(new Uint8Array(t),new Uint8Array(e),r,n);var x=QG(t),I=QG(e);if(x!==I)return!1;if(x||I)return rW(t)!==rW(e)?!1:typeof Uint8Array=="function"&&Cc(new Uint8Array(t),new Uint8Array(e),r,n);if(typeof t!=typeof e)return!1;var E=JG(t),p=JG(e);if(E.length!==p.length)return!1;for(E.sort(),p.sort(),i=E.length-1;i>=0;i--)if(E[i]!=p[i])return!1;for(i=E.length-1;i>=0;i--)if(a=E[i],!Cc(t[a],e[a],r,n))return!1;var O=ZG(t),C=ZG(e);return O!==C?!1:O==="Set"||C==="Set"?zTe(t,e,r,n):O==="Map"?GTe(t,e,r,n):!0}var KTe=function(e,r,n){return Cc(e,r,n,qTe())},US={},oie={},Ct={},p5={exports:{}},sie={},Fs={},Ny={},cm={},Tr={},Dy={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(b){if(super(),!t.IDENTIFIER.test(b))throw new Error("CodeGen: name must be a valid identifier");this.str=b}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(b){super(),this._items=typeof b=="string"?[b]:b}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const b=this._items[0];return b===""||b==='""'}get str(){var b;return(b=this._str)!==null&&b!==void 0?b:this._str=this._items.reduce((S,x)=>`${S}${x}`,"")}get names(){var b;return(b=this._names)!==null&&b!==void 0?b:this._names=this._items.reduce((S,x)=>(x instanceof r&&(S[x.str]=(S[x.str]||0)+1),S),{})}}t._Code=n,t.nil=new n("");function i(_,...b){const S=[_[0]];let x=0;for(;x<b.length;)s(S,b[x]),S.push(_[++x]);return new n(S)}t._=i;const a=new n("+");function o(_,...b){const S=[m(_[0])];let x=0;for(;x<b.length;)S.push(a),s(S,b[x]),S.push(a,m(_[++x]));return c(S),new n(S)}t.str=o;function s(_,b){b instanceof n?_.push(...b._items):b instanceof r?_.push(b):_.push(d(b))}t.addCodeArg=s;function c(_){let b=1;for(;b<_.length-1;){if(_[b]===a){const S=u(_[b-1],_[b+1]);if(S!==void 0){_.splice(b-1,3,S);continue}_[b++]="+"}b++}}function u(_,b){if(b==='""')return _;if(_==='""')return b;if(typeof _=="string")return b instanceof r||_[_.length-1]!=='"'?void 0:typeof b!="string"?`${_.slice(0,-1)}${b}"`:b[0]==='"'?_.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!(_ instanceof r))return`"${_}${b.slice(1)}`}function f(_,b){return b.emptyStr()?_:_.emptyStr()?b:o`${_}${b}`}t.strConcat=f;function d(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:m(Array.isArray(_)?_.join(","):_)}function g(_){return new n(m(_))}t.stringify=g;function m(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=m;function w(_){return typeof _=="string"&&t.IDENTIFIER.test(_)?new n(`.${_}`):i`[${_}]`}t.getProperty=w;function v(_){if(typeof _=="string"&&t.IDENTIFIER.test(_))return new n(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}t.getEsmExportName=v;function y(_){return new n(_.toString())}t.regexpCode=y})(Dy);var g5={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Dy;class r extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class i{constructor({prefixes:u,parent:f}={}){this._names={},this._prefixes=u,this._parent=f}toName(u){return u instanceof e.Name?u:this.name(u)}name(u){return new e.Name(this._newName(u))}_newName(u){const f=this._names[u]||this._nameGroup(u);return`${u}${f.index++}`}_nameGroup(u){var f,d;if(!((d=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}t.Scope=i;class a extends e.Name{constructor(u,f){super(f),this.prefix=u}setValue(u,{property:f,itemIndex:d}){this.value=u,this.scopePath=(0,e._)`.${new e.Name(f)}[${d}]`}}t.ValueScopeName=a;const o=(0,e._)`\n`;class s extends i{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?o:e.nil}}get(){return this._scope}name(u){return new a(u,this._newName(u))}value(u,f){var d;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(u),{prefix:m}=g,w=(d=f.key)!==null&&d!==void 0?d:f.ref;let v=this._values[m];if(v){const b=v.get(w);if(b)return b}else v=this._values[m]=new Map;v.set(w,g);const y=this._scope[m]||(this._scope[m]=[]),_=y.length;return y[_]=f.ref,g.setValue(f,{property:m,itemIndex:_}),g}getValue(u,f){const d=this._values[u];if(d)return d.get(f)}scopeRefs(u,f=this._values){return this._reduceValues(f,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${u}${d.scopePath}`})}scopeCode(u=this._values,f,d){return this._reduceValues(u,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},f,d)}_reduceValues(u,f,d={},g){let m=e.nil;for(const w in u){const v=u[w];if(!v)continue;const y=d[w]=d[w]||new Map;v.forEach(_=>{if(y.has(_))return;y.set(_,n.Started);let b=f(_);if(b){const S=this.opts.es5?t.varKinds.var:t.varKinds.const;m=(0,e._)`${m}${S} ${_} = ${b};${this.opts._n}`}else if(b=g==null?void 0:g(_))m=(0,e._)`${m}${b}${this.opts._n}`;else throw new r(_);y.set(_,n.Completed)})}return m}}t.ValueScope=s})(g5);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Dy,r=g5;var n=Dy;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var i=g5;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames(k,G){return this}}class o extends a{constructor(k,G,ge){super(),this.varKind=k,this.name=G,this.rhs=ge}render({es5:k,_n:G}){const ge=k?r.varKinds.var:this.varKind,Q=this.rhs===void 0?"":` = ${this.rhs}`;return`${ge} ${this.name}${Q};`+G}optimizeNames(k,G){if(k[this.name.str])return this.rhs&&(this.rhs=F(this.rhs,k,G)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class s extends a{constructor(k,G,ge){super(),this.lhs=k,this.rhs=G,this.sideEffects=ge}render({_n:k}){return`${this.lhs} = ${this.rhs};`+k}optimizeNames(k,G){if(!(this.lhs instanceof e.Name&&!k[this.lhs.str]&&!this.sideEffects))return this.rhs=F(this.rhs,k,G),this}get names(){const k=this.lhs instanceof e.Name?{}:{...this.lhs.names};return he(k,this.rhs)}}class c extends s{constructor(k,G,ge,Q){super(k,ge,Q),this.op=G}render({_n:k}){return`${this.lhs} ${this.op}= ${this.rhs};`+k}}class u extends a{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`${this.label}:`+k}}class f extends a{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`break${this.label?` ${this.label}`:""};`+k}}class d extends a{constructor(k){super(),this.error=k}render({_n:k}){return`throw ${this.error};`+k}get names(){return this.error.names}}class g extends a{constructor(k){super(),this.code=k}render({_n:k}){return`${this.code};`+k}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(k,G){return this.code=F(this.code,k,G),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class m extends a{constructor(k=[]){super(),this.nodes=k}render(k){return this.nodes.reduce((G,ge)=>G+ge.render(k),"")}optimizeNodes(){const{nodes:k}=this;let G=k.length;for(;G--;){const ge=k[G].optimizeNodes();Array.isArray(ge)?k.splice(G,1,...ge):ge?k[G]=ge:k.splice(G,1)}return k.length>0?this:void 0}optimizeNames(k,G){const{nodes:ge}=this;let Q=ge.length;for(;Q--;){const te=ge[Q];te.optimizeNames(k,G)||(U(k,te.names),ge.splice(Q,1))}return ge.length>0?this:void 0}get names(){return this.nodes.reduce((k,G)=>ce(k,G.names),{})}}class w extends m{render(k){return"{"+k._n+super.render(k)+"}"+k._n}}class v extends m{}class y extends w{}y.kind="else";class _ extends w{constructor(k,G){super(G),this.condition=k}render(k){let G=`if(${this.condition})`+super.render(k);return this.else&&(G+="else "+this.else.render(k)),G}optimizeNodes(){super.optimizeNodes();const k=this.condition;if(k===!0)return this.nodes;let G=this.else;if(G){const ge=G.optimizeNodes();G=this.else=Array.isArray(ge)?new y(ge):ge}if(G)return k===!1?G instanceof _?G:G.nodes:this.nodes.length?this:new _(K(k),G instanceof _?[G]:G.nodes);if(!(k===!1||!this.nodes.length))return this}optimizeNames(k,G){var ge;if(this.else=(ge=this.else)===null||ge===void 0?void 0:ge.optimizeNames(k,G),!!(super.optimizeNames(k,G)||this.else))return this.condition=F(this.condition,k,G),this}get names(){const k=super.names;return he(k,this.condition),this.else&&ce(k,this.else.names),k}}_.kind="if";class b extends w{}b.kind="for";class S extends b{constructor(k){super(),this.iteration=k}render(k){return`for(${this.iteration})`+super.render(k)}optimizeNames(k,G){if(super.optimizeNames(k,G))return this.iteration=F(this.iteration,k,G),this}get names(){return ce(super.names,this.iteration.names)}}class x extends b{constructor(k,G,ge,Q){super(),this.varKind=k,this.name=G,this.from=ge,this.to=Q}render(k){const G=k.es5?r.varKinds.var:this.varKind,{name:ge,from:Q,to:te}=this;return`for(${G} ${ge}=${Q}; ${ge}<${te}; ${ge}++)`+super.render(k)}get names(){const k=he(super.names,this.from);return he(k,this.to)}}class I extends b{constructor(k,G,ge,Q){super(),this.loop=k,this.varKind=G,this.name=ge,this.iterable=Q}render(k){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(k)}optimizeNames(k,G){if(super.optimizeNames(k,G))return this.iterable=F(this.iterable,k,G),this}get names(){return ce(super.names,this.iterable.names)}}class E extends w{constructor(k,G,ge){super(),this.name=k,this.args=G,this.async=ge}render(k){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(k)}}E.kind="func";class p extends m{render(k){return"return "+super.render(k)}}p.kind="return";class O extends w{render(k){let G="try"+super.render(k);return this.catch&&(G+=this.catch.render(k)),this.finally&&(G+=this.finally.render(k)),G}optimizeNodes(){var k,G;return super.optimizeNodes(),(k=this.catch)===null||k===void 0||k.optimizeNodes(),(G=this.finally)===null||G===void 0||G.optimizeNodes(),this}optimizeNames(k,G){var ge,Q;return super.optimizeNames(k,G),(ge=this.catch)===null||ge===void 0||ge.optimizeNames(k,G),(Q=this.finally)===null||Q===void 0||Q.optimizeNames(k,G),this}get names(){const k=super.names;return this.catch&&ce(k,this.catch.names),this.finally&&ce(k,this.finally.names),k}}class C extends w{constructor(k){super(),this.error=k}render(k){return`catch(${this.error})`+super.render(k)}}C.kind="catch";class M extends w{render(k){return"finally"+super.render(k)}}M.kind="finally";class B{constructor(k,G={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...G,_n:G.lines?`
|
|
103
|
-
`:""},this._extScope=k,this._scope=new r.Scope({parent:k}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(k){return this._scope.name(k)}scopeName(k){return this._extScope.name(k)}scopeValue(k,G){const ge=this._extScope.value(k,G);return(this._values[ge.prefix]||(this._values[ge.prefix]=new Set)).add(ge),ge}getScopeValue(k,G){return this._extScope.getValue(k,G)}scopeRefs(k){return this._extScope.scopeRefs(k,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(k,G,ge,Q){const te=this._scope.toName(G);return ge!==void 0&&Q&&(this._constants[te.str]=ge),this._leafNode(new o(k,te,ge)),te}const(k,G,ge){return this._def(r.varKinds.const,k,G,ge)}let(k,G,ge){return this._def(r.varKinds.let,k,G,ge)}var(k,G,ge){return this._def(r.varKinds.var,k,G,ge)}assign(k,G,ge){return this._leafNode(new s(k,G,ge))}add(k,G){return this._leafNode(new c(k,t.operators.ADD,G))}code(k){return typeof k=="function"?k():k!==e.nil&&this._leafNode(new g(k)),this}object(...k){const G=["{"];for(const[ge,Q]of k)G.length>1&&G.push(","),G.push(ge),(ge!==Q||this.opts.es5)&&(G.push(":"),(0,e.addCodeArg)(G,Q));return G.push("}"),new e._Code(G)}if(k,G,ge){if(this._blockNode(new _(k)),G&&ge)this.code(G).else().code(ge).endIf();else if(G)this.code(G).endIf();else if(ge)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(k){return this._elseNode(new _(k))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(_,y)}_for(k,G){return this._blockNode(k),G&&this.code(G).endFor(),this}for(k,G){return this._for(new S(k),G)}forRange(k,G,ge,Q,te=this.opts.es5?r.varKinds.var:r.varKinds.let){const ue=this._scope.toName(k);return this._for(new x(te,ue,G,ge),()=>Q(ue))}forOf(k,G,ge,Q=r.varKinds.const){const te=this._scope.toName(k);if(this.opts.es5){const ue=G instanceof e.Name?G:this.var("_arr",G);return this.forRange("_i",0,(0,e._)`${ue}.length`,T=>{this.var(te,(0,e._)`${ue}[${T}]`),ge(te)})}return this._for(new I("of",Q,te,G),()=>ge(te))}forIn(k,G,ge,Q=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(k,(0,e._)`Object.keys(${G})`,ge);const te=this._scope.toName(k);return this._for(new I("in",Q,te,G),()=>ge(te))}endFor(){return this._endBlockNode(b)}label(k){return this._leafNode(new u(k))}break(k){return this._leafNode(new f(k))}return(k){const G=new p;if(this._blockNode(G),this.code(k),G.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(p)}try(k,G,ge){if(!G&&!ge)throw new Error('CodeGen: "try" without "catch" and "finally"');const Q=new O;if(this._blockNode(Q),this.code(k),G){const te=this.name("e");this._currNode=Q.catch=new C(te),G(te)}return ge&&(this._currNode=Q.finally=new M,this.code(ge)),this._endBlockNode(C,M)}throw(k){return this._leafNode(new d(k))}block(k,G){return this._blockStarts.push(this._nodes.length),k&&this.code(k).endBlock(G),this}endBlock(k){const G=this._blockStarts.pop();if(G===void 0)throw new Error("CodeGen: not in self-balancing block");const ge=this._nodes.length-G;if(ge<0||k!==void 0&&ge!==k)throw new Error(`CodeGen: wrong number of nodes: ${ge} vs ${k} expected`);return this._nodes.length=G,this}func(k,G=e.nil,ge,Q){return this._blockNode(new E(k,G,ge)),Q&&this.code(Q).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(k=1){for(;k-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(k){return this._currNode.nodes.push(k),this}_blockNode(k){this._currNode.nodes.push(k),this._nodes.push(k)}_endBlockNode(k,G){const ge=this._currNode;if(ge instanceof k||G&&ge instanceof G)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${G?`${k.kind}/${G.kind}`:k.kind}"`)}_elseNode(k){const G=this._currNode;if(!(G instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=G.else=k,this}get _root(){return this._nodes[0]}get _currNode(){const k=this._nodes;return k[k.length-1]}set _currNode(k){const G=this._nodes;G[G.length-1]=k}}t.CodeGen=B;function ce(L,k){for(const G in k)L[G]=(L[G]||0)+(k[G]||0);return L}function he(L,k){return k instanceof e._CodeOrName?ce(L,k.names):L}function F(L,k,G){if(L instanceof e.Name)return ge(L);if(!Q(L))return L;return new e._Code(L._items.reduce((te,ue)=>(ue instanceof e.Name&&(ue=ge(ue)),ue instanceof e._Code?te.push(...ue._items):te.push(ue),te),[]));function ge(te){const ue=G[te.str];return ue===void 0||k[te.str]!==1?te:(delete k[te.str],ue)}function Q(te){return te instanceof e._Code&&te._items.some(ue=>ue instanceof e.Name&&k[ue.str]===1&&G[ue.str]!==void 0)}}function U(L,k){for(const G in k)L[G]=(L[G]||0)-(k[G]||0)}function K(L){return typeof L=="boolean"||typeof L=="number"||L===null?!L:(0,e._)`!${H(L)}`}t.not=K;const ne=$(t.operators.AND);function j(...L){return L.reduce(ne)}t.and=j;const q=$(t.operators.OR);function V(...L){return L.reduce(q)}t.or=V;function $(L){return(k,G)=>k===e.nil?G:G===e.nil?k:(0,e._)`${H(k)} ${L} ${H(G)}`}function H(L){return L instanceof e.Name?L:(0,e._)`(${L})`}})(Tr);var pn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const e=Tr,r=Dy;function n(E){const p={};for(const O of E)p[O]=!0;return p}t.toHash=n;function i(E,p){return typeof p=="boolean"?p:Object.keys(p).length===0?!0:(a(E,p),!o(p,E.self.RULES.all))}t.alwaysValidSchema=i;function a(E,p=E.schema){const{opts:O,self:C}=E;if(!O.strictSchema||typeof p=="boolean")return;const M=C.RULES.keywords;for(const B in p)M[B]||I(E,`unknown keyword: "${B}"`)}t.checkUnknownRules=a;function o(E,p){if(typeof E=="boolean")return!E;for(const O in E)if(p[O])return!0;return!1}t.schemaHasRules=o;function s(E,p){if(typeof E=="boolean")return!E;for(const O in E)if(O!=="$ref"&&p.all[O])return!0;return!1}t.schemaHasRulesButRef=s;function c({topSchemaRef:E,schemaPath:p},O,C,M){if(!M){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${E}${p}${(0,e.getProperty)(C)}`}t.schemaRefOrVal=c;function u(E){return g(decodeURIComponent(E))}t.unescapeFragment=u;function f(E){return encodeURIComponent(d(E))}t.escapeFragment=f;function d(E){return typeof E=="number"?`${E}`:E.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function g(E){return E.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=g;function m(E,p){if(Array.isArray(E))for(const O of E)p(O);else p(E)}t.eachItem=m;function w({mergeNames:E,mergeToName:p,mergeValues:O,resultToName:C}){return(M,B,ce,he)=>{const F=ce===void 0?B:ce instanceof e.Name?(B instanceof e.Name?E(M,B,ce):p(M,B,ce),ce):B instanceof e.Name?(p(M,ce,B),B):O(B,ce);return he===e.Name&&!(F instanceof e.Name)?C(M,F):F}}t.mergeEvaluated={props:w({mergeNames:(E,p,O)=>E.if((0,e._)`${O} !== true && ${p} !== undefined`,()=>{E.if((0,e._)`${p} === true`,()=>E.assign(O,!0),()=>E.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${p})`))}),mergeToName:(E,p,O)=>E.if((0,e._)`${O} !== true`,()=>{p===!0?E.assign(O,!0):(E.assign(O,(0,e._)`${O} || {}`),y(E,O,p))}),mergeValues:(E,p)=>E===!0?!0:{...E,...p},resultToName:v}),items:w({mergeNames:(E,p,O)=>E.if((0,e._)`${O} !== true && ${p} !== undefined`,()=>E.assign(O,(0,e._)`${p} === true ? true : ${O} > ${p} ? ${O} : ${p}`)),mergeToName:(E,p,O)=>E.if((0,e._)`${O} !== true`,()=>E.assign(O,p===!0?!0:(0,e._)`${O} > ${p} ? ${O} : ${p}`)),mergeValues:(E,p)=>E===!0?!0:Math.max(E,p),resultToName:(E,p)=>E.var("items",p)})};function v(E,p){if(p===!0)return E.var("props",!0);const O=E.var("props",(0,e._)`{}`);return p!==void 0&&y(E,O,p),O}t.evaluatedPropsToName=v;function y(E,p,O){Object.keys(O).forEach(C=>E.assign((0,e._)`${p}${(0,e.getProperty)(C)}`,!0))}t.setEvaluated=y;const _={};function b(E,p){return E.scopeValue("func",{ref:p,code:_[p.code]||(_[p.code]=new r._Code(p.code))})}t.useFunc=b;var S;(function(E){E[E.Num=0]="Num",E[E.Str=1]="Str"})(S=t.Type||(t.Type={}));function x(E,p,O){if(E instanceof e.Name){const C=p===S.Num;return O?C?(0,e._)`"[" + ${E} + "]"`:(0,e._)`"['" + ${E} + "']"`:C?(0,e._)`"/" + ${E}`:(0,e._)`"/" + ${E}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(E).toString():"/"+d(E)}t.getErrorPath=x;function I(E,p,O=E.opts.strictSchema){if(O){if(p=`strict mode: ${p}`,O===!0)throw new Error(p);E.self.logger.warn(p)}}t.checkStrictMode=I})(pn);var Fc={};Object.defineProperty(Fc,"__esModule",{value:!0});const Sa=Tr,YTe={data:new Sa.Name("data"),valCxt:new Sa.Name("valCxt"),instancePath:new Sa.Name("instancePath"),parentData:new Sa.Name("parentData"),parentDataProperty:new Sa.Name("parentDataProperty"),rootData:new Sa.Name("rootData"),dynamicAnchors:new Sa.Name("dynamicAnchors"),vErrors:new Sa.Name("vErrors"),errors:new Sa.Name("errors"),this:new Sa.Name("this"),self:new Sa.Name("self"),scope:new Sa.Name("scope"),json:new Sa.Name("json"),jsonPos:new Sa.Name("jsonPos"),jsonLen:new Sa.Name("jsonLen"),jsonPart:new Sa.Name("jsonPart")};Fc.default=YTe;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=Tr,r=pn,n=Fc;t.keywordError={message:({keyword:y})=>(0,e.str)`must pass "${y}" keyword validation`},t.keyword$DataError={message:({keyword:y,schemaType:_})=>_?(0,e.str)`"${y}" keyword must be ${_} ($data)`:(0,e.str)`"${y}" keyword is invalid ($data)`};function i(y,_=t.keywordError,b,S){const{it:x}=y,{gen:I,compositeRule:E,allErrors:p}=x,O=d(y,_,b);S??(E||p)?c(I,O):u(x,(0,e._)`[${O}]`)}t.reportError=i;function a(y,_=t.keywordError,b){const{it:S}=y,{gen:x,compositeRule:I,allErrors:E}=S,p=d(y,_,b);c(x,p),I||E||u(S,n.default.vErrors)}t.reportExtraError=a;function o(y,_){y.assign(n.default.errors,_),y.if((0,e._)`${n.default.vErrors} !== null`,()=>y.if(_,()=>y.assign((0,e._)`${n.default.vErrors}.length`,_),()=>y.assign(n.default.vErrors,null)))}t.resetErrorsCount=o;function s({gen:y,keyword:_,schemaValue:b,data:S,errsCount:x,it:I}){if(x===void 0)throw new Error("ajv implementation error");const E=y.name("err");y.forRange("i",x,n.default.errors,p=>{y.const(E,(0,e._)`${n.default.vErrors}[${p}]`),y.if((0,e._)`${E}.instancePath === undefined`,()=>y.assign((0,e._)`${E}.instancePath`,(0,e.strConcat)(n.default.instancePath,I.errorPath))),y.assign((0,e._)`${E}.schemaPath`,(0,e.str)`${I.errSchemaPath}/${_}`),I.opts.verbose&&(y.assign((0,e._)`${E}.schema`,b),y.assign((0,e._)`${E}.data`,S))})}t.extendErrors=s;function c(y,_){const b=y.const("err",_);y.if((0,e._)`${n.default.vErrors} === null`,()=>y.assign(n.default.vErrors,(0,e._)`[${b}]`),(0,e._)`${n.default.vErrors}.push(${b})`),y.code((0,e._)`${n.default.errors}++`)}function u(y,_){const{gen:b,validateName:S,schemaEnv:x}=y;x.$async?b.throw((0,e._)`new ${y.ValidationError}(${_})`):(b.assign((0,e._)`${S}.errors`,_),b.return(!1))}const f={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(y,_,b){const{createErrors:S}=y.it;return S===!1?(0,e._)`{}`:g(y,_,b)}function g(y,_,b={}){const{gen:S,it:x}=y,I=[m(x,b),w(y,b)];return v(y,_,I),S.object(...I)}function m({errorPath:y},{instancePath:_}){const b=_?(0,e.str)`${y}${(0,r.getErrorPath)(_,r.Type.Str)}`:y;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,b)]}function w({keyword:y,it:{errSchemaPath:_}},{schemaPath:b,parentSchema:S}){let x=S?_:(0,e.str)`${_}/${y}`;return b&&(x=(0,e.str)`${x}${(0,r.getErrorPath)(b,r.Type.Str)}`),[f.schemaPath,x]}function v(y,{params:_,message:b},S){const{keyword:x,data:I,schemaValue:E,it:p}=y,{opts:O,propertyName:C,topSchemaRef:M,schemaPath:B}=p;S.push([f.keyword,x],[f.params,typeof _=="function"?_(y):_||(0,e._)`{}`]),O.messages&&S.push([f.message,typeof b=="function"?b(y):b]),O.verbose&&S.push([f.schema,E],[f.parentSchema,(0,e._)`${M}${B}`],[n.default.data,I]),C&&S.push([f.propertyName,C])}})(cm);Object.defineProperty(Ny,"__esModule",{value:!0});Ny.boolOrEmptySchema=Ny.topBoolOrEmptySchema=void 0;const QTe=cm,JTe=Tr,XTe=Fc,ZTe={message:"boolean schema is false"};function eRe(t){const{gen:e,schema:r,validateName:n}=t;r===!1?cie(t,!1):typeof r=="object"&&r.$async===!0?e.return(XTe.default.data):(e.assign((0,JTe._)`${n}.errors`,null),e.return(!0))}Ny.topBoolOrEmptySchema=eRe;function tRe(t,e){const{gen:r,schema:n}=t;n===!1?(r.var(e,!1),cie(t)):r.var(e,!0)}Ny.boolOrEmptySchema=tRe;function cie(t,e){const{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,QTe.reportError)(i,ZTe,void 0,e)}var Nw={},hp={};Object.defineProperty(hp,"__esModule",{value:!0});hp.getRules=hp.isJSONType=void 0;const rRe=["string","number","integer","boolean","null","object","array"],nRe=new Set(rRe);function iRe(t){return typeof t=="string"&&nRe.has(t)}hp.isJSONType=iRe;function aRe(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}hp.getRules=aRe;var Pl={};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.shouldUseRule=Pl.shouldUseGroup=Pl.schemaHasRulesForType=void 0;function oRe({schema:t,self:e},r){const n=e.RULES.types[r];return n&&n!==!0&&uie(t,n)}Pl.schemaHasRulesForType=oRe;function uie(t,e){return e.rules.some(r=>lie(t,r))}Pl.shouldUseGroup=uie;function lie(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Pl.shouldUseRule=lie;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const e=hp,r=Pl,n=cm,i=Tr,a=pn;var o;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(o=t.DataType||(t.DataType={}));function s(S){const x=c(S.type);if(x.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!x.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&x.push("null")}return x}t.getSchemaTypes=s;function c(S){const x=Array.isArray(S)?S:S?[S]:[];if(x.every(e.isJSONType))return x;throw new Error("type must be JSONType or JSONType[]: "+x.join(","))}t.getJSONTypes=c;function u(S,x){const{gen:I,data:E,opts:p}=S,O=d(x,p.coerceTypes),C=x.length>0&&!(O.length===0&&x.length===1&&(0,r.schemaHasRulesForType)(S,x[0]));if(C){const M=v(x,E,p.strictNumbers,o.Wrong);I.if(M,()=>{O.length?g(S,x,O):_(S)})}return C}t.coerceAndCheckDataType=u;const f=new Set(["string","number","integer","boolean","null"]);function d(S,x){return x?S.filter(I=>f.has(I)||x==="array"&&I==="array"):[]}function g(S,x,I){const{gen:E,data:p,opts:O}=S,C=E.let("dataType",(0,i._)`typeof ${p}`),M=E.let("coerced",(0,i._)`undefined`);O.coerceTypes==="array"&&E.if((0,i._)`${C} == 'object' && Array.isArray(${p}) && ${p}.length == 1`,()=>E.assign(p,(0,i._)`${p}[0]`).assign(C,(0,i._)`typeof ${p}`).if(v(x,p,O.strictNumbers),()=>E.assign(M,p))),E.if((0,i._)`${M} !== undefined`);for(const ce of I)(f.has(ce)||ce==="array"&&O.coerceTypes==="array")&&B(ce);E.else(),_(S),E.endIf(),E.if((0,i._)`${M} !== undefined`,()=>{E.assign(p,M),m(S,M)});function B(ce){switch(ce){case"string":E.elseIf((0,i._)`${C} == "number" || ${C} == "boolean"`).assign(M,(0,i._)`"" + ${p}`).elseIf((0,i._)`${p} === null`).assign(M,(0,i._)`""`);return;case"number":E.elseIf((0,i._)`${C} == "boolean" || ${p} === null
|
|
104
|
-
|| (${C} == "string" && ${p} && ${p} == +${p})`).assign(M,(0,i._)`+${p}`);return;case"integer":E.elseIf((0,i._)`${C} === "boolean" || ${p} === null
|
|
105
|
-
|| (${C} === "string" && ${p} && ${p} == +${p} && !(${p} % 1))`).assign(M,(0,i._)`+${p}`);return;case"boolean":E.elseIf((0,i._)`${p} === "false" || ${p} === 0 || ${p} === null`).assign(M,!1).elseIf((0,i._)`${p} === "true" || ${p} === 1`).assign(M,!0);return;case"null":E.elseIf((0,i._)`${p} === "" || ${p} === 0 || ${p} === false`),E.assign(M,null);return;case"array":E.elseIf((0,i._)`${C} === "string" || ${C} === "number"
|
|
106
|
-
|| ${C} === "boolean" || ${p} === null`).assign(M,(0,i._)`[${p}]`)}}}function m({gen:S,parentData:x,parentDataProperty:I},E){S.if((0,i._)`${x} !== undefined`,()=>S.assign((0,i._)`${x}[${I}]`,E))}function w(S,x,I,E=o.Correct){const p=E===o.Correct?i.operators.EQ:i.operators.NEQ;let O;switch(S){case"null":return(0,i._)`${x} ${p} null`;case"array":O=(0,i._)`Array.isArray(${x})`;break;case"object":O=(0,i._)`${x} && typeof ${x} == "object" && !Array.isArray(${x})`;break;case"integer":O=C((0,i._)`!(${x} % 1) && !isNaN(${x})`);break;case"number":O=C();break;default:return(0,i._)`typeof ${x} ${p} ${S}`}return E===o.Correct?O:(0,i.not)(O);function C(M=i.nil){return(0,i.and)((0,i._)`typeof ${x} == "number"`,M,I?(0,i._)`isFinite(${x})`:i.nil)}}t.checkDataType=w;function v(S,x,I,E){if(S.length===1)return w(S[0],x,I,E);let p;const O=(0,a.toHash)(S);if(O.array&&O.object){const C=(0,i._)`typeof ${x} != "object"`;p=O.null?C:(0,i._)`!${x} || ${C}`,delete O.null,delete O.array,delete O.object}else p=i.nil;O.number&&delete O.integer;for(const C in O)p=(0,i.and)(p,w(C,x,I,E));return p}t.checkDataTypes=v;const y={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:x})=>typeof S=="string"?(0,i._)`{type: ${S}}`:(0,i._)`{type: ${x}}`};function _(S){const x=b(S);(0,n.reportError)(x,y)}t.reportTypeError=_;function b(S){const{gen:x,data:I,schema:E}=S,p=(0,a.schemaRefOrVal)(S,E,"type");return{gen:x,keyword:"type",data:I,schema:E.type,schemaCode:p,schemaValue:p,parentSchema:E,params:{},it:S}}})(Nw);var BS={};Object.defineProperty(BS,"__esModule",{value:!0});BS.assignDefaults=void 0;const y0=Tr,sRe=pn;function cRe(t,e){const{properties:r,items:n}=t.schema;if(e==="object"&&r)for(const i in r)uW(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,a)=>uW(t,a,i.default))}BS.assignDefaults=cRe;function uW(t,e,r){const{gen:n,compositeRule:i,data:a,opts:o}=t;if(r===void 0)return;const s=(0,y0._)`${a}${(0,y0.getProperty)(e)}`;if(i){(0,sRe.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,y0._)`${s} === undefined`;o.useDefaults==="empty"&&(c=(0,y0._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,y0._)`${s} = ${(0,y0.stringify)(r)}`)}var yu={},Kr={};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.validateUnion=Kr.validateArray=Kr.usePattern=Kr.callValidateCode=Kr.schemaProperties=Kr.allSchemaProperties=Kr.noPropertyInData=Kr.propertyInData=Kr.isOwnProperty=Kr.hasPropFunc=Kr.reportMissingProp=Kr.checkMissingProp=Kr.checkReportMissingProp=void 0;const Jn=Tr,EM=pn,ff=Fc,uRe=pn;function lRe(t,e){const{gen:r,data:n,it:i}=t;r.if(AM(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Jn._)`${e}`},!0),t.error()})}Kr.checkReportMissingProp=lRe;function fRe({gen:t,data:e,it:{opts:r}},n,i){return(0,Jn.or)(...n.map(a=>(0,Jn.and)(AM(t,e,a,r.ownProperties),(0,Jn._)`${i} = ${a}`)))}Kr.checkMissingProp=fRe;function dRe(t,e){t.setParams({missingProperty:e},!0),t.error()}Kr.reportMissingProp=dRe;function fie(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Jn._)`Object.prototype.hasOwnProperty`})}Kr.hasPropFunc=fie;function xM(t,e,r){return(0,Jn._)`${fie(t)}.call(${e}, ${r})`}Kr.isOwnProperty=xM;function hRe(t,e,r,n){const i=(0,Jn._)`${e}${(0,Jn.getProperty)(r)} !== undefined`;return n?(0,Jn._)`${i} && ${xM(t,e,r)}`:i}Kr.propertyInData=hRe;function AM(t,e,r,n){const i=(0,Jn._)`${e}${(0,Jn.getProperty)(r)} === undefined`;return n?(0,Jn.or)(i,(0,Jn.not)(xM(t,e,r))):i}Kr.noPropertyInData=AM;function die(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Kr.allSchemaProperties=die;function pRe(t,e){return die(e).filter(r=>!(0,EM.alwaysValidSchema)(t,e[r]))}Kr.schemaProperties=pRe;function gRe({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:o},s,c,u){const f=u?(0,Jn._)`${t}, ${e}, ${n}${i}`:e,d=[[ff.default.instancePath,(0,Jn.strConcat)(ff.default.instancePath,a)],[ff.default.parentData,o.parentData],[ff.default.parentDataProperty,o.parentDataProperty],[ff.default.rootData,ff.default.rootData]];o.opts.dynamicRef&&d.push([ff.default.dynamicAnchors,ff.default.dynamicAnchors]);const g=(0,Jn._)`${f}, ${r.object(...d)}`;return c!==Jn.nil?(0,Jn._)`${s}.call(${c}, ${g})`:(0,Jn._)`${s}(${g})`}Kr.callValidateCode=gRe;const yRe=(0,Jn._)`new RegExp`;function mRe({gen:t,it:{opts:e}},r){const n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,a=i(r,n);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,Jn._)`${i.code==="new RegExp"?yRe:(0,uRe.useFunc)(t,i)}(${r}, ${n})`})}Kr.usePattern=mRe;function vRe(t){const{gen:e,data:r,keyword:n,it:i}=t,a=e.name("valid");if(i.allErrors){const s=e.let("valid",!0);return o(()=>e.assign(s,!1)),s}return e.var(a,!0),o(()=>e.break()),a;function o(s){const c=e.const("len",(0,Jn._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:EM.Type.Num},a),e.if((0,Jn.not)(a),s)})}}Kr.validateArray=vRe;function bRe(t){const{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,EM.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;const o=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((c,u)=>{const f=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},s);e.assign(o,(0,Jn._)`${o} || ${s}`),t.mergeValidEvaluated(f,s)||e.if((0,Jn.not)(o))})),t.result(o,()=>t.reset(),()=>t.error(!0))}Kr.validateUnion=bRe;Object.defineProperty(yu,"__esModule",{value:!0});yu.validateKeywordUsage=yu.validSchemaType=yu.funcKeywordCode=yu.macroKeywordCode=void 0;const Za=Tr,dh=Fc,wRe=Kr,_Re=cm;function ERe(t,e){const{gen:r,keyword:n,schema:i,parentSchema:a,it:o}=t,s=e.macro.call(o.self,i,a,o),c=hie(r,n,s);o.opts.validateSchema!==!1&&o.self.validateSchema(s,!0);const u=r.name("valid");t.subschema({schema:s,schemaPath:Za.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}yu.macroKeywordCode=ERe;function xRe(t,e){var r;const{gen:n,keyword:i,schema:a,parentSchema:o,$data:s,it:c}=t;SRe(c,e);const u=!s&&e.compile?e.compile.call(c.self,a,o,c):e.validate,f=hie(n,i,u),d=n.let("valid");t.block$data(d,g),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function g(){if(e.errors===!1)v(),e.modifying&&lW(t),y(()=>t.error());else{const _=e.async?m():w();e.modifying&&lW(t),y(()=>ARe(t,_))}}function m(){const _=n.let("ruleErrs",null);return n.try(()=>v((0,Za._)`await `),b=>n.assign(d,!1).if((0,Za._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(_,(0,Za._)`${b}.errors`),()=>n.throw(b))),_}function w(){const _=(0,Za._)`${f}.errors`;return n.assign(_,null),v(Za.nil),_}function v(_=e.async?(0,Za._)`await `:Za.nil){const b=c.opts.passContext?dh.default.this:dh.default.self,S=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,Za._)`${_}${(0,wRe.callValidateCode)(t,f,b,S)}`,e.modifying)}function y(_){var b;n.if((0,Za.not)((b=e.valid)!==null&&b!==void 0?b:d),_)}}yu.funcKeywordCode=xRe;function lW(t){const{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Za._)`${n.parentData}[${n.parentDataProperty}]`))}function ARe(t,e){const{gen:r}=t;r.if((0,Za._)`Array.isArray(${e})`,()=>{r.assign(dh.default.vErrors,(0,Za._)`${dh.default.vErrors} === null ? ${e} : ${dh.default.vErrors}.concat(${e})`).assign(dh.default.errors,(0,Za._)`${dh.default.vErrors}.length`),(0,_Re.extendErrors)(t)},()=>t.error())}function SRe({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function hie(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Za.stringify)(r)})}function IRe(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}yu.validSchemaType=IRe;function ORe({schema:t,opts:e,self:r,errSchemaPath:n},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw new Error("ajv implementation error");const o=i.dependencies;if(o!=null&&o.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${a}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[a])){const c=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}yu.validateKeywordUsage=ORe;var ad={};Object.defineProperty(ad,"__esModule",{value:!0});ad.extendSubschemaMode=ad.extendSubschemaData=ad.getSubschema=void 0;const du=Tr,pie=pn;function PRe(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:a,topSchemaRef:o}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,du._)`${t.schemaPath}${(0,du.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,du._)`${t.schemaPath}${(0,du.getProperty)(e)}${(0,du.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,pie.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||a===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}ad.getSubschema=PRe;function TRe(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:a,propertyName:o}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:s}=e;if(r!==void 0){const{errorPath:u,dataPathArr:f,opts:d}=e,g=s.let("data",(0,du._)`${e.data}${(0,du.getProperty)(r)}`,!0);c(g),t.errorPath=(0,du.str)`${u}${(0,pie.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,du._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(i!==void 0){const u=i instanceof du.Name?i:s.let("data",i,!0);c(u),o!==void 0&&(t.propertyName=o)}a&&(t.dataTypes=a);function c(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}ad.extendSubschemaData=TRe;function RRe(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:a}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),a!==void 0&&(t.allErrors=a),t.jtdDiscriminator=e,t.jtdMetadata=r}ad.extendSubschemaMode=RRe;var pa={},SM=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var o=a[i];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r},gie={exports:{}},Wf=gie.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Ox(e,n,i,t,"",t)};Wf.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Wf.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Wf.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Wf.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Ox(t,e,r,n,i,a,o,s,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,a,o,s,c,u);for(var f in n){var d=n[f];if(Array.isArray(d)){if(f in Wf.arrayKeywords)for(var g=0;g<d.length;g++)Ox(t,e,r,d[g],i+"/"+f+"/"+g,a,i,f,n,g)}else if(f in Wf.propsKeywords){if(d&&typeof d=="object")for(var m in d)Ox(t,e,r,d[m],i+"/"+f+"/"+CRe(m),a,i,f,n,m)}else(f in Wf.keywords||t.allKeys&&!(f in Wf.skipKeywords))&&Ox(t,e,r,d,i+"/"+f,a,i,f,n)}r(n,i,a,o,s,c,u)}}function CRe(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var NRe=gie.exports;Object.defineProperty(pa,"__esModule",{value:!0});pa.getSchemaRefs=pa.resolveUrl=pa.normalizeId=pa._getFullPath=pa.getFullPath=pa.inlineRef=void 0;const DRe=pn,$Re=SM,MRe=NRe,kRe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function LRe(t,e=!0){return typeof t=="boolean"?!0:e===!0?!y5(t):e?yie(t)<=e:!1}pa.inlineRef=LRe;const URe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function y5(t){for(const e in t){if(URe.has(e))return!0;const r=t[e];if(Array.isArray(r)&&r.some(y5)||typeof r=="object"&&y5(r))return!0}return!1}function yie(t){let e=0;for(const r in t){if(r==="$ref")return 1/0;if(e++,!kRe.has(r)&&(typeof t[r]=="object"&&(0,DRe.eachItem)(t[r],n=>e+=yie(n)),e===1/0))return 1/0}return e}function mie(t,e="",r){r!==!1&&(e=mg(e));const n=t.parse(e);return vie(t,n)}pa.getFullPath=mie;function vie(t,e){return t.serialize(e).split("#")[0]+"#"}pa._getFullPath=vie;const BRe=/#\/?$/;function mg(t){return t?t.replace(BRe,""):""}pa.normalizeId=mg;function FRe(t,e,r){return r=mg(r),t.resolve(e,r)}pa.resolveUrl=FRe;const jRe=/^[a-z_][-a-z0-9._]*$/i;function qRe(t,e){if(typeof t=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,i=mg(t[r]||e),a={"":i},o=mie(n,i,!1),s={},c=new Set;return MRe(t,{allKeys:!0},(d,g,m,w)=>{if(w===void 0)return;const v=o+g;let y=a[w];typeof d[r]=="string"&&(y=_.call(this,d[r])),b.call(this,d.$anchor),b.call(this,d.$dynamicAnchor),a[g]=y;function _(S){const x=this.opts.uriResolver.resolve;if(S=mg(y?x(y,S):S),c.has(S))throw f(S);c.add(S);let I=this.refs[S];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?u(d,I.schema,S):S!==mg(v)&&(S[0]==="#"?(u(d,s[S],S),s[S]=d):this.refs[S]=v),S}function b(S){if(typeof S=="string"){if(!jRe.test(S))throw new Error(`invalid anchor "${S}"`);_.call(this,`#${S}`)}}}),s;function u(d,g,m){if(g!==void 0&&!$Re(d,g))throw f(m)}function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}}pa.getSchemaRefs=qRe;Object.defineProperty(Fs,"__esModule",{value:!0});Fs.getData=Fs.KeywordCxt=Fs.validateFunctionCode=void 0;const bie=Ny,fW=Nw,IM=Pl,qA=Nw,HRe=BS,Wb=yu,fN=ad,er=Tr,Or=Fc,VRe=pa,Tl=pn,Iv=cm;function zRe(t){if(Eie(t)&&(xie(t),_ie(t))){KRe(t);return}wie(t,()=>(0,bie.topBoolOrEmptySchema)(t))}Fs.validateFunctionCode=zRe;function wie({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},a){i.code.es5?t.func(e,(0,er._)`${Or.default.data}, ${Or.default.valCxt}`,n.$async,()=>{t.code((0,er._)`"use strict"; ${dW(r,i)}`),WRe(t,i),t.code(a)}):t.func(e,(0,er._)`${Or.default.data}, ${GRe(i)}`,n.$async,()=>t.code(dW(r,i)).code(a))}function GRe(t){return(0,er._)`{${Or.default.instancePath}="", ${Or.default.parentData}, ${Or.default.parentDataProperty}, ${Or.default.rootData}=${Or.default.data}${t.dynamicRef?(0,er._)`, ${Or.default.dynamicAnchors}={}`:er.nil}}={}`}function WRe(t,e){t.if(Or.default.valCxt,()=>{t.var(Or.default.instancePath,(0,er._)`${Or.default.valCxt}.${Or.default.instancePath}`),t.var(Or.default.parentData,(0,er._)`${Or.default.valCxt}.${Or.default.parentData}`),t.var(Or.default.parentDataProperty,(0,er._)`${Or.default.valCxt}.${Or.default.parentDataProperty}`),t.var(Or.default.rootData,(0,er._)`${Or.default.valCxt}.${Or.default.rootData}`),e.dynamicRef&&t.var(Or.default.dynamicAnchors,(0,er._)`${Or.default.valCxt}.${Or.default.dynamicAnchors}`)},()=>{t.var(Or.default.instancePath,(0,er._)`""`),t.var(Or.default.parentData,(0,er._)`undefined`),t.var(Or.default.parentDataProperty,(0,er._)`undefined`),t.var(Or.default.rootData,Or.default.data),e.dynamicRef&&t.var(Or.default.dynamicAnchors,(0,er._)`{}`)})}function KRe(t){const{schema:e,opts:r,gen:n}=t;wie(t,()=>{r.$comment&&e.$comment&&Sie(t),ZRe(t),n.let(Or.default.vErrors,null),n.let(Or.default.errors,0),r.unevaluated&&YRe(t),Aie(t),rCe(t)})}function YRe(t){const{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,er._)`${r}.evaluated`),e.if((0,er._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,er._)`${t.evaluated}.props`,(0,er._)`undefined`)),e.if((0,er._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,er._)`${t.evaluated}.items`,(0,er._)`undefined`))}function dW(t,e){const r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,er._)`/*# sourceURL=${r} */`:er.nil}function QRe(t,e){if(Eie(t)&&(xie(t),_ie(t))){JRe(t,e);return}(0,bie.boolOrEmptySchema)(t,e)}function _ie({schema:t,self:e}){if(typeof t=="boolean")return!t;for(const r in t)if(e.RULES.all[r])return!0;return!1}function Eie(t){return typeof t.schema!="boolean"}function JRe(t,e){const{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&Sie(t),eCe(t),tCe(t);const a=n.const("_errs",Or.default.errors);Aie(t,a),n.var(e,(0,er._)`${a} === ${Or.default.errors}`)}function xie(t){(0,Tl.checkUnknownRules)(t),XRe(t)}function Aie(t,e){if(t.opts.jtd)return hW(t,[],!1,e);const r=(0,fW.getSchemaTypes)(t.schema),n=(0,fW.coerceAndCheckDataType)(t,r);hW(t,r,!n,e)}function XRe(t){const{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Tl.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function ZRe(t){const{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Tl.checkStrictMode)(t,"default is ignored in the schema root")}function eCe(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,VRe.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function tCe(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Sie({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){const a=r.$comment;if(i.$comment===!0)t.code((0,er._)`${Or.default.self}.logger.log(${a})`);else if(typeof i.$comment=="function"){const o=(0,er.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,er._)`${Or.default.self}.opts.$comment(${a}, ${o}, ${s}.schema)`)}}function rCe(t){const{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:a}=t;r.$async?e.if((0,er._)`${Or.default.errors} === 0`,()=>e.return(Or.default.data),()=>e.throw((0,er._)`new ${i}(${Or.default.vErrors})`)):(e.assign((0,er._)`${n}.errors`,Or.default.vErrors),a.unevaluated&&nCe(t),e.return((0,er._)`${Or.default.errors} === 0`))}function nCe({gen:t,evaluated:e,props:r,items:n}){r instanceof er.Name&&t.assign((0,er._)`${e}.props`,r),n instanceof er.Name&&t.assign((0,er._)`${e}.items`,n)}function hW(t,e,r,n){const{gen:i,schema:a,data:o,allErrors:s,opts:c,self:u}=t,{RULES:f}=u;if(a.$ref&&(c.ignoreKeywordsWithRef||!(0,Tl.schemaHasRulesButRef)(a,f))){i.block(()=>Pie(t,"$ref",f.all.$ref.definition));return}c.jtd||iCe(t,e),i.block(()=>{for(const g of f.rules)d(g);d(f.post)});function d(g){(0,IM.shouldUseGroup)(a,g)&&(g.type?(i.if((0,qA.checkDataType)(g.type,o,c.strictNumbers)),pW(t,g),e.length===1&&e[0]===g.type&&r&&(i.else(),(0,qA.reportTypeError)(t)),i.endIf()):pW(t,g),s||i.if((0,er._)`${Or.default.errors} === ${n||0}`))}}function pW(t,e){const{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,HRe.assignDefaults)(t,e.type),r.block(()=>{for(const a of e.rules)(0,IM.shouldUseRule)(n,a)&&Pie(t,a.keyword,a.definition,e.type)})}function iCe(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(aCe(t,e),t.opts.allowUnionTypes||oCe(t,e),sCe(t,t.dataTypes))}function aCe(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Iie(t.dataTypes,r)||OM(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),uCe(t,e)}}function oCe(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&OM(t,"use allowUnionTypes to allow union type keyword")}function sCe(t,e){const r=t.self.RULES.all;for(const n in r){const i=r[n];if(typeof i=="object"&&(0,IM.shouldUseRule)(t.schema,i)){const{type:a}=i.definition;a.length&&!a.some(o=>cCe(e,o))&&OM(t,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function cCe(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Iie(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function uCe(t,e){const r=[];for(const n of t.dataTypes)Iie(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function OM(t,e){const r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Tl.checkStrictMode)(t,e,t.opts.strictTypes)}class Oie{constructor(e,r,n){if((0,Wb.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Tl.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Tie(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Wb.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Or.default.errors))}result(e,r,n){this.failResult((0,er.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,er.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:r}=this;this.fail((0,er._)`${r} !== undefined && (${(0,er.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Iv.reportExtraError:Iv.reportError)(this,this.def.error,r)}$dataError(){(0,Iv.reportError)(this,this.def.$dataError||Iv.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Iv.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=er.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=er.nil,r=er.nil){if(!this.$data)return;const{gen:n,schemaCode:i,schemaType:a,def:o}=this;n.if((0,er.or)((0,er._)`${i} === undefined`,r)),e!==er.nil&&n.assign(e,!0),(a.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==er.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:r,schemaType:n,def:i,it:a}=this;return(0,er.or)(o(),s());function o(){if(n.length){if(!(r instanceof er.Name))throw new Error("ajv implementation error");const c=Array.isArray(n)?n:[n];return(0,er._)`${(0,qA.checkDataTypes)(c,r,a.opts.strictNumbers,qA.DataType.Wrong)}`}return er.nil}function s(){if(i.validateSchema){const c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,er._)`!${c}(${r})`}return er.nil}}subschema(e,r){const n=(0,fN.getSubschema)(this.it,e);(0,fN.extendSubschemaData)(n,this.it,e),(0,fN.extendSubschemaMode)(n,e);const i={...this.it,...n,items:void 0,props:void 0};return QRe(i,r),i}mergeEvaluated(e,r){const{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Tl.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Tl.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){const{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,er.Name)),!0}}Fs.KeywordCxt=Oie;function Pie(t,e,r,n){const i=new Oie(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Wb.funcKeywordCode)(i,r):"macro"in r?(0,Wb.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Wb.funcKeywordCode)(i,r)}const lCe=/^\/(?:[^~]|~0|~1)*$/,fCe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Tie(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,a;if(t==="")return Or.default.rootData;if(t[0]==="/"){if(!lCe.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,a=Or.default.rootData}else{const u=fCe.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);const f=+u[1];if(i=u[2],i==="#"){if(f>=e)throw new Error(c("property/index",f));return n[e-f]}if(f>e)throw new Error(c("data",f));if(a=r[e-f],!i)return a}let o=a;const s=i.split("/");for(const u of s)u&&(a=(0,er._)`${a}${(0,er.getProperty)((0,Tl.unescapeJsonPointer)(u))}`,o=(0,er._)`${o} && ${a}`);return o;function c(u,f){return`Cannot access ${u} ${f} levels up, current level is ${e}`}}Fs.getData=Tie;var Dw={};Object.defineProperty(Dw,"__esModule",{value:!0});class dCe extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}Dw.default=dCe;var $w={};Object.defineProperty($w,"__esModule",{value:!0});const dN=pa;class hCe extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,dN.resolveUrl)(e,r,n),this.missingSchema=(0,dN.normalizeId)((0,dN.getFullPath)(e,this.missingRef))}}$w.default=hCe;var Ro={};Object.defineProperty(Ro,"__esModule",{value:!0});Ro.resolveSchema=Ro.getCompilingSchema=Ro.resolveRef=Ro.compileSchema=Ro.SchemaEnv=void 0;const uc=Tr,pCe=Dw,Zd=Fc,Sc=pa,gW=pn,gCe=Fs;class FS{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Sc.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}Ro.SchemaEnv=FS;function PM(t){const e=Rie.call(this,t);if(e)return e;const r=(0,Sc.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,o=new uc.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a});let s;t.$async&&(s=o.scopeValue("Error",{ref:pCe.default,code:(0,uc._)`require("ajv/dist/runtime/validation_error").default`}));const c=o.scopeName("validate");t.validateName=c;const u={gen:o,allErrors:this.opts.allErrors,data:Zd.default.data,parentData:Zd.default.parentData,parentDataProperty:Zd.default.parentDataProperty,dataNames:[Zd.default.data],dataPathArr:[uc.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,uc.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:uc.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,uc._)`""`,opts:this.opts,self:this};let f;try{this._compilations.add(t),(0,gCe.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);const d=o.toString();f=`${o.scopeRefs(Zd.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,t));const m=new Function(`${Zd.default.self}`,`${Zd.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:o._values}),this.opts.unevaluated){const{props:w,items:v}=u;m.evaluated={props:w instanceof uc.Name?void 0:w,items:v instanceof uc.Name?void 0:v,dynamicProps:w instanceof uc.Name,dynamicItems:v instanceof uc.Name},m.source&&(m.source.evaluated=(0,uc.stringify)(m.evaluated))}return t.validate=m,t}catch(d){throw delete t.validate,delete t.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(t)}}Ro.compileSchema=PM;function yCe(t,e,r){var n;r=(0,Sc.resolveUrl)(this.opts.uriResolver,e,r);const i=t.refs[r];if(i)return i;let a=bCe.call(this,t,r);if(a===void 0){const o=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;o&&(a=new FS({schema:o,schemaId:s,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=mCe.call(this,a)}Ro.resolveRef=yCe;function mCe(t){return(0,Sc.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:PM.call(this,t)}function Rie(t){for(const e of this._compilations)if(vCe(e,t))return e}Ro.getCompilingSchema=Rie;function vCe(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function bCe(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||jS.call(this,t,e)}function jS(t,e){const r=this.opts.uriResolver.parse(e),n=(0,Sc._getFullPath)(this.opts.uriResolver,r);let i=(0,Sc.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return hN.call(this,r,t);const a=(0,Sc.normalizeId)(n),o=this.refs[a]||this.schemas[a];if(typeof o=="string"){const s=jS.call(this,t,o);return typeof(s==null?void 0:s.schema)!="object"?void 0:hN.call(this,r,s)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||PM.call(this,o),a===(0,Sc.normalizeId)(e)){const{schema:s}=o,{schemaId:c}=this.opts,u=s[c];return u&&(i=(0,Sc.resolveUrl)(this.opts.uriResolver,i,u)),new FS({schema:s,schemaId:c,root:t,baseId:i})}return hN.call(this,r,o)}}Ro.resolveSchema=jS;const wCe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function hN(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const c=r[(0,gW.unescapeFragment)(s)];if(c===void 0)return;r=c;const u=typeof r=="object"&&r[this.opts.schemaId];!wCe.has(s)&&u&&(e=(0,Sc.resolveUrl)(this.opts.uriResolver,e,u))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,gW.schemaHasRulesButRef)(r,this.RULES)){const s=(0,Sc.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=jS.call(this,n,s)}const{schemaId:o}=this.opts;if(a=a||new FS({schema:r,schemaId:o,root:n,baseId:e}),a.schema!==a.root.schema)return a}const _Ce="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",ECe="Meta-schema for $data reference (JSON AnySchema extension proposal)",xCe="object",ACe=["$data"],SCe={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ICe=!1,OCe={$id:_Ce,description:ECe,type:xCe,required:ACe,properties:SCe,additionalProperties:ICe};var TM={},m5={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(t,e){(function(r,n){n(e)})(Ne,function(r){function n(){for(var le=arguments.length,Z=Array(le),ye=0;ye<le;ye++)Z[ye]=arguments[ye];if(Z.length>1){Z[0]=Z[0].slice(0,-1);for(var Me=Z.length-1,Le=1;Le<Me;++Le)Z[Le]=Z[Le].slice(1,-1);return Z[Me]=Z[Me].slice(1),Z.join("")}else return Z[0]}function i(le){return"(?:"+le+")"}function a(le){return le===void 0?"undefined":le===null?"null":Object.prototype.toString.call(le).split(" ").pop().split("]").shift().toLowerCase()}function o(le){return le.toUpperCase()}function s(le){return le!=null?le instanceof Array?le:typeof le.length!="number"||le.split||le.setInterval||le.call?[le]:Array.prototype.slice.call(le):[]}function c(le,Z){var ye=le;if(Z)for(var Me in Z)ye[Me]=Z[Me];return ye}function u(le){var Z="[A-Za-z]",ye="[0-9]",Me=n(ye,"[A-Fa-f]"),Le=i(i("%[EFef]"+Me+"%"+Me+Me+"%"+Me+Me)+"|"+i("%[89A-Fa-f]"+Me+"%"+Me+Me)+"|"+i("%"+Me+Me)),wt="[\\:\\/\\?\\#\\[\\]\\@]",It="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",gr=n(wt,It),lr=le?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",en=le?"[\\uE000-\\uF8FF]":"[]",yr=n(Z,ye,"[\\-\\.\\_\\~]",lr);i(Z+n(Z,ye,"[\\+\\-\\.]")+"*"),i(i(Le+"|"+n(yr,It,"[\\:]"))+"*");var xr=i(i("25[0-5]")+"|"+i("2[0-4]"+ye)+"|"+i("1"+ye+ye)+"|"+i("0?[1-9]"+ye)+"|0?0?"+ye),on=i(xr+"\\."+xr+"\\."+xr+"\\."+xr),sr=i(Me+"{1,4}"),Ur=i(i(sr+"\\:"+sr)+"|"+on),gn=i(i(sr+"\\:")+"{6}"+Ur),Br=i("\\:\\:"+i(sr+"\\:")+"{5}"+Ur),Zn=i(i(sr)+"?\\:\\:"+i(sr+"\\:")+"{4}"+Ur),Ii=i(i(i(sr+"\\:")+"{0,1}"+sr)+"?\\:\\:"+i(sr+"\\:")+"{3}"+Ur),ei=i(i(i(sr+"\\:")+"{0,2}"+sr)+"?\\:\\:"+i(sr+"\\:")+"{2}"+Ur),Oi=i(i(i(sr+"\\:")+"{0,3}"+sr)+"?\\:\\:"+sr+"\\:"+Ur),Pi=i(i(i(sr+"\\:")+"{0,4}"+sr)+"?\\:\\:"+Ur),oi=i(i(i(sr+"\\:")+"{0,5}"+sr)+"?\\:\\:"+sr),jn=i(i(i(sr+"\\:")+"{0,6}"+sr)+"?\\:\\:"),ra=i([gn,Br,Zn,Ii,ei,Oi,Pi,oi,jn].join("|")),$i=i(i(yr+"|"+Le)+"+");i("[vV]"+Me+"+\\."+n(yr,It,"[\\:]")+"+"),i(i(Le+"|"+n(yr,It))+"*");var _a=i(Le+"|"+n(yr,It,"[\\:\\@]"));return i(i(Le+"|"+n(yr,It,"[\\@]"))+"+"),i(i(_a+"|"+n("[\\/\\?]",en))+"*"),{NOT_SCHEME:new RegExp(n("[^]",Z,ye,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",yr,It),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",yr,It),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",yr,It),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",yr,It),"g"),NOT_QUERY:new RegExp(n("[^\\%]",yr,It,"[\\:\\@\\/\\?]",en),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",yr,It,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",yr,It),"g"),UNRESERVED:new RegExp(yr,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",yr,gr),"g"),PCT_ENCODED:new RegExp(Le,"g"),IPV4ADDRESS:new RegExp("^("+on+")$"),IPV6ADDRESS:new RegExp("^\\[?("+ra+")"+i(i("\\%25|\\%(?!"+Me+"{2})")+"("+$i+")")+"?\\]?$")}}var f=u(!1),d=u(!0),g=function(){function le(Z,ye){var Me=[],Le=!0,wt=!1,It=void 0;try{for(var gr=Z[Symbol.iterator](),lr;!(Le=(lr=gr.next()).done)&&(Me.push(lr.value),!(ye&&Me.length===ye));Le=!0);}catch(en){wt=!0,It=en}finally{try{!Le&&gr.return&&gr.return()}finally{if(wt)throw It}}return Me}return function(Z,ye){if(Array.isArray(Z))return Z;if(Symbol.iterator in Object(Z))return le(Z,ye);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function(le){if(Array.isArray(le)){for(var Z=0,ye=Array(le.length);Z<le.length;Z++)ye[Z]=le[Z];return ye}else return Array.from(le)},w=2147483647,v=36,y=1,_=26,b=38,S=700,x=72,I=128,E="-",p=/^xn--/,O=/[^\0-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=v-y,ce=Math.floor,he=String.fromCharCode;function F(le){throw new RangeError(M[le])}function U(le,Z){for(var ye=[],Me=le.length;Me--;)ye[Me]=Z(le[Me]);return ye}function K(le,Z){var ye=le.split("@"),Me="";ye.length>1&&(Me=ye[0]+"@",le=ye[1]),le=le.replace(C,".");var Le=le.split("."),wt=U(Le,Z).join(".");return Me+wt}function ne(le){for(var Z=[],ye=0,Me=le.length;ye<Me;){var Le=le.charCodeAt(ye++);if(Le>=55296&&Le<=56319&&ye<Me){var wt=le.charCodeAt(ye++);(wt&64512)==56320?Z.push(((Le&1023)<<10)+(wt&1023)+65536):(Z.push(Le),ye--)}else Z.push(Le)}return Z}var j=function(Z){return String.fromCodePoint.apply(String,m(Z))},q=function(Z){return Z-48<10?Z-22:Z-65<26?Z-65:Z-97<26?Z-97:v},V=function(Z,ye){return Z+22+75*(Z<26)-((ye!=0)<<5)},$=function(Z,ye,Me){var Le=0;for(Z=Me?ce(Z/S):Z>>1,Z+=ce(Z/ye);Z>B*_>>1;Le+=v)Z=ce(Z/B);return ce(Le+(B+1)*Z/(Z+b))},H=function(Z){var ye=[],Me=Z.length,Le=0,wt=I,It=x,gr=Z.lastIndexOf(E);gr<0&&(gr=0);for(var lr=0;lr<gr;++lr)Z.charCodeAt(lr)>=128&&F("not-basic"),ye.push(Z.charCodeAt(lr));for(var en=gr>0?gr+1:0;en<Me;){for(var yr=Le,xr=1,on=v;;on+=v){en>=Me&&F("invalid-input");var sr=q(Z.charCodeAt(en++));(sr>=v||sr>ce((w-Le)/xr))&&F("overflow"),Le+=sr*xr;var Ur=on<=It?y:on>=It+_?_:on-It;if(sr<Ur)break;var gn=v-Ur;xr>ce(w/gn)&&F("overflow"),xr*=gn}var Br=ye.length+1;It=$(Le-yr,Br,yr==0),ce(Le/Br)>w-wt&&F("overflow"),wt+=ce(Le/Br),Le%=Br,ye.splice(Le++,0,wt)}return String.fromCodePoint.apply(String,ye)},L=function(Z){var ye=[];Z=ne(Z);var Me=Z.length,Le=I,wt=0,It=x,gr=!0,lr=!1,en=void 0;try{for(var yr=Z[Symbol.iterator](),xr;!(gr=(xr=yr.next()).done);gr=!0){var on=xr.value;on<128&&ye.push(he(on))}}catch(Je){lr=!0,en=Je}finally{try{!gr&&yr.return&&yr.return()}finally{if(lr)throw en}}var sr=ye.length,Ur=sr;for(sr&&ye.push(E);Ur<Me;){var gn=w,Br=!0,Zn=!1,Ii=void 0;try{for(var ei=Z[Symbol.iterator](),Oi;!(Br=(Oi=ei.next()).done);Br=!0){var Pi=Oi.value;Pi>=Le&&Pi<gn&&(gn=Pi)}}catch(Je){Zn=!0,Ii=Je}finally{try{!Br&&ei.return&&ei.return()}finally{if(Zn)throw Ii}}var oi=Ur+1;gn-Le>ce((w-wt)/oi)&&F("overflow"),wt+=(gn-Le)*oi,Le=gn;var jn=!0,ra=!1,$i=void 0;try{for(var _a=Z[Symbol.iterator](),ss;!(jn=(ss=_a.next()).done);jn=!0){var X=ss.value;if(X<Le&&++wt>w&&F("overflow"),X==Le){for(var me=wt,re=v;;re+=v){var Ee=re<=It?y:re>=It+_?_:re-It;if(me<Ee)break;var be=me-Ee,Ie=v-Ee;ye.push(he(V(Ee+be%Ie,0))),me=ce(be/Ie)}ye.push(he(V(me,0))),It=$(wt,oi,Ur==sr),wt=0,++Ur}}}catch(Je){ra=!0,$i=Je}finally{try{!jn&&_a.return&&_a.return()}finally{if(ra)throw $i}}++wt,++Le}return ye.join("")},k=function(Z){return K(Z,function(ye){return p.test(ye)?H(ye.slice(4).toLowerCase()):ye})},G=function(Z){return K(Z,function(ye){return O.test(ye)?"xn--"+L(ye):ye})},ge={version:"2.1.0",ucs2:{decode:ne,encode:j},decode:H,encode:L,toASCII:G,toUnicode:k},Q={};function te(le){var Z=le.charCodeAt(0),ye=void 0;return Z<16?ye="%0"+Z.toString(16).toUpperCase():Z<128?ye="%"+Z.toString(16).toUpperCase():Z<2048?ye="%"+(Z>>6|192).toString(16).toUpperCase()+"%"+(Z&63|128).toString(16).toUpperCase():ye="%"+(Z>>12|224).toString(16).toUpperCase()+"%"+(Z>>6&63|128).toString(16).toUpperCase()+"%"+(Z&63|128).toString(16).toUpperCase(),ye}function ue(le){for(var Z="",ye=0,Me=le.length;ye<Me;){var Le=parseInt(le.substr(ye+1,2),16);if(Le<128)Z+=String.fromCharCode(Le),ye+=3;else if(Le>=194&&Le<224){if(Me-ye>=6){var wt=parseInt(le.substr(ye+4,2),16);Z+=String.fromCharCode((Le&31)<<6|wt&63)}else Z+=le.substr(ye,6);ye+=6}else if(Le>=224){if(Me-ye>=9){var It=parseInt(le.substr(ye+4,2),16),gr=parseInt(le.substr(ye+7,2),16);Z+=String.fromCharCode((Le&15)<<12|(It&63)<<6|gr&63)}else Z+=le.substr(ye,9);ye+=9}else Z+=le.substr(ye,3),ye+=3}return Z}function T(le,Z){function ye(Me){var Le=ue(Me);return Le.match(Z.UNRESERVED)?Le:Me}return le.scheme&&(le.scheme=String(le.scheme).replace(Z.PCT_ENCODED,ye).toLowerCase().replace(Z.NOT_SCHEME,"")),le.userinfo!==void 0&&(le.userinfo=String(le.userinfo).replace(Z.PCT_ENCODED,ye).replace(Z.NOT_USERINFO,te).replace(Z.PCT_ENCODED,o)),le.host!==void 0&&(le.host=String(le.host).replace(Z.PCT_ENCODED,ye).toLowerCase().replace(Z.NOT_HOST,te).replace(Z.PCT_ENCODED,o)),le.path!==void 0&&(le.path=String(le.path).replace(Z.PCT_ENCODED,ye).replace(le.scheme?Z.NOT_PATH:Z.NOT_PATH_NOSCHEME,te).replace(Z.PCT_ENCODED,o)),le.query!==void 0&&(le.query=String(le.query).replace(Z.PCT_ENCODED,ye).replace(Z.NOT_QUERY,te).replace(Z.PCT_ENCODED,o)),le.fragment!==void 0&&(le.fragment=String(le.fragment).replace(Z.PCT_ENCODED,ye).replace(Z.NOT_FRAGMENT,te).replace(Z.PCT_ENCODED,o)),le}function fe(le){return le.replace(/^0*(.*)/,"$1")||"0"}function Ge(le,Z){var ye=le.match(Z.IPV4ADDRESS)||[],Me=g(ye,2),Le=Me[1];return Le?Le.split(".").map(fe).join("."):le}function tt(le,Z){var ye=le.match(Z.IPV6ADDRESS)||[],Me=g(ye,3),Le=Me[1],wt=Me[2];if(Le){for(var It=Le.toLowerCase().split("::").reverse(),gr=g(It,2),lr=gr[0],en=gr[1],yr=en?en.split(":").map(fe):[],xr=lr.split(":").map(fe),on=Z.IPV4ADDRESS.test(xr[xr.length-1]),sr=on?7:8,Ur=xr.length-sr,gn=Array(sr),Br=0;Br<sr;++Br)gn[Br]=yr[Br]||xr[Ur+Br]||"";on&&(gn[sr-1]=Ge(gn[sr-1],Z));var Zn=gn.reduce(function(oi,jn,ra){if(!jn||jn==="0"){var $i=oi[oi.length-1];$i&&$i.index+$i.length===ra?$i.length++:oi.push({index:ra,length:1})}return oi},[]),Ii=Zn.sort(function(oi,jn){return jn.length-oi.length})[0],ei=void 0;if(Ii&&Ii.length>1){var Oi=gn.slice(0,Ii.index),Pi=gn.slice(Ii.index+Ii.length);ei=Oi.join(":")+"::"+Pi.join(":")}else ei=gn.join(":");return wt&&(ei+="%"+wt),ei}else return le}var mt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,vt="".match(/(){0}/)[1]===void 0;function gt(le){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ye={},Me=Z.iri!==!1?d:f;Z.reference==="suffix"&&(le=(Z.scheme?Z.scheme+":":"")+"//"+le);var Le=le.match(mt);if(Le){vt?(ye.scheme=Le[1],ye.userinfo=Le[3],ye.host=Le[4],ye.port=parseInt(Le[5],10),ye.path=Le[6]||"",ye.query=Le[7],ye.fragment=Le[8],isNaN(ye.port)&&(ye.port=Le[5])):(ye.scheme=Le[1]||void 0,ye.userinfo=le.indexOf("@")!==-1?Le[3]:void 0,ye.host=le.indexOf("//")!==-1?Le[4]:void 0,ye.port=parseInt(Le[5],10),ye.path=Le[6]||"",ye.query=le.indexOf("?")!==-1?Le[7]:void 0,ye.fragment=le.indexOf("#")!==-1?Le[8]:void 0,isNaN(ye.port)&&(ye.port=le.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Le[4]:void 0)),ye.host&&(ye.host=tt(Ge(ye.host,Me),Me)),ye.scheme===void 0&&ye.userinfo===void 0&&ye.host===void 0&&ye.port===void 0&&!ye.path&&ye.query===void 0?ye.reference="same-document":ye.scheme===void 0?ye.reference="relative":ye.fragment===void 0?ye.reference="absolute":ye.reference="uri",Z.reference&&Z.reference!=="suffix"&&Z.reference!==ye.reference&&(ye.error=ye.error||"URI is not a "+Z.reference+" reference.");var wt=Q[(Z.scheme||ye.scheme||"").toLowerCase()];if(!Z.unicodeSupport&&(!wt||!wt.unicodeSupport)){if(ye.host&&(Z.domainHost||wt&&wt.domainHost))try{ye.host=ge.toASCII(ye.host.replace(Me.PCT_ENCODED,ue).toLowerCase())}catch(It){ye.error=ye.error||"Host's domain name can not be converted to ASCII via punycode: "+It}T(ye,f)}else T(ye,Me);wt&&wt.parse&&wt.parse(ye,Z)}else ye.error=ye.error||"URI can not be parsed.";return ye}function Lt(le,Z){var ye=Z.iri!==!1?d:f,Me=[];return le.userinfo!==void 0&&(Me.push(le.userinfo),Me.push("@")),le.host!==void 0&&Me.push(tt(Ge(String(le.host),ye),ye).replace(ye.IPV6ADDRESS,function(Le,wt,It){return"["+wt+(It?"%25"+It:"")+"]"})),(typeof le.port=="number"||typeof le.port=="string")&&(Me.push(":"),Me.push(String(le.port))),Me.length?Me.join(""):void 0}var Yt=/^\.\.?\//,_r=/^\/\.(\/|$)/,Rt=/^\/\.\.(\/|$)/,Pt=/^\/?(?:.|\n)*?(?=\/|$)/;function kt(le){for(var Z=[];le.length;)if(le.match(Yt))le=le.replace(Yt,"");else if(le.match(_r))le=le.replace(_r,"/");else if(le.match(Rt))le=le.replace(Rt,"/"),Z.pop();else if(le==="."||le==="..")le="";else{var ye=le.match(Pt);if(ye){var Me=ye[0];le=le.slice(Me.length),Z.push(Me)}else throw new Error("Unexpected dot segment condition")}return Z.join("")}function Nt(le){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ye=Z.iri?d:f,Me=[],Le=Q[(Z.scheme||le.scheme||"").toLowerCase()];if(Le&&Le.serialize&&Le.serialize(le,Z),le.host&&!ye.IPV6ADDRESS.test(le.host)){if(Z.domainHost||Le&&Le.domainHost)try{le.host=Z.iri?ge.toUnicode(le.host):ge.toASCII(le.host.replace(ye.PCT_ENCODED,ue).toLowerCase())}catch(gr){le.error=le.error||"Host's domain name can not be converted to "+(Z.iri?"Unicode":"ASCII")+" via punycode: "+gr}}T(le,ye),Z.reference!=="suffix"&&le.scheme&&(Me.push(le.scheme),Me.push(":"));var wt=Lt(le,Z);if(wt!==void 0&&(Z.reference!=="suffix"&&Me.push("//"),Me.push(wt),le.path&&le.path.charAt(0)!=="/"&&Me.push("/")),le.path!==void 0){var It=le.path;!Z.absolutePath&&(!Le||!Le.absolutePath)&&(It=kt(It)),wt===void 0&&(It=It.replace(/^\/\//,"/%2F")),Me.push(It)}return le.query!==void 0&&(Me.push("?"),Me.push(le.query)),le.fragment!==void 0&&(Me.push("#"),Me.push(le.fragment)),Me.join("")}function Kt(le,Z){var ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Me=arguments[3],Le={};return Me||(le=gt(Nt(le,ye),ye),Z=gt(Nt(Z,ye),ye)),ye=ye||{},!ye.tolerant&&Z.scheme?(Le.scheme=Z.scheme,Le.userinfo=Z.userinfo,Le.host=Z.host,Le.port=Z.port,Le.path=kt(Z.path||""),Le.query=Z.query):(Z.userinfo!==void 0||Z.host!==void 0||Z.port!==void 0?(Le.userinfo=Z.userinfo,Le.host=Z.host,Le.port=Z.port,Le.path=kt(Z.path||""),Le.query=Z.query):(Z.path?(Z.path.charAt(0)==="/"?Le.path=kt(Z.path):((le.userinfo!==void 0||le.host!==void 0||le.port!==void 0)&&!le.path?Le.path="/"+Z.path:le.path?Le.path=le.path.slice(0,le.path.lastIndexOf("/")+1)+Z.path:Le.path=Z.path,Le.path=kt(Le.path)),Le.query=Z.query):(Le.path=le.path,Z.query!==void 0?Le.query=Z.query:Le.query=le.query),Le.userinfo=le.userinfo,Le.host=le.host,Le.port=le.port),Le.scheme=le.scheme),Le.fragment=Z.fragment,Le}function Ut(le,Z,ye){var Me=c({scheme:"null"},ye);return Nt(Kt(gt(le,Me),gt(Z,Me),Me,!0),Me)}function Vt(le,Z){return typeof le=="string"?le=Nt(gt(le,Z),Z):a(le)==="object"&&(le=gt(Nt(le,Z),Z)),le}function $t(le,Z,ye){return typeof le=="string"?le=Nt(gt(le,ye),ye):a(le)==="object"&&(le=Nt(le,ye)),typeof Z=="string"?Z=Nt(gt(Z,ye),ye):a(Z)==="object"&&(Z=Nt(Z,ye)),le===Z}function Dt(le,Z){return le&&le.toString().replace(!Z||!Z.iri?f.ESCAPE:d.ESCAPE,te)}function qt(le,Z){return le&&le.toString().replace(!Z||!Z.iri?f.PCT_ENCODED:d.PCT_ENCODED,ue)}var Mt={scheme:"http",domainHost:!0,parse:function(Z,ye){return Z.host||(Z.error=Z.error||"HTTP URIs must have a host."),Z},serialize:function(Z,ye){var Me=String(Z.scheme).toLowerCase()==="https";return(Z.port===(Me?443:80)||Z.port==="")&&(Z.port=void 0),Z.path||(Z.path="/"),Z}},cr={scheme:"https",domainHost:Mt.domainHost,parse:Mt.parse,serialize:Mt.serialize};function tr(le){return typeof le.secure=="boolean"?le.secure:String(le.scheme).toLowerCase()==="wss"}var ir={scheme:"ws",domainHost:!0,parse:function(Z,ye){var Me=Z;return Me.secure=tr(Me),Me.resourceName=(Me.path||"/")+(Me.query?"?"+Me.query:""),Me.path=void 0,Me.query=void 0,Me},serialize:function(Z,ye){if((Z.port===(tr(Z)?443:80)||Z.port==="")&&(Z.port=void 0),typeof Z.secure=="boolean"&&(Z.scheme=Z.secure?"wss":"ws",Z.secure=void 0),Z.resourceName){var Me=Z.resourceName.split("?"),Le=g(Me,2),wt=Le[0],It=Le[1];Z.path=wt&&wt!=="/"?wt:void 0,Z.query=It,Z.resourceName=void 0}return Z.fragment=void 0,Z}},nr={scheme:"wss",domainHost:ir.domainHost,parse:ir.parse,serialize:ir.serialize},vr={},wn="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Yr="[0-9A-Fa-f]",ai=i(i("%[EFef]"+Yr+"%"+Yr+Yr+"%"+Yr+Yr)+"|"+i("%[89A-Fa-f]"+Yr+"%"+Yr+Yr)+"|"+i("%"+Yr+Yr)),Dn="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",$n="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Kn=n($n,'[\\"\\\\]'),Ar="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Mr=new RegExp(wn,"g"),Er=new RegExp(ai,"g"),_e=new RegExp(n("[^]",Dn,"[\\.]",'[\\"]',Kn),"g"),ee=new RegExp(n("[^]",wn,Ar),"g"),ve=ee;function Re(le){var Z=ue(le);return Z.match(Mr)?Z:le}var ze={scheme:"mailto",parse:function(Z,ye){var Me=Z,Le=Me.to=Me.path?Me.path.split(","):[];if(Me.path=void 0,Me.query){for(var wt=!1,It={},gr=Me.query.split("&"),lr=0,en=gr.length;lr<en;++lr){var yr=gr[lr].split("=");switch(yr[0]){case"to":for(var xr=yr[1].split(","),on=0,sr=xr.length;on<sr;++on)Le.push(xr[on]);break;case"subject":Me.subject=qt(yr[1],ye);break;case"body":Me.body=qt(yr[1],ye);break;default:wt=!0,It[qt(yr[0],ye)]=qt(yr[1],ye);break}}wt&&(Me.headers=It)}Me.query=void 0;for(var Ur=0,gn=Le.length;Ur<gn;++Ur){var Br=Le[Ur].split("@");if(Br[0]=qt(Br[0]),ye.unicodeSupport)Br[1]=qt(Br[1],ye).toLowerCase();else try{Br[1]=ge.toASCII(qt(Br[1],ye).toLowerCase())}catch(Zn){Me.error=Me.error||"Email address's domain name can not be converted to ASCII via punycode: "+Zn}Le[Ur]=Br.join("@")}return Me},serialize:function(Z,ye){var Me=Z,Le=s(Z.to);if(Le){for(var wt=0,It=Le.length;wt<It;++wt){var gr=String(Le[wt]),lr=gr.lastIndexOf("@"),en=gr.slice(0,lr).replace(Er,Re).replace(Er,o).replace(_e,te),yr=gr.slice(lr+1);try{yr=ye.iri?ge.toUnicode(yr):ge.toASCII(qt(yr,ye).toLowerCase())}catch(Ur){Me.error=Me.error||"Email address's domain name can not be converted to "+(ye.iri?"Unicode":"ASCII")+" via punycode: "+Ur}Le[wt]=en+"@"+yr}Me.path=Le.join(",")}var xr=Z.headers=Z.headers||{};Z.subject&&(xr.subject=Z.subject),Z.body&&(xr.body=Z.body);var on=[];for(var sr in xr)xr[sr]!==vr[sr]&&on.push(sr.replace(Er,Re).replace(Er,o).replace(ee,te)+"="+xr[sr].replace(Er,Re).replace(Er,o).replace(ve,te));return on.length&&(Me.query=on.join("&")),Me}},Xe=/^([^\:]+)\:(.*)/,st={scheme:"urn",parse:function(Z,ye){var Me=Z.path&&Z.path.match(Xe),Le=Z;if(Me){var wt=ye.scheme||Le.scheme||"urn",It=Me[1].toLowerCase(),gr=Me[2],lr=wt+":"+(ye.nid||It),en=Q[lr];Le.nid=It,Le.nss=gr,Le.path=void 0,en&&(Le=en.parse(Le,ye))}else Le.error=Le.error||"URN can not be parsed.";return Le},serialize:function(Z,ye){var Me=ye.scheme||Z.scheme||"urn",Le=Z.nid,wt=Me+":"+(ye.nid||Le),It=Q[wt];It&&(Z=It.serialize(Z,ye));var gr=Z,lr=Z.nss;return gr.path=(Le||ye.nid)+":"+lr,gr}},lt=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,_t={scheme:"urn:uuid",parse:function(Z,ye){var Me=Z;return Me.uuid=Me.nss,Me.nss=void 0,!ye.tolerant&&(!Me.uuid||!Me.uuid.match(lt))&&(Me.error=Me.error||"UUID is not valid."),Me},serialize:function(Z,ye){var Me=Z;return Me.nss=(Z.uuid||"").toLowerCase(),Me}};Q[Mt.scheme]=Mt,Q[cr.scheme]=cr,Q[ir.scheme]=ir,Q[nr.scheme]=nr,Q[ze.scheme]=ze,Q[st.scheme]=st,Q[_t.scheme]=_t,r.SCHEMES=Q,r.pctEncChar=te,r.pctDecChars=ue,r.parse=gt,r.removeDotSegments=kt,r.serialize=Nt,r.resolveComponents=Kt,r.resolve=Ut,r.normalize=Vt,r.equal=$t,r.escapeComponent=Dt,r.unescapeComponent=qt,Object.defineProperty(r,"__esModule",{value:!0})})})(m5,m5.exports);var PCe=m5.exports;Object.defineProperty(TM,"__esModule",{value:!0});const Cie=PCe;Cie.code='require("ajv/dist/runtime/uri").default';TM.default=Cie;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Fs;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Tr;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Dw,i=$w,a=hp,o=Ro,s=Tr,c=pa,u=Nw,f=pn,d=OCe,g=TM,m=(V,$)=>new RegExp(V,$);m.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=200;function S(V){var $,H,L,k,G,ge,Q,te,ue,T,fe,Ge,tt,mt,vt,gt,Lt,Yt,_r,Rt,Pt,kt,Nt,Kt,Ut;const Vt=V.strict,$t=($=V.code)===null||$===void 0?void 0:$.optimize,Dt=$t===!0||$t===void 0?1:$t||0,qt=(L=(H=V.code)===null||H===void 0?void 0:H.regExp)!==null&&L!==void 0?L:m,Mt=(k=V.uriResolver)!==null&&k!==void 0?k:g.default;return{strictSchema:(ge=(G=V.strictSchema)!==null&&G!==void 0?G:Vt)!==null&&ge!==void 0?ge:!0,strictNumbers:(te=(Q=V.strictNumbers)!==null&&Q!==void 0?Q:Vt)!==null&&te!==void 0?te:!0,strictTypes:(T=(ue=V.strictTypes)!==null&&ue!==void 0?ue:Vt)!==null&&T!==void 0?T:"log",strictTuples:(Ge=(fe=V.strictTuples)!==null&&fe!==void 0?fe:Vt)!==null&&Ge!==void 0?Ge:"log",strictRequired:(mt=(tt=V.strictRequired)!==null&&tt!==void 0?tt:Vt)!==null&&mt!==void 0?mt:!1,code:V.code?{...V.code,optimize:Dt,regExp:qt}:{optimize:Dt,regExp:qt},loopRequired:(vt=V.loopRequired)!==null&&vt!==void 0?vt:b,loopEnum:(gt=V.loopEnum)!==null&>!==void 0?gt:b,meta:(Lt=V.meta)!==null&&Lt!==void 0?Lt:!0,messages:(Yt=V.messages)!==null&&Yt!==void 0?Yt:!0,inlineRefs:(_r=V.inlineRefs)!==null&&_r!==void 0?_r:!0,schemaId:(Rt=V.schemaId)!==null&&Rt!==void 0?Rt:"$id",addUsedSchema:(Pt=V.addUsedSchema)!==null&&Pt!==void 0?Pt:!0,validateSchema:(kt=V.validateSchema)!==null&&kt!==void 0?kt:!0,validateFormats:(Nt=V.validateFormats)!==null&&Nt!==void 0?Nt:!0,unicodeRegExp:(Kt=V.unicodeRegExp)!==null&&Kt!==void 0?Kt:!0,int32range:(Ut=V.int32range)!==null&&Ut!==void 0?Ut:!0,uriResolver:Mt}}class x{constructor($={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...S($)};const{es5:H,lines:L}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:v,es5:H,lines:L}),this.logger=ce($.logger);const k=$.validateFormats;$.validateFormats=!1,this.RULES=(0,a.getRules)(),I.call(this,y,$,"NOT SUPPORTED"),I.call(this,_,$,"DEPRECATED","warn"),this._metaOpts=M.call(this),$.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords&&C.call(this,$.keywords),typeof $.meta=="object"&&this.addMetaSchema($.meta),p.call(this),$.validateFormats=k}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:$,meta:H,schemaId:L}=this.opts;let k=d;L==="id"&&(k={...d},k.id=k.$id,delete k.$id),H&&$&&this.addMetaSchema(k,k[L],!1)}defaultMeta(){const{meta:$,schemaId:H}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[H]||$:void 0}validate($,H){let L;if(typeof $=="string"){if(L=this.getSchema($),!L)throw new Error(`no schema with key or ref "${$}"`)}else L=this.compile($);const k=L(H);return"$async"in L||(this.errors=L.errors),k}compile($,H){const L=this._addSchema($,H);return L.validate||this._compileSchemaEnv(L)}compileAsync($,H){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:L}=this.opts;return k.call(this,$,H);async function k(T,fe){await G.call(this,T.$schema);const Ge=this._addSchema(T,fe);return Ge.validate||ge.call(this,Ge)}async function G(T){T&&!this.getSchema(T)&&await k.call(this,{$ref:T},!0)}async function ge(T){try{return this._compileSchemaEnv(T)}catch(fe){if(!(fe instanceof i.default))throw fe;return Q.call(this,fe),await te.call(this,fe.missingSchema),ge.call(this,T)}}function Q({missingSchema:T,missingRef:fe}){if(this.refs[T])throw new Error(`AnySchema ${T} is loaded but ${fe} cannot be resolved`)}async function te(T){const fe=await ue.call(this,T);this.refs[T]||await G.call(this,fe.$schema),this.refs[T]||this.addSchema(fe,T,H)}async function ue(T){const fe=this._loading[T];if(fe)return fe;try{return await(this._loading[T]=L(T))}finally{delete this._loading[T]}}}addSchema($,H,L,k=this.opts.validateSchema){if(Array.isArray($)){for(const ge of $)this.addSchema(ge,void 0,L,k);return this}let G;if(typeof $=="object"){const{schemaId:ge}=this.opts;if(G=$[ge],G!==void 0&&typeof G!="string")throw new Error(`schema ${ge} must be string`)}return H=(0,c.normalizeId)(H||G),this._checkUnique(H),this.schemas[H]=this._addSchema($,L,H,k,!0),this}addMetaSchema($,H,L=this.opts.validateSchema){return this.addSchema($,H,!0,L),this}validateSchema($,H){if(typeof $=="boolean")return!0;let L;if(L=$.$schema,L!==void 0&&typeof L!="string")throw new Error("$schema must be a string");if(L=L||this.opts.defaultMeta||this.defaultMeta(),!L)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const k=this.validate(L,$);if(!k&&H){const G="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(G);else throw new Error(G)}return k}getSchema($){let H;for(;typeof(H=E.call(this,$))=="string";)$=H;if(H===void 0){const{schemaId:L}=this.opts,k=new o.SchemaEnv({schema:{},schemaId:L});if(H=o.resolveSchema.call(this,k,$),!H)return;this.refs[$]=H}return H.validate||this._compileSchemaEnv(H)}removeSchema($){if($ instanceof RegExp)return this._removeAllSchemas(this.schemas,$),this._removeAllSchemas(this.refs,$),this;switch(typeof $){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const H=E.call(this,$);return typeof H=="object"&&this._cache.delete(H.schema),delete this.schemas[$],delete this.refs[$],this}case"object":{const H=$;this._cache.delete(H);let L=$[this.opts.schemaId];return L&&(L=(0,c.normalizeId)(L),delete this.schemas[L],delete this.refs[L]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(const H of $)this.addKeyword(H);return this}addKeyword($,H){let L;if(typeof $=="string")L=$,typeof H=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),H.keyword=L);else if(typeof $=="object"&&H===void 0){if(H=$,L=H.keyword,Array.isArray(L)&&!L.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(F.call(this,L,H),!H)return(0,f.eachItem)(L,G=>U.call(this,G)),this;ne.call(this,H);const k={...H,type:(0,u.getJSONTypes)(H.type),schemaType:(0,u.getJSONTypes)(H.schemaType)};return(0,f.eachItem)(L,k.type.length===0?G=>U.call(this,G,k):G=>k.type.forEach(ge=>U.call(this,G,k,ge))),this}getKeyword($){const H=this.RULES.all[$];return typeof H=="object"?H.definition:!!H}removeKeyword($){const{RULES:H}=this;delete H.keywords[$],delete H.all[$];for(const L of H.rules){const k=L.rules.findIndex(G=>G.keyword===$);k>=0&&L.rules.splice(k,1)}return this}addFormat($,H){return typeof H=="string"&&(H=new RegExp(H)),this.formats[$]=H,this}errorsText($=this.errors,{separator:H=", ",dataVar:L="data"}={}){return!$||$.length===0?"No errors":$.map(k=>`${L}${k.instancePath} ${k.message}`).reduce((k,G)=>k+H+G)}$dataMetaSchema($,H){const L=this.RULES.all;$=JSON.parse(JSON.stringify($));for(const k of H){const G=k.split("/").slice(1);let ge=$;for(const Q of G)ge=ge[Q];for(const Q in L){const te=L[Q];if(typeof te!="object")continue;const{$data:ue}=te.definition,T=ge[Q];ue&&T&&(ge[Q]=q(T))}}return $}_removeAllSchemas($,H){for(const L in $){const k=$[L];(!H||H.test(L))&&(typeof k=="string"?delete $[L]:k&&!k.meta&&(this._cache.delete(k.schema),delete $[L]))}}_addSchema($,H,L,k=this.opts.validateSchema,G=this.opts.addUsedSchema){let ge;const{schemaId:Q}=this.opts;if(typeof $=="object")ge=$[Q];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof $!="boolean")throw new Error("schema must be object or boolean")}let te=this._cache.get($);if(te!==void 0)return te;L=(0,c.normalizeId)(ge||L);const ue=c.getSchemaRefs.call(this,$,L);return te=new o.SchemaEnv({schema:$,schemaId:Q,meta:H,baseId:L,localRefs:ue}),this._cache.set(te.schema,te),G&&!L.startsWith("#")&&(L&&this._checkUnique(L),this.refs[L]=te),k&&this.validateSchema($,!0),te}_checkUnique($){if(this.schemas[$]||this.refs[$])throw new Error(`schema with key or id "${$}" already exists`)}_compileSchemaEnv($){if($.meta?this._compileMetaSchema($):o.compileSchema.call(this,$),!$.validate)throw new Error("ajv implementation error");return $.validate}_compileMetaSchema($){const H=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,$)}finally{this.opts=H}}}t.default=x,x.ValidationError=n.default,x.MissingRefError=i.default;function I(V,$,H,L="error"){for(const k in V){const G=k;G in $&&this.logger[L](`${H}: option ${k}. ${V[G]}`)}}function E(V){return V=(0,c.normalizeId)(V),this.schemas[V]||this.refs[V]}function p(){const V=this.opts.schemas;if(V)if(Array.isArray(V))this.addSchema(V);else for(const $ in V)this.addSchema(V[$],$)}function O(){for(const V in this.opts.formats){const $=this.opts.formats[V];$&&this.addFormat(V,$)}}function C(V){if(Array.isArray(V)){this.addVocabulary(V);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const $ in V){const H=V[$];H.keyword||(H.keyword=$),this.addKeyword(H)}}function M(){const V={...this.opts};for(const $ of w)delete V[$];return V}const B={log(){},warn(){},error(){}};function ce(V){if(V===!1)return B;if(V===void 0)return console;if(V.log&&V.warn&&V.error)return V;throw new Error("logger must implement log, warn and error methods")}const he=/^[a-z_$][a-z0-9_$:-]*$/i;function F(V,$){const{RULES:H}=this;if((0,f.eachItem)(V,L=>{if(H.keywords[L])throw new Error(`Keyword ${L} is already defined`);if(!he.test(L))throw new Error(`Keyword ${L} has invalid name`)}),!!$&&$.$data&&!("code"in $||"validate"in $))throw new Error('$data keyword must have "code" or "validate" function')}function U(V,$,H){var L;const k=$==null?void 0:$.post;if(H&&k)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:G}=this;let ge=k?G.post:G.rules.find(({type:te})=>te===H);if(ge||(ge={type:H,rules:[]},G.rules.push(ge)),G.keywords[V]=!0,!$)return;const Q={keyword:V,definition:{...$,type:(0,u.getJSONTypes)($.type),schemaType:(0,u.getJSONTypes)($.schemaType)}};$.before?K.call(this,ge,Q,$.before):ge.rules.push(Q),G.all[V]=Q,(L=$.implements)===null||L===void 0||L.forEach(te=>this.addKeyword(te))}function K(V,$,H){const L=V.rules.findIndex(k=>k.keyword===H);L>=0?V.rules.splice(L,0,$):(V.rules.push($),this.logger.warn(`rule ${H} is not defined`))}function ne(V){let{metaSchema:$}=V;$!==void 0&&(V.$data&&this.opts.$data&&($=q($)),V.validateSchema=this.compile($,!0))}const j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function q(V){return{anyOf:[V,j]}}})(sie);var RM={},CM={},NM={};Object.defineProperty(NM,"__esModule",{value:!0});const TCe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};NM.default=TCe;var pp={};Object.defineProperty(pp,"__esModule",{value:!0});pp.callRef=pp.getValidate=void 0;const RCe=$w,yW=Kr,So=Tr,m0=Fc,mW=Ro,vE=pn,CCe={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:a,validateName:o,opts:s,self:c}=n,{root:u}=a;if((r==="#"||r==="#/")&&i===u.baseId)return d();const f=mW.resolveRef.call(c,u,i,r);if(f===void 0)throw new RCe.default(n.opts.uriResolver,i,r);if(f instanceof mW.SchemaEnv)return g(f);return m(f);function d(){if(a===u)return Px(t,o,a,a.$async);const w=e.scopeValue("root",{ref:u});return Px(t,(0,So._)`${w}.validate`,u,u.$async)}function g(w){const v=Nie(t,w);Px(t,v,w,w.$async)}function m(w){const v=e.scopeValue("schema",s.code.source===!0?{ref:w,code:(0,So.stringify)(w)}:{ref:w}),y=e.name("valid"),_=t.subschema({schema:w,dataTypes:[],schemaPath:So.nil,topSchemaRef:v,errSchemaPath:r},y);t.mergeEvaluated(_),t.ok(y)}}};function Nie(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,So._)`${r.scopeValue("wrapper",{ref:e})}.validate`}pp.getValidate=Nie;function Px(t,e,r,n){const{gen:i,it:a}=t,{allErrors:o,schemaEnv:s,opts:c}=a,u=c.passContext?m0.default.this:So.nil;n?f():d();function f(){if(!s.$async)throw new Error("async schema referenced by sync schema");const w=i.let("valid");i.try(()=>{i.code((0,So._)`await ${(0,yW.callValidateCode)(t,e,u)}`),m(e),o||i.assign(w,!0)},v=>{i.if((0,So._)`!(${v} instanceof ${a.ValidationError})`,()=>i.throw(v)),g(v),o||i.assign(w,!1)}),t.ok(w)}function d(){t.result((0,yW.callValidateCode)(t,e,u),()=>m(e),()=>g(e))}function g(w){const v=(0,So._)`${w}.errors`;i.assign(m0.default.vErrors,(0,So._)`${m0.default.vErrors} === null ? ${v} : ${m0.default.vErrors}.concat(${v})`),i.assign(m0.default.errors,(0,So._)`${m0.default.vErrors}.length`)}function m(w){var v;if(!a.opts.unevaluated)return;const y=(v=r==null?void 0:r.validate)===null||v===void 0?void 0:v.evaluated;if(a.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(a.props=vE.mergeEvaluated.props(i,y.props,a.props));else{const _=i.var("props",(0,So._)`${w}.evaluated.props`);a.props=vE.mergeEvaluated.props(i,_,a.props,So.Name)}if(a.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(a.items=vE.mergeEvaluated.items(i,y.items,a.items));else{const _=i.var("items",(0,So._)`${w}.evaluated.items`);a.items=vE.mergeEvaluated.items(i,_,a.items,So.Name)}}}pp.callRef=Px;pp.default=CCe;Object.defineProperty(CM,"__esModule",{value:!0});const NCe=NM,DCe=pp,$Ce=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",NCe.default,DCe.default];CM.default=$Ce;var DM={},$M={};Object.defineProperty($M,"__esModule",{value:!0});const HA=Tr,df=HA.operators,VA={maximum:{okStr:"<=",ok:df.LTE,fail:df.GT},minimum:{okStr:">=",ok:df.GTE,fail:df.LT},exclusiveMaximum:{okStr:"<",ok:df.LT,fail:df.GTE},exclusiveMinimum:{okStr:">",ok:df.GT,fail:df.LTE}},MCe={message:({keyword:t,schemaCode:e})=>(0,HA.str)`must be ${VA[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,HA._)`{comparison: ${VA[t].okStr}, limit: ${e}}`},kCe={keyword:Object.keys(VA),type:"number",schemaType:"number",$data:!0,error:MCe,code(t){const{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,HA._)`${r} ${VA[e].fail} ${n} || isNaN(${r})`)}};$M.default=kCe;var MM={};Object.defineProperty(MM,"__esModule",{value:!0});const Kb=Tr,LCe={message:({schemaCode:t})=>(0,Kb.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Kb._)`{multipleOf: ${t}}`},UCe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:LCe,code(t){const{gen:e,data:r,schemaCode:n,it:i}=t,a=i.opts.multipleOfPrecision,o=e.let("res"),s=a?(0,Kb._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${a}`:(0,Kb._)`${o} !== parseInt(${o})`;t.fail$data((0,Kb._)`(${n} === 0 || (${o} = ${r}/${n}, ${s}))`)}};MM.default=UCe;var kM={},LM={};Object.defineProperty(LM,"__esModule",{value:!0});function Die(t){const e=t.length;let r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}LM.default=Die;Die.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(kM,"__esModule",{value:!0});const hh=Tr,BCe=pn,FCe=LM,jCe={message({keyword:t,schemaCode:e}){const r=t==="maxLength"?"more":"fewer";return(0,hh.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,hh._)`{limit: ${t}}`},qCe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:jCe,code(t){const{keyword:e,data:r,schemaCode:n,it:i}=t,a=e==="maxLength"?hh.operators.GT:hh.operators.LT,o=i.opts.unicode===!1?(0,hh._)`${r}.length`:(0,hh._)`${(0,BCe.useFunc)(t.gen,FCe.default)}(${r})`;t.fail$data((0,hh._)`${o} ${a} ${n}`)}};kM.default=qCe;var UM={};Object.defineProperty(UM,"__esModule",{value:!0});const HCe=Kr,zA=Tr,VCe={message:({schemaCode:t})=>(0,zA.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,zA._)`{pattern: ${t}}`},zCe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:VCe,code(t){const{data:e,$data:r,schema:n,schemaCode:i,it:a}=t,o=a.opts.unicodeRegExp?"u":"",s=r?(0,zA._)`(new RegExp(${i}, ${o}))`:(0,HCe.usePattern)(t,n);t.fail$data((0,zA._)`!${s}.test(${e})`)}};UM.default=zCe;var BM={};Object.defineProperty(BM,"__esModule",{value:!0});const Yb=Tr,GCe={message({keyword:t,schemaCode:e}){const r=t==="maxProperties"?"more":"fewer";return(0,Yb.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Yb._)`{limit: ${t}}`},WCe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:GCe,code(t){const{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Yb.operators.GT:Yb.operators.LT;t.fail$data((0,Yb._)`Object.keys(${r}).length ${i} ${n}`)}};BM.default=WCe;var FM={};Object.defineProperty(FM,"__esModule",{value:!0});const Ov=Kr,Qb=Tr,KCe=pn,YCe={message:({params:{missingProperty:t}})=>(0,Qb.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Qb._)`{missingProperty: ${t}}`},QCe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:YCe,code(t){const{gen:e,schema:r,schemaCode:n,data:i,$data:a,it:o}=t,{opts:s}=o;if(!a&&r.length===0)return;const c=r.length>=s.loopRequired;if(o.allErrors?u():f(),s.strictRequired){const m=t.parentSchema.properties,{definedProperties:w}=t.it;for(const v of r)if((m==null?void 0:m[v])===void 0&&!w.has(v)){const y=o.schemaEnv.baseId+o.errSchemaPath,_=`required property "${v}" is not defined at "${y}" (strictRequired)`;(0,KCe.checkStrictMode)(o,_,o.opts.strictRequired)}}function u(){if(c||a)t.block$data(Qb.nil,d);else for(const m of r)(0,Ov.checkReportMissingProp)(t,m)}function f(){const m=e.let("missing");if(c||a){const w=e.let("valid",!0);t.block$data(w,()=>g(m,w)),t.ok(w)}else e.if((0,Ov.checkMissingProp)(t,r,m)),(0,Ov.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,Ov.noPropertyInData)(e,i,m,s.ownProperties),()=>t.error())})}function g(m,w){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(w,(0,Ov.propertyInData)(e,i,m,s.ownProperties)),e.if((0,Qb.not)(w),()=>{t.error(),e.break()})},Qb.nil)}}};FM.default=QCe;var jM={};Object.defineProperty(jM,"__esModule",{value:!0});const Jb=Tr,JCe={message({keyword:t,schemaCode:e}){const r=t==="maxItems"?"more":"fewer";return(0,Jb.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Jb._)`{limit: ${t}}`},XCe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:JCe,code(t){const{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?Jb.operators.GT:Jb.operators.LT;t.fail$data((0,Jb._)`${r}.length ${i} ${n}`)}};jM.default=XCe;var qM={},Mw={};Object.defineProperty(Mw,"__esModule",{value:!0});const $ie=SM;$ie.code='require("ajv/dist/runtime/equal").default';Mw.default=$ie;Object.defineProperty(qM,"__esModule",{value:!0});const pN=Nw,sa=Tr,ZCe=pn,eNe=Mw,tNe={message:({params:{i:t,j:e}})=>(0,sa.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,sa._)`{i: ${t}, j: ${e}}`},rNe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:tNe,code(t){const{gen:e,data:r,$data:n,schema:i,parentSchema:a,schemaCode:o,it:s}=t;if(!n&&!i)return;const c=e.let("valid"),u=a.items?(0,pN.getSchemaTypes)(a.items):[];t.block$data(c,f,(0,sa._)`${o} === false`),t.ok(c);function f(){const w=e.let("i",(0,sa._)`${r}.length`),v=e.let("j");t.setParams({i:w,j:v}),e.assign(c,!0),e.if((0,sa._)`${w} > 1`,()=>(d()?g:m)(w,v))}function d(){return u.length>0&&!u.some(w=>w==="object"||w==="array")}function g(w,v){const y=e.name("item"),_=(0,pN.checkDataTypes)(u,y,s.opts.strictNumbers,pN.DataType.Wrong),b=e.const("indices",(0,sa._)`{}`);e.for((0,sa._)`;${w}--;`,()=>{e.let(y,(0,sa._)`${r}[${w}]`),e.if(_,(0,sa._)`continue`),u.length>1&&e.if((0,sa._)`typeof ${y} == "string"`,(0,sa._)`${y} += "_"`),e.if((0,sa._)`typeof ${b}[${y}] == "number"`,()=>{e.assign(v,(0,sa._)`${b}[${y}]`),t.error(),e.assign(c,!1).break()}).code((0,sa._)`${b}[${y}] = ${w}`)})}function m(w,v){const y=(0,ZCe.useFunc)(e,eNe.default),_=e.name("outer");e.label(_).for((0,sa._)`;${w}--;`,()=>e.for((0,sa._)`${v} = ${w}; ${v}--;`,()=>e.if((0,sa._)`${y}(${r}[${w}], ${r}[${v}])`,()=>{t.error(),e.assign(c,!1).break(_)})))}}};qM.default=rNe;var HM={};Object.defineProperty(HM,"__esModule",{value:!0});const v5=Tr,nNe=pn,iNe=Mw,aNe={message:"must be equal to constant",params:({schemaCode:t})=>(0,v5._)`{allowedValue: ${t}}`},oNe={keyword:"const",$data:!0,error:aNe,code(t){const{gen:e,data:r,$data:n,schemaCode:i,schema:a}=t;n||a&&typeof a=="object"?t.fail$data((0,v5._)`!${(0,nNe.useFunc)(e,iNe.default)}(${r}, ${i})`):t.fail((0,v5._)`${a} !== ${r}`)}};HM.default=oNe;var VM={};Object.defineProperty(VM,"__esModule",{value:!0});const wb=Tr,sNe=pn,cNe=Mw,uNe={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,wb._)`{allowedValues: ${t}}`},lNe={keyword:"enum",schemaType:"array",$data:!0,error:uNe,code(t){const{gen:e,data:r,$data:n,schema:i,schemaCode:a,it:o}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");const s=i.length>=o.opts.loopEnum;let c;const u=()=>c??(c=(0,sNe.useFunc)(e,cNe.default));let f;if(s||n)f=e.let("valid"),t.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const m=e.const("vSchema",a);f=(0,wb.or)(...i.map((w,v)=>g(m,v)))}t.pass(f);function d(){e.assign(f,!1),e.forOf("v",a,m=>e.if((0,wb._)`${u()}(${r}, ${m})`,()=>e.assign(f,!0).break()))}function g(m,w){const v=i[w];return typeof v=="object"&&v!==null?(0,wb._)`${u()}(${r}, ${m}[${w}])`:(0,wb._)`${r} === ${v}`}}};VM.default=lNe;Object.defineProperty(DM,"__esModule",{value:!0});const fNe=$M,dNe=MM,hNe=kM,pNe=UM,gNe=BM,yNe=FM,mNe=jM,vNe=qM,bNe=HM,wNe=VM,_Ne=[fNe.default,dNe.default,hNe.default,pNe.default,gNe.default,yNe.default,mNe.default,vNe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},bNe.default,wNe.default];DM.default=_Ne;var zM={},um={};Object.defineProperty(um,"__esModule",{value:!0});um.validateAdditionalItems=void 0;const ph=Tr,b5=pn,ENe={message:({params:{len:t}})=>(0,ph.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ph._)`{limit: ${t}}`},xNe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:ENe,code(t){const{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,b5.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Mie(t,n)}};function Mie(t,e){const{gen:r,schema:n,data:i,keyword:a,it:o}=t;o.items=!0;const s=r.const("len",(0,ph._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,ph._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,b5.alwaysValidSchema)(o,n)){const u=r.var("valid",(0,ph._)`${s} <= ${e.length}`);r.if((0,ph.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,s,f=>{t.subschema({keyword:a,dataProp:f,dataPropType:b5.Type.Num},u),o.allErrors||r.if((0,ph.not)(u),()=>r.break())})}}um.validateAdditionalItems=Mie;um.default=xNe;var GM={},lm={};Object.defineProperty(lm,"__esModule",{value:!0});lm.validateTuple=void 0;const vW=Tr,Tx=pn,ANe=Kr,SNe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:r}=t;if(Array.isArray(e))return kie(t,"additionalItems",e);r.items=!0,!(0,Tx.alwaysValidSchema)(r,e)&&t.ok((0,ANe.validateArray)(t))}};function kie(t,e,r=t.schema){const{gen:n,parentSchema:i,data:a,keyword:o,it:s}=t;f(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=Tx.mergeEvaluated.items(n,r.length,s.items));const c=n.name("valid"),u=n.const("len",(0,vW._)`${a}.length`);r.forEach((d,g)=>{(0,Tx.alwaysValidSchema)(s,d)||(n.if((0,vW._)`${u} > ${g}`,()=>t.subschema({keyword:o,schemaProp:g,dataProp:g},c)),t.ok(c))});function f(d){const{opts:g,errSchemaPath:m}=s,w=r.length,v=w===d.minItems&&(w===d.maxItems||d[e]===!1);if(g.strictTuples&&!v){const y=`"${o}" is ${w}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Tx.checkStrictMode)(s,y,g.strictTuples)}}}lm.validateTuple=kie;lm.default=SNe;Object.defineProperty(GM,"__esModule",{value:!0});const INe=lm,ONe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,INe.validateTuple)(t,"items")};GM.default=ONe;var WM={};Object.defineProperty(WM,"__esModule",{value:!0});const bW=Tr,PNe=pn,TNe=Kr,RNe=um,CNe={message:({params:{len:t}})=>(0,bW.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,bW._)`{limit: ${t}}`},NNe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:CNe,code(t){const{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,PNe.alwaysValidSchema)(n,e)&&(i?(0,RNe.validateAdditionalItems)(t,i):t.ok((0,TNe.validateArray)(t)))}};WM.default=NNe;var KM={};Object.defineProperty(KM,"__esModule",{value:!0});const Ds=Tr,bE=pn,DNe={message:({params:{min:t,max:e}})=>e===void 0?(0,Ds.str)`must contain at least ${t} valid item(s)`:(0,Ds.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Ds._)`{minContains: ${t}}`:(0,Ds._)`{minContains: ${t}, maxContains: ${e}}`},$Ne={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:DNe,code(t){const{gen:e,schema:r,parentSchema:n,data:i,it:a}=t;let o,s;const{minContains:c,maxContains:u}=n;a.opts.next?(o=c===void 0?1:c,s=u):o=1;const f=e.const("len",(0,Ds._)`${i}.length`);if(t.setParams({min:o,max:s}),s===void 0&&o===0){(0,bE.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&o>s){(0,bE.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,bE.alwaysValidSchema)(a,r)){let v=(0,Ds._)`${f} >= ${o}`;s!==void 0&&(v=(0,Ds._)`${v} && ${f} <= ${s}`),t.pass(v);return}a.items=!0;const d=e.name("valid");s===void 0&&o===1?m(d,()=>e.if(d,()=>e.break())):o===0?(e.let(d,!0),s!==void 0&&e.if((0,Ds._)`${i}.length > 0`,g)):(e.let(d,!1),g()),t.result(d,()=>t.reset());function g(){const v=e.name("_valid"),y=e.let("count",0);m(v,()=>e.if(v,()=>w(y)))}function m(v,y){e.forRange("i",0,f,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:bE.Type.Num,compositeRule:!0},v),y()})}function w(v){e.code((0,Ds._)`${v}++`),s===void 0?e.if((0,Ds._)`${v} >= ${o}`,()=>e.assign(d,!0).break()):(e.if((0,Ds._)`${v} > ${s}`,()=>e.assign(d,!1).break()),o===1?e.assign(d,!0):e.if((0,Ds._)`${v} >= ${o}`,()=>e.assign(d,!0)))}}};KM.default=$Ne;var Lie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=Tr,r=pn,n=Kr;t.error={message:({params:{property:c,depsCount:u,deps:f}})=>{const d=u===1?"property":"properties";return(0,e.str)`must have ${d} ${f} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:f,missingProperty:d}})=>(0,e._)`{property: ${c},
|
|
107
|
-
missingProperty: ${d},
|
|
108
|
-
depsCount: ${u},
|
|
109
|
-
deps: ${f}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(c){const[u,f]=a(c);o(c,u),s(c,f)}};function a({schema:c}){const u={},f={};for(const d in c){if(d==="__proto__")continue;const g=Array.isArray(c[d])?u:f;g[d]=c[d]}return[u,f]}function o(c,u=c.schema){const{gen:f,data:d,it:g}=c;if(Object.keys(u).length===0)return;const m=f.let("missing");for(const w in u){const v=u[w];if(v.length===0)continue;const y=(0,n.propertyInData)(f,d,w,g.opts.ownProperties);c.setParams({property:w,depsCount:v.length,deps:v.join(", ")}),g.allErrors?f.if(y,()=>{for(const _ of v)(0,n.checkReportMissingProp)(c,_)}):(f.if((0,e._)`${y} && (${(0,n.checkMissingProp)(c,v,m)})`),(0,n.reportMissingProp)(c,m),f.else())}}t.validatePropertyDeps=o;function s(c,u=c.schema){const{gen:f,data:d,keyword:g,it:m}=c,w=f.name("valid");for(const v in u)(0,r.alwaysValidSchema)(m,u[v])||(f.if((0,n.propertyInData)(f,d,v,m.opts.ownProperties),()=>{const y=c.subschema({keyword:g,schemaProp:v},w);c.mergeValidEvaluated(y,w)},()=>f.var(w,!0)),c.ok(w))}t.validateSchemaDeps=s,t.default=i})(Lie);var YM={};Object.defineProperty(YM,"__esModule",{value:!0});const Uie=Tr,MNe=pn,kNe={message:"property name must be valid",params:({params:t})=>(0,Uie._)`{propertyName: ${t.propertyName}}`},LNe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:kNe,code(t){const{gen:e,schema:r,data:n,it:i}=t;if((0,MNe.alwaysValidSchema)(i,r))return;const a=e.name("valid");e.forIn("key",n,o=>{t.setParams({propertyName:o}),t.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},a),e.if((0,Uie.not)(a),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(a)}};YM.default=LNe;var qS={};Object.defineProperty(qS,"__esModule",{value:!0});const wE=Kr,fc=Tr,UNe=Fc,_E=pn,BNe={message:"must NOT have additional properties",params:({params:t})=>(0,fc._)`{additionalProperty: ${t.additionalProperty}}`},FNe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:BNe,code(t){const{gen:e,schema:r,parentSchema:n,data:i,errsCount:a,it:o}=t;if(!a)throw new Error("ajv implementation error");const{allErrors:s,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,_E.alwaysValidSchema)(o,r))return;const u=(0,wE.allSchemaProperties)(n.properties),f=(0,wE.allSchemaProperties)(n.patternProperties);d(),t.ok((0,fc._)`${a} === ${UNe.default.errors}`);function d(){e.forIn("key",i,y=>{!u.length&&!f.length?w(y):e.if(g(y),()=>w(y))})}function g(y){let _;if(u.length>8){const b=(0,_E.schemaRefOrVal)(o,n.properties,"properties");_=(0,wE.isOwnProperty)(e,b,y)}else u.length?_=(0,fc.or)(...u.map(b=>(0,fc._)`${y} === ${b}`)):_=fc.nil;return f.length&&(_=(0,fc.or)(_,...f.map(b=>(0,fc._)`${(0,wE.usePattern)(t,b)}.test(${y})`))),(0,fc.not)(_)}function m(y){e.code((0,fc._)`delete ${i}[${y}]`)}function w(y){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(y);return}if(r===!1){t.setParams({additionalProperty:y}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,_E.alwaysValidSchema)(o,r)){const _=e.name("valid");c.removeAdditional==="failing"?(v(y,_,!1),e.if((0,fc.not)(_),()=>{t.reset(),m(y)})):(v(y,_),s||e.if((0,fc.not)(_),()=>e.break()))}}function v(y,_,b){const S={keyword:"additionalProperties",dataProp:y,dataPropType:_E.Type.Str};b===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(S,_)}}};qS.default=FNe;var QM={};Object.defineProperty(QM,"__esModule",{value:!0});const jNe=Fs,wW=Kr,gN=pn,_W=qS,qNe={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,parentSchema:n,data:i,it:a}=t;a.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&_W.default.code(new jNe.KeywordCxt(a,_W.default,"additionalProperties"));const o=(0,wW.allSchemaProperties)(r);for(const d of o)a.definedProperties.add(d);a.opts.unevaluated&&o.length&&a.props!==!0&&(a.props=gN.mergeEvaluated.props(e,(0,gN.toHash)(o),a.props));const s=o.filter(d=>!(0,gN.alwaysValidSchema)(a,r[d]));if(s.length===0)return;const c=e.name("valid");for(const d of s)u(d)?f(d):(e.if((0,wW.propertyInData)(e,i,d,a.opts.ownProperties)),f(d),a.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function u(d){return a.opts.useDefaults&&!a.compositeRule&&r[d].default!==void 0}function f(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};QM.default=qNe;var JM={};Object.defineProperty(JM,"__esModule",{value:!0});const EW=Kr,EE=Tr,xW=pn,AW=pn,HNe={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,data:n,parentSchema:i,it:a}=t,{opts:o}=a,s=(0,EW.allSchemaProperties)(r),c=s.filter(v=>(0,xW.alwaysValidSchema)(a,r[v]));if(s.length===0||c.length===s.length&&(!a.opts.unevaluated||a.props===!0))return;const u=o.strictSchema&&!o.allowMatchingProperties&&i.properties,f=e.name("valid");a.props!==!0&&!(a.props instanceof EE.Name)&&(a.props=(0,AW.evaluatedPropsToName)(e,a.props));const{props:d}=a;g();function g(){for(const v of s)u&&m(v),a.allErrors?w(v):(e.var(f,!0),w(v),e.if(f))}function m(v){for(const y in u)new RegExp(v).test(y)&&(0,xW.checkStrictMode)(a,`property ${y} matches pattern ${v} (use allowMatchingProperties)`)}function w(v){e.forIn("key",n,y=>{e.if((0,EE._)`${(0,EW.usePattern)(t,v)}.test(${y})`,()=>{const _=c.includes(v);_||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:y,dataPropType:AW.Type.Str},f),a.opts.unevaluated&&d!==!0?e.assign((0,EE._)`${d}[${y}]`,!0):!_&&!a.allErrors&&e.if((0,EE.not)(f),()=>e.break())})})}}};JM.default=HNe;var XM={};Object.defineProperty(XM,"__esModule",{value:!0});const VNe=pn,zNe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:r,it:n}=t;if((0,VNe.alwaysValidSchema)(n,r)){t.fail();return}const i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};XM.default=zNe;var ZM={};Object.defineProperty(ZM,"__esModule",{value:!0});const GNe=Kr,WNe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:GNe.validateUnion,error:{message:"must match a schema in anyOf"}};ZM.default=WNe;var ek={};Object.defineProperty(ek,"__esModule",{value:!0});const Rx=Tr,KNe=pn,YNe={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Rx._)`{passingSchemas: ${t.passing}}`},QNe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:YNe,code(t){const{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;const a=r,o=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(u),t.result(o,()=>t.reset(),()=>t.error(!0));function u(){a.forEach((f,d)=>{let g;(0,KNe.alwaysValidSchema)(i,f)?e.var(c,!0):g=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,Rx._)`${c} && ${o}`).assign(o,!1).assign(s,(0,Rx._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(o,!0),e.assign(s,d),g&&t.mergeEvaluated(g,Rx.Name)})})}}};ek.default=QNe;var tk={};Object.defineProperty(tk,"__esModule",{value:!0});const JNe=pn,XNe={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=e.name("valid");r.forEach((a,o)=>{if((0,JNe.alwaysValidSchema)(n,a))return;const s=t.subschema({keyword:"allOf",schemaProp:o},i);t.ok(i),t.mergeEvaluated(s)})}};tk.default=XNe;var rk={};Object.defineProperty(rk,"__esModule",{value:!0});const GA=Tr,Bie=pn,ZNe={message:({params:t})=>(0,GA.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,GA._)`{failingKeyword: ${t.ifClause}}`},e6e={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:ZNe,code(t){const{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Bie.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=SW(n,"then"),a=SW(n,"else");if(!i&&!a)return;const o=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),i&&a){const f=e.let("ifClause");t.setParams({ifClause:f}),e.if(s,u("then",f),u("else",f))}else i?e.if(s,u("then")):e.if((0,GA.not)(s),u("else"));t.pass(o,()=>t.error(!0));function c(){const f=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(f)}function u(f,d){return()=>{const g=t.subschema({keyword:f},s);e.assign(o,s),t.mergeValidEvaluated(g,o),d?e.assign(d,(0,GA._)`${f}`):t.setParams({ifClause:f})}}}};function SW(t,e){const r=t.schema[e];return r!==void 0&&!(0,Bie.alwaysValidSchema)(t,r)}rk.default=e6e;var nk={};Object.defineProperty(nk,"__esModule",{value:!0});const t6e=pn,r6e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,t6e.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};nk.default=r6e;Object.defineProperty(zM,"__esModule",{value:!0});const n6e=um,i6e=GM,a6e=lm,o6e=WM,s6e=KM,c6e=Lie,u6e=YM,l6e=qS,f6e=QM,d6e=JM,h6e=XM,p6e=ZM,g6e=ek,y6e=tk,m6e=rk,v6e=nk;function b6e(t=!1){const e=[h6e.default,p6e.default,g6e.default,y6e.default,m6e.default,v6e.default,u6e.default,l6e.default,c6e.default,f6e.default,d6e.default];return t?e.push(i6e.default,o6e.default):e.push(n6e.default,a6e.default),e.push(s6e.default),e}zM.default=b6e;var ik={},ak={};Object.defineProperty(ak,"__esModule",{value:!0});const _i=Tr,w6e={message:({schemaCode:t})=>(0,_i.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,_i._)`{format: ${t}}`},_6e={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:w6e,code(t,e){const{gen:r,data:n,$data:i,schema:a,schemaCode:o,it:s}=t,{opts:c,errSchemaPath:u,schemaEnv:f,self:d}=s;if(!c.validateFormats)return;i?g():m();function g(){const w=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,_i._)`${w}[${o}]`),y=r.let("fType"),_=r.let("format");r.if((0,_i._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(y,(0,_i._)`${v}.type || "string"`).assign(_,(0,_i._)`${v}.validate`),()=>r.assign(y,(0,_i._)`"string"`).assign(_,v)),t.fail$data((0,_i.or)(b(),S()));function b(){return c.strictSchema===!1?_i.nil:(0,_i._)`${o} && !${_}`}function S(){const x=f.$async?(0,_i._)`(${v}.async ? await ${_}(${n}) : ${_}(${n}))`:(0,_i._)`${_}(${n})`,I=(0,_i._)`(typeof ${_} == "function" ? ${x} : ${_}.test(${n}))`;return(0,_i._)`${_} && ${_} !== true && ${y} === ${e} && !${I}`}}function m(){const w=d.formats[a];if(!w){b();return}if(w===!0)return;const[v,y,_]=S(w);v===e&&t.pass(x());function b(){if(c.strictSchema===!1){d.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${a}" ignored in schema at path "${u}"`}}function S(I){const E=I instanceof RegExp?(0,_i.regexpCode)(I):c.code.formats?(0,_i._)`${c.code.formats}${(0,_i.getProperty)(a)}`:void 0,p=r.scopeValue("formats",{key:a,ref:I,code:E});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,_i._)`${p}.validate`]:["string",I,p]}function x(){if(typeof w=="object"&&!(w instanceof RegExp)&&w.async){if(!f.$async)throw new Error("async format in sync schema");return(0,_i._)`await ${_}(${n})`}return typeof y=="function"?(0,_i._)`${_}(${n})`:(0,_i._)`${_}.test(${n})`}}}};ak.default=_6e;Object.defineProperty(ik,"__esModule",{value:!0});const E6e=ak,x6e=[E6e.default];ik.default=x6e;var $y={};Object.defineProperty($y,"__esModule",{value:!0});$y.contentVocabulary=$y.metadataVocabulary=void 0;$y.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];$y.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(RM,"__esModule",{value:!0});const A6e=CM,S6e=DM,I6e=zM,O6e=ik,IW=$y,P6e=[A6e.default,S6e.default,(0,I6e.default)(),O6e.default,IW.metadataVocabulary,IW.contentVocabulary];RM.default=P6e;var ok={},Fie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))})(Fie);Object.defineProperty(ok,"__esModule",{value:!0});const $0=Tr,w5=Fie,OW=Ro,T6e=pn,R6e={message:({params:{discrError:t,tagName:e}})=>t===w5.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,$0._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},C6e={keyword:"discriminator",type:"object",schemaType:"object",error:R6e,code(t){const{gen:e,data:r,schema:n,parentSchema:i,it:a}=t,{oneOf:o}=i;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const c=e.let("valid",!1),u=e.const("tag",(0,$0._)`${r}${(0,$0.getProperty)(s)}`);e.if((0,$0._)`typeof ${u} == "string"`,()=>f(),()=>t.error(!1,{discrError:w5.DiscrError.Tag,tag:u,tagName:s})),t.ok(c);function f(){const m=g();e.if(!1);for(const w in m)e.elseIf((0,$0._)`${u} === ${w}`),e.assign(c,d(m[w]));e.else(),t.error(!1,{discrError:w5.DiscrError.Mapping,tag:u,tagName:s}),e.endIf()}function d(m){const w=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:m},w);return t.mergeEvaluated(v,$0.Name),w}function g(){var m;const w={},v=_(i);let y=!0;for(let x=0;x<o.length;x++){let I=o[x];I!=null&&I.$ref&&!(0,T6e.schemaHasRulesButRef)(I,a.self.RULES)&&(I=OW.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,I==null?void 0:I.$ref),I instanceof OW.SchemaEnv&&(I=I.schema));const E=(m=I==null?void 0:I.properties)===null||m===void 0?void 0:m[s];if(typeof E!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);y=y&&(v||_(I)),b(E,x)}if(!y)throw new Error(`discriminator: "${s}" must be required`);return w;function _({required:x}){return Array.isArray(x)&&x.includes(s)}function b(x,I){if(x.const)S(x.const,I);else if(x.enum)for(const E of x.enum)S(E,I);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function S(x,I){if(typeof x!="string"||x in w)throw new Error(`discriminator: "${s}" values must be unique strings`);w[x]=I}}}};ok.default=C6e;const N6e="http://json-schema.org/draft-07/schema#",D6e="http://json-schema.org/draft-07/schema#",$6e="Core schema meta-schema",M6e={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},k6e=["object","boolean"],L6e={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},U6e={$schema:N6e,$id:D6e,title:$6e,definitions:M6e,type:k6e,properties:L6e,default:!0};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const r=sie,n=RM,i=ok,a=U6e,o=["/properties"],s="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(w,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}t.exports=e=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var u=Fs;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var f=Tr;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var d=Dw;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var g=$w;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(p5,p5.exports);var jie=p5.exports,_5={exports:{}},E5={exports:{}},x5={exports:{}},A5={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Tr,n=["undefined","string","number","object","function","boolean","symbol"];function i(){return{keyword:"typeof",schemaType:["string","array"],code(a){const{data:o,schema:s,schemaValue:c}=a;a.fail(typeof s=="string"?(0,r._)`typeof ${o} != ${s}`:(0,r._)`${c}.indexOf(typeof ${o}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}}}e.default=i,t.exports=i})(A5,A5.exports);var B6e=A5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(B6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(x5,x5.exports);var F6e=x5.exports,S5={exports:{}},I5={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r={Object,Array,Function,Number,String,Date,RegExp};typeof ut<"u"&&(r.Buffer=ut),typeof Promise<"u"&&(r.Promise=Promise);const n=Object.assign(i,{CONSTRUCTORS:r});function i(){return{keyword:"instanceof",schemaType:["string","array"],compile(o){if(typeof o=="string"){const s=a(o);return c=>c instanceof s}if(Array.isArray(o)){const s=o.map(a);return c=>{for(const u of s)if(c instanceof u)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function a(o){const s=r[o];if(s)return s;throw new Error(`invalid "instanceof" keyword value ${o}`)}e.default=n,t.exports=n})(I5,I5.exports);var j6e=I5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(j6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(S5,S5.exports);var q6e=S5.exports,O5={exports:{}},P5={exports:{}},HS={};Object.defineProperty(HS,"__esModule",{value:!0});function H6e(t){return()=>({keyword:t,type:"number",schemaType:"array",macro:function([r,n]){return e(r,n),t==="range"?{minimum:r,maximum:n}:{exclusiveMinimum:r,exclusiveMaximum:n}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function e(r,n){if(r>n||t==="exclusiveRange"&&r===n)throw new Error("There are no numbers in range")}}HS.default=H6e;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const i=(0,r(HS).default)("range");e.default=i,t.exports=i})(P5,P5.exports);var V6e=P5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(V6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(O5,O5.exports);var z6e=O5.exports,T5={exports:{}},R5={exports:{}};(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const i=(0,r(HS).default)("exclusiveRange");e.default=i,t.exports=i})(R5,R5.exports);var G6e=R5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(G6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(T5,T5.exports);var W6e=T5.exports,C5={exports:{}},N5={exports:{}},kl={};Object.defineProperty(kl,"__esModule",{value:!0});kl.usePattern=kl.metaSchemaRef=void 0;const K6e=Tr,Y6e="http://json-schema.org/schema";function Q6e({defaultMeta:t}={}){return t===!1?{}:{$ref:t||Y6e}}kl.metaSchemaRef=Q6e;function J6e({gen:t,it:{opts:e}},r,n=e.unicodeRegExp?"u":""){const i=new RegExp(r,n);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,K6e._)`new RegExp(${r}, ${n})`})}kl.usePattern=J6e;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Tr,n=kl,i={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},a=/^\/(.*)\/([gimuy]*)$/;function o(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(s){const{data:c,schema:u}=s,f=d(u);s.pass((0,r._)`${f}.test(${c})`);function d(g){if(typeof g=="object")return(0,n.usePattern)(s,g.pattern,g.flags);const m=a.exec(g);if(m)return(0,n.usePattern)(s,m[1],m[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},i]}}}e.default=o,t.exports=o})(N5,N5.exports);var X6e=N5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(X6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(C5,C5.exports);var Z6e=C5.exports,D5={exports:{}},$5={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Tr,n={trimStart:c=>c.trimStart(),trimEnd:c=>c.trimEnd(),trimLeft:c=>c.trimStart(),trimRight:c=>c.trimEnd(),trim:c=>c.trim(),toLowerCase:c=>c.toLowerCase(),toUpperCase:c=>c.toUpperCase(),toEnumCase:(c,u)=>(u==null?void 0:u.hash[s(c)])||c},i=Object.assign(a,{transform:n});function a(){return{keyword:"transform",schemaType:"array",before:"enum",code(c){const{gen:u,data:f,schema:d,parentSchema:g,it:m}=c,{parentData:w,parentDataProperty:v}=m,y=d;if(!y.length)return;let _;if(y.includes("toEnumCase")){const S=o(g);_=u.scopeValue("obj",{ref:S,code:(0,r.stringify)(S)})}u.if((0,r._)`typeof ${f} == "string" && ${w} !== undefined`,()=>{u.assign(f,b(y.slice())),u.assign((0,r._)`${w}[${v}]`,f)});function b(S){if(!S.length)return f;const x=S.pop();if(!(x in n))throw new Error(`transform: unknown transformation ${x}`);const I=u.scopeValue("func",{ref:n[x],code:(0,r._)`require("ajv-keywords/dist/definitions/transform").transform${(0,r.getProperty)(x)}`}),E=b(S);return _&&x==="toEnumCase"?(0,r._)`${I}(${E}, ${_})`:(0,r._)`${I}(${E})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(n)}}}}function o(c){const u={hash:{}};if(!c.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const f of c.enum){if(typeof f!="string")continue;const d=s(f);if(u.hash[d])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');u.hash[d]=f}return u}function s(c){return c.toLowerCase()}e.default=i,t.exports=i})($5,$5.exports);var e8e=$5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(e8e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(D5,D5.exports);var t8e=D5.exports,M5={exports:{}},k5={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=SM,n=["number","integer","string","boolean","null"];function i(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(o,s){const c=a(o,s);return u=>{if(u.length<=1)return!0;for(let f=0;f<o.length;f++){const d=o[f];if(c[f]){const g={};for(const m of u){if(!m||typeof m!="object")continue;let w=m[d];if(!(w&&typeof w=="object")){if(typeof w=="string"&&(w='"'+w),g[w])return!1;g[w]=!0}}}else for(let g=u.length;g--;){const m=u[g];if(!(!m||typeof m!="object"))for(let w=g;w--;){const v=u[w];if(v&&typeof v=="object"&&r(m[d],v[d]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}e.default=i;function a(o,s){return o.map(c=>{var u,f,d;const g=(d=(f=(u=s.items)===null||u===void 0?void 0:u.properties)===null||f===void 0?void 0:f[c])===null||d===void 0?void 0:d.type;return Array.isArray(g)?!g.includes("object")&&!g.includes("array"):n.includes(g)})}t.exports=i})(k5,k5.exports);var r8e=k5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(r8e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(M5,M5.exports);var n8e=M5.exports,L5={exports:{}},U5={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});function r(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(n,i){if(!n)return!0;const a=Object.keys(i.properties);return a.length===0?!0:{required:a}},dependencies:["properties"]}}e.default=r,t.exports=r})(U5,U5.exports);var i8e=U5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(i8e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(L5,L5.exports);var a8e=L5.exports,B5={exports:{}},F5={exports:{}},VS={};Object.defineProperty(VS,"__esModule",{value:!0});function o8e(t){return()=>({keyword:t,type:"object",schemaType:"array",macro(e){return e.length===0?!0:e.length===1?{required:e}:{[t==="anyRequired"?"anyOf":"oneOf"]:e.map(n=>({required:[n]}))}},metaSchema:{type:"array",items:{type:"string"}}})}VS.default=o8e;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const i=(0,r(VS).default)("anyRequired");e.default=i,t.exports=i})(F5,F5.exports);var s8e=F5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s8e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(B5,B5.exports);var c8e=B5.exports,j5={exports:{}},q5={exports:{}};(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const i=(0,r(VS).default)("oneRequired");e.default=i,t.exports=i})(q5,q5.exports);var u8e=q5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(u8e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(j5,j5.exports);var l8e=j5.exports,H5={exports:{}},V5={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Tr,n=kl,i={message:({params:{missingPattern:o}})=>(0,r.str)`should have property matching pattern '${o}'`,params:({params:{missingPattern:o}})=>(0,r._)`{missingPattern: ${o}}`};function a(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:i,code(o){const{gen:s,schema:c,data:u}=o;if(c.length===0)return;const f=s.let("valid",!0);for(const g of c)d(g);function d(g){const m=s.let("matched",!1);s.forIn("key",u,w=>{s.assign(m,(0,r._)`${(0,n.usePattern)(o,g)}.test(${w})`),s.if(m,()=>s.break())}),o.setParams({missingPattern:g}),s.assign(f,(0,r.and)(f,m)),o.pass(f)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}e.default=a,t.exports=a})(V5,V5.exports);var f8e=V5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(f8e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(H5,H5.exports);var d8e=H5.exports,z5={exports:{}},G5={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});function r(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(n){return n.length===0?!0:n.length===1?{not:{required:n}}:{not:{anyOf:n.map(i=>({required:[i]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}e.default=r,t.exports=r})(G5,G5.exports);var h8e=G5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(h8e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(z5,z5.exports);var p8e=z5.exports,W5={exports:{}},K5={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=kl;function n(o){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(s){const c=[];for(const u in s)c.push(i(u,s[u]));return{allOf:c}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,r.metaSchemaRef)(o)}}}e.default=n;function i(o,s){const c=o.split("/"),u={};let f=u;for(let d=1;d<c.length;d++){let g=c[d];const m=d===c.length-1;g=a(g);const w=f.properties={};let v;if(/[0-9]+/.test(g)){let y=+g;for(v=f.items=[],f.type=["object","array"];y--;)v.push({})}else f.type="object";f=m?s:{},w[g]=f,v&&v.push(f)}return u}function a(o){return o.replace(/~1/g,"/").replace(/~0/g,"~")}t.exports=n})(K5,K5.exports);var g8e=K5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(g8e),i=(a,o)=>a.addKeyword((0,n.default)(o));e.default=i,t.exports=i})(W5,W5.exports);var y8e=W5.exports,Y5={exports:{}},Q5={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Tr;function n(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(a){const{schema:o,data:s}=a,c=o.map(f=>(0,r._)`(${u(f)}) === undefined`);a.fail((0,r.or)(...c));function u(f){if(f==="")throw new Error("empty JSON pointer not allowed");const d=f.split("/");let g=s;const m=d.map((w,v)=>v?g=(0,r._)`${g}${(0,r.getProperty)(i(w))}`:g);return(0,r.and)(...m)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}e.default=n;function i(a){return a.replace(/~1/g,"/").replace(/~0/g,"~")}t.exports=n})(Q5,Q5.exports);var m8e=Q5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(m8e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(Y5,Y5.exports);var v8e=Y5.exports,J5={exports:{}},X5={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r={},n={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:f=>{var d;const g=(d=f==null?void 0:f.max)!==null&&d!==void 0?d:2;return()=>Math.floor(Math.random()*g)},seq:f=>{var d;const g=(d=f==null?void 0:f.name)!==null&&d!==void 0?d:"";return r[g]||(r[g]=0),()=>r[g]++}},i=Object.assign(a,{DEFAULTS:n});function a(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(f,d,g){if(!g.opts.useDefaults||g.compositeRule)return()=>!0;const m={};for(const v in f)m[v]=o(f[v]);const w=g.opts.useDefaults==="empty";return v=>{for(const y in f)(v[y]===void 0||w&&(v[y]===null||v[y]===""))&&(v[y]=m[y]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function o(f){return typeof f=="object"?s(f):c(f)}function s({func:f,args:d}){const g=n[f];return u(f,g),g(d)}function c(f=""){const d=n[f];return u(f,d),d()}function u(f,d){if(!d)throw new Error(`invalid "dynamicDefaults" keyword property value: ${f}`)}e.default=i,t.exports=i})(X5,X5.exports);var b8e=X5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(b8e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(J5,J5.exports);var w8e=J5.exports,Z5={exports:{}},e4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Tr,n=kl,i={message:({params:{schemaProp:o}})=>o?(0,r.str)`should match case "${o}" schema`:(0,r.str)`should match default case schema`,params:({params:{schemaProp:o}})=>o?(0,r._)`{failingCase: ${o}}`:(0,r._)`{failingDefault: true}`};function a(o){const s=(0,n.metaSchemaRef)(o);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:i,dependencies:["selectCases"],code(c){const{gen:u,schemaCode:f,parentSchema:d}=c;c.block$data(r.nil,()=>{const g=u.let("valid",!0),m=u.name("_valid"),w=u.const("value",(0,r._)`${f} === null ? "null" : ${f}`);u.if(!1);for(const v in d.selectCases){c.setParams({schemaProp:v}),u.elseIf((0,r._)`"" + ${w} == ${v}`);const y=c.subschema({keyword:"selectCases",schemaProp:v},m);c.mergeEvaluated(y,r.Name),u.assign(g,m)}if(u.else(),d.selectDefault!==void 0){c.setParams({schemaProp:void 0});const v=c.subschema({keyword:"selectDefault"},m);c.mergeEvaluated(v,r.Name),u.assign(g,m)}u.endIf(),c.pass(g)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:s}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:s}]}e.default=a,t.exports=a})(e4,e4.exports);var _8e=e4.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(_8e),i=(a,o)=>((0,n.default)(o).forEach(s=>a.addKeyword(s)),a);e.default=i,t.exports=i})(Z5,Z5.exports);var E8e=Z5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(F6e),i=r(q6e),a=r(z6e),o=r(W6e),s=r(Z6e),c=r(t8e),u=r(n8e),f=r(a8e),d=r(c8e),g=r(l8e),m=r(d8e),w=r(p8e),v=r(y8e),y=r(v8e),_=r(w8e),b=r(E8e),S={typeof:n.default,instanceof:i.default,range:a.default,exclusiveRange:o.default,regexp:s.default,transform:c.default,uniqueItemProperties:u.default,allRequired:f.default,anyRequired:d.default,oneRequired:g.default,patternRequired:m.default,prohibited:w.default,deepProperties:v.default,deepRequired:y.default,dynamicDefaults:_.default,select:b.default};e.default=S,t.exports=S})(E5,E5.exports);var x8e=E5.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(x8e),i=(o,s)=>{if(Array.isArray(s)){for(const c of s)a(c)(o);return o}if(s)return a(s)(o),o;for(s in n.default)a(s)(o);return o};i.get=a;function a(o){const s=n.default[o];if(!s)throw new Error("Unknown keyword "+o);return s}e.default=i,t.exports=i,t.exports.default=i})(_5,_5.exports);var A8e=_5.exports,t4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=jie,n=Tr,i=Dy,a=Fs,o=cm,s=Fc,c="errorMessage",u=new r.Name("emUsed"),f={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,g=/\$\{([^}]+)\}/g,m=/^""\s*\+\s*|\s*\+\s*""$/g;function w(y){return{keyword:c,schemaType:["string","object"],post:!0,code(_){const{gen:b,data:S,schema:x,schemaValue:I,it:E}=_;if(E.createErrors===!1)return;const p=x,O=n.strConcat(s.default.instancePath,E.errorPath);b.if(r._`${s.default.errors} > 0`,()=>{if(typeof p=="object"){const[L,k]=M(p);k&&B(k),L&&ce(L),he(C(p))}const H=typeof p=="string"?p:p._;H&&F(H),y.keepErrors||U()});function C({properties:H,items:L}){const k={};if(H){k.props={};for(const G in H)k.props[G]=[]}if(L){k.items={};for(let G=0;G<L.length;G++)k.items[G]=[]}return k}function M(H){let L,k;for(const G in H){if(G==="properties"||G==="items")continue;const ge=H[G];if(typeof ge=="object"){L||(L={});const Q=L[G]={};for(const te in ge)Q[te]=[]}else k||(k={}),k[G]=[]}return[L,k]}function B(H){const L=b.const("emErrors",r.stringify(H)),k=b.const("templates",q(H,x));b.forOf("err",s.default.vErrors,te=>b.if(K(te,L),()=>b.code(r._`${L}[${te}.keyword].push(${te})`).assign(r._`${te}.${u}`,!0)));const{singleError:G}=y;if(G){const te=b.let("message",r._`""`),ue=b.let("paramsErrors",r._`[]`);ge(T=>{b.if(te,()=>b.code(r._`${te} += ${typeof G=="string"?G:";"}`)),b.code(r._`${te} += ${Q(T)}`),b.assign(ue,r._`${ue}.concat(${L}[${T}])`)}),o.reportError(_,{message:te,params:r._`{errors: ${ue}}`})}else ge(te=>o.reportError(_,{message:Q(te),params:r._`{errors: ${L}[${te}]}`}));function ge(te){b.forIn("key",L,ue=>b.if(r._`${L}[${ue}].length`,()=>te(ue)))}function Q(te){return r._`${te} in ${k} ? ${k}[${te}]() : ${I}[${te}]`}}function ce(H){const L=b.const("emErrors",r.stringify(H)),k=[];for(const ue in H)k.push([ue,q(H[ue],x[ue])]);const G=b.const("templates",b.object(...k)),ge=b.scopeValue("obj",{ref:f,code:r.stringify(f)}),Q=b.let("emPropParams"),te=b.let("emParamsErrors");b.forOf("err",s.default.vErrors,ue=>b.if(K(ue,L),()=>{b.assign(Q,r._`${ge}[${ue}.keyword]`),b.assign(te,r._`${L}[${ue}.keyword][${ue}.params[${Q}]]`),b.if(te,()=>b.code(r._`${te}.push(${ue})`).assign(r._`${ue}.${u}`,!0))})),b.forIn("key",L,ue=>b.forIn("keyProp",r._`${L}[${ue}]`,T=>{b.assign(te,r._`${L}[${ue}][${T}]`),b.if(r._`${te}.length`,()=>{const fe=b.const("tmpl",r._`${G}[${ue}] && ${G}[${ue}][${T}]`);o.reportError(_,{message:r._`${fe} ? ${fe}() : ${I}[${ue}][${T}]`,params:r._`{errors: ${te}}`})})}))}function he(H){const{props:L,items:k}=H;if(!L&&!k)return;const G=r._`typeof ${S} == "object"`,ge=r._`Array.isArray(${S})`,Q=b.let("emErrors");let te,ue;const T=b.let("templates");L&&k?(te=b.let("emChildKwd"),b.if(G),b.if(ge,()=>{fe(k,x.items),b.assign(te,r.str`items`)},()=>{fe(L,x.properties),b.assign(te,r.str`properties`)}),ue=r._`[${te}]`):k?(b.if(ge),fe(k,x.items),ue=r._`.items`):L&&(b.if(n.and(G,n.not(ge))),fe(L,x.properties),ue=r._`.properties`),b.forOf("err",s.default.vErrors,Ge=>ne(Ge,Q,tt=>b.code(r._`${Q}[${tt}].push(${Ge})`).assign(r._`${Ge}.${u}`,!0))),b.forIn("key",Q,Ge=>b.if(r._`${Q}[${Ge}].length`,()=>{o.reportError(_,{message:r._`${Ge} in ${T} ? ${T}[${Ge}]() : ${I}${ue}[${Ge}]`,params:r._`{errors: ${Q}[${Ge}]}`}),b.assign(r._`${s.default.vErrors}[${s.default.errors}-1].instancePath`,r._`${O} + "/" + ${Ge}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),b.endIf();function fe(Ge,tt){b.assign(Q,r.stringify(Ge)),b.assign(T,q(Ge,tt))}}function F(H){const L=b.const("emErrs",r._`[]`);b.forOf("err",s.default.vErrors,k=>b.if(j(k),()=>b.code(r._`${L}.push(${k})`).assign(r._`${k}.${u}`,!0))),b.if(r._`${L}.length`,()=>o.reportError(_,{message:V(H),params:r._`{errors: ${L}}`}))}function U(){const H=b.const("emErrs",r._`[]`);b.forOf("err",s.default.vErrors,L=>b.if(r._`!${L}.${u}`,()=>b.code(r._`${H}.push(${L})`))),b.assign(s.default.vErrors,H).assign(s.default.errors,r._`${H}.length`)}function K(H,L){return n.and(r._`${H}.keyword !== ${c}`,r._`!${H}.${u}`,r._`${H}.instancePath === ${O}`,r._`${H}.keyword in ${L}`,r._`${H}.schemaPath.indexOf(${E.errSchemaPath}) === 0`,r._`/^\\/[^\\/]*$/.test(${H}.schemaPath.slice(${E.errSchemaPath.length}))`)}function ne(H,L,k){b.if(n.and(r._`${H}.keyword !== ${c}`,r._`!${H}.${u}`,r._`${H}.instancePath.indexOf(${O}) === 0`),()=>{const G=b.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:r._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),ge=b.const("emMatches",r._`${G}.exec(${H}.instancePath.slice(${O}.length))`),Q=b.const("emChild",r._`${ge} && ${ge}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);b.if(r._`${Q} !== undefined && ${Q} in ${L}`,()=>k(Q))})}function j(H){return n.and(r._`${H}.keyword !== ${c}`,r._`!${H}.${u}`,n.or(r._`${H}.instancePath === ${O}`,n.and(r._`${H}.instancePath.indexOf(${O}) === 0`,r._`${H}.instancePath[${O}.length] === "/"`)),r._`${H}.schemaPath.indexOf(${E.errSchemaPath}) === 0`,r._`${H}.schemaPath[${E.errSchemaPath}.length] === "/"`)}function q(H,L){const k=[];for(const G in H){const ge=L[G];d.test(ge)&&k.push([G,$(ge)])}return b.object(...k)}function V(H){return d.test(H)?new i._Code(i.safeStringify(H).replace(g,(L,k)=>`" + JSON.stringify(${a.getData(k,E)}) + "`).replace(m,"")):r.stringify(H)}function $(H){return r._`function(){return ${V(H)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const v=(y,_={})=>{if(!y.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(y.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return y.addKeyword(w(_))};e.default=v,t.exports=v,t.exports.default=v})(t4,t4.exports);var S8e=t4.exports,sk=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateType=Ct.generateLazyValidator=Ct.Ajv=void 0;const qie=sk(jie);Ct.Ajv=qie.default;const I8e=sk(A8e),O8e=sk(S8e);function P8e(t,e){let r=null;const n=(i,a)=>{if(!r){const o=new qie.default({$data:!0,allErrors:!0});(0,I8e.default)(o),(0,O8e.default)(o,{singleError:!0}),e==null||e.forEach(s=>o.addKeyword(s)),r=o.compile(t),Object.defineProperty(n,"errors",{get(){return r==null?void 0:r.errors}})}return r(i,a)};return n}Ct.generateLazyValidator=P8e;function T8e(t,e){return t.validate(e)}Ct.validateType=T8e;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewCamera=void 0;const e=Ct;(function(r){r.STATIC="static",r.INTERACTIVE="interactive"})(t.PreviewCamera||(t.PreviewCamera={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.PreviewCamera||(t.PreviewCamera={}))})(oie);var Hie={};Object.defineProperty(Hie,"__esModule",{value:!0});var Vie={};Object.defineProperty(Vie,"__esModule",{value:!0});var zie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewEmoteEventType=void 0;const e=Ct;(function(r){r.ANIMATION_PLAY="animation_play",r.ANIMATION_PAUSE="animation_pause",r.ANIMATION_LOOP="animation_loop",r.ANIMATION_END="animation_end",r.ANIMATION_PLAYING="animation_playing"})(t.PreviewEmoteEventType||(t.PreviewEmoteEventType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.PreviewEmoteEventType||(t.PreviewEmoteEventType={}))})(zie);var Gie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewEmote=void 0;const e=Ct;(function(r){r.IDLE="idle",r.CLAP="clap",r.DAB="dab",r.DANCE="dance",r.FASHION="fashion",r.FASHION_2="fashion-2",r.FASHION_3="fashion-3",r.FASHION_4="fashion-4",r.LOVE="love",r.MONEY="money",r.FIST_PUMP="fist-pump",r.HEAD_EXPLODE="head-explode"})(t.PreviewEmote||(t.PreviewEmote={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.PreviewEmote||(t.PreviewEmote={}))})(Gie);var Wie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sendMessage=t.PreviewMessageType=void 0;const e=Ct;(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(t.PreviewMessageType||(t.PreviewMessageType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,e.generateLazyValidator)(n.schema)}(t.PreviewMessageType||(t.PreviewMessageType={}));const r=(n,i,a,o="*")=>{const s={type:i,payload:a};n.postMessage(s,o)};t.sendMessage=r})(Wie);var Kie={};Object.defineProperty(Kie,"__esModule",{value:!0});var Yie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewProjection=void 0;const e=Ct;(function(r){r.ORTHOGRAPHIC="orthographic",r.PERSPECTIVE="perspective"})(t.PreviewProjection||(t.PreviewProjection={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.PreviewProjection||(t.PreviewProjection={}))})(Yie);var Qie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewType=void 0;const e=Ct;(function(r){r.TEXTURE="texture",r.WEARABLE="wearable",r.AVATAR="avatar"})(t.PreviewType||(t.PreviewType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.PreviewType||(t.PreviewType={}))})(Qie);var Jie={};Object.defineProperty(Jie,"__esModule",{value:!0});var Xie={};Object.defineProperty(Xie,"__esModule",{value:!0});var Zie={};Object.defineProperty(Zie,"__esModule",{value:!0});var eae={};Object.defineProperty(eae,"__esModule",{value:!0});var tae={};Object.defineProperty(tae,"__esModule",{value:!0});var rae={};Object.defineProperty(rae,"__esModule",{value:!0});var nae={};Object.defineProperty(nae,"__esModule",{value:!0});var iae={};Object.defineProperty(iae,"__esModule",{value:!0});(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(oie,t),r(Hie,t),r(Vie,t),r(zie,t),r(Gie,t),r(Wie,t),r(Kie,t),r(Yie,t),r(Qie,t),r(Jie,t),r(Xie,t),r(Zie,t),r(eae,t),r(tae,t),r(rae,t),r(nae,t),r(iae,t)})(US);var zS={},R8e=Ne&&Ne.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))};Object.defineProperty(zS,"__esModule",{value:!0});zS.createDebounce=void 0;function C8e(){var t=null;return function(e,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];t&&clearTimeout(t),t=setTimeout.apply(void 0,R8e([e,r],n,!1))}}zS.createDebounce=C8e;var GS={},ck={exports:{}},vg=typeof Reflect=="object"?Reflect:null,PW=vg&&typeof vg.apply=="function"?vg.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},Cx;vg&&typeof vg.ownKeys=="function"?Cx=vg.ownKeys:Object.getOwnPropertySymbols?Cx=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Cx=function(e){return Object.getOwnPropertyNames(e)};function N8e(t){console&&console.warn&&console.warn(t)}var aae=Number.isNaN||function(e){return e!==e};function kn(){kn.init.call(this)}ck.exports=kn;ck.exports.once=k8e;kn.EventEmitter=kn;kn.prototype._events=void 0;kn.prototype._eventsCount=0;kn.prototype._maxListeners=void 0;var TW=10;function WS(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(kn,"defaultMaxListeners",{enumerable:!0,get:function(){return TW},set:function(t){if(typeof t!="number"||t<0||aae(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");TW=t}});kn.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};kn.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||aae(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function oae(t){return t._maxListeners===void 0?kn.defaultMaxListeners:t._maxListeners}kn.prototype.getMaxListeners=function(){return oae(this)};kn.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c=="function")PW(c,this,r);else for(var u=c.length,f=fae(c,u),n=0;n<u;++n)PW(f[n],this,r);return!0};function sae(t,e,r,n){var i,a,o;if(WS(r),a=t._events,a===void 0?(a=t._events=Object.create(null),t._eventsCount=0):(a.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),o=a[e]),o===void 0)o=a[e]=r,++t._eventsCount;else if(typeof o=="function"?o=a[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),i=oae(t),i>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=o.length,N8e(s)}return t}kn.prototype.addListener=function(e,r){return sae(this,e,r,!1)};kn.prototype.on=kn.prototype.addListener;kn.prototype.prependListener=function(e,r){return sae(this,e,r,!0)};function D8e(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function cae(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=D8e.bind(n);return i.listener=r,n.wrapFn=i,i}kn.prototype.once=function(e,r){return WS(r),this.on(e,cae(this,e,r)),this};kn.prototype.prependOnceListener=function(e,r){return WS(r),this.prependListener(e,cae(this,e,r)),this};kn.prototype.removeListener=function(e,r){var n,i,a,o,s;if(WS(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,a=o;break}if(a<0)return this;a===0?n.shift():$8e(n,a),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,s||r)}return this};kn.prototype.off=kn.prototype.removeListener;kn.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var a=Object.keys(n),o;for(i=0;i<a.length;++i)o=a[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function uae(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?M8e(i):fae(i,i.length)}kn.prototype.listeners=function(e){return uae(this,e,!0)};kn.prototype.rawListeners=function(e){return uae(this,e,!1)};kn.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):lae.call(t,e)};kn.prototype.listenerCount=lae;function lae(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}kn.prototype.eventNames=function(){return this._eventsCount>0?Cx(this._events):[]};function fae(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function $8e(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function M8e(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function k8e(t,e){return new Promise(function(r,n){function i(o){t.removeListener(e,a),n(o)}function a(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}dae(t,e,a,{once:!0}),e!=="error"&&L8e(t,i,{once:!0})})}function L8e(t,e,r){typeof t.on=="function"&&dae(t,"error",e,r)}function dae(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(a){n.once&&t.removeEventListener(e,i),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var ho=ck.exports;const uk=kc(ho);var KS={};Object.defineProperty(KS,"__esModule",{value:!0});function hae(){let t,e;const r=new Promise((n,i)=>{t=a=>{n(a),r.isPending=!1},e=a=>{i(a),r.isPending=!1}}).catch(n=>Promise.reject(n));return r.resolve=t,r.reject=e,"finally"in r||(r.finally=n=>{r.then(n),r.catch(n)}),r.isPending=!0,r}KS.future=hae;KS.default=hae;var U8e=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(GS,"__esModule",{value:!0});GS.createController=void 0;var B8e=ho,F8e=U8e(KS),WA=US,pae=new Map,r4=new Map;window.onmessage=function(e){if(e.data&&e.data.type)switch(e.data.type){case WA.PreviewMessageType.CONTROLLER_RESPONSE:{var r=e.data.payload,n=r.id,i=pae.get(n);i&&(r.ok?i.resolve(r.result):r.ok===!1&&i.reject(new Error(r.error)));break}case WA.PreviewMessageType.EMOTE_EVENT:{var r=e.data.payload,a=r.type,o=r.payload,s=r4.get(e.source);s&&a&&s.emit(a,o);break}}};var RW=0;function j8e(t){return function(r,n,i){var a=document.getElementById(t),o=t+"-"+RW,s=(0,F8e.default)();pae.set(o,s);var c=WA.PreviewMessageType.CONTROLLER_REQUEST,u={id:o,namespace:r,method:n,params:i};return(0,WA.sendMessage)(a.contentWindow,c,u),RW++,s}}function q8e(t){var e,r=document.getElementById(t);if(!r)throw new Error('Could not find an iframe with id="'.concat(t,'"'));var n=(e=r4.get(r.contentWindow))!==null&&e!==void 0?e:new B8e.EventEmitter;r4.set(r.contentWindow,n);var i=j8e(t);return{scene:{getScreenshot:function(a,o){return i("scene","getScreenshot",[a,o])},getMetrics:function(){return i("scene","getMetrics",[])},changeZoom:function(a){return i("scene","changeZoom",[a])},panCamera:function(a){return i("scene","panCamera",[a])},changeCameraPosition:function(a){return i("scene","changeCameraPosition",[a])}},emote:{getLength:function(){return i("emote","getLength",[])},isPlaying:function(){return i("emote","isPlaying",[])},goTo:function(a){return i("emote","goTo",[a])},play:function(){return i("emote","play",[])},pause:function(){return i("emote","pause",[])},stop:function(){return i("emote","stop",[])},enableSound:function(){return i("emote","enableSound",[])},disableSound:function(){return i("emote","disableSound",[])},hasSound:function(){return i("emote","hasSound",[])},events:n}}}GS.createController=q8e;var YS={},Y0={},QS={},yN={},eh={},CW;function H8e(){if(CW)return eh;CW=1,Object.defineProperty(eh,"__esModule",{value:!0}),eh.getEnvFromQueryParam=eh.getEnvFromTLD=void 0;const t=lk();function e(n){const{host:i}=n;return i.endsWith(".org")?t.Env.PRODUCTION:i.endsWith(".today")||i.endsWith(".net")?t.Env.STAGING:i.endsWith(".io")||i.endsWith(".zone")?t.Env.DEVELOPMENT:null}eh.getEnvFromTLD=e;function r(n){const i=new URLSearchParams(n.search),a=i.get("ENV")||i.get("env");if(a){const o=a.toLowerCase();if((0,t.isEnv)(o))return o}return null}return eh.getEnvFromQueryParam=r,eh}var NW;function lk(){return NW||(NW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnv=t.getDefaultEnv=t.parseEnvVar=t.isEnv=t.getEnvList=t.Env=void 0;const e=H8e();var r;(function(c){c.DEVELOPMENT="dev",c.STAGING="stg",c.PRODUCTION="prod"})(r=t.Env||(t.Env={}));function n(){return Object.values(r)}t.getEnvList=n;function i(c){return n().includes(c)}t.isEnv=i;function a(c){if(i(c))return c;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${c}", possible values are ${n().map(u=>`"${u}"`).join(", ")}.`)}t.parseEnvVar=a;function o(c={}){const{DCL_DEFAULT_ENV:u,REACT_APP_DCL_DEFAULT_ENV:f,GATSBY_DCL_DEFAULT_ENV:d}=c;if(u&&f&&u!==f)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(u&&d&&u!==d)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(f&&d&&f!==d)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return u?a(u):f?a(f):d?a(d):r.PRODUCTION}t.getDefaultEnv=o;function s(c={}){if(typeof window<"u"){const u=(0,e.getEnvFromQueryParam)(window.location);if(u)return u;const f=(0,e.getEnvFromTLD)(window.location);if(f)return f}return o(c)}t.getEnv=s}(yN)),yN}Object.defineProperty(QS,"__esModule",{value:!0});QS.createConfig=void 0;const V8e=lk();function z8e(t,e){const r=(0,V8e.getEnv)(e==null?void 0:e.systemEnvVariables),n=t[r];return{get:(i,a="")=>{if(!n)throw new Error(`Could not find a config for env=${r}`);return i in n?n[i]:a},is:i=>r===i,getEnv:()=>r}}QS.createConfig=z8e;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnv=t.Env=t.createConfig=void 0;var e=QS;Object.defineProperty(t,"createConfig",{enumerable:!0,get:function(){return e.createConfig}});var r=lk();Object.defineProperty(t,"Env",{enumerable:!0,get:function(){return r.Env}}),Object.defineProperty(t,"getEnv",{enumerable:!0,get:function(){return r.getEnv}})})(Y0);const G8e="https://wearable-preview.decentraland.zone",W8e="https://decentraland.zone/account",K8e="https://decentraland.zone/profile",Y8e="https://decentraland.zone/marketplace",Q8e="https://decentraland.zone/builder",J8e="https://decentraland.zone/dao",X8e="https://decentraland.zone/governance",Z8e="https://decentraland.zone/events",e5e="https://decentraland.zone/places",t5e={WEARABLE_PREVIEW_URL:G8e,ACCOUNT_URL:W8e,PROFILE_URL:K8e,MARKETPLACE_URL:Y8e,BUILDER_URL:Q8e,DAO_URL:J8e,GOVERNANCE_URL:X8e,EVENTS_URL:Z8e,PLACES_URL:e5e},r5e="https://wearable-preview.decentraland.today",n5e="https://decentraland.today/account",i5e="https://decentraland.today/profile",a5e="https://decentraland.today/marketplace",o5e="https://decentraland.today/builder",s5e="https://decentraland.today/dao",c5e="https://decentraland.today/governance",u5e="https://decentraland.today/events",l5e="https://decentraland.today/places",f5e={WEARABLE_PREVIEW_URL:r5e,ACCOUNT_URL:n5e,PROFILE_URL:i5e,MARKETPLACE_URL:a5e,BUILDER_URL:o5e,DAO_URL:s5e,GOVERNANCE_URL:c5e,EVENTS_URL:u5e,PLACES_URL:l5e},d5e="https://wearable-preview.decentraland.org",h5e="https://decentraland.org/account",p5e="https://decentraland.org/profile",g5e="https://decentraland.org/marketplace",y5e="https://decentraland.org/builder",m5e="https://decentraland.org/dao",v5e="https://decentraland.org/governance",b5e="https://decentraland.org/events",w5e="https://decentraland.org/places",_5e={WEARABLE_PREVIEW_URL:d5e,ACCOUNT_URL:h5e,PROFILE_URL:p5e,MARKETPLACE_URL:g5e,BUILDER_URL:y5e,DAO_URL:m5e,GOVERNANCE_URL:v5e,EVENTS_URL:b5e,PLACES_URL:w5e};var fk=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Pv;Object.defineProperty(YS,"__esModule",{value:!0});YS.config=void 0;var xE=Y0,E5e=fk(t5e),x5e=fk(f5e),A5e=fk(_5e);YS.config=(0,xE.createConfig)((Pv={},Pv[xE.Env.DEVELOPMENT]=E5e.default,Pv[xE.Env.STAGING]=x5e.default,Pv[xE.Env.PRODUCTION]=A5e.default,Pv));var S5e=Ne&&Ne.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),I5e=Ne&&Ne.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),O5e=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),P5e=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&I5e(e,t,r);return O5e(e,t),e},T5e=Ne&&Ne.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r},R5e=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iM,"__esModule",{value:!0});var gae=iM.WearablePreview=void 0,DW=P5e(Be),C5e=R5e(KTe),Tv=US,N5e=zS,D5e=GS,$5e=YS,M5e=(0,N5e.createDebounce)(),k5e=function(t){S5e(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.state={isReady:!1,pendingOptions:null,lastOptions:null},r.iframe=null,r.getUrl=function(){var n=r.props,i=n.contractAddress,a=n.tokenId,o=n.itemId,s=n.profile,c=n.urns,u=n.urls,f=n.base64s,d=n.skin,g=n.hair,m=n.eyes,w=n.bodyShape,v=n.emote,y=n.camera,_=n.projection,b=n.zoom,S=n.background,x=n.offsetX,I=n.offsetY,E=n.offsetZ,p=n.cameraX,O=n.cameraY,C=n.cameraZ,M=n.wheelZoom,B=n.wheelPrecision,ce=n.wheelStart,he=n.disableBackground,F=n.disableAutoRotate,U=n.disableAutoCenter,K=n.disableFace,ne=n.disableDefaultWearables,j=n.disableDefaultEmotes,q=n.disableFadeEffect,V=n.showSceneBoundaries,$=n.showThumbnailBoundaries,H=n.panning,L=n.lockAlpha,k=n.lockBeta,G=n.lockRadius,ge=n.dev,Q=n.baseUrl,te=n.peerUrl,ue=n.nftServerUrl,T=n.type,fe=i?"contract=".concat(i):"",Ge=a?"token=".concat(a):"",tt=o?"item=".concat(o):"",mt=s?"profile=".concat(s):"",vt=c&&c.length>0?c.map(function(le){return"urn=".concat(le)}).join("&"):"",gt=u&&u.length>0?u.map(function(le){return"url=".concat(le)}).join("&"):"",Lt=f&&f.length>0?f.map(function(le){return"base64=".concat(le)}).join("&"):"",Yt=d?"skin=".concat(d):"",_r=g?"hair=".concat(g):"",Rt=m?"eyes=".concat(m):"",Pt=w?"bodyShape=".concat(w):"",kt=v?"emote=".concat(v):"",Nt=y?"camera=".concat(y):"",Kt=_?"projection=".concat(_):"",Ut=isNaN(b)?"":"zoom=".concat(b),Vt=S?"background=".concat(S):"",$t=isNaN(x)?"":"offsetX=".concat(x),Dt=isNaN(I)?"":"offsetY=".concat(I),qt=isNaN(E)?"":"offsetZ=".concat(E),Mt=isNaN(p)?"":"cameraX=".concat(p),cr=isNaN(O)?"":"cameraY=".concat(O),tr=isNaN(C)?"":"cameraZ=".concat(C),ir=isNaN(M)?"":"wheelZoom=".concat(M),nr=isNaN(B)?"":"wheelPrecision=".concat(B),vr=isNaN(ce)?"":"wheelStart=".concat(ce),wn=he?"disableBackground":"",Yr=F?"disableAutoRotate":"",ai=U?"disableAutoCenter":"",Dn=K?"disableFace":"",$n=ne?"disableDefaultWearables":"",Kn=j?"disableDefaultEmotes":"",Ar=q?"disableFadeEffect":"",Mr=V?"showSceneBoundaries":"",Er=$?"showThumbnailBoundaries":"",_e=te?"peerUrl=".concat(te):"",ee=ue?"nftServerUrl=".concat(ue):"",ve=T?"type=".concat(T):"",Re=H===!1?"panning=false":"",ze=L?"lockAlpha=true":"",Xe=k?"lockBeta=true":"",st=G?"lockRadius=true":"",lt=ge?"env=dev":"",_t=Q+"?"+[fe,Ge,tt,mt,vt,gt,Lt,Yt,_r,Rt,Pt,kt,Nt,Kt,Ut,Vt,$t,Dt,qt,Mt,cr,tr,ir,nr,vr,wn,Yr,ai,Dn,$n,Kn,Ar,Mr,Er,_e,ee,ve,Re,ze,Xe,st,lt].filter(function(le){return!!le}).join("&");return _t},r.getOptions=function(){var n=r.props;n.dev;var i=T5e(n,["dev"]),a={};for(var o in i)typeof i[o]!="function"&&(a[o]=i[o]);return a},r.handleMessage=function(n){var i=r.props,a=i.baseUrl,o=i.onLoad,s=i.onError,c=n.origin;if(c===a&&n.data&&n.data.type){var u=n.data.type;switch(u){case Tv.PreviewMessageType.LOAD:{o();break}case Tv.PreviewMessageType.ERROR:{var f=n.data.payload;s(new Error(f.message));break}case Tv.PreviewMessageType.READY:{var d=r.state,g=d.isReady,m=d.pendingOptions;if(g)return;m!==null?(r.sendUpdate(m),r.setState({isReady:!0,pendingOptions:null})):r.setState({isReady:!0});break}}}},r.handleUpdate=function(){if(r.iframe){if(window){var n=r.getOptions();r.state.isReady?r.sendUpdate(n):r.setState({pendingPreviewOptions:n})}}else console.warn("Could not send update, iframe is not referenced")},r.sendUpdate=function(n){var i=r.state.lastOptions;if(!i||!(0,C5e.default)(n,i)){(0,Tv.sendMessage)(r.iframe.contentWindow,Tv.PreviewMessageType.UPDATE,{options:n});var a=r.props.onUpdate;a(n),r.setState({lastOptions:n})}},r.refIframe=function(n){r.iframe=n},r}return e.createController=function(r){return(0,D5e.createController)(r)},e.prototype.componentDidMount=function(){window.addEventListener("message",this.handleMessage,!1),this.setState({url:this.getUrl()}),this.props.blob&&this.handleUpdate()},e.prototype.componentWillUnmount=function(){window.removeEventListener("message",this.handleMessage,!1)},e.prototype.componentDidUpdate=function(){M5e(this.handleUpdate,500)},e.prototype.render=function(){return this.props.tokenId&&this.props.itemId&&console.warn("You should NOT use `tokenId` and `itemId` props simultaneously"),DW.createElement("iframe",{id:this.props.id,className:"WearablePreview",src:this.state.url,width:"100%",height:"100%",frameBorder:"0",ref:this.refIframe,allow:"autoplay"})},e.defaultProps={dev:!1,baseUrl:$5e.config.get("WEARABLE_PREVIEW_URL"),onLoad:function(){},onError:function(){},onUpdate:function(){}},e}(DW.PureComponent);gae=iM.WearablePreview=k5e;var dd={},My={},mN={},vN={},$W;function yae(){return $W||($W=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=t.ChainName=void 0;const e=Ct,r=as();var n;(function(a){a.ETHEREUM_MAINNET="Ethereum Mainnet",a.ETHEREUM_ROPSTEN="Ropsten",a.ETHEREUM_RINKEBY="Rinkeby",a.ETHEREUM_GOERLI="Goerli",a.ETHEREUM_KOVAN="Kovan",a.ETHEREUM_SEPOLIA="Sepolia",a.MATIC_MAINNET="Polygon",a.MATIC_MUMBAI="Mumbai"})(n=t.ChainName||(t.ChainName={}));function i(a){switch(a){case n.ETHEREUM_MAINNET:return r.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return r.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return r.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return r.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return r.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return r.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return r.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return r.ChainId.MATIC_MUMBAI;default:return null}}t.getChainId=i,function(a){a.schema={type:"string",enum:Object.values(a)},a.validate=(0,e.generateLazyValidator)(a.schema)}(n=t.ChainName||(t.ChainName={}))}(vN)),vN}var Zs={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Network=void 0;const e=Ct;(function(r){r.ETHEREUM="ETHEREUM",r.MATIC="MATIC"})(t.Network||(t.Network={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.Network||(t.Network={}))})(Zs);var MW;function as(){return MW||(MW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getNetwork=t.getNetworkMapping=t.getURNProtocol=t.getChainName=t.ChainId=void 0;const e=Ct,r=yae(),n=Zs;var i;(function(u){u[u.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",u[u.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",u[u.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",u[u.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",u[u.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",u[u.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",u[u.MATIC_MAINNET=137]="MATIC_MAINNET",u[u.MATIC_MUMBAI=80001]="MATIC_MUMBAI"})(i=t.ChainId||(t.ChainId={}));function a(u){switch(u){case i.ETHEREUM_MAINNET:return r.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return r.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return r.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return r.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return r.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return r.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return r.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return r.ChainName.MATIC_MUMBAI;default:return null}}t.getChainName=a;function o(u){switch(u){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai"}}t.getURNProtocol=o;function s(u){switch(u){case i.ETHEREUM_MAINNET:return{[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.ETHEREUM_ROPSTEN:return{[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_RINKEBY:return{[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_GOERLI:return{[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_KOVAN:return{[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_SEPOLIA:return{[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.MATIC_MAINNET:return{[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.MATIC_MUMBAI:return{[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI}}}t.getNetworkMapping=s;function c(u){switch(u){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:return n.Network.MATIC}}t.getNetwork=c,function(u){u.schema={type:"number",enum:Object.values(u)},u.validate=(0,e.generateLazyValidator)(u.schema)}(i=t.ChainId||(t.ChainId={}))}(mN)),mN}var Ic={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderType=void 0;const e=Ct;(function(r){r.INJECTED="injected",r.MAGIC="magic",r.FORTMATIC="formatic",r.NETWORK="network",r.WALLET_CONNECT="wallet_connect",r.WALLET_CONNECT_V2="wallet_connect_v2",r.WALLET_LINK="wallet_link",r.METAMASK_MOBILE="metamask_mobile",r.AUTH_SERVER="auth_server"})(t.ProviderType||(t.ProviderType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.ProviderType||(t.ProviderType={}))})(Ic);var bg;(function(t){t.Update="Web3ReactUpdate",t.Error="Web3ReactError",t.Deactivate="Web3ReactDeactivate"})(bg||(bg={}));const L5e=Object.freeze(Object.defineProperty({__proto__:null,get ConnectorEvent(){return bg}},Symbol.toStringTag,{value:"Module"})),U5e=lo(L5e);var dk={},JS={};function B5e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var XS=function(t){B5e(e,t);function e(n){var i,a=n===void 0?{}:n,o=a.supportedChainIds;return i=t.call(this)||this,i.supportedChainIds=o,i}var r=e.prototype;return r.emitUpdate=function(i){this.emit(bg.Update,i)},r.emitError=function(i){this.emit(bg.Error,i)},r.emitDeactivate=function(){this.emit(bg.Deactivate)},e}(ho.EventEmitter);const F5e=Object.freeze(Object.defineProperty({__proto__:null,AbstractConnector:XS},Symbol.toStringTag,{value:"Module"})),mae=lo(F5e);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractConnector=void 0;const e=mae;Object.defineProperty(t,"AbstractConnector",{enumerable:!0,get:function(){return e.AbstractConnector}})})(JS);var ZS={},Ll={},vae={},bae={},wae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SceneUpdate=t.SCENE_UPDATE=void 0;const e=Ct;t.SCENE_UPDATE="SCENE_UPDATE",function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[t.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.SceneUpdate||(t.SceneUpdate={}))})(wae);var _ae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Update=t.UPDATE=void 0;const e=Ct;t.UPDATE="update",function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[t.UPDATE]}},required:["type"]},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.Update||(t.Update={}))})(_ae);(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(wae,t),r(_ae,t)})(bae);var Eae={},xae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectType=void 0;const e=Ct;(function(r){r.SCENE="scene",r.SMART_ITEM="smart-item",r.PORTABLE_EXPERIENCE="portable-experience",r.LIBRARY="library"})(t.ProjectType||(t.ProjectType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.ProjectType||(t.ProjectType={}))})(xae);var Aae={},kw={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Rarity=void 0;const e=Ct;(function(r){r.UNIQUE="unique",r.MYTHIC="mythic",r.LEGENDARY="legendary",r.EPIC="epic",r.RARE="rare",r.UNCOMMON="uncommon",r.COMMON="common"})(t.Rarity||(t.Rarity={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema);const n={[r.UNIQUE]:1,[r.MYTHIC]:10,[r.LEGENDARY]:100,[r.EPIC]:1e3,[r.RARE]:5e3,[r.UNCOMMON]:1e4,[r.COMMON]:1e5},i={[r.UNIQUE]:"#FFE617",[r.MYTHIC]:"#FB7DE3",[r.LEGENDARY]:"#A657ED",[r.EPIC]:"#6397F2",[r.RARE]:"#3AD682",[r.UNCOMMON]:"#FF8563",[r.COMMON]:"#D4E0E0"},a={[r.UNIQUE]:"#FFB626",[r.MYTHIC]:"#FF63E1",[r.LEGENDARY]:"#842DDA",[r.EPIC]:"#3D85E6",[r.RARE]:"#36CF75",[r.UNCOMMON]:"#ED6D4F",[r.COMMON]:"#ABC1C1"};function o(u){return n[u]}r.getMaxSupply=o;function s(u){return a[u]}r.getColor=s;function c(u){return[i[u],a[u]]}r.getGradient=c}(t.Rarity||(t.Rarity={}))})(kw);var Id={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WearableCategory=void 0;const e=Ct;(function(r){r.EYEBROWS="eyebrows",r.EYES="eyes",r.FACIAL_HAIR="facial_hair",r.HAIR="hair",r.BODY_SHAPE="body_shape",r.MOUTH="mouth",r.UPPER_BODY="upper_body",r.LOWER_BODY="lower_body",r.FEET="feet",r.EARRING="earring",r.EYEWEAR="eyewear",r.HAT="hat",r.HELMET="helmet",r.MASK="mask",r.TIARA="tiara",r.TOP_HEAD="top_head",r.SKIN="skin",r.HANDS_WEAR="hands_wear"})(t.WearableCategory||(t.WearableCategory={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.WearableCategory||(t.WearableCategory={}))})(Id);var eI={},tI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.BodyShape=void 0;const e=Ct;(function(r){r.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",r.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(t.BodyShape||(t.BodyShape={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.BodyShape||(t.BodyShape={}))})(tI);var rI={},hk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.BodyPartCategory=void 0;const e=Ct;(function(r){r.HEAD="head",r.HANDS="hands"})(t.BodyPartCategory||(t.BodyPartCategory={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.BodyPartCategory||(t.BodyPartCategory={}))})(hk);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.HideableWearableCategory=void 0;const e=Id,r=Ct,n=hk;(function(i){i.schema={oneOf:[Object.assign({},e.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,r.generateLazyValidator)(i.schema)})(t.HideableWearableCategory||(t.HideableWearableCategory={}))})(rI);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WearableRepresentation=void 0;const e=Ct,r=tI,n=rI;(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,e.generateLazyValidator)(i.schema)})(t.WearableRepresentation||(t.WearableRepresentation={}))})(eI);var nI={},Sae={},pk={},Rp={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.IPFSv1=t.IPFSv2=t.EthAddress=t.Color3=void 0;const e=Ct;(function(r){r.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,e.generateLazyValidator)(r.schema);r.validate=i=>n(i)})(t.Color3||(t.Color3={})),function(r){r.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)}(t.EthAddress||(t.EthAddress={})),function(r){r.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)}(t.IPFSv2||(t.IPFSv2={})),function(r){r.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)}(t.IPFSv1||(t.IPFSv1={}))})(Rp);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Avatar=t.Link=t.LinkUrl=t.AvatarInfo=t.Snapshots=void 0;const e=Id,r=Rp,n=Ct;var i;(function(c){c.schema={type:"object",required:["face256","body"],properties:{face256:r.IPFSv2.schema,body:r.IPFSv2.schema}},c.validate=(0,n.generateLazyValidator)(c.schema)})(i=t.Snapshots||(t.Snapshots={}));var a;(function(c){c.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:e.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},c.validate=(0,n.generateLazyValidator)(c.schema)})(a=t.AvatarInfo||(t.AvatarInfo={}));var o;(function(c){c.schema={type:"string",pattern:"^[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$"};const u=new RegExp(c.schema.pattern,"i");c.validate=f=>u.test(f)})(o=t.LinkUrl||(t.LinkUrl={}));var s;(function(c){c.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:o.schema}}})(s=t.Link||(t.Link={})),function(c){c.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:s.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:r.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:a.schema},additionalProperties:!0},c.validate=(0,n.generateLazyValidator)(c.schema)}(t.Avatar||(t.Avatar={}))})(pk);var Iae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Profile=void 0;const e=Ct,r=pk;(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:r.Avatar.schema}},additionalProperties:!0},n.validate=(0,e.generateLazyValidator)(n.schema)})(t.Profile||(t.Profile={}))})(Iae);(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(pk,t),r(Iae,t)})(Sae);var Oae={},gk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureToggles=t.portableExperiencesToggles=t.toggles=void 0;const e=Ct;t.toggles=["enabled","disabled"],t.portableExperiencesToggles=[...t.toggles,"hideUi"],function(r){r.schema={type:"object",properties:{voiceChat:{type:"string",enum:t.toggles,nullable:!0},portableExperiences:{type:"string",enum:t.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${t.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${t.toggles.join(", ")}`,required:[]},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.FeatureToggles||(t.FeatureToggles={}))})(gk);var yk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorldConfiguration=void 0;const e=Ct;(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.WorldConfiguration||(t.WorldConfiguration={}))})(yk);var mk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SceneParcels=void 0;const e=Ct;(function(r){r.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},r.schemaValidator=(0,e.generateLazyValidator)(r.schema),r.validate=n=>r.schemaValidator(n)&&n.parcels.includes(n.base)})(t.SceneParcels||(t.SceneParcels={}))})(mk);var Pae={},fm={};Object.defineProperty(fm,"__esModule",{value:!0});fm.displayableProperties=void 0;fm.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var vk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Source=void 0;const e=Ct;(function(r){r.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.Source||(t.Source={}))})(vk);var bk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SpawnPoint=void 0;const e=Ct;(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.SpawnPoint||(t.SpawnPoint={}))})(bk);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Scene=t.RequiredPermission=void 0;const e=Ct,r=fm,n=gk,i=mk,a=vk,o=bk,s=yk;var c;(function(u){u.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",u.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",u.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",u.USE_WEB3_API="USE_WEB3_API",u.USE_FETCH="USE_FETCH",u.USE_WEBSOCKET="USE_WEBSOCKET",u.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(c=t.RequiredPermission||(t.RequiredPermission={})),function(u){u.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},r.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},a.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:o.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(c)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},s.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:c.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},u.validate=(0,e.generateLazyValidator)(u.schema)}(t.Scene||(t.Scene={}))})(Pae);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SpawnPoint=t.Source=t.RequiredPermission=t.Scene=t.SceneParcels=t.WorldConfiguration=t.FeatureToggles=void 0;var e=gk;Object.defineProperty(t,"FeatureToggles",{enumerable:!0,get:function(){return e.FeatureToggles}});var r=yk;Object.defineProperty(t,"WorldConfiguration",{enumerable:!0,get:function(){return r.WorldConfiguration}});var n=mk;Object.defineProperty(t,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=Pae;Object.defineProperty(t,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(t,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=vk;Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return a.Source}});var o=bk;Object.defineProperty(t,"SpawnPoint",{enumerable:!0,get:function(){return o.SpawnPoint}})})(Oae);var bN={},wk={},_k={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Locale=void 0;const e=Ct;(function(r){r.EN="en",r.ES="es"})(t.Locale||(t.Locale={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.Locale||(t.Locale={}))})(_k);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.I18N=void 0;const e=Ct,r=_k;(function(n){n.schema={type:"object",properties:{code:r.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,e.generateLazyValidator)(n.schema)})(t.I18N||(t.I18N={}))})(wk);var Ek={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Metrics=void 0;const e=Ct;(function(r){r.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.Metrics||(t.Metrics={}))})(Ek);var iI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.isStandard=t.standardProperties=void 0;const e=kw,r=Ct;t.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:e.Rarity.schema};const n={type:"object",properties:Object.assign({},t.standardProperties),required:["collectionAddress","rarity"]},i=(0,r.generateLazyValidator)(n);function a(o){return i(o)}t.isStandard=a})(iI);var aI={},xk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleProof=void 0;const e=Ct;(function(r){r.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.MerkleProof||(t.MerkleProof={}))})(xk);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.isThirdParty=t.thirdPartyProps=void 0;const e=Ct,r=xk;t.thirdPartyProps={merkleProof:r.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]}};const n={type:"object",properties:Object.assign({},t.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},i={keyword:"_containsHashingKeys",validate:(s,c)=>{var u;const f=c;return!((u=f==null?void 0:f.merkleProof)===null||u===void 0)&&u.hashingKeys?f.merkleProof.hashingKeys.every(d=>f.hasOwnProperty(d)):!1},errors:!1},a=(0,e.generateLazyValidator)(n,[i]);function o(s){return a(s)}t.isThirdParty=o})(aI);var Tae={},Rae={},Rl={};Object.defineProperty(Rl,"__esModule",{value:!0});Rl.isBaseAvatar=Rl.requiredBaseItemProps=Rl.baseItemProperties=void 0;const j5e=wk,q5e=Ek,H5e=fm;Rl.baseItemProperties=Object.assign(Object.assign({},H5e.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:j5e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},q5e.Metrics.schema),{nullable:!0})});Rl.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function V5e(t){if(!t||!t.id)return!1;const e=t.id.split(":"),r=e[1]==="decentraland",n=e[3]==="base-avatars";return e.length===5&&r&&n}Rl.isBaseAvatar=V5e;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Wearable=void 0;const e=Ct,r=Id,n=eI,i=Rl,a=iI,o=aI,s=rI;(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),a.standardProperties),o.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:s.HideableWearableCategory.schema},hides:{type:"array",items:s.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const u={keyword:"_isThirdParty",validate:(d,g)=>!d||(0,o.isThirdParty)(g),errors:!1},f={keyword:"_isBaseAvatar",validate:(d,g)=>!d||(0,i.isBaseAvatar)(g),errors:!1};c.validate=(0,e.generateLazyValidator)(c.schema,[u,f])})(t.Wearable||(t.Wearable={}))})(Rae);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.HideableWearableCategory=t.BodyPartCategory=t.WearableCategory=t.Wearable=t.WearableRepresentation=void 0;var e=eI;Object.defineProperty(t,"WearableRepresentation",{enumerable:!0,get:function(){return e.WearableRepresentation}});var r=Rae;Object.defineProperty(t,"Wearable",{enumerable:!0,get:function(){return r.Wearable}});var n=Id;Object.defineProperty(t,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=hk;Object.defineProperty(t,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=rI;Object.defineProperty(t,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}})})(Tae);var wN={},_N={},Ak={},Sk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmoteCategory=void 0;const e=Ct;(function(r){r.DANCE="dance",r.STUNT="stunt",r.GREETINGS="greetings",r.FUN="fun",r.POSES="poses",r.REACTIONS="reactions",r.HORROR="horror",r.MISCELLANEOUS="miscellaneous"})(t.EmoteCategory||(t.EmoteCategory={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.EmoteCategory||(t.EmoteCategory={}))})(Sk);var Ik={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmoteRepresentationADR74=void 0;const e=Ct,r=tI;(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,e.generateLazyValidator)(n.schema)})(t.EmoteRepresentationADR74||(t.EmoteRepresentationADR74={}))})(Ik);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmoteDataADR74=void 0;const e=Sk,r=Ct,n=Ik;(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:e.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,r.generateLazyValidator)(i.schema)})(t.EmoteDataADR74||(t.EmoteDataADR74={}))})(Ak);var kW;function z5e(){return kW||(kW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Emote=void 0;const e=Nae(),r=Ct,n=Rl,i=iI,a=aI,o=Ak;(function(s){s.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),a.thirdPartyProps),{emoteDataADR74:o.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const c={keyword:"_isThirdParty",validate:(u,f)=>!u||(0,e.isThirdParty)(f),errors:!1};s.validate=(0,r.generateLazyValidator)(s.schema,[c])})(t.Emote||(t.Emote={}))}(_N)),_N}var Cae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmotePlayMode=void 0;const e=Ct;(function(r){r.SIMPLE="simple",r.LOOP="loop"})(t.EmotePlayMode||(t.EmotePlayMode={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.EmotePlayMode||(t.EmotePlayMode={}))})(Cae);var LW;function G5e(){return LW||(LW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmotePlayMode=t.EmoteCategory=t.EmoteDataADR74=t.EmoteRepresentationADR74=t.Emote=void 0;var e=z5e();Object.defineProperty(t,"Emote",{enumerable:!0,get:function(){return e.Emote}});var r=Ik;Object.defineProperty(t,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return r.EmoteRepresentationADR74}});var n=Ak;Object.defineProperty(t,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=Sk;Object.defineProperty(t,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var a=Cae;Object.defineProperty(t,"EmotePlayMode",{enumerable:!0,get:function(){return a.EmotePlayMode}})}(wN)),wN}var UW;function Nae(){return UW||(UW=1,function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(u,f,d,g){g===void 0&&(g=d);var m=Object.getOwnPropertyDescriptor(f,d);(!m||("get"in m?!f.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return f[d]}}),Object.defineProperty(u,g,m)}:function(u,f,d,g){g===void 0&&(g=d),u[g]=f[d]}),r=Ne&&Ne.__exportStar||function(u,f){for(var d in u)d!=="default"&&!Object.prototype.hasOwnProperty.call(f,d)&&e(f,u,d)};Object.defineProperty(t,"__esModule",{value:!0}),t.isThirdParty=t.isStandard=t.BodyShape=t.Metrics=t.Locale=t.I18N=void 0;var n=wk;Object.defineProperty(t,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=_k;Object.defineProperty(t,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=Ek;Object.defineProperty(t,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var o=tI;Object.defineProperty(t,"BodyShape",{enumerable:!0,get:function(){return o.BodyShape}});var s=iI;Object.defineProperty(t,"isStandard",{enumerable:!0,get:function(){return s.isStandard}});var c=aI;Object.defineProperty(t,"isThirdParty",{enumerable:!0,get:function(){return c.isThirdParty}}),r(Tae,t),r(G5e(),t)}(bN)),bN}var Dae={};(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(xk,t)})(Dae);var $ae={},oI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AuthChain=t.AuthLink=t.AuthLinkType=void 0;const e=Ct;var r;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(r=t.AuthLinkType||(t.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:r.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,e.generateLazyValidator)(i.schema)})(n=t.AuthLink||(t.AuthLink={})),function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,e.generateLazyValidator)(i.schema)}(t.AuthChain||(t.AuthChain={}))})(oI);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PointerChangesSyncDeployment=t.SnapshotSyncDeployment=void 0;const e=Rp,r=oI,n=Ct;(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:e.IPFSv1.schema}},{properties:{entityId:e.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(t.SnapshotSyncDeployment||(t.SnapshotSyncDeployment={})),function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:e.IPFSv1.schema}},{properties:{entityId:e.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)}(t.PointerChangesSyncDeployment||(t.PointerChangesSyncDeployment={}))})($ae);var Mae={},Ok={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ContentMapping=void 0;const e=Rp,r=Ct;(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[e.IPFSv1.schema,e.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(t.ContentMapping||(t.ContentMapping={}))})(Ok);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Entity=t.EntityType=void 0;const e=Rp,r=Ok,n=Ct;(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(t.EntityType||(t.EntityType={})),function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[e.IPFSv1.schema,e.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:r.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,n.generateLazyValidator)(i.schema)}(t.Entity||(t.Entity={}))})(Mae);var kae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeploymentWithAuthChain=void 0;const e=oI,r=Ct;(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:e.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(t.DeploymentWithAuthChain||(t.DeploymentWithAuthChain={}))})(kae);var Lae={},Uae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Outfits=t.Outfit=void 0;const e=Id,r=Rp,n=Ct;var i;(function(a){a.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:e.WearableCategory.schema}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(i=t.Outfit||(t.Outfit={})),function(a){a.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)}(t.Outfits||(t.Outfits={}))})(Uae);(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(Uae,t)})(Lae);(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(Sae,t),r(Oae,t),r(Nae(),t),r(fm,t),r(Dae,t),r($ae,t),r(Mae,t),r(kae,t),r(Lae,t)})(nI);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WearableJson=void 0;const e=kw,r=Id,n=eI,i=Ct,a=nI;(function(o){o.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},e.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:r.WearableCategory.schema},hides:{type:"array",items:r.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:a.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(t.WearableJson||(t.WearableJson={}))})(Aae);(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(xae,t),r(Aae,t)})(Eae);(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(bae,t),r(Eae,t)})(vae);var Bae={},sI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ListingStatus=void 0;const e=Ct;(function(r){r.OPEN="open",r.SOLD="sold",r.CANCELLED="cancelled"})(t.ListingStatus||(t.ListingStatus={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.ListingStatus||(t.ListingStatus={}))})(sI);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Bid=t.BidSortBy=void 0;const e=Ct,r=as(),n=sI,i=Zs;(function(a){a.RECENTLY_OFFERED="recently_offered",a.RECENTLY_UPDATED="recently_updated",a.MOST_EXPENSIVE="most_expensive"})(t.BidSortBy||(t.BidSortBy={})),function(a){a.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},a.validate=(0,e.generateLazyValidator)(a.schema)}(t.Bid||(t.Bid={}))})(Bae);var Fae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Account=t.AccountSortBy=void 0;const e=Ct;(function(r){r.MOST_SALES="most_sales",r.MOST_PURCHASES="most_purchases",r.MOST_SPENT="most_spent",r.MOST_EARNED="most_earned",r.MOST_ROYALTIES="most_royalties",r.MOST_COLLECTIONS="most_collections"})(t.AccountSortBy||(t.AccountSortBy={})),function(r){r.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.Account||(t.Account={}))})(Fae);var jae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=t.CollectionSortBy=void 0;const e=Ct,r=as(),n=Zs;(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(t.CollectionSortBy||(t.CollectionSortBy={})),function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,e.generateLazyValidator)(i.schema)}(t.Collection||(t.Collection={}))})(jae);var qae={},Lw={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.NFTCategory=void 0;const e=Ct;(function(r){r.PARCEL="parcel",r.ESTATE="estate",r.WEARABLE="wearable",r.ENS="ens",r.EMOTE="emote"})(t.NFTCategory||(t.NFTCategory={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.NFTCategory||(t.NFTCategory={}))})(Lw);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=t.ContractSortBy=void 0;const e=Ct,r=as(),n=Zs,i=Lw;(function(a){a.NAME="name"})(t.ContractSortBy||(t.ContractSortBy={})),function(a){a.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:r.ChainId.schema},required:["name","address","category","network","chainId"]},a.validate=(0,e.generateLazyValidator)(a.schema)}(t.Contract||(t.Contract={}))})(qae);var Hae={},Pk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.NFT=t.NFTSortBy=void 0;const e=Ct,r=as(),n=nI,i=Zs,a=Lw,o=kw,s=Id;(function(c){c.NAME="name",c.NEWEST="newest",c.RECENTLY_LISTED="recently_listed",c.RECENTLY_SOLD="recently_sold",c.CHEAPEST="cheapest",c.RENTAL_LISTING_DATE="rental_listing_date",c.RENTAL_DATE="rented_date",c.MAX_RENTAL_PRICE="max_rental_price",c.MIN_RENTAL_PRICE="min_rental_price"})(t.NFTSortBy||(t.NFTSortBy={})),function(c){c.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:s.WearableCategory.schema,description:{type:"string"},rarity:o.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:o.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:a.NFTCategory.schema,network:i.Network.schema,chainId:r.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},c.validate=(0,e.generateLazyValidator)(c.schema)}(t.NFT||(t.NFT={}))})(Pk);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Item=t.ItemSortBy=void 0;const e=Ct,r=as(),n=Zs,i=Pk,a=Lw;(function(o){o.NAME="name",o.NEWEST="newest",o.RECENTLY_REVIEWED="recently_reviewed",o.RECENTLY_SOLD="recently_sold",o.RECENTLY_LISTED="recently_listed",o.CHEAPEST="cheapest"})(t.ItemSortBy||(t.ItemSortBy={})),function(o){o.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:a.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:n.Network.schema,chainId:r.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},o.validate=(0,e.generateLazyValidator)(o.schema)}(t.Item||(t.Item={}))})(Hae);var Vae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MetaTransaction=void 0;const e=Ct;(function(r){r.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.MetaTransaction||(t.MetaTransaction={}))})(Vae);var zae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Mint=t.MintSortBy=void 0;const e=Ct,r=as(),n=Zs;(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(t.MintSortBy||(t.MintSortBy={})),function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,e.generateLazyValidator)(i.schema)}(t.Mint||(t.Mint={}))})(zae);var Gae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CatalogSortDirection=t.CatalogSortBy=void 0,function(e){e.NEWEST="newest",e.RECENTLY_SOLD="recently_sold",e.CHEAPEST="cheapest",e.MOST_EXPENSIVE="most_expensive",e.RECENTLY_LISTED="recently_listed"}(t.CatalogSortBy||(t.CatalogSortBy={})),function(e){e.ASC="asc",e.DESC="desc"}(t.CatalogSortDirection||(t.CatalogSortDirection={}))})(Gae);var Wae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Order=t.OrderSortBy=void 0;const e=Ct,r=as(),n=sI,i=Zs;(function(a){a.RECENTLY_LISTED="recently_listed",a.RECENTLY_UPDATED="recently_updated",a.CHEAPEST="cheapest",a.ISSUED_ID_ASC="issued_id_asc",a.ISSUED_ID_DESC="issued_id_desc",a.OLDEST="oldest"})(t.OrderSortBy||(t.OrderSortBy={})),function(a){a.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},a.validate=(0,e.generateLazyValidator)(a.schema)}(t.Order||(t.Order={}))})(Wae);var Tk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SaleType=void 0;const e=Ct;(function(r){r.ORDER="order",r.BID="bid",r.MINT="mint"})(t.SaleType||(t.SaleType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.SaleType||(t.SaleType={}))})(Tk);var Kae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Sale=t.SaleSortBy=void 0;const e=Ct,r=as(),n=Tk,i=Zs;(function(a){a.RECENTLY_SOLD="recently_sold",a.MOST_EXPENSIVE="most_expensive"})(t.SaleSortBy||(t.SaleSortBy={})),function(a){a.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:r.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},a.validate=(0,e.generateLazyValidator)(a.schema)}(t.Sale||(t.Sale={}))})(Kae);var Yae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RentalListingCreation=t.PeriodCreation=t.RentalsListingsSortBy=t.RentalsListingsFilterByCategory=t.RentalsListingSortDirection=t.RentalStatus=void 0;const e=Ct,r=as(),n=Zs;(function(a){a.OPEN="open",a.CANCELLED="cancelled",a.EXECUTED="executed",a.CLAIMED="claimed"})(t.RentalStatus||(t.RentalStatus={})),function(a){a.ASC="asc",a.DESC="desc"}(t.RentalsListingSortDirection||(t.RentalsListingSortDirection={})),function(a){a.PARCEL="parcel",a.ESTATE="estate"}(t.RentalsListingsFilterByCategory||(t.RentalsListingsFilterByCategory={})),function(a){a.LAND_CREATION_DATE="land_creation_date",a.RENTAL_LISTING_DATE="rental_listing_date",a.RENTAL_DATE="rented_date",a.NAME="name",a.MAX_RENTAL_PRICE="max_rental_price",a.MIN_RENTAL_PRICE="min_rental_price"}(t.RentalsListingsSortBy||(t.RentalsListingsSortBy={}));var i;(function(a){a.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},a.validate=(0,e.generateLazyValidator)(a.schema)})(i=t.PeriodCreation||(t.PeriodCreation={})),function(a){a.schema={type:"object",properties:{network:n.Network.schema,chainId:r.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},a.validate=(0,e.generateLazyValidator)(a.schema)}(t.RentalListingCreation||(t.RentalListingCreation={}))})(Yae);var Qae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsDayDataSortBy=void 0,function(e){e.DATE="date",e.MOST_SALES="most_sales"}(t.AnalyticsDayDataSortBy||(t.AnalyticsDayDataSortBy={}))})(Qae);var Jae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Store=void 0;const e=Ct;(function(r){r.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.Store||(t.Store={}))})(Jae);var Xae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.GenderFilterOption=t.WearableGender=void 0;const e=Ct;(function(r){r.MALE="male",r.FEMALE="female"})(t.WearableGender||(t.WearableGender={})),function(r){r.MALE="male",r.FEMALE="female",r.UNISEX="unisex"}(t.GenderFilterOption||(t.GenderFilterOption={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.WearableGender||(t.WearableGender={}))})(Xae);var Zae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.World=t.isInsideWorldLimits=t.getWorld=void 0;const e=Ct;function r(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}t.getWorld=r;function n(i,a){const o=r().validWorldRanges;for(const s of o)if(i>=s.xMin&&i<=s.xMax&&a>=s.yMin&&a<=s.yMax)return!0;return!1}t.isInsideWorldLimits=n,function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,e.generateLazyValidator)(i.schema)}(t.World||(t.World={}))})(Zae);var eoe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.LinkerAuthorization=void 0;const e=Ct;(function(r){r.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.LinkerAuthorization||(t.LinkerAuthorization={}))})(eoe);(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(F,U,K,ne){ne===void 0&&(ne=K);var j=Object.getOwnPropertyDescriptor(U,K);(!j||("get"in j?!U.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return U[K]}}),Object.defineProperty(F,ne,j)}:function(F,U,K,ne){ne===void 0&&(ne=K),F[ne]=U[K]}),r=Ne&&Ne.__setModuleDefault||(Object.create?function(F,U){Object.defineProperty(F,"default",{enumerable:!0,value:U})}:function(F,U){F.default=U}),n=Ne&&Ne.__importStar||function(F){if(F&&F.__esModule)return F;var U={};if(F!=null)for(var K in F)K!=="default"&&Object.prototype.hasOwnProperty.call(F,K)&&e(U,F,K);return r(U,F),U},i=Ne&&Ne.__exportStar||function(F,U){for(var K in F)K!=="default"&&!Object.prototype.hasOwnProperty.call(U,K)&&e(U,F,K)};Object.defineProperty(t,"__esModule",{value:!0}),t.sdk=t.isInsideWorldLimits=t.getWorld=t.World=t.GenderFilterOption=t.WearableGender=t.Store=t.AnalyticsDayDataSortBy=t.PeriodCreation=t.RentalListingCreation=t.RentalsListingsSortBy=t.RentalsListingsFilterByCategory=t.RentalsListingSortDirection=t.RentalStatus=t.SaleSortBy=t.Sale=t.SaleType=t.Rarity=t.ProviderType=t.OrderSortBy=t.Order=t.CatalogSortDirection=t.CatalogSortBy=t.NFTSortBy=t.NFT=t.NFTCategory=t.Network=t.MintSortBy=t.Mint=t.MetaTransaction=t.ListingStatus=t.ItemSortBy=t.Item=t.ContractSortBy=t.Contract=t.CollectionSortBy=t.Collection=t.getChainId=t.ChainName=t.getURNProtocol=t.getChainName=t.ChainId=t.AccountSortBy=t.Account=t.BidSortBy=t.Bid=void 0;const a=n(vae);t.sdk=a,i(Ct,t);var o=Bae;Object.defineProperty(t,"Bid",{enumerable:!0,get:function(){return o.Bid}}),Object.defineProperty(t,"BidSortBy",{enumerable:!0,get:function(){return o.BidSortBy}});var s=Fae;Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return s.Account}}),Object.defineProperty(t,"AccountSortBy",{enumerable:!0,get:function(){return s.AccountSortBy}});var c=as();Object.defineProperty(t,"ChainId",{enumerable:!0,get:function(){return c.ChainId}}),Object.defineProperty(t,"getChainName",{enumerable:!0,get:function(){return c.getChainName}}),Object.defineProperty(t,"getURNProtocol",{enumerable:!0,get:function(){return c.getURNProtocol}});var u=yae();Object.defineProperty(t,"ChainName",{enumerable:!0,get:function(){return u.ChainName}}),Object.defineProperty(t,"getChainId",{enumerable:!0,get:function(){return u.getChainId}});var f=jae;Object.defineProperty(t,"Collection",{enumerable:!0,get:function(){return f.Collection}}),Object.defineProperty(t,"CollectionSortBy",{enumerable:!0,get:function(){return f.CollectionSortBy}});var d=qae;Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return d.Contract}}),Object.defineProperty(t,"ContractSortBy",{enumerable:!0,get:function(){return d.ContractSortBy}});var g=Hae;Object.defineProperty(t,"Item",{enumerable:!0,get:function(){return g.Item}}),Object.defineProperty(t,"ItemSortBy",{enumerable:!0,get:function(){return g.ItemSortBy}});var m=sI;Object.defineProperty(t,"ListingStatus",{enumerable:!0,get:function(){return m.ListingStatus}});var w=Vae;Object.defineProperty(t,"MetaTransaction",{enumerable:!0,get:function(){return w.MetaTransaction}});var v=zae;Object.defineProperty(t,"Mint",{enumerable:!0,get:function(){return v.Mint}}),Object.defineProperty(t,"MintSortBy",{enumerable:!0,get:function(){return v.MintSortBy}});var y=Zs;Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return y.Network}});var _=Lw;Object.defineProperty(t,"NFTCategory",{enumerable:!0,get:function(){return _.NFTCategory}});var b=Pk;Object.defineProperty(t,"NFT",{enumerable:!0,get:function(){return b.NFT}}),Object.defineProperty(t,"NFTSortBy",{enumerable:!0,get:function(){return b.NFTSortBy}});var S=Gae;Object.defineProperty(t,"CatalogSortBy",{enumerable:!0,get:function(){return S.CatalogSortBy}}),Object.defineProperty(t,"CatalogSortDirection",{enumerable:!0,get:function(){return S.CatalogSortDirection}});var x=Wae;Object.defineProperty(t,"Order",{enumerable:!0,get:function(){return x.Order}}),Object.defineProperty(t,"OrderSortBy",{enumerable:!0,get:function(){return x.OrderSortBy}});var I=Ic;Object.defineProperty(t,"ProviderType",{enumerable:!0,get:function(){return I.ProviderType}});var E=kw;Object.defineProperty(t,"Rarity",{enumerable:!0,get:function(){return E.Rarity}});var p=Tk;Object.defineProperty(t,"SaleType",{enumerable:!0,get:function(){return p.SaleType}});var O=Kae;Object.defineProperty(t,"Sale",{enumerable:!0,get:function(){return O.Sale}}),Object.defineProperty(t,"SaleSortBy",{enumerable:!0,get:function(){return O.SaleSortBy}});var C=Yae;Object.defineProperty(t,"RentalStatus",{enumerable:!0,get:function(){return C.RentalStatus}}),Object.defineProperty(t,"RentalsListingSortDirection",{enumerable:!0,get:function(){return C.RentalsListingSortDirection}}),Object.defineProperty(t,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return C.RentalsListingsFilterByCategory}}),Object.defineProperty(t,"RentalsListingsSortBy",{enumerable:!0,get:function(){return C.RentalsListingsSortBy}}),Object.defineProperty(t,"RentalListingCreation",{enumerable:!0,get:function(){return C.RentalListingCreation}}),Object.defineProperty(t,"PeriodCreation",{enumerable:!0,get:function(){return C.PeriodCreation}});var M=Qae;Object.defineProperty(t,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return M.AnalyticsDayDataSortBy}});var B=Jae;Object.defineProperty(t,"Store",{enumerable:!0,get:function(){return B.Store}});var ce=Xae;Object.defineProperty(t,"WearableGender",{enumerable:!0,get:function(){return ce.WearableGender}}),Object.defineProperty(t,"GenderFilterOption",{enumerable:!0,get:function(){return ce.GenderFilterOption}});var he=Zae;Object.defineProperty(t,"World",{enumerable:!0,get:function(){return he.World}}),Object.defineProperty(t,"getWorld",{enumerable:!0,get:function(){return he.getWorld}}),Object.defineProperty(t,"isInsideWorldLimits",{enumerable:!0,get:function(){return he.isInsideWorldLimits}}),i(US,t),i(nI,t),i(Rp,t),i(eoe,t),i(oI,t),i(Ok,t)})(Ll);var Vs={};Object.defineProperty(Vs,"__esModule",{value:!0});Vs.getRpcUrls=Vs.getConfiguration=void 0;const Mn=as(),Xa=Ic,W5e=Object.freeze({storageKey:"decentraland-connect-storage-key",[Xa.ProviderType.INJECTED]:{},[Xa.ProviderType.FORTMATIC]:{apiKeys:{[Mn.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[Mn.ChainId.ETHEREUM_ROPSTEN]:"pk_test_5B728BEFE5C10911",[Mn.ChainId.ETHEREUM_RINKEBY]:"pk_test_5B728BEFE5C10911",[Mn.ChainId.ETHEREUM_KOVAN]:"pk_test_5B728BEFE5C10911",[Mn.ChainId.ETHEREUM_GOERLI]:"pk_test_5B728BEFE5C10911",[Mn.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:M0(Xa.ProviderType.FORTMATIC)},[Xa.ProviderType.NETWORK]:{urls:M0(Xa.ProviderType.NETWORK)},[Xa.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:M0(Xa.ProviderType.WALLET_LINK)},[Xa.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:M0(Xa.ProviderType.WALLET_CONNECT_V2),chains:{[Mn.ChainId.ETHEREUM_MAINNET]:{chains:[Mn.ChainId.ETHEREUM_MAINNET],optionalChains:[Mn.ChainId.MATIC_MAINNET]},[Mn.ChainId.ETHEREUM_GOERLI]:{chains:[Mn.ChainId.ETHEREUM_GOERLI],optionalChains:[Mn.ChainId.MATIC_MUMBAI]},[Mn.ChainId.ETHEREUM_SEPOLIA]:{chains:[Mn.ChainId.ETHEREUM_SEPOLIA],optionalChains:[Mn.ChainId.MATIC_MUMBAI]}}},[Xa.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:M0(Xa.ProviderType.MAGIC),chains:[Mn.ChainId.ETHEREUM_MAINNET,Mn.ChainId.ETHEREUM_GOERLI,Mn.ChainId.ETHEREUM_SEPOLIA,Mn.ChainId.MATIC_MAINNET,Mn.ChainId.MATIC_MUMBAI]}});function K5e(){return W5e}Vs.getConfiguration=K5e;function M0(t){const e={[Mn.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[Mn.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[Mn.ChainId.ETHEREUM_ROPSTEN]:"https://rpc.decentraland.org/ropsten",[Mn.ChainId.ETHEREUM_RINKEBY]:"https://rpc.decentraland.org/rinkeby",[Mn.ChainId.ETHEREUM_GOERLI]:"https://rpc.decentraland.org/goerli",[Mn.ChainId.ETHEREUM_KOVAN]:"https://rpc.decentraland.org/kovan",[Mn.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[Mn.ChainId.MATIC_MUMBAI]:"https://rpc.decentraland.org/mumbai"};let r="";switch(t){case Xa.ProviderType.WALLET_LINK:r="walletlink";break;case Xa.ProviderType.FORTMATIC:r="fortmatic";break;case Xa.ProviderType.MAGIC:r="magic";break;case Xa.ProviderType.WALLET_CONNECT_V2:r="walletconnect-v2";break}if(r)for(const n in e)e[n]+=`?project=${r}`;return e}Vs.getRpcUrls=M0;var EN,BW;function Y5e(){return BW||(BW=1,EN=function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:a})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,i){if(1&i&&(n=r(n)),8&i||4&i&&typeof n=="object"&&n&&n.__esModule)return n;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:n}),2&i&&typeof n!="string")for(var o in n)r.d(a,o,(function(s){return n[s]}).bind(null,o));return a},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=3)}([function(t,e){t.exports=function(r){return r&&r.__esModule?r:{default:r}}},function(t,e){t.exports=function(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){function n(){return Math.floor(9e4*Math.random())+1e4}Object.defineProperty(e,"__esModule",{value:!0}),e.sendAsyncWrapper=function(i,a){var o=this;return new Promise(function(s,c){o.sendAsync({jsonrpc:"2.0",id:n(),method:i,params:a||[]},function(u,f){u?c(u):s(f.result)})})},e.sendFortmaticAsyncWrapper=function(i){var a=this;return new Promise(function(o,s){a.getProvider().sendFortmaticAsync(i,function(c,u){c?s(c):o(u?u.result:{})})})},e.randomId=n,e.findExistingResponse=function(i,a){for(var o=0;o<i.length;o++)if(i[o].id===a)return i[o];return null}},function(t,e,r){t.exports=r(4)},function(t,e,r){var n=r(0),i=n(r(1)),a=n(r(5)),o=r(2),s="fm_composeSend",c="fm_logout",u="fm_get_balances",f="fm_get_transactions",d="fm_is_logged_in",g="fm_accountSettings",m="fm_deposit",w="fm_get_user",v="fm_configure",y={};t.exports=function b(S,x,I){var E=this;if((0,i.default)(this,b),this.fortmaticClient="https://x2.fortmatic.com",!S)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.apiKey=S,this.options=I,this.ethNetwork=x,this.queryParams=btoa(JSON.stringify({API_KEY:S,ETH_NETWORK:x})),this.transactions={send:function(p,O){var C=new _(s,{to:p.to,value:p.amount});E.getProvider().sendFortmaticAsync(C,O)}},this.getProvider=function(){return y["fortmatic-".concat(E.queryParams)]||(y["fortmatic-".concat(E.queryParams)]=new a.default(E.fortmaticClient,{API_KEY:S,ETH_NETWORK:x})),y["fortmatic-".concat(E.queryParams)]},this.user={login:function(){return E.getProvider().enable()},logout:function(){E.getProvider().account=null,E.getProvider().network=null;var p=new _(c);return o.sendFortmaticAsyncWrapper.call(E,p)},getUser:function(){var p=new _(w);return o.sendFortmaticAsyncWrapper.call(E,p)},getBalances:function(){var p=new _(u);return o.sendFortmaticAsyncWrapper.call(E,p)},getTransactions:function(){var p=new _(f);return o.sendFortmaticAsyncWrapper.call(E,p)},isLoggedIn:function(){var p=new _(d);return o.sendFortmaticAsyncWrapper.call(E,p)},settings:function(){var p=new _(g);return o.sendFortmaticAsyncWrapper.call(E,p)},deposit:function(p){var O=new _(m,p);return o.sendFortmaticAsyncWrapper.call(E,O)}},this.configure=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=new _(v);return O.params=[p],o.sendFortmaticAsyncWrapper.call(E,O)}};var _=function b(S,x){(0,i.default)(this,b),this.id=(0,o.randomId)(),this.method=S,this.params=x?[x]:[{}]}},function(t,e,r){var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(6)),a=n(r(9)),o=n(r(1)),s=n(r(10)),c=r(11),u=n(r(12)),f=r(2),d=function(){function g(m,w){if((0,o.default)(this,g),this.fortmaticClient=m,this.requests={},this.queue=[],this.account=null,this.network=null,this.isFortmatic=!0,this.overlayReady=!1,this.isLoggedIn=!1,this.postMessages={FORTMATIC_HANDLE_BATCH_REQUEST:"FORTMATIC_HANDLE_BATCH_REQUEST",FORTMATIC_HANDLE_REQUEST:"FORTMATIC_HANDLE_REQUEST",FORTMATIC_HANDLE_FORTMATIC_REQUEST:"FORTMATIC_HANDLE_FORTMATIC_REQUEST",FORTMATIC_HANDLE_RESPONSE:"FORTMATIC_HANDLE_RESPONSE",FORTMATIC_OVERLAY_READY:"FORTMATIC_OVERLAY_READY",FORTMATIC_SHOW_OVERLAY:"FORTMATIC_SHOW_OVERLAY",FORTMATIC_HIDE_OVERLAY:"FORTMATIC_HIDE_OVERLAY",FORTMATIC_USER_DENIED:"FORTMATIC_USER_DENIED",FORTMATIC_USER_LOGOUT:"FORTMATIC_USER_LOGOUT",FORTMATIC_UNAUTHORIZED_API_KEY:"FORTMATIC_UNAUTHORIZED_API_KEY"},!w.API_KEY)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.options={API_KEY:w.API_KEY,ETH_NETWORK:w.ETH_NETWORK,DOMAIN_ORIGIN:window.location?window.location.origin:"",version:c.version},this.queryParams=btoa(JSON.stringify(this.options)),this.constructPostMessage(),this.overlay=this.createOverlay(),this.listenMessage()}return(0,s.default)(g,[{key:"constructPostMessage",value:function(){var m=this;Object.keys(this.postMessages).map(function(w){m.postMessages[w]+="-".concat(m.queryParams)})}},{key:"createOverlay",value:function(){var m=this;return new Promise(function(w,v){var y=function(){if(function(){var x=!0,I=!1,E=void 0;try{for(var p,O=document.getElementsByClassName("fortmatic-iframe")[Symbol.iterator]();!(x=(p=O.next()).done);x=!0)if(p.value.src.includes(m.queryParams))return!1}catch(C){I=!0,E=C}finally{try{x||O.return==null||O.return()}finally{if(I)throw E}}return!0}()){var _=document.createElement("style");_.innerHTML=u.default.css,_.type="text/css",document.head.appendChild(_);var b=document.createElement("iframe");b.className="fortmatic-iframe",b.src="".concat(m.fortmaticClient,"/send?params=").concat(m.queryParams),document.body.appendChild(b);var S=document.createElement("img");S.src="https://static.fortmatic.com/assets/trans.gif",document.body.appendChild(S),w({iframe:b})}else console.error("Fortmatic: Duplicate instances found.")};["loaded","interactive","complete"].indexOf(document.readyState)>-1?y():window.addEventListener("load",y.bind(m),!1)})}},{key:"showOverlay",value:function(){var m=(0,a.default)(i.default.mark(function w(){return i.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,this.overlay;case 2:v.sent.iframe.style.display="block";case 4:case"end":return v.stop()}},w,this)}));return function(){return m.apply(this,arguments)}}()},{key:"hideOverlay",value:function(){var m=(0,a.default)(i.default.mark(function w(){return i.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,this.overlay;case 2:v.sent.iframe.style.display="none";case 4:case"end":return v.stop()}},w,this)}));return function(){return m.apply(this,arguments)}}()},{key:"sendAsync",value:function(m,w){m.length>0?this.enqueue({payload:{id:(0,f.randomId)(),batch:m.map(function(v){return v.id=(0,f.randomId)(),v}),method:"eth_batchRequest"},cb:w}):this.enqueue({payload:m,cb:w})}},{key:"sendFortmaticAsync",value:function(m,w){this.enqueue({payload:m,cb:w,isNative:!0})}},{key:"send",value:function(m,w){if(typeof m=="string")return f.sendAsyncWrapper.call(this,m,w);if(!w){console.warn("Non-async web3 methods will be deprecated in web3 > 1.0, and are not supported by the Fortmatic provider. An async method to be used instead."),this.sendAsync(m,function(){});var v={};switch(m.method){case"eth_accounts":v=this.account?[this.account]:[];break;case"eth_coinbase":v=this.account;break;case"net_version":v=this.network||(this.options.API_KEY.startsWith("pk_live")?1:4);break;case"eth_uninstallFilter":v=!0;break;default:v={}}return{id:m.id,jsonrpc:m.jsonrpc,result:v}}this.sendAsync(m,w)}},{key:"enqueue",value:function(m){this.queue.push(m),this.overlayReady&&this.dequeue()}},{key:"dequeue",value:function(){var m=(0,a.default)(i.default.mark(function w(){var v,y,_,b=this;return i.default.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(this.queue.length!==0){S.next=2;break}return S.abrupt("return");case 2:if(!(v=this.queue.shift())){S.next=11;break}return y=v.payload,_=v.cb,y.id=(0,f.randomId)(),S.next=9,this.postMessage(v.isNative?this.postMessages.FORTMATIC_HANDLE_FORTMATIC_REQUEST:this.postMessages.FORTMATIC_HANDLE_REQUEST,v.payload);case 9:y.batch&&y.batch.length>0?(y.batch.forEach(function(x){b.requests[x.id]={parentId:y.id,payload:x,cb:function(I,E){var p=b.requests[y.id].batchResponse;if(I&&I.response&&!(0,f.findExistingResponse)(p,I.response.id))throw p.push({jsonrpc:"2.0",id:I.response.id,error:{code:I.response.code,message:I.response.message}}),b.requests[y.id].cb(null,p),I.response;if(E&&E.result&&!(0,f.findExistingResponse)(p,E.id))return p.push(E);throw new Error("Fortmatic: unexpected callback behavior")}}}),this.requests[y.id]={payload:y,cb:_,batchResponse:[]}):this.requests[y.id]={payload:y,cb:_},this.dequeue();case 11:case"end":return S.stop()}},w,this)}));return function(){return m.apply(this,arguments)}}()},{key:"postMessage",value:function(){var m=(0,a.default)(i.default.mark(function w(v,y){var _;return i.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,this.overlay;case 2:if(!(_=b.sent).iframe.contentWindow){b.next=7;break}_.iframe.contentWindow.postMessage({msgType:v,payload:y},"*"),b.next=8;break;case 7:throw new Error("Fortmatic: Modal is not ready.");case 8:case"end":return b.stop()}},w,this)}));return function(w,v){return m.apply(this,arguments)}}()},{key:"enable",value:function(){return f.sendAsyncWrapper.call(this,"eth_accounts")}},{key:"listenMessage",value:function(){var m=this;window.addEventListener("message",function(w){if(w.origin===m.fortmaticClient){var v=w.data.response?w.data.response.id:null;switch(w.data.msgType){case m.postMessages.FORTMATIC_OVERLAY_READY:m.overlayReady=!0,m.dequeue();break;case m.postMessages.FORTMATIC_HANDLE_RESPONSE:try{m.requests[v].cb(null,w.data.response);var y=m.requests[v].parentId;y&&m.requests[y].payload.batch.length===m.requests[y].batchResponse.length&&m.requests[y].cb(null,m.requests[y].batchResponse),m.requests[v].payload.method==="eth_accounts"?m.account=w.data.response.result[0]:m.requests[v].payload.method==="eth_coinbase"?m.account=w.data.response.result:m.requests[v].payload.method==="net_version"&&(m.network=w.data.response.result)}catch{}m.isLoggedIn=!0,m.dequeue();break;case m.postMessages.FORTMATIC_HIDE_OVERLAY:m.hideOverlay();break;case m.postMessages.FORTMATIC_SHOW_OVERLAY:m.showOverlay();break;case m.postMessages.FORTMATIC_USER_LOGOUT:m.account=null,m.network=null,m.isLoggedIn=!1;break;case m.postMessages.FORTMATIC_UNAUTHORIZED_API_KEY:throw m.overlayReady=!1,new Error("Given API key is not authorized to access the resource.");case m.postMessages.FORTMATIC_USER_DENIED:if(v){var _=w.data.response&&w.data.response.message?w.data.response.message:"Fortmatic: Modal was closed without executing action!",b=w.data.response&&w.data.response.code?w.data.response.code:1;m.requests[v].cb({message:_,code:b,response:w.data.response})}else m.queue.forEach(function(S){return S.cb({message:"Fortmatic: Modal was closed without executing action!",code:1})});m.dequeue()}}})}}]),g}();e.default=d},function(t,e,r){t.exports=r(7)},function(t,e,r){var n=function(){return this||typeof self=="object"&&self}()||Function("return this")(),i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,a=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r(8),i)n.regeneratorRuntime=a;else try{delete n.regeneratorRuntime}catch{n.regeneratorRuntime=void 0}},function(t,e){(function(r){var n,i=Object.prototype,a=i.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",f=typeof t=="object",d=r.regeneratorRuntime;if(d)f&&(t.exports=d);else{(d=r.regeneratorRuntime=f?t.exports:{}).wrap=I;var g="suspendedStart",m="suspendedYield",w="executing",v="completed",y={},_={};_[s]=function(){return this};var b=Object.getPrototypeOf,S=b&&b(b(K([])));S&&S!==i&&a.call(S,s)&&(_=S);var x=C.prototype=p.prototype=Object.create(_);O.prototype=x.constructor=C,C.constructor=O,C[u]=O.displayName="GeneratorFunction",d.isGeneratorFunction=function(j){var q=typeof j=="function"&&j.constructor;return!!q&&(q===O||(q.displayName||q.name)==="GeneratorFunction")},d.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,C):(j.__proto__=C,u in j||(j[u]="GeneratorFunction")),j.prototype=Object.create(x),j},d.awrap=function(j){return{__await:j}},M(B.prototype),B.prototype[c]=function(){return this},d.AsyncIterator=B,d.async=function(j,q,V,$){var H=new B(I(j,q,V,$));return d.isGeneratorFunction(q)?H:H.next().then(function(L){return L.done?L.value:H.next()})},M(x),x[u]="Generator",x[s]=function(){return this},x.toString=function(){return"[object Generator]"},d.keys=function(j){var q=[];for(var V in j)q.push(V);return q.reverse(),function $(){for(;q.length;){var H=q.pop();if(H in j)return $.value=H,$.done=!1,$}return $.done=!0,$}},d.values=K,U.prototype={constructor:U,reset:function(j){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(F),!j)for(var q in this)q.charAt(0)==="t"&&a.call(this,q)&&!isNaN(+q.slice(1))&&(this[q]=n)},stop:function(){this.done=!0;var j=this.tryEntries[0].completion;if(j.type==="throw")throw j.arg;return this.rval},dispatchException:function(j){if(this.done)throw j;var q=this;function V(ge,Q){return L.type="throw",L.arg=j,q.next=ge,Q&&(q.method="next",q.arg=n),!!Q}for(var $=this.tryEntries.length-1;$>=0;--$){var H=this.tryEntries[$],L=H.completion;if(H.tryLoc==="root")return V("end");if(H.tryLoc<=this.prev){var k=a.call(H,"catchLoc"),G=a.call(H,"finallyLoc");if(k&&G){if(this.prev<H.catchLoc)return V(H.catchLoc,!0);if(this.prev<H.finallyLoc)return V(H.finallyLoc)}else if(k){if(this.prev<H.catchLoc)return V(H.catchLoc,!0)}else{if(!G)throw new Error("try statement without catch or finally");if(this.prev<H.finallyLoc)return V(H.finallyLoc)}}}},abrupt:function(j,q){for(var V=this.tryEntries.length-1;V>=0;--V){var $=this.tryEntries[V];if($.tryLoc<=this.prev&&a.call($,"finallyLoc")&&this.prev<$.finallyLoc){var H=$;break}}H&&(j==="break"||j==="continue")&&H.tryLoc<=q&&q<=H.finallyLoc&&(H=null);var L=H?H.completion:{};return L.type=j,L.arg=q,H?(this.method="next",this.next=H.finallyLoc,y):this.complete(L)},complete:function(j,q){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&q&&(this.next=q),y},finish:function(j){for(var q=this.tryEntries.length-1;q>=0;--q){var V=this.tryEntries[q];if(V.finallyLoc===j)return this.complete(V.completion,V.afterLoc),F(V),y}},catch:function(j){for(var q=this.tryEntries.length-1;q>=0;--q){var V=this.tryEntries[q];if(V.tryLoc===j){var $=V.completion;if($.type==="throw"){var H=$.arg;F(V)}return H}}throw new Error("illegal catch attempt")},delegateYield:function(j,q,V){return this.delegate={iterator:K(j),resultName:q,nextLoc:V},this.method==="next"&&(this.arg=n),y}}}function I(j,q,V,$){var H=q&&q.prototype instanceof p?q:p,L=Object.create(H.prototype),k=new U($||[]);return L._invoke=function(G,ge,Q){var te=g;return function(ue,T){if(te===w)throw new Error("Generator is already running");if(te===v){if(ue==="throw")throw T;return ne()}for(Q.method=ue,Q.arg=T;;){var fe=Q.delegate;if(fe){var Ge=ce(fe,Q);if(Ge){if(Ge===y)continue;return Ge}}if(Q.method==="next")Q.sent=Q._sent=Q.arg;else if(Q.method==="throw"){if(te===g)throw te=v,Q.arg;Q.dispatchException(Q.arg)}else Q.method==="return"&&Q.abrupt("return",Q.arg);te=w;var tt=E(G,ge,Q);if(tt.type==="normal"){if(te=Q.done?v:m,tt.arg===y)continue;return{value:tt.arg,done:Q.done}}tt.type==="throw"&&(te=v,Q.method="throw",Q.arg=tt.arg)}}}(j,V,k),L}function E(j,q,V){try{return{type:"normal",arg:j.call(q,V)}}catch($){return{type:"throw",arg:$}}}function p(){}function O(){}function C(){}function M(j){["next","throw","return"].forEach(function(q){j[q]=function(V){return this._invoke(q,V)}})}function B(j){var q;this._invoke=function(V,$){function H(){return new Promise(function(L,k){(function G(ge,Q,te,ue){var T=E(j[ge],j,Q);if(T.type!=="throw"){var fe=T.arg,Ge=fe.value;return Ge&&typeof Ge=="object"&&a.call(Ge,"__await")?Promise.resolve(Ge.__await).then(function(tt){G("next",tt,te,ue)},function(tt){G("throw",tt,te,ue)}):Promise.resolve(Ge).then(function(tt){fe.value=tt,te(fe)},function(tt){return G("throw",tt,te,ue)})}ue(T.arg)})(V,$,L,k)})}return q=q?q.then(H,H):H()}}function ce(j,q){var V=j.iterator[q.method];if(V===n){if(q.delegate=null,q.method==="throw"){if(j.iterator.return&&(q.method="return",q.arg=n,ce(j,q),q.method==="throw"))return y;q.method="throw",q.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var $=E(V,j.iterator,q.arg);if($.type==="throw")return q.method="throw",q.arg=$.arg,q.delegate=null,y;var H=$.arg;return H?H.done?(q[j.resultName]=H.value,q.next=j.nextLoc,q.method!=="return"&&(q.method="next",q.arg=n),q.delegate=null,y):H:(q.method="throw",q.arg=new TypeError("iterator result is not an object"),q.delegate=null,y)}function he(j){var q={tryLoc:j[0]};1 in j&&(q.catchLoc=j[1]),2 in j&&(q.finallyLoc=j[2],q.afterLoc=j[3]),this.tryEntries.push(q)}function F(j){var q=j.completion||{};q.type="normal",delete q.arg,j.completion=q}function U(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(he,this),this.reset(!0)}function K(j){if(j){var q=j[s];if(q)return q.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length)){var V=-1,$=function H(){for(;++V<j.length;)if(a.call(j,V))return H.value=j[V],H.done=!1,H;return H.value=n,H.done=!0,H};return $.next=$}}return{next:ne}}function ne(){return{value:n,done:!0}}})(function(){return this||typeof self=="object"&&self}()||Function("return this")())},function(t,e){function r(n,i,a,o,s,c,u){try{var f=n[c](u),d=f.value}catch(g){return void a(g)}f.done?i(d):Promise.resolve(d).then(o,s)}t.exports=function(n){return function(){var i=this,a=arguments;return new Promise(function(o,s){var c=n.apply(i,a);function u(d){r(c,o,s,u,f,"next",d)}function f(d){r(c,o,s,u,f,"throw",d)}u(void 0)})}}},function(t,e){function r(n,i){for(var a=0;a<i.length;a++){var o=i[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}t.exports=function(n,i,a){return i&&r(n.prototype,i),a&&r(n,a),n}},function(t){t.exports={name:"fortmatic",version:"1.1.3",description:"Fortmatic Javascript SDK",main:"lib/fortmatic.js",scripts:{build:"WEBPACK_ENV=production webpack","build:dev":"WEBPACK_ENV=development BABEL_ENV=development webpack --progress --colors --watch",test:"nyc --reporter=lcov --reporter=text-summary ava"},author:"Fortmatic <team@fortmatic.com> (https://fortmatic.com/)",license:"MIT",repository:{type:"git",url:"https://github.com/fortmatic/fortmatic-js"},keywords:["Auth","Login","Web3","Crypto","Ethereum","MetaMask","Wallet","Blockchain","Dapp"],homepage:"https://www.fortmatic.com",ava:{require:["@babel/register"],files:["test/**/*.spec.js"],babel:{testOptions:{presets:["@babel/env"],plugins:["@babel/plugin-proposal-function-bind","@babel/plugin-transform-runtime"]}},verbose:!0},nyc:{all:!1,"check-coverage":!0,"per-file":!0,lines:80,statements:80,functions:80,branches:80,include:["src/**/*.js"],exclude:["*/style.js"],require:[],reporter:["html","lcov"]},dependencies:{"@babel/runtime":"7.3.4"},devDependencies:{"@babel/core":"7.3.4","@babel/plugin-proposal-function-bind":"7.2.0","@babel/plugin-transform-modules-commonjs":"7.2.0","@babel/plugin-transform-runtime":"7.3.4","@babel/preset-env":"7.3.4","@babel/register":"7.0.0",ava:"2.2.0","babel-eslint":"10.0.1","babel-loader":"8.0.5",eslint:"5.9.0",lodash:"4.17.11",nyc:"13.1.0",sinon:"7.1.1",webpack:"4.26.1","webpack-cli":"3.1.2"}}},function(t,e,r){e.css=`
|
|
110
|
-
.fortmatic-iframe {
|
|
111
|
-
display: none;
|
|
112
|
-
position: fixed;
|
|
113
|
-
top: 0;
|
|
114
|
-
right: 0;
|
|
115
|
-
width: 100%;
|
|
116
|
-
height: 100%;
|
|
117
|
-
border: none;
|
|
118
|
-
border-radius: 0;
|
|
119
|
-
z-index: 2147483647;
|
|
120
|
-
}
|
|
121
|
-
`}])),EN}var Q5e=Ne&&Ne.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),J5e=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),X5e=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Q5e(e,t,r);return J5e(e,t),e};Object.defineProperty(ZS,"__esModule",{value:!0});ZS.FortmaticConnector=void 0;const Z5e=mae,e4e=Ll,t4e=Vs;class r4e extends Z5e.AbstractConnector{constructor(e){const r=t4e.getConfiguration()[e4e.ProviderType.FORTMATIC],n=Object.keys(r.apiKeys).map(i=>Number(i));if(!n.includes(e))throw new Error(`Invariant error: Unsupported chainId ${e}`);super({supportedChainIds:n}),this.apiKey=r.apiKeys[e],this.chainId=e,this.rpcUrl=r.urls[e]}async activate(){if(!this.fortmatic){const{default:r}=await Promise.resolve().then(()=>X5e(Y5e()));this.fortmatic=new r(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const e=await this.fortmatic.getProvider().enable().then(r=>r[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:e}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(e=>e[0])}deactivate(){}async close(){await this.fortmatic.user.logout(),this.emitDeactivate()}}ZS.FortmaticConnector=r4e;var cI={};function n4(){return n4=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n4.apply(this,arguments)}function Rk(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function i4(t){return i4=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},i4(t)}function KA(t,e){return KA=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},KA(t,e)}function n4e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Nx(t,e,r){return n4e()?Nx=Reflect.construct:Nx=function(i,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(i,s),u=new c;return o&&KA(u,o.prototype),u},Nx.apply(null,arguments)}function i4e(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function YA(t){var e=typeof Map=="function"?new Map:void 0;return YA=function(n){if(n===null||!i4e(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return Nx(n,arguments,i4(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),KA(i,n)},YA(t)}function AE(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function v0(t,e){try{var r=t()}catch(n){return e(n)}return r&&r.then?r.then(void 0,e):r}function Kc(t){return t.hasOwnProperty("result")?t.result:t}var Dx=function(t){Rk(e,t);function e(){var r;return r=t.call(this)||this,r.name=r.constructor.name,r.message="No Ethereum provider was found on window.ethereum.",r}return e}(YA(Error)),toe=function(t){Rk(e,t);function e(){var r;return r=t.call(this)||this,r.name=r.constructor.name,r.message="The user rejected the request.",r}return e}(YA(Error)),a4e=function(t){Rk(e,t);function e(n){var i;return i=t.call(this,n)||this,i.handleNetworkChanged=i.handleNetworkChanged.bind(AE(i)),i.handleChainChanged=i.handleChainChanged.bind(AE(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(AE(i)),i.handleClose=i.handleClose.bind(AE(i)),i}var r=e.prototype;return r.handleChainChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},r.handleAccountsChanged=function(i){i.length===0?this.emitDeactivate():this.emitUpdate({account:i[0]})},r.handleClose=function(i,a){this.emitDeactivate()},r.handleNetworkChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},r.activate=function(){try{var i=function(f){if(a)return f;function d(){return n4({provider:window.ethereum},s?{account:s}:{})}var g=function(){if(!s)return Promise.resolve(window.ethereum.enable().then(function(m){return m&&Kc(m)[0]})).then(function(m){s=m})}();return g&&g.then?g.then(d):d(g)},a=!1,o=this;if(!window.ethereum)throw new Dx;window.ethereum.on&&(window.ethereum.on("chainChanged",o.handleChainChanged),window.ethereum.on("accountsChanged",o.handleAccountsChanged),window.ethereum.on("close",o.handleClose),window.ethereum.on("networkChanged",o.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var s,c=v0(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(u){return Kc(u)[0]})).then(function(u){s=u})},function(u){if(u.code===4001)throw new toe});return Promise.resolve(c&&c.then?c.then(i):i(c))}catch(u){return Promise.reject(u)}},r.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(i){return Promise.reject(i)}},r.getChainId=function(){try{var i=function(){function c(){if(!a)try{a=Kc(window.ethereum.send({method:"net_version"}))}catch{}return a||(window.ethereum.isDapper?a=Kc(window.ethereum.cachedResults.net_version):a=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),a}var u=function(){if(!a){var f=v0(function(){return Promise.resolve(window.ethereum.send("net_version").then(Kc)).then(function(d){a=d})},function(){});if(f&&f.then)return f.then(function(){})}}();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new Dx;var a,o=v0(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(Kc)).then(function(s){a=s})},function(){});return Promise.resolve(o&&o.then?o.then(i):i(o))}catch(s){return Promise.reject(s)}},r.getAccount=function(){try{var i=function(){function c(){return a||(a=Kc(window.ethereum.send({method:"eth_accounts"}))[0]),a}var u=function(){if(!a){var f=v0(function(){return Promise.resolve(window.ethereum.enable().then(function(d){return Kc(d)[0]})).then(function(d){a=d})},function(){});if(f&&f.then)return f.then(function(){})}}();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new Dx;var a,o=v0(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(s){return Kc(s)[0]})).then(function(s){a=s})},function(){});return Promise.resolve(o&&o.then?o.then(i):i(o))}catch(s){return Promise.reject(s)}},r.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},r.isAuthorized=function(){try{return window.ethereum?Promise.resolve(v0(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(i){return Kc(i).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(i){return Promise.reject(i)}},e}(XS);const o4e=Object.freeze(Object.defineProperty({__proto__:null,InjectedConnector:a4e,NoEthereumProviderError:Dx,UserRejectedRequestError:toe},Symbol.toStringTag,{value:"Module"})),s4e=lo(o4e);Object.defineProperty(cI,"__esModule",{value:!0});cI.InjectedConnector=void 0;const c4e=s4e;class u4e extends c4e.InjectedConnector{constructor(e){super({supportedChainIds:[e]})}}cI.InjectedConnector=u4e;var uI={},l4e="Invariant failed";function FW(t,e){if(!t)throw new Error(l4e)}function roe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,D1(t,e)}function a4(t){return a4=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},a4(t)}function D1(t,e){return D1=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},D1(t,e)}function f4e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function $x(t,e,r){return f4e()?$x=Reflect.construct:$x=function(i,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(i,s),u=new c;return o&&D1(u,o.prototype),u},$x.apply(null,arguments)}function d4e(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function o4(t){var e=typeof Map=="function"?new Map:void 0;return o4=function(n){if(n===null||!d4e(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return $x(n,arguments,a4(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),D1(i,n)},o4(t)}var Mx=function(t){roe(e,t);function e(r,n,i){var a;return a=t.call(this)||this,a.code=n,a.data=i,a.name=a.constructor.name,a.message=r,a}return e}(o4(Error)),h4e=function(e,r){var n=this,i=this;this.isMetaMask=!1,this.sendAsync=function(o,s){console.log("sendAsync",o.method,o.params),i.request(o.method,o.params).then(function(c){return s(null,{jsonrpc:"2.0",id:o.id,result:c})}).catch(function(c){return s(c,null)})},this.request=function(o,s){try{return typeof o!="string"&&(s=o.params,o=o.method),Promise.resolve(fetch(n.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:o,params:s}),headers:{"Content-Type":"application/json"}})).then(function(c){if(!c.ok)throw new Mx(c.status+": "+c.statusText,-32e3);return Promise.resolve(c.json()).then(function(u){if("error"in u){var f,d,g;throw new Mx(u==null||(f=u.error)==null?void 0:f.message,u==null||(d=u.error)==null?void 0:d.code,u==null||(g=u.error)==null?void 0:g.data)}else{if("result"in u)return u.result;throw new Mx("Received unexpected JSON-RPC response to "+o+" request.",-32e3,u)}})})}catch(c){return Promise.reject(c)}},this.chainId=e,this.url=r;var a=new URL(r);this.host=a.host,this.path=a.pathname},p4e=function(t){roe(e,t);function e(n){var i,a=n.urls,o=n.defaultChainId;return o||Object.keys(a).length===1||FW(!1),i=t.call(this,{supportedChainIds:Object.keys(a).map(function(s){return Number(s)})})||this,i.currentChainId=o||Number(Object.keys(a)[0]),i.providers=Object.keys(a).reduce(function(s,c){return s[Number(c)]=new h4e(Number(c),a[Number(c)]),s},{}),i}var r=e.prototype;return r.activate=function(){try{var i=this;return Promise.resolve({provider:i.providers[i.currentChainId],chainId:i.currentChainId,account:null})}catch(a){return Promise.reject(a)}},r.getProvider=function(){try{var i=this;return Promise.resolve(i.providers[i.currentChainId])}catch(a){return Promise.reject(a)}},r.getChainId=function(){try{var i=this;return Promise.resolve(i.currentChainId)}catch(a){return Promise.reject(a)}},r.getAccount=function(){return Promise.resolve(null)},r.deactivate=function(){},r.changeChainId=function(i){Object.keys(this.providers).includes(i.toString())||FW(!1),this.currentChainId=i,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:i})},e}(XS);const g4e=Object.freeze(Object.defineProperty({__proto__:null,NetworkConnector:p4e,RequestError:Mx},Symbol.toStringTag,{value:"Module"})),y4e=lo(g4e);Object.defineProperty(uI,"__esModule",{value:!0});uI.NetworkConnector=void 0;const m4e=Ic,v4e=y4e,b4e=Vs;class w4e extends v4e.NetworkConnector{constructor(e){super({urls:b4e.getConfiguration()[m4e.ProviderType.NETWORK].urls,defaultChainId:e})}}uI.NetworkConnector=w4e;var lI={};const _4e="modulepreload",E4e=function(t){return"https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/"+t},jW={},ky=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=E4e(a),a in jW)return;jW[a]=!0;const o=a.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(!!n)for(let f=i.length-1;f>=0;f--){const d=i[f];if(d.href===a&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":_4e,o||(u.as="script",u.crossOrigin=""),u.href=a,document.head.appendChild(u),o)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})};function s4(){return s4=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s4.apply(this,arguments)}function x4e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,c4(t,e)}function c4(t,e){return c4=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},c4(t,e)}function qW(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var A4e=1,S4e=function(t){x4e(e,t);function e(n){var i,a=n.url,o=n.appName,s=n.appLogoUrl,c=n.darkMode,u=n.supportedChainIds;return i=t.call(this,{supportedChainIds:u})||this,i.url=a,i.appName=o,i.appLogoUrl=s,i.darkMode=c||!1,i.handleChainChanged=i.handleChainChanged.bind(qW(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(qW(i)),i}var r=e.prototype;return r.activate=function(){try{var i=this,a=function(){return Promise.resolve(i.provider.request({method:"eth_requestAccounts"})).then(function(c){var u=c[0];return i.provider.on("chainChanged",i.handleChainChanged),i.provider.on("accountsChanged",i.handleAccountsChanged),{provider:i.provider,account:u}})},o=function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)i.provider=window.ethereum;else{var s=function(){if(!i.walletLink)return Promise.resolve(ky(()=>import("./index-571a2353.js").then(c=>c.i),[]).then(function(c){var u;return(u=c==null?void 0:c.default)!=null?u:c})).then(function(c){i.walletLink=new c(s4({appName:i.appName,darkMode:i.darkMode},i.appLogoUrl?{appLogoUrl:i.appLogoUrl}:{})),i.provider=i.walletLink.makeWeb3Provider(i.url,A4e)})}();if(s&&s.then)return s.then(function(){})}}();return Promise.resolve(o&&o.then?o.then(a):a(o))}catch(s){return Promise.reject(s)}},r.getProvider=function(){try{var i=this;return Promise.resolve(i.provider)}catch(a){return Promise.reject(a)}},r.getChainId=function(){try{var i=this;return Promise.resolve(i.provider.chainId)}catch(a){return Promise.reject(a)}},r.getAccount=function(){try{var i=this;return Promise.resolve(i.provider.request({method:"eth_requestAccounts"})).then(function(a){return a[0]})}catch(a){return Promise.reject(a)}},r.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},r.close=function(){try{var i=this;return i.provider.close(),i.emitDeactivate(),Promise.resolve()}catch(a){return Promise.reject(a)}},r.handleChainChanged=function(i){this.emitUpdate({chainId:i})},r.handleAccountsChanged=function(i){this.emitUpdate({account:i[0]})},e}(XS);const I4e=Object.freeze(Object.defineProperty({__proto__:null,WalletLinkConnector:S4e},Symbol.toStringTag,{value:"Module"})),O4e=lo(I4e);Object.defineProperty(lI,"__esModule",{value:!0});lI.WalletLinkConnector=void 0;const P4e=Ll,T4e=O4e,R4e=Vs;class C4e extends T4e.WalletLinkConnector{constructor(e){const r=R4e.getConfiguration()[P4e.ProviderType.WALLET_LINK];super({url:r.urls[e],appName:r.appName,supportedChainIds:[e]})}}lI.WalletLinkConnector=C4e;var fI={};const N4e=Symbol(),HW=Object.getPrototypeOf,u4=new WeakMap,D4e=t=>t&&(u4.has(t)?u4.get(t):HW(t)===Object.prototype||HW(t)===Array.prototype),$4e=t=>D4e(t)&&t[N4e]||null,VW=(t,e=!0)=>{u4.set(t,e)},xN=t=>typeof t=="object"&&t!==null,Ef=new WeakMap,SE=new WeakSet,M4e=(t=Object.is,e=(u,f)=>new Proxy(u,f),r=u=>xN(u)&&!SE.has(u)&&(Array.isArray(u)||!(Symbol.iterator in u))&&!(u instanceof WeakMap)&&!(u instanceof WeakSet)&&!(u instanceof Error)&&!(u instanceof Number)&&!(u instanceof Date)&&!(u instanceof String)&&!(u instanceof RegExp)&&!(u instanceof ArrayBuffer),n=u=>{switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:throw u}},i=new WeakMap,a=(u,f,d=n)=>{const g=i.get(u);if((g==null?void 0:g[0])===f)return g[1];const m=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u));return VW(m,!0),i.set(u,[f,m]),Reflect.ownKeys(u).forEach(w=>{if(Object.getOwnPropertyDescriptor(m,w))return;const v=Reflect.get(u,w),y={value:v,enumerable:!0,configurable:!0};if(SE.has(v))VW(v,!1);else if(v instanceof Promise)delete y.value,y.get=()=>d(v);else if(Ef.has(v)){const[_,b]=Ef.get(v);y.value=a(_,b(),d)}Object.defineProperty(m,w,y)}),Object.preventExtensions(m)},o=new WeakMap,s=[1,1],c=u=>{if(!xN(u))throw new Error("object required");const f=o.get(u);if(f)return f;let d=s[0];const g=new Set,m=(C,M=++s[0])=>{d!==M&&(d=M,g.forEach(B=>B(C,M)))};let w=s[1];const v=(C=++s[1])=>(w!==C&&!g.size&&(w=C,_.forEach(([M])=>{const B=M[1](C);B>d&&(d=B)})),d),y=C=>(M,B)=>{const ce=[...M];ce[1]=[C,...ce[1]],m(ce,B)},_=new Map,b=(C,M)=>{if(g.size){const B=M[3](y(C));_.set(C,[M,B])}else _.set(C,[M])},S=C=>{var M;const B=_.get(C);B&&(_.delete(C),(M=B[1])==null||M.call(B))},x=C=>(g.add(C),g.size===1&&_.forEach(([B,ce],he)=>{const F=B[3](y(he));_.set(he,[B,F])}),()=>{g.delete(C),g.size===0&&_.forEach(([B,ce],he)=>{ce&&(ce(),_.set(he,[B]))})}),I=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u)),p=e(I,{deleteProperty(C,M){const B=Reflect.get(C,M);S(M);const ce=Reflect.deleteProperty(C,M);return ce&&m(["delete",[M],B]),ce},set(C,M,B,ce){const he=Reflect.has(C,M),F=Reflect.get(C,M,ce);if(he&&(t(F,B)||o.has(B)&&t(F,o.get(B))))return!0;S(M),xN(B)&&(B=$4e(B)||B);let U=B;if(B instanceof Promise)B.then(K=>{B.status="fulfilled",B.value=K,m(["resolve",[M],K])}).catch(K=>{B.status="rejected",B.reason=K,m(["reject",[M],K])});else{!Ef.has(B)&&r(B)&&(U=c(B));const K=!SE.has(U)&&Ef.get(U);K&&b(M,K)}return Reflect.set(C,M,U,ce),m(["set",[M],B,F]),!0}});o.set(u,p);const O=[I,v,a,x];return Ef.set(p,O),Reflect.ownKeys(u).forEach(C=>{const M=Object.getOwnPropertyDescriptor(u,C);"value"in M&&(p[C]=u[C],delete M.value,delete M.writable),Object.defineProperty(I,C,M)}),p})=>[c,Ef,SE,t,e,r,n,i,a,o,s],[k4e]=M4e();function Od(t={}){return k4e(t)}function Cp(t,e,r){const n=Ef.get(t);let i;const a=[],o=n[3];let s=!1;const u=o(f=>{if(a.push(f),r){e(a.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,s&&e(a.splice(0))}))});return s=!0,()=>{s=!1,u()}}function L4e(t,e){const r=Ef.get(t),[n,i,a]=r;return a(n,i(),e)}const Wi=Od({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),noe={state:Wi,subscribe(t){return Cp(Wi,()=>t(Wi))},push(t,e){t!==Wi.view&&(Wi.view=t,e&&(Wi.data=e),Wi.history.push(t))},reset(t){Wi.view=t,Wi.history=[t]},replace(t){Wi.history.length>1&&(Wi.history[Wi.history.length-1]=t,Wi.view=t)},goBack(){if(Wi.history.length>1){Wi.history.pop();const[t]=Wi.history.slice(-1);Wi.view=t}},setData(t){Wi.data=t}},Ma={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return Ma.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const t=navigator.userAgent.toLowerCase();return Ma.isMobile()&&(t.includes("iphone")||t.includes("ipad"))},isHttpUrl(t){return t.startsWith("http://")||t.startsWith("https://")},isArray(t){return Array.isArray(t)&&t.length>0},formatNativeUrl(t,e,r){if(Ma.isHttpUrl(t))return this.formatUniversalUrl(t,e,r);let n=t;n.includes("://")||(n=t.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r);const i=encodeURIComponent(e);return`${n}wc?uri=${i}`},formatUniversalUrl(t,e,r){if(!Ma.isHttpUrl(t))return this.formatNativeUrl(t,e,r);let n=t;n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r);const i=encodeURIComponent(e);return`${n}wc?uri=${i}`},async wait(t){return new Promise(e=>{setTimeout(e,t)})},openHref(t,e){window.open(t,e,"noreferrer noopener")},setWalletConnectDeepLink(t,e){try{localStorage.setItem(Ma.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:e}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(t){try{const[e]=t.split("?");localStorage.setItem(Ma.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(Ma.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(Ma.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var t;const e=(t=noe.state.data)==null?void 0:t.Wallet;if(!e)throw new Error('Missing "Wallet" view data');return e}},U4e=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),Ia=Od({enabled:U4e,userSessionId:"",events:[],connectedWalletId:void 0}),B4e={state:Ia,subscribe(t){return Cp(Ia.events,()=>t(L4e(Ia.events[Ia.events.length-1])))},initialize(){Ia.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(Ia.userSessionId=crypto.randomUUID())},setConnectedWalletId(t){Ia.connectedWalletId=t},click(t){if(Ia.enabled){const e={type:"CLICK",name:t.name,userSessionId:Ia.userSessionId,timestamp:Date.now(),data:t};Ia.events.push(e)}},track(t){if(Ia.enabled){const e={type:"TRACK",name:t.name,userSessionId:Ia.userSessionId,timestamp:Date.now(),data:t};Ia.events.push(e)}},view(t){if(Ia.enabled){const e={type:"VIEW",name:t.name,userSessionId:Ia.userSessionId,timestamp:Date.now(),data:t};Ia.events.push(e)}}},Yc=Od({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),Rc={state:Yc,subscribe(t){return Cp(Yc,()=>t(Yc))},setChains(t){Yc.chains=t},setWalletConnectUri(t){Yc.walletConnectUri=t},setIsCustomDesktop(t){Yc.isCustomDesktop=t},setIsCustomMobile(t){Yc.isCustomMobile=t},setIsDataLoaded(t){Yc.isDataLoaded=t},setIsUiLoaded(t){Yc.isUiLoaded=t},setIsAuth(t){Yc.isAuth=t}},IE=Od({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),Ly={state:IE,subscribe(t){return Cp(IE,()=>t(IE))},setConfig(t){var e,r;B4e.initialize(),Rc.setChains(t.chains),Rc.setIsAuth(!!t.enableAuthMode),Rc.setIsCustomMobile(!!((e=t.mobileWallets)!=null&&e.length)),Rc.setIsCustomDesktop(!!((r=t.desktopWallets)!=null&&r.length)),Ma.setModalVersionInStorage(),Object.assign(IE,t)}};var F4e=Object.defineProperty,zW=Object.getOwnPropertySymbols,j4e=Object.prototype.hasOwnProperty,q4e=Object.prototype.propertyIsEnumerable,GW=(t,e,r)=>e in t?F4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,H4e=(t,e)=>{for(var r in e||(e={}))j4e.call(e,r)&&GW(t,r,e[r]);if(zW)for(var r of zW(e))q4e.call(e,r)&&GW(t,r,e[r]);return t};const l4="https://explorer-api.walletconnect.com",f4="wcm",d4="js-2.6.2";async function OE(t,e){const r=H4e({sdkType:f4,sdkVersion:d4},e),n=new URL(t,l4);return n.searchParams.append("projectId",Ly.state.projectId),Object.entries(r).forEach(([i,a])=>{a&&n.searchParams.append(i,String(a))}),(await fetch(n)).json()}const th={async getDesktopListings(t){return OE("/w3m/v1/getDesktopListings",t)},async getMobileListings(t){return OE("/w3m/v1/getMobileListings",t)},async getInjectedListings(t){return OE("/w3m/v1/getInjectedListings",t)},async getAllListings(t){return OE("/w3m/v1/getAllListings",t)},getWalletImageUrl(t){return`${l4}/w3m/v1/getWalletImage/${t}?projectId=${Ly.state.projectId}&sdkType=${f4}&sdkVersion=${d4}`},getAssetImageUrl(t){return`${l4}/w3m/v1/getAssetImage/${t}?projectId=${Ly.state.projectId}&sdkType=${f4}&sdkVersion=${d4}`}};var V4e=Object.defineProperty,WW=Object.getOwnPropertySymbols,z4e=Object.prototype.hasOwnProperty,G4e=Object.prototype.propertyIsEnumerable,KW=(t,e,r)=>e in t?V4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,W4e=(t,e)=>{for(var r in e||(e={}))z4e.call(e,r)&&KW(t,r,e[r]);if(WW)for(var r of WW(e))G4e.call(e,r)&&KW(t,r,e[r]);return t};const YW=Ma.isMobile(),Qc=Od({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),wKe={state:Qc,async getRecomendedWallets(){const{explorerRecommendedWalletIds:t,explorerExcludedWalletIds:e}=Ly.state;if(t==="NONE"||e==="ALL"&&!t)return Qc.recomendedWallets;if(Ma.isArray(t)){const r={recommendedIds:t.join(",")},{listings:n}=await th.getAllListings(r),i=Object.values(n);i.sort((a,o)=>{const s=t.indexOf(a.id),c=t.indexOf(o.id);return s-c}),Qc.recomendedWallets=i}else{const{chains:r,isAuth:n}=Rc.state,i=r==null?void 0:r.join(","),a=Ma.isArray(e),o={page:1,sdks:n?"auth_v1":void 0,entries:Ma.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:a?e.join(","):void 0},{listings:s}=YW?await th.getMobileListings(o):await th.getDesktopListings(o);Qc.recomendedWallets=Object.values(s)}return Qc.recomendedWallets},async getWallets(t){const e=W4e({},t),{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:n}=Ly.state,{recomendedWallets:i}=Qc;if(n==="ALL")return Qc.wallets;i.length?e.excludedIds=i.map(d=>d.id).join(","):Ma.isArray(r)&&(e.excludedIds=r.join(",")),Ma.isArray(n)&&(e.excludedIds=[e.excludedIds,n].filter(Boolean).join(",")),Rc.state.isAuth&&(e.sdks="auth_v1");const{page:a,search:o}=t,{listings:s,total:c}=YW?await th.getMobileListings(e):await th.getDesktopListings(e),u=Object.values(s),f=o?"search":"wallets";return Qc[f]={listings:[...Qc[f].listings,...u],total:c,page:a??1},{listings:u,total:c}},getWalletImageUrl(t){return th.getWalletImageUrl(t)},getAssetImageUrl(t){return th.getAssetImageUrl(t)},resetSearch(){Qc.search={listings:[],total:0,page:1}}},b0=Od({open:!1}),AN={state:b0,subscribe(t){return Cp(b0,()=>t(b0))},async open(t){return new Promise(e=>{const{isUiLoaded:r,isDataLoaded:n}=Rc.state;if(Ma.removeWalletConnectDeepLink(),Rc.setWalletConnectUri(t==null?void 0:t.uri),Rc.setChains(t==null?void 0:t.chains),noe.reset("ConnectWallet"),r&&n)b0.open=!0,e();else{const i=setInterval(()=>{const a=Rc.state;a.isUiLoaded&&a.isDataLoaded&&(clearInterval(i),b0.open=!0,e())},200)}})},close(){b0.open=!1}};var K4e=Object.defineProperty,QW=Object.getOwnPropertySymbols,Y4e=Object.prototype.hasOwnProperty,Q4e=Object.prototype.propertyIsEnumerable,JW=(t,e,r)=>e in t?K4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,J4e=(t,e)=>{for(var r in e||(e={}))Y4e.call(e,r)&&JW(t,r,e[r]);if(QW)for(var r of QW(e))Q4e.call(e,r)&&JW(t,r,e[r]);return t};function X4e(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const Rv=Od({themeMode:X4e()?"dark":"light"}),XW={state:Rv,subscribe(t){return Cp(Rv,()=>t(Rv))},setThemeConfig(t){const{themeMode:e,themeVariables:r}=t;e&&(Rv.themeMode=e),r&&(Rv.themeVariables=J4e({},r))}},rh=Od({open:!1,message:"",variant:"success"}),_Ke={state:rh,subscribe(t){return Cp(rh,()=>t(rh))},openToast(t,e){rh.open=!0,rh.message=t,rh.variant=e},closeToast(){rh.open=!1}};let Z4e=class{constructor(e){this.openModal=AN.open,this.closeModal=AN.close,this.subscribeModal=AN.subscribe,this.setTheme=XW.setThemeConfig,XW.setThemeConfig(e),Ly.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await ky(()=>import("./index-45c54bb2.js"),[]);const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),Rc.setIsUiLoaded(!0)}}};const eDe=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Z4e},Symbol.toStringTag,{value:"Module"})),tDe=lo(eDe);var Ck={},dI={},Lr={},ioe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(s,c){var u=s>>>16&65535,f=s&65535,d=c>>>16&65535,g=c&65535;return f*g+(u*g+f*d<<16>>>0)|0}t.mul=Math.imul||e;function r(s,c){return s+c|0}t.add=r;function n(s,c){return s-c|0}t.sub=n;function i(s,c){return s<<c|s>>>32-c}t.rotl=i;function a(s,c){return s<<32-c|s>>>c}t.rotr=a;function o(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}t.isInteger=Number.isInteger||o,t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(s){return t.isInteger(s)&&s>=-t.MAX_SAFE_INTEGER&&s<=t.MAX_SAFE_INTEGER}})(ioe);Object.defineProperty(Lr,"__esModule",{value:!0});var aoe=ioe;function rDe(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}Lr.readInt16BE=rDe;function nDe(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}Lr.readUint16BE=nDe;function iDe(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}Lr.readInt16LE=iDe;function aDe(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}Lr.readUint16LE=aDe;function ooe(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}Lr.writeUint16BE=ooe;Lr.writeInt16BE=ooe;function soe(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}Lr.writeUint16LE=soe;Lr.writeInt16LE=soe;function h4(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}Lr.readInt32BE=h4;function p4(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}Lr.readUint32BE=p4;function g4(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}Lr.readInt32LE=g4;function y4(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}Lr.readUint32LE=y4;function QA(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}Lr.writeUint32BE=QA;Lr.writeInt32BE=QA;function JA(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}Lr.writeUint32LE=JA;Lr.writeInt32LE=JA;function oDe(t,e){e===void 0&&(e=0);var r=h4(t,e),n=h4(t,e+4);return r*4294967296+n-(n>>31)*4294967296}Lr.readInt64BE=oDe;function sDe(t,e){e===void 0&&(e=0);var r=p4(t,e),n=p4(t,e+4);return r*4294967296+n}Lr.readUint64BE=sDe;function cDe(t,e){e===void 0&&(e=0);var r=g4(t,e),n=g4(t,e+4);return n*4294967296+r-(r>>31)*4294967296}Lr.readInt64LE=cDe;function uDe(t,e){e===void 0&&(e=0);var r=y4(t,e),n=y4(t,e+4);return n*4294967296+r}Lr.readUint64LE=uDe;function coe(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),QA(t/4294967296>>>0,e,r),QA(t>>>0,e,r+4),e}Lr.writeUint64BE=coe;Lr.writeInt64BE=coe;function uoe(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),JA(t>>>0,e,r),JA(t/4294967296>>>0,e,r+4),e}Lr.writeUint64LE=uoe;Lr.writeInt64LE=uoe;function lDe(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,a=t/8+r-1;a>=r;a--)n+=e[a]*i,i*=256;return n}Lr.readUintBE=lDe;function fDe(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,a=r;a<r+t/8;a++)n+=e[a]*i,i*=256;return n}Lr.readUintLE=fDe;function dDe(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!aoe.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var i=1,a=t/8+n-1;a>=n;a--)r[a]=e/i&255,i*=256;return r}Lr.writeUintBE=dDe;function hDe(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!aoe.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,a=n;a<n+t/8;a++)r[a]=e/i&255,i*=256;return r}Lr.writeUintLE=hDe;function pDe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e)}Lr.readFloat32BE=pDe;function gDe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e,!0)}Lr.readFloat32LE=gDe;function yDe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e)}Lr.readFloat64BE=yDe;function mDe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e,!0)}Lr.readFloat64LE=mDe;function vDe(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t),e}Lr.writeFloat32BE=vDe;function bDe(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t,!0),e}Lr.writeFloat32LE=bDe;function wDe(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t),e}Lr.writeFloat64BE=wDe;function _De(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t,!0),e}Lr.writeFloat64LE=_De;var os={};Object.defineProperty(os,"__esModule",{value:!0});function EDe(t){for(var e=0;e<t.length;e++)t[e]=0;return t}os.wipe=EDe;Object.defineProperty(dI,"__esModule",{value:!0});var Oa=Lr,m4=os,xDe=20;function ADe(t,e,r){for(var n=1634760805,i=857760878,a=2036477234,o=1797285236,s=r[3]<<24|r[2]<<16|r[1]<<8|r[0],c=r[7]<<24|r[6]<<16|r[5]<<8|r[4],u=r[11]<<24|r[10]<<16|r[9]<<8|r[8],f=r[15]<<24|r[14]<<16|r[13]<<8|r[12],d=r[19]<<24|r[18]<<16|r[17]<<8|r[16],g=r[23]<<24|r[22]<<16|r[21]<<8|r[20],m=r[27]<<24|r[26]<<16|r[25]<<8|r[24],w=r[31]<<24|r[30]<<16|r[29]<<8|r[28],v=e[3]<<24|e[2]<<16|e[1]<<8|e[0],y=e[7]<<24|e[6]<<16|e[5]<<8|e[4],_=e[11]<<24|e[10]<<16|e[9]<<8|e[8],b=e[15]<<24|e[14]<<16|e[13]<<8|e[12],S=n,x=i,I=a,E=o,p=s,O=c,C=u,M=f,B=d,ce=g,he=m,F=w,U=v,K=y,ne=_,j=b,q=0;q<xDe;q+=2)S=S+p|0,U^=S,U=U>>>32-16|U<<16,B=B+U|0,p^=B,p=p>>>32-12|p<<12,x=x+O|0,K^=x,K=K>>>32-16|K<<16,ce=ce+K|0,O^=ce,O=O>>>32-12|O<<12,I=I+C|0,ne^=I,ne=ne>>>32-16|ne<<16,he=he+ne|0,C^=he,C=C>>>32-12|C<<12,E=E+M|0,j^=E,j=j>>>32-16|j<<16,F=F+j|0,M^=F,M=M>>>32-12|M<<12,I=I+C|0,ne^=I,ne=ne>>>32-8|ne<<8,he=he+ne|0,C^=he,C=C>>>32-7|C<<7,E=E+M|0,j^=E,j=j>>>32-8|j<<8,F=F+j|0,M^=F,M=M>>>32-7|M<<7,x=x+O|0,K^=x,K=K>>>32-8|K<<8,ce=ce+K|0,O^=ce,O=O>>>32-7|O<<7,S=S+p|0,U^=S,U=U>>>32-8|U<<8,B=B+U|0,p^=B,p=p>>>32-7|p<<7,S=S+O|0,j^=S,j=j>>>32-16|j<<16,he=he+j|0,O^=he,O=O>>>32-12|O<<12,x=x+C|0,U^=x,U=U>>>32-16|U<<16,F=F+U|0,C^=F,C=C>>>32-12|C<<12,I=I+M|0,K^=I,K=K>>>32-16|K<<16,B=B+K|0,M^=B,M=M>>>32-12|M<<12,E=E+p|0,ne^=E,ne=ne>>>32-16|ne<<16,ce=ce+ne|0,p^=ce,p=p>>>32-12|p<<12,I=I+M|0,K^=I,K=K>>>32-8|K<<8,B=B+K|0,M^=B,M=M>>>32-7|M<<7,E=E+p|0,ne^=E,ne=ne>>>32-8|ne<<8,ce=ce+ne|0,p^=ce,p=p>>>32-7|p<<7,x=x+C|0,U^=x,U=U>>>32-8|U<<8,F=F+U|0,C^=F,C=C>>>32-7|C<<7,S=S+O|0,j^=S,j=j>>>32-8|j<<8,he=he+j|0,O^=he,O=O>>>32-7|O<<7;Oa.writeUint32LE(S+n|0,t,0),Oa.writeUint32LE(x+i|0,t,4),Oa.writeUint32LE(I+a|0,t,8),Oa.writeUint32LE(E+o|0,t,12),Oa.writeUint32LE(p+s|0,t,16),Oa.writeUint32LE(O+c|0,t,20),Oa.writeUint32LE(C+u|0,t,24),Oa.writeUint32LE(M+f|0,t,28),Oa.writeUint32LE(B+d|0,t,32),Oa.writeUint32LE(ce+g|0,t,36),Oa.writeUint32LE(he+m|0,t,40),Oa.writeUint32LE(F+w|0,t,44),Oa.writeUint32LE(U+v|0,t,48),Oa.writeUint32LE(K+y|0,t,52),Oa.writeUint32LE(ne+_|0,t,56),Oa.writeUint32LE(j+b|0,t,60)}function loe(t,e,r,n,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length<r.length)throw new Error("ChaCha: destination is shorter than source");var a,o;if(i===0){if(e.length!==8&&e.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");a=new Uint8Array(16),o=a.length-e.length,a.set(e,o)}else{if(e.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");a=e,o=i}for(var s=new Uint8Array(64),c=0;c<r.length;c+=64){ADe(s,a,t);for(var u=c;u<c+64&&u<r.length;u++)n[u]=r[u]^s[u-c];IDe(a,0,o)}return m4.wipe(s),i===0&&m4.wipe(a),n}dI.streamXOR=loe;function SDe(t,e,r,n){return n===void 0&&(n=0),m4.wipe(r),loe(t,e,r,r,n)}dI.stream=SDe;function IDe(t,e,r){for(var n=1;r--;)n=n+(t[e]&255)|0,t[e]=n&255,n>>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}var foe={},Pd={};Object.defineProperty(Pd,"__esModule",{value:!0});function ODe(t,e,r){return~(t-1)&e|t-1&r}Pd.select=ODe;function PDe(t,e){return(t|0)-(e|0)-1>>>31&1}Pd.lessOrEqual=PDe;function doe(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return 1&r-1>>>8}Pd.compare=doe;function TDe(t,e){return t.length===0||e.length===0?!1:doe(t,e)!==0}Pd.equal=TDe;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Pd,r=os;t.DIGEST_LENGTH=16;var n=function(){function o(s){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var c=s[0]|s[1]<<8;this._r[0]=c&8191;var u=s[2]|s[3]<<8;this._r[1]=(c>>>13|u<<3)&8191;var f=s[4]|s[5]<<8;this._r[2]=(u>>>10|f<<6)&7939;var d=s[6]|s[7]<<8;this._r[3]=(f>>>7|d<<9)&8191;var g=s[8]|s[9]<<8;this._r[4]=(d>>>4|g<<12)&255,this._r[5]=g>>>1&8190;var m=s[10]|s[11]<<8;this._r[6]=(g>>>14|m<<2)&8191;var w=s[12]|s[13]<<8;this._r[7]=(m>>>11|w<<5)&8065;var v=s[14]|s[15]<<8;this._r[8]=(w>>>8|v<<8)&8191,this._r[9]=v>>>5&127,this._pad[0]=s[16]|s[17]<<8,this._pad[1]=s[18]|s[19]<<8,this._pad[2]=s[20]|s[21]<<8,this._pad[3]=s[22]|s[23]<<8,this._pad[4]=s[24]|s[25]<<8,this._pad[5]=s[26]|s[27]<<8,this._pad[6]=s[28]|s[29]<<8,this._pad[7]=s[30]|s[31]<<8}return o.prototype._blocks=function(s,c,u){for(var f=this._fin?0:2048,d=this._h[0],g=this._h[1],m=this._h[2],w=this._h[3],v=this._h[4],y=this._h[5],_=this._h[6],b=this._h[7],S=this._h[8],x=this._h[9],I=this._r[0],E=this._r[1],p=this._r[2],O=this._r[3],C=this._r[4],M=this._r[5],B=this._r[6],ce=this._r[7],he=this._r[8],F=this._r[9];u>=16;){var U=s[c+0]|s[c+1]<<8;d+=U&8191;var K=s[c+2]|s[c+3]<<8;g+=(U>>>13|K<<3)&8191;var ne=s[c+4]|s[c+5]<<8;m+=(K>>>10|ne<<6)&8191;var j=s[c+6]|s[c+7]<<8;w+=(ne>>>7|j<<9)&8191;var q=s[c+8]|s[c+9]<<8;v+=(j>>>4|q<<12)&8191,y+=q>>>1&8191;var V=s[c+10]|s[c+11]<<8;_+=(q>>>14|V<<2)&8191;var $=s[c+12]|s[c+13]<<8;b+=(V>>>11|$<<5)&8191;var H=s[c+14]|s[c+15]<<8;S+=($>>>8|H<<8)&8191,x+=H>>>5|f;var L=0,k=L;k+=d*I,k+=g*(5*F),k+=m*(5*he),k+=w*(5*ce),k+=v*(5*B),L=k>>>13,k&=8191,k+=y*(5*M),k+=_*(5*C),k+=b*(5*O),k+=S*(5*p),k+=x*(5*E),L+=k>>>13,k&=8191;var G=L;G+=d*E,G+=g*I,G+=m*(5*F),G+=w*(5*he),G+=v*(5*ce),L=G>>>13,G&=8191,G+=y*(5*B),G+=_*(5*M),G+=b*(5*C),G+=S*(5*O),G+=x*(5*p),L+=G>>>13,G&=8191;var ge=L;ge+=d*p,ge+=g*E,ge+=m*I,ge+=w*(5*F),ge+=v*(5*he),L=ge>>>13,ge&=8191,ge+=y*(5*ce),ge+=_*(5*B),ge+=b*(5*M),ge+=S*(5*C),ge+=x*(5*O),L+=ge>>>13,ge&=8191;var Q=L;Q+=d*O,Q+=g*p,Q+=m*E,Q+=w*I,Q+=v*(5*F),L=Q>>>13,Q&=8191,Q+=y*(5*he),Q+=_*(5*ce),Q+=b*(5*B),Q+=S*(5*M),Q+=x*(5*C),L+=Q>>>13,Q&=8191;var te=L;te+=d*C,te+=g*O,te+=m*p,te+=w*E,te+=v*I,L=te>>>13,te&=8191,te+=y*(5*F),te+=_*(5*he),te+=b*(5*ce),te+=S*(5*B),te+=x*(5*M),L+=te>>>13,te&=8191;var ue=L;ue+=d*M,ue+=g*C,ue+=m*O,ue+=w*p,ue+=v*E,L=ue>>>13,ue&=8191,ue+=y*I,ue+=_*(5*F),ue+=b*(5*he),ue+=S*(5*ce),ue+=x*(5*B),L+=ue>>>13,ue&=8191;var T=L;T+=d*B,T+=g*M,T+=m*C,T+=w*O,T+=v*p,L=T>>>13,T&=8191,T+=y*E,T+=_*I,T+=b*(5*F),T+=S*(5*he),T+=x*(5*ce),L+=T>>>13,T&=8191;var fe=L;fe+=d*ce,fe+=g*B,fe+=m*M,fe+=w*C,fe+=v*O,L=fe>>>13,fe&=8191,fe+=y*p,fe+=_*E,fe+=b*I,fe+=S*(5*F),fe+=x*(5*he),L+=fe>>>13,fe&=8191;var Ge=L;Ge+=d*he,Ge+=g*ce,Ge+=m*B,Ge+=w*M,Ge+=v*C,L=Ge>>>13,Ge&=8191,Ge+=y*O,Ge+=_*p,Ge+=b*E,Ge+=S*I,Ge+=x*(5*F),L+=Ge>>>13,Ge&=8191;var tt=L;tt+=d*F,tt+=g*he,tt+=m*ce,tt+=w*B,tt+=v*M,L=tt>>>13,tt&=8191,tt+=y*C,tt+=_*O,tt+=b*p,tt+=S*E,tt+=x*I,L+=tt>>>13,tt&=8191,L=(L<<2)+L|0,L=L+k|0,k=L&8191,L=L>>>13,G+=L,d=k,g=G,m=ge,w=Q,v=te,y=ue,_=T,b=fe,S=Ge,x=tt,c+=16,u-=16}this._h[0]=d,this._h[1]=g,this._h[2]=m,this._h[3]=w,this._h[4]=v,this._h[5]=y,this._h[6]=_,this._h[7]=b,this._h[8]=S,this._h[9]=x},o.prototype.finish=function(s,c){c===void 0&&(c=0);var u=new Uint16Array(10),f,d,g,m;if(this._leftover){for(m=this._leftover,this._buffer[m++]=1;m<16;m++)this._buffer[m]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(f=this._h[1]>>>13,this._h[1]&=8191,m=2;m<10;m++)this._h[m]+=f,f=this._h[m]>>>13,this._h[m]&=8191;for(this._h[0]+=f*5,f=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=f,f=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=f,u[0]=this._h[0]+5,f=u[0]>>>13,u[0]&=8191,m=1;m<10;m++)u[m]=this._h[m]+f,f=u[m]>>>13,u[m]&=8191;for(u[9]-=8192,d=(f^1)-1,m=0;m<10;m++)u[m]&=d;for(d=~d,m=0;m<10;m++)this._h[m]=this._h[m]&d|u[m];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,g=this._h[0]+this._pad[0],this._h[0]=g&65535,m=1;m<8;m++)g=(this._h[m]+this._pad[m]|0)+(g>>>16)|0,this._h[m]=g&65535;return s[c+0]=this._h[0]>>>0,s[c+1]=this._h[0]>>>8,s[c+2]=this._h[1]>>>0,s[c+3]=this._h[1]>>>8,s[c+4]=this._h[2]>>>0,s[c+5]=this._h[2]>>>8,s[c+6]=this._h[3]>>>0,s[c+7]=this._h[3]>>>8,s[c+8]=this._h[4]>>>0,s[c+9]=this._h[4]>>>8,s[c+10]=this._h[5]>>>0,s[c+11]=this._h[5]>>>8,s[c+12]=this._h[6]>>>0,s[c+13]=this._h[6]>>>8,s[c+14]=this._h[7]>>>0,s[c+15]=this._h[7]>>>8,this._finished=!0,this},o.prototype.update=function(s){var c=0,u=s.length,f;if(this._leftover){f=16-this._leftover,f>u&&(f=u);for(var d=0;d<f;d++)this._buffer[this._leftover+d]=s[c+d];if(u-=f,c+=f,this._leftover+=f,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(u>=16&&(f=u-u%16,this._blocks(s,c,f),c+=f,u-=f),u){for(var d=0;d<u;d++)this._buffer[this._leftover+d]=s[c+d];this._leftover+=u}return this},o.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var s=new Uint8Array(16);return this.finish(s),s},o.prototype.clean=function(){return r.wipe(this._buffer),r.wipe(this._r),r.wipe(this._h),r.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},o}();t.Poly1305=n;function i(o,s){var c=new n(o);c.update(s);var u=c.digest();return c.clean(),u}t.oneTimeAuth=i;function a(o,s){return o.length!==t.DIGEST_LENGTH||s.length!==t.DIGEST_LENGTH?!1:e.equal(o,s)}t.equal=a})(foe);(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=dI,r=foe,n=os,i=Lr,a=Pd;t.KEY_LENGTH=32,t.NONCE_LENGTH=12,t.TAG_LENGTH=16;var o=new Uint8Array(16),s=function(){function c(u){if(this.nonceLength=t.NONCE_LENGTH,this.tagLength=t.TAG_LENGTH,u.length!==t.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(u)}return c.prototype.seal=function(u,f,d,g){if(u.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var m=new Uint8Array(16);m.set(u,m.length-u.length);var w=new Uint8Array(32);e.stream(this._key,m,w,4);var v=f.length+this.tagLength,y;if(g){if(g.length!==v)throw new Error("ChaCha20Poly1305: incorrect destination length");y=g}else y=new Uint8Array(v);return e.streamXOR(this._key,m,f,y,4),this._authenticate(y.subarray(y.length-this.tagLength,y.length),w,y.subarray(0,y.length-this.tagLength),d),n.wipe(m),y},c.prototype.open=function(u,f,d,g){if(u.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(f.length<this.tagLength)return null;var m=new Uint8Array(16);m.set(u,m.length-u.length);var w=new Uint8Array(32);e.stream(this._key,m,w,4);var v=new Uint8Array(this.tagLength);if(this._authenticate(v,w,f.subarray(0,f.length-this.tagLength),d),!a.equal(v,f.subarray(f.length-this.tagLength,f.length)))return null;var y=f.length-this.tagLength,_;if(g){if(g.length!==y)throw new Error("ChaCha20Poly1305: incorrect destination length");_=g}else _=new Uint8Array(y);return e.streamXOR(this._key,m,f.subarray(0,f.length-this.tagLength),_,4),n.wipe(m),_},c.prototype.clean=function(){return n.wipe(this._key),this},c.prototype._authenticate=function(u,f,d,g){var m=new r.Poly1305(f);g&&(m.update(g),g.length%16>0&&m.update(o.subarray(g.length%16))),m.update(d),d.length%16>0&&m.update(o.subarray(d.length%16));var w=new Uint8Array(8);g&&i.writeUint64LE(g.length,w),m.update(w),i.writeUint64LE(d.length,w),m.update(w);for(var v=m.digest(),y=0;y<v.length;y++)u[y]=v[y];m.clean(),n.wipe(v),n.wipe(w)},c}();t.ChaCha20Poly1305=s})(Ck);var hoe={},Uw={},Nk={};Object.defineProperty(Nk,"__esModule",{value:!0});function RDe(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}Nk.isSerializableHash=RDe;Object.defineProperty(Uw,"__esModule",{value:!0});var Jc=Nk,CDe=Pd,NDe=os,poe=function(){function t(e,r){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var i=0;i<n.length;i++)n[i]^=54;this._inner.update(n);for(var i=0;i<n.length;i++)n[i]^=106;this._outer.update(n),Jc.isSerializableHash(this._inner)&&Jc.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),NDe.wipe(n)}return t.prototype.reset=function(){if(!Jc.isSerializableHash(this._inner)||!Jc.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.clean=function(){Jc.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Jc.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},t.prototype.update=function(e){return this._inner.update(e),this},t.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype.saveState=function(){if(!Jc.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},t.prototype.restoreState=function(e){if(!Jc.isSerializableHash(this._inner)||!Jc.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.cleanSavedState=function(e){if(!Jc.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},t}();Uw.HMAC=poe;function DDe(t,e,r){var n=new poe(t,e);n.update(r);var i=n.digest();return n.clean(),i}Uw.hmac=DDe;Uw.equal=CDe.equal;Object.defineProperty(hoe,"__esModule",{value:!0});var ZW=Uw,eK=os,$De=function(){function t(e,r,n,i){n===void 0&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var a=ZW.hmac(this._hash,n,r);this._hmac=new ZW.HMAC(e,a),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return t.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(e===0)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},t.prototype.expand=function(e){for(var r=new Uint8Array(e),n=0;n<r.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),r[n]=this._buffer[this._bufpos++];return r},t.prototype.clean=function(){this._hmac.clean(),eK.wipe(this._buffer),eK.wipe(this._counter),this._bufpos=0},t}(),MDe=hoe.HKDF=$De,dm={},hI={},pI={};Object.defineProperty(pI,"__esModule",{value:!0});pI.BrowserRandomSource=void 0;const tK=65536;class kDe{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&e.getRandomValues!==void 0&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const r=new Uint8Array(e);for(let n=0;n<r.length;n+=tK)this._crypto.getRandomValues(r.subarray(n,n+Math.min(r.length-n,tK)));return r}}pI.BrowserRandomSource=kDe;function v4(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var gI={};Object.defineProperty(gI,"__esModule",{value:!0});gI.NodeRandomSource=void 0;const LDe=os;class UDe{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof v4<"u"){const e=fM;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(e);if(r.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let i=0;i<n.length;i++)n[i]=r[i];return(0,LDe.wipe)(r),n}}gI.NodeRandomSource=UDe;Object.defineProperty(hI,"__esModule",{value:!0});hI.SystemRandomSource=void 0;const BDe=pI,FDe=gI;class jDe{constructor(){if(this.isAvailable=!1,this.name="",this._source=new BDe.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new FDe.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}hI.SystemRandomSource=jDe;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const e=hI,r=Lr,n=os;t.defaultRandomSource=new e.SystemRandomSource;function i(u,f=t.defaultRandomSource){return f.randomBytes(u)}t.randomBytes=i;function a(u=t.defaultRandomSource){const f=i(4,u),d=(0,r.readUint32LE)(f);return(0,n.wipe)(f),d}t.randomUint32=a;const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function s(u,f=o,d=t.defaultRandomSource){if(f.length<2)throw new Error("randomString charset is too short");if(f.length>256)throw new Error("randomString charset is too long");let g="";const m=f.length,w=256-256%m;for(;u>0;){const v=i(Math.ceil(u*256/w),d);for(let y=0;y<v.length&&u>0;y++){const _=v[y];_<w&&(g+=f.charAt(_%m),u--)}(0,n.wipe)(v)}return g}t.randomString=s;function c(u,f=o,d=t.defaultRandomSource){const g=Math.ceil(u/(Math.log(f.length)/Math.LN2));return s(g,f,d)}t.randomStringForEntropy=c})(dm);var yI={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Lr,r=os;t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64;var n=function(){function s(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return s.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},s.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},s.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},s.prototype.update=function(c,u){if(u===void 0&&(u=c.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var f=0;if(this._bytesHashed+=u,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&u>0;)this._buffer[this._bufferLength++]=c[f++],u--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(u>=this.blockSize&&(f=a(this._temp,this._state,c,f,u),u%=this.blockSize);u>0;)this._buffer[this._bufferLength++]=c[f++],u--;return this},s.prototype.finish=function(c){if(!this._finished){var u=this._bytesHashed,f=this._bufferLength,d=u/536870912|0,g=u<<3,m=u%64<56?64:128;this._buffer[f]=128;for(var w=f+1;w<m-8;w++)this._buffer[w]=0;e.writeUint32BE(d,this._buffer,m-8),e.writeUint32BE(g,this._buffer,m-4),a(this._temp,this._state,this._buffer,0,m),this._finished=!0}for(var w=0;w<this.digestLength/4;w++)e.writeUint32BE(this._state[w],c,w*4);return this},s.prototype.digest=function(){var c=new Uint8Array(this.digestLength);return this.finish(c),c},s.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(c){return this._state.set(c.state),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(c){r.wipe(c.state),c.buffer&&r.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},s}();t.SHA256=n;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function a(s,c,u,f,d){for(;d>=64;){for(var g=c[0],m=c[1],w=c[2],v=c[3],y=c[4],_=c[5],b=c[6],S=c[7],x=0;x<16;x++){var I=f+x*4;s[x]=e.readUint32BE(u,I)}for(var x=16;x<64;x++){var E=s[x-2],p=(E>>>17|E<<32-17)^(E>>>19|E<<32-19)^E>>>10;E=s[x-15];var O=(E>>>7|E<<32-7)^(E>>>18|E<<32-18)^E>>>3;s[x]=(p+s[x-7]|0)+(O+s[x-16]|0)}for(var x=0;x<64;x++){var p=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&_^~y&b)|0)+(S+(i[x]+s[x]|0)|0)|0,O=((g>>>2|g<<32-2)^(g>>>13|g<<32-13)^(g>>>22|g<<32-22))+(g&m^g&w^m&w)|0;S=b,b=_,_=y,y=v+p|0,v=w,w=m,m=g,g=p+O|0}c[0]+=g,c[1]+=m,c[2]+=w,c[3]+=v,c[4]+=y,c[5]+=_,c[6]+=b,c[7]+=S,f+=64,d-=64}return f}function o(s){var c=new n;c.update(s);var u=c.digest();return c.clean(),u}t.hash=o})(yI);var Dk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sharedKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.scalarMultBase=t.scalarMult=t.SHARED_KEY_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=void 0;const e=dm,r=os;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function n(x){const I=new Float64Array(16);if(x)for(let E=0;E<x.length;E++)I[E]=x[E];return I}const i=new Uint8Array(32);i[0]=9;const a=n([56129,1]);function o(x){let I=1;for(let E=0;E<16;E++){let p=x[E]+I+65535;I=Math.floor(p/65536),x[E]=p-I*65536}x[0]+=I-1+37*(I-1)}function s(x,I,E){const p=~(E-1);for(let O=0;O<16;O++){const C=p&(x[O]^I[O]);x[O]^=C,I[O]^=C}}function c(x,I){const E=n(),p=n();for(let O=0;O<16;O++)p[O]=I[O];o(p),o(p),o(p);for(let O=0;O<2;O++){E[0]=p[0]-65517;for(let M=1;M<15;M++)E[M]=p[M]-65535-(E[M-1]>>16&1),E[M-1]&=65535;E[15]=p[15]-32767-(E[14]>>16&1);const C=E[15]>>16&1;E[14]&=65535,s(p,E,1-C)}for(let O=0;O<16;O++)x[2*O]=p[O]&255,x[2*O+1]=p[O]>>8}function u(x,I){for(let E=0;E<16;E++)x[E]=I[2*E]+(I[2*E+1]<<8);x[15]&=32767}function f(x,I,E){for(let p=0;p<16;p++)x[p]=I[p]+E[p]}function d(x,I,E){for(let p=0;p<16;p++)x[p]=I[p]-E[p]}function g(x,I,E){let p,O,C=0,M=0,B=0,ce=0,he=0,F=0,U=0,K=0,ne=0,j=0,q=0,V=0,$=0,H=0,L=0,k=0,G=0,ge=0,Q=0,te=0,ue=0,T=0,fe=0,Ge=0,tt=0,mt=0,vt=0,gt=0,Lt=0,Yt=0,_r=0,Rt=E[0],Pt=E[1],kt=E[2],Nt=E[3],Kt=E[4],Ut=E[5],Vt=E[6],$t=E[7],Dt=E[8],qt=E[9],Mt=E[10],cr=E[11],tr=E[12],ir=E[13],nr=E[14],vr=E[15];p=I[0],C+=p*Rt,M+=p*Pt,B+=p*kt,ce+=p*Nt,he+=p*Kt,F+=p*Ut,U+=p*Vt,K+=p*$t,ne+=p*Dt,j+=p*qt,q+=p*Mt,V+=p*cr,$+=p*tr,H+=p*ir,L+=p*nr,k+=p*vr,p=I[1],M+=p*Rt,B+=p*Pt,ce+=p*kt,he+=p*Nt,F+=p*Kt,U+=p*Ut,K+=p*Vt,ne+=p*$t,j+=p*Dt,q+=p*qt,V+=p*Mt,$+=p*cr,H+=p*tr,L+=p*ir,k+=p*nr,G+=p*vr,p=I[2],B+=p*Rt,ce+=p*Pt,he+=p*kt,F+=p*Nt,U+=p*Kt,K+=p*Ut,ne+=p*Vt,j+=p*$t,q+=p*Dt,V+=p*qt,$+=p*Mt,H+=p*cr,L+=p*tr,k+=p*ir,G+=p*nr,ge+=p*vr,p=I[3],ce+=p*Rt,he+=p*Pt,F+=p*kt,U+=p*Nt,K+=p*Kt,ne+=p*Ut,j+=p*Vt,q+=p*$t,V+=p*Dt,$+=p*qt,H+=p*Mt,L+=p*cr,k+=p*tr,G+=p*ir,ge+=p*nr,Q+=p*vr,p=I[4],he+=p*Rt,F+=p*Pt,U+=p*kt,K+=p*Nt,ne+=p*Kt,j+=p*Ut,q+=p*Vt,V+=p*$t,$+=p*Dt,H+=p*qt,L+=p*Mt,k+=p*cr,G+=p*tr,ge+=p*ir,Q+=p*nr,te+=p*vr,p=I[5],F+=p*Rt,U+=p*Pt,K+=p*kt,ne+=p*Nt,j+=p*Kt,q+=p*Ut,V+=p*Vt,$+=p*$t,H+=p*Dt,L+=p*qt,k+=p*Mt,G+=p*cr,ge+=p*tr,Q+=p*ir,te+=p*nr,ue+=p*vr,p=I[6],U+=p*Rt,K+=p*Pt,ne+=p*kt,j+=p*Nt,q+=p*Kt,V+=p*Ut,$+=p*Vt,H+=p*$t,L+=p*Dt,k+=p*qt,G+=p*Mt,ge+=p*cr,Q+=p*tr,te+=p*ir,ue+=p*nr,T+=p*vr,p=I[7],K+=p*Rt,ne+=p*Pt,j+=p*kt,q+=p*Nt,V+=p*Kt,$+=p*Ut,H+=p*Vt,L+=p*$t,k+=p*Dt,G+=p*qt,ge+=p*Mt,Q+=p*cr,te+=p*tr,ue+=p*ir,T+=p*nr,fe+=p*vr,p=I[8],ne+=p*Rt,j+=p*Pt,q+=p*kt,V+=p*Nt,$+=p*Kt,H+=p*Ut,L+=p*Vt,k+=p*$t,G+=p*Dt,ge+=p*qt,Q+=p*Mt,te+=p*cr,ue+=p*tr,T+=p*ir,fe+=p*nr,Ge+=p*vr,p=I[9],j+=p*Rt,q+=p*Pt,V+=p*kt,$+=p*Nt,H+=p*Kt,L+=p*Ut,k+=p*Vt,G+=p*$t,ge+=p*Dt,Q+=p*qt,te+=p*Mt,ue+=p*cr,T+=p*tr,fe+=p*ir,Ge+=p*nr,tt+=p*vr,p=I[10],q+=p*Rt,V+=p*Pt,$+=p*kt,H+=p*Nt,L+=p*Kt,k+=p*Ut,G+=p*Vt,ge+=p*$t,Q+=p*Dt,te+=p*qt,ue+=p*Mt,T+=p*cr,fe+=p*tr,Ge+=p*ir,tt+=p*nr,mt+=p*vr,p=I[11],V+=p*Rt,$+=p*Pt,H+=p*kt,L+=p*Nt,k+=p*Kt,G+=p*Ut,ge+=p*Vt,Q+=p*$t,te+=p*Dt,ue+=p*qt,T+=p*Mt,fe+=p*cr,Ge+=p*tr,tt+=p*ir,mt+=p*nr,vt+=p*vr,p=I[12],$+=p*Rt,H+=p*Pt,L+=p*kt,k+=p*Nt,G+=p*Kt,ge+=p*Ut,Q+=p*Vt,te+=p*$t,ue+=p*Dt,T+=p*qt,fe+=p*Mt,Ge+=p*cr,tt+=p*tr,mt+=p*ir,vt+=p*nr,gt+=p*vr,p=I[13],H+=p*Rt,L+=p*Pt,k+=p*kt,G+=p*Nt,ge+=p*Kt,Q+=p*Ut,te+=p*Vt,ue+=p*$t,T+=p*Dt,fe+=p*qt,Ge+=p*Mt,tt+=p*cr,mt+=p*tr,vt+=p*ir,gt+=p*nr,Lt+=p*vr,p=I[14],L+=p*Rt,k+=p*Pt,G+=p*kt,ge+=p*Nt,Q+=p*Kt,te+=p*Ut,ue+=p*Vt,T+=p*$t,fe+=p*Dt,Ge+=p*qt,tt+=p*Mt,mt+=p*cr,vt+=p*tr,gt+=p*ir,Lt+=p*nr,Yt+=p*vr,p=I[15],k+=p*Rt,G+=p*Pt,ge+=p*kt,Q+=p*Nt,te+=p*Kt,ue+=p*Ut,T+=p*Vt,fe+=p*$t,Ge+=p*Dt,tt+=p*qt,mt+=p*Mt,vt+=p*cr,gt+=p*tr,Lt+=p*ir,Yt+=p*nr,_r+=p*vr,C+=38*G,M+=38*ge,B+=38*Q,ce+=38*te,he+=38*ue,F+=38*T,U+=38*fe,K+=38*Ge,ne+=38*tt,j+=38*mt,q+=38*vt,V+=38*gt,$+=38*Lt,H+=38*Yt,L+=38*_r,O=1,p=C+O+65535,O=Math.floor(p/65536),C=p-O*65536,p=M+O+65535,O=Math.floor(p/65536),M=p-O*65536,p=B+O+65535,O=Math.floor(p/65536),B=p-O*65536,p=ce+O+65535,O=Math.floor(p/65536),ce=p-O*65536,p=he+O+65535,O=Math.floor(p/65536),he=p-O*65536,p=F+O+65535,O=Math.floor(p/65536),F=p-O*65536,p=U+O+65535,O=Math.floor(p/65536),U=p-O*65536,p=K+O+65535,O=Math.floor(p/65536),K=p-O*65536,p=ne+O+65535,O=Math.floor(p/65536),ne=p-O*65536,p=j+O+65535,O=Math.floor(p/65536),j=p-O*65536,p=q+O+65535,O=Math.floor(p/65536),q=p-O*65536,p=V+O+65535,O=Math.floor(p/65536),V=p-O*65536,p=$+O+65535,O=Math.floor(p/65536),$=p-O*65536,p=H+O+65535,O=Math.floor(p/65536),H=p-O*65536,p=L+O+65535,O=Math.floor(p/65536),L=p-O*65536,p=k+O+65535,O=Math.floor(p/65536),k=p-O*65536,C+=O-1+37*(O-1),O=1,p=C+O+65535,O=Math.floor(p/65536),C=p-O*65536,p=M+O+65535,O=Math.floor(p/65536),M=p-O*65536,p=B+O+65535,O=Math.floor(p/65536),B=p-O*65536,p=ce+O+65535,O=Math.floor(p/65536),ce=p-O*65536,p=he+O+65535,O=Math.floor(p/65536),he=p-O*65536,p=F+O+65535,O=Math.floor(p/65536),F=p-O*65536,p=U+O+65535,O=Math.floor(p/65536),U=p-O*65536,p=K+O+65535,O=Math.floor(p/65536),K=p-O*65536,p=ne+O+65535,O=Math.floor(p/65536),ne=p-O*65536,p=j+O+65535,O=Math.floor(p/65536),j=p-O*65536,p=q+O+65535,O=Math.floor(p/65536),q=p-O*65536,p=V+O+65535,O=Math.floor(p/65536),V=p-O*65536,p=$+O+65535,O=Math.floor(p/65536),$=p-O*65536,p=H+O+65535,O=Math.floor(p/65536),H=p-O*65536,p=L+O+65535,O=Math.floor(p/65536),L=p-O*65536,p=k+O+65535,O=Math.floor(p/65536),k=p-O*65536,C+=O-1+37*(O-1),x[0]=C,x[1]=M,x[2]=B,x[3]=ce,x[4]=he,x[5]=F,x[6]=U,x[7]=K,x[8]=ne,x[9]=j,x[10]=q,x[11]=V,x[12]=$,x[13]=H,x[14]=L,x[15]=k}function m(x,I){g(x,I,I)}function w(x,I){const E=n();for(let p=0;p<16;p++)E[p]=I[p];for(let p=253;p>=0;p--)m(E,E),p!==2&&p!==4&&g(E,E,I);for(let p=0;p<16;p++)x[p]=E[p]}function v(x,I){const E=new Uint8Array(32),p=new Float64Array(80),O=n(),C=n(),M=n(),B=n(),ce=n(),he=n();for(let ne=0;ne<31;ne++)E[ne]=x[ne];E[31]=x[31]&127|64,E[0]&=248,u(p,I);for(let ne=0;ne<16;ne++)C[ne]=p[ne];O[0]=B[0]=1;for(let ne=254;ne>=0;--ne){const j=E[ne>>>3]>>>(ne&7)&1;s(O,C,j),s(M,B,j),f(ce,O,M),d(O,O,M),f(M,C,B),d(C,C,B),m(B,ce),m(he,O),g(O,M,O),g(M,C,ce),f(ce,O,M),d(O,O,M),m(C,O),d(M,B,he),g(O,M,a),f(O,O,B),g(M,M,O),g(O,B,he),g(B,C,p),m(C,ce),s(O,C,j),s(M,B,j)}for(let ne=0;ne<16;ne++)p[ne+16]=O[ne],p[ne+32]=M[ne],p[ne+48]=C[ne],p[ne+64]=B[ne];const F=p.subarray(32),U=p.subarray(16);w(F,F),g(U,U,F);const K=new Uint8Array(32);return c(K,U),K}t.scalarMult=v;function y(x){return v(x,i)}t.scalarMultBase=y;function _(x){if(x.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const I=new Uint8Array(x);return{publicKey:y(I),secretKey:I}}t.generateKeyPairFromSeed=_;function b(x){const I=(0,e.randomBytes)(32,x),E=_(I);return(0,r.wipe)(I),E}t.generateKeyPair=b;function S(x,I,E=!1){if(x.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(I.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const p=v(x,I);if(E){let O=0;for(let C=0;C<p.length;C++)O|=p[C];if(O===0)throw new Error("X25519: invalid shared key")}return p}t.sharedKey=S})(Dk);function $k(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function goe(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?$k(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function b4(t,e){e||(e=t.reduce((i,a)=>i+a.length,0));const r=goe(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return $k(r)}function qDe(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var a=t.charAt(i),o=a.charCodeAt(0);if(r[o]!==255)throw new TypeError(a+" is ambiguous");r[o]=i}var s=t.length,c=t.charAt(0),u=Math.log(s)/Math.log(256),f=Math.log(256)/Math.log(s);function d(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var v=0,y=0,_=0,b=w.length;_!==b&&w[_]===0;)_++,v++;for(var S=(b-_)*f+1>>>0,x=new Uint8Array(S);_!==b;){for(var I=w[_],E=0,p=S-1;(I!==0||E<y)&&p!==-1;p--,E++)I+=256*x[p]>>>0,x[p]=I%s>>>0,I=I/s>>>0;if(I!==0)throw new Error("Non-zero carry");y=E,_++}for(var O=S-y;O!==S&&x[O]===0;)O++;for(var C=c.repeat(v);O<S;++O)C+=t.charAt(x[O]);return C}function g(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var v=0;if(w[v]!==" "){for(var y=0,_=0;w[v]===c;)y++,v++;for(var b=(w.length-v)*u+1>>>0,S=new Uint8Array(b);w[v];){var x=r[w.charCodeAt(v)];if(x===255)return;for(var I=0,E=b-1;(x!==0||I<_)&&E!==-1;E--,I++)x+=s*S[E]>>>0,S[E]=x%256>>>0,x=x/256>>>0;if(x!==0)throw new Error("Non-zero carry");_=I,v++}if(w[v]!==" "){for(var p=b-_;p!==b&&S[p]===0;)p++;for(var O=new Uint8Array(y+(b-p)),C=y;p!==b;)O[C++]=S[p++];return O}}}function m(w){var v=g(w);if(v)return v;throw new Error(`Non-${e} character`)}return{encode:d,decodeUnsafe:g,decode:m}}var HDe=qDe,VDe=HDe;const zDe=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},GDe=t=>new TextEncoder().encode(t),WDe=t=>new TextDecoder().decode(t);class KDe{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class YDe{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return yoe(this,e)}}class QDe{constructor(e){this.decoders=e}or(e){return yoe(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const yoe=(t,e)=>new QDe({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class JDe{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new KDe(e,r,n),this.decoder=new YDe(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const mI=({name:t,prefix:e,encode:r,decode:n})=>new JDe(t,e,r,n),Bw=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=VDe(r,e);return mI({prefix:t,name:e,encode:n,decode:a=>zDe(i(a))})},XDe=(t,e,r,n)=>{const i={};for(let f=0;f<e.length;++f)i[e[f]]=f;let a=t.length;for(;t[a-1]==="=";)--a;const o=new Uint8Array(a*r/8|0);let s=0,c=0,u=0;for(let f=0;f<a;++f){const d=i[t[f]];if(d===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|d,s+=r,s>=8&&(s-=8,o[u++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o},ZDe=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let a="",o=0,s=0;for(let c=0;c<t.length;++c)for(s=s<<8|t[c],o+=8;o>r;)o-=r,a+=e[i&s>>o];if(o&&(a+=e[i&s<<r-o]),n)for(;a.length*r&7;)a+="=";return a},ba=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>mI({prefix:e,name:t,encode(i){return ZDe(i,n,r)},decode(i){return XDe(i,n,r,t)}}),e$e=mI({prefix:"\0",name:"identity",encode:t=>WDe(t),decode:t=>GDe(t)}),t$e=Object.freeze(Object.defineProperty({__proto__:null,identity:e$e},Symbol.toStringTag,{value:"Module"})),r$e=ba({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),n$e=Object.freeze(Object.defineProperty({__proto__:null,base2:r$e},Symbol.toStringTag,{value:"Module"})),i$e=ba({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),a$e=Object.freeze(Object.defineProperty({__proto__:null,base8:i$e},Symbol.toStringTag,{value:"Module"})),o$e=Bw({prefix:"9",name:"base10",alphabet:"0123456789"}),s$e=Object.freeze(Object.defineProperty({__proto__:null,base10:o$e},Symbol.toStringTag,{value:"Module"})),c$e=ba({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),u$e=ba({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),l$e=Object.freeze(Object.defineProperty({__proto__:null,base16:c$e,base16upper:u$e},Symbol.toStringTag,{value:"Module"})),f$e=ba({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),d$e=ba({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),h$e=ba({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),p$e=ba({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),g$e=ba({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),y$e=ba({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),m$e=ba({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),v$e=ba({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),b$e=ba({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),w$e=Object.freeze(Object.defineProperty({__proto__:null,base32:f$e,base32hex:g$e,base32hexpad:m$e,base32hexpadupper:v$e,base32hexupper:y$e,base32pad:h$e,base32padupper:p$e,base32upper:d$e,base32z:b$e},Symbol.toStringTag,{value:"Module"})),_$e=Bw({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),E$e=Bw({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),x$e=Object.freeze(Object.defineProperty({__proto__:null,base36:_$e,base36upper:E$e},Symbol.toStringTag,{value:"Module"})),A$e=Bw({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),S$e=Bw({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),I$e=Object.freeze(Object.defineProperty({__proto__:null,base58btc:A$e,base58flickr:S$e},Symbol.toStringTag,{value:"Module"})),O$e=ba({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),P$e=ba({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),T$e=ba({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),R$e=ba({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),C$e=Object.freeze(Object.defineProperty({__proto__:null,base64:O$e,base64pad:P$e,base64url:T$e,base64urlpad:R$e},Symbol.toStringTag,{value:"Module"})),moe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),N$e=moe.reduce((t,e,r)=>(t[r]=e,t),[]),D$e=moe.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function $$e(t){return t.reduce((e,r)=>(e+=N$e[r],e),"")}function M$e(t){const e=[];for(const r of t){const n=D$e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const k$e=mI({prefix:"🚀",name:"base256emoji",encode:$$e,decode:M$e}),L$e=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:k$e},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const rK={...t$e,...n$e,...a$e,...s$e,...l$e,...w$e,...x$e,...I$e,...C$e,...L$e};function voe(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const nK=voe("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),SN=voe("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=goe(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),boe={utf8:nK,"utf-8":nK,hex:rK.base16,latin1:SN,ascii:SN,binary:SN,...rK};function No(t,e="utf8"){const r=boe[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?$k(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}function uo(t,e="utf8"){const r=boe[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}var iK=globalThis&&globalThis.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))},U$e=function(){function t(e,r,n){this.name=e,this.version=r,this.os=n,this.type="browser"}return t}(),B$e=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=Va.platform}return t}(),F$e=function(){function t(e,r,n,i){this.name=e,this.version=r,this.os=n,this.bot=i,this.type="bot-device"}return t}(),j$e=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),q$e=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),H$e=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,V$e=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,aK=3,z$e=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",H$e]],oK=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function G$e(t){return t?sK(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new q$e:typeof navigator<"u"?sK(navigator.userAgent):Y$e()}function W$e(t){return t!==""&&z$e.reduce(function(e,r){var n=r[0],i=r[1];if(e)return e;var a=i.exec(t);return!!a&&[n,a]},!1)}function sK(t){var e=W$e(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new j$e;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<aK&&(i=iK(iK([],i,!0),Q$e(aK-i.length),!0)):i=[];var a=i.join("."),o=K$e(t),s=V$e.exec(t);return s&&s[1]?new F$e(r,a,o,s[1]):new U$e(r,a,o)}function K$e(t){for(var e=0,r=oK.length;e<r;e++){var n=oK[e],i=n[0],a=n[1],o=a.exec(t);if(o)return i}return null}function Y$e(){var t=typeof Va<"u"&&Va.version;return t?new B$e(Va.version.slice(1)):null}function Q$e(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}var Xt={};/*! *****************************************************************************
|
|
122
|
-
Copyright (c) Microsoft Corporation.
|
|
123
|
-
|
|
124
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
125
|
-
purpose with or without fee is hereby granted.
|
|
126
|
-
|
|
127
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
128
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
129
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
130
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
131
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
132
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
133
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
134
|
-
***************************************************************************** */var w4=function(t,e){return w4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},w4(t,e)};function J$e(t,e){w4(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var _4=function(){return _4=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},_4.apply(this,arguments)};function X$e(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function Z$e(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function eMe(t,e){return function(r,n){e(r,n,t)}}function tMe(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function rMe(t,e,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(f){try{u(n.next(f))}catch(d){o(d)}}function c(f){try{u(n.throw(f))}catch(d){o(d)}}function u(f){f.done?a(f.value):i(f.value).then(s,c)}u((n=n.apply(t,e||[])).next())})}function nMe(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(f){return c([u,f])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(f){u=[6,f],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function iMe(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function aMe(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function E4(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function woe(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function oMe(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(woe(arguments[e]));return t}function sMe(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)n[i]=a[o];return n}function $1(t){return this instanceof $1?(this.v=t,this):new $1(t)}function cMe(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(g){n[g]&&(i[g]=function(m){return new Promise(function(w,v){a.push([g,m,w,v])>1||s(g,m)})})}function s(g,m){try{c(n[g](m))}catch(w){d(a[0][3],w)}}function c(g){g.value instanceof $1?Promise.resolve(g.value.v).then(u,f):d(a[0][2],g)}function u(g){s("next",g)}function f(g){s("throw",g)}function d(g,m){g(m),a.shift(),a.length&&s(a[0][0],a[0][1])}}function uMe(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,a){e[i]=t[i]?function(o){return(r=!r)?{value:$1(t[i](o)),done:i==="return"}:a?a(o):o}:a}}function lMe(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof E4=="function"?E4(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=t[a]&&function(o){return new Promise(function(s,c){o=t[a](o),i(s,c,o.done,o.value)})}}function i(a,o,s,c){Promise.resolve(c).then(function(u){a({value:u,done:s})},o)}}function fMe(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function dMe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function hMe(t){return t&&t.__esModule?t:{default:t}}function pMe(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function gMe(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const yMe=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return _4},__asyncDelegator:uMe,__asyncGenerator:cMe,__asyncValues:lMe,__await:$1,__awaiter:rMe,__classPrivateFieldGet:pMe,__classPrivateFieldSet:gMe,__createBinding:iMe,__decorate:Z$e,__exportStar:aMe,__extends:J$e,__generator:nMe,__importDefault:hMe,__importStar:dMe,__makeTemplateObject:fMe,__metadata:tMe,__param:eMe,__read:woe,__rest:X$e,__spread:oMe,__spreadArrays:sMe,__values:E4},Symbol.toStringTag,{value:"Module"})),ec=lo(yMe);var IN={},Cv={},cK;function mMe(){if(cK)return Cv;cK=1,Object.defineProperty(Cv,"__esModule",{value:!0}),Cv.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return Cv.delay=t,Cv}var nh={},ON={},ih={},uK;function vMe(){return uK||(uK=1,Object.defineProperty(ih,"__esModule",{value:!0}),ih.ONE_THOUSAND=ih.ONE_HUNDRED=void 0,ih.ONE_HUNDRED=100,ih.ONE_THOUSAND=1e3),ih}var PN={},lK;function bMe(){return lK||(lK=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=t.ONE_MINUTE*5,t.TEN_MINUTES=t.ONE_MINUTE*10,t.THIRTY_MINUTES=t.ONE_MINUTE*30,t.SIXTY_MINUTES=t.ONE_MINUTE*60,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=t.ONE_HOUR*3,t.SIX_HOURS=t.ONE_HOUR*6,t.TWELVE_HOURS=t.ONE_HOUR*12,t.TWENTY_FOUR_HOURS=t.ONE_HOUR*24,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=t.ONE_DAY*3,t.FIVE_DAYS=t.ONE_DAY*5,t.SEVEN_DAYS=t.ONE_DAY*7,t.THIRTY_DAYS=t.ONE_DAY*30,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=t.ONE_WEEK*2,t.THREE_WEEKS=t.ONE_WEEK*3,t.FOUR_WEEKS=t.ONE_WEEK*4,t.ONE_YEAR=t.ONE_DAY*365}(PN)),PN}var fK;function _oe(){return fK||(fK=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ec;e.__exportStar(vMe(),t),e.__exportStar(bMe(),t)}(ON)),ON}var dK;function wMe(){if(dK)return nh;dK=1,Object.defineProperty(nh,"__esModule",{value:!0}),nh.fromMiliseconds=nh.toMiliseconds=void 0;const t=_oe();function e(n){return n*t.ONE_THOUSAND}nh.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return nh.fromMiliseconds=r,nh}var hK;function _Me(){return hK||(hK=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ec;e.__exportStar(mMe(),t),e.__exportStar(wMe(),t)}(IN)),IN}var w0={},pK;function EMe(){if(pK)return w0;pK=1,Object.defineProperty(w0,"__esModule",{value:!0}),w0.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const i=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:i})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return w0.Watch=t,w0.default=t,w0}var TN={},Nv={},gK;function xMe(){if(gK)return Nv;gK=1,Object.defineProperty(Nv,"__esModule",{value:!0}),Nv.IWatch=void 0;class t{}return Nv.IWatch=t,Nv}var yK;function AMe(){return yK||(yK=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),ec.__exportStar(xMe(),t)}(TN)),TN}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ec;e.__exportStar(_Me(),t),e.__exportStar(EMe(),t),e.__exportStar(AMe(),t),e.__exportStar(_oe(),t)})(Xt);var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.getLocalStorage=Hn.getLocalStorageOrThrow=Hn.getCrypto=Hn.getCryptoOrThrow=xoe=Hn.getLocation=Hn.getLocationOrThrow=Mk=Hn.getNavigator=Hn.getNavigatorOrThrow=Eoe=Hn.getDocument=Hn.getDocumentOrThrow=Hn.getFromWindowOrThrow=Hn.getFromWindow=void 0;function Np(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}Hn.getFromWindow=Np;function hm(t){const e=Np(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}Hn.getFromWindowOrThrow=hm;function SMe(){return hm("document")}Hn.getDocumentOrThrow=SMe;function IMe(){return Np("document")}var Eoe=Hn.getDocument=IMe;function OMe(){return hm("navigator")}Hn.getNavigatorOrThrow=OMe;function PMe(){return Np("navigator")}var Mk=Hn.getNavigator=PMe;function TMe(){return hm("location")}Hn.getLocationOrThrow=TMe;function RMe(){return Np("location")}var xoe=Hn.getLocation=RMe;function CMe(){return hm("crypto")}Hn.getCryptoOrThrow=CMe;function NMe(){return Np("crypto")}Hn.getCrypto=NMe;function DMe(){return hm("localStorage")}Hn.getLocalStorageOrThrow=DMe;function $Me(){return Np("localStorage")}Hn.getLocalStorage=$Me;var kk={};Object.defineProperty(kk,"__esModule",{value:!0});var Aoe=kk.getWindowMetadata=void 0;const mK=Hn;function MMe(){let t,e;try{t=mK.getDocumentOrThrow(),e=mK.getLocationOrThrow()}catch{return null}function r(){const d=t.getElementsByTagName("link"),g=[];for(let m=0;m<d.length;m++){const w=d[m],v=w.getAttribute("rel");if(v&&v.toLowerCase().indexOf("icon")>-1){const y=w.getAttribute("href");if(y)if(y.toLowerCase().indexOf("https:")===-1&&y.toLowerCase().indexOf("http:")===-1&&y.indexOf("//")!==0){let _=e.protocol+"//"+e.host;if(y.indexOf("/")===0)_+=y;else{const b=e.pathname.split("/");b.pop();const S=b.join("/");_+=S+"/"+y}g.push(_)}else if(y.indexOf("//")===0){const _=e.protocol+y;g.push(_)}else g.push(y)}}return g}function n(...d){const g=t.getElementsByTagName("meta");for(let m=0;m<g.length;m++){const w=g[m],v=["itemprop","property","name"].map(y=>w.getAttribute(y)).filter(y=>y?d.includes(y):!1);if(v.length&&v){const y=w.getAttribute("content");if(y)return y}}return""}function i(){let d=n("name","og:site_name","og:title","twitter:title");return d||(d=t.title),d}function a(){return n("description","og:description","twitter:description","keywords")}const o=i(),s=a(),c=e.origin,u=r();return{description:s,url:c,icons:u,name:o}}Aoe=kk.getWindowMetadata=MMe;var M1={},kMe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Soe="%[a-f0-9]{2}",vK=new RegExp("("+Soe+")|([^%]+?)","gi"),bK=new RegExp("("+Soe+")+","gi");function x4(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],x4(r),x4(n))}function LMe(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(vK)||[],r=1;r<e.length;r++)t=x4(e,r).join(""),e=t.match(vK)||[];return t}}function UMe(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},r=bK.exec(t);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch{var n=LMe(r[0]);n!==r[0]&&(e[r[0]]=n)}r=bK.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),a=0;a<i.length;a++){var o=i[a];t=t.replace(new RegExp(o,"g"),e[o])}return t}var BMe=function(t){if(typeof t!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch{return UMe(t)}},FMe=(t,e)=>{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];const r=t.indexOf(e);return r===-1?[t]:[t.slice(0,r),t.slice(r+e.length)]},jMe=function(t,e){for(var r={},n=Object.keys(t),i=Array.isArray(e),a=0;a<n.length;a++){var o=n[a],s=t[o];(i?e.indexOf(o)!==-1:e(o,s,t))&&(r[o]=s)}return r};(function(t){const e=kMe,r=BMe,n=FMe,i=jMe,a=b=>b==null,o=Symbol("encodeFragmentIdentifier");function s(b){switch(b.arrayFormat){case"index":return S=>(x,I)=>{const E=x.length;return I===void 0||b.skipNull&&I===null||b.skipEmptyString&&I===""?x:I===null?[...x,[f(S,b),"[",E,"]"].join("")]:[...x,[f(S,b),"[",f(E,b),"]=",f(I,b)].join("")]};case"bracket":return S=>(x,I)=>I===void 0||b.skipNull&&I===null||b.skipEmptyString&&I===""?x:I===null?[...x,[f(S,b),"[]"].join("")]:[...x,[f(S,b),"[]=",f(I,b)].join("")];case"colon-list-separator":return S=>(x,I)=>I===void 0||b.skipNull&&I===null||b.skipEmptyString&&I===""?x:I===null?[...x,[f(S,b),":list="].join("")]:[...x,[f(S,b),":list=",f(I,b)].join("")];case"comma":case"separator":case"bracket-separator":{const S=b.arrayFormat==="bracket-separator"?"[]=":"=";return x=>(I,E)=>E===void 0||b.skipNull&&E===null||b.skipEmptyString&&E===""?I:(E=E===null?"":E,I.length===0?[[f(x,b),S,f(E,b)].join("")]:[[I,f(E,b)].join(b.arrayFormatSeparator)])}default:return S=>(x,I)=>I===void 0||b.skipNull&&I===null||b.skipEmptyString&&I===""?x:I===null?[...x,f(S,b)]:[...x,[f(S,b),"=",f(I,b)].join("")]}}function c(b){let S;switch(b.arrayFormat){case"index":return(x,I,E)=>{if(S=/\[(\d*)\]$/.exec(x),x=x.replace(/\[\d*\]$/,""),!S){E[x]=I;return}E[x]===void 0&&(E[x]={}),E[x][S[1]]=I};case"bracket":return(x,I,E)=>{if(S=/(\[\])$/.exec(x),x=x.replace(/\[\]$/,""),!S){E[x]=I;return}if(E[x]===void 0){E[x]=[I];return}E[x]=[].concat(E[x],I)};case"colon-list-separator":return(x,I,E)=>{if(S=/(:list)$/.exec(x),x=x.replace(/:list$/,""),!S){E[x]=I;return}if(E[x]===void 0){E[x]=[I];return}E[x]=[].concat(E[x],I)};case"comma":case"separator":return(x,I,E)=>{const p=typeof I=="string"&&I.includes(b.arrayFormatSeparator),O=typeof I=="string"&&!p&&d(I,b).includes(b.arrayFormatSeparator);I=O?d(I,b):I;const C=p||O?I.split(b.arrayFormatSeparator).map(M=>d(M,b)):I===null?I:d(I,b);E[x]=C};case"bracket-separator":return(x,I,E)=>{const p=/(\[\])$/.test(x);if(x=x.replace(/\[\]$/,""),!p){E[x]=I&&d(I,b);return}const O=I===null?[]:I.split(b.arrayFormatSeparator).map(C=>d(C,b));if(E[x]===void 0){E[x]=O;return}E[x]=[].concat(E[x],O)};default:return(x,I,E)=>{if(E[x]===void 0){E[x]=I;return}E[x]=[].concat(E[x],I)}}}function u(b){if(typeof b!="string"||b.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function f(b,S){return S.encode?S.strict?e(b):encodeURIComponent(b):b}function d(b,S){return S.decode?r(b):b}function g(b){return Array.isArray(b)?b.sort():typeof b=="object"?g(Object.keys(b)).sort((S,x)=>Number(S)-Number(x)).map(S=>b[S]):b}function m(b){const S=b.indexOf("#");return S!==-1&&(b=b.slice(0,S)),b}function w(b){let S="";const x=b.indexOf("#");return x!==-1&&(S=b.slice(x)),S}function v(b){b=m(b);const S=b.indexOf("?");return S===-1?"":b.slice(S+1)}function y(b,S){return S.parseNumbers&&!Number.isNaN(Number(b))&&typeof b=="string"&&b.trim()!==""?b=Number(b):S.parseBooleans&&b!==null&&(b.toLowerCase()==="true"||b.toLowerCase()==="false")&&(b=b.toLowerCase()==="true"),b}function _(b,S){S=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},S),u(S.arrayFormatSeparator);const x=c(S),I=Object.create(null);if(typeof b!="string"||(b=b.trim().replace(/^[?#&]/,""),!b))return I;for(const E of b.split("&")){if(E==="")continue;let[p,O]=n(S.decode?E.replace(/\+/g," "):E,"=");O=O===void 0?null:["comma","separator","bracket-separator"].includes(S.arrayFormat)?O:d(O,S),x(d(p,S),O,I)}for(const E of Object.keys(I)){const p=I[E];if(typeof p=="object"&&p!==null)for(const O of Object.keys(p))p[O]=y(p[O],S);else I[E]=y(p,S)}return S.sort===!1?I:(S.sort===!0?Object.keys(I).sort():Object.keys(I).sort(S.sort)).reduce((E,p)=>{const O=I[p];return O&&typeof O=="object"&&!Array.isArray(O)?E[p]=g(O):E[p]=O,E},Object.create(null))}t.extract=v,t.parse=_,t.stringify=(b,S)=>{if(!b)return"";S=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},S),u(S.arrayFormatSeparator);const x=O=>S.skipNull&&a(b[O])||S.skipEmptyString&&b[O]==="",I=s(S),E={};for(const O of Object.keys(b))x(O)||(E[O]=b[O]);const p=Object.keys(E);return S.sort!==!1&&p.sort(S.sort),p.map(O=>{const C=b[O];return C===void 0?"":C===null?f(O,S):Array.isArray(C)?C.length===0&&S.arrayFormat==="bracket-separator"?f(O,S)+"[]":C.reduce(I(O),[]).join("&"):f(O,S)+"="+f(C,S)}).filter(O=>O.length>0).join("&")},t.parseUrl=(b,S)=>{S=Object.assign({decode:!0},S);const[x,I]=n(b,"#");return Object.assign({url:x.split("?")[0]||"",query:_(v(b),S)},S&&S.parseFragmentIdentifier&&I?{fragmentIdentifier:d(I,S)}:{})},t.stringifyUrl=(b,S)=>{S=Object.assign({encode:!0,strict:!0,[o]:!0},S);const x=m(b.url).split("?")[0]||"",I=t.extract(b.url),E=t.parse(I,{sort:!1}),p=Object.assign(E,b.query);let O=t.stringify(p,S);O&&(O=`?${O}`);let C=w(b.url);return b.fragmentIdentifier&&(C=`#${S[o]?f(b.fragmentIdentifier,S):b.fragmentIdentifier}`),`${x}${O}${C}`},t.pick=(b,S,x)=>{x=Object.assign({parseFragmentIdentifier:!0,[o]:!1},x);const{url:I,query:E,fragmentIdentifier:p}=t.parseUrl(b,x);return t.stringifyUrl({url:I,query:i(E,S),fragmentIdentifier:p},x)},t.exclude=(b,S,x)=>{const I=Array.isArray(S)?E=>!S.includes(E):(E,p)=>!S(E,p);return t.pick(b,I,x)}})(M1);const qMe={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}},HMe=":";function VMe(t){const[e,r]=t.split(HMe);return{namespace:e,reference:r}}function zMe(t,e=[]){const r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;const i=t[n];r.push(...i.accounts)}),r}function Ioe(t,e){return t.includes(":")?[t]:e.chains||[]}const Ooe="base10",co="base16",A4="base64pad",Lk="utf8",Poe=0,Dp=1,GMe=0,wK=1,S4=12,Uk=32;function WMe(){const t=Dk.generateKeyPair();return{privateKey:uo(t.secretKey,co),publicKey:uo(t.publicKey,co)}}function I4(){const t=dm.randomBytes(Uk);return uo(t,co)}function KMe(t,e){const r=Dk.sharedKey(No(t,co),No(e,co),!0),n=new MDe(yI.SHA256,r).expand(Uk);return uo(n,co)}function YMe(t){const e=yI.hash(No(t,co));return uo(e,co)}function wg(t){const e=yI.hash(No(t,Lk));return uo(e,co)}function QMe(t){return No(`${t}`,Ooe)}function Fw(t){return Number(uo(t,Ooe))}function JMe(t){const e=QMe(typeof t.type<"u"?t.type:Poe);if(Fw(e)===Dp&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?No(t.senderPublicKey,co):void 0,n=typeof t.iv<"u"?No(t.iv,co):dm.randomBytes(S4),i=new Ck.ChaCha20Poly1305(No(t.symKey,co)).seal(n,No(t.message,Lk));return ZMe({type:e,sealed:i,iv:n,senderPublicKey:r})}function XMe(t){const e=new Ck.ChaCha20Poly1305(No(t.symKey,co)),{sealed:r,iv:n}=XA(t.encoded),i=e.open(n,r);if(i===null)throw new Error("Failed to decrypt");return uo(i,Lk)}function ZMe(t){if(Fw(t.type)===Dp){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return uo(b4([t.type,t.senderPublicKey,t.iv,t.sealed]),A4)}return uo(b4([t.type,t.iv,t.sealed]),A4)}function XA(t){const e=No(t,A4),r=e.slice(GMe,wK),n=wK;if(Fw(r)===Dp){const s=n+Uk,c=s+S4,u=e.slice(n,s),f=e.slice(s,c),d=e.slice(c);return{type:r,sealed:d,iv:f,senderPublicKey:u}}const i=n+S4,a=e.slice(n,i),o=e.slice(i);return{type:r,sealed:o,iv:a}}function eke(t,e){const r=XA(t);return Toe({type:Fw(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?uo(r.senderPublicKey,co):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function Toe(t){const e=(t==null?void 0:t.type)||Poe;if(e===Dp){if(typeof(t==null?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(t==null?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t==null?void 0:t.senderPublicKey,receiverPublicKey:t==null?void 0:t.receiverPublicKey}}function _K(t){return t.type===Dp&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var tke=Object.defineProperty,EK=Object.getOwnPropertySymbols,rke=Object.prototype.hasOwnProperty,nke=Object.prototype.propertyIsEnumerable,xK=(t,e,r)=>e in t?tke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,AK=(t,e)=>{for(var r in e||(e={}))rke.call(e,r)&&xK(t,r,e[r]);if(EK)for(var r of EK(e))nke.call(e,r)&&xK(t,r,e[r]);return t};const ike="ReactNative",es={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},ake="js";function Bk(){return typeof Va<"u"&&typeof Va.versions<"u"&&typeof Va.versions.node<"u"}function jw(){return!Eoe()&&!!Mk()&&navigator.product===ike}function qw(){return!Bk()&&!!Mk()}function Hw(){return jw()?es.reactNative:Bk()?es.node:qw()?es.browser:es.unknown}function oke(t,e){let r=M1.parse(t);return r=AK(AK({},r),e),t=M1.stringify(r),t}function ske(){return Aoe()||{name:"",description:"",url:"",icons:[""]}}function cke(){if(Hw()===es.reactNative&&typeof bn<"u"&&typeof(bn==null?void 0:bn.Platform)<"u"){const{OS:r,Version:n}=bn.Platform;return[r,n].join("-")}const t=G$e();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function uke(){var t;const e=Hw();return e===es.browser?[e,((t=xoe())==null?void 0:t.host)||"unknown"].join(":"):e}function lke(t,e,r){const n=cke(),i=uke();return[[t,e].join("-"),[ake,r].join("-"),n,i].join("/")}function fke({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:a,useOnCloseEvent:o}){const s=r.split("?"),c=lke(t,e,n),u={auth:i,ua:c,projectId:a,useOnCloseEvent:o||void 0},f=oke(s[1]||"",u);return s[0]+"?"+f}function Oh(t,e){return t.filter(r=>e.includes(r)).length===t.length}function Roe(t){return Object.fromEntries(t.entries())}function Coe(t){return new Map(Object.entries(t))}function k0(t=Xt.FIVE_MINUTES,e){const r=Xt.toMiliseconds(t||Xt.FIVE_MINUTES);let n,i,a;return{resolve:o=>{a&&n&&(clearTimeout(a),n(o))},reject:o=>{a&&i&&(clearTimeout(a),i(o))},done:()=>new Promise((o,s)=>{a=setTimeout(()=>{s(new Error(e))},r),n=o,i=s})}}function k1(t,e,r){return new Promise(async(n,i)=>{const a=setTimeout(()=>i(new Error(r)),e);try{const o=await t;n(o)}catch(o){i(o)}clearTimeout(a)})}function Noe(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function dke(t){return Noe("topic",t)}function hke(t){return Noe("id",t)}function Doe(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function Ec(t,e){return Xt.fromMiliseconds((e||Date.now())+Xt.toMiliseconds(t))}function xf(t){return Date.now()>=Xt.toMiliseconds(t)}function Ri(t,e){return`${t}${e?`:${e}`:""}`}function RN(t=[],e=[]){return[...new Set([...t,...e])]}async function pke({id:t,topic:e,wcDeepLink:r}){try{if(!r)return;const n=typeof r=="string"?JSON.parse(r):r;let i=n==null?void 0:n.href;if(typeof i!="string")return;i.endsWith("/")&&(i=i.slice(0,-1));const a=`${i}/wc?requestId=${t}&sessionTopic=${e}`,o=Hw();o===es.browser?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):o===es.reactNative&&typeof(bn==null?void 0:bn.Linking)<"u"&&await bn.Linking.openURL(a)}catch(n){console.error(n)}}const gke="irn";function O4(t){return(t==null?void 0:t.relay)||{protocol:gke}}function kx(t){const e=qMe[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var yke=Object.defineProperty,SK=Object.getOwnPropertySymbols,mke=Object.prototype.hasOwnProperty,vke=Object.prototype.propertyIsEnumerable,IK=(t,e,r)=>e in t?yke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,bke=(t,e)=>{for(var r in e||(e={}))mke.call(e,r)&&IK(t,r,e[r]);if(SK)for(var r of SK(e))vke.call(e,r)&&IK(t,r,e[r]);return t};function wke(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){const a=i.replace(n,""),o=t[i];r[a]=o}}),r}function _ke(t){t=t.includes("wc://")?t.replace("wc://",""):t,t=t.includes("wc:")?t.replace("wc:",""):t;const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),a=typeof r<"u"?t.substring(r):"",o=M1.parse(a);return{protocol:n,topic:Eke(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:wke(o)}}function Eke(t){return t.startsWith("//")?t.substring(2):t}function xke(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(i=>{const a=r+e+i;t[i]&&(n[a]=t[i])}),n}function Ake(t){return`${t.protocol}:${t.topic}@${t.version}?`+M1.stringify(bke({symKey:t.symKey},xke(t.relay)))}function pm(t){const e=[];return t.forEach(r=>{const[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function Ske(t){const e=[];return Object.values(t).forEach(r=>{e.push(...pm(r.accounts))}),e}function Ike(t,e){const r=[];return Object.values(t).forEach(n=>{pm(n.accounts).includes(e)&&r.push(...n.methods)}),r}function Oke(t,e){const r=[];return Object.values(t).forEach(n=>{pm(n.accounts).includes(e)&&r.push(...n.events)}),r}function Pke(t,e){const r=Lx(t,e);if(r)throw new Error(r.message);const n={};for(const[i,a]of Object.entries(t))n[i]={methods:a.methods,events:a.events,chains:a.accounts.map(o=>`${o.split(":")[0]}:${o.split(":")[1]}`)};return n}function Fk(t){return t.includes(":")}function _b(t){return Fk(t)?t.split(":")[0]:t}const Tke={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Rke={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Tt(t,e){const{message:r,code:n}=Rke[t];return{message:e?`${r} ${e}`:r,code:n}}function xi(t,e){const{message:r,code:n}=Tke[t];return{message:e?`${r} ${e}`:r,code:n}}function Su(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function _g(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function no(t){return typeof t>"u"}function Qi(t,e){return e&&no(t)?!0:typeof t=="string"&&!!t.trim().length}function jk(t,e){return e&&no(t)?!0:typeof t=="number"&&!isNaN(t)}function Cke(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let a=!0;return Oh(i,n)?(n.forEach(o=>{const{accounts:s,methods:c,events:u}=t.namespaces[o],f=pm(s),d=r[o];(!Oh(Ioe(o,d),f)||!Oh(d.methods,c)||!Oh(d.events,u))&&(a=!1)}),a):!1}function ZA(t){return Qi(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function Nke(t){if(Qi(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&ZA(r)}}return!1}function Dke(t){if(Qi(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function $ke(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function Mke(t){return t==null?void 0:t.topic}function kke(t,e){let r=null;return Qi(t==null?void 0:t.publicKey,!1)||(r=Tt("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function OK(t){let e=!0;return Su(t)?t.length&&(e=t.every(r=>Qi(r,!1))):e=!1,e}function Lke(t,e,r){let n=null;return Su(e)&&e.length?e.forEach(i=>{n||ZA(i)||(n=xi("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):ZA(t)||(n=xi("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function Uke(t,e,r){let n=null;return Object.entries(t).forEach(([i,a])=>{if(n)return;const o=Lke(i,Ioe(i,a),`${e} ${r}`);o&&(n=o)}),n}function Bke(t,e){let r=null;return Su(t)?t.forEach(n=>{r||Nke(n)||(r=xi("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=xi("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function Fke(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=Bke(n==null?void 0:n.accounts,`${e} namespace`);i&&(r=i)}),r}function jke(t,e){let r=null;return OK(t==null?void 0:t.methods)?OK(t==null?void 0:t.events)||(r=xi("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=xi("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function $oe(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=jke(n,`${e}, namespace`);i&&(r=i)}),r}function qke(t,e,r){let n=null;if(t&&_g(t)){const i=$oe(t,e);i&&(n=i);const a=Uke(t,e,r);a&&(n=a)}else n=Tt("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function Lx(t,e){let r=null;if(t&&_g(t)){const n=$oe(t,e);n&&(r=n);const i=Fke(t,e);i&&(r=i)}else r=Tt("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function Moe(t){return Qi(t.protocol,!0)}function Hke(t,e){let r=!1;return e&&!t?r=!0:t&&Su(t)&&t.length&&t.forEach(n=>{r=Moe(n)}),r}function Vke(t){return typeof t=="number"}function Eo(t){return typeof t<"u"&&typeof t!==null}function zke(t){return!(!t||typeof t!="object"||!t.code||!jk(t.code,!1)||!t.message||!Qi(t.message,!1))}function Gke(t){return!(no(t)||!Qi(t.method,!1))}function Wke(t){return!(no(t)||no(t.result)&&no(t.error)||!jk(t.id,!1)||!Qi(t.jsonrpc,!1))}function Kke(t){return!(no(t)||!Qi(t.name,!1))}function PK(t,e){return!(!ZA(e)||!Ske(t).includes(e))}function Yke(t,e,r){return Qi(r,!1)?Ike(t,e).includes(r):!1}function Qke(t,e,r){return Qi(r,!1)?Oke(t,e).includes(r):!1}function TK(t,e,r){let n=null;const i=Jke(t),a=Xke(e),o=Object.keys(i),s=Object.keys(a),c=RK(Object.keys(t)),u=RK(Object.keys(e)),f=c.filter(d=>!u.includes(d));return f.length&&(n=Tt("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.
|
|
135
|
-
Required: ${f.toString()}
|
|
136
|
-
Received: ${Object.keys(e).toString()}`)),Oh(o,s)||(n=Tt("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.
|
|
137
|
-
Required: ${o.toString()}
|
|
138
|
-
Approved: ${s.toString()}`)),Object.keys(e).forEach(d=>{if(!d.includes(":")||n)return;const g=pm(e[d].accounts);g.includes(d)||(n=Tt("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${d}
|
|
139
|
-
Required: ${d}
|
|
140
|
-
Approved: ${g.toString()}`))}),o.forEach(d=>{n||(Oh(i[d].methods,a[d].methods)?Oh(i[d].events,a[d].events)||(n=Tt("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${d}`)):n=Tt("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${d}`))}),n}function Jke(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(i=>{e[i]={methods:t[r].methods,events:t[r].events}})}),e}function RK(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function Xke(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=pm(t[r].accounts);n==null||n.forEach(i=>{e[i]={accounts:t[r].accounts.filter(a=>a.includes(`${i}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function Zke(t,e){return jk(t,!1)&&t<=e.max&&t>=e.min}function CK(){const t=Hw();return new Promise(e=>{switch(t){case es.browser:e(eLe());break;case es.reactNative:e(tLe());break;case es.node:e(rLe());break;default:e(!0)}})}function eLe(){return qw()&&(navigator==null?void 0:navigator.onLine)}async function tLe(){if(jw()&&typeof bn<"u"&&bn!=null&&bn.NetInfo){const t=await(bn==null?void 0:bn.NetInfo.fetch());return t==null?void 0:t.isConnected}return!0}function rLe(){return!0}function nLe(t){switch(Hw()){case es.browser:iLe(t);break;case es.reactNative:aLe(t);break}}function iLe(t){!jw()&&qw()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}function aLe(t){jw()&&typeof bn<"u"&&bn!=null&&bn.NetInfo&&(bn==null||bn.NetInfo.addEventListener(e=>t(e==null?void 0:e.isConnected)))}const CN={};let PE=class{static get(e){return CN[e]}static set(e,r){CN[e]=r}static delete(e){delete CN[e]}};var vI={},Vw={};Object.defineProperty(Vw,"__esModule",{value:!0});function oLe(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return JSON.parse(t)}catch{return t}}Vw.safeJsonParse=oLe;function sLe(t){return typeof t=="string"?t:JSON.stringify(t,(e,r)=>typeof r>"u"?null:r)}Vw.safeJsonStringify=sLe;var Dv={exports:{}},NK;function cLe(){return NK||(NK=1,function(){let t;function e(){}t=e,t.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},t.prototype.setItem=function(r,n){this[r]=String(n)},t.prototype.removeItem=function(r){delete this[r]},t.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},t.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Ne<"u"&&Ne.localStorage?Dv.exports=Ne.localStorage:typeof window<"u"&&window.localStorage?Dv.exports=window.localStorage:Dv.exports=new e}()),Dv.exports}var NN={},$v={},DK;function uLe(){if(DK)return $v;DK=1,Object.defineProperty($v,"__esModule",{value:!0}),$v.IKeyValueStorage=void 0;class t{}return $v.IKeyValueStorage=t,$v}var Mv={},$K;function lLe(){if($K)return Mv;$K=1,Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.parseEntry=void 0;const t=Vw;function e(r){var n;return[r[0],t.safeJsonParse((n=r[1])!==null&&n!==void 0?n:"")]}return Mv.parseEntry=e,Mv}var MK;function fLe(){return MK||(MK=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ec;e.__exportStar(uLe(),t),e.__exportStar(lLe(),t)}(NN)),NN}Object.defineProperty(vI,"__esModule",{value:!0});vI.KeyValueStorage=void 0;const L0=ec,kK=Vw,dLe=L0.__importDefault(cLe()),hLe=fLe();class koe{constructor(){this.localStorage=dLe.default}getKeys(){return L0.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return L0.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(hLe.parseEntry)})}getItem(e){return L0.__awaiter(this,void 0,void 0,function*(){const r=this.localStorage.getItem(e);if(r!==null)return kK.safeJsonParse(r)})}setItem(e,r){return L0.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(e,kK.safeJsonStringify(r))})}removeItem(e){return L0.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(e)})}}vI.KeyValueStorage=koe;var pLe=vI.default=koe,gm={},kv={},DN={},Lv={};let $p=class{};const gLe=Object.freeze(Object.defineProperty({__proto__:null,IEvents:$p},Symbol.toStringTag,{value:"Module"})),yLe=lo(gLe);var LK;function mLe(){if(LK)return Lv;LK=1,Object.defineProperty(Lv,"__esModule",{value:!0}),Lv.IHeartBeat=void 0;const t=yLe;class e extends t.IEvents{constructor(n){super()}}return Lv.IHeartBeat=e,Lv}var UK;function Loe(){return UK||(UK=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),ec.__exportStar(mLe(),t)}(DN)),DN}var $N={},ah={},BK;function vLe(){if(BK)return ah;BK=1,Object.defineProperty(ah,"__esModule",{value:!0}),ah.HEARTBEAT_EVENTS=ah.HEARTBEAT_INTERVAL=void 0;const t=Xt;return ah.HEARTBEAT_INTERVAL=t.FIVE_SECONDS,ah.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},ah}var FK;function Uoe(){return FK||(FK=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),ec.__exportStar(vLe(),t)}($N)),$N}var jK;function bLe(){if(jK)return kv;jK=1,Object.defineProperty(kv,"__esModule",{value:!0}),kv.HeartBeat=void 0;const t=ec,e=ho,r=Xt,n=Loe(),i=Uoe();class a extends n.IHeartBeat{constructor(s){super(s),this.events=new e.EventEmitter,this.interval=i.HEARTBEAT_INTERVAL,this.interval=(s==null?void 0:s.interval)||i.HEARTBEAT_INTERVAL}static init(s){return t.__awaiter(this,void 0,void 0,function*(){const c=new a(s);return yield c.init(),c})}init(){return t.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(s,c){this.events.on(s,c)}once(s,c){this.events.once(s,c)}off(s,c){this.events.off(s,c)}removeListener(s,c){this.events.removeListener(s,c)}initialize(){return t.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),r.toMiliseconds(this.interval))})}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return kv.HeartBeat=a,kv}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ec;e.__exportStar(bLe(),t),e.__exportStar(Loe(),t),e.__exportStar(Uoe(),t)})(gm);var un={},MN,qK;function wLe(){if(qK)return MN;qK=1;function t(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}MN=e;function e(r,n,i){var a=i&&i.stringify||t,o=1;if(typeof r=="object"&&r!==null){var s=n.length+o;if(s===1)return r;var c=new Array(s);c[0]=a(r);for(var u=1;u<s;u++)c[u]=a(n[u]);return c.join(" ")}if(typeof r!="string")return r;var f=n.length;if(f===0)return r;for(var d="",g=1-o,m=-1,w=r&&r.length||0,v=0;v<w;){if(r.charCodeAt(v)===37&&v+1<w){switch(m=m>-1?m:0,r.charCodeAt(v+1)){case 100:case 102:if(g>=f||n[g]==null)break;m<v&&(d+=r.slice(m,v)),d+=Number(n[g]),m=v+2,v++;break;case 105:if(g>=f||n[g]==null)break;m<v&&(d+=r.slice(m,v)),d+=Math.floor(Number(n[g])),m=v+2,v++;break;case 79:case 111:case 106:if(g>=f||n[g]===void 0)break;m<v&&(d+=r.slice(m,v));var y=typeof n[g];if(y==="string"){d+="'"+n[g]+"'",m=v+2,v++;break}if(y==="function"){d+=n[g].name||"<anonymous>",m=v+2,v++;break}d+=a(n[g]),m=v+2,v++;break;case 115:if(g>=f)break;m<v&&(d+=r.slice(m,v)),d+=String(n[g]),m=v+2,v++;break;case 37:m<v&&(d+=r.slice(m,v)),d+="%",m=v+2,v++,g--;break}++g}++v}return m===-1?r:(m<w&&(d+=r.slice(m)),d)}return MN}var kN,HK;function _Le(){if(HK)return kN;HK=1;const t=wLe();kN=i;const e=I().console||{},r={mapHttpRequest:w,mapHttpResponse:w,wrapRequestSerializer:v,wrapResponseSerializer:v,wrapErrorSerializer:v,req:w,res:w,err:g};function n(E,p){return Array.isArray(E)?E.filter(function(C){return C!=="!stdSerializers.err"}):E===!0?Object.keys(p):!1}function i(E){E=E||{},E.browser=E.browser||{};const p=E.browser.transmit;if(p&&typeof p.send!="function")throw Error("pino: transmit option must have a send function");const O=E.browser.write||e;E.browser.write&&(E.browser.asObject=!0);const C=E.serializers||{},M=n(E.browser.serialize,C);let B=E.browser.serialize;Array.isArray(E.browser.serialize)&&E.browser.serialize.indexOf("!stdSerializers.err")>-1&&(B=!1);const ce=["error","fatal","warn","info","debug","trace"];typeof O=="function"&&(O.error=O.fatal=O.warn=O.info=O.debug=O.trace=O),E.enabled===!1&&(E.level="silent");const he=E.level||"info",F=Object.create(O);F.log||(F.log=y),Object.defineProperty(F,"levelVal",{get:K}),Object.defineProperty(F,"level",{get:ne,set:j});const U={transmit:p,serialize:M,asObject:E.browser.asObject,levels:ce,timestamp:m(E)};F.levels=i.levels,F.level=he,F.setMaxListeners=F.getMaxListeners=F.emit=F.addListener=F.on=F.prependListener=F.once=F.prependOnceListener=F.removeListener=F.removeAllListeners=F.listeners=F.listenerCount=F.eventNames=F.write=F.flush=y,F.serializers=C,F._serialize=M,F._stdErrSerialize=B,F.child=q,p&&(F._logEvent=d());function K(){return this.level==="silent"?1/0:this.levels.values[this.level]}function ne(){return this._level}function j(V){if(V!=="silent"&&!this.levels.values[V])throw Error("unknown level "+V);this._level=V,a(U,F,"error","log"),a(U,F,"fatal","error"),a(U,F,"warn","error"),a(U,F,"info","log"),a(U,F,"debug","log"),a(U,F,"trace","log")}function q(V,$){if(!V)throw new Error("missing bindings for child Pino");$=$||{},M&&V.serializers&&($.serializers=V.serializers);const H=$.serializers;if(M&&H){var L=Object.assign({},C,H),k=E.browser.serialize===!0?Object.keys(L):M;delete V.serializers,c([V],k,L,this._stdErrSerialize)}function G(ge){this._childLevel=(ge._childLevel|0)+1,this.error=u(ge,V,"error"),this.fatal=u(ge,V,"fatal"),this.warn=u(ge,V,"warn"),this.info=u(ge,V,"info"),this.debug=u(ge,V,"debug"),this.trace=u(ge,V,"trace"),L&&(this.serializers=L,this._serialize=k),p&&(this._logEvent=d([].concat(ge._logEvent.bindings,V)))}return G.prototype=this,new G(this)}return F}i.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},i.stdSerializers=r,i.stdTimeFunctions=Object.assign({},{nullTime:_,epochTime:b,unixTime:S,isoTime:x});function a(E,p,O,C){const M=Object.getPrototypeOf(p);p[O]=p.levelVal>p.levels.values[O]?y:M[O]?M[O]:e[O]||e[C]||y,o(E,p,O)}function o(E,p,O){!E.transmit&&p[O]===y||(p[O]=function(C){return function(){const B=E.timestamp(),ce=new Array(arguments.length),he=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var F=0;F<ce.length;F++)ce[F]=arguments[F];if(E.serialize&&!E.asObject&&c(ce,this._serialize,this.serializers,this._stdErrSerialize),E.asObject?C.call(he,s(this,O,ce,B)):C.apply(he,ce),E.transmit){const U=E.transmit.level||p.level,K=i.levels.values[U],ne=i.levels.values[O];if(ne<K)return;f(this,{ts:B,methodLevel:O,methodValue:ne,transmitLevel:U,transmitValue:i.levels.values[E.transmit.level||p.level],send:E.transmit.send,val:p.levelVal},ce)}}}(p[O]))}function s(E,p,O,C){E._serialize&&c(O,E._serialize,E.serializers,E._stdErrSerialize);const M=O.slice();let B=M[0];const ce={};C&&(ce.time=C),ce.level=i.levels.values[p];let he=(E._childLevel|0)+1;if(he<1&&(he=1),B!==null&&typeof B=="object"){for(;he--&&typeof M[0]=="object";)Object.assign(ce,M.shift());B=M.length?t(M.shift(),M):void 0}else typeof B=="string"&&(B=t(M.shift(),M));return B!==void 0&&(ce.msg=B),ce}function c(E,p,O,C){for(const M in E)if(C&&E[M]instanceof Error)E[M]=i.stdSerializers.err(E[M]);else if(typeof E[M]=="object"&&!Array.isArray(E[M]))for(const B in E[M])p&&p.indexOf(B)>-1&&B in O&&(E[M][B]=O[B](E[M][B]))}function u(E,p,O){return function(){const C=new Array(1+arguments.length);C[0]=p;for(var M=1;M<C.length;M++)C[M]=arguments[M-1];return E[O].apply(this,C)}}function f(E,p,O){const C=p.send,M=p.ts,B=p.methodLevel,ce=p.methodValue,he=p.val,F=E._logEvent.bindings;c(O,E._serialize||Object.keys(E.serializers),E.serializers,E._stdErrSerialize===void 0?!0:E._stdErrSerialize),E._logEvent.ts=M,E._logEvent.messages=O.filter(function(U){return F.indexOf(U)===-1}),E._logEvent.level.label=B,E._logEvent.level.value=ce,C(B,E._logEvent,he),E._logEvent=d(F)}function d(E){return{ts:0,messages:[],bindings:E||[],level:{label:"",value:0}}}function g(E){const p={type:E.constructor.name,msg:E.message,stack:E.stack};for(const O in E)p[O]===void 0&&(p[O]=E[O]);return p}function m(E){return typeof E.timestamp=="function"?E.timestamp:E.timestamp===!1?_:b}function w(){return{}}function v(E){return E}function y(){}function _(){return!1}function b(){return Date.now()}function S(){return Math.round(Date.now()/1e3)}function x(){return new Date(Date.now()).toISOString()}function I(){function E(p){return typeof p<"u"&&p}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return E(self)||E(window)||E(this)||{}}}return kN}var oh={},VK;function Boe(){return VK||(VK=1,Object.defineProperty(oh,"__esModule",{value:!0}),oh.PINO_CUSTOM_CONTEXT_KEY=oh.PINO_LOGGER_DEFAULTS=void 0,oh.PINO_LOGGER_DEFAULTS={level:"info"},oh.PINO_CUSTOM_CONTEXT_KEY="custom_context"),oh}var Ja={},zK;function ELe(){if(zK)return Ja;zK=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.generateChildLogger=Ja.formatChildLoggerContext=Ja.getLoggerContext=Ja.setBrowserLoggerContext=Ja.getBrowserLoggerContext=Ja.getDefaultLoggerOptions=void 0;const t=Boe();function e(s){return Object.assign(Object.assign({},s),{level:(s==null?void 0:s.level)||t.PINO_LOGGER_DEFAULTS.level})}Ja.getDefaultLoggerOptions=e;function r(s,c=t.PINO_CUSTOM_CONTEXT_KEY){return s[c]||""}Ja.getBrowserLoggerContext=r;function n(s,c,u=t.PINO_CUSTOM_CONTEXT_KEY){return s[u]=c,s}Ja.setBrowserLoggerContext=n;function i(s,c=t.PINO_CUSTOM_CONTEXT_KEY){let u="";return typeof s.bindings>"u"?u=r(s,c):u=s.bindings().context||"",u}Ja.getLoggerContext=i;function a(s,c,u=t.PINO_CUSTOM_CONTEXT_KEY){const f=i(s,u);return f.trim()?`${f}/${c}`:c}Ja.formatChildLoggerContext=a;function o(s,c,u=t.PINO_CUSTOM_CONTEXT_KEY){const f=a(s,c,u),d=s.child({context:f});return n(d,f,u)}return Ja.generateChildLogger=o,Ja}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const e=ec,r=e.__importDefault(_Le());Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return r.default}}),e.__exportStar(Boe(),t),e.__exportStar(ELe(),t)})(un);class xLe extends $p{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}let ALe=class extends $p{constructor(e,r){super(),this.core=e,this.logger=r,this.records=new Map}};class SLe{constructor(e,r){this.logger=e,this.core=r}}let ILe=class extends $p{constructor(e,r){super(),this.relayer=e,this.logger=r}},OLe=class extends $p{constructor(e){super()}},PLe=class{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}};class TLe extends $p{constructor(e,r){super(),this.relayer=e,this.logger=r}}let RLe=class extends $p{constructor(e,r){super(),this.core=e,this.logger=r}},CLe=class{constructor(e,r){this.projectId=e,this.logger=r}},NLe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},DLe=class{constructor(e){this.client=e}};const $Le=t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString()+"n":r),MLe=t=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=t.replace(e,'$1"$2n"$3');return JSON.parse(r,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function qk(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return MLe(t)}catch{return t}}function L1(t){return typeof t=="string"?t:$Le(t)||""}var Hk={},Foe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Lr,r=os;t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var n=function(){function s(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return s.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},s.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},s.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},s.prototype.update=function(c,u){if(u===void 0&&(u=c.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var f=0;if(this._bytesHashed+=u,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&u>0;)this._buffer[this._bufferLength++]=c[f++],u--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(u>=this.blockSize&&(f=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,c,f,u),u%=this.blockSize);u>0;)this._buffer[this._bufferLength++]=c[f++],u--;return this},s.prototype.finish=function(c){if(!this._finished){var u=this._bytesHashed,f=this._bufferLength,d=u/536870912|0,g=u<<3,m=u%128<112?128:256;this._buffer[f]=128;for(var w=f+1;w<m-8;w++)this._buffer[w]=0;e.writeUint32BE(d,this._buffer,m-8),e.writeUint32BE(g,this._buffer,m-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,m),this._finished=!0}for(var w=0;w<this.digestLength/8;w++)e.writeUint32BE(this._stateHi[w],c,w*8),e.writeUint32BE(this._stateLo[w],c,w*8+4);return this},s.prototype.digest=function(){var c=new Uint8Array(this.digestLength);return this.finish(c),c},s.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(c){return this._stateHi.set(c.stateHi),this._stateLo.set(c.stateLo),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(c){r.wipe(c.stateHi),r.wipe(c.stateLo),c.buffer&&r.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},s}();t.SHA512=n;var i=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function a(s,c,u,f,d,g,m){for(var w=u[0],v=u[1],y=u[2],_=u[3],b=u[4],S=u[5],x=u[6],I=u[7],E=f[0],p=f[1],O=f[2],C=f[3],M=f[4],B=f[5],ce=f[6],he=f[7],F,U,K,ne,j,q,V,$;m>=128;){for(var H=0;H<16;H++){var L=8*H+g;s[H]=e.readUint32BE(d,L),c[H]=e.readUint32BE(d,L+4)}for(var H=0;H<80;H++){var k=w,G=v,ge=y,Q=_,te=b,ue=S,T=x,fe=I,Ge=E,tt=p,mt=O,vt=C,gt=M,Lt=B,Yt=ce,_r=he;if(F=I,U=he,j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=(b>>>14|M<<32-14)^(b>>>18|M<<32-18)^(M>>>41-32|b<<32-(41-32)),U=(M>>>14|b<<32-14)^(M>>>18|b<<32-18)^(b>>>41-32|M<<32-(41-32)),j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,F=b&S^~b&x,U=M&B^~M&ce,j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,F=i[H*2],U=i[H*2+1],j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,F=s[H%16],U=c[H%16],j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,K=V&65535|$<<16,ne=j&65535|q<<16,F=K,U=ne,j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=(w>>>28|E<<32-28)^(E>>>34-32|w<<32-(34-32))^(E>>>39-32|w<<32-(39-32)),U=(E>>>28|w<<32-28)^(w>>>34-32|E<<32-(34-32))^(w>>>39-32|E<<32-(39-32)),j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,F=w&v^w&y^v&y,U=E&p^E&O^p&O,j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,fe=V&65535|$<<16,_r=j&65535|q<<16,F=Q,U=vt,j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=K,U=ne,j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,Q=V&65535|$<<16,vt=j&65535|q<<16,v=k,y=G,_=ge,b=Q,S=te,x=ue,I=T,w=fe,p=Ge,O=tt,C=mt,M=vt,B=gt,ce=Lt,he=Yt,E=_r,H%16===15)for(var L=0;L<16;L++)F=s[L],U=c[L],j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=s[(L+9)%16],U=c[(L+9)%16],j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,K=s[(L+1)%16],ne=c[(L+1)%16],F=(K>>>1|ne<<32-1)^(K>>>8|ne<<32-8)^K>>>7,U=(ne>>>1|K<<32-1)^(ne>>>8|K<<32-8)^(ne>>>7|K<<32-7),j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,K=s[(L+14)%16],ne=c[(L+14)%16],F=(K>>>19|ne<<32-19)^(ne>>>61-32|K<<32-(61-32))^K>>>6,U=(ne>>>19|K<<32-19)^(K>>>61-32|ne<<32-(61-32))^(ne>>>6|K<<32-6),j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,s[L]=V&65535|$<<16,c[L]=j&65535|q<<16}F=w,U=E,j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=u[0],U=f[0],j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,u[0]=w=V&65535|$<<16,f[0]=E=j&65535|q<<16,F=v,U=p,j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=u[1],U=f[1],j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,u[1]=v=V&65535|$<<16,f[1]=p=j&65535|q<<16,F=y,U=O,j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=u[2],U=f[2],j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,u[2]=y=V&65535|$<<16,f[2]=O=j&65535|q<<16,F=_,U=C,j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=u[3],U=f[3],j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,u[3]=_=V&65535|$<<16,f[3]=C=j&65535|q<<16,F=b,U=M,j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=u[4],U=f[4],j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,u[4]=b=V&65535|$<<16,f[4]=M=j&65535|q<<16,F=S,U=B,j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=u[5],U=f[5],j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,u[5]=S=V&65535|$<<16,f[5]=B=j&65535|q<<16,F=x,U=ce,j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=u[6],U=f[6],j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,u[6]=x=V&65535|$<<16,f[6]=ce=j&65535|q<<16,F=I,U=he,j=U&65535,q=U>>>16,V=F&65535,$=F>>>16,F=u[7],U=f[7],j+=U&65535,q+=U>>>16,V+=F&65535,$+=F>>>16,q+=j>>>16,V+=q>>>16,$+=V>>>16,u[7]=I=V&65535|$<<16,f[7]=he=j&65535|q<<16,g+=128,m-=128}return g}function o(s){var c=new n;c.update(s);var u=c.digest();return c.clean(),u}t.hash=o})(Foe);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertSecretKeyToX25519=t.convertPublicKeyToX25519=t.verify=t.sign=t.extractPublicKeyFromSecretKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.SEED_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=t.SIGNATURE_LENGTH=void 0;const e=dm,r=Foe,n=os;t.SIGNATURE_LENGTH=64,t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=64,t.SEED_LENGTH=32;function i(Q){const te=new Float64Array(16);if(Q)for(let ue=0;ue<Q.length;ue++)te[ue]=Q[ue];return te}const a=new Uint8Array(32);a[0]=9;const o=i(),s=i([1]),c=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),g=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function m(Q,te){for(let ue=0;ue<16;ue++)Q[ue]=te[ue]|0}function w(Q){let te=1;for(let ue=0;ue<16;ue++){let T=Q[ue]+te+65535;te=Math.floor(T/65536),Q[ue]=T-te*65536}Q[0]+=te-1+37*(te-1)}function v(Q,te,ue){const T=~(ue-1);for(let fe=0;fe<16;fe++){const Ge=T&(Q[fe]^te[fe]);Q[fe]^=Ge,te[fe]^=Ge}}function y(Q,te){const ue=i(),T=i();for(let fe=0;fe<16;fe++)T[fe]=te[fe];w(T),w(T),w(T);for(let fe=0;fe<2;fe++){ue[0]=T[0]-65517;for(let tt=1;tt<15;tt++)ue[tt]=T[tt]-65535-(ue[tt-1]>>16&1),ue[tt-1]&=65535;ue[15]=T[15]-32767-(ue[14]>>16&1);const Ge=ue[15]>>16&1;ue[14]&=65535,v(T,ue,1-Ge)}for(let fe=0;fe<16;fe++)Q[2*fe]=T[fe]&255,Q[2*fe+1]=T[fe]>>8}function _(Q,te){let ue=0;for(let T=0;T<32;T++)ue|=Q[T]^te[T];return(1&ue-1>>>8)-1}function b(Q,te){const ue=new Uint8Array(32),T=new Uint8Array(32);return y(ue,Q),y(T,te),_(ue,T)}function S(Q){const te=new Uint8Array(32);return y(te,Q),te[0]&1}function x(Q,te){for(let ue=0;ue<16;ue++)Q[ue]=te[2*ue]+(te[2*ue+1]<<8);Q[15]&=32767}function I(Q,te,ue){for(let T=0;T<16;T++)Q[T]=te[T]+ue[T]}function E(Q,te,ue){for(let T=0;T<16;T++)Q[T]=te[T]-ue[T]}function p(Q,te,ue){let T,fe,Ge=0,tt=0,mt=0,vt=0,gt=0,Lt=0,Yt=0,_r=0,Rt=0,Pt=0,kt=0,Nt=0,Kt=0,Ut=0,Vt=0,$t=0,Dt=0,qt=0,Mt=0,cr=0,tr=0,ir=0,nr=0,vr=0,wn=0,Yr=0,ai=0,Dn=0,$n=0,Kn=0,Ar=0,Mr=ue[0],Er=ue[1],_e=ue[2],ee=ue[3],ve=ue[4],Re=ue[5],ze=ue[6],Xe=ue[7],st=ue[8],lt=ue[9],_t=ue[10],le=ue[11],Z=ue[12],ye=ue[13],Me=ue[14],Le=ue[15];T=te[0],Ge+=T*Mr,tt+=T*Er,mt+=T*_e,vt+=T*ee,gt+=T*ve,Lt+=T*Re,Yt+=T*ze,_r+=T*Xe,Rt+=T*st,Pt+=T*lt,kt+=T*_t,Nt+=T*le,Kt+=T*Z,Ut+=T*ye,Vt+=T*Me,$t+=T*Le,T=te[1],tt+=T*Mr,mt+=T*Er,vt+=T*_e,gt+=T*ee,Lt+=T*ve,Yt+=T*Re,_r+=T*ze,Rt+=T*Xe,Pt+=T*st,kt+=T*lt,Nt+=T*_t,Kt+=T*le,Ut+=T*Z,Vt+=T*ye,$t+=T*Me,Dt+=T*Le,T=te[2],mt+=T*Mr,vt+=T*Er,gt+=T*_e,Lt+=T*ee,Yt+=T*ve,_r+=T*Re,Rt+=T*ze,Pt+=T*Xe,kt+=T*st,Nt+=T*lt,Kt+=T*_t,Ut+=T*le,Vt+=T*Z,$t+=T*ye,Dt+=T*Me,qt+=T*Le,T=te[3],vt+=T*Mr,gt+=T*Er,Lt+=T*_e,Yt+=T*ee,_r+=T*ve,Rt+=T*Re,Pt+=T*ze,kt+=T*Xe,Nt+=T*st,Kt+=T*lt,Ut+=T*_t,Vt+=T*le,$t+=T*Z,Dt+=T*ye,qt+=T*Me,Mt+=T*Le,T=te[4],gt+=T*Mr,Lt+=T*Er,Yt+=T*_e,_r+=T*ee,Rt+=T*ve,Pt+=T*Re,kt+=T*ze,Nt+=T*Xe,Kt+=T*st,Ut+=T*lt,Vt+=T*_t,$t+=T*le,Dt+=T*Z,qt+=T*ye,Mt+=T*Me,cr+=T*Le,T=te[5],Lt+=T*Mr,Yt+=T*Er,_r+=T*_e,Rt+=T*ee,Pt+=T*ve,kt+=T*Re,Nt+=T*ze,Kt+=T*Xe,Ut+=T*st,Vt+=T*lt,$t+=T*_t,Dt+=T*le,qt+=T*Z,Mt+=T*ye,cr+=T*Me,tr+=T*Le,T=te[6],Yt+=T*Mr,_r+=T*Er,Rt+=T*_e,Pt+=T*ee,kt+=T*ve,Nt+=T*Re,Kt+=T*ze,Ut+=T*Xe,Vt+=T*st,$t+=T*lt,Dt+=T*_t,qt+=T*le,Mt+=T*Z,cr+=T*ye,tr+=T*Me,ir+=T*Le,T=te[7],_r+=T*Mr,Rt+=T*Er,Pt+=T*_e,kt+=T*ee,Nt+=T*ve,Kt+=T*Re,Ut+=T*ze,Vt+=T*Xe,$t+=T*st,Dt+=T*lt,qt+=T*_t,Mt+=T*le,cr+=T*Z,tr+=T*ye,ir+=T*Me,nr+=T*Le,T=te[8],Rt+=T*Mr,Pt+=T*Er,kt+=T*_e,Nt+=T*ee,Kt+=T*ve,Ut+=T*Re,Vt+=T*ze,$t+=T*Xe,Dt+=T*st,qt+=T*lt,Mt+=T*_t,cr+=T*le,tr+=T*Z,ir+=T*ye,nr+=T*Me,vr+=T*Le,T=te[9],Pt+=T*Mr,kt+=T*Er,Nt+=T*_e,Kt+=T*ee,Ut+=T*ve,Vt+=T*Re,$t+=T*ze,Dt+=T*Xe,qt+=T*st,Mt+=T*lt,cr+=T*_t,tr+=T*le,ir+=T*Z,nr+=T*ye,vr+=T*Me,wn+=T*Le,T=te[10],kt+=T*Mr,Nt+=T*Er,Kt+=T*_e,Ut+=T*ee,Vt+=T*ve,$t+=T*Re,Dt+=T*ze,qt+=T*Xe,Mt+=T*st,cr+=T*lt,tr+=T*_t,ir+=T*le,nr+=T*Z,vr+=T*ye,wn+=T*Me,Yr+=T*Le,T=te[11],Nt+=T*Mr,Kt+=T*Er,Ut+=T*_e,Vt+=T*ee,$t+=T*ve,Dt+=T*Re,qt+=T*ze,Mt+=T*Xe,cr+=T*st,tr+=T*lt,ir+=T*_t,nr+=T*le,vr+=T*Z,wn+=T*ye,Yr+=T*Me,ai+=T*Le,T=te[12],Kt+=T*Mr,Ut+=T*Er,Vt+=T*_e,$t+=T*ee,Dt+=T*ve,qt+=T*Re,Mt+=T*ze,cr+=T*Xe,tr+=T*st,ir+=T*lt,nr+=T*_t,vr+=T*le,wn+=T*Z,Yr+=T*ye,ai+=T*Me,Dn+=T*Le,T=te[13],Ut+=T*Mr,Vt+=T*Er,$t+=T*_e,Dt+=T*ee,qt+=T*ve,Mt+=T*Re,cr+=T*ze,tr+=T*Xe,ir+=T*st,nr+=T*lt,vr+=T*_t,wn+=T*le,Yr+=T*Z,ai+=T*ye,Dn+=T*Me,$n+=T*Le,T=te[14],Vt+=T*Mr,$t+=T*Er,Dt+=T*_e,qt+=T*ee,Mt+=T*ve,cr+=T*Re,tr+=T*ze,ir+=T*Xe,nr+=T*st,vr+=T*lt,wn+=T*_t,Yr+=T*le,ai+=T*Z,Dn+=T*ye,$n+=T*Me,Kn+=T*Le,T=te[15],$t+=T*Mr,Dt+=T*Er,qt+=T*_e,Mt+=T*ee,cr+=T*ve,tr+=T*Re,ir+=T*ze,nr+=T*Xe,vr+=T*st,wn+=T*lt,Yr+=T*_t,ai+=T*le,Dn+=T*Z,$n+=T*ye,Kn+=T*Me,Ar+=T*Le,Ge+=38*Dt,tt+=38*qt,mt+=38*Mt,vt+=38*cr,gt+=38*tr,Lt+=38*ir,Yt+=38*nr,_r+=38*vr,Rt+=38*wn,Pt+=38*Yr,kt+=38*ai,Nt+=38*Dn,Kt+=38*$n,Ut+=38*Kn,Vt+=38*Ar,fe=1,T=Ge+fe+65535,fe=Math.floor(T/65536),Ge=T-fe*65536,T=tt+fe+65535,fe=Math.floor(T/65536),tt=T-fe*65536,T=mt+fe+65535,fe=Math.floor(T/65536),mt=T-fe*65536,T=vt+fe+65535,fe=Math.floor(T/65536),vt=T-fe*65536,T=gt+fe+65535,fe=Math.floor(T/65536),gt=T-fe*65536,T=Lt+fe+65535,fe=Math.floor(T/65536),Lt=T-fe*65536,T=Yt+fe+65535,fe=Math.floor(T/65536),Yt=T-fe*65536,T=_r+fe+65535,fe=Math.floor(T/65536),_r=T-fe*65536,T=Rt+fe+65535,fe=Math.floor(T/65536),Rt=T-fe*65536,T=Pt+fe+65535,fe=Math.floor(T/65536),Pt=T-fe*65536,T=kt+fe+65535,fe=Math.floor(T/65536),kt=T-fe*65536,T=Nt+fe+65535,fe=Math.floor(T/65536),Nt=T-fe*65536,T=Kt+fe+65535,fe=Math.floor(T/65536),Kt=T-fe*65536,T=Ut+fe+65535,fe=Math.floor(T/65536),Ut=T-fe*65536,T=Vt+fe+65535,fe=Math.floor(T/65536),Vt=T-fe*65536,T=$t+fe+65535,fe=Math.floor(T/65536),$t=T-fe*65536,Ge+=fe-1+37*(fe-1),fe=1,T=Ge+fe+65535,fe=Math.floor(T/65536),Ge=T-fe*65536,T=tt+fe+65535,fe=Math.floor(T/65536),tt=T-fe*65536,T=mt+fe+65535,fe=Math.floor(T/65536),mt=T-fe*65536,T=vt+fe+65535,fe=Math.floor(T/65536),vt=T-fe*65536,T=gt+fe+65535,fe=Math.floor(T/65536),gt=T-fe*65536,T=Lt+fe+65535,fe=Math.floor(T/65536),Lt=T-fe*65536,T=Yt+fe+65535,fe=Math.floor(T/65536),Yt=T-fe*65536,T=_r+fe+65535,fe=Math.floor(T/65536),_r=T-fe*65536,T=Rt+fe+65535,fe=Math.floor(T/65536),Rt=T-fe*65536,T=Pt+fe+65535,fe=Math.floor(T/65536),Pt=T-fe*65536,T=kt+fe+65535,fe=Math.floor(T/65536),kt=T-fe*65536,T=Nt+fe+65535,fe=Math.floor(T/65536),Nt=T-fe*65536,T=Kt+fe+65535,fe=Math.floor(T/65536),Kt=T-fe*65536,T=Ut+fe+65535,fe=Math.floor(T/65536),Ut=T-fe*65536,T=Vt+fe+65535,fe=Math.floor(T/65536),Vt=T-fe*65536,T=$t+fe+65535,fe=Math.floor(T/65536),$t=T-fe*65536,Ge+=fe-1+37*(fe-1),Q[0]=Ge,Q[1]=tt,Q[2]=mt,Q[3]=vt,Q[4]=gt,Q[5]=Lt,Q[6]=Yt,Q[7]=_r,Q[8]=Rt,Q[9]=Pt,Q[10]=kt,Q[11]=Nt,Q[12]=Kt,Q[13]=Ut,Q[14]=Vt,Q[15]=$t}function O(Q,te){p(Q,te,te)}function C(Q,te){const ue=i();let T;for(T=0;T<16;T++)ue[T]=te[T];for(T=253;T>=0;T--)O(ue,ue),T!==2&&T!==4&&p(ue,ue,te);for(T=0;T<16;T++)Q[T]=ue[T]}function M(Q,te){const ue=i();let T;for(T=0;T<16;T++)ue[T]=te[T];for(T=250;T>=0;T--)O(ue,ue),T!==1&&p(ue,ue,te);for(T=0;T<16;T++)Q[T]=ue[T]}function B(Q,te){const ue=i(),T=i(),fe=i(),Ge=i(),tt=i(),mt=i(),vt=i(),gt=i(),Lt=i();E(ue,Q[1],Q[0]),E(Lt,te[1],te[0]),p(ue,ue,Lt),I(T,Q[0],Q[1]),I(Lt,te[0],te[1]),p(T,T,Lt),p(fe,Q[3],te[3]),p(fe,fe,u),p(Ge,Q[2],te[2]),I(Ge,Ge,Ge),E(tt,T,ue),E(mt,Ge,fe),I(vt,Ge,fe),I(gt,T,ue),p(Q[0],tt,mt),p(Q[1],gt,vt),p(Q[2],vt,mt),p(Q[3],tt,gt)}function ce(Q,te,ue){for(let T=0;T<4;T++)v(Q[T],te[T],ue)}function he(Q,te){const ue=i(),T=i(),fe=i();C(fe,te[2]),p(ue,te[0],fe),p(T,te[1],fe),y(Q,T),Q[31]^=S(ue)<<7}function F(Q,te,ue){m(Q[0],o),m(Q[1],s),m(Q[2],s),m(Q[3],o);for(let T=255;T>=0;--T){const fe=ue[T/8|0]>>(T&7)&1;ce(Q,te,fe),B(te,Q),B(Q,Q),ce(Q,te,fe)}}function U(Q,te){const ue=[i(),i(),i(),i()];m(ue[0],f),m(ue[1],d),m(ue[2],s),p(ue[3],f,d),F(Q,ue,te)}function K(Q){if(Q.length!==t.SEED_LENGTH)throw new Error(`ed25519: seed must be ${t.SEED_LENGTH} bytes`);const te=(0,r.hash)(Q);te[0]&=248,te[31]&=127,te[31]|=64;const ue=new Uint8Array(32),T=[i(),i(),i(),i()];U(T,te),he(ue,T);const fe=new Uint8Array(64);return fe.set(Q),fe.set(ue,32),{publicKey:ue,secretKey:fe}}t.generateKeyPairFromSeed=K;function ne(Q){const te=(0,e.randomBytes)(32,Q),ue=K(te);return(0,n.wipe)(te),ue}t.generateKeyPair=ne;function j(Q){if(Q.length!==t.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${t.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(Q.subarray(32))}t.extractPublicKeyFromSecretKey=j;const q=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function V(Q,te){let ue,T,fe,Ge;for(T=63;T>=32;--T){for(ue=0,fe=T-32,Ge=T-12;fe<Ge;++fe)te[fe]+=ue-16*te[T]*q[fe-(T-32)],ue=Math.floor((te[fe]+128)/256),te[fe]-=ue*256;te[fe]+=ue,te[T]=0}for(ue=0,fe=0;fe<32;fe++)te[fe]+=ue-(te[31]>>4)*q[fe],ue=te[fe]>>8,te[fe]&=255;for(fe=0;fe<32;fe++)te[fe]-=ue*q[fe];for(T=0;T<32;T++)te[T+1]+=te[T]>>8,Q[T]=te[T]&255}function $(Q){const te=new Float64Array(64);for(let ue=0;ue<64;ue++)te[ue]=Q[ue];for(let ue=0;ue<64;ue++)Q[ue]=0;V(Q,te)}function H(Q,te){const ue=new Float64Array(64),T=[i(),i(),i(),i()],fe=(0,r.hash)(Q.subarray(0,32));fe[0]&=248,fe[31]&=127,fe[31]|=64;const Ge=new Uint8Array(64);Ge.set(fe.subarray(32),32);const tt=new r.SHA512;tt.update(Ge.subarray(32)),tt.update(te);const mt=tt.digest();tt.clean(),$(mt),U(T,mt),he(Ge,T),tt.reset(),tt.update(Ge.subarray(0,32)),tt.update(Q.subarray(32)),tt.update(te);const vt=tt.digest();$(vt);for(let gt=0;gt<32;gt++)ue[gt]=mt[gt];for(let gt=0;gt<32;gt++)for(let Lt=0;Lt<32;Lt++)ue[gt+Lt]+=vt[gt]*fe[Lt];return V(Ge.subarray(32),ue),Ge}t.sign=H;function L(Q,te){const ue=i(),T=i(),fe=i(),Ge=i(),tt=i(),mt=i(),vt=i();return m(Q[2],s),x(Q[1],te),O(fe,Q[1]),p(Ge,fe,c),E(fe,fe,Q[2]),I(Ge,Q[2],Ge),O(tt,Ge),O(mt,tt),p(vt,mt,tt),p(ue,vt,fe),p(ue,ue,Ge),M(ue,ue),p(ue,ue,fe),p(ue,ue,Ge),p(ue,ue,Ge),p(Q[0],ue,Ge),O(T,Q[0]),p(T,T,Ge),b(T,fe)&&p(Q[0],Q[0],g),O(T,Q[0]),p(T,T,Ge),b(T,fe)?-1:(S(Q[0])===te[31]>>7&&E(Q[0],o,Q[0]),p(Q[3],Q[0],Q[1]),0)}function k(Q,te,ue){const T=new Uint8Array(32),fe=[i(),i(),i(),i()],Ge=[i(),i(),i(),i()];if(ue.length!==t.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${t.SIGNATURE_LENGTH} bytes`);if(L(Ge,Q))return!1;const tt=new r.SHA512;tt.update(ue.subarray(0,32)),tt.update(Q),tt.update(te);const mt=tt.digest();return $(mt),F(fe,Ge,mt),U(Ge,ue.subarray(32)),B(fe,Ge),he(T,fe),!_(ue,T)}t.verify=k;function G(Q){let te=[i(),i(),i(),i()];if(L(te,Q))throw new Error("Ed25519: invalid public key");let ue=i(),T=i(),fe=te[1];I(ue,s,fe),E(T,s,fe),C(T,T),p(ue,ue,T);let Ge=new Uint8Array(32);return y(Ge,ue),Ge}t.convertPublicKeyToX25519=G;function ge(Q){const te=(0,r.hash)(Q.subarray(0,32));te[0]&=248,te[31]&=127,te[31]|=64;const ue=new Uint8Array(te.subarray(0,32));return(0,n.wipe)(te),ue}t.convertSecretKeyToX25519=ge})(Hk);const kLe="EdDSA",LLe="JWT",joe=".",qoe="base64url",ULe="utf8",BLe="utf8",FLe=":",jLe="did",qLe="key",GK="base58btc",HLe="z",VLe="K36",zLe=32;function e2(t){return uo(No(L1(t),ULe),qoe)}function Hoe(t){const e=No(VLe,GK),r=HLe+uo(b4([e,t]),GK);return[jLe,qLe,r].join(FLe)}function GLe(t){return uo(t,qoe)}function WLe(t){return No([e2(t.header),e2(t.payload)].join(joe),BLe)}function KLe(t){return[e2(t.header),e2(t.payload),GLe(t.signature)].join(joe)}function WK(t=dm.randomBytes(zLe)){return Hk.generateKeyPairFromSeed(t)}async function YLe(t,e,r,n,i=Xt.fromMiliseconds(Date.now())){const a={alg:kLe,typ:LLe},o=Hoe(n.publicKey),s=i+r,c={iss:o,sub:t,aud:e,iat:i,exp:s},u=WLe({header:a,payload:c}),f=Hk.sign(n.secretKey,u);return KLe({header:a,payload:c,signature:f})}const QLe="PARSE_ERROR",JLe="INVALID_REQUEST",XLe="METHOD_NOT_FOUND",ZLe="INVALID_PARAMS",Voe="INTERNAL_ERROR",Vk="SERVER_ERROR",e9e=[-32700,-32600,-32601,-32602,-32603],Xb={[QLe]:{code:-32700,message:"Parse error"},[JLe]:{code:-32600,message:"Invalid Request"},[XLe]:{code:-32601,message:"Method not found"},[ZLe]:{code:-32602,message:"Invalid params"},[Voe]:{code:-32603,message:"Internal error"},[Vk]:{code:-32e3,message:"Server error"}},zoe=Vk;function t9e(t){return e9e.includes(t)}function KK(t){return Object.keys(Xb).includes(t)?Xb[t]:Xb[zoe]}function r9e(t){const e=Object.values(Xb).find(r=>r.code===t);return e||Xb[zoe]}function Goe(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):t}var Woe={},zu={},YK;function n9e(){if(YK)return zu;YK=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.isBrowserCryptoAvailable=zu.getSubtleCrypto=zu.getBrowerCrypto=void 0;function t(){return(Ne==null?void 0:Ne.crypto)||(Ne==null?void 0:Ne.msCrypto)||{}}zu.getBrowerCrypto=t;function e(){const n=t();return n.subtle||n.webkitSubtle}zu.getSubtleCrypto=e;function r(){return!!t()&&!!e()}return zu.isBrowserCryptoAvailable=r,zu}var Gu={},QK;function i9e(){if(QK)return Gu;QK=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.isBrowser=Gu.isNode=Gu.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Gu.isReactNative=t;function e(){return typeof Va<"u"&&typeof Va.versions<"u"&&typeof Va.versions.node<"u"}Gu.isNode=e;function r(){return!t()&&!e()}return Gu.isBrowser=r,Gu}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ec;e.__exportStar(n9e(),t),e.__exportStar(i9e(),t)})(Woe);function zk(t=3){const e=Date.now()*Math.pow(10,t),r=Math.floor(Math.random()*Math.pow(10,t));return e+r}function Koe(t=6){return BigInt(zk(t))}function Eg(t,e,r){return{id:r||zk(),jsonrpc:"2.0",method:t,params:e}}function Gk(t,e){return{id:t,jsonrpc:"2.0",result:e}}function bI(t,e,r){return{id:t,jsonrpc:"2.0",error:a9e(e,r)}}function a9e(t,e){return typeof t>"u"?KK(Voe):(typeof t=="string"&&(t=Object.assign(Object.assign({},KK(Vk)),{message:t})),typeof e<"u"&&(t.data=e),t9e(t.code)&&(t=r9e(t.code)),t)}class o9e{}class s9e extends o9e{constructor(){super()}}class c9e extends s9e{constructor(e){super()}}const u9e="^https?:",l9e="^wss?:";function f9e(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function Yoe(t,e){const r=f9e(t);return typeof r>"u"?!1:new RegExp(e).test(r)}function JK(t){return Yoe(t,u9e)}function XK(t){return Yoe(t,l9e)}function d9e(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function Qoe(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function Wk(t){return Qoe(t)&&"method"in t}function wI(t){return Qoe(t)&&(el(t)||xc(t))}function el(t){return"result"in t}function xc(t){return"error"in t}class Gl extends c9e{constructor(e){super(e),this.events=new ho.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async request(e,r){return this.requestStrict(Eg(e.method,e.params||[],e.id||Koe().toString()),r)}async requestStrict(e,r){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(a){i(a)}this.events.on(`${e.id}`,a=>{xc(a)?i(a.error):n(a.result)});try{await this.connection.send(e,r)}catch(a){i(a)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),wI(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}var LN,ZK;function h9e(){return ZK||(ZK=1,LN=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}),LN}const p9e=()=>typeof WebSocket<"u"?WebSocket:typeof bn<"u"&&typeof bn.WebSocket<"u"?bn.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:h9e(),g9e=()=>typeof WebSocket<"u"||typeof bn<"u"&&typeof bn.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",eY=t=>t.split("?")[0],tY=10,y9e=p9e();class m9e{constructor(e){if(this.url=e,this.events=new ho.EventEmitter,this.registering=!1,!XK(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e,r){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(L1(e))}catch(n){this.onError(e.id,n)}}register(e=this.url){if(!XK(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",a=>{this.resetMaxListeners(),i(a)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((r,n)=>{const i=Woe.isReactNative()?void 0:{rejectUnauthorized:!d9e(e)},a=new y9e(e,[],i);g9e()?a.onerror=o=>{const s=o;n(this.emitError(s.error))}:a.on("error",o=>{n(this.emitError(o))}),a.onopen=()=>{this.onOpen(a),r(a)}})}onOpen(e){e.onmessage=r=>this.onPayload(r),e.onclose=r=>this.onClose(r),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const r=typeof e.data=="string"?qk(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),a=bI(e,i);this.events.emit("payload",a)}parseError(e,r=this.url){return Goe(e,eY(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>tY&&this.events.setMaxListeners(tY)}emitError(e){const r=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${eY(this.url)}`));return this.events.emit("register_error",r),r}}var t2={exports:{}};t2.exports;(function(t,e){var r=200,n="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",d="[object Date]",g="[object Error]",m="[object Function]",w="[object GeneratorFunction]",v="[object Map]",y="[object Number]",_="[object Null]",b="[object Object]",S="[object Promise]",x="[object Proxy]",I="[object RegExp]",E="[object Set]",p="[object String]",O="[object Symbol]",C="[object Undefined]",M="[object WeakMap]",B="[object ArrayBuffer]",ce="[object DataView]",he="[object Float32Array]",F="[object Float64Array]",U="[object Int8Array]",K="[object Int16Array]",ne="[object Int32Array]",j="[object Uint8Array]",q="[object Uint8ClampedArray]",V="[object Uint16Array]",$="[object Uint32Array]",H=/[\\^$.*+?()[\]{}|]/g,L=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,G={};G[he]=G[F]=G[U]=G[K]=G[ne]=G[j]=G[q]=G[V]=G[$]=!0,G[s]=G[c]=G[B]=G[f]=G[ce]=G[d]=G[g]=G[m]=G[v]=G[y]=G[b]=G[I]=G[E]=G[p]=G[M]=!1;var ge=typeof Ne=="object"&&Ne&&Ne.Object===Object&&Ne,Q=typeof self=="object"&&self&&self.Object===Object&&self,te=ge||Q||Function("return this")(),ue=e&&!e.nodeType&&e,T=ue&&!0&&t&&!t.nodeType&&t,fe=T&&T.exports===ue,Ge=fe&&ge.process,tt=function(){try{return Ge&&Ge.binding&&Ge.binding("util")}catch{}}(),mt=tt&&tt.isTypedArray;function vt(de,ke){for(var it=-1,Ke=de==null?0:de.length,Qr=0,fr=[];++it<Ke;){var yn=de[it];ke(yn,it,de)&&(fr[Qr++]=yn)}return fr}function gt(de,ke){for(var it=-1,Ke=ke.length,Qr=de.length;++it<Ke;)de[Qr+it]=ke[it];return de}function Lt(de,ke){for(var it=-1,Ke=de==null?0:de.length;++it<Ke;)if(ke(de[it],it,de))return!0;return!1}function Yt(de,ke){for(var it=-1,Ke=Array(de);++it<de;)Ke[it]=ke(it);return Ke}function _r(de){return function(ke){return de(ke)}}function Rt(de,ke){return de.has(ke)}function Pt(de,ke){return de==null?void 0:de[ke]}function kt(de){var ke=-1,it=Array(de.size);return de.forEach(function(Ke,Qr){it[++ke]=[Qr,Ke]}),it}function Nt(de,ke){return function(it){return de(ke(it))}}function Kt(de){var ke=-1,it=Array(de.size);return de.forEach(function(Ke){it[++ke]=Ke}),it}var Ut=Array.prototype,Vt=Function.prototype,$t=Object.prototype,Dt=te["__core-js_shared__"],qt=Vt.toString,Mt=$t.hasOwnProperty,cr=function(){var de=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||"");return de?"Symbol(src)_1."+de:""}(),tr=$t.toString,ir=RegExp("^"+qt.call(Mt).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nr=fe?te.Buffer:void 0,vr=te.Symbol,wn=te.Uint8Array,Yr=$t.propertyIsEnumerable,ai=Ut.splice,Dn=vr?vr.toStringTag:void 0,$n=Object.getOwnPropertySymbols,Kn=nr?nr.isBuffer:void 0,Ar=Nt(Object.keys,Object),Mr=qr(te,"DataView"),Er=qr(te,"Map"),_e=qr(te,"Promise"),ee=qr(te,"Set"),ve=qr(te,"WeakMap"),Re=qr(Object,"create"),ze=Ft(Mr),Xe=Ft(Er),st=Ft(_e),lt=Ft(ee),_t=Ft(ve),le=vr?vr.prototype:void 0,Z=le?le.valueOf:void 0;function ye(de){var ke=-1,it=de==null?0:de.length;for(this.clear();++ke<it;){var Ke=de[ke];this.set(Ke[0],Ke[1])}}function Me(){this.__data__=Re?Re(null):{},this.size=0}function Le(de){var ke=this.has(de)&&delete this.__data__[de];return this.size-=ke?1:0,ke}function wt(de){var ke=this.__data__;if(Re){var it=ke[de];return it===n?void 0:it}return Mt.call(ke,de)?ke[de]:void 0}function It(de){var ke=this.__data__;return Re?ke[de]!==void 0:Mt.call(ke,de)}function gr(de,ke){var it=this.__data__;return this.size+=this.has(de)?0:1,it[de]=Re&&ke===void 0?n:ke,this}ye.prototype.clear=Me,ye.prototype.delete=Le,ye.prototype.get=wt,ye.prototype.has=It,ye.prototype.set=gr;function lr(de){var ke=-1,it=de==null?0:de.length;for(this.clear();++ke<it;){var Ke=de[ke];this.set(Ke[0],Ke[1])}}function en(){this.__data__=[],this.size=0}function yr(de){var ke=this.__data__,it=re(ke,de);if(it<0)return!1;var Ke=ke.length-1;return it==Ke?ke.pop():ai.call(ke,it,1),--this.size,!0}function xr(de){var ke=this.__data__,it=re(ke,de);return it<0?void 0:ke[it][1]}function on(de){return re(this.__data__,de)>-1}function sr(de,ke){var it=this.__data__,Ke=re(it,de);return Ke<0?(++this.size,it.push([de,ke])):it[Ke][1]=ke,this}lr.prototype.clear=en,lr.prototype.delete=yr,lr.prototype.get=xr,lr.prototype.has=on,lr.prototype.set=sr;function Ur(de){var ke=-1,it=de==null?0:de.length;for(this.clear();++ke<it;){var Ke=de[ke];this.set(Ke[0],Ke[1])}}function gn(){this.size=0,this.__data__={hash:new ye,map:new(Er||lr),string:new ye}}function Br(de){var ke=_n(this,de).delete(de);return this.size-=ke?1:0,ke}function Zn(de){return _n(this,de).get(de)}function Ii(de){return _n(this,de).has(de)}function ei(de,ke){var it=_n(this,de),Ke=it.size;return it.set(de,ke),this.size+=it.size==Ke?0:1,this}Ur.prototype.clear=gn,Ur.prototype.delete=Br,Ur.prototype.get=Zn,Ur.prototype.has=Ii,Ur.prototype.set=ei;function Oi(de){var ke=-1,it=de==null?0:de.length;for(this.__data__=new Ur;++ke<it;)this.add(de[ke])}function Pi(de){return this.__data__.set(de,n),this}function oi(de){return this.__data__.has(de)}Oi.prototype.add=Oi.prototype.push=Pi,Oi.prototype.has=oi;function jn(de){var ke=this.__data__=new lr(de);this.size=ke.size}function ra(){this.__data__=new lr,this.size=0}function $i(de){var ke=this.__data__,it=ke.delete(de);return this.size=ke.size,it}function _a(de){return this.__data__.get(de)}function ss(de){return this.__data__.has(de)}function X(de,ke){var it=this.__data__;if(it instanceof lr){var Ke=it.__data__;if(!Er||Ke.length<r-1)return Ke.push([de,ke]),this.size=++it.size,this;it=this.__data__=new Ur(Ke)}return it.set(de,ke),this.size=it.size,this}jn.prototype.clear=ra,jn.prototype.delete=$i,jn.prototype.get=_a,jn.prototype.has=ss,jn.prototype.set=X;function me(de,ke){var it=xn(de),Ke=!it&&Ti(de),Qr=!it&&!Ke&&si(de),fr=!it&&!Ke&&!Qr&&vi(de),yn=it||Ke||Qr||fr,ar=yn?Yt(de.length,String):[],mr=ar.length;for(var ie in de)(ke||Mt.call(de,ie))&&!(yn&&(ie=="length"||Qr&&(ie=="offset"||ie=="parent")||fr&&(ie=="buffer"||ie=="byteLength"||ie=="byteOffset")||pe(ie,mr)))&&ar.push(ie);return ar}function re(de,ke){for(var it=de.length;it--;)if(Jt(de[it][0],ke))return it;return-1}function Ee(de,ke,it){var Ke=ke(de);return xn(de)?Ke:gt(Ke,it(de))}function be(de){return de==null?de===void 0?C:_:Dn&&Dn in Object(de)?P(de):At(de)}function Ie(de){return qi(de)&&be(de)==s}function Je(de,ke,it,Ke,Qr){return de===ke?!0:de==null||ke==null||!qi(de)&&!qi(ke)?de!==de&&ke!==ke:ft(de,ke,it,Ke,Je,Qr)}function ft(de,ke,it,Ke,Qr,fr){var yn=xn(de),ar=xn(ke),mr=yn?c:W(de),ie=ar?c:W(ke);mr=mr==s?b:mr,ie=ie==s?b:ie;var R=mr==b,oe=ie==b,we=mr==ie;if(we&&si(de)){if(!si(ke))return!1;yn=!0,R=!1}if(we&&!R)return fr||(fr=new jn),yn||vi(de)?zt(de,ke,it,Ke,Qr,fr):Rr(de,ke,mr,it,Ke,Qr,fr);if(!(it&i)){var se=R&&Mt.call(de,"__wrapped__"),Ae=oe&&Mt.call(ke,"__wrapped__");if(se||Ae){var Oe=se?de.value():de,Pe=Ae?ke.value():ke;return fr||(fr=new jn),Qr(Oe,Pe,it,Ke,fr)}}return we?(fr||(fr=new jn),Wr(de,ke,it,Ke,Qr,fr)):!1}function Qe(de){if(!po(de)||Ce(de))return!1;var ke=fn(de)?ir:L;return ke.test(Ft(de))}function We(de){return qi(de)&&mi(de.length)&&!!G[be(de)]}function ht(de){if(!rt(de))return Ar(de);var ke=[];for(var it in Object(de))Mt.call(de,it)&&it!="constructor"&&ke.push(it);return ke}function zt(de,ke,it,Ke,Qr,fr){var yn=it&i,ar=de.length,mr=ke.length;if(ar!=mr&&!(yn&&mr>ar))return!1;var ie=fr.get(de);if(ie&&fr.get(ke))return ie==ke;var R=-1,oe=!0,we=it&a?new Oi:void 0;for(fr.set(de,ke),fr.set(ke,de);++R<ar;){var se=de[R],Ae=ke[R];if(Ke)var Oe=yn?Ke(Ae,se,R,ke,de,fr):Ke(se,Ae,R,de,ke,fr);if(Oe!==void 0){if(Oe)continue;oe=!1;break}if(we){if(!Lt(ke,function(Pe,je){if(!Rt(we,je)&&(se===Pe||Qr(se,Pe,it,Ke,fr)))return we.push(je)})){oe=!1;break}}else if(!(se===Ae||Qr(se,Ae,it,Ke,fr))){oe=!1;break}}return fr.delete(de),fr.delete(ke),oe}function Rr(de,ke,it,Ke,Qr,fr,yn){switch(it){case ce:if(de.byteLength!=ke.byteLength||de.byteOffset!=ke.byteOffset)return!1;de=de.buffer,ke=ke.buffer;case B:return!(de.byteLength!=ke.byteLength||!fr(new wn(de),new wn(ke)));case f:case d:case y:return Jt(+de,+ke);case g:return de.name==ke.name&&de.message==ke.message;case I:case p:return de==ke+"";case v:var ar=kt;case E:var mr=Ke&i;if(ar||(ar=Kt),de.size!=ke.size&&!mr)return!1;var ie=yn.get(de);if(ie)return ie==ke;Ke|=a,yn.set(de,ke);var R=zt(ar(de),ar(ke),Ke,Qr,fr,yn);return yn.delete(de),R;case O:if(Z)return Z.call(de)==Z.call(ke)}return!1}function Wr(de,ke,it,Ke,Qr,fr){var yn=it&i,ar=jr(de),mr=ar.length,ie=jr(ke),R=ie.length;if(mr!=R&&!yn)return!1;for(var oe=mr;oe--;){var we=ar[oe];if(!(yn?we in ke:Mt.call(ke,we)))return!1}var se=fr.get(de);if(se&&fr.get(ke))return se==ke;var Ae=!0;fr.set(de,ke),fr.set(ke,de);for(var Oe=yn;++oe<mr;){we=ar[oe];var Pe=de[we],je=ke[we];if(Ke)var Ye=yn?Ke(je,Pe,we,ke,de,fr):Ke(Pe,je,we,de,ke,fr);if(!(Ye===void 0?Pe===je||Qr(Pe,je,it,Ke,fr):Ye)){Ae=!1;break}Oe||(Oe=we=="constructor")}if(Ae&&!Oe){var Ve=de.constructor,pt=ke.constructor;Ve!=pt&&"constructor"in de&&"constructor"in ke&&!(typeof Ve=="function"&&Ve instanceof Ve&&typeof pt=="function"&&pt instanceof pt)&&(Ae=!1)}return fr.delete(de),fr.delete(ke),Ae}function jr(de){return Ee(de,go,D)}function _n(de,ke){var it=de.__data__;return Se(ke)?it[typeof ke=="string"?"string":"hash"]:it.map}function qr(de,ke){var it=Pt(de,ke);return Qe(it)?it:void 0}function P(de){var ke=Mt.call(de,Dn),it=de[Dn];try{de[Dn]=void 0;var Ke=!0}catch{}var Qr=tr.call(de);return Ke&&(ke?de[Dn]=it:delete de[Dn]),Qr}var D=$n?function(de){return de==null?[]:(de=Object(de),vt($n(de),function(ke){return Yr.call(de,ke)}))}:tn,W=be;(Mr&&W(new Mr(new ArrayBuffer(1)))!=ce||Er&&W(new Er)!=v||_e&&W(_e.resolve())!=S||ee&&W(new ee)!=E||ve&&W(new ve)!=M)&&(W=function(de){var ke=be(de),it=ke==b?de.constructor:void 0,Ke=it?Ft(it):"";if(Ke)switch(Ke){case ze:return ce;case Xe:return v;case st:return S;case lt:return E;case _t:return M}return ke});function pe(de,ke){return ke=ke??o,!!ke&&(typeof de=="number"||k.test(de))&&de>-1&&de%1==0&&de<ke}function Se(de){var ke=typeof de;return ke=="string"||ke=="number"||ke=="symbol"||ke=="boolean"?de!=="__proto__":de===null}function Ce(de){return!!cr&&cr in de}function rt(de){var ke=de&&de.constructor,it=typeof ke=="function"&&ke.prototype||$t;return de===it}function At(de){return tr.call(de)}function Ft(de){if(de!=null){try{return qt.call(de)}catch{}try{return de+""}catch{}}return""}function Jt(de,ke){return de===ke||de!==de&&ke!==ke}var Ti=Ie(function(){return arguments}())?Ie:function(de){return qi(de)&&Mt.call(de,"callee")&&!Yr.call(de,"callee")},xn=Array.isArray;function St(de){return de!=null&&mi(de.length)&&!fn(de)}var si=Kn||Sr;function An(de,ke){return Je(de,ke)}function fn(de){if(!po(de))return!1;var ke=be(de);return ke==m||ke==w||ke==u||ke==x}function mi(de){return typeof de=="number"&&de>-1&&de%1==0&&de<=o}function po(de){var ke=typeof de;return de!=null&&(ke=="object"||ke=="function")}function qi(de){return de!=null&&typeof de=="object"}var vi=mt?_r(mt):We;function go(de){return St(de)?me(de):ht(de)}function tn(){return[]}function Sr(){return!1}t.exports=An})(t2,t2.exports);var v9e=t2.exports;const b9e=kc(v9e);function w9e(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var a=t.charAt(i),o=a.charCodeAt(0);if(r[o]!==255)throw new TypeError(a+" is ambiguous");r[o]=i}var s=t.length,c=t.charAt(0),u=Math.log(s)/Math.log(256),f=Math.log(256)/Math.log(s);function d(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var v=0,y=0,_=0,b=w.length;_!==b&&w[_]===0;)_++,v++;for(var S=(b-_)*f+1>>>0,x=new Uint8Array(S);_!==b;){for(var I=w[_],E=0,p=S-1;(I!==0||E<y)&&p!==-1;p--,E++)I+=256*x[p]>>>0,x[p]=I%s>>>0,I=I/s>>>0;if(I!==0)throw new Error("Non-zero carry");y=E,_++}for(var O=S-y;O!==S&&x[O]===0;)O++;for(var C=c.repeat(v);O<S;++O)C+=t.charAt(x[O]);return C}function g(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var v=0;if(w[v]!==" "){for(var y=0,_=0;w[v]===c;)y++,v++;for(var b=(w.length-v)*u+1>>>0,S=new Uint8Array(b);w[v];){var x=r[w.charCodeAt(v)];if(x===255)return;for(var I=0,E=b-1;(x!==0||I<_)&&E!==-1;E--,I++)x+=s*S[E]>>>0,S[E]=x%256>>>0,x=x/256>>>0;if(x!==0)throw new Error("Non-zero carry");_=I,v++}if(w[v]!==" "){for(var p=b-_;p!==b&&S[p]===0;)p++;for(var O=new Uint8Array(y+(b-p)),C=y;p!==b;)O[C++]=S[p++];return O}}}function m(w){var v=g(w);if(v)return v;throw new Error(`Non-${e} character`)}return{encode:d,decodeUnsafe:g,decode:m}}var _9e=w9e,E9e=_9e;const Joe=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},x9e=t=>new TextEncoder().encode(t),A9e=t=>new TextDecoder().decode(t);class S9e{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class I9e{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Xoe(this,e)}}class O9e{constructor(e){this.decoders=e}or(e){return Xoe(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Xoe=(t,e)=>new O9e({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let P9e=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new S9e(e,r,n),this.decoder=new I9e(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const _I=({name:t,prefix:e,encode:r,decode:n})=>new P9e(t,e,r,n),zw=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=E9e(r,e);return _I({prefix:t,name:e,encode:n,decode:a=>Joe(i(a))})},T9e=(t,e,r,n)=>{const i={};for(let f=0;f<e.length;++f)i[e[f]]=f;let a=t.length;for(;t[a-1]==="=";)--a;const o=new Uint8Array(a*r/8|0);let s=0,c=0,u=0;for(let f=0;f<a;++f){const d=i[t[f]];if(d===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|d,s+=r,s>=8&&(s-=8,o[u++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return o},R9e=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let a="",o=0,s=0;for(let c=0;c<t.length;++c)for(s=s<<8|t[c],o+=8;o>r;)o-=r,a+=e[i&s>>o];if(o&&(a+=e[i&s<<r-o]),n)for(;a.length*r&7;)a+="=";return a},wa=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>_I({prefix:e,name:t,encode(i){return R9e(i,n,r)},decode(i){return T9e(i,n,r,t)}}),C9e=_I({prefix:"\0",name:"identity",encode:t=>A9e(t),decode:t=>x9e(t)});var N9e=Object.freeze({__proto__:null,identity:C9e});const D9e=wa({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var $9e=Object.freeze({__proto__:null,base2:D9e});const M9e=wa({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var k9e=Object.freeze({__proto__:null,base8:M9e});const L9e=zw({prefix:"9",name:"base10",alphabet:"0123456789"});var U9e=Object.freeze({__proto__:null,base10:L9e});const B9e=wa({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),F9e=wa({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var j9e=Object.freeze({__proto__:null,base16:B9e,base16upper:F9e});const q9e=wa({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),H9e=wa({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),V9e=wa({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),z9e=wa({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),G9e=wa({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),W9e=wa({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),K9e=wa({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Y9e=wa({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Q9e=wa({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var J9e=Object.freeze({__proto__:null,base32:q9e,base32upper:H9e,base32pad:V9e,base32padupper:z9e,base32hex:G9e,base32hexupper:W9e,base32hexpad:K9e,base32hexpadupper:Y9e,base32z:Q9e});const X9e=zw({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Z9e=zw({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var e7e=Object.freeze({__proto__:null,base36:X9e,base36upper:Z9e});const t7e=zw({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),r7e=zw({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var n7e=Object.freeze({__proto__:null,base58btc:t7e,base58flickr:r7e});const i7e=wa({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),a7e=wa({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),o7e=wa({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),s7e=wa({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var c7e=Object.freeze({__proto__:null,base64:i7e,base64pad:a7e,base64url:o7e,base64urlpad:s7e});const Zoe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),u7e=Zoe.reduce((t,e,r)=>(t[r]=e,t),[]),l7e=Zoe.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function f7e(t){return t.reduce((e,r)=>(e+=u7e[r],e),"")}function d7e(t){const e=[];for(const r of t){const n=l7e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const h7e=_I({prefix:"🚀",name:"base256emoji",encode:f7e,decode:d7e});var p7e=Object.freeze({__proto__:null,base256emoji:h7e}),g7e=ese,rY=128,y7e=127,m7e=~y7e,v7e=Math.pow(2,31);function ese(t,e,r){e=e||[],r=r||0;for(var n=r;t>=v7e;)e[r++]=t&255|rY,t/=128;for(;t&m7e;)e[r++]=t&255|rY,t>>>=7;return e[r]=t|0,ese.bytes=r-n+1,e}var b7e=P4,w7e=128,nY=127;function P4(t,n){var r=0,n=n||0,i=0,a=n,o,s=t.length;do{if(a>=s)throw P4.bytes=0,new RangeError("Could not decode varint");o=t[a++],r+=i<28?(o&nY)<<i:(o&nY)*Math.pow(2,i),i+=7}while(o>=w7e);return P4.bytes=a-n,r}var _7e=Math.pow(2,7),E7e=Math.pow(2,14),x7e=Math.pow(2,21),A7e=Math.pow(2,28),S7e=Math.pow(2,35),I7e=Math.pow(2,42),O7e=Math.pow(2,49),P7e=Math.pow(2,56),T7e=Math.pow(2,63),R7e=function(t){return t<_7e?1:t<E7e?2:t<x7e?3:t<A7e?4:t<S7e?5:t<I7e?6:t<O7e?7:t<P7e?8:t<T7e?9:10},C7e={encode:g7e,decode:b7e,encodingLength:R7e},tse=C7e;const iY=(t,e,r=0)=>(tse.encode(t,e,r),e),aY=t=>tse.encodingLength(t),T4=(t,e)=>{const r=e.byteLength,n=aY(t),i=n+aY(r),a=new Uint8Array(i+r);return iY(t,a,0),iY(r,a,n),a.set(e,i),new N7e(t,r,e,a)};let N7e=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}};const rse=({name:t,code:e,encode:r})=>new D7e(t,e,r);let D7e=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?T4(this.code,r):r.then(n=>T4(this.code,n))}else throw Error("Unknown type, must be binary type")}};const nse=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),$7e=rse({name:"sha2-256",code:18,encode:nse("SHA-256")}),M7e=rse({name:"sha2-512",code:19,encode:nse("SHA-512")});var k7e=Object.freeze({__proto__:null,sha256:$7e,sha512:M7e});const ise=0,L7e="identity",ase=Joe,U7e=t=>T4(ise,ase(t)),B7e={code:ise,name:L7e,encode:ase,digest:U7e};var F7e=Object.freeze({__proto__:null,identity:B7e});new TextEncoder,new TextDecoder;const oY={...N9e,...$9e,...k9e,...U9e,...j9e,...J9e,...e7e,...n7e,...c7e,...p7e};({...k7e,...F7e});function ose(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function j7e(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?ose(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function sse(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const sY=sse("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),UN=sse("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=j7e(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),q7e={utf8:sY,"utf-8":sY,hex:oY.base16,latin1:UN,ascii:UN,binary:UN,...oY};function H7e(t,e="utf8"){const r=q7e[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?ose(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}const cse="wc",V7e=2,Kk="core",hd=`${cse}@2:${Kk}:`,z7e={name:Kk,logger:"error"},G7e={database:":memory:"},W7e="crypto",cY="client_ed25519_seed",K7e=Xt.ONE_DAY,Y7e="keychain",Q7e="0.3",J7e="messages",X7e="0.3",Z7e=Xt.SIX_HOURS,eUe="publisher",use="irn",tUe="error",lse="wss://relay.walletconnect.com",uY="wss://relay.walletconnect.org",rUe="relayer",Ba={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},nUe="_subscription",Wu={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},iUe=Xt.ONE_SECOND,aUe="2.10.4",oUe=1e4,sUe="0.3",cUe="WALLETCONNECT_CLIENT_ID",yc={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},uUe="subscription",lUe="0.3",fUe=Xt.FIVE_SECONDS*1e3,dUe="pairing",hUe="0.3",Uv={wc_pairingDelete:{req:{ttl:Xt.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Xt.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Xt.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Xt.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Xt.ONE_DAY,prompt:!1,tag:0},res:{ttl:Xt.ONE_DAY,prompt:!1,tag:0}}},Eb={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},Xc={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},pUe="history",gUe="0.3",yUe="expirer",Es={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},mUe="0.3",BN="verify-api",Q0="https://verify.walletconnect.com",R4="https://verify.walletconnect.org",vUe=[Q0,R4];let bUe=class{constructor(e,r){this.core=e,this.logger=r,this.keychain=new Map,this.name=Y7e,this.version=Q7e,this.initialized=!1,this.storagePrefix=hd,this.init=async()=>{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()},this.get=n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:a}=Tt("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(a)}return i},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=e,this.logger=un.generateChildLogger(r,this.name)}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,Roe(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Coe(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}}},wUe=class{constructor(e,r,n){this.core=e,this.logger=r,this.name=W7e,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=i=>(this.isInitialized(),this.keychain.has(i)),this.getClientId=async()=>{this.isInitialized();const i=await this.getClientSeed(),a=WK(i);return Hoe(a.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=WMe();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const a=await this.getClientSeed(),o=WK(a),s=I4();return await YLe(s,i,K7e,o)},this.generateSharedKey=(i,a,o)=>{this.isInitialized();const s=this.getPrivateKey(i),c=KMe(s,a);return this.setSymKey(c,o)},this.setSymKey=async(i,a)=>{this.isInitialized();const o=a||YMe(i);return await this.keychain.set(o,i),o},this.deleteKeyPair=async i=>{this.isInitialized(),await this.keychain.del(i)},this.deleteSymKey=async i=>{this.isInitialized(),await this.keychain.del(i)},this.encode=async(i,a,o)=>{this.isInitialized();const s=Toe(o),c=L1(a);if(_K(s)){const g=s.senderPublicKey,m=s.receiverPublicKey;i=await this.generateSharedKey(g,m)}const u=this.getSymKey(i),{type:f,senderPublicKey:d}=s;return JMe({type:f,symKey:u,message:c,senderPublicKey:d})},this.decode=async(i,a,o)=>{this.isInitialized();const s=eke(a,o);if(_K(s)){const c=s.receiverPublicKey,u=s.senderPublicKey;i=await this.generateSharedKey(c,u)}try{const c=this.getSymKey(i),u=XMe({symKey:c,encoded:a});return qk(u)}catch(c){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(c)}},this.getPayloadType=i=>{const a=XA(i);return Fw(a.type)},this.getPayloadSenderPublicKey=i=>{const a=XA(i);return a.senderPublicKey?uo(a.senderPublicKey,co):void 0},this.core=e,this.logger=un.generateChildLogger(r,this.name),this.keychain=n||new bUe(this.core,this.logger)}get context(){return un.getLoggerContext(this.logger)}async setPrivateKey(e,r){return await this.keychain.set(e,r),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(cY)}catch{e=I4(),await this.keychain.set(cY,e)}return H7e(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}}};class _Ue extends SLe{constructor(e,r){super(e,r),this.logger=e,this.core=r,this.messages=new Map,this.name=J7e,this.version=X7e,this.initialized=!1,this.storagePrefix=hd,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,i)=>{this.isInitialized();const a=wg(i);let o=this.messages.get(n);return typeof o>"u"&&(o={}),typeof o[a]<"u"||(o[a]=i,this.messages.set(n,o),await this.persist()),a},this.get=n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i},this.has=(n,i)=>{this.isInitialized();const a=this.get(n),o=wg(i);return typeof a[o]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=un.generateChildLogger(e,this.name),this.core=r}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,Roe(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Coe(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}}}let EUe=class extends ILe{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.events=new ho.EventEmitter,this.name=eUe,this.queue=new Map,this.publishTimeout=Xt.toMiliseconds(Xt.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(n,i,a)=>{var o;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:a}});try{const s=(a==null?void 0:a.ttl)||Z7e,c=O4(a),u=(a==null?void 0:a.prompt)||!1,f=(a==null?void 0:a.tag)||0,d=(a==null?void 0:a.id)||Koe().toString(),g={topic:n,message:i,opts:{ttl:s,relay:c,prompt:u,tag:f,id:d}},m=setTimeout(()=>this.queue.set(d,g),this.publishTimeout);try{await await k1(this.rpcPublish(n,i,s,c,u,f,d),this.publishTimeout,"Failed to publish payload, please try again."),this.removeRequestFromQueue(d),this.relayer.events.emit(Ba.publish,g)}catch(w){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,(o=a==null?void 0:a.internal)!=null&&o.throwOnFailedPublish)throw this.removeRequestFromQueue(d),w;return}finally{clearTimeout(m)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:a}})}catch(s){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(s),s}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.relayer=e,this.logger=un.generateChildLogger(r,this.name),this.registerEventListeners()}get context(){return un.getLoggerContext(this.logger)}rpcPublish(e,r,n,i,a,o,s){var c,u,f,d;const g={method:kx(i.protocol).publish,params:{topic:e,message:r,ttl:n,prompt:a,tag:o},id:s};return no((c=g.params)==null?void 0:c.prompt)&&((u=g.params)==null||delete u.prompt),no((f=g.params)==null?void 0:f.tag)&&((d=g.params)==null||delete d.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:g}),this.relayer.request(g)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:r,message:n,opts:i}=e;await this.publish(r,n,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(gm.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Ba.connection_stalled);return}this.checkQueue()}),this.relayer.on(Ba.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}},xUe=class{constructor(){this.map=new Map,this.set=(e,r)=>{const n=this.get(e);this.exists(e,r)||this.map.set(e,[...n,r])},this.get=e=>this.map.get(e)||[],this.exists=(e,r)=>this.get(e).includes(r),this.delete=(e,r)=>{if(typeof r>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,r))return;const i=n.filter(a=>a!==r);if(!i.length){this.map.delete(e);return}this.map.set(e,i)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}};var AUe=Object.defineProperty,SUe=Object.defineProperties,IUe=Object.getOwnPropertyDescriptors,lY=Object.getOwnPropertySymbols,OUe=Object.prototype.hasOwnProperty,PUe=Object.prototype.propertyIsEnumerable,fY=(t,e,r)=>e in t?AUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Bv=(t,e)=>{for(var r in e||(e={}))OUe.call(e,r)&&fY(t,r,e[r]);if(lY)for(var r of lY(e))PUe.call(e,r)&&fY(t,r,e[r]);return t},FN=(t,e)=>SUe(t,IUe(e));let TUe=class extends TLe{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.subscriptions=new Map,this.topicMap=new xUe,this.events=new ho.EventEmitter,this.name=uUe,this.version=lUe,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=hd,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const a=O4(i),o={topic:n,relay:a};this.pending.set(n,o);const s=await this.rpcSubscribe(n,a);return this.onSubscribe(s,o),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}}),s}catch(a){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(a),a}},this.unsubscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((i,a)=>{const o=new Xt.Watch;o.start(this.pendingSubscriptionWatchLabel);const s=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(s),o.stop(this.pendingSubscriptionWatchLabel),i(!0)),o.elapsed(this.pendingSubscriptionWatchLabel)>=fUe&&(clearInterval(s),o.stop(this.pendingSubscriptionWatchLabel),a(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=un.generateChildLogger(r,this.name),this.clientId=""}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,r){let n=!1;try{n=this.getSubscription(e).topic===r}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,r){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,r)))}async unsubscribeById(e,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}});try{const i=O4(n);await this.rpcUnsubscribe(e,r,i);const a=xi("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,r,a),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,r){const n={method:kx(r.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await k1(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Ba.connection_stalled)}return wg(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const r=e[0].relay,n={method:kx(r.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await k1(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Ba.connection_stalled)}}rpcUnsubscribe(e,r,n){const i={method:kx(n.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,r){this.setSubscription(e,FN(Bv({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,Bv({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(e,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,e)&&this.deleteSubscription(r,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,r){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:r}),this.addSubscription(e,r))}addSubscription(e,r){this.subscriptions.set(e,Bv({},r)),this.topicMap.set(r.topic,e),this.events.emit(yc.created,r)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const r=this.subscriptions.get(e);if(!r){const{message:n}=Tt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}deleteSubscription(e,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:r});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(yc.deleted,FN(Bv({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(yc.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r<e;r++){const n=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(n)}}this.events.emit(yc.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:r}=Tt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const r=await this.rpcBatchSubscribe(e);Su(r)&&this.onBatchSubscribe(r.map((n,i)=>FN(Bv({},e[i]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach(r=>{e.push(r)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(gm.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(Ba.connect,async()=>{await this.onConnect()}),this.relayer.on(Ba.disconnect,()=>{this.onDisconnect()}),this.events.on(yc.created,async e=>{const r=yc.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),await this.persist()}),this.events.on(yc.deleted,async e=>{const r=yc.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const r=setInterval(()=>{this.restartInProgress||(clearInterval(r),e())},this.pollingInterval)})}};var RUe=Object.defineProperty,dY=Object.getOwnPropertySymbols,CUe=Object.prototype.hasOwnProperty,NUe=Object.prototype.propertyIsEnumerable,hY=(t,e,r)=>e in t?RUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,DUe=(t,e)=>{for(var r in e||(e={}))CUe.call(e,r)&&hY(t,r,e[r]);if(dY)for(var r of dY(e))NUe.call(e,r)&&hY(t,r,e[r]);return t};let $Ue=class extends OLe{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new ho.EventEmitter,this.name=rUe,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=async r=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(r)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.onPayloadHandler=r=>{this.onProviderPayload(r)},this.onConnectHandler=()=>{this.events.emit(Ba.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=r=>{this.logger.error(r),this.events.emit(Ba.error,r),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Wu.payload,this.onPayloadHandler),this.provider.on(Wu.connect,this.onConnectHandler),this.provider.on(Wu.disconnect,this.onDisconnectHandler),this.provider.on(Wu.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?un.generateChildLogger(e.logger,this.name):un.pino(un.getDefaultLoggerOptions({level:e.logger||tUe})),this.messages=new _Ue(this.logger,e.core),this.subscriber=new TUe(this,this.logger),this.publisher=new EUe(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||lse,this.projectId=e.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${uY}...`),await this.restartTransport(uY)}this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},oUe)}get context(){return un.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,r,n){this.isInitialized(),await this.publisher.publish(e,r,n),await this.recordMessageEvent({topic:e,message:r,publishedAt:Date.now()})}async subscribe(e,r){var n;this.isInitialized();let i=((n=this.subscriber.topicMap.get(e))==null?void 0:n[0])||"";if(i)return i;let a;const o=s=>{s.topic===e&&(this.subscriber.off(yc.created,o),a())};return await Promise.all([new Promise(s=>{a=s,this.subscriber.on(yc.created,o)}),new Promise(async s=>{i=await this.subscriber.subscribe(e,r),s()})]),i}async unsubscribe(e,r){this.isInitialized(),await this.subscriber.unsubscribe(e,r)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async transportClose(){this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await k1(this.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise(r=>{if(!this.initialized)return r();this.subscriber.once(yc.resubscribed,()=>{r()})}),new Promise(async(r,n)=>{try{await k1(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(i){n(i);return}r()})])}catch(r){this.logger.error(r);const n=r;if(!this.isConnectionStalled(n.message))throw r;this.provider.events.emit(Wu.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await CK())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some(r=>e.includes(r))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Gl(new m9e(fke({sdkVersion:aUe,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:r,message:n}=e;await this.messages.set(r,n)}async shouldIgnoreMessageEvent(e){const{topic:r,message:n}=e;if(!n||n.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(r))return this.logger.debug(`Ignoring message for non-subscribed topic ${r}`),!0;const i=this.messages.has(r,n);return i&&this.logger.debug(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),Wk(e)){if(!e.method.endsWith(nUe))return;const r=e.params,{topic:n,message:i,publishedAt:a}=r.data,o={topic:n,message:i,publishedAt:a};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(DUe({type:"event",event:r.id},o)),this.events.emit(r.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else wI(e)&&this.events.emit(Ba.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Ba.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const r=Gk(e.id,!0);await this.provider.connection.send(r)}unregisterProviderListeners(){this.provider.off(Wu.payload,this.onPayloadHandler),this.provider.off(Wu.connect,this.onConnectHandler),this.provider.off(Wu.disconnect,this.onDisconnectHandler),this.provider.off(Wu.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(Ba.connection_stalled,()=>{this.restartTransport().catch(r=>this.logger.error(r))});let e=await CK();nLe(async r=>{this.initialized&&e!==r&&(e=r,r?await this.restartTransport().catch(n=>this.logger.error(n)):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch(n=>this.logger.error(n))))})}onProviderDisconnect(){this.events.emit(Ba.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout(async()=>{await this.restartTransport().catch(e=>this.logger.error(e))},Xt.toMiliseconds(iUe)))}isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise(e=>{const r=setInterval(()=>{this.connected&&(clearInterval(r),e())},this.connectionStatusPollingInterval)});await this.restartTransport()}}};var MUe=Object.defineProperty,pY=Object.getOwnPropertySymbols,kUe=Object.prototype.hasOwnProperty,LUe=Object.prototype.propertyIsEnumerable,gY=(t,e,r)=>e in t?MUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,yY=(t,e)=>{for(var r in e||(e={}))kUe.call(e,r)&&gY(t,r,e[r]);if(pY)for(var r of pY(e))LUe.call(e,r)&&gY(t,r,e[r]);return t};let EI=class extends PLe{constructor(e,r,n,i=hd,a=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,this.map=new Map,this.version=sUe,this.cached=[],this.initialized=!1,this.storagePrefix=hd,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!no(o)?this.map.set(this.getKey(o),o):$ke(o)?this.map.set(o.id,o):Mke(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)},this.set=async(o,s)=>{this.isInitialized(),this.map.has(o)?await this.update(o,s):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:s}),this.map.set(o,s),await this.persist())},this.get=o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o)),this.getAll=o=>(this.isInitialized(),o?this.values.filter(s=>Object.keys(o).every(c=>b9e(s[c],o[c]))):this.values),this.update=async(o,s)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:s});const c=yY(yY({},this.getData(o)),s);this.map.set(o,c),await this.persist()},this.delete=async(o,s)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:s}),this.map.delete(o),await this.persist())},this.logger=un.generateChildLogger(r,this.name),this.storagePrefix=i,this.getKey=a}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const r=this.map.get(e);if(!r){const{message:n}=Tt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:r}=Tt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}}},UUe=class{constructor(e,r){this.core=e,this.logger=r,this.name=dUe,this.version=hUe,this.events=new uk,this.initialized=!1,this.storagePrefix=hd,this.ignoredPayloadTypes=[Dp],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=I4(),i=await this.core.crypto.setSymKey(n),a=Ec(Xt.FIVE_MINUTES),o={protocol:use},s={topic:i,expiry:a,relay:o,active:!1},c=Ake({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:n,relay:o});return await this.pairings.set(i,s),await this.core.relayer.subscribe(i),this.core.expirer.set(i,a),{topic:i,uri:c}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:i,symKey:a,relay:o}=_ke(n.uri);let s;if(this.pairings.keys.includes(i)&&(s=this.pairings.get(i),s.active))throw new Error(`Pairing already exists: ${i}. Please try again with a new connection URI.`);this.core.crypto.keychain.has(i)||(await this.core.crypto.setSymKey(a,i),await this.core.relayer.subscribe(i,{relay:o}));const c=Ec(Xt.FIVE_MINUTES),u={topic:i,relay:o,expiry:c,active:!1};return await this.pairings.set(i,u),this.core.expirer.set(i,c),n.activatePairing&&await this.activate({topic:i}),this.events.emit(Eb.create,u),u},this.activate=async({topic:n})=>{this.isInitialized();const i=Ec(Xt.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:i}),this.core.expirer.set(n,i)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:i}=n;if(this.pairings.keys.includes(i)){const a=await this.sendRequest(i,"wc_pairingPing",{}),{done:o,resolve:s,reject:c}=k0();this.events.once(Ri("pairing_ping",a),({error:u})=>{u?c(u):s()}),await o()}},this.updateExpiry=async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})},this.updateMetadata=async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",xi("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(n,i,a)=>{const o=Eg(i,a),s=await this.core.crypto.encode(n,o),c=Uv[i].req;return this.core.history.set(n,o),this.core.relayer.publish(n,s,c),o.id},this.sendResult=async(n,i,a)=>{const o=Gk(n,a),s=await this.core.crypto.encode(i,o),c=await this.core.history.get(i,n),u=Uv[c.request.method].res;await this.core.relayer.publish(i,s,u),await this.core.history.resolve(o)},this.sendError=async(n,i,a)=>{const o=bI(n,a),s=await this.core.crypto.encode(i,o),c=await this.core.history.get(i,n),u=Uv[c.request.method]?Uv[c.request.method].res:Uv.unregistered_method.res;await this.core.relayer.publish(i,s,u),await this.core.history.resolve(o)},this.deletePairing=async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,xi("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(i=>xf(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=n=>{const{topic:i,payload:a}=n;switch(a.method){case"wc_pairingPing":return this.onPairingPingRequest(i,a);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,a);default:return this.onUnknownRpcMethodRequest(i,a)}},this.onRelayEventResponse=async n=>{const{topic:i,payload:a}=n,o=(await this.core.history.get(i,a.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(i,a);default:return this.onUnknownRpcMethodResponse(o)}},this.onPairingPingRequest=async(n,i)=>{const{id:a}=i;try{this.isValidPing({topic:n}),await this.sendResult(a,n,!0),this.events.emit(Eb.ping,{id:a,topic:n})}catch(o){await this.sendError(a,n,o),this.logger.error(o)}},this.onPairingPingResponse=(n,i)=>{const{id:a}=i;setTimeout(()=>{el(i)?this.events.emit(Ri("pairing_ping",a),{}):xc(i)&&this.events.emit(Ri("pairing_ping",a),{error:i.error})},500)},this.onPairingDeleteRequest=async(n,i)=>{const{id:a}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(Eb.delete,{id:a,topic:n})}catch(o){await this.sendError(a,n,o),this.logger.error(o)}},this.onUnknownRpcMethodRequest=async(n,i)=>{const{id:a,method:o}=i;try{if(this.registeredMethods.includes(o))return;const s=xi("WC_METHOD_UNSUPPORTED",o);await this.sendError(a,n,s),this.logger.error(s)}catch(s){await this.sendError(a,n,s),this.logger.error(s)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(xi("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!Eo(n)){const{message:i}=Tt("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(i)}if(!Dke(n.uri)){const{message:i}=Tt("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(i)}},this.isValidPing=async n=>{if(!Eo(n)){const{message:a}=Tt("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(a)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidDisconnect=async n=>{if(!Eo(n)){const{message:a}=Tt("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(a)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async n=>{if(!Qi(n,!1)){const{message:i}=Tt("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=Tt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(xf(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=Tt("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}},this.core=e,this.logger=un.generateChildLogger(r,this.name),this.pairings=new EI(this.core,this.logger,this.name,this.storagePrefix)}get context(){return un.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Ba.message,async e=>{const{topic:r,message:n}=e;if(!this.pairings.keys.includes(r)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const i=await this.core.crypto.decode(r,n);try{Wk(i)?(this.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):wI(i)&&(await this.core.history.resolve(i),await this.onRelayEventResponse({topic:r,payload:i}),this.core.history.delete(r,i.id))}catch(a){this.logger.error(a)}})}registerExpirerEvents(){this.core.expirer.on(Es.expired,async e=>{const{topic:r}=Doe(e.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit(Eb.expire,{topic:r}))})}},BUe=class extends ALe{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.records=new Map,this.events=new ho.EventEmitter,this.name=pUe,this.version=gUe,this.cached=[],this.initialized=!1,this.storagePrefix=hd,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,i,a)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:a}),this.records.has(i.id))return;const o={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:a,expiry:Ec(Xt.THIRTY_DAYS)};this.records.set(o.id,o),this.events.emit(Xc.created,o)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=xc(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.events.emit(Xc.updated,i))},this.get=async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i)),this.delete=(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(a=>{if(a.topic===n){if(typeof i<"u"&&a.id!==i)return;this.records.delete(a.id),this.events.emit(Xc.deleted,a)}})},this.exists=async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=un.generateChildLogger(r,this.name)}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const n={topic:r.topic,request:Eg(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const r=this.records.get(e);if(!r){const{message:n}=Tt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Xc.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:r}=Tt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Xc.created,e=>{const r=Xc.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(Xc.updated,e=>{const r=Xc.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(Xc.deleted,e=>{const r=Xc.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.core.heartbeat.on(gm.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{Xt.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))})}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}}},FUe=class extends RLe{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.expirations=new Map,this.events=new ho.EventEmitter,this.name=yUe,this.version=mUe,this.cached=[],this.initialized=!1,this.storagePrefix=hd,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(n,i)=>{this.isInitialized();const a=this.formatTarget(n),o={target:a,expiry:i};this.expirations.set(a,o),this.checkExpiry(a,o),this.events.emit(Es.created,{target:a,expiration:o})},this.get=n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)},this.del=n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),a=this.getExpiration(i);this.expirations.delete(i),this.events.emit(Es.deleted,{target:i,expiration:a})}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=un.generateChildLogger(r,this.name)}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return dke(e);if(typeof e=="number")return hke(e);const{message:r}=Tt("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(r)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Es.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:r}=Tt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const r=this.expirations.get(e);if(!r){const{message:n}=Tt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}checkExpiry(e,r){const{expiry:n}=r;Xt.toMiliseconds(n)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(Es.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(gm.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Es.created,e=>{const r=Es.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(Es.expired,e=>{const r=Es.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(Es.deleted,e=>{const r=Es.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}}},jUe=class extends CLe{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,this.name=BN,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async n=>{if(this.verifyDisabled||jw()||!qw())return;const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);this.verifyUrl!==i&&this.removeIframe(),this.verifyUrl=i;try{await this.createIframe()}catch(a){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(a)}if(!this.initialized){this.removeIframe(),this.verifyUrl=R4;try{await this.createIframe()}catch(a){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(a),this.verifyDisabled=!0}}},this.register=async n=>{this.initialized?this.sendPost(n.attestationId):(this.addToQueue(n.attestationId),await this.init())},this.resolve=async n=>{if(this.isDevEnv)return"";const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);let a;try{a=await this.fetchAttestation(n.attestationId,i)}catch(o){this.logger.info(`failed to resolve attestation: ${n.attestationId} from url: ${i}`),this.logger.info(o),a=await this.fetchAttestation(n.attestationId,R4)}return a},this.fetchAttestation=async(n,i)=>{this.logger.info(`resolving attestation: ${n} from url: ${i}`);const a=this.startAbortTimer(Xt.ONE_SECOND*2),o=await fetch(`${i}/attestation/${n}`,{signal:this.abortController.signal});return clearTimeout(a),o.status===200?await o.json():void 0},this.addToQueue=n=>{this.queue.push(n)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(n=>this.sendPost(n)),this.queue=[])},this.sendPost=n=>{var i;try{if(!this.iframe)return;(i=this.iframe.contentWindow)==null||i.postMessage(n,"*"),this.logger.info(`postMessage sent: ${n} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let n;const i=a=>{a.data==="verify_ready"&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",i),n())};await Promise.race([new Promise(a=>{if(document.getElementById(BN))return a();window.addEventListener("message",i);const o=document.createElement("iframe");o.id=BN,o.src=`${this.verifyUrl}/${this.projectId}`,o.style.display="none",document.body.append(o),this.iframe=o,n=a}),new Promise((a,o)=>setTimeout(()=>{window.removeEventListener("message",i),o("verify iframe load timeout")},Xt.toMiliseconds(Xt.FIVE_SECONDS)))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=n=>{let i=n||Q0;return vUe.includes(i)||(this.logger.info(`verify url: ${i}, not included in trusted list, assigning default: ${Q0}`),i=Q0),i},this.logger=un.generateChildLogger(r,this.name),this.verifyUrl=Q0,this.abortController=new AbortController,this.isDevEnv=Bk()&&{}.IS_VITEST}get context(){return un.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),Xt.toMiliseconds(e))}};var qUe=Object.defineProperty,mY=Object.getOwnPropertySymbols,HUe=Object.prototype.hasOwnProperty,VUe=Object.prototype.propertyIsEnumerable,vY=(t,e,r)=>e in t?qUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,bY=(t,e)=>{for(var r in e||(e={}))HUe.call(e,r)&&vY(t,r,e[r]);if(mY)for(var r of mY(e))VUe.call(e,r)&&vY(t,r,e[r]);return t};let zUe=class fse extends xLe{constructor(e){super(e),this.protocol=cse,this.version=V7e,this.name=Kk,this.events=new ho.EventEmitter,this.initialized=!1,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||lse,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const r=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:un.pino(un.getDefaultLoggerOptions({level:(e==null?void 0:e.logger)||z7e.logger}));this.logger=un.generateChildLogger(r,this.name),this.heartbeat=new gm.HeartBeat,this.crypto=new wUe(this,this.logger,e==null?void 0:e.keychain),this.history=new BUe(this,this.logger),this.expirer=new FUe(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new pLe(bY(bY({},G7e),e==null?void 0:e.storageOptions)),this.relayer=new $Ue({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new UUe(this,this.logger),this.verify=new jUe(this.projectId||"",this.logger)}static async init(e){const r=new fse(e);await r.initialize();const n=await r.crypto.getClientId();return await r.storage.setItem(cUe,n),r}get context(){return un.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}};const GUe=zUe,dse="wc",hse=2,pse="client",Yk=`${dse}@${hse}:${pse}:`,jN={name:pse,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},wY="WALLETCONNECT_DEEPLINK_CHOICE",WUe="proposal",gse="Proposal expired",KUe="session",TE=Xt.SEVEN_DAYS,YUe="engine",Fv={wc_sessionPropose:{req:{ttl:Xt.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Xt.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Xt.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Xt.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Xt.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Xt.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Xt.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Xt.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Xt.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Xt.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Xt.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Xt.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Xt.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Xt.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Xt.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Xt.THIRTY_SECONDS,prompt:!1,tag:1115}}},qN={min:Xt.FIVE_MINUTES,max:Xt.SEVEN_DAYS},Ku={idle:"IDLE",active:"ACTIVE"},QUe="request",JUe=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var XUe=Object.defineProperty,ZUe=Object.defineProperties,eBe=Object.getOwnPropertyDescriptors,_Y=Object.getOwnPropertySymbols,tBe=Object.prototype.hasOwnProperty,rBe=Object.prototype.propertyIsEnumerable,EY=(t,e,r)=>e in t?XUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_o=(t,e)=>{for(var r in e||(e={}))tBe.call(e,r)&&EY(t,r,e[r]);if(_Y)for(var r of _Y(e))rBe.call(e,r)&&EY(t,r,e[r]);return t},jv=(t,e)=>ZUe(t,eBe(e));class nBe extends DLe{constructor(e){super(e),this.name=YUe,this.events=new uk,this.initialized=!1,this.ignoredPayloadTypes=[Dp],this.requestQueue={state:Ku.idle,queue:[]},this.sessionRequestQueue={state:Ku.idle,queue:[]},this.requestQueueDelay=Xt.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(Fv)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},Xt.toMiliseconds(this.requestQueueDelay)))},this.connect=async r=>{await this.isInitialized();const n=jv(_o({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:i,requiredNamespaces:a,optionalNamespaces:o,sessionProperties:s,relays:c}=n;let u=i,f,d=!1;if(u&&(d=this.client.core.pairing.pairings.get(u).active),!u||!d){const{topic:S,uri:x}=await this.client.core.pairing.create();u=S,f=x}const g=await this.client.core.crypto.generateKeyPair(),m=_o({requiredNamespaces:a,optionalNamespaces:o,relays:c??[{protocol:use}],proposer:{publicKey:g,metadata:this.client.metadata}},s&&{sessionProperties:s}),{reject:w,resolve:v,done:y}=k0(Xt.FIVE_MINUTES,gse);if(this.events.once(Ri("session_connect"),async({error:S,session:x})=>{if(S)w(S);else if(x){x.self.publicKey=g;const I=jv(_o({},x),{requiredNamespaces:x.requiredNamespaces,optionalNamespaces:x.optionalNamespaces});await this.client.session.set(x.topic,I),await this.setExpiry(x.topic,x.expiry),u&&await this.client.core.pairing.updateMetadata({topic:u,metadata:x.peer.metadata}),v(I)}}),!u){const{message:S}=Tt("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(S)}const _=await this.sendRequest({topic:u,method:"wc_sessionPropose",params:m}),b=Ec(Xt.FIVE_MINUTES);return await this.setProposal(_,_o({id:_,expiry:b},m)),{uri:f,approval:y}},this.pair=async r=>(await this.isInitialized(),await this.client.core.pairing.pair(r)),this.approve=async r=>{await this.isInitialized(),await this.isValidApprove(r);const{id:n,relayProtocol:i,namespaces:a,sessionProperties:o}=r,s=this.client.proposal.get(n);let{pairingTopic:c,proposer:u,requiredNamespaces:f,optionalNamespaces:d}=s;c=c||"",_g(f)||(f=Pke(a,"approve()"));const g=await this.client.core.crypto.generateKeyPair(),m=u.publicKey,w=await this.client.core.crypto.generateSharedKey(g,m);c&&n&&(await this.client.core.pairing.updateMetadata({topic:c,metadata:u.metadata}),await this.sendResult({id:n,topic:c,result:{relay:{protocol:i??"irn"},responderPublicKey:g}}),await this.client.proposal.delete(n,xi("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:c}));const v=_o({relay:{protocol:i??"irn"},namespaces:a,requiredNamespaces:f,optionalNamespaces:d,pairingTopic:c,controller:{publicKey:g,metadata:this.client.metadata},expiry:Ec(TE)},o&&{sessionProperties:o});await this.client.core.relayer.subscribe(w),await this.sendRequest({topic:w,method:"wc_sessionSettle",params:v,throwOnFailedPublish:!0});const y=jv(_o({},v),{topic:w,pairingTopic:c,acknowledged:!1,self:v.controller,peer:{publicKey:u.publicKey,metadata:u.metadata},controller:g});return await this.client.session.set(w,y),await this.setExpiry(w,Ec(TE)),{topic:w,acknowledged:()=>new Promise(_=>setTimeout(()=>_(this.client.session.get(w)),500))}},this.reject=async r=>{await this.isInitialized(),await this.isValidReject(r);const{id:n,reason:i}=r,{pairingTopic:a}=this.client.proposal.get(n);a&&(await this.sendError(n,a,i),await this.client.proposal.delete(n,xi("USER_DISCONNECTED")))},this.update=async r=>{await this.isInitialized(),await this.isValidUpdate(r);const{topic:n,namespaces:i}=r,a=await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i}}),{done:o,resolve:s,reject:c}=k0();return this.events.once(Ri("session_update",a),({error:u})=>{u?c(u):s()}),await this.client.session.update(n,{namespaces:i}),{acknowledged:o}},this.extend=async r=>{await this.isInitialized(),await this.isValidExtend(r);const{topic:n}=r,i=await this.sendRequest({topic:n,method:"wc_sessionExtend",params:{}}),{done:a,resolve:o,reject:s}=k0();return this.events.once(Ri("session_extend",i),({error:c})=>{c?s(c):o()}),await this.setExpiry(n,Ec(TE)),{acknowledged:a}},this.request=async r=>{await this.isInitialized(),await this.isValidRequest(r);const{chainId:n,request:i,topic:a,expiry:o}=r,s=zk(),{done:c,resolve:u,reject:f}=k0(o,"Request expired. Please try again.");return this.events.once(Ri("session_request",s),({error:d,result:g})=>{d?f(d):u(g)}),await Promise.all([new Promise(async d=>{await this.sendRequest({clientRpcId:s,topic:a,method:"wc_sessionRequest",params:{request:i,chainId:n},expiry:o,throwOnFailedPublish:!0}).catch(g=>f(g)),this.client.events.emit("session_request_sent",{topic:a,request:i,chainId:n,id:s}),d()}),new Promise(async d=>{const g=await this.client.core.storage.getItem(wY);pke({id:s,topic:a,wcDeepLink:g}),d()}),c()]).then(d=>d[2])},this.respond=async r=>{await this.isInitialized(),await this.isValidRespond(r);const{topic:n,response:i}=r,{id:a}=i;el(i)?await this.sendResult({id:a,topic:n,result:i.result,throwOnFailedPublish:!0}):xc(i)&&await this.sendError(a,n,i.error),this.cleanupAfterResponse(r)},this.ping=async r=>{await this.isInitialized(),await this.isValidPing(r);const{topic:n}=r;if(this.client.session.keys.includes(n)){const i=await this.sendRequest({topic:n,method:"wc_sessionPing",params:{}}),{done:a,resolve:o,reject:s}=k0();this.events.once(Ri("session_ping",i),({error:c})=>{c?s(c):o()}),await a()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async r=>{await this.isInitialized(),await this.isValidEmit(r);const{topic:n,event:i,chainId:a}=r;await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:a}})},this.disconnect=async r=>{await this.isInitialized(),await this.isValidDisconnect(r);const{topic:n}=r;this.client.session.keys.includes(n)?(await this.sendRequest({topic:n,method:"wc_sessionDelete",params:xi("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession(n)):await this.client.core.pairing.disconnect({topic:n})},this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(n=>Cke(n,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async r=>{if(r.pairingTopic)try{const n=this.client.core.pairing.pairings.get(r.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(a=>{var o,s;return((o=a.peerMetadata)==null?void 0:o.url)&&((s=a.peerMetadata)==null?void 0:s.url)===r.peer.metadata.url&&a.topic&&a.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(a=>this.client.core.pairing.disconnect({topic:a.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async(r,n)=>{const{self:i}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),this.client.session.delete(r,xi("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(i.publicKey)&&await this.client.core.crypto.deleteKeyPair(i.publicKey),this.client.core.crypto.keychain.has(r)&&await this.client.core.crypto.deleteSymKey(r),n||this.client.core.expirer.del(r),this.client.core.storage.removeItem(wY).catch(a=>this.client.logger.warn(a))},this.deleteProposal=async(r,n)=>{await Promise.all([this.client.proposal.delete(r,xi("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deletePendingSessionRequest=async(r,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(a=>a.id!==r),i&&(this.sessionRequestQueue.state=Ku.idle)},this.setExpiry=async(r,n)=>{this.client.session.keys.includes(r)&&await this.client.session.update(r,{expiry:n}),this.client.core.expirer.set(r,n)},this.setProposal=async(r,n)=>{await this.client.proposal.set(r,n),this.client.core.expirer.set(r,n.expiry)},this.setPendingSessionRequest=async r=>{const n=Fv.wc_sessionRequest.req.ttl,{id:i,topic:a,params:o,verifyContext:s}=r;await this.client.pendingRequest.set(i,{id:i,topic:a,params:o,verifyContext:s}),n&&this.client.core.expirer.set(i,Ec(n))},this.sendRequest=async r=>{const{topic:n,method:i,params:a,expiry:o,relayRpcId:s,clientRpcId:c,throwOnFailedPublish:u}=r,f=Eg(i,a,c);if(qw()&&JUe.includes(i)){const m=wg(JSON.stringify(f));this.client.core.verify.register({attestationId:m})}const d=await this.client.core.crypto.encode(n,f),g=Fv[i].req;return o&&(g.ttl=o),s&&(g.id=s),this.client.core.history.set(n,f),u?(g.internal=jv(_o({},g.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,d,g)):this.client.core.relayer.publish(n,d,g).catch(m=>this.client.logger.error(m)),f.id},this.sendResult=async r=>{const{id:n,topic:i,result:a,throwOnFailedPublish:o}=r,s=Gk(n,a),c=await this.client.core.crypto.encode(i,s),u=await this.client.core.history.get(i,n),f=Fv[u.request.method].res;o?(f.internal=jv(_o({},f.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,c,f)):this.client.core.relayer.publish(i,c,f).catch(d=>this.client.logger.error(d)),await this.client.core.history.resolve(s)},this.sendError=async(r,n,i)=>{const a=bI(r,i),o=await this.client.core.crypto.encode(n,a),s=await this.client.core.history.get(n,r),c=Fv[s.request.method].res;this.client.core.relayer.publish(n,o,c),await this.client.core.history.resolve(a)},this.cleanup=async()=>{const r=[],n=[];this.client.session.getAll().forEach(i=>{xf(i.expiry)&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{xf(i.expiry)&&n.push(i.id)}),await Promise.all([...r.map(i=>this.deleteSession(i)),...n.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=async r=>{this.requestQueue.queue.push(r),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===Ku.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=Ku.active;const r=this.requestQueue.queue.shift();if(r)try{this.processRequest(r),await new Promise(n=>setTimeout(n,300))}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=Ku.idle},this.processRequest=r=>{const{topic:n,payload:i}=r,a=i.method;switch(a){case"wc_sessionPropose":return this.onSessionProposeRequest(n,i);case"wc_sessionSettle":return this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return this.onSessionExtendRequest(n,i);case"wc_sessionPing":return this.onSessionPingRequest(n,i);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return this.onSessionRequest(n,i);case"wc_sessionEvent":return this.onSessionEventRequest(n,i);default:return this.client.logger.info(`Unsupported request method ${a}`)}},this.onRelayEventResponse=async r=>{const{topic:n,payload:i}=r,a=(await this.client.core.history.get(n,i.id)).request.method;switch(a){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${a}`)}},this.onRelayEventUnknownPayload=r=>{const{topic:n}=r,{message:i}=Tt("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)},this.onSessionProposeRequest=async(r,n)=>{const{params:i,id:a}=n;try{this.isValidConnect(_o({},n.params));const o=Ec(Xt.FIVE_MINUTES),s=_o({id:a,pairingTopic:r,expiry:o},i);await this.setProposal(a,s);const c=wg(JSON.stringify(n)),u=await this.getVerifyContext(c,s.proposer.metadata);this.client.events.emit("session_proposal",{id:a,params:s,verifyContext:u})}catch(o){await this.sendError(a,r,o),this.client.logger.error(o)}},this.onSessionProposeResponse=async(r,n)=>{const{id:i}=n;if(el(n)){const{result:a}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:a});const o=this.client.proposal.get(i);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:o});const s=o.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:s});const c=a.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:c});const u=await this.client.core.crypto.generateSharedKey(s,c);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:u});const f=await this.client.core.relayer.subscribe(u);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:f}),await this.client.core.pairing.activate({topic:r})}else xc(n)&&(await this.client.proposal.delete(i,xi("USER_DISCONNECTED")),this.events.emit(Ri("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(r,n)=>{const{id:i,params:a}=n;try{this.isValidSessionSettleRequest(a);const{relay:o,controller:s,expiry:c,namespaces:u,requiredNamespaces:f,optionalNamespaces:d,sessionProperties:g,pairingTopic:m}=n.params,w=_o({topic:r,relay:o,expiry:c,namespaces:u,acknowledged:!0,pairingTopic:m,requiredNamespaces:f,optionalNamespaces:d,controller:s.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:s.publicKey,metadata:s.metadata}},g&&{sessionProperties:g});await this.sendResult({id:n.id,topic:r,result:!0}),this.events.emit(Ri("session_connect"),{session:w}),this.cleanupDuplicatePairings(w)}catch(o){await this.sendError(i,r,o),this.client.logger.error(o)}},this.onSessionSettleResponse=async(r,n)=>{const{id:i}=n;el(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(Ri("session_approve",i),{})):xc(n)&&(await this.client.session.delete(r,xi("USER_DISCONNECTED")),this.events.emit(Ri("session_approve",i),{error:n.error}))},this.onSessionUpdateRequest=async(r,n)=>{const{params:i,id:a}=n;try{const o=`${r}_session_update`,s=PE.get(o);if(s&&this.isRequestOutOfSync(s,a)){this.client.logger.info(`Discarding out of sync request - ${a}`);return}this.isValidUpdate(_o({topic:r},i)),await this.client.session.update(r,{namespaces:i.namespaces}),await this.sendResult({id:a,topic:r,result:!0}),this.client.events.emit("session_update",{id:a,topic:r,params:i}),PE.set(o,a)}catch(o){await this.sendError(a,r,o),this.client.logger.error(o)}},this.isRequestOutOfSync=(r,n)=>parseInt(n.toString().slice(0,-3))<=parseInt(r.toString().slice(0,-3)),this.onSessionUpdateResponse=(r,n)=>{const{id:i}=n;el(n)?this.events.emit(Ri("session_update",i),{}):xc(n)&&this.events.emit(Ri("session_update",i),{error:n.error})},this.onSessionExtendRequest=async(r,n)=>{const{id:i}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,Ec(TE)),await this.sendResult({id:i,topic:r,result:!0}),this.client.events.emit("session_extend",{id:i,topic:r})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionExtendResponse=(r,n)=>{const{id:i}=n;el(n)?this.events.emit(Ri("session_extend",i),{}):xc(n)&&this.events.emit(Ri("session_extend",i),{error:n.error})},this.onSessionPingRequest=async(r,n)=>{const{id:i}=n;try{this.isValidPing({topic:r}),await this.sendResult({id:i,topic:r,result:!0}),this.client.events.emit("session_ping",{id:i,topic:r})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionPingResponse=(r,n)=>{const{id:i}=n;setTimeout(()=>{el(n)?this.events.emit(Ri("session_ping",i),{}):xc(n)&&this.events.emit(Ri("session_ping",i),{error:n.error})},500)},this.onSessionDeleteRequest=async(r,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),await Promise.all([new Promise(a=>{this.client.core.relayer.once(Ba.publish,async()=>{a(await this.deleteSession(r))})}),this.sendResult({id:i,topic:r,result:!0})]),this.client.events.emit("session_delete",{id:i,topic:r})}catch(a){this.client.logger.error(a)}},this.onSessionRequest=async(r,n)=>{const{id:i,params:a}=n;try{this.isValidRequest(_o({topic:r},a));const o=wg(JSON.stringify(Eg("wc_sessionRequest",a,i))),s=this.client.session.get(r),c=await this.getVerifyContext(o,s.peer.metadata),u={id:i,topic:r,params:a,verifyContext:c};await this.setPendingSessionRequest(u),this.addSessionRequestToSessionRequestQueue(u),this.processSessionRequestQueue()}catch(o){await this.sendError(i,r,o),this.client.logger.error(o)}},this.onSessionRequestResponse=(r,n)=>{const{id:i}=n;el(n)?this.events.emit(Ri("session_request",i),{result:n.result}):xc(n)&&this.events.emit(Ri("session_request",i),{error:n.error})},this.onSessionEventRequest=async(r,n)=>{const{id:i,params:a}=n;try{const o=`${r}_session_event_${a.event.name}`,s=PE.get(o);if(s&&this.isRequestOutOfSync(s,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(_o({topic:r},a)),this.client.events.emit("session_event",{id:i,topic:r,params:a}),PE.set(o,i)}catch(o){await this.sendError(i,r,o),this.client.logger.error(o)}},this.addSessionRequestToSessionRequestQueue=r=>{this.sessionRequestQueue.queue.push(r)},this.cleanupAfterResponse=r=>{this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=Ku.idle,this.processSessionRequestQueue()},Xt.toMiliseconds(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Ku.active){this.client.logger.info("session request queue is already active.");return}const r=this.sessionRequestQueue.queue[0];if(!r){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=Ku.active,this.client.events.emit("session_request",r)}catch(n){this.client.logger.error(n)}},this.onPairingCreated=r=>{if(r.active)return;const n=this.client.proposal.getAll().find(i=>i.pairingTopic===r.topic);n&&this.onSessionProposeRequest(r.topic,Eg("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer},n.id))},this.isValidConnect=async r=>{if(!Eo(r)){const{message:c}=Tt("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(c)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:a,sessionProperties:o,relays:s}=r;if(no(n)||await this.isValidPairingTopic(n),!Hke(s,!0)){const{message:c}=Tt("MISSING_OR_INVALID",`connect() relays: ${s}`);throw new Error(c)}!no(i)&&_g(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!no(a)&&_g(a)!==0&&this.validateNamespaces(a,"optionalNamespaces"),no(o)||this.validateSessionProps(o,"sessionProperties")},this.validateNamespaces=(r,n)=>{const i=qke(r,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=async r=>{if(!Eo(r))throw new Error(Tt("MISSING_OR_INVALID",`approve() params: ${r}`).message);const{id:n,namespaces:i,relayProtocol:a,sessionProperties:o}=r;await this.isValidProposalId(n);const s=this.client.proposal.get(n),c=Lx(i,"approve()");if(c)throw new Error(c.message);const u=TK(s.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!Qi(a,!0)){const{message:f}=Tt("MISSING_OR_INVALID",`approve() relayProtocol: ${a}`);throw new Error(f)}no(o)||this.validateSessionProps(o,"sessionProperties")},this.isValidReject=async r=>{if(!Eo(r)){const{message:a}=Tt("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(a)}const{id:n,reason:i}=r;if(await this.isValidProposalId(n),!zke(i)){const{message:a}=Tt("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidSessionSettleRequest=r=>{if(!Eo(r)){const{message:u}=Tt("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(u)}const{relay:n,controller:i,namespaces:a,expiry:o}=r;if(!Moe(n)){const{message:u}=Tt("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(u)}const s=kke(i,"onSessionSettleRequest()");if(s)throw new Error(s.message);const c=Lx(a,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(xf(o)){const{message:u}=Tt("EXPIRED","onSessionSettleRequest()");throw new Error(u)}},this.isValidUpdate=async r=>{if(!Eo(r)){const{message:c}=Tt("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(c)}const{topic:n,namespaces:i}=r;await this.isValidSessionTopic(n);const a=this.client.session.get(n),o=Lx(i,"update()");if(o)throw new Error(o.message);const s=TK(a.requiredNamespaces,i,"update()");if(s)throw new Error(s.message)},this.isValidExtend=async r=>{if(!Eo(r)){const{message:i}=Tt("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionTopic(n)},this.isValidRequest=async r=>{if(!Eo(r)){const{message:c}=Tt("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(c)}const{topic:n,request:i,chainId:a,expiry:o}=r;await this.isValidSessionTopic(n);const{namespaces:s}=this.client.session.get(n);if(!PK(s,a)){const{message:c}=Tt("MISSING_OR_INVALID",`request() chainId: ${a}`);throw new Error(c)}if(!Gke(i)){const{message:c}=Tt("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!Yke(s,a,i.method)){const{message:c}=Tt("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(c)}if(o&&!Zke(o,qN)){const{message:c}=Tt("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${qN.min} and ${qN.max}`);throw new Error(c)}},this.isValidRespond=async r=>{if(!Eo(r)){const{message:a}=Tt("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(a)}const{topic:n,response:i}=r;if(await this.isValidSessionTopic(n),!Wke(i)){const{message:a}=Tt("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidPing=async r=>{if(!Eo(r)){const{message:i}=Tt("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async r=>{if(!Eo(r)){const{message:s}=Tt("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(s)}const{topic:n,event:i,chainId:a}=r;await this.isValidSessionTopic(n);const{namespaces:o}=this.client.session.get(n);if(!PK(o,a)){const{message:s}=Tt("MISSING_OR_INVALID",`emit() chainId: ${a}`);throw new Error(s)}if(!Kke(i)){const{message:s}=Tt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(s)}if(!Qke(o,a,i.name)){const{message:s}=Tt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(s)}},this.isValidDisconnect=async r=>{if(!Eo(r)){const{message:i}=Tt("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.getVerifyContext=async(r,n)=>{const i={verified:{verifyUrl:n.verifyUrl||Q0,validation:"UNKNOWN",origin:n.url||""}};try{const a=await this.client.core.verify.resolve({attestationId:r,verifyUrl:n.verifyUrl});a&&(i.verified.origin=a.origin,i.verified.isScam=a.isScam,i.verified.validation=a.origin===new URL(n.url).origin?"VALID":"INVALID")}catch(a){this.client.logger.info(a)}return this.client.logger.info(`Verify context: ${JSON.stringify(i)}`),i},this.validateSessionProps=(r,n)=>{Object.values(r).forEach(i=>{if(!Qi(i,!1)){const{message:a}=Tt("MISSING_OR_INVALID",`${n} must be in Record<string, string> format. Received: ${JSON.stringify(i)}`);throw new Error(a)}})}}async isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Ba.message,async e=>{const{topic:r,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const i=await this.client.core.crypto.decode(r,n);try{Wk(i)?(this.client.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):wI(i)?(await this.client.core.history.resolve(i),await this.onRelayEventResponse({topic:r,payload:i}),this.client.core.history.delete(r,i.id)):this.onRelayEventUnknownPayload({topic:r,payload:i})}catch(a){this.client.logger.error(a)}})}registerExpirerEvents(){this.client.core.expirer.on(Es.expired,async e=>{const{topic:r,id:n}=Doe(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Tt("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession(r,!0),this.client.events.emit("session_expire",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(Eb.create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!Qi(e,!1)){const{message:r}=Tt("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:r}=Tt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(xf(this.client.core.pairing.pairings.get(e).expiry)){const{message:r}=Tt("EXPIRED",`pairing topic: ${e}`);throw new Error(r)}}async isValidSessionTopic(e){if(!Qi(e,!1)){const{message:r}=Tt("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(r)}if(!this.client.session.keys.includes(e)){const{message:r}=Tt("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(r)}if(xf(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:r}=Tt("EXPIRED",`session topic: ${e}`);throw new Error(r)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(Qi(e,!1)){const{message:r}=Tt("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}else{const{message:r}=Tt("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(r)}}async isValidProposalId(e){if(!Vke(e)){const{message:r}=Tt("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(r)}if(!this.client.proposal.keys.includes(e)){const{message:r}=Tt("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(xf(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:r}=Tt("EXPIRED",`proposal id: ${e}`);throw new Error(r)}}}class iBe extends EI{constructor(e,r){super(e,r,WUe,Yk),this.core=e,this.logger=r}}class aBe extends EI{constructor(e,r){super(e,r,KUe,Yk),this.core=e,this.logger=r}}class oBe extends EI{constructor(e,r){super(e,r,QUe,Yk,n=>n.id),this.core=e,this.logger=r}}let sBe=class yse extends NLe{constructor(e){super(e),this.protocol=dse,this.version=hse,this.name=jN.name,this.events=new ho.EventEmitter,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}},this.update=async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}},this.request=async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}},this.find=n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(e==null?void 0:e.name)||jN.name,this.metadata=(e==null?void 0:e.metadata)||ske();const r=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:un.pino(un.getDefaultLoggerOptions({level:(e==null?void 0:e.logger)||jN.logger}));this.core=(e==null?void 0:e.core)||new GUe(e),this.logger=un.generateChildLogger(r,this.name),this.session=new aBe(this.core,this.logger),this.proposal=new iBe(this.core,this.logger),this.pendingRequest=new oBe(this.core,this.logger),this.engine=new nBe(this)}static async init(e){const r=new yse(e);return await r.initialize(),r}get context(){return un.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};var C4={exports:{}};(function(t,e){var r=typeof self<"u"?self:Ne,n=function(){function a(){this.fetch=!1,this.DOMException=r.DOMException}return a.prototype=r,new a}();(function(a){(function(o){var s={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(F){return F&&DataView.prototype.isPrototypeOf(F)}if(s.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(F){return F&&u.indexOf(Object.prototype.toString.call(F))>-1};function d(F){if(typeof F!="string"&&(F=String(F)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(F))throw new TypeError("Invalid character in header field name");return F.toLowerCase()}function g(F){return typeof F!="string"&&(F=String(F)),F}function m(F){var U={next:function(){var K=F.shift();return{done:K===void 0,value:K}}};return s.iterable&&(U[Symbol.iterator]=function(){return U}),U}function w(F){this.map={},F instanceof w?F.forEach(function(U,K){this.append(K,U)},this):Array.isArray(F)?F.forEach(function(U){this.append(U[0],U[1])},this):F&&Object.getOwnPropertyNames(F).forEach(function(U){this.append(U,F[U])},this)}w.prototype.append=function(F,U){F=d(F),U=g(U);var K=this.map[F];this.map[F]=K?K+", "+U:U},w.prototype.delete=function(F){delete this.map[d(F)]},w.prototype.get=function(F){return F=d(F),this.has(F)?this.map[F]:null},w.prototype.has=function(F){return this.map.hasOwnProperty(d(F))},w.prototype.set=function(F,U){this.map[d(F)]=g(U)},w.prototype.forEach=function(F,U){for(var K in this.map)this.map.hasOwnProperty(K)&&F.call(U,this.map[K],K,this)},w.prototype.keys=function(){var F=[];return this.forEach(function(U,K){F.push(K)}),m(F)},w.prototype.values=function(){var F=[];return this.forEach(function(U){F.push(U)}),m(F)},w.prototype.entries=function(){var F=[];return this.forEach(function(U,K){F.push([K,U])}),m(F)},s.iterable&&(w.prototype[Symbol.iterator]=w.prototype.entries);function v(F){if(F.bodyUsed)return Promise.reject(new TypeError("Already read"));F.bodyUsed=!0}function y(F){return new Promise(function(U,K){F.onload=function(){U(F.result)},F.onerror=function(){K(F.error)}})}function _(F){var U=new FileReader,K=y(U);return U.readAsArrayBuffer(F),K}function b(F){var U=new FileReader,K=y(U);return U.readAsText(F),K}function S(F){for(var U=new Uint8Array(F),K=new Array(U.length),ne=0;ne<U.length;ne++)K[ne]=String.fromCharCode(U[ne]);return K.join("")}function x(F){if(F.slice)return F.slice(0);var U=new Uint8Array(F.byteLength);return U.set(new Uint8Array(F)),U.buffer}function I(){return this.bodyUsed=!1,this._initBody=function(F){this._bodyInit=F,F?typeof F=="string"?this._bodyText=F:s.blob&&Blob.prototype.isPrototypeOf(F)?this._bodyBlob=F:s.formData&&FormData.prototype.isPrototypeOf(F)?this._bodyFormData=F:s.searchParams&&URLSearchParams.prototype.isPrototypeOf(F)?this._bodyText=F.toString():s.arrayBuffer&&s.blob&&c(F)?(this._bodyArrayBuffer=x(F.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(F)||f(F))?this._bodyArrayBuffer=x(F):this._bodyText=F=Object.prototype.toString.call(F):this._bodyText="",this.headers.get("content-type")||(typeof F=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s.searchParams&&URLSearchParams.prototype.isPrototypeOf(F)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s.blob&&(this.blob=function(){var F=v(this);if(F)return F;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?v(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var F=v(this);if(F)return F;if(this._bodyBlob)return b(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(S(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function p(F){var U=F.toUpperCase();return E.indexOf(U)>-1?U:F}function O(F,U){U=U||{};var K=U.body;if(F instanceof O){if(F.bodyUsed)throw new TypeError("Already read");this.url=F.url,this.credentials=F.credentials,U.headers||(this.headers=new w(F.headers)),this.method=F.method,this.mode=F.mode,this.signal=F.signal,!K&&F._bodyInit!=null&&(K=F._bodyInit,F.bodyUsed=!0)}else this.url=String(F);if(this.credentials=U.credentials||this.credentials||"same-origin",(U.headers||!this.headers)&&(this.headers=new w(U.headers)),this.method=p(U.method||this.method||"GET"),this.mode=U.mode||this.mode||null,this.signal=U.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&K)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(K)}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})};function C(F){var U=new FormData;return F.trim().split("&").forEach(function(K){if(K){var ne=K.split("="),j=ne.shift().replace(/\+/g," "),q=ne.join("=").replace(/\+/g," ");U.append(decodeURIComponent(j),decodeURIComponent(q))}}),U}function M(F){var U=new w,K=F.replace(/\r?\n[\t ]+/g," ");return K.split(/\r?\n/).forEach(function(ne){var j=ne.split(":"),q=j.shift().trim();if(q){var V=j.join(":").trim();U.append(q,V)}}),U}I.call(O.prototype);function B(F,U){U||(U={}),this.type="default",this.status=U.status===void 0?200:U.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in U?U.statusText:"OK",this.headers=new w(U.headers),this.url=U.url||"",this._initBody(F)}I.call(B.prototype),B.prototype.clone=function(){return new B(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new w(this.headers),url:this.url})},B.error=function(){var F=new B(null,{status:0,statusText:""});return F.type="error",F};var ce=[301,302,303,307,308];B.redirect=function(F,U){if(ce.indexOf(U)===-1)throw new RangeError("Invalid status code");return new B(null,{status:U,headers:{location:F}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(U,K){this.message=U,this.name=K;var ne=Error(U);this.stack=ne.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function he(F,U){return new Promise(function(K,ne){var j=new O(F,U);if(j.signal&&j.signal.aborted)return ne(new o.DOMException("Aborted","AbortError"));var q=new XMLHttpRequest;function V(){q.abort()}q.onload=function(){var $={status:q.status,statusText:q.statusText,headers:M(q.getAllResponseHeaders()||"")};$.url="responseURL"in q?q.responseURL:$.headers.get("X-Request-URL");var H="response"in q?q.response:q.responseText;K(new B(H,$))},q.onerror=function(){ne(new TypeError("Network request failed"))},q.ontimeout=function(){ne(new TypeError("Network request failed"))},q.onabort=function(){ne(new o.DOMException("Aborted","AbortError"))},q.open(j.method,j.url,!0),j.credentials==="include"?q.withCredentials=!0:j.credentials==="omit"&&(q.withCredentials=!1),"responseType"in q&&s.blob&&(q.responseType="blob"),j.headers.forEach(function($,H){q.setRequestHeader(H,$)}),j.signal&&(j.signal.addEventListener("abort",V),q.onreadystatechange=function(){q.readyState===4&&j.signal.removeEventListener("abort",V)}),q.send(typeof j._bodyInit>"u"?null:j._bodyInit)})}return he.polyfill=!0,a.fetch||(a.fetch=he,a.Headers=w,a.Request=O,a.Response=B),o.Headers=w,o.Request=O,o.Response=B,o.fetch=he,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(C4,C4.exports);var cBe=C4.exports;const xY=kc(cBe),uBe={Accept:"application/json","Content-Type":"application/json"},lBe="POST",AY={headers:uBe,method:lBe},SY=10;class Td{constructor(e,r=!1){if(this.url=e,this.disableProviderPing=r,this.events=new ho.EventEmitter,this.isAvailable=!1,this.registering=!1,!JK(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=r}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,r){this.isAvailable||await this.register();try{const n=L1(e),a=await(await xY(this.url,Object.assign(Object.assign({},AY),{body:n}))).json();this.onPayload({data:a})}catch(n){this.onError(e.id,n)}}async register(e=this.url){if(!JK(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once("register_error",a=>{this.resetMaxListeners(),i(a)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));n()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const r=L1({id:1,jsonrpc:"2.0",method:"test",params:[]});await xY(e,Object.assign(Object.assign({},AY),{body:r}))}this.onOpen()}catch(r){const n=this.parseError(r);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const r=typeof e.data=="string"?qk(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),a=bI(e,i);this.events.emit("payload",a)}parseError(e,r=this.url){return Goe(e,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>SY&&this.events.setMaxListeners(SY)}}const IY="error",fBe="wss://relay.walletconnect.com",dBe="wc",hBe="universal_provider",OY=`${dBe}@2:${hBe}:`,pBe="https://rpc.walletconnect.com/v1/",Wl={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var qv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof bn<"u"?bn:typeof self<"u"?self:{},N4={exports:{}};/**
|
|
141
|
-
* @license
|
|
142
|
-
* Lodash <https://lodash.com/>
|
|
143
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
144
|
-
* Released under MIT license <https://lodash.com/license>
|
|
145
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
146
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
147
|
-
*/(function(t,e){(function(){var r,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",d=1,g=2,m=4,w=1,v=2,y=1,_=2,b=4,S=8,x=16,I=32,E=64,p=128,O=256,C=512,M=30,B="...",ce=800,he=16,F=1,U=2,K=3,ne=1/0,j=9007199254740991,q=17976931348623157e292,V=0/0,$=4294967295,H=$-1,L=$>>>1,k=[["ary",p],["bind",y],["bindKey",_],["curry",S],["curryRight",x],["flip",C],["partial",I],["partialRight",E],["rearg",O]],G="[object Arguments]",ge="[object Array]",Q="[object AsyncFunction]",te="[object Boolean]",ue="[object Date]",T="[object DOMException]",fe="[object Error]",Ge="[object Function]",tt="[object GeneratorFunction]",mt="[object Map]",vt="[object Number]",gt="[object Null]",Lt="[object Object]",Yt="[object Promise]",_r="[object Proxy]",Rt="[object RegExp]",Pt="[object Set]",kt="[object String]",Nt="[object Symbol]",Kt="[object Undefined]",Ut="[object WeakMap]",Vt="[object WeakSet]",$t="[object ArrayBuffer]",Dt="[object DataView]",qt="[object Float32Array]",Mt="[object Float64Array]",cr="[object Int8Array]",tr="[object Int16Array]",ir="[object Int32Array]",nr="[object Uint8Array]",vr="[object Uint8ClampedArray]",wn="[object Uint16Array]",Yr="[object Uint32Array]",ai=/\b__p \+= '';/g,Dn=/\b(__p \+=) '' \+/g,$n=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Kn=/&(?:amp|lt|gt|quot|#39);/g,Ar=/[&<>"']/g,Mr=RegExp(Kn.source),Er=RegExp(Ar.source),_e=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,ve=/<%=([\s\S]+?)%>/g,Re=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ze=/^\w*$/,Xe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,st=/[\\^$.*+?()[\]{}|]/g,lt=RegExp(st.source),_t=/^\s+/,le=/\s/,Z=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ye=/\{\n\/\* \[wrapped with (.+)\] \*/,Me=/,? & /,Le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wt=/[()=,{}\[\]\/\s]/,It=/\\(\\)?/g,gr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,en=/^[-+]0x[0-9a-f]+$/i,yr=/^0b[01]+$/i,xr=/^\[object .+?Constructor\]$/,on=/^0o[0-7]+$/i,sr=/^(?:0|[1-9]\d*)$/,Ur=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gn=/($^)/,Br=/['\n\r\u2028\u2029\\]/g,Zn="\\ud800-\\udfff",Ii="\\u0300-\\u036f",ei="\\ufe20-\\ufe2f",Oi="\\u20d0-\\u20ff",Pi=Ii+ei+Oi,oi="\\u2700-\\u27bf",jn="a-z\\xdf-\\xf6\\xf8-\\xff",ra="\\xac\\xb1\\xd7\\xf7",$i="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_a="\\u2000-\\u206f",ss=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",X="A-Z\\xc0-\\xd6\\xd8-\\xde",me="\\ufe0e\\ufe0f",re=ra+$i+_a+ss,Ee="['’]",be="["+Zn+"]",Ie="["+re+"]",Je="["+Pi+"]",ft="\\d+",Qe="["+oi+"]",We="["+jn+"]",ht="[^"+Zn+re+ft+oi+jn+X+"]",zt="\\ud83c[\\udffb-\\udfff]",Rr="(?:"+Je+"|"+zt+")",Wr="[^"+Zn+"]",jr="(?:\\ud83c[\\udde6-\\uddff]){2}",_n="[\\ud800-\\udbff][\\udc00-\\udfff]",qr="["+X+"]",P="\\u200d",D="(?:"+We+"|"+ht+")",W="(?:"+qr+"|"+ht+")",pe="(?:"+Ee+"(?:d|ll|m|re|s|t|ve))?",Se="(?:"+Ee+"(?:D|LL|M|RE|S|T|VE))?",Ce=Rr+"?",rt="["+me+"]?",At="(?:"+P+"(?:"+[Wr,jr,_n].join("|")+")"+rt+Ce+")*",Ft="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ti=rt+Ce+At,xn="(?:"+[Qe,jr,_n].join("|")+")"+Ti,St="(?:"+[Wr+Je+"?",Je,jr,_n,be].join("|")+")",si=RegExp(Ee,"g"),An=RegExp(Je,"g"),fn=RegExp(zt+"(?="+zt+")|"+St+Ti,"g"),mi=RegExp([qr+"?"+We+"+"+pe+"(?="+[Ie,qr,"$"].join("|")+")",W+"+"+Se+"(?="+[Ie,qr+D,"$"].join("|")+")",qr+"?"+D+"+"+pe,qr+"+"+Se,Jt,Ft,ft,xn].join("|"),"g"),po=RegExp("["+P+Zn+Pi+me+"]"),qi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vi=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],go=-1,tn={};tn[qt]=tn[Mt]=tn[cr]=tn[tr]=tn[ir]=tn[nr]=tn[vr]=tn[wn]=tn[Yr]=!0,tn[G]=tn[ge]=tn[$t]=tn[te]=tn[Dt]=tn[ue]=tn[fe]=tn[Ge]=tn[mt]=tn[vt]=tn[Lt]=tn[Rt]=tn[Pt]=tn[kt]=tn[Ut]=!1;var Sr={};Sr[G]=Sr[ge]=Sr[$t]=Sr[Dt]=Sr[te]=Sr[ue]=Sr[qt]=Sr[Mt]=Sr[cr]=Sr[tr]=Sr[ir]=Sr[mt]=Sr[vt]=Sr[Lt]=Sr[Rt]=Sr[Pt]=Sr[kt]=Sr[Nt]=Sr[nr]=Sr[vr]=Sr[wn]=Sr[Yr]=!0,Sr[fe]=Sr[Ge]=Sr[Ut]=!1;var de={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ke={"&":"&","<":"<",">":">",'"':""","'":"'"},it={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ke={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,fr=parseInt,yn=typeof qv=="object"&&qv&&qv.Object===Object&&qv,ar=typeof self=="object"&&self&&self.Object===Object&&self,mr=yn||ar||Function("return this")(),ie=e&&!e.nodeType&&e,R=ie&&!0&&t&&!t.nodeType&&t,oe=R&&R.exports===ie,we=oe&&yn.process,se=function(){try{var Ue=R&&R.require&&R.require("util").types;return Ue||we&&we.binding&&we.binding("util")}catch{}}(),Ae=se&&se.isArrayBuffer,Oe=se&&se.isDate,Pe=se&&se.isMap,je=se&&se.isRegExp,Ye=se&&se.isSet,Ve=se&&se.isTypedArray;function pt(Ue,nt,et){switch(et.length){case 0:return Ue.call(nt);case 1:return Ue.call(nt,et[0]);case 2:return Ue.call(nt,et[0],et[1]);case 3:return Ue.call(nt,et[0],et[1],et[2])}return Ue.apply(nt,et)}function rr(Ue,nt,et,Bt){for(var Nr=-1,En=Ue==null?0:Ue.length;++Nr<En;){var Li=Ue[Nr];nt(Bt,Li,et(Li),Ue)}return Bt}function Wt(Ue,nt){for(var et=-1,Bt=Ue==null?0:Ue.length;++et<Bt&&nt(Ue[et],et,Ue)!==!1;);return Ue}function Jr(Ue,nt){for(var et=Ue==null?0:Ue.length;et--&&nt(Ue[et],et,Ue)!==!1;);return Ue}function Pn(Ue,nt){for(var et=-1,Bt=Ue==null?0:Ue.length;++et<Bt;)if(!nt(Ue[et],et,Ue))return!1;return!0}function dn(Ue,nt){for(var et=-1,Bt=Ue==null?0:Ue.length,Nr=0,En=[];++et<Bt;){var Li=Ue[et];nt(Li,et,Ue)&&(En[Nr++]=Li)}return En}function kr(Ue,nt){var et=Ue==null?0:Ue.length;return!!et&&tc(Ue,nt,0)>-1}function Xr(Ue,nt,et){for(var Bt=-1,Nr=Ue==null?0:Ue.length;++Bt<Nr;)if(et(nt,Ue[Bt]))return!0;return!1}function Ir(Ue,nt){for(var et=-1,Bt=Ue==null?0:Ue.length,Nr=Array(Bt);++et<Bt;)Nr[et]=nt(Ue[et],et,Ue);return Nr}function Hi(Ue,nt){for(var et=-1,Bt=nt.length,Nr=Ue.length;++et<Bt;)Ue[Nr+et]=nt[et];return Ue}function cs(Ue,nt,et,Bt){var Nr=-1,En=Ue==null?0:Ue.length;for(Bt&&En&&(et=Ue[++Nr]);++Nr<En;)et=nt(et,Ue[Nr],Nr,Ue);return et}function jc(Ue,nt,et,Bt){var Nr=Ue==null?0:Ue.length;for(Bt&&Nr&&(et=Ue[--Nr]);Nr--;)et=nt(et,Ue[Nr],Nr,Ue);return et}function Mi(Ue,nt){for(var et=-1,Bt=Ue==null?0:Ue.length;++et<Bt;)if(nt(Ue[et],et,Ue))return!0;return!1}var us=Kl("length");function ki(Ue){return Ue.split("")}function hi(Ue){return Ue.match(Le)||[]}function Sn(Ue,nt,et){var Bt;return et(Ue,function(Nr,En,Li){if(nt(Nr,En,Li))return Bt=En,!1}),Bt}function Cu(Ue,nt,et,Bt){for(var Nr=Ue.length,En=et+(Bt?1:-1);Bt?En--:++En<Nr;)if(nt(Ue[En],En,Ue))return En;return-1}function tc(Ue,nt,et){return nt===nt?Kp(Ue,nt,et):Cu(Ue,$d,et)}function Lp(Ue,nt,et,Bt){for(var Nr=et-1,En=Ue.length;++Nr<En;)if(Bt(Ue[Nr],nt))return Nr;return-1}function $d(Ue){return Ue!==Ue}function Md(Ue,nt){var et=Ue==null?0:Ue.length;return et?Ql(Ue,nt)/et:V}function Kl(Ue){return function(nt){return nt==null?r:nt[Ue]}}function Yl(Ue){return function(nt){return Ue==null?r:Ue[nt]}}function kd(Ue,nt,et,Bt,Nr){return Nr(Ue,function(En,Li,Un){et=Bt?(Bt=!1,En):nt(et,En,Li,Un)}),et}function Up(Ue,nt){var et=Ue.length;for(Ue.sort(nt);et--;)Ue[et]=Ue[et].value;return Ue}function Ql(Ue,nt){for(var et,Bt=-1,Nr=Ue.length;++Bt<Nr;){var En=nt(Ue[Bt]);En!==r&&(et=et===r?En:et+En)}return et}function Jl(Ue,nt){for(var et=-1,Bt=Array(Ue);++et<Ue;)Bt[et]=nt(et);return Bt}function Bp(Ue,nt){return Ir(nt,function(et){return[et,Ue[et]]})}function Ld(Ue){return Ue&&Ue.slice(0,jd(Ue)+1).replace(_t,"")}function Vi(Ue){return function(nt){return Ue(nt)}}function Xl(Ue,nt){return Ir(nt,function(et){return Ue[et]})}function qc(Ue,nt){return Ue.has(nt)}function Ud(Ue,nt){for(var et=-1,Bt=Ue.length;++et<Bt&&tc(nt,Ue[et],0)>-1;);return et}function Bd(Ue,nt){for(var et=Ue.length;et--&&tc(nt,Ue[et],0)>-1;);return et}function Fp(Ue,nt){for(var et=Ue.length,Bt=0;et--;)Ue[et]===nt&&++Bt;return Bt}var jp=Yl(de),qp=Yl(ke);function Hp(Ue){return"\\"+Ke[Ue]}function Vp(Ue,nt){return Ue==null?r:Ue[nt]}function rc(Ue){return po.test(Ue)}function zp(Ue){return qi.test(Ue)}function Gp(Ue){for(var nt,et=[];!(nt=Ue.next()).done;)et.push(nt.value);return et}function Zl(Ue){var nt=-1,et=Array(Ue.size);return Ue.forEach(function(Bt,Nr){et[++nt]=[Nr,Bt]}),et}function Fd(Ue,nt){return function(et){return Ue(nt(et))}}function Fo(Ue,nt){for(var et=-1,Bt=Ue.length,Nr=0,En=[];++et<Bt;){var Li=Ue[et];(Li===nt||Li===f)&&(Ue[et]=f,En[Nr++]=et)}return En}function Nu(Ue){var nt=-1,et=Array(Ue.size);return Ue.forEach(function(Bt){et[++nt]=Bt}),et}function Wp(Ue){var nt=-1,et=Array(Ue.size);return Ue.forEach(function(Bt){et[++nt]=[Bt,Bt]}),et}function Kp(Ue,nt,et){for(var Bt=et-1,Nr=Ue.length;++Bt<Nr;)if(Ue[Bt]===nt)return Bt;return-1}function Yp(Ue,nt,et){for(var Bt=et+1;Bt--;)if(Ue[Bt]===nt)return Bt;return Bt}function nc(Ue){return rc(Ue)?tue(Ue):us(Ue)}function Ea(Ue){return rc(Ue)?rue(Ue):ki(Ue)}function jd(Ue){for(var nt=Ue.length;nt--&&le.test(Ue.charAt(nt)););return nt}var Qp=Yl(it);function tue(Ue){for(var nt=fn.lastIndex=0;fn.test(Ue);)++nt;return nt}function rue(Ue){return Ue.match(fn)||[]}function nue(Ue){return Ue.match(mi)||[]}var iue=function Ue(nt){nt=nt==null?mr:Jp.defaults(mr.Object(),nt,Jp.pick(mr,vi));var et=nt.Array,Bt=nt.Date,Nr=nt.Error,En=nt.Function,Li=nt.Math,Un=nt.Object,qI=nt.RegExp,aue=nt.String,ls=nt.TypeError,Zw=et.prototype,oue=En.prototype,Xp=Un.prototype,e_=nt["__core-js_shared__"],t_=oue.toString,Tn=Xp.hasOwnProperty,sue=0,ML=function(){var l=/[^.]+$/.exec(e_&&e_.keys&&e_.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),r_=Xp.toString,cue=t_.call(Un),uue=mr._,lue=qI("^"+t_.call(Tn).replace(st,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),n_=oe?nt.Buffer:r,ef=nt.Symbol,i_=nt.Uint8Array,kL=n_?n_.allocUnsafe:r,a_=Fd(Un.getPrototypeOf,Un),LL=Un.create,UL=Xp.propertyIsEnumerable,o_=Zw.splice,BL=ef?ef.isConcatSpreadable:r,vm=ef?ef.iterator:r,qd=ef?ef.toStringTag:r,s_=function(){try{var l=Wd(Un,"defineProperty");return l({},"",{}),l}catch{}}(),fue=nt.clearTimeout!==mr.clearTimeout&&nt.clearTimeout,due=Bt&&Bt.now!==mr.Date.now&&Bt.now,hue=nt.setTimeout!==mr.setTimeout&&nt.setTimeout,c_=Li.ceil,u_=Li.floor,HI=Un.getOwnPropertySymbols,pue=n_?n_.isBuffer:r,FL=nt.isFinite,gue=Zw.join,yue=Fd(Un.keys,Un),Ui=Li.max,xa=Li.min,mue=Bt.now,vue=nt.parseInt,jL=Li.random,bue=Zw.reverse,VI=Wd(nt,"DataView"),bm=Wd(nt,"Map"),zI=Wd(nt,"Promise"),Zp=Wd(nt,"Set"),wm=Wd(nt,"WeakMap"),_m=Wd(Un,"create"),l_=wm&&new wm,e0={},wue=Kd(VI),_ue=Kd(bm),Eue=Kd(zI),xue=Kd(Zp),Aue=Kd(wm),f_=ef?ef.prototype:r,Em=f_?f_.valueOf:r,qL=f_?f_.toString:r;function J(l){if(pi(l)&&!$r(l)&&!(l instanceof rn)){if(l instanceof fs)return l;if(Tn.call(l,"__wrapped__"))return H9(l)}return new fs(l)}var t0=function(){function l(){}return function(h){if(!ci(h))return{};if(LL)return LL(h);l.prototype=h;var A=new l;return l.prototype=r,A}}();function d_(){}function fs(l,h){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=r}J.templateSettings={escape:_e,evaluate:ee,interpolate:ve,variable:"",imports:{_:J}},J.prototype=d_.prototype,J.prototype.constructor=J,fs.prototype=t0(d_.prototype),fs.prototype.constructor=fs;function rn(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=$,this.__views__=[]}function Sue(){var l=new rn(this.__wrapped__);return l.__actions__=yo(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=yo(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=yo(this.__views__),l}function Iue(){if(this.__filtered__){var l=new rn(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function Oue(){var l=this.__wrapped__.value(),h=this.__dir__,A=$r(l),N=h<0,z=A?l.length:0,ae=Ble(0,z,this.__views__),xe=ae.start,De=ae.end,qe=De-xe,at=N?De:xe-1,ot=this.__iteratees__,dt=ot.length,Ot=0,Qt=xa(qe,this.__takeCount__);if(!A||!N&&z==qe&&Qt==qe)return d9(l,this.__actions__);var dr=[];e:for(;qe--&&Ot<Qt;){at+=h;for(var Hr=-1,hr=l[at];++Hr<dt;){var Zr=ot[Hr],sn=Zr.iteratee,Ho=Zr.type,Ya=sn(hr);if(Ho==U)hr=Ya;else if(!Ya){if(Ho==F)continue e;break e}}dr[Ot++]=hr}return dr}rn.prototype=t0(d_.prototype),rn.prototype.constructor=rn;function Hd(l){var h=-1,A=l==null?0:l.length;for(this.clear();++h<A;){var N=l[h];this.set(N[0],N[1])}}function Pue(){this.__data__=_m?_m(null):{},this.size=0}function Tue(l){var h=this.has(l)&&delete this.__data__[l];return this.size-=h?1:0,h}function Rue(l){var h=this.__data__;if(_m){var A=h[l];return A===c?r:A}return Tn.call(h,l)?h[l]:r}function Cue(l){var h=this.__data__;return _m?h[l]!==r:Tn.call(h,l)}function Nue(l,h){var A=this.__data__;return this.size+=this.has(l)?0:1,A[l]=_m&&h===r?c:h,this}Hd.prototype.clear=Pue,Hd.prototype.delete=Tue,Hd.prototype.get=Rue,Hd.prototype.has=Cue,Hd.prototype.set=Nue;function Du(l){var h=-1,A=l==null?0:l.length;for(this.clear();++h<A;){var N=l[h];this.set(N[0],N[1])}}function Due(){this.__data__=[],this.size=0}function $ue(l){var h=this.__data__,A=h_(h,l);if(A<0)return!1;var N=h.length-1;return A==N?h.pop():o_.call(h,A,1),--this.size,!0}function Mue(l){var h=this.__data__,A=h_(h,l);return A<0?r:h[A][1]}function kue(l){return h_(this.__data__,l)>-1}function Lue(l,h){var A=this.__data__,N=h_(A,l);return N<0?(++this.size,A.push([l,h])):A[N][1]=h,this}Du.prototype.clear=Due,Du.prototype.delete=$ue,Du.prototype.get=Mue,Du.prototype.has=kue,Du.prototype.set=Lue;function $u(l){var h=-1,A=l==null?0:l.length;for(this.clear();++h<A;){var N=l[h];this.set(N[0],N[1])}}function Uue(){this.size=0,this.__data__={hash:new Hd,map:new(bm||Du),string:new Hd}}function Bue(l){var h=S_(this,l).delete(l);return this.size-=h?1:0,h}function Fue(l){return S_(this,l).get(l)}function jue(l){return S_(this,l).has(l)}function que(l,h){var A=S_(this,l),N=A.size;return A.set(l,h),this.size+=A.size==N?0:1,this}$u.prototype.clear=Uue,$u.prototype.delete=Bue,$u.prototype.get=Fue,$u.prototype.has=jue,$u.prototype.set=que;function Vd(l){var h=-1,A=l==null?0:l.length;for(this.__data__=new $u;++h<A;)this.add(l[h])}function Hue(l){return this.__data__.set(l,c),this}function Vue(l){return this.__data__.has(l)}Vd.prototype.add=Vd.prototype.push=Hue,Vd.prototype.has=Vue;function ic(l){var h=this.__data__=new Du(l);this.size=h.size}function zue(){this.__data__=new Du,this.size=0}function Gue(l){var h=this.__data__,A=h.delete(l);return this.size=h.size,A}function Wue(l){return this.__data__.get(l)}function Kue(l){return this.__data__.has(l)}function Yue(l,h){var A=this.__data__;if(A instanceof Du){var N=A.__data__;if(!bm||N.length<i-1)return N.push([l,h]),this.size=++A.size,this;A=this.__data__=new $u(N)}return A.set(l,h),this.size=A.size,this}ic.prototype.clear=zue,ic.prototype.delete=Gue,ic.prototype.get=Wue,ic.prototype.has=Kue,ic.prototype.set=Yue;function HL(l,h){var A=$r(l),N=!A&&Yd(l),z=!A&&!N&&of(l),ae=!A&&!N&&!z&&a0(l),xe=A||N||z||ae,De=xe?Jl(l.length,aue):[],qe=De.length;for(var at in l)(h||Tn.call(l,at))&&!(xe&&(at=="length"||z&&(at=="offset"||at=="parent")||ae&&(at=="buffer"||at=="byteLength"||at=="byteOffset")||Uu(at,qe)))&&De.push(at);return De}function VL(l){var h=l.length;return h?l[rO(0,h-1)]:r}function Que(l,h){return I_(yo(l),zd(h,0,l.length))}function Jue(l){return I_(yo(l))}function GI(l,h,A){(A!==r&&!ac(l[h],A)||A===r&&!(h in l))&&Mu(l,h,A)}function xm(l,h,A){var N=l[h];(!(Tn.call(l,h)&&ac(N,A))||A===r&&!(h in l))&&Mu(l,h,A)}function h_(l,h){for(var A=l.length;A--;)if(ac(l[A][0],h))return A;return-1}function Xue(l,h,A,N){return tf(l,function(z,ae,xe){h(N,z,A(z),xe)}),N}function zL(l,h){return l&&Vc(h,zi(h),l)}function Zue(l,h){return l&&Vc(h,vo(h),l)}function Mu(l,h,A){h=="__proto__"&&s_?s_(l,h,{configurable:!0,enumerable:!0,value:A,writable:!0}):l[h]=A}function WI(l,h){for(var A=-1,N=h.length,z=et(N),ae=l==null;++A<N;)z[A]=ae?r:OO(l,h[A]);return z}function zd(l,h,A){return l===l&&(A!==r&&(l=l<=A?l:A),h!==r&&(l=l>=h?l:h)),l}function ds(l,h,A,N,z,ae){var xe,De=h&d,qe=h&g,at=h&m;if(A&&(xe=z?A(l,N,z,ae):A(l)),xe!==r)return xe;if(!ci(l))return l;var ot=$r(l);if(ot){if(xe=jle(l),!De)return yo(l,xe)}else{var dt=Aa(l),Ot=dt==Ge||dt==tt;if(of(l))return g9(l,De);if(dt==Lt||dt==G||Ot&&!z){if(xe=qe||Ot?{}:$9(l),!De)return qe?Rle(l,Zue(xe,l)):Tle(l,zL(xe,l))}else{if(!Sr[dt])return z?l:{};xe=qle(l,dt,De)}}ae||(ae=new ic);var Qt=ae.get(l);if(Qt)return Qt;ae.set(l,xe),u7(l)?l.forEach(function(hr){xe.add(ds(hr,h,A,hr,l,ae))}):s7(l)&&l.forEach(function(hr,Zr){xe.set(Zr,ds(hr,h,A,Zr,l,ae))});var dr=at?qe?hO:dO:qe?vo:zi,Hr=ot?r:dr(l);return Wt(Hr||l,function(hr,Zr){Hr&&(Zr=hr,hr=l[Zr]),xm(xe,Zr,ds(hr,h,A,Zr,l,ae))}),xe}function ele(l){var h=zi(l);return function(A){return GL(A,l,h)}}function GL(l,h,A){var N=A.length;if(l==null)return!N;for(l=Un(l);N--;){var z=A[N],ae=h[z],xe=l[z];if(xe===r&&!(z in l)||!ae(xe))return!1}return!0}function WL(l,h,A){if(typeof l!="function")throw new ls(o);return Rm(function(){l.apply(r,A)},h)}function Am(l,h,A,N){var z=-1,ae=kr,xe=!0,De=l.length,qe=[],at=h.length;if(!De)return qe;A&&(h=Ir(h,Vi(A))),N?(ae=Xr,xe=!1):h.length>=i&&(ae=qc,xe=!1,h=new Vd(h));e:for(;++z<De;){var ot=l[z],dt=A==null?ot:A(ot);if(ot=N||ot!==0?ot:0,xe&&dt===dt){for(var Ot=at;Ot--;)if(h[Ot]===dt)continue e;qe.push(ot)}else ae(h,dt,N)||qe.push(ot)}return qe}var tf=w9(Hc),KL=w9(YI,!0);function tle(l,h){var A=!0;return tf(l,function(N,z,ae){return A=!!h(N,z,ae),A}),A}function p_(l,h,A){for(var N=-1,z=l.length;++N<z;){var ae=l[N],xe=h(ae);if(xe!=null&&(De===r?xe===xe&&!qo(xe):A(xe,De)))var De=xe,qe=ae}return qe}function rle(l,h,A,N){var z=l.length;for(A=Fr(A),A<0&&(A=-A>z?0:z+A),N=N===r||N>z?z:Fr(N),N<0&&(N+=z),N=A>N?0:f7(N);A<N;)l[A++]=h;return l}function YL(l,h){var A=[];return tf(l,function(N,z,ae){h(N,z,ae)&&A.push(N)}),A}function na(l,h,A,N,z){var ae=-1,xe=l.length;for(A||(A=Vle),z||(z=[]);++ae<xe;){var De=l[ae];h>0&&A(De)?h>1?na(De,h-1,A,N,z):Hi(z,De):N||(z[z.length]=De)}return z}var KI=_9(),QL=_9(!0);function Hc(l,h){return l&&KI(l,h,zi)}function YI(l,h){return l&&QL(l,h,zi)}function g_(l,h){return dn(h,function(A){return Bu(l[A])})}function Gd(l,h){h=nf(h,l);for(var A=0,N=h.length;l!=null&&A<N;)l=l[zc(h[A++])];return A&&A==N?l:r}function JL(l,h,A){var N=h(l);return $r(l)?N:Hi(N,A(l))}function Wa(l){return l==null?l===r?Kt:gt:qd&&qd in Un(l)?Ule(l):Jle(l)}function QI(l,h){return l>h}function nle(l,h){return l!=null&&Tn.call(l,h)}function ile(l,h){return l!=null&&h in Un(l)}function ale(l,h,A){return l>=xa(h,A)&&l<Ui(h,A)}function JI(l,h,A){for(var N=A?Xr:kr,z=l[0].length,ae=l.length,xe=ae,De=et(ae),qe=1/0,at=[];xe--;){var ot=l[xe];xe&&h&&(ot=Ir(ot,Vi(h))),qe=xa(ot.length,qe),De[xe]=!A&&(h||z>=120&&ot.length>=120)?new Vd(xe&&ot):r}ot=l[0];var dt=-1,Ot=De[0];e:for(;++dt<z&&at.length<qe;){var Qt=ot[dt],dr=h?h(Qt):Qt;if(Qt=A||Qt!==0?Qt:0,!(Ot?qc(Ot,dr):N(at,dr,A))){for(xe=ae;--xe;){var Hr=De[xe];if(!(Hr?qc(Hr,dr):N(l[xe],dr,A)))continue e}Ot&&Ot.push(dr),at.push(Qt)}}return at}function ole(l,h,A,N){return Hc(l,function(z,ae,xe){h(N,A(z),ae,xe)}),N}function Sm(l,h,A){h=nf(h,l),l=U9(l,h);var N=l==null?l:l[zc(ps(h))];return N==null?r:pt(N,l,A)}function XL(l){return pi(l)&&Wa(l)==G}function sle(l){return pi(l)&&Wa(l)==$t}function cle(l){return pi(l)&&Wa(l)==ue}function Im(l,h,A,N,z){return l===h?!0:l==null||h==null||!pi(l)&&!pi(h)?l!==l&&h!==h:ule(l,h,A,N,Im,z)}function ule(l,h,A,N,z,ae){var xe=$r(l),De=$r(h),qe=xe?ge:Aa(l),at=De?ge:Aa(h);qe=qe==G?Lt:qe,at=at==G?Lt:at;var ot=qe==Lt,dt=at==Lt,Ot=qe==at;if(Ot&&of(l)){if(!of(h))return!1;xe=!0,ot=!1}if(Ot&&!ot)return ae||(ae=new ic),xe||a0(l)?C9(l,h,A,N,z,ae):kle(l,h,qe,A,N,z,ae);if(!(A&w)){var Qt=ot&&Tn.call(l,"__wrapped__"),dr=dt&&Tn.call(h,"__wrapped__");if(Qt||dr){var Hr=Qt?l.value():l,hr=dr?h.value():h;return ae||(ae=new ic),z(Hr,hr,A,N,ae)}}return Ot?(ae||(ae=new ic),Lle(l,h,A,N,z,ae)):!1}function lle(l){return pi(l)&&Aa(l)==mt}function XI(l,h,A,N){var z=A.length,ae=z,xe=!N;if(l==null)return!ae;for(l=Un(l);z--;){var De=A[z];if(xe&&De[2]?De[1]!==l[De[0]]:!(De[0]in l))return!1}for(;++z<ae;){De=A[z];var qe=De[0],at=l[qe],ot=De[1];if(xe&&De[2]){if(at===r&&!(qe in l))return!1}else{var dt=new ic;if(N)var Ot=N(at,ot,qe,l,h,dt);if(!(Ot===r?Im(ot,at,w|v,N,dt):Ot))return!1}}return!0}function ZL(l){if(!ci(l)||Gle(l))return!1;var h=Bu(l)?lue:xr;return h.test(Kd(l))}function fle(l){return pi(l)&&Wa(l)==Rt}function dle(l){return pi(l)&&Aa(l)==Pt}function hle(l){return pi(l)&&N_(l.length)&&!!tn[Wa(l)]}function e9(l){return typeof l=="function"?l:l==null?bo:typeof l=="object"?$r(l)?n9(l[0],l[1]):r9(l):E7(l)}function ZI(l){if(!Tm(l))return yue(l);var h=[];for(var A in Un(l))Tn.call(l,A)&&A!="constructor"&&h.push(A);return h}function ple(l){if(!ci(l))return Qle(l);var h=Tm(l),A=[];for(var N in l)N=="constructor"&&(h||!Tn.call(l,N))||A.push(N);return A}function eO(l,h){return l<h}function t9(l,h){var A=-1,N=mo(l)?et(l.length):[];return tf(l,function(z,ae,xe){N[++A]=h(z,ae,xe)}),N}function r9(l){var h=gO(l);return h.length==1&&h[0][2]?k9(h[0][0],h[0][1]):function(A){return A===l||XI(A,l,h)}}function n9(l,h){return mO(l)&&M9(h)?k9(zc(l),h):function(A){var N=OO(A,l);return N===r&&N===h?PO(A,l):Im(h,N,w|v)}}function y_(l,h,A,N,z){l!==h&&KI(h,function(ae,xe){if(z||(z=new ic),ci(ae))gle(l,h,xe,A,y_,N,z);else{var De=N?N(bO(l,xe),ae,xe+"",l,h,z):r;De===r&&(De=ae),GI(l,xe,De)}},vo)}function gle(l,h,A,N,z,ae,xe){var De=bO(l,A),qe=bO(h,A),at=xe.get(qe);if(at){GI(l,A,at);return}var ot=ae?ae(De,qe,A+"",l,h,xe):r,dt=ot===r;if(dt){var Ot=$r(qe),Qt=!Ot&&of(qe),dr=!Ot&&!Qt&&a0(qe);ot=qe,Ot||Qt||dr?$r(De)?ot=De:bi(De)?ot=yo(De):Qt?(dt=!1,ot=g9(qe,!0)):dr?(dt=!1,ot=y9(qe,!0)):ot=[]:Cm(qe)||Yd(qe)?(ot=De,Yd(De)?ot=d7(De):(!ci(De)||Bu(De))&&(ot=$9(qe))):dt=!1}dt&&(xe.set(qe,ot),z(ot,qe,N,ae,xe),xe.delete(qe)),GI(l,A,ot)}function i9(l,h){var A=l.length;if(A)return h+=h<0?A:0,Uu(h,A)?l[h]:r}function a9(l,h,A){h.length?h=Ir(h,function(ae){return $r(ae)?function(xe){return Gd(xe,ae.length===1?ae[0]:ae)}:ae}):h=[bo];var N=-1;h=Ir(h,Vi(ur()));var z=t9(l,function(ae,xe,De){var qe=Ir(h,function(at){return at(ae)});return{criteria:qe,index:++N,value:ae}});return Up(z,function(ae,xe){return Ple(ae,xe,A)})}function yle(l,h){return o9(l,h,function(A,N){return PO(l,N)})}function o9(l,h,A){for(var N=-1,z=h.length,ae={};++N<z;){var xe=h[N],De=Gd(l,xe);A(De,xe)&&Om(ae,nf(xe,l),De)}return ae}function mle(l){return function(h){return Gd(h,l)}}function tO(l,h,A,N){var z=N?Lp:tc,ae=-1,xe=h.length,De=l;for(l===h&&(h=yo(h)),A&&(De=Ir(l,Vi(A)));++ae<xe;)for(var qe=0,at=h[ae],ot=A?A(at):at;(qe=z(De,ot,qe,N))>-1;)De!==l&&o_.call(De,qe,1),o_.call(l,qe,1);return l}function s9(l,h){for(var A=l?h.length:0,N=A-1;A--;){var z=h[A];if(A==N||z!==ae){var ae=z;Uu(z)?o_.call(l,z,1):aO(l,z)}}return l}function rO(l,h){return l+u_(jL()*(h-l+1))}function vle(l,h,A,N){for(var z=-1,ae=Ui(c_((h-l)/(A||1)),0),xe=et(ae);ae--;)xe[N?ae:++z]=l,l+=A;return xe}function nO(l,h){var A="";if(!l||h<1||h>j)return A;do h%2&&(A+=l),h=u_(h/2),h&&(l+=l);while(h);return A}function zr(l,h){return wO(L9(l,h,bo),l+"")}function ble(l){return VL(o0(l))}function wle(l,h){var A=o0(l);return I_(A,zd(h,0,A.length))}function Om(l,h,A,N){if(!ci(l))return l;h=nf(h,l);for(var z=-1,ae=h.length,xe=ae-1,De=l;De!=null&&++z<ae;){var qe=zc(h[z]),at=A;if(qe==="__proto__"||qe==="constructor"||qe==="prototype")return l;if(z!=xe){var ot=De[qe];at=N?N(ot,qe,De):r,at===r&&(at=ci(ot)?ot:Uu(h[z+1])?[]:{})}xm(De,qe,at),De=De[qe]}return l}var c9=l_?function(l,h){return l_.set(l,h),l}:bo,_le=s_?function(l,h){return s_(l,"toString",{configurable:!0,enumerable:!1,value:RO(h),writable:!0})}:bo;function Ele(l){return I_(o0(l))}function hs(l,h,A){var N=-1,z=l.length;h<0&&(h=-h>z?0:z+h),A=A>z?z:A,A<0&&(A+=z),z=h>A?0:A-h>>>0,h>>>=0;for(var ae=et(z);++N<z;)ae[N]=l[N+h];return ae}function xle(l,h){var A;return tf(l,function(N,z,ae){return A=h(N,z,ae),!A}),!!A}function m_(l,h,A){var N=0,z=l==null?N:l.length;if(typeof h=="number"&&h===h&&z<=L){for(;N<z;){var ae=N+z>>>1,xe=l[ae];xe!==null&&!qo(xe)&&(A?xe<=h:xe<h)?N=ae+1:z=ae}return z}return iO(l,h,bo,A)}function iO(l,h,A,N){var z=0,ae=l==null?0:l.length;if(ae===0)return 0;h=A(h);for(var xe=h!==h,De=h===null,qe=qo(h),at=h===r;z<ae;){var ot=u_((z+ae)/2),dt=A(l[ot]),Ot=dt!==r,Qt=dt===null,dr=dt===dt,Hr=qo(dt);if(xe)var hr=N||dr;else at?hr=dr&&(N||Ot):De?hr=dr&&Ot&&(N||!Qt):qe?hr=dr&&Ot&&!Qt&&(N||!Hr):Qt||Hr?hr=!1:hr=N?dt<=h:dt<h;hr?z=ot+1:ae=ot}return xa(ae,H)}function u9(l,h){for(var A=-1,N=l.length,z=0,ae=[];++A<N;){var xe=l[A],De=h?h(xe):xe;if(!A||!ac(De,qe)){var qe=De;ae[z++]=xe===0?0:xe}}return ae}function l9(l){return typeof l=="number"?l:qo(l)?V:+l}function jo(l){if(typeof l=="string")return l;if($r(l))return Ir(l,jo)+"";if(qo(l))return qL?qL.call(l):"";var h=l+"";return h=="0"&&1/l==-ne?"-0":h}function rf(l,h,A){var N=-1,z=kr,ae=l.length,xe=!0,De=[],qe=De;if(A)xe=!1,z=Xr;else if(ae>=i){var at=h?null:$le(l);if(at)return Nu(at);xe=!1,z=qc,qe=new Vd}else qe=h?[]:De;e:for(;++N<ae;){var ot=l[N],dt=h?h(ot):ot;if(ot=A||ot!==0?ot:0,xe&&dt===dt){for(var Ot=qe.length;Ot--;)if(qe[Ot]===dt)continue e;h&&qe.push(dt),De.push(ot)}else z(qe,dt,A)||(qe!==De&&qe.push(dt),De.push(ot))}return De}function aO(l,h){return h=nf(h,l),l=U9(l,h),l==null||delete l[zc(ps(h))]}function f9(l,h,A,N){return Om(l,h,A(Gd(l,h)),N)}function v_(l,h,A,N){for(var z=l.length,ae=N?z:-1;(N?ae--:++ae<z)&&h(l[ae],ae,l););return A?hs(l,N?0:ae,N?ae+1:z):hs(l,N?ae+1:0,N?z:ae)}function d9(l,h){var A=l;return A instanceof rn&&(A=A.value()),cs(h,function(N,z){return z.func.apply(z.thisArg,Hi([N],z.args))},A)}function oO(l,h,A){var N=l.length;if(N<2)return N?rf(l[0]):[];for(var z=-1,ae=et(N);++z<N;)for(var xe=l[z],De=-1;++De<N;)De!=z&&(ae[z]=Am(ae[z]||xe,l[De],h,A));return rf(na(ae,1),h,A)}function h9(l,h,A){for(var N=-1,z=l.length,ae=h.length,xe={};++N<z;){var De=N<ae?h[N]:r;A(xe,l[N],De)}return xe}function sO(l){return bi(l)?l:[]}function cO(l){return typeof l=="function"?l:bo}function nf(l,h){return $r(l)?l:mO(l,h)?[l]:q9(In(l))}var Ale=zr;function af(l,h,A){var N=l.length;return A=A===r?N:A,!h&&A>=N?l:hs(l,h,A)}var p9=fue||function(l){return mr.clearTimeout(l)};function g9(l,h){if(h)return l.slice();var A=l.length,N=kL?kL(A):new l.constructor(A);return l.copy(N),N}function uO(l){var h=new l.constructor(l.byteLength);return new i_(h).set(new i_(l)),h}function Sle(l,h){var A=h?uO(l.buffer):l.buffer;return new l.constructor(A,l.byteOffset,l.byteLength)}function Ile(l){var h=new l.constructor(l.source,lr.exec(l));return h.lastIndex=l.lastIndex,h}function Ole(l){return Em?Un(Em.call(l)):{}}function y9(l,h){var A=h?uO(l.buffer):l.buffer;return new l.constructor(A,l.byteOffset,l.length)}function m9(l,h){if(l!==h){var A=l!==r,N=l===null,z=l===l,ae=qo(l),xe=h!==r,De=h===null,qe=h===h,at=qo(h);if(!De&&!at&&!ae&&l>h||ae&&xe&&qe&&!De&&!at||N&&xe&&qe||!A&&qe||!z)return 1;if(!N&&!ae&&!at&&l<h||at&&A&&z&&!N&&!ae||De&&A&&z||!xe&&z||!qe)return-1}return 0}function Ple(l,h,A){for(var N=-1,z=l.criteria,ae=h.criteria,xe=z.length,De=A.length;++N<xe;){var qe=m9(z[N],ae[N]);if(qe){if(N>=De)return qe;var at=A[N];return qe*(at=="desc"?-1:1)}}return l.index-h.index}function v9(l,h,A,N){for(var z=-1,ae=l.length,xe=A.length,De=-1,qe=h.length,at=Ui(ae-xe,0),ot=et(qe+at),dt=!N;++De<qe;)ot[De]=h[De];for(;++z<xe;)(dt||z<ae)&&(ot[A[z]]=l[z]);for(;at--;)ot[De++]=l[z++];return ot}function b9(l,h,A,N){for(var z=-1,ae=l.length,xe=-1,De=A.length,qe=-1,at=h.length,ot=Ui(ae-De,0),dt=et(ot+at),Ot=!N;++z<ot;)dt[z]=l[z];for(var Qt=z;++qe<at;)dt[Qt+qe]=h[qe];for(;++xe<De;)(Ot||z<ae)&&(dt[Qt+A[xe]]=l[z++]);return dt}function yo(l,h){var A=-1,N=l.length;for(h||(h=et(N));++A<N;)h[A]=l[A];return h}function Vc(l,h,A,N){var z=!A;A||(A={});for(var ae=-1,xe=h.length;++ae<xe;){var De=h[ae],qe=N?N(A[De],l[De],De,A,l):r;qe===r&&(qe=l[De]),z?Mu(A,De,qe):xm(A,De,qe)}return A}function Tle(l,h){return Vc(l,yO(l),h)}function Rle(l,h){return Vc(l,N9(l),h)}function b_(l,h){return function(A,N){var z=$r(A)?rr:Xue,ae=h?h():{};return z(A,l,ur(N,2),ae)}}function r0(l){return zr(function(h,A){var N=-1,z=A.length,ae=z>1?A[z-1]:r,xe=z>2?A[2]:r;for(ae=l.length>3&&typeof ae=="function"?(z--,ae):r,xe&&Ka(A[0],A[1],xe)&&(ae=z<3?r:ae,z=1),h=Un(h);++N<z;){var De=A[N];De&&l(h,De,N,ae)}return h})}function w9(l,h){return function(A,N){if(A==null)return A;if(!mo(A))return l(A,N);for(var z=A.length,ae=h?z:-1,xe=Un(A);(h?ae--:++ae<z)&&N(xe[ae],ae,xe)!==!1;);return A}}function _9(l){return function(h,A,N){for(var z=-1,ae=Un(h),xe=N(h),De=xe.length;De--;){var qe=xe[l?De:++z];if(A(ae[qe],qe,ae)===!1)break}return h}}function Cle(l,h,A){var N=h&y,z=Pm(l);function ae(){var xe=this&&this!==mr&&this instanceof ae?z:l;return xe.apply(N?A:this,arguments)}return ae}function E9(l){return function(h){h=In(h);var A=rc(h)?Ea(h):r,N=A?A[0]:h.charAt(0),z=A?af(A,1).join(""):h.slice(1);return N[l]()+z}}function n0(l){return function(h){return cs(w7(b7(h).replace(si,"")),l,"")}}function Pm(l){return function(){var h=arguments;switch(h.length){case 0:return new l;case 1:return new l(h[0]);case 2:return new l(h[0],h[1]);case 3:return new l(h[0],h[1],h[2]);case 4:return new l(h[0],h[1],h[2],h[3]);case 5:return new l(h[0],h[1],h[2],h[3],h[4]);case 6:return new l(h[0],h[1],h[2],h[3],h[4],h[5]);case 7:return new l(h[0],h[1],h[2],h[3],h[4],h[5],h[6])}var A=t0(l.prototype),N=l.apply(A,h);return ci(N)?N:A}}function Nle(l,h,A){var N=Pm(l);function z(){for(var ae=arguments.length,xe=et(ae),De=ae,qe=i0(z);De--;)xe[De]=arguments[De];var at=ae<3&&xe[0]!==qe&&xe[ae-1]!==qe?[]:Fo(xe,qe);if(ae-=at.length,ae<A)return O9(l,h,w_,z.placeholder,r,xe,at,r,r,A-ae);var ot=this&&this!==mr&&this instanceof z?N:l;return pt(ot,this,xe)}return z}function x9(l){return function(h,A,N){var z=Un(h);if(!mo(h)){var ae=ur(A,3);h=zi(h),A=function(De){return ae(z[De],De,z)}}var xe=l(h,A,N);return xe>-1?z[ae?h[xe]:xe]:r}}function A9(l){return Lu(function(h){var A=h.length,N=A,z=fs.prototype.thru;for(l&&h.reverse();N--;){var ae=h[N];if(typeof ae!="function")throw new ls(o);if(z&&!xe&&A_(ae)=="wrapper")var xe=new fs([],!0)}for(N=xe?N:A;++N<A;){ae=h[N];var De=A_(ae),qe=De=="wrapper"?pO(ae):r;qe&&vO(qe[0])&&qe[1]==(p|S|I|O)&&!qe[4].length&&qe[9]==1?xe=xe[A_(qe[0])].apply(xe,qe[3]):xe=ae.length==1&&vO(ae)?xe[De]():xe.thru(ae)}return function(){var at=arguments,ot=at[0];if(xe&&at.length==1&&$r(ot))return xe.plant(ot).value();for(var dt=0,Ot=A?h[dt].apply(this,at):ot;++dt<A;)Ot=h[dt].call(this,Ot);return Ot}})}function w_(l,h,A,N,z,ae,xe,De,qe,at){var ot=h&p,dt=h&y,Ot=h&_,Qt=h&(S|x),dr=h&C,Hr=Ot?r:Pm(l);function hr(){for(var Zr=arguments.length,sn=et(Zr),Ho=Zr;Ho--;)sn[Ho]=arguments[Ho];if(Qt)var Ya=i0(hr),Vo=Fp(sn,Ya);if(N&&(sn=v9(sn,N,z,Qt)),ae&&(sn=b9(sn,ae,xe,Qt)),Zr-=Vo,Qt&&Zr<at){var wi=Fo(sn,Ya);return O9(l,h,w_,hr.placeholder,A,sn,wi,De,qe,at-Zr)}var oc=dt?A:this,ju=Ot?oc[l]:l;return Zr=sn.length,De?sn=Xle(sn,De):dr&&Zr>1&&sn.reverse(),ot&&qe<Zr&&(sn.length=qe),this&&this!==mr&&this instanceof hr&&(ju=Hr||Pm(ju)),ju.apply(oc,sn)}return hr}function S9(l,h){return function(A,N){return ole(A,l,h(N),{})}}function __(l,h){return function(A,N){var z;if(A===r&&N===r)return h;if(A!==r&&(z=A),N!==r){if(z===r)return N;typeof A=="string"||typeof N=="string"?(A=jo(A),N=jo(N)):(A=l9(A),N=l9(N)),z=l(A,N)}return z}}function lO(l){return Lu(function(h){return h=Ir(h,Vi(ur())),zr(function(A){var N=this;return l(h,function(z){return pt(z,N,A)})})})}function E_(l,h){h=h===r?" ":jo(h);var A=h.length;if(A<2)return A?nO(h,l):h;var N=nO(h,c_(l/nc(h)));return rc(h)?af(Ea(N),0,l).join(""):N.slice(0,l)}function Dle(l,h,A,N){var z=h&y,ae=Pm(l);function xe(){for(var De=-1,qe=arguments.length,at=-1,ot=N.length,dt=et(ot+qe),Ot=this&&this!==mr&&this instanceof xe?ae:l;++at<ot;)dt[at]=N[at];for(;qe--;)dt[at++]=arguments[++De];return pt(Ot,z?A:this,dt)}return xe}function I9(l){return function(h,A,N){return N&&typeof N!="number"&&Ka(h,A,N)&&(A=N=r),h=Fu(h),A===r?(A=h,h=0):A=Fu(A),N=N===r?h<A?1:-1:Fu(N),vle(h,A,N,l)}}function x_(l){return function(h,A){return typeof h=="string"&&typeof A=="string"||(h=gs(h),A=gs(A)),l(h,A)}}function O9(l,h,A,N,z,ae,xe,De,qe,at){var ot=h&S,dt=ot?xe:r,Ot=ot?r:xe,Qt=ot?ae:r,dr=ot?r:ae;h|=ot?I:E,h&=~(ot?E:I),h&b||(h&=~(y|_));var Hr=[l,h,z,Qt,dt,dr,Ot,De,qe,at],hr=A.apply(r,Hr);return vO(l)&&B9(hr,Hr),hr.placeholder=N,F9(hr,l,h)}function fO(l){var h=Li[l];return function(A,N){if(A=gs(A),N=N==null?0:xa(Fr(N),292),N&&FL(A)){var z=(In(A)+"e").split("e"),ae=h(z[0]+"e"+(+z[1]+N));return z=(In(ae)+"e").split("e"),+(z[0]+"e"+(+z[1]-N))}return h(A)}}var $le=Zp&&1/Nu(new Zp([,-0]))[1]==ne?function(l){return new Zp(l)}:DO;function P9(l){return function(h){var A=Aa(h);return A==mt?Zl(h):A==Pt?Wp(h):Bp(h,l(h))}}function ku(l,h,A,N,z,ae,xe,De){var qe=h&_;if(!qe&&typeof l!="function")throw new ls(o);var at=N?N.length:0;if(at||(h&=~(I|E),N=z=r),xe=xe===r?xe:Ui(Fr(xe),0),De=De===r?De:Fr(De),at-=z?z.length:0,h&E){var ot=N,dt=z;N=z=r}var Ot=qe?r:pO(l),Qt=[l,h,A,N,z,ot,dt,ae,xe,De];if(Ot&&Yle(Qt,Ot),l=Qt[0],h=Qt[1],A=Qt[2],N=Qt[3],z=Qt[4],De=Qt[9]=Qt[9]===r?qe?0:l.length:Ui(Qt[9]-at,0),!De&&h&(S|x)&&(h&=~(S|x)),!h||h==y)var dr=Cle(l,h,A);else h==S||h==x?dr=Nle(l,h,De):(h==I||h==(y|I))&&!z.length?dr=Dle(l,h,A,N):dr=w_.apply(r,Qt);var Hr=Ot?c9:B9;return F9(Hr(dr,Qt),l,h)}function T9(l,h,A,N){return l===r||ac(l,Xp[A])&&!Tn.call(N,A)?h:l}function R9(l,h,A,N,z,ae){return ci(l)&&ci(h)&&(ae.set(h,l),y_(l,h,r,R9,ae),ae.delete(h)),l}function Mle(l){return Cm(l)?r:l}function C9(l,h,A,N,z,ae){var xe=A&w,De=l.length,qe=h.length;if(De!=qe&&!(xe&&qe>De))return!1;var at=ae.get(l),ot=ae.get(h);if(at&&ot)return at==h&&ot==l;var dt=-1,Ot=!0,Qt=A&v?new Vd:r;for(ae.set(l,h),ae.set(h,l);++dt<De;){var dr=l[dt],Hr=h[dt];if(N)var hr=xe?N(Hr,dr,dt,h,l,ae):N(dr,Hr,dt,l,h,ae);if(hr!==r){if(hr)continue;Ot=!1;break}if(Qt){if(!Mi(h,function(Zr,sn){if(!qc(Qt,sn)&&(dr===Zr||z(dr,Zr,A,N,ae)))return Qt.push(sn)})){Ot=!1;break}}else if(!(dr===Hr||z(dr,Hr,A,N,ae))){Ot=!1;break}}return ae.delete(l),ae.delete(h),Ot}function kle(l,h,A,N,z,ae,xe){switch(A){case Dt:if(l.byteLength!=h.byteLength||l.byteOffset!=h.byteOffset)return!1;l=l.buffer,h=h.buffer;case $t:return!(l.byteLength!=h.byteLength||!ae(new i_(l),new i_(h)));case te:case ue:case vt:return ac(+l,+h);case fe:return l.name==h.name&&l.message==h.message;case Rt:case kt:return l==h+"";case mt:var De=Zl;case Pt:var qe=N&w;if(De||(De=Nu),l.size!=h.size&&!qe)return!1;var at=xe.get(l);if(at)return at==h;N|=v,xe.set(l,h);var ot=C9(De(l),De(h),N,z,ae,xe);return xe.delete(l),ot;case Nt:if(Em)return Em.call(l)==Em.call(h)}return!1}function Lle(l,h,A,N,z,ae){var xe=A&w,De=dO(l),qe=De.length,at=dO(h),ot=at.length;if(qe!=ot&&!xe)return!1;for(var dt=qe;dt--;){var Ot=De[dt];if(!(xe?Ot in h:Tn.call(h,Ot)))return!1}var Qt=ae.get(l),dr=ae.get(h);if(Qt&&dr)return Qt==h&&dr==l;var Hr=!0;ae.set(l,h),ae.set(h,l);for(var hr=xe;++dt<qe;){Ot=De[dt];var Zr=l[Ot],sn=h[Ot];if(N)var Ho=xe?N(sn,Zr,Ot,h,l,ae):N(Zr,sn,Ot,l,h,ae);if(!(Ho===r?Zr===sn||z(Zr,sn,A,N,ae):Ho)){Hr=!1;break}hr||(hr=Ot=="constructor")}if(Hr&&!hr){var Ya=l.constructor,Vo=h.constructor;Ya!=Vo&&"constructor"in l&&"constructor"in h&&!(typeof Ya=="function"&&Ya instanceof Ya&&typeof Vo=="function"&&Vo instanceof Vo)&&(Hr=!1)}return ae.delete(l),ae.delete(h),Hr}function Lu(l){return wO(L9(l,r,G9),l+"")}function dO(l){return JL(l,zi,yO)}function hO(l){return JL(l,vo,N9)}var pO=l_?function(l){return l_.get(l)}:DO;function A_(l){for(var h=l.name+"",A=e0[h],N=Tn.call(e0,h)?A.length:0;N--;){var z=A[N],ae=z.func;if(ae==null||ae==l)return z.name}return h}function i0(l){var h=Tn.call(J,"placeholder")?J:l;return h.placeholder}function ur(){var l=J.iteratee||CO;return l=l===CO?e9:l,arguments.length?l(arguments[0],arguments[1]):l}function S_(l,h){var A=l.__data__;return zle(h)?A[typeof h=="string"?"string":"hash"]:A.map}function gO(l){for(var h=zi(l),A=h.length;A--;){var N=h[A],z=l[N];h[A]=[N,z,M9(z)]}return h}function Wd(l,h){var A=Vp(l,h);return ZL(A)?A:r}function Ule(l){var h=Tn.call(l,qd),A=l[qd];try{l[qd]=r;var N=!0}catch{}var z=r_.call(l);return N&&(h?l[qd]=A:delete l[qd]),z}var yO=HI?function(l){return l==null?[]:(l=Un(l),dn(HI(l),function(h){return UL.call(l,h)}))}:$O,N9=HI?function(l){for(var h=[];l;)Hi(h,yO(l)),l=a_(l);return h}:$O,Aa=Wa;(VI&&Aa(new VI(new ArrayBuffer(1)))!=Dt||bm&&Aa(new bm)!=mt||zI&&Aa(zI.resolve())!=Yt||Zp&&Aa(new Zp)!=Pt||wm&&Aa(new wm)!=Ut)&&(Aa=function(l){var h=Wa(l),A=h==Lt?l.constructor:r,N=A?Kd(A):"";if(N)switch(N){case wue:return Dt;case _ue:return mt;case Eue:return Yt;case xue:return Pt;case Aue:return Ut}return h});function Ble(l,h,A){for(var N=-1,z=A.length;++N<z;){var ae=A[N],xe=ae.size;switch(ae.type){case"drop":l+=xe;break;case"dropRight":h-=xe;break;case"take":h=xa(h,l+xe);break;case"takeRight":l=Ui(l,h-xe);break}}return{start:l,end:h}}function Fle(l){var h=l.match(ye);return h?h[1].split(Me):[]}function D9(l,h,A){h=nf(h,l);for(var N=-1,z=h.length,ae=!1;++N<z;){var xe=zc(h[N]);if(!(ae=l!=null&&A(l,xe)))break;l=l[xe]}return ae||++N!=z?ae:(z=l==null?0:l.length,!!z&&N_(z)&&Uu(xe,z)&&($r(l)||Yd(l)))}function jle(l){var h=l.length,A=new l.constructor(h);return h&&typeof l[0]=="string"&&Tn.call(l,"index")&&(A.index=l.index,A.input=l.input),A}function $9(l){return typeof l.constructor=="function"&&!Tm(l)?t0(a_(l)):{}}function qle(l,h,A){var N=l.constructor;switch(h){case $t:return uO(l);case te:case ue:return new N(+l);case Dt:return Sle(l,A);case qt:case Mt:case cr:case tr:case ir:case nr:case vr:case wn:case Yr:return y9(l,A);case mt:return new N;case vt:case kt:return new N(l);case Rt:return Ile(l);case Pt:return new N;case Nt:return Ole(l)}}function Hle(l,h){var A=h.length;if(!A)return l;var N=A-1;return h[N]=(A>1?"& ":"")+h[N],h=h.join(A>2?", ":" "),l.replace(Z,`{
|
|
148
|
-
/* [wrapped with `+h+`] */
|
|
149
|
-
`)}function Vle(l){return $r(l)||Yd(l)||!!(BL&&l&&l[BL])}function Uu(l,h){var A=typeof l;return h=h??j,!!h&&(A=="number"||A!="symbol"&&sr.test(l))&&l>-1&&l%1==0&&l<h}function Ka(l,h,A){if(!ci(A))return!1;var N=typeof h;return(N=="number"?mo(A)&&Uu(h,A.length):N=="string"&&h in A)?ac(A[h],l):!1}function mO(l,h){if($r(l))return!1;var A=typeof l;return A=="number"||A=="symbol"||A=="boolean"||l==null||qo(l)?!0:ze.test(l)||!Re.test(l)||h!=null&&l in Un(h)}function zle(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function vO(l){var h=A_(l),A=J[h];if(typeof A!="function"||!(h in rn.prototype))return!1;if(l===A)return!0;var N=pO(A);return!!N&&l===N[0]}function Gle(l){return!!ML&&ML in l}var Wle=e_?Bu:MO;function Tm(l){var h=l&&l.constructor,A=typeof h=="function"&&h.prototype||Xp;return l===A}function M9(l){return l===l&&!ci(l)}function k9(l,h){return function(A){return A==null?!1:A[l]===h&&(h!==r||l in Un(A))}}function Kle(l){var h=R_(l,function(N){return A.size===u&&A.clear(),N}),A=h.cache;return h}function Yle(l,h){var A=l[1],N=h[1],z=A|N,ae=z<(y|_|p),xe=N==p&&A==S||N==p&&A==O&&l[7].length<=h[8]||N==(p|O)&&h[7].length<=h[8]&&A==S;if(!(ae||xe))return l;N&y&&(l[2]=h[2],z|=A&y?0:b);var De=h[3];if(De){var qe=l[3];l[3]=qe?v9(qe,De,h[4]):De,l[4]=qe?Fo(l[3],f):h[4]}return De=h[5],De&&(qe=l[5],l[5]=qe?b9(qe,De,h[6]):De,l[6]=qe?Fo(l[5],f):h[6]),De=h[7],De&&(l[7]=De),N&p&&(l[8]=l[8]==null?h[8]:xa(l[8],h[8])),l[9]==null&&(l[9]=h[9]),l[0]=h[0],l[1]=z,l}function Qle(l){var h=[];if(l!=null)for(var A in Un(l))h.push(A);return h}function Jle(l){return r_.call(l)}function L9(l,h,A){return h=Ui(h===r?l.length-1:h,0),function(){for(var N=arguments,z=-1,ae=Ui(N.length-h,0),xe=et(ae);++z<ae;)xe[z]=N[h+z];z=-1;for(var De=et(h+1);++z<h;)De[z]=N[z];return De[h]=A(xe),pt(l,this,De)}}function U9(l,h){return h.length<2?l:Gd(l,hs(h,0,-1))}function Xle(l,h){for(var A=l.length,N=xa(h.length,A),z=yo(l);N--;){var ae=h[N];l[N]=Uu(ae,A)?z[ae]:r}return l}function bO(l,h){if(!(h==="constructor"&&typeof l[h]=="function")&&h!="__proto__")return l[h]}var B9=j9(c9),Rm=hue||function(l,h){return mr.setTimeout(l,h)},wO=j9(_le);function F9(l,h,A){var N=h+"";return wO(l,Hle(N,Zle(Fle(N),A)))}function j9(l){var h=0,A=0;return function(){var N=mue(),z=he-(N-A);if(A=N,z>0){if(++h>=ce)return arguments[0]}else h=0;return l.apply(r,arguments)}}function I_(l,h){var A=-1,N=l.length,z=N-1;for(h=h===r?N:h;++A<h;){var ae=rO(A,z),xe=l[ae];l[ae]=l[A],l[A]=xe}return l.length=h,l}var q9=Kle(function(l){var h=[];return l.charCodeAt(0)===46&&h.push(""),l.replace(Xe,function(A,N,z,ae){h.push(z?ae.replace(It,"$1"):N||A)}),h});function zc(l){if(typeof l=="string"||qo(l))return l;var h=l+"";return h=="0"&&1/l==-ne?"-0":h}function Kd(l){if(l!=null){try{return t_.call(l)}catch{}try{return l+""}catch{}}return""}function Zle(l,h){return Wt(k,function(A){var N="_."+A[0];h&A[1]&&!kr(l,N)&&l.push(N)}),l.sort()}function H9(l){if(l instanceof rn)return l.clone();var h=new fs(l.__wrapped__,l.__chain__);return h.__actions__=yo(l.__actions__),h.__index__=l.__index__,h.__values__=l.__values__,h}function efe(l,h,A){(A?Ka(l,h,A):h===r)?h=1:h=Ui(Fr(h),0);var N=l==null?0:l.length;if(!N||h<1)return[];for(var z=0,ae=0,xe=et(c_(N/h));z<N;)xe[ae++]=hs(l,z,z+=h);return xe}function tfe(l){for(var h=-1,A=l==null?0:l.length,N=0,z=[];++h<A;){var ae=l[h];ae&&(z[N++]=ae)}return z}function rfe(){var l=arguments.length;if(!l)return[];for(var h=et(l-1),A=arguments[0],N=l;N--;)h[N-1]=arguments[N];return Hi($r(A)?yo(A):[A],na(h,1))}var nfe=zr(function(l,h){return bi(l)?Am(l,na(h,1,bi,!0)):[]}),ife=zr(function(l,h){var A=ps(h);return bi(A)&&(A=r),bi(l)?Am(l,na(h,1,bi,!0),ur(A,2)):[]}),afe=zr(function(l,h){var A=ps(h);return bi(A)&&(A=r),bi(l)?Am(l,na(h,1,bi,!0),r,A):[]});function ofe(l,h,A){var N=l==null?0:l.length;return N?(h=A||h===r?1:Fr(h),hs(l,h<0?0:h,N)):[]}function sfe(l,h,A){var N=l==null?0:l.length;return N?(h=A||h===r?1:Fr(h),h=N-h,hs(l,0,h<0?0:h)):[]}function cfe(l,h){return l&&l.length?v_(l,ur(h,3),!0,!0):[]}function ufe(l,h){return l&&l.length?v_(l,ur(h,3),!0):[]}function lfe(l,h,A,N){var z=l==null?0:l.length;return z?(A&&typeof A!="number"&&Ka(l,h,A)&&(A=0,N=z),rle(l,h,A,N)):[]}function V9(l,h,A){var N=l==null?0:l.length;if(!N)return-1;var z=A==null?0:Fr(A);return z<0&&(z=Ui(N+z,0)),Cu(l,ur(h,3),z)}function z9(l,h,A){var N=l==null?0:l.length;if(!N)return-1;var z=N-1;return A!==r&&(z=Fr(A),z=A<0?Ui(N+z,0):xa(z,N-1)),Cu(l,ur(h,3),z,!0)}function G9(l){var h=l==null?0:l.length;return h?na(l,1):[]}function ffe(l){var h=l==null?0:l.length;return h?na(l,ne):[]}function dfe(l,h){var A=l==null?0:l.length;return A?(h=h===r?1:Fr(h),na(l,h)):[]}function hfe(l){for(var h=-1,A=l==null?0:l.length,N={};++h<A;){var z=l[h];N[z[0]]=z[1]}return N}function W9(l){return l&&l.length?l[0]:r}function pfe(l,h,A){var N=l==null?0:l.length;if(!N)return-1;var z=A==null?0:Fr(A);return z<0&&(z=Ui(N+z,0)),tc(l,h,z)}function gfe(l){var h=l==null?0:l.length;return h?hs(l,0,-1):[]}var yfe=zr(function(l){var h=Ir(l,sO);return h.length&&h[0]===l[0]?JI(h):[]}),mfe=zr(function(l){var h=ps(l),A=Ir(l,sO);return h===ps(A)?h=r:A.pop(),A.length&&A[0]===l[0]?JI(A,ur(h,2)):[]}),vfe=zr(function(l){var h=ps(l),A=Ir(l,sO);return h=typeof h=="function"?h:r,h&&A.pop(),A.length&&A[0]===l[0]?JI(A,r,h):[]});function bfe(l,h){return l==null?"":gue.call(l,h)}function ps(l){var h=l==null?0:l.length;return h?l[h-1]:r}function wfe(l,h,A){var N=l==null?0:l.length;if(!N)return-1;var z=N;return A!==r&&(z=Fr(A),z=z<0?Ui(N+z,0):xa(z,N-1)),h===h?Yp(l,h,z):Cu(l,$d,z,!0)}function _fe(l,h){return l&&l.length?i9(l,Fr(h)):r}var Efe=zr(K9);function K9(l,h){return l&&l.length&&h&&h.length?tO(l,h):l}function xfe(l,h,A){return l&&l.length&&h&&h.length?tO(l,h,ur(A,2)):l}function Afe(l,h,A){return l&&l.length&&h&&h.length?tO(l,h,r,A):l}var Sfe=Lu(function(l,h){var A=l==null?0:l.length,N=WI(l,h);return s9(l,Ir(h,function(z){return Uu(z,A)?+z:z}).sort(m9)),N});function Ife(l,h){var A=[];if(!(l&&l.length))return A;var N=-1,z=[],ae=l.length;for(h=ur(h,3);++N<ae;){var xe=l[N];h(xe,N,l)&&(A.push(xe),z.push(N))}return s9(l,z),A}function _O(l){return l==null?l:bue.call(l)}function Ofe(l,h,A){var N=l==null?0:l.length;return N?(A&&typeof A!="number"&&Ka(l,h,A)?(h=0,A=N):(h=h==null?0:Fr(h),A=A===r?N:Fr(A)),hs(l,h,A)):[]}function Pfe(l,h){return m_(l,h)}function Tfe(l,h,A){return iO(l,h,ur(A,2))}function Rfe(l,h){var A=l==null?0:l.length;if(A){var N=m_(l,h);if(N<A&&ac(l[N],h))return N}return-1}function Cfe(l,h){return m_(l,h,!0)}function Nfe(l,h,A){return iO(l,h,ur(A,2),!0)}function Dfe(l,h){var A=l==null?0:l.length;if(A){var N=m_(l,h,!0)-1;if(ac(l[N],h))return N}return-1}function $fe(l){return l&&l.length?u9(l):[]}function Mfe(l,h){return l&&l.length?u9(l,ur(h,2)):[]}function kfe(l){var h=l==null?0:l.length;return h?hs(l,1,h):[]}function Lfe(l,h,A){return l&&l.length?(h=A||h===r?1:Fr(h),hs(l,0,h<0?0:h)):[]}function Ufe(l,h,A){var N=l==null?0:l.length;return N?(h=A||h===r?1:Fr(h),h=N-h,hs(l,h<0?0:h,N)):[]}function Bfe(l,h){return l&&l.length?v_(l,ur(h,3),!1,!0):[]}function Ffe(l,h){return l&&l.length?v_(l,ur(h,3)):[]}var jfe=zr(function(l){return rf(na(l,1,bi,!0))}),qfe=zr(function(l){var h=ps(l);return bi(h)&&(h=r),rf(na(l,1,bi,!0),ur(h,2))}),Hfe=zr(function(l){var h=ps(l);return h=typeof h=="function"?h:r,rf(na(l,1,bi,!0),r,h)});function Vfe(l){return l&&l.length?rf(l):[]}function zfe(l,h){return l&&l.length?rf(l,ur(h,2)):[]}function Gfe(l,h){return h=typeof h=="function"?h:r,l&&l.length?rf(l,r,h):[]}function EO(l){if(!(l&&l.length))return[];var h=0;return l=dn(l,function(A){if(bi(A))return h=Ui(A.length,h),!0}),Jl(h,function(A){return Ir(l,Kl(A))})}function Y9(l,h){if(!(l&&l.length))return[];var A=EO(l);return h==null?A:Ir(A,function(N){return pt(h,r,N)})}var Wfe=zr(function(l,h){return bi(l)?Am(l,h):[]}),Kfe=zr(function(l){return oO(dn(l,bi))}),Yfe=zr(function(l){var h=ps(l);return bi(h)&&(h=r),oO(dn(l,bi),ur(h,2))}),Qfe=zr(function(l){var h=ps(l);return h=typeof h=="function"?h:r,oO(dn(l,bi),r,h)}),Jfe=zr(EO);function Xfe(l,h){return h9(l||[],h||[],xm)}function Zfe(l,h){return h9(l||[],h||[],Om)}var ede=zr(function(l){var h=l.length,A=h>1?l[h-1]:r;return A=typeof A=="function"?(l.pop(),A):r,Y9(l,A)});function Q9(l){var h=J(l);return h.__chain__=!0,h}function tde(l,h){return h(l),l}function O_(l,h){return h(l)}var rde=Lu(function(l){var h=l.length,A=h?l[0]:0,N=this.__wrapped__,z=function(ae){return WI(ae,l)};return h>1||this.__actions__.length||!(N instanceof rn)||!Uu(A)?this.thru(z):(N=N.slice(A,+A+(h?1:0)),N.__actions__.push({func:O_,args:[z],thisArg:r}),new fs(N,this.__chain__).thru(function(ae){return h&&!ae.length&&ae.push(r),ae}))});function nde(){return Q9(this)}function ide(){return new fs(this.value(),this.__chain__)}function ade(){this.__values__===r&&(this.__values__=l7(this.value()));var l=this.__index__>=this.__values__.length,h=l?r:this.__values__[this.__index__++];return{done:l,value:h}}function ode(){return this}function sde(l){for(var h,A=this;A instanceof d_;){var N=H9(A);N.__index__=0,N.__values__=r,h?z.__wrapped__=N:h=N;var z=N;A=A.__wrapped__}return z.__wrapped__=l,h}function cde(){var l=this.__wrapped__;if(l instanceof rn){var h=l;return this.__actions__.length&&(h=new rn(this)),h=h.reverse(),h.__actions__.push({func:O_,args:[_O],thisArg:r}),new fs(h,this.__chain__)}return this.thru(_O)}function ude(){return d9(this.__wrapped__,this.__actions__)}var lde=b_(function(l,h,A){Tn.call(l,A)?++l[A]:Mu(l,A,1)});function fde(l,h,A){var N=$r(l)?Pn:tle;return A&&Ka(l,h,A)&&(h=r),N(l,ur(h,3))}function dde(l,h){var A=$r(l)?dn:YL;return A(l,ur(h,3))}var hde=x9(V9),pde=x9(z9);function gde(l,h){return na(P_(l,h),1)}function yde(l,h){return na(P_(l,h),ne)}function mde(l,h,A){return A=A===r?1:Fr(A),na(P_(l,h),A)}function J9(l,h){var A=$r(l)?Wt:tf;return A(l,ur(h,3))}function X9(l,h){var A=$r(l)?Jr:KL;return A(l,ur(h,3))}var vde=b_(function(l,h,A){Tn.call(l,A)?l[A].push(h):Mu(l,A,[h])});function bde(l,h,A,N){l=mo(l)?l:o0(l),A=A&&!N?Fr(A):0;var z=l.length;return A<0&&(A=Ui(z+A,0)),D_(l)?A<=z&&l.indexOf(h,A)>-1:!!z&&tc(l,h,A)>-1}var wde=zr(function(l,h,A){var N=-1,z=typeof h=="function",ae=mo(l)?et(l.length):[];return tf(l,function(xe){ae[++N]=z?pt(h,xe,A):Sm(xe,h,A)}),ae}),_de=b_(function(l,h,A){Mu(l,A,h)});function P_(l,h){var A=$r(l)?Ir:t9;return A(l,ur(h,3))}function Ede(l,h,A,N){return l==null?[]:($r(h)||(h=h==null?[]:[h]),A=N?r:A,$r(A)||(A=A==null?[]:[A]),a9(l,h,A))}var xde=b_(function(l,h,A){l[A?0:1].push(h)},function(){return[[],[]]});function Ade(l,h,A){var N=$r(l)?cs:kd,z=arguments.length<3;return N(l,ur(h,4),A,z,tf)}function Sde(l,h,A){var N=$r(l)?jc:kd,z=arguments.length<3;return N(l,ur(h,4),A,z,KL)}function Ide(l,h){var A=$r(l)?dn:YL;return A(l,C_(ur(h,3)))}function Ode(l){var h=$r(l)?VL:ble;return h(l)}function Pde(l,h,A){(A?Ka(l,h,A):h===r)?h=1:h=Fr(h);var N=$r(l)?Que:wle;return N(l,h)}function Tde(l){var h=$r(l)?Jue:Ele;return h(l)}function Rde(l){if(l==null)return 0;if(mo(l))return D_(l)?nc(l):l.length;var h=Aa(l);return h==mt||h==Pt?l.size:ZI(l).length}function Cde(l,h,A){var N=$r(l)?Mi:xle;return A&&Ka(l,h,A)&&(h=r),N(l,ur(h,3))}var Nde=zr(function(l,h){if(l==null)return[];var A=h.length;return A>1&&Ka(l,h[0],h[1])?h=[]:A>2&&Ka(h[0],h[1],h[2])&&(h=[h[0]]),a9(l,na(h,1),[])}),T_=due||function(){return mr.Date.now()};function Dde(l,h){if(typeof h!="function")throw new ls(o);return l=Fr(l),function(){if(--l<1)return h.apply(this,arguments)}}function Z9(l,h,A){return h=A?r:h,h=l&&h==null?l.length:h,ku(l,p,r,r,r,r,h)}function e7(l,h){var A;if(typeof h!="function")throw new ls(o);return l=Fr(l),function(){return--l>0&&(A=h.apply(this,arguments)),l<=1&&(h=r),A}}var xO=zr(function(l,h,A){var N=y;if(A.length){var z=Fo(A,i0(xO));N|=I}return ku(l,N,h,A,z)}),t7=zr(function(l,h,A){var N=y|_;if(A.length){var z=Fo(A,i0(t7));N|=I}return ku(h,N,l,A,z)});function r7(l,h,A){h=A?r:h;var N=ku(l,S,r,r,r,r,r,h);return N.placeholder=r7.placeholder,N}function n7(l,h,A){h=A?r:h;var N=ku(l,x,r,r,r,r,r,h);return N.placeholder=n7.placeholder,N}function i7(l,h,A){var N,z,ae,xe,De,qe,at=0,ot=!1,dt=!1,Ot=!0;if(typeof l!="function")throw new ls(o);h=gs(h)||0,ci(A)&&(ot=!!A.leading,dt="maxWait"in A,ae=dt?Ui(gs(A.maxWait)||0,h):ae,Ot="trailing"in A?!!A.trailing:Ot);function Qt(wi){var oc=N,ju=z;return N=z=r,at=wi,xe=l.apply(ju,oc),xe}function dr(wi){return at=wi,De=Rm(Zr,h),ot?Qt(wi):xe}function Hr(wi){var oc=wi-qe,ju=wi-at,x7=h-oc;return dt?xa(x7,ae-ju):x7}function hr(wi){var oc=wi-qe,ju=wi-at;return qe===r||oc>=h||oc<0||dt&&ju>=ae}function Zr(){var wi=T_();if(hr(wi))return sn(wi);De=Rm(Zr,Hr(wi))}function sn(wi){return De=r,Ot&&N?Qt(wi):(N=z=r,xe)}function Ho(){De!==r&&p9(De),at=0,N=qe=z=De=r}function Ya(){return De===r?xe:sn(T_())}function Vo(){var wi=T_(),oc=hr(wi);if(N=arguments,z=this,qe=wi,oc){if(De===r)return dr(qe);if(dt)return p9(De),De=Rm(Zr,h),Qt(qe)}return De===r&&(De=Rm(Zr,h)),xe}return Vo.cancel=Ho,Vo.flush=Ya,Vo}var $de=zr(function(l,h){return WL(l,1,h)}),Mde=zr(function(l,h,A){return WL(l,gs(h)||0,A)});function kde(l){return ku(l,C)}function R_(l,h){if(typeof l!="function"||h!=null&&typeof h!="function")throw new ls(o);var A=function(){var N=arguments,z=h?h.apply(this,N):N[0],ae=A.cache;if(ae.has(z))return ae.get(z);var xe=l.apply(this,N);return A.cache=ae.set(z,xe)||ae,xe};return A.cache=new(R_.Cache||$u),A}R_.Cache=$u;function C_(l){if(typeof l!="function")throw new ls(o);return function(){var h=arguments;switch(h.length){case 0:return!l.call(this);case 1:return!l.call(this,h[0]);case 2:return!l.call(this,h[0],h[1]);case 3:return!l.call(this,h[0],h[1],h[2])}return!l.apply(this,h)}}function Lde(l){return e7(2,l)}var Ude=Ale(function(l,h){h=h.length==1&&$r(h[0])?Ir(h[0],Vi(ur())):Ir(na(h,1),Vi(ur()));var A=h.length;return zr(function(N){for(var z=-1,ae=xa(N.length,A);++z<ae;)N[z]=h[z].call(this,N[z]);return pt(l,this,N)})}),AO=zr(function(l,h){var A=Fo(h,i0(AO));return ku(l,I,r,h,A)}),a7=zr(function(l,h){var A=Fo(h,i0(a7));return ku(l,E,r,h,A)}),Bde=Lu(function(l,h){return ku(l,O,r,r,r,h)});function Fde(l,h){if(typeof l!="function")throw new ls(o);return h=h===r?h:Fr(h),zr(l,h)}function jde(l,h){if(typeof l!="function")throw new ls(o);return h=h==null?0:Ui(Fr(h),0),zr(function(A){var N=A[h],z=af(A,0,h);return N&&Hi(z,N),pt(l,this,z)})}function qde(l,h,A){var N=!0,z=!0;if(typeof l!="function")throw new ls(o);return ci(A)&&(N="leading"in A?!!A.leading:N,z="trailing"in A?!!A.trailing:z),i7(l,h,{leading:N,maxWait:h,trailing:z})}function Hde(l){return Z9(l,1)}function Vde(l,h){return AO(cO(h),l)}function zde(){if(!arguments.length)return[];var l=arguments[0];return $r(l)?l:[l]}function Gde(l){return ds(l,m)}function Wde(l,h){return h=typeof h=="function"?h:r,ds(l,m,h)}function Kde(l){return ds(l,d|m)}function Yde(l,h){return h=typeof h=="function"?h:r,ds(l,d|m,h)}function Qde(l,h){return h==null||GL(l,h,zi(h))}function ac(l,h){return l===h||l!==l&&h!==h}var Jde=x_(QI),Xde=x_(function(l,h){return l>=h}),Yd=XL(function(){return arguments}())?XL:function(l){return pi(l)&&Tn.call(l,"callee")&&!UL.call(l,"callee")},$r=et.isArray,Zde=Ae?Vi(Ae):sle;function mo(l){return l!=null&&N_(l.length)&&!Bu(l)}function bi(l){return pi(l)&&mo(l)}function ehe(l){return l===!0||l===!1||pi(l)&&Wa(l)==te}var of=pue||MO,the=Oe?Vi(Oe):cle;function rhe(l){return pi(l)&&l.nodeType===1&&!Cm(l)}function nhe(l){if(l==null)return!0;if(mo(l)&&($r(l)||typeof l=="string"||typeof l.splice=="function"||of(l)||a0(l)||Yd(l)))return!l.length;var h=Aa(l);if(h==mt||h==Pt)return!l.size;if(Tm(l))return!ZI(l).length;for(var A in l)if(Tn.call(l,A))return!1;return!0}function ihe(l,h){return Im(l,h)}function ahe(l,h,A){A=typeof A=="function"?A:r;var N=A?A(l,h):r;return N===r?Im(l,h,r,A):!!N}function SO(l){if(!pi(l))return!1;var h=Wa(l);return h==fe||h==T||typeof l.message=="string"&&typeof l.name=="string"&&!Cm(l)}function ohe(l){return typeof l=="number"&&FL(l)}function Bu(l){if(!ci(l))return!1;var h=Wa(l);return h==Ge||h==tt||h==Q||h==_r}function o7(l){return typeof l=="number"&&l==Fr(l)}function N_(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=j}function ci(l){var h=typeof l;return l!=null&&(h=="object"||h=="function")}function pi(l){return l!=null&&typeof l=="object"}var s7=Pe?Vi(Pe):lle;function she(l,h){return l===h||XI(l,h,gO(h))}function che(l,h,A){return A=typeof A=="function"?A:r,XI(l,h,gO(h),A)}function uhe(l){return c7(l)&&l!=+l}function lhe(l){if(Wle(l))throw new Nr(a);return ZL(l)}function fhe(l){return l===null}function dhe(l){return l==null}function c7(l){return typeof l=="number"||pi(l)&&Wa(l)==vt}function Cm(l){if(!pi(l)||Wa(l)!=Lt)return!1;var h=a_(l);if(h===null)return!0;var A=Tn.call(h,"constructor")&&h.constructor;return typeof A=="function"&&A instanceof A&&t_.call(A)==cue}var IO=je?Vi(je):fle;function hhe(l){return o7(l)&&l>=-j&&l<=j}var u7=Ye?Vi(Ye):dle;function D_(l){return typeof l=="string"||!$r(l)&&pi(l)&&Wa(l)==kt}function qo(l){return typeof l=="symbol"||pi(l)&&Wa(l)==Nt}var a0=Ve?Vi(Ve):hle;function phe(l){return l===r}function ghe(l){return pi(l)&&Aa(l)==Ut}function yhe(l){return pi(l)&&Wa(l)==Vt}var mhe=x_(eO),vhe=x_(function(l,h){return l<=h});function l7(l){if(!l)return[];if(mo(l))return D_(l)?Ea(l):yo(l);if(vm&&l[vm])return Gp(l[vm]());var h=Aa(l),A=h==mt?Zl:h==Pt?Nu:o0;return A(l)}function Fu(l){if(!l)return l===0?l:0;if(l=gs(l),l===ne||l===-ne){var h=l<0?-1:1;return h*q}return l===l?l:0}function Fr(l){var h=Fu(l),A=h%1;return h===h?A?h-A:h:0}function f7(l){return l?zd(Fr(l),0,$):0}function gs(l){if(typeof l=="number")return l;if(qo(l))return V;if(ci(l)){var h=typeof l.valueOf=="function"?l.valueOf():l;l=ci(h)?h+"":h}if(typeof l!="string")return l===0?l:+l;l=Ld(l);var A=yr.test(l);return A||on.test(l)?fr(l.slice(2),A?2:8):en.test(l)?V:+l}function d7(l){return Vc(l,vo(l))}function bhe(l){return l?zd(Fr(l),-j,j):l===0?l:0}function In(l){return l==null?"":jo(l)}var whe=r0(function(l,h){if(Tm(h)||mo(h)){Vc(h,zi(h),l);return}for(var A in h)Tn.call(h,A)&&xm(l,A,h[A])}),h7=r0(function(l,h){Vc(h,vo(h),l)}),$_=r0(function(l,h,A,N){Vc(h,vo(h),l,N)}),_he=r0(function(l,h,A,N){Vc(h,zi(h),l,N)}),Ehe=Lu(WI);function xhe(l,h){var A=t0(l);return h==null?A:zL(A,h)}var Ahe=zr(function(l,h){l=Un(l);var A=-1,N=h.length,z=N>2?h[2]:r;for(z&&Ka(h[0],h[1],z)&&(N=1);++A<N;)for(var ae=h[A],xe=vo(ae),De=-1,qe=xe.length;++De<qe;){var at=xe[De],ot=l[at];(ot===r||ac(ot,Xp[at])&&!Tn.call(l,at))&&(l[at]=ae[at])}return l}),She=zr(function(l){return l.push(r,R9),pt(p7,r,l)});function Ihe(l,h){return Sn(l,ur(h,3),Hc)}function Ohe(l,h){return Sn(l,ur(h,3),YI)}function Phe(l,h){return l==null?l:KI(l,ur(h,3),vo)}function The(l,h){return l==null?l:QL(l,ur(h,3),vo)}function Rhe(l,h){return l&&Hc(l,ur(h,3))}function Che(l,h){return l&&YI(l,ur(h,3))}function Nhe(l){return l==null?[]:g_(l,zi(l))}function Dhe(l){return l==null?[]:g_(l,vo(l))}function OO(l,h,A){var N=l==null?r:Gd(l,h);return N===r?A:N}function $he(l,h){return l!=null&&D9(l,h,nle)}function PO(l,h){return l!=null&&D9(l,h,ile)}var Mhe=S9(function(l,h,A){h!=null&&typeof h.toString!="function"&&(h=r_.call(h)),l[h]=A},RO(bo)),khe=S9(function(l,h,A){h!=null&&typeof h.toString!="function"&&(h=r_.call(h)),Tn.call(l,h)?l[h].push(A):l[h]=[A]},ur),Lhe=zr(Sm);function zi(l){return mo(l)?HL(l):ZI(l)}function vo(l){return mo(l)?HL(l,!0):ple(l)}function Uhe(l,h){var A={};return h=ur(h,3),Hc(l,function(N,z,ae){Mu(A,h(N,z,ae),N)}),A}function Bhe(l,h){var A={};return h=ur(h,3),Hc(l,function(N,z,ae){Mu(A,z,h(N,z,ae))}),A}var Fhe=r0(function(l,h,A){y_(l,h,A)}),p7=r0(function(l,h,A,N){y_(l,h,A,N)}),jhe=Lu(function(l,h){var A={};if(l==null)return A;var N=!1;h=Ir(h,function(ae){return ae=nf(ae,l),N||(N=ae.length>1),ae}),Vc(l,hO(l),A),N&&(A=ds(A,d|g|m,Mle));for(var z=h.length;z--;)aO(A,h[z]);return A});function qhe(l,h){return g7(l,C_(ur(h)))}var Hhe=Lu(function(l,h){return l==null?{}:yle(l,h)});function g7(l,h){if(l==null)return{};var A=Ir(hO(l),function(N){return[N]});return h=ur(h),o9(l,A,function(N,z){return h(N,z[0])})}function Vhe(l,h,A){h=nf(h,l);var N=-1,z=h.length;for(z||(z=1,l=r);++N<z;){var ae=l==null?r:l[zc(h[N])];ae===r&&(N=z,ae=A),l=Bu(ae)?ae.call(l):ae}return l}function zhe(l,h,A){return l==null?l:Om(l,h,A)}function Ghe(l,h,A,N){return N=typeof N=="function"?N:r,l==null?l:Om(l,h,A,N)}var y7=P9(zi),m7=P9(vo);function Whe(l,h,A){var N=$r(l),z=N||of(l)||a0(l);if(h=ur(h,4),A==null){var ae=l&&l.constructor;z?A=N?new ae:[]:ci(l)?A=Bu(ae)?t0(a_(l)):{}:A={}}return(z?Wt:Hc)(l,function(xe,De,qe){return h(A,xe,De,qe)}),A}function Khe(l,h){return l==null?!0:aO(l,h)}function Yhe(l,h,A){return l==null?l:f9(l,h,cO(A))}function Qhe(l,h,A,N){return N=typeof N=="function"?N:r,l==null?l:f9(l,h,cO(A),N)}function o0(l){return l==null?[]:Xl(l,zi(l))}function Jhe(l){return l==null?[]:Xl(l,vo(l))}function Xhe(l,h,A){return A===r&&(A=h,h=r),A!==r&&(A=gs(A),A=A===A?A:0),h!==r&&(h=gs(h),h=h===h?h:0),zd(gs(l),h,A)}function Zhe(l,h,A){return h=Fu(h),A===r?(A=h,h=0):A=Fu(A),l=gs(l),ale(l,h,A)}function epe(l,h,A){if(A&&typeof A!="boolean"&&Ka(l,h,A)&&(h=A=r),A===r&&(typeof h=="boolean"?(A=h,h=r):typeof l=="boolean"&&(A=l,l=r)),l===r&&h===r?(l=0,h=1):(l=Fu(l),h===r?(h=l,l=0):h=Fu(h)),l>h){var N=l;l=h,h=N}if(A||l%1||h%1){var z=jL();return xa(l+z*(h-l+Qr("1e-"+((z+"").length-1))),h)}return rO(l,h)}var tpe=n0(function(l,h,A){return h=h.toLowerCase(),l+(A?v7(h):h)});function v7(l){return TO(In(l).toLowerCase())}function b7(l){return l=In(l),l&&l.replace(Ur,jp).replace(An,"")}function rpe(l,h,A){l=In(l),h=jo(h);var N=l.length;A=A===r?N:zd(Fr(A),0,N);var z=A;return A-=h.length,A>=0&&l.slice(A,z)==h}function npe(l){return l=In(l),l&&Er.test(l)?l.replace(Ar,qp):l}function ipe(l){return l=In(l),l&<.test(l)?l.replace(st,"\\$&"):l}var ape=n0(function(l,h,A){return l+(A?"-":"")+h.toLowerCase()}),ope=n0(function(l,h,A){return l+(A?" ":"")+h.toLowerCase()}),spe=E9("toLowerCase");function cpe(l,h,A){l=In(l),h=Fr(h);var N=h?nc(l):0;if(!h||N>=h)return l;var z=(h-N)/2;return E_(u_(z),A)+l+E_(c_(z),A)}function upe(l,h,A){l=In(l),h=Fr(h);var N=h?nc(l):0;return h&&N<h?l+E_(h-N,A):l}function lpe(l,h,A){l=In(l),h=Fr(h);var N=h?nc(l):0;return h&&N<h?E_(h-N,A)+l:l}function fpe(l,h,A){return A||h==null?h=0:h&&(h=+h),vue(In(l).replace(_t,""),h||0)}function dpe(l,h,A){return(A?Ka(l,h,A):h===r)?h=1:h=Fr(h),nO(In(l),h)}function hpe(){var l=arguments,h=In(l[0]);return l.length<3?h:h.replace(l[1],l[2])}var ppe=n0(function(l,h,A){return l+(A?"_":"")+h.toLowerCase()});function gpe(l,h,A){return A&&typeof A!="number"&&Ka(l,h,A)&&(h=A=r),A=A===r?$:A>>>0,A?(l=In(l),l&&(typeof h=="string"||h!=null&&!IO(h))&&(h=jo(h),!h&&rc(l))?af(Ea(l),0,A):l.split(h,A)):[]}var ype=n0(function(l,h,A){return l+(A?" ":"")+TO(h)});function mpe(l,h,A){return l=In(l),A=A==null?0:zd(Fr(A),0,l.length),h=jo(h),l.slice(A,A+h.length)==h}function vpe(l,h,A){var N=J.templateSettings;A&&Ka(l,h,A)&&(h=r),l=In(l),h=$_({},h,N,T9);var z=$_({},h.imports,N.imports,T9),ae=zi(z),xe=Xl(z,ae),De,qe,at=0,ot=h.interpolate||gn,dt="__p += '",Ot=qI((h.escape||gn).source+"|"+ot.source+"|"+(ot===ve?gr:gn).source+"|"+(h.evaluate||gn).source+"|$","g"),Qt="//# sourceURL="+(Tn.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++go+"]")+`
|
|
150
|
-
`;l.replace(Ot,function(hr,Zr,sn,Ho,Ya,Vo){return sn||(sn=Ho),dt+=l.slice(at,Vo).replace(Br,Hp),Zr&&(De=!0,dt+=`' +
|
|
151
|
-
__e(`+Zr+`) +
|
|
152
|
-
'`),Ya&&(qe=!0,dt+=`';
|
|
153
|
-
`+Ya+`;
|
|
154
|
-
__p += '`),sn&&(dt+=`' +
|
|
155
|
-
((__t = (`+sn+`)) == null ? '' : __t) +
|
|
156
|
-
'`),at=Vo+hr.length,hr}),dt+=`';
|
|
157
|
-
`;var dr=Tn.call(h,"variable")&&h.variable;if(!dr)dt=`with (obj) {
|
|
158
|
-
`+dt+`
|
|
159
|
-
}
|
|
160
|
-
`;else if(wt.test(dr))throw new Nr(s);dt=(qe?dt.replace(ai,""):dt).replace(Dn,"$1").replace($n,"$1;"),dt="function("+(dr||"obj")+`) {
|
|
161
|
-
`+(dr?"":`obj || (obj = {});
|
|
162
|
-
`)+"var __t, __p = ''"+(De?", __e = _.escape":"")+(qe?`, __j = Array.prototype.join;
|
|
163
|
-
function print() { __p += __j.call(arguments, '') }
|
|
164
|
-
`:`;
|
|
165
|
-
`)+dt+`return __p
|
|
166
|
-
}`;var Hr=_7(function(){return En(ae,Qt+"return "+dt).apply(r,xe)});if(Hr.source=dt,SO(Hr))throw Hr;return Hr}function bpe(l){return In(l).toLowerCase()}function wpe(l){return In(l).toUpperCase()}function _pe(l,h,A){if(l=In(l),l&&(A||h===r))return Ld(l);if(!l||!(h=jo(h)))return l;var N=Ea(l),z=Ea(h),ae=Ud(N,z),xe=Bd(N,z)+1;return af(N,ae,xe).join("")}function Epe(l,h,A){if(l=In(l),l&&(A||h===r))return l.slice(0,jd(l)+1);if(!l||!(h=jo(h)))return l;var N=Ea(l),z=Bd(N,Ea(h))+1;return af(N,0,z).join("")}function xpe(l,h,A){if(l=In(l),l&&(A||h===r))return l.replace(_t,"");if(!l||!(h=jo(h)))return l;var N=Ea(l),z=Ud(N,Ea(h));return af(N,z).join("")}function Ape(l,h){var A=M,N=B;if(ci(h)){var z="separator"in h?h.separator:z;A="length"in h?Fr(h.length):A,N="omission"in h?jo(h.omission):N}l=In(l);var ae=l.length;if(rc(l)){var xe=Ea(l);ae=xe.length}if(A>=ae)return l;var De=A-nc(N);if(De<1)return N;var qe=xe?af(xe,0,De).join(""):l.slice(0,De);if(z===r)return qe+N;if(xe&&(De+=qe.length-De),IO(z)){if(l.slice(De).search(z)){var at,ot=qe;for(z.global||(z=qI(z.source,In(lr.exec(z))+"g")),z.lastIndex=0;at=z.exec(ot);)var dt=at.index;qe=qe.slice(0,dt===r?De:dt)}}else if(l.indexOf(jo(z),De)!=De){var Ot=qe.lastIndexOf(z);Ot>-1&&(qe=qe.slice(0,Ot))}return qe+N}function Spe(l){return l=In(l),l&&Mr.test(l)?l.replace(Kn,Qp):l}var Ipe=n0(function(l,h,A){return l+(A?" ":"")+h.toUpperCase()}),TO=E9("toUpperCase");function w7(l,h,A){return l=In(l),h=A?r:h,h===r?zp(l)?nue(l):hi(l):l.match(h)||[]}var _7=zr(function(l,h){try{return pt(l,r,h)}catch(A){return SO(A)?A:new Nr(A)}}),Ope=Lu(function(l,h){return Wt(h,function(A){A=zc(A),Mu(l,A,xO(l[A],l))}),l});function Ppe(l){var h=l==null?0:l.length,A=ur();return l=h?Ir(l,function(N){if(typeof N[1]!="function")throw new ls(o);return[A(N[0]),N[1]]}):[],zr(function(N){for(var z=-1;++z<h;){var ae=l[z];if(pt(ae[0],this,N))return pt(ae[1],this,N)}})}function Tpe(l){return ele(ds(l,d))}function RO(l){return function(){return l}}function Rpe(l,h){return l==null||l!==l?h:l}var Cpe=A9(),Npe=A9(!0);function bo(l){return l}function CO(l){return e9(typeof l=="function"?l:ds(l,d))}function Dpe(l){return r9(ds(l,d))}function $pe(l,h){return n9(l,ds(h,d))}var Mpe=zr(function(l,h){return function(A){return Sm(A,l,h)}}),kpe=zr(function(l,h){return function(A){return Sm(l,A,h)}});function NO(l,h,A){var N=zi(h),z=g_(h,N);A==null&&!(ci(h)&&(z.length||!N.length))&&(A=h,h=l,l=this,z=g_(h,zi(h)));var ae=!(ci(A)&&"chain"in A)||!!A.chain,xe=Bu(l);return Wt(z,function(De){var qe=h[De];l[De]=qe,xe&&(l.prototype[De]=function(){var at=this.__chain__;if(ae||at){var ot=l(this.__wrapped__),dt=ot.__actions__=yo(this.__actions__);return dt.push({func:qe,args:arguments,thisArg:l}),ot.__chain__=at,ot}return qe.apply(l,Hi([this.value()],arguments))})}),l}function Lpe(){return mr._===this&&(mr._=uue),this}function DO(){}function Upe(l){return l=Fr(l),zr(function(h){return i9(h,l)})}var Bpe=lO(Ir),Fpe=lO(Pn),jpe=lO(Mi);function E7(l){return mO(l)?Kl(zc(l)):mle(l)}function qpe(l){return function(h){return l==null?r:Gd(l,h)}}var Hpe=I9(),Vpe=I9(!0);function $O(){return[]}function MO(){return!1}function zpe(){return{}}function Gpe(){return""}function Wpe(){return!0}function Kpe(l,h){if(l=Fr(l),l<1||l>j)return[];var A=$,N=xa(l,$);h=ur(h),l-=$;for(var z=Jl(N,h);++A<l;)h(A);return z}function Ype(l){return $r(l)?Ir(l,zc):qo(l)?[l]:yo(q9(In(l)))}function Qpe(l){var h=++sue;return In(l)+h}var Jpe=__(function(l,h){return l+h},0),Xpe=fO("ceil"),Zpe=__(function(l,h){return l/h},1),e0e=fO("floor");function t0e(l){return l&&l.length?p_(l,bo,QI):r}function r0e(l,h){return l&&l.length?p_(l,ur(h,2),QI):r}function n0e(l){return Md(l,bo)}function i0e(l,h){return Md(l,ur(h,2))}function a0e(l){return l&&l.length?p_(l,bo,eO):r}function o0e(l,h){return l&&l.length?p_(l,ur(h,2),eO):r}var s0e=__(function(l,h){return l*h},1),c0e=fO("round"),u0e=__(function(l,h){return l-h},0);function l0e(l){return l&&l.length?Ql(l,bo):0}function f0e(l,h){return l&&l.length?Ql(l,ur(h,2)):0}return J.after=Dde,J.ary=Z9,J.assign=whe,J.assignIn=h7,J.assignInWith=$_,J.assignWith=_he,J.at=Ehe,J.before=e7,J.bind=xO,J.bindAll=Ope,J.bindKey=t7,J.castArray=zde,J.chain=Q9,J.chunk=efe,J.compact=tfe,J.concat=rfe,J.cond=Ppe,J.conforms=Tpe,J.constant=RO,J.countBy=lde,J.create=xhe,J.curry=r7,J.curryRight=n7,J.debounce=i7,J.defaults=Ahe,J.defaultsDeep=She,J.defer=$de,J.delay=Mde,J.difference=nfe,J.differenceBy=ife,J.differenceWith=afe,J.drop=ofe,J.dropRight=sfe,J.dropRightWhile=cfe,J.dropWhile=ufe,J.fill=lfe,J.filter=dde,J.flatMap=gde,J.flatMapDeep=yde,J.flatMapDepth=mde,J.flatten=G9,J.flattenDeep=ffe,J.flattenDepth=dfe,J.flip=kde,J.flow=Cpe,J.flowRight=Npe,J.fromPairs=hfe,J.functions=Nhe,J.functionsIn=Dhe,J.groupBy=vde,J.initial=gfe,J.intersection=yfe,J.intersectionBy=mfe,J.intersectionWith=vfe,J.invert=Mhe,J.invertBy=khe,J.invokeMap=wde,J.iteratee=CO,J.keyBy=_de,J.keys=zi,J.keysIn=vo,J.map=P_,J.mapKeys=Uhe,J.mapValues=Bhe,J.matches=Dpe,J.matchesProperty=$pe,J.memoize=R_,J.merge=Fhe,J.mergeWith=p7,J.method=Mpe,J.methodOf=kpe,J.mixin=NO,J.negate=C_,J.nthArg=Upe,J.omit=jhe,J.omitBy=qhe,J.once=Lde,J.orderBy=Ede,J.over=Bpe,J.overArgs=Ude,J.overEvery=Fpe,J.overSome=jpe,J.partial=AO,J.partialRight=a7,J.partition=xde,J.pick=Hhe,J.pickBy=g7,J.property=E7,J.propertyOf=qpe,J.pull=Efe,J.pullAll=K9,J.pullAllBy=xfe,J.pullAllWith=Afe,J.pullAt=Sfe,J.range=Hpe,J.rangeRight=Vpe,J.rearg=Bde,J.reject=Ide,J.remove=Ife,J.rest=Fde,J.reverse=_O,J.sampleSize=Pde,J.set=zhe,J.setWith=Ghe,J.shuffle=Tde,J.slice=Ofe,J.sortBy=Nde,J.sortedUniq=$fe,J.sortedUniqBy=Mfe,J.split=gpe,J.spread=jde,J.tail=kfe,J.take=Lfe,J.takeRight=Ufe,J.takeRightWhile=Bfe,J.takeWhile=Ffe,J.tap=tde,J.throttle=qde,J.thru=O_,J.toArray=l7,J.toPairs=y7,J.toPairsIn=m7,J.toPath=Ype,J.toPlainObject=d7,J.transform=Whe,J.unary=Hde,J.union=jfe,J.unionBy=qfe,J.unionWith=Hfe,J.uniq=Vfe,J.uniqBy=zfe,J.uniqWith=Gfe,J.unset=Khe,J.unzip=EO,J.unzipWith=Y9,J.update=Yhe,J.updateWith=Qhe,J.values=o0,J.valuesIn=Jhe,J.without=Wfe,J.words=w7,J.wrap=Vde,J.xor=Kfe,J.xorBy=Yfe,J.xorWith=Qfe,J.zip=Jfe,J.zipObject=Xfe,J.zipObjectDeep=Zfe,J.zipWith=ede,J.entries=y7,J.entriesIn=m7,J.extend=h7,J.extendWith=$_,NO(J,J),J.add=Jpe,J.attempt=_7,J.camelCase=tpe,J.capitalize=v7,J.ceil=Xpe,J.clamp=Xhe,J.clone=Gde,J.cloneDeep=Kde,J.cloneDeepWith=Yde,J.cloneWith=Wde,J.conformsTo=Qde,J.deburr=b7,J.defaultTo=Rpe,J.divide=Zpe,J.endsWith=rpe,J.eq=ac,J.escape=npe,J.escapeRegExp=ipe,J.every=fde,J.find=hde,J.findIndex=V9,J.findKey=Ihe,J.findLast=pde,J.findLastIndex=z9,J.findLastKey=Ohe,J.floor=e0e,J.forEach=J9,J.forEachRight=X9,J.forIn=Phe,J.forInRight=The,J.forOwn=Rhe,J.forOwnRight=Che,J.get=OO,J.gt=Jde,J.gte=Xde,J.has=$he,J.hasIn=PO,J.head=W9,J.identity=bo,J.includes=bde,J.indexOf=pfe,J.inRange=Zhe,J.invoke=Lhe,J.isArguments=Yd,J.isArray=$r,J.isArrayBuffer=Zde,J.isArrayLike=mo,J.isArrayLikeObject=bi,J.isBoolean=ehe,J.isBuffer=of,J.isDate=the,J.isElement=rhe,J.isEmpty=nhe,J.isEqual=ihe,J.isEqualWith=ahe,J.isError=SO,J.isFinite=ohe,J.isFunction=Bu,J.isInteger=o7,J.isLength=N_,J.isMap=s7,J.isMatch=she,J.isMatchWith=che,J.isNaN=uhe,J.isNative=lhe,J.isNil=dhe,J.isNull=fhe,J.isNumber=c7,J.isObject=ci,J.isObjectLike=pi,J.isPlainObject=Cm,J.isRegExp=IO,J.isSafeInteger=hhe,J.isSet=u7,J.isString=D_,J.isSymbol=qo,J.isTypedArray=a0,J.isUndefined=phe,J.isWeakMap=ghe,J.isWeakSet=yhe,J.join=bfe,J.kebabCase=ape,J.last=ps,J.lastIndexOf=wfe,J.lowerCase=ope,J.lowerFirst=spe,J.lt=mhe,J.lte=vhe,J.max=t0e,J.maxBy=r0e,J.mean=n0e,J.meanBy=i0e,J.min=a0e,J.minBy=o0e,J.stubArray=$O,J.stubFalse=MO,J.stubObject=zpe,J.stubString=Gpe,J.stubTrue=Wpe,J.multiply=s0e,J.nth=_fe,J.noConflict=Lpe,J.noop=DO,J.now=T_,J.pad=cpe,J.padEnd=upe,J.padStart=lpe,J.parseInt=fpe,J.random=epe,J.reduce=Ade,J.reduceRight=Sde,J.repeat=dpe,J.replace=hpe,J.result=Vhe,J.round=c0e,J.runInContext=Ue,J.sample=Ode,J.size=Rde,J.snakeCase=ppe,J.some=Cde,J.sortedIndex=Pfe,J.sortedIndexBy=Tfe,J.sortedIndexOf=Rfe,J.sortedLastIndex=Cfe,J.sortedLastIndexBy=Nfe,J.sortedLastIndexOf=Dfe,J.startCase=ype,J.startsWith=mpe,J.subtract=u0e,J.sum=l0e,J.sumBy=f0e,J.template=vpe,J.times=Kpe,J.toFinite=Fu,J.toInteger=Fr,J.toLength=f7,J.toLower=bpe,J.toNumber=gs,J.toSafeInteger=bhe,J.toString=In,J.toUpper=wpe,J.trim=_pe,J.trimEnd=Epe,J.trimStart=xpe,J.truncate=Ape,J.unescape=Spe,J.uniqueId=Qpe,J.upperCase=Ipe,J.upperFirst=TO,J.each=J9,J.eachRight=X9,J.first=W9,NO(J,function(){var l={};return Hc(J,function(h,A){Tn.call(J.prototype,A)||(l[A]=h)}),l}(),{chain:!1}),J.VERSION=n,Wt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){J[l].placeholder=J}),Wt(["drop","take"],function(l,h){rn.prototype[l]=function(A){A=A===r?1:Ui(Fr(A),0);var N=this.__filtered__&&!h?new rn(this):this.clone();return N.__filtered__?N.__takeCount__=xa(A,N.__takeCount__):N.__views__.push({size:xa(A,$),type:l+(N.__dir__<0?"Right":"")}),N},rn.prototype[l+"Right"]=function(A){return this.reverse()[l](A).reverse()}}),Wt(["filter","map","takeWhile"],function(l,h){var A=h+1,N=A==F||A==K;rn.prototype[l]=function(z){var ae=this.clone();return ae.__iteratees__.push({iteratee:ur(z,3),type:A}),ae.__filtered__=ae.__filtered__||N,ae}}),Wt(["head","last"],function(l,h){var A="take"+(h?"Right":"");rn.prototype[l]=function(){return this[A](1).value()[0]}}),Wt(["initial","tail"],function(l,h){var A="drop"+(h?"":"Right");rn.prototype[l]=function(){return this.__filtered__?new rn(this):this[A](1)}}),rn.prototype.compact=function(){return this.filter(bo)},rn.prototype.find=function(l){return this.filter(l).head()},rn.prototype.findLast=function(l){return this.reverse().find(l)},rn.prototype.invokeMap=zr(function(l,h){return typeof l=="function"?new rn(this):this.map(function(A){return Sm(A,l,h)})}),rn.prototype.reject=function(l){return this.filter(C_(ur(l)))},rn.prototype.slice=function(l,h){l=Fr(l);var A=this;return A.__filtered__&&(l>0||h<0)?new rn(A):(l<0?A=A.takeRight(-l):l&&(A=A.drop(l)),h!==r&&(h=Fr(h),A=h<0?A.dropRight(-h):A.take(h-l)),A)},rn.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},rn.prototype.toArray=function(){return this.take($)},Hc(rn.prototype,function(l,h){var A=/^(?:filter|find|map|reject)|While$/.test(h),N=/^(?:head|last)$/.test(h),z=J[N?"take"+(h=="last"?"Right":""):h],ae=N||/^find/.test(h);z&&(J.prototype[h]=function(){var xe=this.__wrapped__,De=N?[1]:arguments,qe=xe instanceof rn,at=De[0],ot=qe||$r(xe),dt=function(Zr){var sn=z.apply(J,Hi([Zr],De));return N&&Ot?sn[0]:sn};ot&&A&&typeof at=="function"&&at.length!=1&&(qe=ot=!1);var Ot=this.__chain__,Qt=!!this.__actions__.length,dr=ae&&!Ot,Hr=qe&&!Qt;if(!ae&&ot){xe=Hr?xe:new rn(this);var hr=l.apply(xe,De);return hr.__actions__.push({func:O_,args:[dt],thisArg:r}),new fs(hr,Ot)}return dr&&Hr?l.apply(this,De):(hr=this.thru(dt),dr?N?hr.value()[0]:hr.value():hr)})}),Wt(["pop","push","shift","sort","splice","unshift"],function(l){var h=Zw[l],A=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",N=/^(?:pop|shift)$/.test(l);J.prototype[l]=function(){var z=arguments;if(N&&!this.__chain__){var ae=this.value();return h.apply($r(ae)?ae:[],z)}return this[A](function(xe){return h.apply($r(xe)?xe:[],z)})}}),Hc(rn.prototype,function(l,h){var A=J[h];if(A){var N=A.name+"";Tn.call(e0,N)||(e0[N]=[]),e0[N].push({name:h,func:A})}}),e0[w_(r,_).name]=[{name:"wrapper",func:r}],rn.prototype.clone=Sue,rn.prototype.reverse=Iue,rn.prototype.value=Oue,J.prototype.at=rde,J.prototype.chain=nde,J.prototype.commit=ide,J.prototype.next=ade,J.prototype.plant=sde,J.prototype.reverse=cde,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=ude,J.prototype.first=J.prototype.head,vm&&(J.prototype[vm]=ode),J},Jp=iue();R?((R.exports=Jp)._=Jp,ie._=Jp):mr._=Jp}).call(qv)})(N4,N4.exports);var gBe=Object.defineProperty,yBe=Object.defineProperties,mBe=Object.getOwnPropertyDescriptors,PY=Object.getOwnPropertySymbols,vBe=Object.prototype.hasOwnProperty,bBe=Object.prototype.propertyIsEnumerable,TY=(t,e,r)=>e in t?gBe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,RE=(t,e)=>{for(var r in e||(e={}))vBe.call(e,r)&&TY(t,r,e[r]);if(PY)for(var r of PY(e))bBe.call(e,r)&&TY(t,r,e[r]);return t},wBe=(t,e)=>yBe(t,mBe(e));function pd(t,e,r){var n;const i=VMe(t);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${pBe}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function Mp(t){return t.includes(":")?t.split(":")[1]:t}function mse(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function _Be(t,e){const r=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!r.length)return[];const n=[];return r.forEach(i=>{const a=e.namespaces[i].accounts;n.push(...a)}),n}function EBe(t={},e={}){const r=RY(t),n=RY(e);return N4.exports.merge(r,n)}function RY(t){var e,r,n,i;const a={};if(!_g(t))return a;for(const[o,s]of Object.entries(t)){const c=Fk(o)?[o]:s.chains,u=s.methods||[],f=s.events||[],d=s.rpcMap||{},g=_b(o);a[g]=wBe(RE(RE({},a[g]),s),{chains:RN(c,(e=a[g])==null?void 0:e.chains),methods:RN(u,(r=a[g])==null?void 0:r.methods),events:RN(f,(n=a[g])==null?void 0:n.events),rpcMap:RE(RE({},d),(i=a[g])==null?void 0:i.rpcMap)})}return a}function xBe(t){return t.includes(":")?t.split(":")[2]:t}function ABe(t){const e={};for(const[r,n]of Object.entries(t)){const i=n.methods||[],a=n.events||[],o=n.accounts||[],s=Fk(r)?[r]:n.chains?n.chains:mse(n.accounts);e[r]={chains:s,methods:i,events:a,accounts:o}}return e}function HN(t){return typeof t=="number"?t:t.includes("0x")?parseInt(t,16):t.includes(":")?Number(t.split(":")[1]):Number(t)}const vse={},ri=t=>vse[t],VN=(t,e)=>{vse[t]=e};class SBe{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=ri("events"),this.client=ri("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Wl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Mp(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||pd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Gl(new Td(n,ri("disableProviderPing")))}}class IBe{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=ri("events"),this.client=ri("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(parseInt(e),r),this.chainId=parseInt(e),this.events.emit(Wl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,r){const n=r||pd(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Gl(new Td(n,ri("disableProviderPing")))}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=parseInt(Mp(r));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}async handleSwitchChain(e){var r,n;let i=e.request.params?(r=e.request.params[0])==null?void 0:r.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const a=parseInt(i,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class OBe{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=ri("events"),this.client=ri("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Wl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Mp(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||pd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Gl(new Td(n,ri("disableProviderPing")))}}class PBe{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=ri("events"),this.client=ri("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Wl.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Mp(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||pd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Gl(new Td(n,ri("disableProviderPing")))}}class TBe{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=ri("events"),this.client=ri("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Wl.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{const n=this.getCardanoRPCUrl(r),i=Mp(r);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}getCardanoRPCUrl(e){const r=this.namespace.rpcMap;if(r)return r[e]}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Gl(new Td(n,ri("disableProviderPing")))}}class RBe{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=ri("events"),this.client=ri("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Wl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Mp(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||pd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Gl(new Td(n,ri("disableProviderPing")))}}class CBe{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=ri("events"),this.client=ri("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Wl.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=Mp(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||pd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Gl(new Td(n,ri("disableProviderPing")))}}class NBe{constructor(e){this.name="near",this.namespace=e.namespace,this.events=ri("events"),this.client=ri("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const n=r||pd(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Wl.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||pd(e,this.namespace);return typeof n>"u"?void 0:new Gl(new Td(n,ri("disableProviderPing")))}}var DBe=Object.defineProperty,$Be=Object.defineProperties,MBe=Object.getOwnPropertyDescriptors,CY=Object.getOwnPropertySymbols,kBe=Object.prototype.hasOwnProperty,LBe=Object.prototype.propertyIsEnumerable,NY=(t,e,r)=>e in t?DBe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,CE=(t,e)=>{for(var r in e||(e={}))kBe.call(e,r)&&NY(t,r,e[r]);if(CY)for(var r of CY(e))LBe.call(e,r)&&NY(t,r,e[r]);return t},zN=(t,e)=>$Be(t,MBe(e));let UBe=class bse{constructor(e){this.events=new uk,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:un.pino(un.getDefaultLoggerOptions({level:(e==null?void 0:e.logger)||IY})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const r=new bse(e);return await r.initialize(),r}async request(e,r){const[n,i]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:CE({},e),chainId:`${n}:${i}`,topic:this.session.topic})}sendAsync(e,r,n){this.request(e,n).then(i=>r(null,i)).catch(i=>r(i,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:xi("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}removeListener(e,r){this.events.removeListener(e,r)}off(e,r){this.events.off(e,r)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await i().then(a=>{this.session=a,this.namespaces||(this.namespaces=ABe(a.namespaces),this.persist("namespaces",this.namespaces))}).catch(a=>{if(a.message!==gse)throw a;r++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,r){try{if(!this.session)return;const[n,i]=this.validateChain(e);this.getProvider(n).setDefaultChain(i,r)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(Su(r)){for(const n of r)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await sBe.init({logger:this.providerOpts.logger||IY,relayUrl:this.providerOpts.relayUrl||fBe,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(r=>_b(r)))];VN("client",this.client),VN("events",this.events),VN("disableProviderPing",this.disableProviderPing),e.forEach(r=>{if(!this.session)return;const n=_Be(r,this.session),i=mse(n),a=EBe(this.namespaces,this.optionalNamespaces),o=zN(CE({},a[r]),{accounts:n,chains:i});switch(r){case"eip155":this.rpcProviders[r]=new IBe({namespace:o});break;case"solana":this.rpcProviders[r]=new OBe({namespace:o});break;case"cosmos":this.rpcProviders[r]=new PBe({namespace:o});break;case"polkadot":this.rpcProviders[r]=new SBe({namespace:o});break;case"cip34":this.rpcProviders[r]=new TBe({namespace:o});break;case"elrond":this.rpcProviders[r]=new RBe({namespace:o});break;case"multiversx":this.rpcProviders[r]=new CBe({namespace:o});break;case"near":this.rpcProviders[r]=new NBe({namespace:o});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:r}=e,{event:n}=r;if(n.name==="accountsChanged"){const i=n.data;i&&Su(i)&&this.events.emit("accountsChanged",i.map(xBe))}else if(n.name==="chainChanged"){const i=r.chainId,a=r.event.data,o=_b(i),s=HN(i)!==HN(a)?`${o}:${HN(a)}`:i;this.onChainChanged(s)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:r})=>{var n;const{namespaces:i}=r,a=(n=this.client)==null?void 0:n.session.get(e);this.session=zN(CE({},a),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:r})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",zN(CE({},xi("USER_DISCONNECTED")),{data:e.topic}))}),this.on(Wl.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var r;this.getProvider(e).updateNamespace((r=this.session)==null?void 0:r.namespaces[e])})}setNamespaces(e){const{namespaces:r,optionalNamespaces:n,sessionProperties:i}=e;r&&Object.keys(r).length&&(this.namespaces=r),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=i,this.persist("namespaces",r),this.persist("optionalNamespaces",n)}validateChain(e){const[r,n]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,n];if(r&&!Object.keys(this.namespaces||{}).map(o=>_b(o)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&n)return[r,n];const i=_b(Object.keys(this.namespaces)[0]),a=this.rpcProviders[i].getDefaultChain();return[i,a]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,r=!1){var n;if(!this.namespaces)return;const[i,a]=this.validateChain(e);r||this.getProvider(i).setDefaultChain(a),((n=this.namespaces[i])!=null?n:this.namespaces[`${i}:${a}`]).defaultChain=a,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",a)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,r){this.client.core.storage.setItem(`${OY}/${e}`,r)}async getFromStore(e){return await this.client.core.storage.getItem(`${OY}/${e}`)}};const BBe=UBe,FBe="wc",jBe="ethereum_provider",qBe=`${FBe}@2:${jBe}:`,HBe="https://rpc.walletconnect.com/v1/",r2=["eth_sendTransaction","personal_sign"],wse=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],n2=["chainChanged","accountsChanged"],_se=["chainChanged","accountsChanged","message","disconnect","connect"];var VBe=Object.defineProperty,zBe=Object.defineProperties,GBe=Object.getOwnPropertyDescriptors,DY=Object.getOwnPropertySymbols,WBe=Object.prototype.hasOwnProperty,KBe=Object.prototype.propertyIsEnumerable,$Y=(t,e,r)=>e in t?VBe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,xb=(t,e)=>{for(var r in e||(e={}))WBe.call(e,r)&&$Y(t,r,e[r]);if(DY)for(var r of DY(e))KBe.call(e,r)&&$Y(t,r,e[r]);return t},MY=(t,e)=>zBe(t,GBe(e));function i2(t){return Number(t[0].split(":")[1])}function GN(t){return`0x${t.toString(16)}`}function YBe(t){const{chains:e,optionalChains:r,methods:n,optionalMethods:i,events:a,optionalEvents:o,rpcMap:s}=t;if(!Su(e))throw new Error("Invalid chains");const c={chains:e,methods:n||r2,events:a||n2,rpcMap:xb({},e.length?{[i2(e)]:s[i2(e)]}:{})},u=a==null?void 0:a.filter(m=>!n2.includes(m)),f=n==null?void 0:n.filter(m=>!r2.includes(m));if(!r&&!o&&!i&&!(u!=null&&u.length)&&!(f!=null&&f.length))return{required:e.length?c:void 0};const d=(u==null?void 0:u.length)&&(f==null?void 0:f.length)||!r,g={chains:[...new Set(d?c.chains.concat(r||[]):r)],methods:[...new Set(c.methods.concat(i!=null&&i.length?i:wse))],events:[...new Set(c.events.concat(o!=null&&o.length?o:_se))],rpcMap:s};return{required:e.length?c:void 0,optional:r.length?g:void 0}}let Ese=class xse{constructor(){this.events=new ho.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=qBe,this.on=(e,r)=>(this.events.on(e,r),this),this.once=(e,r)=>(this.events.once(e,r),this),this.removeListener=(e,r)=>(this.events.removeListener(e,r),this),this.off=(e,r)=>(this.events.off(e,r),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const r=new xse;return await r.initialize(e),r}async request(e){return await this.signer.request(e,this.formatChainId(this.chainId))}sendAsync(e,r){this.signer.sendAsync(e,r,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:r,optional:n}=YBe(this.rpc);try{const i=await new Promise(async(o,s)=>{var c;this.rpc.showQrModal&&((c=this.modal)==null||c.subscribeModal(u=>{!u.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),s(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(MY(xb({namespaces:xb({},r&&{[this.namespace]:r})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(u=>{o(u)}).catch(u=>{s(new Error(u.message))})});if(!i)return;const a=zMe(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:a),this.setAccounts(a),this.events.emit("connect",{chainId:GN(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:r}=e,{event:n}=r;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const r=parseInt(e);this.chainId=r,this.events.emit("chainChanged",GN(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",MY(xb({},xi("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var r,n;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const r=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",GN(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const r=this.parseChainId(e);this.chainId=r,this.switchEthereumChain(r)}}parseAccountId(e){const[r,n,i]=e.split(":");return{chainId:`${r}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var r,n;const i=(r=e==null?void 0:e.chains)!=null?r:[],a=(n=e==null?void 0:e.optionalChains)!=null?n:[],o=i.concat(a);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const s=i.length?(e==null?void 0:e.methods)||r2:[],c=i.length?(e==null?void 0:e.events)||n2:[],u=(e==null?void 0:e.optionalMethods)||[],f=(e==null?void 0:e.optionalEvents)||[],d=(e==null?void 0:e.rpcMap)||this.buildRpcMap(o,e.projectId),g=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:i==null?void 0:i.map(m=>this.formatChainId(m)),optionalChains:a.map(m=>this.formatChainId(m)),methods:s,events:c,optionalMethods:u,optionalEvents:f,rpcMap:d,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:g,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,r){const n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,r)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?i2(this.rpc.chains):i2(this.rpc.optionalChains),this.signer=await BBe.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let r;try{r=tDe.WalletConnectModal}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(xb({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:r,optionalChains:n,rpcMap:i}=e;r&&Su(r)&&(this.rpc.chains=r.map(a=>this.formatChainId(a)),r.forEach(a=>{this.rpc.rpcMap[a]=(i==null?void 0:i[a])||this.getRpcUrl(a)})),n&&Su(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(a=>this.formatChainId(a)),n.forEach(a=>{this.rpc.rpcMap[a]=(i==null?void 0:i[a])||this.getRpcUrl(a)}))}getRpcUrl(e,r){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${HBe}?chainId=eip155:${e}&projectId=${r||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),r=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:r==null?void 0:r.accounts),this.setAccounts(r==null?void 0:r.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(r=>this.parseAccount(r))}};const QBe=Ese,JBe=Object.freeze(Object.defineProperty({__proto__:null,EthereumProvider:QBe,OPTIONAL_EVENTS:_se,OPTIONAL_METHODS:wse,REQUIRED_EVENTS:n2,REQUIRED_METHODS:r2,default:Ese},Symbol.toStringTag,{value:"Module"})),XBe=lo(JBe);var ZBe=Ne&&Ne.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),eFe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),tFe=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ZBe(e,t,r);return eFe(e,t),e};Object.defineProperty(fI,"__esModule",{value:!0});fI.WalletConnectV2Connector=void 0;const rFe=JS,nFe=Ll,iFe=Vs;class Kf extends rFe.AbstractConnector{constructor(e){super({supportedChainIds:(()=>{const{chains:r,optionalChains:n}=Kf.configuration.chains[e];return[...r,...n]})()}),this.desiredChainId=e,this.activate=async()=>{const r=await Promise.resolve().then(()=>tFe(XBe)).then(i=>{const{chains:a,optionalChains:o}=Kf.configuration.chains[this.desiredChainId];return i.default.init({projectId:Kf.configuration.projectId,rpcMap:Kf.configuration.urls,chains:a,optionalChains:o,showQrModal:!0,disableProviderPing:!0,qrModalOptions:{themeVariables:{"--wcm-z-index":"3000"}},methods:["eth_sendTransaction","personal_sign"],optionalMethods:["eth_accounts","eth_requestAccounts","eth_sign","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain"],events:["chainChanged","accountsChanged"],optionalEvents:["disconnect"]})}),n=await r.enable();return r.on("accountsChanged",this.handleAccountsChanged),r.on("chainChanged",this.handleChainChanged),r.on("disconnect",this.handleDisconnect),this.provider=r,{chainId:r.chainId,account:n[0],provider:r}},this.getProvider=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider},this.getChainId=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.chainId},this.getAccount=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.accounts[0]},this.getWalletName=()=>{var r,n;return(n=(r=this.provider)===null||r===void 0?void 0:r.session)===null||n===void 0?void 0:n.peer.metadata.name},this.deactivate=()=>{this.provider&&(this.emitDeactivate(),this.provider.removeListener("accountsChanged",this.handleAccountsChanged).removeListener("chainChanged",this.handleChainChanged).removeListener("disconnect",this.handleDisconnect).disconnect())},this.handleAccountsChanged=r=>{this.emitUpdate({account:r[0]})},this.handleChainChanged=r=>{this.emitUpdate({chainId:r})},this.handleDisconnect=()=>{if(!this.provider)throw new Error("Provider is undefined");this.deactivate()}}}fI.WalletConnectV2Connector=Kf;Kf.configuration=iFe.getConfiguration()[nFe.ProviderType.WALLET_CONNECT_V2];Kf.clearStorage=t=>{t.removeRegExp(new RegExp("^wc@2:"))};var xI={},Rd=(t=>(t.MissingApiKey="MISSING_API_KEY",t.ModalNotReady="MODAL_NOT_READY",t.MalformedResponse="MALFORMED_RESPONSE",t.InvalidArgument="INVALID_ARGUMENT",t.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",t.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",t))(Rd||{}),ym=(t=>(t.SyncWeb3Method="SYNC_WEB3_METHOD",t.DuplicateIframe="DUPLICATE_IFRAME",t.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",t.DeprecationNotice="DEPRECATION_NOTICE",t))(ym||{}),AI=(t=>(t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",t[t.MagicLinkExpired=-10001]="MagicLinkExpired",t[t.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",t[t.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",t[t.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",t[t.UpdateEmailFailed=-10004]="UpdateEmailFailed",t[t.UserRequestEditEmail=-10005]="UserRequestEditEmail",t[t.InactiveRecipient=-10010]="InactiveRecipient",t[t.AccessDeniedToUser=-10011]="AccessDeniedToUser",t[t.RedirectLoginComplete=-10015]="RedirectLoginComplete",t))(AI||{}),xs=(t=>(t.MetaMask="metamask",t.CoinbaseWallet="coinbase_wallet",t))(xs||{}),Zb=(t=>(t.WalletSelected="wallet_selected",t.WalletConnected="wallet_connected",t.WalletRejected="wallet_rejected",t))(Zb||{}),br=(t=>(t.LoginWithSms="magic_auth_login_with_sms",t.LoginWithEmailOTP="magic_auth_login_with_email_otp",t.LoginWithMagicLink="magic_auth_login_with_magic_link",t.LoginWithCredential="magic_auth_login_with_credential",t.SetAuthorizationToken="magic_auth_set_authorization_token",t.GetIdToken="magic_auth_get_id_token",t.GenerateIdToken="magic_auth_generate_id_token",t.GetMetadata="magic_auth_get_metadata",t.IsLoggedIn="magic_is_logged_in",t.Logout="magic_auth_logout",t.UpdateEmail="magic_auth_update_email",t.UserSettings="magic_auth_settings",t.UserSettingsTestMode="magic_auth_settings_testing_mode",t.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",t.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",t.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",t.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",t.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",t.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",t.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",t.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",t.LogoutTestMode="magic_auth_logout_testing_mode",t.UpdateEmailTestMode="magic_auth_update_email_testing_mode",t.IntermediaryEvent="magic_intermediary_event",t.RequestAccounts="eth_requestAccounts",t.GetInfo="magic_get_info",t.ShowUI="magic_wallet",t.NFTPurchase="magic_nft_purchase",t.NFTCheckout="magic_nft_checkout",t.NFTTransfer="magic_nft_transfer",t.RequestUserInfoWithUI="mc_request_user_info",t.Disconnect="mc_disconnect",t.RecoverAccount="magic_auth_recover_account",t.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",t.MagicBoxHeartBeat="magic_box_heart_beat",t.AutoConnect="mc_auto_connect",t.Login="mc_login",t.EncryptV1="magic_auth_encrypt_v1",t.DecryptV1="magic_auth_decrypt_v1",t.ShowNFTs="magic_show_nfts",t.ShowOnRamp="magic_show_fiat_onramp",t.ShowSendTokensUI="magic_show_send_tokens_ui",t.ShowAddress="magic_show_address",t.ShowBalances="magic_show_balances",t.SendGaslessTransaction="eth_sendGaslessTransaction",t))(br||{}),Ph=(t=>(t.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",t.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",t.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",t.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",t.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",t.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",t))(Ph||{}),U1=(t=>(t.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",t))(U1||{}),Ase=(t=>(t.UpdateEmail="update-email",t.MFA="mfa",t.Recovery="recovery",t))(Ase||{}),Sse=(t=>(t.Retry="retry",t))(Sse||{}),Ise=(t=>(t.EmailSent="email-sent",t.EmailNotDeliverable="email-not-deliverable",t))(Ise||{}),J0=(t=>(t.VerifyEmailOtp="verify-email-otp",t.Cancel="cancel",t))(J0||{}),Ose=(t=>(t.EmailOTPSent="email-otp-sent",t.InvalidEmailOtp="invalid-email-otp",t.ExpiredEmailOtp="expired-email-otp",t))(Ose||{}),a2=(t=>(t.Retry="device-retry",t))(a2||{}),Pse=(t=>(t.DeviceApproved="device-approved",t.DeviceNeedsApproval="device-needs-approval",t.DeviceVerificationLinkExpired="device-verification-link-expired",t.DeviceVerificationEmailSent="device-verification-email-sent",t))(Pse||{}),Tse=(t=>(t.Harmony="HARMONY",t))(Tse||{}),Rse=(t=>(t.PhoneNumber="phone_number",t))(Rse||{}),aFe=Object.create,SI=Object.defineProperty,oFe=Object.defineProperties,sFe=Object.getOwnPropertyDescriptor,cFe=Object.getOwnPropertyDescriptors,uFe=Object.getOwnPropertyNames,kY=Object.getOwnPropertySymbols,lFe=Object.getPrototypeOf,Cse=Object.prototype.hasOwnProperty,fFe=Object.prototype.propertyIsEnumerable,LY=(t,e,r)=>e in t?SI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Qk=(t,e)=>{for(var r in e||(e={}))Cse.call(e,r)&&LY(t,r,e[r]);if(kY)for(var r of kY(e))fFe.call(e,r)&&LY(t,r,e[r]);return t},Nse=(t,e)=>oFe(t,cFe(e)),dFe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hFe=(t,e)=>{for(var r in e)SI(t,r,{get:e[r],enumerable:!0})},pFe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of uFe(e))!Cse.call(t,i)&&i!==r&&SI(t,i,{get:()=>e[i],enumerable:!(n=sFe(e,i))||n.enumerable});return t},gFe=(t,e,r)=>(r=t!=null?aFe(lFe(t)):{},pFe(e||!t||!t.__esModule?SI(r,"default",{value:t,enumerable:!0}):r,t)),Ci=(t,e,r)=>new Promise((n,i)=>{var a=c=>{try{s(r.next(c))}catch(u){i(u)}},o=c=>{try{s(r.throw(c))}catch(u){i(u)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,o);s((r=r.apply(t,e)).next())}),yFe=dFe((t,e)=>{var r=Object.prototype.hasOwnProperty,n="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1));function a(u,f,d){this.fn=u,this.context=f,this.once=d||!1}function o(u,f,d,g,m){if(typeof d!="function")throw new TypeError("The listener must be a function");var w=new a(d,g||u,m),v=n?n+f:f;return u._events[v]?u._events[v].fn?u._events[v]=[u._events[v],w]:u._events[v].push(w):(u._events[v]=w,u._eventsCount++),u}function s(u,f){--u._eventsCount===0?u._events=new i:delete u._events[f]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)r.call(f,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},c.prototype.listeners=function(u){var f=n?n+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var g=0,m=d.length,w=new Array(m);g<m;g++)w[g]=d[g].fn;return w},c.prototype.listenerCount=function(u){var f=n?n+u:u,d=this._events[f];return d?d.fn?1:d.length:0},c.prototype.emit=function(u,f,d,g,m,w){var v=n?n+u:u;if(!this._events[v])return!1;var y=this._events[v],_=arguments.length,b,S;if(y.fn){switch(y.once&&this.removeListener(u,y.fn,void 0,!0),_){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,f),!0;case 3:return y.fn.call(y.context,f,d),!0;case 4:return y.fn.call(y.context,f,d,g),!0;case 5:return y.fn.call(y.context,f,d,g,m),!0;case 6:return y.fn.call(y.context,f,d,g,m,w),!0}for(S=1,b=new Array(_-1);S<_;S++)b[S-1]=arguments[S];y.fn.apply(y.context,b)}else{var x=y.length,I;for(S=0;S<x;S++)switch(y[S].once&&this.removeListener(u,y[S].fn,void 0,!0),_){case 1:y[S].fn.call(y[S].context);break;case 2:y[S].fn.call(y[S].context,f);break;case 3:y[S].fn.call(y[S].context,f,d);break;case 4:y[S].fn.call(y[S].context,f,d,g);break;default:if(!b)for(I=1,b=new Array(_-1);I<_;I++)b[I-1]=arguments[I];y[S].fn.apply(y[S].context,b)}}return!0},c.prototype.on=function(u,f,d){return o(this,u,f,d,!1)},c.prototype.once=function(u,f,d){return o(this,u,f,d,!0)},c.prototype.removeListener=function(u,f,d,g){var m=n?n+u:u;if(!this._events[m])return this;if(!f)return s(this,m),this;var w=this._events[m];if(w.fn)w.fn===f&&(!g||w.once)&&(!d||w.context===d)&&s(this,m);else{for(var v=0,y=[],_=w.length;v<_;v++)(w[v].fn!==f||g&&!w[v].once||d&&w[v].context!==d)&&y.push(w[v]);y.length?this._events[m]=y.length===1?y[0]:y:s(this,m)}return this},c.prototype.removeAllListeners=function(u){var f;return u?(f=n?n+u:u,this._events[f]&&s(this,f)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,typeof e<"u"&&(e.exports=c)});function mFe(t){let e={exports:{}};return t(e,e.exports),e.exports}var vFe=Number.MAX_SAFE_INTEGER||9007199254740991,Jk={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:vFe,MAX_SAFE_COMPONENT_LENGTH:16},bFe=typeof process=="object"&&{}&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},Cn=bFe,Gw=mFe(function(t,e){let{MAX_SAFE_COMPONENT_LENGTH:r}=Jk,n=(e=t.exports={}).re=[],i=e.src=[],a=e.t={},o=0,s=(c,u,f)=>{let d=o++;Cn(d,u),a[c]=d,i[d]=u,n[d]=new RegExp(u,f?"g":void 0)};s("NUMERICIDENTIFIER","0|[1-9]\\d*"),s("NUMERICIDENTIFIERLOOSE","[0-9]+"),s("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),s("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})`),s("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})`),s("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`),s("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`),s("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`),s("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`),s("BUILDIDENTIFIER","[0-9A-Za-z-]+"),s("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`),s("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`),s("FULL",`^${i[a.FULLPLAIN]}$`),s("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`),s("LOOSE",`^${i[a.LOOSEPLAIN]}$`),s("GTLT","((?:<|>)?=?)"),s("XRANGEIDENTIFIERLOOSE",`${i[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),s("XRANGEIDENTIFIER",`${i[a.NUMERICIDENTIFIER]}|x|X|\\*`),s("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?)?)?`),s("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?)?)?`),s("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`),s("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`),s("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),s("COERCERTL",i[a.COERCE],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",s("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`),s("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`),s("LONECARET","(?:\\^)"),s("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",s("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`),s("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`),s("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`),s("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`),s("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})\\s+-\\s+(${i[a.XRANGEPLAIN]})\\s*$`),s("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[a.XRANGEPLAINLOOSE]})\\s*$`),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0.0.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}),UY=/^[0-9]+$/,Dse=(t,e)=>{let r=UY.test(t),n=UY.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},wFe=(t,e)=>Dse(e,t),_Fe={compareIdentifiers:Dse,rcompareIdentifiers:wFe},{MAX_LENGTH:BY,MAX_SAFE_INTEGER:NE}=Jk,{re:FY,t:jY}=Gw,{compareIdentifiers:Hv}=_Fe,ua=class{constructor(t,e){if(e&&typeof e=="object"||(e={loose:!!e,includePrerelease:!1}),t instanceof ua){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid Version: ${t}`);if(t.length>BY)throw new TypeError(`version is longer than ${BY} characters`);Cn("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;let r=t.trim().match(e.loose?FY[jY.LOOSE]:FY[jY.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>NE||this.major<0)throw new TypeError("Invalid major version");if(this.minor>NE||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>NE||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<NE)return i}return n}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Cn("SemVer.compare",this.version,this.options,t),!(t instanceof ua)){if(typeof t=="string"&&t===this.version)return 0;t=new ua(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof ua||(t=new ua(t,this.options)),Hv(this.major,t.major)||Hv(this.minor,t.minor)||Hv(this.patch,t.patch)}comparePre(t){if(t instanceof ua||(t=new ua(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{let r=this.prerelease[e],n=t.prerelease[e];if(Cn("prerelease compare",e,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r!==n)return Hv(r,n)}while(++e)}compareBuild(t){t instanceof ua||(t=new ua(t,this.options));let e=0;do{let r=this.build[e],n=t.build[e];if(Cn("prerelease compare",e,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r!==n)return Hv(r,n)}while(++e)}inc(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e),this.inc("pre",e);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error(`invalid increment argument: ${t}`)}return this.format(),this.raw=this.version,this}},EFe=(t,e,r)=>new ua(t,r).compare(new ua(e,r)),mm=EFe,xFe=(t,e,r)=>mm(t,e,r)===0,AFe=xFe,SFe=(t,e,r)=>mm(t,e,r)!==0,IFe=SFe,OFe=(t,e,r)=>mm(t,e,r)>0,PFe=OFe,TFe=(t,e,r)=>mm(t,e,r)>=0,RFe=TFe,CFe=(t,e,r)=>mm(t,e,r)<0,NFe=CFe,DFe=(t,e,r)=>mm(t,e,r)<=0,$Fe=DFe,MFe=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return AFe(t,r,n);case"!=":return IFe(t,r,n);case">":return PFe(t,r,n);case">=":return RFe(t,r,n);case"<":return NFe(t,r,n);case"<=":return $Fe(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},WN=MFe,Vv=Symbol("SemVer ANY"),B1=class{static get ANY(){return Vv}constructor(e,r){if(r&&typeof r=="object"||(r={loose:!!r,includePrerelease:!1}),e instanceof B1){if(e.loose===!!r.loose)return e;e=e.value}Cn("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Vv?this.value="":this.value=this.operator+this.semver.version,Cn("comp",this)}parse(e){let r=this.options.loose?qY[HY.COMPARATORLOOSE]:qY[HY.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new ua(n[2],this.options.loose):this.semver=Vv}toString(){return this.value}test(e){if(Cn("Comparator.test",e,this.options.loose),this.semver===Vv||e===Vv)return!0;if(typeof e=="string")try{e=new ua(e,this.options)}catch{return!1}return WN(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof B1))throw new TypeError("a Comparator is required");if(r&&typeof r=="object"||(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""||new xg(e.value,r).test(this.value);if(e.operator==="")return e.value===""||new xg(this.value,r).test(e.semver);let n=!(this.operator!==">="&&this.operator!==">"||e.operator!==">="&&e.operator!==">"),i=!(this.operator!=="<="&&this.operator!=="<"||e.operator!=="<="&&e.operator!=="<"),a=this.semver.version===e.semver.version,o=!(this.operator!==">="&&this.operator!=="<="||e.operator!==">="&&e.operator!=="<="),s=WN(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=WN(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||a&&o||s||c}},{re:qY,t:HY}=Gw,xg=class{constructor(t,e){if(e&&typeof e=="object"||(e={loose:!!e,includePrerelease:!1}),t instanceof xg)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new xg(t.raw,e);if(t instanceof B1)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${t}`);this.format()}format(){return this.range=this.set.map(t=>t.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(t){let{loose:e}=this.options;t=t.trim();let r=e?ka[fa.HYPHENRANGELOOSE]:ka[fa.HYPHENRANGE];t=t.replace(r,KFe(this.options.includePrerelease)),Cn("hyphen replace",t),t=t.replace(ka[fa.COMPARATORTRIM],kFe),Cn("comparator trim",t,ka[fa.COMPARATORTRIM]),t=(t=(t=t.replace(ka[fa.TILDETRIM],LFe)).replace(ka[fa.CARETTRIM],UFe)).split(/\s+/).join(" ");let n=e?ka[fa.COMPARATORLOOSE]:ka[fa.COMPARATOR];return t.split(" ").map(i=>BFe(i,this.options)).join(" ").split(/\s+/).map(i=>WFe(i,this.options)).filter(this.options.loose?i=>!!i.match(n):()=>!0).map(i=>new B1(i,this.options))}intersects(t,e){if(!(t instanceof xg))throw new TypeError("a Range is required");return this.set.some(r=>VY(r,e)&&t.set.some(n=>VY(n,e)&&r.every(i=>n.every(a=>i.intersects(a,e)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new ua(t,this.options)}catch{return!1}for(let e=0;e<this.set.length;e++)if(YFe(this.set[e],t,this.options))return!0;return!1}},{re:ka,t:fa,comparatorTrimReplace:kFe,tildeTrimReplace:LFe,caretTrimReplace:UFe}=Gw,VY=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(a=>i.intersects(a,e)),i=n.pop();return r},BFe=(t,e)=>(Cn("comp",t,e),t=qFe(t,e),Cn("caret",t),t=FFe(t,e),Cn("tildes",t),t=VFe(t,e),Cn("xrange",t),t=GFe(t,e),Cn("stars",t),t),to=t=>!t||t.toLowerCase()==="x"||t==="*",FFe=(t,e)=>t.trim().split(/\s+/).map(r=>jFe(r,e)).join(" "),jFe=(t,e)=>{let r=e.loose?ka[fa.TILDELOOSE]:ka[fa.TILDE];return t.replace(r,(n,i,a,o,s)=>{let c;return Cn("tilde",t,n,i,a,o,s),to(i)?c="":to(a)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:to(o)?c=`>=${i}.${a}.0 <${i}.${+a+1}.0-0`:s?(Cn("replaceTilde pr",s),c=`>=${i}.${a}.${o}-${s} <${i}.${+a+1}.0-0`):c=`>=${i}.${a}.${o} <${i}.${+a+1}.0-0`,Cn("tilde return",c),c})},qFe=(t,e)=>t.trim().split(/\s+/).map(r=>HFe(r,e)).join(" "),HFe=(t,e)=>{Cn("caret",t,e);let r=e.loose?ka[fa.CARETLOOSE]:ka[fa.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,a,o,s,c)=>{let u;return Cn("caret",t,i,a,o,s,c),to(a)?u="":to(o)?u=`>=${a}.0.0${n} <${+a+1}.0.0-0`:to(s)?u=a==="0"?`>=${a}.${o}.0${n} <${a}.${+o+1}.0-0`:`>=${a}.${o}.0${n} <${+a+1}.0.0-0`:c?(Cn("replaceCaret pr",c),u=a==="0"?o==="0"?`>=${a}.${o}.${s}-${c} <${a}.${o}.${+s+1}-0`:`>=${a}.${o}.${s}-${c} <${a}.${+o+1}.0-0`:`>=${a}.${o}.${s}-${c} <${+a+1}.0.0-0`):(Cn("no pr"),u=a==="0"?o==="0"?`>=${a}.${o}.${s}${n} <${a}.${o}.${+s+1}-0`:`>=${a}.${o}.${s}${n} <${a}.${+o+1}.0-0`:`>=${a}.${o}.${s} <${+a+1}.0.0-0`),Cn("caret return",u),u})},VFe=(t,e)=>(Cn("replaceXRanges",t,e),t.split(/\s+/).map(r=>zFe(r,e)).join(" ")),zFe=(t,e)=>{t=t.trim();let r=e.loose?ka[fa.XRANGELOOSE]:ka[fa.XRANGE];return t.replace(r,(n,i,a,o,s,c)=>{Cn("xRange",t,n,i,a,o,s,c);let u=to(a),f=u||to(o),d=f||to(s),g=d;return i==="="&&g&&(i=""),c=e.includePrerelease?"-0":"",u?n=i===">"||i==="<"?"<0.0.0-0":"*":i&&g?(f&&(o=0),s=0,i===">"?(i=">=",f?(a=+a+1,o=0,s=0):(o=+o+1,s=0)):i==="<="&&(i="<",f?a=+a+1:o=+o+1),i==="<"&&(c="-0"),n=`${i+a}.${o}.${s}${c}`):f?n=`>=${a}.0.0${c} <${+a+1}.0.0-0`:d&&(n=`>=${a}.${o}.0${c} <${a}.${+o+1}.0-0`),Cn("xRange return",n),n})},GFe=(t,e)=>(Cn("replaceStars",t,e),t.trim().replace(ka[fa.STAR],"")),WFe=(t,e)=>(Cn("replaceGTE0",t,e),t.trim().replace(ka[e.includePrerelease?fa.GTE0PRE:fa.GTE0],"")),KFe=t=>(e,r,n,i,a,o,s,c,u,f,d,g,m)=>`${r=to(n)?"":to(i)?`>=${n}.0.0${t?"-0":""}`:to(a)?`>=${n}.${i}.0${t?"-0":""}`:o?`>=${r}`:`>=${r}${t?"-0":""}`} ${c=to(u)?"":to(f)?`<${+u+1}.0.0-0`:to(d)?`<${u}.${+f+1}.0-0`:g?`<=${u}.${f}.${d}-${g}`:t?`<${u}.${f}.${+d+1}-0`:`<=${c}`}`.trim(),YFe=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(Cn(t[n].semver),t[n].semver!==B1.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0},QFe=(t,e,r)=>{try{e=new xg(e,r)}catch{return!1}return e.test(t)},{MAX_LENGTH:JFe}=Jk,{re:zY,t:GY}=Gw,XFe=(t,e)=>{if(e&&typeof e=="object"||(e={loose:!!e,includePrerelease:!1}),t instanceof ua)return t;if(typeof t!="string"||t.length>JFe||!(e.loose?zY[GY.LOOSE]:zY[GY.FULL]).test(t))return null;try{return new ua(t,e)}catch{return null}},ZFe=XFe,{re:DE,t:$E}=Gw,eje=(t,e)=>{if(t instanceof ua)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;let r=null;if((e=e||{}).rtl){let n;for(;(n=DE[$E.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),DE[$E.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;DE[$E.COERCERTL].lastIndex=-1}else r=t.match(DE[$E.COERCE]);return r===null?null:ZFe(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};function tje(t){return String.fromCharCode(parseInt(t.slice(1),16))}function rje(t){return`%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`}function nje(t){return btoa(encodeURIComponent(t).replace(/%[0-9A-F]{2}/g,tje))}function ije(t){return decodeURIComponent(Array.from(atob(t),rje).join(""))}function $se(t){return nje(JSON.stringify(t))}function aje(t){return JSON.parse(ije(t))}function Ab(t){return typeof t>"u"}function oje(t){return t===null}function Mse(t){return oje(t)||Ab(t)}function sje(t){return Mse(t)?!1:!Ab(t.jsonrpc)&&!Ab(t.id)&&(!Ab(t.result)||!Ab(t.error))}function cje(t){return Mse(t)?!1:typeof t=="number"&&Object.values(AI).includes(t)}function o2(t){if(!t)return!0;for(let e in t)if(Object.hasOwnProperty.call(t,e))return!1;return!0}var Vn={};function uje(t,e){return Object.assign(Vn,e),t}var lje={"magic-sdk":"magic-sdk","@magic-sdk/react-native":"magic-sdk-rn","@magic-sdk/react-native-bare":"magic-sdk-rn-bare","@magic-sdk/react-native-expo":"magic-sdk-rn-expo"},Cd=class extends Error{constructor(e,r){super(`Magic SDK Error: [${e}] ${r}`),this.code=e,this.rawMessage=r,this.__proto__=Error,Object.setPrototypeOf(this,Cd.prototype)}},F1=class extends Error{constructor(e){super(),this.__proto__=Error;let r=Number(e==null?void 0:e.code);this.rawMessage=(e==null?void 0:e.message)||"Internal error",this.code=cje(r)?r:AI.InternalError,this.message=`Magic RPC Error: [${this.code}] ${this.rawMessage}`,this.data=(e==null?void 0:e.data)||void 0,Object.setPrototypeOf(this,F1.prototype)}},Ww=class{constructor(t,e){this.code=t,this.rawMessage=e,this.message=`Magic SDK Warning: [${t}] ${e}`}log(){console.warn(this.message)}},Xk=class extends Error{constructor(t,e,r,n){super(`Magic Extension Error (${t.name}): [${e}] ${r}`),this.code=e,this.rawMessage=r,this.data=n,this.__proto__=Error,Object.setPrototypeOf(this,Xk.prototype)}},D4=class{constructor(t,e,r){this.code=e,this.rawMessage=r,this.message=`Magic Extension Warning (${t.name}): [${e}] ${r}`}log(){console.warn(this.message)}};function fje(){return new Cd(Rd.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.")}function kse(){return new Cd(Rd.ModalNotReady,"Modal is not ready.")}function dje(){return new Cd(Rd.MalformedResponse,"Response from the Magic iframe is malformed.")}function hje(t){return new Cd(Rd.ExtensionNotInitialized,`Extensions must be initialized with a Magic SDK instance before \`Extension.${t}\` can be accessed. Do not invoke \`Extension.${t}\` inside an extension constructor.`)}function pje(t){let e=`Some extensions are incompatible with \`${Vn.sdkName}@${Vn.version}\`:`;return t.filter(r=>typeof r.compat<"u"&&r.compat!==null).forEach(r=>{let n=r.compat[Vn.sdkName];typeof n=="string"?e+=`
|
|
167
|
-
- Extension \`${r.name}\` supports version(s) \`${n}\``:n||(e+=`
|
|
168
|
-
- Extension \`${r.name}\` does not support ${Vn.platform} environments.`)}),new Cd(Rd.IncompatibleExtensions,e)}function gje(t){let e=r=>{let n=r+1,i=n%10,a=n%100;return i===1&&a!==11?`${n}st`:i===2&&a!==12?`${n}nd`:i===3&&a!==13?`${n}rd`:`${n}th`};return new Cd(Rd.InvalidArgument,`Invalid ${e(t.argument)} argument given to \`${t.procedure}\`.
|
|
169
|
-
Expected: \`${t.expected}\`
|
|
170
|
-
Received: \`${t.received}\``)}function yje(){return new Ww(ym.DuplicateIframe,"Duplicate iframes found.")}function mje(){return new Ww(ym.SyncWeb3Method,"Non-async web3 methods are deprecated in web3 > 1.0 and are not supported by the Magic web3 provider. Please use an async method instead.")}function vje(){return new Ww(ym.ReactNativeEndpointConfiguration,`CUSTOM DOMAINS ARE NOT SUPPORTED WHEN USING MAGIC SDK WITH REACT NATIVE! The \`endpoint\` parameter SHOULD NOT be provided. The Magic \`<iframe>\` is automatically wrapped by a WebView pointed at \`${Vn.defaultEndpoint}\`. Changing this default behavior will lead to unexpected results and potentially security-threatening bugs.`)}function Ag(t){let{method:e,removalVersions:r,useInstead:n}=t,i=r[Vn.sdkName],a=n?` Use \`${n}\` instead.`:"",o=`\`${e}\` will be removed from \`${Vn.sdkName}\` in version \`${i}\`.${a}`;return new Ww(ym.DeprecationNotice,o)}function*bje(){let t=0;for(;;)t<Number.MAX_SAFE_INTEGER?yield++t:t=0}var wje=bje();function Lse(){return wje.next().value}var Use=Symbol("Payload pre-processed by Magic SDK");function Bse(t){return Object.defineProperty(t,Use,{value:!0,enumerable:!1}),t}function _je(t){return!!t[Use]}function s2(t){var e,r,n;return _je(t)||(t.jsonrpc=(e=t.jsonrpc)!=null?e:"2.0",t.id=Lse(),t.method=(r=t.method)!=null?r:"noop",t.params=(n=t.params)!=null?n:[],Bse(t)),t}function an(t,e=[]){return Bse({params:e,method:t,jsonrpc:"2.0",id:Lse()})}var Zk=class{constructor(t){t instanceof Zk?(this._jsonrpc=t.payload.jsonrpc,this._id=t.payload.id,this._result=t.payload.result,this._error=t.payload.error):sje(t)?(this._jsonrpc=t.jsonrpc,this._id=t.id,this._result=t.result,this._error=t.error):(this._jsonrpc=t.jsonrpc,this._id=t.id,this._result=void 0,this._error=void 0)}applyError(t){return this._error=t,this}applyResult(t){return this._result=t,this}get hasError(){return typeof this._error<"u"&&this._error!==null}get hasResult(){return typeof this._result<"u"}get payload(){return{jsonrpc:this._jsonrpc,id:this._id,result:this._result,error:this._error}}},Eje=gFe(yFe()),xje=class extends Eje.default{};function Fse(){let t=new xje;return{emitter:t,createChainingEmitterMethod:(e,r)=>(...n)=>(t[e].apply(t,n),r),createBoundEmitterMethod:e=>(...r)=>t[e].apply(t,r)}}var jse=Symbol("isPromiEvent");function qse(t){return!!t[jse]}function eL(t){let e=Hse(t),{createBoundEmitterMethod:r,createChainingEmitterMethod:n}=Fse(),i=Symbol("Promise.then"),a=Symbol("Promise.catch"),o=Symbol("Promise.finally"),s=(f,d)=>(...g)=>{let m=d[f].apply(d,g);return c(m)},c=f=>Object.assign(f,{[jse]:!0,[i]:f[i]||f.then,[a]:f[a]||f.catch,[o]:f[o]||f.finally,then:s(i,f),catch:s(a,f),finally:s(o,f),on:n("on",f),once:n("once",f),addListener:n("addListener",f),off:n("off",f),removeListener:n("removeListener",f),removeAllListeners:n("removeAllListeners",f),emit:r("emit"),eventNames:r("eventNames"),listeners:r("listeners"),listenerCount:r("listenerCount")}),u=c(e.then(f=>(u.emit("done",f),u.emit("settled"),f),f=>{throw u.emit("error",f),u.emit("settled"),f}));return u}function Hse(t){return new Promise((e,r)=>{let n=t(e,r);Promise.resolve(n).catch(r)})}var kp=class{constructor(t){this.sdk=t}get overlay(){return this.sdk.overlay}request(t){let e=this.overlay.post(U1.MAGIC_HANDLE_REQUEST,s2(t)),r=eL((i,a)=>{e.then(o=>{if(n(),o.hasError)a(new F1(o.payload.error));else if(o.hasResult)i(o.payload.result);else throw dje()}).catch(o=>{n(),a(o)})}),n=this.overlay.on(Ph.MAGIC_HANDLE_EVENT,i=>{var a;let{response:o}=i.data;if(o.id===t.id&&((a=o.result)!=null&&a.event)){let{event:s,params:c=[]}=o.result;r.emit(s,...c)}});return r}createIntermediaryEvent(t,e){return r=>{let n=an(br.IntermediaryEvent,[{payloadId:e,eventType:t,args:r}]);this.request(n)}}};function Aje(t,e){let[r]=t.split(".").map(Number);return r>=e}var Sg={"magic-sdk":"v18.0.0","@magic-sdk/react-native":"v14.0.0","@magic-sdk/react-native-bare":"v19.0.0","@magic-sdk/react-native-expo":"v19.0.0"},Sje=class extends kp{loginWithMagicLink(t){let e=Vn.sdkName==="@magic-sdk/react-native"||Vn.sdkName==="@magic-sdk/react-native-bare"||Vn.sdkName==="@magic-sdk/react-native-expo";if(e&&Aje(Vn.version,19))throw new Error("loginWithMagicLink() is deprecated for this package, please utlize a passcode method like loginWithSMS or loginWithEmailOTP instead.");e&&Ag({method:"auth.loginWithMagicLink()",removalVersions:Sg,useInstead:"auth.loginWithEmailOTP()"}).log();let{email:r,showUI:n=!0,redirectURI:i,overrides:a}=t,o=an(this.sdk.testMode?br.LoginWithMagicLinkTestMode:br.LoginWithMagicLink,[{email:r,showUI:n,redirectURI:i,overrides:a}]);return this.request(o)}loginWithSMS(t){let{phoneNumber:e}=t,r=an(this.sdk.testMode?br.LoginWithSmsTestMode:br.LoginWithSms,[{phoneNumber:e,showUI:!0}]);return this.request(r)}loginWithEmailOTP(t){let{email:e,showUI:r,deviceCheckUI:n,overrides:i}=t,a=an(this.sdk.testMode?br.LoginWithEmailOTPTestMode:br.LoginWithEmailOTP,[{email:e,showUI:r,deviceCheckUI:n,overrides:i}]),o=this.request(a);return!n&&o&&o.on(a2.Retry,()=>{this.createIntermediaryEvent(a2.Retry,a.id)()}),!r&&o&&(o.on(J0.VerifyEmailOtp,s=>{this.createIntermediaryEvent(J0.VerifyEmailOtp,a.id)(s)}),o.on(J0.Cancel,()=>{this.createIntermediaryEvent(J0.Cancel,a.id)()})),o}loginWithCredential(t){let e=t??"";if(!t&&Vn.platform==="web"){e=window.location.search;let n=window.location.origin+window.location.pathname;window.history.replaceState(null,"",n)}let r=an(this.sdk.testMode?br.LoginWithCredentialTestMode:br.LoginWithCredential,[e]);return this.request(r)}setAuthorizationToken(t){let e=an(br.SetAuthorizationToken,[{jwt:t}]);return this.request(e)}updateEmailWithUI(t){let{email:e,showUI:r=!0}=t,n=an(this.sdk.testMode?br.UpdateEmailTestMode:br.UpdateEmail,[{email:e,showUI:r}]);return this.request(n)}},Vse={};hFe(Vse,{clear:()=>Ije,getItem:()=>Mo,iterate:()=>zse,key:()=>Pje,keys:()=>Tje,length:()=>Oje,removeItem:()=>II,setItem:()=>Cl});var ME;function Nd(t){return(...e)=>Ci(this,null,function*(){return ME||(ME=yield Vn.configureStorage()),yield ME.ready(),ME[t](...e)})}var Mo=Nd("getItem"),Cl=Nd("setItem"),II=Nd("removeItem"),Ije=Nd("clear"),Oje=Nd("length"),Pje=Nd("key"),Tje=Nd("keys"),zse=Nd("iterate");function Rje(){let t=window.crypto.getRandomValues(new Uint8Array(16));t[6]=t[6]&15|64,t[8]=t[8]&191|128;let e="";return e+=t[0].toString(16),e+=t[1].toString(16),e+=t[2].toString(16),e+=t[3].toString(16),e+="-",e+=t[4].toString(16),e+=t[5].toString(16),e+="-",e+=t[6].toString(16),e+=t[7].toString(16),e+="-",e+=t[8].toString(16),e+=t[9].toString(16),e+="-",e+=t[10].toString(16),e+=t[11].toString(16),e+=t[12].toString(16),e+=t[13].toString(16),e+=t[14].toString(16),e+=t[15].toString(16),e}var Gse="STORE_KEY_PRIVATE_KEY",$4="STORE_KEY_PUBLIC_JWK",Wse="ECDSA",Cje="P-256",Nje={name:Wse,namedCurve:Cje};function OI(){let t=typeof window<"u"&&!!window.crypto,e=t&&!!window.crypto.subtle;return t&&e}function Dje(){return Ci(this,null,function*(){let t=yield $je();if(!t){console.info("unable to create public key or webcrypto is unsupported");return}let{subtle:e}=window.crypto,r=yield Mo(Gse);if(!r||!e){console.info("unable to find private key or webcrypto unsupported");return}let n={iat:Math.floor(new Date().getTime()/1e3),jti:Rje()},i={typ:"dpop+jwt",alg:"ES256",jwk:t},a={protected:WY(JSON.stringify(i)),claims:WY(JSON.stringify(n))},o=kje(`${a.protected}.${a.claims}`),s={name:Wse,hash:{name:"SHA-256"}},c=Uje(new Uint8Array(yield e.sign(s,r,o)));return`${a.protected}.${a.claims}.${c}`})}function $je(){return Ci(this,null,function*(){if(!OI()){console.info("webcrypto is not supported");return}return(yield Mo($4))||(yield Mje()),Mo($4)})}function Mje(){return Ci(this,null,function*(){let{subtle:t}=window.crypto,e=yield t.generateKey(Nje,!1,["sign"]),r=yield t.exportKey("jwk",e.publicKey);yield Cl(Gse,e.privateKey),yield Cl($4,r)})}function WY(t){return Kse(Lje(t))}function kje(t){return new TextEncoder().encode(t)}function Kse(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+/g,"")}function Lje(t){return encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,r)=>String.fromCharCode(parseInt(r,16)))}function Uje(t){let e="";return t.forEach(r=>{e+=String.fromCharCode(r)}),Kse(e)}var tL="ds",rL="ek",nL="iv",iL="AES-GCM",Bje=256;function aL(){return Ci(this,null,function*(){let t=[];yield zse((e,r,n)=>{r.startsWith(`${tL}_`)&&t.push(r)});for(let e of t)yield II(e)})}function Yse(t){let e="",r=new Uint8Array(t),n=r.byteLength;for(let i=0;i<n;i++)e+=String.fromCharCode(r[i]);return window.btoa(e)}function Qse(t){let e=window.atob(t),r=e.length,n=new Uint8Array(r);for(let i=0;i<r;i++)n[i]=e.charCodeAt(i);return n.buffer}function Fje(){return Ci(this,null,function*(){if(!OI()){console.info("webcrypto is not supported");return}let{crypto:t}=window;return(yield Mo(nL))||t.getRandomValues(new Uint8Array(12))})}function jje(){return Ci(this,null,function*(){if(!OI()){console.info("webcrypto is not supported");return}let{subtle:t}=window.crypto;return(yield Mo(rL))||(yield t.generateKey({name:iL,length:Bje},!1,["encrypt","decrypt"]))})}function qje(t,e){return Ci(this,null,function*(){let r=yield Fje(),n=yield jje();if(!r||!n||!t)return;let i=Qse(t),{subtle:a}=window.crypto,o=yield a.encrypt({name:iL,iv:r},n,i),s=Yse(o);yield Cl(`${tL}_${e}`,s),yield Cl(rL,n),yield Cl(nL,r)})}function Hje(t){return Ci(this,null,function*(){let e=yield Mo(`${tL}_${t}`),r=yield Mo(nL),n=yield Mo(rL);if(!r||!e||!n||!OI())return;let{subtle:i}=window.crypto,a=yield i.decrypt({name:iL,iv:r},n,Qse(e));return Yse(a)})}var Vje=class extends kp{constructor(){super(...arguments),this.localForageKey="mc_active_wallet"}getIdToken(e){let r=an(this.sdk.testMode?br.GetIdTokenTestMode:br.GetIdToken,[e]);return this.request(r)}generateIdToken(e){let r=an(this.sdk.testMode?br.GenerateIdTokenTestMode:br.GenerateIdToken,[e]);return this.request(r)}getInfo(){return Ci(this,null,function*(){let e=yield Mo(this.localForageKey),r=an(br.GetInfo,[{walletType:e}]);return this.request(r)})}isLoggedIn(){let e=an(this.sdk.testMode?br.IsLoggedInTestMode:br.IsLoggedIn);return this.request(e)}logout(){II(this.localForageKey),aL();let e=an(this.sdk.testMode?br.LogoutTestMode:br.Logout);return this.request(e)}requestInfoWithUI(e){let r=an(br.RequestUserInfoWithUI,e?[e]:[]);return this.request(r)}showSettings(e){let r=an(this.sdk.testMode?br.UserSettingsTestMode:br.UserSettings,[e]);return this.request(r)}recoverAccount(e){let r=an(this.sdk.testMode?br.RecoverAccountTestMode:br.RecoverAccount,[e]);return this.request(r)}getMetadata(){Ag({method:"user.getMetadata()",removalVersions:Sg,useInstead:"user.getInfo()"}).log();let e=an(this.sdk.testMode?br.GetMetadataTestMode:br.GetMetadata);return this.request(e)}updateEmail(e){Ag({method:"user.updateEmail()",removalVersions:Sg,useInstead:"auth.updateEmailWithUI()"}).log();let{email:r,showUI:n=!0}=e,i=an(this.sdk.testMode?br.UpdateEmailTestMode:br.UpdateEmail,[{email:r,showUI:n}]);return this.request(i)}};function c2(t,e){return e?new URL(t,e):new URL(t)}var zje=class extends kp{constructor(){super(...arguments),this.localForageKey="mc_active_wallet"}connectWithUI(){let e=eL((r,n)=>Ci(this,null,function*(){try{if(this.isMetaMaskBrowser()&&(yield this.isWalletEnabled(xs.MetaMask))){let c=yield this.autoConnectIfWalletBrowser(xs.MetaMask);r(c);return}if(this.isCoinbaseWalletBrowser()&&(yield this.isWalletEnabled(xs.CoinbaseWallet))){let c=yield this.autoConnectIfWalletBrowser(xs.CoinbaseWallet);r(c);return}let i=this.getUserEnv(),a=an(br.Login,[i]),o=this.request(a);o.on(Zb.WalletSelected,c=>this.handleWalletSelected(Nse(Qk({},c),{payloadId:a.id}))),o.on("id-token-created",c=>{e.emit("id-token-created",c)});let s=yield o;s.error&&n(s),r(s)}catch(i){n(i)}}));return e}showUI(){return this.request(an(br.ShowUI))}showAddress(){return this.request(an(br.ShowAddress))}showSendTokensUI(){return this.request(an(br.ShowSendTokensUI))}showOnRamp(){return this.request(an(br.ShowOnRamp))}showNFTs(){return this.request(an(br.ShowNFTs))}showBalances(){return this.request(an(br.ShowBalances))}sendGaslessTransaction(e,r){return this.request(an(br.SendGaslessTransaction,[e,r]))}getInfo(){return Ci(this,null,function*(){Ag({method:"wallet.getInfo()",removalVersions:Sg,useInstead:"user.getInfo()"}).log();let e=yield Mo(this.localForageKey),r=an(br.GetInfo,[{walletType:e}]);return this.request(r)})}disconnect(){Ag({method:"wallet.disconnect()",removalVersions:Sg,useInstead:"user.logout()"}).log(),II(this.localForageKey),aL();let e=an(br.Disconnect);return this.request(e)}requestUserInfoWithUI(e){Ag({method:"wallet.requestUserInfoWithUI()",removalVersions:Sg,useInstead:"user.requestUserInfoWithUI()"}).log();let r=an(br.RequestUserInfoWithUI,e?[e]:[]);return this.request(r)}getProvider(){return Ci(this,null,function*(){switch(yield Mo(this.localForageKey)){case xs.MetaMask:return this.getMetaMaskProvider();case xs.CoinbaseWallet:return this.getCoinbaseProvider();default:return this.sdk.rpcProvider}})}isMetaMaskInstalled(){var e,r,n;return((e=window.ethereum)==null?void 0:e.isMetaMask)||!!((n=(r=window.ethereum)==null?void 0:r.providers)!=null&&n.find(i=>i==null?void 0:i.isMetaMask))}isMetaMaskBrowser(){return this.isMobile()&&this.isMetaMaskInstalled()}getMetaMaskProvider(){var e,r;return((r=(e=window.ethereum)==null?void 0:e.providers)==null?void 0:r.find(n=>n==null?void 0:n.isMetaMask))||window.ethereum}connectToMetaMask(){if(this.isMobile()&&!this.isMetaMaskInstalled()){let e=`https://metamask.app.link/dapp/${window.location.href.replace(/(^\w+:|^)\/\//,"")}`;window.location.href=e}return this.getMetaMaskProvider().request({method:"eth_requestAccounts"})}isCoinbaseWalletInstalled(){var e,r,n;return((e=window.ethereum)==null?void 0:e.isCoinbaseWallet)||!!((n=(r=window.ethereum)==null?void 0:r.providers)!=null&&n.find(i=>i==null?void 0:i.isCoinbaseWallet))}isCoinbaseWalletBrowser(){var e;return!!((e=window.ethereum)!=null&&e.isCoinbaseBrowser)}getCoinbaseProvider(){var e,r;return((r=(e=window.ethereum)==null?void 0:e.providers)==null?void 0:r.find(n=>n==null?void 0:n.isCoinbaseWallet))||window.ethereum}connectToCoinbaseWallet(){if(this.isMobile()&&!this.isCoinbaseWalletBrowser()){let e=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(window.location.href)}`;window.location.href=e}return this.getCoinbaseProvider().request({method:"eth_requestAccounts"})}isMobile(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Silk|Opera Mini/i.test(navigator.userAgent)}getUserEnv(){return{env:{isMetaMaskInstalled:this.isMetaMaskInstalled(),isCoinbaseWalletInstalled:this.isCoinbaseWalletInstalled()}}}connectToThirdPartyWallet(e){switch(e){case xs.MetaMask:return this.connectToMetaMask();case xs.CoinbaseWallet:return this.connectToCoinbaseWallet();default:throw new Error(`Invalid provider: ${e}. Must be one of "metamask" or "coinbase_wallet".`)}}isWalletEnabled(e){let r=an("mc_is_wallet_enabled",[{wallet:e}]);return this.request(r)}handleWalletSelected(e){return Ci(this,null,function*(){try{let r=yield this.connectToThirdPartyWallet(e.wallet);yield Cl(this.localForageKey,e.wallet),this.createIntermediaryEvent(Zb.WalletConnected,e.payloadId)(r)}catch(r){console.error(r),this.createIntermediaryEvent(Zb.WalletRejected,e.payloadId)()}})}autoConnectIfWalletBrowser(e){return Ci(this,null,function*(){let r;e===xs.MetaMask&&(r=yield this.getMetaMaskProvider().request({method:"eth_requestAccounts"})),e===xs.CoinbaseWallet&&(r=yield this.getCoinbaseProvider().request({method:"eth_requestAccounts"})),yield Cl(this.localForageKey,e);let n=an(br.AutoConnect,[{wallet:e,address:r}]);return this.request(n)})}},{createBoundEmitterMethod:kE,createChainingEmitterMethod:_0}=Fse(),Gje=class extends kp{constructor(){super(...arguments),this.isMagic=!0,this.on=_0("on",this),this.once=_0("once",this),this.addListener=_0("addListener",this),this.off=_0("off",this),this.removeListener=_0("removeListener",this),this.removeAllListeners=_0("removeAllListeners",this),this.emit=kE("emit"),this.eventNames=kE("eventNames"),this.listeners=kE("listeners"),this.listenerCount=kE("listenerCount")}sendAsync(t,e){if(!e)throw gje({procedure:"Magic.rpcProvider.sendAsync",argument:1,expected:"function",received:e===null?"null":typeof e});if(Array.isArray(t))this.overlay.post(U1.MAGIC_HANDLE_REQUEST,t.map(r=>{let n=s2(r);return this.prefixPayloadMethodForTestMode(n),n})).then(r=>{e(null,r.map(n=>Nse(Qk({},n.payload),{error:n.hasError?new F1(n.payload.error):null})))});else{let r=s2(t);this.prefixPayloadMethodForTestMode(r),this.overlay.post(U1.MAGIC_HANDLE_REQUEST,r).then(n=>{e(n.hasError?new F1(n.payload.error):null,n.payload)})}}send(t,e){if(typeof t=="string"){let n=an(t,Array.isArray(e)?e:[]);return this.request(n)}if(Array.isArray(t)||e){this.sendAsync(t,e);return}let r=mje();return r.log(),new Zk(t).applyError({code:-32603,message:r.rawMessage}).payload}enable(){let t=an(br.Login);return this.request(t)}request(t){return this.prefixPayloadMethodForTestMode(t),super.request(t)}prefixPayloadMethodForTestMode(t){let e="testMode/eth/";this.sdk.testMode&&(t.method=`${e}${t.method}`)}},KY=["request","overlay","sdk"];function Wje(t){let e=Object.getPrototypeOf(t),r=[e];for(;e!==kp.prototype;)e=Object.getPrototypeOf(e),r.push(e);return r}var Jse=class extends kp{constructor(){super(void 0),this.__sdk_access_field_descriptors__=new Map,this.__is_initialized__=!1,this.utils={createPromiEvent:eL,isPromiEvent:qse,encodeJSON:$se,decodeJSON:aje,createJsonRpcRequestPayload:an,standardizeJsonRpcRequestPayload:s2,storage:Vse};let t=[this,...Wje(this)];KY.forEach(e=>{let r=t.map(o=>Object.getOwnPropertyDescriptor(o,e)),n=r.findIndex(o=>!!o),i=n>0,a=r[n];a&&(this.__sdk_access_field_descriptors__.set(e,{descriptor:a,isPrototypeField:i}),Object.defineProperty(this,e,{configurable:!0,get:()=>{throw hje(e)}}))})}init(t){this.__is_initialized__||(KY.forEach(e=>{if(this.__sdk_access_field_descriptors__.has(e)){let{descriptor:r,isPrototypeField:n}=this.__sdk_access_field_descriptors__.get(e);n?delete this[e]:Object.defineProperty(this,e,r)}}),this.sdk=t,this.__is_initialized__=!0)}createDeprecationWarning(t){let{method:e,removalVersion:r,useInstead:n}=t,i=n?` Use \`${n}\` instead.`:"",a=`\`${e}\` will be removed from this Extension in version \`${r}\`.${i}`;return new D4(this,"DEPRECATION_NOTICE",a)}createWarning(t,e){return new D4(this,t,e)}createError(t,e,r){return new Xk(this,t,e,r)}},Kje=class extends Jse{},rp=class extends Jse{};rp.Internal=Kje,rp.Anonymous="anonymous extension";var Yje=class extends kp{purchase(t){let e=an(br.NFTPurchase,[t]);return this.request(e)}checkout(t){let e=an(br.NFTCheckout,[t]);return this.request(e)}transfer(t){let e=an(br.NFTTransfer,[t]);return this.request(e)}};function YY(t){return t.compat&&t.compat[Vn.sdkName]!=null?typeof t.compat[Vn.sdkName]=="string"?QFe(eje(Vn.version),t.compat[Vn.sdkName]):!!t.compat[Vn.sdkName]:!0}function Qje(t,e,r){return!e&&!r?`${t}_eth_mainnet`:r?`${t}_${JSON.stringify(r)}`:e?typeof e=="string"?`${t}_eth_${e}`:`${t}_${e.rpcUrl}_${e.chainId}_${e.chainType}`:`${t}_unknown`}function Jje(t){var e;let r=(e=t==null?void 0:t.extensions)!=null?e:[],n={},i=[];if(Array.isArray(r)?r.forEach(a=>{YY(a)?(a.init(this),(a.name||a.name!==rp.Anonymous)&&(this[a.name]=a),a instanceof rp.Internal&&(o2(a.config)||(n[a.name]=a.config))):i.push(a)}):Object.keys(r).forEach(a=>{if(YY(r[a])){r[a].init(this);let o=r[a];this[a]=o,o instanceof rp.Internal&&(o2(o.config)||(n[r[a].name]=o.config))}else i.push(r[a])}),i.length)throw pje(i);return n}var Ux=class{constructor(t,e){this.apiKey=t;var r;if(!t)throw fje();Vn.platform==="react-native"&&(e!=null&&e.endpoint)&&vje().log();let{defaultEndpoint:n,version:i}=Vn;this.testMode=!!(e!=null&&e.testMode),this.endpoint=c2((r=e==null?void 0:e.endpoint)!=null?r:n).origin,this.auth=new Sje(this),this.user=new Vje(this),this.wallet=new zje(this),this.nft=new Yje(this),this.rpcProvider=new Gje(this);let a=Jje.call(this,e);this.parameters=$se(Qk({API_KEY:this.apiKey,DOMAIN_ORIGIN:window.location?window.location.origin:"",ETH_NETWORK:e==null?void 0:e.network,host:c2(this.endpoint).host,sdk:lje[Vn.sdkName],version:i,ext:o2(a)?void 0:a,locale:(e==null?void 0:e.locale)||"en_US"},Vn.bundleId?{bundleId:Vn.bundleId}:{})),this.networkHash=Qje(this.apiKey,e==null?void 0:e.network,o2(a)?void 0:a),e!=null&&e.deferPreload||this.preload()}get overlay(){if(!Ux.__overlays__.has(this.parameters)){let t=new Vn.ViewController(this.endpoint,this.parameters,this.networkHash);t.init(),Ux.__overlays__.set(this.parameters,t)}return Ux.__overlays__.get(this.parameters)}preload(){return Ci(this,null,function*(){yield this.overlay.checkIsReadyForRequest})}},Xse=Ux;Xse.__overlays__=new Map;function Xje(t,e){return e&&Array.isArray(t)?t.find(r=>r.id===e):t}function Zje(t,e){var r;let n=(r=e.data.response)==null?void 0:r.id,i=Xje(t,n);if(n&&i){let a=new Zk(i).applyResult(e.data.response.result).applyError(e.data.response.error);return{id:n,response:a}}return{}}function eqe(t,e,r){return Ci(this,null,function*(){var n;let i=yield Mo("rt"),a;if(Vn.platform==="web")try{a=(n=yield Mo("jwt"))!=null?n:yield Dje()}catch(c){console.error("webcrypto error",c)}let o={msgType:t,payload:e};a&&(o.jwt=a),a&&i&&(o.rt=i);let s=yield Hje(r);return s&&(o.deviceShare=s),o})}function tqe(t){return Ci(this,null,function*(){!t.data.rt||(yield Cl("rt",t.data.rt))})}var rqe=class{constructor(t,e,r){this.endpoint=t,this.parameters=e,this.networkHash=r,this.messageHandlers=new Set,this.isConnectedToInternet=!0,this.checkIsReadyForRequest=this.waitForReady(),this.isReadyForRequest=!1,this.listen()}post(t,e){return Ci(this,null,function*(){return Hse((r,n)=>Ci(this,null,function*(){if(!this.isConnectedToInternet){let u=kse();n(u)}this.isReadyForRequest||(yield this.waitForReady());let i=[],a=Array.isArray(e)?e.map(u=>u.id):[],o=yield eqe(`${t}-${this.parameters}`,e,this.networkHash);yield this._post(o);let s=u=>f=>{var d;let{id:g,response:m}=Zje(e,f);if(tqe(f),((d=m==null?void 0:m.payload.error)==null?void 0:d.message)==="User denied account access.")aL();else if(f.data.deviceShare){let{deviceShare:w}=f.data;qje(w,this.networkHash)}g&&m&&Array.isArray(e)&&a.includes(g)?(i.push(m),i.length===e.length&&(u(),r(i))):g&&m&&!Array.isArray(e)&&g===e.id&&(u(),r(m))},c=this.on(Ph.MAGIC_HANDLE_RESPONSE,s(()=>c()))}))})}on(t,e){let r=e.bind(window),n=i=>{i.data.msgType===`${t}-${this.parameters}`&&r(i)};return this.messageHandlers.add(n),()=>this.messageHandlers.delete(n)}waitForReady(){return new Promise(t=>{let e=this.on(Ph.MAGIC_OVERLAY_READY,()=>{this.isReadyForRequest=!0,t(),e()})})}listen(){this.on(Ph.MAGIC_HIDE_OVERLAY,()=>{this.hideOverlay()}),this.on(Ph.MAGIC_SHOW_OVERLAY,()=>{this.showOverlay()})}},nqe=Object.create,Zse=Object.defineProperty,iqe=Object.getOwnPropertyDescriptor,aqe=Object.getOwnPropertyNames,oqe=Object.getPrototypeOf,sqe=Object.prototype.hasOwnProperty,LE=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')}),ece=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),cqe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of aqe(e))!sqe.call(t,i)&&i!==r&&Zse(t,i,{get:()=>e[i],enumerable:!(n=iqe(e,i))||n.enumerable});return t},tce=(t,e,r)=>(r=t!=null?nqe(oqe(t)):{},cqe(e||!t||!t.__esModule?Zse(r,"default",{value:t,enumerable:!0}):r,t)),Bx=(t,e,r)=>new Promise((n,i)=>{var a=c=>{try{s(r.next(c))}catch(u){i(u)}},o=c=>{try{s(r.throw(c))}catch(u){i(u)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,o);s((r=r.apply(t,e)).next())}),uqe=ece((t,e)=>{(function(r){if(typeof t=="object"&&typeof e<"u")e.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=r()}})(function(){return function r(n,i,a){function o(u,f){if(!i[u]){if(!n[u]){var d=typeof LE=="function"&&LE;if(!f&&d)return d(u,!0);if(s)return s(u,!0);var g=new Error("Cannot find module '"+u+"'");throw g.code="MODULE_NOT_FOUND",g}var m=i[u]={exports:{}};n[u][0].call(m.exports,function(w){var v=n[u][1][w];return o(v||w)},m,m.exports,r,n,i,a)}return i[u].exports}for(var s=typeof LE=="function"&&LE,c=0;c<a.length;c++)o(a[c]);return o}({1:[function(r,n,i){(function(a){var o=a.MutationObserver||a.WebKitMutationObserver,s;if(o){var c=0,u=new o(w),f=a.document.createTextNode("");u.observe(f,{characterData:!0}),s=function(){f.data=c=++c%2}}else if(!a.setImmediate&&typeof a.MessageChannel<"u"){var d=new a.MessageChannel;d.port1.onmessage=w,s=function(){d.port2.postMessage(0)}}else"document"in a&&"onreadystatechange"in a.document.createElement("script")?s=function(){var y=a.document.createElement("script");y.onreadystatechange=function(){w(),y.onreadystatechange=null,y.parentNode.removeChild(y),y=null},a.document.documentElement.appendChild(y)}:s=function(){setTimeout(w,0)};var g,m=[];function w(){g=!0;for(var y,_,b=m.length;b;){for(_=m,m=[],y=-1;++y<b;)_[y]();b=m.length}g=!1}n.exports=v;function v(y){m.push(y)===1&&!g&&s()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,n,i){var a=r(1);function o(){}var s={},c=["REJECTED"],u=["FULFILLED"],f=["PENDING"];n.exports=d;function d(I){if(typeof I!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,I!==o&&v(this,I)}d.prototype.catch=function(I){return this.then(null,I)},d.prototype.then=function(I,E){if(typeof I!="function"&&this.state===u||typeof E!="function"&&this.state===c)return this;var p=new this.constructor(o);if(this.state!==f){var O=this.state===u?I:E;m(p,O,this.outcome)}else this.queue.push(new g(p,I,E));return p};function g(I,E,p){this.promise=I,typeof E=="function"&&(this.onFulfilled=E,this.callFulfilled=this.otherCallFulfilled),typeof p=="function"&&(this.onRejected=p,this.callRejected=this.otherCallRejected)}g.prototype.callFulfilled=function(I){s.resolve(this.promise,I)},g.prototype.otherCallFulfilled=function(I){m(this.promise,this.onFulfilled,I)},g.prototype.callRejected=function(I){s.reject(this.promise,I)},g.prototype.otherCallRejected=function(I){m(this.promise,this.onRejected,I)};function m(I,E,p){a(function(){var O;try{O=E(p)}catch(C){return s.reject(I,C)}O===I?s.reject(I,new TypeError("Cannot resolve promise with itself")):s.resolve(I,O)})}s.resolve=function(I,E){var p=y(w,E);if(p.status==="error")return s.reject(I,p.value);var O=p.value;if(O)v(I,O);else{I.state=u,I.outcome=E;for(var C=-1,M=I.queue.length;++C<M;)I.queue[C].callFulfilled(E)}return I},s.reject=function(I,E){I.state=c,I.outcome=E;for(var p=-1,O=I.queue.length;++p<O;)I.queue[p].callRejected(E);return I};function w(I){var E=I&&I.then;if(I&&(typeof I=="object"||typeof I=="function")&&typeof E=="function")return function(){E.apply(I,arguments)}}function v(I,E){var p=!1;function O(ce){p||(p=!0,s.reject(I,ce))}function C(ce){p||(p=!0,s.resolve(I,ce))}function M(){E(C,O)}var B=y(M);B.status==="error"&&O(B.value)}function y(I,E){var p={};try{p.value=I(E),p.status="success"}catch(O){p.status="error",p.value=O}return p}d.resolve=_;function _(I){return I instanceof this?I:s.resolve(new this(o),I)}d.reject=b;function b(I){var E=new this(o);return s.reject(E,I)}d.all=S;function S(I){var E=this;if(Object.prototype.toString.call(I)!=="[object Array]")return this.reject(new TypeError("must be an array"));var p=I.length,O=!1;if(!p)return this.resolve([]);for(var C=new Array(p),M=0,B=-1,ce=new this(o);++B<p;)he(I[B],B);return ce;function he(F,U){E.resolve(F).then(K,function(ne){O||(O=!0,s.reject(ce,ne))});function K(ne){C[U]=ne,++M===p&&!O&&(O=!0,s.resolve(ce,C))}}}d.race=x;function x(I){var E=this;if(Object.prototype.toString.call(I)!=="[object Array]")return this.reject(new TypeError("must be an array"));var p=I.length,O=!1;if(!p)return this.resolve([]);for(var C=-1,M=new this(o);++C<p;)B(I[C]);return M;function B(ce){E.resolve(ce).then(function(he){O||(O=!0,s.resolve(M,he))},function(he){O||(O=!0,s.reject(M,he))})}}},{1:1}],3:[function(r,n,i){(function(a){typeof a.Promise!="function"&&(a.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,n,i){var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X};function o(X,me){if(!(X instanceof me))throw new TypeError("Cannot call a class as a function")}function s(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var c=s();function u(){try{if(!c||!c.open)return!1;var X=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),me=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!X||me)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function f(X,me){X=X||[],me=me||{};try{return new Blob(X,me)}catch(Ie){if(Ie.name!=="TypeError")throw Ie;for(var re=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,Ee=new re,be=0;be<X.length;be+=1)Ee.append(X[be]);return Ee.getBlob(me.type)}}typeof Promise>"u"&&r(3);var d=Promise;function g(X,me){me&&X.then(function(re){me(null,re)},function(re){me(re)})}function m(X,me,re){typeof me=="function"&&X.then(me),typeof re=="function"&&X.catch(re)}function w(X){return typeof X!="string"&&(console.warn(X+" used as a key, but it is not a string."),X=String(X)),X}function v(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var y="local-forage-detect-blob-support",_=void 0,b={},S=Object.prototype.toString,x="readonly",I="readwrite";function E(X){for(var me=X.length,re=new ArrayBuffer(me),Ee=new Uint8Array(re),be=0;be<me;be++)Ee[be]=X.charCodeAt(be);return re}function p(X){return new d(function(me){var re=X.transaction(y,I),Ee=f([""]);re.objectStore(y).put(Ee,"key"),re.onabort=function(be){be.preventDefault(),be.stopPropagation(),me(!1)},re.oncomplete=function(){var be=navigator.userAgent.match(/Chrome\/(\d+)/),Ie=navigator.userAgent.match(/Edge\//);me(Ie||!be||parseInt(be[1],10)>=43)}}).catch(function(){return!1})}function O(X){return typeof _=="boolean"?d.resolve(_):p(X).then(function(me){return _=me,_})}function C(X){var me=b[X.name],re={};re.promise=new d(function(Ee,be){re.resolve=Ee,re.reject=be}),me.deferredOperations.push(re),me.dbReady?me.dbReady=me.dbReady.then(function(){return re.promise}):me.dbReady=re.promise}function M(X){var me=b[X.name],re=me.deferredOperations.pop();if(re)return re.resolve(),re.promise}function B(X,me){var re=b[X.name],Ee=re.deferredOperations.pop();if(Ee)return Ee.reject(me),Ee.promise}function ce(X,me){return new d(function(re,Ee){if(b[X.name]=b[X.name]||H(),X.db)if(me)C(X),X.db.close();else return re(X.db);var be=[X.name];me&&be.push(X.version);var Ie=c.open.apply(c,be);me&&(Ie.onupgradeneeded=function(Je){var ft=Ie.result;try{ft.createObjectStore(X.storeName),Je.oldVersion<=1&&ft.createObjectStore(y)}catch(Qe){if(Qe.name==="ConstraintError")console.warn('The database "'+X.name+'" has been upgraded from version '+Je.oldVersion+" to version "+Je.newVersion+', but the storage "'+X.storeName+'" already exists.');else throw Qe}}),Ie.onerror=function(Je){Je.preventDefault(),Ee(Ie.error)},Ie.onsuccess=function(){var Je=Ie.result;Je.onversionchange=function(ft){ft.target.close()},re(Je),M(X)}})}function he(X){return ce(X,!1)}function F(X){return ce(X,!0)}function U(X,me){if(!X.db)return!0;var re=!X.db.objectStoreNames.contains(X.storeName),Ee=X.version<X.db.version,be=X.version>X.db.version;if(Ee&&(X.version!==me&&console.warn('The database "'+X.name+`" can't be downgraded from version `+X.db.version+" to version "+X.version+"."),X.version=X.db.version),be||re){if(re){var Ie=X.db.version+1;Ie>X.version&&(X.version=Ie)}return!0}return!1}function K(X){return new d(function(me,re){var Ee=new FileReader;Ee.onerror=re,Ee.onloadend=function(be){var Ie=btoa(be.target.result||"");me({__local_forage_encoded_blob:!0,data:Ie,type:X.type})},Ee.readAsBinaryString(X)})}function ne(X){var me=E(atob(X.data));return f([me],{type:X.type})}function j(X){return X&&X.__local_forage_encoded_blob}function q(X){var me=this,re=me._initReady().then(function(){var Ee=b[me._dbInfo.name];if(Ee&&Ee.dbReady)return Ee.dbReady});return m(re,X,X),re}function V(X){C(X);for(var me=b[X.name],re=me.forages,Ee=0;Ee<re.length;Ee++){var be=re[Ee];be._dbInfo.db&&(be._dbInfo.db.close(),be._dbInfo.db=null)}return X.db=null,he(X).then(function(Ie){return X.db=Ie,U(X)?F(X):Ie}).then(function(Ie){X.db=me.db=Ie;for(var Je=0;Je<re.length;Je++)re[Je]._dbInfo.db=Ie}).catch(function(Ie){throw B(X,Ie),Ie})}function $(X,me,re,Ee){Ee===void 0&&(Ee=1);try{var be=X.db.transaction(X.storeName,me);re(null,be)}catch(Ie){if(Ee>0&&(!X.db||Ie.name==="InvalidStateError"||Ie.name==="NotFoundError"))return d.resolve().then(function(){if(!X.db||Ie.name==="NotFoundError"&&!X.db.objectStoreNames.contains(X.storeName)&&X.version<=X.db.version)return X.db&&(X.version=X.db.version+1),F(X)}).then(function(){return V(X).then(function(){$(X,me,re,Ee-1)})}).catch(re);re(Ie)}}function H(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function L(X){var me=this,re={db:null};if(X)for(var Ee in X)re[Ee]=X[Ee];var be=b[re.name];be||(be=H(),b[re.name]=be),be.forages.push(me),me._initReady||(me._initReady=me.ready,me.ready=q);var Ie=[];function Je(){return d.resolve()}for(var ft=0;ft<be.forages.length;ft++){var Qe=be.forages[ft];Qe!==me&&Ie.push(Qe._initReady().catch(Je))}var We=be.forages.slice(0);return d.all(Ie).then(function(){return re.db=be.db,he(re)}).then(function(ht){return re.db=ht,U(re,me._defaultConfig.version)?F(re):ht}).then(function(ht){re.db=be.db=ht,me._dbInfo=re;for(var zt=0;zt<We.length;zt++){var Rr=We[zt];Rr!==me&&(Rr._dbInfo.db=re.db,Rr._dbInfo.version=re.version)}})}function k(X,me){var re=this;X=w(X);var Ee=new d(function(be,Ie){re.ready().then(function(){$(re._dbInfo,x,function(Je,ft){if(Je)return Ie(Je);try{var Qe=ft.objectStore(re._dbInfo.storeName),We=Qe.get(X);We.onsuccess=function(){var ht=We.result;ht===void 0&&(ht=null),j(ht)&&(ht=ne(ht)),be(ht)},We.onerror=function(){Ie(We.error)}}catch(ht){Ie(ht)}})}).catch(Ie)});return g(Ee,me),Ee}function G(X,me){var re=this,Ee=new d(function(be,Ie){re.ready().then(function(){$(re._dbInfo,x,function(Je,ft){if(Je)return Ie(Je);try{var Qe=ft.objectStore(re._dbInfo.storeName),We=Qe.openCursor(),ht=1;We.onsuccess=function(){var zt=We.result;if(zt){var Rr=zt.value;j(Rr)&&(Rr=ne(Rr));var Wr=X(Rr,zt.key,ht++);Wr!==void 0?be(Wr):zt.continue()}else be()},We.onerror=function(){Ie(We.error)}}catch(zt){Ie(zt)}})}).catch(Ie)});return g(Ee,me),Ee}function ge(X,me,re){var Ee=this;X=w(X);var be=new d(function(Ie,Je){var ft;Ee.ready().then(function(){return ft=Ee._dbInfo,S.call(me)==="[object Blob]"?O(ft.db).then(function(Qe){return Qe?me:K(me)}):me}).then(function(Qe){$(Ee._dbInfo,I,function(We,ht){if(We)return Je(We);try{var zt=ht.objectStore(Ee._dbInfo.storeName);Qe===null&&(Qe=void 0);var Rr=zt.put(Qe,X);ht.oncomplete=function(){Qe===void 0&&(Qe=null),Ie(Qe)},ht.onabort=ht.onerror=function(){var Wr=Rr.error?Rr.error:Rr.transaction.error;Je(Wr)}}catch(Wr){Je(Wr)}})}).catch(Je)});return g(be,re),be}function Q(X,me){var re=this;X=w(X);var Ee=new d(function(be,Ie){re.ready().then(function(){$(re._dbInfo,I,function(Je,ft){if(Je)return Ie(Je);try{var Qe=ft.objectStore(re._dbInfo.storeName),We=Qe.delete(X);ft.oncomplete=function(){be()},ft.onerror=function(){Ie(We.error)},ft.onabort=function(){var ht=We.error?We.error:We.transaction.error;Ie(ht)}}catch(ht){Ie(ht)}})}).catch(Ie)});return g(Ee,me),Ee}function te(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){$(me._dbInfo,I,function(Ie,Je){if(Ie)return be(Ie);try{var ft=Je.objectStore(me._dbInfo.storeName),Qe=ft.clear();Je.oncomplete=function(){Ee()},Je.onabort=Je.onerror=function(){var We=Qe.error?Qe.error:Qe.transaction.error;be(We)}}catch(We){be(We)}})}).catch(be)});return g(re,X),re}function ue(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){$(me._dbInfo,x,function(Ie,Je){if(Ie)return be(Ie);try{var ft=Je.objectStore(me._dbInfo.storeName),Qe=ft.count();Qe.onsuccess=function(){Ee(Qe.result)},Qe.onerror=function(){be(Qe.error)}}catch(We){be(We)}})}).catch(be)});return g(re,X),re}function T(X,me){var re=this,Ee=new d(function(be,Ie){if(X<0){be(null);return}re.ready().then(function(){$(re._dbInfo,x,function(Je,ft){if(Je)return Ie(Je);try{var Qe=ft.objectStore(re._dbInfo.storeName),We=!1,ht=Qe.openKeyCursor();ht.onsuccess=function(){var zt=ht.result;if(!zt){be(null);return}X===0||We?be(zt.key):(We=!0,zt.advance(X))},ht.onerror=function(){Ie(ht.error)}}catch(zt){Ie(zt)}})}).catch(Ie)});return g(Ee,me),Ee}function fe(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){$(me._dbInfo,x,function(Ie,Je){if(Ie)return be(Ie);try{var ft=Je.objectStore(me._dbInfo.storeName),Qe=ft.openKeyCursor(),We=[];Qe.onsuccess=function(){var ht=Qe.result;if(!ht){Ee(We);return}We.push(ht.key),ht.continue()},Qe.onerror=function(){be(Qe.error)}}catch(ht){be(ht)}})}).catch(be)});return g(re,X),re}function Ge(X,me){me=v.apply(this,arguments);var re=this.config();X=typeof X!="function"&&X||{},X.name||(X.name=X.name||re.name,X.storeName=X.storeName||re.storeName);var Ee=this,be;if(!X.name)be=d.reject("Invalid arguments");else{var Ie=X.name===re.name&&Ee._dbInfo.db,Je=Ie?d.resolve(Ee._dbInfo.db):he(X).then(function(ft){var Qe=b[X.name],We=Qe.forages;Qe.db=ft;for(var ht=0;ht<We.length;ht++)We[ht]._dbInfo.db=ft;return ft});X.storeName?be=Je.then(function(ft){if(ft.objectStoreNames.contains(X.storeName)){var Qe=ft.version+1;C(X);var We=b[X.name],ht=We.forages;ft.close();for(var zt=0;zt<ht.length;zt++){var Rr=ht[zt];Rr._dbInfo.db=null,Rr._dbInfo.version=Qe}var Wr=new d(function(jr,_n){var qr=c.open(X.name,Qe);qr.onerror=function(P){var D=qr.result;D.close(),_n(P)},qr.onupgradeneeded=function(){var P=qr.result;P.deleteObjectStore(X.storeName)},qr.onsuccess=function(){var P=qr.result;P.close(),jr(P)}});return Wr.then(function(jr){We.db=jr;for(var _n=0;_n<ht.length;_n++){var qr=ht[_n];qr._dbInfo.db=jr,M(qr._dbInfo)}}).catch(function(jr){throw(B(X,jr)||d.resolve()).catch(function(){}),jr})}}):be=Je.then(function(ft){C(X);var Qe=b[X.name],We=Qe.forages;ft.close();for(var ht=0;ht<We.length;ht++){var zt=We[ht];zt._dbInfo.db=null}var Rr=new d(function(Wr,jr){var _n=c.deleteDatabase(X.name);_n.onerror=function(){var qr=_n.result;qr&&qr.close(),jr(_n.error)},_n.onblocked=function(){console.warn('dropInstance blocked for database "'+X.name+'" until all open connections are closed')},_n.onsuccess=function(){var qr=_n.result;qr&&qr.close(),Wr(qr)}});return Rr.then(function(Wr){Qe.db=Wr;for(var jr=0;jr<We.length;jr++){var _n=We[jr];M(_n._dbInfo)}}).catch(function(Wr){throw(B(X,Wr)||d.resolve()).catch(function(){}),Wr})})}return g(be,me),be}var tt={_driver:"asyncStorage",_initStorage:L,_support:u(),iterate:G,getItem:k,setItem:ge,removeItem:Q,clear:te,length:ue,key:T,keys:fe,dropInstance:Ge};function mt(){return typeof openDatabase=="function"}var vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gt="~~local_forage_type~",Lt=/^~~local_forage_type~([^~]+)~/,Yt="__lfsc__:",_r=Yt.length,Rt="arbf",Pt="blob",kt="si08",Nt="ui08",Kt="uic8",Ut="si16",Vt="si32",$t="ur16",Dt="ui32",qt="fl32",Mt="fl64",cr=_r+Rt.length,tr=Object.prototype.toString;function ir(X){var me=X.length*.75,re=X.length,Ee,be=0,Ie,Je,ft,Qe;X[X.length-1]==="="&&(me--,X[X.length-2]==="="&&me--);var We=new ArrayBuffer(me),ht=new Uint8Array(We);for(Ee=0;Ee<re;Ee+=4)Ie=vt.indexOf(X[Ee]),Je=vt.indexOf(X[Ee+1]),ft=vt.indexOf(X[Ee+2]),Qe=vt.indexOf(X[Ee+3]),ht[be++]=Ie<<2|Je>>4,ht[be++]=(Je&15)<<4|ft>>2,ht[be++]=(ft&3)<<6|Qe&63;return We}function nr(X){var me=new Uint8Array(X),re="",Ee;for(Ee=0;Ee<me.length;Ee+=3)re+=vt[me[Ee]>>2],re+=vt[(me[Ee]&3)<<4|me[Ee+1]>>4],re+=vt[(me[Ee+1]&15)<<2|me[Ee+2]>>6],re+=vt[me[Ee+2]&63];return me.length%3===2?re=re.substring(0,re.length-1)+"=":me.length%3===1&&(re=re.substring(0,re.length-2)+"=="),re}function vr(X,me){var re="";if(X&&(re=tr.call(X)),X&&(re==="[object ArrayBuffer]"||X.buffer&&tr.call(X.buffer)==="[object ArrayBuffer]")){var Ee,be=Yt;X instanceof ArrayBuffer?(Ee=X,be+=Rt):(Ee=X.buffer,re==="[object Int8Array]"?be+=kt:re==="[object Uint8Array]"?be+=Nt:re==="[object Uint8ClampedArray]"?be+=Kt:re==="[object Int16Array]"?be+=Ut:re==="[object Uint16Array]"?be+=$t:re==="[object Int32Array]"?be+=Vt:re==="[object Uint32Array]"?be+=Dt:re==="[object Float32Array]"?be+=qt:re==="[object Float64Array]"?be+=Mt:me(new Error("Failed to get type for BinaryArray"))),me(be+nr(Ee))}else if(re==="[object Blob]"){var Ie=new FileReader;Ie.onload=function(){var Je=gt+X.type+"~"+nr(this.result);me(Yt+Pt+Je)},Ie.readAsArrayBuffer(X)}else try{me(JSON.stringify(X))}catch(Je){console.error("Couldn't convert value into a JSON string: ",X),me(null,Je)}}function wn(X){if(X.substring(0,_r)!==Yt)return JSON.parse(X);var me=X.substring(cr),re=X.substring(_r,cr),Ee;if(re===Pt&&Lt.test(me)){var be=me.match(Lt);Ee=be[1],me=me.substring(be[0].length)}var Ie=ir(me);switch(re){case Rt:return Ie;case Pt:return f([Ie],{type:Ee});case kt:return new Int8Array(Ie);case Nt:return new Uint8Array(Ie);case Kt:return new Uint8ClampedArray(Ie);case Ut:return new Int16Array(Ie);case $t:return new Uint16Array(Ie);case Vt:return new Int32Array(Ie);case Dt:return new Uint32Array(Ie);case qt:return new Float32Array(Ie);case Mt:return new Float64Array(Ie);default:throw new Error("Unkown type: "+re)}}var Yr={serialize:vr,deserialize:wn,stringToBuffer:ir,bufferToString:nr};function ai(X,me,re,Ee){X.executeSql("CREATE TABLE IF NOT EXISTS "+me.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],re,Ee)}function Dn(X){var me=this,re={db:null};if(X)for(var Ee in X)re[Ee]=typeof X[Ee]!="string"?X[Ee].toString():X[Ee];var be=new d(function(Ie,Je){try{re.db=openDatabase(re.name,String(re.version),re.description,re.size)}catch(ft){return Je(ft)}re.db.transaction(function(ft){ai(ft,re,function(){me._dbInfo=re,Ie()},function(Qe,We){Je(We)})},Je)});return re.serializer=Yr,be}function $n(X,me,re,Ee,be,Ie){X.executeSql(re,Ee,be,function(Je,ft){ft.code===ft.SYNTAX_ERR?Je.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[me.storeName],function(Qe,We){We.rows.length?Ie(Qe,ft):ai(Qe,me,function(){Qe.executeSql(re,Ee,be,Ie)},Ie)},Ie):Ie(Je,ft)},Ie)}function Kn(X,me){var re=this;X=w(X);var Ee=new d(function(be,Ie){re.ready().then(function(){var Je=re._dbInfo;Je.db.transaction(function(ft){$n(ft,Je,"SELECT * FROM "+Je.storeName+" WHERE key = ? LIMIT 1",[X],function(Qe,We){var ht=We.rows.length?We.rows.item(0).value:null;ht&&(ht=Je.serializer.deserialize(ht)),be(ht)},function(Qe,We){Ie(We)})})}).catch(Ie)});return g(Ee,me),Ee}function Ar(X,me){var re=this,Ee=new d(function(be,Ie){re.ready().then(function(){var Je=re._dbInfo;Je.db.transaction(function(ft){$n(ft,Je,"SELECT * FROM "+Je.storeName,[],function(Qe,We){for(var ht=We.rows,zt=ht.length,Rr=0;Rr<zt;Rr++){var Wr=ht.item(Rr),jr=Wr.value;if(jr&&(jr=Je.serializer.deserialize(jr)),jr=X(jr,Wr.key,Rr+1),jr!==void 0){be(jr);return}}be()},function(Qe,We){Ie(We)})})}).catch(Ie)});return g(Ee,me),Ee}function Mr(X,me,re,Ee){var be=this;X=w(X);var Ie=new d(function(Je,ft){be.ready().then(function(){me===void 0&&(me=null);var Qe=me,We=be._dbInfo;We.serializer.serialize(me,function(ht,zt){zt?ft(zt):We.db.transaction(function(Rr){$n(Rr,We,"INSERT OR REPLACE INTO "+We.storeName+" (key, value) VALUES (?, ?)",[X,ht],function(){Je(Qe)},function(Wr,jr){ft(jr)})},function(Rr){if(Rr.code===Rr.QUOTA_ERR){if(Ee>0){Je(Mr.apply(be,[X,Qe,re,Ee-1]));return}ft(Rr)}})})}).catch(ft)});return g(Ie,re),Ie}function Er(X,me,re){return Mr.apply(this,[X,me,re,1])}function _e(X,me){var re=this;X=w(X);var Ee=new d(function(be,Ie){re.ready().then(function(){var Je=re._dbInfo;Je.db.transaction(function(ft){$n(ft,Je,"DELETE FROM "+Je.storeName+" WHERE key = ?",[X],function(){be()},function(Qe,We){Ie(We)})})}).catch(Ie)});return g(Ee,me),Ee}function ee(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){var Ie=me._dbInfo;Ie.db.transaction(function(Je){$n(Je,Ie,"DELETE FROM "+Ie.storeName,[],function(){Ee()},function(ft,Qe){be(Qe)})})}).catch(be)});return g(re,X),re}function ve(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){var Ie=me._dbInfo;Ie.db.transaction(function(Je){$n(Je,Ie,"SELECT COUNT(key) as c FROM "+Ie.storeName,[],function(ft,Qe){var We=Qe.rows.item(0).c;Ee(We)},function(ft,Qe){be(Qe)})})}).catch(be)});return g(re,X),re}function Re(X,me){var re=this,Ee=new d(function(be,Ie){re.ready().then(function(){var Je=re._dbInfo;Je.db.transaction(function(ft){$n(ft,Je,"SELECT key FROM "+Je.storeName+" WHERE id = ? LIMIT 1",[X+1],function(Qe,We){var ht=We.rows.length?We.rows.item(0).key:null;be(ht)},function(Qe,We){Ie(We)})})}).catch(Ie)});return g(Ee,me),Ee}function ze(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){var Ie=me._dbInfo;Ie.db.transaction(function(Je){$n(Je,Ie,"SELECT key FROM "+Ie.storeName,[],function(ft,Qe){for(var We=[],ht=0;ht<Qe.rows.length;ht++)We.push(Qe.rows.item(ht).key);Ee(We)},function(ft,Qe){be(Qe)})})}).catch(be)});return g(re,X),re}function Xe(X){return new d(function(me,re){X.transaction(function(Ee){Ee.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(be,Ie){for(var Je=[],ft=0;ft<Ie.rows.length;ft++)Je.push(Ie.rows.item(ft).name);me({db:X,storeNames:Je})},function(be,Ie){re(Ie)})},function(Ee){re(Ee)})})}function st(X,me){me=v.apply(this,arguments);var re=this.config();X=typeof X!="function"&&X||{},X.name||(X.name=X.name||re.name,X.storeName=X.storeName||re.storeName);var Ee=this,be;return X.name?be=new d(function(Ie){var Je;X.name===re.name?Je=Ee._dbInfo.db:Je=openDatabase(X.name,"","",0),X.storeName?Ie({db:Je,storeNames:[X.storeName]}):Ie(Xe(Je))}).then(function(Ie){return new d(function(Je,ft){Ie.db.transaction(function(Qe){function We(Wr){return new d(function(jr,_n){Qe.executeSql("DROP TABLE IF EXISTS "+Wr,[],function(){jr()},function(qr,P){_n(P)})})}for(var ht=[],zt=0,Rr=Ie.storeNames.length;zt<Rr;zt++)ht.push(We(Ie.storeNames[zt]));d.all(ht).then(function(){Je()}).catch(function(Wr){ft(Wr)})},function(Qe){ft(Qe)})})}):be=d.reject("Invalid arguments"),g(be,me),be}var lt={_driver:"webSQLStorage",_initStorage:Dn,_support:mt(),iterate:Ar,getItem:Kn,setItem:Er,removeItem:_e,clear:ee,length:ve,key:Re,keys:ze,dropInstance:st};function _t(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function le(X,me){var re=X.name+"/";return X.storeName!==me.storeName&&(re+=X.storeName+"/"),re}function Z(){var X="_localforage_support_test";try{return localStorage.setItem(X,!0),localStorage.removeItem(X),!1}catch{return!0}}function ye(){return!Z()||localStorage.length>0}function Me(X){var me=this,re={};if(X)for(var Ee in X)re[Ee]=X[Ee];return re.keyPrefix=le(X,me._defaultConfig),ye()?(me._dbInfo=re,re.serializer=Yr,d.resolve()):d.reject()}function Le(X){var me=this,re=me.ready().then(function(){for(var Ee=me._dbInfo.keyPrefix,be=localStorage.length-1;be>=0;be--){var Ie=localStorage.key(be);Ie.indexOf(Ee)===0&&localStorage.removeItem(Ie)}});return g(re,X),re}function wt(X,me){var re=this;X=w(X);var Ee=re.ready().then(function(){var be=re._dbInfo,Ie=localStorage.getItem(be.keyPrefix+X);return Ie&&(Ie=be.serializer.deserialize(Ie)),Ie});return g(Ee,me),Ee}function It(X,me){var re=this,Ee=re.ready().then(function(){for(var be=re._dbInfo,Ie=be.keyPrefix,Je=Ie.length,ft=localStorage.length,Qe=1,We=0;We<ft;We++){var ht=localStorage.key(We);if(ht.indexOf(Ie)===0){var zt=localStorage.getItem(ht);if(zt&&(zt=be.serializer.deserialize(zt)),zt=X(zt,ht.substring(Je),Qe++),zt!==void 0)return zt}}});return g(Ee,me),Ee}function gr(X,me){var re=this,Ee=re.ready().then(function(){var be=re._dbInfo,Ie;try{Ie=localStorage.key(X)}catch{Ie=null}return Ie&&(Ie=Ie.substring(be.keyPrefix.length)),Ie});return g(Ee,me),Ee}function lr(X){var me=this,re=me.ready().then(function(){for(var Ee=me._dbInfo,be=localStorage.length,Ie=[],Je=0;Je<be;Je++){var ft=localStorage.key(Je);ft.indexOf(Ee.keyPrefix)===0&&Ie.push(ft.substring(Ee.keyPrefix.length))}return Ie});return g(re,X),re}function en(X){var me=this,re=me.keys().then(function(Ee){return Ee.length});return g(re,X),re}function yr(X,me){var re=this;X=w(X);var Ee=re.ready().then(function(){var be=re._dbInfo;localStorage.removeItem(be.keyPrefix+X)});return g(Ee,me),Ee}function xr(X,me,re){var Ee=this;X=w(X);var be=Ee.ready().then(function(){me===void 0&&(me=null);var Ie=me;return new d(function(Je,ft){var Qe=Ee._dbInfo;Qe.serializer.serialize(me,function(We,ht){if(ht)ft(ht);else try{localStorage.setItem(Qe.keyPrefix+X,We),Je(Ie)}catch(zt){(zt.name==="QuotaExceededError"||zt.name==="NS_ERROR_DOM_QUOTA_REACHED")&&ft(zt),ft(zt)}})})});return g(be,re),be}function on(X,me){if(me=v.apply(this,arguments),X=typeof X!="function"&&X||{},!X.name){var re=this.config();X.name=X.name||re.name,X.storeName=X.storeName||re.storeName}var Ee=this,be;return X.name?be=new d(function(Ie){X.storeName?Ie(le(X,Ee._defaultConfig)):Ie(X.name+"/")}).then(function(Ie){for(var Je=localStorage.length-1;Je>=0;Je--){var ft=localStorage.key(Je);ft.indexOf(Ie)===0&&localStorage.removeItem(ft)}}):be=d.reject("Invalid arguments"),g(be,me),be}var sr={_driver:"localStorageWrapper",_initStorage:Me,_support:_t(),iterate:It,getItem:wt,setItem:xr,removeItem:yr,clear:Le,length:en,key:gr,keys:lr,dropInstance:on},Ur=function(X,me){return X===me||typeof X=="number"&&typeof me=="number"&&isNaN(X)&&isNaN(me)},gn=function(X,me){for(var re=X.length,Ee=0;Ee<re;){if(Ur(X[Ee],me))return!0;Ee++}return!1},Br=Array.isArray||function(X){return Object.prototype.toString.call(X)==="[object Array]"},Zn={},Ii={},ei={INDEXEDDB:tt,WEBSQL:lt,LOCALSTORAGE:sr},Oi=[ei.INDEXEDDB._driver,ei.WEBSQL._driver,ei.LOCALSTORAGE._driver],Pi=["dropInstance"],oi=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Pi),jn={description:"",driver:Oi.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ra(X,me){X[me]=function(){var re=arguments;return X.ready().then(function(){return X[me].apply(X,re)})}}function $i(){for(var X=1;X<arguments.length;X++){var me=arguments[X];if(me)for(var re in me)me.hasOwnProperty(re)&&(Br(me[re])?arguments[0][re]=me[re].slice():arguments[0][re]=me[re])}return arguments[0]}var _a=function(){function X(me){o(this,X);for(var re in ei)if(ei.hasOwnProperty(re)){var Ee=ei[re],be=Ee._driver;this[re]=be,Zn[be]||this.defineDriver(Ee)}this._defaultConfig=$i({},jn),this._config=$i({},this._defaultConfig,me),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return X.prototype.config=function(me){if((typeof me>"u"?"undefined":a(me))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var re in me){if(re==="storeName"&&(me[re]=me[re].replace(/\W/g,"_")),re==="version"&&typeof me[re]!="number")return new Error("Database version must be a number.");this._config[re]=me[re]}return"driver"in me&&me.driver?this.setDriver(this._config.driver):!0}else return typeof me=="string"?this._config[me]:this._config},X.prototype.defineDriver=function(me,re,Ee){var be=new d(function(Ie,Je){try{var ft=me._driver,Qe=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!me._driver){Je(Qe);return}for(var We=oi.concat("_initStorage"),ht=0,zt=We.length;ht<zt;ht++){var Rr=We[ht],Wr=!gn(Pi,Rr);if((Wr||me[Rr])&&typeof me[Rr]!="function"){Je(Qe);return}}var jr=function(){for(var qr=function(pe){return function(){var Se=new Error("Method "+pe+" is not implemented by the current driver"),Ce=d.reject(Se);return g(Ce,arguments[arguments.length-1]),Ce}},P=0,D=Pi.length;P<D;P++){var W=Pi[P];me[W]||(me[W]=qr(W))}};jr();var _n=function(qr){Zn[ft]&&console.info("Redefining LocalForage driver: "+ft),Zn[ft]=me,Ii[ft]=qr,Ie()};"_support"in me?me._support&&typeof me._support=="function"?me._support().then(_n,Je):_n(!!me._support):_n(!0)}catch(qr){Je(qr)}});return m(be,re,Ee),be},X.prototype.driver=function(){return this._driver||null},X.prototype.getDriver=function(me,re,Ee){var be=Zn[me]?d.resolve(Zn[me]):d.reject(new Error("Driver not found."));return m(be,re,Ee),be},X.prototype.getSerializer=function(me){var re=d.resolve(Yr);return m(re,me),re},X.prototype.ready=function(me){var re=this,Ee=re._driverSet.then(function(){return re._ready===null&&(re._ready=re._initDriver()),re._ready});return m(Ee,me,me),Ee},X.prototype.setDriver=function(me,re,Ee){var be=this;Br(me)||(me=[me]);var Ie=this._getSupportedDrivers(me);function Je(){be._config.driver=be.driver()}function ft(ht){return be._extend(ht),Je(),be._ready=be._initStorage(be._config),be._ready}function Qe(ht){return function(){var zt=0;function Rr(){for(;zt<ht.length;){var Wr=ht[zt];return zt++,be._dbInfo=null,be._ready=null,be.getDriver(Wr).then(ft).catch(Rr)}Je();var jr=new Error("No available storage method found.");return be._driverSet=d.reject(jr),be._driverSet}return Rr()}}var We=this._driverSet!==null?this._driverSet.catch(function(){return d.resolve()}):d.resolve();return this._driverSet=We.then(function(){var ht=Ie[0];return be._dbInfo=null,be._ready=null,be.getDriver(ht).then(function(zt){be._driver=zt._driver,Je(),be._wrapLibraryMethodsWithReady(),be._initDriver=Qe(Ie)})}).catch(function(){Je();var ht=new Error("No available storage method found.");return be._driverSet=d.reject(ht),be._driverSet}),m(this._driverSet,re,Ee),this._driverSet},X.prototype.supports=function(me){return!!Ii[me]},X.prototype._extend=function(me){$i(this,me)},X.prototype._getSupportedDrivers=function(me){for(var re=[],Ee=0,be=me.length;Ee<be;Ee++){var Ie=me[Ee];this.supports(Ie)&&re.push(Ie)}return re},X.prototype._wrapLibraryMethodsWithReady=function(){for(var me=0,re=oi.length;me<re;me++)ra(this,oi[me])},X.prototype.createInstance=function(me){return new X(me)},X}(),ss=new _a;n.exports=ss},{3:3}]},{},[4])(4)})}),lqe=ece((t,e)=>{(function(r,n){typeof t=="object"&&typeof e<"u"?n(t):typeof define=="function"&&define.amd?define("localforage-driver-memory",["exports"],n):n(r.LocalforageDriverMemory={})})(typeof self<"u"?self:t,function(r){var n="localforage-driver-memory";function i(j){var q=typeof Symbol=="function"&&j[Symbol.iterator],V=0;return q?q.call(j):{next:function(){return j&&V>=j.length&&(j=void 0),{value:j&&j[V++],done:!j}}}}function a(j,q){j=j||[],q=q||{};try{return new Blob(j,q)}catch(L){if(L.name!=="TypeError")throw L;for(var V=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,$=new V,H=0;H<j.length;H+=1)$.append(j[H]);return $.getBlob(q.type)}}var o=/^~~local_forage_type~([^~]+)~/,s=9,c=s+4,u=Object.prototype.toString;function f(j){var q=j.length*.75,V=j.length;j[j.length-1]==="="&&(q--,j[j.length-2]==="="&&q--);for(var $=new ArrayBuffer(q),H=new Uint8Array($),L=0,k=0;L<V;L+=4){var G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(j[L]),ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(j[L+1]),Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(j[L+2]),te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(j[L+3]);H[k++]=G<<2|ge>>4,H[k++]=(ge&15)<<4|Q>>2,H[k++]=(Q&3)<<6|te&63}return $}function d(j){for(var q=new Uint8Array(j),V="",$=0;$<q.length;$+=3)V+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[q[$]>>2],V+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(q[$]&3)<<4|q[$+1]>>4],V+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(q[$+1]&15)<<2|q[$+2]>>6],V+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[q[$+2]&63];return q.length%3===2?V=V.substring(0,V.length-1)+"=":q.length%3===1&&(V=V.substring(0,V.length-2)+"=="),V}function g(j,q){var V="";if(j&&(V=u.call(j)),j&&(V==="[object ArrayBuffer]"||j.buffer&&u.call(j.buffer)==="[object ArrayBuffer]")){var $=void 0,H="__lfsc__:";j instanceof ArrayBuffer?($=j,H+="arbf"):($=j.buffer,V==="[object Int8Array]"?H+="si08":V==="[object Uint8Array]"?H+="ui08":V==="[object Uint8ClampedArray]"?H+="uic8":V==="[object Int16Array]"?H+="si16":V==="[object Uint16Array]"?H+="ur16":V==="[object Int32Array]"?H+="si32":V==="[object Uint32Array]"?H+="ui32":V==="[object Float32Array]"?H+="fl32":V==="[object Float64Array]"?H+="fl64":q(new Error("Failed to get type for BinaryArray"))),q(H+d($))}else if(V==="[object Blob]"){var L=new FileReader;L.onload=function(){var k="~~local_forage_type~"+j.type+"~"+d(this.result);q("__lfsc__:blob"+k)},L.readAsArrayBuffer(j)}else try{q(JSON.stringify(j))}catch(k){console.error("Couldn't convert value into a JSON string: ",j),q(null,k)}}function m(j){if(j.substring(0,s)!=="__lfsc__:")return JSON.parse(j);var q=j.substring(c),V=j.substring(s,c),$;if(V==="blob"&&o.test(q)){var H=q.match(o);$=H[1],q=q.substring(H[0].length)}var L=f(q);switch(V){case"arbf":return L;case"blob":return a([L],{type:$});case"si08":return new Int8Array(L);case"ui08":return new Uint8Array(L);case"uic8":return new Uint8ClampedArray(L);case"si16":return new Int16Array(L);case"ur16":return new Uint16Array(L);case"si32":return new Int32Array(L);case"ui32":return new Uint32Array(L);case"fl32":return new Float32Array(L);case"fl64":return new Float64Array(L);default:throw new Error("Unkown type: "+V)}}function w(j){var q,V;if(j===null||typeof j!="object"||"isActiveClone"in j)return j;var $=j instanceof Date?new Date(j):j.constructor();try{for(var H=i(Object.keys(j)),L=H.next();!L.done;L=H.next()){var k=L.value;Object.prototype.hasOwnProperty.call(j,k)&&(j.isActiveClone=null,$[k]=w(j[k]),delete j.isActiveClone)}}catch(G){q={error:G}}finally{try{L&&!L.done&&(V=H.return)&&V.call(H)}finally{if(q)throw q.error}}return $}function v(j,q){return(j.name||q.name)+"/"+(j.storeName||q.storeName)+"/"}function y(j,q){q&&j.then(function(V){q(null,V)},function(V){q(V)})}function _(){for(var j=[],q=0;q<arguments.length;q++)j[q]=arguments[q];if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}function b(j,q){var V=this;if(q=_.apply(this,arguments),j=typeof j!="function"&&j||{},!j.name){var $=this.config();j.name=j.name||$.name,j.storeName=j.storeName||$.storeName}var H;return j.name?H=new Promise(function(L){j.storeName?L(v(j,V._defaultConfig)):L(j.name+"/")}):H=Promise.reject("Invalid arguments"),{promise:H,callback:q}}function S(j){return typeof j!="string"&&(console.warn(j+" used as a key, but it is not a string."),j=String(j)),j}var x={bufferToString:d,deserialize:m,serialize:g,stringToBuffer:f},I={},E=function(){function j(q){this.kp=q,this.data={}}return j.resolve=function(q){return I[q]||(I[q]=new j(q)),I[q]},j.prototype.clear=function(){this.data={}},j.prototype.drop=function(){this.clear(),delete I[this.kp]},j.prototype.get=function(q){return this.data[q]},j.prototype.key=function(q){return this.keys()[q]},j.prototype.keys=function(){return Object.keys(this.data)},j.prototype.rm=function(q){delete this.data[q]},j.prototype.set=function(q,V){this.data[q]=V},j}();function p(j){var q=j?w(j):{},V=v(q,this._defaultConfig),$=E.resolve(V);return this._dbInfo=q,this._dbInfo.serializer=x,this._dbInfo.keyPrefix=V,this._dbInfo.mStore=$,Promise.resolve()}function O(j){var q=this,V=this.ready().then(function(){q._dbInfo.mStore.clear()});return y(V,j),V}function C(j,q){var V=b.apply(this,arguments),$=V.promise,H=V.callback,L=$.then(function(k){E.resolve(k).drop()});return y(L,H),$}function M(j,q){var V=this;j=S(j);var $=this.ready().then(function(){var H=V._dbInfo.mStore.get(j);return H==null?null:V._dbInfo.serializer.deserialize(H)});return y($,q),$}function B(j,q){var V=this,$=this.ready().then(function(){for(var H=V._dbInfo.mStore,L=H.keys(),k=0;k<L.length;k++){var G=H.get(L[k]);if(G&&(G=V._dbInfo.serializer.deserialize(G)),G=j(G,L[k],k+1),G!==void 0)return G}});return y($,q),$}function ce(j,q){var V=this,$=this.ready().then(function(){var H;try{H=V._dbInfo.mStore.key(j),H===void 0&&(H=null)}catch{H=null}return H});return y($,q),$}function he(j){var q=this,V=this.ready().then(function(){return q._dbInfo.mStore.keys()});return y(V,j),V}function F(j){var q=this.keys().then(function(V){return V.length});return y(q,j),q}function U(j,q){var V=this;j=S(j);var $=this.ready().then(function(){V._dbInfo.mStore.rm(j)});return y($,q),$}function K(j,q,V){var $=this;j=S(j);var H=this.ready().then(function(){q===void 0&&(q=null);var L=q;return new Promise(function(k,G){$._dbInfo.serializer.serialize(q,function(ge,Q){if(Q)G(Q);else try{$._dbInfo.mStore.set(j,ge),k(L)}catch(te){G(te)}})})});return y(H,V),H}var ne=!0;r._support=ne,r._driver=n,r._initStorage=p,r.clear=O,r.dropInstance=C,r.getItem=M,r.iterate=B,r.key=ce,r.keys=he,r.length=F,r.removeItem=U,r.setItem=K,Object.defineProperty(r,"__esModule",{value:!0})})}),KN=tce(uqe()),QY=tce(lqe()),fqe={display:"none",position:"fixed",top:"0",right:"0",width:"100%",height:"100%",borderRadius:"0",border:"none",zIndex:"2147483647"};function dqe(t){for(let[e,r]of Object.entries(fqe))t.style[e]=r}function hqe(t){return!![].slice.call(document.querySelectorAll(".magic-iframe")).find(r=>r.src.includes(t))}var pqe=class extends rqe{constructor(){super(...arguments),this.activeElement=null}init(){this.test="hello",this.iframe=new Promise(t=>{let e=()=>{if(hqe(encodeURIComponent(this.parameters)))yje().log();else{let r=document.createElement("iframe");r.classList.add("magic-iframe"),r.dataset.magicIframeLabel=c2(this.endpoint).host,r.title="Secure Modal",r.src=c2(`/send?params=${encodeURIComponent(this.parameters)}`,this.endpoint).href,dqe(r),document.body.appendChild(r),t(r)}};["loaded","interactive","complete"].includes(document.readyState)?e():window.addEventListener("load",e,!1)}),window.addEventListener("message",t=>{var e;if(t.origin===this.endpoint&&t.data&&t.data.msgType&&this.messageHandlers.size){t.data.response=(e=t.data.response)!=null?e:{};for(let r of this.messageHandlers.values())r(t)}})}showOverlay(){return Bx(this,null,function*(){let t=yield this.iframe;t.style.display="block",this.activeElement=document.activeElement,t.focus()})}hideOverlay(){return Bx(this,null,function*(){var t;let e=yield this.iframe;e.style.display="none",(t=this.activeElement)!=null&&t.focus&&this.activeElement.focus(),this.activeElement=null})}_post(t){return Bx(this,null,function*(){let e=yield this.iframe;if(e&&e.contentWindow)e.contentWindow.postMessage(t,this.endpoint);else throw kse()})}},gqe=uje(Xse,{platform:"web",sdkName:"magic-sdk",version:"21.4.1",defaultEndpoint:"https://auth.magic.link/",ViewController:pqe,configureStorage:()=>Bx(void 0,null,function*(){let t=KN.default.createInstance({name:"MagicAuthLocalStorageDB",storeName:"MagicAuthLocalStorage"});return yield t.defineDriver(QY),yield t.setDriver([KN.default.INDEXEDDB,KN.default.LOCALSTORAGE,QY._driver]),t})});const oL=Object.freeze(Object.defineProperty({__proto__:null,DeepLinkPage:Ase,DeviceVerificationEventEmit:a2,DeviceVerificationEventOnReceived:Pse,EthChainType:Tse,Events:Zb,Extension:rp,ExtensionError:Xk,ExtensionWarning:D4,LoginWithEmailOTPEventEmit:J0,LoginWithEmailOTPEventOnReceived:Ose,LoginWithMagicLinkEventEmit:Sse,LoginWithMagicLinkEventOnReceived:Ise,Magic:gqe,MagicIncomingWindowMessage:Ph,MagicOutgoingWindowMessage:U1,MagicPayloadMethod:br,RPCError:F1,RPCErrorCode:AI,RecoveryMethodType:Rse,SDKError:Cd,SDKErrorCode:Rd,SDKWarning:Ww,SDKWarningCode:ym,Wallets:xs,isPromiEvent:qse},Symbol.toStringTag,{value:"Module"})),yqe=lo(oL);var rce={exports:{}},YN={exports:{}},JY;function nce(){return JY||(JY=1,function(t,e){(function(r,n){t.exports=n()})(Ne,function(){var r=r||function(n,i){var a=Object.create||function(){function y(){}return function(_){var b;return y.prototype=_,b=new y,y.prototype=null,b}}(),o={},s=o.lib={},c=s.Base=function(){return{extend:function(y){var _=a(this);return y&&_.mixIn(y),(!_.hasOwnProperty("init")||this.init===_.init)&&(_.init=function(){_.$super.init.apply(this,arguments)}),_.init.prototype=_,_.$super=this,_},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var _ in y)y.hasOwnProperty(_)&&(this[_]=y[_]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=s.WordArray=c.extend({init:function(y,_){y=this.words=y||[],_!=i?this.sigBytes=_:this.sigBytes=y.length*4},toString:function(y){return(y||d).stringify(this)},concat:function(y){var _=this.words,b=y.words,S=this.sigBytes,x=y.sigBytes;if(this.clamp(),S%4)for(var I=0;I<x;I++){var E=b[I>>>2]>>>24-I%4*8&255;_[S+I>>>2]|=E<<24-(S+I)%4*8}else for(var I=0;I<x;I+=4)_[S+I>>>2]=b[I>>>2];return this.sigBytes+=x,this},clamp:function(){var y=this.words,_=this.sigBytes;y[_>>>2]&=4294967295<<32-_%4*8,y.length=n.ceil(_/4)},clone:function(){var y=c.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var _=[],b=function(p){var p=p,O=987654321,C=4294967295;return function(){O=36969*(O&65535)+(O>>16)&C,p=18e3*(p&65535)+(p>>16)&C;var M=(O<<16)+p&C;return M/=4294967296,M+=.5,M*(n.random()>.5?1:-1)}},S=0,x;S<y;S+=4){var I=b((x||n.random())*4294967296);x=I()*987654071,_.push(I()*4294967296|0)}return new u.init(_,y)}}),f=o.enc={},d=f.Hex={stringify:function(y){for(var _=y.words,b=y.sigBytes,S=[],x=0;x<b;x++){var I=_[x>>>2]>>>24-x%4*8&255;S.push((I>>>4).toString(16)),S.push((I&15).toString(16))}return S.join("")},parse:function(y){for(var _=y.length,b=[],S=0;S<_;S+=2)b[S>>>3]|=parseInt(y.substr(S,2),16)<<24-S%8*4;return new u.init(b,_/2)}},g=f.Latin1={stringify:function(y){for(var _=y.words,b=y.sigBytes,S=[],x=0;x<b;x++){var I=_[x>>>2]>>>24-x%4*8&255;S.push(String.fromCharCode(I))}return S.join("")},parse:function(y){for(var _=y.length,b=[],S=0;S<_;S++)b[S>>>2]|=(y.charCodeAt(S)&255)<<24-S%4*8;return new u.init(b,_)}},m=f.Utf8={stringify:function(y){try{return decodeURIComponent(escape(g.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return g.parse(unescape(encodeURIComponent(y)))}},w=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=m.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var _=this._data,b=_.words,S=_.sigBytes,x=this.blockSize,I=x*4,E=S/I;y?E=n.ceil(E):E=n.max((E|0)-this._minBufferSize,0);var p=E*x,O=n.min(p*4,S);if(p){for(var C=0;C<p;C+=x)this._doProcessBlock(b,C);var M=b.splice(0,p);_.sigBytes-=O}return new u.init(M,O)},clone:function(){var y=c.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});s.Hasher=w.extend({cfg:c.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){w.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var _=this._doFinalize();return _},blockSize:16,_createHelper:function(y){return function(_,b){return new y.init(b).finalize(_)}},_createHmacHelper:function(y){return function(_,b){return new v.HMAC.init(y,b).finalize(_)}}});var v=o.algo={};return o}(Math);return r})}(YN)),YN.exports}(function(t,e){(function(r,n){t.exports=n(nce())})(Ne,function(r){return function(n){var i=r,a=i.lib,o=a.WordArray,s=a.Hasher,c=i.algo,u=[],f=[];(function(){function m(_){for(var b=n.sqrt(_),S=2;S<=b;S++)if(!(_%S))return!1;return!0}function w(_){return(_-(_|0))*4294967296|0}for(var v=2,y=0;y<64;)m(v)&&(y<8&&(u[y]=w(n.pow(v,1/2))),f[y]=w(n.pow(v,1/3)),y++),v++})();var d=[],g=c.SHA256=s.extend({_doReset:function(){this._hash=new o.init(u.slice(0))},_doProcessBlock:function(m,w){for(var v=this._hash.words,y=v[0],_=v[1],b=v[2],S=v[3],x=v[4],I=v[5],E=v[6],p=v[7],O=0;O<64;O++){if(O<16)d[O]=m[w+O]|0;else{var C=d[O-15],M=(C<<25|C>>>7)^(C<<14|C>>>18)^C>>>3,B=d[O-2],ce=(B<<15|B>>>17)^(B<<13|B>>>19)^B>>>10;d[O]=M+d[O-7]+ce+d[O-16]}var he=x&I^~x&E,F=y&_^y&b^_&b,U=(y<<30|y>>>2)^(y<<19|y>>>13)^(y<<10|y>>>22),K=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),ne=p+K+he+f[O]+d[O],j=U+F;p=E,E=I,I=x,x=S+ne|0,S=b,b=_,_=y,y=ne+j|0}v[0]=v[0]+y|0,v[1]=v[1]+_|0,v[2]=v[2]+b|0,v[3]=v[3]+S|0,v[4]=v[4]+x|0,v[5]=v[5]+I|0,v[6]=v[6]+E|0,v[7]=v[7]+p|0},_doFinalize:function(){var m=this._data,w=m.words,v=this._nDataBytes*8,y=m.sigBytes*8;return w[y>>>5]|=128<<24-y%32,w[(y+64>>>9<<4)+14]=n.floor(v/4294967296),w[(y+64>>>9<<4)+15]=v,m.sigBytes=w.length*4,this._process(),this._hash},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});i.SHA256=s._createHelper(g),i.HmacSHA256=s._createHmacHelper(g)}(Math),r.SHA256})})(rce);var mqe=rce.exports;const vqe=kc(mqe);var ice={exports:{}};(function(t,e){(function(r,n){t.exports=n(nce())})(Ne,function(r){return function(){var n=r,i=n.lib,a=i.WordArray,o=n.enc;o.Base64={stringify:function(c){var u=c.words,f=c.sigBytes,d=this._map;c.clamp();for(var g=[],m=0;m<f;m+=3)for(var w=u[m>>>2]>>>24-m%4*8&255,v=u[m+1>>>2]>>>24-(m+1)%4*8&255,y=u[m+2>>>2]>>>24-(m+2)%4*8&255,_=w<<16|v<<8|y,b=0;b<4&&m+b*.75<f;b++)g.push(d.charAt(_>>>6*(3-b)&63));var S=d.charAt(64);if(S)for(;g.length%4;)g.push(S);return g.join("")},parse:function(c){var u=c.length,f=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var g=0;g<f.length;g++)d[f.charCodeAt(g)]=g}var m=f.charAt(64);if(m){var w=c.indexOf(m);w!==-1&&(u=w)}return s(c,u,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(c,u,f){for(var d=[],g=0,m=0;m<u;m++)if(m%4){var w=f[c.charCodeAt(m-1)]<<m%4*2,v=f[c.charCodeAt(m)]>>>6-m%4*2;d[g>>>2]|=(w|v)<<24-g%4*8,g++}return a.create(d,g)}}(),r.enc.Base64})})(ice);var bqe=ice.exports;const wqe=kc(bqe);var Kw=(t,e,r)=>new Promise((n,i)=>{var a=c=>{try{s(r.next(c))}catch(u){i(u)}},o=c=>{try{s(r.throw(c))}catch(u){i(u)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,o);s((r=r.apply(t,e)).next())}),ace=(t=>(t.ParseRedirectResult="magic_oauth_parse_redirect_result",t))(ace||{}),oce=(t=>(t.InvalidRequest="invalid_request",t.InvalidClient="invalid_client",t.InvalidScope="invalid_scope",t.InvalidGrant="invalid_grant",t.UnauthorizedClient="unauthorized_client",t.UnsupportedResponseType="unsupported_response_type",t.UnsupportedGrantType="unsupported_grant_type",t.UnsupportedTokenType="unsupported_token_type",t.AccessDenied="access_denied",t.ServerError="server_error",t.TemporarilyUnavailable="temporarily_unavailable",t))(oce||{}),XY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",sce=typeof window<"u"&&!!window.crypto,_qe=sce&&!!window.crypto.subtle;function Eqe(t){return Array.from(t).map(e=>XY[e%XY.length]).join("")}function ZY(t){let e=r=>r.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"");if(t instanceof ArrayBuffer){let r=new Uint8Array(t),n=Array.from(r).map(a=>String.fromCharCode(a)).join(""),i=btoa(n);return e(i)}return e(wqe.stringify(t))}function xqe(t){return Kw(this,null,function*(){if(_qe){let e=new TextEncoder().encode(t);return crypto.subtle.digest("SHA-256",e).then(ZY)}return ZY(vqe(t))})}function eQ(t){let e=new Uint8Array(t);if(sce)window.crypto.getRandomValues(e);else for(let r=0;r<t;r+=1)e[r]=Math.floor(Math.random()*Math.floor(255));return Eqe(e)}function Aqe(){return Kw(this,null,function*(){let t=eQ(128),e=eQ(128),r=yield xqe(e);return{verifier:e,challenge:r,state:t}})}var Sqe=class extends rp.Internal{constructor(){super(...arguments),this.name="oauth",this.config={},this.compat={"magic-sdk":">=2.4.6","@magic-sdk/react-native":!1,"@magic-sdk/react-native-bare":!1,"@magic-sdk/react-native-expo":!1}}loginWithRedirect(t){return this.utils.createPromiEvent(e=>Kw(this,null,function*(){let{provider:r,query:n}=yield Iqe.call(this,t);window.location.href=new URL(`/v1/oauth2/${r}/start?${n}`,this.sdk.endpoint).href,e()}))}getRedirectResult(){let t=window.location.search,e=window.location.origin+window.location.pathname;return window.history.replaceState(null,"",e),Oqe.call(this,t)}},u2="oauth_redirect_metadata";function Iqe(t){return Kw(this,null,function*(){yield this.utils.storage.removeItem(u2);let{provider:e,redirectURI:r,scope:n,loginHint:i}=t,{verifier:a,challenge:o,state:s}=yield Aqe(),c=JSON.stringify({verifier:a,state:s});return yield this.utils.storage.setItem(u2,c),{query:[`magic_api_key=${encodeURIComponent(this.sdk.apiKey)}`,`magic_challenge=${encodeURIComponent(o)}`,`state=${encodeURIComponent(s)}`,`platform=${encodeURIComponent("web")}`,n&&`scope=${encodeURIComponent(n.join(" "))}`,r&&`redirect_uri=${encodeURIComponent(r)}`,i&&`login_hint=${encodeURIComponent(i)}`].reduce((u,f)=>f?`${u}&${f}`:u),provider:e,redirectURI:r}})}function Oqe(t){return this.utils.createPromiEvent((e,r)=>Kw(this,null,function*(){var n;let i=yield this.utils.storage.getItem(u2),{verifier:a,state:o}=JSON.parse(i);this.utils.storage.removeItem(u2);let s=this.utils.createJsonRpcRequestPayload("magic_oauth_parse_redirect_result",[t,a,o]),c=yield this.request(s),u=c,f=c;f.error&&r(this.createError(f.error,(n=f.error_description)!=null?n:"An error occurred.",{errorURI:f.error_uri,provider:f.provider})),e(u)}))}const sL=Object.freeze(Object.defineProperty({__proto__:null,OAuthErrorCode:oce,OAuthExtension:Sqe,OAuthPayloadMethods:ace},Symbol.toStringTag,{value:"Module"})),Pqe=lo(sL);var Tqe=Ne&&Ne.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Rqe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),tQ=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Tqe(e,t,r);return Rqe(e,t),e};Object.defineProperty(xI,"__esModule",{value:!0});xI.MagicConnector=void 0;const rQ=Ll,nQ=Vs,Cqe=JS;class Nqe extends Cqe.AbstractConnector{constructor(e){super({supportedChainIds:nQ.getConfiguration()[rQ.ProviderType.MAGIC].chains}),this.activate=async()=>{var r;if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const i=await this.getProvider(),a=await i.request({method:"eth_accounts"});return this.account=(r=a[0])!==null&&r!==void 0?r:null,{provider:i,chainId:this.chainId,account:this.account}},this.getProvider=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const r=await this.magic.wallet.getProvider();return Object.assign(Object.assign({},r),{request:new Proxy(r.request,{apply:async(n,i,a)=>{var o,s,c;if(((o=a[0])===null||o===void 0?void 0:o.method)==="wallet_switchEthereumChain")try{const u=parseInt((c=(s=a[0])===null||s===void 0?void 0:s.params[0])===null||c===void 0?void 0:c.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(u)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(u),this.emitUpdate({chainId:u}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return n.bind(r)(...a)}})})},this.getChainId=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId},this.getAccount=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account},this.deactivate=()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");this.magic.user.logout(),this.emitDeactivate()},this.buildMagicInstance=async r=>{const{Magic:n}=await Promise.resolve().then(()=>tQ(yqe)),{OAuthExtension:i}=await Promise.resolve().then(()=>tQ(Pqe)),a=nQ.getConfiguration()[rQ.ProviderType.MAGIC];return new n(a.apiKey,{extensions:[new i],network:{rpcUrl:a.urls[r],chainId:r}})},this.chainId=e,this.account=null}}xI.MagicConnector=Nqe;(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a),Object.defineProperty(n,o,{enumerable:!0,get:function(){return i[a]}})}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(JS,t),r(ZS,t),r(cI,t),r(uI,t),r(lI,t),r(fI,t),r(xI,t)})(dk);var cce={},Yw={};Object.defineProperty(Yw,"__esModule",{value:!0});Yw.Storage=void 0;class Dqe{}Yw.Storage=Dqe;var PI={};Object.defineProperty(PI,"__esModule",{value:!0});PI.LocalStorage=void 0;const $qe=Yw;class Mqe extends $qe.Storage{get(e){const r=window.localStorage.getItem(e);return r===null?void 0:r}set(e,r){window.localStorage.setItem(e,r)}remove(e){window.localStorage.removeItem(e)}removeRegExp(e){for(let r=localStorage.length-1;r>=0;r--){const n=localStorage.key(r);n&&e.test(n)&&localStorage.removeItem(n)}}}PI.LocalStorage=Mqe;(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a),Object.defineProperty(n,o,{enumerable:!0,get:function(){return i[a]}})}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(Yw,t),r(PI,t)})(cce);var TI={};Object.defineProperty(TI,"__esModule",{value:!0});TI.ProviderAdapter=void 0;class cL{constructor(e){this.provider=e,this.id=0,this.on=(r,n)=>this.provider.on(r,n),this.emit=(r,...n)=>this.provider.emit(r,n),this.removeListener=(r,n)=>this.provider.removeListener(r,n),this.request=async({method:r,params:n})=>this.isModernProvider()?this.provider.request({method:r,params:n}):this.send(r,n),this.sendAsync=async(r,n)=>this.hasSendAsync()?this.provider.sendAsync(r,(i,a)=>{a&&!a.hasOwnProperty("result")?n(i,{id:0,jsonrpc:"2.0",result:a}):n(i,a)}):this.send(r,n)}static adapt(e){const r=new cL(e);return Object.assign(Object.assign({},e),{on:r.on,emit:r.emit,removeListener:r.removeListener,request:r.request,sendAsync:r.sendAsync,send:r.send.bind(r)})}async send(e,r){let n,i,a;const o=typeof r=="function";if(o){const s=e;i=s.params||[],n=s.method,a=r}else n=e,i=r||[],a=(s,c)=>{if(s)throw s;return c};if(this.isModernProvider()){const[s,c]=await this.provider.request({method:n,params:i}).then(f=>[null,f]).catch(f=>[f,void 0]);return a(s,o?{id:"",jsonrpc:"2.0",result:c}:c)}else{this.patchOldMobile();const[s,c]=o?await new Promise(u=>this.provider.send(e,(f,d)=>{u([f,d])})):await new Promise(u=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:n,params:i},(f,d)=>{u([d&&d.hasOwnProperty("error")?d.error:f,d&&d.hasOwnProperty("result")?d.result:d])}));return a(s,c)}}isModernProvider(){return typeof this.provider.request=="function"}hasSendAsync(){return typeof this.provider.sendAsync=="function"}patchOldMobile(){this.provider&&!this.provider.isDapper&&!this.provider.isFortmatic&&!this.provider.isMetamask&&this.hasSendAsync()&&this.provider.send!==this.provider.sendAsync&&(this.provider.send=this.provider.sendAsync)}}TI.ProviderAdapter=cL;Object.defineProperty(My,"__esModule",{value:!0});My.connection=My.ConnectionManager=void 0;const iQ=as(),Go=Ic,UE=U5e,hf=dk,kqe=cce,QN=Vs,aQ=TI;class uce{constructor(e){this.storage=e,this.getWalletName=()=>{if(this.connector instanceof hf.WalletConnectV2Connector)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:r}=QN.getConfiguration();this.storage.remove(r),hf.WalletConnectV2Connector.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=()=>{this.connector&&(this.connector.removeListener(UE.ConnectorEvent.Deactivate,this.handleWeb3ReactDeactivate),this.connector.removeAllListeners(UE.ConnectorEvent.Update)),this.disconnect().catch(console.error)}}async connect(e,r=iQ.ChainId.ETHEREUM_MAINNET){this.connector=this.buildConnector(e,r),this.connector.on(UE.ConnectorEvent.Deactivate,this.handleWeb3ReactDeactivate),e===Go.ProviderType.MAGIC&&this.connector.on(UE.ConnectorEvent.Update,({chainId:a})=>{a&&this.setConnectionData(e,a)});const{provider:n,account:i}=await this.connector.activate();return this.setConnectionData(e,r),{provider:aQ.ProviderAdapter.adapt(n),providerType:e,account:i||"",chainId:r}}async tryPreviousConnection(){const e=this.getConnectionData();if(!e)throw new Error("Could not find a valid provider. Make sure to call the `connect` method first");const r=await this.connect(e.providerType,e.chainId);if(r.providerType===Go.ProviderType.INJECTED){const n=await r.provider.request({method:"eth_chainId"}),i=n?parseInt(n,16):null;i&&e.chainId!==i&&this.setConnectionData(e.providerType,i)}return Object.assign(Object.assign({},r),{chainId:this.getConnectionData().chainId})}getAvailableProviders(){const e=[Go.ProviderType.FORTMATIC,Go.ProviderType.WALLET_CONNECT,Go.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?e.unshift(Go.ProviderType.INJECTED):e.unshift(Go.ProviderType.METAMASK_MOBILE),e}async disconnect(){this.connector&&(this.connector.deactivate(),this.isClosableConnector()&&await this.connector.close()),this.clearConnectionData(),this.connector=void 0}async getProvider(){if(!this.connector)throw new Error("No valid connector found. Please .connect() first");return this.connector.getProvider()}async createProvider(e,r=iQ.ChainId.ETHEREUM_MAINNET){const i=await this.buildConnector(e,r).getProvider();return aQ.ProviderAdapter.adapt(i)}buildConnector(e,r){switch(e){case Go.ProviderType.INJECTED:return new hf.InjectedConnector(r);case Go.ProviderType.FORTMATIC:return new hf.FortmaticConnector(r);case Go.ProviderType.MAGIC:return new hf.MagicConnector(r);case Go.ProviderType.WALLET_LINK:return new hf.WalletLinkConnector(r);case Go.ProviderType.NETWORK:return new hf.NetworkConnector(r);case Go.ProviderType.WALLET_CONNECT_V2:return new hf.WalletConnectV2Connector(r);default:throw new Error(`Invalid provider ${e}`)}}getConnectionData(){const{storageKey:e}=QN.getConfiguration(),r=this.storage.get(e);return r?JSON.parse(r):void 0}setConnectionData(e,r){const{storageKey:n}=QN.getConfiguration(),i=JSON.stringify({providerType:e,chainId:r});this.storage.set(n,i)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}My.ConnectionManager=uce;My.connection=new uce(new kqe.LocalStorage);var lce={};Object.defineProperty(lce,"__esModule",{value:!0});(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a),Object.defineProperty(n,o,{enumerable:!0,get:function(){return i[a]}})}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(My,t),r(dk,t),r(Vs,t),r(lce,t)})(dd);const Lqe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/ManDefault-cb03f4f3.webp",Uqe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/Platform-dfc6309e.webp";function ro(){return window.analytics}const uL=()=>{Be.useEffect(()=>{const t=ro();t&&t.page()},[])};var Oc=(t=>(t.LOGIN_CLICK="Click Login Button",t.LOGIN_SUCCESS="Login Success",t.LOGIN_ERROR="Login Error",t.CLICK="Click Button",t))(Oc||{}),X0=(t=>(t.LEARN_MORE="Learn More",t.DENY_SIGN_IN="Deny Sign In",t.DENY_WALLET_INTERACTION="Deny Wallet Interaction",t.APPROVE_SING_IN="Approve Sign In",t.APPROVE_WALLET_INTERACTION="Approve Wallet Interaction",t))(X0||{}),M4=(t=>(t.WEB3="web3",t.WEB2="web2",t.GUEST="guest",t))(M4||{});const Bqe="https://auth-api.decentraland.zone",Fqe="FQqbzV2KeUKe2RPOeFkedKRPkJAFsU9r",jqe="https://peer.decentraland.zone",qqe="https://feature-flags.decentraland.org",Hqe="60000",Vqe={AUTH_SERVER_URL:Bqe,SEGMENT_API_KEY:Fqe,PEER_URL:jqe,FEATURE_FLAGS_URL:qqe,FEATURE_FLAGS_INTERVAL:Hqe},zqe="https://auth-api.decentraland.org",Gqe="FQqbzV2KeUKe2RPOeFkedKRPkJAFsU9r",Wqe="https://peer.decentraland.org",Kqe="https://feature-flags.decentraland.org",Yqe="60000",Qqe={AUTH_SERVER_URL:zqe,SEGMENT_API_KEY:Gqe,PEER_URL:Wqe,FEATURE_FLAGS_URL:Kqe,FEATURE_FLAGS_INTERVAL:Yqe},Jqe="https://auth-api.decentraland.today",Xqe="FQqbzV2KeUKe2RPOeFkedKRPkJAFsU9r",Zqe="https://peer.decentraland.org",eHe="https://feature-flags.decentraland.org",tHe="60000",rHe={AUTH_SERVER_URL:Jqe,SEGMENT_API_KEY:Xqe,PEER_URL:Zqe,FEATURE_FLAGS_URL:eHe,FEATURE_FLAGS_INTERVAL:tHe},j1=Y0.createConfig({[Y0.Env.DEVELOPMENT]:Vqe,[Y0.Env.STAGING]:rHe,[Y0.Env.PRODUCTION]:Qqe},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:{}.VITE_REACT_APP_DCL_DEFAULT_ENV??"dev"}});async function lL(t){const e=j1.get("PEER_URL"),r=await fetch(`${e}/lambdas/profiles/${t}`);return r.ok?await r.json():null}function Sb(t){return t!=null&&typeof t=="object"&&"message"in t}function nHe(t){return t!=null&&typeof t=="object"&&"error"in t&&t.error!==void 0&&t.error!==null&&typeof t.error=="object"&&"message"in t.error&&"code"in t.error}const iHe="_background_s9giu_1",aHe="_emptyProfile_s9giu_11",oHe="_main_s9giu_27",sHe="_left_s9giu_38",cHe="_right_s9giu_49",uHe="_wearablePlatform_s9giu_64",lHe="_changeAccount_s9giu_70",fHe="_errorLogo_s9giu_83",dHe="_logo_s9giu_92",hHe="_title_s9giu_98",pHe="_description_s9giu_105",gHe="_code_s9giu_112",yHe="_buttons_s9giu_119",mHe="_closeWindow_s9giu_129",vHe="_errorMessage_s9giu_135",bHe="_noButton_s9giu_145",wHe="_yesButton_s9giu_147",_He="_wearableDefaultImg_s9giu_164",EHe="_loading_s9giu_176",xHe="_discordBtn_s9giu_180",AHe="_discordInfo_s9giu_193",pr={background:iHe,emptyProfile:aHe,main:oHe,left:sHe,right:cHe,wearablePlatform:uHe,changeAccount:lHe,errorLogo:fHe,logo:dHe,title:hHe,description:pHe,code:gHe,buttons:yHe,closeWindow:mHe,errorMessage:vHe,noButton:bHe,yesButton:wHe,wearableDefaultImg:_He,loading:EHe,discordBtn:xHe,discordInfo:AHe},SHe=()=>{uL();const t=eme(),e=B2(),r=Be.useRef(),[n,i]=Be.useState(2),[a,o]=Be.useState(!1),[s,c]=Be.useState(),u=Be.useRef(),[f,d]=Be.useState(),g=Be.useRef(),m=Be.useRef(),w=t.requestId??"",[v,y]=Be.useState(!1),_=Be.useCallback(()=>{e(`/login?redirectTo=/auth/requests/${w}&fromRequests=true`)},[]);Be.useEffect(()=>((async()=>{try{const C=await dd.connection.tryPreviousConnection();r.current=new Ete(C.provider)}catch{_();return}try{const M=await(await r.current.getSigner()).getAddress();ro().identify({ethAddress:M});const B=await E0("recover",{requestId:w});u.current=B;const ce=await lL(M);if(c(ce),m.current=M,y(!0),B.sender&&B.sender!==M.toLowerCase()){i(1);return}g.current=setTimeout(()=>{i(0)},new Date(B.expiration).getTime()-Date.now()),B.method==="dcl_personal_sign"?i(4):i(8)}catch(C){d(Sb(C)?C.message:"Unknown error"),i(3)}})(),()=>{clearTimeout(g.current)}),[]),Be.useEffect(()=>{n!==4&&n!==8&&clearTimeout(g.current)},[n]);const b=Be.useCallback(async()=>{var C;o(!0),ro().track(Oc.CLICK,{action:X0.DENY_SIGN_IN});try{const M=await((C=r.current)==null?void 0:C.getSigner());M&&await E0("outcome",{requestId:w,sender:await M.getAddress(),error:{code:-32003,message:"Transaction rejected"}})}finally{o(!1),i(5)}},[]),S=Be.useCallback(C=>{m.current&&C.profile===m.current&&y(!1)},[]),x=Be.useCallback(async()=>{ro().track(Oc.CLICK,{action:X0.APPROVE_SING_IN}),o(!0);const C=r.current;try{if(!C)throw new Error("Provider not created");const M=await C.getSigner(),B=await M.signMessage(u.current.params[0]),ce=await E0("outcome",{requestId:w,sender:await M.getAddress(),result:B});if(ce.error)throw new Error(ce.error);i(7)}catch(M){d(Sb(M)?M.message:"Unknown error"),i(6)}finally{o(!1)}},[o]),I=Be.useCallback(()=>{ro().track(Oc.CLICK,{action:X0.DENY_WALLET_INTERACTION}),i(9)},[]),E=Be.useCallback(async()=>{var M;o(!0);const C=r.current;try{if(!C)throw new Error("Provider not created");const B=await C.getSigner(),ce=await C.send(u.current.method,u.current.params);ro().track(Oc.CLICK,{action:X0.APPROVE_WALLET_INTERACTION,method:u.current.method});const he=await E0("outcome",{requestId:w,sender:await B.getAddress(),result:ce});if(he.error)throw new Error(he.error);i(11)}catch(B){console.error("Wallet error",JSON.stringify(B));const ce=await((M=r.current)==null?void 0:M.getSigner());ce&&(nHe(B)?await E0("outcome",{requestId:w,sender:await ce.getAddress(),error:B.error}):await E0("outcome",{requestId:w,sender:await ce.getAddress(),error:{code:999,message:Sb(B)?B.message:"Unknown error"}})),d(Sb(B)?B.message:"Unknown error"),i(10)}},[]),p=Be.useCallback(async C=>{C.preventDefault(),await dd.connection.disconnect(),_()},[]),O=Be.useCallback(C=>Fe.jsxs("div",{children:[Fe.jsx("div",{className:`${pr.background} ${(!m||s===null)&&n!==2?pr.emptyProfile:""}`}),Fe.jsxs("div",{className:pr.main,children:[Fe.jsxs("div",{className:pr.left,children:[C.children,C.canChangeAccount?Fe.jsxs("div",{className:pr.changeAccount,children:["Use another profile?"," ",Fe.jsx("a",{href:"/auth/login",onClick:p,children:"Return to log in"})]}):null]}),Fe.jsx("div",{className:`${pr.right} ${v?pr.loading:""}`,children:m.current&&s!==null?Fe.jsxs(Fe.Fragment,{children:[Fe.jsx("img",{src:Lqe,alt:"Avatar",className:pr.wearableDefaultImg}),Fe.jsx(gae,{lockBeta:!0,panning:!1,disableBackground:!0,profile:m.current,dev:!1,onUpdate:S}),Fe.jsx("img",{src:Uqe,alt:"platform",className:pr.wearablePlatform})]}):null}),Fe.jsxs("a",{className:pr.discordBtn,href:"https://decentraland.org/discord",target:"about:blank",children:[Fe.jsx(qb,{name:"discord"}),Fe.jsxs("p",{className:pr.discordInfo,children:[Fe.jsx("span",{children:"Need guidance?"}),Fe.jsx("span",{children:"ASK THE COMMUNITY"})]})]})]})]}),[v,n]);return n===0?Fe.jsxs(O,{children:[Fe.jsx("div",{className:pr.errorLogo}),Fe.jsx("div",{className:pr.title,children:"Looks like you took too long and the request has expired"}),Fe.jsx("div",{className:pr.description,children:"Please return to Decentraland's Desktop App to try again."}),Fe.jsx(sh,{})]}):n===1?Fe.jsxs(O,{canChangeAccount:!0,children:[Fe.jsx("div",{className:pr.errorLogo}),Fe.jsx("div",{className:pr.title,children:"Looks like you are connected with a different account."}),Fe.jsx("div",{className:pr.description,children:"Please change your wallet account to the one connected to the Desktop App."})]}):n===2?Fe.jsx(O,{children:Fe.jsx("div",{className:pr.left,children:Fe.jsx($S,{active:!0,size:"huge"})})}):n===3?Fe.jsxs(O,{children:[Fe.jsx("div",{className:pr.errorLogo}),Fe.jsx("div",{className:pr.title,children:"There was an error recovering the request..."}),Fe.jsx("div",{className:pr.description,children:"The request is not available anymore. Feel free to create a new one and try again."}),Fe.jsx(sh,{}),Fe.jsx("div",{className:pr.errorMessage,children:f})]}):n===4&&u.current?Fe.jsxs(O,{canChangeAccount:!0,isLoading:a,children:[Fe.jsx("div",{className:pr.logo}),Fe.jsx("div",{className:pr.title,children:"Verify Sign In"}),Fe.jsx("div",{className:pr.description,children:"Do you see the same verification number on your Desktop App?"}),Fe.jsx("div",{className:pr.code,children:u.current.code}),Fe.jsxs("div",{className:pr.buttons,children:[Fe.jsxs(Tc.Button,{inverted:!0,disabled:a,onClick:b,className:pr.noButton,children:[Fe.jsx(qb,{name:"times circle"}),"No, it doesn't"]}),Fe.jsxs(Tc.Button,{inverted:!0,loading:a,disabled:a,onClick:x,className:pr.yesButton,children:[Fe.jsx(qb,{name:"check circle"}),"Yes, they are the same"]})]})]}):n===5?Fe.jsxs(O,{canChangeAccount:!0,children:[Fe.jsx("div",{className:pr.errorLogo}),Fe.jsx("div",{className:pr.title,children:"Did the number not match, or was this action not taken by you?"}),Fe.jsx("div",{className:pr.description,children:"If you're trying to sign in, retry the action. If this action was not initiated by you, dismiss this message."}),Fe.jsx(sh,{})]}):n===7?Fe.jsxs(O,{children:[Fe.jsx("div",{className:pr.logo}),Fe.jsx("div",{className:pr.title,children:"Your account is ready!"}),Fe.jsx("div",{className:pr.description,children:"Return to the Desktop App and enjoy Decentraland."}),Fe.jsx(sh,{})]}):n===8&&u.current?Fe.jsxs(O,{canChangeAccount:!0,isLoading:a,children:[Fe.jsx("div",{className:pr.logo}),Fe.jsx("div",{className:pr.title,children:"The Desktop App wants to interact with your wallet."}),Fe.jsx("div",{className:pr.description,children:"Review the following data carefully on your wallet before approving it."}),Fe.jsxs("div",{className:pr.buttons,children:[Fe.jsx(Tc.Button,{inverted:!0,disabled:a,onClick:I,children:"Deny"}),Fe.jsx(Tc.Button,{primary:!0,disabled:a,loading:a,onClick:E,children:"Allow"})]})]}):n===9?Fe.jsxs(O,{children:[Fe.jsx("div",{className:pr.errorLogo}),Fe.jsx("div",{className:pr.title,children:"Was this action not initiated by you?"}),Fe.jsx("div",{className:pr.description,children:"If this action was not initiated by you, dismiss this message."}),Fe.jsx(sh,{})]}):n===11?Fe.jsxs(O,{children:[Fe.jsx("div",{className:pr.logo}),Fe.jsx("div",{className:pr.title,children:"Wallet interaction complete"}),Fe.jsx("div",{className:pr.description,children:"The action has been executed successfully."}),Fe.jsx(sh,{})]}):n===6||n===10?Fe.jsxs(O,{children:[Fe.jsx("div",{className:pr.errorLogo}),Fe.jsx("div",{className:pr.title,children:"There was an error while trying to submit the request."}),Fe.jsx("div",{className:pr.description,children:"Return to the Desktop App to try again, or contact support if the error persists."}),Fe.jsx(sh,{}),Fe.jsx("div",{className:pr.errorMessage,children:f})]}):null},sh=()=>Fe.jsx("div",{className:pr.closeWindow,children:"You can close this window."}),E0=async(t,e)=>{const r=j1.get("AUTH_SERVER_URL"),n=mx(r);await new Promise(a=>{n.on("connect",a)});const i=await n.emitWithAck(t,e);if(n.close(),i.error)throw new Error(i.error);return i};var RI=(t=>(t.SIMPLIFIED_AVATAR_SETUP="dapps-simplified-avatar-setup",t))(RI||{});const fce={flags:{},initialized:!1},CI=Be.createContext(fce),IHe=t=>{const[e,r]=Be.useState(fce),[n,i]=Be.useState(!0),a=Be.useRef();return Be.useEffect(()=>{(async()=>{if(n){i(!1);const o=j1.get("FEATURE_FLAGS_URL"),c=await(await fetch(`${o}/dapps.json`)).json();r({...e,flags:c.flags,initialized:!0})}})()},[n]),Be.useEffect(()=>{const o=j1.get("FEATURE_FLAGS_INTERVAL");return a.current=setInterval(()=>{i(!0)},Number(o)),()=>{clearInterval(a.current)}},[]),Fe.jsx(CI.Provider,{value:e,children:t.children})},OHe=()=>{const{initialized:t,flags:e}=Be.useContext(CI);return t?e[RI.SIMPLIFIED_AVATAR_SETUP]?Fe.jsx("div",{children:"Setup Page"}):(window.location.href="/",null):null},PHe="_main_qbssu_1",THe={main:PHe},RHe=()=>{const t=B2(),e=bw(),r=Be.useCallback(async()=>{try{const n=await dd.connection.tryPreviousConnection();return!!(n.account&&n.provider)}catch{return!1}},[]);return Be.useEffect(()=>{r().then(n=>{n?window.location.href="/":t({pathname:"/login",search:e.search})})},[r,t]),Fe.jsx("div",{className:THe.main,children:Fe.jsx($S,{active:!0,size:"huge"})})};var Qw={},NI={},JN,oQ;function CHe(){if(oQ)return JN;oQ=1;function t(e,r,n,i){var a=-1,o=e==null?0:e.length;for(i&&o&&(n=e[++a]);++a<o;)n=r(n,e[a],a,e);return n}return JN=t,JN}var XN,sQ;function NHe(){if(sQ)return XN;sQ=1;function t(e,r,n,i,a){return a(e,function(o,s,c){n=i?(i=!1,o):r(n,o,s,c)}),n}return XN=t,XN}var ZN,cQ;function dce(){if(cQ)return ZN;cQ=1;var t=CHe(),e=Rw(),r=Ed(),n=NHe(),i=Di();function a(o,s,c){var u=i(o)?t:n,f=arguments.length<3;return u(o,r(s,4),c,f,e)}return ZN=a,ZN}var e6,uQ;function hce(){return uQ||(uQ=1,e6=function(e,r,n,i){var a=n?n.call(i,e,r):void 0;if(a!==void 0)return!!a;if(e===r)return!0;if(typeof e!="object"||!e||typeof r!="object"||!r)return!1;var o=Object.keys(e),s=Object.keys(r);if(o.length!==s.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),u=0;u<o.length;u++){var f=o[u];if(!c(f))return!1;var d=e[f],g=r[f];if(a=n?n.call(i,d,g,f):void 0,a===!1||a===void 0&&d!==g)return!1}return!0}),e6}var BE={},lQ;function DHe(){if(lQ)return BE;lQ=1;var t=wr;BE.__esModule=!0;var e=t(rm);return BE.default=e.default,BE}var zv={},FE={},fQ;function $He(){if(fQ)return FE;fQ=1;var t=wr;FE.__esModule=!0;var e=t(rM());return FE.default=e.default,FE}var dQ;function MHe(){if(dQ)return zv;dQ=1;var t=Ys,e=wr;zv.__esModule=!0,zv.default=void 0;var r=e(Fn()),n=e(Uc()),i=e(yS()),a=e(Qs()),o=e(ii);e(Ln());var s=t(Be),c=Wn(),u=e($He()),f=function(d){(0,n.default)(g,d);function g(){for(var w,v=arguments.length,y=new Array(v),_=0;_<v;_++)y[_]=arguments[_];return w=d.call.apply(d,[this].concat(y))||this,w.handleButtonOverrides=function(b){return{onClick:function(x,I){(0,a.default)(b,"onClick",x,I),(0,a.default)(w.props,"onActionClick",x,I)}}},w}var m=g.prototype;return m.render=function(){var v=this,y=this.props,_=y.actions,b=y.children,S=y.className,x=y.content,I=(0,o.default)("actions",S),E=(0,c.getUnhandledProps)(g,this.props),p=(0,c.getElementType)(g,this.props);return c.childrenUtils.isNil(b)?c.childrenUtils.isNil(x)?s.default.createElement(p,(0,r.default)({},E,{className:I}),(0,i.default)(_,function(O){return u.default.create(O,{overrideProps:v.handleButtonOverrides})})):s.default.createElement(p,(0,r.default)({},E,{className:I}),x):s.default.createElement(p,(0,r.default)({},E,{className:I}),b)},g}(s.Component);return zv.default=f,f.handledProps=["actions","as","children","className","content","onActionClick"],f.propTypes={},f.create=(0,c.createShorthandFactory)(f,function(d){return{actions:d}}),zv}var Gv={},hQ;function pce(){if(hQ)return Gv;hQ=1;var t=wr;Gv.__esModule=!0,Gv.default=void 0;var e=t(Fn()),r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(s){var c=s.children,u=s.className,f=s.content,d=s.image,g=s.scrolling,m=(0,r.default)(u,(0,i.useKeyOnly)(d,"image"),(0,i.useKeyOnly)(g,"scrolling"),"content"),w=(0,i.getUnhandledProps)(a,s),v=(0,i.getElementType)(a,s);return n.default.createElement(v,(0,e.default)({},w,{className:m}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content","image","scrolling"],a.propTypes={},a.create=(0,i.createShorthandFactory)(a,function(s){return{content:s}});var o=a;return Gv.default=o,Gv}var Wv={},pQ;function kHe(){if(pQ)return Wv;pQ=1;var t=wr;Wv.__esModule=!0,Wv.default=void 0;var e=t(Fn()),r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(s){var c=s.children,u=s.className,f=s.content,d=(0,r.default)("description",u),g=(0,i.getUnhandledProps)(a,s),m=(0,i.getElementType)(a,s);return n.default.createElement(m,(0,e.default)({},g,{className:d}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content"],a.propTypes={};var o=a;return Wv.default=o,Wv}var Kv={},gQ;function LHe(){if(gQ)return Kv;gQ=1;var t=wr;Kv.__esModule=!0,Kv.default=void 0;var e=t(Fn()),r=xd,n=t(ii);t(Ln());var i=t(Be),a=Wn();function o(c){var u=c.blurring,f=c.children,d=c.className,g=c.centered,m=c.content,w=c.inverted,v=c.mountNode,y=c.scrolling,_=i.default.useRef(),b=(0,n.default)("ui",(0,a.useKeyOnly)(w,"inverted"),(0,a.useKeyOnly)(!g,"top aligned"),"page modals dimmer transition visible active",d),S=(0,n.default)("dimmable dimmed",(0,a.useKeyOnly)(u,"blurring"),(0,a.useKeyOnly)(y,"scrolling")),x=(0,a.getUnhandledProps)(o,c),I=(0,a.getElementType)(o,c);return(0,a.useClassNamesOnNode)(v,S),i.default.useEffect(function(){_.current&&_.current.style&&_.current.style.setProperty("display","flex","important")},[]),i.default.createElement(r.Ref,{innerRef:_},i.default.createElement(I,(0,e.default)({},x,{className:b}),a.childrenUtils.isNil(f)?m:f))}o.handledProps=["as","blurring","centered","children","className","content","inverted","mountNode","scrolling"],o.propTypes={},o.create=(0,a.createShorthandFactory)(o,function(c){return{content:c}});var s=o;return Kv.default=s,Kv}var Yv={},yQ;function UHe(){if(yQ)return Yv;yQ=1;var t=wr;Yv.__esModule=!0,Yv.default=void 0;var e=t(Fn()),r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(s){var c=s.children,u=s.className,f=s.content,d=(0,r.default)("header",u),g=(0,i.getUnhandledProps)(a,s),m=(0,i.getElementType)(a,s);return n.default.createElement(m,(0,e.default)({},g,{className:d}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content"],a.propTypes={},a.create=(0,i.createShorthandFactory)(a,function(s){return{content:s}});var o=a;return Yv.default=o,Yv}var Yu={},mQ;function BHe(){if(mQ)return Yu;mQ=1,Yu.__esModule=!0,Yu.isLegacy=Yu.getLegacyStyles=Yu.canFit=void 0;var t=0,e=50,r=function(o){var s=o.height+t,c=o.height+t,u=window.innerHeight,f=u/2,d=-(c/2),g=e,m=f+d;return m+s+g<u};Yu.canFit=r;var n=function(o,s,c){var u=s&&o?-(c.height/2):0,f=-(c.width/2);return{marginLeft:f,marginTop:u}};Yu.getLegacyStyles=n;var i=function(){return!window.ActiveXObject&&"ActiveXObject"in window};return Yu.isLegacy=i,Yu}var FHe=Ys,ta=wr;NI.__esModule=!0;NI.default=void 0;var x0=ta(Fn()),jHe=ta(Uc()),qHe=ta(gS()),HHe=ta(j$()),VHe=ta(H$()),zHe=ta(dce()),GHe=ta(ure()),pf=ta(Qs()),vQ=xd,WHe=ta(ii);ta(Ln());var Qu=FHe(Be),KHe=ta(hce()),Pa=Wn(),YHe=ta(DHe()),bQ=ta(tM()),gce=ta(MHe()),yce=ta(pce()),QHe=ta(kHe()),mce=ta(LHe()),vce=ta(UHe()),t6=BHe(),Ru=function(t){(0,jHe.default)(e,t);function e(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a))||this,n.legacy=(0,Pa.isBrowser)()&&(0,t6.isLegacy)(),n.ref=(0,Qu.createRef)(),n.dimmerRef=(0,Qu.createRef)(),n.latestDocumentMouseDownEvent=null,n.getMountNode=function(){return(0,Pa.isBrowser)()?n.props.mountNode||document.body:null},n.handleActionsOverrides=function(s){return{onActionClick:function(u,f){(0,pf.default)(s,"onActionClick",u,f),(0,pf.default)(n.props,"onActionClick",u,n.props),n.handleClose(u)}}},n.handleClose=function(s){n.setState({open:!1}),(0,pf.default)(n.props,"onClose",s,(0,x0.default)({},n.props,{open:!1}))},n.handleDocumentMouseDown=function(s){n.latestDocumentMouseDownEvent=s},n.handleDocumentClick=function(s){var c=n.props.closeOnDimmerClick,u=n.latestDocumentMouseDownEvent;n.latestDocumentMouseDownEvent=null,!(!c||(0,Pa.doesNodeContainClick)(n.ref.current,u)||(0,Pa.doesNodeContainClick)(n.ref.current,s))&&(n.setState({open:!1}),(0,pf.default)(n.props,"onClose",s,(0,x0.default)({},n.props,{open:!1})))},n.handleIconOverrides=function(s){return{onClick:function(u){(0,pf.default)(s,"onClick",u),n.handleClose(u)}}},n.handleOpen=function(s){(0,pf.default)(n.props,"onOpen",s,(0,x0.default)({},n.props,{open:!0})),n.setState({open:!0})},n.handlePortalMount=function(s){var c=n.props.eventPool;n.setState({scrolling:!1}),n.setPositionAndClassNames(),Pa.eventStack.sub("mousedown",n.handleDocumentMouseDown,{pool:c,target:n.dimmerRef.current}),Pa.eventStack.sub("click",n.handleDocumentClick,{pool:c,target:n.dimmerRef.current}),(0,pf.default)(n.props,"onMount",s,n.props)},n.handlePortalUnmount=function(s){var c=n.props.eventPool;cancelAnimationFrame(n.animationRequestId),Pa.eventStack.unsub("mousedown",n.handleDocumentMouseDown,{pool:c,target:n.dimmerRef.current}),Pa.eventStack.unsub("click",n.handleDocumentClick,{pool:c,target:n.dimmerRef.current}),(0,pf.default)(n.props,"onUnmount",s,n.props)},n.setPositionAndClassNames=function(){var s=n.props.centered,c,u={};if(n.ref.current){var f=n.ref.current.getBoundingClientRect(),d=(0,t6.canFit)(f);c=!d;var g=n.legacy?(0,t6.getLegacyStyles)(d,s,f):{};(0,KHe.default)(n.state.legacyStyles,g)||(u.legacyStyles=g),n.state.scrolling!==c&&(u.scrolling=c)}(0,GHe.default)(u)||n.setState(u),n.animationRequestId=requestAnimationFrame(n.setPositionAndClassNames)},n.renderContent=function(s){var c=n.props,u=c.actions,f=c.basic,d=c.children,g=c.className,m=c.closeIcon,w=c.content,v=c.header,y=c.size,_=c.style,b=n.state,S=b.legacyStyles,x=b.scrolling,I=(0,WHe.default)("ui",y,(0,Pa.useKeyOnly)(f,"basic"),(0,Pa.useKeyOnly)(n.legacy,"legacy"),(0,Pa.useKeyOnly)(x,"scrolling"),"modal transition visible active",g),E=(0,Pa.getElementType)(e,n.props),p=m===!0?"close":m,O=YHe.default.create(p,{overrideProps:n.handleIconOverrides});return Qu.default.createElement(vQ.Ref,{innerRef:n.ref},Qu.default.createElement(E,(0,x0.default)({},s,{className:I,style:(0,x0.default)({},S,_)}),O,Pa.childrenUtils.isNil(d)?Qu.default.createElement(Qu.default.Fragment,null,vce.default.create(v,{autoGenerateKey:!1}),yce.default.create(w,{autoGenerateKey:!1}),gce.default.create(u,{overrideProps:n.handleActionsOverrides})):d))},n}var r=e.prototype;return r.componentWillUnmount=function(){this.handlePortalUnmount()},r.render=function(){var i=this.props,a=i.centered,o=i.closeOnDocumentClick,s=i.dimmer,c=i.eventPool,u=i.trigger,f=this.state,d=f.open,g=f.scrolling,m=this.getMountNode();if(!(0,Pa.isBrowser)())return(0,Qu.isValidElement)(u)?u:null;var w=(0,Pa.getUnhandledProps)(e,this.props),v=bQ.default.handledProps,y=(0,zHe.default)(w,function(b,S,x){return(0,VHe.default)(v,x)||(b[x]=S),b},{}),_=(0,HHe.default)(w,v);return Qu.default.createElement(bQ.default,(0,x0.default)({closeOnDocumentClick:o},_,{trigger:u,eventPool:c,mountNode:m,open:d,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount}),Qu.default.createElement(vQ.Ref,{innerRef:this.dimmerRef},mce.default.create((0,qHe.default)(s)?s:{},{autoGenerateKey:!1,defaultProps:{blurring:s==="blurring",inverted:s==="inverted"},overrideProps:{children:this.renderContent(y),centered:a,mountNode:m,scrolling:g}})))},e}(Pa.ModernAutoControlledComponent);Ru.handledProps=["actions","as","basic","centered","children","className","closeIcon","closeOnDimmerClick","closeOnDocumentClick","content","defaultOpen","dimmer","eventPool","header","mountNode","onActionClick","onClose","onMount","onOpen","onUnmount","open","size","style","trigger"];Ru.propTypes={};Ru.defaultProps={centered:!0,dimmer:!0,closeOnDimmerClick:!0,closeOnDocumentClick:!1,eventPool:"Modal"};Ru.autoControlledProps=["open"];Ru.Actions=gce.default;Ru.Content=yce.default;Ru.Description=QHe.default;Ru.Dimmer=mce.default;Ru.Header=vce.default;var JHe=Ru;NI.default=JHe;(function(t){var e=Ne&&Ne.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;var r=NI;Object.defineProperty(t,"Modal",{enumerable:!0,get:function(){return e(r).default}})})(Qw);const bce=()=>{const t=bw(),r=new URLSearchParams(t.search).get("redirectTo"),n=r?decodeURIComponent(r):null;if(n!==null)try{let i;return n.startsWith("/")?i=new URL(n,window.location.origin):i=new URL(n),i.hostname!==window.location.hostname?void 0:i.href}catch{console.error("Can't parse redirectTo URL");return}},Fx=t=>new Promise(e=>setTimeout(e,t));var XHe=pce();const fL=kc(XHe);var dL={};var ZHe=Ne&&Ne.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),eVe=Ne&&Ne.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),tVe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rVe=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&eVe(e,t,r);return tVe(e,t),e};Object.defineProperty(dL,"__esModule",{value:!0});var DI=dL.ModalNavigation=void 0,ch=rVe(Be),nVe=function(t){ZHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var r=this.props,n=r.title,i=r.subtitle,a=r.onBack,o=r.onClose,s=r.onInfo;return ch.createElement("div",{className:"dcl modal-navigation"},ch.createElement("div",{className:"dcl modal-navigation-title"},n),i&&ch.createElement("div",{className:"dcl modal-navigation-subtitle"},i),a&&ch.createElement("div",{className:"dcl modal-navigation-button modal-navigation-back",onClick:a}),s&&ch.createElement("div",{className:"dcl modal-navigation-button modal-navigation-info",onClick:s}),o&&ch.createElement("div",{className:"dcl modal-navigation-button modal-navigation-close",onClick:o}))},e}(ch.PureComponent);DI=dL.ModalNavigation=nVe;const iVe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/warning-057948e8.svg";var fi=(t=>(t.CONNECTING_WALLET="CONNECTING_WALLET",t.WAITING_FOR_SIGNATURE="WAITING_FOR_SIGNATURE",t.ERROR="ERROR",t.LOADING_MAGIC="LOADING_MAGIC",t.VALIDATING_SIGN_IN="VALIDATING_SIGN_IN",t.WAITING_FOR_CONFIRMATION="WAITING_FOR_CONFIRMATION",t))(fi||{});function aVe(t,e){switch(t){case fi.ERROR:return"You did not confirm this action in your digital wallet extension. To continue, please try again.";case fi.CONNECTING_WALLET:case fi.WAITING_FOR_SIGNATURE:return e===Ll.ProviderType.MAGIC?"Almost done! Confirm your request to login Decentraland":"Confirm in your digital wallet extension to continue.";case fi.VALIDATING_SIGN_IN:return"Just a moment, we're verifying your login credentials...";case fi.LOADING_MAGIC:return"Redirecting..."}}const oVe="_main_1qx1l_1",sVe="_content_1qx1l_8",cVe="_errorImage_1qx1l_16",uVe="_message_1qx1l_22",lVe="_loader_1qx1l_29",Qv={main:oVe,content:sVe,errorImage:cVe,message:uVe,loader:lVe},wce=t=>{const{open:e,state:r,providerType:n,onClose:i,onTryAgain:a}=t,o=r===fi.CONNECTING_WALLET||r===fi.WAITING_FOR_SIGNATURE||r===fi.LOADING_MAGIC||r===fi.VALIDATING_SIGN_IN;return Fe.jsxs(Qw.Modal,{size:"tiny",open:e,children:[Fe.jsx(DI,{title:"",onClose:o?void 0:i}),Fe.jsx("div",{className:Qv.main,children:Fe.jsxs("div",{className:Qv.content,children:[r===fi.ERROR&&Fe.jsx("img",{className:Qv.errorImage,src:iVe}),o&&Fe.jsx($S,{className:Qv.loader,size:"huge",inline:!0}),Fe.jsx("p",{className:Qv.message,children:aVe(r,n)}),r===fi.ERROR&&Fe.jsx(Tc.Button,{primary:!0,onClick:a,children:"Try again"})]})}),Fe.jsx(fL,{})]})};var _ce={},Ece={},k4={exports:{}};(function(t,e){(function(r,n){n(e)})(Ne,function(r){function n(P){if(P.jsonrpc="2.0",!P.id||typeof P.id!="number"||Math.floor(P.id)!==P.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(P)}`);if(!P.method||typeof P.method!="string"||P.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(P)}`);if(!P.params||typeof P.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(P)}`);return P}var i={};function a(){let P,D;const W=new Promise((pe,Se)=>{P=Ce=>{pe(Ce),W.isPending=!1},D=Ce=>{Se(Ce),W.isPending=!1}}).catch(pe=>Promise.reject(pe));return W.resolve=P,W.reject=D,"finally"in W||(W.finally=pe=>{W.then(pe),W.catch(pe)}),W.isPending=!0,W}Object.defineProperty(i,"__esModule",{value:!0});var o=i.future=a;i.default=a;var s={exports:{}};/**
|
|
171
|
-
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|
172
|
-
*
|
|
173
|
-
* @version 0.8.0
|
|
174
|
-
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
175
|
-
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
176
|
-
* @license MIT
|
|
177
|
-
*/(function(P){(function(){var D="input is invalid type",W=typeof window=="object",pe=W?window:{};pe.JS_SHA3_NO_WINDOW&&(W=!1);var Se=!W&&typeof self=="object";!pe.JS_SHA3_NO_NODE_JS&&typeof Va=="object"&&Va.versions&&Va.versions.node?pe=Ne:Se&&(pe=self);var Ce=!pe.JS_SHA3_NO_COMMON_JS&&P.exports,rt=!pe.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",At="0123456789abcdef".split(""),Ft=[4,1024,262144,67108864],Jt=[0,8,16,24],Ti=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],xn=[224,256,384,512],St=[128,256],si=["hex","buffer","arrayBuffer","array","digest"],An={128:168,256:136};!pe.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(R){return Object.prototype.toString.call(R)==="[object Array]"}),!rt||!pe.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(R){return typeof R=="object"&&R.buffer&&R.buffer.constructor===ArrayBuffer});for(var fn=function(R,oe,we){return function(se){return new ar(R,oe,R).update(se)[we]()}},mi=function(R,oe,we){return function(se,Ae){return new ar(R,oe,Ae).update(se)[we]()}},po=function(R,oe,we){return function(se,Ae,Oe,Pe){return Sr["cshake"+R].update(se,Ae,Oe,Pe)[we]()}},qi=function(R,oe,we){return function(se,Ae,Oe,Pe){return Sr["kmac"+R].update(se,Ae,Oe,Pe)[we]()}},vi=function(R,oe,we,se){for(var Ae=0;Ae<si.length;++Ae){var Oe=si[Ae];R[Oe]=oe(we,se,Oe)}return R},go=function(R,oe){var we=fn(R,oe,"hex");return we.create=function(){return new ar(R,oe,R)},we.update=function(se){return we.create().update(se)},vi(we,fn,R,oe)},tn=[{name:"keccak",padding:[1,256,65536,16777216],bits:xn,createMethod:go},{name:"sha3",padding:[6,1536,393216,100663296],bits:xn,createMethod:go},{name:"shake",padding:[31,7936,2031616,520093696],bits:St,createMethod:function(R,oe){var we=mi(R,oe,"hex");return we.create=function(se){return new ar(R,oe,se)},we.update=function(se,Ae){return we.create(Ae).update(se)},vi(we,mi,R,oe)}},{name:"cshake",padding:Ft,bits:St,createMethod:function(R,oe){var we=An[R],se=po(R,0,"hex");return se.create=function(Ae,Oe,Pe){return Oe||Pe?new ar(R,oe,Ae).bytepad([Oe,Pe],we):Sr["shake"+R].create(Ae)},se.update=function(Ae,Oe,Pe,je){return se.create(Oe,Pe,je).update(Ae)},vi(se,po,R,oe)}},{name:"kmac",padding:Ft,bits:St,createMethod:function(R,oe){var we=An[R],se=qi(R,0,"hex");return se.create=function(Ae,Oe,Pe){return new mr(R,oe,Oe).bytepad(["KMAC",Pe],we).bytepad([Ae],we)},se.update=function(Ae,Oe,Pe,je){return se.create(Ae,Pe,je).update(Oe)},vi(se,qi,R,oe)}}],Sr={},de=[],ke=0;ke<tn.length;++ke)for(var it=tn[ke],Ke=it.bits,Qr=0;Qr<Ke.length;++Qr){var fr=it.name+"_"+Ke[Qr];if(de.push(fr),Sr[fr]=it.createMethod(Ke[Qr],it.padding),it.name!=="sha3"){var yn=it.name+Ke[Qr];de.push(yn),Sr[yn]=Sr[fr]}}function ar(R,oe,we){this.blocks=[],this.s=[],this.padding=oe,this.outputBits=we,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(R<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=we>>5,this.extraBytes=(31&we)>>3;for(var se=0;se<50;++se)this.s[se]=0}function mr(R,oe,we){ar.call(this,R,oe,we)}ar.prototype.update=function(R){if(this.finalized)throw new Error("finalize already called");var oe,we=typeof R;if(we!=="string"){if(we!=="object")throw new Error(D);if(R===null)throw new Error(D);if(rt&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!(Array.isArray(R)||rt&&ArrayBuffer.isView(R)))throw new Error(D);oe=!0}for(var se,Ae,Oe=this.blocks,Pe=this.byteCount,je=R.length,Ye=this.blockCount,Ve=0,pt=this.s;Ve<je;){if(this.reset)for(this.reset=!1,Oe[0]=this.block,se=1;se<Ye+1;++se)Oe[se]=0;if(oe)for(se=this.start;Ve<je&&se<Pe;++Ve)Oe[se>>2]|=R[Ve]<<Jt[3&se++];else for(se=this.start;Ve<je&&se<Pe;++Ve)(Ae=R.charCodeAt(Ve))<128?Oe[se>>2]|=Ae<<Jt[3&se++]:Ae<2048?(Oe[se>>2]|=(192|Ae>>6)<<Jt[3&se++],Oe[se>>2]|=(128|63&Ae)<<Jt[3&se++]):Ae<55296||Ae>=57344?(Oe[se>>2]|=(224|Ae>>12)<<Jt[3&se++],Oe[se>>2]|=(128|Ae>>6&63)<<Jt[3&se++],Oe[se>>2]|=(128|63&Ae)<<Jt[3&se++]):(Ae=65536+((1023&Ae)<<10|1023&R.charCodeAt(++Ve)),Oe[se>>2]|=(240|Ae>>18)<<Jt[3&se++],Oe[se>>2]|=(128|Ae>>12&63)<<Jt[3&se++],Oe[se>>2]|=(128|Ae>>6&63)<<Jt[3&se++],Oe[se>>2]|=(128|63&Ae)<<Jt[3&se++]);if(this.lastByteIndex=se,se>=Pe){for(this.start=se-Pe,this.block=Oe[Ye],se=0;se<Ye;++se)pt[se]^=Oe[se];ie(pt),this.reset=!0}else this.start=se}return this},ar.prototype.encode=function(R,oe){var we=255&R,se=1,Ae=[we];for(we=255&(R>>=8);we>0;)Ae.unshift(we),we=255&(R>>=8),++se;return oe?Ae.push(se):Ae.unshift(se),this.update(Ae),Ae.length},ar.prototype.encodeString=function(R){var oe,we=typeof R;if(we!=="string"){if(we!=="object")throw new Error(D);if(R===null)throw new Error(D);if(rt&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!(Array.isArray(R)||rt&&ArrayBuffer.isView(R)))throw new Error(D);oe=!0}var se=0,Ae=R.length;if(oe)se=Ae;else for(var Oe=0;Oe<R.length;++Oe){var Pe=R.charCodeAt(Oe);Pe<128?se+=1:Pe<2048?se+=2:Pe<55296||Pe>=57344?se+=3:(Pe=65536+((1023&Pe)<<10|1023&R.charCodeAt(++Oe)),se+=4)}return se+=this.encode(8*se),this.update(R),se},ar.prototype.bytepad=function(R,oe){for(var we=this.encode(oe),se=0;se<R.length;++se)we+=this.encodeString(R[se]);var Ae=oe-we%oe,Oe=[];return Oe.length=Ae,this.update(Oe),this},ar.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var R=this.blocks,oe=this.lastByteIndex,we=this.blockCount,se=this.s;if(R[oe>>2]|=this.padding[3&oe],this.lastByteIndex===this.byteCount)for(R[0]=R[we],oe=1;oe<we+1;++oe)R[oe]=0;for(R[we-1]|=2147483648,oe=0;oe<we;++oe)se[oe]^=R[oe];ie(se)}},ar.prototype.toString=ar.prototype.hex=function(){this.finalize();for(var R,oe=this.blockCount,we=this.s,se=this.outputBlocks,Ae=this.extraBytes,Oe=0,Pe=0,je="";Pe<se;){for(Oe=0;Oe<oe&&Pe<se;++Oe,++Pe)R=we[Oe],je+=At[R>>4&15]+At[15&R]+At[R>>12&15]+At[R>>8&15]+At[R>>20&15]+At[R>>16&15]+At[R>>28&15]+At[R>>24&15];Pe%oe==0&&(ie(we),Oe=0)}return Ae&&(R=we[Oe],je+=At[R>>4&15]+At[15&R],Ae>1&&(je+=At[R>>12&15]+At[R>>8&15]),Ae>2&&(je+=At[R>>20&15]+At[R>>16&15])),je},ar.prototype.arrayBuffer=function(){this.finalize();var R,oe=this.blockCount,we=this.s,se=this.outputBlocks,Ae=this.extraBytes,Oe=0,Pe=0,je=this.outputBits>>3;R=Ae?new ArrayBuffer(se+1<<2):new ArrayBuffer(je);for(var Ye=new Uint32Array(R);Pe<se;){for(Oe=0;Oe<oe&&Pe<se;++Oe,++Pe)Ye[Pe]=we[Oe];Pe%oe==0&&ie(we)}return Ae&&(Ye[Oe]=we[Oe],R=R.slice(0,je)),R},ar.prototype.buffer=ar.prototype.arrayBuffer,ar.prototype.digest=ar.prototype.array=function(){this.finalize();for(var R,oe,we=this.blockCount,se=this.s,Ae=this.outputBlocks,Oe=this.extraBytes,Pe=0,je=0,Ye=[];je<Ae;){for(Pe=0;Pe<we&&je<Ae;++Pe,++je)R=je<<2,oe=se[Pe],Ye[R]=255&oe,Ye[R+1]=oe>>8&255,Ye[R+2]=oe>>16&255,Ye[R+3]=oe>>24&255;je%we==0&&ie(se)}return Oe&&(R=je<<2,oe=se[Pe],Ye[R]=255&oe,Oe>1&&(Ye[R+1]=oe>>8&255),Oe>2&&(Ye[R+2]=oe>>16&255)),Ye},mr.prototype=new ar,mr.prototype.finalize=function(){return this.encode(this.outputBits,!0),ar.prototype.finalize.call(this)};var ie=function(R){var oe,we,se,Ae,Oe,Pe,je,Ye,Ve,pt,rr,Wt,Jr,Pn,dn,kr,Xr,Ir,Hi,cs,jc,Mi,us,ki,hi,Sn,Cu,tc,Lp,$d,Md,Kl,Yl,kd,Up,Ql,Jl,Bp,Ld,Vi,Xl,qc,Ud,Bd,Fp,jp,qp,Hp,Vp,rc,zp,Gp,Zl,Fd,Fo,Nu,Wp,Kp,Yp,nc,Ea,jd,Qp;for(se=0;se<48;se+=2)Ae=R[0]^R[10]^R[20]^R[30]^R[40],Oe=R[1]^R[11]^R[21]^R[31]^R[41],Pe=R[2]^R[12]^R[22]^R[32]^R[42],je=R[3]^R[13]^R[23]^R[33]^R[43],Ye=R[4]^R[14]^R[24]^R[34]^R[44],Ve=R[5]^R[15]^R[25]^R[35]^R[45],pt=R[6]^R[16]^R[26]^R[36]^R[46],rr=R[7]^R[17]^R[27]^R[37]^R[47],oe=(Wt=R[8]^R[18]^R[28]^R[38]^R[48])^(Pe<<1|je>>>31),we=(Jr=R[9]^R[19]^R[29]^R[39]^R[49])^(je<<1|Pe>>>31),R[0]^=oe,R[1]^=we,R[10]^=oe,R[11]^=we,R[20]^=oe,R[21]^=we,R[30]^=oe,R[31]^=we,R[40]^=oe,R[41]^=we,oe=Ae^(Ye<<1|Ve>>>31),we=Oe^(Ve<<1|Ye>>>31),R[2]^=oe,R[3]^=we,R[12]^=oe,R[13]^=we,R[22]^=oe,R[23]^=we,R[32]^=oe,R[33]^=we,R[42]^=oe,R[43]^=we,oe=Pe^(pt<<1|rr>>>31),we=je^(rr<<1|pt>>>31),R[4]^=oe,R[5]^=we,R[14]^=oe,R[15]^=we,R[24]^=oe,R[25]^=we,R[34]^=oe,R[35]^=we,R[44]^=oe,R[45]^=we,oe=Ye^(Wt<<1|Jr>>>31),we=Ve^(Jr<<1|Wt>>>31),R[6]^=oe,R[7]^=we,R[16]^=oe,R[17]^=we,R[26]^=oe,R[27]^=we,R[36]^=oe,R[37]^=we,R[46]^=oe,R[47]^=we,oe=pt^(Ae<<1|Oe>>>31),we=rr^(Oe<<1|Ae>>>31),R[8]^=oe,R[9]^=we,R[18]^=oe,R[19]^=we,R[28]^=oe,R[29]^=we,R[38]^=oe,R[39]^=we,R[48]^=oe,R[49]^=we,Pn=R[0],dn=R[1],jp=R[11]<<4|R[10]>>>28,qp=R[10]<<4|R[11]>>>28,tc=R[20]<<3|R[21]>>>29,Lp=R[21]<<3|R[20]>>>29,nc=R[31]<<9|R[30]>>>23,Ea=R[30]<<9|R[31]>>>23,qc=R[40]<<18|R[41]>>>14,Ud=R[41]<<18|R[40]>>>14,kd=R[2]<<1|R[3]>>>31,Up=R[3]<<1|R[2]>>>31,kr=R[13]<<12|R[12]>>>20,Xr=R[12]<<12|R[13]>>>20,Hp=R[22]<<10|R[23]>>>22,Vp=R[23]<<10|R[22]>>>22,$d=R[33]<<13|R[32]>>>19,Md=R[32]<<13|R[33]>>>19,jd=R[42]<<2|R[43]>>>30,Qp=R[43]<<2|R[42]>>>30,Fd=R[5]<<30|R[4]>>>2,Fo=R[4]<<30|R[5]>>>2,Ql=R[14]<<6|R[15]>>>26,Jl=R[15]<<6|R[14]>>>26,Ir=R[25]<<11|R[24]>>>21,Hi=R[24]<<11|R[25]>>>21,rc=R[34]<<15|R[35]>>>17,zp=R[35]<<15|R[34]>>>17,Kl=R[45]<<29|R[44]>>>3,Yl=R[44]<<29|R[45]>>>3,ki=R[6]<<28|R[7]>>>4,hi=R[7]<<28|R[6]>>>4,Nu=R[17]<<23|R[16]>>>9,Wp=R[16]<<23|R[17]>>>9,Bp=R[26]<<25|R[27]>>>7,Ld=R[27]<<25|R[26]>>>7,cs=R[36]<<21|R[37]>>>11,jc=R[37]<<21|R[36]>>>11,Gp=R[47]<<24|R[46]>>>8,Zl=R[46]<<24|R[47]>>>8,Bd=R[8]<<27|R[9]>>>5,Fp=R[9]<<27|R[8]>>>5,Sn=R[18]<<20|R[19]>>>12,Cu=R[19]<<20|R[18]>>>12,Kp=R[29]<<7|R[28]>>>25,Yp=R[28]<<7|R[29]>>>25,Vi=R[38]<<8|R[39]>>>24,Xl=R[39]<<8|R[38]>>>24,Mi=R[48]<<14|R[49]>>>18,us=R[49]<<14|R[48]>>>18,R[0]=Pn^~kr&Ir,R[1]=dn^~Xr&Hi,R[10]=ki^~Sn&tc,R[11]=hi^~Cu&Lp,R[20]=kd^~Ql&Bp,R[21]=Up^~Jl&Ld,R[30]=Bd^~jp&Hp,R[31]=Fp^~qp&Vp,R[40]=Fd^~Nu&Kp,R[41]=Fo^~Wp&Yp,R[2]=kr^~Ir&cs,R[3]=Xr^~Hi&jc,R[12]=Sn^~tc&$d,R[13]=Cu^~Lp&Md,R[22]=Ql^~Bp&Vi,R[23]=Jl^~Ld&Xl,R[32]=jp^~Hp&rc,R[33]=qp^~Vp&zp,R[42]=Nu^~Kp&nc,R[43]=Wp^~Yp&Ea,R[4]=Ir^~cs&Mi,R[5]=Hi^~jc&us,R[14]=tc^~$d&Kl,R[15]=Lp^~Md&Yl,R[24]=Bp^~Vi&qc,R[25]=Ld^~Xl&Ud,R[34]=Hp^~rc&Gp,R[35]=Vp^~zp&Zl,R[44]=Kp^~nc&jd,R[45]=Yp^~Ea&Qp,R[6]=cs^~Mi&Pn,R[7]=jc^~us&dn,R[16]=$d^~Kl&ki,R[17]=Md^~Yl&hi,R[26]=Vi^~qc&kd,R[27]=Xl^~Ud&Up,R[36]=rc^~Gp&Bd,R[37]=zp^~Zl&Fp,R[46]=nc^~jd&Fd,R[47]=Ea^~Qp&Fo,R[8]=Mi^~Pn&kr,R[9]=us^~dn&Xr,R[18]=Kl^~ki&Sn,R[19]=Yl^~hi&Cu,R[28]=qc^~kd&Ql,R[29]=Ud^~Up&Jl,R[38]=Gp^~Bd&jp,R[39]=Zl^~Fp&qp,R[48]=jd^~Fd&Nu,R[49]=Qp^~Fo&Wp,R[0]^=Ti[se],R[1]^=Ti[se+1]};if(Ce)P.exports=Sr;else for(ke=0;ke<de.length;++ke)pe[de[ke]]=Sr[de[ke]]})()})(s);var c=s.exports,u=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,f=Math.ceil,d=Math.floor,g="[BigNumber Error] ",m=g+"Number primitive has more than 15 significant digits: ",w=1e14,v=14,y=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],b=1e7,S=1e9;function x(P){var D=0|P;return P>0||P===D?D:D-1}function I(P){for(var D,W,pe=1,Se=P.length,Ce=P[0]+"";pe<Se;){for(D=P[pe++]+"",W=v-D.length;W--;D="0"+D);Ce+=D}for(Se=Ce.length;Ce.charCodeAt(--Se)===48;);return Ce.slice(0,Se+1||1)}function E(P,D){var W,pe,Se=P.c,Ce=D.c,rt=P.s,At=D.s,Ft=P.e,Jt=D.e;if(!rt||!At)return null;if(W=Se&&!Se[0],pe=Ce&&!Ce[0],W||pe)return W?pe?0:-At:rt;if(rt!=At)return rt;if(W=rt<0,pe=Ft==Jt,!Se||!Ce)return pe?0:!Se^W?1:-1;if(!pe)return Ft>Jt^W?1:-1;for(At=(Ft=Se.length)<(Jt=Ce.length)?Ft:Jt,rt=0;rt<At;rt++)if(Se[rt]!=Ce[rt])return Se[rt]>Ce[rt]^W?1:-1;return Ft==Jt?0:Ft>Jt^W?1:-1}function p(P,D,W,pe){if(P<D||P>W||P!==d(P))throw Error(g+(pe||"Argument")+(typeof P=="number"?P<D||P>W?" out of range: ":" not an integer: ":" not a primitive number: ")+String(P))}function O(P){var D=P.c.length-1;return x(P.e/v)==D&&P.c[D]%2!=0}function C(P,D){return(P.length>1?P.charAt(0)+"."+P.slice(1):P)+(D<0?"e":"e+")+D}function M(P,D,W){var pe,Se;if(D<0){for(Se=W+".";++D;Se+=W);P=Se+P}else if(++D>(pe=P.length)){for(Se=W,D-=pe;--D;Se+=W);P+=Se}else D<pe&&(P=P.slice(0,D)+"."+P.slice(D));return P}var B=function P(D){var W,pe,Se,Ce,rt,At,Ft,Jt,Ti,xn,St=Ke.prototype={constructor:Ke,toString:null,valueOf:null},si=new Ke(1),An=20,fn=4,mi=-7,po=21,qi=-1e7,vi=1e7,go=!1,tn=1,Sr=0,de={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},ke="0123456789abcdefghijklmnopqrstuvwxyz",it=!0;function Ke(ie,R){var oe,we,se,Ae,Oe,Pe,je,Ye,Ve=this;if(!(Ve instanceof Ke))return new Ke(ie,R);if(R==null){if(ie&&ie._isBigNumber===!0)return Ve.s=ie.s,void(!ie.c||ie.e>vi?Ve.c=Ve.e=null:ie.e<qi?Ve.c=[Ve.e=0]:(Ve.e=ie.e,Ve.c=ie.c.slice()));if((Pe=typeof ie=="number")&&0*ie==0){if(Ve.s=1/ie<0?(ie=-ie,-1):1,ie===~~ie){for(Ae=0,Oe=ie;Oe>=10;Oe/=10,Ae++);return void(Ae>vi?Ve.c=Ve.e=null:(Ve.e=Ae,Ve.c=[ie]))}Ye=String(ie)}else{if(!u.test(Ye=String(ie)))return Se(Ve,Ye,Pe);Ve.s=Ye.charCodeAt(0)==45?(Ye=Ye.slice(1),-1):1}(Ae=Ye.indexOf("."))>-1&&(Ye=Ye.replace(".","")),(Oe=Ye.search(/e/i))>0?(Ae<0&&(Ae=Oe),Ae+=+Ye.slice(Oe+1),Ye=Ye.substring(0,Oe)):Ae<0&&(Ae=Ye.length)}else{if(p(R,2,ke.length,"Base"),R==10&&it)return ar(Ve=new Ke(ie),An+Ve.e+1,fn);if(Ye=String(ie),Pe=typeof ie=="number"){if(0*ie!=0)return Se(Ve,Ye,Pe,R);if(Ve.s=1/ie<0?(Ye=Ye.slice(1),-1):1,Ke.DEBUG&&Ye.replace(/^0\.0*|\./,"").length>15)throw Error(m+ie)}else Ve.s=Ye.charCodeAt(0)===45?(Ye=Ye.slice(1),-1):1;for(oe=ke.slice(0,R),Ae=Oe=0,je=Ye.length;Oe<je;Oe++)if(oe.indexOf(we=Ye.charAt(Oe))<0){if(we=="."){if(Oe>Ae){Ae=je;continue}}else if(!se&&(Ye==Ye.toUpperCase()&&(Ye=Ye.toLowerCase())||Ye==Ye.toLowerCase()&&(Ye=Ye.toUpperCase()))){se=!0,Oe=-1,Ae=0;continue}return Se(Ve,String(ie),Pe,R)}Pe=!1,(Ae=(Ye=pe(Ye,R,10,Ve.s)).indexOf("."))>-1?Ye=Ye.replace(".",""):Ae=Ye.length}for(Oe=0;Ye.charCodeAt(Oe)===48;Oe++);for(je=Ye.length;Ye.charCodeAt(--je)===48;);if(Ye=Ye.slice(Oe,++je)){if(je-=Oe,Pe&&Ke.DEBUG&&je>15&&(ie>y||ie!==d(ie)))throw Error(m+Ve.s*ie);if((Ae=Ae-Oe-1)>vi)Ve.c=Ve.e=null;else if(Ae<qi)Ve.c=[Ve.e=0];else{if(Ve.e=Ae,Ve.c=[],Oe=(Ae+1)%v,Ae<0&&(Oe+=v),Oe<je){for(Oe&&Ve.c.push(+Ye.slice(0,Oe)),je-=v;Oe<je;)Ve.c.push(+Ye.slice(Oe,Oe+=v));Oe=v-(Ye=Ye.slice(Oe)).length}else Oe-=je;for(;Oe--;Ye+="0");Ve.c.push(+Ye)}}else Ve.c=[Ve.e=0]}function Qr(ie,R,oe,we){var se,Ae,Oe,Pe,je;if(oe==null?oe=fn:p(oe,0,8),!ie.c)return ie.toString();if(se=ie.c[0],Oe=ie.e,R==null)je=I(ie.c),je=we==1||we==2&&(Oe<=mi||Oe>=po)?C(je,Oe):M(je,Oe,"0");else if(Ae=(ie=ar(new Ke(ie),R,oe)).e,Pe=(je=I(ie.c)).length,we==1||we==2&&(R<=Ae||Ae<=mi)){for(;Pe<R;je+="0",Pe++);je=C(je,Ae)}else if(R-=Oe,je=M(je,Ae,"0"),Ae+1>Pe){if(--R>0)for(je+=".";R--;je+="0");}else if((R+=Ae-Pe)>0)for(Ae+1==Pe&&(je+=".");R--;je+="0");return ie.s<0&&se?"-"+je:je}function fr(ie,R){for(var oe,we=1,se=new Ke(ie[0]);we<ie.length;we++){if(!(oe=new Ke(ie[we])).s){se=oe;break}R.call(se,oe)&&(se=oe)}return se}function yn(ie,R,oe){for(var we=1,se=R.length;!R[--se];R.pop());for(se=R[0];se>=10;se/=10,we++);return(oe=we+oe*v-1)>vi?ie.c=ie.e=null:oe<qi?ie.c=[ie.e=0]:(ie.e=oe,ie.c=R),ie}function ar(ie,R,oe,we){var se,Ae,Oe,Pe,je,Ye,Ve,pt=ie.c,rr=_;if(pt){e:{for(se=1,Pe=pt[0];Pe>=10;Pe/=10,se++);if((Ae=R-se)<0)Ae+=v,Oe=R,Ve=(je=pt[Ye=0])/rr[se-Oe-1]%10|0;else if((Ye=f((Ae+1)/v))>=pt.length){if(!we)break e;for(;pt.length<=Ye;pt.push(0));je=Ve=0,se=1,Oe=(Ae%=v)-v+1}else{for(je=Pe=pt[Ye],se=1;Pe>=10;Pe/=10,se++);Ve=(Oe=(Ae%=v)-v+se)<0?0:je/rr[se-Oe-1]%10|0}if(we=we||R<0||pt[Ye+1]!=null||(Oe<0?je:je%rr[se-Oe-1]),we=oe<4?(Ve||we)&&(oe==0||oe==(ie.s<0?3:2)):Ve>5||Ve==5&&(oe==4||we||oe==6&&(Ae>0?Oe>0?je/rr[se-Oe]:0:pt[Ye-1])%10&1||oe==(ie.s<0?8:7)),R<1||!pt[0])return pt.length=0,we?(R-=ie.e+1,pt[0]=rr[(v-R%v)%v],ie.e=-R||0):pt[0]=ie.e=0,ie;if(Ae==0?(pt.length=Ye,Pe=1,Ye--):(pt.length=Ye+1,Pe=rr[v-Ae],pt[Ye]=Oe>0?d(je/rr[se-Oe]%rr[Oe])*Pe:0),we)for(;;){if(Ye==0){for(Ae=1,Oe=pt[0];Oe>=10;Oe/=10,Ae++);for(Oe=pt[0]+=Pe,Pe=1;Oe>=10;Oe/=10,Pe++);Ae!=Pe&&(ie.e++,pt[0]==w&&(pt[0]=1));break}if(pt[Ye]+=Pe,pt[Ye]!=w)break;pt[Ye--]=0,Pe=1}for(Ae=pt.length;pt[--Ae]===0;pt.pop());}ie.e>vi?ie.c=ie.e=null:ie.e<qi&&(ie.c=[ie.e=0])}return ie}function mr(ie){var R,oe=ie.e;return oe===null?ie.toString():(R=I(ie.c),R=oe<=mi||oe>=po?C(R,oe):M(R,oe,"0"),ie.s<0?"-"+R:R)}return Ke.clone=P,Ke.ROUND_UP=0,Ke.ROUND_DOWN=1,Ke.ROUND_CEIL=2,Ke.ROUND_FLOOR=3,Ke.ROUND_HALF_UP=4,Ke.ROUND_HALF_DOWN=5,Ke.ROUND_HALF_EVEN=6,Ke.ROUND_HALF_CEIL=7,Ke.ROUND_HALF_FLOOR=8,Ke.EUCLID=9,Ke.config=Ke.set=function(ie){var R,oe;if(ie!=null){if(typeof ie!="object")throw Error(g+"Object expected: "+ie);if(ie.hasOwnProperty(R="DECIMAL_PLACES")&&(p(oe=ie[R],0,S,R),An=oe),ie.hasOwnProperty(R="ROUNDING_MODE")&&(p(oe=ie[R],0,8,R),fn=oe),ie.hasOwnProperty(R="EXPONENTIAL_AT")&&((oe=ie[R])&&oe.pop?(p(oe[0],-S,0,R),p(oe[1],0,S,R),mi=oe[0],po=oe[1]):(p(oe,-S,S,R),mi=-(po=oe<0?-oe:oe))),ie.hasOwnProperty(R="RANGE"))if((oe=ie[R])&&oe.pop)p(oe[0],-S,-1,R),p(oe[1],1,S,R),qi=oe[0],vi=oe[1];else{if(p(oe,-S,S,R),!oe)throw Error(g+R+" cannot be zero: "+oe);qi=-(vi=oe<0?-oe:oe)}if(ie.hasOwnProperty(R="CRYPTO")){if((oe=ie[R])!==!!oe)throw Error(g+R+" not true or false: "+oe);if(oe){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw go=!oe,Error(g+"crypto unavailable");go=oe}else go=oe}if(ie.hasOwnProperty(R="MODULO_MODE")&&(p(oe=ie[R],0,9,R),tn=oe),ie.hasOwnProperty(R="POW_PRECISION")&&(p(oe=ie[R],0,S,R),Sr=oe),ie.hasOwnProperty(R="FORMAT")){if(typeof(oe=ie[R])!="object")throw Error(g+R+" not an object: "+oe);de=oe}if(ie.hasOwnProperty(R="ALPHABET")){if(typeof(oe=ie[R])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(oe))throw Error(g+R+" invalid: "+oe);it=oe.slice(0,10)=="0123456789",ke=oe}}return{DECIMAL_PLACES:An,ROUNDING_MODE:fn,EXPONENTIAL_AT:[mi,po],RANGE:[qi,vi],CRYPTO:go,MODULO_MODE:tn,POW_PRECISION:Sr,FORMAT:de,ALPHABET:ke}},Ke.isBigNumber=function(ie){if(!ie||ie._isBigNumber!==!0)return!1;if(!Ke.DEBUG)return!0;var R,oe,we=ie.c,se=ie.e,Ae=ie.s;e:if({}.toString.call(we)=="[object Array]"){if((Ae===1||Ae===-1)&&se>=-S&&se<=S&&se===d(se)){if(we[0]===0){if(se===0&&we.length===1)return!0;break e}if((R=(se+1)%v)<1&&(R+=v),String(we[0]).length==R){for(R=0;R<we.length;R++)if((oe=we[R])<0||oe>=w||oe!==d(oe))break e;if(oe!==0)return!0}}}else if(we===null&&se===null&&(Ae===null||Ae===1||Ae===-1))return!0;throw Error(g+"Invalid BigNumber: "+ie)},Ke.maximum=Ke.max=function(){return fr(arguments,St.lt)},Ke.minimum=Ke.min=function(){return fr(arguments,St.gt)},Ke.random=(Ce=9007199254740992,rt=Math.random()*Ce&2097151?function(){return d(Math.random()*Ce)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(ie){var R,oe,we,se,Ae,Oe=0,Pe=[],je=new Ke(si);if(ie==null?ie=An:p(ie,0,S),se=f(ie/v),go)if(crypto.getRandomValues){for(R=crypto.getRandomValues(new Uint32Array(se*=2));Oe<se;)(Ae=131072*R[Oe]+(R[Oe+1]>>>11))>=9e15?(oe=crypto.getRandomValues(new Uint32Array(2)),R[Oe]=oe[0],R[Oe+1]=oe[1]):(Pe.push(Ae%1e14),Oe+=2);Oe=se/2}else{if(!crypto.randomBytes)throw go=!1,Error(g+"crypto unavailable");for(R=crypto.randomBytes(se*=7);Oe<se;)(Ae=281474976710656*(31&R[Oe])+1099511627776*R[Oe+1]+4294967296*R[Oe+2]+16777216*R[Oe+3]+(R[Oe+4]<<16)+(R[Oe+5]<<8)+R[Oe+6])>=9e15?crypto.randomBytes(7).copy(R,Oe):(Pe.push(Ae%1e14),Oe+=7);Oe=se/7}if(!go)for(;Oe<se;)(Ae=rt())<9e15&&(Pe[Oe++]=Ae%1e14);for(se=Pe[--Oe],ie%=v,se&&ie&&(Ae=_[v-ie],Pe[Oe]=d(se/Ae)*Ae);Pe[Oe]===0;Pe.pop(),Oe--);if(Oe<0)Pe=[we=0];else{for(we=-1;Pe[0]===0;Pe.splice(0,1),we-=v);for(Oe=1,Ae=Pe[0];Ae>=10;Ae/=10,Oe++);Oe<v&&(we-=v-Oe)}return je.e=we,je.c=Pe,je}),Ke.sum=function(){for(var ie=1,R=arguments,oe=new Ke(R[0]);ie<R.length;)oe=oe.plus(R[ie++]);return oe},pe=function(){var ie="0123456789";function R(oe,we,se,Ae){for(var Oe,Pe,je=[0],Ye=0,Ve=oe.length;Ye<Ve;){for(Pe=je.length;Pe--;je[Pe]*=we);for(je[0]+=Ae.indexOf(oe.charAt(Ye++)),Oe=0;Oe<je.length;Oe++)je[Oe]>se-1&&(je[Oe+1]==null&&(je[Oe+1]=0),je[Oe+1]+=je[Oe]/se|0,je[Oe]%=se)}return je.reverse()}return function(oe,we,se,Ae,Oe){var Pe,je,Ye,Ve,pt,rr,Wt,Jr,Pn=oe.indexOf("."),dn=An,kr=fn;for(Pn>=0&&(Ve=Sr,Sr=0,oe=oe.replace(".",""),rr=(Jr=new Ke(we)).pow(oe.length-Pn),Sr=Ve,Jr.c=R(M(I(rr.c),rr.e,"0"),10,se,ie),Jr.e=Jr.c.length),Ye=Ve=(Wt=R(oe,we,se,Oe?(Pe=ke,ie):(Pe=ie,ke))).length;Wt[--Ve]==0;Wt.pop());if(!Wt[0])return Pe.charAt(0);if(Pn<0?--Ye:(rr.c=Wt,rr.e=Ye,rr.s=Ae,Wt=(rr=W(rr,Jr,dn,kr,se)).c,pt=rr.r,Ye=rr.e),Pn=Wt[je=Ye+dn+1],Ve=se/2,pt=pt||je<0||Wt[je+1]!=null,pt=kr<4?(Pn!=null||pt)&&(kr==0||kr==(rr.s<0?3:2)):Pn>Ve||Pn==Ve&&(kr==4||pt||kr==6&&1&Wt[je-1]||kr==(rr.s<0?8:7)),je<1||!Wt[0])oe=pt?M(Pe.charAt(1),-dn,Pe.charAt(0)):Pe.charAt(0);else{if(Wt.length=je,pt)for(--se;++Wt[--je]>se;)Wt[je]=0,je||(++Ye,Wt=[1].concat(Wt));for(Ve=Wt.length;!Wt[--Ve];);for(Pn=0,oe="";Pn<=Ve;oe+=Pe.charAt(Wt[Pn++]));oe=M(oe,Ye,Pe.charAt(0))}return oe}}(),W=function(){function ie(we,se,Ae){var Oe,Pe,je,Ye,Ve=0,pt=we.length,rr=se%b,Wt=se/b|0;for(we=we.slice();pt--;)Ve=((Pe=rr*(je=we[pt]%b)+(Oe=Wt*je+(Ye=we[pt]/b|0)*rr)%b*b+Ve)/Ae|0)+(Oe/b|0)+Wt*Ye,we[pt]=Pe%Ae;return Ve&&(we=[Ve].concat(we)),we}function R(we,se,Ae,Oe){var Pe,je;if(Ae!=Oe)je=Ae>Oe?1:-1;else for(Pe=je=0;Pe<Ae;Pe++)if(we[Pe]!=se[Pe]){je=we[Pe]>se[Pe]?1:-1;break}return je}function oe(we,se,Ae,Oe){for(var Pe=0;Ae--;)we[Ae]-=Pe,Pe=we[Ae]<se[Ae]?1:0,we[Ae]=Pe*Oe+we[Ae]-se[Ae];for(;!we[0]&&we.length>1;we.splice(0,1));}return function(we,se,Ae,Oe,Pe){var je,Ye,Ve,pt,rr,Wt,Jr,Pn,dn,kr,Xr,Ir,Hi,cs,jc,Mi,us,ki=we.s==se.s?1:-1,hi=we.c,Sn=se.c;if(!(hi&&hi[0]&&Sn&&Sn[0]))return new Ke(we.s&&se.s&&(hi?!Sn||hi[0]!=Sn[0]:Sn)?hi&&hi[0]==0||!Sn?0*ki:ki/0:NaN);for(dn=(Pn=new Ke(ki)).c=[],ki=Ae+(Ye=we.e-se.e)+1,Pe||(Pe=w,Ye=x(we.e/v)-x(se.e/v),ki=ki/v|0),Ve=0;Sn[Ve]==(hi[Ve]||0);Ve++);if(Sn[Ve]>(hi[Ve]||0)&&Ye--,ki<0)dn.push(1),pt=!0;else{for(cs=hi.length,Mi=Sn.length,Ve=0,ki+=2,(rr=d(Pe/(Sn[0]+1)))>1&&(Sn=ie(Sn,rr,Pe),hi=ie(hi,rr,Pe),Mi=Sn.length,cs=hi.length),Hi=Mi,Xr=(kr=hi.slice(0,Mi)).length;Xr<Mi;kr[Xr++]=0);us=Sn.slice(),us=[0].concat(us),jc=Sn[0],Sn[1]>=Pe/2&&jc++;do{if(rr=0,(je=R(Sn,kr,Mi,Xr))<0){if(Ir=kr[0],Mi!=Xr&&(Ir=Ir*Pe+(kr[1]||0)),(rr=d(Ir/jc))>1)for(rr>=Pe&&(rr=Pe-1),Jr=(Wt=ie(Sn,rr,Pe)).length,Xr=kr.length;R(Wt,kr,Jr,Xr)==1;)rr--,oe(Wt,Mi<Jr?us:Sn,Jr,Pe),Jr=Wt.length,je=1;else rr==0&&(je=rr=1),Jr=(Wt=Sn.slice()).length;if(Jr<Xr&&(Wt=[0].concat(Wt)),oe(kr,Wt,Xr,Pe),Xr=kr.length,je==-1)for(;R(Sn,kr,Mi,Xr)<1;)rr++,oe(kr,Mi<Xr?us:Sn,Xr,Pe),Xr=kr.length}else je===0&&(rr++,kr=[0]);dn[Ve++]=rr,kr[0]?kr[Xr++]=hi[Hi]||0:(kr=[hi[Hi]],Xr=1)}while((Hi++<cs||kr[0]!=null)&&ki--);pt=kr[0]!=null,dn[0]||dn.splice(0,1)}if(Pe==w){for(Ve=1,ki=dn[0];ki>=10;ki/=10,Ve++);ar(Pn,Ae+(Pn.e=Ve+Ye*v-1)+1,Oe,pt)}else Pn.e=Ye,Pn.r=+pt;return Pn}}(),At=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Ft=/^([^.]+)\.$/,Jt=/^\.([^.]+)$/,Ti=/^-?(Infinity|NaN)$/,xn=/^\s*\+(?=[\w.])|^\s+|\s+$/g,Se=function(ie,R,oe,we){var se,Ae=oe?R:R.replace(xn,"");if(Ti.test(Ae))ie.s=isNaN(Ae)?null:Ae<0?-1:1;else{if(!oe&&(Ae=Ae.replace(At,function(Oe,Pe,je){return se=(je=je.toLowerCase())=="x"?16:je=="b"?2:8,we&&we!=se?Oe:Pe}),we&&(se=we,Ae=Ae.replace(Ft,"$1").replace(Jt,"0.$1")),R!=Ae))return new Ke(Ae,se);if(Ke.DEBUG)throw Error(g+"Not a"+(we?" base "+we:"")+" number: "+R);ie.s=null}ie.c=ie.e=null},St.absoluteValue=St.abs=function(){var ie=new Ke(this);return ie.s<0&&(ie.s=1),ie},St.comparedTo=function(ie,R){return E(this,new Ke(ie,R))},St.decimalPlaces=St.dp=function(ie,R){var oe,we,se,Ae=this;if(ie!=null)return p(ie,0,S),R==null?R=fn:p(R,0,8),ar(new Ke(Ae),ie+Ae.e+1,R);if(!(oe=Ae.c))return null;if(we=((se=oe.length-1)-x(this.e/v))*v,se=oe[se])for(;se%10==0;se/=10,we--);return we<0&&(we=0),we},St.dividedBy=St.div=function(ie,R){return W(this,new Ke(ie,R),An,fn)},St.dividedToIntegerBy=St.idiv=function(ie,R){return W(this,new Ke(ie,R),0,1)},St.exponentiatedBy=St.pow=function(ie,R){var oe,we,se,Ae,Oe,Pe,je,Ye,Ve=this;if((ie=new Ke(ie)).c&&!ie.isInteger())throw Error(g+"Exponent not an integer: "+mr(ie));if(R!=null&&(R=new Ke(R)),Oe=ie.e>14,!Ve.c||!Ve.c[0]||Ve.c[0]==1&&!Ve.e&&Ve.c.length==1||!ie.c||!ie.c[0])return Ye=new Ke(Math.pow(+mr(Ve),Oe?ie.s*(2-O(ie)):+mr(ie))),R?Ye.mod(R):Ye;if(Pe=ie.s<0,R){if(R.c?!R.c[0]:!R.s)return new Ke(NaN);(we=!Pe&&Ve.isInteger()&&R.isInteger())&&(Ve=Ve.mod(R))}else{if(ie.e>9&&(Ve.e>0||Ve.e<-1||(Ve.e==0?Ve.c[0]>1||Oe&&Ve.c[1]>=24e7:Ve.c[0]<8e13||Oe&&Ve.c[0]<=9999975e7)))return Ae=Ve.s<0&&O(ie)?-0:0,Ve.e>-1&&(Ae=1/Ae),new Ke(Pe?1/Ae:Ae);Sr&&(Ae=f(Sr/v+2))}for(Oe?(oe=new Ke(.5),Pe&&(ie.s=1),je=O(ie)):je=(se=Math.abs(+mr(ie)))%2,Ye=new Ke(si);;){if(je){if(!(Ye=Ye.times(Ve)).c)break;Ae?Ye.c.length>Ae&&(Ye.c.length=Ae):we&&(Ye=Ye.mod(R))}if(se){if((se=d(se/2))===0)break;je=se%2}else if(ar(ie=ie.times(oe),ie.e+1,1),ie.e>14)je=O(ie);else{if((se=+mr(ie))==0)break;je=se%2}Ve=Ve.times(Ve),Ae?Ve.c&&Ve.c.length>Ae&&(Ve.c.length=Ae):we&&(Ve=Ve.mod(R))}return we?Ye:(Pe&&(Ye=si.div(Ye)),R?Ye.mod(R):Ae?ar(Ye,Sr,fn,void 0):Ye)},St.integerValue=function(ie){var R=new Ke(this);return ie==null?ie=fn:p(ie,0,8),ar(R,R.e+1,ie)},St.isEqualTo=St.eq=function(ie,R){return E(this,new Ke(ie,R))===0},St.isFinite=function(){return!!this.c},St.isGreaterThan=St.gt=function(ie,R){return E(this,new Ke(ie,R))>0},St.isGreaterThanOrEqualTo=St.gte=function(ie,R){return(R=E(this,new Ke(ie,R)))===1||R===0},St.isInteger=function(){return!!this.c&&x(this.e/v)>this.c.length-2},St.isLessThan=St.lt=function(ie,R){return E(this,new Ke(ie,R))<0},St.isLessThanOrEqualTo=St.lte=function(ie,R){return(R=E(this,new Ke(ie,R)))===-1||R===0},St.isNaN=function(){return!this.s},St.isNegative=function(){return this.s<0},St.isPositive=function(){return this.s>0},St.isZero=function(){return!!this.c&&this.c[0]==0},St.minus=function(ie,R){var oe,we,se,Ae,Oe=this,Pe=Oe.s;if(R=(ie=new Ke(ie,R)).s,!Pe||!R)return new Ke(NaN);if(Pe!=R)return ie.s=-R,Oe.plus(ie);var je=Oe.e/v,Ye=ie.e/v,Ve=Oe.c,pt=ie.c;if(!je||!Ye){if(!Ve||!pt)return Ve?(ie.s=-R,ie):new Ke(pt?Oe:NaN);if(!Ve[0]||!pt[0])return pt[0]?(ie.s=-R,ie):new Ke(Ve[0]?Oe:fn==3?-0:0)}if(je=x(je),Ye=x(Ye),Ve=Ve.slice(),Pe=je-Ye){for((Ae=Pe<0)?(Pe=-Pe,se=Ve):(Ye=je,se=pt),se.reverse(),R=Pe;R--;se.push(0));se.reverse()}else for(we=(Ae=(Pe=Ve.length)<(R=pt.length))?Pe:R,Pe=R=0;R<we;R++)if(Ve[R]!=pt[R]){Ae=Ve[R]<pt[R];break}if(Ae&&(se=Ve,Ve=pt,pt=se,ie.s=-ie.s),(R=(we=pt.length)-(oe=Ve.length))>0)for(;R--;Ve[oe++]=0);for(R=w-1;we>Pe;){if(Ve[--we]<pt[we]){for(oe=we;oe&&!Ve[--oe];Ve[oe]=R);--Ve[oe],Ve[we]+=w}Ve[we]-=pt[we]}for(;Ve[0]==0;Ve.splice(0,1),--Ye);return Ve[0]?yn(ie,Ve,Ye):(ie.s=fn==3?-1:1,ie.c=[ie.e=0],ie)},St.modulo=St.mod=function(ie,R){var oe,we,se=this;return ie=new Ke(ie,R),!se.c||!ie.s||ie.c&&!ie.c[0]?new Ke(NaN):!ie.c||se.c&&!se.c[0]?new Ke(se):(tn==9?(we=ie.s,ie.s=1,oe=W(se,ie,0,3),ie.s=we,oe.s*=we):oe=W(se,ie,0,tn),(ie=se.minus(oe.times(ie))).c[0]||tn!=1||(ie.s=se.s),ie)},St.multipliedBy=St.times=function(ie,R){var oe,we,se,Ae,Oe,Pe,je,Ye,Ve,pt,rr,Wt,Jr,Pn,dn,kr=this,Xr=kr.c,Ir=(ie=new Ke(ie,R)).c;if(!(Xr&&Ir&&Xr[0]&&Ir[0]))return!kr.s||!ie.s||Xr&&!Xr[0]&&!Ir||Ir&&!Ir[0]&&!Xr?ie.c=ie.e=ie.s=null:(ie.s*=kr.s,Xr&&Ir?(ie.c=[0],ie.e=0):ie.c=ie.e=null),ie;for(we=x(kr.e/v)+x(ie.e/v),ie.s*=kr.s,(je=Xr.length)<(pt=Ir.length)&&(Jr=Xr,Xr=Ir,Ir=Jr,se=je,je=pt,pt=se),se=je+pt,Jr=[];se--;Jr.push(0));for(Pn=w,dn=b,se=pt;--se>=0;){for(oe=0,rr=Ir[se]%dn,Wt=Ir[se]/dn|0,Ae=se+(Oe=je);Ae>se;)oe=((Ye=rr*(Ye=Xr[--Oe]%dn)+(Pe=Wt*Ye+(Ve=Xr[Oe]/dn|0)*rr)%dn*dn+Jr[Ae]+oe)/Pn|0)+(Pe/dn|0)+Wt*Ve,Jr[Ae--]=Ye%Pn;Jr[Ae]=oe}return oe?++we:Jr.splice(0,1),yn(ie,Jr,we)},St.negated=function(){var ie=new Ke(this);return ie.s=-ie.s||null,ie},St.plus=function(ie,R){var oe,we=this,se=we.s;if(R=(ie=new Ke(ie,R)).s,!se||!R)return new Ke(NaN);if(se!=R)return ie.s=-R,we.minus(ie);var Ae=we.e/v,Oe=ie.e/v,Pe=we.c,je=ie.c;if(!Ae||!Oe){if(!Pe||!je)return new Ke(se/0);if(!Pe[0]||!je[0])return je[0]?ie:new Ke(Pe[0]?we:0*se)}if(Ae=x(Ae),Oe=x(Oe),Pe=Pe.slice(),se=Ae-Oe){for(se>0?(Oe=Ae,oe=je):(se=-se,oe=Pe),oe.reverse();se--;oe.push(0));oe.reverse()}for((se=Pe.length)-(R=je.length)<0&&(oe=je,je=Pe,Pe=oe,R=se),se=0;R;)se=(Pe[--R]=Pe[R]+je[R]+se)/w|0,Pe[R]=w===Pe[R]?0:Pe[R]%w;return se&&(Pe=[se].concat(Pe),++Oe),yn(ie,Pe,Oe)},St.precision=St.sd=function(ie,R){var oe,we,se,Ae=this;if(ie!=null&&ie!==!!ie)return p(ie,1,S),R==null?R=fn:p(R,0,8),ar(new Ke(Ae),ie,R);if(!(oe=Ae.c))return null;if(we=(se=oe.length-1)*v+1,se=oe[se]){for(;se%10==0;se/=10,we--);for(se=oe[0];se>=10;se/=10,we++);}return ie&&Ae.e+1>we&&(we=Ae.e+1),we},St.shiftedBy=function(ie){return p(ie,-9007199254740991,y),this.times("1e"+ie)},St.squareRoot=St.sqrt=function(){var ie,R,oe,we,se,Ae=this,Oe=Ae.c,Pe=Ae.s,je=Ae.e,Ye=An+4,Ve=new Ke("0.5");if(Pe!==1||!Oe||!Oe[0])return new Ke(!Pe||Pe<0&&(!Oe||Oe[0])?NaN:Oe?Ae:1/0);if((Pe=Math.sqrt(+mr(Ae)))==0||Pe==1/0?(((R=I(Oe)).length+je)%2==0&&(R+="0"),Pe=Math.sqrt(+R),je=x((je+1)/2)-(je<0||je%2),oe=new Ke(R=Pe==1/0?"5e"+je:(R=Pe.toExponential()).slice(0,R.indexOf("e")+1)+je)):oe=new Ke(Pe+""),oe.c[0]){for((Pe=(je=oe.e)+Ye)<3&&(Pe=0);;)if(se=oe,oe=Ve.times(se.plus(W(Ae,se,Ye,1))),I(se.c).slice(0,Pe)===(R=I(oe.c)).slice(0,Pe)){if(oe.e<je&&--Pe,(R=R.slice(Pe-3,Pe+1))!="9999"&&(we||R!="4999")){+R&&(+R.slice(1)||R.charAt(0)!="5")||(ar(oe,oe.e+An+2,1),ie=!oe.times(oe).eq(Ae));break}if(!we&&(ar(se,se.e+An+2,0),se.times(se).eq(Ae))){oe=se;break}Ye+=4,Pe+=4,we=1}}return ar(oe,oe.e+An+1,fn,ie)},St.toExponential=function(ie,R){return ie!=null&&(p(ie,0,S),ie++),Qr(this,ie,R,1)},St.toFixed=function(ie,R){return ie!=null&&(p(ie,0,S),ie=ie+this.e+1),Qr(this,ie,R)},St.toFormat=function(ie,R,oe){var we,se=this;if(oe==null)ie!=null&&R&&typeof R=="object"?(oe=R,R=null):ie&&typeof ie=="object"?(oe=ie,ie=R=null):oe=de;else if(typeof oe!="object")throw Error(g+"Argument not an object: "+oe);if(we=se.toFixed(ie,R),se.c){var Ae,Oe=we.split("."),Pe=+oe.groupSize,je=+oe.secondaryGroupSize,Ye=oe.groupSeparator||"",Ve=Oe[0],pt=Oe[1],rr=se.s<0,Wt=rr?Ve.slice(1):Ve,Jr=Wt.length;if(je&&(Ae=Pe,Pe=je,je=Ae,Jr-=Ae),Pe>0&&Jr>0){for(Ae=Jr%Pe||Pe,Ve=Wt.substr(0,Ae);Ae<Jr;Ae+=Pe)Ve+=Ye+Wt.substr(Ae,Pe);je>0&&(Ve+=Ye+Wt.slice(Ae)),rr&&(Ve="-"+Ve)}we=pt?Ve+(oe.decimalSeparator||"")+((je=+oe.fractionGroupSize)?pt.replace(new RegExp("\\d{"+je+"}\\B","g"),"$&"+(oe.fractionGroupSeparator||"")):pt):Ve}return(oe.prefix||"")+we+(oe.suffix||"")},St.toFraction=function(ie){var R,oe,we,se,Ae,Oe,Pe,je,Ye,Ve,pt,rr,Wt=this,Jr=Wt.c;if(ie!=null&&(!(Pe=new Ke(ie)).isInteger()&&(Pe.c||Pe.s!==1)||Pe.lt(si)))throw Error(g+"Argument "+(Pe.isInteger()?"out of range: ":"not an integer: ")+mr(Pe));if(!Jr)return new Ke(Wt);for(R=new Ke(si),Ye=oe=new Ke(si),we=je=new Ke(si),rr=I(Jr),Ae=R.e=rr.length-Wt.e-1,R.c[0]=_[(Oe=Ae%v)<0?v+Oe:Oe],ie=!ie||Pe.comparedTo(R)>0?Ae>0?R:Ye:Pe,Oe=vi,vi=1/0,Pe=new Ke(rr),je.c[0]=0;Ve=W(Pe,R,0,1),(se=oe.plus(Ve.times(we))).comparedTo(ie)!=1;)oe=we,we=se,Ye=je.plus(Ve.times(se=Ye)),je=se,R=Pe.minus(Ve.times(se=R)),Pe=se;return se=W(ie.minus(oe),we,0,1),je=je.plus(se.times(Ye)),oe=oe.plus(se.times(we)),je.s=Ye.s=Wt.s,pt=W(Ye,we,Ae*=2,fn).minus(Wt).abs().comparedTo(W(je,oe,Ae,fn).minus(Wt).abs())<1?[Ye,we]:[je,oe],vi=Oe,pt},St.toNumber=function(){return+mr(this)},St.toPrecision=function(ie,R){return ie!=null&&p(ie,1,S),Qr(this,ie,R,2)},St.toString=function(ie){var R,oe=this,we=oe.s,se=oe.e;return se===null?we?(R="Infinity",we<0&&(R="-"+R)):R="NaN":(ie==null?R=se<=mi||se>=po?C(I(oe.c),se):M(I(oe.c),se,"0"):ie===10&&it?R=M(I((oe=ar(new Ke(oe),An+se+1,fn)).c),oe.e,"0"):(p(ie,2,ke.length,"Base"),R=pe(M(I(oe.c),se,"0"),10,ie,we,!0)),we<0&&oe.c[0]&&(R="-"+R)),R},St.valueOf=St.toJSON=function(){return mr(this)},St._isBigNumber=!0,St[Symbol.toStringTag]="BigNumber",St[Symbol.for("nodejs.util.inspect.custom")]=St.valueOf,D!=null&&Ke.set(D),Ke}();const ce={ROUNDING_MODE:B.ROUND_DOWN};function he(P){return new TextEncoder().encode(P)}function F(P){return typeof P=="string"?F(j(P)):new TextDecoder().decode(P)}B.config(ce);const U="UNKNOWN_ERROR",K="INVALID_ARGUMENT";function ne(P,D=U,W={}){const pe=[];Object.keys(W).forEach(rt=>{try{pe.push(rt+"="+JSON.stringify(W[rt]))}catch{pe.push(rt+"="+JSON.stringify(W[rt].toString()))}});const Se=P;pe.length&&(P+=" ("+pe.join(", ")+")");const Ce=new Error(P);return Ce.reason=Se,Ce.code=D,Object.keys(W).forEach(function(rt){Ce[rt]=W[rt]}),Ce}function j(P){if(typeof P!="string")throw new Error("hexToBytes only accept strings, got: "+typeof P);if(P.substr(0,2)==="0x")return j(P.substr(2));const D=new Uint8Array(Math.ceil(P.length/2));let W=0;for(let pe=0;pe<P.length;pe+=2){const Se=parseInt(P.substr(pe,2),16);if(isNaN(Se))throw new Error("Cannot read hex string:"+JSON.stringify(P));D[W]=Se,W++}return D}function q(P){return Array.from(P).map(D=>D.toString(16).padStart(2,"0")).join("")}function V(P,D){if(typeof P=="string"){if(D&&D.encoding==="hex"&&typeof P=="string"){let W=P;W.length>2&&W.substr(0,2)==="0x"&&(W=W.substr(2));const pe=j(W);return c.keccak256(pe)}return c.keccak256(he(P))}return c.keccak256(P)}const $={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function H(P,D,W){return new Array(D-P.length+1).join(W||"0")+P}function L(P){let D="",W=0;const pe=P.length;for(P.substring(0,2)==="0x"&&(W=2);W<pe;W+=2){const Se=parseInt(P.substr(W,2),16);D+=String.fromCharCode(Se)}return D}function k(P){return tr(P)&&P.name&&P.name.indexOf("(")!==-1?P.name:P.name+"("+ge(!1,P.inputs||[]).join(",")+")"}function G(...P){const D=P.reduce((Se,Ce)=>Se+Ce.length,0),W=new Uint8Array(D);let pe=0;for(const Se of P)W.set(Se,pe),pe+=Se.length;return W}function ge(P,D){const W=[];return D.forEach(function(pe){if(typeof pe.components=="object"){if(pe.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let Se="";const Ce=pe.type.indexOf("[");Ce>=0&&(Se=pe.type.substring(Ce));const rt=ge(P,pe.components);nr(rt)&&P?W.push("tuple("+rt.join(",")+")"+Se):P?W.push("("+rt+")"):W.push("("+rt.join(",")+")"+Se)}else W.push(pe.type)}),W}function Q(P){const D=P.indexOf("("),W=P.indexOf(")");return D!==-1&&W!==-1?P.substr(0,D):P}function te(P){const D=P.indexOf("("),W=P.indexOf(")");return D!==-1&&W!==-1?P.substr(D+1,W-D-1).replace(" ",""):""}function ue(P){return P==null?P:Yt(P).toNumber()}function T(P){return Yt(P).toNumber()}function fe(P){return Mt(P)?P.toString(10):""+P}function Ge(P){return typeof P=="string"&&!P.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(P)?"0x"+P:gt(P)}function tt(P){if(typeof P=="string")return P.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(P)?gt(P):"0x"+q(he(P));if(P instanceof Uint8Array)return"0x"+q(P);throw new Error(`toStringData: Error trying to convert ${P} (${typeof P}) to a hex string.`)}function mt(P){return typeof P=="boolean"?P:Yt(P).toNumber()!==0}function vt(P){const D=Yt(P),W=D.toString(16);return D.isLessThan(0)?"-0x"+W.substr(1):"0x"+W}function gt(P){if(ir(P))return vt(+P);if(Mt(P))return vt(P);if(cr(P)){const D=P;if(D.indexOf("-0x")===0)return vt(D);if(D.indexOf("0x")===0)return D;if(!isFinite(D))return q(he(D))}if(P instanceof Uint8Array)return"0x"+q(P);if(nr(P)||tr(P))throw new Error("toHex can only be called with scalar values, not objects or arrays");return vt(P)}function Lt(P){const D=P?P.toLowerCase():"ether",W=$[D];if(W===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify($,null,2));return new B(W,10)}function Yt(P){let D=P||0;return Mt(D)?D:(typeof D=="string"&&(D=D.trim()),typeof D!="string"||D.indexOf("0x")!==0&&D.indexOf("-0x")!==0?D instanceof Uint8Array?new B(q(D),16):new B(D,10):new B(D.replace("0x","").toLowerCase(),16))}function _r(P){return new B(new Array(P).fill("1").join(""),2)}function Rt(P,D=256){const W=Yt(P).integerValue();return W.isLessThan(0)?_r(D).plus(W).plus(1):W}function Pt(P,D){return H(P.toString(2),D,"0")[0]==="1"}function kt(P){if(typeof P!="string")throw ne("invalid address",K,{arg:"address",value:P});if(P.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return P.trim().substring(0,2)!=="0x"&&(P="0x"+P),$t(P);throw ne("invalid address",K,{arg:"address",value:P})}function Nt(P,D=256){if(Pt(P,D)){const W=_r(D);return P.minus(W).minus(1)}return P}function Kt(P){return/^0x[0-9a-f]{40}$/i.test(P)}function Ut(P){return!!/^(0x)?[0-9a-f]{40}$/i.test(P)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(P)&&!/^(0x)?[0-9A-F]{40}$/.test(P))||Vt(P))}function Vt(P){const D=P.replace("0x",""),W=V(D.toLowerCase());for(let pe=0;pe<40;pe++)if(parseInt(W[pe],16)>7&&D[pe].toUpperCase()!==D[pe]||parseInt(W[pe],16)<=7&&D[pe].toLowerCase()!==D[pe])return!1;return!0}function $t(P){if(P===void 0)return"";const D=P.toLowerCase().replace("0x",""),W=V(D);let pe="0x";for(let Se=0;Se<D.length;Se++)parseInt(W[Se],16)>7?pe+=D[Se].toUpperCase():pe+=D[Se];return pe}function Dt(P){if(!Array.isArray(P))throw new Error(`Value was not an array: ${JSON.stringify(P)}`);return P}function qt(P){return Kt(P)?P:/^[0-9a-f]{40}$/.test(P)?"0x"+P:"0x"+H(gt(P).substr(2),40)}function Mt(P){return P instanceof B}function cr(P){return typeof P=="string"||P&&P.constructor&&P.constructor.name==="String"}function tr(P){return P!==null&&!Array.isArray(P)&&typeof P=="object"}function ir(P){return typeof P=="boolean"}function nr(P){return Array.isArray(P)}var vr,wn;function Yr(P,D){if(!P)throw new Error("jsonrpc method should be specified!");if(typeof P!="string")throw new Error(`jsonrpc must be a string, got ${typeof P}!`);return r.messageId++,{jsonrpc:"2.0",id:r.messageId,method:P,params:D||[]}}function ai(P){return Array.isArray(P)?P.every(D):D(P);function D(W){return!!W&&!("error"in W)&&W.jsonrpc==="2.0"&&typeof W.id=="number"&&W.result!==void 0}}r.TransactionStatus=void 0,(vr=r.TransactionStatus||(r.TransactionStatus={})).pending="pending",vr.confirmed="confirmed",vr.failed="failed",r.TransactionType=void 0,(wn=r.TransactionType||(r.TransactionType={})).queued="queued",wn.dropped="dropped",wn.replaced="replaced",wn.pending="pending",wn.reverted="reverted",wn.confirmed="confirmed",r.messageId=0;function Dn(P){return Yt(P)}function $n(P){return P==="latest"||P==="pending"||P==="earliest"}function Kn(P){return P===void 0?"latest":Ar(P)}function Ar(P){return P==null?null:$n(P)?P:gt(P)}function Mr(P){return P.from&&(P.from=Xe(P.from)),P.to&&(P.to=Xe(P.to)),P.gasPrice!==void 0&&(P.gasPrice=vt(P.gasPrice)),P.gas!==void 0&&(P.gas=vt(P.gas)),P.value!==void 0&&(P.value=vt(P.value)),P.nonce!==void 0&&(P.nonce=vt(P.nonce)),P.data&&!P.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(P.data)&&(P.data="0x"+P.data),P}function Er(P){if(typeof P!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(P));if(P.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(P));if(P.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(P));return P}function _e(P){if(typeof P!="object")throw new Error("Did not provide transaction options");if(!P.from)throw new Error('Missing "from" in transaction options');return P.from=Xe(P.from),P.to&&(P.to=Xe(P.to)),P.gasPrice!==void 0&&(P.gasPrice=vt(P.gasPrice)),P.gas!==void 0&&(P.gas=vt(P.gas)),P.value!==void 0&&(P.value=vt(P.value)),P.nonce!==void 0&&(P.nonce=vt(P.nonce)),P.data&&!P.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(P.data)&&(P.data="0x"+P.data),P}function ee(P){return P?(P.blockNumber!==null&&(P.blockNumber=T(P.blockNumber)),P.transactionIndex!==null&&(P.transactionIndex=T(P.transactionIndex)),P.nonce=T(P.nonce),P.gas=T(P.gas),P.gasPrice=Yt(P.gasPrice),P.value=Yt(P.value),P):null}function ve(P){return P?(P.blockNumber!==null&&(P.blockNumber=T(P.blockNumber)),P.transactionIndex!==null&&(P.transactionIndex=T(P.transactionIndex)),P.cumulativeGasUsed=T(P.cumulativeGasUsed),P.gasUsed=T(P.gasUsed),P.logs&&nr(P.logs)&&(P.logs=P.logs.map(function(D){return ze(D)})),P.status=T(P.status||""),P):null}function Re(P){return P?(P.gasLimit=T(P.gasLimit),P.gasUsed=T(P.gasUsed),P.size=T(P.size),P.timestamp=T(P.timestamp),P.number!==null&&(P.number=T(P.number)),P.difficulty=Yt(P.difficulty),P.totalDifficulty=Yt(P.totalDifficulty),nr(P.transactions)&&P.transactions.forEach(function(D,W){cr(D)||(P.transactions[W]=ee(D)||P.transactions[W])}),P):null}function ze(P){return P&&(P.blockNumber&&(P.blockNumber=T(P.blockNumber)),P.transactionIndex&&(P.transactionIndex=T(P.transactionIndex)),P.logIndex&&(P.logIndex=T(P.logIndex)),P)}function Xe(P){if(Kt(P))return P;if(Ut(P))return"0x"+P;throw new Error(`Invalid address: ${JSON.stringify(P)}`)}function st(P){return P}function lt(P){return P&&(P.startingBlock=T(P.startingBlock),P.currentBlock=T(P.currentBlock),P.highestBlock=T(P.highestBlock),P.knownStates&&(P.knownStates=T(P.knownStates),P.pulledStates=T(P.pulledStates)),P)}function _t(P){if(P===null)throw ne("cannot convert null value to array",K,{arg:"value",value:P});if(P instanceof Uint8Array)return new Uint8Array(P);if(typeof P=="string"){const D=P.match(/^(0x)?[0-9a-fA-F]*$/);if(!D)throw ne("invalid hexidecimal string",K,{arg:"value",value:P});if(D[1]!=="0x")throw ne("hex string must have 0x prefix",K,{arg:"value",value:P});(P=P.substring(2)).length%2&&(P="0"+P);const W=[];for(let pe=0;pe<P.length;pe+=2)W.push(parseInt(P.substr(pe,2),16));return new Uint8Array(W)}if(function(D){if(!D||parseInt(String(D.length))!==D.length||typeof D=="string")return!1;for(let W=0;W<D.length;W++){const pe=D[W];if(pe<0||pe>=256||parseInt(String(pe))!==pe)return!1}return!0}(P))return new Uint8Array(P);throw ne("invalid arrayify value",void 0,{arg:"value",value:P,type:typeof P})}function le(P,D,W){Object.defineProperty(P,D,{enumerable:!0,value:W,writable:!1})}const Z=new B(-1),ye=new B(0),Me=new B(1),Le=new B("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function wt(P){return function(D,W){function pe(rt){return new Error('unexpected character "'+D[rt]+'" at position '+rt+' in "'+D+'"')}const Se={type:"",name:"",state:{allowType:!0}};let Ce=Se;for(let rt=0;rt<D.length;rt++){const At=D[rt];switch(At){case"(":if(!Ce.state.allowParams)throw pe(rt);Ce.state.allowType=!1,Ce.type=It(Ce.type),Ce.components=[{type:"",name:"",parent:Ce,state:{allowType:!0}}],Ce=Ce.components[0];break;case")":delete Ce.state,W&&Ce.name==="indexed"&&(Ce.indexed=!0,Ce.name=""),Ce.type=It(Ce.type);const Ft=Ce;if(Ce=Ce.parent,!Ce)throw pe(rt);delete Ft.parent,Ce.state.allowParams=!1,Ce.state.allowName=!0,Ce.state.allowArray=!0;break;case",":delete Ce.state,W&&Ce.name==="indexed"&&(Ce.indexed=!0,Ce.name=""),Ce.type=It(Ce.type);const Jt={type:"",name:"",parent:Ce.parent,state:{allowType:!0}};Ce.parent.components.push(Jt),delete Ce.parent,Ce=Jt;break;case" ":Ce.state.allowType&&Ce.type!==""&&(Ce.type=It(Ce.type),delete Ce.state.allowType,Ce.state.allowName=!0,Ce.state.allowParams=!0),Ce.state.allowName&&Ce.name!==""&&(W&&Ce.name==="indexed"?(Ce.indexed=!0,Ce.name=""):Ce.state.allowName=!1);break;case"[":if(!Ce.state.allowArray)throw pe(rt);Ce.type+=At,Ce.state.allowArray=!1,Ce.state.allowName=!1,Ce.state.readArray=!0;break;case"]":if(!Ce.state.readArray)throw pe(rt);Ce.type+=At,Ce.state.readArray=!1,Ce.state.allowArray=!0,Ce.state.allowName=!0;break;default:if(Ce.state.allowType)Ce.type+=At,Ce.state.allowParams=!0,Ce.state.allowArray=!0;else if(Ce.state.allowName)Ce.name+=At,delete Ce.state.allowArray;else{if(!Ce.state.readArray)throw pe(rt);Ce.type+=At}}}if(Ce.parent)throw new Error("unexpected eof");return delete Se.state,W&&Ce.name==="indexed"&&(Ce.indexed=!0,Ce.name=""),Se.type=It(Se.type),Se}(P,!0)}function It(P){return P.match(/^uint($|[^1-9])/)?P="uint256"+P.substring(4):P.match(/^int($|[^1-9])/)&&(P="int256"+P.substring(3)),P}const gr=new RegExp(/^bytes([0-9]*)$/),lr=new RegExp(/^(u?int)([0-9]*)$/),en=new RegExp(/^(.*)\[([0-9]*)\]$/),yr=function(P,D){const W=P.match(lr);return W&&parseInt(W[2])<=48?D.toNumber():D};class xr{constructor(D,W,pe,Se="",Ce){this.coerceFunc=D,this.name=W,this.type=pe,this.localName=Se,this.dynamic=Ce}}class on extends xr{constructor(D){super(D.coerceFunc,D.name,D.type,void 0,D.dynamic),le(this,"coder",D)}encode(D){return this.coder.encode(D)}decode(D,W){return this.coder.decode(D,W)}}class sr extends xr{constructor(D,W){super(D,"null","",W,!1)}encode(D){return _t([])}decode(D,W){if(W>D.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function Ur(P,D){return new B(P.toString(2).substr(-D),2)}class gn extends xr{constructor(D,W,pe,Se){const Ce=(pe?"int":"uint")+8*W;super(D,Ce,Ce,Se,!1),this.size=W,this.signed=pe}encode(D){try{let W=Yt(D);if(this.signed){let Se=Ur(Le,8*this.size-1);if(W.gt(Se))throw new Error("out-of-bounds");if(Se=Se.plus(Me).multipliedBy(Z),W.lt(Se))throw new Error("out-of-bounds")}else if(W.lt(ye)||W.gt(Ur(Le,8*this.size)))throw new Error("out-of-bounds");W=Ur(Rt(W,8*this.size),8*this.size),this.signed&&(W=Rt(Nt(W,8*this.size),256));const pe=H(Rt(W).toString(16),64);if(pe.indexOf("NaN")!==-1)throw ne("invalid number value, NaN",K,{arg:this.localName,coderType:this.name,value:D,v:W,twosComplement:Rt(W),twosComplement16:Rt(W).toString(16),pad:H(Rt(W).toString(16),64),size:this.size});return j(pe)}catch(W){throw ne("invalid number value",K,{arg:this.localName,coderType:this.name,value:D,message:W.toString()})}}decode(D,W){if(D.length<W+32)throw ne("insufficient data for "+this.name+" type",K,{arg:this.localName,coderType:this.name,value:gt(D.slice(W,W+32))});const pe=32-this.size;let Se=new B(q(D.slice(W+pe,W+32)),16);return Se=this.signed?Nt(Se,8*this.size):Ur(Se,8*this.size),{consumed:32,value:this.coerceFunc(this.name,Se)}}}const Br=new gn(function(P,D){return D},32,!1,"none");class Zn extends xr{constructor(D,W,pe){const Se="bytes"+W;super(D,Se,Se,pe,!1),this.length=W}encode(D){const W=new Uint8Array(32);try{if(typeof D=="string"&&D.length%2!=0)throw new Error("hex string cannot be odd-length");const pe=_t(D);if(pe.length>this.length)throw new Error("incorrect data length");W.set(pe)}catch(pe){throw ne("invalid "+this.name+" value. Use hex strings or Uint8Array",K,{arg:this.localName,coderType:this.name,value:pe.value||D,details:pe.message})}return W}decode(D,W){if(D.length<W+32)throw ne("insufficient data for "+this.name+" type",K,{arg:this.localName,coderType:this.name,value:gt(D.slice(W,W+32))});return{consumed:32,value:this.coerceFunc(this.name,D.slice(W,W+this.length))}}}function Ii(P){const D=32*Math.ceil(P.length/32),W=new Uint8Array(D-P.length);return G(Br.encode(P.length),P,W)}function ei(P,D,W){if(P.length<D+32)throw ne("insufficient data for dynamicBytes length",K,{arg:W,coderType:"dynamicBytes",value:gt(P.slice(D,D+32))});let pe=Br.decode(P,D).value;try{pe=pe.toNumber()}catch(Se){throw Se("dynamic bytes count too large",K,{arg:W,coderType:"dynamicBytes",value:pe.toString()})}if(P.length<D+32+pe)throw ne("insufficient data for dynamicBytes type",K,{arg:W,coderType:"dynamicBytes",value:gt(P.slice(D,D+32+pe))});return{consumed:32+32*Math.ceil(pe/32),value:P.slice(D+32,D+32+pe)}}function Oi(P){return 32*Math.ceil(P/32)}function Pi(P,D){if(!Array.isArray(D)){if(!D||typeof D!="object")throw ne("invalid tuple value",K,{coderType:"tuple",value:D});{const Ft=[];P.forEach(function(Jt){Ft.push(D[Jt.localName])}),D=Ft}}if(P.length!==D.length)throw ne("types/value length mismatch",K,{coderType:"tuple",value:D});const W=[];P.forEach(function(Ft,Jt){W.push({dynamic:Ft.dynamic,value:Ft.encode(D[Jt])})});let pe=0,Se=0;W.forEach(function(Ft){Ft.dynamic?(pe+=32,Se+=Oi(Ft.value.length)):pe+=Oi(Ft.value.length)});let Ce=0,rt=pe;const At=new Uint8Array(pe+Se);return W.forEach(function(Ft){Ft.dynamic?(At.set(Br.encode(rt),Ce),Ce+=32,At.set(Ft.value,rt),rt+=Oi(Ft.value.length)):(At.set(Ft.value,Ce),Ce+=Oi(Ft.value.length))}),At}class oi extends Array{}class jn extends xr{constructor(D,W,pe,Se){super(D,"array",W.type+"["+(pe>=0?pe:"")+"]",Se,pe===-1||W.dynamic),this.coder=W,this.length=pe}encode(D){if(!Array.isArray(D))throw ne("expected array value",K,{arg:this.localName,coderType:"array",value:D});let W=this.length,pe=new Uint8Array(0);W===-1&&(W=D.length,pe=Br.encode(W)),function(Ce,rt,At){if(At||(At=""),Ce<rt)throw ne("missing argument"+At,"MISSING_ARGUMENT",{count:Ce,expectedCount:rt});if(Ce>rt)throw ne("too many arguments"+At,"UNEXPECTED_ARGUMENT",{count:Ce,expectedCount:rt})}(W,D.length,"in coder array"+(this.localName?" "+this.localName:""));const Se=[];for(let Ce=0;Ce<D.length;Ce++)Se.push(this.coder);return G(pe,Pi(Se,D))}decode(D,W){let pe=0,Se=this.length;if(Se===-1){let At;try{At=Br.decode(D,W)}catch(Ft){throw ne("insufficient data for dynamic array length",K,{arg:this.localName,coderType:"array",value:Ft.value})}try{Se=At.value.toNumber()}catch{throw ne("array count too large",K,{arg:this.localName,coderType:"array",value:At.value.toString()})}pe+=At.consumed,W+=At.consumed}const Ce=[];for(let At=0;At<Se;At++)Ce.push(new on(this.coder));const rt=function(At,Ft,Jt){const Ti=Jt;let xn=0;const St=[];return At.forEach(function(si){let An;if(si.dynamic){const fn=Br.decode(Ft,Jt);An=si.decode(Ft,Ti+fn.value.toNumber()),An.consumed=fn.consumed}else An=si.decode(Ft,Jt);An.value!==void 0&&St.push(An.value),Jt+=An.consumed,xn+=An.consumed}),{value:St,consumed:xn}}(Ce,D,W);return rt.consumed+=pe,rt.value=this.coerceFunc(this.type,rt.value),rt}}class ra extends xr{constructor(D,W,pe){let Se=!1;const Ce=[];W.forEach(function(rt){rt.dynamic&&(Se=!0),Ce.push(rt.type)}),super(D,"tuple","tuple("+Ce.join(",")+")",pe,Se),this.coders=W}encode(D){return Pi(this.coders,D)}decode(D,W){const pe=function(Se,Ce,rt){const At=rt;let Ft=0;const Jt=new oi;return Se.forEach(function(Ti){let xn;if(Ti.dynamic){const St=Br.decode(Ce,rt);xn=Ti.decode(Ce,At+St.value.toNumber()),xn.consumed=St.consumed}else xn=Ti.decode(Ce,rt);xn.value!==void 0&&Jt.push(xn.value),rt+=xn.consumed,Ft+=xn.consumed}),Se.forEach(function(Ti,xn){let St=Ti.localName;St&&(St==="length"&&(St="_length"),Jt[St]!==null&&Jt[St]!==void 0||(Jt[St]=Jt[xn]))}),{value:Jt,consumed:Ft}}(this.coders,D,W);return pe.value=this.coerceFunc(this.type,pe.value),pe}}const $i={address:class extends xr{constructor(P,D){super(P,"address","address",D,!1)}encode(P){const D=new Uint8Array(32),W=P.trim();if(!Ut(W))throw ne("invalid address format",K,{arg:this.localName,coderType:"address",value:P});try{D.set(j(Xe(W)),12)}catch(pe){throw ne(`invalid address (${pe.message})`,K,{arg:this.localName,coderType:"address",value:P})}return D}decode(P,D){if(P.length<D+32)throw ne("insufficuent data for address type",K,{arg:this.localName,coderType:"address",value:gt(P.slice(D,D+32)),missingBytes:D+32-P.length});return{consumed:32,value:this.coerceFunc("address",kt(gt(P.slice(D+12,D+32))))}}},bool:class extends xr{constructor(P,D){super(P,"bool","bool",D,!1)}encode(P){return Br.encode(P?1:0)}decode(P,D){try{const W=Br.decode(P,D);return{consumed:W.consumed,value:this.coerceFunc("bool",!W.value.isZero())}}catch(W){throw W.reason==="insufficient data for uint256 type"?ne("insufficient data for boolean type",K,{arg:this.localName,coderType:"boolean",value:W.value}):W}}},string:class extends xr{constructor(P,D){super(P,"string","string",D,!0)}encode(P){if(typeof P!="string")throw ne("invalid string value",K,{arg:this.localName,coderType:"string",value:P});return Ii(he(P))}decode(P,D){const W=ei(P,D,this.localName);return W.value=this.coerceFunc("string",F(W.value)),W}},bytes:class extends xr{constructor(P,D){super(P,"bytes","bytes",D,!0)}encode(P){try{return Ii(_t(P))}catch(D){throw D("invalid bytes value",K,{arg:this.localName,coderType:"bytes",value:D.value})}}decode(P,D){const W=ei(P,D,this.localName);return W.value=this.coerceFunc("bytes",W.value),W}},function:class extends Zn{constructor(P,D){super(P,24,D)}}};function _a(P,D){const W=$i[D.type];if(W)return new W(P,D.name);let pe=D.type.match(lr);if(pe){const Se=parseInt(pe[2]||"256");if(Se===0||Se>256||Se%8!=0)throw ne("invalid "+pe[1]+" bit length",K,{arg:"param",value:D});return new gn(P,Se/8,pe[1]==="int",D.name)}if(pe=D.type.match(gr),pe){const Se=parseInt(pe[1]);if(Se===0||Se>32)throw ne("invalid bytes length",K,{arg:"param",value:D});return new Zn(P,Se,D.name)}if(pe=D.type.match(en),pe){const Se=Object.assign({},D),Ce=parseInt(pe[2]||"-1");return Se.type=pe[1],new jn(P,_a(P,Se),Ce,D.name)}if(D.type.substring(0,5)==="tuple")return function(Se,Ce,rt){Ce||(Ce=[]);const At=Ce.map(Ft=>_a(Se,Ft));return new ra(Se,At,rt)}(P,D.components,D.name);if(D.type==="")return new sr(P,D.name);throw ne("invalid type",K,{arg:"type",value:D.type,fullType:D})}class ss{constructor(D){(function(W,pe){if(!(W instanceof pe))throw ne("missing new","MISSING_NEW",{name:pe.name})})(this,ss),D||(D=yr),le(this,"coerceFunc",D)}encode(D,W){if(D.length!==W.length)throw ne("types/values length mismatch",K,{count:{types:D.length,values:W.length},value:{types:D,values:W}});const pe=D.map(Se=>typeof Se=="string"?wt(Se):Se).map(Se=>_a(this.coerceFunc,Se));return new ra(this.coerceFunc,pe,"_").encode(W)}decode(D,W){const pe=D.map(Se=>typeof Se=="string"?wt(Se):Se).map(Se=>_a(this.coerceFunc,Se));return new ra(this.coerceFunc,pe,"_").decode(W,0).value}}const X=new ss;var me,re;function Ee(P,D,W,pe){var Se,Ce=arguments.length,rt=Ce<3?D:pe===null?pe=Object.getOwnPropertyDescriptor(D,W):pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")rt=Reflect.decorate(P,D,W,pe);else for(var At=P.length-1;At>=0;At--)(Se=P[At])&&(rt=(Ce<3?Se(rt):Ce>3?Se(D,W,rt):Se(D,W))||rt);return Ce>3&&rt&&Object.defineProperty(D,W,rt),rt}function be(P,D){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(P,D)}r.coder=void 0,(me=r.coder||(r.coder={})).encodeParams=function(P,D){return q(X.encode(P,D))},me.decodeParams=function(P,D){if(P.length>0&&(!D||D==="0x"||D==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return X.decode(P,j("0x"+D.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class Ie{constructor(D){this.callName=D.callName,this.params=D.params||0,this.inputFormatter=D.inputFormatter||null,this.outputFormatter=D.outputFormatter}validateArgs(D){if(D.length!==this.params)throw W=this.callName,pe=D.length,Se=this.params,new Error(`Invalid number of input parameters to RPC method "${W}" given: ${pe}, expected: ${Se}`);var W,pe,Se}formatInput(D){return this.inputFormatter?this.inputFormatter.map(function(W,pe){return W?W(D[pe]):D[pe]}):D}formatOutput(D){return D!==null?this.outputFormatter(D):null}toPayload(D){const W=this.formatInput(D);return this.validateArgs(W),{method:this.callName,params:W}}async execute(D,...W){const pe=this.toPayload(W);if(!D)throw new Error("Missing RequestManager in method#exec");const Se=await D.sendAsync(pe);return this.formatOutput(Se)}}class Je{constructor(D){this.getter=D.getter,this.outputFormatter=D.outputFormatter}formatOutput(D){return this.outputFormatter(D)}async execute(D,...W){const pe=await D.sendAsync({method:this.getter,params:[]});return this.formatOutput(pe)}}function ft(P){return new Promise(D=>setTimeout(D,P))}r.eth=void 0,(re=r.eth||(r.eth={})).eth_getBalance=new Ie({callName:"eth_getBalance",params:2,inputFormatter:[Xe,Kn],outputFormatter:Dn}),re.eth_getStorageAt=new Ie({callName:"eth_getStorageAt",params:3,inputFormatter:[Xe,gt,Kn],outputFormatter:Ge}),re.eth_getCode=new Ie({callName:"eth_getCode",params:2,inputFormatter:[Xe,Kn],outputFormatter:Ge}),re.eth_getBlockByHash=new Ie({callName:"eth_getBlockByHash",params:2,inputFormatter:[Ar,function(P){return!!P}],outputFormatter:Re}),re.eth_getBlockByNumber=new Ie({callName:"eth_getBlockByNumber",params:2,inputFormatter:[Ar,function(P){return!!P}],outputFormatter:Re}),re.eth_getUncleByBlockHashAndIndex=new Ie({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[Ar,gt],outputFormatter:Re}),re.eth_getUncleByBlockNumberAndIndex=new Ie({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[Ar,gt],outputFormatter:Re}),re.eth_getBlockTransactionCountByHash=new Ie({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[Ar],outputFormatter:T}),re.eth_getBlockTransactionCountByNumber=new Ie({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[Ar],outputFormatter:T}),re.eth_getUncleCountByBlockHash=new Ie({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[Ar],outputFormatter:T}),re.eth_getUncleCountByBlockNumber=new Ie({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[Ar],outputFormatter:T}),re.eth_getTransactionByHash=new Ie({callName:"eth_getTransactionByHash",params:1,inputFormatter:[Er],outputFormatter:ee}),re.eth_getTransactionByBlockHashAndIndex=new Ie({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[Ar,gt],outputFormatter:ee}),re.eth_getTransactionByBlockNumberAndIndex=new Ie({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[Ar,gt],outputFormatter:ee}),re.eth_getTransactionReceipt=new Ie({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[Er],outputFormatter:ve}),re.eth_getTransactionCount=new Ie({callName:"eth_getTransactionCount",params:2,inputFormatter:[Xe,Kn],outputFormatter:T}),re.eth_sendRawTransaction=new Ie({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:Ge}),re.web3_sha3=new Ie({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:Ge}),re.eth_sendTransaction=new Ie({callName:"eth_sendTransaction",params:1,inputFormatter:[_e],outputFormatter:Ge}),re.eth_sign=new Ie({callName:"eth_sign",params:2,inputFormatter:[Xe,null],outputFormatter:Ge}),re.eth_call=new Ie({callName:"eth_call",params:2,inputFormatter:[Mr,Kn],outputFormatter:Ge}),re.eth_estimateGas=new Ie({callName:"eth_estimateGas",params:1,inputFormatter:[Mr],outputFormatter:T}),re.eth_submitWork=new Ie({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:mt}),re.eth_getWork=new Ie({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:Dt}),re.eth_coinbase=new Je({getter:"eth_coinbase",outputFormatter:qt}),re.eth_mining=new Je({getter:"eth_mining",outputFormatter:mt}),re.eth_hashrate=new Je({getter:"eth_hashrate",outputFormatter:T}),re.eth_syncing=new Je({getter:"eth_syncing",outputFormatter:lt}),re.eth_gasPrice=new Je({getter:"eth_gasPrice",outputFormatter:Dn}),re.eth_accounts=new Je({getter:"eth_accounts",outputFormatter:Dt}),re.eth_blockNumber=new Je({getter:"eth_blockNumber",outputFormatter:T}),re.eth_protocolVersion=new Je({getter:"eth_protocolVersion",outputFormatter:T}),re.web3_clientVersion=new Je({getter:"web3_clientVersion",outputFormatter:fe}),re.net_version=new Je({getter:"net_version",outputFormatter:fe}),re.shh_version=new Ie({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:T}),re.shh_post=new Ie({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:mt}),re.personal_newAccount=new Ie({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:qt}),re.personal_importRawKey=new Ie({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:qt}),re.personal_sign=new Ie({callName:"personal_sign",params:3,inputFormatter:[tt,Xe,null],outputFormatter:Ge}),re.personal_ecRecover=new Ie({callName:"personal_ecRecover",params:2,inputFormatter:[tt,null],outputFormatter:qt}),re.personal_unlockAccount=new Ie({callName:"personal_unlockAccount",params:3,inputFormatter:[Xe,null,ue],outputFormatter:mt}),re.personal_sendTransaction=new Ie({callName:"personal_sendTransaction",params:2,inputFormatter:[_e,null],outputFormatter:Ge}),re.personal_lockAccount=new Ie({callName:"personal_lockAccount",params:1,inputFormatter:[Xe],outputFormatter:mt}),re.personal_listAccounts=new Je({getter:"personal_listAccounts",outputFormatter:Dt}),re.net_listening=new Je({getter:"net_listening",outputFormatter:mt}),re.net_peerCount=new Je({getter:"net_peerCount",outputFormatter:T}),re.eth_newFilter=new Ie({callName:"eth_newFilter",params:1,inputFormatter:[st],outputFormatter:gt}),re.eth_getLogs=new Ie({callName:"eth_getLogs",params:1,inputFormatter:[Dt],outputFormatter:Dt}),re.eth_newBlockFilter=new Ie({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:gt}),re.eth_newPendingTransactionFilter=new Ie({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:gt}),re.eth_uninstallFilter=new Ie({callName:"eth_uninstallFilter",params:1,inputFormatter:[gt],outputFormatter:mt}),re.eth_getFilterLogs=new Ie({callName:"eth_getFilterLogs",params:1,inputFormatter:[gt],outputFormatter:Dt}),re.eth_getFilterChanges=new Ie({callName:"eth_getFilterChanges",params:1,inputFormatter:[gt],outputFormatter:Dt}),re.eth_submitHashrate=new Ie({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:mt}),re.shh_newIdentity=new Ie({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:Ge}),re.shh_hasIdentity=new Ie({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:mt}),re.shh_newGroup=new Ie({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:Ge}),re.shh_addToGroup=new Ie({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:mt}),re.shh_newFilter=new Ie({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:gt}),re.shh_uninstallFilter=new Ie({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:mt}),re.shh_getLogs=new Ie({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:Dt}),re.shh_getFilterMessages=new Ie({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:Dt}),re.shh_getFilterChanges=new Ie({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:Dt}),re.shh_getMessages=new Ie({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:Dt});function Qe(P,D){const W=r.eth[D];if(!W)throw new Error(`Could not find the method/property named ${D.toString()}`);Object.defineProperty(P,D,{value:function(...pe){return W.execute(this,...pe)}})}class We{constructor(D){this.provider=D,this.requests=new Map}async sendAsync(D){const W=await this.provider;if(!W)throw new Error("Provider not set or invalid");const pe=Yr(D.method,D.params),Se=o();return this.requests.set(pe.id,Se),W.sendAsync(pe,(Ce,rt)=>{this.requests.delete(pe.id),Ce?Se.reject(Ce):ai(rt)?Se.resolve(rt.result):Se.reject(function(At){const Ft=At&&At.error&&At.error.message?At.error.message:"Invalid JSON RPC response: "+JSON.stringify(At);return new Error(Ft)}(rt))}),Se}setProvider(D){this.provider=D}async getConfirmedTransaction(D){const W=await this.waitForCompletion(D);if(this.isFailure(W))throw new Error(`Transaction "${D}" failed`);return W}async waitForCompletion(D,W){const pe=Er(D);if(await this.isTxDropped(pe,W)){const Se=await this.getTransactionAndReceipt(pe);return Object.assign(Object.assign({},Se),{status:r.TransactionStatus.failed})}for(;;){const Se=await this.getTransactionAndReceipt(pe);if(!this.isPending(Se)&&Se.receipt)return Object.assign(Object.assign({},Se),{status:this.isFailure(Se)?r.TransactionStatus.failed:r.TransactionStatus.confirmed});await ft(2e3)}}async getTransaction(D){let W,pe=null;const Se=Er(D);try{const rt=(await this.eth_accounts())[0];rt&&(pe=await this.eth_getTransactionCount(rt,"latest"))}catch{pe=null}try{if(W=await this.eth_getTransactionByHash(Se),W===null)return null}catch{return null}if(W.blockNumber===null){if(pe!==null){if(W.nonce<pe)return{hash:Se,type:r.TransactionType.replaced,nonce:W.nonce};if(W.nonce>pe)return{hash:Se,type:r.TransactionType.queued,nonce:W.nonce}}return Object.assign({type:r.TransactionType.pending},W)}let Ce;try{if(Ce=await this.eth_getTransactionReceipt(Se),Ce===null||Ce.status===0)return Object.assign({type:r.TransactionType.reverted},W)}catch{return null}return Object.assign(Object.assign({type:r.TransactionType.confirmed},W),{receipt:Ce})}async isTxDropped(D,W=15){let pe=W;for(;pe>0;){if(await this.getTransactionAndReceipt(D)!==null)return!1;pe-=1,await ft(2e3)}return!0}async getTransactionAndReceipt(D){D=Er(D);const[W,pe]=await Promise.all([this.eth_getTransactionByHash(D),this.eth_getTransactionReceipt(D)]);return Object.assign(Object.assign({},W),{receipt:pe})}isPending(D){return D&&D.blockNumber===null}isFailure(D){return D&&(!D.receipt||D.receipt.status===0)}}Ee([Qe,be("design:type",Function)],We.prototype,"web3_clientVersion",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"web3_sha3",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"net_version",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"net_peerCount",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"net_listening",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_protocolVersion",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_syncing",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_coinbase",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_mining",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_hashrate",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_gasPrice",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_accounts",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_blockNumber",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getBalance",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getStorageAt",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getTransactionCount",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getBlockTransactionCountByHash",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getBlockTransactionCountByNumber",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getUncleCountByBlockHash",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getUncleCountByBlockNumber",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getCode",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_sign",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_sendTransaction",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_sendRawTransaction",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_call",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_estimateGas",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getBlockByHash",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getBlockByNumber",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getTransactionByHash",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getTransactionReceipt",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_newFilter",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_newBlockFilter",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_newPendingTransactionFilter",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_uninstallFilter",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getFilterChanges",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getFilterLogs",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getLogs",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_getWork",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_submitWork",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"eth_submitHashrate",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"shh_post",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"shh_version",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"shh_newIdentity",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"shh_hasIdentity",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"shh_newGroup",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"shh_addToGroup",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"shh_newFilter",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"shh_uninstallFilter",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"shh_getFilterChanges",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"shh_getMessages",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"personal_unlockAccount",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"personal_newAccount",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"personal_listAccounts",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"personal_lockAccount",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"personal_importRawKey",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"personal_sendTransaction",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"personal_sign",void 0),Ee([Qe,be("design:type",Function)],We.prototype,"personal_ecRecover",void 0);class ht{constructor(D){this.json=D,this._inputTypes=D.inputs||[],this._outputTypes=D.outputs||[],this._constant=!!D.constant,this._payable=!!D.payable||D.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in D&&!D.constant||D.stateMutability==="nonpayable",this._name=k(D)}extractDefaultBlock(D){return D.length>this._inputTypes.length&&!tr(D[D.length-1])&&Kn(D.pop())||"latest"}validateArgs(D){if(D.some(Ce=>Ce===void 0))throw new Error("Invalid call, some arguments are undefined");const W=D.filter(function(Ce){return!(tr(Ce)===!0&&nr(Ce)===!1&&Mt(Ce)===!1&&!(Ce instanceof Uint8Array))});if(W.length!==this._inputTypes.length)throw pe=W.length,Se=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${pe}, expected: ${Se}`);var pe,Se}toPayload(D){let W={to:void 0,data:void 0,value:void 0,from:void 0};D.length>this._inputTypes.length&&tr(D[D.length-1])&&(W=D.pop()),this.validateArgs(D);const pe=this.signature();let Se=r.coder.encodeParams(this._inputTypes,D);return Se.indexOf("0x")===0&&(Se=Se.substr(2)),W.data="0x"+pe+Se,W}signature(){return V(this._name).slice(0,8)}unpackOutput(D){if(!D)return;const W=D.length>=2?D.slice(2):D,pe=r.coder.decodeParams(this._outputTypes,W);return pe.length===1?pe[0]:pe}async execute(D,W,...pe){if(!D)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const Se=this.toPayload(pe);if(Se.to=W,Se.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!Se.from)throw new Error('Missing "from" in transaction options');return await D.eth_sendTransaction(Se)}{const Se=this.extractDefaultBlock(pe),Ce=this.toPayload(pe);Ce.to=W;const rt=await D.eth_call(Ce,Se);return this.unpackOutput(rt)}}estimateGas(D,W,...pe){if(!(D instanceof We))throw new Error("estimateGas needs to receive a RequestManager as first argument");const Se=this.toPayload(pe);return Se.to=W,D.eth_estimateGas(Se)}displayName(){return Q(this._name)}typeName(){return te(this._name)||"void"}attachToContract(D){const W=this.displayName(),pe=Object.assign((...Se)=>this.execute(D.requestManager,D.address,...Se),{estimateGas:this.estimateGas.bind(this,D.requestManager,D.address),toPayload:(...Se)=>this.toPayload(Se),toRPCMessage:(...Se)=>{const Ce=this.extractDefaultBlock(Se),rt=this.toPayload(Se);return rt.to=D.address,{method:"eth_call",params:[rt,Ce]}},unpackOutput:Se=>this.unpackOutput(Se)});D[W]||(D[W]=pe),D[W][this.typeName()]=pe}}function zt(P){if(P==null)return null;const D=String(P).toString();return D.indexOf("0x")===0?D:q(he(D))}class Rr{constructor(D){this.requestManager=D,this.isStarted=!1,this.isDisposed=!1,this.formatter=W=>W,this.filterId=o(),this.callbacks=[],this.stopSemaphore=o()}async watch(D){if(this.isDisposed)throw new Error("The filter was disposed");D&&(this.callbacks.push(D),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const D=await this.getNewFilter();if(!D)throw new Error("Could not create a filter, response: "+JSON.stringify(D));this.filterId.resolve(D)}catch(D){throw D}this.stopSemaphore=o(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const D=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${D}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const W=await this.getChanges();W&&this.callbacks.forEach(pe=>{this.formatter?W.forEach(Se=>{pe(this.formatter(Se))}):W.forEach(Se=>pe(Se))})}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=o(),setTimeout((D=()=>this.poll(),function(){D().catch(W=>console.error(W))}),500))}else this.stopSemaphore.resolve(1);var D}}class Wr extends Rr{constructor(D,W,pe=Se=>Se){super(D),this.requestManager=D,this.options=W,this.formatter=pe,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(Se){return zt(Se)}),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?Ar(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?Ar(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const D=await this.filterId;return this.requestManager.eth_getFilterLogs(D)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const D=await this.filterId;return this.requestManager.eth_getFilterChanges(D)}async uninstall(){const D=await this.filterId;return this.requestManager.eth_uninstallFilter(D)}}class jr{constructor(D,W,pe){this.requestManager=D,this.address=pe,this._anonymous=!1,this._params=W.inputs||[],this._name=k(W),this._anonymous=W.anonymous||!1}types(D){return this._params.filter(function(W){return W.indexed===D})}displayName(){return Q(this._name)}typeName(){return te(this._name)||"void"}signature(){return V(this._name)}encode(D={},W={}){const pe={topics:[],address:this.address};W.fromBlock!==void 0&&(pe.fromBlock=Ar(W.fromBlock)||void 0),W.toBlock!==void 0&&(pe.toBlock=Ar(W.toBlock)||void 0),pe.topics=pe.topics||[],this._anonymous||pe.topics.push("0x"+this.signature());const Se=this._params.filter(function(Ce){return Ce.indexed===!0}).map(function(Ce){const rt=D[Ce.name];return rt==null?null:nr(rt)?rt.map(function(At){return"0x"+r.coder.encodeParams([Ce],[At])}):"0x"+r.coder.encodeParams([Ce],[rt])});return pe.topics=pe.topics.concat(Se),pe}decode(D){D.data=D.data||"",D.topics=D.topics||[];const W=(this._anonymous?D.topics:D.topics.slice(1)).map(function(At){return At.slice(2)}).join(""),pe=r.coder.decodeParams(this.types(!0),W),Se=D.data.slice(2),Ce=r.coder.decodeParams(this.types(!1),Se),rt=this._params.reduce(function(At,Ft){return At[Ft.name]=Ft.indexed?pe.shift():Ce.shift(),At},{});return Object.assign(Object.assign({},ze(D)),{event:this.displayName(),address:D.address,args:rt})}async execute(D,W){const pe=this.encode(D,W),Se=this.decode.bind(this);return new Wr(this.requestManager,pe,Se)}attachToContract(D){const W=this.execute.bind(this),pe=this.displayName();D.events[pe]||(D.events[pe]=W),D.events[pe][this.typeName()]=this.execute.bind(this,D)}}class _n{constructor(D,W,pe){this._requestManager=D,this._json=W,this._address=pe}encode(D={}){const W={address:this._address};return D.fromBlock!==void 0&&(W.fromBlock=Ar(D.fromBlock)||void 0),D.toBlock!==void 0&&(W.toBlock=Ar(D.toBlock)||void 0),W}decode(D){D.data=D.data||"";const W=nr(D.topics)&&cr(D.topics[0])?D.topics[0].slice(2):"",pe=this._json.filter(function(Se){return W===V(k(Se))})[0];return pe?new jr(this._requestManager,pe,this._address).decode(D):ze(D)}async execute(D){const W=this.encode(D),pe=this.decode.bind(this);return new Wr(this._requestManager,W,pe)}getAllEventsFunction(){return this.execute.bind(this)}}class qr{constructor(D,W,pe){var Se;this.requestManager=D,this.abi=W,this.address=pe,this.events={},this.transactionHash=null,this.address=pe,this.abi=W,(Se=this).abi.filter(function(Ce){return Ce.type==="function"}).map(function(Ce){return new ht(Ce)}).forEach(function(Ce){Ce.attachToContract(Se)}),this.allEvents=function(Ce){const rt=Ce.abi.filter(function(Ft){return Ft.type==="event"}),At=new _n(Ce.requestManager,rt,Ce.address);return rt.map(function(Ft){return new jr(Ce.requestManager,Ft,Ce.address)}).forEach(function(Ft){Ft.attachToContract(Ce)}),At.getAllEventsFunction()}(this)}}r.AbstractFilter=Rr,r.BigNumber=B,r.Contract=qr,r.ContractFactory=class{constructor(P,D){this.requestManager=P,this.abi=D}async deploy(...P){let D;const W=P[P.length-1];if(tr(W)&&!nr(W)&&(D=P.pop()),!D)throw new Error("Missing options object");if(!D.data||typeof D.data!="string")throw new Error("Invalid options.data");if(T(D.value)>0&&!(this.abi.filter(function(Jt){return Jt.type==="constructor"&&Jt.inputs.length===P.length})[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const pe=(Se=this.abi,Ce=P,Se.filter(function(Jt){return Jt.type==="constructor"&&Jt.inputs&&Jt.inputs.length===Ce.length}).map(function(Jt){return Jt.inputs||[]}).map(function(Jt){return r.coder.encodeParams(Jt,Ce)})[0]||"");var Se,Ce;D.data+=pe,D.gas||(D.gas=await this.requestManager.eth_estimateGas(D));const rt=await this.requestManager.eth_sendTransaction(D);if(!rt)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const At=await async function(Jt,Ti){const xn=o();let St=0;const si=()=>{St++,St>50?xn.reject(new Error("Contract transaction couldn't be found after 50 blocks")):Jt.eth_getTransactionReceipt(Ti).then(mi=>{mi&&mi.blockHash?xn.resolve(mi):setTimeout(si,1e3)},mi=>xn.reject(mi))};si();const An=await xn,fn=await Jt.eth_getCode(An.contractAddress,"latest");if(fn&&fn.length>3)return An.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:fn,receipt:An})}(this.requestManager,rt),Ft=await this.at(At);return Ft.transactionHash=rt,Ft}async at(P){if(!Ut(P))throw new TypeError(`Invalid address ${JSON.stringify(P)}`);return new qr(this.requestManager,this.abi,P)}},r.EthBlockFilter=class extends Wr{constructor(P){super(P,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},r.EthFilter=Wr,r.EthPendingTransactionFilter=class extends Wr{constructor(P){super(P,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},r.HTTPProvider=class{constructor(P,D={}){this.host=P,this.options=D,this.debug=!1,this.host=P||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(P,D){try{let W=null;W=P instanceof Array?P.map(Ce=>n(Ce)):n(P);const pe=this.options.fetch||globalThis.fetch;if(pe===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const Se={body:JSON.stringify(W),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+Se.body),pe(this.host,Se).then(async Ce=>{if(Ce.ok){const rt=await Ce.json();this.debug&&console.log("RECV << "+JSON.stringify(rt)),rt.error?D(Object.assign(new Error(rt.error.json||rt.error),rt.error)):D(null,rt)}else this.debug&&console.log("ERR << "+JSON.stringify(Ce)),D(new Error("External error. response code: "+Ce.status))},Ce=>{this.debug&&console.log("ERR << "+JSON.stringify(Ce)),D(Ce)})}catch(W){this.debug&&console.log("ERR << "+JSON.stringify(W)),D(W)}}},r.Method=Ie,r.Property=Je,r.RequestManager=We,r.SHHFilter=class extends Rr{constructor(P,D){super(P),this.requestManager=P,this.options=D,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(W){return zt(W)}),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const P=await this.filterId;return this.requestManager.shh_getMessages(P)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const P=await this.filterId;return this.requestManager.shh_getFilterChanges(P)}async uninstall(){const P=await this.filterId;return this.requestManager.shh_uninstallFilter(P)}},r.SolidityEvent=jr,r.SolidityFunction=ht,r.WebSocketProvider=class{constructor(P,D={}){this.url=P,this.options=D,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const P=this.connection;this.timeout(new Error("Provider disposed.")),P.then(D=>D.close()).catch(D=>{this.debug&&console.error(D)})}send(){throw new Error("Sync requests are deprecated")}sendAsync(P,D){const W=[];let pe;if(P instanceof Array)pe=Promise.all(P.map(Se=>{const Ce=o();try{const rt=n(Se);W.push(rt),this.responseCallbacks.set(rt.id,Ce)}catch(rt){Ce.reject(rt)}return Ce}));else{const Se=o();try{const Ce=n(P);W.push(Ce),this.responseCallbacks.set(Ce.id,Se)}catch(Ce){Se.reject(Ce)}pe=Se}pe.then(Se=>D(null,Se),Se=>D(Se)),this.connection.then(Se=>{W.forEach(Ce=>{const rt=JSON.stringify(Ce);this.debug&&console.log("SEND >> "+rt),Se.send(rt)})},Se=>{D(Se)})}parseResponse(P){const D=[];return P.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(W=>{let pe=W;this.lastChunk&&(pe=this.lastChunk+pe);let Se=null;try{Se=JSON.parse(pe)}catch{return this.lastChunk=pe,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout(()=>{this.timeout()},15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",Se&&D.push(Se)}),D}processMessage(P){if("id"in P){const D=P.id,W=this.responseCallbacks.get(D);if(!W)return void console.error("Error: Received a response for an unknown request",P);this.responseCallbacks.delete(D),"error"in P?W.reject(Object.assign(new Error(P.error.message||P.error),P.error)):"result"in P&&W.resolve(P)}else this.notificationCallbacks.forEach(D=>D(null,P))}timeout(P){this.connection&&this.connection.isPending||(this.connection=o());const D=P||new Error("Connection timeout");this.responseCallbacks.forEach(W=>W.reject(D)),this.responseCallbacks.clear(),this.isDisposed||setTimeout(()=>this.connect(),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then(W=>W.close()).catch(W=>{this.debug&&console.error(W)}),this.connection&&this.connection.isPending||(this.connection=o()),this.lastChunk="";const P=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!P)throw new Error("Please provide a WebSocketConstructor");const D=new P(this.url,this.options.protocol);D.onopen=()=>{this.connection.resolve(D)},D.onerror=W=>{const pe=new Error("Error in web socket");pe.data=W,this.timeout(pe)},D.onclose=W=>{this.timeout(new Error(`Connection closed (${W&&W.reason||"Unknown reason"})`))},D.onmessage=W=>{const pe=typeof W.data=="string"?W.data:"";this.debug&&console.log("RECV << "+W.data),this.parseResponse(pe).forEach(Se=>{Se instanceof Array?Se.forEach(Ce=>this.processMessage(Ce)):this.processMessage(Se)})}}},r.bytesToHex=q,r.bytesToUtf8String=F,r.concatBytes=G,r.default=We,r.extractDisplayName=Q,r.extractTypeName=te,r.fromAscii=function(P,D=0){let W="";for(let pe=0;pe<P.length;pe++){const Se=P.charCodeAt(pe).toString(16);W+=Se.length<2?"0"+Se:Se}return"0x"+W.padEnd(D,"0")},r.fromDecimal=vt,r.fromTwosComplement=Nt,r.fromWei=function(P,D){const W=Yt(P).dividedBy(Lt(D));return Mt(P)?W:W.toString(10)},r.getAddress=kt,r.getValueOfUnit=Lt,r.hexToBytes=j,r.inputAddressFormatter=Xe,r.inputBlockNumberFormatter=Ar,r.inputCallFormatter=Mr,r.inputDefaultBlockNumberFormatter=Kn,r.inputFilterOptions=st,r.inputPostFormatter=function(P){return P?(P.ttl=vt(P.ttl),P.workToProve=vt(P.workToProve),P.priority=vt(P.priority),nr(P.topics)||(P.topics=P.topics?[P.topics]:[]),P.topics=P.topics.map(function(D){return D.indexOf("0x")===0?D:"0x"+q(he(D))}),P):null},r.inputTransactionFormatter=_e,r.inputTransactionId=Er,r.isAddress=Ut,r.isArray=nr,r.isBigNumber=Mt,r.isBloom=function(P){return!!/^(0x)?[0-9a-f]{512}$/i.test(P)&&!!/^(0x)?[0-9a-f]{512}$/i.test(P)},r.isBoolean=ir,r.isChecksumAddress=Vt,r.isFunction=function(P){return typeof P=="function"},r.isHex=function(P){return typeof P=="string"&&/^0x[0-9a-fA-F]+$/.test(P)},r.isJson=function(P){try{return!!JSON.parse(P)}catch{return!1}},r.isObject=tr,r.isPredefinedBlockNumber=$n,r.isStrictAddress=Kt,r.isString=cr,r.isTopic=function(P){return!!/^(0x)?[0-9a-f]{64}$/i.test(P)&&!!/^(0x)?[0-9a-f]{64}$/i.test(P)},r.isValidResponse=ai,r.outputBigNumberFormatter=Dn,r.outputBlockFormatter=Re,r.outputLogFormatter=ze,r.outputPostFormatter=function(P){return P?(P.expiry=T(P.expiry),P.sent=T(P.sent),P.ttl=T(P.ttl),P.workProved=T(P.workProved),P.topics||(P.topics=[]),P.topics=P.topics.map(function(D){return L(D)}),P):null},r.outputSyncingFormatter=lt,r.outputTransactionFormatter=ee,r.outputTransactionReceiptFormatter=ve,r.padLeft=H,r.padRight=function(P,D,W){return P+new Array(D-P.length+1).join(W||"0")},r.sha3=V,r.signedIsNegative=Pt,r.stringToUtf8Bytes=he,r.toAddress=qt,r.toArray=Dt,r.toAscii=L,r.toBatchPayload=function(P){return P.map(function(D){return Yr(D.method,D.params)})},r.toBigNumber=Yt,r.toBoolean=mt,r.toChecksumAddress=$t,r.toData=Ge,r.toDecimal=T,r.toHex=gt,r.toJsonRpcRequest=Yr,r.toNullDecimal=ue,r.toString=fe,r.toStringData=tt,r.toTwosComplement=Rt,r.toWei=function(P,D){const W=Yt(P).times(Lt(D));return Mt(P)?W:W.toString(10)},r.transformToFullName=k,Object.defineProperty(r,"__esModule",{value:!0})})})(k4,k4.exports);var $I=k4.exports,MI={};Object.defineProperty(MI,"__esModule",{value:!0});MI.SignatureValidator=void 0;const fVe=$I;async function dVe(t,e){const r=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new fVe.ContractFactory(t,r).at(e)}MI.SignatureValidator=dVe;var hL={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AuthLink=t.AuthLinkType=t.AuthChain=void 0;const e=Ll;Object.defineProperty(t,"AuthChain",{enumerable:!0,get:function(){return e.AuthChain}}),Object.defineProperty(t,"AuthLinkType",{enumerable:!0,get:function(){return e.AuthLinkType}}),Object.defineProperty(t,"AuthLink",{enumerable:!0,get:function(){return e.AuthLink}})})(hL);var kI={};Object.defineProperty(kI,"__esModule",{value:!0});kI.moveMinutes=void 0;function hVe(t){const e=new Date;return e.setMinutes(e.getMinutes()+t),e}kI.moveMinutes=hVe;var pL={};Object.defineProperty(pL,"__esModule",{value:!0});const Jv=$I;class pVe{constructor(e,r=!0){this.requestManager=e,this.checkedBlocks={},this.saveBlocks=r,r&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const e=await this.getBlockWrapper("latest"),r=await this.getBlockWrapper(1);this.blockTime=(e.timestamp-r.timestamp)/Number(e.number)-1,this.firstTimestamp=r.timestamp}async getDate(e,r=!0){const n=e/1e3,i=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),n<this.firstTimestamp)return{block:1,timestamp:n};if(n>=i||n>this.savedBlocks.latest.timestamp)return{block:(0,Jv.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:n};this.checkedBlocks[n]=[];const a=await this.getBlockWrapper(Math.ceil((n-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(n,a,r),timestamp:n}}async findBetter(e,r,n,i=this.blockTime){if(await this.isBetterBlock(e,r,n))return r.number;const a=e-r.timestamp;let o=Math.ceil(a/i);o===0&&(o=a<0?-1:1);const s=await this.getBlockWrapper(this.getNextBlock(e,r.number,o));return i=Math.abs((r.timestamp-s.timestamp)/(r.number-s.number)),this.findBetter(e,s,n,i)}async isBetterBlock(e,r,n){const i=r.timestamp;if(n){if(i<e)return!1;const a=await this.getBlockWrapper(r.number-1);if(i>=e&&a.timestamp<e)return!0}else{if(i>=e)return!1;const a=await this.getBlockWrapper(r.number+1);if(i<e&&a.timestamp>=e)return!0}return!1}getNextBlock(e,r,n){const i=r+n;return this.checkedBlocks[e].includes(i)?this.getNextBlock(e,r,n<0?++n:--n):(this.checkedBlocks[e].push(i),i)}async getBlockWrapper(e){if(!this.saveBlocks){const n=await this.requestManager.eth_getBlockByNumber(e,!1);return{number:(0,Jv.toBigNumber)(n.number).toNumber(),timestamp:(0,Jv.toBigNumber)(n.timestamp).toNumber()}}if(this.savedBlocks[e.toString()])return this.savedBlocks[e];if(typeof e=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=e)return this.savedBlocks.latest;const{timestamp:r}=await this.requestManager.eth_getBlockByNumber(e,!1);return this.savedBlocks[e.toString()]={number:(0,Jv.toBigNumber)(e==="latest"?await this.requestManager.eth_blockNumber():e).toNumber(),timestamp:(0,Jv.toBigNumber)(r).toNumber()},this.requests++,this.savedBlocks[e.toString()]}}pL.default=pVe;var La={},gL={},xce={},ga={};Object.defineProperty(ga,"__esModule",{value:!0});ga.output=ga.exists=ga.hash=ga.bytes=ga.bool=ga.number=void 0;function l2(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}ga.number=l2;function Ace(t){if(typeof t!="boolean")throw new Error(`Expected boolean, not ${t}`)}ga.bool=Ace;function yL(t,...e){if(!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new TypeError(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}ga.bytes=yL;function Sce(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");l2(t.outputLen),l2(t.blockLen)}ga.hash=Sce;function Ice(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}ga.exists=Ice;function Oce(t,e){yL(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}ga.output=Oce;const gVe={number:l2,bool:Ace,bytes:yL,hash:Sce,exists:Ice,output:Oce};ga.default=gVe;var Uy={},LI={};Object.defineProperty(LI,"__esModule",{value:!0});LI.crypto=void 0;LI.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0};(function(t){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const e=LI,r=x=>new Uint8Array(x.buffer,x.byteOffset,x.byteLength);t.u8=r;const n=x=>new Uint32Array(x.buffer,x.byteOffset,Math.floor(x.byteLength/4));t.u32=n;const i=x=>new DataView(x.buffer,x.byteOffset,x.byteLength);t.createView=i;const a=(x,I)=>x<<32-I|x>>>I;if(t.rotr=a,t.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},(x,I)=>I.toString(16).padStart(2,"0"));function s(x){if(!(x instanceof Uint8Array))throw new Error("Uint8Array expected");let I="";for(let E=0;E<x.length;E++)I+=o[x[E]];return I}t.bytesToHex=s;function c(x){if(typeof x!="string")throw new TypeError("hexToBytes: expected string, got "+typeof x);if(x.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const I=new Uint8Array(x.length/2);for(let E=0;E<I.length;E++){const p=E*2,O=x.slice(p,p+2),C=Number.parseInt(O,16);if(Number.isNaN(C)||C<0)throw new Error("Invalid byte sequence");I[E]=C}return I}t.hexToBytes=c;const u=async()=>{};t.nextTick=u;async function f(x,I,E){let p=Date.now();for(let O=0;O<x;O++){E(O);const C=Date.now()-p;C>=0&&C<I||(await(0,t.nextTick)(),p+=C)}}t.asyncLoop=f;function d(x){if(typeof x!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof x}`);return new TextEncoder().encode(x)}t.utf8ToBytes=d;function g(x){if(typeof x=="string"&&(x=d(x)),!(x instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof x})`);return x}t.toBytes=g;function m(...x){if(!x.every(p=>p instanceof Uint8Array))throw new Error("Uint8Array list expected");if(x.length===1)return x[0];const I=x.reduce((p,O)=>p+O.length,0),E=new Uint8Array(I);for(let p=0,O=0;p<x.length;p++){const C=x[p];E.set(C,O),O+=C.length}return E}t.concatBytes=m;class w{clone(){return this._cloneInto()}}t.Hash=w;const v=x=>Object.prototype.toString.call(x)==="[object Object]"&&x.constructor===Object;function y(x,I){if(I!==void 0&&(typeof I!="object"||!v(I)))throw new TypeError("Options should be object or undefined");return Object.assign(x,I)}t.checkOpts=y;function _(x){const I=p=>x().update(g(p)).digest(),E=x();return I.outputLen=E.outputLen,I.blockLen=E.blockLen,I.create=()=>x(),I}t.wrapConstructor=_;function b(x){const I=(p,O)=>x(O).update(g(p)).digest(),E=x({});return I.outputLen=E.outputLen,I.blockLen=E.blockLen,I.create=p=>x(p),I}t.wrapConstructorWithOpts=b;function S(x=32){if(e.crypto.web)return e.crypto.web.getRandomValues(new Uint8Array(x));if(e.crypto.node)return new Uint8Array(e.crypto.node.randomBytes(x).buffer);throw new Error("The environment doesn't have randomBytes function")}t.randomBytes=S})(Uy);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;const e=ga,r=Uy;class n extends r.Hash{constructor(o,s){super(),this.finished=!1,this.destroyed=!1,e.default.hash(o);const c=(0,r.toBytes)(s);if(this.iHash=o.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const u=this.blockLen,f=new Uint8Array(u);f.set(c.length>u?o.create().update(c).digest():c);for(let d=0;d<f.length;d++)f[d]^=54;this.iHash.update(f),this.oHash=o.create();for(let d=0;d<f.length;d++)f[d]^=106;this.oHash.update(f),f.fill(0)}update(o){return e.default.exists(this),this.iHash.update(o),this}digestInto(o){e.default.exists(this),e.default.bytes(o,this.outputLen),this.finished=!0,this.iHash.digestInto(o),this.oHash.update(o),this.oHash.digestInto(o),this.destroy()}digest(){const o=new Uint8Array(this.oHash.outputLen);return this.digestInto(o),o}_cloneInto(o){o||(o=Object.create(Object.getPrototypeOf(this),{}));const{oHash:s,iHash:c,finished:u,destroyed:f,blockLen:d,outputLen:g}=this;return o=o,o.finished=u,o.destroyed=f,o.blockLen=d,o.outputLen=g,o.oHash=s._cloneInto(o.oHash),o.iHash=c._cloneInto(o.iHash),o}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const i=(a,o,s)=>new n(a,o).update(s).digest();t.hmac=i,t.hmac.create=(a,o)=>new n(a,o)})(xce);var gp={},UI={};Object.defineProperty(UI,"__esModule",{value:!0});UI.SHA2=void 0;const r6=ga,Xv=Uy;function yVe(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),a=BigInt(4294967295),o=Number(r>>i&a),s=Number(r&a),c=n?4:0,u=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+u,s,n)}class mVe extends Xv.Hash{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,Xv.createView)(this.buffer)}update(e){r6.default.exists(this);const{view:r,buffer:n,blockLen:i}=this;e=(0,Xv.toBytes)(e);const a=e.length;for(let o=0;o<a;){const s=Math.min(i-this.pos,a-o);if(s===i){const c=(0,Xv.createView)(e);for(;i<=a-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){r6.default.exists(this),r6.default.output(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:a}=this;let{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;yVe(n,i-8,BigInt(this.length*8),a),this.process(n,0);const s=(0,Xv.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)s.setUint32(4*d,f[d],a)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:a,destroyed:o,pos:s}=this;return e.length=i,e.pos=s,e.finished=a,e.destroyed=o,i%r&&e.buffer.set(n),e}}UI.SHA2=mVe;Object.defineProperty(gp,"__esModule",{value:!0});gp.sha224=gp.sha256=void 0;const vVe=UI,As=Uy,bVe=(t,e,r)=>t&e^~t&r,wVe=(t,e,r)=>t&e^t&r^e&r,_Ve=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),gf=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),yf=new Uint32Array(64);class Pce extends vVe.SHA2{constructor(){super(64,32,8,!1),this.A=gf[0]|0,this.B=gf[1]|0,this.C=gf[2]|0,this.D=gf[3]|0,this.E=gf[4]|0,this.F=gf[5]|0,this.G=gf[6]|0,this.H=gf[7]|0}get(){const{A:e,B:r,C:n,D:i,E:a,F:o,G:s,H:c}=this;return[e,r,n,i,a,o,s,c]}set(e,r,n,i,a,o,s,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=a|0,this.F=o|0,this.G=s|0,this.H=c|0}process(e,r){for(let d=0;d<16;d++,r+=4)yf[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const g=yf[d-15],m=yf[d-2],w=(0,As.rotr)(g,7)^(0,As.rotr)(g,18)^g>>>3,v=(0,As.rotr)(m,17)^(0,As.rotr)(m,19)^m>>>10;yf[d]=v+yf[d-7]+w+yf[d-16]|0}let{A:n,B:i,C:a,D:o,E:s,F:c,G:u,H:f}=this;for(let d=0;d<64;d++){const g=(0,As.rotr)(s,6)^(0,As.rotr)(s,11)^(0,As.rotr)(s,25),m=f+g+bVe(s,c,u)+_Ve[d]+yf[d]|0,v=((0,As.rotr)(n,2)^(0,As.rotr)(n,13)^(0,As.rotr)(n,22))+wVe(n,i,a)|0;f=u,u=c,c=s,s=o+m|0,o=a,a=i,i=n,n=m+v|0}n=n+this.A|0,i=i+this.B|0,a=a+this.C|0,o=o+this.D|0,s=s+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(n,i,a,o,s,c,u,f)}roundClean(){yf.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class EVe extends Pce{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}gp.sha256=(0,As.wrapConstructor)(()=>new Pce);gp.sha224=(0,As.wrapConstructor)(()=>new EVe);var L4={};(function(t){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.schnorr=t.verify=t.signSync=t.sign=t.getSharedSecret=t.recoverPublicKey=t.getPublicKey=t.Signature=t.Point=t.CURVE=void 0;const e=fM,r=BigInt(0),n=BigInt(1),i=BigInt(2),a=BigInt(3),o=BigInt(8),s=Object.freeze({a:r,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:n,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});t.CURVE=s;const c=(_e,ee)=>(_e+ee/i)/ee,u={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(_e){const{n:ee}=s,ve=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),Re=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),ze=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Xe=ve,st=BigInt("0x100000000000000000000000000000000"),lt=c(Xe*_e,ee),_t=c(-Re*_e,ee);let le=L(_e-lt*ve-_t*ze,ee),Z=L(-lt*Re-_t*Xe,ee);const ye=le>st,Me=Z>st;if(ye&&(le=ee-le),Me&&(Z=ee-Z),le>st||Z>st)throw new Error("splitScalarEndo: Endomorphism failed, k="+_e);return{k1neg:ye,k1:le,k2neg:Me,k2:Z}}},f=32,d=32,g=32,m=f+1,w=2*f+1;function v(_e){const{a:ee,b:ve}=s,Re=L(_e*_e),ze=L(Re*_e);return L(ze+ee*_e+ve)}const y=s.a===r;class _ extends Error{constructor(ee){super(ee)}}function b(_e){if(!(_e instanceof S))throw new TypeError("JacobianPoint expected")}class S{constructor(ee,ve,Re){this.x=ee,this.y=ve,this.z=Re}static fromAffine(ee){if(!(ee instanceof E))throw new TypeError("JacobianPoint#fromAffine: expected Point");return ee.equals(E.ZERO)?S.ZERO:new S(ee.x,ee.y,n)}static toAffineBatch(ee){const ve=Q(ee.map(Re=>Re.z));return ee.map((Re,ze)=>Re.toAffine(ve[ze]))}static normalizeZ(ee){return S.toAffineBatch(ee).map(S.fromAffine)}equals(ee){b(ee);const{x:ve,y:Re,z:ze}=this,{x:Xe,y:st,z:lt}=ee,_t=L(ze*ze),le=L(lt*lt),Z=L(ve*le),ye=L(Xe*_t),Me=L(L(Re*lt)*le),Le=L(L(st*ze)*_t);return Z===ye&&Me===Le}negate(){return new S(this.x,L(-this.y),this.z)}double(){const{x:ee,y:ve,z:Re}=this,ze=L(ee*ee),Xe=L(ve*ve),st=L(Xe*Xe),lt=ee+Xe,_t=L(i*(L(lt*lt)-ze-st)),le=L(a*ze),Z=L(le*le),ye=L(Z-i*_t),Me=L(le*(_t-ye)-o*st),Le=L(i*ve*Re);return new S(ye,Me,Le)}add(ee){b(ee);const{x:ve,y:Re,z:ze}=this,{x:Xe,y:st,z:lt}=ee;if(Xe===r||st===r)return this;if(ve===r||Re===r)return ee;const _t=L(ze*ze),le=L(lt*lt),Z=L(ve*le),ye=L(Xe*_t),Me=L(L(Re*lt)*le),Le=L(L(st*ze)*_t),wt=L(ye-Z),It=L(Le-Me);if(wt===r)return It===r?this.double():S.ZERO;const gr=L(wt*wt),lr=L(wt*gr),en=L(Z*gr),yr=L(It*It-lr-i*en),xr=L(It*(en-yr)-Me*lr),on=L(ze*lt*wt);return new S(yr,xr,on)}subtract(ee){return this.add(ee.negate())}multiplyUnsafe(ee){const ve=S.ZERO;if(typeof ee=="bigint"&&ee===r)return ve;let Re=H(ee);if(Re===n)return this;if(!y){let ye=ve,Me=this;for(;Re>r;)Re&n&&(ye=ye.add(Me)),Me=Me.double(),Re>>=n;return ye}let{k1neg:ze,k1:Xe,k2neg:st,k2:lt}=u.splitScalar(Re),_t=ve,le=ve,Z=this;for(;Xe>r||lt>r;)Xe&n&&(_t=_t.add(Z)),lt&n&&(le=le.add(Z)),Z=Z.double(),Xe>>=n,lt>>=n;return ze&&(_t=_t.negate()),st&&(le=le.negate()),le=new S(L(le.x*u.beta),le.y,le.z),_t.add(le)}precomputeWindow(ee){const ve=y?128/ee+1:256/ee+1,Re=[];let ze=this,Xe=ze;for(let st=0;st<ve;st++){Xe=ze,Re.push(Xe);for(let lt=1;lt<2**(ee-1);lt++)Xe=Xe.add(ze),Re.push(Xe);ze=Xe.double()}return Re}wNAF(ee,ve){!ve&&this.equals(S.BASE)&&(ve=E.BASE);const Re=ve&&ve._WINDOW_SIZE||1;if(256%Re)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let ze=ve&&I.get(ve);ze||(ze=this.precomputeWindow(Re),ve&&Re!==1&&(ze=S.normalizeZ(ze),I.set(ve,ze)));let Xe=S.ZERO,st=S.BASE;const lt=1+(y?128/Re:256/Re),_t=2**(Re-1),le=BigInt(2**Re-1),Z=2**Re,ye=BigInt(Re);for(let Me=0;Me<lt;Me++){const Le=Me*_t;let wt=Number(ee&le);ee>>=ye,wt>_t&&(wt-=Z,ee+=n);const It=Le,gr=Le+Math.abs(wt)-1,lr=Me%2!==0,en=wt<0;wt===0?st=st.add(x(lr,ze[It])):Xe=Xe.add(x(en,ze[gr]))}return{p:Xe,f:st}}multiply(ee,ve){let Re=H(ee),ze,Xe;if(y){const{k1neg:st,k1:lt,k2neg:_t,k2:le}=u.splitScalar(Re);let{p:Z,f:ye}=this.wNAF(lt,ve),{p:Me,f:Le}=this.wNAF(le,ve);Z=x(st,Z),Me=x(_t,Me),Me=new S(L(Me.x*u.beta),Me.y,Me.z),ze=Z.add(Me),Xe=ye.add(Le)}else{const{p:st,f:lt}=this.wNAF(Re,ve);ze=st,Xe=lt}return S.normalizeZ([ze,Xe])[0]}toAffine(ee){const{x:ve,y:Re,z:ze}=this,Xe=this.equals(S.ZERO);ee==null&&(ee=Xe?o:ge(ze));const st=ee,lt=L(st*st),_t=L(lt*st),le=L(ve*lt),Z=L(Re*_t),ye=L(ze*st);if(Xe)return E.ZERO;if(ye!==n)throw new Error("invZ was invalid");return new E(le,Z)}}S.BASE=new S(s.Gx,s.Gy,n),S.ZERO=new S(r,n,r);function x(_e,ee){const ve=ee.negate();return _e?ve:ee}const I=new WeakMap;class E{constructor(ee,ve){this.x=ee,this.y=ve}_setWindowSize(ee){this._WINDOW_SIZE=ee,I.delete(this)}hasEvenY(){return this.y%i===r}static fromCompressedHex(ee){const ve=ee.length===32,Re=V(ve?ee:ee.subarray(1));if(!mt(Re))throw new Error("Point is not on curve");const ze=v(Re);let Xe=G(ze);const st=(Xe&n)===n;ve?st&&(Xe=L(-Xe)):(ee[0]&1)===1!==st&&(Xe=L(-Xe));const lt=new E(Re,Xe);return lt.assertValidity(),lt}static fromUncompressedHex(ee){const ve=V(ee.subarray(1,f+1)),Re=V(ee.subarray(f+1,f*2+1)),ze=new E(ve,Re);return ze.assertValidity(),ze}static fromHex(ee){const ve=$(ee),Re=ve.length,ze=ve[0];if(Re===f)return this.fromCompressedHex(ve);if(Re===m&&(ze===2||ze===3))return this.fromCompressedHex(ve);if(Re===w&&ze===4)return this.fromUncompressedHex(ve);throw new Error(`Point.fromHex: received invalid point. Expected 32-${m} compressed bytes or ${w} uncompressed bytes, not ${Re}`)}static fromPrivateKey(ee){return E.BASE.multiply(gt(ee))}static fromSignature(ee,ve,Re){const{r:ze,s:Xe}=Yt(ve);if(![0,1,2,3].includes(Re))throw new Error("Cannot recover: invalid recovery bit");const st=ue($(ee)),{n:lt}=s,_t=Re===2||Re===3?ze+lt:ze,le=ge(_t,lt),Z=L(-st*le,lt),ye=L(Xe*le,lt),Me=Re&1?"03":"02",Le=E.fromHex(Me+U(_t)),wt=E.BASE.multiplyAndAddUnsafe(Le,Z,ye);if(!wt)throw new Error("Cannot recover signature: point at infinify");return wt.assertValidity(),wt}toRawBytes(ee=!1){return q(this.toHex(ee))}toHex(ee=!1){const ve=U(this.x);return ee?`${this.hasEvenY()?"02":"03"}${ve}`:`04${ve}${U(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const ee="Point is not on elliptic curve",{x:ve,y:Re}=this;if(!mt(ve)||!mt(Re))throw new Error(ee);const ze=L(Re*Re),Xe=v(ve);if(L(ze-Xe)!==r)throw new Error(ee)}equals(ee){return this.x===ee.x&&this.y===ee.y}negate(){return new E(this.x,L(-this.y))}double(){return S.fromAffine(this).double().toAffine()}add(ee){return S.fromAffine(this).add(S.fromAffine(ee)).toAffine()}subtract(ee){return this.add(ee.negate())}multiply(ee){return S.fromAffine(this).multiply(ee,this).toAffine()}multiplyAndAddUnsafe(ee,ve,Re){const ze=S.fromAffine(this),Xe=ve===r||ve===n||this!==E.BASE?ze.multiplyUnsafe(ve):ze.multiply(ve),st=S.fromAffine(ee).multiplyUnsafe(Re),lt=Xe.add(st);return lt.equals(S.ZERO)?void 0:lt.toAffine()}}t.Point=E,E.BASE=new E(s.Gx,s.Gy),E.ZERO=new E(r,r);function p(_e){return Number.parseInt(_e[0],16)>=8?"00"+_e:_e}function O(_e){if(_e.length<2||_e[0]!==2)throw new Error(`Invalid signature integer tag: ${he(_e)}`);const ee=_e[1],ve=_e.subarray(2,ee+2);if(!ee||ve.length!==ee)throw new Error("Invalid signature integer: wrong length");if(ve[0]===0&&ve[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:V(ve),left:_e.subarray(ee+2)}}function C(_e){if(_e.length<2||_e[0]!=48)throw new Error(`Invalid signature tag: ${he(_e)}`);if(_e[1]!==_e.length-2)throw new Error("Invalid signature: incorrect length");const{data:ee,left:ve}=O(_e.subarray(2)),{data:Re,left:ze}=O(ve);if(ze.length)throw new Error(`Invalid signature: left bytes after parsing: ${he(ze)}`);return{r:ee,s:Re}}class M{constructor(ee,ve){this.r=ee,this.s=ve,this.assertValidity()}static fromCompact(ee){const ve=ee instanceof Uint8Array,Re="Signature.fromCompact";if(typeof ee!="string"&&!ve)throw new TypeError(`${Re}: Expected string or Uint8Array`);const ze=ve?he(ee):ee;if(ze.length!==128)throw new Error(`${Re}: Expected 64-byte hex`);return new M(j(ze.slice(0,64)),j(ze.slice(64,128)))}static fromDER(ee){const ve=ee instanceof Uint8Array;if(typeof ee!="string"&&!ve)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:Re,s:ze}=C(ve?ee:q(ee));return new M(Re,ze)}static fromHex(ee){return this.fromDER(ee)}assertValidity(){const{r:ee,s:ve}=this;if(!tt(ee))throw new Error("Invalid Signature: r must be 0 < r < n");if(!tt(ve))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const ee=s.n>>n;return this.s>ee}normalizeS(){return this.hasHighS()?new M(this.r,L(-this.s,s.n)):this}toDERRawBytes(){return q(this.toDERHex())}toDERHex(){const ee=p(ne(this.s)),ve=p(ne(this.r)),Re=ee.length/2,ze=ve.length/2,Xe=ne(Re),st=ne(ze);return`30${ne(ze+Re+4)}02${st}${ve}02${Xe}${ee}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return q(this.toCompactHex())}toCompactHex(){return U(this.r)+U(this.s)}}t.Signature=M;function B(..._e){if(!_e.every(Re=>Re instanceof Uint8Array))throw new Error("Uint8Array list expected");if(_e.length===1)return _e[0];const ee=_e.reduce((Re,ze)=>Re+ze.length,0),ve=new Uint8Array(ee);for(let Re=0,ze=0;Re<_e.length;Re++){const Xe=_e[Re];ve.set(Xe,ze),ze+=Xe.length}return ve}const ce=Array.from({length:256},(_e,ee)=>ee.toString(16).padStart(2,"0"));function he(_e){if(!(_e instanceof Uint8Array))throw new Error("Expected Uint8Array");let ee="";for(let ve=0;ve<_e.length;ve++)ee+=ce[_e[ve]];return ee}const F=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function U(_e){if(typeof _e!="bigint")throw new Error("Expected bigint");if(!(r<=_e&&_e<F))throw new Error("Expected number 0 <= n < 2^256");return _e.toString(16).padStart(64,"0")}function K(_e){const ee=q(U(_e));if(ee.length!==32)throw new Error("Error: expected 32 bytes");return ee}function ne(_e){const ee=_e.toString(16);return ee.length&1?`0${ee}`:ee}function j(_e){if(typeof _e!="string")throw new TypeError("hexToNumber: expected string, got "+typeof _e);return BigInt(`0x${_e}`)}function q(_e){if(typeof _e!="string")throw new TypeError("hexToBytes: expected string, got "+typeof _e);if(_e.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+_e.length);const ee=new Uint8Array(_e.length/2);for(let ve=0;ve<ee.length;ve++){const Re=ve*2,ze=_e.slice(Re,Re+2),Xe=Number.parseInt(ze,16);if(Number.isNaN(Xe)||Xe<0)throw new Error("Invalid byte sequence");ee[ve]=Xe}return ee}function V(_e){return j(he(_e))}function $(_e){return _e instanceof Uint8Array?Uint8Array.from(_e):q(_e)}function H(_e){if(typeof _e=="number"&&Number.isSafeInteger(_e)&&_e>0)return BigInt(_e);if(typeof _e=="bigint"&&tt(_e))return _e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function L(_e,ee=s.P){const ve=_e%ee;return ve>=r?ve:ee+ve}function k(_e,ee){const{P:ve}=s;let Re=_e;for(;ee-- >r;)Re*=Re,Re%=ve;return Re}function G(_e){const{P:ee}=s,ve=BigInt(6),Re=BigInt(11),ze=BigInt(22),Xe=BigInt(23),st=BigInt(44),lt=BigInt(88),_t=_e*_e*_e%ee,le=_t*_t*_e%ee,Z=k(le,a)*le%ee,ye=k(Z,a)*le%ee,Me=k(ye,i)*_t%ee,Le=k(Me,Re)*Me%ee,wt=k(Le,ze)*Le%ee,It=k(wt,st)*wt%ee,gr=k(It,lt)*It%ee,lr=k(gr,st)*wt%ee,en=k(lr,a)*le%ee,yr=k(en,Xe)*Le%ee,xr=k(yr,ve)*_t%ee,on=k(xr,i);if(on*on%ee!==_e)throw new Error("Cannot find square root");return on}function ge(_e,ee=s.P){if(_e===r||ee<=r)throw new Error(`invert: expected positive integers, got n=${_e} mod=${ee}`);let ve=L(_e,ee),Re=ee,ze=r,Xe=n;for(;ve!==r;){const lt=Re/ve,_t=Re%ve,le=ze-Xe*lt;Re=ve,ve=_t,ze=Xe,Xe=le}if(Re!==n)throw new Error("invert: does not exist");return L(ze,ee)}function Q(_e,ee=s.P){const ve=new Array(_e.length),Re=_e.reduce((Xe,st,lt)=>st===r?Xe:(ve[lt]=Xe,L(Xe*st,ee)),n),ze=ge(Re,ee);return _e.reduceRight((Xe,st,lt)=>st===r?Xe:(ve[lt]=L(Xe*ve[lt],ee),L(Xe*st,ee)),ze),ve}function te(_e){const ee=_e.length*8-d*8,ve=V(_e);return ee>0?ve>>BigInt(ee):ve}function ue(_e,ee=!1){const ve=te(_e);if(ee)return ve;const{n:Re}=s;return ve>=Re?ve-Re:ve}let T,fe;class Ge{constructor(ee,ve){if(this.hashLen=ee,this.qByteLen=ve,typeof ee!="number"||ee<2)throw new Error("hashLen must be a number");if(typeof ve!="number"||ve<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(ee).fill(1),this.k=new Uint8Array(ee).fill(0),this.counter=0}hmac(...ee){return t.utils.hmacSha256(this.k,...ee)}hmacSync(...ee){return fe(this.k,...ee)}checkSync(){if(typeof fe!="function")throw new _("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(ee=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),ee),this.v=await this.hmac(this.v),ee.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),ee),this.v=await this.hmac(this.v))}reseedSync(ee=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),ee),this.v=this.hmacSync(this.v),ee.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),ee),this.v=this.hmacSync(this.v))}async generate(){this.incr();let ee=0;const ve=[];for(;ee<this.qByteLen;){this.v=await this.hmac(this.v);const Re=this.v.slice();ve.push(Re),ee+=this.v.length}return B(...ve)}generateSync(){this.checkSync(),this.incr();let ee=0;const ve=[];for(;ee<this.qByteLen;){this.v=this.hmacSync(this.v);const Re=this.v.slice();ve.push(Re),ee+=this.v.length}return B(...ve)}}function tt(_e){return r<_e&&_e<s.n}function mt(_e){return r<_e&&_e<s.P}function vt(_e,ee,ve,Re=!0){const{n:ze}=s,Xe=ue(_e,!0);if(!tt(Xe))return;const st=ge(Xe,ze),lt=E.BASE.multiply(Xe),_t=L(lt.x,ze);if(_t===r)return;const le=L(st*L(ee+ve*_t,ze),ze);if(le===r)return;let Z=new M(_t,le),ye=(lt.x===Z.r?0:2)|Number(lt.y&n);return Re&&Z.hasHighS()&&(Z=Z.normalizeS(),ye^=1),{sig:Z,recovery:ye}}function gt(_e){let ee;if(typeof _e=="bigint")ee=_e;else if(typeof _e=="number"&&Number.isSafeInteger(_e)&&_e>0)ee=BigInt(_e);else if(typeof _e=="string"){if(_e.length!==2*d)throw new Error("Expected 32 bytes of private key");ee=j(_e)}else if(_e instanceof Uint8Array){if(_e.length!==d)throw new Error("Expected 32 bytes of private key");ee=V(_e)}else throw new TypeError("Expected valid private key");if(!tt(ee))throw new Error("Expected private key: 0 < key < n");return ee}function Lt(_e){return _e instanceof E?(_e.assertValidity(),_e):E.fromHex(_e)}function Yt(_e){if(_e instanceof M)return _e.assertValidity(),_e;try{return M.fromDER(_e)}catch{return M.fromCompact(_e)}}function _r(_e,ee=!1){return E.fromPrivateKey(_e).toRawBytes(ee)}t.getPublicKey=_r;function Rt(_e,ee,ve,Re=!1){return E.fromSignature(_e,ee,ve).toRawBytes(Re)}t.recoverPublicKey=Rt;function Pt(_e){const ee=_e instanceof Uint8Array,ve=typeof _e=="string",Re=(ee||ve)&&_e.length;return ee?Re===m||Re===w:ve?Re===m*2||Re===w*2:_e instanceof E}function kt(_e,ee,ve=!1){if(Pt(_e))throw new TypeError("getSharedSecret: first arg must be private key");if(!Pt(ee))throw new TypeError("getSharedSecret: second arg must be public key");const Re=Lt(ee);return Re.assertValidity(),Re.multiply(gt(_e)).toRawBytes(ve)}t.getSharedSecret=kt;function Nt(_e){const ee=_e.length>f?_e.slice(0,f):_e;return V(ee)}function Kt(_e){const ee=Nt(_e),ve=L(ee,s.n);return Ut(ve<r?ee:ve)}function Ut(_e){return K(_e)}function Vt(_e,ee,ve){if(_e==null)throw new Error(`sign: expected valid message hash, not "${_e}"`);const Re=$(_e),ze=gt(ee),Xe=[Ut(ze),Kt(Re)];if(ve!=null){ve===!0&&(ve=t.utils.randomBytes(f));const _t=$(ve);if(_t.length!==f)throw new Error(`sign: Expected ${f} bytes of extra data`);Xe.push(_t)}const st=B(...Xe),lt=Nt(Re);return{seed:st,m:lt,d:ze}}function $t(_e,ee){const{sig:ve,recovery:Re}=_e,{der:ze,recovered:Xe}=Object.assign({canonical:!0,der:!0},ee),st=ze?ve.toDERRawBytes():ve.toCompactRawBytes();return Xe?[st,Re]:st}async function Dt(_e,ee,ve={}){const{seed:Re,m:ze,d:Xe}=Vt(_e,ee,ve.extraEntropy),st=new Ge(g,d);await st.reseed(Re);let lt;for(;!(lt=vt(await st.generate(),ze,Xe,ve.canonical));)await st.reseed();return $t(lt,ve)}t.sign=Dt;function qt(_e,ee,ve={}){const{seed:Re,m:ze,d:Xe}=Vt(_e,ee,ve.extraEntropy),st=new Ge(g,d);st.reseedSync(Re);let lt;for(;!(lt=vt(st.generateSync(),ze,Xe,ve.canonical));)st.reseedSync();return $t(lt,ve)}t.signSync=qt;const Mt={strict:!0};function cr(_e,ee,ve,Re=Mt){let ze;try{ze=Yt(_e),ee=$(ee)}catch{return!1}const{r:Xe,s:st}=ze;if(Re.strict&&ze.hasHighS())return!1;const lt=ue(ee);let _t;try{_t=Lt(ve)}catch{return!1}const{n:le}=s,Z=ge(st,le),ye=L(lt*Z,le),Me=L(Xe*Z,le),Le=E.BASE.multiplyAndAddUnsafe(_t,ye,Me);return Le?L(Le.x,le)===Xe:!1}t.verify=cr;function tr(_e){return L(V(_e),s.n)}class ir{constructor(ee,ve){this.r=ee,this.s=ve,this.assertValidity()}static fromHex(ee){const ve=$(ee);if(ve.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${ve.length}`);const Re=V(ve.subarray(0,32)),ze=V(ve.subarray(32,64));return new ir(Re,ze)}assertValidity(){const{r:ee,s:ve}=this;if(!mt(ee)||!tt(ve))throw new Error("Invalid signature")}toHex(){return U(this.r)+U(this.s)}toRawBytes(){return q(this.toHex())}}function nr(_e){return E.fromPrivateKey(_e).toRawX()}class vr{constructor(ee,ve,Re=t.utils.randomBytes()){if(ee==null)throw new TypeError(`sign: Expected valid message, not "${ee}"`);this.m=$(ee);const{x:ze,scalar:Xe}=this.getScalar(gt(ve));if(this.px=ze,this.d=Xe,this.rand=$(Re),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(ee){const ve=E.fromPrivateKey(ee),Re=ve.hasEvenY()?ee:s.n-ee;return{point:ve,scalar:Re,x:ve.toRawX()}}initNonce(ee,ve){return K(ee^V(ve))}finalizeNonce(ee){const ve=L(V(ee),s.n);if(ve===r)throw new Error("sign: Creation of signature failed. k is zero");const{point:Re,x:ze,scalar:Xe}=this.getScalar(ve);return{R:Re,rx:ze,k:Xe}}finalizeSig(ee,ve,Re,ze){return new ir(ee.x,L(ve+Re*ze,s.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:ee,d:ve,px:Re,rand:ze}=this,Xe=t.utils.taggedHash,st=this.initNonce(ve,await Xe(Mr.aux,ze)),{R:lt,rx:_t,k:le}=this.finalizeNonce(await Xe(Mr.nonce,st,Re,ee)),Z=tr(await Xe(Mr.challenge,_t,Re,ee)),ye=this.finalizeSig(lt,le,Z,ve);return await $n(ye,ee,Re)||this.error(),ye}calcSync(){const{m:ee,d:ve,px:Re,rand:ze}=this,Xe=t.utils.taggedHashSync,st=this.initNonce(ve,Xe(Mr.aux,ze)),{R:lt,rx:_t,k:le}=this.finalizeNonce(Xe(Mr.nonce,st,Re,ee)),Z=tr(Xe(Mr.challenge,_t,Re,ee)),ye=this.finalizeSig(lt,le,Z,ve);return Kn(ye,ee,Re)||this.error(),ye}}async function wn(_e,ee,ve){return new vr(_e,ee,ve).calc()}function Yr(_e,ee,ve){return new vr(_e,ee,ve).calcSync()}function ai(_e,ee,ve){const Re=_e instanceof ir,ze=Re?_e:ir.fromHex(_e);return Re&&ze.assertValidity(),{...ze,m:$(ee),P:Lt(ve)}}function Dn(_e,ee,ve,Re){const ze=E.BASE.multiplyAndAddUnsafe(ee,gt(ve),L(-Re,s.n));return!(!ze||!ze.hasEvenY()||ze.x!==_e)}async function $n(_e,ee,ve){try{const{r:Re,s:ze,m:Xe,P:st}=ai(_e,ee,ve),lt=tr(await t.utils.taggedHash(Mr.challenge,K(Re),st.toRawX(),Xe));return Dn(Re,st,ze,lt)}catch{return!1}}function Kn(_e,ee,ve){try{const{r:Re,s:ze,m:Xe,P:st}=ai(_e,ee,ve),lt=tr(t.utils.taggedHashSync(Mr.challenge,K(Re),st.toRawX(),Xe));return Dn(Re,st,ze,lt)}catch(Re){if(Re instanceof _)throw Re;return!1}}t.schnorr={Signature:ir,getPublicKey:nr,sign:wn,verify:$n,signSync:Yr,verifySync:Kn},E.BASE._setWindowSize(8);const Ar={node:e,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Mr={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},Er={};t.utils={bytesToHex:he,hexToBytes:q,concatBytes:B,mod:L,invert:ge,isValidPrivateKey(_e){try{return gt(_e),!0}catch{return!1}},_bigintTo32Bytes:K,_normalizePrivateKey:gt,hashToPrivateKey:_e=>{_e=$(_e);const ee=d+8;if(_e.length<ee||_e.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const ve=L(V(_e),s.n-n)+n;return K(ve)},randomBytes:(_e=32)=>{if(Ar.web)return Ar.web.getRandomValues(new Uint8Array(_e));if(Ar.node){const{randomBytes:ee}=Ar.node;return Uint8Array.from(ee(_e))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>t.utils.hashToPrivateKey(t.utils.randomBytes(d+8)),precompute(_e=8,ee=E.BASE){const ve=ee===E.BASE?ee:new E(ee.x,ee.y);return ve._setWindowSize(_e),ve.multiply(a),ve},sha256:async(..._e)=>{if(Ar.web){const ee=await Ar.web.subtle.digest("SHA-256",B(..._e));return new Uint8Array(ee)}else if(Ar.node){const{createHash:ee}=Ar.node,ve=ee("sha256");return _e.forEach(Re=>ve.update(Re)),Uint8Array.from(ve.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(_e,...ee)=>{if(Ar.web){const ve=await Ar.web.subtle.importKey("raw",_e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),Re=B(...ee),ze=await Ar.web.subtle.sign("HMAC",ve,Re);return new Uint8Array(ze)}else if(Ar.node){const{createHmac:ve}=Ar.node,Re=ve("sha256",_e);return ee.forEach(ze=>Re.update(ze)),Uint8Array.from(Re.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(_e,...ee)=>{let ve=Er[_e];if(ve===void 0){const Re=await t.utils.sha256(Uint8Array.from(_e,ze=>ze.charCodeAt(0)));ve=B(Re,Re),Er[_e]=ve}return t.utils.sha256(ve,...ee)},taggedHashSync:(_e,...ee)=>{if(typeof T!="function")throw new _("sha256Sync is undefined, you need to set it");let ve=Er[_e];if(ve===void 0){const Re=T(Uint8Array.from(_e,ze=>ze.charCodeAt(0)));ve=B(Re,Re),Er[_e]=ve}return T(ve,...ee)},_JacobianPoint:S},Object.defineProperties(t.utils,{sha256Sync:{configurable:!1,get(){return T},set(_e){T||(T=_e)}},hmacSha256Sync:{configurable:!1,get(){return fe},set(_e){fe||(fe=_e)}}})})(L4);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.schnorr=t.Signature=t.Point=t.CURVE=t.utils=t.getSharedSecret=t.recoverPublicKey=t.verify=t.signSync=t.sign=t.getPublicKey=void 0;const e=xce,r=gp,n=L4;var i=L4;Object.defineProperty(t,"getPublicKey",{enumerable:!0,get:function(){return i.getPublicKey}}),Object.defineProperty(t,"sign",{enumerable:!0,get:function(){return i.sign}}),Object.defineProperty(t,"signSync",{enumerable:!0,get:function(){return i.signSync}}),Object.defineProperty(t,"verify",{enumerable:!0,get:function(){return i.verify}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return i.recoverPublicKey}}),Object.defineProperty(t,"getSharedSecret",{enumerable:!0,get:function(){return i.getSharedSecret}}),Object.defineProperty(t,"utils",{enumerable:!0,get:function(){return i.utils}}),Object.defineProperty(t,"CURVE",{enumerable:!0,get:function(){return i.CURVE}}),Object.defineProperty(t,"Point",{enumerable:!0,get:function(){return i.Point}}),Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return i.Signature}}),Object.defineProperty(t,"schnorr",{enumerable:!0,get:function(){return i.schnorr}}),n.utils.hmacSha256Sync=(a,...o)=>{const s=e.hmac.create(r.sha256,a);return o.forEach(c=>s.update(c)),s.digest()}})(gL);var Dr={},f2={exports:{}};f2.exports;(function(t,e){var r=Ne&&Ne.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=e.wrapHash=e.equalsBytes=e.hexToBytes=e.bytesToUtf8=e.utf8ToBytes=e.createView=e.concatBytes=e.toHex=e.bytesToHex=e.assertBytes=e.assertBool=void 0;const n=r(ga),i=Uy,a=n.default.bool;e.assertBool=a;const o=n.default.bytes;e.assertBytes=o;var s=Uy;Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return s.bytesToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return s.bytesToHex}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return s.concatBytes}}),Object.defineProperty(e,"createView",{enumerable:!0,get:function(){return s.createView}}),Object.defineProperty(e,"utf8ToBytes",{enumerable:!0,get:function(){return s.utf8ToBytes}});function c(g){if(!(g instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof g}`);return new TextDecoder().decode(g)}e.bytesToUtf8=c;function u(g){const m=g.startsWith("0x")?g.substring(2):g;return(0,i.hexToBytes)(m)}e.hexToBytes=u;function f(g,m){if(g.length!==m.length)return!1;for(let w=0;w<g.length;w++)if(g[w]!==m[w])return!1;return!0}e.equalsBytes=f;function d(g){return m=>(n.default.bytes(m),g(m))}e.wrapHash=d,e.crypto=(()=>{const g=typeof self=="object"&&"crypto"in self?self.crypto:void 0,m=typeof v4=="function"&&v4.bind(t);return{node:m&&!g?m("crypto"):void 0,web:g}})()})(f2,f2.exports);var xVe=f2.exports,AVe=Ne&&Ne.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),SVe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),IVe=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&AVe(e,t,r);return SVe(e,t),e};Object.defineProperty(Dr,"__esModule",{value:!0});Dr.contextRandomize=Dr.ecdh=Dr.signatureNormalize=Dr.signatureImport=Dr.signatureExport=Dr.privateKeyTweakMul=Dr.publicKeyTweakMul=Dr.publicKeyTweakAdd=Dr.publicKeyCombine=Dr.publicKeyNegate=Dr.privateKeyNegate=Dr.privateKeyTweakAdd=Dr.ecdsaVerify=Dr.ecdsaRecover=Dr.ecdsaSign=Dr.publicKeyConvert=Dr.publicKeyVerify=Dr.publicKeyCreate=Dr.privateKeyVerify=Dr.createPrivateKey=Dr.createPrivateKeySync=void 0;const OVe=gp,ti=IVe(gL),Cr=xVe;function PVe(t){if(typeof t!="string")throw new TypeError("hexToNumber: expected string, got "+typeof t);return BigInt(`0x${t}`)}const gd=t=>PVe((0,Cr.toHex)(t)),BI=t=>t.toString(16).padStart(64,"0"),U4=t=>(0,Cr.hexToBytes)(BI(t)),{mod:Tce}=ti.utils,Nc=ti.CURVE.n;function zs(t=n=>new Uint8Array(n),e,r){return typeof t=="function"&&(t=t(e)),(0,Cr.assertBytes)(t,e),r&&t.set(r),t}function q1(t){return(0,Cr.assertBytes)(t,64),ti.Signature.fromCompact(t)}function Rce(){return ti.utils.randomPrivateKey()}Dr.createPrivateKeySync=Rce;async function TVe(){return Rce()}Dr.createPrivateKey=TVe;function RVe(t){return(0,Cr.assertBytes)(t,32),ti.utils.isValidPrivateKey(t)}Dr.privateKeyVerify=RVe;function CVe(t,e=!0,r){(0,Cr.assertBytes)(t,32),(0,Cr.assertBool)(e);const n=ti.getPublicKey(t,e);return zs(r,e?33:65,n)}Dr.publicKeyCreate=CVe;function NVe(t){(0,Cr.assertBytes)(t,33,65);try{return ti.Point.fromHex(t),!0}catch{return!1}}Dr.publicKeyVerify=NVe;function DVe(t,e=!0,r){(0,Cr.assertBytes)(t,33,65),(0,Cr.assertBool)(e);const n=ti.Point.fromHex(t).toRawBytes(e);return zs(r,e?33:65,n)}Dr.publicKeyConvert=DVe;function $Ve(t,e,r={noncefn:void 0,data:void 0},n){if((0,Cr.assertBytes)(t,32),(0,Cr.assertBytes)(e,32),typeof r!="object"||r===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(r&&(r.noncefn!==void 0||r.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[i,a]=ti.signSync(t,e,{recovered:!0,der:!1});return{signature:zs(n,64,i),recid:a}}Dr.ecdsaSign=$Ve;function MVe(t,e,r,n=!0,i){(0,Cr.assertBytes)(r,32),(0,Cr.assertBool)(n);const a=q1(t).toHex(),o=ti.Point.fromSignature(r,a,e);return zs(i,n?33:65,o.toRawBytes(n))}Dr.ecdsaRecover=MVe;function kVe(t,e,r){(0,Cr.assertBytes)(t,64),(0,Cr.assertBytes)(e,32),(0,Cr.assertBytes)(r,33,65),(0,Cr.assertBytes)(t,64);const n=gd(t.slice(0,32)),i=gd(t.slice(32,64));if(n>=Nc||i>=Nc)throw new Error("Cannot parse signature");const a=ti.Point.fromHex(r);let o;try{o=q1(t)}catch{return!1}return ti.verify(o,e,a)}Dr.ecdsaVerify=kVe;function LVe(t,e){(0,Cr.assertBytes)(t,32),(0,Cr.assertBytes)(e,32);let r=gd(e);if(r===0n)throw new Error("Tweak must not be zero");if(r>=Nc)throw new Error("Tweak bigger than curve order");if(r+=gd(t),r>=Nc&&(r-=Nc),r===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return t.set((0,Cr.hexToBytes)(BI(r))),t}Dr.privateKeyTweakAdd=LVe;function UVe(t){(0,Cr.assertBytes)(t,32);const e=Tce(-gd(t),Nc);return t.set((0,Cr.hexToBytes)(BI(e))),t}Dr.privateKeyNegate=UVe;function BVe(t,e=!0,r){(0,Cr.assertBytes)(t,33,65),(0,Cr.assertBool)(e);const n=ti.Point.fromHex(t).negate();return zs(r,e?33:65,n.toRawBytes(e))}Dr.publicKeyNegate=BVe;function FVe(t,e=!0,r){if(!Array.isArray(t)||!t.length)throw new TypeError(`Expected array with one or more items, not ${t}`);for(const i of t)(0,Cr.assertBytes)(i,33,65);(0,Cr.assertBool)(e);const n=t.map(i=>ti.Point.fromHex(i)).reduce((i,a)=>i.add(a),ti.Point.ZERO);if(n.equals(ti.Point.ZERO))throw new Error("Combined result must not be zero");return zs(r,e?33:65,n.toRawBytes(e))}Dr.publicKeyCombine=FVe;function jVe(t,e,r=!0,n){(0,Cr.assertBytes)(t,33,65),(0,Cr.assertBytes)(e,32),(0,Cr.assertBool)(r);const i=ti.Point.fromHex(t),a=ti.Point.fromPrivateKey(e),o=i.add(a);if(a.equals(ti.Point.ZERO)||o.equals(ti.Point.ZERO))throw new Error("Tweak must not be zero");return zs(n,r?33:65,o.toRawBytes(r))}Dr.publicKeyTweakAdd=jVe;function qVe(t,e,r=!0,n){(0,Cr.assertBytes)(t,33,65),(0,Cr.assertBytes)(e,32),(0,Cr.assertBool)(r);const i=gd(e);if(i===0n)throw new Error("Tweak must not be zero");if(i<=1||i>=Nc)throw new Error("Tweak is zero or bigger than curve order");const a=ti.Point.fromHex(t).multiply(i);return zs(n,r?33:65,a.toRawBytes(r))}Dr.publicKeyTweakMul=qVe;function HVe(t,e){(0,Cr.assertBytes)(t,32),(0,Cr.assertBytes)(e,32);const r=gd(e);if(r<=1||r>=Nc)throw new Error("Tweak is zero or bigger than curve order");const n=Tce(r*gd(t),Nc);if(n===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return t.set((0,Cr.hexToBytes)(BI(n))),t}Dr.privateKeyTweakMul=HVe;function VVe(t,e){const r=q1(t).toRawBytes();return zs(e,72,q1(t).toRawBytes()).slice(0,r.length)}Dr.signatureExport=VVe;function zVe(t,e){(0,Cr.assertBytes)(t);const r=ti.Signature.fromDER(t);return zs(e,64,(0,Cr.hexToBytes)(r.toCompactHex()))}Dr.signatureImport=zVe;function GVe(t){const e=q1(t);return e.s>Nc/2n&&t.set(U4(Nc-e.s),32),t}Dr.signatureNormalize=GVe;function WVe(t,e,r={},n){if((0,Cr.assertBytes)(t,33,65),(0,Cr.assertBytes)(e,32),typeof r!="object"||r===null)throw new TypeError("secp256k1.ecdh: options should be object");r.data!==void 0&&(0,Cr.assertBytes)(r.data);const i=ti.Point.fromHex(ti.getSharedSecret(e,t));if(r.hashfn===void 0)return zs(n,32,(0,OVe.sha256)(i.toRawBytes(!0)));if(typeof r.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");r.xbuf!==void 0&&(0,Cr.assertBytes)(r.xbuf,32),r.ybuf!==void 0&&(0,Cr.assertBytes)(r.ybuf,32),(0,Cr.assertBytes)(n,32);const a=r.xbuf||new Uint8Array(32);a.set(U4(i.x));const o=r.ybuf||new Uint8Array(32);o.set(U4(i.y));const s=r.hashfn(a,o,r.data);if(!(s instanceof Uint8Array)||s.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return zs(n,32,s)}Dr.ecdh=WVe;function KVe(t){t!==null&&(0,Cr.assertBytes)(t,32)}Dr.contextRandomize=KVe;Object.defineProperty(La,"__esModule",{value:!0});La.createUnsafeIdentity=La.computeAddress=La.ethSign=La.createEthereumMessageHash=La.sign=La.recoverAddressFromEthSignature=La.recoverPublicKey=void 0;const Zo=$I,wQ=gL,Cce=Dr;function Nce(t,e){if(t.length!==65)throw new Error("Invalid signature length"+t.length);const r=t.slice(0,t.length-1),n=t[64]===28?1:0;return(0,Cce.ecdsaRecover)(r,n,e,!1).slice(1)}La.recoverPublicKey=Nce;function YVe(t){if(t.length!==65)throw new Error("Invalid ethereum signature");const e=t[64];if(e===0||e===1){const r=new Uint8Array(t);return r[64]=e+27,r}return t}function Dce(t,e){if(typeof t=="string"){if((0,Zo.isHex)(t))return Dce((0,Zo.hexToBytes)(t),e);throw new Error("String signatures must be encoded in hex")}return vL(Nce(YVe(t),mL(e)))}La.recoverAddressFromEthSignature=Dce;function $ce(t,e){const r=(0,Cce.ecdsaSign)(e,t),n=r.recid===1?"1c":"1b";return(0,Zo.toHex)(r.signature)+n}La.sign=$ce;function mL(t){const e=typeof t=="string"?(0,Zo.stringToUtf8Bytes)(t):t,r=(0,Zo.concatBytes)((0,Zo.stringToUtf8Bytes)(`Ethereum Signed Message:
|
|
178
|
-
`),(0,Zo.stringToUtf8Bytes)(String(e.length)),e);return(0,Zo.hexToBytes)((0,Zo.sha3)(r))}La.createEthereumMessageHash=mL;function QVe(t,e){return $ce(t,mL(e))}La.ethSign=QVe;function vL(t){const e=t.length===65&&t[0]===4?t.slice(1):t;return(0,Zo.getAddress)((0,Zo.sha3)(e).substring(24))}La.computeAddress=vL;function JVe(){const t=wQ.utils.randomPrivateKey(),e=(0,wQ.getPublicKey)(t).slice(1),r=vL(e);return{privateKey:(0,Zo.bytesToHex)(t),publicKey:(0,Zo.bytesToHex)(e),address:r}}La.createUnsafeIdentity=JVe;(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(C,M,B,ce){ce===void 0&&(ce=B);var he=Object.getOwnPropertyDescriptor(M,B);(!he||("get"in he?!M.__esModule:he.writable||he.configurable))&&(he={enumerable:!0,get:function(){return M[B]}}),Object.defineProperty(C,ce,he)}:function(C,M,B,ce){ce===void 0&&(ce=B),C[ce]=M[B]}),r=Ne&&Ne.__setModuleDefault||(Object.create?function(C,M){Object.defineProperty(C,"default",{enumerable:!0,value:M})}:function(C,M){C.default=M}),n=Ne&&Ne.__importStar||function(C){if(C&&C.__esModule)return C;var M={};if(C!=null)for(var B in C)B!=="default"&&Object.prototype.hasOwnProperty.call(C,B)&&e(M,C,B);return r(M,C),M},i=Ne&&Ne.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(t,"__esModule",{value:!0}),t.isValidEIP1271Signature=t.parseEmphemeralPayload=t.getSignedIdentitySignatureType=t.getEphemeralSignatureType=t.EIP_1654_SIGNED_ENTITY_VALIDATOR=t.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=t.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=t.ECDSA_SIGNED_ENTITY_VALIDATOR=t.SIGNER_VALIDATOR=t.Authenticator=t.ERC1654_MAGIC_VALUE=t.VALID_SIGNATURE=void 0;const a=n($I),o=MI,s=hL,c=kI,u=i(pL),f=La;t.VALID_SIGNATURE="VALID_SIGNATURE",t.ERC1654_MAGIC_VALUE="1626ba7e";const d=132;var g;(function(C){async function M(V,$,H,L=Date.now()){let k="";if(!C.isValidAuthChain($))return{ok:!1,message:"ERROR: Malformed authChain"};for(const ge of $){const Q=O(ge.type);try{const{nextAuthority:te}=await Q(k,ge,{provider:H,dateToValidateExpirationInMillis:L});k=te||""}catch(te){return{ok:!1,message:`ERROR. Link type: ${ge.type}. ${te.message}.`}}}const G=k===V;return{ok:G,message:G?void 0:`ERROR: Invalid final authority. Expected: ${V}. Current ${k}.`}}C.validateSignature=M;function B(V){for(const[$,H]of V.entries())if($===0&&H.type!==s.AuthLinkType.SIGNER||H.type===s.AuthLinkType.SIGNER&&$!==0)return!1;return!0}C.isValidAuthChain=B;function ce(V){return(0,a.hexToBytes)((0,a.sha3)((0,a.stringToUtf8Bytes)(V)))}C.createEIP1271MessageHash=ce;function he(V,$,H){return[{type:s.AuthLinkType.SIGNER,payload:$,signature:""},{type:x(H),payload:V,signature:H}]}C.createSimpleAuthChain=he;function F(V,$,H,L){const k=(0,c.moveMinutes)(H),G=C.getEphemeralMessage($.address,k),ge=C.createSignature(V,G),Q=C.createSignature($,L);return[{type:s.AuthLinkType.SIGNER,payload:V.address,signature:""},{type:s.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:G,signature:ge},{type:s.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:L,signature:Q}]}C.createAuthChain=F;async function U(V,$,H,L){const k=new Date;k.setMinutes(k.getMinutes()+H);const G=C.getEphemeralMessage($.address,k),ge=await L(G),Q=[{type:s.AuthLinkType.SIGNER,payload:V,signature:""},{type:S(ge),payload:G,signature:ge}];return{ephemeralIdentity:$,expiration:k,authChain:Q}}C.initializeAuthChain=U;function K(V,$){const H=C.createSignature(V.ephemeralIdentity,$);return[...V.authChain,{type:s.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:$,signature:H}]}C.signPayload=K,C.createEthereumMessageHash=f.createEthereumMessageHash;function ne(V,$){return(0,f.ethSign)((0,a.hexToBytes)(V.privateKey),$)}C.createSignature=ne;function j(V){return V.length>0&&V[0].type===s.AuthLinkType.SIGNER?V[0].payload:"Invalid-Owner-Address"}C.ownerAddress=j;function q(V,$){return`Decentraland Login
|
|
179
|
-
Ephemeral address: ${V}
|
|
180
|
-
Expiration: ${$.toISOString()}`}C.getEphemeralMessage=q})(g=t.Authenticator||(t.Authenticator={}));const m=async(C,M)=>({nextAuthority:M.payload});t.SIGNER_VALIDATOR=m;const w=async(C,M)=>{if(!M.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const B=(0,f.recoverAddressFromEthSignature)(M.signature,M.payload),ce=C.toLocaleLowerCase(),he=B.toLocaleLowerCase();if(ce===he)return{nextAuthority:M.payload};throw new Error(`Invalid signer address. Expected: ${ce}. Actual: ${he}`)};t.ECDSA_SIGNED_ENTITY_VALIDATOR=w;const v=async(C,M,B)=>{if(!M.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:ce,ephemeralAddress:he,expiration:F}=I(M.payload),U=B.dateToValidateExpirationInMillis?B.dateToValidateExpirationInMillis:Date.now();if(F>U){const K=(0,f.recoverAddressFromEthSignature)(M.signature,ce),ne=C.toLocaleLowerCase(),j=K.toLocaleLowerCase();if(ne===j)return{nextAuthority:he};throw new Error(`Invalid signer address. Expected: ${ne}. Actual: ${j}`)}throw new Error(`Ephemeral key expired. Expiration: ${F}. Test: ${U}`)};t.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=v;const y=async(C,M,B)=>{if(!M.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:ce,ephemeralAddress:he,expiration:F}=I(M.payload),U=B!=null&&B.dateToValidateExpirationInMillis?B==null?void 0:B.dateToValidateExpirationInMillis:Date.now();if(F>U&&await p(B.provider,C,ce,M.signature,U))return{nextAuthority:he};throw new Error(`Ephemeral key expired. Expiration: ${F}. Test: ${U}`)};t.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=y;const _=async(C,M,B)=>{if(!M.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await p(B.provider,C,M.payload,M.signature,B.dateToValidateExpirationInMillis))return{nextAuthority:M.payload};throw new Error("Invalid validation")};t.EIP_1654_SIGNED_ENTITY_VALIDATOR=_;const b=async(C,M)=>({error:"Error Validator."});function S(C){return C.length===d?s.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:s.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}t.getEphemeralSignatureType=S;function x(C){return C.length===d?s.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:s.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}t.getSignedIdentitySignatureType=x;function I(C){const M=C.replace(/\r/g,""),B=M.split(`
|
|
181
|
-
`),ce=B[1].substring(19),he=B[2].substring(12),F=Date.parse(he);return{message:M,ephemeralAddress:ce,expiration:F}}t.parseEmphemeralPayload=I;async function E(C,M,B,ce){const he=g.createEIP1271MessageHash(M),F=(0,a.hexToBytes)(B);let U;try{U=(0,a.bytesToHex)(await C.isValidSignature(he,F,ce))}catch{}if(U===t.ERC1654_MAGIC_VALUE)return!0;const K=(0,f.createEthereumMessageHash)(M);try{U=(0,a.bytesToHex)(await C.isValidSignature(K,F,ce))}catch{}return U===t.ERC1654_MAGIC_VALUE}t.isValidEIP1271Signature=E;async function p(C,M,B,ce,he){if(!C)throw new Error("Missing provider");const F=new a.default(C),U=await(0,o.SignatureValidator)(F,M);let K=await E(U,B,ce);if(K)return!0;const ne=new u.default(F);try{const{block:j}=await ne.getDate(he,!1);if(K=await E(U,B,ce,j),K)return!0}catch(j){throw new Error(`Invalid validation. Error: ${j.message}`)}throw new Error(`Invalid validation. Expected: ${t.ERC1654_MAGIC_VALUE}. Actual: ${K}`)}function O(C){switch(C){case s.AuthLinkType.SIGNER:return t.SIGNER_VALIDATOR;case s.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return t.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case s.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return t.ECDSA_SIGNED_ENTITY_VALIDATOR;case s.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return t.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case s.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return t.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return b}}})(Ece);(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ece,t),r(hL,t)})(_ce);var B4={},mu={},F4={exports:{}},j4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function r(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(o){return typeof o}:r=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},r(i)}function n(i){var a=typeof i=="string"||i instanceof String;if(!a){var o=r(i);throw i===null?o="null":o==="object"&&(o=i.constructor.name),new TypeError("Expected a string but received a ".concat(o))}}t.exports=e.default,t.exports.default=e.default})(j4,j4.exports);var bL=j4.exports,q4={exports:{}},H4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;for(var a in i)typeof n[a]>"u"&&(n[a]=i[a]);return n}t.exports=e.default,t.exports.default=e.default})(H4,H4.exports);var Mce=H4.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=i(bL),n=i(Mce);function i(s){return s&&s.__esModule?s:{default:s}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function o(s,c){(0,r.default)(s),c=(0,n.default)(c,a),c.allow_trailing_dot&&s[s.length-1]==="."&&(s=s.substring(0,s.length-1)),c.allow_wildcard===!0&&s.indexOf("*.")===0&&(s=s.substring(2));var u=s.split("."),f=u[u.length-1];return c.require_tld&&(u.length<2||!c.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(f)||/\s/.test(f))||!c.allow_numeric_tld&&/^\d+$/.test(f)?!1:u.every(function(d){return!(d.length>63&&!c.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(d)||/[\uff01-\uff5e]/.test(d)||/^-|-$/.test(d)||!c.allow_underscores&&/_/.test(d))})}t.exports=e.default,t.exports.default=e.default})(q4,q4.exports);var XVe=q4.exports,V4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var r=n(bL);function n(f){return f&&f.__esModule?f:{default:f}}var i="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(i,"[.]){3}").concat(i),o=new RegExp("^".concat(a,"$")),s="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(s,":){7}(?:").concat(s,"|:)|")+"(?:".concat(s,":){6}(?:").concat(a,"|:").concat(s,"|:)|")+"(?:".concat(s,":){5}(?::").concat(a,"|(:").concat(s,"){1,2}|:)|")+"(?:".concat(s,":){4}(?:(:").concat(s,"){0,1}:").concat(a,"|(:").concat(s,"){1,3}|:)|")+"(?:".concat(s,":){3}(?:(:").concat(s,"){0,2}:").concat(a,"|(:").concat(s,"){1,4}|:)|")+"(?:".concat(s,":){2}(?:(:").concat(s,"){0,3}:").concat(a,"|(:").concat(s,"){1,5}|:)|")+"(?:".concat(s,":){1}(?:(:").concat(s,"){0,4}:").concat(a,"|(:").concat(s,"){1,6}|:)|")+"(?::((?::".concat(s,"){0,5}:").concat(a,"|(?::").concat(s,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function u(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,r.default)(f),d=String(d),d?d==="4"?o.test(f):d==="6"?c.test(f):!1:u(f,4)||u(f,6)}t.exports=e.default,t.exports.default=e.default})(V4,V4.exports);var ZVe=V4.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=_;var r=o(bL),n=o(XVe),i=o(ZVe),a=o(Mce);function o(b){return b&&b.__esModule?b:{default:b}}function s(b,S){return g(b)||d(b,S)||u(b,S)||c()}function c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
182
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u(b,S){if(b){if(typeof b=="string")return f(b,S);var x=Object.prototype.toString.call(b).slice(8,-1);if(x==="Object"&&b.constructor&&(x=b.constructor.name),x==="Map"||x==="Set")return Array.from(b);if(x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return f(b,S)}}function f(b,S){(S==null||S>b.length)&&(S=b.length);for(var x=0,I=new Array(S);x<S;x++)I[x]=b[x];return I}function d(b,S){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(b)))){var x=[],I=!0,E=!1,p=void 0;try{for(var O=b[Symbol.iterator](),C;!(I=(C=O.next()).done)&&(x.push(C.value),!(S&&x.length===S));I=!0);}catch(M){E=!0,p=M}finally{try{!I&&O.return!=null&&O.return()}finally{if(E)throw p}}return x}}function g(b){if(Array.isArray(b))return b}var m={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},w=/^\[([^\]]+)\](?::([0-9]+))?$/;function v(b){return Object.prototype.toString.call(b)==="[object RegExp]"}function y(b,S){for(var x=0;x<S.length;x++){var I=S[x];if(b===I||v(I)&&I.test(b))return!0}return!1}function _(b,S){if((0,r.default)(b),!b||/[\s<>]/.test(b)||b.indexOf("mailto:")===0||(S=(0,a.default)(S,m),S.validate_length&&b.length>=2083)||!S.allow_fragments&&b.includes("#")||!S.allow_query_components&&(b.includes("?")||b.includes("&")))return!1;var x,I,E,p,O,C,M,B;if(M=b.split("#"),b=M.shift(),M=b.split("?"),b=M.shift(),M=b.split("://"),M.length>1){if(x=M.shift().toLowerCase(),S.require_valid_protocol&&S.protocols.indexOf(x)===-1)return!1}else{if(S.require_protocol)return!1;if(b.slice(0,2)==="//"){if(!S.allow_protocol_relative_urls)return!1;M[0]=b.slice(2)}}if(b=M.join("://"),b==="")return!1;if(M=b.split("/"),b=M.shift(),b===""&&!S.require_host)return!0;if(M=b.split("@"),M.length>1){if(S.disallow_auth||M[0]===""||(I=M.shift(),I.indexOf(":")>=0&&I.split(":").length>2))return!1;var ce=I.split(":"),he=s(ce,2),F=he[0],U=he[1];if(F===""&&U==="")return!1}p=M.join("@"),C=null,B=null;var K=p.match(w);if(K?(E="",B=K[1],C=K[2]||null):(M=p.split(":"),E=M.shift(),M.length&&(C=M.join(":"))),C!==null&&C.length>0){if(O=parseInt(C,10),!/^[0-9]+$/.test(C)||O<=0||O>65535)return!1}else if(S.require_port)return!1;return S.host_whitelist?y(E,S.host_whitelist):E===""&&!S.require_host?!0:!(!(0,i.default)(E)&&!(0,n.default)(E,S)&&(!B||!(0,i.default)(B,6))||(E=E||B,S.host_blacklist&&y(E,S.host_blacklist)))}t.exports=e.default,t.exports.default=e.default})(F4,F4.exports);var eze=F4.exports,wL={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.localStorageClearIdentity=t.localStorageStoreIdentity=t.localStorageGetIdentity=t.createMessage=t.SINGLE_SIGN_ON_TARGET=t.Action=void 0;var e;(function(s){s.GET="get",s.STORE="store",s.CLEAR="clear",s.PING="ping"})(e||(t.Action=e={})),t.SINGLE_SIGN_ON_TARGET="single-sign-on";function r(s){return{target:t.SINGLE_SIGN_ON_TARGET,...s}}t.createMessage=r;function n(s){const c=localStorage.getItem(o(s));if(!c)return null;let u;try{u=JSON.parse(c)}catch{return a(s),null}return u.expiration=new Date(u.expiration),u.expiration.getTime()<=Date.now()?(a(s),null):u}t.localStorageGetIdentity=n;function i(s,c){new Date(c.expiration).getTime()>Date.now()&&localStorage.setItem(o(s),JSON.stringify(c))}t.localStorageStoreIdentity=i;function a(s){localStorage.removeItem(o(s))}t.localStorageClearIdentity=a;function o(s){if(!/^0x[a-fA-F0-9]{40}$/.test(s))throw new Error("User must be a valid ethereum address");return`single-sign-on-${s.toLowerCase()}`}})(wL);Object.defineProperty(mu,"__esModule",{value:!0});mu.clearIdentity=mu.storeIdentity=mu.getIdentity=mu.init=void 0;const tze=eze,Iu=wL,kce=Iu.SINGLE_SIGN_ON_TARGET,_Q=500,rze=5;let EQ=0,d2="";const nze={protocols:["https"],require_protocol:!0};function ize(t,e={}){if(!(0,tze.default)(t,{...nze,...e}))throw new Error(`Invalid url: ${t}`);if(d2)throw new Error("Already initialized");const r=document.createElement("iframe");r.id=kce,r.src=t,r.style.width="0",r.style.height="0",r.style.border="none",r.style.position="absolute",document.body.appendChild(r),d2=t}mu.init=ize;async function aze(t){let e;try{e=(await FI(await _L(),Iu.Action.GET,{user:t})).identity??null}catch(r){EL(r),e=(0,Iu.localStorageGetIdentity)(t)}return e}mu.getIdentity=aze;async function oze(t,e){try{await FI(await _L(),Iu.Action.STORE,{user:t,identity:e})}catch(r){EL(r),(0,Iu.localStorageStoreIdentity)(t,e)}}mu.storeIdentity=oze;async function sze(t){try{await FI(await _L(),Iu.Action.CLEAR,{user:t})}catch(e){EL(e),(0,Iu.localStorageClearIdentity)(t)}}mu.clearIdentity=sze;async function _L(){if(!d2)throw new Error("Not initialized");for(let t=0;t<rze;t++){const e=document.getElementById(kce),r=e==null?void 0:e.contentWindow;if(!r){await cze(_Q);continue}try{await FI(r,Iu.Action.PING,{},_Q)}catch{continue}return r}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function FI(t,e,r,n=0){EQ++;const i=EQ;let a=null;const o=new Promise((s,c)=>{a=({data:u})=>{!u||u.target!==Iu.SINGLE_SIGN_ON_TARGET||u.id!==i||(u.error?c(new Error(u.error)):s(u))},window.addEventListener("message",a)});t.postMessage((0,Iu.createMessage)({id:i,action:e,...r}),d2);try{return await(n?Promise.race([o,new Promise((s,c)=>setTimeout(()=>c(new Error("Did not receive a response in time")),n))]):o)}catch(s){throw s}finally{a&&window.removeEventListener("message",a)}}function cze(t){return new Promise(e=>setTimeout(e,t))}function EL(t){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",t.message)}(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(mu,t),r(wL,t)})(B4);var Lce={exports:{}};/*!
|
|
183
|
-
Copyright (c) 2018 Jed Watson.
|
|
184
|
-
Licensed under the MIT License (MIT), see
|
|
185
|
-
http://jedwatson.github.io/classnames
|
|
186
|
-
*/(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var n=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")n.push(a);else if(Array.isArray(a)){if(a.length){var s=r.apply(null,a);s&&n.push(s)}}else if(o==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){n.push(a.toString());continue}for(var c in a)e.call(a,c)&&a[c]&&n.push(c)}}}return n.join(" ")}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(Lce);var uze=Lce.exports;const yp=kc(uze),lze="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/logo-9a364aec.svg";var Zv={},n6,xQ;function fze(){if(xQ)return n6;xQ=1;var t=Bc(),e=gS();function r(n){return t(n)&&n.nodeType===1&&!e(n)}return n6=r,n6}var Uce=Be.createContext(),Bce=Be.createContext();function dze(t){var e=t.children,r=Be.useState(null),n=r[0],i=r[1],a=Be.useRef(!1);Be.useEffect(function(){return function(){a.current=!0}},[]);var o=Be.useCallback(function(s){a.current||i(s)},[]);return Be.createElement(Uce.Provider,{value:n},Be.createElement(Bce.Provider,{value:o},e))}var Fce=function(e){return Array.isArray(e)?e[0]:e},jce=function(e){if(typeof e=="function"){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return e.apply(void 0,n)}},z4=function(e,r){if(typeof e=="function")return jce(e,r);e!=null&&(e.current=r)},AQ=function(e){return e.reduce(function(r,n){var i=n[0],a=n[1];return r[i]=a,r},{})},SQ=typeof window<"u"&&window.document&&window.document.createElement?Be.useLayoutEffect:Be.useEffect,ko="top",Gs="bottom",Ws="right",Lo="left",xL="auto",Jw=[ko,Gs,Ws,Lo],By="start",H1="end",hze="clippingParents",qce="viewport",eb="popper",pze="reference",IQ=Jw.reduce(function(t,e){return t.concat([e+"-"+By,e+"-"+H1])},[]),Hce=[].concat(Jw,[xL]).reduce(function(t,e){return t.concat([e,e+"-"+By,e+"-"+H1])},[]),gze="beforeRead",yze="read",mze="afterRead",vze="beforeMain",bze="main",wze="afterMain",_ze="beforeWrite",Eze="write",xze="afterWrite",Aze=[gze,yze,mze,vze,bze,wze,_ze,Eze,xze];function Ou(t){return t?(t.nodeName||"").toLowerCase():null}function rs(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function mp(t){var e=rs(t).Element;return t instanceof e||t instanceof Element}function js(t){var e=rs(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function AL(t){if(typeof ShadowRoot>"u")return!1;var e=rs(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Sze(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},i=e.attributes[r]||{},a=e.elements[r];!js(a)||!Ou(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function Ize(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],a=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),s=o.reduce(function(c,u){return c[u]="",c},{});!js(i)||!Ou(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(c){i.removeAttribute(c)}))})}}const Oze={name:"applyStyles",enabled:!0,phase:"write",fn:Sze,effect:Ize,requires:["computeStyles"]};function Eu(t){return t.split("-")[0]}var np=Math.max,h2=Math.min,Fy=Math.round;function G4(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Vce(){return!/^((?!chrome|android).)*safari/i.test(G4())}function jy(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),i=1,a=1;e&&js(t)&&(i=t.offsetWidth>0&&Fy(n.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Fy(n.height)/t.offsetHeight||1);var o=mp(t)?rs(t):window,s=o.visualViewport,c=!Vce()&&r,u=(n.left+(c&&s?s.offsetLeft:0))/i,f=(n.top+(c&&s?s.offsetTop:0))/a,d=n.width/i,g=n.height/a;return{width:d,height:g,top:f,right:u+d,bottom:f+g,left:u,x:u,y:f}}function SL(t){var e=jy(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function zce(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&AL(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ul(t){return rs(t).getComputedStyle(t)}function Pze(t){return["table","td","th"].indexOf(Ou(t))>=0}function Dd(t){return((mp(t)?t.ownerDocument:t.document)||window.document).documentElement}function jI(t){return Ou(t)==="html"?t:t.assignedSlot||t.parentNode||(AL(t)?t.host:null)||Dd(t)}function OQ(t){return!js(t)||Ul(t).position==="fixed"?null:t.offsetParent}function Tze(t){var e=/firefox/i.test(G4()),r=/Trident/i.test(G4());if(r&&js(t)){var n=Ul(t);if(n.position==="fixed")return null}var i=jI(t);for(AL(i)&&(i=i.host);js(i)&&["html","body"].indexOf(Ou(i))<0;){var a=Ul(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Xw(t){for(var e=rs(t),r=OQ(t);r&&Pze(r)&&Ul(r).position==="static";)r=OQ(r);return r&&(Ou(r)==="html"||Ou(r)==="body"&&Ul(r).position==="static")?e:r||Tze(t)||e}function IL(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function e1(t,e,r){return np(t,h2(e,r))}function Rze(t,e,r){var n=e1(t,e,r);return n>r?r:n}function Gce(){return{top:0,right:0,bottom:0,left:0}}function Wce(t){return Object.assign({},Gce(),t)}function Kce(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var Cze=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,Wce(typeof e!="number"?e:Kce(e,Jw))};function Nze(t){var e,r=t.state,n=t.name,i=t.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,s=Eu(r.placement),c=IL(s),u=[Lo,Ws].indexOf(s)>=0,f=u?"height":"width";if(!(!a||!o)){var d=Cze(i.padding,r),g=SL(a),m=c==="y"?ko:Lo,w=c==="y"?Gs:Ws,v=r.rects.reference[f]+r.rects.reference[c]-o[c]-r.rects.popper[f],y=o[c]-r.rects.reference[c],_=Xw(a),b=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,S=v/2-y/2,x=d[m],I=b-g[f]-d[w],E=b/2-g[f]/2+S,p=e1(x,E,I),O=c;r.modifiersData[n]=(e={},e[O]=p,e.centerOffset=p-E,e)}}function Dze(t){var e=t.state,r=t.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||zce(e.elements.popper,i)&&(e.elements.arrow=i))}const $ze={name:"arrow",enabled:!0,phase:"main",fn:Nze,effect:Dze,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function qy(t){return t.split("-")[1]}var Mze={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kze(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:Fy(r*i)/i||0,y:Fy(n*i)/i||0}}function PQ(t){var e,r=t.popper,n=t.popperRect,i=t.placement,a=t.variation,o=t.offsets,s=t.position,c=t.gpuAcceleration,u=t.adaptive,f=t.roundOffsets,d=t.isFixed,g=o.x,m=g===void 0?0:g,w=o.y,v=w===void 0?0:w,y=typeof f=="function"?f({x:m,y:v}):{x:m,y:v};m=y.x,v=y.y;var _=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),S=Lo,x=ko,I=window;if(u){var E=Xw(r),p="clientHeight",O="clientWidth";if(E===rs(r)&&(E=Dd(r),Ul(E).position!=="static"&&s==="absolute"&&(p="scrollHeight",O="scrollWidth")),E=E,i===ko||(i===Lo||i===Ws)&&a===H1){x=Gs;var C=d&&E===I&&I.visualViewport?I.visualViewport.height:E[p];v-=C-n.height,v*=c?1:-1}if(i===Lo||(i===ko||i===Gs)&&a===H1){S=Ws;var M=d&&E===I&&I.visualViewport?I.visualViewport.width:E[O];m-=M-n.width,m*=c?1:-1}}var B=Object.assign({position:s},u&&Mze),ce=f===!0?kze({x:m,y:v},rs(r)):{x:m,y:v};if(m=ce.x,v=ce.y,c){var he;return Object.assign({},B,(he={},he[x]=b?"0":"",he[S]=_?"0":"",he.transform=(I.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",he))}return Object.assign({},B,(e={},e[x]=b?v+"px":"",e[S]=_?m+"px":"",e.transform="",e))}function Lze(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,o=a===void 0?!0:a,s=r.roundOffsets,c=s===void 0?!0:s,u={placement:Eu(e.placement),variation:qy(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,PQ(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,PQ(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Uze={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Lze,data:{}};var jE={passive:!0};function Bze(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,c=rs(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&u.forEach(function(f){f.addEventListener("scroll",r.update,jE)}),s&&c.addEventListener("resize",r.update,jE),function(){a&&u.forEach(function(f){f.removeEventListener("scroll",r.update,jE)}),s&&c.removeEventListener("resize",r.update,jE)}}const Fze={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bze,data:{}};var jze={left:"right",right:"left",bottom:"top",top:"bottom"};function jx(t){return t.replace(/left|right|bottom|top/g,function(e){return jze[e]})}var qze={start:"end",end:"start"};function TQ(t){return t.replace(/start|end/g,function(e){return qze[e]})}function OL(t){var e=rs(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function PL(t){return jy(Dd(t)).left+OL(t).scrollLeft}function Hze(t,e){var r=rs(t),n=Dd(t),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var u=Vce();(u||!u&&e==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+PL(t),y:c}}function Vze(t){var e,r=Dd(t),n=OL(t),i=(e=t.ownerDocument)==null?void 0:e.body,a=np(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=np(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+PL(t),c=-n.scrollTop;return Ul(i||r).direction==="rtl"&&(s+=np(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:c}}function TL(t){var e=Ul(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function Yce(t){return["html","body","#document"].indexOf(Ou(t))>=0?t.ownerDocument.body:js(t)&&TL(t)?t:Yce(jI(t))}function t1(t,e){var r;e===void 0&&(e=[]);var n=Yce(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),a=rs(n),o=i?[a].concat(a.visualViewport||[],TL(n)?n:[]):n,s=e.concat(o);return i?s:s.concat(t1(jI(o)))}function W4(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function zze(t,e){var r=jy(t,!1,e==="fixed");return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}function RQ(t,e,r){return e===qce?W4(Hze(t,r)):mp(e)?zze(e,r):W4(Vze(Dd(t)))}function Gze(t){var e=t1(jI(t)),r=["absolute","fixed"].indexOf(Ul(t).position)>=0,n=r&&js(t)?Xw(t):t;return mp(n)?e.filter(function(i){return mp(i)&&zce(i,n)&&Ou(i)!=="body"}):[]}function Wze(t,e,r,n){var i=e==="clippingParents"?Gze(t):[].concat(e),a=[].concat(i,[r]),o=a[0],s=a.reduce(function(c,u){var f=RQ(t,u,n);return c.top=np(f.top,c.top),c.right=h2(f.right,c.right),c.bottom=h2(f.bottom,c.bottom),c.left=np(f.left,c.left),c},RQ(t,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Qce(t){var e=t.reference,r=t.element,n=t.placement,i=n?Eu(n):null,a=n?qy(n):null,o=e.x+e.width/2-r.width/2,s=e.y+e.height/2-r.height/2,c;switch(i){case ko:c={x:o,y:e.y-r.height};break;case Gs:c={x:o,y:e.y+e.height};break;case Ws:c={x:e.x+e.width,y:s};break;case Lo:c={x:e.x-r.width,y:s};break;default:c={x:e.x,y:e.y}}var u=i?IL(i):null;if(u!=null){var f=u==="y"?"height":"width";switch(a){case By:c[u]=c[u]-(e[f]/2-r[f]/2);break;case H1:c[u]=c[u]+(e[f]/2-r[f]/2);break}}return c}function V1(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=n===void 0?t.placement:n,a=r.strategy,o=a===void 0?t.strategy:a,s=r.boundary,c=s===void 0?hze:s,u=r.rootBoundary,f=u===void 0?qce:u,d=r.elementContext,g=d===void 0?eb:d,m=r.altBoundary,w=m===void 0?!1:m,v=r.padding,y=v===void 0?0:v,_=Wce(typeof y!="number"?y:Kce(y,Jw)),b=g===eb?pze:eb,S=t.rects.popper,x=t.elements[w?b:g],I=Wze(mp(x)?x:x.contextElement||Dd(t.elements.popper),c,f,o),E=jy(t.elements.reference),p=Qce({reference:E,element:S,strategy:"absolute",placement:i}),O=W4(Object.assign({},S,p)),C=g===eb?O:E,M={top:I.top-C.top+_.top,bottom:C.bottom-I.bottom+_.bottom,left:I.left-C.left+_.left,right:C.right-I.right+_.right},B=t.modifiersData.offset;if(g===eb&&B){var ce=B[i];Object.keys(M).forEach(function(he){var F=[Ws,Gs].indexOf(he)>=0?1:-1,U=[ko,Gs].indexOf(he)>=0?"y":"x";M[he]+=ce[U]*F})}return M}function Kze(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=r.boundary,a=r.rootBoundary,o=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?Hce:c,f=qy(n),d=f?s?IQ:IQ.filter(function(w){return qy(w)===f}):Jw,g=d.filter(function(w){return u.indexOf(w)>=0});g.length===0&&(g=d);var m=g.reduce(function(w,v){return w[v]=V1(t,{placement:v,boundary:i,rootBoundary:a,padding:o})[Eu(v)],w},{});return Object.keys(m).sort(function(w,v){return m[w]-m[v]})}function Yze(t){if(Eu(t)===xL)return[];var e=jx(t);return[TQ(t),e,TQ(e)]}function Qze(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!0:o,c=r.fallbackPlacements,u=r.padding,f=r.boundary,d=r.rootBoundary,g=r.altBoundary,m=r.flipVariations,w=m===void 0?!0:m,v=r.allowedAutoPlacements,y=e.options.placement,_=Eu(y),b=_===y,S=c||(b||!w?[jx(y)]:Yze(y)),x=[y].concat(S).reduce(function(k,G){return k.concat(Eu(G)===xL?Kze(e,{placement:G,boundary:f,rootBoundary:d,padding:u,flipVariations:w,allowedAutoPlacements:v}):G)},[]),I=e.rects.reference,E=e.rects.popper,p=new Map,O=!0,C=x[0],M=0;M<x.length;M++){var B=x[M],ce=Eu(B),he=qy(B)===By,F=[ko,Gs].indexOf(ce)>=0,U=F?"width":"height",K=V1(e,{placement:B,boundary:f,rootBoundary:d,altBoundary:g,padding:u}),ne=F?he?Ws:Lo:he?Gs:ko;I[U]>E[U]&&(ne=jx(ne));var j=jx(ne),q=[];if(a&&q.push(K[ce]<=0),s&&q.push(K[ne]<=0,K[j]<=0),q.every(function(k){return k})){C=B,O=!1;break}p.set(B,q)}if(O)for(var V=w?3:1,$=function(G){var ge=x.find(function(Q){var te=p.get(Q);if(te)return te.slice(0,G).every(function(ue){return ue})});if(ge)return C=ge,"break"},H=V;H>0;H--){var L=$(H);if(L==="break")break}e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}}const Jze={name:"flip",enabled:!0,phase:"main",fn:Qze,requiresIfExists:["offset"],data:{_skip:!1}};function CQ(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function NQ(t){return[ko,Ws,Gs,Lo].some(function(e){return t[e]>=0})}function Xze(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,o=V1(e,{elementContext:"reference"}),s=V1(e,{altBoundary:!0}),c=CQ(o,n),u=CQ(s,i,a),f=NQ(c),d=NQ(u);e.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const Zze={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Xze};function eGe(t,e,r){var n=Eu(t),i=[Lo,ko].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[Lo,Ws].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function tGe(t){var e=t.state,r=t.options,n=t.name,i=r.offset,a=i===void 0?[0,0]:i,o=Hce.reduce(function(f,d){return f[d]=eGe(d,e.rects,a),f},{}),s=o[e.placement],c=s.x,u=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=o}const rGe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:tGe};function nGe(t){var e=t.state,r=t.name;e.modifiersData[r]=Qce({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const iGe={name:"popperOffsets",enabled:!0,phase:"read",fn:nGe,data:{}};function aGe(t){return t==="x"?"y":"x"}function oGe(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!1:o,c=r.boundary,u=r.rootBoundary,f=r.altBoundary,d=r.padding,g=r.tether,m=g===void 0?!0:g,w=r.tetherOffset,v=w===void 0?0:w,y=V1(e,{boundary:c,rootBoundary:u,padding:d,altBoundary:f}),_=Eu(e.placement),b=qy(e.placement),S=!b,x=IL(_),I=aGe(x),E=e.modifiersData.popperOffsets,p=e.rects.reference,O=e.rects.popper,C=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,M=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,ce={x:0,y:0};if(E){if(a){var he,F=x==="y"?ko:Lo,U=x==="y"?Gs:Ws,K=x==="y"?"height":"width",ne=E[x],j=ne+y[F],q=ne-y[U],V=m?-O[K]/2:0,$=b===By?p[K]:O[K],H=b===By?-O[K]:-p[K],L=e.elements.arrow,k=m&&L?SL(L):{width:0,height:0},G=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Gce(),ge=G[F],Q=G[U],te=e1(0,p[K],k[K]),ue=S?p[K]/2-V-te-ge-M.mainAxis:$-te-ge-M.mainAxis,T=S?-p[K]/2+V+te+Q+M.mainAxis:H+te+Q+M.mainAxis,fe=e.elements.arrow&&Xw(e.elements.arrow),Ge=fe?x==="y"?fe.clientTop||0:fe.clientLeft||0:0,tt=(he=B==null?void 0:B[x])!=null?he:0,mt=ne+ue-tt-Ge,vt=ne+T-tt,gt=e1(m?h2(j,mt):j,ne,m?np(q,vt):q);E[x]=gt,ce[x]=gt-ne}if(s){var Lt,Yt=x==="x"?ko:Lo,_r=x==="x"?Gs:Ws,Rt=E[I],Pt=I==="y"?"height":"width",kt=Rt+y[Yt],Nt=Rt-y[_r],Kt=[ko,Lo].indexOf(_)!==-1,Ut=(Lt=B==null?void 0:B[I])!=null?Lt:0,Vt=Kt?kt:Rt-p[Pt]-O[Pt]-Ut+M.altAxis,$t=Kt?Rt+p[Pt]+O[Pt]-Ut-M.altAxis:Nt,Dt=m&&Kt?Rze(Vt,Rt,$t):e1(m?Vt:kt,Rt,m?$t:Nt);E[I]=Dt,ce[I]=Dt-Rt}e.modifiersData[n]=ce}}const sGe={name:"preventOverflow",enabled:!0,phase:"main",fn:oGe,requiresIfExists:["offset"]};function cGe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function uGe(t){return t===rs(t)||!js(t)?OL(t):cGe(t)}function lGe(t){var e=t.getBoundingClientRect(),r=Fy(e.width)/t.offsetWidth||1,n=Fy(e.height)/t.offsetHeight||1;return r!==1||n!==1}function fGe(t,e,r){r===void 0&&(r=!1);var n=js(e),i=js(e)&&lGe(e),a=Dd(e),o=jy(t,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Ou(e)!=="body"||TL(a))&&(s=uGe(e)),js(e)?(c=jy(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):a&&(c.x=PL(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function dGe(t){var e=new Map,r=new Set,n=[];t.forEach(function(a){e.set(a.name,a)});function i(a){r.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var c=e.get(s);c&&i(c)}}),n.push(a)}return t.forEach(function(a){r.has(a.name)||i(a)}),n}function hGe(t){var e=dGe(t);return Aze.reduce(function(r,n){return r.concat(e.filter(function(i){return i.phase===n}))},[])}function pGe(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function gGe(t){var e=t.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var DQ={placement:"bottom",modifiers:[],strategy:"absolute"};function $Q(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function yGe(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,i=e.defaultOptions,a=i===void 0?DQ:i;return function(s,c,u){u===void 0&&(u=a);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},DQ,a),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},d=[],g=!1,m={state:f,setOptions:function(_){var b=typeof _=="function"?_(f.options):_;v(),f.options=Object.assign({},a,f.options,b),f.scrollParents={reference:mp(s)?t1(s):s.contextElement?t1(s.contextElement):[],popper:t1(c)};var S=hGe(gGe([].concat(n,f.options.modifiers)));return f.orderedModifiers=S.filter(function(x){return x.enabled}),w(),m.update()},forceUpdate:function(){if(!g){var _=f.elements,b=_.reference,S=_.popper;if($Q(b,S)){f.rects={reference:fGe(b,Xw(S),f.options.strategy==="fixed"),popper:SL(S)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(M){return f.modifiersData[M.name]=Object.assign({},M.data)});for(var x=0;x<f.orderedModifiers.length;x++){if(f.reset===!0){f.reset=!1,x=-1;continue}var I=f.orderedModifiers[x],E=I.fn,p=I.options,O=p===void 0?{}:p,C=I.name;typeof E=="function"&&(f=E({state:f,options:O,name:C,instance:m})||f)}}}},update:pGe(function(){return new Promise(function(y){m.forceUpdate(),y(f)})}),destroy:function(){v(),g=!0}};if(!$Q(s,c))return m;m.setOptions(u).then(function(y){!g&&u.onFirstUpdate&&u.onFirstUpdate(y)});function w(){f.orderedModifiers.forEach(function(y){var _=y.name,b=y.options,S=b===void 0?{}:b,x=y.effect;if(typeof x=="function"){var I=x({state:f,name:_,instance:m,options:S}),E=function(){};d.push(I||E)}})}function v(){d.forEach(function(y){return y()}),d=[]}return m}}var mGe=[Fze,iGe,Uze,Oze,rGe,Jze,sGe,$ze,Zze],vGe=yGe({defaultModifiers:mGe}),bGe=typeof Element<"u",wGe=typeof Map=="function",_Ge=typeof Set=="function",EGe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function qx(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!qx(t[n],e[n]))return!1;return!0}var a;if(wGe&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(a=t.entries();!(n=a.next()).done;)if(!e.has(n.value[0]))return!1;for(a=t.entries();!(n=a.next()).done;)if(!qx(n.value[1],e.get(n.value[0])))return!1;return!0}if(_Ge&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(a=t.entries();!(n=a.next()).done;)if(!e.has(n.value[0]))return!1;return!0}if(EGe&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(t[n]!==e[n])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;if(bGe&&t instanceof Element)return!1;for(n=r;n--!==0;)if(!((i[n]==="_owner"||i[n]==="__v"||i[n]==="__o")&&t.$$typeof)&&!qx(t[i[n]],e[i[n]]))return!1;return!0}return t!==t&&e!==e}var xGe=function(e,r){try{return qx(e,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const AGe=kc(xGe);var SGe=[],Jce=function(e,r,n){n===void 0&&(n={});var i=Be.useRef(null),a={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||SGe},o=Be.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=o[0],c=o[1],u=Be.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(m){var w=m.state,v=Object.keys(w.elements);v1.flushSync(function(){c({styles:AQ(v.map(function(y){return[y,w.styles[y]||{}]})),attributes:AQ(v.map(function(y){return[y,w.attributes[y]]}))})})},requires:["computeStyles"]}},[]),f=Be.useMemo(function(){var g={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[u,{name:"applyStyles",enabled:!1}])};return AGe(i.current,g)?i.current||g:(i.current=g,g)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,u]),d=Be.useRef();return SQ(function(){d.current&&d.current.setOptions(f)},[f]),SQ(function(){if(!(e==null||r==null)){var g=n.createPopper||vGe,m=g(e,r,f);return d.current=m,function(){m.destroy(),d.current=null}}},[e,r,n.createPopper]),{state:d.current?d.current.state:null,styles:s.styles,attributes:s.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}},IGe=function(){},OGe=function(){return Promise.resolve(null)},PGe=[];function TGe(t){var e=t.placement,r=e===void 0?"bottom":e,n=t.strategy,i=n===void 0?"absolute":n,a=t.modifiers,o=a===void 0?PGe:a,s=t.referenceElement,c=t.onFirstUpdate,u=t.innerRef,f=t.children,d=Be.useContext(Uce),g=Be.useState(null),m=g[0],w=g[1],v=Be.useState(null),y=v[0],_=v[1];Be.useEffect(function(){z4(u,m)},[u,m]);var b=Be.useMemo(function(){return{placement:r,strategy:i,onFirstUpdate:c,modifiers:[].concat(o,[{name:"arrow",enabled:y!=null,options:{element:y}}])}},[r,i,c,o,y]),S=Jce(s||d,m,b),x=S.state,I=S.styles,E=S.forceUpdate,p=S.update,O=Be.useMemo(function(){return{ref:w,style:I.popper,placement:x?x.placement:r,hasPopperEscaped:x&&x.modifiersData.hide?x.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:x&&x.modifiersData.hide?x.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:I.arrow,ref:_},forceUpdate:E||IGe,update:p||OGe}},[w,_,r,x,I,p,E]);return Fce(f)(O)}var RGe=function(){},CGe=RGe;const NGe=kc(CGe);function DGe(t){var e=t.children,r=t.innerRef,n=Be.useContext(Bce),i=Be.useCallback(function(a){z4(r,a),jce(n,a)},[r,n]);return Be.useEffect(function(){return function(){return z4(r,null)}},[]),Be.useEffect(function(){NGe(!!n,"`Reference` should not be used outside of a `Manager` component.")},[n]),Fce(e)({ref:i})}const $Ge=Object.freeze(Object.defineProperty({__proto__:null,Manager:dze,Popper:TGe,Reference:DGe,usePopper:Jce},Symbol.toStringTag,{value:"Module"})),MGe=lo($Ge);var Ju={},i6,MQ;function kGe(){if(MQ)return i6;MQ=1;var t=M$();function e(r,n,i,a){return t(r,function(o,s,c){n(a,i(o),s,c)}),a}return i6=e,i6}var a6,kQ;function LGe(){if(kQ)return a6;kQ=1;var t=kGe();function e(r,n){return function(i,a){return t(i,r,n(a),{})}}return a6=e,a6}var o6,LQ;function UGe(){if(LQ)return o6;LQ=1;var t=Hte(),e=LGe(),r=wd(),n=Object.prototype,i=n.toString,a=e(function(o,s,c){s!=null&&typeof s.toString!="function"&&(s=i.call(s)),o[s]=c},t(r));return o6=a,o6}var UQ;function BGe(){if(UQ)return Ju;UQ=1;var t=wr;Ju.__esModule=!0,Ju.placementMapping=Ju.positions=Ju.positionsMapping=void 0;var e=t(UGe()),r=t(zl()),n={"top center":"top","top left":"top-start","top right":"top-end","bottom center":"bottom","bottom left":"bottom-start","bottom right":"bottom-end","right center":"right","left center":"left"};Ju.positionsMapping=n;var i=(0,r.default)(n);Ju.positions=i;var a=(0,e.default)(n);return Ju.placementMapping=a,Ju}var tb={},s6={exports:{}},c6={exports:{}},u6={exports:{}},BQ;function FGe(){return BQ||(BQ=1,function(t){var e=w$.default;function r(n,i){if(e(n)!=="object"||n===null)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var o=a.call(n,i||"default");if(e(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(u6)),u6.exports}var FQ;function jGe(){return FQ||(FQ=1,function(t){var e=w$.default,r=FGe();function n(i){var a=r(i,"string");return e(a)==="symbol"?a:String(a)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(c6)),c6.exports}var jQ;function qGe(){return jQ||(jQ=1,function(t){var e=jGe();function r(i,a){for(var o=0;o<a.length;o++){var s=a[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(i,e(s.key),s)}}function n(i,a,o){return a&&r(i.prototype,a),o&&r(i,o),Object.defineProperty(i,"prototype",{writable:!1}),i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(s6)),s6.exports}var qQ;function HGe(){if(qQ)return tb;qQ=1;var t=wr;tb.__esModule=!0,tb.default=void 0;var e=t(qGe()),r=t(T$()),n=t(Qs()),i=xd,a=function(){function c(f){this.ref=f}var u=c.prototype;return u.getBoundingClientRect=function(){return(0,n.default)(this.ref.current,"getBoundingClientRect")||{}},(0,e.default)(c,[{key:"clientWidth",get:function(){return this.getBoundingClientRect().width}},{key:"clientHeight",get:function(){return this.getBoundingClientRect().height}},{key:"parentNode",get:function(){return this.ref.current?this.ref.current.parentNode:void 0}}]),c}(),o=(0,r.default)(function(c){return new a((0,i.isRefObject)(c)?c:{current:c})}),s=o;return tb.default=s,tb}var qE={},HQ;function VGe(){if(HQ)return qE;HQ=1;var t=wr;qE.__esModule=!0,qE.default=a;var e=t(Fn()),r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(o){var s=o.children,c=o.className,u=o.content,f=(0,r.default)("content",c),d=(0,i.getUnhandledProps)(a,o),g=(0,i.getElementType)(a,o);return n.default.createElement(g,(0,e.default)({},d,{className:f}),i.childrenUtils.isNil(s)?u:s)}return a.handledProps=["as","children","className","content"],a.propTypes={},a.create=(0,i.createShorthandFactory)(a,function(o){return{children:o}}),qE}var HE={},VQ;function zGe(){if(VQ)return HE;VQ=1;var t=wr;HE.__esModule=!0,HE.default=a;var e=t(Fn()),r=t(ii);t(Ln());var n=t(Be),i=Wn();function a(o){var s=o.children,c=o.className,u=o.content,f=(0,r.default)("header",c),d=(0,i.getUnhandledProps)(a,o),g=(0,i.getElementType)(a,o);return n.default.createElement(g,(0,e.default)({},d,{className:f}),i.childrenUtils.isNil(s)?u:s)}return a.handledProps=["as","children","className","content"],a.propTypes={},a.create=(0,i.createShorthandFactory)(a,function(o){return{children:o}}),HE}var zQ;function GGe(){if(zQ)return Zv;zQ=1;var t=Ys,e=wr;Zv.__esModule=!0,Zv.default=void 0;var r=e(Fn()),n=e(Uc());e(O$());var i=e(Vl()),a=e(D$()),o=e(Qs()),s=e(fze()),c=e(Di()),u=e(j$()),f=e(H$()),d=e(dce()),g=e(q$()),m=e(ii);e(Ln());var w=t(Be),v=MGe,y=e(hce()),_=Wn(),b=e(tM()),S=BGe(),x=e(HGe()),I=e(VGe()),E=e(zGe()),p=function(O){(0,n.default)(C,O);function C(){for(var B,ce=arguments.length,he=new Array(ce),F=0;F<ce;F++)he[F]=arguments[F];return B=O.call.apply(O,[this].concat(he))||this,B.state={},B.open=!1,B.zIndexWasSynced=!1,B.triggerRef=w.default.createRef(),B.elementRef=w.default.createRef(),B.getPortalProps=function(){var U={},K=B.props,ne=K.on,j=K.hoverable,q=(0,c.default)(ne)?ne:[ne];return j&&(U.closeOnPortalMouseLeave=!0,U.mouseLeaveDelay=300),(0,f.default)(q,"hover")&&(U.openOnTriggerClick=!1,U.closeOnTriggerClick=!1,U.openOnTriggerMouseEnter=!0,U.closeOnTriggerMouseLeave=!0,U.mouseLeaveDelay=70,U.mouseEnterDelay=50),(0,f.default)(q,"click")&&(U.openOnTriggerClick=!0,U.closeOnTriggerClick=!0,U.closeOnDocumentClick=!0),(0,f.default)(q,"focus")&&(U.openOnTriggerFocus=!0,U.closeOnTriggerBlur=!0),U},B.hideOnScroll=function(U){(0,s.default)(U.target)&&B.elementRef.current.contains(U.target)||(B.setState({closed:!0}),_.eventStack.unsub("scroll",B.hideOnScroll,{target:window}),B.timeoutId=setTimeout(function(){B.setState({closed:!1})},50),B.handleClose(U))},B.handleClose=function(U){(0,o.default)(B.props,"onClose",U,(0,r.default)({},B.props,{open:!1}))},B.handleOpen=function(U){(0,o.default)(B.props,"onOpen",U,(0,r.default)({},B.props,{open:!0}))},B.handlePortalMount=function(U){(0,o.default)(B.props,"onMount",U,B.props)},B.handlePortalUnmount=function(U){B.positionUpdate=null,(0,o.default)(B.props,"onUnmount",U,B.props)},B.renderContent=function(U){var K=U.placement,ne=U.ref,j=U.update,q=U.style,V=B.props,$=V.basic,H=V.children,L=V.className,k=V.content,G=V.hideOnScroll,ge=V.flowing,Q=V.header,te=V.inverted,ue=V.popper,T=V.size,fe=V.style,Ge=V.wide,tt=B.state.contentRestProps;B.positionUpdate=j;var mt=(0,m.default)("ui",S.placementMapping[K],T,(0,_.useKeyOrValueAndKey)(Ge,"wide"),(0,_.useKeyOnly)($,"basic"),(0,_.useKeyOnly)(ge,"flowing"),(0,_.useKeyOnly)(te,"inverted"),"popup transition visible",L),vt=(0,_.getElementType)(C,B.props),gt=(0,r.default)({left:"auto",right:"auto",position:"initial"},fe),Lt=w.default.createElement(vt,(0,r.default)({},tt,{className:mt,style:gt,ref:B.elementRef}),_.childrenUtils.isNil(H)?w.default.createElement(w.default.Fragment,null,E.default.create(Q,{autoGenerateKey:!1}),I.default.create(k,{autoGenerateKey:!1})):H,G&&w.default.createElement(g.default,{on:B.hideOnScroll,name:"scroll",target:"window"}));return(0,_.createHTMLDivision)(ue||{},{overrideProps:{children:Lt,ref:ne,style:(0,r.default)({display:"flex"},q)}})},B}C.getDerivedStateFromProps=function(ce,he){if(he.closed||he.disabled)return{};var F=(0,_.getUnhandledProps)(C,ce),U=(0,d.default)(F,function(ne,j,q){return(0,f.default)(b.default.handledProps,q)||(ne[q]=j),ne},{}),K=(0,u.default)(F,b.default.handledProps);return{contentRestProps:U,portalRestProps:K}};var M=C.prototype;return M.componentDidUpdate=function(ce){var he=(0,y.default)(this.props.popperDependencies,ce.popperDependencies);he||this.handleUpdate()},M.componentWillUnmount=function(){clearTimeout(this.timeoutId)},M.handleUpdate=function(){this.positionUpdate&&this.positionUpdate()},M.render=function(){var ce=this,he=this.props,F=he.context,U=he.disabled,K=he.eventsEnabled,ne=he.offset,j=he.pinned,q=he.popper,V=he.popperModifiers,$=he.position,H=he.positionFixed,L=he.trigger,k=this.state,G=k.closed,ge=k.portalRestProps;if(G||U)return L;var Q=[{name:"arrow",enabled:!1},{name:"eventListeners",options:{scroll:!!K,resize:!!K}},{name:"flip",enabled:!j},{name:"preventOverflow",enabled:!!ne},{name:"offset",enabled:!!ne,options:{offset:ne}}].concat(V,[{name:"syncZIndex",enabled:!0,phase:"beforeRead",fn:function(fe){var Ge,tt=fe.state;if(!ce.zIndexWasSynced){var mt=q==null||(Ge=q.style)==null?void 0:Ge.zIndex;(0,a.default)(mt)&&(tt.elements.popper.style.zIndex=window.getComputedStyle(tt.elements.popper.firstChild).zIndex),ce.zIndexWasSynced=!0}},effect:function(){return function(){ce.zIndexWasSynced=!1}}}]),te=(0,x.default)((0,i.default)(F)?this.triggerRef:F),ue=(0,r.default)({},this.getPortalProps(),ge);return w.default.createElement(b.default,(0,r.default)({},ue,{onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount,trigger:L,triggerRef:this.triggerRef}),w.default.createElement(v.Popper,{modifiers:Q,placement:S.positionsMapping[$],strategy:H?"fixed":null,referenceElement:te},this.renderContent))},C}(w.Component);return Zv.default=p,p.handledProps=["as","basic","children","className","content","context","disabled","eventsEnabled","flowing","header","hideOnScroll","hoverable","inverted","offset","on","onClose","onMount","onOpen","onUnmount","pinned","popper","popperDependencies","popperModifiers","position","positionFixed","size","style","trigger","wide"],p.propTypes={},p.defaultProps={disabled:!1,eventsEnabled:!0,on:["click","hover"],pinned:!1,popperModifiers:[],position:"top left"},p.Content=I.default,p.Header=E.default,Zv}var WGe=wr,KGe=WGe(GGe()),YGe=KGe.default;const QGe=t=>t.charAt(0).toUpperCase()+t.slice(1),JGe="_button_1uvkr_1",XGe="_icon_1uvkr_5",VE={button:JGe,icon:XGe,"icon-metamask-mobile":"_icon-metamask-mobile_1uvkr_13","icon-metamask":"_icon-metamask_1uvkr_13","icon-dapper":"_icon-dapper_1uvkr_18","icon-fortmatic":"_icon-fortmatic_1uvkr_22","icon-wallet-connect":"_icon-wallet-connect_1uvkr_26","icon-samsung-blockchain-wallet":"_icon-samsung-blockchain-wallet_1uvkr_30","icon-coinbase":"_icon-coinbase_1uvkr_34","icon-wallet-link":"_icon-wallet-link_1uvkr_35","icon-google":"_icon-google_1uvkr_39","icon-discord":"_icon-discord_1uvkr_43","icon-apple":"_icon-apple_1uvkr_47","icon-x":"_icon-x_1uvkr_51"},Xce=t=>{const{className:e,children:r,type:n,testId:i,showTooltip:a,tooltipPosition:o,disabled:s,info:c,loading:u,onClick:f}=t;return Fe.jsx(YGe,{position:a&&o?o:"top center",disabled:!a,trigger:Fe.jsx("span",{children:Fe.jsxs(Tc.Button,{primary:!0,size:"small","data-testid":`${i}-${n}-button`,className:yp(e,VE.button),onClick:()=>f(n),disabled:s,loading:u,children:[u?null:Fe.jsx("div",{role:"img","aria-label":n,className:yp(VE.icon,VE[`icon-${n}`],VE.primaryImage)}),r]},n)}),content:c??QGe(n),on:"hover"})},ZGe="social-primary-test-id",eWe="social-secondary-test-id",tWe="web3-primary-test-id",rWe="web3-secondary-test-id",nWe="show-more-button-test-id";var Bn=(t=>(t.METAMASK="metamask",t.DAPPER="dapper",t.FORTMATIC="fortmatic",t.COINBASE="coinbase",t.SAMSUNG="samsung-blockchain-wallet",t.WALLET_CONNECT="wallet-connect",t.WALLET_LINK="wallet-link",t.METAMASK_MOBILE="metamask-mobile",t.GOOGLE="google",t.APPLE="apple",t.DISCORD="discord",t.X="x",t))(Bn||{});const iWe="_connection_ym3lq_3",aWe="_dclLogo_ym3lq_9",oWe="_title_ym3lq_15",sWe="_subtitle_ym3lq_20",cWe="_primaryButton_ym3lq_29",uWe="_primaryImage_ym3lq_38",lWe="_primaryMessage_ym3lq_42",fWe="_primaryMagic_ym3lq_51",dWe="_primaryLearnMore_ym3lq_60",hWe="_primary_ym3lq_29",pWe="_showMore_ym3lq_73",gWe="_showMoreButton_ym3lq_77",yWe="_showMoreSecondaryOptions_ym3lq_86",mWe="_primaryOption_ym3lq_100",vWe="_secondaryOptionButton_ym3lq_104",Da={connection:iWe,dclLogo:aWe,title:oWe,subtitle:sWe,primaryButton:cWe,primaryImage:uWe,primaryMessage:lWe,primaryMagic:fWe,primaryLearnMore:dWe,primary:hWe,showMore:pWe,showMoreButton:gWe,showMoreSecondaryOptions:yWe,primaryOption:mWe,secondaryOptionButton:vWe},GQ=({message:t,children:e,option:r,testId:n,loadingOption:i,error:a,onConnect:o})=>Fe.jsxs("div",{className:Da.primary,"data-testid":n,children:[Fe.jsx("div",{className:Da.primaryMessage,children:t}),Fe.jsx(Xce,{disabled:!!i||!!a,loading:i===r,showTooltip:!!a,type:r,info:a,onClick:o,className:yp(Da.primaryButton,Da.primaryOption),testId:n,children:e})]}),WQ=({options:t,tooltipDirection:e,testId:r,loadingOption:n,onConnect:i})=>Fe.jsx("div",{className:Da.showMoreSecondaryOptions,"data-testid":r,children:t.map(a=>Fe.jsx(Xce,{className:yp(Da.primaryButton,Da.secondaryOptionButton),showTooltip:!0,tooltipPosition:e,type:a,onClick:i,testId:r,loading:n===a,disabled:!!n},a))}),bWe={i18n:{title:"Discover a virtual social world",subtitle:"shaped by its community of creators & explorers.",accessWith:t=>`Access with ${t}`,connectWith:t=>`Connect with ${t}`,moreOptions:"More Options",socialMessage:t=>Fe.jsxs(Fe.Fragment,{children:["Access secured by ",t]}),web3Message:t=>Fe.jsxs(Fe.Fragment,{children:["Have a digital wallet? ",t("Learn More")]})}},wWe=t=>{var w;const{i18n:e=bWe.i18n,onConnect:r,onLearnMore:n,socialOptions:i,web3Options:a,className:o,loadingOption:s}=t,[c,u]=Be.useState(!1),f=Be.useCallback(()=>{u(!c)},[c]),d=(w=window.ethereum)==null?void 0:w.isMetaMask,g=i&&i.secondary&&i.secondary.length>0,m=a&&a.secondary&&a.secondary.length>0;return Fe.jsxs("div",{className:yp(o,Da.connection),children:[Fe.jsx("img",{className:Da.dclLogo,src:lze,alt:"Decentraland logo"}),Fe.jsxs("div",{children:[Fe.jsx("h1",{className:Da.title,children:e.title}),Fe.jsx("h2",{className:Da.subtitle,children:e.subtitle}),i?Fe.jsx(GQ,{onConnect:r,testId:ZGe,option:i==null?void 0:i.primary,loadingOption:s,message:Fe.jsxs(Fe.Fragment,{children:[e.socialMessage(Fe.jsx("div",{className:Da.primaryMagic,role:"img","aria-label":"Magic"})),Fe.jsx("span",{className:Da.primaryLearnMore,role:"button",onClick:()=>n(i==null?void 0:i.primary),children:"Learn More"})]}),children:Fe.jsx(Fe.Fragment,{children:e.accessWith(i==null?void 0:i.primary)})}):null,a?Fe.jsx(GQ,{onConnect:r,testId:tWe,option:a==null?void 0:a.primary,loadingOption:s,error:!d&&(a==null?void 0:a.primary)===Bn.METAMASK?"You need to install the MetaMask Browser Extension to proceed. Please install it and try again.":void 0,message:e.web3Message(v=>Fe.jsx("span",{className:Da.primaryLearnMore,role:"button",onClick:()=>n(a.primary),children:v})),children:Fe.jsx(Fe.Fragment,{children:e.connectWith(a==null?void 0:a.primary)})}):null]}),Fe.jsxs("div",{className:Da.showMore,children:[(m||g)&&Fe.jsxs(Tc.Button,{"data-testid":nWe,basic:!0,size:"medium",fluid:!0,className:Da.showMoreButton,onClick:f,children:[e.moreOptions,Fe.jsx(qb,{name:c?"chevron up":"chevron down"})]}),c&&g&&Fe.jsx(WQ,{testId:eWe,options:i.secondary,onConnect:r,tooltipDirection:"top center",loadingOption:s}),c&&m&&Fe.jsx(WQ,{testId:rWe,options:a.secondary,onConnect:r,tooltipDirection:"bottom center",loadingOption:s})]})]})},_We=60*24*30,EWe=dd.getConfiguration().magic.apiKey;function Zce(t){switch(t){case Bn.DISCORD:case Bn.X:case Bn.GOOGLE:case Bn.APPLE:return Ic.ProviderType.MAGIC;case Bn.WALLET_CONNECT:case Bn.METAMASK_MOBILE:return Ic.ProviderType.WALLET_CONNECT_V2;case Bn.COINBASE:case Bn.WALLET_LINK:return Ic.ProviderType.WALLET_LINK;case Bn.FORTMATIC:return Ic.ProviderType.FORTMATIC;case Bn.METAMASK:case Bn.DAPPER:case Bn.SAMSUNG:return Ic.ProviderType.INJECTED;default:throw new Error("Invalid provider")}}async function xWe(t,e){const r=new Ete(e),n=L8.createRandom(),i={address:n.address.toString(),publicKey:xt(n.publicKey),privateKey:xt(n.privateKey)},a=await r.getSigner();return _ce.Authenticator.initializeAuthChain(t,i,_We,o=>a.signMessage(o))}async function KQ(t){const e=Zce(t);if(Ic.ProviderType.MAGIC===e){const{Magic:n}=await ky(()=>Promise.resolve().then(()=>oL),void 0),{OAuthExtension:i}=await ky(()=>Promise.resolve().then(()=>sL),void 0),a=new n(EWe,{extensions:[new i]}),o=new URL(window.location.href);o.pathname="/auth/callback",await a.oauth.loginWithRedirect({provider:t===Bn.X?"twitter":t,redirectURI:o.href})}const r=await dd.connection.connect(e);if(!r.account||!r.provider)throw new Error("Could not get provider");return r}function YQ(t){return[Bn.APPLE,Bn.GOOGLE,Bn.X,Bn.DISCORD].includes(t)}async function eue(t,e){let r;const n=B4.localStorageGetIdentity(t);return n?r=n:(r=await xWe(t,e),B4.localStorageStoreIdentity(t,r)),r}const AWe="_container_1jfc2_1",SWe="_info_1jfc2_19",IWe="_title_1jfc2_28",l6={container:AWe,info:SWe,title:IWe},OWe=dd.getConfiguration().magic.apiKey,PWe=()=>{uL();const t=bce(),e=B2(),[r,n]=Be.useState(fi.WAITING_FOR_CONFIRMATION),{flags:i}=Be.useContext(CI),a=Be.useCallback(async()=>{var u;const c=await dd.connection.connect(Ll.ProviderType.MAGIC);return await eue(((u=c.account)==null?void 0:u.toLowerCase())??"",c.provider),c},[]),o=Be.useCallback(async()=>{const{Magic:c}=await ky(()=>Promise.resolve().then(()=>oL),void 0),{OAuthExtension:u}=await ky(()=>Promise.resolve().then(()=>sL),void 0),f=new c(OWe,{extensions:[new u]});try{n(fi.VALIDATING_SIGN_IN),await(f==null?void 0:f.oauth.getRedirectResult()),n(fi.WAITING_FOR_CONFIRMATION)}catch(d){console.log(d),e("/login")}},[e]);Be.useEffect(()=>{o()},[]);const s=Be.useCallback(async()=>{var c;try{n(fi.WAITING_FOR_SIGNATURE);const u=await a(),f=((c=u.account)==null?void 0:c.toLowerCase())??"";if(ro().identify({ethAddress:f}),ro().track(Oc.LOGIN_SUCCESS,{eth_address:f}),await Fx(800),i[RI.SIMPLIFIED_AVATAR_SETUP]&&u.account&&!await lL(u.account)){window.location.href="/auth/setup"+(t?`?redirectTo=${t}`:"");return}t?window.location.href=decodeURIComponent(t):window.location.href="/"}catch(u){console.log(u),e("/login")}},[e,t,i]);return r===fi.WAITING_FOR_CONFIRMATION?Fe.jsx(Qw.Modal,{size:"tiny",open:!0,children:Fe.jsxs("div",{className:l6.container,children:[Fe.jsx("h3",{className:l6.title,children:"Confirm your login"}),Fe.jsxs("div",{className:l6.info,children:[Fe.jsx("span",{children:"This step only verifies your identity."}),Fe.jsx("span",{children:"No payments or transactions will occur without your explicit approval."})]}),Fe.jsx(Tc.Button,{primary:!0,onClick:s,children:"Continue"})]})}):Fe.jsx(wce,{open:!0,state:r,onTryAgain:a,providerType:Ll.ProviderType.MAGIC})},TWe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/image1-a4aa795b.webp",RWe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/image10-c7fbcc61.webp",CWe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/image2-0af6ed59.webp",NWe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/image3-c864ad86.webp",DWe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/image4-7964be5f.webp",$We="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/image5-fcca517e.webp",MWe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/image6-c770bdf5.webp",kWe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/image7-341595c4.webp",LWe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/image8-fea9fe85.webp",UWe="https://cdn.decentraland.org/@dcl/auth-site/1.2.4-7572518993.commit-ba9c520/assets/image9-714885ef.webp",BWe="_main_qwc0l_1",FWe="_title_qwc0l_11",jWe="_infoModal_qwc0l_15",qWe="_infoContent_qwc0l_19",HWe="_info_qwc0l_15",VWe="_goBackButton_qwc0l_33",A0={main:BWe,title:FWe,infoModal:jWe,infoContent:qWe,info:HWe,goBackButton:VWe},zWe={i18n:{title:"How does Magic work?",subtitle:"Magic handles digital wallet creation & management behind the scenes so you don't have to. Just log into Decentraland with your favorite social account and let Magic handle the rest.<br /> <br />If you'd rather take a more hands-on approach to your digital asset storage (e.g. Wearables, NAMEs, etc.), you can get a digital wallet from a provider such as <a href='https://metamask.io/'>MetaMask</a> and use it to create your Decentraland account.",goBack:"Return to log in page"}},GWe=t=>{const{i18n:e=zWe.i18n,onClose:r,open:n}=t;return Fe.jsxs(Qw.Modal,{size:"tiny",open:n,className:A0.infoModal,onClose:r,children:[Fe.jsx(DI,{title:"",onClose:r}),Fe.jsx(fL,{className:A0.infoContent,children:Fe.jsxs("div",{className:A0.main,children:[Fe.jsx("h1",{className:A0.title,children:e==null?void 0:e.title}),Fe.jsx("span",{className:A0.info,dangerouslySetInnerHTML:{__html:e==null?void 0:e.subtitle}}),Fe.jsx(Tc.Button,{className:A0.goBackButton,secondary:!0,inverted:!0,onClick:r,children:e==null?void 0:e.goBack})]})})]})},WWe="_main_1c8le_1",KWe="_infoModal_1c8le_11",YWe="_infoContent_1c8le_15",QWe="_info_1c8le_11",JWe="_infoImage_1c8le_26",XWe="_assets_1c8le_34",ZWe="_login_1c8le_38",eKe="_goBackButton_1c8le_42",lc={main:WWe,infoModal:KWe,infoContent:YWe,info:QWe,infoImage:JWe,assets:XWe,login:ZWe,goBackButton:eKe},tKe={i18n:{title:"What is a digital wallet?",assets:{title:"A Home For Your Digital Assets",text:"Wallets are used to send, receive, store, and display digital assets, such as your Decentraland Wearables, NAMEs, LANDs, etc."},logIn:{title:"A New Way To Log In",text:"Instead of creating new accounts and passwords on every website, in the world of Web3 all you need to do is just connect your digital wallet."},goBack:"Return to log in page"}},rKe=t=>{const{i18n:e=tKe.i18n,onClose:r,open:n}=t;return Fe.jsxs(Qw.Modal,{size:"tiny",open:n,className:lc.infoModal,onClose:r,children:[Fe.jsx(DI,{title:"",onClose:r}),Fe.jsx(fL,{className:lc.infoContent,children:Fe.jsxs("div",{className:lc.main,children:[Fe.jsx("h1",{className:lc.title,children:e==null?void 0:e.title}),Fe.jsxs("article",{className:lc.info,children:[Fe.jsx("div",{className:yp(lc.infoImage,lc.assets)}),Fe.jsx("h3",{children:e==null?void 0:e.assets.title}),Fe.jsx("p",{children:e==null?void 0:e.assets.text})]}),Fe.jsxs("article",{className:lc.info,children:[Fe.jsx("div",{className:yp(lc.infoImage,lc.login)}),Fe.jsx("h3",{children:e==null?void 0:e.logIn.title}),Fe.jsx("p",{children:e==null?void 0:e.logIn.text})]}),Fe.jsx(Tc.Button,{className:lc.goBackButton,secondary:!0,inverted:!0,onClick:r,children:e==null?void 0:e.goBack})]})})]})},nKe="_main_1d9a9_1",iKe="_background_1d9a9_8",aKe="_left_1d9a9_32",oKe="_leftInfo_1d9a9_42",sKe="_right_1d9a9_51",cKe="_footer_1d9a9_60",uKe="_guestInfo_1d9a9_79",rb={main:nKe,background:iKe,"move-background":"_move-background_1d9a9_1",left:aKe,leftInfo:oKe,right:sKe,footer:cKe,guestInfo:uKe},QQ=[TWe,CWe,NWe,DWe,$We,MWe,kWe,LWe,UWe,RWe],lKe=()=>{uL();const[t]=vme(),[e,r]=Be.useState(fi.CONNECTING_WALLET),[n,i]=Be.useState(!1),[a,o]=Be.useState(!1),[s,c]=Be.useState(!1),[u,f]=Be.useState(),d=bce(),g=d&&new URL(d).pathname.includes("/play"),[m,w]=Be.useState(0),{flags:v}=Be.useContext(CI),y=Be.useCallback(O=>{const C=O&&YQ(O);ro().track(Oc.CLICK,{action:X0.LEARN_MORE,type:C?"Learn more about Magic":"Learn more about wallets"}),C?o(!0):i(!0)},[i,o,n]),_=Be.useCallback(()=>{i(!1),o(!1)},[i,o]),b=Be.useCallback(()=>{o(!a)},[o,a]),S=Be.useCallback(async()=>{ro().track(Oc.LOGIN_CLICK,{type:"guest"}),await Fx(800)},[]),x=Be.useMemo(()=>{if(d){const O=new URL(d);return O.searchParams.append("guest","true"),O.toString()}return""},[d]),I=Be.useCallback(async O=>{var M;const C=YQ(O);if(f(O),ro().track(Oc.LOGIN_CLICK,{method:O,type:C?M4.WEB2:M4.WEB3}),C)r(fi.LOADING_MAGIC),await Fx(800),await KQ(O);else try{c(!0),r(fi.CONNECTING_WALLET);const B=await KQ(O);if(t.get("fromRequests")!=="true"&&(r(fi.WAITING_FOR_SIGNATURE),await eue(((M=B.account)==null?void 0:M.toLowerCase())??"",B.provider)),ro().track(Oc.LOGIN_SUCCESS,{eth_address:B.account}),ro().identify({ethAddress:B.account}),await Fx(800),v[RI.SIMPLIFIED_AVATAR_SETUP]&&B.account&&!await lL(B.account)){window.location.href="/auth/setup"+(d?`?redirectTo=${d}`:""),c(!1);return}d?window.location.href=decodeURIComponent(d):window.location.href="/",c(!1)}catch(B){console.log("Error",JSON.stringify(B)),ro().track(Oc.LOGIN_ERROR,{error:Sb(B)?B.message:B}),r(fi.ERROR)}},[r,c,f,d,t,v]),E=Be.useCallback(()=>{c(!1),f(void 0),r(fi.CONNECTING_WALLET)},[c]),p=Be.useCallback(()=>{u&&I(u)},[u]);return Be.useEffect(()=>{const O=setInterval(()=>{w(C=>C===QQ.length-1?0:C+1)},5e3);return()=>{clearInterval(O)}},[]),Fe.jsxs("main",{className:rb.main,children:[Fe.jsx("div",{className:rb.background,style:{backgroundImage:`url(${QQ[m]})`}}),Fe.jsx(rKe,{open:n,onClose:_}),Fe.jsx(GWe,{open:a,onClose:b}),Fe.jsx(wce,{open:s,state:e,onClose:E,onTryAgain:p,providerType:u?Zce(u):null}),Fe.jsx("div",{className:rb.left,children:Fe.jsxs("div",{className:rb.leftInfo,children:[Fe.jsx(wWe,{onLearnMore:y,onConnect:I,loadingOption:u,socialOptions:{primary:Bn.GOOGLE,secondary:[Bn.DISCORD,Bn.APPLE,Bn.X]},web3Options:{primary:Bn.METAMASK,secondary:[Bn.FORTMATIC,Bn.COINBASE,Bn.WALLET_CONNECT]}}),g&&Fe.jsxs("div",{className:rb.guestInfo,children:["Quick dive?"," ",Fe.jsx("a",{href:x,onClick:S,children:"Explore as a guest"})]})]})})]})};(function(){const t=window.analytics=window.analytics||[];if(!t.initialize){if(t.invoked){window.console&&console.error&&console.error("Segment snippet included twice.");return}t.invoked=!0,t.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","user","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],t.factory=function(e){return function(){const r=Array.prototype.slice.call(arguments);return r.unshift(e),t.push(r),t}};for(let e=0;e<t.methods.length;e++){const r=t.methods[e];t[r]=t.factory(r)}t.load=function(e,r){const n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://cdn.segment.com/analytics.js/v1/"+e+"/analytics.min.js";const i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(n,i),t._loadOptions=r},t.SNIPPET_VERSION="4.15.2"}})();ro().load(j1.get("SEGMENT_API_KEY"));Aye.render(Fe.jsx(hJ.StrictMode,{children:Fe.jsx(IHe,{children:Fe.jsx(mme,{basename:"/auth",children:Fe.jsxs(pme,{children:[Fe.jsx(O0,{path:"/login",element:Fe.jsx(lKe,{})}),Fe.jsx(O0,{path:"/callback",element:Fe.jsx(PWe,{})}),Fe.jsx(O0,{path:"/requests/:requestId",element:Fe.jsx(SHe,{})}),Fe.jsx(O0,{path:"/setup",element:Fe.jsx(OHe,{})}),Fe.jsx(O0,{path:"*",element:Fe.jsx(RHe,{})})]})})})}),document.getElementById("root"));export{ut as B,B4e as R,noe as T,J$e as _,ii as a,Va as b,Ne as c,kc as d,ho as e,AN as f,lo as g,Ma as h,XW as n,_Ke as o,Rc as p,fM as r,Mne as s,wKe as t,Ly as y};
|
|
187
|
-
//# sourceMappingURL=index-409d6258.js.map
|