@dcl/auth-site 0.1.3-7378840092.commit-24eec55 → 0.1.3-7386581352.commit-0ef8d7f
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-bbaa3fa3.js → index-182c30c0.js} +2 -2
- package/assets/{index-bbaa3fa3.js.map → index-182c30c0.js.map} +1 -1
- package/assets/{index-10563468.js → index-5d5f068e.js} +2 -2
- package/assets/{index-10563468.js.map → index-5d5f068e.js.map} +1 -1
- package/assets/index-e1990c9b.js +187 -0
- package/assets/index-e1990c9b.js.map +1 -0
- package/assets/{index-9bcd4ac5.css → index-e6498b45.css} +3 -3
- package/index.html +2 -2
- package/package.json +3 -3
- package/assets/index-ae5690b8.js +0 -187
- package/assets/index-ae5690b8.js.map +0 -1
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
var Wpe=Object.defineProperty;var Kpe=(t,e,r)=>e in t?Wpe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var je=(t,e,r)=>(Kpe(t,typeof e!="symbol"?e+"":e,r),r),AI=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var Y=(t,e,r)=>(AI(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)=>(AI(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Am=(t,e,r,n)=>({set _(i){Te(t,e,i,r)},get _(){return Y(t,e,n)}}),Et=(t,e,r)=>(AI(t,e,"access private method"),r);function Ype(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 Nc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function uo(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 $Q={exports:{}},tw={};/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/var f7=Object.getOwnPropertySymbols,Qpe=Object.prototype.hasOwnProperty,Jpe=Object.prototype.propertyIsEnumerable;function Xpe(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function Zpe(){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 MQ=Zpe()?Object.assign:function(t,e){for(var r,n=Xpe(t),i,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var o in r)Qpe.call(r,o)&&(n[o]=r[o]);if(f7){i=f7(r);for(var s=0;s<i.length;s++)Jpe.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n},kQ={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 M5=MQ,ky=60103,LQ=60106;hn.Fragment=60107;hn.StrictMode=60108;hn.Profiler=60114;var UQ=60109,BQ=60110,FQ=60112;hn.Suspense=60113;var jQ=60115,qQ=60116;if(typeof Symbol=="function"&&Symbol.for){var ac=Symbol.for;ky=ac("react.element"),LQ=ac("react.portal"),hn.Fragment=ac("react.fragment"),hn.StrictMode=ac("react.strict_mode"),hn.Profiler=ac("react.profiler"),UQ=ac("react.provider"),BQ=ac("react.context"),FQ=ac("react.forward_ref"),hn.Suspense=ac("react.suspense"),jQ=ac("react.memo"),qQ=ac("react.lazy")}var d7=typeof Symbol=="function"&&Symbol.iterator;function e0e(t){return t===null||typeof t!="object"?null:(t=d7&&t[d7]||t["@@iterator"],typeof t=="function"?t:null)}function rw(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 HQ={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zQ={};function Ly(t,e,r){this.props=t,this.context=e,this.refs=zQ,this.updater=r||HQ}Ly.prototype.isReactComponent={};Ly.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error(rw(85));this.updater.enqueueSetState(this,t,e,"setState")};Ly.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function VQ(){}VQ.prototype=Ly.prototype;function k5(t,e,r){this.props=t,this.context=e,this.refs=zQ,this.updater=r||HQ}var L5=k5.prototype=new VQ;L5.constructor=k5;M5(L5,Ly.prototype);L5.isPureReactComponent=!0;var U5={current:null},GQ=Object.prototype.hasOwnProperty,WQ={key:!0,ref:!0,__self:!0,__source:!0};function KQ(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)GQ.call(e,n)&&!WQ.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:ky,type:t,key:a,ref:o,props:i,_owner:U5.current}}function t0e(t,e){return{$$typeof:ky,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function B5(t){return typeof t=="object"&&t!==null&&t.$$typeof===ky}function r0e(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var h7=/\/+/g;function SI(t,e){return typeof t=="object"&&t!==null&&t.key!=null?r0e(""+t.key):e.toString(36)}function $E(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 ky:case LQ:o=!0}}if(o)return o=t,i=i(o),t=n===""?"."+SI(o,0):n,Array.isArray(i)?(r="",t!=null&&(r=t.replace(h7,"$&/")+"/"),$E(i,e,r,"",function(u){return u})):i!=null&&(B5(i)&&(i=t0e(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(h7,"$&/")+"/")+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+SI(a,s);o+=$E(a,e,r,c,i)}else if(c=e0e(t),typeof c=="function")for(t=c.call(t),s=0;!(a=t.next()).done;)a=a.value,c=n+SI(a,s++),o+=$E(a,e,r,c,i);else if(a==="object")throw e=""+t,Error(rw(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e));return o}function x_(t,e,r){if(t==null)return t;var n=[],i=0;return $E(t,n,"","",function(a){return e.call(r,a,i++)}),n}function n0e(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 YQ={current:null};function Ll(){var t=YQ.current;if(t===null)throw Error(rw(321));return t}var i0e={ReactCurrentDispatcher:YQ,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:U5,IsSomeRendererActing:{current:!1},assign:M5};hn.Children={map:x_,forEach:function(t,e,r){x_(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return x_(t,function(){e++}),e},toArray:function(t){return x_(t,function(e){return e})||[]},only:function(t){if(!B5(t))throw Error(rw(143));return t}};hn.Component=Ly;hn.PureComponent=k5;hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=i0e;hn.cloneElement=function(t,e,r){if(t==null)throw Error(rw(267,t));var n=M5({},t.props),i=t.key,a=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(a=e.ref,o=U5.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var s=t.type.defaultProps;for(c in e)GQ.call(e,c)&&!WQ.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:ky,type:t.type,key:i,ref:a,props:n,_owner:o}};hn.createContext=function(t,e){return e===void 0&&(e=null),t={$$typeof:BQ,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider={$$typeof:UQ,_context:t},t.Consumer=t};hn.createElement=KQ;hn.createFactory=function(t){var e=KQ.bind(null,t);return e.type=t,e};hn.createRef=function(){return{current:null}};hn.forwardRef=function(t){return{$$typeof:FQ,render:t}};hn.isValidElement=B5;hn.lazy=function(t){return{$$typeof:qQ,_payload:{_status:-1,_result:t},_init:n0e}};hn.memo=function(t,e){return{$$typeof:jQ,type:t,compare:e===void 0?null:e}};hn.useCallback=function(t,e){return Ll().useCallback(t,e)};hn.useContext=function(t,e){return Ll().useContext(t,e)};hn.useDebugValue=function(){};hn.useEffect=function(t,e){return Ll().useEffect(t,e)};hn.useImperativeHandle=function(t,e,r){return Ll().useImperativeHandle(t,e,r)};hn.useLayoutEffect=function(t,e){return Ll().useLayoutEffect(t,e)};hn.useMemo=function(t,e){return Ll().useMemo(t,e)};hn.useReducer=function(t,e,r){return Ll().useReducer(t,e,r)};hn.useRef=function(t){return Ll().useRef(t)};hn.useState=function(t){return Ll().useState(t)};hn.version="17.0.2";kQ.exports=hn;var Ge=kQ.exports;const QQ=Nc(Ge),a0e=Ype({__proto__:null,default:QQ},[Ge]);/** @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 o0e=Ge,JQ=60103;tw.Fragment=60107;if(typeof Symbol=="function"&&Symbol.for){var p7=Symbol.for;JQ=p7("react.element"),tw.Fragment=p7("react.fragment")}var s0e=o0e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c0e=Object.prototype.hasOwnProperty,u0e={key:!0,ref:!0,__self:!0,__source:!0};function XQ(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)c0e.call(e,n)&&!u0e.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:JQ,type:t,key:a,ref:o,props:i,_owner:s0e.current}}tw.jsx=XQ;tw.jsxs=XQ;$Q.exports=tw;var Je=$Q.exports;var ZQ={exports:{}},Gs={},eJ={exports:{}},tJ={};/** @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 O($,H){var k=$.length;$.push(H);e:for(;;){var M=k-1>>>1,G=$[M];if(G!==void 0&&0<I(G,H))$[M]=H,$[k]=G,k=M;else break e}}function E($){return $=$[0],$===void 0?null:$}function p($){var H=$[0];if(H!==void 0){var k=$.pop();if(k!==H){$[0]=k;e:for(var M=0,G=$.length;M<G;){var ge=2*(M+1)-1,Q=$[ge],te=ge+1,ce=$[te];if(Q!==void 0&&0>I(Q,k))ce!==void 0&&0>I(ce,Q)?($[M]=ce,$[te]=k,M=te):($[M]=Q,$[ge]=k,M=ge);else if(ce!==void 0&&0>I(ce,k))$[M]=ce,$[te]=k,M=te;else break e}}return H}return null}function I($,H){var k=$.sortIndex-H.sortIndex;return k!==0?k:$.id-H.id}var C=[],L=[],q=1,le=null,pe=3,B=!1,U=!1,K=!1;function ne($){for(var H=E(L);H!==null;){if(H.callback===null)p(L);else if(H.startTime<=$)p(L),H.sortIndex=H.expirationTime,O(C,H);else break;H=E(L)}}function F($){if(K=!1,ne($),!U)if(E(C)!==null)U=!0,e(j);else{var H=E(L);H!==null&&r(F,H.startTime-$)}}function j($,H){U=!1,K&&(K=!1,n()),B=!0;var k=pe;try{for(ne(H),le=E(C);le!==null&&(!(le.expirationTime>H)||$&&!t.unstable_shouldYield());){var M=le.callback;if(typeof M=="function"){le.callback=null,pe=le.priorityLevel;var G=M(le.expirationTime<=H);H=t.unstable_now(),typeof G=="function"?le.callback=G:le===E(C)&&p(C),ne(H)}else p(C);le=E(C)}if(le!==null)var ge=!0;else{var Q=E(L);Q!==null&&r(F,Q.startTime-H),ge=!1}return ge}finally{le=null,pe=k,B=!1}}var z=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||B||(U=!0,e(j))},t.unstable_getCurrentPriorityLevel=function(){return pe},t.unstable_getFirstCallbackNode=function(){return E(C)},t.unstable_next=function($){switch(pe){case 1:case 2:case 3:var H=3;break;default:H=pe}var k=pe;pe=H;try{return $()}finally{pe=k}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function($,H){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var k=pe;pe=$;try{return H()}finally{pe=k}},t.unstable_scheduleCallback=function($,H,k){var M=t.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?M+k:M):k=M,$){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=k+G,$={id:q++,callback:H,priorityLevel:$,startTime:k,expirationTime:G,sortIndex:-1},k>M?($.sortIndex=k,O(L,$),E(C)===null&&$===E(L)&&(K?n():K=!0,r(F,k-M))):($.sortIndex=G,O(C,$),U||B||(U=!0,e(j))),$},t.unstable_wrapCallback=function($){var H=pe;return function(){var k=pe;pe=H;try{return $.apply(this,arguments)}finally{pe=k}}}})(tJ);eJ.exports=tJ;var l0e=eJ.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 l2=Ge,ni=MQ,Xi=l0e;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(!l2)throw Error(bt(227));var rJ=new Set,Kb={};function pp(t,e){sy(t,e),sy(t+"Capture",e)}function sy(t,e){for(Kb[t]=e,t=0;t<e.length;t++)rJ.add(e[t])}var Rl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f0e=/^[: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]*$/,g7=Object.prototype.hasOwnProperty,y7={},m7={};function d0e(t){return g7.call(m7,t)?!0:g7.call(y7,t)?!1:f0e.test(t)?m7[t]=!0:(y7[t]=!0,!1)}function h0e(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 p0e(t,e,r,n){if(e===null||typeof e>"u"||h0e(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 lo(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 lo(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 lo(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){va[t]=new lo(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){va[t]=new lo(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 lo(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){va[t]=new lo(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){va[t]=new lo(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){va[t]=new lo(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){va[t]=new lo(t,5,!1,t.toLowerCase(),null,!1,!1)});var F5=/[\-:]([a-z])/g;function j5(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(F5,j5);va[e]=new lo(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(F5,j5);va[e]=new lo(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(F5,j5);va[e]=new lo(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){va[t]=new lo(t,1,!1,t.toLowerCase(),null,!1,!1)});va.xlinkHref=new lo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){va[t]=new lo(t,1,!1,t.toLowerCase(),null,!0,!0)});function q5(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||(p0e(e,r,i,n)&&(r=null),n||i===null?d0e(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 gp=l2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Kv=60103,hh=60106,xf=60107,H5=60108,mb=60114,z5=60109,V5=60110,f2=60112,vb=60113,Cx=60120,d2=60115,G5=60116,W5=60121,K5=60128,nJ=60129,Y5=60130,ZN=60131;if(typeof Symbol=="function"&&Symbol.for){var Gi=Symbol.for;Kv=Gi("react.element"),hh=Gi("react.portal"),xf=Gi("react.fragment"),H5=Gi("react.strict_mode"),mb=Gi("react.profiler"),z5=Gi("react.provider"),V5=Gi("react.context"),f2=Gi("react.forward_ref"),vb=Gi("react.suspense"),Cx=Gi("react.suspense_list"),d2=Gi("react.memo"),G5=Gi("react.lazy"),W5=Gi("react.block"),Gi("react.scope"),K5=Gi("react.opaque.id"),nJ=Gi("react.debug_trace_mode"),Y5=Gi("react.offscreen"),ZN=Gi("react.legacy_hidden")}var v7=typeof Symbol=="function"&&Symbol.iterator;function Sm(t){return t===null||typeof t!="object"?null:(t=v7&&t[v7]||t["@@iterator"],typeof t=="function"?t:null)}var OI;function Yv(t){if(OI===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);OI=e&&e[1]||""}return`
|
|
34
|
+
`+OI+t}var II=!1;function A_(t,e){if(!t||II)return"";II=!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{II=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Yv(t):""}function g0e(t){switch(t.tag){case 5:return Yv(t.type);case 16:return Yv("Lazy");case 13:return Yv("Suspense");case 19:return Yv("SuspenseList");case 0:case 2:case 15:return t=A_(t.type,!1),t;case 11:return t=A_(t.type.render,!1),t;case 22:return t=A_(t.type._render,!1),t;case 1:return t=A_(t.type,!0),t;default:return""}}function Y0(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 xf:return"Fragment";case hh:return"Portal";case mb:return"Profiler";case H5:return"StrictMode";case vb:return"Suspense";case Cx:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case V5:return(t.displayName||"Context")+".Consumer";case z5:return(t._context.displayName||"Context")+".Provider";case f2:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case d2:return Y0(t.type);case W5:return Y0(t._render);case G5:e=t._payload,t=t._init;try{return Y0(t(e))}catch{}}return null}function id(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function iJ(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function y0e(t){var e=iJ(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 S_(t){t._valueTracker||(t._valueTracker=y0e(t))}function aJ(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=iJ(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Nx(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 e6(t,e){var r=e.checked;return ni({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function b7(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=id(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 oJ(t,e){e=e.checked,e!=null&&q5(t,"checked",e,!1)}function t6(t,e){oJ(t,e);var r=id(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")?r6(t,e.type,r):e.hasOwnProperty("defaultValue")&&r6(t,e.type,id(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function w7(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 r6(t,e,r){(e!=="number"||Nx(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}function m0e(t){var e="";return l2.Children.forEach(t,function(r){r!=null&&(e+=r)}),e}function n6(t,e){return t=ni({children:void 0},e),(e=m0e(e.children))&&(t.children=e),t}function Q0(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=""+id(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 i6(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:id(r)}}function sJ(t,e){var r=id(e.value),n=id(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 E7(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}var a6={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function cJ(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 o6(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?cJ(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var O_,uJ=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!==a6.svg||"innerHTML"in t)t.innerHTML=e;else{for(O_=O_||document.createElement("div"),O_.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=O_.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Yb(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var bb={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},v0e=["Webkit","ms","Moz","O"];Object.keys(bb).forEach(function(t){v0e.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),bb[e]=bb[t]})});function lJ(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||bb.hasOwnProperty(t)&&bb[t]?(""+e).trim():e+"px"}function fJ(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=lJ(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var b0e=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 s6(t,e){if(e){if(b0e[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 c6(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 Q5(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var u6=null,J0=null,X0=null;function x7(t){if(t=iw(t)){if(typeof u6!="function")throw Error(bt(280));var e=t.stateNode;e&&(e=v2(e),u6(t.stateNode,t.type,e))}}function dJ(t){J0?X0?X0.push(t):X0=[t]:J0=t}function hJ(){if(J0){var t=J0,e=X0;if(X0=J0=null,x7(t),e)for(t=0;t<e.length;t++)x7(e[t])}}function J5(t,e){return t(e)}function pJ(t,e,r,n,i){return t(e,r,n,i)}function X5(){}var gJ=J5,ph=!1,PI=!1;function Z5(){(J0!==null||X0!==null)&&(X5(),hJ())}function w0e(t,e,r){if(PI)return t(e,r);PI=!0;try{return gJ(t,e,r)}finally{PI=!1,Z5()}}function Qb(t,e){var r=t.stateNode;if(r===null)return null;var n=v2(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 l6=!1;if(Rl)try{var Om={};Object.defineProperty(Om,"passive",{get:function(){l6=!0}}),window.addEventListener("test",Om,Om),window.removeEventListener("test",Om,Om)}catch{l6=!1}function _0e(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 wb=!1,Dx=null,$x=!1,f6=null,E0e={onError:function(t){wb=!0,Dx=t}};function x0e(t,e,r,n,i,a,o,s,c){wb=!1,Dx=null,_0e.apply(E0e,arguments)}function A0e(t,e,r,n,i,a,o,s,c){if(x0e.apply(this,arguments),wb){if(wb){var u=Dx;wb=!1,Dx=null}else throw Error(bt(198));$x||($x=!0,f6=u)}}function yp(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 yJ(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 A7(t){if(yp(t)!==t)throw Error(bt(188))}function S0e(t){var e=t.alternate;if(!e){if(e=yp(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 A7(i),t;if(a===n)return A7(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 mJ(t){if(t=S0e(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 S7(t,e){for(var r=t.alternate;e!==null;){if(e===t||e===r)return!0;e=e.return}return!1}var vJ,eD,bJ,wJ,d6=!1,lu=[],Wf=null,Kf=null,Yf=null,Jb=new Map,Xb=new Map,Im=[],O7="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 h6(t,e,r,n,i){return{blockedOn:t,domEventName:e,eventSystemFlags:r|16,nativeEvent:i,targetContainers:[n]}}function I7(t,e){switch(t){case"focusin":case"focusout":Wf=null;break;case"dragenter":case"dragleave":Kf=null;break;case"mouseover":case"mouseout":Yf=null;break;case"pointerover":case"pointerout":Jb.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xb.delete(e.pointerId)}}function Pm(t,e,r,n,i,a){return t===null||t.nativeEvent!==a?(t=h6(e,r,n,i,a),e!==null&&(e=iw(e),e!==null&&eD(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function O0e(t,e,r,n,i){switch(e){case"focusin":return Wf=Pm(Wf,t,e,r,n,i),!0;case"dragenter":return Kf=Pm(Kf,t,e,r,n,i),!0;case"mouseover":return Yf=Pm(Yf,t,e,r,n,i),!0;case"pointerover":var a=i.pointerId;return Jb.set(a,Pm(Jb.get(a)||null,t,e,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,Xb.set(a,Pm(Xb.get(a)||null,t,e,r,n,i)),!0}return!1}function I0e(t){var e=gh(t.target);if(e!==null){var r=yp(e);if(r!==null){if(e=r.tag,e===13){if(e=yJ(r),e!==null){t.blockedOn=e,wJ(t.lanePriority,function(){Xi.unstable_runWithPriority(t.priority,function(){bJ(r)})});return}}else if(e===3&&r.stateNode.hydrate){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ME(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=iD(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r!==null)return e=iw(r),e!==null&&eD(e),t.blockedOn=r,!1;e.shift()}return!0}function P7(t,e,r){ME(t)&&r.delete(e)}function P0e(){for(d6=!1;0<lu.length;){var t=lu[0];if(t.blockedOn!==null){t=iw(t.blockedOn),t!==null&&vJ(t);break}for(var e=t.targetContainers;0<e.length;){var r=iD(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r!==null){t.blockedOn=r;break}e.shift()}t.blockedOn===null&&lu.shift()}Wf!==null&&ME(Wf)&&(Wf=null),Kf!==null&&ME(Kf)&&(Kf=null),Yf!==null&&ME(Yf)&&(Yf=null),Jb.forEach(P7),Xb.forEach(P7)}function Tm(t,e){t.blockedOn===e&&(t.blockedOn=null,d6||(d6=!0,Xi.unstable_scheduleCallback(Xi.unstable_NormalPriority,P0e)))}function _J(t){function e(i){return Tm(i,t)}if(0<lu.length){Tm(lu[0],t);for(var r=1;r<lu.length;r++){var n=lu[r];n.blockedOn===t&&(n.blockedOn=null)}}for(Wf!==null&&Tm(Wf,t),Kf!==null&&Tm(Kf,t),Yf!==null&&Tm(Yf,t),Jb.forEach(e),Xb.forEach(e),r=0;r<Im.length;r++)n=Im[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<Im.length&&(r=Im[0],r.blockedOn===null);)I0e(r),r.blockedOn===null&&Im.shift()}function I_(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var N0={animationend:I_("Animation","AnimationEnd"),animationiteration:I_("Animation","AnimationIteration"),animationstart:I_("Animation","AnimationStart"),transitionend:I_("Transition","TransitionEnd")},TI={},EJ={};Rl&&(EJ=document.createElement("div").style,"AnimationEvent"in window||(delete N0.animationend.animation,delete N0.animationiteration.animation,delete N0.animationstart.animation),"TransitionEvent"in window||delete N0.transitionend.transition);function h2(t){if(TI[t])return TI[t];if(!N0[t])return t;var e=N0[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in EJ)return TI[t]=e[r];return t}var xJ=h2("animationend"),AJ=h2("animationiteration"),SJ=h2("animationstart"),OJ=h2("transitionend"),IJ=new Map,tD=new Map,T0e=["abort","abort",xJ,"animationEnd",AJ,"animationIteration",SJ,"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",OJ,"transitionEnd","waiting","waiting"];function rD(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)),tD.set(n,e),IJ.set(n,i),pp(i,[n])}}var R0e=Xi.unstable_now;R0e();var jn=8;function b0(t){if(1&t)return jn=15,1;if(2&t)return jn=14,2;if(4&t)return jn=13,4;var e=24&t;return e!==0?(jn=12,e):t&32?(jn=11,32):(e=192&t,e!==0?(jn=10,e):t&256?(jn=9,256):(e=3584&t,e!==0?(jn=8,e):t&4096?(jn=7,4096):(e=4186112&t,e!==0?(jn=6,e):(e=62914560&t,e!==0?(jn=5,e):t&67108864?(jn=4,67108864):t&134217728?(jn=3,134217728):(e=805306368&t,e!==0?(jn=2,e):1073741824&t?(jn=1,1073741824):(jn=8,t))))))}function C0e(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 N0e(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 Zb(t,e){var r=t.pendingLanes;if(r===0)return jn=0;var n=0,i=0,a=t.expiredLanes,o=t.suspendedLanes,s=t.pingedLanes;if(a!==0)n=a,i=jn=15;else if(a=r&134217727,a!==0){var c=a&~o;c!==0?(n=b0(c),i=jn):(s&=a,s!==0&&(n=b0(s),i=jn))}else a=r&~o,a!==0?(n=b0(a),i=jn):s!==0&&(n=b0(s),i=jn);if(n===0)return 0;if(n=31-ad(n),n=r&((0>n?0:1<<n)<<1)-1,e!==0&&e!==n&&!(e&o)){if(b0(e),i<=jn)return e;jn=i}if(e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-ad(e),i=1<<r,n|=t[r],e&=~i;return n}function PJ(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Mx(t,e){switch(t){case 15:return 1;case 14:return 2;case 12:return t=w0(24&~e),t===0?Mx(10,e):t;case 10:return t=w0(192&~e),t===0?Mx(8,e):t;case 8:return t=w0(3584&~e),t===0&&(t=w0(4186112&~e),t===0&&(t=512)),t;case 2:return e=w0(805306368&~e),e===0&&(e=268435456),e}throw Error(bt(358,t))}function w0(t){return t&-t}function RI(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function p2(t,e,r){t.pendingLanes|=e;var n=e-1;t.suspendedLanes&=n,t.pingedLanes&=n,t=t.eventTimes,e=31-ad(e),t[e]=r}var ad=Math.clz32?Math.clz32:M0e,D0e=Math.log,$0e=Math.LN2;function M0e(t){return t===0?32:31-(D0e(t)/$0e|0)|0}var k0e=Xi.unstable_UserBlockingPriority,L0e=Xi.unstable_runWithPriority,kE=!0;function U0e(t,e,r,n){ph||X5();var i=nD,a=ph;ph=!0;try{pJ(i,t,e,r,n)}finally{(ph=a)||Z5()}}function B0e(t,e,r,n){L0e(k0e,nD.bind(null,t,e,r,n))}function nD(t,e,r,n){if(kE){var i;if((i=(e&4)===0)&&0<lu.length&&-1<O7.indexOf(t))t=h6(null,t,e,r,n),lu.push(t);else{var a=iD(t,e,r,n);if(a===null)i&&I7(t,n);else{if(i){if(-1<O7.indexOf(t)){t=h6(a,t,e,r,n),lu.push(t);return}if(O0e(a,t,e,r,n))return;I7(t,n)}jJ(t,e,n,null,r)}}}}function iD(t,e,r,n){var i=Q5(n);if(i=gh(i),i!==null){var a=yp(i);if(a===null)i=null;else{var o=a.tag;if(o===13){if(i=yJ(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 jJ(t,e,n,i,r),null}var Bf=null,aD=null,LE=null;function TJ(){if(LE)return LE;var t,e=aD,r=e.length,n,i="value"in Bf?Bf.value:Bf.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 LE=i.slice(t,1<n?1-n:void 0)}function UE(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 P_(){return!0}function T7(){return!1}function ts(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)?P_:T7,this.isPropagationStopped=T7,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=P_)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=P_)},persist:function(){},isPersistent:P_}),e}var Uy={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oD=ts(Uy),nw=ni({},Uy,{view:0,detail:0}),F0e=ts(nw),CI,NI,Rm,g2=ni({},nw,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sD,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!==Rm&&(Rm&&t.type==="mousemove"?(CI=t.screenX-Rm.screenX,NI=t.screenY-Rm.screenY):NI=CI=0,Rm=t),CI)},movementY:function(t){return"movementY"in t?t.movementY:NI}}),R7=ts(g2),j0e=ni({},g2,{dataTransfer:0}),q0e=ts(j0e),H0e=ni({},nw,{relatedTarget:0}),DI=ts(H0e),z0e=ni({},Uy,{animationName:0,elapsedTime:0,pseudoElement:0}),V0e=ts(z0e),G0e=ni({},Uy,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),W0e=ts(G0e),K0e=ni({},Uy,{data:0}),C7=ts(K0e),Y0e={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q0e={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"},J0e={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X0e(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=J0e[t])?!!e[t]:!1}function sD(){return X0e}var Z0e=ni({},nw,{key:function(t){if(t.key){var e=Y0e[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=UE(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Q0e[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sD,charCode:function(t){return t.type==="keypress"?UE(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?UE(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),ege=ts(Z0e),tge=ni({},g2,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),N7=ts(tge),rge=ni({},nw,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sD}),nge=ts(rge),ige=ni({},Uy,{propertyName:0,elapsedTime:0,pseudoElement:0}),age=ts(ige),oge=ni({},g2,{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}),sge=ts(oge),cge=[9,13,27,32],cD=Rl&&"CompositionEvent"in window,_b=null;Rl&&"documentMode"in document&&(_b=document.documentMode);var uge=Rl&&"TextEvent"in window&&!_b,RJ=Rl&&(!cD||_b&&8<_b&&11>=_b),D7=String.fromCharCode(32),$7=!1;function CJ(t,e){switch(t){case"keyup":return cge.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function NJ(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var D0=!1;function lge(t,e){switch(t){case"compositionend":return NJ(e);case"keypress":return e.which!==32?null:($7=!0,D7);case"textInput":return t=e.data,t===D7&&$7?null:t;default:return null}}function fge(t,e){if(D0)return t==="compositionend"||!cD&&CJ(t,e)?(t=TJ(),LE=aD=Bf=null,D0=!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 RJ&&e.locale!=="ko"?null:e.data;default:return null}}var dge={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 M7(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!dge[t.type]:e==="textarea"}function DJ(t,e,r,n){dJ(n),e=kx(e,"onChange"),0<e.length&&(r=new oD("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var Eb=null,e1=null;function hge(t){UJ(t,0)}function y2(t){var e=M0(t);if(aJ(e))return t}function pge(t,e){if(t==="change")return e}var $J=!1;if(Rl){var $I;if(Rl){var MI="oninput"in document;if(!MI){var k7=document.createElement("div");k7.setAttribute("oninput","return;"),MI=typeof k7.oninput=="function"}$I=MI}else $I=!1;$J=$I&&(!document.documentMode||9<document.documentMode)}function L7(){Eb&&(Eb.detachEvent("onpropertychange",MJ),e1=Eb=null)}function MJ(t){if(t.propertyName==="value"&&y2(e1)){var e=[];if(DJ(e,e1,t,Q5(t)),t=hge,ph)t(e);else{ph=!0;try{J5(t,e)}finally{ph=!1,Z5()}}}}function gge(t,e,r){t==="focusin"?(L7(),Eb=e,e1=r,Eb.attachEvent("onpropertychange",MJ)):t==="focusout"&&L7()}function yge(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return y2(e1)}function mge(t,e){if(t==="click")return y2(e)}function vge(t,e){if(t==="input"||t==="change")return y2(e)}function bge(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ds=typeof Object.is=="function"?Object.is:bge,wge=Object.prototype.hasOwnProperty;function t1(t,e){if(Ds(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(!wge.call(e,r[n])||!Ds(t[r[n]],e[r[n]]))return!1;return!0}function U7(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function B7(t,e){var r=U7(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=U7(r)}}function kJ(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?kJ(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function F7(){for(var t=window,e=Nx();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Nx(t.document)}return e}function p6(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 _ge=Rl&&"documentMode"in document&&11>=document.documentMode,$0=null,g6=null,xb=null,y6=!1;function j7(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;y6||$0==null||$0!==Nx(n)||(n=$0,"selectionStart"in n&&p6(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}),xb&&t1(xb,n)||(xb=n,n=kx(g6,"onSelect"),0<n.length&&(e=new oD("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=$0)))}rD("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);rD("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);rD(T0e,2);for(var q7="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),kI=0;kI<q7.length;kI++)tD.set(q7[kI],0);sy("onMouseEnter",["mouseout","mouseover"]);sy("onMouseLeave",["mouseout","mouseover"]);sy("onPointerEnter",["pointerout","pointerover"]);sy("onPointerLeave",["pointerout","pointerover"]);pp("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));pp("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));pp("onBeforeInput",["compositionend","keypress","textInput","paste"]);pp("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));pp("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));pp("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qv="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),LJ=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qv));function H7(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,A0e(n,e,void 0,t),t.currentTarget=null}function UJ(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;H7(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;H7(i,s,u),a=c}}}if($x)throw t=f6,$x=!1,f6=null,t}function Yn(t,e){var r=HJ(e),n=t+"__bubble";r.has(n)||(FJ(e,t,2,!1),r.add(n))}var z7="_reactListening"+Math.random().toString(36).slice(2);function BJ(t){t[z7]||(t[z7]=!0,rJ.forEach(function(e){LJ.has(e)||V7(e,!1,t,null),V7(e,!0,t,null)}))}function V7(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&&LJ.has(t)){if(t!=="scroll")return;i|=2,a=n}var o=HJ(a),s=t+"__"+(e?"capture":"bubble");o.has(s)||(e&&(i|=4),FJ(a,t,i,e),o.add(s))}function FJ(t,e,r,n){var i=tD.get(e);switch(i===void 0?2:i){case 0:i=U0e;break;case 1:i=B0e;break;default:i=nD}r=i.bind(null,e,r,t),i=void 0,!l6||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 jJ(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=gh(s),o===null)return;if(c=o.tag,c===5||c===6){n=a=o;continue e}s=s.parentNode}}n=n.return}w0e(function(){var u=a,f=Q5(r),d=[];e:{var g=IJ.get(t);if(g!==void 0){var m=oD,w=t;switch(t){case"keypress":if(UE(r)===0)break e;case"keydown":case"keyup":m=ege;break;case"focusin":w="focus",m=DI;break;case"focusout":w="blur",m=DI;break;case"beforeblur":case"afterblur":m=DI;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=R7;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=q0e;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=nge;break;case xJ:case AJ:case SJ:m=V0e;break;case OJ:m=age;break;case"scroll":m=F0e;break;case"wheel":m=sge;break;case"copy":case"cut":case"paste":m=W0e;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=N7}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=Qb(b,_),x!=null&&v.push(r1(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)&&(gh(w)||w[By]))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?gh(w):null,w!==null&&(y=yp(w),w!==y||w.tag!==5&&w.tag!==6)&&(w=null)):(m=null,w=u),m!==w)){if(v=R7,x="onMouseLeave",_="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(v=N7,x="onPointerLeave",_="onPointerEnter",b="pointer"),y=m==null?g:M0(m),S=w==null?g:M0(w),g=new v(x,b+"leave",m,r,f),g.target=y,g.relatedTarget=S,x=null,gh(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=n0(S))b++;for(S=0,x=_;x;x=n0(x))S++;for(;0<b-S;)v=n0(v),b--;for(;0<S-b;)_=n0(_),S--;for(;b--;){if(v===_||_!==null&&v===_.alternate)break t;v=n0(v),_=n0(_)}v=null}else v=null;m!==null&&G7(d,g,m,v,!1),w!==null&&y!==null&&G7(d,y,w,v,!0)}}e:{if(g=u?M0(u):window,m=g.nodeName&&g.nodeName.toLowerCase(),m==="select"||m==="input"&&g.type==="file")var O=pge;else if(M7(g))if($J)O=vge;else{O=yge;var E=gge}else(m=g.nodeName)&&m.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(O=mge);if(O&&(O=O(t,u))){DJ(d,O,r,f);break e}E&&E(t,g,u),t==="focusout"&&(E=g._wrapperState)&&E.controlled&&g.type==="number"&&r6(g,"number",g.value)}switch(E=u?M0(u):window,t){case"focusin":(M7(E)||E.contentEditable==="true")&&($0=E,g6=u,xb=null);break;case"focusout":xb=g6=$0=null;break;case"mousedown":y6=!0;break;case"contextmenu":case"mouseup":case"dragend":y6=!1,j7(d,r,f);break;case"selectionchange":if(_ge)break;case"keydown":case"keyup":j7(d,r,f)}var p;if(cD)e:{switch(t){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else D0?CJ(t,r)&&(I="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(I="onCompositionStart");I&&(RJ&&r.locale!=="ko"&&(D0||I!=="onCompositionStart"?I==="onCompositionEnd"&&D0&&(p=TJ()):(Bf=f,aD="value"in Bf?Bf.value:Bf.textContent,D0=!0)),E=kx(u,I),0<E.length&&(I=new C7(I,t,null,r,f),d.push({event:I,listeners:E}),p?I.data=p:(p=NJ(r),p!==null&&(I.data=p)))),(p=uge?lge(t,r):fge(t,r))&&(u=kx(u,"onBeforeInput"),0<u.length&&(f=new C7("onBeforeInput","beforeinput",null,r,f),d.push({event:f,listeners:u}),f.data=p))}UJ(d,e)})}function r1(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=Qb(t,r),a!=null&&n.unshift(r1(t,a,i)),a=Qb(t,e),a!=null&&n.push(r1(t,a,i))),t=t.return}return n}function n0(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function G7(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=Qb(r,a),c!=null&&o.unshift(r1(r,c,s))):i||(c=Qb(r,a),c!=null&&o.push(r1(r,c,s)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}function Lx(){}var LI=null,UI=null;function qJ(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function m6(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 W7=typeof setTimeout=="function"?setTimeout:void 0,Ege=typeof clearTimeout=="function"?clearTimeout:void 0;function uD(t){t.nodeType===1?t.textContent="":t.nodeType===9&&(t=t.body,t!=null&&(t.textContent=""))}function Z0(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break}return t}function K7(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 BI=0;function xge(t){return{$$typeof:K5,toString:t,valueOf:t}}var m2=Math.random().toString(36).slice(2),Ff="__reactFiber$"+m2,Ux="__reactProps$"+m2,By="__reactContainer$"+m2,Y7="__reactEvents$"+m2;function gh(t){var e=t[Ff];if(e)return e;for(var r=t.parentNode;r;){if(e=r[By]||r[Ff]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=K7(t);t!==null;){if(r=t[Ff])return r;t=K7(t)}return e}t=r,r=t.parentNode}return null}function iw(t){return t=t[Ff]||t[By],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function M0(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(bt(33))}function v2(t){return t[Ux]||null}function HJ(t){var e=t[Y7];return e===void 0&&(e=t[Y7]=new Set),e}var v6=[],k0=-1;function hd(t){return{current:t}}function Xn(t){0>k0||(t.current=v6[k0],v6[k0]=null,k0--)}function gi(t,e){k0++,v6[k0]=t.current,t.current=e}var od={},za=hd(od),No=hd(!1),ep=od;function cy(t,e){var r=t.type.contextTypes;if(!r)return od;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 Do(t){return t=t.childContextTypes,t!=null}function Bx(){Xn(No),Xn(za)}function Q7(t,e,r){if(za.current!==od)throw Error(bt(168));gi(za,e),gi(No,r)}function zJ(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,Y0(e)||"Unknown",i));return ni({},r,n)}function BE(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||od,ep=za.current,gi(za,t),gi(No,No.current),!0}function J7(t,e,r){var n=t.stateNode;if(!n)throw Error(bt(169));r?(t=zJ(t,e,ep),n.__reactInternalMemoizedMergedChildContext=t,Xn(No),Xn(za),gi(za,t)):Xn(No),gi(No,r)}var lD=null,Gh=null,Age=Xi.unstable_runWithPriority,fD=Xi.unstable_scheduleCallback,b6=Xi.unstable_cancelCallback,Sge=Xi.unstable_shouldYield,X7=Xi.unstable_requestPaint,w6=Xi.unstable_now,Oge=Xi.unstable_getCurrentPriorityLevel,b2=Xi.unstable_ImmediatePriority,VJ=Xi.unstable_UserBlockingPriority,GJ=Xi.unstable_NormalPriority,WJ=Xi.unstable_LowPriority,KJ=Xi.unstable_IdlePriority,FI={},Ige=X7!==void 0?X7:function(){},Zu=null,FE=null,jI=!1,Z7=w6(),Fa=1e4>Z7?w6:function(){return w6()-Z7};function uy(){switch(Oge()){case b2:return 99;case VJ:return 98;case GJ:return 97;case WJ:return 96;case KJ:return 95;default:throw Error(bt(332))}}function YJ(t){switch(t){case 99:return b2;case 98:return VJ;case 97:return GJ;case 96:return WJ;case 95:return KJ;default:throw Error(bt(332))}}function tp(t,e){return t=YJ(t),Age(t,e)}function n1(t,e,r){return t=YJ(t),fD(t,e,r)}function Su(){if(FE!==null){var t=FE;FE=null,b6(t)}QJ()}function QJ(){if(!jI&&Zu!==null){jI=!0;var t=0;try{var e=Zu;tp(99,function(){for(;t<e.length;t++){var r=e[t];do r=r(!0);while(r!==null)}}),Zu=null}catch(r){throw Zu!==null&&(Zu=Zu.slice(t+1)),fD(b2,Su),r}finally{jI=!1}}}var Pge=gp.ReactCurrentBatchConfig;function dc(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 Fx=hd(null),jx=null,L0=null,qx=null;function dD(){qx=L0=jx=null}function hD(t){var e=Fx.current;Xn(Fx),t.type._context._currentValue=e}function JJ(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 eg(t,e){jx=t,qx=L0=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Sc=!0),t.firstContext=null)}function Fs(t,e){if(qx!==t&&e!==!1&&e!==0)if((typeof e!="number"||e===1073741823)&&(qx=t,e=1073741823),e={context:t,observedBits:e,next:null},L0===null){if(jx===null)throw Error(bt(308));L0=e,jx.dependencies={lanes:0,firstContext:e,responders:null}}else L0=L0.next=e;return t._currentValue}var vf=!1;function pD(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function XJ(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 Qf(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Jf(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 eU(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 i1(t,e,r,n){var i=t.updateQueue;vf=!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:vf=!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,ow|=o,t.lanes=o,t.memoizedState=d}}function tU(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 ZJ=new l2.Component().refs;function Hx(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 w2={isMounted:function(t){return(t=t._reactInternals)?yp(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=Zo(),i=Xf(t),a=Qf(n,i);a.payload=e,r!=null&&(a.callback=r),Jf(t,a),Zf(t,i,n)},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=Zo(),i=Xf(t),a=Qf(n,i);a.tag=1,a.payload=e,r!=null&&(a.callback=r),Jf(t,a),Zf(t,i,n)},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=Zo(),n=Xf(t),i=Qf(r,n);i.tag=2,e!=null&&(i.callback=e),Jf(t,i),Zf(t,n,r)}};function rU(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?!t1(r,n)||!t1(i,a):!0}function eX(t,e,r){var n=!1,i=od,a=e.contextType;return typeof a=="object"&&a!==null?a=Fs(a):(i=Do(e)?ep:za.current,n=e.contextTypes,a=(n=n!=null)?cy(t,i):od),e=new e(r,a),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=w2,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=a),e}function nU(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&&w2.enqueueReplaceState(e,e.state,null)}function _6(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs=ZJ,pD(t);var a=e.contextType;typeof a=="object"&&a!==null?i.context=Fs(a):(a=Do(e)?ep:za.current,i.context=cy(t,a)),i1(t,r,i,n),i.state=t.memoizedState,a=e.getDerivedStateFromProps,typeof a=="function"&&(Hx(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&&w2.enqueueReplaceState(i,i.state,null),i1(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4)}var T_=Array.isArray;function Cm(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===ZJ&&(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 R_(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 tX(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=cd(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?(_=GI(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=Cm(y,_,b),S.return=y,S):(S=zE(b.type,b.key,b.props,null,y.mode,S),S.ref=Cm(y,_,b),S.return=y,S)}function u(y,_,b,S){return _===null||_.tag!==4||_.stateNode.containerInfo!==b.containerInfo||_.stateNode.implementation!==b.implementation?(_=WI(b,y.mode,S),_.return=y,_):(_=i(_,b.children||[]),_.return=y,_)}function f(y,_,b,S,x){return _===null||_.tag!==7?(_=ig(b,y.mode,S,x),_.return=y,_):(_=i(_,b),_.return=y,_)}function d(y,_,b){if(typeof _=="string"||typeof _=="number")return _=GI(""+_,y.mode,b),_.return=y,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Kv:return b=zE(_.type,_.key,_.props,null,y.mode,b),b.ref=Cm(y,null,_),b.return=y,b;case hh:return _=WI(_,y.mode,b),_.return=y,_}if(T_(_)||Sm(_))return _=ig(_,y.mode,b,null),_.return=y,_;R_(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 Kv:return b.key===x?b.type===xf?f(y,_,b.props.children,S,x):c(y,_,b,S):null;case hh:return b.key===x?u(y,_,b,S):null}if(T_(b)||Sm(b))return x!==null?null:f(y,_,b,S,null);R_(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 Kv:return y=y.get(S.key===null?b:S.key)||null,S.type===xf?f(_,y,S.props.children,x,S.key):c(_,y,S,x);case hh:return y=y.get(S.key===null?b:S.key)||null,u(_,y,S,x)}if(T_(S)||Sm(S))return y=y.get(b)||null,f(_,y,S,x,null);R_(_,S)}return null}function w(y,_,b,S){for(var x=null,O=null,E=_,p=_=0,I=null;E!==null&&p<b.length;p++){E.index>p?(I=E,E=null):I=E.sibling;var C=g(y,E,b[p],S);if(C===null){E===null&&(E=I);break}t&&E&&C.alternate===null&&e(y,E),_=a(C,_,p),O===null?x=C:O.sibling=C,O=C,E=I}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),O===null?x=E:O.sibling=E,O=E);return x}for(E=n(y,E);p<b.length;p++)I=m(E,y,p,b[p],S),I!==null&&(t&&I.alternate!==null&&E.delete(I.key===null?p:I.key),_=a(I,_,p),O===null?x=I:O.sibling=I,O=I);return t&&E.forEach(function(L){return e(y,L)}),x}function v(y,_,b,S){var x=Sm(b);if(typeof x!="function")throw Error(bt(150));if(b=x.call(b),b==null)throw Error(bt(151));for(var O=x=null,E=_,p=_=0,I=null,C=b.next();E!==null&&!C.done;p++,C=b.next()){E.index>p?(I=E,E=null):I=E.sibling;var L=g(y,E,C.value,S);if(L===null){E===null&&(E=I);break}t&&E&&L.alternate===null&&e(y,E),_=a(L,_,p),O===null?x=L:O.sibling=L,O=L,E=I}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),O===null?x=C:O.sibling=C,O=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),O===null?x=C:O.sibling=C,O=C);return t&&E.forEach(function(q){return e(y,q)}),x}return function(y,_,b,S){var x=typeof b=="object"&&b!==null&&b.type===xf&&b.key===null;x&&(b=b.props.children);var O=typeof b=="object"&&b!==null;if(O)switch(b.$$typeof){case Kv:e:{for(O=b.key,x=_;x!==null;){if(x.key===O){switch(x.tag){case 7:if(b.type===xf){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=Cm(y,x,b),_.return=y,y=_;break e}}r(y,x);break}else e(y,x);x=x.sibling}b.type===xf?(_=ig(b.props.children,y.mode,S,b.key),_.return=y,y=_):(S=zE(b.type,b.key,b.props,null,y.mode,S),S.ref=Cm(y,_,b),S.return=y,y=S)}return o(y);case hh: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}_=WI(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,_),_=GI(b,y.mode,S),_.return=y,y=_),o(y);if(T_(b))return w(y,_,b,S);if(Sm(b))return v(y,_,b,S);if(O&&R_(y,b),typeof b>"u"&&!x)switch(y.tag){case 1:case 22:case 0:case 11:case 15:throw Error(bt(152,Y0(y.type)||"Component"))}return r(y,_)}}var zx=tX(!0),rX=tX(!1),aw={},gu=hd(aw),a1=hd(aw),o1=hd(aw);function yh(t){if(t===aw)throw Error(bt(174));return t}function E6(t,e){switch(gi(o1,e),gi(a1,t),gi(gu,aw),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:o6(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=o6(e,t)}Xn(gu),gi(gu,e)}function ly(){Xn(gu),Xn(a1),Xn(o1)}function iU(t){yh(o1.current);var e=yh(gu.current),r=o6(e,t.type);e!==r&&(gi(a1,t),gi(gu,r))}function gD(t){a1.current===t&&(Xn(gu),Xn(a1))}var pi=hd(0);function Vx(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 yl=null,jf=null,yu=!1;function nX(t,e){var r=$s(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 aU(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 x6(t){if(yu){var e=jf;if(e){var r=e;if(!aU(t,e)){if(e=Z0(r.nextSibling),!e||!aU(t,e)){t.flags=t.flags&-1025|2,yu=!1,yl=t;return}nX(yl,r)}yl=t,jf=Z0(e.firstChild)}else t.flags=t.flags&-1025|2,yu=!1,yl=t}}function oU(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;yl=t}function C_(t){if(t!==yl)return!1;if(!yu)return oU(t),yu=!0,!1;var e=t.type;if(t.tag!==5||e!=="head"&&e!=="body"&&!m6(e,t.memoizedProps))for(e=jf;e;)nX(t,e),e=Z0(e.nextSibling);if(oU(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){jf=Z0(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}jf=null}}else jf=yl?Z0(t.stateNode.nextSibling):null;return!0}function qI(){jf=yl=null,yu=!1}var tg=[];function yD(){for(var t=0;t<tg.length;t++)tg[t]._workInProgressVersionPrimary=null;tg.length=0}var Ab=gp.ReactCurrentDispatcher,Ms=gp.ReactCurrentBatchConfig,s1=0,Ai=null,Da=null,la=null,Gx=!1,Sb=!1;function bo(){throw Error(bt(321))}function mD(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!Ds(t[r],e[r]))return!1;return!0}function vD(t,e,r,n,i,a){if(s1=a,Ai=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Ab.current=t===null||t.memoizedState===null?Rge:Cge,t=r(n,i),Sb){a=0;do{if(Sb=!1,!(25>a))throw Error(bt(301));a+=1,la=Da=null,e.updateQueue=null,Ab.current=Nge,t=r(n,i)}while(Sb)}if(Ab.current=Qx,e=Da!==null&&Da.next!==null,s1=0,la=Da=Ai=null,Gx=!1,e)throw Error(bt(300));return t}function mh(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return la===null?Ai.memoizedState=la=t:la=la.next=t,la}function mp(){if(Da===null){var t=Ai.alternate;t=t!==null?t.memoizedState:null}else t=Da.next;var e=la===null?Ai.memoizedState:la.next;if(e!==null)la=e,Da=t;else{if(t===null)throw Error(bt(310));Da=t,t={memoizedState:Da.memoizedState,baseState:Da.baseState,baseQueue:Da.baseQueue,queue:Da.queue,next:null},la===null?Ai.memoizedState=la=t:la=la.next=t}return la}function fu(t,e){return typeof e=="function"?e(t):e}function Nm(t){var e=mp(),r=e.queue;if(r===null)throw Error(bt(311));r.lastRenderedReducer=t;var n=Da,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((s1&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,Ai.lanes|=u,ow|=u}c=c.next}while(c!==null&&c!==i);s===null?a=n:s.next=o,Ds(n,e.memoizedState)||(Sc=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=s,r.lastRenderedState=n}return[e.memoizedState,r.dispatch]}function Dm(t){var e=mp(),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);Ds(a,e.memoizedState)||(Sc=!0),e.memoizedState=a,e.baseQueue===null&&(e.baseState=a),r.lastRenderedState=a}return[a,n]}function sU(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=(s1&t)===t)&&(e._workInProgressVersionPrimary=n,tg.push(e))),t)return r(e._source);throw tg.push(e),Error(bt(350))}function iX(t,e,r,n){var i=ao;if(i===null)throw Error(bt(349));var a=e._getVersion,o=a(e._source),s=Ab.current,c=s.useState(function(){return sU(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=Ai;return t.memoizedState={refs:g,source:e,subscribe:n},s.useEffect(function(){g.getSnapshot=r,g.setSnapshot=u;var y=a(e._source);if(!Ds(o,y)){y=r(e._source),Ds(f,y)||(u(y),y=Xf(v),i.mutableReadLanes|=y&i.pendingLanes),y=i.mutableReadLanes,i.entangledLanes|=y;for(var _=i.entanglements,b=y;0<b;){var S=31-ad(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=Xf(v);i.mutableReadLanes|=b&i.pendingLanes}catch(S){_(function(){throw S})}})},[e,n]),Ds(m,r)&&Ds(w,e)&&Ds(d,n)||(t={pending:null,dispatch:null,lastRenderedReducer:fu,lastRenderedState:f},t.dispatch=u=_D.bind(null,Ai,t),c.queue=t,c.baseQueue=null,f=sU(i,e,r),c.memoizedState=c.baseState=f),f}function aX(t,e,r){var n=mp();return iX(n,t,e,r)}function $m(t){var e=mh();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t=e.queue={pending:null,dispatch:null,lastRenderedReducer:fu,lastRenderedState:t},t=t.dispatch=_D.bind(null,Ai,t),[e.memoizedState,t]}function Wx(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Ai.updateQueue,e===null?(e={lastEffect:null},Ai.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 cU(t){var e=mh();return t={current:t},e.memoizedState=t}function Kx(){return mp().memoizedState}function A6(t,e,r,n){var i=mh();Ai.flags|=t,i.memoizedState=Wx(1|e,r,void 0,n===void 0?null:n)}function bD(t,e,r,n){var i=mp();n=n===void 0?null:n;var a=void 0;if(Da!==null){var o=Da.memoizedState;if(a=o.destroy,n!==null&&mD(n,o.deps)){Wx(e,r,a,n);return}}Ai.flags|=t,i.memoizedState=Wx(1|e,r,a,n)}function uU(t,e){return A6(516,4,t,e)}function Yx(t,e){return bD(516,4,t,e)}function oX(t,e){return bD(4,2,t,e)}function sX(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 cX(t,e,r){return r=r!=null?r.concat([t]):null,bD(4,2,sX.bind(null,e,t),r)}function wD(){}function uX(t,e){var r=mp();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&mD(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function lX(t,e){var r=mp();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&mD(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function Tge(t,e){var r=uy();tp(98>r?98:r,function(){t(!0)}),tp(97<r?97:r,function(){var n=Ms.transition;Ms.transition=1;try{t(!1),e()}finally{Ms.transition=n}})}function _D(t,e,r){var n=Zo(),i=Xf(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===Ai||o!==null&&o===Ai)Sb=Gx=!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,Ds(c,s))return}catch{}finally{}Zf(t,i,n)}}var Qx={readContext:Fs,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useLayoutEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useMutableSource:bo,useOpaqueIdentifier:bo,unstable_isNewReconciler:!1},Rge={readContext:Fs,useCallback:function(t,e){return mh().memoizedState=[t,e===void 0?null:e],t},useContext:Fs,useEffect:uU,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,A6(4,2,sX.bind(null,e,t),r)},useLayoutEffect:function(t,e){return A6(4,2,t,e)},useMemo:function(t,e){var r=mh();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=mh();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,Ai,t),[n.memoizedState,t]},useRef:cU,useState:$m,useDebugValue:wD,useDeferredValue:function(t){var e=$m(t),r=e[0],n=e[1];return uU(function(){var i=Ms.transition;Ms.transition=1;try{n(t)}finally{Ms.transition=i}},[t]),r},useTransition:function(){var t=$m(!1),e=t[0];return t=Tge.bind(null,t[1]),cU(t),[t,e]},useMutableSource:function(t,e,r){var n=mh();return n.memoizedState={refs:{getSnapshot:e,setSnapshot:null},source:t,subscribe:r},iX(n,t,e,r)},useOpaqueIdentifier:function(){if(yu){var t=!1,e=xge(function(){throw t||(t=!0,r("r:"+(BI++).toString(36))),Error(bt(355))}),r=$m(e)[1];return!(Ai.mode&2)&&(Ai.flags|=516,Wx(5,function(){r("r:"+(BI++).toString(36))},void 0,null)),e}return e="r:"+(BI++).toString(36),$m(e),e},unstable_isNewReconciler:!1},Cge={readContext:Fs,useCallback:uX,useContext:Fs,useEffect:Yx,useImperativeHandle:cX,useLayoutEffect:oX,useMemo:lX,useReducer:Nm,useRef:Kx,useState:function(){return Nm(fu)},useDebugValue:wD,useDeferredValue:function(t){var e=Nm(fu),r=e[0],n=e[1];return Yx(function(){var i=Ms.transition;Ms.transition=1;try{n(t)}finally{Ms.transition=i}},[t]),r},useTransition:function(){var t=Nm(fu)[0];return[Kx().current,t]},useMutableSource:aX,useOpaqueIdentifier:function(){return Nm(fu)[0]},unstable_isNewReconciler:!1},Nge={readContext:Fs,useCallback:uX,useContext:Fs,useEffect:Yx,useImperativeHandle:cX,useLayoutEffect:oX,useMemo:lX,useReducer:Dm,useRef:Kx,useState:function(){return Dm(fu)},useDebugValue:wD,useDeferredValue:function(t){var e=Dm(fu),r=e[0],n=e[1];return Yx(function(){var i=Ms.transition;Ms.transition=1;try{n(t)}finally{Ms.transition=i}},[t]),r},useTransition:function(){var t=Dm(fu)[0];return[Kx().current,t]},useMutableSource:aX,useOpaqueIdentifier:function(){return Dm(fu)[0]},unstable_isNewReconciler:!1},Dge=gp.ReactCurrentOwner,Sc=!1;function So(t,e,r,n){e.child=t===null?rX(e,null,r,n):zx(e,t.child,r,n)}function lU(t,e,r,n,i){r=r.render;var a=e.ref;return eg(e,i),n=vD(t,e,r,n,a,i),t!==null&&!Sc?(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,ml(t,e,i)):(e.flags|=1,So(t,e,n,i),e.child)}function fU(t,e,r,n,i,a){if(t===null){var o=r.type;return typeof o=="function"&&!ID(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,fX(t,e,o,n,i,a)):(t=zE(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:t1,r(i,n)&&t.ref===e.ref)?ml(t,e,a):(e.flags|=1,t=cd(o,n),t.ref=e.ref,t.return=e,e.child=t)}function fX(t,e,r,n,i,a){if(t!==null&&t1(t.memoizedProps,n)&&t.ref===e.ref)if(Sc=!1,(a&i)!==0)t.flags&16384&&(Sc=!0);else return e.lanes=t.lanes,ml(t,e,a);return S6(t,e,r,n,a)}function HI(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},D_(e,r);else if(r&1073741824)e.memoizedState={baseLanes:0},D_(e,a!==null?a.baseLanes:r);else return t=a!==null?a.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t},D_(e,t),null;else a!==null?(n=a.baseLanes|r,e.memoizedState=null):n=r,D_(e,n);return So(t,e,i,r),e.child}function dX(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=128)}function S6(t,e,r,n,i){var a=Do(r)?ep:za.current;return a=cy(e,a),eg(e,i),r=vD(t,e,r,n,a,i),t!==null&&!Sc?(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,ml(t,e,i)):(e.flags|=1,So(t,e,r,i),e.child)}function dU(t,e,r,n,i){if(Do(r)){var a=!0;BE(e)}else a=!1;if(eg(e,i),e.stateNode===null)t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),eX(e,r,n),_6(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=Fs(u):(u=Do(r)?ep:za.current,u=cy(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)&&nU(e,o,n,u),vf=!1;var g=e.memoizedState;o.state=g,i1(e,n,o,i),c=e.memoizedState,s!==n||g!==c||No.current||vf?(typeof f=="function"&&(Hx(e,r,f,n),c=e.memoizedState),(s=vf||rU(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,XJ(t,e),s=e.memoizedProps,u=e.type===e.elementType?s:dc(e.type,s),o.props=u,d=e.pendingProps,g=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=Fs(c):(c=Do(r)?ep:za.current,c=cy(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)&&nU(e,o,n,c),vf=!1,g=e.memoizedState,o.state=g,i1(e,n,o,i);var w=e.memoizedState;s!==d||g!==w||No.current||vf?(typeof m=="function"&&(Hx(e,r,m,n),w=e.memoizedState),(u=vf||rU(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 O6(t,e,r,n,a,i)}function O6(t,e,r,n,i,a){dX(t,e);var o=(e.flags&64)!==0;if(!n&&!o)return i&&J7(e,r,!1),ml(t,e,a);n=e.stateNode,Dge.current=e;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=zx(e,t.child,null,a),e.child=zx(e,null,s,a)):So(t,e,s,a),e.memoizedState=n.state,i&&J7(e,r,!0),e.child}function hU(t){var e=t.stateNode;e.pendingContext?Q7(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Q7(t,e.context,!1),E6(t,e.containerInfo)}var N_={dehydrated:null,retryLane:0};function pU(t,e,r){var n=e.pendingProps,i=pi.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),gi(pi,i&1),t===null?(n.fallback!==void 0&&x6(e),t=n.children,i=n.fallback,a?(t=gU(e,t,i,r),e.child.memoizedState={baseLanes:r},e.memoizedState=N_,t):typeof n.unstable_expectedLoadTime=="number"?(t=gU(e,t,i,r),e.child.memoizedState={baseLanes:r},e.memoizedState=N_,e.lanes=33554432,t):(r=PD({mode:"visible",children:t},e.mode,r,null),r.return=e,e.child=r)):t.memoizedState!==null?a?(n=mU(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=N_,n):(r=yU(t,e,n.children,r),e.memoizedState=null,r):a?(n=mU(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=N_,n):(r=yU(t,e,n.children,r),e.memoizedState=null,r)}function gU(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=PD(e,i,0,null),r=ig(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r}function yU(t,e,r,n){var i=t.child;return t=i.sibling,r=cd(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 mU(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=cd(o,s),t!==null?n=cd(t,n):(n=ig(n,a,i,null),n.flags|=2),n.return=e,r.return=e,r.sibling=n,e.child=r,n}function vU(t,e){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),JJ(t.return,e)}function zI(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 bU(t,e,r){var n=e.pendingProps,i=n.revealOrder,a=n.tail;if(So(t,e,n.children,r),n=pi.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&&vU(t,r);else if(t.tag===19)vU(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(gi(pi,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&&Vx(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),zI(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&&Vx(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}zI(e,!0,r,null,a,e.lastEffect);break;case"together":zI(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function ml(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),ow|=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=cd(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=cd(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}return null}var hX,I6,pX,gX;hX=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}};I6=function(){};pX=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,yh(gu.current);var a=null;switch(r){case"input":i=e6(t,i),n=e6(t,n),a=[];break;case"option":i=n6(t,i),n=n6(t,n),a=[];break;case"select":i=ni({},i,{value:void 0}),n=ni({},n,{value:void 0}),a=[];break;case"textarea":i=i6(t,i),n=i6(t,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Lx)}s6(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"&&(Kb.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"&&(Kb.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Yn("scroll",t),a||s===c||(a=[])):typeof c=="object"&&c!==null&&c.$$typeof===K5?c.toString():(a=a||[]).push(u,c))}r&&(a=a||[]).push("style",r);var u=a;(e.updateQueue=u)&&(e.flags|=4)}};gX=function(t,e,r,n){r!==n&&(e.flags|=4)};function Mm(t,e){if(!yu)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 $ge(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 Do(e.type)&&Bx(),null;case 3:return ly(),Xn(No),Xn(za),yD(),n=e.stateNode,n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(C_(e)?e.flags|=4:n.hydrate||(e.flags|=256)),I6(e),null;case 5:gD(e);var i=yh(o1.current);if(r=e.type,t!==null&&e.stateNode!=null)pX(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=yh(gu.current),C_(e)){n=e.stateNode,r=e.type;var a=e.memoizedProps;switch(n[Ff]=e,n[Ux]=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<Qv.length;t++)Yn(Qv[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":b7(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)}s6(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]):Kb.hasOwnProperty(o)&&i!=null&&o==="onScroll"&&Yn("scroll",n));switch(r){case"input":S_(n),w7(n,a,!0);break;case"textarea":S_(n),E7(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Lx)}n=t,e.updateQueue=n,n!==null&&(e.flags|=4)}else{switch(o=i.nodeType===9?i:i.ownerDocument,t===a6.html&&(t=cJ(r)),t===a6.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[Ff]=e,t[Ux]=n,hX(t,e,!1,!1),e.stateNode=t,o=c6(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<Qv.length;i++)Yn(Qv[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":b7(t,n),i=e6(t,n),Yn("invalid",t);break;case"option":i=n6(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=i6(t,n),Yn("invalid",t);break;default:i=n}s6(r,i);var s=i;for(a in s)if(s.hasOwnProperty(a)){var c=s[a];a==="style"?fJ(t,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&uJ(t,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Yb(t,c):typeof c=="number"&&Yb(t,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Kb.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Yn("scroll",t):c!=null&&q5(t,a,c,o))}switch(r){case"input":S_(t),w7(t,n,!1);break;case"textarea":S_(t),E7(t);break;case"option":n.value!=null&&t.setAttribute("value",""+id(n.value));break;case"select":t.multiple=!!n.multiple,a=n.value,a!=null?Q0(t,!!n.multiple,a,!1):n.defaultValue!=null&&Q0(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=Lx)}qJ(r,n)&&(e.flags|=4)}e.ref!==null&&(e.flags|=128)}return null;case 6:if(t&&e.stateNode!=null)gX(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(bt(166));r=yh(o1.current),yh(gu.current),C_(e)?(n=e.stateNode,r=e.memoizedProps,n[Ff]=e,n.nodeValue!==r&&(e.flags|=4)):(n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Ff]=e,e.stateNode=n)}return null;case 13:return Xn(pi),n=e.memoizedState,e.flags&64?(e.lanes=r,e):(n=n!==null,r=!1,t===null?e.memoizedProps.fallback!==void 0&&C_(e):r=t.memoizedState!==null,n&&!r&&e.mode&2&&(t===null&&e.memoizedProps.unstable_avoidThisFallback!==!0||pi.current&1?ha===0&&(ha=3):((ha===0||ha===3)&&(ha=4),ao===null||!(ow&134217727)&&!(jy&134217727)||rg(ao,ja))),(n||r)&&(e.flags|=4),null);case 4:return ly(),I6(e),t===null&&BJ(e.stateNode.containerInfo),null;case 10:return hD(e),null;case 17:return Do(e.type)&&Bx(),null;case 19:if(Xn(pi),n=e.memoizedState,n===null)return null;if(a=(e.flags&64)!==0,o=n.rendering,o===null)if(a)Mm(n,!1);else{if(ha!==0||t!==null&&t.flags&64)for(t=e.child;t!==null;){if(o=Vx(t),o!==null){for(e.flags|=64,Mm(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 gi(pi,pi.current&1|2),e.child}t=t.sibling}n.tail!==null&&Fa()>D6&&(e.flags|=64,a=!0,Mm(n,!1),e.lanes=33554432)}else{if(!a)if(t=Vx(o),t!==null){if(e.flags|=64,a=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Mm(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!yu)return e=e.lastEffect=n.lastEffect,e!==null&&(e.nextEffect=null),null}else 2*Fa()-n.renderingStartTime>D6&&r!==1073741824&&(e.flags|=64,a=!0,Mm(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=Fa(),r.sibling=null,e=pi.current,gi(pi,a?e&1|2:e&1),r):null;case 23:case 24:return OD(),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 Mge(t){switch(t.tag){case 1:Do(t.type)&&Bx();var e=t.flags;return e&4096?(t.flags=e&-4097|64,t):null;case 3:if(ly(),Xn(No),Xn(za),yD(),e=t.flags,e&64)throw Error(bt(285));return t.flags=e&-4097|64,t;case 5:return gD(t),null;case 13:return Xn(pi),e=t.flags,e&4096?(t.flags=e&-4097|64,t):null;case 19:return Xn(pi),null;case 4:return ly(),null;case 10:return hD(t),null;case 23:case 24:return OD(),null;default:return null}}function ED(t,e){try{var r="",n=e;do r+=g0e(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 P6(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var kge=typeof WeakMap=="function"?WeakMap:Map;function yX(t,e,r){r=Qf(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Xx||(Xx=!0,$6=n),P6(t,e)},r}function mX(t,e,r){r=Qf(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return P6(t,e),n(i)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){typeof n!="function"&&(du===null?du=new Set([this]):du.add(this),P6(t,e));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}var Lge=typeof WeakSet=="function"?WeakSet:Set;function wU(t){var e=t.ref;if(e!==null)if(typeof e=="function")try{e(null)}catch(r){ed(t,r)}else e.current=null}function Uge(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:dc(e.type,r),n),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:e.flags&256&&uD(e.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(bt(163))}function Bge(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&&(OX(r,t),Wge(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:dc(r.type,e.memoizedProps),t.componentDidUpdate(n,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),e=r.updateQueue,e!==null&&tU(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}tU(r,e,t)}return;case 5:t=r.stateNode,e===null&&r.flags&4&&qJ(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&&_J(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=lJ("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 EU(t,e){if(Gh&&typeof Gh.onCommitFiberUnmount=="function")try{Gh.onCommitFiberUnmount(lD,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)OX(e,r);else{n=e;try{i()}catch(a){ed(n,a)}}r=r.next}while(r!==t)}break;case 1:if(wU(e),t=e.stateNode,typeof t.componentWillUnmount=="function")try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(a){ed(e,a)}break;case 5:wU(e);break;case 4:vX(t,e)}}function xU(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 AU(t){return t.tag===5||t.tag===3||t.tag===4}function SU(t){e:{for(var e=t.return;e!==null;){if(AU(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&&(Yb(e,""),r.flags&=-17);e:t:for(r=t;;){for(;r.sibling===null;){if(r.return===null||AU(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?T6(t,r,e):R6(t,r,e)}function T6(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=Lx));else if(n!==4&&(t=t.child,t!==null))for(T6(t,e,r),t=t.sibling;t!==null;)T6(t,e,r),t=t.sibling}function R6(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(R6(t,e,r),t=t.sibling;t!==null;)R6(t,e,r),t=t.sibling}function vX(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(EU(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(EU(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 VI(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[Ux]=n,t==="input"&&n.type==="radio"&&n.name!=null&&oJ(r,n),c6(t,i),e=c6(t,n),i=0;i<a.length;i+=2){var o=a[i],s=a[i+1];o==="style"?fJ(r,s):o==="dangerouslySetInnerHTML"?uJ(r,s):o==="children"?Yb(r,s):q5(r,o,s,e)}switch(t){case"input":t6(r,n);break;case"textarea":sJ(r,n);break;case"select":t=r._wrapperState.wasMultiple,r._wrapperState.wasMultiple=!!n.multiple,a=n.value,a!=null?Q0(r,!!n.multiple,a,!1):t!==!!n.multiple&&(n.defaultValue!=null?Q0(r,!!n.multiple,n.defaultValue,!0):Q0(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,_J(r.containerInfo));return;case 12:return;case 13:e.memoizedState!==null&&(SD=Fa(),_U(e.child,!0)),OU(e);return;case 19:OU(e);return;case 17:return;case 23:case 24:_U(e,e.memoizedState!==null);return}throw Error(bt(163))}function OU(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new Lge),e.forEach(function(n){var i=Qge.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Fge(t,e){return t!==null&&(t=t.memoizedState,t===null||t.dehydrated!==null)?(e=e.memoizedState,e!==null&&e.dehydrated===null):!1}var jge=Math.ceil,Jx=gp.ReactCurrentDispatcher,xD=gp.ReactCurrentOwner,Ir=0,ao=null,Fi=null,ja=0,rp=0,C6=hd(0),ha=0,_2=null,Fy=0,ow=0,jy=0,AD=0,N6=null,SD=0,D6=1/0;function qy(){D6=Fa()+500}var Ht=null,Xx=!1,$6=null,du=null,sd=!1,Ob=null,Jv=90,M6=[],k6=[],El=null,Ib=0,L6=null,jE=-1,pl=0,qE=0,Pb=null,HE=!1;function Zo(){return Ir&48?Fa():jE!==-1?jE:jE=Fa()}function Xf(t){if(t=t.mode,!(t&2))return 1;if(!(t&4))return uy()===99?1:2;if(pl===0&&(pl=Fy),Pge.transition!==0){qE!==0&&(qE=N6!==null?N6.pendingLanes:0),t=pl;var e=4186112&~qE;return e&=-e,e===0&&(t=4186112&~t,e=t&-t,e===0&&(e=8192)),e}return t=uy(),Ir&4&&t===98?t=Mx(12,pl):(t=C0e(t),t=Mx(t,pl)),t}function Zf(t,e,r){if(50<Ib)throw Ib=0,L6=null,Error(bt(185));if(t=E2(t,e),t===null)return null;p2(t,e,r),t===ao&&(jy|=e,ha===4&&rg(t,ja));var n=uy();e===1?Ir&8&&!(Ir&48)?U6(t):(js(t,r),Ir===0&&(qy(),Su())):(!(Ir&4)||n!==98&&n!==99||(El===null?El=new Set([t]):El.add(t)),js(t,r)),N6=t}function E2(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 js(t,e){for(var r=t.callbackNode,n=t.suspendedLanes,i=t.pingedLanes,a=t.expirationTimes,o=t.pendingLanes;0<o;){var s=31-ad(o),c=1<<s,u=a[s];if(u===-1){if(!(c&n)||c&i){u=e,b0(c);var f=jn;a[s]=10<=f?u+250:6<=f?u+5e3:-1}}else u<=e&&(t.expiredLanes|=c);o&=~c}if(n=Zb(t,t===ao?ja:0),e=jn,n===0)r!==null&&(r!==FI&&b6(r),t.callbackNode=null,t.callbackPriority=0);else{if(r!==null){if(t.callbackPriority===e)return;r!==FI&&b6(r)}e===15?(r=U6.bind(null,t),Zu===null?(Zu=[r],FE=fD(b2,QJ)):Zu.push(r),r=FI):e===14?r=n1(99,U6.bind(null,t)):(r=N0e(e),r=n1(r,bX.bind(null,t))),t.callbackPriority=e,t.callbackNode=r}}function bX(t){if(jE=-1,qE=pl=0,Ir&48)throw Error(bt(327));var e=t.callbackNode;if(pd()&&t.callbackNode!==e)return null;var r=Zb(t,t===ao?ja:0);if(r===0)return null;var n=r,i=Ir;Ir|=16;var a=xX();(ao!==t||ja!==n)&&(qy(),ng(t,n));do try{zge();break}catch(s){EX(t,s)}while(1);if(dD(),Jx.current=a,Ir=i,Fi!==null?n=0:(ao=null,ja=0,n=ha),Fy&jy)ng(t,0);else if(n!==0){if(n===2&&(Ir|=64,t.hydrate&&(t.hydrate=!1,uD(t.containerInfo)),r=PJ(t),r!==0&&(n=Xv(t,r))),n===1)throw e=_2,ng(t,0),rg(t,r),js(t,Fa()),e;switch(t.finishedWork=t.current.alternate,t.finishedLanes=r,n){case 0:case 1:throw Error(bt(345));case 2:ah(t);break;case 3:if(rg(t,r),(r&62914560)===r&&(n=SD+500-Fa(),10<n)){if(Zb(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Zo(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=W7(ah.bind(null,t),n);break}ah(t);break;case 4:if(rg(t,r),(r&4186112)===r)break;for(n=t.eventTimes,i=-1;0<r;){var o=31-ad(r);a=1<<o,o=n[o],o>i&&(i=o),r&=~a}if(r=i,r=Fa()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jge(r/1960))-r,10<r){t.timeoutHandle=W7(ah.bind(null,t),r);break}ah(t);break;case 5:ah(t);break;default:throw Error(bt(329))}}return js(t,Fa()),t.callbackNode===e?bX.bind(null,t):null}function rg(t,e){for(e&=~AD,e&=~jy,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-ad(e),n=1<<r;t[r]=-1,e&=~n}}function U6(t){if(Ir&48)throw Error(bt(327));if(pd(),t===ao&&t.expiredLanes&ja){var e=ja,r=Xv(t,e);Fy&jy&&(e=Zb(t,e),r=Xv(t,e))}else e=Zb(t,0),r=Xv(t,e);if(t.tag!==0&&r===2&&(Ir|=64,t.hydrate&&(t.hydrate=!1,uD(t.containerInfo)),e=PJ(t),e!==0&&(r=Xv(t,e))),r===1)throw r=_2,ng(t,0),rg(t,e),js(t,Fa()),r;return t.finishedWork=t.current.alternate,t.finishedLanes=e,ah(t),js(t,Fa()),null}function qge(){if(El!==null){var t=El;El=null,t.forEach(function(e){e.expiredLanes|=24&e.pendingLanes,js(e,Fa())})}Su()}function wX(t,e){var r=Ir;Ir|=1;try{return t(e)}finally{Ir=r,Ir===0&&(qy(),Su())}}function _X(t,e){var r=Ir;Ir&=-2,Ir|=8;try{return t(e)}finally{Ir=r,Ir===0&&(qy(),Su())}}function D_(t,e){gi(C6,rp),rp|=e,Fy|=e}function OD(){rp=C6.current,Xn(C6)}function ng(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,Ege(r)),Fi!==null)for(r=Fi.return;r!==null;){var n=r;switch(n.tag){case 1:n=n.type.childContextTypes,n!=null&&Bx();break;case 3:ly(),Xn(No),Xn(za),yD();break;case 5:gD(n);break;case 4:ly();break;case 13:Xn(pi);break;case 19:Xn(pi);break;case 10:hD(n);break;case 23:case 24:OD()}r=r.return}ao=t,Fi=cd(t.current,null),ja=rp=Fy=e,ha=0,_2=null,AD=jy=ow=0}function EX(t,e){do{var r=Fi;try{if(dD(),Ab.current=Qx,Gx){for(var n=Ai.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Gx=!1}if(s1=0,la=Da=Ai=null,Sb=!1,xD.current=null,r===null||r.return===null){ha=1,_2=e,Fi=null;break}e:{var a=t,o=r.return,s=r,c=e;if(e=ja,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=(pi.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=Qf(-1,1);b.tag=2,Jf(s,b)}s.lanes|=1;break e}c=void 0,s=e;var S=a.pingCache;if(S===null?(S=a.pingCache=new kge,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=Yge.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((Y0(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=ED(c,s),g=o;do{switch(g.tag){case 3:a=c,g.flags|=4096,e&=-e,g.lanes|=e;var O=yX(g,a,e);eU(g,O);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"&&(du===null||!du.has(p)))){g.flags|=4096,e&=-e,g.lanes|=e;var I=mX(g,a,e);eU(g,I);break e}}g=g.return}while(g!==null)}SX(r)}catch(C){e=C,Fi===r&&r!==null&&(Fi=r=r.return);continue}break}while(1)}function xX(){var t=Jx.current;return Jx.current=Qx,t===null?Qx:t}function Xv(t,e){var r=Ir;Ir|=16;var n=xX();ao===t&&ja===e||ng(t,e);do try{Hge();break}catch(i){EX(t,i)}while(1);if(dD(),Ir=r,Jx.current=n,Fi!==null)throw Error(bt(261));return ao=null,ja=0,ha}function Hge(){for(;Fi!==null;)AX(Fi)}function zge(){for(;Fi!==null&&!Sge();)AX(Fi)}function AX(t){var e=IX(t.alternate,t,rp);t.memoizedProps=t.pendingProps,e===null?SX(t):Fi=e,xD.current=null}function SX(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&2048){if(r=Mge(e),r!==null){r.flags&=2047,Fi=r;return}t!==null&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}else{if(r=$ge(r,e,rp),r!==null){Fi=r;return}if(r=e,r.tag!==24&&r.tag!==23||r.memoizedState===null||rp&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 ah(t){var e=uy();return tp(99,Vge.bind(null,t,e)),null}function Vge(t,e){do pd();while(Ob!==null);if(Ir&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-ad(a),u=1<<c;i[c]=0,o[c]=-1,s[c]=-1,a&=~u}if(El!==null&&!(n&24)&&El.has(t)&&El.delete(t),t===ao&&(Fi=ao=null,ja=0),1<r.flags?r.lastEffect!==null?(r.lastEffect.nextEffect=r,n=r.firstEffect):n=r:n=r.firstEffect,n!==null){if(i=Ir,Ir|=32,xD.current=null,LI=kE,o=F7(),p6(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;UI={focusedElem:o,selectionRange:s},kE=!1,Pb=null,HE=!1,Ht=n;do try{Gge()}catch(C){if(Ht===null)throw Error(bt(330));ed(Ht,C),Ht=Ht.nextEffect}while(Ht!==null);Pb=null,Ht=n;do try{for(o=t;Ht!==null;){var b=Ht.flags;if(b&16&&Yb(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:SU(Ht),Ht.flags&=-3;break;case 6:SU(Ht),Ht.flags&=-3,VI(Ht.alternate,Ht);break;case 1024:Ht.flags&=-1025;break;case 1028:Ht.flags&=-1025,VI(Ht.alternate,Ht);break;case 4:VI(Ht.alternate,Ht);break;case 8:s=Ht,vX(o,s);var O=s.alternate;xU(s),O!==null&&xU(O)}Ht=Ht.nextEffect}}catch(C){if(Ht===null)throw Error(bt(330));ed(Ht,C),Ht=Ht.nextEffect}while(Ht!==null);if(x=UI,S=F7(),b=x.focusedElem,o=x.selectionRange,S!==b&&b&&b.ownerDocument&&kJ(b.ownerDocument.documentElement,b)){for(o!==null&&p6(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,O=Math.min(o.start,s),o=o.end===void 0?O:Math.min(o.end,s),!x.extend&&O>o&&(s=o,o=O,O=s),s=B7(b,O),a=B7(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(),O>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}kE=!!LI,UI=LI=null,t.current=r,Ht=n;do try{for(b=t;Ht!==null;){var E=Ht.flags;if(E&36&&Bge(b,Ht.alternate,Ht),E&128){S=void 0;var p=Ht.ref;if(p!==null){var I=Ht.stateNode;switch(Ht.tag){case 5:S=I;break;default:S=I}typeof p=="function"?p(S):p.current=S}}Ht=Ht.nextEffect}}catch(C){if(Ht===null)throw Error(bt(330));ed(Ht,C),Ht=Ht.nextEffect}while(Ht!==null);Ht=null,Ige(),Ir=i}else t.current=r;if(sd)sd=!1,Ob=t,Jv=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&&(du=null),n===1?t===L6?Ib++:(Ib=0,L6=t):Ib=0,r=r.stateNode,Gh&&typeof Gh.onCommitFiberRoot=="function")try{Gh.onCommitFiberRoot(lD,r,void 0,(r.current.flags&64)===64)}catch{}if(js(t,Fa()),Xx)throw Xx=!1,t=$6,$6=null,t;return Ir&8||Su(),null}function Gge(){for(;Ht!==null;){var t=Ht.alternate;HE||Pb===null||(Ht.flags&8?S7(Ht,Pb)&&(HE=!0):Ht.tag===13&&Fge(t,Ht)&&S7(Ht,Pb)&&(HE=!0));var e=Ht.flags;e&256&&Uge(t,Ht),!(e&512)||sd||(sd=!0,n1(97,function(){return pd(),null})),Ht=Ht.nextEffect}}function pd(){if(Jv!==90){var t=97<Jv?97:Jv;return Jv=90,tp(t,Kge)}return!1}function Wge(t,e){M6.push(e,t),sd||(sd=!0,n1(97,function(){return pd(),null}))}function OX(t,e){k6.push(e,t),sd||(sd=!0,n1(97,function(){return pd(),null}))}function Kge(){if(Ob===null)return!1;var t=Ob;if(Ob=null,Ir&48)throw Error(bt(331));var e=Ir;Ir|=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));ed(a,c)}}for(r=M6,M6=[],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));ed(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 Ir=e,Su(),!0}function IU(t,e,r){e=ED(r,e),e=yX(t,e,1),Jf(t,e),e=Zo(),t=E2(t,1),t!==null&&(p2(t,1,e),js(t,e))}function ed(t,e){if(t.tag===3)IU(t,t,e);else for(var r=t.return;r!==null;){if(r.tag===3){IU(r,t,e);break}else if(r.tag===1){var n=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(du===null||!du.has(n))){t=ED(e,t);var i=mX(r,t,1);if(Jf(r,i),i=Zo(),r=E2(r,1),r!==null)p2(r,1,i),js(r,i);else if(typeof n.componentDidCatch=="function"&&(du===null||!du.has(n)))try{n.componentDidCatch(e,t)}catch{}break}}r=r.return}}function Yge(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=Zo(),t.pingedLanes|=t.suspendedLanes&r,ao===t&&(ja&r)===r&&(ha===4||ha===3&&(ja&62914560)===ja&&500>Fa()-SD?ng(t,0):AD|=r),js(t,e)}function Qge(t,e){var r=t.stateNode;r!==null&&r.delete(e),e=0,e===0&&(e=t.mode,e&2?e&4?(pl===0&&(pl=Fy),e=w0(62914560&~pl),e===0&&(e=4194304)):e=uy()===99?1:2:e=1),r=Zo(),t=E2(t,e),t!==null&&(p2(t,e,r),js(t,r))}var IX;IX=function(t,e,r){var n=e.lanes;if(t!==null)if(t.memoizedProps!==e.pendingProps||No.current)Sc=!0;else if(r&n)Sc=!!(t.flags&16384);else{switch(Sc=!1,e.tag){case 3:hU(e),qI();break;case 5:iU(e);break;case 1:Do(e.type)&&BE(e);break;case 4:E6(e,e.stateNode.containerInfo);break;case 10:n=e.memoizedProps.value;var i=e.type._context;gi(Fx,i._currentValue),i._currentValue=n;break;case 13:if(e.memoizedState!==null)return r&e.child.childLanes?pU(t,e,r):(gi(pi,pi.current&1),e=ml(t,e,r),e!==null?e.sibling:null);gi(pi,pi.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&64){if(n)return bU(t,e,r);e.flags|=64}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),gi(pi,pi.current),n)break;return null;case 23:case 24:return e.lanes=0,HI(t,e,r)}return ml(t,e,r)}else Sc=!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=cy(e,za.current),eg(e,r),i=vD(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,Do(n)){var a=!0;BE(e)}else a=!1;e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,pD(e);var o=n.getDerivedStateFromProps;typeof o=="function"&&Hx(e,n,o,t),i.updater=w2,e.stateNode=i,i._reactInternals=e,_6(e,n,t,r),e=O6(null,e,n,!0,a,r)}else e.tag=0,So(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=Xge(i),t=dc(i,t),a){case 0:e=S6(null,e,i,t,r);break e;case 1:e=dU(null,e,i,t,r);break e;case 11:e=lU(null,e,i,t,r);break e;case 14:e=fU(null,e,i,dc(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:dc(n,i),S6(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:dc(n,i),dU(t,e,n,i,r);case 3:if(hU(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,XJ(t,e),i1(e,n,null,r),n=e.memoizedState.element,n===i)qI(),e=ml(t,e,r);else{if(i=e.stateNode,(a=i.hydrate)&&(jf=Z0(e.stateNode.containerInfo.firstChild),yl=e,a=yu=!0),a){if(t=i.mutableSourceEagerHydrationData,t!=null)for(i=0;i<t.length;i+=2)a=t[i],a._workInProgressVersionPrimary=t[i+1],tg.push(a);for(r=rX(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|1024,r=r.sibling}else So(t,e,n,r),qI();e=e.child}return e;case 5:return iU(e),t===null&&x6(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,m6(n,i)?o=null:a!==null&&m6(n,a)&&(e.flags|=16),dX(t,e),So(t,e,o,r),e.child;case 6:return t===null&&x6(e),null;case 13:return pU(t,e,r);case 4:return E6(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=zx(e,null,n,r):So(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:dc(n,i),lU(t,e,n,i,r);case 7:return So(t,e,e.pendingProps,r),e.child;case 8:return So(t,e,e.pendingProps.children,r),e.child;case 12:return So(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(gi(Fx,s._currentValue),s._currentValue=a,o!==null)if(s=o.value,a=Ds(s,a)?0:(typeof n._calculateChangedBits=="function"?n._calculateChangedBits(s,a):1073741823)|0,a===0){if(o.children===i.children&&!No.current){e=ml(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=Qf(-1,r&-r),u.tag=2,Jf(s,u)),s.lanes|=r,u=s.alternate,u!==null&&(u.lanes|=r),JJ(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}So(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,a=e.pendingProps,n=a.children,eg(e,r),i=Fs(i,a.unstable_observedBits),n=n(i),e.flags|=1,So(t,e,n,r),e.child;case 14:return i=e.type,a=dc(i,e.pendingProps),a=dc(i.type,a),fU(t,e,i,a,n,r);case 15:return fX(t,e,e.type,e.pendingProps,n,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:dc(n,i),t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),e.tag=1,Do(n)?(t=!0,BE(e)):t=!1,eg(e,r),eX(e,n,i),_6(e,n,i,r),O6(null,e,n,!0,t,r);case 19:return bU(t,e,r);case 23:return HI(t,e,r);case 24:return HI(t,e,r)}throw Error(bt(156,e.tag))};function Jge(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 $s(t,e,r,n){return new Jge(t,e,r,n)}function ID(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Xge(t){if(typeof t=="function")return ID(t)?1:0;if(t!=null){if(t=t.$$typeof,t===f2)return 11;if(t===d2)return 14}return 2}function cd(t,e){var r=t.alternate;return r===null?(r=$s(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 zE(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")ID(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case xf:return ig(r.children,i,a,e);case nJ:o=8,i|=16;break;case H5:o=8,i|=1;break;case mb:return t=$s(12,r,e,i|8),t.elementType=mb,t.type=mb,t.lanes=a,t;case vb:return t=$s(13,r,e,i),t.type=vb,t.elementType=vb,t.lanes=a,t;case Cx:return t=$s(19,r,e,i),t.elementType=Cx,t.lanes=a,t;case Y5:return PD(r,i,a,e);case ZN:return t=$s(24,r,e,i),t.elementType=ZN,t.lanes=a,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case z5:o=10;break e;case V5:o=9;break e;case f2:o=11;break e;case d2:o=14;break e;case G5:o=16,n=null;break e;case W5:o=22;break e}throw Error(bt(130,t==null?t:typeof t,""))}return e=$s(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function ig(t,e,r,n){return t=$s(7,t,n,e),t.lanes=r,t}function PD(t,e,r,n){return t=$s(23,t,n,e),t.elementType=Y5,t.lanes=r,t}function GI(t,e,r){return t=$s(6,t,null,e),t.lanes=r,t}function WI(t,e,r){return e=$s(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Zge(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=RI(0),this.expirationTimes=RI(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=RI(0),this.mutableSourceEagerHydrationData=null}function eye(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:hh,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function Zx(t,e,r,n){var i=e.current,a=Zo(),o=Xf(i);e:if(r){r=r._reactInternals;t:{if(yp(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(Do(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(Do(c)){r=zJ(r,c,s);break e}}r=s}else r=od;return e.context===null?e.context=r:e.pendingContext=r,e=Qf(a,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),Jf(i,e),Zf(i,o,a),o}function KI(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 PU(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function TD(t,e){PU(t,e),(t=t.alternate)&&PU(t,e)}function tye(){return null}function RD(t,e,r){var n=r!=null&&r.hydrationOptions!=null&&r.hydrationOptions.mutableSources||null;if(r=new Zge(t,e,r!=null&&r.hydrate===!0),e=$s(3,null,null,e===2?7:e===1?3:0),r.current=e,e.stateNode=r,pD(e),t[By]=r.current,BJ(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}RD.prototype.render=function(t){Zx(t,this._internalRoot,null,null)};RD.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;Zx(null,t,null,function(){e[By]=null})};function sw(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function rye(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 RD(t,0,e?{hydrate:!0}:void 0)}function x2(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=KI(o);s.call(u)}}Zx(e,o,t,i)}else{if(a=r._reactRootContainer=rye(r,n),o=a._internalRoot,typeof i=="function"){var c=i;i=function(){var u=KI(o);c.call(u)}}_X(function(){Zx(e,o,t,i)})}return KI(o)}vJ=function(t){if(t.tag===13){var e=Zo();Zf(t,4,e),TD(t,4)}};eD=function(t){if(t.tag===13){var e=Zo();Zf(t,67108864,e),TD(t,67108864)}};bJ=function(t){if(t.tag===13){var e=Zo(),r=Xf(t);Zf(t,r,e),TD(t,r)}};wJ=function(t,e){return e()};u6=function(t,e,r){switch(e){case"input":if(t6(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=v2(n);if(!i)throw Error(bt(90));aJ(n),t6(n,i)}}}break;case"textarea":sJ(t,r);break;case"select":e=r.value,e!=null&&Q0(t,!!r.multiple,e,!1)}};J5=wX;pJ=function(t,e,r,n,i){var a=Ir;Ir|=4;try{return tp(98,t.bind(null,e,r,n,i))}finally{Ir=a,Ir===0&&(qy(),Su())}};X5=function(){!(Ir&49)&&(qge(),pd())};gJ=function(t,e){var r=Ir;Ir|=2;try{return t(e)}finally{Ir=r,Ir===0&&(qy(),Su())}};function PX(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sw(e))throw Error(bt(200));return eye(t,e,null,r)}var nye={Events:[iw,M0,v2,dJ,hJ,pd,{current:!1}]},km={findFiberByHostInstance:gh,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},iye={bundleType:km.bundleType,version:km.version,rendererPackageName:km.rendererPackageName,rendererConfig:km.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:gp.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=mJ(t),t===null?null:t.stateNode},findFiberByHostInstance:km.findFiberByHostInstance||tye,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $_=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$_.isDisabled&&$_.supportsFiber)try{lD=$_.inject(iye),Gh=$_}catch{}}Gs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nye;Gs.createPortal=PX;Gs.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=mJ(e),t=t===null?null:t.stateNode,t};Gs.flushSync=function(t,e){var r=Ir;if(r&48)return t(e);Ir|=1;try{if(t)return tp(99,t.bind(null,e))}finally{Ir=r,Su()}};Gs.hydrate=function(t,e,r){if(!sw(e))throw Error(bt(200));return x2(null,t,e,!0,r)};Gs.render=function(t,e,r){if(!sw(e))throw Error(bt(200));return x2(null,t,e,!1,r)};Gs.unmountComponentAtNode=function(t){if(!sw(t))throw Error(bt(40));return t._reactRootContainer?(_X(function(){x2(null,null,t,!1,function(){t._reactRootContainer=null,t[By]=null})}),!0):!1};Gs.unstable_batchedUpdates=wX;Gs.unstable_createPortal=function(t,e){return PX(t,e,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Gs.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!sw(r))throw Error(bt(200));if(t==null||t._reactInternals===void 0)throw Error(bt(38));return x2(t,e,r,!1,n)};Gs.version="17.0.2";function TX(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(TX)}catch(t){console.error(t)}}TX(),ZQ.exports=Gs;var c1=ZQ.exports;const aye=Nc(c1);/**
|
|
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 u1(){return u1=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},u1.apply(this,arguments)}var qf;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(qf||(qf={}));const TU="popstate";function oye(t){t===void 0&&(t={});function e(n,i){let{pathname:a,search:o,hash:s}=n.location;return B6("",{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:RX(i)}return cye(e,r,null,t)}function ji(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function CD(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function sye(){return Math.random().toString(36).substr(2,8)}function RU(t,e){return{usr:t.state,key:t.key,idx:e}}function B6(t,e,r,n){return r===void 0&&(r=null),u1({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Hy(e):e,{state:r,key:e&&e.key||n||sye()})}function RX(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 Hy(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 cye(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=qf.Pop,c=null,u=f();u==null&&(u=0,o.replaceState(u1({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function d(){s=qf.Pop;let y=f(),_=y==null?null:y-u;u=y,c&&c({action:s,location:v.location,delta:_})}function g(y,_){s=qf.Push;let b=B6(v.location,y,_);r&&r(b,y),u=f()+1;let S=RU(b,u),x=v.createHref(b);try{o.pushState(S,"",x)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(x)}a&&c&&c({action:s,location:v.location,delta:1})}function m(y,_){s=qf.Replace;let b=B6(v.location,y,_);r&&r(b,y),u=f();let S=RU(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:RX(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(TU,d),c=y,()=>{i.removeEventListener(TU,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 CU;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(CU||(CU={}));function uye(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?Hy(e):e,i=DX(n.pathname||"/",r);if(i==null)return null;let a=CX(t);lye(a);let o=null;for(let s=0;o==null&&s<a.length;++s)o=bye(a[s],Eye(i));return o}function CX(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=Wh([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+'".')),CX(a.children,e,f,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:mye(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 NX(a.path))i(a,o,c)}),e}function NX(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=NX(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 lye(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:vye(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const fye=/^:\w+$/,dye=3,hye=2,pye=1,gye=10,yye=-2,NU=t=>t==="*";function mye(t,e){let r=t.split("/"),n=r.length;return r.some(NU)&&(n+=yye),e&&(n+=hye),r.filter(i=>!NU(i)).reduce((i,a)=>i+(fye.test(a)?dye:a===""?pye:gye),n)}function vye(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 bye(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=wye({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:Wh([i,f.pathname]),pathnameBase:Pye(Wh([i,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(i=Wh([i,f.pathnameBase]))}return a}function wye(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=_ye(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]=xye(s[d]||"",f),u},{}),pathname:a,pathnameBase:o,pattern:t}}function _ye(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),CD(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 Eye(t){try{return decodeURI(t)}catch(e){return CD(!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 xye(t,e){try{return decodeURIComponent(t)}catch(r){return CD(!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 DX(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 Aye(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Hy(t):t;return{pathname:r?r.startsWith("/")?r:Sye(r,e):e,search:Tye(n),hash:Rye(i)}}function Sye(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 YI(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 Oye(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Iye(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Hy(t):(i=u1({},t),ji(!i.pathname||!i.pathname.includes("?"),YI("?","pathname","search",i)),ji(!i.pathname||!i.pathname.includes("#"),YI("#","pathname","hash",i)),ji(!i.search||!i.search.includes("#"),YI("#","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=Aye(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const Wh=t=>t.join("/").replace(/\/\/+/g,"/"),Pye=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Tye=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Rye=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Cye(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const $X=["post","put","patch","delete"];new Set($X);const Nye=["get",...$X];new Set(Nye);/**
|
|
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 eA(){return eA=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},eA.apply(this,arguments)}const ND=Ge.createContext(null),Dye=Ge.createContext(null),A2=Ge.createContext(null),S2=Ge.createContext(null),vp=Ge.createContext({outlet:null,matches:[],isDataRoute:!1}),MX=Ge.createContext(null);function O2(){return Ge.useContext(S2)!=null}function cw(){return O2()||ji(!1),Ge.useContext(S2).location}function kX(t){Ge.useContext(A2).static||Ge.useLayoutEffect(t)}function I2(){let{isDataRoute:t}=Ge.useContext(vp);return t?Wye():$ye()}function $ye(){O2()||ji(!1);let t=Ge.useContext(ND),{basename:e,navigator:r}=Ge.useContext(A2),{matches:n}=Ge.useContext(vp),{pathname:i}=cw(),a=JSON.stringify(Oye(n).map(c=>c.pathnameBase)),o=Ge.useRef(!1);return kX(()=>{o.current=!0}),Ge.useCallback(function(c,u){if(u===void 0&&(u={}),!o.current)return;if(typeof c=="number"){r.go(c);return}let f=Iye(c,JSON.parse(a),i,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Wh([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,a,i,t])}function Mye(){let{matches:t}=Ge.useContext(vp),e=t[t.length-1];return e?e.params:{}}function kye(t,e){return Lye(t,e)}function Lye(t,e,r){O2()||ji(!1);let{navigator:n}=Ge.useContext(A2),{matches:i}=Ge.useContext(vp),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let c=cw(),u;if(e){var f;let v=typeof e=="string"?Hy(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=uye(t,{pathname:g}),w=qye(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},o,v.params),pathname:Wh([s,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:Wh([s,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,r);return e&&w?Ge.createElement(S2.Provider,{value:{location:eA({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:qf.Pop}},w):w}function Uye(){let t=Gye(),e=Cye(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 Ge.createElement(Ge.Fragment,null,Ge.createElement("h2",null,"Unexpected Application Error!"),Ge.createElement("h3",{style:{fontStyle:"italic"}},e),r?Ge.createElement("pre",{style:i},r):null,a)}const Bye=Ge.createElement(Uye,null);class Fye extends Ge.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?Ge.createElement(vp.Provider,{value:this.props.routeContext},Ge.createElement(MX.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function jye(t){let{routeContext:e,match:r,children:n}=t,i=Ge.useContext(ND);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),Ge.createElement(vp.Provider,{value:e},n)}function qye(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||Bye);let g=e.concat(a.slice(0,u+1)),m=()=>{let w;return f?w=d:c.route.Component?w=Ge.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=s,Ge.createElement(jye,{match:c,routeContext:{outlet:s,matches:g,isDataRoute:r!=null},children:w})};return r&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?Ge.createElement(Fye,{location:r.location,revalidation:r.revalidation,component:d,error:f,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var LX=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(LX||{}),tA=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}(tA||{});function Hye(t){let e=Ge.useContext(ND);return e||ji(!1),e}function zye(t){let e=Ge.useContext(Dye);return e||ji(!1),e}function Vye(t){let e=Ge.useContext(vp);return e||ji(!1),e}function UX(t){let e=Vye(),r=e.matches[e.matches.length-1];return r.route.id||ji(!1),r.route.id}function Gye(){var t;let e=Ge.useContext(MX),r=zye(tA.UseRouteError),n=UX(tA.UseRouteError);return e||((t=r.errors)==null?void 0:t[n])}function Wye(){let{router:t}=Hye(LX.UseNavigateStable),e=UX(tA.UseNavigateStable),r=Ge.useRef(!1);return kX(()=>{r.current=!0}),Ge.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,eA({fromRouteId:e},a)))},[t,e])}function Zv(t){ji(!1)}function Kye(t){let{basename:e="/",children:r=null,location:n,navigationType:i=qf.Pop,navigator:a,static:o=!1}=t;O2()&&ji(!1);let s=e.replace(/^\/*/,"/"),c=Ge.useMemo(()=>({basename:s,navigator:a,static:o}),[s,a,o]);typeof n=="string"&&(n=Hy(n));let{pathname:u="/",search:f="",hash:d="",state:g=null,key:m="default"}=n,w=Ge.useMemo(()=>{let v=DX(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:Ge.createElement(A2.Provider,{value:c},Ge.createElement(S2.Provider,{children:r,value:w}))}function Yye(t){let{children:e,location:r}=t;return kye(F6(e),r)}new Promise(()=>{});function F6(t,e){e===void 0&&(e=[]);let r=[];return Ge.Children.forEach(t,(n,i)=>{if(!Ge.isValidElement(n))return;let a=[...e,i];if(n.type===Ge.Fragment){r.push.apply(r,F6(n.props.children,a));return}n.type!==Zv&&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=F6(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 j6(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 Qye(t,e){let r=j6(t);return e&&e.forEach((n,i)=>{r.has(i)||e.getAll(i).forEach(a=>{r.append(i,a)})}),r}const Jye="startTransition",DU=a0e[Jye];function Xye(t){let{basename:e,children:r,future:n,window:i}=t,a=Ge.useRef();a.current==null&&(a.current=oye({window:i,v5Compat:!0}));let o=a.current,[s,c]=Ge.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},f=Ge.useCallback(d=>{u&&DU?DU(()=>c(d)):c(d)},[c,u]);return Ge.useLayoutEffect(()=>o.listen(f),[o,f]),Ge.createElement(Kye,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o})}var $U;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})($U||($U={}));var MU;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(MU||(MU={}));function Zye(t){let e=Ge.useRef(j6(t)),r=Ge.useRef(!1),n=cw(),i=Ge.useMemo(()=>Qye(n.search,r.current?null:e.current),[n.search]),a=I2(),o=Ge.useCallback((s,c)=>{const u=j6(typeof s=="function"?s(i):s);r.current=!0,a("?"+u,c)},[a,i]);return[i,o]}const BX="6.8.0";function eme(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&&eme(i,a,n),Object.defineProperty(t,n,{enumerable:!0,value:i,writable:!1})}}function U0(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(U0).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 U0(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=>`${U0(r)}: ${U0(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function ks(t,e){return t&&t.code===e}function DD(t){return ks(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: ${U0(r)}`);for(const o in r){if(o==="shortMessage")continue;const s=r[o];a.push(o+"="+U0(s))}}a.push(`code=${e}`),a.push(`version=${BX}`),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 FX(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 tme=["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 jX(t){ct(tme.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function bp(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 qX(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 qX(t,e,!1)}function Ba(t,e){return qX(t,e,!0)}function fi(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 HX(t){return fi(t,!0)||t instanceof Uint8Array}const kU="0123456789abcdef";function xt(t){const e=Gt(t);let r="0x";for(let n=0;n<e.length;n++){const i=e[n];r+=kU[(i&240)>>4]+kU[i&15]}return r}function Gn(t){return"0x"+t.map(e=>xt(e).substring(2)).join("")}function ag(t){return fi(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 zX(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 np(t,e){return zX(t,e,!0)}function rme(t,e){return zX(t,e,!1)}const P2=BigInt(0),Ec=BigInt(1),B0=9007199254740991;function nme(t,e){const r=T2(t,"value"),n=BigInt(Gr(e,"width"));if(ct(r>>n===P2,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Ec){const i=(Ec<<n)-Ec;return-((~r&i)+Ec)}return r}function VX(t,e){let r=or(t,"value");const n=BigInt(Gr(e,"width")),i=Ec<<n-Ec;if(r<P2){r=-r,ct(r<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});const a=(Ec<<n)-Ec;return(~r&a)+Ec}else ct(r<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});return r}function eb(t,e){const r=T2(t,"value"),n=BigInt(Gr(e,"bits"));return r&(Ec<<n)-Ec}function or(t,e){switch(typeof t){case"bigint":return t;case"number":return $e(Number.isInteger(t),"underflow",e||"value",t),$e(t>=-B0&&t<=B0,"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 T2(t,e){const r=or(t,e);return ct(r>=P2,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const LU="0123456789abcdef";function R2(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=LU[r>>4],e+=LU[r&15];return BigInt(e)}return or(t)}function Gr(t,e){switch(typeof t){case"bigint":return $e(t>=-B0&&t<=B0,"overflow",e||"value",t),Number(t);case"number":return $e(Number.isInteger(t),"underflow",e||"value",t),$e(t>=-B0&&t<=B0,"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 ime(t){return Gr(R2(t))}function Cl(t,e){let n=T2(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 Ro(t){const e=T2(t,"value");if(e===P2)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 F0(t){let e=xt(HX(t)?t:Ro(t)).substring(2);for(;e.startsWith("0");)e=e.substring(1);return e===""&&(e="0"),"0x"+e}const q6="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let M_=null;function ame(t){if(M_==null){M_={};for(let r=0;r<q6.length;r++)M_[q6[r]]=BigInt(r)}const e=M_[t];return $e(e!=null,"invalid base58 value","letter",t),e}const ome=BigInt(0),H6=BigInt(58);function GX(t){let e=R2(Gt(t)),r="";for(;e;)r=q6[Number(e%H6)]+r,e/=H6;return r}function sme(t){let e=ome;for(let r=0;r<t.length;r++)e*=H6,e+=ame(t[r]);return e}function cme(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 ume(t){const e=Gt(t);let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}var bg;class WX{constructor(e,r,n){je(this,"filter");je(this,"emitter");Ze(this,bg,void 0);Te(this,bg,r),Zt(this,{emitter:e,filter:n})}async removeListener(){Y(this,bg)!=null&&await this.emitter.off(this.filter,Y(this,bg))}}bg=new WeakMap;function lme(t,e,r,n,i){$e(!1,`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function KX(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 fme(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),KX(t,e,r))}const dme=Object.freeze({error:lme,ignore:KX,replace:fme});function hme(t,e){e==null&&(e=dme.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 oo(t,e){e!=null&&(jX(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 pme(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function $D(t,e){return pme(hme(t,e))}function YX(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 gme=12,yme=250;let UU=YX();const mme=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),vme=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let QI=!1;async function QX(t,e){try{const r=t.match(mme);if(!r)throw new Error("invalid data");return new td(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?cme(r[3]):wme(r[3]))}catch{return new td(599,"BAD REQUEST (invalid data: URI)",{},null,new ud(t))}}function JX(t){async function e(r,n){try{const i=r.match(vme);if(!i)throw new Error("invalid link");return new ud(`${t}${i[2]}`)}catch{return new td(599,"BAD REQUEST (invalid IPFS URI)",{},null,new ud(r))}}return e}const k_={data:QX,ipfs:JX("https://gateway.ipfs.io/ipfs/")},XX=new WeakMap;var Sh,Af;class bme{constructor(e){Ze(this,Sh,void 0);Ze(this,Af,void 0);Te(this,Sh,[]),Te(this,Af,!1),XX.set(e,()=>{if(!Y(this,Af)){Te(this,Af,!0);for(const r of Y(this,Sh))setTimeout(()=>{r()},0);Te(this,Sh,[])}})}addListener(e){ct(!Y(this,Af),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),Y(this,Sh).push(e)}get cancelled(){return Y(this,Af)}checkSignal(){ct(!this.cancelled,"cancelled","CANCELLED",{})}}Sh=new WeakMap,Af=new WeakMap;function L_(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var wg,_g,gc,tl,Eg,xg,Ki,Wo,rl,Oh,Ih,Ph,Jc,nl,Sf,Th,tb;const r2=class r2{constructor(e){Ze(this,Th);Ze(this,wg,void 0);Ze(this,_g,void 0);Ze(this,gc,void 0);Ze(this,tl,void 0);Ze(this,Eg,void 0);Ze(this,xg,void 0);Ze(this,Ki,void 0);Ze(this,Wo,void 0);Ze(this,rl,void 0);Ze(this,Oh,void 0);Ze(this,Ih,void 0);Ze(this,Ph,void 0);Ze(this,Jc,void 0);Ze(this,nl,void 0);Ze(this,Sf,void 0);Te(this,xg,String(e)),Te(this,wg,!1),Te(this,_g,!0),Te(this,gc,{}),Te(this,tl,""),Te(this,Eg,3e5),Te(this,nl,{slotInterval:yme,maxAttempts:gme}),Te(this,Sf,null)}get url(){return Y(this,xg)}set url(e){Te(this,xg,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,Wo,void 0);else if(typeof e=="string")Te(this,Ki,oo(e)),Te(this,Wo,"text/plain");else if(e instanceof Uint8Array)Te(this,Ki,e),Te(this,Wo,"application/octet-stream");else if(typeof e=="object")Te(this,Ki,oo(JSON.stringify(e))),Te(this,Wo,"application/json");else throw new Error("invalid body")}hasBody(){return Y(this,Ki)!=null}get method(){return Y(this,tl)?Y(this,tl):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),Te(this,tl,String(e).toUpperCase())}get headers(){const e=Object.assign({},Y(this,gc));return Y(this,rl)&&(e.authorization=`Basic ${ume(oo(Y(this,rl)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&Y(this,Wo)&&(e["content-type"]=Y(this,Wo)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){Y(this,gc)[String(e).toLowerCase()]=String(r)}clearHeaders(){Te(this,gc,{})}[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,rl)||null}setCredentials(e,r){$e(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),Te(this,rl,`${e}:${r}`)}get allowGzip(){return Y(this,_g)}set allowGzip(e){Te(this,_g,!!e)}get allowInsecureAuthentication(){return!!Y(this,wg)}set allowInsecureAuthentication(e){Te(this,wg,!!e)}get timeout(){return Y(this,Eg)}set timeout(e){$e(e>=0,"timeout must be non-zero","timeout",e),Te(this,Eg,e)}get preflightFunc(){return Y(this,Oh)||null}set preflightFunc(e){Te(this,Oh,e)}get processFunc(){return Y(this,Ih)||null}set processFunc(e){Te(this,Ih,e)}get retryFunc(){return Y(this,Ph)||null}set retryFunc(e){Te(this,Ph,e)}get getUrlFunc(){return Y(this,Sf)||UU}set getUrlFunc(e){Te(this,Sf,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,nl).slotInterval=e.slotInterval),e.maxAttempts!=null&&(Y(this,nl).maxAttempts=e.maxAttempts)}send(){return ct(Y(this,Jc)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),Te(this,Jc,new bme(this)),Et(this,Th,tb).call(this,0,BU()+this.timeout,0,this,new td(0,"",{},null,this))}cancel(){ct(Y(this,Jc)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=XX.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 r2(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,Te(i,gc,Object.assign({},Y(this,gc))),Y(this,Ki)&&Te(i,Ki,new Uint8Array(Y(this,Ki))),Te(i,Wo,Y(this,Wo)),i}clone(){const e=new r2(this.url);return Te(e,tl,Y(this,tl)),Y(this,Ki)&&Te(e,Ki,Y(this,Ki)),Te(e,Wo,Y(this,Wo)),Te(e,gc,Object.assign({},Y(this,gc))),Te(e,rl,Y(this,rl)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),Te(e,Oh,Y(this,Oh)),Te(e,Ih,Y(this,Ih)),Te(e,Ph,Y(this,Ph)),Te(e,Sf,Y(this,Sf)),e}static lockConfig(){QI=!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(QI)throw new Error("gateways locked");k_[e]=r}static registerGetUrl(e){if(QI)throw new Error("gateways locked");UU=e}static createGetUrlFunc(e){return YX()}static createDataGateway(){return QX}static createIpfsGatewayFunc(e){return JX(e)}};wg=new WeakMap,_g=new WeakMap,gc=new WeakMap,tl=new WeakMap,Eg=new WeakMap,xg=new WeakMap,Ki=new WeakMap,Wo=new WeakMap,rl=new WeakMap,Oh=new WeakMap,Ih=new WeakMap,Ph=new WeakMap,Jc=new WeakMap,nl=new WeakMap,Sf=new WeakMap,Th=new WeakSet,tb=async function(e,r,n,i,a){var f,d,g;if(e>=Y(this,nl).maxAttempts)return a.makeServerError("exceeded maximum retry limit");ct(BU()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await _me(n);let o=this.clone();const s=(o.url.split(":")[0]||"").toLowerCase();if(s in k_){const m=await k_[s](o.url,L_(Y(i,Jc)));if(m instanceof td){let w=m;if(this.processFunc){L_(Y(i,Jc));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,L_(Y(i,Jc)));let u=new td(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),Th,tb).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,nl).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(),Th,tb).call(d,e+1,r,w,i,u)}if(this.processFunc){L_(Y(i,Jc));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,nl).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return m.stall>=0&&(w=m.stall),Et(g=o.clone(),Th,tb).call(g,e+1,r,w,i,u)}}return u};let ud=r2;var $1,M1,k1,yc,Ag,Rh;const mL=class mL{constructor(e,r,n,i,a){Ze(this,$1,void 0);Ze(this,M1,void 0);Ze(this,k1,void 0);Ze(this,yc,void 0);Ze(this,Ag,void 0);Ze(this,Rh,void 0);Te(this,$1,e),Te(this,M1,r),Te(this,k1,Object.keys(n).reduce((o,s)=>(o[s.toLowerCase()]=String(n[s]),o),{})),Te(this,yc,i==null?null:new Uint8Array(i)),Te(this,Ag,a||null),Te(this,Rh,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${Y(this,yc)?xt(Y(this,yc)):"null"}>`}get statusCode(){return Y(this,$1)}get statusMessage(){return Y(this,M1)}get headers(){return Object.assign({},Y(this,k1))}get body(){return Y(this,yc)==null?null:new Uint8Array(Y(this,yc))}get bodyText(){try{return Y(this,yc)==null?"":$D(Y(this,yc))}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 mL(599,n,this.headers,this.body,Y(this,Ag)||void 0);return Te(i,Rh,{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,yc)!=null}get request(){return Y(this,Ag)}ok(){return Y(this,Rh).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=Y(this,Rh);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`),ct(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r})}};$1=new WeakMap,M1=new WeakMap,k1=new WeakMap,yc=new WeakMap,Ag=new WeakMap,Rh=new WeakMap;let td=mL;function BU(){return new Date().getTime()}function wme(t){return oo(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function _me(t){return new Promise(e=>setTimeout(e,t))}function Eme(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function FU(t,e,r){let n=0;for(let i=0;i<r;i++)n=n*256+t[e+i];return n}function jU(t,e,r,n){const i=[];for(;r<e+1+n;){const a=ZX(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 ZX(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=FU(t,e+1,n);return r(e+1+n+i),jU(t,e,e+1+n,n+i)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),jU(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const i=FU(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:Eme(t[e])}}function MD(t){const e=Gt(t,"data"),r=ZX(e,0);return $e(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function qU(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function eZ(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(a){n=n.concat(eZ(a))}),n.length<=55)return n.unshift(192+n.length),n;const i=qU(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=qU(e.length);return r.unshift(183+r.length),r.concat(e)}const HU="0123456789abcdef";function l1(t){let e="0x";for(const r of eZ(t))e+=HU[r>>4],e+=HU[r&15];return e}function xme(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 no=32,z6=new Uint8Array(no),Ame=["then"],U_={};function Lm(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}var Of;const Gb=class Gb extends Array{constructor(...r){const n=r[0];let i=r[1],a=(r[2]||[]).slice(),o=!0;n!==U_&&(i=r,a=[],o=!1);super(i.length);Ze(this,Of,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,Of,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&&Lm(`index ${g}`,m),m}if(Ame.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&&Lm(`index ${i}`,n),r.push(n)}),r}toObject(){return Y(this,Of).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,Of)[o]);return new Gb(U_,i,a)}filter(r,n){const i=[],a=[];for(let o=0;o<this.length;o++){const s=this[o];s instanceof Error&&Lm(`index ${o}`,s),r.call(n,s,o,this)&&(i.push(s),a.push(Y(this,Of)[o]))}return new Gb(U_,i,a)}map(r,n){const i=[];for(let a=0;a<this.length;a++){const o=this[a];o instanceof Error&&Lm(`index ${a}`,o),i.push(r.call(n,o,a,this))}return i}getValue(r){const n=Y(this,Of).indexOf(r);if(n===-1)return;const i=this[n];return i instanceof Error&&Lm(`property ${JSON.stringify(r)}`,i.error),i}static fromItems(r,n){return new Gb(U_,r,n)}};Of=new WeakMap;let rA=Gb;function zU(t){let e=Ro(t);return ct(e.length<=no,"value out-of-bounds","BUFFER_OVERRUN",{buffer:e,length:no,offset:e.length}),e.length!==no&&(e=Ba(Gn([z6.slice(e.length%no),e]))),e}class Ul{constructor(e,r,n,i){je(this,"name");je(this,"type");je(this,"localName");je(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 il,Ch,Sg,VE;class V6{constructor(){Ze(this,Sg);Ze(this,il,void 0);Ze(this,Ch,void 0);Te(this,il,[]),Te(this,Ch,0)}get data(){return Gn(Y(this,il))}get length(){return Y(this,Ch)}appendWriter(e){return Et(this,Sg,VE).call(this,Ba(e.data))}writeBytes(e){let r=Ba(e);const n=r.length%no;return n&&(r=Ba(Gn([r,z6.slice(n)]))),Et(this,Sg,VE).call(this,r)}writeValue(e){return Et(this,Sg,VE).call(this,zU(e))}writeUpdatableValue(){const e=Y(this,il).length;return Y(this,il).push(z6),Te(this,Ch,Y(this,Ch)+no),r=>{Y(this,il)[e]=zU(r)}}}il=new WeakMap,Ch=new WeakMap,Sg=new WeakSet,VE=function(e){return Y(this,il).push(e),Te(this,Ch,Y(this,Ch)+e.length),e.length};var Ko,Os,n2,tZ;const vL=class vL{constructor(e,r){Ze(this,n2);je(this,"allowLoose");Ze(this,Ko,void 0);Ze(this,Os,void 0);Zt(this,{allowLoose:!!r}),Te(this,Ko,Ba(e)),Te(this,Os,0)}get data(){return xt(Y(this,Ko))}get dataLength(){return Y(this,Ko).length}get consumed(){return Y(this,Os)}get bytes(){return new Uint8Array(Y(this,Ko))}subReader(e){return new vL(Y(this,Ko).slice(Y(this,Os)+e),this.allowLoose)}readBytes(e,r){let n=Et(this,n2,tZ).call(this,0,e,!!r);return Te(this,Os,Y(this,Os)+n.length),n.slice(0,e)}readValue(){return R2(this.readBytes(no))}readIndex(){return ime(this.readBytes(no))}};Ko=new WeakMap,Os=new WeakMap,n2=new WeakSet,tZ=function(e,r,n){let i=Math.ceil(r/no)*no;return Y(this,Os)+i>Y(this,Ko).length&&(this.allowLoose&&n&&Y(this,Os)+r<=Y(this,Ko).length?i=r:ct(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Ba(Y(this,Ko)),length:Y(this,Ko).length,offset:Y(this,Os)+i})),Y(this,Ko).slice(Y(this,Os),Y(this,Os)+i)};let G6=vL;const bn=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{};function Qo(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function kD(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 rZ(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Qo(t.outputLen),Qo(t.blockLen)}function fy(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 nZ(t,e){kD(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const JI=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const iZ=t=>t instanceof Uint8Array,GE=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),WE=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),qc=(t,e)=>t<<32-e|t>>>e,Sme=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Sme)throw new Error("Non little-endian hardware is not supported");const Ome=async()=>{};async function VU(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 Ome(),n+=a)}}function Ime(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function dy(t){if(typeof t=="string"&&(t=Ime(t)),!iZ(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function Pme(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!iZ(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class LD{clone(){return this._cloneInto()}}const Tme={}.toString;function aZ(t,e){if(e!==void 0&&Tme.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function C2(t){const e=n=>t().update(dy(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Rme(t=32){if(JI&&typeof JI.getRandomValues=="function")return JI.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}let oZ=class extends LD{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,rZ(e);const n=dy(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 fy(this),this.iHash.update(e),this}digestInto(e){fy(this),kD(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 N2=(t,e,r)=>new oZ(t,e).update(r).digest();N2.create=(t,e)=>new oZ(t,e);function Cme(t,e,r,n){rZ(t);const i=aZ({dkLen:32,asyncTick:10},n),{c:a,dkLen:o,asyncTick:s}=i;if(Qo(a),Qo(o),Qo(s),a<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=dy(e),u=dy(r),f=new Uint8Array(o),d=N2.create(t,c),g=d._cloneInto().update(u);return{c:a,dkLen:o,asyncTick:s,DK:f,PRF:d,PRFSalt:g}}function Nme(t,e,r,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),i.fill(0),r}function UD(t,e,r,n){const{c:i,dkLen:a,DK:o,PRF:s,PRFSalt:c}=Cme(t,e,r,n);let u;const f=new Uint8Array(4),d=WE(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 Nme(s,c,o,u,g)}function Dme(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 BD=class extends LD{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=WE(this.buffer)}update(e){fy(this);const{view:r,buffer:n,blockLen:i}=this;e=dy(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=WE(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){fy(this),nZ(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;Dme(n,i-8,BigInt(this.length*8),a),this.process(n,0);const s=WE(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 $me=(t,e,r)=>t&e^~t&r,Mme=(t,e,r)=>t&e^t&r^e&r,kme=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]),af=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),of=new Uint32Array(64);let Lme=class extends BD{constructor(){super(64,32,8,!1),this.A=af[0]|0,this.B=af[1]|0,this.C=af[2]|0,this.D=af[3]|0,this.E=af[4]|0,this.F=af[5]|0,this.G=af[6]|0,this.H=af[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)of[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const g=of[d-15],m=of[d-2],w=qc(g,7)^qc(g,18)^g>>>3,v=qc(m,17)^qc(m,19)^m>>>10;of[d]=v+of[d-7]+w+of[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=qc(s,6)^qc(s,11)^qc(s,25),m=f+g+$me(s,c,u)+kme[d]+of[d]|0,v=(qc(n,2)^qc(n,13)^qc(n,22))+Mme(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(){of.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const zy=C2(()=>new Lme),B_=BigInt(2**32-1),W6=BigInt(32);function sZ(t,e=!1){return e?{h:Number(t&B_),l:Number(t>>W6&B_)}:{h:Number(t>>W6&B_)|0,l:Number(t&B_)|0}}function cZ(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}=sZ(t[i],e);[r[i],n[i]]=[a,o]}return[r,n]}const Ume=(t,e)=>BigInt(t>>>0)<<W6|BigInt(e>>>0),Bme=(t,e,r)=>t>>>r,Fme=(t,e,r)=>t<<32-r|e>>>r,jme=(t,e,r)=>t>>>r|e<<32-r,qme=(t,e,r)=>t<<32-r|e>>>r,Hme=(t,e,r)=>t<<64-r|e>>>r-32,zme=(t,e,r)=>t>>>r-32|e<<64-r,Vme=(t,e)=>e,Gme=(t,e)=>t,uZ=(t,e,r)=>t<<r|e>>>32-r,lZ=(t,e,r)=>e<<r|t>>>32-r,fZ=(t,e,r)=>e<<r-32|t>>>64-r,dZ=(t,e,r)=>t<<r-32|e>>>64-r;function Wme(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const Kme=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Yme=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Qme=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),Jme=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,Xme=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),Zme=(t,e,r,n,i,a)=>e+r+n+i+a+(t/2**32|0)|0,eve={fromBig:sZ,split:cZ,toBig:Ume,shrSH:Bme,shrSL:Fme,rotrSH:jme,rotrSL:qme,rotrBH:Hme,rotrBL:zme,rotr32H:Vme,rotr32L:Gme,rotlSH:uZ,rotlSL:lZ,rotlBH:fZ,rotlBL:dZ,add:Wme,add3L:Kme,add3H:Yme,add4L:Qme,add4H:Jme,add5H:Zme,add5L:Xme},Hr=eve,[tve,rve]=(()=>Hr.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))))(),sf=new Uint32Array(80),cf=new Uint32Array(80);class nve extends BD{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)sf[S]=e.getUint32(r),cf[S]=e.getUint32(r+=4);for(let S=16;S<80;S++){const x=sf[S-15]|0,O=cf[S-15]|0,E=Hr.rotrSH(x,O,1)^Hr.rotrSH(x,O,8)^Hr.shrSH(x,O,7),p=Hr.rotrSL(x,O,1)^Hr.rotrSL(x,O,8)^Hr.shrSL(x,O,7),I=sf[S-2]|0,C=cf[S-2]|0,L=Hr.rotrSH(I,C,19)^Hr.rotrBH(I,C,61)^Hr.shrSH(I,C,6),q=Hr.rotrSL(I,C,19)^Hr.rotrBL(I,C,61)^Hr.shrSL(I,C,6),le=Hr.add4L(p,q,cf[S-7],cf[S-16]),pe=Hr.add4H(le,E,L,sf[S-7],sf[S-16]);sf[S]=pe|0,cf[S]=le|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=Hr.rotrSH(d,g,14)^Hr.rotrSH(d,g,18)^Hr.rotrBH(d,g,41),O=Hr.rotrSL(d,g,14)^Hr.rotrSL(d,g,18)^Hr.rotrBL(d,g,41),E=d&m^~d&v,p=g&w^~g&y,I=Hr.add5L(b,O,p,rve[S],cf[S]),C=Hr.add5H(I,_,x,E,tve[S],sf[S]),L=I|0,q=Hr.rotrSH(n,i,28)^Hr.rotrBH(n,i,34)^Hr.rotrBH(n,i,39),le=Hr.rotrSL(n,i,28)^Hr.rotrBL(n,i,34)^Hr.rotrBL(n,i,39),pe=n&a^n&s^a&s,B=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}=Hr.add(u|0,f|0,C|0,L|0),u=s|0,f=c|0,s=a|0,c=o|0,a=n|0,o=i|0;const U=Hr.add3L(L,le,B);n=Hr.add3H(U,C,q,pe),i=U|0}({h:n,l:i}=Hr.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:a,l:o}=Hr.add(this.Bh|0,this.Bl|0,a|0,o|0),{h:s,l:c}=Hr.add(this.Ch|0,this.Cl|0,s|0,c|0),{h:u,l:f}=Hr.add(this.Dh|0,this.Dl|0,u|0,f|0),{h:d,l:g}=Hr.add(this.Eh|0,this.El|0,d|0,g|0),{h:m,l:w}=Hr.add(this.Fh|0,this.Fl|0,m|0,w|0),{h:v,l:y}=Hr.add(this.Gh|0,this.Gl|0,v|0,y|0),{h:_,l:b}=Hr.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(){sf.fill(0),cf.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 FD=C2(()=>new nve);function ive(){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 GU=ive(),WU=GU.crypto||GU.msCrypto;function ave(t){switch(t){case"sha256":return zy.create();case"sha512":return FD.create()}$e(!1,"invalid hashing algorithm name","algorithm",t)}function ove(t,e){const r={sha256:zy,sha512:FD}[t];return $e(r!=null,"invalid hmac algorithm","algorithm",t),N2.create(r,e)}function sve(t,e,r,n,i){const a={sha256:zy,sha512:FD}[i];return $e(a!=null,"invalid pbkdf2 algorithm","algorithm",i),UD(a,t,e,{c:r,dkLen:n})}function cve(t){ct(WU!=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 WU.getRandomValues(e),e}let hZ=!1;const pZ=function(t,e,r){return ove(t,e).update(r).digest()};let gZ=pZ;function Vy(t,e,r){const n=Gt(e,"key"),i=Gt(r,"data");return xt(gZ(t,n,i))}Vy._=pZ;Vy.lock=function(){hZ=!0};Vy.register=function(t){if(hZ)throw new Error("computeHmac is locked");gZ=t};Object.freeze(Vy);const[yZ,mZ,vZ]=[[],[],[]],uve=BigInt(0),Um=BigInt(1),lve=BigInt(2),fve=BigInt(7),dve=BigInt(256),hve=BigInt(113);for(let t=0,e=Um,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],yZ.push(2*(5*n+r)),mZ.push((t+1)*(t+2)/2%64);let i=uve;for(let a=0;a<7;a++)e=(e<<Um^(e>>fve)*hve)%dve,e&lve&&(i^=Um<<(Um<<BigInt(a))-Um);vZ.push(i)}const[pve,gve]=cZ(vZ,!0),KU=(t,e,r)=>r>32?fZ(t,e,r):uZ(t,e,r),YU=(t,e,r)=>r>32?dZ(t,e,r):lZ(t,e,r);function yve(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=KU(u,f,1)^r[s],g=YU(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=mZ[o],c=KU(i,a,s),u=YU(i,a,s),f=yZ[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]^=pve[n],t[1]^=gve[n]}r.fill(0)}class jD extends LD{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,Qo(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=GE(this.state)}keccak(){yve(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){fy(this);const{blockLen:r,state:n}=this;e=dy(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){fy(this,!1),kD(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 Qo(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(nZ(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 jD(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 mve=(t,e,r)=>C2(()=>new jD(e,t,r)),vve=mve(1,136,256/8);let bZ=!1;const wZ=function(t){return vve(t)};let _Z=wZ;function Vn(t){const e=Gt(t,"data");return xt(_Z(e))}Vn._=wZ;Vn.lock=function(){bZ=!0};Vn.register=function(t){if(bZ)throw new TypeError("keccak256 is locked");_Z=t};Object.freeze(Vn);const bve=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),EZ=Uint8Array.from({length:16},(t,e)=>e),wve=EZ.map(t=>(9*t+5)%16);let qD=[EZ],HD=[wve];for(let t=0;t<4;t++)for(let e of[qD,HD])e.push(e[t].map(r=>bve[r]));const xZ=[[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)),_ve=qD.map((t,e)=>t.map(r=>xZ[e][r])),Eve=HD.map((t,e)=>t.map(r=>xZ[e][r])),xve=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),Ave=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),F_=(t,e)=>t<<e|t>>>32-e;function QU(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 j_=new Uint32Array(16);class Sve extends BD{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)j_[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=xve[m],y=Ave[m],_=qD[m],b=HD[m],S=_ve[m],x=Eve[m];for(let O=0;O<16;O++){const E=F_(n+QU(m,a,s,u)+j_[_[O]]+v,S[O])+d|0;n=d,d=u,u=F_(s,10)|0,s=a,a=E}for(let O=0;O<16;O++){const E=F_(i+QU(w,o,c,f)+j_[b[O]]+y,x[O])+g|0;i=g,g=f,f=F_(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(){j_.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const Ove=C2(()=>new Sve);let AZ=!1;const SZ=function(t){return Ove(t)};let OZ=SZ;function Gy(t){const e=Gt(t,"data");return xt(OZ(e))}Gy._=SZ;Gy.lock=function(){AZ=!0};Gy.register=function(t){if(AZ)throw new TypeError("ripemd160 is locked");OZ=t};Object.freeze(Gy);let IZ=!1;const PZ=function(t,e,r,n,i){return sve(t,e,r,n,i)};let TZ=PZ;function gd(t,e,r,n,i){const a=Gt(t,"password"),o=Gt(e,"salt");return xt(TZ(a,o,r,n,i))}gd._=PZ;gd.lock=function(){IZ=!0};gd.register=function(t){if(IZ)throw new Error("pbkdf2 is locked");TZ=t};Object.freeze(gd);let RZ=!1;const CZ=function(t){return new Uint8Array(cve(t))};let NZ=CZ;function xl(t){return NZ(t)}xl._=CZ;xl.lock=function(){RZ=!0};xl.register=function(t){if(RZ)throw new Error("randomBytes is locked");NZ=t};Object.freeze(xl);const mn=(t,e)=>t<<e|t>>>32-e;function JU(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++],O=t[e++]^r[n++],E=o,p=s,I=c,C=u,L=f,q=d,le=g,pe=m,B=w,U=v,K=y,ne=_,F=b,j=S,z=x,$=O;for(let H=0;H<8;H+=2)L^=mn(E+F|0,7),B^=mn(L+E|0,9),F^=mn(B+L|0,13),E^=mn(F+B|0,18),U^=mn(q+p|0,7),j^=mn(U+q|0,9),p^=mn(j+U|0,13),q^=mn(p+j|0,18),z^=mn(K+le|0,7),I^=mn(z+K|0,9),le^=mn(I+z|0,13),K^=mn(le+I|0,18),C^=mn($+ne|0,7),pe^=mn(C+$|0,9),ne^=mn(pe+C|0,13),$^=mn(ne+pe|0,18),p^=mn(E+C|0,7),I^=mn(p+E|0,9),C^=mn(I+p|0,13),E^=mn(C+I|0,18),le^=mn(q+L|0,7),pe^=mn(le+q|0,9),L^=mn(pe+le|0,13),q^=mn(L+pe|0,18),ne^=mn(K+U|0,7),B^=mn(ne+K|0,9),U^=mn(B+ne|0,13),K^=mn(U+B|0,18),F^=mn($+z|0,7),j^=mn(F+$|0,9),z^=mn(j+F|0,13),$^=mn(z+j|0,18);i[a++]=o+E|0,i[a++]=s+p|0,i[a++]=c+I|0,i[a++]=u+C|0,i[a++]=f+L|0,i[a++]=d+q|0,i[a++]=g+le|0,i[a++]=m+pe|0,i[a++]=w+B|0,i[a++]=v+U|0,i[a++]=y+K|0,i[a++]=_+ne|0,i[a++]=b+F|0,i[a++]=S+j|0,i[a++]=x+z|0,i[a++]=O+$|0}function og(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)JU(r,o,t,e,r,a),s>0&&(o+=16),JU(r,a,t,e+=16,r,o)}function DZ(t,e,r){const n=aZ({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:i,r:a,p:o,dkLen:s,asyncTick:c,maxmem:u,onProgress:f}=n;if(Qo(i),Qo(a),Qo(o),Qo(s),Qo(c),Qo(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=UD(zy,t,e,{c:1,dkLen:d*o}),v=GE(w),y=GE(new Uint8Array(d*i)),_=GE(new Uint8Array(d));let b=()=>{};if(f){const S=2*i*o,x=Math.max(Math.floor(S/1e4),1);let O=0;b=()=>{O++,f&&(!(O%x)||O===S)&&f(O/S)}}return{N:i,r:a,p:o,dkLen:s,blockSize32:g,V:y,B32:v,B:w,tmp:_,blockMixCb:b,asyncTick:c}}function $Z(t,e,r,n,i){const a=UD(zy,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),i.fill(0),a}function Ive(t,e,r){const{N:n,r:i,p:a,dkLen:o,blockSize32:s,V:c,B32:u,B:f,tmp:d,blockMixCb:g}=DZ(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++)og(c,y,c,y+=s,i),g();og(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+_];og(d,0,u,w,i),g()}}return $Z(t,o,f,c,d)}async function Pve(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}=DZ(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 VU(n-1,m,()=>{og(c,y,c,y+=s,i),g()}),og(c,(n-1)*s,u,v,i),g(),await VU(n,m,()=>{const _=u[v+s-16]%n;for(let b=0;b<s;b++)d[b]=u[v+b]^c[_*s+b];og(d,0,u,v,i),g()})}return $Z(t,o,f,c,d)}let MZ=!1,kZ=!1;const LZ=async function(t,e,r,n,i,a,o){return await Pve(t,e,{N:r,r:n,p:i,dkLen:a,onProgress:o})},UZ=function(t,e,r,n,i,a){return Ive(t,e,{N:r,r:n,p:i,dkLen:a})};let BZ=LZ,FZ=UZ;async function Wy(t,e,r,n,i,a,o){const s=Gt(t,"passwd"),c=Gt(e,"salt");return xt(await BZ(s,c,r,n,i,a,o))}Wy._=LZ;Wy.lock=function(){kZ=!0};Wy.register=function(t){if(kZ)throw new Error("scrypt is locked");BZ=t};Object.freeze(Wy);function Ky(t,e,r,n,i,a){const o=Gt(t,"passwd"),s=Gt(e,"salt");return xt(FZ(o,s,r,n,i,a))}Ky._=UZ;Ky.lock=function(){MZ=!0};Ky.register=function(t){if(MZ)throw new Error("scryptSync is locked");FZ=t};Object.freeze(Ky);const jZ=function(t){return ave("sha256").update(t).digest()};let qZ=jZ,HZ=!1;function Tc(t){const e=Gt(t,"data");return xt(qZ(e))}Tc._=jZ;Tc.lock=function(){HZ=!0};Tc.register=function(t){if(HZ)throw new Error("sha256 is locked");qZ=t};Object.freeze(Tc);Object.freeze(Tc);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const zZ=BigInt(0),D2=BigInt(1),Tve=BigInt(2),$2=t=>t instanceof Uint8Array,Rve=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function hy(t){if(!$2(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=Rve[t[r]];return e}function VZ(t){const e=t.toString(16);return e.length&1?`0${e}`:e}function zD(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function py(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 Kh(t){return zD(hy(t))}function VD(t){if(!$2(t))throw new Error("Uint8Array expected");return zD(hy(Uint8Array.from(t).reverse()))}function gy(t,e){return py(t.toString(16).padStart(e*2,"0"))}function GD(t,e){return gy(t,e).reverse()}function Cve(t){return py(VZ(t))}function hc(t,e,r){let n;if(typeof e=="string")try{n=py(e)}catch(a){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${a}`)}else if($2(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 f1(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!$2(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function Nve(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 Dve(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function $ve(t){let e;for(e=0;t>zZ;t>>=D2,e+=1);return e}function Mve(t,e){return t>>BigInt(e)&D2}const kve=(t,e,r)=>t|(r?D2:zZ)<<BigInt(e),WD=t=>(Tve<<BigInt(t-1))-D2,XI=t=>new Uint8Array(t),XU=t=>Uint8Array.from(t);function GZ(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=XI(t),i=XI(t),a=0;const o=()=>{n.fill(1),i.fill(0),a=0},s=(...d)=>r(i,n,...d),c=(d=XI())=>{i=s(XU([0]),d),n=s(),d.length!==0&&(i=s(XU([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 f1(...g)};return(d,g)=>{o(),c(d);let m;for(;!(m=g(u()));)c();return o(),m}}const Lve={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 uw(t,e,r={}){const n=(i,a,o)=>{const s=Lve[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 Uve=Object.freeze(Object.defineProperty({__proto__:null,bitGet:Mve,bitLen:$ve,bitMask:WD,bitSet:kve,bytesToHex:hy,bytesToNumberBE:Kh,bytesToNumberLE:VD,concatBytes:f1,createHmacDrbg:GZ,ensureBytes:hc,equalBytes:Nve,hexToBytes:py,hexToNumber:zD,numberToBytesBE:gy,numberToBytesLE:GD,numberToHexUnpadded:VZ,numberToVarBytesBE:Cve,utf8ToBytes:Dve,validateObject:uw},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ji=BigInt(0),xi=BigInt(1),sh=BigInt(2),Bve=BigInt(3),K6=BigInt(4),ZU=BigInt(5),eB=BigInt(8);BigInt(9);BigInt(16);function Oo(t,e){const r=t%e;return r>=Ji?r:e+r}function Fve(t,e,r){if(r<=Ji||e<Ji)throw new Error("Expected power/modulo > 0");if(r===xi)return Ji;let n=xi;for(;e>Ji;)e&xi&&(n=n*t%r),t=t*t%r,e>>=xi;return n}function ps(t,e,r){let n=t;for(;e-- >Ji;)n*=n,n%=r;return n}function Y6(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=xi;for(;r!==Ji;){const s=n/r,c=n%r,u=i-a*s;n=r,r=c,i=a,a=u}if(n!==xi)throw new Error("invert: does not exist");return Oo(i,e)}function jve(t){const e=(t-xi)/sh;let r,n,i;for(r=t-xi,n=0;r%sh===Ji;r/=sh,n++);for(i=sh;i<t&&Fve(i,e,t)!==t-xi;i++);if(n===1){const o=(t+xi)/K6;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+xi)/sh;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,xi<<BigInt(u-m-1));f=s.sqr(w),d=s.mul(d,w),g=s.mul(g,f),u=m}return d}}function qve(t){if(t%K6===Bve){const e=(t+xi)/K6;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%eB===ZU){const e=(t-ZU)/eB;return function(n,i){const a=n.mul(i,sh),o=n.pow(a,e),s=n.mul(i,o),c=n.mul(n.mul(s,sh),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 jve(t)}const Hve=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function zve(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=Hve.reduce((n,i)=>(n[i]="function",n),e);return uw(t,r)}function Vve(t,e,r){if(r<Ji)throw new Error("Expected power > 0");if(r===Ji)return t.ONE;if(r===xi)return e;let n=t.ONE,i=e;for(;r>Ji;)r&xi&&(n=t.mul(n,i)),i=t.sqr(i),r>>=xi;return n}function Gve(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 WZ(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Wve(t,e,r=!1,n={}){if(t<=Ji)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:a}=WZ(t,e);if(a>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=qve(t),s=Object.freeze({ORDER:t,BITS:i,BYTES:a,MASK:WD(i),ZERO:Ji,ONE:xi,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&xi)===xi,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)=>Vve(s,c,u),div:(c,u)=>Oo(c*Y6(u,t),t),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>Y6(c,t),sqrt:n.sqrt||(c=>o(s,c)),invertBatch:c=>Gve(s,c),cmov:(c,u,f)=>f?u:c,toBytes:c=>r?GD(c,a):gy(c,a),fromBytes:c=>{if(c.length!==a)throw new Error(`Fp.fromBytes: expected ${a}, got ${c.length}`);return r?VD(c):Kh(c)}});return Object.freeze(s)}function KZ(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 YZ(t){const e=KZ(t);return e+Math.ceil(e/2)}function Kve(t,e,r=!1){const n=t.length,i=KZ(e),a=YZ(e);if(n<16||n<a||n>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${n}`);const o=r?Kh(t):VD(t),s=Oo(o,e-xi)+xi;return r?GD(s,i):gy(s,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Yve=BigInt(0),ZI=BigInt(1);function Qve(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>Yve;)a&ZI&&(o=o.add(s)),s=s.double(),a>>=ZI;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+=ZI);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 QZ(t){return zve(t.Fp),uw(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...WZ(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Jve(t){const e=QZ(t);uw(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:Xve,hexToBytes:Zve}=Uve,vh={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=vh;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:Xve(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=vh,r=typeof t=="string"?Zve(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}=vh._parseInt(r.subarray(2)),{d:o,l:s}=vh._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}`}},gl=BigInt(0),Rs=BigInt(1);BigInt(2);const tB=BigInt(3);BigInt(4);function ebe(t){const e=Jve(t),{Fp:r}=e,n=e.toBytes||((w,v,y)=>{const _=v.toAffine();return f1(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"&&gl<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=hy(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:Kh(hc("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(hc("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:O}=v,E=r.eql(r.mul(y,O),r.mul(S,b)),p=r.eql(r.mul(_,O),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,tB),{px:b,py:S,pz:x}=this;let O=r.ZERO,E=r.ZERO,p=r.ZERO,I=r.mul(b,b),C=r.mul(S,S),L=r.mul(x,x),q=r.mul(b,S);return q=r.add(q,q),p=r.mul(b,x),p=r.add(p,p),O=r.mul(v,p),E=r.mul(_,L),E=r.add(O,E),O=r.sub(C,E),E=r.add(C,E),E=r.mul(O,E),O=r.mul(q,O),p=r.mul(_,p),L=r.mul(v,L),q=r.sub(I,L),q=r.mul(v,q),q=r.add(q,p),p=r.add(I,I),I=r.add(p,I),I=r.add(I,L),I=r.mul(I,q),E=r.add(E,I),L=r.mul(S,x),L=r.add(L,L),I=r.mul(L,q),O=r.sub(O,I),p=r.mul(L,C),p=r.add(p,p),p=r.add(p,p),new d(O,E,p)}add(v){f(v);const{px:y,py:_,pz:b}=this,{px:S,py:x,pz:O}=v;let E=r.ZERO,p=r.ZERO,I=r.ZERO;const C=e.a,L=r.mul(e.b,tB);let q=r.mul(y,S),le=r.mul(_,x),pe=r.mul(b,O),B=r.add(y,_),U=r.add(S,x);B=r.mul(B,U),U=r.add(q,le),B=r.sub(B,U),U=r.add(y,b);let K=r.add(S,O);return U=r.mul(U,K),K=r.add(q,pe),U=r.sub(U,K),K=r.add(_,b),E=r.add(x,O),K=r.mul(K,E),E=r.add(le,pe),K=r.sub(K,E),I=r.mul(C,U),E=r.mul(L,pe),I=r.add(E,I),E=r.sub(le,I),I=r.add(le,I),p=r.mul(E,I),le=r.add(q,q),le=r.add(le,q),pe=r.mul(C,pe),U=r.mul(L,U),le=r.add(le,pe),pe=r.sub(q,pe),pe=r.mul(C,pe),U=r.add(U,pe),q=r.mul(le,U),p=r.add(p,q),q=r.mul(K,U),E=r.mul(B,E),E=r.sub(E,q),q=r.mul(B,le),I=r.mul(K,I),I=r.add(I,q),new d(E,p,I)}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===gl)return y;if(s(v),v===Rs)return this;const{endo:_}=e;if(!_)return m.unsafeLadder(this,v);let{k1neg:b,k1:S,k2neg:x,k2:O}=_.splitScalar(v),E=y,p=y,I=this;for(;S>gl||O>gl;)S&Rs&&(E=E.add(I)),O&Rs&&(p=p.add(I)),I=I.double(),S>>=Rs,O>>=Rs;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:O,k2neg:E,k2:p}=S.splitScalar(y);let{p:I,f:C}=this.wNAF(O),{p:L,f:q}=this.wNAF(p);I=m.constTimeNegate(x,I),L=m.constTimeNegate(E,L),L=new d(r.mul(L.px,S.beta),L.py,L.pz),_=I.add(L),b=C.add(q)}else{const{p:x,f:O}=this.wNAF(y);_=x,b=O}return d.normalizeZ([_,b])[0]}multiplyAndAddUnsafe(v,y,_){const b=d.BASE,S=(O,E)=>E===gl||E===Rs||!O.equals(b)?O.multiplyUnsafe(E):O.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),O=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:O}}isTorsionFree(){const{h:v,isTorsionFree:y}=e;if(v===Rs)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===Rs?this:y?y(d,this):this.multiplyUnsafe(e.h)}toRawBytes(v=!0){return this.assertValidity(),n(d,this,v)}toHex(v=!0){return hy(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=Qve(d,e.endo?Math.ceil(g/2):g);return{CURVE:e,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:a,isWithinCurveOrder:o}}function tbe(t){const e=QZ(t);return uw(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function rbe(t){const e=tbe(t),{Fp:r,n}=e,i=r.BYTES+1,a=2*r.BYTES+1;function o(U){return gl<U&&U<r.ORDER}function s(U){return Oo(U,n)}function c(U){return Y6(U,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:f,weierstrassEquation:d,isWithinCurveOrder:g}=ebe({...e,toBytes(U,K,ne){const F=K.toAffine(),j=r.toBytes(F.x),z=f1;return ne?z(Uint8Array.from([K.hasEvenY()?2:3]),j):z(Uint8Array.from([4]),j,r.toBytes(F.y))},fromBytes(U){const K=U.length,ne=U[0],F=U.subarray(1);if(K===i&&(ne===2||ne===3)){const j=Kh(F);if(!o(j))throw new Error("Point is not on curve");const z=d(j);let $=r.sqrt(z);const H=($&Rs)===Rs;return(ne&1)===1!==H&&($=r.neg($)),{x:j,y:$}}else if(K===a&&ne===4){const j=r.fromBytes(F.subarray(0,r.BYTES)),z=r.fromBytes(F.subarray(r.BYTES,2*r.BYTES));return{x:j,y:z}}else throw new Error(`Point of length ${K} was invalid. Expected ${i} compressed bytes or ${a} uncompressed bytes`)}}),m=U=>hy(gy(U,e.nByteLength));function w(U){const K=n>>Rs;return U>K}function v(U){return w(U)?s(-U):U}const y=(U,K,ne)=>Kh(U.slice(K,ne));class _{constructor(K,ne,F){this.r=K,this.s=ne,this.recovery=F,this.assertValidity()}static fromCompact(K){const ne=e.nByteLength;return K=hc("compactSignature",K,ne*2),new _(y(K,0,ne),y(K,ne,2*ne))}static fromDER(K){const{r:ne,s:F}=vh.toSig(hc("DER",K));return new _(ne,F)}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:F,recovery:j}=this,z=p(hc("msgHash",K));if(j==null||![0,1,2,3].includes(j))throw new Error("recovery id invalid");const $=j===2||j===3?ne+e.n:ne;if($>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const H=j&1?"03":"02",k=u.fromHex(H+m($)),M=c($),G=s(-z*M),ge=s(F*M),Q=u.BASE.multiplyAndAddUnsafe(k,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 py(this.toDERHex())}toDERHex(){return vh.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return py(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=YZ(e.n);return Kve(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",F=(K||ne)&&U.length;return K?F===i||F===a:ne?F===2*i||F===2*a:U instanceof u}function O(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=Kh(U),ne=U.length*8-e.nBitLength;return ne>0?K>>BigInt(ne):K},p=e.bits2int_modN||function(U){return s(E(U))},I=WD(e.nBitLength);function C(U){if(typeof U!="bigint")throw new Error("bigint expected");if(!(gl<=U&&U<I))throw new Error(`bigint expected < 2^${e.nBitLength}`);return gy(U,e.nByteLength)}function L(U,K,ne=q){if(["recovered","canonical"].some(ce=>ce in ne))throw new Error("sign() legacy options not supported");const{hash:F,randomBytes:j}=e;let{lowS:z,prehash:$,extraEntropy:H}=ne;z==null&&(z=!0),U=hc("msgHash",U),$&&(U=hc("prehashed msgHash",F(U)));const k=p(U),M=f(K),G=[C(M),C(k)];if(H!=null){const ce=H===!0?j(r.BYTES):H;G.push(hc("extraEntropy",ce))}const ge=f1(...G),Q=k;function te(ce){const T=E(ce);if(!g(T))return;const fe=c(T),ze=u.BASE.multiply(T).toAffine(),tt=s(ze.x);if(tt===gl)return;const mt=s(fe*s(Q+tt*M));if(mt===gl)return;let vt=(ze.x===tt?0:2)|Number(ze.y&Rs),gt=mt;return z&&w(mt)&&(gt=v(mt),vt^=1),new _(tt,gt,vt)}return{seed:ge,k2sig:te}}const q={lowS:e.lowS,prehash:!1},le={lowS:e.lowS,prehash:!1};function pe(U,K,ne=q){const{seed:F,k2sig:j}=L(U,K,ne),z=e;return GZ(z.hash.outputLen,z.nByteLength,z.hmac)(F,j)}u.BASE._setWindowSize(8);function B(U,K,ne,F=le){var ze;const j=U;if(K=hc("msgHash",K),ne=hc("publicKey",ne),"strict"in F)throw new Error("options.strict was renamed to lowS");const{lowS:z,prehash:$}=F;let H,k;try{if(typeof j=="string"||j instanceof Uint8Array)try{H=_.fromDER(j)}catch(tt){if(!(tt instanceof vh.Err))throw tt;H=_.fromCompact(j)}else if(typeof j=="object"&&typeof j.r=="bigint"&&typeof j.s=="bigint"){const{r:tt,s:mt}=j;H=new _(tt,mt)}else throw new Error("PARSE");k=u.fromHex(ne)}catch(tt){if(tt.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(z&&H.hasHighS())return!1;$&&(K=e.hash(K));const{r:M,s:G}=H,ge=p(K),Q=c(G),te=s(ge*Q),ce=s(M*Q),T=(ze=u.BASE.multiplyAndAddUnsafe(k,te,ce))==null?void 0:ze.toAffine();return T?s(T.x)===M:!1}return{CURVE:e,getPublicKey:S,getSharedSecret:O,sign:pe,verify:B,ProjectivePoint:u,Signature:_,utils:b}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function nbe(t){return{hash:t,hmac:(e,...r)=>N2(t,e,Pme(...r)),randomBytes:Rme}}function ibe(t,e){const r=n=>rbe({...t,...nbe(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const JZ=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),rB=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),abe=BigInt(1),Q6=BigInt(2),nB=(t,e)=>(t+e/Q6)/e;function obe(t){const e=JZ,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=ps(f,r,e)*f%e,g=ps(d,r,e)*f%e,m=ps(g,Q6,e)*u%e,w=ps(m,i,e)*m%e,v=ps(w,a,e)*w%e,y=ps(v,s,e)*v%e,_=ps(y,c,e)*y%e,b=ps(_,s,e)*v%e,S=ps(b,r,e)*f%e,x=ps(S,o,e)*w%e,O=ps(x,n,e)*u%e,E=ps(O,Q6,e);if(!J6.eql(J6.sqr(E),t))throw new Error("Cannot find square root");return E}const J6=Wve(JZ,void 0,void 0,{sqrt:obe}),gf=ibe({a:BigInt(0),b:BigInt(7),Fp:J6,n:rB,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=rB,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-abe*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,o=BigInt("0x100000000000000000000000000000000"),s=nB(a*t,e),c=nB(-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}}}},zy);BigInt(0);gf.ProjectivePoint;const X6="0x0000000000000000000000000000000000000000",iB="0x0000000000000000000000000000000000000000000000000000000000000000",sbe=`Ethereum Signed Message:
|
|
69
|
+
`,aB=BigInt(0),oB=BigInt(1),sB=BigInt(2),cB=BigInt(27),uB=BigInt(28),q_=BigInt(35),i0={};function lB(t){return np(Ro(t),32)}var Og,Ig,Pg,Nh;const lc=class lc{constructor(e,r,n,i){Ze(this,Og,void 0);Ze(this,Ig,void 0);Ze(this,Pg,void 0);Ze(this,Nh,void 0);bp(e,i0,"Signature"),Te(this,Og,r),Te(this,Ig,n),Te(this,Pg,i),Te(this,Nh,null)}get r(){return Y(this,Og)}set r(e){$e(ag(e)===32,"invalid r","value",e),Te(this,Og,xt(e))}get s(){return Y(this,Ig)}set s(e){$e(ag(e)===32,"invalid s","value",e);const r=xt(e);$e(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),Te(this,Ig,r)}get v(){return Y(this,Pg)}set v(e){const r=Gr(e,"value");$e(r===27||r===28,"invalid v","v",e),Te(this,Pg,r)}get networkV(){return Y(this,Nh)}get legacyChainId(){const e=this.networkV;return e==null?null:lc.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 lc(i0,this.r,this.s,this.v);return this.networkV&&Te(e,Nh,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==cB||r==uB?aB:($e(r>=q_,"invalid EIP-155 v","v",e),(r-q_)/sB)}static getChainIdV(e,r){return or(e)*sB+BigInt(35+r-27)}static getNormalizedV(e){const r=or(e);return r===aB||r===cB?27:r===oB||r===uB?28:($e(r>=q_,"invalid v","v",e),r&oB?27:28)}static from(e){function r(u,f){$e(u,f,"signature",e)}if(e==null)return new lc(i0,iB,iB,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 lc(i0,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=lc.getNormalizedV(u[64]);return new lc(i0,f,xt(d),g)}r(!1,"invalid raw signature length")}if(e instanceof lc)return e.clone();const n=e.r;r(n!=null,"missing r");const i=lB(n),a=function(u,f){if(u!=null)return lB(u);if(f!=null){r(fi(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>=q_?g:void 0,v:lc.getNormalizedV(g)}}if(f!=null)return r(fi(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 lc(i0,i,a,s);return o&&Te(c,Nh,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}};Og=new WeakMap,Ig=new WeakMap,Pg=new WeakMap,Nh=new WeakMap;let Rc=lc;var al;const fh=class fh{constructor(e){Ze(this,al,void 0);$e(ag(e)===32,"invalid private key","privateKey","[REDACTED]"),Te(this,al,xt(e))}get privateKey(){return Y(this,al)}get publicKey(){return fh.computePublicKey(Y(this,al))}get compressedPublicKey(){return fh.computePublicKey(Y(this,al),!0)}sign(e){$e(ag(e)===32,"invalid digest length","digest",e);const r=gf.sign(Ba(e),Ba(Y(this,al)),{lowS:!0});return Rc.from({r:Cl(r.r,32),s:Cl(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=fh.computePublicKey(e);return xt(gf.getSharedSecret(Ba(Y(this,al)),Gt(r),!1))}static computePublicKey(e,r){let n=Gt(e,"key");if(n.length===32){const a=gf.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=gf.ProjectivePoint.fromHex(n);return xt(i.toRawBytes(r))}static recoverPublicKey(e,r){$e(ag(e)===32,"invalid digest length","digest",e);const n=Rc.from(r);let i=gf.Signature.fromCompact(Ba(Gn([n.r,n.s])));i=i.addRecoveryBit(n.yParity);const a=i.recoverPublicKey(Ba(e));return $e(a!=null,"invalid signautre for digest","signature",r),"0x"+a.toHex(!1)}static addPoints(e,r,n){const i=gf.ProjectivePoint.fromHex(fh.computePublicKey(e).substring(2)),a=gf.ProjectivePoint.fromHex(fh.computePublicKey(r).substring(2));return"0x"+i.add(a).toHex(!!n)}};al=new WeakMap;let mu=fh;const cbe=BigInt(0),ube=BigInt(36);function fB(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(Vn(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 KD={};for(let t=0;t<10;t++)KD[String(t)]=String(t);for(let t=0;t<26;t++)KD[String.fromCharCode(65+t)]=String(10+t);const dB=15;function lbe(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>KD[n]).join("");for(;e.length>=dB;){let n=e.substring(0,dB);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 fbe=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function dbe(t){t=t.toLowerCase();let e=cbe;for(let r=0;r<t.length;r++)e=e*ube+fbe[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=fB(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)===lbe(t),"bad icap checksum","address",t);let e=dbe(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return fB("0x"+e)}$e(!1,"invalid address","address",t)}function hbe(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(Vn(l1([e,n])),12))}function XZ(t){return t&&typeof t.getAddress=="function"}async function eP(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"}),eP(t,e.resolveName(t)));if(XZ(t))return eP(t,t.getAddress());if(t&&typeof t.then=="function")return eP(t,t);$e(!1,"unsupported addressable value","target",t)}const Qu={};function jt(t,e){let r=!1;return e<0&&(r=!0,e*=-1),new qa(Qu,`${r?"":"u"}int${e}`,t,{signed:r,width:e})}function vn(t,e){return new qa(Qu,`bytes${e||""}`,t,{size:e})}const hB=Symbol.for("_ethers_typed");var Dh;const Xu=class Xu{constructor(e,r,n,i){je(this,"type");je(this,"value");Ze(this,Dh,void 0);je(this,"_typedSymbol");i==null&&(i=null),bp(Qu,e,"Typed"),Zt(this,{_typedSymbol:hB,type:r,value:n}),Te(this,Dh,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,Dh)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return Y(this,Dh)===!0?-1:Y(this,Dh)===!1?this.value.length:null}static from(e,r){return new Xu(Qu,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 Xu(Qu,"address",e)}static bool(e){return new Xu(Qu,"bool",!!e)}static bytes(e){return new Xu(Qu,"bytes",e)}static string(e){return new Xu(Qu,"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 Xu(Qu,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===hB}static dereference(e,r){if(Xu.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Dh=new WeakMap;let qa=Xu;class pbe extends Ul{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=qa.dereference(r,"string");try{n=ln(n)}catch(i){return this._throwError(i.message,r)}return e.writeValue(n)}decode(e){return ln(Cl(e.readValue(),20))}}class gbe extends Ul{constructor(r){super(r.name,r.type,"_",r.dynamic);je(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 ZZ(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 V6,a=new V6,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 eee(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(ks(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(ks(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)}),rA.fromItems(r,n)}class ybe extends Ul{constructor(r,n,i){const a=r.type+"["+(n>=0?n:"")+"]",o=n===-1||r.dynamic;super("array",a,i,o);je(this,"coder");je(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=qa.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)),FX(i.length,a,"coder array"+(this.localName?" "+this.localName:""));let o=[];for(let s=0;s<i.length;s++)o.push(this.coder);return ZZ(r,o,i)}decode(r){let n=this.length;n===-1&&(n=r.readIndex(),ct(n*no<=r.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:r.bytes,offset:n*no,length:r.dataLength}));let i=[];for(let a=0;a<n;a++)i.push(new gbe(this.coder));return eee(r,i)}}class mbe extends Ul{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,r){const n=qa.dereference(r,"bool");return e.writeValue(n?1:0)}decode(e){return!!e.readValue()}}class tee extends Ul{constructor(e,r){super(e,e,r,!0)}defaultValue(){return"0x"}encode(e,r){r=Ba(r);let n=e.writeValue(r.length);return n+=e.writeBytes(r),n}decode(e){return e.readBytes(e.readIndex(),!0)}}class vbe extends tee{constructor(e){super("bytes",e)}decode(e){return xt(super.decode(e))}}class bbe extends Ul{constructor(r,n){let i="bytes"+String(r);super(i,i,n,!1);je(this,"size");Zt(this,{size:r},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(r,n){let i=Ba(qa.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 wbe=new Uint8Array([]);class _be extends Ul{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes(wbe)}decode(e){return e.readBytes(0),null}}const Ebe=BigInt(0),xbe=BigInt(1),Abe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class Sbe extends Ul{constructor(r,n,i){const a=(n?"int":"uint")+r*8;super(a,a,i,!1);je(this,"size");je(this,"signed");Zt(this,{size:r,signed:n},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(r,n){let i=or(qa.dereference(n,this.type)),a=eb(Abe,no*8);if(this.signed){let o=eb(a,this.size*8-1);(i>o||i<-(o+xbe))&&this._throwError("value out-of-bounds",n),i=VX(i,8*no)}else(i<Ebe||i>eb(a,this.size*8))&&this._throwError("value out-of-bounds",n);return r.writeValue(i)}decode(r){let n=eb(r.readValue(),this.size*8);return this.signed&&(n=nme(n,this.size*8)),n}}class Obe extends tee{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,oo(qa.dereference(r,"string")))}decode(e){return $D(super.decode(e))}}class H_ extends Ul{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);je(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=qa.dereference(n,"tuple");return ZZ(r,this.coders,i)}decode(r){return eee(r,this.coders)}}function Nl(t){return Vn(oo(t))}var Ibe="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 pB=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),gB=4;function Pbe(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,a=[0,1];for(let O=1;O<n;O++)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 O=0;O<d;O++)y=y<<1|f();let _=[],b=0,S=g;for(;;){let O=Math.floor(((y-b+1)*i-1)/S),E=0,p=n;for(;p-E>1;){let L=E+p>>>1;O<a[L]?p=L:E=L}if(E==0)break;_.push(E);let I=b+Math.floor(S*a[E]/i),C=b+Math.floor(S*a[E+1]/i)-1;for(;!((I^C)&m);)y=y<<1&v|f(),I=I<<1&v,C=C<<1&v|1;for(;I&~C&w;)y=y&m|y<<1&v>>>1|f(),I=I<<1^m,C=(C^m)<<1|m|1;b=I,S=1+C-I}let x=n-4;return _.map(O=>{switch(O-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 O-1}})}function Tbe(t){let e=0;return()=>t[e++]}function ree(t){return Tbe(Pbe(Rbe(t)))}function Rbe(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 Cbe(t){return t&1?~t>>1:t>>1}function Nbe(t,e){let r=Array(t);for(let n=0,i=0;n<t;n++)r[n]=i+=Cbe(e());return r}function d1(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 nee(t){return h1(()=>{let e=d1(t);if(e.length)return e})}function iee(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(Dbe(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push($be(r,t))}return e.flat()}function h1(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function aee(t,e,r){let n=Array(t).fill().map(()=>[]);for(let i=0;i<e;i++)Nbe(t,r).forEach((a,o)=>n[o].push(a));return n}function Dbe(t,e){let r=1+e(),n=e(),i=h1(e);return aee(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 $be(t,e){let r=1+e();return aee(r,1+t,e).map(i=>[i[0],i.slice(1)])}function Mbe(t){let e=[],r=d1(t);return i(n([]),[]),e;function n(a){let o=t(),s=h1(()=>{let c=d1(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 kbe(t){return t.toString(16).toUpperCase().padStart(2,"0")}function oee(t){return`{${kbe(t)}}`}function Lbe(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 yy(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 Ube(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 Bbe="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 p1=44032,nA=4352,iA=4449,aA=4519,see=19,cee=21,my=28,oA=cee*my,Fbe=see*oA,jbe=p1+Fbe,qbe=nA+see,Hbe=iA+cee,zbe=aA+my;function rb(t){return t>>24&255}function uee(t){return t&16777215}let Z6,yB,e8,KE;function Vbe(){let t=ree(Bbe);Z6=new Map(nee(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),yB=new Set(d1(t)),e8=new Map,KE=new Map;for(let[e,r]of iee(t)){if(!yB.has(e)&&r.length==2){let[n,i]=r,a=KE.get(n);a||(a=new Map,KE.set(n,a)),a.set(i,e)}e8.set(e,r.reverse())}}function lee(t){return t>=p1&&t<jbe}function Gbe(t,e){if(t>=nA&&t<qbe&&e>=iA&&e<Hbe)return p1+(t-nA)*oA+(e-iA)*my;if(lee(t)&&e>aA&&e<zbe&&(t-p1)%my==0)return t+(e-aA);{let r=KE.get(t);return r&&(r=r.get(e),r)?r:-1}}function fee(t){Z6||Vbe();let e=[],r=[],n=!1;function i(a){let o=Z6.get(a);o&&(n=!0,a|=o),e.push(a)}for(let a of t)for(;;){if(a<128)e.push(a);else if(lee(a)){let o=a-p1,s=o/oA|0,c=o%oA/my|0,u=o%my;i(nA+s),i(iA+c),u>0&&i(aA+u)}else{let o=e8.get(a);o?r.push(...o):i(a)}if(!r.length)break;a=r.pop()}if(n&&e.length>1){let a=rb(e[0]);for(let o=1;o<e.length;o++){let s=rb(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=rb(e[--c]),a<=s))break}a=rb(e[o])}}return e}function Wbe(t){let e=[],r=[],n=-1,i=0;for(let a of t){let o=rb(a),s=uee(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=Gbe(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 dee(t){return fee(t).map(uee)}function Kbe(t){return Wbe(fee(t))}const mB=45,hee=".",pee=65039,gee=1,j0=t=>Array.from(t);function g1(t,e){return t.P.has(e)||t.Q.has(e)}class Ybe extends Array{get is_emoji(){return!0}}let t8,yee,bh,r8,mee,sg,tP,_0,vee,vB,n8;function YD(){if(t8)return;let t=ree(Ibe);const e=()=>d1(t),r=()=>new Set(e());t8=new Map(iee(t)),yee=r(),bh=e(),r8=new Set(e().map(f=>bh[f])),bh=new Set(bh),mee=r(),r();let n=nee(t),i=t();const a=()=>new Set(e().flatMap(f=>n[f]).concat(e()));sg=h1(f=>{let d=h1(t).map(g=>g+96);if(d.length){let g=f>=i;d[0]-=32,d=yy(d),g&&(d=`Restricted[${d}]`);let m=a(),w=a(),v=!t();return{N:d,P:m,Q:w,M:v,R:g}}}),tP=r(),_0=new Map;let o=e().concat(j0(tP)).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),tP.has(f)||_0.set(f,m)});for(let{V:f,M:d}of new Set(_0.values())){let g=[];for(let w of f){let v=sg.filter(_=>g1(_,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=>j0(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 sg){for(let d of f.P)u(d);for(let d of f.Q)u(d)}for(let f of s)!_0.has(f)&&!c.has(f)&&_0.set(f,gee);vee=new Set(j0(s).concat(j0(dee(s)))),vB=Mbe(t).map(f=>Ybe.from(f)).sort(Ube),n8=new Map;for(let f of vB){let d=[n8];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===pee?d.push(...m):d=m}for(let g of d)g.V=f}}function QD(t){return(bee(t)?"":`${JD(M2([t]))} `)+oee(t)}function JD(t){return`"${t}"`}function Qbe(t){if(t.length>=4&&t[2]==mB&&t[3]==mB)throw new Error(`invalid label extension: "${yy(t.slice(0,4))}"`)}function Jbe(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function Xbe(t){let e=t[0],r=pB.get(e);if(r)throw Tb(`leading ${r}`);let n=t.length,i=-1;for(let a=1;a<n;a++){e=t[a];let o=pB.get(e);if(o){if(i==a)throw Tb(`${r} + ${o}`);i=a+1,r=o}}if(i==n)throw Tb(`trailing ${r}`)}function M2(t,e=oee){let r=[];Zbe(t[0])&&r.push("◌");let n=0,i=t.length;for(let a=0;a<i;a++){let o=t[a];bee(o)&&(r.push(yy(t.slice(n,a))),r.push(e(o)),n=a+1)}return r.push(yy(t.slice(n,i))),r.join("")}function Zbe(t){return YD(),bh.has(t)}function bee(t){return YD(),mee.has(t)}function e1e(t){return i1e(t1e(t,Kbe,s1e))}function t1e(t,e,r){if(!t)return[];YD();let n=0;return t.split(hee).map(i=>{let a=Lbe(i),o={input:a,offset:n};n+=a.length+1;try{let s=o.tokens=o1e(a,e,r),c=s.length,u;if(!c)throw new Error("empty label");let f=o.output=s.flat();if(Jbe(f),!(o.emoji=c>1||s[0].is_emoji)&&f.every(g=>g<128))Qbe(f),u="ASCII";else{let g=s.flatMap(m=>m.is_emoji?[]:m);if(!g.length)u="Emoji";else{if(bh.has(f[0]))throw Tb("leading combining mark");for(let v=1;v<c;v++){let y=s[v];if(!y.is_emoji&&bh.has(y[0]))throw Tb(`emoji + combining mark: "${yy(s[v-1])} + ${M2([y[0]])}"`)}Xbe(f);let m=j0(new Set(g)),[w]=n1e(m);a1e(w,g),r1e(w,m),u=w.N}}o.type=u}catch(s){o.error=s}return o})}function r1e(t,e){let r,n=[];for(let i of e){let a=_0.get(i);if(a===gee)return;if(a){let o=a.M.get(i);if(r=r?r.filter(s=>o.has(s)):j0(o),!r.length)return}else n.push(i)}if(r){for(let i of r)if(n.every(a=>g1(i,a)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function n1e(t){let e=sg;for(let r of t){let n=e.filter(i=>g1(i,r));if(!n.length)throw sg.some(i=>g1(i,r))?_ee(e[0],r):wee(r);if(e=n,n.length==1)break}return e}function i1e(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 ${JD(M2(e))}: ${i}`)}return yy(n)}).join(hee)}function wee(t){return new Error(`disallowed character: ${QD(t)}`)}function _ee(t,e){let r=QD(e),n=sg.find(i=>i.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function Tb(t){return new Error(`illegal placement: ${t}`)}function a1e(t,e){for(let r of e)if(!g1(t,r))throw _ee(t,r);if(t.M){let r=dee(e);for(let n=1,i=r.length;n<i;n++)if(r8.has(r[n])){let a=n+1;for(let o;a<i&&r8.has(o=r[a]);a++)for(let s=n;s<a;s++)if(r[s]==o)throw new Error(`duplicate non-spacing marks: ${QD(o)}`);if(a-n>gB)throw new Error(`excessive non-spacing marks: ${JD(M2(r.slice(n-1,a)))} (${a-n}/${gB})`);n=a}}}function o1e(t,e,r){let n=[],i=[];for(t=t.slice().reverse();t.length;){let a=c1e(t);if(a)i.length&&(n.push(e(i)),i=[]),n.push(r(a));else{let o=t.pop();if(vee.has(o))i.push(o);else{let s=t8.get(o);if(s)i.push(...s);else if(!yee.has(o))throw wee(o)}}}return i.length&&n.push(e(i)),n}function s1e(t){return t.filter(e=>e!=pee)}function c1e(t,e){let r=n8,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 Eee=new Uint8Array(32);Eee.fill(0);function bB(t){return $e(t.length!==0,"invalid ENS name; empty component","comp",t),t}function xee(t){const e=oo(u1e(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i<e.length;i++)e[i]===46&&(r.push(bB(e.slice(n,i))),n=i+1);return $e(n<e.length,"invalid ENS name; empty component","name",t),r.push(bB(e.slice(n))),r}function u1e(t){try{if(t.length===0)throw new Error("empty label");return e1e(t)}catch(e){$e(!1,`invalid ENS name (${e.message})`,"name",t)}}function i8(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=Eee;const r=xee(t);for(;r.length;)e=Vn(Gn([e,Vn(r.pop())]));return xt(e)}function l1e(t){return xt(Gn(xee(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 rP(t,e){return{address:ln(t),storageKeys:e.map((r,n)=>($e(fi(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function wp(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?($e(r.length===2,"invalid slot set",`value[${n}]`,r),rP(r[0],r[1])):($e(r!=null&&typeof r=="object","invalid address-slot set","value",t),rP(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 rP(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function lw(t){let e;return typeof t=="string"?e=mu.computePublicKey(t,!1):e=t.publicKey,ln(Vn("0x"+e.substring(4)).substring(26))}function f1e(t,e){return lw(mu.recoverPublicKey(t,e))}const Io=BigInt(0),d1e=BigInt(2),h1e=BigInt(27),p1e=BigInt(28),g1e=BigInt(35),y1e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function XD(t){return t==="0x"?null:ln(t)}function Aee(t,e){try{return wp(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 Io;const r=or(t,e);return $e(r<=y1e,"value exceeds uint size",e,r),r}function da(t,e){const r=or(t,"value"),n=Ro(r);return $e(n.length<=32,"value too large",`tx.${e}`,r),n}function See(t){return wp(t).map(e=>[e.address,e.storageKeys])}function m1e(t){const e=MD(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:XD(e[3]),value:eo(e[4],"value"),data:xt(e[5]),chainId:Io};if(e.length===6)return r;const n=eo(e[6],"v"),i=eo(e[7],"r"),a=eo(e[8],"s");if(i===Io&&a===Io)r.chainId=n;else{let o=(n-g1e)/d1e;o<Io&&(o=Io),r.chainId=o,$e(o!==Io||n===h1e||n===p1e,"non-canonical legacy v","v",e[6]),r.signature=Rc.from({r:np(e[7],32),s:np(e[8],32),v:n}),r.hash=Vn(t)}return r}function wB(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=Io;if(t.chainId!=Io)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!==Io&&(r.push(Ro(n)),r.push("0x"),r.push("0x")),l1(r);let i=BigInt(27+e.yParity);return n!==Io?i=Rc.getChainIdV(n,e.v):BigInt(e.v)!==i&&$e(!1,"tx.chainId/sig.v mismatch","sig",e),r.push(Ro(i)),r.push(Ro(e.r)),r.push(Ro(e.s)),l1(r)}function Oee(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=np(e[1],32),i=np(e[2],32),a=Rc.from({r:n,s:i,yParity:r});t.signature=a}function v1e(t){const e=MD(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:XD(e[5]),value:eo(e[6],"value"),data:xt(e[7]),accessList:Aee(e[8],"accessList")};return e.length===9||(i.hash=Vn(t),Oee(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",See(t.accessList||[])];return e&&(r.push(da(e.yParity,"yParity")),r.push(Ro(e.r)),r.push(Ro(e.s))),Gn(["0x02",l1(r)])}function b1e(t){const e=MD(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:XD(e[4]),value:eo(e[5],"value"),data:xt(e[6]),accessList:Aee(e[7],"accessList")};return e.length===8||(r.hash=Vn(t),Oee(r,e.slice(8))),r}function EB(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",See(t.accessList||[])];return e&&(r.push(da(e.yParity,"recoveryParam")),r.push(Ro(e.r)),r.push(Ro(e.s))),Gn(["0x01",l1(r)])}var ol,Tg,Rg,Cg,Ng,Dg,$g,Mg,kg,Lg,Ug,Bg;const Ef=class Ef{constructor(){Ze(this,ol,void 0);Ze(this,Tg,void 0);Ze(this,Rg,void 0);Ze(this,Cg,void 0);Ze(this,Ng,void 0);Ze(this,Dg,void 0);Ze(this,$g,void 0);Ze(this,Mg,void 0);Ze(this,kg,void 0);Ze(this,Lg,void 0);Ze(this,Ug,void 0);Ze(this,Bg,void 0);Te(this,ol,null),Te(this,Tg,null),Te(this,Cg,0),Te(this,Ng,BigInt(0)),Te(this,Dg,null),Te(this,$g,null),Te(this,Mg,null),Te(this,Rg,"0x"),Te(this,kg,BigInt(0)),Te(this,Lg,BigInt(0)),Te(this,Ug,null),Te(this,Bg,null)}get type(){return Y(this,ol)}set type(e){switch(e){case null:Te(this,ol,null);break;case 0:case"legacy":Te(this,ol,0);break;case 1:case"berlin":case"eip-2930":Te(this,ol,1);break;case 2:case"london":case"eip-1559":Te(this,ol,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,Tg)}set to(e){Te(this,Tg,e==null?null:ln(e))}get nonce(){return Y(this,Cg)}set nonce(e){Te(this,Cg,Gr(e,"value"))}get gasLimit(){return Y(this,Ng)}set gasLimit(e){Te(this,Ng,or(e))}get gasPrice(){const e=Y(this,Dg);return e==null&&(this.type===0||this.type===1)?Io:e}set gasPrice(e){Te(this,Dg,e==null?null:or(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=Y(this,$g);return e??(this.type===2?Io:null)}set maxPriorityFeePerGas(e){Te(this,$g,e==null?null:or(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=Y(this,Mg);return e??(this.type===2?Io:null)}set maxFeePerGas(e){Te(this,Mg,e==null?null:or(e,"maxFeePerGas"))}get data(){return Y(this,Rg)}set data(e){Te(this,Rg,xt(e))}get value(){return Y(this,kg)}set value(e){Te(this,kg,or(e,"value"))}get chainId(){return Y(this,Lg)}set chainId(e){Te(this,Lg,or(e))}get signature(){return Y(this,Ug)||null}set signature(e){Te(this,Ug,e==null?null:Rc.from(e))}get accessList(){const e=Y(this,Bg)||null;return e??(this.type===1||this.type===2?[]:null)}set accessList(e){Te(this,Bg,e==null?null:wp(e))}get hash(){return this.signature==null?null:Vn(this.serialized)}get unsignedHash(){return Vn(this.unsignedSerialized)}get from(){return this.signature==null?null:f1e(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:mu.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 wB(this,this.signature);case 1:return EB(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 wB(this);case 1:return EB(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 Ef.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 Ef;if(typeof e=="string"){const n=Gt(e);if(n[0]>=127)return Ef.from(m1e(n));switch(n[0]){case 1:return Ef.from(b1e(n));case 2:return Ef.from(v1e(n))}ct(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new Ef;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=Rc.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}};ol=new WeakMap,Tg=new WeakMap,Rg=new WeakMap,Cg=new WeakMap,Ng=new WeakMap,Dg=new WeakMap,$g=new WeakMap,Mg=new WeakMap,kg=new WeakMap,Lg=new WeakMap,Ug=new WeakMap,Bg=new WeakMap;let y1=Ef;function w1e(t){return typeof t=="string"&&(t=oo(t)),Vn(Gn([oo(sbe),oo(String(t.length)),t]))}const Iee=new Uint8Array(32);Iee.fill(0);const _1e=BigInt(-1),Pee=BigInt(0),Tee=BigInt(1),E1e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function x1e(t){const e=Gt(t),r=e.length%32;return r?Gn([e,Iee.slice(r)]):xt(e)}const A1e=Cl(Tee,32),S1e=Cl(Pee,32),xB={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},nP=["name","version","chainId","verifyingContract","salt"];function AB(t){return function(e){return $e(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const O1e={name:AB("name"),version:AB("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):F0(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 iP(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=eb(E1e,r?n-1:n),a=r?(i+Tee)*_1e:Pee;return function(o){const s=or(o,"value");return $e(s>=a&&s<=i,`value out-of-bounds for ${t}`,"value",s),Cl(r?VX(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),x1e(n)}}}switch(t){case"address":return function(e){return np(ln(e),32)};case"bool":return function(e){return e?A1e:S1e};case"bytes":return function(e){return Vn(e)};case"string":return function(e){return Nl(e)}}return null}function SB(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}var L1,sl,Fg,i2,Ree;const xs=class xs{constructor(e){Ze(this,i2);je(this,"primaryType");Ze(this,L1,void 0);Ze(this,sl,void 0);Ze(this,Fg,void 0);Te(this,L1,JSON.stringify(e)),Te(this,sl,new Map),Te(this,Fg,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),!iP(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,sl).set(s,SB(s,e[s])+u.map(f=>SB(f,e[f])).join(""))}}get types(){return JSON.parse(Y(this,L1))}getEncoder(e){let r=Y(this,Fg).get(e);return r||(r=Et(this,i2,Ree).call(this,e),Y(this,Fg).set(e,r)),r}encodeType(e){const r=Y(this,sl).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 Vn(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(iP(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 xs(e)}static getPrimaryType(e){return xs.from(e).primaryType}static hashStruct(e,r,n){return xs.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const i=xB[n];$e(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>nP.indexOf(n.name)-nP.indexOf(i.name)),xs.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Gn(["0x1901",xs.hashDomain(e),xs.from(r).hash(n)])}static hash(e,r,n){return Vn(xs.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&&!fi(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");const o=xs.from(r);o.visit(n,(s,c)=>(s==="address"&&!fi(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){xs.hashDomain(e);const i={},a=[];nP.forEach(c=>{const u=e[c];u!=null&&(i[c]=O1e[c](u),a.push({name:c,type:xB[c]}))});const o=xs.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)})}}};L1=new WeakMap,sl=new WeakMap,Fg=new WeakMap,i2=new WeakSet,Ree=function(e){{const i=iP(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,sl).has(i)&&(s=s.map(Vn)),Vn(Gn(s))}}const n=this.types[e];if(n){const i=Nl(Y(this,sl).get(e));return a=>{const o=n.map(({name:s,type:c})=>{const u=this.getEncoder(c)(a[s]);return Y(this,sl).has(c)?Vn(u):u});return o.unshift(i),Gn(o)}}$e(!1,`unknown type: ${e}`,"type",e)};let vy=xs;function io(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const I1e="external public payable",P1e=io(I1e.split(" ")),Cee="constant external internal payable private public pure view",T1e=io(Cee.split(" ")),Nee="constructor error event fallback function receive struct",Dee=io(Nee.split(" ")),$ee="calldata memory storage payable indexed",R1e=io($ee.split(" ")),C1e="tuple returns",N1e=[Nee,$ee,C1e,Cee].join(" "),D1e=io(N1e.split(" ")),$1e={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},M1e=new RegExp("^(\\s*)"),k1e=new RegExp("^([0-9]+)"),L1e=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),Mee=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),kee=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var ca,mc,U1,a8;const a2=class a2{constructor(e){Ze(this,U1);Ze(this,ca,void 0);Ze(this,mc,void 0);Te(this,ca,0),Te(this,mc,e.slice())}get offset(){return Y(this,ca)}get length(){return Y(this,mc).length-Y(this,ca)}clone(){return new a2(Y(this,mc))}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,U1,a8).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,U1,a8).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,mc).length)throw new Error("out-of-bounds");return Y(this,mc)[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 Am(this,ca)._++,e}toString(){const e=[];for(let r=Y(this,ca);r<Y(this,mc).length;r++){const n=Y(this,mc)[r];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(" ")}>`}};ca=new WeakMap,mc=new WeakMap,U1=new WeakSet,a8=function(e=0,r=0){return new a2(Y(this,mc).slice(e,r).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let Cc=a2;function yd(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(M1e);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=$1e[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(L1e),s){if(c.text=s[1],a+=c.text.length,D1e.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(kee)){c.type="TYPE";continue}c.type="ID";continue}if(s=o.match(k1e),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 Cc(e.map(o=>Object.freeze(o)))}function OB(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 L2(t,e){if(e.peekKeyword(Dee)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function Dl(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 Lee(t){let e=Dl(t,T1e);return OB(e,io("constant payable nonpayable".split(" "))),OB(e,io("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 Al(t,e){return t.popParams().map(r=>ma.from(r,e))}function Uee(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return or(t.pop().text);throw new Error("invalid gas")}return null}function ip(t){if(t.length)throw new Error(`unexpected tokens: ${t.toString()}`)}const U1e=new RegExp(/^(.*)\[([0-9]*)\]$/);function IB(t){const e=t.match(kee);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={},Lo=Symbol.for("_ethers_internal"),PB="_ParamTypeInternal",TB="_ErrorInternal",RB="_EventInternal",CB="_ConstructorInternal",NB="_FallbackInternal",DB="_FunctionInternal",$B="_StructInternal";var jg,YE;const As=class As{constructor(e,r,n,i,a,o,s,c){Ze(this,jg);je(this,"name");je(this,"type");je(this,"baseType");je(this,"indexed");je(this,"components");je(this,"arrayLength");je(this,"arrayChildren");if(bp(e,li,"ParamType"),Object.defineProperty(this,Lo,{value:PB}),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,jg,YE).call(this,n,e,r,a=>{i[0]=a}),n.length&&await Promise.all(n),i[0]}static from(e,r){if(As.isParamType(e))return e;if(typeof e=="string")try{return As.from(yd(e),r)}catch{$e(!1,"invalid param type","obj",e)}else if(e instanceof Cc){let s="",c="",u=null;Dl(e,io(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",u=e.popParams().map(v=>As.from(v)),s=`tuple(${u.map(v=>v.format()).join(",")})`):(s=IB(e.popType("TYPE")),c=s);let f=null,d=null;for(;e.length&&e.peekType("BRACKET");){const v=e.pop();f=new As(li,"",s,c,null,u,d,f),d=v.value,s+=v.text,c="array",u=null}let g=null;if(Dl(e,R1e).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 As(li,w,s,c,g,u,d,f)}const n=e.name;$e(!n||typeof n=="string"&&n.match(Mee),"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(U1e);if(o){const s=parseInt(o[2]||"-1"),c=As.from({type:o[1],components:e.components});return new As(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=>As.from(u)):null;return new As(li,n||"",a,"tuple",i,s,null,null)}return a=IB(e.type),new As(li,n||"",a,a,i,null,null,null)}static isParamType(e){return e&&e[Lo]===PB}};jg=new WeakSet,YE=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,jg,YE).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],jg,YE).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=As;class ap{constructor(e,r,n){je(this,"type");je(this,"inputs");bp(e,li,"Fragment"),n=Object.freeze(n.slice()),Zt(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{ap.from(JSON.parse(e))}catch{}return ap.from(yd(e))}if(e instanceof Cc)switch(e.peekKeyword(Dee)){case"constructor":return vl.from(e);case"error":return Po.from(e);case"event":return au.from(e);case"fallback":case"receive":return el.from(e);case"function":return ou.from(e);case"struct":return Yh.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return vl.from(e);case"error":return Po.from(e);case"event":return au.from(e);case"fallback":case"receive":return el.from(e);case"function":return ou.from(e);case"struct":return Yh.from(e)}ct(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}$e(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return vl.isFragment(e)}static isError(e){return Po.isFragment(e)}static isEvent(e){return au.isFragment(e)}static isFunction(e){return ou.isFragment(e)}static isStruct(e){return Yh.isFragment(e)}}class U2 extends ap{constructor(r,n,i,a){super(r,n,a);je(this,"name");$e(typeof i=="string"&&i.match(Mee),"invalid identifier","name",i),a=Object.freeze(a.slice()),Zt(this,{name:i})}}function m1(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}class Po extends U2{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,Lo,{value:TB})}get selector(){return Nl(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+m1(e,this.inputs)),r.join(" ")}static from(e){if(Po.isFragment(e))return e;if(typeof e=="string")return Po.from(yd(e));if(e instanceof Cc){const r=L2("error",e),n=Al(e);return ip(e),new Po(li,r,n)}return new Po(li,e.name,e.inputs?e.inputs.map(ma.from):[])}static isFragment(e){return e&&e[Lo]===TB}}class au extends U2{constructor(r,n,i,a){super(r,"event",n,i);je(this,"anonymous");Object.defineProperty(this,Lo,{value:RB}),Zt(this,{anonymous:a})}get topicHash(){return Nl(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+m1(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 au(li,r,n,!1).topicHash}static from(r){if(au.isFragment(r))return r;if(typeof r=="string")try{return au.from(yd(r))}catch{$e(!1,"invalid event fragment","obj",r)}else if(r instanceof Cc){const n=L2("event",r),i=Al(r,!0),a=!!Dl(r,io(["anonymous"])).has("anonymous");return ip(r),new au(li,n,i,a)}return new au(li,r.name,r.inputs?r.inputs.map(n=>ma.from(n,!0)):[],!!r.anonymous)}static isFragment(r){return r&&r[Lo]===RB}}class vl extends ap{constructor(r,n,i,a,o){super(r,n,i);je(this,"payable");je(this,"gas");Object.defineProperty(this,Lo,{value:CB}),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${m1(r,this.inputs)}`];return n.push(this.payable?"payable":"nonpayable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(r){if(vl.isFragment(r))return r;if(typeof r=="string")try{return vl.from(yd(r))}catch{$e(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof Cc){Dl(r,io(["constructor"]));const n=Al(r),i=!!Dl(r,P1e).has("payable"),a=Uee(r);return ip(r),new vl(li,"constructor",n,i,a)}return new vl(li,"constructor",r.inputs?r.inputs.map(ma.from):[],!!r.payable,r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[Lo]===CB}}class el extends ap{constructor(r,n,i){super(r,"fallback",n);je(this,"payable");Object.defineProperty(this,Lo,{value:NB}),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(el.isFragment(r))return r;if(typeof r=="string")try{return el.from(yd(r))}catch{$e(!1,"invalid fallback fragment","obj",r)}else if(r instanceof Cc){const n=r.toString(),i=r.peekKeyword(io(["fallback","receive"]));if($e(i,"type must be fallback or receive","obj",n),r.popKeyword(io(["fallback","receive"]))==="receive"){const c=Al(r);return $e(c.length===0,"receive cannot have arguments","obj.inputs",c),Dl(r,io(["payable"])),ip(r),new el(li,[],!0)}let o=Al(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=Lee(r);if($e(s==="nonpayable"||s==="payable","fallback cannot be constants","obj.stateMutability",s),Dl(r,io(["returns"])).has("returns")){const c=Al(r);$e(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(u=>u.format("minimal")).join(", "))}return ip(r),new el(li,o,s==="payable")}if(r.type==="receive")return new el(li,[],!0);if(r.type==="fallback"){const n=[ma.from("bytes")],i=r.stateMutability==="payable";return new el(li,n,i)}$e(!1,"invalid fallback description","obj",r)}static isFragment(r){return r&&r[Lo]===NB}}class ou extends U2{constructor(r,n,i,a,o,s){super(r,"function",n,a);je(this,"constant");je(this,"outputs");je(this,"stateMutability");je(this,"payable");je(this,"gas");Object.defineProperty(this,Lo,{value:DB}),o=Object.freeze(o.slice()),Zt(this,{constant:i==="view"||i==="pure",gas:s,outputs:o,payable:i==="payable",stateMutability:i})}get selector(){return Nl(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+m1(r,this.inputs)),r!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(m1(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 ou(li,r,"view",n,[],null).selector}static from(r){if(ou.isFragment(r))return r;if(typeof r=="string")try{return ou.from(yd(r))}catch{$e(!1,"invalid function fragment","obj",r)}else if(r instanceof Cc){const i=L2("function",r),a=Al(r),o=Lee(r);let s=[];Dl(r,io(["returns"])).has("returns")&&(s=Al(r));const c=Uee(r);return ip(r),new ou(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 ou(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[Lo]===DB}}class Yh extends U2{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,Lo,{value:$B})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return Yh.from(yd(e))}catch{$e(!1,"invalid struct fragment","obj",e)}else if(e instanceof Cc){const r=L2("struct",e),n=Al(e);return ip(e),new Yh(li,r,n)}return new Yh(li,e.name,e.inputs?e.inputs.map(ma.from):[])}static isFragment(e){return e&&e[Lo]===$B}}const Dc=new Map;Dc.set(0,"GENERIC_PANIC");Dc.set(1,"ASSERT_FALSE");Dc.set(17,"OVERFLOW");Dc.set(18,"DIVIDE_BY_ZERO");Dc.set(33,"ENUM_RANGE_ERROR");Dc.set(34,"BAD_STORAGE_DATA");Dc.set(49,"STACK_UNDERFLOW");Dc.set(50,"ARRAY_RANGE_ERROR");Dc.set(65,"OUT_OF_MEMORY");Dc.set(81,"UNINITIALIZED_FUNCTION_CALL");const B1e=new RegExp(/^bytes([0-9]*)$/),F1e=new RegExp(/^(u?int)([0-9]*)$/);let aP=null;function j1e(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 ${Dc.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 If,E0;const o2=class o2{constructor(){Ze(this,If)}getDefaultValue(e){const r=e.map(i=>Et(this,If,E0).call(this,ma.from(i)));return new H_(r,"_").defaultValue()}encode(e,r){FX(r.length,e.length,"types/values length mismatch");const n=e.map(o=>Et(this,If,E0).call(this,ma.from(o))),i=new H_(n,"_"),a=new V6;return i.encode(a,r),a.data}decode(e,r,n){const i=e.map(o=>Et(this,If,E0).call(this,ma.from(o)));return new H_(i,"_").decode(new G6(r,n))}static defaultAbiCoder(){return aP==null&&(aP=new o2),aP}static getBuiltinCallException(e,r,n){return j1e(e,r,n,o2.defaultAbiCoder())}};If=new WeakSet,E0=function(e){if(e.isArray())return new ybe(Et(this,If,E0).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new H_(e.components.map(n=>Et(this,If,E0).call(this,n)),e.name);switch(e.baseType){case"address":return new pbe(e.name);case"bool":return new mbe(e.name);case"string":return new Obe(e.name);case"bytes":return new vbe(e.name);case"":return new _be(e.name)}let r=e.type.match(F1e);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 Sbe(n/8,r[1]==="int",e.name)}if(r=e.type.match(B1e),r){let n=parseInt(r[1]);return $e(n!==0&&n<=32,"invalid bytes length","param",e),new bbe(n,e.name)}$e(!1,"invalid type","type",e.type)};let v1=o2;class q1e{constructor(e,r,n){je(this,"fragment");je(this,"name");je(this,"signature");je(this,"topic");je(this,"args");const i=e.name,a=e.format();Zt(this,{fragment:e,name:i,signature:a,topic:r,args:n})}}class H1e{constructor(e,r,n,i){je(this,"fragment");je(this,"name");je(this,"args");je(this,"signature");je(this,"selector");je(this,"value");const a=e.name,o=e.format();Zt(this,{fragment:e,name:a,args:n,signature:o,selector:r,value:i})}}class z1e{constructor(e,r,n){je(this,"fragment");je(this,"name");je(this,"args");je(this,"signature");je(this,"selector");const i=e.name,a=e.format();Zt(this,{fragment:e,name:i,args:n,signature:a,selector:r})}}class MB{constructor(e){je(this,"hash");je(this,"_isIndexed");Zt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const kB={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"},LB={"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&&kB[t.toString()]&&(e=kB[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var Xc,Zc,eu,Ta,qg,QE,Hg,JE;const G0=class G0{constructor(e){Ze(this,qg);Ze(this,Hg);je(this,"fragments");je(this,"deploy");je(this,"fallback");je(this,"receive");Ze(this,Xc,void 0);Ze(this,Zc,void 0);Ze(this,eu,void 0);Ze(this,Ta,void 0);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,Te(this,eu,new Map),Te(this,Xc,new Map),Te(this,Zc,new Map);const n=[];for(const o of r)try{n.push(ap.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,eu);break;case"event":c=Y(this,Zc);break;case"error":c=Y(this,Xc);break;default:return}const u=o.format();c.has(u)||c.set(u,o)}),this.deploy||Zt(this,{deploy:vl.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 v1.defaultAbiCoder()}getFunctionName(e){const r=Et(this,qg,QE).call(this,e,null,!1);return $e(r,"no matching function","key",e),r.name}hasFunction(e){return!!Et(this,qg,QE).call(this,e,null,!1)}getFunction(e,r){return Et(this,qg,QE).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(Y(this,eu).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(Y(this,eu).get(i),n)}}getEventName(e){const r=Et(this,Hg,JE).call(this,e,null,!1);return $e(r,"no matching event","key",e),r.name}hasEvent(e){return!!Et(this,Hg,JE).call(this,e,null,!1)}getEvent(e,r){return Et(this,Hg,JE).call(this,e,r||null,!0)}forEachEvent(e){const r=Array.from(Y(this,Zc).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(Y(this,Zc).get(i),n)}}getError(e,r){if(fi(e)){const i=e.toLowerCase();if(LB[i])return Po.from(LB[i].signature);for(const a of Y(this,Xc).values())if(i===a.selector)return a;return null}if(e.indexOf("(")===-1){const i=[];for(const[a,o]of Y(this,Xc))a.split("(")[0]===e&&i.push(o);if(i.length===0)return e==="Error"?Po.from("error Error(string)"):e==="Panic"?Po.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=Po.from(e).format(),e==="Error(string)")return Po.from("error Error(string)");if(e==="Panic(uint256)")return Po.from("error Panic(uint256)");const n=Y(this,Xc).get(e);return n||null}forEachError(e){const r=Array.from(Y(this,Xc).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(Y(this,Xc).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=Ba(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=v1.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"?Nl(o):a.type==="bytes"?Vn(xt(o)):(a.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":a.type.match(/^u?int/)?o=Cl(o):a.type.match(/^bytes/)?o=rme(o,32):a.type==="address"&&Y(this,Ta).encode(["address"],[o]),np(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(Nl(c));else if(o.type==="bytes")n.push(Vn(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(fi(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 MB(null);else if(o[w])v=new MB(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)}),rA.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 H1e(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 q1e(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 z1e(n,n.selector,i)}static from(e){return e instanceof G0?e:typeof e=="string"?new G0(JSON.parse(e)):typeof e.format=="function"?new G0(e.format("json")):new G0(e)}};Xc=new WeakMap,Zc=new WeakMap,eu=new WeakMap,Ta=new WeakMap,qg=new WeakSet,QE=function(e,r,n){if(fi(e)){const a=e.toLowerCase();for(const o of Y(this,eu).values())if(a===o.selector)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of Y(this,eu))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;qa.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(qa.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,eu).get(ou.from(e).format());return i||null},Hg=new WeakSet,JE=function(e,r,n){if(fi(e)){const a=e.toLowerCase();for(const o of Y(this,Zc).values())if(a===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of Y(this,Zc))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(qa.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,Zc).get(au.from(e).format());return i||null};let o8=G0;const Bee=BigInt(0);function Rb(t){return t??null}function La(t){return t==null?null:t.toString()}class UB{constructor(e,r,n){je(this,"gasPrice");je(this,"maxFeePerGas");je(this,"maxPriorityFeePerGas");Zt(this,{gasPrice:Rb(e),maxFeePerGas:Rb(r),maxPriorityFeePerGas:Rb(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:La(e),maxFeePerGas:La(r),maxPriorityFeePerGas:La(n)}}}function sA(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=wp(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 cl;class V1e{constructor(e,r){je(this,"provider");je(this,"number");je(this,"hash");je(this,"timestamp");je(this,"parentHash");je(this,"nonce");je(this,"difficulty");je(this,"gasLimit");je(this,"gasUsed");je(this,"miner");je(this,"extraData");je(this,"baseFeePerGas");Ze(this,cl,void 0);Te(this,cl,e.transactions.map(n=>typeof n!="string"?new b1(n,r):n)),Zt(this,{provider:r,hash:Rb(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:Rb(e.baseFeePerGas)})}get transactions(){return Y(this,cl).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=Y(this,cl).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:La(e),difficulty:La(r),extraData:n,gasLimit:La(i),gasUsed:La(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,cl).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,cl)[e];else{const n=e.toLowerCase();for(const i of Y(this,cl))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 G1e(this)}}cl=new WeakMap;class fw{constructor(e,r){je(this,"provider");je(this,"transactionHash");je(this,"blockHash");je(this,"blockNumber");je(this,"removed");je(this,"address");je(this,"data");je(this,"topics");je(this,"index");je(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 W1e(this)}}var B1;class Fee{constructor(e,r){je(this,"provider");je(this,"to");je(this,"from");je(this,"contractAddress");je(this,"hash");je(this,"index");je(this,"blockHash");je(this,"blockNumber");je(this,"logsBloom");je(this,"gasUsed");je(this,"cumulativeGasUsed");je(this,"gasPrice");je(this,"type");je(this,"status");je(this,"root");Ze(this,B1,void 0);Te(this,B1,Object.freeze(e.logs.map(i=>new fw(i,r))));let n=Bee;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,B1)}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:La(this.cumulativeGasUsed),from:r,gasPrice:La(this.gasPrice),gasUsed:La(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 qee(this)}reorderedEvent(e){return ct(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),jee(this,e)}}B1=new WeakMap;var Pf;const bL=class bL{constructor(e,r){je(this,"provider");je(this,"blockNumber");je(this,"blockHash");je(this,"index");je(this,"hash");je(this,"type");je(this,"to");je(this,"from");je(this,"nonce");je(this,"gasLimit");je(this,"gasPrice");je(this,"maxPriorityFeePerGas");je(this,"maxFeePerGas");je(this,"data");je(this,"value");je(this,"chainId");je(this,"signature");je(this,"accessList");Ze(this,Pf,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,Pf,-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:La(this.chainId),data:u,from:s,gasLimit:La(this.gasLimit),gasPrice:La(this.gasPrice),hash:i,maxFeePerGas:La(this.maxFeePerGas),maxPriorityFeePerGas:La(this.maxPriorityFeePerGas),nonce:c,signature:f,to:o,index:n,type:a,value:La(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,Pf),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,Pf)&&(o=Y(this,Pf)));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===Bee&&(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(ks(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()"}),qee(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()"}),jee(this,e)}replaceableTransaction(e){$e(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new bL(this,this.provider);return Te(r,Pf,e),r}};Pf=new WeakMap;let b1=bL;function G1e(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function jee(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function qee(t){return{orphan:"drop-transaction",tx:t}}function W1e(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 ZD extends fw{constructor(r,n,i){super(r,r.provider);je(this,"interface");je(this,"fragment");je(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 Hee extends fw{constructor(r,n){super(r,r.provider);je(this,"error");Zt(this,{error:n})}}var zg;class K1e extends Fee{constructor(r,n,i){super(i,n);Ze(this,zg,void 0);Te(this,zg,r)}get logs(){return super.logs.map(r=>{const n=r.topics.length?Y(this,zg).getEvent(r.topics[0]):null;if(n)try{return new ZD(r,Y(this,zg),n)}catch(i){return new Hee(r,i)}return r})}}zg=new WeakMap;var F1;class e$ extends b1{constructor(r,n,i){super(i,n);Ze(this,F1,void 0);Te(this,F1,r)}async wait(r){const n=await super.wait(r);return n==null?null:new K1e(Y(this,F1),this.provider,n)}}F1=new WeakMap;class zee extends WX{constructor(r,n,i,a){super(r,n,i);je(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 Y1e extends zee{constructor(e,r,n,i,a){super(e,r,n,new ZD(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 BB=BigInt(0);function Vee(t){return t&&typeof t.call=="function"}function Gee(t){return t&&typeof t.estimateGas=="function"}function B2(t){return t&&typeof t.resolveName=="function"}function Wee(t){return t&&typeof t.sendTransaction=="function"}function Kee(t){if(t!=null){if(B2(t))return t;if(t.provider)return t.provider}}var j1;class Q1e{constructor(e,r,n){Ze(this,j1,void 0);je(this,"fragment");if(Zt(this,{fragment:r}),r.inputs.length<n.length)throw new Error("too many arguments");const i=op(e.runner,"resolveName"),a=B2(i)?i:null;Te(this,j1,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,j1)}}j1=new WeakMap;function op(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function wh(t){return t==null?null:t.provider||null}async function Yee(t,e){const r=qa.dereference(t,"overrides");$e(typeof r=="object","invalid overrides parameter","overrides",t);const n=sA(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 J1e(t,e,r){const n=op(t,"resolveName"),i=B2(n)?n:null;return await Promise.all(e.map((a,o)=>a.walkAsync(r[o],(s,c)=>(c=qa.dereference(c,s),s==="address"?ya(c,i):c))))}function X1e(t){const e=async function(o){const s=await Yee(o,["data"]);s.to=await t.getAddress(),s.from&&(s.from=await ya(s.from,Kee(t.runner)));const c=t.interface,u=or(s.value||BB,"overrides.value")===BB,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=op(t.runner,"call");ct(Vee(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 DD(u)&&u.data?t.interface.makeError(u.data,c):u}},n=async function(o){const s=t.runner;ct(Wee(s),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await s.sendTransaction(await e(o)),u=wh(t.runner);return new e$(t.interface,u,c)},i=async function(o){const s=op(t.runner,"estimateGas");return ct(Gee(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 Z1e(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 Yee(u.pop()),d.from&&(d.from=await ya(d.from,Kee(t.runner)))),f.inputs.length!==u.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const g=await J1e(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(Wee(f),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const d=await f.sendTransaction(await n(...u)),g=wh(t.runner);return new e$(t.interface,g,d)},o=async function(...u){const f=op(t.runner,"estimateGas");return ct(Gee(f),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await f.estimateGas(await n(...u))},s=async function(...u){const f=op(t.runner,"call");ct(Vee(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 DD(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 ewe(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 Q1e(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 cA=Symbol.for("_ethersInternal_contract"),Qee=new WeakMap;function twe(t,e){Qee.set(t[cA],e)}function Go(t){return Qee.get(t[cA])}function rwe(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function t$(t,e){let r,n=null;if(Array.isArray(e)){const a=function(o){if(fi(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"?fi(e,32)?r=[e]:(n=t.interface.getEvent(e),$e(n,"unknown fragment","event",e),r=[n.topicHash]):rwe(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 nb(t,e){const{subs:r}=Go(t);return r.get((await t$(t,e)).tag)||null}async function FB(t,e,r){const n=wh(t.runner);ct(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:a,topics:o}=await t$(t,r),{addr:s,subs:c}=Go(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):[];c8(t,r,S,x=>new Y1e(t,x,r,b,y))}else c8(t,r,[],b=>new zee(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 s8=Promise.resolve();async function nwe(t,e,r,n){await s8;const i=await nb(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(),Go(t).subs.delete(i.tag)),a>0}async function c8(t,e,r,n){try{await s8}catch{}const i=nwe(t,e,r,n);return s8=i,await i}const z_=["then"];var YGe;const Wb=class Wb{constructor(e,r,n,i){je(this,"target");je(this,"interface");je(this,"runner");je(this,"filters");je(this,YGe);je(this,"fallback");$e(typeof e=="string"||XZ(e),"invalid value for Contract target","target",e),n==null&&(n=null);const a=o8.from(r);Zt(this,{target:e,runner:n,interface:a}),Object.defineProperty(this,cA,{value:{}});let o,s=null,c=null;if(i){const d=wh(n);c=new e$(this.interface,d,i)}let u=new Map;if(typeof e=="string")if(fi(e))s=e,o=Promise.resolve(e);else{const d=op(n,"resolveName");if(!B2(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 Go(this).addr=g,g})}else o=e.getAddress().then(d=>{if(d==null)throw new Error("TODO");return Go(this).addr=d,d});twe(this,{addrPromise:o,addr:s,deployTx:c,subs:u});const f=new Proxy({},{get:(d,g,m)=>{if(typeof g=="symbol"||z_.indexOf(g)>=0)return Reflect.get(d,g,m);try{return this.getEvent(g)}catch(w){if(!ks(w,"INVALID_ARGUMENT")||w.argument!=="key")throw w}},has:(d,g)=>z_.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?X1e(this):null}),new Proxy(this,{get:(d,g,m)=>{if(typeof g=="symbol"||g in d||z_.indexOf(g)>=0)return Reflect.get(d,g,m);try{return d.getFunction(g)}catch(w){if(!ks(w,"INVALID_ARGUMENT")||w.argument!=="key")throw w}},has:(d,g)=>typeof g=="symbol"||g in d||z_.indexOf(g)>=0?Reflect.has(d,g):d.interface.hasFunction(g)})}connect(e){return new Wb(this.target,this.interface,e)}attach(e){return new Wb(e,this.interface,this.runner)}async getAddress(){return await Go(this).addrPromise}async getDeployedCode(){const e=wh(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=wh(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 Go(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),Z1e(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),ewe(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}=Go(this),o=i||await a,{fragment:s,topics:c}=await t$(this,e),u={address:o,topics:c,fromBlock:r,toBlock:n},f=wh(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 ZD(d,this.interface,g)}catch(m){return new Hee(d,m)}return new fw(d,f)})}async on(e,r){const n=await FB(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await FB(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await c8(this,e,r,null)}async listenerCount(e){if(e){const i=await nb(this,e);return i?i.listeners.length:0}const{subs:r}=Go(this);let n=0;for(const{listeners:i}of r.values())n+=i.length;return n}async listeners(e){if(e){const i=await nb(this,e);return i?i.listeners.map(({listener:a})=>a):[]}const{subs:r}=Go(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 nb(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(),Go(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await nb(this,e);if(!r)return this;r.stop(),Go(this).subs.delete(r.tag)}else{const{subs:r}=Go(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 Wb{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)}};YGe=cA;let u8=Wb;function iwe(){return u8}class Cb extends iwe(){}function oP(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){je(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 Jee=new RegExp("^(ipfs)://(.*)$","i"),jB=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Jee,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Tf,$h,Rf,x0,s2,Xee;const W0=class W0{constructor(e,r,n){Ze(this,Rf);je(this,"provider");je(this,"address");je(this,"name");Ze(this,Tf,void 0);Ze(this,$h,void 0);Zt(this,{provider:e,address:r,name:n}),Te(this,Tf,null),Te(this,$h,new Cb(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,Tf)==null&&Te(this,Tf,(async()=>{try{return await Y(this,$h).supportsInterface("0x9061b923")}catch(e){if(ks(e,"CALL_EXCEPTION"))return!1;throw Te(this,Tf,null),e}})()),await Y(this,Tf)}async getAddress(e){if(e==null&&(e=60),e===60)try{const a=await Et(this,Rf,x0).call(this,"addr(bytes32)");return a==null||a===X6?null:a}catch(a){if(ks(a,"CALL_EXCEPTION"))return null;throw a}if(e>=0&&e<2147483648){let a=e+2147483648;const o=await Et(this,Rf,x0).call(this,"addr(bytes32,uint)",[a]);if(fi(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,Rf,x0).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,Rf,x0).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await Et(this,Rf,x0).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}://${GX("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<jB.length;n++){const i=r.match(jB[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=oP(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 Cb(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}",Cl(u,32).substring(2)),e.push({type:"metadata-url-expanded",value:d})),d.match(/^ipfs:/i)&&(d=oP(d)),e.push({type:"metadata-url",value:d});let g={};const m=await new ud(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(Jee)==null)return e.push({type:"!imageUrl-ipfs",value:w}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:w}),w=oP(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=W0,s2,Xee).call(i,e,n);if(a!=null){const o=new W0(e,a,r);return n!==r&&!await o.supportsWildcard()?null:o}n=n.split(".").slice(1).join(".")}}};Tf=new WeakMap,$h=new WeakMap,Rf=new WeakSet,x0=async function(e,r){r=(r||[]).slice();const n=Y(this,$h).interface;r.unshift(i8(this.name));let i=null;await this.supportsWildcard()&&(i=n.getFunction(e),ct(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),r=[l1e(this.name),n.encodeFunctionData(i,r)],e="resolve(bytes,bytes)"),r.push({enableCcipRead:!0});try{const a=await Y(this,$h)[e](...r);return i?n.decodeFunctionResult(i,a)[0]:a}catch(a){if(!ks(a,"CALL_EXCEPTION"))throw a}return null},s2=new WeakSet,Xee=async function(e,r){const n=await W0.getEnsAddress(e);try{const a=await new Cb(n,["function resolver(bytes32) view returns (address)"],e).resolver(i8(r),{enableCcipRead:!0});return a===X6?null:a}catch(i){throw i}return null},Ze(W0,s2);let uA=W0;const qB=BigInt(0);function ui(t,e){return function(r){return r==null?e:t(r)}}function r$(t){return e=>{if(!Array.isArray(e))throw new Error("not an array");return e.map(r=>t(r))}}function dw(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 owe(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 by(t){return $e(fi(t,!0),"invalid data","value",t),t}function Ls(t){return $e(fi(t,32),"invalid hash","value",t),t}const swe=dw({address:ln,blockHash:Ls,blockNumber:Gr,data:by,index:Gr,removed:ui(owe,!1),topics:r$(Ls),transactionHash:Ls,transactionIndex:Gr},{index:["logIndex"]});function cwe(t){return swe(t)}const uwe=dw({hash:ui(Ls),parentHash:Ls,number:Gr,timestamp:Gr,nonce:ui(by),difficulty:or,gasLimit:or,gasUsed:or,miner:ui(ln),extraData:by,baseFeePerGas:ui(or)});function lwe(t){const e=uwe(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:Zee(r)),e}const fwe=dw({transactionIndex:Gr,blockNumber:Gr,transactionHash:Ls,address:ln,topics:r$(Ls),data:by,index:Gr,blockHash:Ls},{index:["logIndex"]});function dwe(t){return fwe(t)}const hwe=dw({to:ui(ln,null),from:ui(ln,null),contractAddress:ui(ln,null),index:Gr,root:ui(xt),gasUsed:or,logsBloom:ui(by),blockHash:Ls,hash:Ls,logs:r$(dwe),blockNumber:Gr,cumulativeGasUsed:or,effectiveGasPrice:ui(or),status:ui(Gr),type:ui(Gr,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function pwe(t){return hwe(t)}function Zee(t){t.to&&or(t.to)===qB&&(t.to="0x0000000000000000000000000000000000000000");const e=dw({hash:Ls,type:r=>r==="0x"||r==null?0:Gr(r),accessList:ui(wp,null),blockHash:ui(Ls,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:by,creates:ui(ln,null),chainId:ui(or,null)},{data:["input"],gasLimit:["gas"]})(t);if(e.to==null&&e.creates==null&&(e.creates=hbe(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=Rc.from(t.signature):e.signature=Rc.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&or(e.blockHash)===qB&&(e.blockHash=null),e}const gwe="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class hw{constructor(e){je(this,"name");Zt(this,{name:e})}clone(){return new hw(this.name)}}class F2 extends hw{constructor(r,n){r==null&&(r=0);super(`org.ethers.network.plugins.GasCost#${r||0}`);je(this,"effectiveBlock");je(this,"txBase");je(this,"txCreate");je(this,"txDataZero");je(this,"txDataNonzero");je(this,"txAccessListStorageKey");je(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 F2(this.effectiveBlock,this)}}class j2 extends hw{constructor(r,n){super("org.ethers.plugins.network.Ens");je(this,"address");je(this,"targetNetwork");Zt(this,{address:r||gwe,targetNetwork:n??1})}clone(){return new j2(this.address,this.targetNetwork)}}var q1,H1;class ete extends hw{constructor(r,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");Ze(this,q1,void 0);Ze(this,H1,void 0);Te(this,q1,r),Te(this,H1,n)}get url(){return Y(this,q1)}get processFunc(){return Y(this,H1)}clone(){return this}}q1=new WeakMap,H1=new WeakMap;const sP=new Map;var Vg,Gg,Cf;const K0=class K0{constructor(e,r){Ze(this,Vg,void 0);Ze(this,Gg,void 0);Ze(this,Cf,void 0);Te(this,Vg,e),Te(this,Gg,or(r)),Te(this,Cf,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return Y(this,Vg)}set name(e){Te(this,Vg,e)}get chainId(){return Y(this,Gg)}set chainId(e){Te(this,Gg,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,Cf).values())}attachPlugin(e){if(Y(this,Cf).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return Y(this,Cf).set(e.name,e.clone()),this}getPlugin(e){return Y(this,Cf).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new K0(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 F2;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=wp(e.accessList);for(const a in i)n+=r.txAccessListAddress+r.txAccessListStorageKey*i[a].storageKeys.length}return n}static from(e){if(mwe(),e==null)return K0.from("mainnet");if(typeof e=="number"&&(e=BigInt(e)),typeof e=="string"||typeof e=="bigint"){const r=sP.get(e);if(r)return r();if(typeof e=="bigint")return new K0("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 K0(e.name,e.chainId);return(e.ensAddress||e.ensNetwork!=null)&&r.attachPlugin(new j2(e.ensAddress,e.ensNetwork)),r}$e(!1,"invalid network","network",e)}static register(e,r){typeof e=="number"&&(e=BigInt(e));const n=sP.get(e);n&&$e(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",e),sP.set(e,r)}};Vg=new WeakMap,Gg=new WeakMap,Cf=new WeakMap;let bl=K0;function HB(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 zB(t){return new ete(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:HB(s.maxFee,9),maxPriorityFeePerGas:HB(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 ywe(t){return new ete("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 VB=!1;function mwe(){if(VB)return;VB=!0;function t(e,r,n){const i=function(){const a=new bl(e,r);return n.ensNetwork!=null&&a.attachPlugin(new j2(null,n.ensNetwork)),a.attachPlugin(new F2),(n.plugins||[]).forEach(o=>{a.attachPlugin(o)}),a};bl.register(e,i),bl.register(r,i),n.altNames&&n.altNames.forEach(a=>{bl.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:[zB("https://gasstation.polygon.technology/v2")]}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[zB("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[ywe(BigInt("1000000"))]}),t("optimism-goerli",420,{}),t("xdai",100,{ensNetwork:1})}function l8(t){return JSON.parse(JSON.stringify(t))}var ul,Is,Nf,tu,Wg,XE;class vwe{constructor(e){Ze(this,Wg);Ze(this,ul,void 0);Ze(this,Is,void 0);Ze(this,Nf,void 0);Ze(this,tu,void 0);Te(this,ul,e),Te(this,Is,null),Te(this,Nf,4e3),Te(this,tu,-2)}get pollingInterval(){return Y(this,Nf)}set pollingInterval(e){Te(this,Nf,e)}start(){Y(this,Is)||(Te(this,Is,Y(this,ul)._setTimeout(Et(this,Wg,XE).bind(this),Y(this,Nf))),Et(this,Wg,XE).call(this))}stop(){Y(this,Is)&&(Y(this,ul)._clearTimeout(Y(this,Is)),Te(this,Is,null))}pause(e){this.stop(),e&&Te(this,tu,-2)}resume(){this.start()}}ul=new WeakMap,Is=new WeakMap,Nf=new WeakMap,tu=new WeakMap,Wg=new WeakSet,XE=async function(){try{const e=await Y(this,ul).getBlockNumber();if(Y(this,tu)===-2){Te(this,tu,e);return}if(e!==Y(this,tu)){for(let r=Y(this,tu)+1;r<=e;r++){if(Y(this,Is)==null)return;await Y(this,ul).emit("block",r)}Te(this,tu,e)}}catch{}Y(this,Is)!=null&&Te(this,Is,Y(this,ul)._setTimeout(Et(this,Wg,XE).bind(this),Y(this,Nf)))};var Mh,kh,Df;class tte{constructor(e){Ze(this,Mh,void 0);Ze(this,kh,void 0);Ze(this,Df,void 0);Te(this,Mh,e),Te(this,Df,!1),Te(this,kh,r=>{this._poll(r,Y(this,Mh))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){Y(this,Df)||(Te(this,Df,!0),Y(this,kh).call(this,-2),Y(this,Mh).on("block",Y(this,kh)))}stop(){Y(this,Df)&&(Te(this,Df,!1),Y(this,Mh).off("block",Y(this,kh)))}pause(e){this.stop()}resume(){this.start()}}Mh=new WeakMap,kh=new WeakMap,Df=new WeakMap;var c2;class bwe extends tte{constructor(r,n){super(r);Ze(this,c2,void 0);Te(this,c2,l8(n))}async _poll(r,n){throw new Error("@TODO")}}c2=new WeakMap;var Kg;class wwe extends tte{constructor(r,n){super(r);Ze(this,Kg,void 0);Te(this,Kg,n)}async _poll(r,n){const i=await n.getTransactionReceipt(Y(this,Kg));i&&n.emit(Y(this,Kg),i)}}Kg=new WeakMap;var ll,Yg,Qg,$f,Ps,u2,rte;class n${constructor(e,r){Ze(this,u2);Ze(this,ll,void 0);Ze(this,Yg,void 0);Ze(this,Qg,void 0);Ze(this,$f,void 0);Ze(this,Ps,void 0);Te(this,ll,e),Te(this,Yg,l8(r)),Te(this,Qg,Et(this,u2,rte).bind(this)),Te(this,$f,!1),Te(this,Ps,-2)}start(){Y(this,$f)||(Te(this,$f,!0),Y(this,Ps)===-2&&Y(this,ll).getBlockNumber().then(e=>{Te(this,Ps,e)}),Y(this,ll).on("block",Y(this,Qg)))}stop(){Y(this,$f)&&(Te(this,$f,!1),Y(this,ll).off("block",Y(this,Qg)))}pause(e){this.stop(),e&&Te(this,Ps,-2)}resume(){this.start()}}ll=new WeakMap,Yg=new WeakMap,Qg=new WeakMap,$f=new WeakMap,Ps=new WeakMap,u2=new WeakSet,rte=async function(e){if(Y(this,Ps)===-2)return;const r=l8(Y(this,Yg));r.fromBlock=Y(this,Ps)+1,r.toBlock=e;const n=await Y(this,ll).getLogs(r);if(n.length===0){Y(this,Ps)<e-60&&Te(this,Ps,e-60);return}for(const i of n)Y(this,ll).emit(Y(this,Yg),i),Te(this,Ps,i.blockNumber)};const _we=BigInt(2),Ewe=10;function V_(t){return t&&typeof t.then=="function"}function ZE(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 nte{constructor(e){je(this,"name");Zt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function xwe(t){return JSON.parse(JSON.stringify(t))}function f8(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function cP(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(fi(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:ZE("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:ZE("orphan",r),filter:xwe(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(i=>i==null?null:Array.isArray(i)?f8(i.map(a=>a.toLowerCase())):i.toLowerCase())};if(r.address){const i=[],a=[],o=s=>{fi(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=f8(i.map(s=>s.toLowerCase()))}return{filter:n,tag:ZE("event",n),type:"event"}}$e(!1,"unknown ProviderEvent","event",t)}function uP(){return new Date().getTime()}const Awe={cacheTimeout:250,pollingInterval:4e3};var Ra,Mf,Ca,Jg,Yo,Lh,kf,fl,z1,Ts,Xg,Zg,Eo,ms,V1,d8,G1,h8,Uh,ib,W1,p8,Bh,ab,ey,ex;class Swe{constructor(e,r){Ze(this,Eo);Ze(this,V1);Ze(this,G1);Ze(this,Uh);Ze(this,W1);Ze(this,Bh);Ze(this,ey);Ze(this,Ra,void 0);Ze(this,Mf,void 0);Ze(this,Ca,void 0);Ze(this,Jg,void 0);Ze(this,Yo,void 0);Ze(this,Lh,void 0);Ze(this,kf,void 0);Ze(this,fl,void 0);Ze(this,z1,void 0);Ze(this,Ts,void 0);Ze(this,Xg,void 0);Ze(this,Zg,void 0);if(Te(this,Zg,Object.assign({},Awe,r||{})),e==="any")Te(this,Lh,!0),Te(this,Yo,null);else if(e){const n=bl.from(e);Te(this,Lh,!1),Te(this,Yo,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else Te(this,Lh,!1),Te(this,Yo,null);Te(this,fl,-1),Te(this,kf,new Map),Te(this,Ra,new Map),Te(this,Mf,new Map),Te(this,Ca,null),Te(this,Jg,!1),Te(this,z1,1),Te(this,Ts,new Map),Te(this,Xg,!1)}get pollingInterval(){return Y(this,Zg).pollingInterval}get provider(){return this}get plugins(){return Array.from(Y(this,Mf).values())}attachPlugin(e){if(Y(this,Mf).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return Y(this,Mf).set(e.name,e.connect(this)),this}getPlugin(e){return Y(this,Mf).get(e)||null}get disableCcipRead(){return Y(this,Xg)}set disableCcipRead(e){Te(this,Xg,!!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 ud(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 V1e(lwe(e),this)}_wrapLog(e,r){return new fw(cwe(e),this)}_wrapTransactionReceipt(e,r){return new Fee(pwe(e),this)}_wrapTransactionResponse(e,r){return new b1(Zee(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,Eo,ms).call(this,{method:"getBlockNumber"}),"%response");return Y(this,fl)>=0&&Te(this,fl,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(fi(e))return fi(e,32)?e:F0(e);if(typeof e=="bigint"&&(e=Gr(e,"blockTag")),typeof e=="number")return e>=0?F0(e):Y(this,fl)>=0?F0(Y(this,fl)+e):this.getBlockNumber().then(r=>F0(r+e));$e(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?f8(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=sA(e),n=[];if(["to","from"].forEach(i=>{if(r[i]==null)return;const a=ya(r[i],this);V_(a)?n.push(async function(){r[i]=await a}()):r[i]=a}),r.blockTag!=null){const i=this._getBlockTag(r.blockTag);V_(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,Yo)==null){const i=this._detectNetwork().then(a=>(this.emit("network",a,null),a),a=>{throw Y(this,Yo)===i&&Te(this,Yo,null),a});return Te(this,Yo,i),(await i).clone()}const e=Y(this,Yo),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(Y(this,Lh)?(this.emit("network",n,r),Y(this,Yo)===e&&Te(this,Yo,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,W1,p8).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await Et(this,Eo,ms).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*_we+s),new UB(a,o,s)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new ud(n.url),a=await n.processFunc(r,this,i);return new UB(a.gasPrice,a.maxFeePerGas,a.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return V_(r)&&(r=await r),or(await Et(this,Eo,ms).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,G1,h8).call(this,Et(this,V1,d8).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return or(await Et(this,Uh,ib).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return Gr(await Et(this,Uh,ib).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return xt(await Et(this,Uh,ib).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const i=or(r,"position");return xt(await Et(this,Uh,ib).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=y1.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,W1,p8).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,Eo,ms).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,Eo,ms).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await Et(this,Eo,ms).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,Eo,ms).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:xt(r)}async getLogs(e){let r=this._getFilter(e);V_(r)&&(r=await r);const{network:n,params:i}=await Na({network:this.getNetwork(),params:Et(this,Eo,ms).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 uA.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=i8(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await uA.getEnsAddress(this),a=await new Cb(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(a==null||a===X6)return null;const s=await new Cb(a,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(s)!==e?null:s}catch(n){if(ks(n,"BAD_DATA")&&n.value==="0x"||ks(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,Ts).get(e);r&&(r.timer&&clearTimeout(r.timer),Y(this,Ts).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=Am(this,z1)._++,i=()=>{Y(this,Ts).delete(n),e()};if(this.paused)Y(this,Ts).set(n,{timer:null,func:i,time:r});else{const a=setTimeout(i,r);Y(this,Ts).set(n,{timer:a,func:i,time:uP()})}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 nte(e.type);case"block":{const r=new vwe(this);return r.pollingInterval=this.pollingInterval,r}case"event":return new n$(this,e.filter);case"transaction":return new wwe(this,e.hash);case"orphan":return new bwe(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,ey,ex).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,ey,ex).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,Bh,ab).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 WX(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,Bh,ab).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,Bh,ab).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,Bh,ab).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,ey,ex).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,Jg)}destroy(){this.removeAllListeners();for(const e of Y(this,Ts).keys())this._clearTimeout(e);Te(this,Jg,!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,fl,-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,Ts).values())r.timer&&clearTimeout(r.timer),r.time=uP()-r.time}resume(){if(Y(this,Ca)!=null){this._forEachSubscriber(e=>e.resume()),Te(this,Ca,null);for(const e of Y(this,Ts).values()){let r=e.time;r<0&&(r=0),e.time=uP(),setTimeout(e.func,r)}}}}Ra=new WeakMap,Mf=new WeakMap,Ca=new WeakMap,Jg=new WeakMap,Yo=new WeakMap,Lh=new WeakMap,kf=new WeakMap,fl=new WeakMap,z1=new WeakMap,Ts=new WeakMap,Xg=new WeakMap,Zg=new WeakMap,Eo=new WeakSet,ms=async function(e){const r=Y(this,Zg).cacheTimeout;if(r<0)return await this._perform(e);const n=ZE(e.method,e);let i=Y(this,kf).get(n);return i||(i=this._perform(e),Y(this,kf).set(n,i),setTimeout(()=>{Y(this,kf).get(n)===i&&Y(this,kf).delete(n)},r)),await i},V1=new WeakSet,d8=async function(e,r,n){ct(n<Ewe,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:r,enableCcipRead:!0})});const i=sA(e);try{return xt(await this._perform({method:"call",transaction:i,blockTag:r}))}catch(a){if(!this.disableCcipRead&&DD(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=Rwe(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,Twe([u,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:f});try{const d=await Et(this,V1,d8).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}},G1=new WeakSet,h8=async function(e){const{value:r}=await Na({network:this.getNetwork(),value:e});return r},Uh=new WeakSet,ib=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,G1,h8).call(this,Et(this,Eo,ms).call(this,Object.assign(e,{address:i,blockTag:a})))},W1=new WeakSet,p8=async function(e,r){if(fi(e,32))return await Et(this,Eo,ms).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await Et(this,Eo,ms).call(this,{method:"getBlock",blockTag:n,includeTransactions:r})},Bh=new WeakSet,ab=async function(e,r){let n=await cP(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=await cP({orphan:"drop-log",log:r[0]},this)),Y(this,Ra).get(n.tag)||null},ey=new WeakSet,ex=async function(e){const r=await cP(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 Owe(t,e){try{const r=g8(t,e);if(r)return $D(r)}catch{}return null}function g8(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 GB(t){const e=Ro(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 Iwe(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const Pwe=new Uint8Array([]);function Twe(t){const e=[];let r=0;for(let n=0;n<t.length;n++)e.push(Pwe),r+=32;for(let n=0;n<t.length;n++){const i=Gt(t[n]);e[n]=GB(r),e.push(GB(i.length)),e.push(Iwe(i)),r+=32+Math.ceil(i.length/32)*32}return Gn(e)}const WB="0x0000000000000000000000000000000000000000000000000000000000000000";function Rwe(t){const e={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};ct(ag(t)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=Qn(t,0,32);ct(Qn(r,0,12)===Qn(WB,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=Owe(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=g8(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(WB,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),e.selector=Qn(t,96,100);try{const n=g8(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 a0(t,e){if(t.provider)return t.provider;ct(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function KB(t,e){let r=sA(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 i${constructor(e){je(this,"provider");Zt(this,{provider:e||null})}async getNonce(e){return a0(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await KB(this,e)}async populateTransaction(e){const r=a0(this,"populateTransaction"),n=await KB(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 a0(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return a0(this,"call").call(await this.populateCall(e))}async resolveName(e){return await a0(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=a0(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=y1.from(n);return await r.broadcastTransaction(await this.signTransaction(i))}}var ty,tx;const wL=class wL extends i${constructor(r,n){super(n);Ze(this,ty);je(this,"address");Zt(this,{address:r})}async getAddress(){return this.address}connect(r){return new wL(this.address,r)}async signTransaction(r){Et(this,ty,tx).call(this,"transactions","signTransaction")}async signMessage(r){Et(this,ty,tx).call(this,"messages","signMessage")}async signTypedData(r,n,i){Et(this,ty,tx).call(this,"typed-data","signTypedData")}};ty=new WeakSet,tx=function(r,n){ct(!1,`VoidSigner cannot sign ${r}`,"UNSUPPORTED_OPERATION",{operation:n})};let y8=wL;function Cwe(t){return JSON.parse(JSON.stringify(t))}var xo,ru,Fh,Lf,jh,ry,K1,m8,Y1,v8;class ite{constructor(e){Ze(this,K1);Ze(this,Y1);Ze(this,xo,void 0);Ze(this,ru,void 0);Ze(this,Fh,void 0);Ze(this,Lf,void 0);Ze(this,jh,void 0);Ze(this,ry,void 0);Te(this,xo,e),Te(this,ru,null),Te(this,Fh,Et(this,K1,m8).bind(this)),Te(this,Lf,!1),Te(this,jh,null),Te(this,ry,!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,Lf)||(Te(this,Lf,!0),Et(this,K1,m8).call(this,-2))}stop(){Y(this,Lf)&&(Te(this,Lf,!1),Te(this,ry,!0),Et(this,Y1,v8).call(this),Y(this,xo).off("block",Y(this,Fh)))}pause(e){e&&Et(this,Y1,v8).call(this),Y(this,xo).off("block",Y(this,Fh))}resume(){this.start()}}xo=new WeakMap,ru=new WeakMap,Fh=new WeakMap,Lf=new WeakMap,jh=new WeakMap,ry=new WeakMap,K1=new WeakSet,m8=async function(e){try{Y(this,ru)==null&&Te(this,ru,this._subscribe(Y(this,xo)));let r=null;try{r=await Y(this,ru)}catch(a){if(!ks(a,"UNSUPPORTED_OPERATION")||a.operation!=="eth_newFilter")throw a}if(r==null){Te(this,ru,null),Y(this,xo)._recoverSubscriber(this,this._recover(Y(this,xo)));return}const n=await Y(this,xo).getNetwork();if(Y(this,jh)||Te(this,jh,n),Y(this,jh).chainId!==n.chainId)throw new Error("chaid changed");if(Y(this,ry))return;const i=await Y(this,xo).send("eth_getFilterChanges",[r]);await this._emitResults(Y(this,xo),i)}catch(r){console.log("@TODO",r)}Y(this,xo).once("block",Y(this,Fh))},Y1=new WeakSet,v8=function(){const e=Y(this,ru);e&&(Te(this,ru,null),e.then(r=>{Y(this,xo).send("eth_uninstallFilter",[r])}))};var qh;class Nwe extends ite{constructor(r,n){super(r);Ze(this,qh,void 0);Te(this,qh,Cwe(n))}_recover(r){return new n$(r,Y(this,qh))}async _subscribe(r){return await r.send("eth_newFilter",[Y(this,qh)])}async _emitResults(r,n){for(const i of n)r.emit(Y(this,qh),r._wrapLog(i,r._network))}}qh=new WeakMap;class Dwe extends ite{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const $we="bigint,boolean,function,number,string,symbol".split(/,/g);function rx(t){if(t==null||$we.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(rx);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 Mwe(t){return new Promise(e=>{setTimeout(e,t)})}function o0(t){return t&&t.toLowerCase()}function YB(t){return t&&typeof t.pollingInterval=="number"}const kwe={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class lP extends i${constructor(r,n){super(r);je(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=rx(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=rx(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"?oo(r):r;return await this.provider.send("personal_sign",[xt(n),this.address.toLowerCase()])}async signTypedData(r,n,i){const a=rx(i),o=await vy.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(vy.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"?oo(r):r;return await this.provider.send("eth_sign",[this.address.toLowerCase(),xt(n)])}}var Hh,ny,dl,nu,vc,hl,Q1,b8;class Lwe extends Swe{constructor(r,n){super(r,n);Ze(this,Q1);Ze(this,Hh,void 0);Ze(this,ny,void 0);Ze(this,dl,void 0);Ze(this,nu,void 0);Ze(this,vc,void 0);Ze(this,hl,void 0);Te(this,ny,1),Te(this,Hh,Object.assign({},kwe,n||{})),Te(this,dl,[]),Te(this,nu,null),Te(this,hl,null);{let a=null;const o=new Promise(s=>{a=s});Te(this,vc,{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,hl,i))}_getOption(r){return Y(this,Hh)[r]}get _network(){return ct(Y(this,hl),"network is not available yet","NETWORK_ERROR"),Y(this,hl)}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 bl.from(or(await this.send("eth_chainId",[])));const n={id:Am(this,ny)._++,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 bl.from(or(i.result));throw this.getRpcError(n,i)}_start(){Y(this,vc)==null||Y(this,vc).resolve==null||(Y(this,vc).resolve(),Te(this,vc,null),(async()=>{for(;Y(this,hl)==null&&!this.destroyed;)try{Te(this,hl,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 Mwe(1e3)}Et(this,Q1,b8).call(this)})())}async _waitUntilReady(){if(Y(this,vc)!=null)return await Y(this,vc).promise}_getSubscriber(r){return r.type==="pending"?new Dwe(this):r.type==="event"?this._getOption("polling")?new n$(this,r.filter):new Nwe(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new nte("orphan"):super._getSubscriber(r)}get ready(){return Y(this,vc)==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]=F0(or(r[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{r[i]!=null&&(n[i]=xt(r[i]))}),r.accessList&&(n.accessList=wp(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:[o0(r.address),r.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[o0(r.address),r.blockTag]};case"getCode":return{method:"eth_getCode",args:[o0(r.address),r.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[o0(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(o0):r.filter.address=o0(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=w8(a),u=v1.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(Bwe(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=Am(this,ny)._++,a=new Promise((o,s)=>{Y(this,dl).push({resolve:o,reject:s,payload:{method:r,params:n,id:i,jsonrpc:"2.0"}})});return Et(this,Q1,b8).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 lP(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 lP(this,r);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new lP(this,n))}destroy(){Y(this,nu)&&(clearTimeout(Y(this,nu)),Te(this,nu,null));for(const{payload:r,reject:n}of Y(this,dl))n(Bi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r.method}));Te(this,dl,[]),super.destroy()}}Hh=new WeakMap,ny=new WeakMap,dl=new WeakMap,nu=new WeakMap,vc=new WeakMap,hl=new WeakMap,Q1=new WeakSet,b8=function(){if(Y(this,nu))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");Te(this,nu,setTimeout(()=>{Te(this,nu,null);const n=Y(this,dl);for(Te(this,dl,[]);n.length;){const i=[n.shift()];for(;n.length&&i.length!==Y(this,Hh).batchMaxCount;)if(i.push(n.shift()),JSON.stringify(i.map(o=>o.payload)).length>Y(this,Hh).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 Uf;class Uwe extends Lwe{constructor(r,n){super(r,n);Ze(this,Uf,void 0);Te(this,Uf,4e3)}_getSubscriber(r){const n=super._getSubscriber(r);return YB(n)&&(n.pollingInterval=Y(this,Uf)),n}get pollingInterval(){return Y(this,Uf)}set pollingInterval(r){if(!Number.isInteger(r)||r<0)throw new Error("invalid interval");Te(this,Uf,r),this._forEachSubscriber(n=>{YB(n)&&(n.pollingInterval=Y(this,Uf))})}}Uf=new WeakMap;function w8(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&fi(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=w8(t[e]);if(r)return r}return null}if(typeof t=="string")try{return w8(JSON.parse(t))}catch{}return null}function _8(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)_8(t[r],e);if(typeof t=="string")try{return _8(JSON.parse(t),e)}catch{}}}function Bwe(t){const e=[];return _8(t,e),e}var iy;class ate extends Uwe{constructor(r,n){super(n,{batchMaxCount:1});Ze(this,iy,void 0);Te(this,iy,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,iy).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,iy).call(this,"eth_requestAccounts",[])}catch(n){const i=n.payload;throw this.getRpcError(i,{id:i.id,error:n})}return await super.getSigner(r)}}iy=new WeakMap;var ay;const _L=class _L extends i${constructor(r,n){super(n);je(this,"address");Ze(this,ay,void 0);$e(r&&typeof r.sign=="function","invalid private key","privateKey","[ REDACTED ]"),Te(this,ay,r);const i=lw(this.signingKey.publicKey);Zt(this,{address:i})}get signingKey(){return Y(this,ay)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(r){return new _L(Y(this,ay),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=y1.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(w1e(r)).serialized}async signTypedData(r,n,i){const a=await vy.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(vy.hash(a.domain,n,a.value)).serialized}};ay=new WeakMap;let lA=_L;const fA=" !#$%&'()*+,-./<=>?@[]^_`{|}~",Fwe=/^[a-z]*$/i;function QB(t,e){let r=97;return t.reduce((n,i)=>(i===e?r++:i.match(Fwe)?n.push(String.fromCharCode(r)+i):(r=97,n.push(i)),n),[])}function jwe(t,e){for(let i=fA.length-1;i>=0;i--)t=t.split(fA[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 QB(QB(r,";"),":")}function qwe(t){return $e(t[0]==="0","unsupported auwl data","data",t),jwe(t.substring(1+2*fA.length),t.substring(1,1+2*fA.length))}class Hwe{constructor(e){je(this,"locale");Zt(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var oy,J1,zh,X1,E8;class zwe extends Hwe{constructor(r,n,i){super(r);Ze(this,X1);Ze(this,oy,void 0);Ze(this,J1,void 0);Ze(this,zh,void 0);Te(this,oy,n),Te(this,J1,i),Te(this,zh,null)}get _data(){return Y(this,oy)}_decodeWords(){return qwe(Y(this,oy))}getWord(r){const n=Et(this,X1,E8).call(this);return $e(r>=0&&r<n.length,`invalid word index: ${r}`,"index",r),n[r]}getWordIndex(r){return Et(this,X1,E8).call(this).indexOf(r)}}oy=new WeakMap,J1=new WeakMap,zh=new WeakMap,X1=new WeakSet,E8=function(){if(Y(this,zh)==null){const r=this._decodeWords();if(Nl(r.join(`
|
|
70
|
+
`)+`
|
|
71
|
+
`)!==Y(this,J1))throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);Te(this,zh,r)}return Y(this,zh)};const Vwe="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",Gwe="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60";let fP=null;class sp extends zwe{constructor(){super("en",Vwe,Gwe)}static wordlist(){return fP==null&&(fP=new sp),fP}}function ote(t){return(1<<t)-1<<8-t&255}function Wwe(t){return(1<<t)-1&255}function dP(t,e){jX("NFKD"),e==null&&(e=sp.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=ote(o),c=Gt(Tc(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 hP(t,e){$e(t.length%4===0&&t.length>=16&&t.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),e==null&&(e=sp.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]&Wwe(8-n)),n+=3);const i=t.length/4,a=parseInt(Tc(t).substring(2,4),16)&ote(i);return r[r.length-1]<<=i,r[r.length-1]|=a>>8-i,e.join(r.map(o=>e.getWord(o)))}const pP={};class wy{constructor(e,r,n,i,a){je(this,"phrase");je(this,"password");je(this,"wordlist");je(this,"entropy");i==null&&(i=""),a==null&&(a=sp.wordlist()),bp(e,pP,"Mnemonic"),Zt(this,{phrase:n,password:i,wordlist:a,entropy:r})}computeSeed(){const e=oo("mnemonic"+this.password,"NFKD");return gd(oo(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,r,n){const i=dP(e,n);return e=hP(Gt(i),n),new wy(pP,i,e,r,n)}static fromEntropy(e,r,n){const i=Gt(e,"entropy"),a=hP(i,n);return new wy(pP,xt(i),a,r,n)}static entropyToPhrase(e,r){const n=Gt(e,"entropy");return hP(n,r)}static phraseToEntropy(e,r){return dP(e,r)}static isValidMnemonic(e,r){try{return dP(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)},gP=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},nx,vs,Yc;const Kwe={16:10,24:12,32:14},Ywe=[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],gs=[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],G_=[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],Qwe=[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],Jwe=[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],Xwe=[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],Zwe=[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],e_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],t_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],r_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],n_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],i_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],o_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],s_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 yP(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 a${get key(){return ia(this,nx,"f").slice()}constructor(e){if(nx.set(this,void 0),vs.set(this,void 0),Yc.set(this,void 0),!(this instanceof a$))throw Error("AES must be instanitated with `new`");gP(this,nx,new Uint8Array(e),"f");const r=Kwe[this.key.length];if(r==null)throw new TypeError("invalid key size (must be 16, 24 or 32 bytes)");gP(this,Yc,[],"f"),gP(this,vs,[],"f");for(let f=0;f<=r;f++)ia(this,Yc,"f").push([0,0,0,0]),ia(this,vs,"f").push([0,0,0,0]);const n=(r+1)*4,i=this.key.length/4,a=yP(this.key);let o;for(let f=0;f<i;f++)o=f>>2,ia(this,Yc,"f")[o][f%4]=a[f],ia(this,vs,"f")[r-o][f%4]=a[f];let s=0,c=i,u;for(;c<n;){if(u=a[i-1],a[0]^=gs[u>>16&255]<<24^gs[u>>8&255]<<16^gs[u&255]<<8^gs[u>>24&255]^Ywe[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]^=gs[u&255]^gs[u>>8&255]<<8^gs[u>>16&255]<<16^gs[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,Yc,"f")[d][g]=a[f],ia(this,vs,"f")[r-d][g]=a[f++],c++}for(let f=1;f<r;f++)for(let d=0;d<4;d++)u=ia(this,vs,"f")[f][d],ia(this,vs,"f")[f][d]=i_e[u>>24&255]^a_e[u>>16&255]^o_e[u>>8&255]^s_e[u&255]}encrypt(e){if(e.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const r=ia(this,Yc,"f").length-1,n=[0,0,0,0];let i=yP(e);for(let s=0;s<4;s++)i[s]^=ia(this,Yc,"f")[0][s];for(let s=1;s<r;s++){for(let c=0;c<4;c++)n[c]=Qwe[i[c]>>24&255]^Jwe[i[(c+1)%4]>>16&255]^Xwe[i[(c+2)%4]>>8&255]^Zwe[i[(c+3)%4]&255]^ia(this,Yc,"f")[s][c];i=n.slice()}const a=new Uint8Array(16);let o=0;for(let s=0;s<4;s++)o=ia(this,Yc,"f")[r][s],a[4*s]=(gs[i[s]>>24&255]^o>>24)&255,a[4*s+1]=(gs[i[(s+1)%4]>>16&255]^o>>16)&255,a[4*s+2]=(gs[i[(s+2)%4]>>8&255]^o>>8)&255,a[4*s+3]=(gs[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,vs,"f").length-1,n=[0,0,0,0];let i=yP(e);for(let s=0;s<4;s++)i[s]^=ia(this,vs,"f")[0][s];for(let s=1;s<r;s++){for(let c=0;c<4;c++)n[c]=e_e[i[c]>>24&255]^t_e[i[(c+3)%4]>>16&255]^r_e[i[(c+2)%4]>>8&255]^n_e[i[(c+1)%4]&255]^ia(this,vs,"f")[s][c];i=n.slice()}const a=new Uint8Array(16);let o=0;for(let s=0;s<4;s++)o=ia(this,vs,"f")[r][s],a[4*s]=(G_[i[s]>>24&255]^o>>24)&255,a[4*s+1]=(G_[i[(s+3)%4]>>16&255]^o>>16)&255,a[4*s+2]=(G_[i[(s+2)%4]>>8&255]^o>>8)&255,a[4*s+3]=(G_[i[(s+1)%4]&255]^o)&255;return a}}nx=new WeakMap,vs=new WeakMap,Yc=new WeakMap;class ste{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 a$(r)},name:{enumerable:!0,value:e}})}}var W_=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},s0=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)},ob,Yu;class o$ extends ste{constructor(e,r){if(super("ECC",e,o$),ob.set(this,void 0),Yu.set(this,void 0),r){if(r.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");W_(this,ob,new Uint8Array(r),"f")}else W_(this,ob,new Uint8Array(16),"f");W_(this,Yu,this.iv,"f")}get iv(){return new Uint8Array(s0(this,ob,"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++)s0(this,Yu,"f")[i]^=e[n+i];W_(this,Yu,this.aes.encrypt(s0(this,Yu,"f")),"f"),r.set(s0(this,Yu,"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]^s0(this,Yu,"f")[a],s0(this,Yu,"f")[a]=e[n+a]}return r}}ob=new WeakMap,Yu=new WeakMap;var c0=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},ys=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)},sb,oh,bs;class _y extends ste{constructor(e,r){super("CTR",e,_y),sb.set(this,void 0),oh.set(this,void 0),bs.set(this,void 0),c0(this,bs,new Uint8Array(16),"f"),ys(this,bs,"f").fill(0),c0(this,sb,ys(this,bs,"f"),"f"),c0(this,oh,16,"f"),r==null&&(r=1),typeof r=="number"?this.setCounterValue(r):this.setCounterBytes(r)}get counter(){return new Uint8Array(ys(this,bs,"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)ys(this,bs,"f")[r]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(e.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");ys(this,bs,"f").set(e)}increment(){for(let e=15;e>=0;e--)if(ys(this,bs,"f")[e]===255)ys(this,bs,"f")[e]=0;else{ys(this,bs,"f")[e]++;break}}encrypt(e){var r,n;const i=new Uint8Array(e);for(let a=0;a<i.length;a++)ys(this,oh,"f")===16&&(c0(this,sb,this.aes.encrypt(ys(this,bs,"f")),"f"),c0(this,oh,0,"f"),this.increment()),i[a]^=ys(this,sb,"f")[c0(this,oh,(n=ys(this,oh,"f"),r=n++,n),"f"),r];return i}decrypt(e){return this.encrypt(e)}}sb=new WeakMap,oh=new WeakMap,bs=new WeakMap;function c_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 cte(t){return typeof t=="string"&&!t.startsWith("0x")&&(t="0x"+t),Ba(t)}function Bm(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}function pw(t){return typeof t=="string"?oo(t,"NFKC"):Ba(t)}function _i(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 cte(o);if(i==="array"&&Array.isArray(o)||i===typeof o)return o;$e(!1,`wrong type found for ${i} `,"path",n)}return o}const ute="m/44'/60'/0'/0/0";function JB(t){try{const e=JSON.parse(t);if((e.version!=null?parseInt(e.version):0)===3)return!0}catch{}return!1}function u_e(t,e,r){if(_i(t,"crypto.cipher:string")==="aes-128-ctr"){const i=_i(t,"crypto.cipherparams.iv:data!"),a=new _y(e,i);return xt(a.decrypt(r))}ct(!1,"unsupported cipher","UNSUPPORTED_OPERATION",{operation:"decrypt"})}function dA(t,e){const r=Gt(e),n=_i(t,"crypto.ciphertext:data!"),i=xt(Vn(Gn([r.slice(16,32),n]))).substring(2);$e(i===_i(t,"crypto.mac:string!").toLowerCase(),"incorrect password","password","[ REDACTED ]");const a=u_e(t,r.slice(0,16),n),o=lw(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(_i(t,"x-ethers.version:string")==="0.1"){const u=r.slice(32,64),f=_i(t,"x-ethers.mnemonicCiphertext:data!"),d=_i(t,"x-ethers.mnemonicCounter:data!"),g=new _y(u,d);s.mnemonic={path:_i(t,"x-ethers.path:string")||ute,locale:_i(t,"x-ethers.locale:string")||"en",entropy:xt(Gt(g.decrypt(f)))}}return s}function lte(t){const e=_i(t,"crypto.kdf:string");if(e&&typeof e=="string"){if(e.toLowerCase()==="scrypt"){const r=_i(t,"crypto.kdfparams.salt:data!"),n=_i(t,"crypto.kdfparams.n:int!"),i=_i(t,"crypto.kdfparams.r:int!"),a=_i(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=_i(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=_i(t,"crypto.kdfparams.salt:data!"),n=_i(t,"crypto.kdfparams.prf:string!"),i=n.split("-").pop();$e(i==="sha256"||i==="sha512","invalid kdf.pdf","kdf.pdf",n);const a=_i(t,"crypto.kdfparams.c:int!"),o=_i(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 l_e(t,e){const r=JSON.parse(t),n=pw(e),i=lte(r);if(i.name==="pbkdf2"){const{salt:d,count:g,dkLen:m,algorithm:w}=i,v=gd(n,d,g,m,w);return dA(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=Ky(n,a,o,s,c,u);return dA(r,f)}function XB(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}async function f_e(t,e,r){const n=JSON.parse(t),i=pw(e),a=lte(n);if(a.name==="pbkdf2"){r&&(r(0),await XB(0));const{salt:g,count:m,dkLen:w,algorithm:v}=a,y=gd(i,g,m,w,v);return r&&(r(1),await XB(0)),dA(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 Wy(i,o,s,c,u,f,r);return dA(n,d)}function fte(t){const e=t.salt!=null?Gt(t.salt,"options.salt"):xl(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 dte(t,e,r,n){const i=Gt(r.privateKey,"privateKey"),a=n.iv!=null?Gt(n.iv,"options.iv"):xl(16);$e(a.length===16,"invalid options.iv length","options.iv",n.iv);const o=n.uuid!=null?Gt(n.uuid,"options.uuid"):xl(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 _y(s,a),f=Gt(u.encrypt(i)),d=Vn(Gn([c,f])),g={address:r.address.substring(2).toLowerCase(),id:xme(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/${BX}`,w=r.mnemonic.path||ute,v=r.mnemonic.locale||"en",y=t.slice(32,64),_=Gt(r.mnemonic.entropy,"account.mnemonic.entropy"),b=xl(16),S=new _y(y,b),x=Gt(S.encrypt(_)),O=new Date,p="UTC--"+(O.getUTCFullYear()+"-"+Bm(O.getUTCMonth()+1,2)+"-"+Bm(O.getUTCDate(),2)+"T"+Bm(O.getUTCHours(),2)+"-"+Bm(O.getUTCMinutes(),2)+"-"+Bm(O.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 hte(t,e,r){r==null&&(r={});const n=pw(e),i=fte(r),a=Ky(n,i.salt,i.N,i.r,i.p,64);return dte(Gt(a),i,t,r)}async function pte(t,e,r){r==null&&(r={});const n=pw(e),i=fte(r),a=await Wy(n,i.salt,i.N,i.r,i.p,64,r.progressCallback);return dte(Gt(a),i,t,r)}const mP="m/44'/60'/0'/0/0",d_e=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),rd=2147483648,h_e=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),p_e="0123456789abcdef";function hA(t,e){let r="";for(;t;)r=p_e[t%16]+r,t=Math.trunc(t/16);for(;r.length<e*2;)r="0"+r;return"0x"+r}function x8(t){const e=Gt(t),r=Qn(Tc(Tc(e)),0,4),n=Gn([e,r]);return GX(n)}const Qc={};function gte(t,e,r,n){const i=new Uint8Array(37);t&rd?(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(Vy("sha512",e,i));return{IL:a.slice(0,32),IR:a.slice(32)}}function yte(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<rd,"invalid path index",`path[${i}]`,a),n=n.deriveChild(rd+o)}else if(a.match(/^[0-9]+$/)){const o=parseInt(a);$e(o<rd,"invalid path index",`path[${i}]`,a),n=n.deriveChild(o)}else $e(!1,"invalid path component",`path[${i}]`,a)}return n}var Z1,A8,Vh,cb;const fc=class fc extends lA{constructor(r,n,i,a,o,s,c,u,f){super(n,f);Ze(this,Z1);je(this,"publicKey");je(this,"fingerprint");je(this,"parentFingerprint");je(this,"mnemonic");je(this,"chainCode");je(this,"path");je(this,"index");je(this,"depth");bp(r,Qc,"HDNodeWallet"),Zt(this,{publicKey:n.compressedPublicKey});const d=Qn(Gy(Tc(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 fc(Qc,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,r)}async encrypt(r,n){return await pte(Et(this,Z1,A8).call(this),r,{progressCallback:n})}encryptSync(r){return hte(Et(this,Z1,A8).call(this),r)}get extendedKey(){return ct(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),x8(Gn(["0x0488ADE4",hA(this.depth,1),this.parentFingerprint,hA(this.index,4),this.chainCode,Gn(["0x00",this.privateKey])]))}hasPath(){return this.path!=null}neuter(){return new w1(Qc,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&~rd),n&rd&&(i+="'"));const{IR:a,IL:o}=gte(n,this.chainCode,this.publicKey,this.privateKey),s=new mu(Cl((R2(o)+BigInt(this.privateKey))%h_e,32));return new fc(Qc,s,this.fingerprint,xt(a),i,n,this.depth+1,this.mnemonic,this.provider)}derivePath(r){return yte(this,r)}static fromExtendedKey(r){const n=Ro(sme(r));$e(n.length===82||x8(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 w1(Qc,lw(u),u,a,s,null,o,i,null)}case"0x0488ade4":case"0x04358394 ":if(c[0]!==0)break;return new fc(Qc,new mu(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=mP),i==null&&(i=sp.wordlist());const a=wy.fromEntropy(xl(16),r,i);return Et(o=fc,Vh,cb).call(o,a.computeSeed(),a).derivePath(n)}static fromMnemonic(r,n){var i;return n||(n=mP),Et(i=fc,Vh,cb).call(i,r.computeSeed(),r).derivePath(n)}static fromPhrase(r,n,i,a){var s;n==null&&(n=""),i==null&&(i=mP),a==null&&(a=sp.wordlist());const o=wy.fromPhrase(r,n,a);return Et(s=fc,Vh,cb).call(s,o.computeSeed(),o).derivePath(i)}static fromSeed(r){var n;return Et(n=fc,Vh,cb).call(n,r,null)}};Z1=new WeakSet,A8=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},Vh=new WeakSet,cb=function(r,n){$e(HX(r),"invalid seed","seed","[REDACTED]");const i=Gt(r,"seed");$e(i.length>=16&&i.length<=64,"invalid seed","seed","[REDACTED]");const a=Gt(Vy("sha512",d_e,i)),o=new mu(xt(a.slice(0,32)));return new fc(Qc,o,"0x00000000",xt(a.slice(32)),"m",0,0,n,null)},Ze(fc,Vh);let Nb=fc;class w1 extends y8{constructor(r,n,i,a,o,s,c,u,f){super(n,f);je(this,"publicKey");je(this,"fingerprint");je(this,"parentFingerprint");je(this,"chainCode");je(this,"path");je(this,"index");je(this,"depth");bp(r,Qc,"HDNodeVoidWallet"),Zt(this,{publicKey:i});const d=Qn(Gy(Tc(i)),0,4);Zt(this,{publicKey:i,fingerprint:d,parentFingerprint:a,chainCode:o,path:s,index:c,depth:u})}connect(r){return new w1(Qc,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"}),x8(Gn(["0x0488B21E",hA(this.depth,1),this.parentFingerprint,hA(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&~rd),n&rd&&(i+="'"));const{IR:a,IL:o}=gte(n,this.chainCode,this.publicKey,null),s=mu.addPoints(o,this.publicKey,!0),c=lw(s);return new w1(Qc,c,s,this.fingerprint,xt(a),i,n,this.depth+1,this.provider)}derivePath(r){return yte(this,r)}}function ZB(t){try{if(JSON.parse(t).encseed)return!0}catch{}return!1}function eF(t,e){const r=JSON.parse(t),n=pw(e),i=ln(_i(r,"ethaddr:string!")),a=cte(_i(r,"encseed:string!"));$e(a&&a.length%16===0,"invalid encseed","json",t);const o=Gt(gd(n,n,2e3,32,"sha256")).slice(0,16),s=a.slice(0,16),c=a.slice(16),u=new o$(o,s),f=c_e(Gt(u.decrypt(c)));let d="";for(let g=0;g<f.length;g++)d+=String.fromCharCode(f[g]);return{address:i,privateKey:Nl(d)}}function tF(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}var ew,O8;const dh=class dh extends lA{constructor(e,r){typeof e=="string"&&!e.startsWith("0x")&&(e="0x"+e);let n=typeof e=="string"?new mu(e):e;super(n,r)}connect(e){return new dh(this.signingKey,e)}async encrypt(e,r){const n={address:this.address,privateKey:this.privateKey};return await pte(n,e,{progressCallback:r})}encryptSync(e){const r={address:this.address,privateKey:this.privateKey};return hte(r,e)}static async fromEncryptedJson(e,r,n){var a;let i=null;return JB(e)?i=await f_e(e,r,n):ZB(e)&&(n&&(n(0),await tF(0)),i=eF(e,r),n&&(n(1),await tF(0))),Et(a=dh,ew,O8).call(a,i)}static fromEncryptedJsonSync(e,r){var i;let n=null;return JB(e)?n=l_e(e,r):ZB(e)?n=eF(e,r):$e(!1,"invalid JSON wallet","json","[ REDACTED ]"),Et(i=dh,ew,O8).call(i,n)}static createRandom(e){const r=Nb.createRandom();return e?r.connect(e):r}static fromPhrase(e,r){const n=Nb.fromPhrase(e);return r?n.connect(r):n}};ew=new WeakSet,O8=function(e){if($e(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&e.mnemonic.locale==="en"){const n=wy.fromEntropy(e.mnemonic.entropy),i=Nb.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 dh(e.privateKey);return $e(r.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),r},Ze(dh,ew);let S8=dh;const wu=Object.create(null);wu.open="0";wu.close="1";wu.ping="2";wu.pong="3";wu.message="4";wu.upgrade="5";wu.noop="6";const ix=Object.create(null);Object.keys(wu).forEach(t=>{ix[wu[t]]=t});const I8={type:"error",data:"parser error"},mte=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",vte=typeof ArrayBuffer=="function",bte=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,s$=({type:t,data:e},r,n)=>mte&&e instanceof Blob?r?n(e):rF(e,n):vte&&(e instanceof ArrayBuffer||bte(e))?r?n(e):rF(new Blob([e]),n):n(wu[t]+(e||"")),rF=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function nF(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let vP;function g_e(t,e){if(mte&&t.data instanceof Blob)return t.data.arrayBuffer().then(nF).then(e);if(vte&&(t.data instanceof ArrayBuffer||bte(t.data)))return e(nF(t.data));s$(t,!1,r=>{vP||(vP=new TextEncoder),e(vP.encode(r))})}const iF="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ub=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<iF.length;t++)ub[iF.charCodeAt(t)]=t;const y_e=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=ub[t.charCodeAt(n)],o=ub[t.charCodeAt(n+1)],s=ub[t.charCodeAt(n+2)],c=ub[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},m_e=typeof ArrayBuffer=="function",c$=(t,e)=>{if(typeof t!="string")return{type:"message",data:wte(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:v_e(t.substring(1),e)}:ix[r]?t.length>1?{type:ix[r],data:t.substring(1)}:{type:ix[r]}:I8},v_e=(t,e)=>{if(m_e){const r=y_e(t);return wte(r,e)}else return{base64:!0,data:t}},wte=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},_te=String.fromCharCode(30),b_e=(t,e)=>{const r=t.length,n=new Array(r);let i=0;t.forEach((a,o)=>{s$(a,!1,s=>{n[o]=s,++i===r&&e(n.join(_te))})})},w_e=(t,e)=>{const r=t.split(_te),n=[];for(let i=0;i<r.length;i++){const a=c$(r[i],e);if(n.push(a),a.type==="error")break}return n};function __e(){return new TransformStream({transform(t,e){g_e(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 bP;function K_(t){return t.reduce((e,r)=>e+r.length,0)}function Y_(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 E_e(t,e){bP||(bP=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(K_(r)<1)break;const c=Y_(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(K_(r)<2)break;const c=Y_(r,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(K_(r)<8)break;const c=Y_(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(I8);break}i=f*Math.pow(2,32)+u.getUint32(4),n=3}else{if(K_(r)<i)break;const c=Y_(r,i);s.enqueue(c$(a?c:bP.decode(c),e)),n=0}if(i===0||i>t){s.enqueue(I8);break}}}})}const Ete=4;function Ni(t){if(t)return x_e(t)}function x_e(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 Ns=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function xte(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const A_e=Ns.setTimeout,S_e=Ns.clearTimeout;function q2(t,e){e.useNativeTimers?(t.setTimeoutFn=A_e.bind(Ns),t.clearTimeoutFn=S_e.bind(Ns)):(t.setTimeoutFn=Ns.setTimeout.bind(Ns),t.clearTimeoutFn=Ns.clearTimeout.bind(Ns))}const O_e=1.33;function I_e(t){return typeof t=="string"?P_e(t):Math.ceil((t.byteLength||t.size)*O_e)}function P_e(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 T_e(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function R_e(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 C_e extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class u$ extends Ni{constructor(e){super(),this.writable=!1,q2(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,r,n){return super.emitReserved("error",new C_e(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=c$(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=T_e(e);return r.length?"?"+r:""}}const Ate="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),P8=64,N_e={};let aF=0,Q_=0,oF;function sF(t){let e="";do e=Ate[t%P8]+e,t=Math.floor(t/P8);while(t>0);return e}function Ste(){const t=sF(+new Date);return t!==oF?(aF=0,oF=t):t+"."+sF(aF++)}for(;Q_<P8;Q_++)N_e[Ate[Q_]]=Q_;let Ote=!1;try{Ote=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const D_e=Ote;function Ite(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||D_e))return new XMLHttpRequest}catch{}if(!e)try{return new Ns[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function $_e(){}const M_e=function(){return new Ite({xdomain:!1}).responseType!=null}();class k_e extends u${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=M_e&&!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)};w_e(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,b_e(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]=Ste()),!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 vu(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 vu extends Ni{constructor(e,r){super(),q2(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=xte(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const n=this.xhr=new Ite(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=vu.requestsCount++,vu.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=$_e,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete vu.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()}}vu.requestsCount=0;vu.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",cF);else if(typeof addEventListener=="function"){const t="onpagehide"in Ns?"pagehide":"unload";addEventListener(t,cF,!1)}}function cF(){for(let t in vu.requests)vu.requests.hasOwnProperty(t)&&vu.requests[t].abort()}var su=[],Ss=[],L_e=typeof Uint8Array<"u"?Uint8Array:Array,l$=!1;function Pte(){l$=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)su[e]=t[e],Ss[t.charCodeAt(e)]=e;Ss["-".charCodeAt(0)]=62,Ss["_".charCodeAt(0)]=63}function U_e(t){l$||Pte();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 L_e(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=Ss[t.charCodeAt(e)]<<18|Ss[t.charCodeAt(e+1)]<<12|Ss[t.charCodeAt(e+2)]<<6|Ss[t.charCodeAt(e+3)],o[c++]=i>>16&255,o[c++]=i>>8&255,o[c++]=i&255;return a===2?(i=Ss[t.charCodeAt(e)]<<2|Ss[t.charCodeAt(e+1)]>>4,o[c++]=i&255):a===1&&(i=Ss[t.charCodeAt(e)]<<10|Ss[t.charCodeAt(e+1)]<<4|Ss[t.charCodeAt(e+2)]>>2,o[c++]=i>>8&255,o[c++]=i&255),o}function B_e(t){return su[t>>18&63]+su[t>>12&63]+su[t>>6&63]+su[t&63]}function F_e(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(B_e(n));return i.join("")}function uF(t){l$||Pte();for(var e,r=t.length,n=r%3,i="",a=[],o=16383,s=0,c=r-n;s<c;s+=o)a.push(F_e(t,s,s+o>c?c:s+o));return n===1?(e=t[r-1],i+=su[e>>2],i+=su[e<<4&63],i+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],i+=su[e>>10],i+=su[e>>4&63],i+=su[e<<2&63],i+="="),a.push(i),a.join("")}function H2(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 Tte(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 j_e={}.toString,Rte=Array.isArray||function(t){return j_e.call(t)=="[object Array]"};/*!
|
|
72
|
+
* The buffer module from node.js, for the browser.
|
|
73
|
+
*
|
|
74
|
+
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
75
|
+
* @license MIT
|
|
76
|
+
*/var q_e=50;ut.TYPED_ARRAY_SUPPORT=bn.TYPED_ARRAY_SUPPORT!==void 0?bn.TYPED_ARRAY_SUPPORT:!0;pA();function pA(){return ut.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function wl(t,e){if(pA()<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 f$(this,t)}return Cte(this,t,e,r)}ut.poolSize=8192;ut._augment=function(t){return t.__proto__=ut.prototype,t};function Cte(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?V_e(t,e,r,n):typeof e=="string"?z_e(t,e,r):G_e(t,e)}ut.from=function(t,e,r){return Cte(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 Nte(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 H_e(t,e,r,n){return Nte(e),e<=0?wl(t,e):r!==void 0?typeof n=="string"?wl(t,e).fill(r,n):wl(t,e).fill(r):wl(t,e)}ut.alloc=function(t,e,r){return H_e(null,t,e,r)};function f$(t,e){if(Nte(e),t=wl(t,e<0?0:d$(e)|0),!ut.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}ut.allocUnsafe=function(t){return f$(null,t)};ut.allocUnsafeSlow=function(t){return f$(null,t)};function z_e(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=Dte(e,r)|0;t=wl(t,n);var i=t.write(e,r);return i!==n&&(t=t.slice(0,i)),t}function T8(t,e){var r=e.length<0?0:d$(e.length)|0;t=wl(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function V_e(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=T8(t,e),t}function G_e(t,e){if(_u(e)){var r=d$(e.length)|0;return t=wl(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"||fEe(e.length)?wl(t,0):T8(t,e);if(e.type==="Buffer"&&Rte(e.data))return T8(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d$(t){if(t>=pA())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pA().toString(16)+" bytes");return t|0}ut.isBuffer=dEe;function _u(t){return!!(t!=null&&t._isBuffer)}ut.compare=function(e,r){if(!_u(e)||!_u(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(!Rte(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(!_u(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function Dte(t,e){if(_u(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 gA(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Fte(t).length;default:if(n)return gA(t).length;e=(""+e).toLowerCase(),n=!0}}ut.byteLength=Dte;function W_e(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 nEe(this,e,r);case"utf8":case"utf-8":return kte(this,e,r);case"ascii":return tEe(this,e,r);case"latin1":case"binary":return rEe(this,e,r);case"base64":return Z_e(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return iEe(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}ut.prototype._isBuffer=!0;function _h(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)_h(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)_h(this,r,r+3),_h(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)_h(this,r,r+7),_h(this,r+1,r+6),_h(this,r+2,r+5),_h(this,r+3,r+4);return this};ut.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?kte(this,0,e):W_e.apply(this,arguments)};ut.prototype.equals=function(e){if(!_u(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=q_e;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(!_u(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 $te(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)),_u(e))return e.length===0?-1:lF(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):lF(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function lF(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 $te(this,e,r,n,!0)};ut.prototype.lastIndexOf=function(e,r,n){return $te(this,e,r,n,!1)};function K_e(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 Y_e(t,e,r,n){return G2(gA(e,t.length-r),t,r,n)}function Mte(t,e,r,n){return G2(uEe(e),t,r,n)}function Q_e(t,e,r,n){return Mte(t,e,r,n)}function J_e(t,e,r,n){return G2(Fte(e),t,r,n)}function X_e(t,e,r,n){return G2(lEe(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 K_e(this,e,r,n);case"utf8":case"utf-8":return Y_e(this,e,r,n);case"ascii":return Mte(this,e,r,n);case"latin1":case"binary":return Q_e(this,e,r,n);case"base64":return J_e(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X_e(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 Z_e(t,e,r){return e===0&&r===t.length?uF(t):uF(t.slice(e,r))}function kte(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 eEe(n)}var fF=4096;function eEe(t){var e=t.length;if(e<=fF)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=fF));return r}function tEe(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 rEe(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 nEe(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+=cEe(t[a]);return i}function iEe(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 Zi(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||Zi(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||Zi(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||Zi(e,1,this.length),this[e]};ut.prototype.readUInt16LE=function(e,r){return r||Zi(e,2,this.length),this[e]|this[e+1]<<8};ut.prototype.readUInt16BE=function(e,r){return r||Zi(e,2,this.length),this[e]<<8|this[e+1]};ut.prototype.readUInt32LE=function(e,r){return r||Zi(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||Zi(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||Zi(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||Zi(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||Zi(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};ut.prototype.readInt16LE=function(e,r){r||Zi(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||Zi(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||Zi(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||Zi(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||Zi(e,4,this.length),H2(this,e,!0,23,4)};ut.prototype.readFloatBE=function(e,r){return r||Zi(e,4,this.length),H2(this,e,!1,23,4)};ut.prototype.readDoubleLE=function(e,r){return r||Zi(e,8,this.length),H2(this,e,!0,52,8)};ut.prototype.readDoubleBE=function(e,r){return r||Zi(e,8,this.length),H2(this,e,!1,52,8)};function Uo(t,e,r,n,i,a){if(!_u(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;Uo(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;Uo(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||Uo(this,e,r,1,255,0),ut.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};function z2(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||Uo(this,e,r,2,65535,0),ut.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):z2(this,e,r,!0),r+2};ut.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||Uo(this,e,r,2,65535,0),ut.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):z2(this,e,r,!1),r+2};function V2(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||Uo(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):V2(this,e,r,!0),r+4};ut.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||Uo(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):V2(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);Uo(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);Uo(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||Uo(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||Uo(this,e,r,2,32767,-32768),ut.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):z2(this,e,r,!0),r+2};ut.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||Uo(this,e,r,2,32767,-32768),ut.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):z2(this,e,r,!1),r+2};ut.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||Uo(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):V2(this,e,r,!0),r+4};ut.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||Uo(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):V2(this,e,r,!1),r+4};function Lte(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 Ute(t,e,r,n,i){return i||Lte(t,e,r,4),Tte(t,e,r,n,23,4),r+4}ut.prototype.writeFloatLE=function(e,r,n){return Ute(this,e,r,!0,n)};ut.prototype.writeFloatBE=function(e,r,n){return Ute(this,e,r,!1,n)};function Bte(t,e,r,n,i){return i||Lte(t,e,r,8),Tte(t,e,r,n,52,8),r+8}ut.prototype.writeDoubleLE=function(e,r,n){return Bte(this,e,r,!0,n)};ut.prototype.writeDoubleBE=function(e,r,n){return Bte(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=_u(e)?e:gA(new ut(e,i).toString()),c=s.length;for(o=0;o<n-r;++o)this[o+r]=s[o%c]}return this};var aEe=/[^+\/0-9A-Za-z-_]/g;function oEe(t){if(t=sEe(t).replace(aEe,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function sEe(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function cEe(t){return t<16?"0"+t.toString(16):t.toString(16)}function gA(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 uEe(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function lEe(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 Fte(t){return U_e(oEe(t))}function G2(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 fEe(t){return t!==t}function dEe(t){return t!=null&&(!!t._isBuffer||jte(t)||hEe(t))}function jte(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function hEe(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&jte(t.slice(0,0))}const h$=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0))(),J_=Ns.WebSocket||Ns.MozWebSocket,dF=!0,pEe="arraybuffer",hF=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";let gEe=class extends u${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=hF?{}:xte(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=dF&&!hF?r?new J_(e,r):new J_(e):new J_(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;s$(n,this.supportsBinary,a=>{const o={};try{dF&&this.ws.send(a)}catch{}i&&h$(()=>{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]=Ste()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}check(){return!!J_}};class yEe extends u${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=E_e(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),i=__e();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&&h$(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const mEe={websocket:gEe,webtransport:yEe,polling:k_e},vEe=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,bEe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function R8(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=vEe.exec(t||""),a={},o=14;for(;o--;)a[bEe[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=wEe(a,a.path),a.queryKey=_Ee(a,a.query),a}function wEe(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 _Ee(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,a){i&&(r[i]=a)}),r}let qte=class A0 extends Ni{constructor(e,r={}){super(),this.binaryType=pEe,this.writeBuffer=[],e&&typeof e=="object"&&(r=e,e=null),e?(e=R8(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=R8(r.host).host),q2(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=R_e(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=Ete,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 mEe[e](n)}open(){let e;if(this.opts.rememberUpgrade&&A0.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;A0.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;A0.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",A0.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+=I_e(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){A0.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}};qte.protocol=Ete;function EEe(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=R8(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 xEe=typeof ArrayBuffer=="function",AEe=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Hte=Object.prototype.toString,SEe=typeof Blob=="function"||typeof Blob<"u"&&Hte.call(Blob)==="[object BlobConstructor]",OEe=typeof File=="function"||typeof File<"u"&&Hte.call(File)==="[object FileConstructor]";function p$(t){return xEe&&(t instanceof ArrayBuffer||AEe(t))||SEe&&t instanceof Blob||OEe&&t instanceof File}function ax(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(ax(t[r]))return!0;return!1}if(p$(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return ax(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&ax(t[r]))return!0;return!1}function IEe(t){const e=[],r=t.data,n=t;return n.data=C8(r,e),n.attachments=e.length,{packet:n,buffers:e}}function C8(t,e){if(!t)return t;if(p$(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]=C8(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]=C8(t[n],e));return r}return t}function PEe(t,e){return t.data=N8(t.data,e),delete t.attachments,t}function N8(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]=N8(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=N8(t[r],e));return t}const TEe=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],REe=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 CEe=class{constructor(e){this.replacer=e}encode(e){return(e.type===cn.EVENT||e.type===cn.ACK)&&ax(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=IEe(e),n=this.encodeAsString(r.packet),i=r.buffers;return i.unshift(n),i}};function pF(t){return Object.prototype.toString.call(t)==="[object Object]"}let NEe=class zte 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 DEe(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(p$(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(zte.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 pF(r);case cn.DISCONNECT:return r===void 0;case cn.CONNECT_ERROR:return typeof r=="string"||pF(r);case cn.EVENT:case cn.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&TEe.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 DEe{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=PEe(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const $Ee=Object.freeze(Object.defineProperty({__proto__:null,Decoder:NEe,Encoder:CEe,get PacketType(){return cn},protocol:REe},Symbol.toStringTag,{value:"Module"}));function bc(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const MEe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Vte 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=[bc(e,"open",this.onopen.bind(this)),bc(e,"packet",this.onpacket.bind(this)),bc(e,"error",this.onerror.bind(this)),bc(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(MEe.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 Yy(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}Yy.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};Yy.prototype.reset=function(){this.attempts=0};Yy.prototype.setMin=function(t){this.ms=t};Yy.prototype.setMax=function(t){this.max=t};Yy.prototype.setJitter=function(t){this.jitter=t};let D8=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,q2(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 Yy({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||$Ee;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 qte(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=bc(r,"open",function(){n.onopen(),e&&e()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),e?e(s):this.maybeReconnectOnOpen()},o=bc(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(bc(e,"ping",this.onping.bind(this)),bc(e,"data",this.ondata.bind(this)),bc(e,"error",this.onerror.bind(this)),bc(e,"close",this.onclose.bind(this)),bc(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){h$(()=>{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 Vte(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 Fm={};function ox(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=EEe(t,e.path||"/socket.io"),n=r.source,i=r.id,a=r.path,o=Fm[i]&&a in Fm[i].nsps,s=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let c;return s?c=new D8(n,e):(Fm[i]||(Fm[i]=new D8(n,e)),c=Fm[i]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(ox,{Manager:D8,Socket:Vte,io:ox,connect:ox});var cu={},jm={},Gte={exports:{}},Wte={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})(Wte);var g$=Wte.exports;(function(t){var e=g$.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})(Gte);var Ws=Gte.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 br=Kte.exports,wP={exports:{}},gF;function Bn(){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}(wP)),wP.exports}var _P={exports:{}},EP={exports:{}},yF;function kEe(){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}(EP)),EP.exports}var mF;function $c(){return mF||(mF=1,function(t){var e=kEe();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}(_P)),_P.exports}var xP,vF;function Yte(){if(vF)return xP;vF=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 xP=t,xP}var AP,bF;function Di(){if(bF)return AP;bF=1;var t=Array.isArray;return AP=t,AP}var SP,wF;function Qte(){if(wF)return SP;wF=1;var t=typeof Ne=="object"&&Ne&&Ne.Object===Object&&Ne;return SP=t,SP}var OP,_F;function Bl(){if(_F)return OP;_F=1;var t=Qte(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return OP=r,OP}var IP,EF;function gw(){if(EF)return IP;EF=1;var t=Bl(),e=t.Symbol;return IP=e,IP}var PP,xF;function LEe(){if(xF)return PP;xF=1;var t=gw(),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 PP=a,PP}var TP,AF;function UEe(){if(AF)return TP;AF=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return TP=r,TP}var RP,SF;function Fl(){if(SF)return RP;SF=1;var t=gw(),e=LEe(),r=UEe(),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 RP=o,RP}var CP,OF;function Mc(){if(OF)return CP;OF=1;function t(e){return e!=null&&typeof e=="object"}return CP=t,CP}var NP,IF;function Qy(){if(IF)return NP;IF=1;var t=Fl(),e=Mc(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return NP=n,NP}var DP,PF;function y$(){if(PF)return DP;PF=1;var t=Di(),e=Qy(),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 DP=i,DP}var $P,TF;function jl(){if(TF)return $P;TF=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return $P=t,$P}var MP,RF;function W2(){if(RF)return MP;RF=1;var t=Fl(),e=jl(),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 MP=o,MP}var kP,CF;function BEe(){if(CF)return kP;CF=1;var t=Bl(),e=t["__core-js_shared__"];return kP=e,kP}var LP,NF;function FEe(){if(NF)return LP;NF=1;var t=BEe(),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 LP=r,LP}var UP,DF;function Jte(){if(DF)return UP;DF=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 UP=r,UP}var BP,$F;function jEe(){if($F)return BP;$F=1;var t=W2(),e=FEe(),r=jl(),n=Jte(),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 BP=d,BP}var FP,MF;function qEe(){if(MF)return FP;MF=1;function t(e,r){return e==null?void 0:e[r]}return FP=t,FP}var jP,kF;function _p(){if(kF)return jP;kF=1;var t=jEe(),e=qEe();function r(n,i){var a=e(n,i);return t(a)?a:void 0}return jP=r,jP}var qP,LF;function K2(){if(LF)return qP;LF=1;var t=_p(),e=t(Object,"create");return qP=e,qP}var HP,UF;function HEe(){if(UF)return HP;UF=1;var t=K2();function e(){this.__data__=t?t(null):{},this.size=0}return HP=e,HP}var zP,BF;function zEe(){if(BF)return zP;BF=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return zP=t,zP}var VP,FF;function VEe(){if(FF)return VP;FF=1;var t=K2(),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 VP=i,VP}var GP,jF;function GEe(){if(jF)return GP;jF=1;var t=K2(),e=Object.prototype,r=e.hasOwnProperty;function n(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return GP=n,GP}var WP,qF;function WEe(){if(qF)return WP;qF=1;var t=K2(),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 WP=r,WP}var KP,HF;function KEe(){if(HF)return KP;HF=1;var t=HEe(),e=zEe(),r=VEe(),n=GEe(),i=WEe();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,KP=a,KP}var YP,zF;function YEe(){if(zF)return YP;zF=1;function t(){this.__data__=[],this.size=0}return YP=t,YP}var QP,VF;function Y2(){if(VF)return QP;VF=1;function t(e,r){return e===r||e!==e&&r!==r}return QP=t,QP}var JP,GF;function Q2(){if(GF)return JP;GF=1;var t=Y2();function e(r,n){for(var i=r.length;i--;)if(t(r[i][0],n))return i;return-1}return JP=e,JP}var XP,WF;function QEe(){if(WF)return XP;WF=1;var t=Q2(),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 XP=n,XP}var ZP,KF;function JEe(){if(KF)return ZP;KF=1;var t=Q2();function e(r){var n=this.__data__,i=t(n,r);return i<0?void 0:n[i][1]}return ZP=e,ZP}var e3,YF;function XEe(){if(YF)return e3;YF=1;var t=Q2();function e(r){return t(this.__data__,r)>-1}return e3=e,e3}var t3,QF;function ZEe(){if(QF)return t3;QF=1;var t=Q2();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 t3=e,t3}var r3,JF;function J2(){if(JF)return r3;JF=1;var t=YEe(),e=QEe(),r=JEe(),n=XEe(),i=ZEe();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,r3=a,r3}var n3,XF;function m$(){if(XF)return n3;XF=1;var t=_p(),e=Bl(),r=t(e,"Map");return n3=r,n3}var i3,ZF;function exe(){if(ZF)return i3;ZF=1;var t=KEe(),e=J2(),r=m$();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return i3=n,i3}var a3,ej;function txe(){if(ej)return a3;ej=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return a3=t,a3}var o3,tj;function X2(){if(tj)return o3;tj=1;var t=txe();function e(r,n){var i=r.__data__;return t(n)?i[typeof n=="string"?"string":"hash"]:i.map}return o3=e,o3}var s3,rj;function rxe(){if(rj)return s3;rj=1;var t=X2();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return s3=e,s3}var c3,nj;function nxe(){if(nj)return c3;nj=1;var t=X2();function e(r){return t(this,r).get(r)}return c3=e,c3}var u3,ij;function ixe(){if(ij)return u3;ij=1;var t=X2();function e(r){return t(this,r).has(r)}return u3=e,u3}var l3,aj;function axe(){if(aj)return l3;aj=1;var t=X2();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 l3=e,l3}var f3,oj;function v$(){if(oj)return f3;oj=1;var t=exe(),e=rxe(),r=nxe(),n=ixe(),i=axe();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,f3=a,f3}var d3,sj;function b$(){if(sj)return d3;sj=1;var t=v$(),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,d3=r,d3}var h3,cj;function oxe(){if(cj)return h3;cj=1;var t=b$(),e=500;function r(n){var i=t(n,function(o){return a.size===e&&a.clear(),o}),a=i.cache;return i}return h3=r,h3}var p3,uj;function sxe(){if(uj)return p3;uj=1;var t=oxe(),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 p3=n,p3}var g3,lj;function Ep(){if(lj)return g3;lj=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 g3=t,g3}var y3,fj;function w$(){if(fj)return y3;fj=1;var t=gw(),e=Ep(),r=Di(),n=Qy(),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 y3=s,y3}var m3,dj;function _$(){if(dj)return m3;dj=1;var t=w$();function e(r){return r==null?"":t(r)}return m3=e,m3}var v3,hj;function yw(){if(hj)return v3;hj=1;var t=Di(),e=y$(),r=sxe(),n=_$();function i(a,o){return t(a)?a:e(a,o)?[a]:r(n(a))}return v3=i,v3}var b3,pj;function cxe(){if(pj)return b3;pj=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return b3=t,b3}var w3,gj;function Jy(){if(gj)return w3;gj=1;var t=Qy(),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 w3=r,w3}var _3,yj;function mw(){if(yj)return _3;yj=1;var t=yw(),e=Jy();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 _3=r,_3}var E3,mj;function E$(){if(mj)return E3;mj=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 E3=t,E3}var x3,vj;function uxe(){if(vj)return x3;vj=1;var t=mw(),e=E$();function r(n,i){return i.length<2?n:t(n,e(i,0,-1))}return x3=r,x3}var A3,bj;function lxe(){if(bj)return A3;bj=1;var t=Yte(),e=yw(),r=cxe(),n=uxe(),i=Jy();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 A3=a,A3}var S3,wj;function md(){if(wj)return S3;wj=1;function t(e){return e}return S3=t,S3}var O3,_j;function Xte(){if(_j)return O3;_j=1;var t=Yte(),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 O3=r,O3}var I3,Ej;function Zte(){if(Ej)return I3;Ej=1;function t(e){return function(){return e}}return I3=t,I3}var P3,xj;function ere(){if(xj)return P3;xj=1;var t=_p(),e=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}}();return P3=e,P3}var T3,Aj;function fxe(){if(Aj)return T3;Aj=1;var t=Zte(),e=ere(),r=md(),n=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return T3=n,T3}var R3,Sj;function dxe(){if(Sj)return R3;Sj=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 R3=n,R3}var C3,Oj;function tre(){if(Oj)return C3;Oj=1;var t=fxe(),e=dxe(),r=e(t);return C3=r,C3}var N3,Ij;function vw(){if(Ij)return N3;Ij=1;var t=md(),e=Xte(),r=tre();function n(i,a){return r(e(i,a,t),i+"")}return N3=n,N3}var D3,Pj;function Ks(){if(Pj)return D3;Pj=1;var t=lxe(),e=vw(),r=e(t);return D3=r,D3}var $3,Tj;function ql(){if(Tj)return $3;Tj=1;function t(e){return e==null}return $3=t,$3}function hxe(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 rre={exports:{}},Nn={};/** @license React v16.13.1
|
|
77
|
+
* react-is.production.min.js
|
|
78
|
+
*
|
|
79
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the MIT license found in the
|
|
82
|
+
* LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/var ea=typeof Symbol=="function"&&Symbol.for,x$=ea?Symbol.for("react.element"):60103,A$=ea?Symbol.for("react.portal"):60106,Z2=ea?Symbol.for("react.fragment"):60107,eS=ea?Symbol.for("react.strict_mode"):60108,tS=ea?Symbol.for("react.profiler"):60114,rS=ea?Symbol.for("react.provider"):60109,nS=ea?Symbol.for("react.context"):60110,S$=ea?Symbol.for("react.async_mode"):60111,iS=ea?Symbol.for("react.concurrent_mode"):60111,aS=ea?Symbol.for("react.forward_ref"):60112,oS=ea?Symbol.for("react.suspense"):60113,pxe=ea?Symbol.for("react.suspense_list"):60120,sS=ea?Symbol.for("react.memo"):60115,cS=ea?Symbol.for("react.lazy"):60116,gxe=ea?Symbol.for("react.block"):60121,yxe=ea?Symbol.for("react.fundamental"):60117,mxe=ea?Symbol.for("react.responder"):60118,vxe=ea?Symbol.for("react.scope"):60119;function rs(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case x$:switch(t=t.type,t){case S$:case iS:case Z2:case tS:case eS:case oS:return t;default:switch(t=t&&t.$$typeof,t){case nS:case aS:case cS:case sS:case rS:return t;default:return e}}case A$:return e}}}function nre(t){return rs(t)===iS}Nn.AsyncMode=S$;Nn.ConcurrentMode=iS;Nn.ContextConsumer=nS;Nn.ContextProvider=rS;Nn.Element=x$;Nn.ForwardRef=aS;Nn.Fragment=Z2;Nn.Lazy=cS;Nn.Memo=sS;Nn.Portal=A$;Nn.Profiler=tS;Nn.StrictMode=eS;Nn.Suspense=oS;Nn.isAsyncMode=function(t){return nre(t)||rs(t)===S$};Nn.isConcurrentMode=nre;Nn.isContextConsumer=function(t){return rs(t)===nS};Nn.isContextProvider=function(t){return rs(t)===rS};Nn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===x$};Nn.isForwardRef=function(t){return rs(t)===aS};Nn.isFragment=function(t){return rs(t)===Z2};Nn.isLazy=function(t){return rs(t)===cS};Nn.isMemo=function(t){return rs(t)===sS};Nn.isPortal=function(t){return rs(t)===A$};Nn.isProfiler=function(t){return rs(t)===tS};Nn.isStrictMode=function(t){return rs(t)===eS};Nn.isSuspense=function(t){return rs(t)===oS};Nn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Z2||t===iS||t===tS||t===eS||t===oS||t===pxe||typeof t=="object"&&t!==null&&(t.$$typeof===cS||t.$$typeof===sS||t.$$typeof===rS||t.$$typeof===nS||t.$$typeof===aS||t.$$typeof===yxe||t.$$typeof===mxe||t.$$typeof===vxe||t.$$typeof===gxe)};Nn.typeOf=rs;rre.exports=Nn;var bxe=rre.exports;function $8(t,e){return $8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$8(t,e)}function ire(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,$8(t,e)}var Hf=function(e,r){if(typeof e=="function"){e(r);return}e!==null&&typeof e=="object"&&(e.current=r)},wxe=function(e){return e!==null&&typeof e=="object"&&e.hasOwnProperty("current")},are=function(t){ire(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=c1.findDOMNode(this);this.prevNode=i,Hf(this.props.innerRef,i)},r.componentDidUpdate=function(i){var a=c1.findDOMNode(this);this.prevNode!==a&&(this.prevNode=a,Hf(this.props.innerRef,a)),i.innerRef!==this.props.innerRef&&Hf(this.props.innerRef,a)},r.componentWillUnmount=function(){Hf(this.props.innerRef,null),delete this.prevNode},r.render=function(){var i=this.props.children;return i},e}(Ge.Component),ore=function(t){ire(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;Hf(u.ref,s),Hf(f,s),n.currentNode=s},n}var r=e.prototype;return r.componentDidUpdate=function(i){i.innerRef!==this.props.innerRef&&Hf(this.props.innerRef,this.currentNode)},r.componentWillUnmount=function(){delete this.currentNode},r.render=function(){var i=this.props.children;return Ge.cloneElement(i,{ref:this.handleRefOverride})},e}(Ge.Component),_xe=["children","innerRef"],Exe=function(e){var r=e.children,n=e.innerRef,i=hxe(e,_xe),a=Ge.Children.only(r),o=bxe.isForwardRef(a)?ore:are,s=a&&i&&Object.keys(i).length>0?Ge.cloneElement(a,i):a;return Ge.createElement(o,{innerRef:n},s)};const xxe=Object.freeze(Object.defineProperty({__proto__:null,Ref:Exe,RefFindNode:are,RefForward:ore,handleRef:Hf,isRefObject:wxe},Symbol.toStringTag,{value:"Module"})),vd=uo(xxe);function sre(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=sre(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function Rj(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=sre(t))&&(n&&(n+=" "),n+=e);return n}const Axe=Object.freeze(Object.defineProperty({__proto__:null,clsx:Rj,default:Rj},Symbol.toStringTag,{value:"Module"})),ii=uo(Axe);var M3={exports:{}},k3,Cj;function Sxe(){if(Cj)return k3;Cj=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return k3=t,k3}var L3,Nj;function Oxe(){if(Nj)return L3;Nj=1;var t=Sxe();function e(){}function r(){}return r.resetWarningCache=e,L3=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},L3}var Dj;function Ln(){return Dj||(Dj=1,M3.exports=Oxe()()),M3.exports}var U3={},qm={},B3={exports:{}},$j;function Ixe(){return $j||($j=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}(B3)),B3.exports}var F3,Mj;function O$(){if(Mj)return F3;Mj=1;function t(e){return e===void 0}return F3=t,F3}var j3,kj;function Pxe(){if(kj)return j3;kj=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 j3=t,j3}var q3,Lj;function Txe(){if(Lj)return q3;Lj=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return q3=e,q3}var H3,Uj;function cre(){if(Uj)return H3;Uj=1;var t=Txe(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return H3=r,H3}var z3,Bj;function ure(){if(Bj)return z3;Bj=1;var t=cre(),e=jl(),r=Qy(),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 z3=c,z3}var V3,Fj;function I$(){if(Fj)return V3;Fj=1;var t=ure(),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 V3=n,V3}var G3,jj;function uS(){if(jj)return G3;jj=1;var t=I$();function e(r){var n=t(r),i=n%1;return n===n?i?n-i:n:0}return G3=e,G3}var W3,qj;function Rxe(){if(qj)return W3;qj=1;var t=Pxe(),e=w$(),r=uS(),n=_$();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 W3=i,W3}var K3,Hj;function lre(){if(Hj)return K3;Hj=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 K3=t,K3}var Y3,zj;function Cxe(){if(zj)return Y3;zj=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 Y3=t,Y3}var Q3,Vj;function Nxe(){if(Vj)return Q3;Vj=1;var t=Cxe(),e=t();return Q3=e,Q3}var J3,Gj;function Dxe(){if(Gj)return J3;Gj=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return J3=t,J3}var X3,Wj;function $xe(){if(Wj)return X3;Wj=1;var t=Fl(),e=Mc(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return X3=n,X3}var Z3,Kj;function lS(){if(Kj)return Z3;Kj=1;var t=$xe(),e=Mc(),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 Z3=a,Z3}var lb={exports:{}},eT,Yj;function Mxe(){if(Yj)return eT;Yj=1;function t(){return!1}return eT=t,eT}lb.exports;var Qj;function fS(){return Qj||(Qj=1,function(t,e){var r=Bl(),n=Mxe(),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}(lb,lb.exports)),lb.exports}var tT,Jj;function dS(){if(Jj)return tT;Jj=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 tT=r,tT}var rT,Xj;function P$(){if(Xj)return rT;Xj=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return rT=e,rT}var nT,Zj;function kxe(){if(Zj)return nT;Zj=1;var t=Fl(),e=P$(),r=Mc(),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]",O="[object Int16Array]",E="[object Int32Array]",p="[object Uint8Array]",I="[object Uint8ClampedArray]",C="[object Uint16Array]",L="[object Uint32Array]",q={};q[b]=q[S]=q[x]=q[O]=q[E]=q[p]=q[I]=q[C]=q[L]=!0,q[n]=q[i]=q[y]=q[a]=q[_]=q[o]=q[s]=q[c]=q[u]=q[f]=q[d]=q[g]=q[m]=q[w]=q[v]=!1;function le(pe){return r(pe)&&e(pe.length)&&!!q[t(pe)]}return nT=le,nT}var iT,eq;function hS(){if(eq)return iT;eq=1;function t(e){return function(r){return e(r)}}return iT=t,iT}var fb={exports:{}};fb.exports;var tq;function Lxe(){return tq||(tq=1,function(t,e){var r=Qte(),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}(fb,fb.exports)),fb.exports}var aT,rq;function pS(){if(rq)return aT;rq=1;var t=kxe(),e=hS(),r=Lxe(),n=r&&r.isTypedArray,i=n?e(n):t;return aT=i,aT}var oT,nq;function Uxe(){if(nq)return oT;nq=1;var t=Dxe(),e=lS(),r=Di(),n=fS(),i=dS(),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 oT=c,oT}var sT,iq;function fre(){if(iq)return sT;iq=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return sT=e,sT}var cT,aq;function dre(){if(aq)return cT;aq=1;function t(e,r){return function(n){return e(r(n))}}return cT=t,cT}var uT,oq;function Bxe(){if(oq)return uT;oq=1;var t=dre(),e=t(Object.keys,Object);return uT=e,uT}var lT,sq;function hre(){if(sq)return lT;sq=1;var t=fre(),e=Bxe(),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 lT=i,lT}var fT,cq;function bd(){if(cq)return fT;cq=1;var t=W2(),e=P$();function r(n){return n!=null&&e(n.length)&&!t(n)}return fT=r,fT}var dT,uq;function Hl(){if(uq)return dT;uq=1;var t=Uxe(),e=hre(),r=bd();function n(i){return r(i)?t(i):e(i)}return dT=n,dT}var hT,lq;function T$(){if(lq)return hT;lq=1;var t=Nxe(),e=Hl();function r(n,i){return n&&t(n,i,e)}return hT=r,hT}var pT,fq;function Fxe(){if(fq)return pT;fq=1;var t=bd();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 pT=e,pT}var gT,dq;function bw(){if(dq)return gT;dq=1;var t=T$(),e=Fxe(),r=e(t);return gT=r,gT}var yT,hq;function jxe(){if(hq)return yT;hq=1;var t=bw();function e(r,n){var i=[];return t(r,function(a,o,s){n(a,o,s)&&i.push(a)}),i}return yT=e,yT}var mT,pq;function qxe(){if(pq)return mT;pq=1;var t=J2();function e(){this.__data__=new t,this.size=0}return mT=e,mT}var vT,gq;function Hxe(){if(gq)return vT;gq=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return vT=t,vT}var bT,yq;function zxe(){if(yq)return bT;yq=1;function t(e){return this.__data__.get(e)}return bT=t,bT}var wT,mq;function Vxe(){if(mq)return wT;mq=1;function t(e){return this.__data__.has(e)}return wT=t,wT}var _T,vq;function Gxe(){if(vq)return _T;vq=1;var t=J2(),e=m$(),r=v$(),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 _T=i,_T}var ET,bq;function pre(){if(bq)return ET;bq=1;var t=J2(),e=qxe(),r=Hxe(),n=zxe(),i=Vxe(),a=Gxe();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,ET=o,ET}var xT,wq;function Wxe(){if(wq)return xT;wq=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return xT=e,xT}var AT,_q;function Kxe(){if(_q)return AT;_q=1;function t(e){return this.__data__.has(e)}return AT=t,AT}var ST,Eq;function gS(){if(Eq)return ST;Eq=1;var t=v$(),e=Wxe(),r=Kxe();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,ST=n,ST}var OT,xq;function gre(){if(xq)return OT;xq=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 OT=t,OT}var IT,Aq;function yS(){if(Aq)return IT;Aq=1;function t(e,r){return e.has(r)}return IT=t,IT}var PT,Sq;function yre(){if(Sq)return PT;Sq=1;var t=gS(),e=gre(),r=yS(),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[_],O=s[_];if(u)var E=g?u(O,x,_,s,o,d):u(x,O,_,o,s,d);if(E!==void 0){if(E)continue;b=!1;break}if(S){if(!e(s,function(p,I){if(!r(S,I)&&(x===p||f(x,p,c,u,d)))return S.push(I)})){b=!1;break}}else if(!(x===O||f(x,O,c,u,d))){b=!1;break}}return d.delete(o),d.delete(s),b}return PT=a,PT}var TT,Oq;function Yxe(){if(Oq)return TT;Oq=1;var t=Bl(),e=t.Uint8Array;return TT=e,TT}var RT,Iq;function Qxe(){if(Iq)return RT;Iq=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return RT=t,RT}var CT,Pq;function R$(){if(Pq)return CT;Pq=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return CT=t,CT}var NT,Tq;function Jxe(){if(Tq)return NT;Tq=1;var t=gw(),e=Yxe(),r=Y2(),n=yre(),i=Qxe(),a=R$(),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 O(E,p,I,C,L,q,le){switch(I){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||!q(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 pe=i;case w:var B=C&o;if(pe||(pe=a),E.size!=p.size&&!B)return!1;var U=le.get(E);if(U)return U==p;C|=s,le.set(E,p);var K=n(pe(E),pe(p),C,L,q,le);return le.delete(E),K;case y:if(x)return x.call(E)==x.call(p)}return!1}return NT=O,NT}var DT,Rq;function mre(){if(Rq)return DT;Rq=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 DT=t,DT}var $T,Cq;function Xxe(){if(Cq)return $T;Cq=1;var t=mre(),e=Di();function r(n,i,a){var o=i(n);return e(n)?o:t(o,a(n))}return $T=r,$T}var MT,Nq;function Zxe(){if(Nq)return MT;Nq=1;function t(){return[]}return MT=t,MT}var kT,Dq;function eAe(){if(Dq)return kT;Dq=1;var t=lre(),e=Zxe(),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 kT=a,kT}var LT,$q;function tAe(){if($q)return LT;$q=1;var t=Xxe(),e=eAe(),r=Hl();function n(i){return t(i,r,e)}return LT=n,LT}var UT,Mq;function rAe(){if(Mq)return UT;Mq=1;var t=tAe(),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 O=d;++y<m;){_=g[y];var E=a[_],p=o[_];if(c)var I=d?c(p,E,_,o,a,f):c(E,p,_,a,o,f);if(!(I===void 0?E===p||u(E,p,s,c,f):I)){x=!1;break}O||(O=_=="constructor")}if(x&&!O){var C=a.constructor,L=o.constructor;C!=L&&"constructor"in a&&"constructor"in o&&!(typeof C=="function"&&C instanceof C&&typeof L=="function"&&L instanceof L)&&(x=!1)}return f.delete(a),f.delete(o),x}return UT=i,UT}var BT,kq;function nAe(){if(kq)return BT;kq=1;var t=_p(),e=Bl(),r=t(e,"DataView");return BT=r,BT}var FT,Lq;function iAe(){if(Lq)return FT;Lq=1;var t=_p(),e=Bl(),r=t(e,"Promise");return FT=r,FT}var jT,Uq;function vre(){if(Uq)return jT;Uq=1;var t=_p(),e=Bl(),r=t(e,"Set");return jT=r,jT}var qT,Bq;function aAe(){if(Bq)return qT;Bq=1;var t=_p(),e=Bl(),r=t(e,"WeakMap");return qT=r,qT}var HT,Fq;function bre(){if(Fq)return HT;Fq=1;var t=nAe(),e=m$(),r=iAe(),n=vre(),i=aAe(),a=Fl(),o=Jte(),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),O=x==c?S.constructor:void 0,E=O?o(O):"";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}),HT=b,HT}var zT,jq;function oAe(){if(jq)return zT;jq=1;var t=pre(),e=yre(),r=Jxe(),n=rAe(),i=bre(),a=Di(),o=fS(),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 O=a(v),E=a(y),p=O?f:i(v),I=E?f:i(y);p=p==u?d:p,I=I==u?d:I;var C=p==d,L=I==d,q=p==I;if(q&&o(v)){if(!o(y))return!1;O=!0,C=!1}if(q&&!C)return x||(x=new t),O||s(v)?e(v,y,_,b,S,x):r(v,y,p,_,b,S,x);if(!(_&c)){var le=C&&m.call(v,"__wrapped__"),pe=L&&m.call(y,"__wrapped__");if(le||pe){var B=le?v.value():v,U=pe?y.value():y;return x||(x=new t),S(B,U,_,b,x)}}return q?(x||(x=new t),n(v,y,_,b,S,x)):!1}return zT=w,zT}var VT,qq;function C$(){if(qq)return VT;qq=1;var t=oAe(),e=Mc();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 VT=r,VT}var GT,Hq;function sAe(){if(Hq)return GT;Hq=1;var t=pre(),e=C$(),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 GT=i,GT}var WT,zq;function wre(){if(zq)return WT;zq=1;var t=jl();function e(r){return r===r&&!t(r)}return WT=e,WT}var KT,Vq;function cAe(){if(Vq)return KT;Vq=1;var t=wre(),e=Hl();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 KT=r,KT}var YT,Gq;function _re(){if(Gq)return YT;Gq=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return YT=t,YT}var QT,Wq;function uAe(){if(Wq)return QT;Wq=1;var t=sAe(),e=cAe(),r=_re();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 QT=n,QT}var JT,Kq;function lAe(){if(Kq)return JT;Kq=1;var t=mw();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return JT=e,JT}var XT,Yq;function fAe(){if(Yq)return XT;Yq=1;function t(e,r){return e!=null&&r in Object(e)}return XT=t,XT}var ZT,Qq;function Ere(){if(Qq)return ZT;Qq=1;var t=yw(),e=lS(),r=Di(),n=dS(),i=P$(),a=Jy();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 ZT=o,ZT}var eR,Jq;function xre(){if(Jq)return eR;Jq=1;var t=fAe(),e=Ere();function r(n,i){return n!=null&&e(n,i,t)}return eR=r,eR}var tR,Xq;function dAe(){if(Xq)return tR;Xq=1;var t=C$(),e=lAe(),r=xre(),n=y$(),i=wre(),a=_re(),o=Jy(),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 tR=u,tR}var rR,Zq;function hAe(){if(Zq)return rR;Zq=1;function t(e){return function(r){return r==null?void 0:r[e]}}return rR=t,rR}var nR,eH;function pAe(){if(eH)return nR;eH=1;var t=mw();function e(r){return function(n){return t(n,r)}}return nR=e,nR}var iR,tH;function gAe(){if(tH)return iR;tH=1;var t=hAe(),e=pAe(),r=y$(),n=Jy();function i(a){return r(a)?t(n(a)):e(a)}return iR=i,iR}var aR,rH;function wd(){if(rH)return aR;rH=1;var t=uAe(),e=dAe(),r=md(),n=Di(),i=gAe();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 oR,nH;function yAe(){if(nH)return oR;nH=1;var t=lre(),e=jxe(),r=wd(),n=Di();function i(a,o){var s=n(a)?t:e;return s(a,r(o,3))}return oR=i,oR}var sR,iH;function Are(){if(iH)return sR;iH=1;var t=hre(),e=bre(),r=lS(),n=Di(),i=bd(),a=fS(),o=fre(),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 sR=g,sR}var cR,aH;function Sre(){if(aH)return cR;aH=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 cR=t,cR}var uR,oH;function mAe(){if(oH)return uR;oH=1;function t(e){return e!==e}return uR=t,uR}var lR,sH;function vAe(){if(sH)return lR;sH=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 lR=t,lR}var fR,cH;function mS(){if(cH)return fR;cH=1;var t=Sre(),e=mAe(),r=vAe();function n(i,a,o){return a===a?r(i,a,o):t(i,e,o)}return fR=n,fR}var dR,uH;function N$(){if(uH)return dR;uH=1;var t=mS();function e(r,n){var i=r==null?0:r.length;return!!i&&t(r,n,0)>-1}return dR=e,dR}var hR,lH;function D$(){if(lH)return hR;lH=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 hR=t,hR}var pR,fH;function bAe(){if(fH)return pR;fH=1;var t=gS(),e=N$(),r=D$(),n=Ep(),i=hS(),a=yS(),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 O=b[S],E=u?u(O):O;if(O=f||O!==0?O: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(O)}}return _}return pR=s,pR}var gR,dH;function $$(){if(dH)return gR;dH=1;var t=bd(),e=Mc();function r(n){return e(n)&&t(n)}return gR=r,gR}var yR,hH;function wAe(){if(hH)return yR;hH=1;var t=$$();function e(r){return t(r)?r:[]}return yR=e,yR}var mR,pH;function _Ae(){if(pH)return mR;pH=1;var t=Ep(),e=bAe(),r=vw(),n=wAe(),i=r(function(a){var o=t(a,n);return o.length&&o[0]===a[0]?e(o):[]});return mR=i,mR}var vR,gH;function EAe(){if(gH)return vR;gH=1;var t=Object.prototype,e=t.hasOwnProperty;function r(n,i){return n!=null&&e.call(n,i)}return vR=r,vR}var bR,yH;function Ore(){if(yH)return bR;yH=1;var t=EAe(),e=Ere();function r(n,i){return n!=null&&e(n,i,t)}return bR=r,bR}var wR,mH;function Ire(){if(mH)return wR;mH=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 wR=t,wR}var _R,vH;function xAe(){if(vH)return _R;vH=1;var t=md();function e(r){return typeof r=="function"?r:t}return _R=e,_R}var ER,bH;function Pre(){if(bH)return ER;bH=1;var t=Ire(),e=bw(),r=xAe(),n=Di();function i(a,o){var s=n(a)?t:e;return s(a,r(o))}return ER=i,ER}var xR,wH;function AAe(){return wH||(wH=1,xR=Pre()),xR}var _H;function SAe(){if(_H)return qm;_H=1;var t=br;qm.__esModule=!0,qm.default=void 0;var e=t(Bn()),r=t(Ixe()),n=t($c()),i=t(O$());t(Rxe()),t(yAe()),t(Are()),t(Hl()),t(_Ae()),t(Ore()),t(AAe());var a=t(Ks()),o=t(Ge),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(O,E){return O[E]=c(E,g.props,S,!0),O},{});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 O=!(0,i.default)(m[x]);return O&&(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 qm.default=u,qm}var Bu={},AR,EH;function OAe(){if(EH)return AR;EH=1;var t=wd(),e=bd(),r=Hl();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 AR=n,AR}var SR,xH;function IAe(){if(xH)return SR;xH=1;var t=Sre(),e=wd(),r=uS(),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 SR=i,SR}var OR,AH;function PAe(){if(AH)return OR;AH=1;var t=OAe(),e=IAe(),r=t(e);return OR=r,OR}var IR,SH;function TAe(){if(SH)return IR;SH=1;var t=bw();function e(r,n){var i;return t(r,function(a,o,s){return i=n(a,o,s),!i}),!!i}return IR=e,IR}var PR,OH;function M$(){if(OH)return PR;OH=1;var t=Y2(),e=bd(),r=dS(),n=jl();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 PR=i,PR}var TR,IH;function Tre(){if(IH)return TR;IH=1;var t=gre(),e=wd(),r=TAe(),n=Di(),i=M$();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 TR=a,TR}var PH;function RAe(){if(PH)return Bu;PH=1;var t=br;Bu.__esModule=!0,Bu.isNil=Bu.findByType=Bu.someByType=void 0;var e=t(PAe()),r=t(Tre()),n=Ge,i=function(c,u){return(0,r.default)(n.Children.toArray(c),{type:u})};Bu.someByType=i;var a=function(c,u){return(0,e.default)(n.Children.toArray(c),{type:u})};Bu.findByType=a;var o=function(c){return c==null||Array.isArray(c)&&c.length===0};return Bu.isNil=o,Bu}var aa={},u0={},TH;function k$(){if(TH)return u0;TH=1,u0.__esModule=!0,u0.numberToWord=e,u0.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"};u0.numberToWordMap=t;function e(r){var n=typeof r;return n==="string"||n==="number"?t[r]||r:""}return u0}var RH;function CAe(){if(RH)return aa;RH=1,aa.__esModule=!0,aa.useWidthProp=aa.useVerticalAlignProp=aa.useTextAlignProp=aa.useMultipleProp=aa.useKeyOrValueAndKey=aa.useValueAndKey=aa.useKeyOnly=void 0;var t=k$(),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={},RR,CH;function Rre(){if(CH)return RR;CH=1;var t=gS(),e=N$(),r=D$(),n=Ep(),i=hS(),a=yS(),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 RR=s,RR}var CR,NH;function NAe(){if(NH)return CR;NH=1;var t=gw(),e=lS(),r=Di(),n=t?t.isConcatSpreadable:void 0;function i(a){return r(a)||e(a)||!!(n&&a&&a[n])}return CR=i,CR}var NR,DH;function L$(){if(DH)return NR;DH=1;var t=mre(),e=NAe();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 NR=r,NR}var DR,$H;function DAe(){if($H)return DR;$H=1;var t=Rre(),e=L$(),r=vw(),n=$$(),i=r(function(a,o){return n(a)?t(a,e(o,1,n,!0)):[]});return DR=i,DR}var $R,MH;function $Ae(){if(MH)return $R;MH=1;var t=E$();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 $R=e,$R}var MR,kH;function MAe(){if(kH)return MR;kH=1;var t=mS();function e(r,n){for(var i=r.length;i--&&t(n,r[i],0)>-1;);return i}return MR=e,MR}var kR,LH;function kAe(){if(LH)return kR;LH=1;var t=mS();function e(r,n){for(var i=-1,a=r.length;++i<a&&t(n,r[i],0)>-1;);return i}return kR=e,kR}var LR,UH;function LAe(){if(UH)return LR;UH=1;function t(e){return e.split("")}return LR=t,LR}var UR,BH;function UAe(){if(BH)return UR;BH=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 UR=c,UR}var BR,FH;function BAe(){if(FH)return BR;FH=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(O){return O.match(S)||[]}return BR=x,BR}var FR,jH;function FAe(){if(jH)return FR;jH=1;var t=LAe(),e=UAe(),r=BAe();function n(i){return e(i)?r(i):t(i)}return FR=n,FR}var jR,qH;function jAe(){if(qH)return jR;qH=1;var t=w$(),e=cre(),r=$Ae(),n=MAe(),i=kAe(),a=FAe(),o=_$();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 jR=s,jR}var qR,HH;function qAe(){if(HH)return qR;HH=1;var t=ere();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return qR=e,qR}var HR,zH;function HAe(){if(zH)return HR;zH=1;var t=qAe(),e=Y2(),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 HR=i,HR}var zR,VH;function zAe(){if(VH)return zR;VH=1;var t=HAe(),e=yw(),r=dS(),n=jl(),i=Jy();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 zR=a,zR}var VR,GH;function VAe(){if(GH)return VR;GH=1;var t=mw(),e=zAe(),r=yw();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 VR=n,VR}var GR,WH;function GAe(){if(WH)return GR;WH=1;var t=VAe(),e=xre();function r(n,i){return t(n,i,function(a,o){return e(n,o)})}return GR=r,GR}var WR,KH;function WAe(){if(KH)return WR;KH=1;var t=L$();function e(r){var n=r==null?0:r.length;return n?t(r,1):[]}return WR=e,WR}var KR,YH;function KAe(){if(YH)return KR;YH=1;var t=WAe(),e=Xte(),r=tre();function n(i){return r(e(i,void 0,t),i+"")}return KR=n,KR}var YR,QH;function U$(){if(QH)return YR;QH=1;var t=GAe(),e=KAe(),r=e(function(n,i){return n==null?{}:t(n,i)});return YR=r,YR}var QR,JH;function Cre(){if(JH)return QR;JH=1;var t=dre(),e=t(Object.getPrototypeOf,Object);return QR=e,QR}var JR,XH;function vS(){if(XH)return JR;XH=1;var t=Fl(),e=Cre(),r=Mc(),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 JR=u,JR}var XR,ZH;function YAe(){if(ZH)return XR;ZH=1;var t=Qy();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 XR=e,XR}var ZR,ez;function QAe(){if(ez)return ZR;ez=1;function t(e,r){return e<r}return ZR=t,ZR}var eC,tz;function JAe(){if(tz)return eC;tz=1;var t=YAe(),e=QAe(),r=md();function n(i){return i&&i.length?t(i,r,e):void 0}return eC=n,eC}var tC,rz;function XAe(){if(rz)return tC;rz=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 tC=t,tC}var rC,nz;function ZAe(){if(nz)return rC;nz=1;var t=XAe(),e=md();function r(n){return n&&n.length?t(n,e):0}return rC=r,rC}var nC,iz;function Nre(){if(iz)return nC;iz=1;var t=bw(),e=bd();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 nC=r,nC}var iC,az;function bS(){if(az)return iC;az=1;var t=Ep(),e=wd(),r=Nre(),n=Di();function i(a,o){var s=n(a)?t:r;return s(a,e(o,3))}return iC=i,iC}var aC,oz;function e2e(){if(oz)return aC;oz=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return aC=t,aC}var oC,sz;function t2e(){if(sz)return oC;sz=1;var t=Qy();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 oC=e,oC}var sC,cz;function r2e(){if(cz)return sC;cz=1;var t=t2e();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 sC=e,sC}var cC,uz;function n2e(){if(uz)return cC;uz=1;var t=Ep(),e=mw(),r=wd(),n=Nre(),i=e2e(),a=hS(),o=r2e(),s=md(),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 cC=u,cC}var uC,lz;function i2e(){if(lz)return uC;lz=1;var t=L$(),e=n2e(),r=vw(),n=M$(),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 uC=i,uC}var lC,fz;function a2e(){if(fz)return lC;fz=1;var t=E$(),e=uS();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 lC=r,lC}var Hm={},dz;function Dre(){if(dz)return Hm;dz=1,Hm.__esModule=!0,Hm.default=void 0;var t=function(){return 0},e=t;return Hm.default=e,Hm}var hz;function o2e(){if(hz)return Rn;hz=1;var t=br;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(DAe()),r=t(jAe()),n=t(jl()),i=t(U$()),a=t(Hl()),o=t(vS()),s=t(ql()),c=t(JAe()),u=t(ZAe()),f=t(bS()),d=t(i2e()),g=t(a2e()),m=t(b$()),w=t(Ln()),v=t(Dre()),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(F){var j=F.split(" ");return(0,g.default)((0,d.default)((0,f.default)(U,function(z){var $=z.split(" "),H=(0,u.default)((0,f.default)((0,f.default)(j,function(M){return(0,f.default)($,function(G){return(0,v.default)(M,G)})}),c.default)),k=(0,u.default)((0,f.default)((0,f.default)($,function(M){return(0,f.default)(j,function(G){return(0,v.default)(M,G)})}),c.default));return{suggestion:z,score:H+k}}),["score","suggestion"]),3)}),ne=U.reduce(function(F,j){return F[j.split(" ").sort().join(" ")]=!0,F},{});return function(F,j,z){var $=F[j];if(!(!$||ne[$])){var H=$.split(" ").sort().join(" ");if(!ne[H]){var k=K($);if(!k.some(function(M){return M.score===0}))return new Error(["Invalid prop `"+j+"` of value `"+$+"` supplied to `"+z+"`.",`
|
|
84
|
+
|
|
85
|
+
Instead of \``+$+"`, did you mean:",k.map(function(M){return`
|
|
86
|
+
- `+M.suggestion}).join(""),`
|
|
87
|
+
`].join(""))}}}};Rn.suggest=b;var S=function(U){return function(K,ne,F){if(!Array.isArray(U))throw new Error(["Invalid argument supplied to disallow, expected an instance of array."," See `"+ne+"` prop in `"+F+"`."].join(""));if(!((0,s.default)(K[ne])||K[ne]===!1)){var j=U.reduce(function(z,$){return!(0,s.default)(K[$])&&K[$]!==!1?[].concat(z,[$]):z},[]);if(j.length>0)return new Error(["Prop `"+ne+"` in `"+F+"` conflicts with props: `"+j.join("`, `")+"`.","They cannot be defined together, choose one or the other."].join(" "))}}};Rn.disallow=S;var x=function(U){return function(K,ne,F){for(var j=arguments.length,z=new Array(j>3?j-3:0),$=3;$<j;$++)z[$-3]=arguments[$];if(!Array.isArray(U))throw new Error(["Invalid argument supplied to every, expected an instance of array.","See `"+ne+"` prop in `"+F+"`."].join(" "));var H=[];return U.forEach(function(k){if(typeof k!="function")throw new Error('every() argument "validators" should contain functions, found: '+y(k)+".");var M=k.apply(void 0,[K,ne,F].concat(z));M&&H.push(M)}),H[0]}};Rn.every=x;var O=function(U,K){return function(ne,F,j){for(var z=arguments.length,$=new Array(z>3?z-3:0),H=3;H<z;H++)$[H-3]=arguments[H];if(!(0,o.default)(U))throw new Error(["Invalid argument supplied to givenProps, expected an object.","See `"+F+"` prop in `"+j+"`."].join(" "));if(typeof K!="function")throw new Error(["Invalid argument supplied to givenProps, expected a function.","See `"+F+"` prop in `"+j+"`."].join(" "));var k=(0,a.default)(U).every(function(ge){var Q=U[ge];return typeof Q=="function"?!Q.apply(void 0,[ne,ge,j].concat($)):Q===ne[F]});if(k){var M=K.apply(void 0,[ne,F,j].concat($));if(M){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 M.message="Given props "+G+": "+M.message,M}}}};Rn.givenProps=O;var E=function(U){return function(K,ne,F){if(!Array.isArray(U))throw new Error(["Invalid `requiredProps` argument supplied to require, expected an instance of array."," See `"+ne+"` prop in `"+F+"`."].join(""));if(K[ne]!==void 0){var j=U.filter(function(z){return K[z]===void 0});if(j.length>0)return new Error("`"+ne+"` prop in `"+F+"` requires props: `"+j.join("`, `")+"`.")}}};Rn.demand=E;var p=function(U){return function(K,ne,F){if(!Array.isArray(U))throw new Error(["Invalid argument supplied to some, expected an instance of array.","See `"+ne+"` prop in `"+F+"`."].join(" "));var j=K[ne];if(!((0,s.default)(j)||j===!1)){var z=j.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(H){return(0,r.default)(H).replace("-"," ")}),$=(0,e.default)(z,U);if($.length>0)return new Error("`"+ne+"` prop in `"+F+"` has invalid values: `"+$.join("`, `")+"`.")}}};Rn.multipleProp=p;var I=function(){return x([S(["children"]),w.default.node]).apply(void 0,arguments)};Rn.contentShorthand=I;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 L=function(){return x([S(["children"]),w.default.arrayOf(C)]).apply(void 0,arguments)};Rn.collectionShorthand=L;var q=function(U,K){return function(ne,F,j){if(typeof U!="string")throw new Error(["Invalid `help` argument supplied to deprecate, expected a string.","See `"+F+"` prop in `"+j+"`."].join(" "));if(ne[F]!==void 0){var z=new Error("The `"+F+"` prop in `"+j+"` is deprecated.");if(U&&(z.message+=" "+U),K)if(typeof K=="function"){for(var $=arguments.length,H=new Array($>3?$-3:0),k=3;k<$;k++)H[k-3]=arguments[k];var M=K.apply(void 0,[ne,F,j].concat(H));M&&(z.message=z.message+" "+M.message)}else throw new Error(["Invalid argument supplied to deprecate, expected a function.","See `"+F+"` prop in `"+j+"`."].join(" "));return z}}};Rn.deprecate=q;var le=w.default.shape({current:w.default.object});Rn.refObject=le;var pe=w.default.oneOfType([w.default.func,le]);return Rn.ref=pe,Rn}var zm={},X_={exports:{}},Vm={},fC={exports:{}};/*!
|
|
88
|
+
Copyright (c) 2015 Jed Watson.
|
|
89
|
+
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
|
90
|
+
All rights reserved.
|
|
91
|
+
*/var pz;function s2e(){return pz||(pz=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})()}(fC)),fC.exports}var gz;function c2e(){if(gz)return Vm;gz=1,Object.defineProperty(Vm,"__esModule",{value:!0});var t=s2e();Ln();var e=Ge;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 I=0;I<p.length;I++){var C=p[I];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(E,C.key,C)}}function a(E,p,I){return p&&i(E.prototype,p),I&&i(E,I),E}function o(E,p,I){return p in E?Object.defineProperty(E,p,{value:I,enumerable:!0,configurable:!0,writable:!0}):E[p]=I,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(I,C){return I.__proto__=C,I})(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 I=this.handlers.slice(0),C=p.length,L=0;L<C;L+=1)I.push(p[L]);return new E(I)}},{key:"dispatchEvent",value:function(p,I){var C=this.handlers.length-1;if(I){for(var L=C;L>=0;L-=1)this.handlers[L].called||(this.handlers[L].called=!0,this.handlers[L](p));for(var q=C;q>=0;q-=1)this.handlers[q].called=!1}else(0,this.handlers[C])(p)}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(p){for(var I=[],C=this.handlers.length,L=0;L<C;L+=1){var q=this.handlers[L];p.indexOf(q)===-1&&I.push(q)}return new E(I)}}]),E}();function m(E){var p=new Map;return E.forEach(function(I,C){p.set(C,I)}),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,I){n(this,E),o(this,"handlerSets",void 0),o(this,"poolName",void 0),this.handlerSets=I,this.poolName=p}return a(E,[{key:"addHandlers",value:function(p,I){var C=m(this.handlerSets);if(C.has(p)){var L=C.get(p);C.set(p,L.addHandlers(I))}else C.set(p,new g(I));return new E(this.poolName,C)}},{key:"dispatchEvent",value:function(p,I){var C=this.handlerSets.get(p),L=this.poolName==="default";C&&C.dispatchEvent(I,L)}},{key:"hasHandlers",value:function(p){if(!p)return this.handlerSets.size>0;var I=this.handlerSets.get(p);return!!I&&I.hasHandlers()}},{key:"removeHandlers",value:function(p,I){var C=m(this.handlerSets);if(!C.has(p))return new E(this.poolName,C);var L=C.get(p).removeHandlers(I);return L.hasHandlers()?C.set(p,L):C.delete(p),new E(this.poolName,C)}}]),E}();o(_,"createByType",function(E,p,I){var C=new Map;return C.set(p,new g(I)),new _(E,C)});var b=function(){function E(p){var I=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(L){I.pools.forEach(function(q){q.dispatchEvent(C,L)})}}),this.target=p}return a(E,[{key:"addHandlers",value:function(p,I,C){if(this.pools.has(p)){var L=this.pools.get(p);this.pools.set(p,L.addHandlers(I,C))}else this.pools.set(p,_.createByType(p,I,C));this.handlers.has(I)||this.addTargetHandler(I)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(p,I,C){if(this.pools.has(p)){var L=this.pools.get(p).removeHandlers(I,C);L.hasHandlers()?this.pools.set(p,L):this.pools.delete(p);var q=!1;this.pools.forEach(function(le){return q=q||le.hasHandlers(I)}),q||this.removeTargetHandler(I)}}},{key:"addTargetHandler",value:function(p){var I=this.createEmitter(p);this.handlers.set(p,I),this.target.addEventListener(p,I,!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(I){var C=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],L=y(I);if(p.targets.has(L))return p.targets.get(L);if(!C)return null;var q=new b(L);return p.targets.set(L,q),q}),o(this,"removeTarget",function(I){p.targets.delete(y(I))})}return a(E,[{key:"sub",value:function(p,I){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t.canUseDOM){var L=C.target,q=L===void 0?document:L,le=C.pool,pe=le===void 0?"default":le;this.getTarget(q).addHandlers(pe,p,w(I))}}},{key:"unsub",value:function(p,I){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t.canUseDOM){var L=C.target,q=L===void 0?document:L,le=C.pool,pe=le===void 0?"default":le,B=this.getTarget(q,!1);B&&(B.removeHandlers(pe,p,w(I)),B.hasHandlers()||this.removeTarget(q))}}}]),E}(),x=new S,O=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(I){this.unsubscribe(I),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(I){var C=I.name,L=I.on,q=I.pool,le=I.target;x.sub(C,L,{pool:q,target:le})}},{key:"unsubscribe",value:function(I){var C=I.name,L=I.on,q=I.pool,le=I.target;x.unsub(C,L,{pool:q,target:le})}},{key:"render",value:function(){return null}}]),p}();return o(O,"defaultProps",{pool:"default",target:"document"}),O.propTypes={},Vm.instance=x,Vm.default=O,Vm}var yz;function B$(){if(yz)return X_.exports;yz=1;var t;return t=c2e(),X_.exports=t.default,X_.exports.instance=t.instance,X_.exports}var mz;function u2e(){if(mz)return zm;mz=1,zm.__esModule=!0,zm.default=void 0;var t=B$(),e=t.instance;return zm.default=e,zm}var oa={},dC,vz;function l2e(){if(vz)return dC;vz=1;function t(){}return dC=t,dC}var hC,bz;function f2e(){if(bz)return hC;bz=1;var t=vre(),e=l2e(),r=R$(),n=1/0,i=t&&1/r(new t([,-0]))[1]==n?function(a){return new t(a)}:e;return hC=i,hC}var pC,wz;function d2e(){if(wz)return pC;wz=1;var t=gS(),e=N$(),r=D$(),n=yS(),i=f2e(),a=R$(),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 pC=s,pC}var gC,_z;function $re(){if(_z)return gC;_z=1;var t=d2e();function e(r){return r&&r.length?t(r):[]}return gC=e,gC}var yC,Ez;function h2e(){if(Ez)return yC;Ez=1;var t=Fl(),e=Mc(),r="[object Number]";function n(i){return typeof i=="number"||e(i)&&t(i)==r}return yC=n,yC}var mC,xz;function Mre(){if(xz)return mC;xz=1;var t=Fl(),e=Di(),r=Mc(),n="[object String]";function i(a){return typeof a=="string"||!e(a)&&r(a)&&t(a)==n}return mC=i,mC}var vC,Az;function p2e(){if(Az)return vC;Az=1;var t=Fl(),e=Mc(),r="[object Boolean]";function n(i){return i===!0||i===!1||e(i)&&t(i)==r}return vC=n,vC}var Sz;function g2e(){if(Sz)return oa;Sz=1;var t=Ws,e=br;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(Bn()),n=e($re()),i=e(Di()),a=e(vS()),o=e(W2()),s=e(h2e()),c=e(Mre()),u=e(p2e()),f=e(ql()),d=e(ii),g=t(Ge);function m(O,E,p,I){if(I===void 0&&(I={}),typeof O!="function"&&typeof O!="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),L=(0,s.default)(p),q=(0,o.default)(p),le=g.isValidElement(p),pe=(0,a.default)(p),B=C||L||(0,i.default)(p);if(!q&&!le&&!pe&&!B)return null;var U=I,K=U.defaultProps,ne=K===void 0?{}:K,F=le&&p.props||pe&&p||B&&E(p),j=I,z=j.overrideProps,$=z===void 0?{}:z;$=(0,o.default)($)?$((0,r.default)({},ne,F)):$;var H=(0,r.default)({},ne,F,$);if(ne.className||$.className||F.className){var k=(0,d.default)(ne.className,$.className,F.className);H.className=(0,n.default)(k.split(" ")).join(" ")}if((ne.style||$.style||F.style)&&(H.style=(0,r.default)({},ne.style,F.style,$.style)),(0,f.default)(H.key)){var M=H.childKey,G=I,ge=G.autoGenerateKey,Q=ge===void 0?!0:ge;(0,f.default)(M)?Q&&(C||L)&&(H.key=p):(H.key=typeof M=="function"?M(H):M,delete H.childKey)}if(le)return g.cloneElement(p,H);if(typeof H.children=="function")return H.children(O,(0,r.default)({},H,{children:void 0}));if(B||pe)return g.createElement(O,H);if(q)return p(O,H,H.children)}function w(O,E){if(typeof O!="function"&&typeof O!="string")throw new Error("createShorthandFactory() Component must be a string or function.");return function(p,I){return m(O,E,p,I)}}var v=w("div",function(O){return{children:O}});oa.createHTMLDivision=v;var y=w("iframe",function(O){return{src:O}});oa.createHTMLIframe=y;var _=w("img",function(O){return{src:O}});oa.createHTMLImage=_;var b=w("input",function(O){return{type:O}});oa.createHTMLInput=b;var S=w("label",function(O){return{children:O}});oa.createHTMLLabel=S;var x=w("p",function(O){return{children:O}});return oa.createHTMLParagraph=x,oa}var Gm={},Oz;function y2e(){if(Oz)return Gm;Oz=1,Gm.__esModule=!0,Gm.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 Gm.default=e,Gm}var Wm={},Iz;function m2e(){if(Iz)return Wm;Iz=1,Wm.__esModule=!0,Wm.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 Wm.default=e,Wm}var zo={},bC,Pz;function v2e(){if(Pz)return bC;Pz=1;var t=Ep();function e(r,n){return t(n,function(i){return r[i]})}return bC=e,bC}var wC,Tz;function kre(){if(Tz)return wC;Tz=1;var t=v2e(),e=Hl();function r(n){return n==null?[]:t(n,e(n))}return wC=r,wC}var _C,Rz;function F$(){if(Rz)return _C;Rz=1;var t=mS(),e=bd(),r=Mre(),n=uS(),i=kre(),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 _C=o,_C}var Cz;function b2e(){if(Cz)return zo;Cz=1;var t=br;zo.__esModule=!0,zo.partitionHTMLProps=zo.htmlImageProps=zo.htmlInputProps=zo.htmlInputEvents=zo.htmlInputAttrs=void 0;var e=t(F$()),r=t(Pre()),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"),O=(0,e.default)(m,S)||x?y:_;O[S]=b}),[y,_]};return zo.partitionHTMLProps=s,zo}var Km={},Nz;function Lre(){if(Nz)return Km;Nz=1;var t=br;Km.__esModule=!0,Km.default=void 0;var e=t(ql()),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 Km.default=a,Km}var Ym={},EC,Dz;function w2e(){if(Dz)return EC;Dz=1;var t=Math.max,e=Math.min;function r(n,i,a){return n>=e(i,a)&&n<t(i,a)}return EC=r,EC}var xC,$z;function _2e(){if($z)return xC;$z=1;var t=w2e(),e=I$(),r=ure();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 xC=n,xC}var AC,Mz;function E2e(){if(Mz)return AC;Mz=1;function t(e){return e&&e.length?e[0]:void 0}return AC=t,AC}var SC,kz;function x2e(){return kz||(kz=1,SC=E2e()),SC}var Lz;function A2e(){if(Lz)return Ym;Lz=1;var t=br;Ym.__esModule=!0,Ym.default=void 0;var e=t(_2e()),r=t(x2e()),n=t(Ks()),i=t(ql()),a=t(Tre()),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 Ym.default=s,Ym}var Z_={},Qm={},Ya={},Uz;function Ure(){if(Uz)return Ya;Uz=1,Ya.__esModule=!0,Ya.createLastItem=Ya.createNextItem=Ya.createPageFactory=Ya.createPrevItem=Ya.createFirstPage=Ya.createEllipsisItem=void 0;var t=function(s){return{active:!1,type:"ellipsisItem",value:s}};Ya.createEllipsisItem=t;var e=function(){return{active:!1,type:"firstItem",value:1}};Ya.createFirstPage=e;var r=function(s){return{active:!1,type:"prevItem",value:Math.max(1,s-1)}};Ya.createPrevItem=r;var n=function(s){return function(c){return{active:s===c,type:"pageItem",value:c}}};Ya.createPageFactory=n;var i=function(s,c){return{active:!1,type:"nextItem",value:Math.min(s+1,c)}};Ya.createNextItem=i;var a=function(s){return{active:!1,type:"lastItem",value:s}};return Ya.createLastItem=a,Ya}var Gd={},OC,Bz;function S2e(){if(Bz)return OC;Bz=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 OC=r,OC}var IC,Fz;function O2e(){if(Fz)return IC;Fz=1;var t=S2e(),e=M$(),r=I$();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 IC=n,IC}var PC,jz;function I2e(){if(jz)return PC;jz=1;var t=O2e(),e=t();return PC=e,PC}var Wd={},qz;function P2e(){if(qz)return Wd;qz=1,Wd.__esModule=!0,Wd.createInnerSuffix=Wd.createInnerPrefix=void 0;var t=Ure(),e=function(i,a,o){var s=a-1,c=s!==i+1,u=c?t.createEllipsisItem:o;return u(s)};Wd.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 Wd.createInnerSuffix=r,Wd}var Hz;function T2e(){if(Hz)return Gd;Hz=1;var t=br;Gd.__esModule=!0,Gd.createComplexRange=Gd.createSimpleRange=void 0;var e=t(I2e()),r=t(bS()),n=P2e(),i=function(s,c,u){return(0,r.default)((0,e.default)(s,c+1),u)};Gd.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,O=i(S,x,c);return[].concat(y,[!d&&(0,n.createInnerPrefix)(v,S,c)],O,[!d&&(0,n.createInnerSuffix)(x,_,c)],b).filter(Boolean)};return Gd.createComplexRange=a,Gd}var Kd={},zz;function R2e(){if(zz)return Kd;zz=1,Kd.__esModule=!0,Kd.typifyOptions=Kd.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};Kd.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 Kd.typifyOptions=e,Kd}var Vz;function C2e(){if(Vz)return Qm;Vz=1,Qm.__esModule=!0,Qm.default=void 0;var t=Ure(),e=T2e(),r=R2e(),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 Qm.default=i,Qm}var Gz;function N2e(){if(Gz)return Z_;Gz=1;var t=br;Z_.__esModule=!0;var e=t(C2e());return Z_.default=e.default,Z_}var yt={},Wz;function D2e(){if(Wz)return yt;Wz=1;var t=br;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($re()),r=t(kre()),n=t(Hl()),i=k$(),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 O=["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=O;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 I=["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=I;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 L=["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=L;var q=["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=q;var le=["genderless","mars","mars double","mars stroke","mars stroke horizontal","mars stroke vertical","mercury","neuter","transgender","transgender alternate","venus","venus double","venus mars"];yt.GENDERS=le;var pe=["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=pe;var B=["ambulance","h square","heart","heart outline","heartbeat","hospital","hospital outline","medkit","plus square","plus square outline","stethoscope","user md","wheelchair"];yt.HEALTH=B;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 F=["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=F;var j=["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=j;var z=["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=z;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 k=["asterisk","certificate","circle notch","cog","compass","compass outline","crosshairs","life ring","life ring outline","snowflake","snowflake outline","spinner","sun","sun outline","sync"];yt.SPINNERS=k;var M=["baseball ball","basketball ball","bowling ball","football ball","futbol","futbol outline","golf ball","hockey puck","quidditch","table tennis","volleyball ball"];yt.SPORTS=M;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 ce=["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=ce;var T=(0,e.default)([].concat(v,y,_,b,S,x,O,E,p,I,C,L,q,le,pe,B,U,K,ne,F,j,z,$,H,k,M,G,ge,Q,te,ce));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 ze=(0,e.default)([].concat(T,fe));yt.ICONS_AND_ALIASES=ze;var tt=["left dropdown"];yt.COMPONENT_CONTEXT_SPECIFIC_ICONS=tt;var mt=(0,e.default)([].concat(ze,tt));return yt.ALL_ICONS_IN_ALL_CONTEXTS=mt,yt}var Jm={},Kz;function $2e(){if(Kz)return Jm;Kz=1,Jm.__esModule=!0,Jm.default=void 0;var t=function(r){return typeof r=="number"||typeof r=="string"?[r,r]:r};return Jm.default=t,Jm}var Xm={},Yz;function M2e(){if(Yz)return Xm;Yz=1,Xm.__esModule=!0,Xm.default=void 0;var t=function(r,n){return typeof r=="number"||typeof r=="string"?r:r[n]};return Xm.default=t,Xm}var Zm={},TC,Qz;function k2e(){if(Qz)return TC;Qz=1;var t=C$();function e(r,n){return t(r,n)}return TC=e,TC}var RC,Jz;function L2e(){if(Jz)return RC;Jz=1;var t=jl(),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 RC=r,RC}var CC,Xz;function U2e(){if(Xz)return CC;Xz=1;var t=Ire(),e=L2e(),r=T$(),n=wd(),i=Cre(),a=Di(),o=fS(),s=W2(),c=jl(),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 CC=f,CC}var Zz;function B2e(){if(Zz)return Zm;Zz=1;var t=br;Zm.__esModule=!0,Zm.default=void 0;var e=t(k2e()),r=t(Ore()),n=t(U2e()),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 Zm.default=i,Zm}var Hc={},ev={},eV;function F2e(){if(eV)return ev;eV=1;var t=br;ev.__esModule=!0,ev.default=void 0;var e=t(Ge),r=t(Lre()),n=(0,r.default)()?e.default.useLayoutEffect:e.default.useEffect,i=n;return ev.default=i,ev}var tV;function j2e(){if(tV)return Hc;tV=1;var t=br;Hc.__esModule=!0,Hc.computeClassNames=a,Hc.computeClassNamesDifference=o,Hc.default=d,Hc.NodeRegistry=Hc.handleClassNamesChange=void 0;var e=vd,r=t(Ge),n=t(F2e()),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)};Hc.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};Hc.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 Hc}var rV;function Wn(){return rV||(rV=1,function(t){var e=Ws,r=br;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(SAe());t.ModernAutoControlledComponent=i.default;var a=e(RAe());t.childrenUtils=a;var o=CAe();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(o2e());t.customPropTypes=s;var c=r(u2e());t.eventStack=c.default;var u=g2e();Object.keys(u).forEach(function(p){p==="default"||p==="__esModule"||Object.prototype.hasOwnProperty.call(n,p)||(t[p]=u[p])});var f=r(y2e());t.getUnhandledProps=f.default;var d=r(m2e());t.getElementType=d.default;var g=b2e();t.htmlInputAttrs=g.htmlInputAttrs,t.htmlInputEvents=g.htmlInputEvents,t.htmlInputProps=g.htmlInputProps,t.htmlImageProps=g.htmlImageProps,t.partitionHTMLProps=g.partitionHTMLProps;var m=r(Lre());t.isBrowser=m.default;var w=r(A2e());t.doesNodeContainClick=w.default;var v=r(Dre());t.leven=v.default;var y=r(N2e());t.createPaginationItems=y.default;var _=e(D2e());t.SUI=_;var b=k$();t.numberToWordMap=b.numberToWordMap,t.numberToWord=b.numberToWord;var S=r($2e());t.normalizeOffset=S.default;var x=r(M2e());t.normalizeTransitionDuration=x.default;var O=r(B2e());t.objectDiff=O.default;var E=r(j2e());t.useClassNamesOnNode=E.default}(U3)),U3}var tv={},NC,nV;function j$(){if(nV)return NC;nV=1;var t=Rre(),e=vw(),r=$$(),n=e(function(i,a){return r(i)?t(i,a):[]});return NC=n,NC}var rv={},iV;function q2e(){if(iV)return rv;iV=1;var t=br;rv.__esModule=!0,rv.default=void 0;var e=t(Bn());t(j$());var r=t(ii);t(Ln());var n=t(Ge),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 rv.default=o,rv}var aV;function wS(){if(aV)return tv;aV=1;var t=Ws,e=br;tv.__esModule=!0,tv.default=void 0;var r=e(Bn()),n=e($c());e(j$());var i=e(Ks()),a=e(ql()),o=e(ii);e(Ln());var s=t(Ge),c=Wn(),u=e(q2e()),f=function(g){(0,n.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.handleClick=function(S){var x=v.props.disabled;if(x){S.preventDefault();return}(0,i.default)(v.props,"onClick",S,v.props)},v}var w=m.prototype;return w.getIconAriaOptions=function(){var y={},_=this.props,b=_["aria-label"],S=_["aria-hidden"];return(0,a.default)(b)?y["aria-hidden"]="true":y["aria-label"]=b,(0,a.default)(S)||(y["aria-hidden"]=S),y},w.render=function(){var y=this.props,_=y.bordered,b=y.circular,S=y.className,x=y.color,O=y.corner,E=y.disabled,p=y.fitted,I=y.flipped,C=y.inverted,L=y.link,q=y.loading,le=y.name,pe=y.rotated,B=y.size,U=(0,o.default)(x,le,B,(0,c.useKeyOnly)(_,"bordered"),(0,c.useKeyOnly)(b,"circular"),(0,c.useKeyOnly)(E,"disabled"),(0,c.useKeyOnly)(p,"fitted"),(0,c.useKeyOnly)(C,"inverted"),(0,c.useKeyOnly)(L,"link"),(0,c.useKeyOnly)(q,"loading"),(0,c.useKeyOrValueAndKey)(O,"corner"),(0,c.useValueAndKey)(I,"flipped"),(0,c.useValueAndKey)(pe,"rotated"),"icon",S),K=(0,c.getUnhandledProps)(m,this.props),ne=(0,c.getElementType)(m,this.props),F=this.getIconAriaOptions();return s.default.createElement(ne,(0,r.default)({},K,F,{className:U,onClick:this.handleClick}))},m}(s.PureComponent);f.handledProps=["aria-hidden","aria-label","as","bordered","circular","className","color","corner","disabled","fitted","flipped","inverted","link","loading","name","rotated","size"],f.propTypes={},f.defaultProps={as:"i"},f.Group=u.default,f.create=(0,c.createShorthandFactory)(f,function(g){return{name:g}});var d=f;return tv.default=d,tv}var nv={},iv={},eE={},av={},tE={},ov={},DC,oV;function H2e(){if(oV)return DC;oV=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["]"],DC=a,DC}var rE={},$C={exports:{}},In={};/**
|
|
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 sV;function z2e(){if(sV)return In;sV=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 In.ContextConsumer=o,In.ContextProvider=a,In.Element=t,In.ForwardRef=c,In.Fragment=r,In.Lazy=g,In.Memo=d,In.Portal=e,In.Profiler=i,In.StrictMode=n,In.Suspense=u,In.SuspenseList=f,In.isAsyncMode=function(){return!1},In.isConcurrentMode=function(){return!1},In.isContextConsumer=function(y){return v(y)===o},In.isContextProvider=function(y){return v(y)===a},In.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},In.isForwardRef=function(y){return v(y)===c},In.isFragment=function(y){return v(y)===r},In.isLazy=function(y){return v(y)===g},In.isMemo=function(y){return v(y)===d},In.isPortal=function(y){return v(y)===e},In.isProfiler=function(y){return v(y)===i},In.isStrictMode=function(y){return v(y)===n},In.isSuspense=function(y){return v(y)===u},In.isSuspenseList=function(y){return v(y)===f},In.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)},In.typeOf=v,In}var cV;function V2e(){return cV||(cV=1,$C.exports=z2e()),$C.exports}var uV;function G2e(){if(uV)return rE;uV=1;var t=Ws,e=br;rE.__esModule=!0,rE.default=i;var r=e(Ge),n=t(V2e());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 rE}var sv={},lV;function W2e(){if(lV)return sv;lV=1;var t=Ws,e=br;sv.__esModule=!0,sv.default=void 0;var r=e($c()),n=e(Ks()),i=vd;e(Ln());var a=t(Ge),o=c1,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 sv.default=u,sv}var fV;function K2e(){if(fV)return ov;fV=1;var t=br;ov.__esModule=!0,ov.default=void 0;var e=t(Bn()),r=t($c()),n=t(Ks()),i=t(B$()),a=vd,o=t(H2e());t(Ln());var s=t(Ge),c=Wn();t(G2e());var u=t(W2e()),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,O=v.latestDocumentMouseDownEvent;v.latestDocumentMouseDownEvent=null,!(!v.contentRef.current||(0,c.doesNodeContainClick)(v.triggerRef.current,S)||O&&(0,c.doesNodeContainClick)(v.contentRef.current,O)||(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,O=x.closeOnPortalMouseLeave,E=x.mouseLeaveDelay;O&&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,O=x.trigger,E=x.closeOnTriggerBlur,p=arguments.length,I=new Array(p>1?p-1:0),C=1;C<p;C++)I[C-1]=arguments[C];n.default.apply(void 0,[O,"props.onBlur",S].concat(I));var L=S.relatedTarget||document.activeElement,q=(0,n.default)(v.contentRef.current,"contains",L);!E||q||v.close(S)},v.handleTriggerClick=function(S){for(var x=v.props,O=x.trigger,E=x.closeOnTriggerClick,p=x.openOnTriggerClick,I=v.state.open,C=arguments.length,L=new Array(C>1?C-1:0),q=1;q<C;q++)L[q-1]=arguments[q];n.default.apply(void 0,[O,"props.onClick",S].concat(L)),I&&E?v.close(S):!I&&p&&v.open(S)},v.handleTriggerFocus=function(S){for(var x=v.props,O=x.trigger,E=x.openOnTriggerFocus,p=arguments.length,I=new Array(p>1?p-1:0),C=1;C<p;C++)I[C-1]=arguments[C];n.default.apply(void 0,[O,"props.onFocus",S].concat(I)),E&&v.open(S)},v.handleTriggerMouseLeave=function(S){clearTimeout(v.mouseEnterTimer);for(var x=v.props,O=x.trigger,E=x.closeOnTriggerMouseLeave,p=x.mouseLeaveDelay,I=arguments.length,C=new Array(I>1?I-1:0),L=1;L<I;L++)C[L-1]=arguments[L];n.default.apply(void 0,[O,"props.onMouseLeave",S].concat(C)),E&&(v.mouseLeaveTimer=v.closeWithTimeout(S,p))},v.handleTriggerMouseEnter=function(S){clearTimeout(v.mouseLeaveTimer);for(var x=v.props,O=x.trigger,E=x.mouseEnterDelay,p=x.openOnTriggerMouseEnter,I=arguments.length,C=new Array(I>1?I-1:0),L=1;L<I;L++)C[L-1]=arguments[L];n.default.apply(void 0,[O,"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 O=(0,e.default)({},S);return setTimeout(function(){return v.open(O)},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 O=(0,e.default)({},S);return setTimeout(function(){return v.close(O)},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,O=this.state.open;return s.default.createElement(s.default.Fragment,null,O&&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 ov.default=d,ov}var dV;function q$(){if(dV)return tE;dV=1;var t=br;tE.__esModule=!0;var e=t(K2e());return tE.default=e.default,tE}var cv={},hV;function Y2e(){if(hV)return cv;hV=1;var t=br;cv.__esModule=!0,cv.default=void 0;var e=t(Bn()),r=t(ii);t(Ln());var n=t(Ge),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 cv.default=o,cv}var uv={},pV;function Q2e(){if(pV)return uv;pV=1;var t=Ws,e=br;uv.__esModule=!0,uv.default=void 0;var r=e(Bn()),n=e($c()),i=e(Ks()),a=vd,o=e(ii);e(Ln());var s=t(Ge),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,O=w.page,E=w.simple,p=w.verticalAlign,I=(0,o.default)("ui",(0,c.useKeyOnly)(v,"active transition visible"),(0,c.useKeyOnly)(S,"disabled"),(0,c.useKeyOnly)(x,"inverted"),(0,c.useKeyOnly)(O,"page"),(0,c.useKeyOnly)(E,"simple"),(0,c.useVerticalAlignProp)(p),"dimmer",_),C=(0,c.getUnhandledProps)(d,this.props),L=(0,c.getElementType)(d,this.props),q=c.childrenUtils.isNil(y)?b:y;return s.default.createElement(a.Ref,{innerRef:this.containerRef},s.default.createElement(L,(0,r.default)({},C,{className:I,onClick:this.handleClick}),q&&s.default.createElement("div",{className:"content",ref:this.contentRef},q)))},d}(s.Component);return uv.default=u,u.handledProps=["active","as","children","className","content","disabled","inverted","onClick","onClickOutside","page","simple","verticalAlign"],u.propTypes={},uv}var gV;function J2e(){if(gV)return av;gV=1;var t=Ws,e=br;av.__esModule=!0,av.default=void 0;var r=e(Bn()),n=e($c());e(Ln());var i=t(Ge),a=Wn(),o=e(q$()),s=e(Y2e()),c=e(Q2e()),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 av.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}}),av}var yV;function X2e(){if(yV)return eE;yV=1;var t=br;eE.__esModule=!0;var e=t(J2e());return eE.default=e.default,eE}var lv={},mV;function Z2e(){if(mV)return lv;mV=1;var t=br;lv.__esModule=!0,lv.default=void 0;var e=t(Bn()),r=t(ii);t(Ln());var n=t(Ge),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 lv.default=o,lv}var vV;function eSe(){if(vV)return iv;vV=1;var t=br;iv.__esModule=!0,iv.default=void 0;var e=t(Bn()),r=t(ql()),n=t(ii);t(Ln());var i=t(Ge),a=Wn(),o=t(X2e()),s=t(Bre()),c=t(Z2e());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,O=d.floated,E=d.fluid,p=d.hidden,I=d.href,C=d.inline,L=d.label,q=d.rounded,le=d.size,pe=d.spaced,B=d.verticalAlign,U=d.wrapped,K=d.ui,ne=(0,n.default)((0,a.useKeyOnly)(K,"ui"),le,(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)(q,"rounded"),(0,a.useKeyOrValueAndKey)(pe,"spaced"),(0,a.useValueAndKey)(O,"floated"),(0,a.useVerticalAlignProp)(B,"aligned"),"image",_),F=(0,a.getUnhandledProps)(u,d),j=(0,a.partitionHTMLProps)(F,{htmlProps:a.htmlImageProps}),z=j[0],$=j[1],H=(0,a.getElementType)(u,d,function(){if(!(0,r.default)(S)||!(0,r.default)(L)||!(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)({},$,z,{className:ne})):i.default.createElement(H,(0,e.default)({},$,{className:ne,href:I}),o.default.create(S,{autoGenerateKey:!1}),s.default.create(L,{autoGenerateKey:!1}),i.default.createElement("img",z)):i.default.createElement(H,(0,e.default)({},F,{className:ne}),b):i.default.createElement(H,(0,e.default)({},F,{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 iv.default=f,iv}var fv={},bV;function tSe(){if(bV)return fv;bV=1;var t=br;fv.__esModule=!0,fv.default=void 0;var e=t(Bn()),r=t(ii);t(Ln());var n=t(Ge),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 fv.default=o,fv}var dv={},wV;function rSe(){if(wV)return dv;wV=1;var t=br;dv.__esModule=!0,dv.default=void 0;var e=t(Bn()),r=t(ii);t(Ln());var n=t(Ge),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 dv.default=o,dv}var _V;function Bre(){if(_V)return nv;_V=1;var t=Ws,e=br;nv.__esModule=!0,nv.default=void 0;var r=e(Bn()),n=e($c()),i=e(O$()),a=e(Ks()),o=e(ii);e(Ln());var s=t(Ge),c=Wn(),u=e(wS()),f=e(eSe()),d=e(tSe()),g=e(rSe()),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(O){var E=_.props.onClick;E&&E(O,_.props)},_.handleIconOverrides=function(O){return{onClick:function(p){(0,a.default)(O,"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,O=b.basic,E=b.children,p=b.circular,I=b.className,C=b.color,L=b.content,q=b.corner,le=b.detail,pe=b.empty,B=b.floating,U=b.horizontal,K=b.icon,ne=b.image,F=b.onRemove,j=b.pointing,z=b.prompt,$=b.removeIcon,H=b.ribbon,k=b.size,M=b.tag,G=j===!0&&"pointing"||(j==="left"||j==="right")&&j+" pointing"||(j==="above"||j==="below")&&"pointing "+j,ge=(0,o.default)("ui",C,G,k,(0,c.useKeyOnly)(S,"active"),(0,c.useKeyOnly)(O,"basic"),(0,c.useKeyOnly)(p,"circular"),(0,c.useKeyOnly)(pe,"empty"),(0,c.useKeyOnly)(B,"floating"),(0,c.useKeyOnly)(U,"horizontal"),(0,c.useKeyOnly)(ne===!0,"image"),(0,c.useKeyOnly)(z,"prompt"),(0,c.useKeyOnly)(M,"tag"),(0,c.useKeyOrValueAndKey)(q,"corner"),(0,c.useKeyOrValueAndKey)(H,"ribbon"),(0,c.useValueAndKey)(x,"attached"),"label",I),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 ce=(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}),L,d.default.create(le,{autoGenerateKey:!1}),F&&u.default.create(ce,{autoGenerateKey:!1,overrideProps:this.handleIconOverrides}))},v}(s.Component);return nv.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}}),nv}var hv={},EV;function nSe(){if(EV)return hv;EV=1;var t=br;hv.__esModule=!0,hv.default=void 0;var e=t(Bn()),r=t(ii);t(Ln());var n=t(Ge),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 hv.default=o,hv}var pv={},xV;function iSe(){if(xV)return pv;xV=1;var t=br;pv.__esModule=!0,pv.default=void 0;var e=t(Bn()),r=t(bS()),n=t(ql()),i=t(ii);t(Ln());var a=t(Ge),o=Wn(),s=t(H$());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,O=f.icon,E=f.inverted,p=f.labeled,I=f.negative,C=f.positive,L=f.primary,q=f.secondary,le=f.size,pe=f.toggle,B=f.vertical,U=f.widths,K=(0,i.default)("ui",y,le,(0,o.useKeyOnly)(g,"basic"),(0,o.useKeyOnly)(_,"compact"),(0,o.useKeyOnly)(x,"fluid"),(0,o.useKeyOnly)(O,"icon"),(0,o.useKeyOnly)(E,"inverted"),(0,o.useKeyOnly)(p,"labeled"),(0,o.useKeyOnly)(I,"negative"),(0,o.useKeyOnly)(C,"positive"),(0,o.useKeyOnly)(L,"primary"),(0,o.useKeyOnly)(q,"secondary"),(0,o.useKeyOnly)(pe,"toggle"),(0,o.useKeyOnly)(B,"vertical"),(0,o.useKeyOrValueAndKey)(d,"attached"),(0,o.useValueAndKey)(S,"floated"),(0,o.useWidthProp)(U),"buttons",v),ne=(0,o.getUnhandledProps)(c,f),F=(0,o.getElementType)(c,f);return(0,n.default)(m)?a.default.createElement(F,(0,e.default)({},ne,{className:K}),o.childrenUtils.isNil(w)?b:w):a.default.createElement(F,(0,e.default)({},ne,{className:K}),(0,r.default)(m,function(j){return s.default.create(j)}))}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 pv.default=u,pv}var gv={},AV;function aSe(){if(AV)return gv;AV=1;var t=br;gv.__esModule=!0,gv.default=void 0;var e=t(Bn()),r=t(ii);t(Ln());var n=t(Ge),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 gv.default=o,gv}var SV;function H$(){if(SV)return jm;SV=1;var t=Ws,e=br;jm.__esModule=!0,jm.default=void 0;var r=e(Bn()),n=e($c()),i=e(Ks()),a=e(ql()),o=vd,s=e(ii);e(Ln());var c=t(Ge),u=Wn(),f=e(wS()),d=e(Bre()),g=e(nSe()),m=e(iSe()),w=e(aSe()),v=function(_){(0,n.default)(b,_);function b(){for(var x,O=arguments.length,E=new Array(O),p=0;p<O;p++)E[p]=arguments[p];return x=_.call.apply(_,[this].concat(E))||this,x.ref=(0,c.createRef)(),x.computeElementType=function(){var I=x.props,C=I.attached,L=I.label;if(!(0,a.default)(C)||!(0,a.default)(L))return"div"},x.computeTabIndex=function(I){var C=x.props,L=C.disabled,q=C.tabIndex;if(!(0,a.default)(q))return q;if(L)return-1;if(I==="div")return 0},x.focus=function(I){return(0,i.default)(x.ref.current,"focus",I)},x.handleClick=function(I){var C=x.props.disabled;if(C){I.preventDefault();return}(0,i.default)(x.props,"onClick",I,x.props)},x.hasIconClass=function(){var I=x.props,C=I.labelPosition,L=I.children,q=I.content,le=I.icon;return le===!0?!0:le&&(C||u.childrenUtils.isNil(L)&&(0,a.default)(q))},x}var S=b.prototype;return S.computeButtonAriaRole=function(O){var E=this.props.role;if(!(0,a.default)(E))return E;if(O!=="button")return"button"},S.render=function(){var O=this.props,E=O.active,p=O.animated,I=O.attached,C=O.basic,L=O.children,q=O.circular,le=O.className,pe=O.color,B=O.compact,U=O.content,K=O.disabled,ne=O.floated,F=O.fluid,j=O.icon,z=O.inverted,$=O.label,H=O.labelPosition,k=O.loading,M=O.negative,G=O.positive,ge=O.primary,Q=O.secondary,te=O.size,ce=O.toggle,T=O.type,fe=(0,s.default)(pe,te,(0,u.useKeyOnly)(E,"active"),(0,u.useKeyOnly)(C,"basic"),(0,u.useKeyOnly)(q,"circular"),(0,u.useKeyOnly)(B,"compact"),(0,u.useKeyOnly)(F,"fluid"),(0,u.useKeyOnly)(this.hasIconClass(),"icon"),(0,u.useKeyOnly)(z,"inverted"),(0,u.useKeyOnly)(k,"loading"),(0,u.useKeyOnly)(M,"negative"),(0,u.useKeyOnly)(G,"positive"),(0,u.useKeyOnly)(ge,"primary"),(0,u.useKeyOnly)(Q,"secondary"),(0,u.useKeyOnly)(ce,"toggle"),(0,u.useKeyOrValueAndKey)(p,"animated"),(0,u.useKeyOrValueAndKey)(I,"attached")),ze=(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",le),Yt=(0,s.default)("ui",ze,"button",le,tt),wr=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"&&wr,c.default.createElement(o.Ref,{innerRef:this.ref},c.default.createElement("button",{className:Lt,"aria-pressed":ce?!!E:void 0,disabled:K,type:T,tabIndex:gt},f.default.create(j,{autoGenerateKey:!1})," ",U)),(H==="right"||!H)&&wr)}var Rt=(0,s.default)("ui",fe,tt,ze,"button",le),Pt=!u.childrenUtils.isNil(L),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":ce?!!E:void 0,disabled:K&&vt==="button"||void 0,onClick:this.handleClick,role:kt,type:T,tabIndex:gt}),Pt&&L,!Pt&&f.default.create(j,{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 jm.default=y,jm}(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=H$();Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return e(r).default}})})(cu);var z$={},_S={},ES=br;_S.__esModule=!0;_S.default=void 0;var oSe=ES(Bn()),sSe=ES(ii);ES(Ln());var cSe=ES(Ge),Fu=Wn();function _1(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,sSe.default)("ui",u,(0,Fu.useKeyOnly)(e,"active"),(0,Fu.useKeyOnly)(a,"disabled"),(0,Fu.useKeyOnly)(o,"indeterminate"),(0,Fu.useKeyOnly)(c,"inverted"),(0,Fu.useKeyOnly)(r||i,"text"),(0,Fu.useKeyOrValueAndKey)(s,"inline"),"loader",n),d=(0,Fu.getUnhandledProps)(_1,t),g=(0,Fu.getElementType)(_1,t);return cSe.default.createElement(g,(0,oSe.default)({},d,{className:f}),Fu.childrenUtils.isNil(r)?i:r)}_1.handledProps=["active","as","children","className","content","disabled","indeterminate","inline","inverted","size"];_1.propTypes={};var uSe=_1;_S.default=uSe;var lSe=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)}}(),M8=Ne&&Ne.__assign||function(){return M8=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},M8.apply(this,arguments)},fSe=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]}),dSe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hSe=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)&&fSe(e,t,r);return dSe(e,t),e},pSe=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(z$,"__esModule",{value:!0});var xS=z$.Loader=void 0,OV=hSe(Ge),gSe=pSe(_S),ySe=function(t){lSe(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 OV.createElement(gSe.default,M8({"aria-live":"polite","aria-label":"Loading",role:"status"},this.props,{className:this.getClassName()}))},e}(OV.PureComponent);xS=z$.Loader=ySe;var V$={},IV=Object.prototype.toString,Fre=function(e){var r=IV.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&IV.call(e.callee)==="[object Function]"),n},MC,PV;function mSe(){if(PV)return MC;PV=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Fre,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 O=0;O<m.length;++O)b.push(String(O));else for(var E in m)!(S&&E==="prototype")&&e.call(m,E)&&b.push(String(E));if(a)for(var p=d(m),I=0;I<s.length;++I)!(p&&s[I]==="constructor")&&e.call(m,s[I])&&b.push(s[I]);return b}}return MC=t,MC}var vSe=Array.prototype.slice,bSe=Fre,TV=Object.keys,sx=TV?function(e){return TV(e)}:mSe(),RV=Object.keys;sx.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 bSe(n)?RV(vSe.call(n)):RV(n)})}else Object.keys=sx;return Object.keys||sx};var G$=sx,AS=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},CV=typeof Symbol<"u"&&Symbol,wSe=AS,W$=function(){return typeof CV!="function"||typeof Symbol!="function"||typeof CV("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:wSe()},NV={foo:{}},_Se=Object,ESe=function(){return{__proto__:NV}.foo===NV.foo&&!({__proto__:null}instanceof _Se)},xSe="Function.prototype.bind called on incompatible ",ASe=Object.prototype.toString,SSe=Math.max,OSe="[object Function]",DV=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},ISe=function(e,r){for(var n=[],i=r||0,a=0;i<e.length;i+=1,a+=1)n[a]=e[i];return n},PSe=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},TSe=function(e){var r=this;if(typeof r!="function"||ASe.apply(r)!==OSe)throw new TypeError(xSe+r);for(var n=ISe(arguments,1),i,a=function(){if(this instanceof i){var f=r.apply(this,DV(n,arguments));return Object(f)===f?f:this}return r.apply(e,DV(n,arguments))},o=SSe(0,r.length-n.length),s=[],c=0;c<o;c++)s[c]="$"+c;if(i=Function("binder","return function ("+PSe(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},RSe=TSe,K$=Function.prototype.bind||RSe,CSe=Function.prototype.call,NSe=Object.prototype.hasOwnProperty,DSe=K$,jre=DSe.call(CSe,NSe),nn,Ey=SyntaxError,qre=Function,cg=TypeError,kC=function(t){try{return qre('"use strict"; return ('+t+").constructor;")()}catch{}},Qh=Object.getOwnPropertyDescriptor;if(Qh)try{Qh({},"")}catch{Qh=null}var LC=function(){throw new cg},$Se=Qh?function(){try{return arguments.callee,LC}catch{try{return Qh(arguments,"callee").get}catch{return LC}}}():LC,l0=W$(),MSe=ESe(),Yi=Object.getPrototypeOf||(MSe?function(t){return t.__proto__}:null),S0={},kSe=typeof Uint8Array>"u"||!Yi?nn:Yi(Uint8Array),Jh={"%AggregateError%":typeof AggregateError>"u"?nn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?nn:ArrayBuffer,"%ArrayIteratorPrototype%":l0&&Yi?Yi([][Symbol.iterator]()):nn,"%AsyncFromSyncIteratorPrototype%":nn,"%AsyncFunction%":S0,"%AsyncGenerator%":S0,"%AsyncGeneratorFunction%":S0,"%AsyncIteratorPrototype%":S0,"%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%":qre,"%GeneratorFunction%":S0,"%Int8Array%":typeof Int8Array>"u"?nn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?nn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?nn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l0&&Yi?Yi(Yi([][Symbol.iterator]())):nn,"%JSON%":typeof JSON=="object"?JSON:nn,"%Map%":typeof Map>"u"?nn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!l0||!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"||!l0||!Yi?nn:Yi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?nn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l0&&Yi?Yi(""[Symbol.iterator]()):nn,"%Symbol%":l0?Symbol:nn,"%SyntaxError%":Ey,"%ThrowTypeError%":$Se,"%TypedArray%":kSe,"%TypeError%":cg,"%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 LSe=Yi(Yi(t));Jh["%Error.prototype%"]=LSe}var USe=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 Jh[e]=r,r},$V={"%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"]},ww=K$,yA=jre,BSe=ww.call(Function.call,Array.prototype.concat),FSe=ww.call(Function.apply,Array.prototype.splice),MV=ww.call(Function.call,String.prototype.replace),mA=ww.call(Function.call,String.prototype.slice),jSe=ww.call(Function.call,RegExp.prototype.exec),qSe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,HSe=/\\(\\)?/g,zSe=function(e){var r=mA(e,0,1),n=mA(e,-1);if(r==="%"&&n!=="%")throw new Ey("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ey("invalid intrinsic syntax, expected opening `%`");var i=[];return MV(e,qSe,function(a,o,s,c){i[i.length]=s?MV(c,HSe,"$1"):o||a}),i},VSe=function(e,r){var n=e,i;if(yA($V,n)&&(i=$V[n],n="%"+i[0]+"%"),yA(Jh,n)){var a=Jh[n];if(a===S0&&(a=USe(n)),typeof a>"u"&&!r)throw new cg("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Ey("intrinsic "+e+" does not exist!")},Ys=function(e,r){if(typeof e!="string"||e.length===0)throw new cg("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new cg('"allowMissing" argument must be a boolean');if(jSe(/^%?[^%]*%?$/,e)===null)throw new Ey("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=zSe(e),i=n.length>0?n[0]:"",a=VSe("%"+i+"%",r),o=a.name,s=a.value,c=!1,u=a.alias;u&&(i=u[0],FSe(n,BSe([0,1],u)));for(var f=1,d=!0;f<n.length;f+=1){var g=n[f],m=mA(g,0,1),w=mA(g,-1);if((m==='"'||m==="'"||m==="`"||w==='"'||w==="'"||w==="`")&&m!==w)throw new Ey("property names with quotes must have matching quotes");if((g==="constructor"||!d)&&(c=!0),i+="."+g,o="%"+i+"%",yA(Jh,o))s=Jh[o];else if(s!=null){if(!(g in s)){if(!r)throw new cg("base intrinsic for "+e+" exists, but the property is not available.");return}if(Qh&&f+1>=n.length){var v=Qh(s,g);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[g]}else d=yA(s,g),s=s[g];d&&!c&&(Jh[o]=s)}}return s},GSe=Ys,k8=GSe("%Object.defineProperty%",!0),L8=function(){if(k8)try{return k8({},"a",{value:1}),!0}catch{return!1}return!1};L8.hasArrayLengthDefineBug=function(){if(!L8())return null;try{return k8([],"length",{value:1}).length!==1}catch{return!0}};var SS=L8,WSe=Ys,cx=WSe("%Object.getOwnPropertyDescriptor%",!0);if(cx)try{cx([],"length")}catch{cx=null}var Y$=cx,KSe=SS(),Q$=Ys,Db=KSe&&Q$("%Object.defineProperty%",!0);if(Db)try{Db({},"a",{value:1})}catch{Db=!1}var YSe=Q$("%SyntaxError%"),f0=Q$("%TypeError%"),kV=Y$,J$=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new f0("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new f0("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new f0("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new f0("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new f0("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new f0("`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=!!kV&&kV(e,r);if(Db)Db(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 YSe("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},QSe=G$,JSe=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",XSe=Object.prototype.toString,ZSe=Array.prototype.concat,LV=J$,eOe=function(t){return typeof t=="function"&&XSe.call(t)==="[object Function]"},Hre=SS(),tOe=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!eOe(n)||!n())return}Hre?LV(t,e,r,!0):LV(t,e,r)},zre=function(t,e){var r=arguments.length>2?arguments[2]:{},n=QSe(e);JSe&&(n=ZSe.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)tOe(t,n[i],e[n[i]],r[n[i]])};zre.supportsDescriptors=!!Hre;var xp=zre,Vre={exports:{}},Gre=Ys,UV=J$,rOe=SS(),BV=Y$,FV=Gre("%TypeError%"),nOe=Gre("%Math.floor%"),iOe=function(e,r){if(typeof e!="function")throw new FV("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||nOe(r)!==r)throw new FV("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in e&&BV){var o=BV(e,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(rOe?UV(e,"length",r,!0,!0):UV(e,"length",r)),e};(function(t){var e=K$,r=Ys,n=iOe,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})(Vre);var Xy=Vre.exports,Wre=Ys,Kre=Xy,aOe=Kre(Wre("String.prototype.indexOf")),Qs=function(e,r){var n=Wre(e,!!r);return typeof n=="function"&&aOe(e,".prototype.")>-1?Kre(n):n},oOe=G$,Yre=AS(),Qre=Qs,jV=Object,sOe=Qre("Array.prototype.push"),qV=Qre("Object.prototype.propertyIsEnumerable"),cOe=Yre?Object.getOwnPropertySymbols:null,Jre=function(e,r){if(e==null)throw new TypeError("target must be an object");var n=jV(e);if(arguments.length===1)return n;for(var i=1;i<arguments.length;++i){var a=jV(arguments[i]),o=oOe(a),s=Yre&&(Object.getOwnPropertySymbols||cOe);if(s)for(var c=s(a),u=0;u<c.length;++u){var f=c[u];qV(a,f)&&sOe(o,f)}for(var d=0;d<o.length;++d){var g=o[d];if(qV(a,g)){var m=a[g];n[g]=m}}}return n},UC=Jre,uOe=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},lOe=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},Xre=function(){return!Object.assign||uOe()||lOe()?UC:Object.assign},fOe=xp,dOe=Xre,hOe=function(){var e=dOe();return fOe(Object,{assign:e},{assign:function(){return Object.assign!==e}}),e},pOe=xp,gOe=Xy,yOe=Jre,Zre=Xre,mOe=hOe,vOe=gOe.apply(Zre()),ene=function(e,r){return vOe(Object,arguments)};pOe(ene,{getPolyfill:Zre,implementation:yOe,shim:mOe});var bOe=ene,E1=function(){return typeof(function(){}).name=="string"},$b=Object.getOwnPropertyDescriptor;if($b)try{$b([],"length")}catch{$b=null}E1.functionsHaveConfigurableNames=function(){if(!E1()||!$b)return!1;var e=$b(function(){},"name");return!!e&&!!e.configurable};var wOe=Function.prototype.bind;E1.boundFunctionsHaveNames=function(){return E1()&&typeof wOe=="function"&&(function(){}).bind().name!==""};var _Oe=E1,HV=J$,EOe=SS(),xOe=_Oe.functionsHaveConfigurableNames(),AOe=TypeError,SOe=function(e,r){if(typeof e!="function")throw new AOe("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||xOe)&&(EOe?HV(e,"name",r,!0,!0):HV(e,"name",r)),e},OOe=SOe,IOe=Object,POe=TypeError,tne=OOe(function(){if(this!=null&&this!==IOe(this))throw new POe("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=tne,ROe=xp.supportsDescriptors,COe=Object.getOwnPropertyDescriptor,rne=function(){if(ROe&&/a/mig.flags==="gim"){var e=COe(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},NOe=xp.supportsDescriptors,DOe=rne,$Oe=Object.getOwnPropertyDescriptor,MOe=Object.defineProperty,kOe=TypeError,zV=Object.getPrototypeOf,LOe=/a/,UOe=function(){if(!NOe||!zV)throw new kOe("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=DOe(),r=zV(LOe),n=$Oe(r,"flags");return(!n||n.get!==e)&&MOe(r,"flags",{configurable:!0,enumerable:!1,get:e}),e},BOe=xp,FOe=Xy,jOe=tne,nne=rne,qOe=UOe,ine=FOe(nne());BOe(ine,{getPolyfill:nne,implementation:jOe,shim:qOe});var HOe=ine;function ane(){throw new Error("setTimeout has not been defined")}function one(){throw new Error("clearTimeout has not been defined")}var yf=ane,mf=one;typeof bn.setTimeout=="function"&&(yf=setTimeout);typeof bn.clearTimeout=="function"&&(mf=clearTimeout);function sne(t){if(yf===setTimeout)return setTimeout(t,0);if((yf===ane||!yf)&&setTimeout)return yf=setTimeout,setTimeout(t,0);try{return yf(t,0)}catch{try{return yf.call(null,t,0)}catch{return yf.call(this,t,0)}}}function zOe(t){if(mf===clearTimeout)return clearTimeout(t);if((mf===one||!mf)&&clearTimeout)return mf=clearTimeout,clearTimeout(t);try{return mf(t)}catch{try{return mf.call(null,t)}catch{return mf.call(this,t)}}}var _l=[],ug=!1,Eh,ux=-1;function VOe(){!ug||!Eh||(ug=!1,Eh.length?_l=Eh.concat(_l):ux=-1,_l.length&&cne())}function cne(){if(!ug){var t=sne(VOe);ug=!0;for(var e=_l.length;e;){for(Eh=_l,_l=[];++ux<e;)Eh&&Eh[ux].run();ux=-1,e=_l.length}Eh=null,ug=!1,zOe(t)}}function GOe(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];_l.push(new une(t,e)),_l.length===1&&!ug&&sne(cne)}function une(t,e){this.fun=t,this.array=e}une.prototype.run=function(){this.fun.apply(null,this.array)};var WOe="browser",KOe="browser",YOe=!0,QOe={},JOe=[],XOe="",ZOe={},eIe={},tIe={};function Ap(){}var rIe=Ap,nIe=Ap,iIe=Ap,aIe=Ap,oIe=Ap,sIe=Ap,cIe=Ap;function uIe(t){throw new Error("process.binding is not supported")}function lIe(){return"/"}function fIe(t){throw new Error("process.chdir is not supported")}function dIe(){return 0}var O0=bn.performance||{},hIe=O0.now||O0.mozNow||O0.msNow||O0.oNow||O0.webkitNow||function(){return new Date().getTime()};function pIe(t){var e=hIe.call(O0)*.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 gIe=new Date;function yIe(){var t=new Date,e=t-gIe;return e/1e3}var Ha={nextTick:GOe,title:WOe,browser:YOe,env:QOe,argv:JOe,version:XOe,versions:ZOe,on:rIe,addListener:nIe,once:iIe,off:aIe,removeListener:oIe,removeAllListeners:sIe,emit:cIe,binding:uIe,cwd:lIe,chdir:fIe,umask:dIe,hrtime:pIe,platform:KOe,release:eIe,config:tIe,uptime:yIe},lx={exports:{}},mIe=AS,Sp=function(){return mIe()&&!!Symbol.toStringTag},vIe=Sp(),bIe=Qs,U8=bIe("Object.prototype.toString"),OS=function(e){return vIe&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:U8(e)==="[object Arguments]"},lne=function(e){return OS(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&U8(e)!=="[object Array]"&&U8(e.callee)==="[object Function]"},wIe=function(){return OS(arguments)}();OS.isLegacyArguments=lne;var fne=wIe?OS:lne;const _Ie={},EIe=Object.freeze(Object.defineProperty({__proto__:null,default:_Ie},Symbol.toStringTag,{value:"Module"})),X$=uo(EIe);var Z$=typeof Map=="function"&&Map.prototype,BC=Object.getOwnPropertyDescriptor&&Z$?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,vA=Z$&&BC&&typeof BC.get=="function"?BC.get:null,VV=Z$&&Map.prototype.forEach,eM=typeof Set=="function"&&Set.prototype,FC=Object.getOwnPropertyDescriptor&&eM?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,bA=eM&&FC&&typeof FC.get=="function"?FC.get:null,GV=eM&&Set.prototype.forEach,xIe=typeof WeakMap=="function"&&WeakMap.prototype,Mb=xIe?WeakMap.prototype.has:null,AIe=typeof WeakSet=="function"&&WeakSet.prototype,kb=AIe?WeakSet.prototype.has:null,SIe=typeof WeakRef=="function"&&WeakRef.prototype,WV=SIe?WeakRef.prototype.deref:null,OIe=Boolean.prototype.valueOf,IIe=Object.prototype.toString,PIe=Function.prototype.toString,TIe=String.prototype.match,tM=String.prototype.slice,zf=String.prototype.replace,RIe=String.prototype.toUpperCase,KV=String.prototype.toLowerCase,dne=RegExp.prototype.test,YV=Array.prototype.concat,iu=Array.prototype.join,CIe=Array.prototype.slice,QV=Math.floor,B8=typeof BigInt=="function"?BigInt.prototype.valueOf:null,jC=Object.getOwnPropertySymbols,F8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,xy=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Va=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===xy||"symbol")?Symbol.toStringTag:null,hne=Object.prototype.propertyIsEnumerable,JV=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function XV(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||dne.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-QV(-t):QV(t);if(n!==t){var i=String(n),a=tM.call(e,i.length+1);return zf.call(i,r,"$&_")+"."+zf.call(zf.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return zf.call(e,r,"$&_")}var j8=X$,ZV=j8.custom,eG=gne(ZV)?ZV:null,NIe=function t(e,r,n,i){var a=r||{};if(bf(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(bf(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=bf(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(bf(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(bf(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 mne(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return s?XV(e,c):c}if(typeof e=="bigint"){var u=String(e)+"n";return s?XV(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 q8(e)?"[Array]":"[Object]";var d=QIe(a,n);if(typeof i>"u")i=[];else if(yne(i,e)>=0)return"[Circular]";function g(pe,B,U){if(B&&(i=CIe.call(i),i.push(B)),U){var K={depth:a.depth};return bf(a,"quoteStyle")&&(K.quoteStyle=a.quoteStyle),t(pe,K,n+1,i)}return t(pe,a,n+1,i)}if(typeof e=="function"&&!tG(e)){var m=jIe(e),w=nE(e,g);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(w.length>0?" { "+iu.call(w,", ")+" }":"")}if(gne(e)){var v=xy?zf.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):F8.call(e);return typeof e=="object"&&!xy?yv(v):v}if(WIe(e)){for(var y="<"+KV.call(String(e.nodeName)),_=e.attributes||[],b=0;b<_.length;b++)y+=" "+_[b].name+"="+pne(DIe(_[b].value),"double",a);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+KV.call(String(e.nodeName))+">",y}if(q8(e)){if(e.length===0)return"[]";var S=nE(e,g);return d&&!YIe(S)?"["+H8(S,d)+"]":"[ "+iu.call(S,", ")+" ]"}if(MIe(e)){var x=nE(e,g);return!("cause"in Error.prototype)&&"cause"in e&&!hne.call(e,"cause")?"{ ["+String(e)+"] "+iu.call(YV.call("[cause]: "+g(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+iu.call(x,", ")+" }"}if(typeof e=="object"&&o){if(eG&&typeof e[eG]=="function"&&j8)return j8(e,{depth:f-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(qIe(e)){var O=[];return VV&&VV.call(e,function(pe,B){O.push(g(B,e,!0)+" => "+g(pe,e))}),rG("Map",vA.call(e),O,d)}if(VIe(e)){var E=[];return GV&&GV.call(e,function(pe){E.push(g(pe,e))}),rG("Set",bA.call(e),E,d)}if(HIe(e))return qC("WeakMap");if(GIe(e))return qC("WeakSet");if(zIe(e))return qC("WeakRef");if(LIe(e))return yv(g(Number(e)));if(BIe(e))return yv(g(B8.call(e)));if(UIe(e))return yv(OIe.call(e));if(kIe(e))return yv(g(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===Ne)return"{ [object globalThis] }";if(!$Ie(e)&&!tG(e)){var p=nE(e,g),I=JV?JV(e)===Object.prototype:e instanceof Object||e.constructor===Object,C=e instanceof Object?"":"null prototype",L=!I&&Va&&Object(e)===e&&Va in e?tM.call(_d(e),8,-1):C?"Object":"",q=I||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",le=q+(L||C?"["+iu.call(YV.call([],L||[],C||[]),": ")+"] ":"");return p.length===0?le+"{}":d?le+"{"+H8(p,d)+"}":le+"{ "+iu.call(p,", ")+" }"}return String(e)};function pne(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function DIe(t){return zf.call(String(t),/"/g,""")}function q8(t){return _d(t)==="[object Array]"&&(!Va||!(typeof t=="object"&&Va in t))}function $Ie(t){return _d(t)==="[object Date]"&&(!Va||!(typeof t=="object"&&Va in t))}function tG(t){return _d(t)==="[object RegExp]"&&(!Va||!(typeof t=="object"&&Va in t))}function MIe(t){return _d(t)==="[object Error]"&&(!Va||!(typeof t=="object"&&Va in t))}function kIe(t){return _d(t)==="[object String]"&&(!Va||!(typeof t=="object"&&Va in t))}function LIe(t){return _d(t)==="[object Number]"&&(!Va||!(typeof t=="object"&&Va in t))}function UIe(t){return _d(t)==="[object Boolean]"&&(!Va||!(typeof t=="object"&&Va in t))}function gne(t){if(xy)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!F8)return!1;try{return F8.call(t),!0}catch{}return!1}function BIe(t){if(!t||typeof t!="object"||!B8)return!1;try{return B8.call(t),!0}catch{}return!1}var FIe=Object.prototype.hasOwnProperty||function(t){return t in this};function bf(t,e){return FIe.call(t,e)}function _d(t){return IIe.call(t)}function jIe(t){if(t.name)return t.name;var e=TIe.call(PIe.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function yne(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 qIe(t){if(!vA||!t||typeof t!="object")return!1;try{vA.call(t);try{bA.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function HIe(t){if(!Mb||!t||typeof t!="object")return!1;try{Mb.call(t,Mb);try{kb.call(t,kb)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function zIe(t){if(!WV||!t||typeof t!="object")return!1;try{return WV.call(t),!0}catch{}return!1}function VIe(t){if(!bA||!t||typeof t!="object")return!1;try{bA.call(t);try{vA.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function GIe(t){if(!kb||!t||typeof t!="object")return!1;try{kb.call(t,kb);try{Mb.call(t,Mb)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function WIe(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function mne(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return mne(tM.call(t,0,e.maxStringLength),e)+n}var i=zf.call(zf.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,KIe);return pne(i,"single",e)}function KIe(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":"")+RIe.call(e.toString(16))}function yv(t){return"Object("+t+")"}function qC(t){return t+" { ? }"}function rG(t,e,r,n){var i=n?H8(r,n):iu.call(r,", ");return t+" ("+e+") {"+i+"}"}function YIe(t){for(var e=0;e<t.length;e++)if(yne(t[e],`
|
|
100
|
+
`)>=0)return!1;return!0}function QIe(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=iu.call(Array(t.indent+1)," ");else return null;return{base:r,prev:iu.call(Array(e+1),r)}}function H8(t,e){if(t.length===0)return"";var r=`
|
|
101
|
+
`+e.prev+e.base;return r+iu.call(t,","+r)+`
|
|
102
|
+
`+e.prev}function nE(t,e){var r=q8(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=bf(t,i)?e(t[i],t):""}var a=typeof jC=="function"?jC(t):[],o;if(xy){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var c in t)bf(t,c)&&(r&&String(Number(c))===c&&c<t.length||xy&&o["$"+c]instanceof Symbol||(dne.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof jC=="function")for(var u=0;u<a.length;u++)hne.call(t,a[u])&&n.push("["+e(a[u])+"]: "+e(t[a[u]],t));return n}var rM=Ys,Zy=Qs,JIe=NIe,XIe=rM("%TypeError%"),iE=rM("%WeakMap%",!0),aE=rM("%Map%",!0),ZIe=Zy("WeakMap.prototype.get",!0),ePe=Zy("WeakMap.prototype.set",!0),tPe=Zy("WeakMap.prototype.has",!0),rPe=Zy("Map.prototype.get",!0),nPe=Zy("Map.prototype.set",!0),iPe=Zy("Map.prototype.has",!0),nM=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},aPe=function(t,e){var r=nM(t,e);return r&&r.value},oPe=function(t,e,r){var n=nM(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},sPe=function(t,e){return!!nM(t,e)},vne=function(){var e,r,n,i={assert:function(a){if(!i.has(a))throw new XIe("Side channel does not contain "+JIe(a))},get:function(a){if(iE&&a&&(typeof a=="object"||typeof a=="function")){if(e)return ZIe(e,a)}else if(aE){if(r)return rPe(r,a)}else if(n)return aPe(n,a)},has:function(a){if(iE&&a&&(typeof a=="object"||typeof a=="function")){if(e)return tPe(e,a)}else if(aE){if(r)return iPe(r,a)}else if(n)return sPe(n,a);return!1},set:function(a,o){iE&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new iE),ePe(e,a,o)):aE?(r||(r=new aE),nPe(r,a,o)):(n||(n={key:{},next:null}),oPe(n,a,o))}};return i},cPe=Ys,uPe=jre,mv=vne(),ju=cPe("%TypeError%"),iM={assert:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new ju("`O` is not an object");if(typeof e!="string")throw new ju("`slot` must be a string");if(mv.assert(t),!iM.has(t,e))throw new ju("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new ju("`O` is not an object");if(typeof e!="string")throw new ju("`slot` must be a string");var r=mv.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new ju("`O` is not an object");if(typeof e!="string")throw new ju("`slot` must be a string");var r=mv.get(t);return!!r&&uPe(r,"$"+e)},set:function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new ju("`O` is not an object");if(typeof e!="string")throw new ju("`slot` must be a string");var n=mv.get(t);n||(n={},mv.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(iM);var lPe=iM,vv=lPe,fPe=SyntaxError,nG=typeof StopIteration=="object"?StopIteration:null,dPe=function(e){if(!nG)throw new fPe("this environment lacks StopIteration");vv.set(e,"[[Done]]",!1);var r={next:function(){var i=vv.get(this,"[[Iterator]]"),a=vv.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(o){if(vv.set(i,"[[Done]]",!0),o!==nG)throw o;return{done:!0,value:void 0}}}};return vv.set(r,"[[Iterator]]",e),r},hPe={}.toString,bne=Array.isArray||function(t){return hPe.call(t)=="[object Array]"},pPe=String.prototype.valueOf,gPe=function(e){try{return pPe.call(e),!0}catch{return!1}},yPe=Object.prototype.toString,mPe="[object String]",vPe=Sp(),wne=function(e){return typeof e=="string"?!0:typeof e!="object"?!1:vPe?gPe(e):yPe.call(e)===mPe},aM=typeof Map=="function"&&Map.prototype?Map:null,bPe=typeof Set=="function"&&Set.prototype?Set:null,wA;aM||(wA=function(e){return!1});var _ne=aM?Map.prototype.has:null,iG=bPe?Set.prototype.has:null;!wA&&!_ne&&(wA=function(e){return!1});var Ene=wA||function(e){if(!e||typeof e!="object")return!1;try{if(_ne.call(e),iG)try{iG.call(e)}catch{return!0}return e instanceof aM}catch{}return!1},wPe=typeof Map=="function"&&Map.prototype?Map:null,oM=typeof Set=="function"&&Set.prototype?Set:null,_A;oM||(_A=function(e){return!1});var aG=wPe?Map.prototype.has:null,xne=oM?Set.prototype.has:null;!_A&&!xne&&(_A=function(e){return!1});var Ane=_A||function(e){if(!e||typeof e!="object")return!1;try{if(xne.call(e),aG)try{aG.call(e)}catch{return!0}return e instanceof oM}catch{}return!1},oG=fne,sG=dPe;if(W$()||AS()){var HC=Symbol.iterator;lx.exports=function(e){if(e!=null&&typeof e[HC]<"u")return e[HC]();if(oG(e))return Array.prototype[HC].call(e)}}else{var _Pe=bne,EPe=wne,cG=Ys,xPe=cG("%Map%",!0),APe=cG("%Set%",!0),oc=Qs,uG=oc("Array.prototype.push"),lG=oc("String.prototype.charCodeAt"),SPe=oc("String.prototype.slice"),OPe=function(e,r){var n=e.length;if(r+1>=n)return r+1;var i=lG(e,r);if(i<55296||i>56319)return r+1;var a=lG(e,r+1);return a<56320||a>57343?r+1:r+2},zC=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}}}},fG=function(e,r){if(_Pe(e)||oG(e))return zC(e);if(EPe(e)){var n=0;return{next:function(){var a=OPe(e,n),o=SPe(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(!xPe&&!APe)lx.exports=function(e){if(e!=null)return fG(e,!0)};else{var IPe=Ene,PPe=Ane,dG=oc("Map.prototype.forEach",!0),hG=oc("Set.prototype.forEach",!0);if(typeof Ha>"u"||!Ha.versions||!Ha.versions.node)var pG=oc("Map.prototype.iterator",!0),gG=oc("Set.prototype.iterator",!0);var yG=oc("Map.prototype.@@iterator",!0)||oc("Map.prototype._es6-shim iterator_",!0),mG=oc("Set.prototype.@@iterator",!0)||oc("Set.prototype._es6-shim iterator_",!0),TPe=function(e){if(IPe(e)){if(pG)return sG(pG(e));if(yG)return yG(e);if(dG){var r=[];return dG(e,function(i,a){uG(r,[a,i])}),zC(r)}}if(PPe(e)){if(gG)return sG(gG(e));if(mG)return mG(e);if(hG){var n=[];return hG(e,function(i){uG(n,i)}),zC(n)}}};lx.exports=function(e){return TPe(e)||fG(e)}}}var RPe=lx.exports,vG=function(t){return t!==t},Sne=function(e,r){return e===0&&r===0?1/e===1/r:!!(e===r||vG(e)&&vG(r))},CPe=Sne,One=function(){return typeof Object.is=="function"?Object.is:CPe},NPe=One,DPe=xp,$Pe=function(){var e=NPe();return DPe(Object,{is:e},{is:function(){return Object.is!==e}}),e},MPe=xp,kPe=Xy,LPe=Sne,Ine=One,UPe=$Pe,Pne=kPe(Ine(),Object);MPe(Pne,{getPolyfill:Ine,implementation:LPe,shim:UPe});var BPe=Pne,Tne=Function.prototype.toString,q0=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,z8,fx;if(typeof q0=="function"&&typeof Object.defineProperty=="function")try{z8=Object.defineProperty({},"length",{get:function(){throw fx}}),fx={},q0(function(){throw 42},null,z8)}catch(t){t!==fx&&(q0=null)}else q0=null;var FPe=/^\s*class\b/,V8=function(e){try{var r=Tne.call(e);return FPe.test(r)}catch{return!1}},VC=function(e){try{return V8(e)?!1:(Tne.call(e),!0)}catch{return!1}},dx=Object.prototype.toString,jPe="[object Object]",qPe="[object Function]",HPe="[object GeneratorFunction]",zPe="[object HTMLAllCollection]",VPe="[object HTML document.all class]",GPe="[object HTMLCollection]",WPe=typeof Symbol=="function"&&!!Symbol.toStringTag,KPe=!(0 in[,]),G8=function(){return!1};if(typeof document=="object"){var YPe=document.all;dx.call(YPe)===dx.call(document.all)&&(G8=function(e){if((KPe||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=dx.call(e);return(r===zPe||r===VPe||r===GPe||r===jPe)&&e("")==null}catch{}return!1})}var QPe=q0?function(e){if(G8(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{q0(e,null,z8)}catch(r){if(r!==fx)return!1}return!V8(e)&&VC(e)}:function(e){if(G8(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(WPe)return VC(e);if(V8(e))return!1;var r=dx.call(e);return r!==qPe&&r!==HPe&&!/^\[object HTML/.test(r)?!1:VC(e)},JPe=QPe,XPe=Object.prototype.toString,Rne=Object.prototype.hasOwnProperty,ZPe=function(e,r,n){for(var i=0,a=e.length;i<a;i++)Rne.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},e3e=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)},t3e=function(e,r,n){for(var i in e)Rne.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},r3e=function(e,r,n){if(!JPe(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),XPe.call(e)==="[object Array]"?ZPe(e,r,i):typeof e=="string"?e3e(e,r,i):t3e(e,r,i)},n3e=r3e,GC=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i3e=typeof globalThis>"u"?Ne:globalThis,a3e=function(){for(var e=[],r=0;r<GC.length;r++)typeof i3e[GC[r]]=="function"&&(e[e.length]=GC[r]);return e},EA=n3e,o3e=a3e,bG=Xy,sM=Qs,hx=Y$,s3e=sM("Object.prototype.toString"),Cne=Sp(),wG=typeof globalThis>"u"?Ne:globalThis,W8=o3e(),cM=sM("String.prototype.slice"),WC=Object.getPrototypeOf,c3e=sM("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n<e.length;n+=1)if(e[n]===r)return n;return-1},xA={__proto__:null};Cne&&hx&&WC?EA(W8,function(t){var e=new wG[t];if(Symbol.toStringTag in e){var r=WC(e),n=hx(r,Symbol.toStringTag);if(!n){var i=WC(r);n=hx(i,Symbol.toStringTag)}xA["$"+t]=bG(n.get)}}):EA(W8,function(t){var e=new wG[t],r=e.slice||e.set;r&&(xA["$"+t]=bG(r))});var u3e=function(e){var r=!1;return EA(xA,function(n,i){if(!r)try{"$"+n(e)===i&&(r=cM(i,1))}catch{}}),r},l3e=function(e){var r=!1;return EA(xA,function(n,i){if(!r)try{n(e),r=cM(i,1)}catch{}}),r},Nne=function(e){if(!e||typeof e!="object")return!1;if(!Cne){var r=cM(s3e(e),8,-1);return c3e(W8,r)>-1?r:r!=="Object"?!1:l3e(e)}return hx?u3e(e):null},f3e=Nne,d3e=function(e){return!!f3e(e)},h3e=Xy,p3e=Qs,Dne=Ys,g3e=d3e,_G=Dne("ArrayBuffer",!0),EG=Dne("Float32Array",!0),px=p3e("ArrayBuffer.prototype.byteLength",!0),xG=_G&&!px&&new _G().slice,AG=xG&&h3e(xG),$ne=px||AG?function(e){if(!e||typeof e!="object")return!1;try{return px?px(e):AG(e,0),!0}catch{return!1}}:EG?function(e){try{return new EG(e).buffer===e&&!g3e(e)}catch(r){return typeof e=="object"&&r.name==="RangeError"}}:function(e){return!1},y3e=Date.prototype.getDay,m3e=function(e){try{return y3e.call(e),!0}catch{return!1}},v3e=Object.prototype.toString,b3e="[object Date]",w3e=Sp(),_3e=function(e){return typeof e!="object"||e===null?!1:w3e?m3e(e):v3e.call(e)===b3e},K8=Qs,Mne=Sp(),kne,Lne,Y8,Q8;if(Mne){kne=K8("Object.prototype.hasOwnProperty"),Lne=K8("RegExp.prototype.exec"),Y8={};var KC=function(){throw Y8};Q8={toString:KC,valueOf:KC},typeof Symbol.toPrimitive=="symbol"&&(Q8[Symbol.toPrimitive]=KC)}var E3e=K8("Object.prototype.toString"),x3e=Object.getOwnPropertyDescriptor,A3e="[object RegExp]",S3e=Mne?function(e){if(!e||typeof e!="object")return!1;var r=x3e(e,"lastIndex"),n=r&&kne(r,"value");if(!n)return!1;try{Lne(e,Q8)}catch(i){return i===Y8}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:E3e(e)===A3e},O3e=Qs,SG=O3e("SharedArrayBuffer.prototype.byteLength",!0),I3e=SG?function(e){if(!e||typeof e!="object")return!1;try{return SG(e),!0}catch{return!1}}:function(e){return!1},P3e=Number.prototype.toString,T3e=function(e){try{return P3e.call(e),!0}catch{return!1}},R3e=Object.prototype.toString,C3e="[object Number]",N3e=Sp(),D3e=function(e){return typeof e=="number"?!0:typeof e!="object"?!1:N3e?T3e(e):R3e.call(e)===C3e},Une=Qs,$3e=Une("Boolean.prototype.toString"),M3e=Une("Object.prototype.toString"),k3e=function(e){try{return $3e(e),!0}catch{return!1}},L3e="[object Boolean]",U3e=Sp(),B3e=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:U3e&&Symbol.toStringTag in e?k3e(e):M3e(e)===L3e},J8={exports:{}},F3e=Object.prototype.toString,j3e=W$();if(j3e){var q3e=Symbol.prototype.toString,H3e=/^Symbol\(.*\)$/,z3e=function(e){return typeof e.valueOf()!="symbol"?!1:H3e.test(q3e.call(e))};J8.exports=function(e){if(typeof e=="symbol")return!0;if(F3e.call(e)!=="[object Symbol]")return!1;try{return z3e(e)}catch{return!1}}}else J8.exports=function(e){return!1};var V3e=J8.exports,X8={exports:{}},OG=typeof BigInt<"u"&&BigInt,G3e=function(){return typeof OG=="function"&&typeof BigInt=="function"&&typeof OG(42)=="bigint"&&typeof BigInt(42)=="bigint"},W3e=G3e();if(W3e){var K3e=BigInt.prototype.valueOf,Y3e=function(e){try{return K3e.call(e),!0}catch{}return!1};X8.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:Y3e(e)}}else X8.exports=function(e){return!1};var Q3e=X8.exports,J3e=wne,X3e=D3e,Z3e=B3e,eTe=V3e,tTe=Q3e,rTe=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(J3e(e))return"String";if(X3e(e))return"Number";if(Z3e(e))return"Boolean";if(eTe(e))return"Symbol";if(tTe(e))return"BigInt"},AA=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,IG=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,SA;AA||(SA=function(e){return!1});var Z8=AA?AA.prototype.has:null,YC=IG?IG.prototype.has:null;!SA&&!Z8&&(SA=function(e){return!1});var nTe=SA||function(e){if(!e||typeof e!="object")return!1;try{if(Z8.call(e,Z8),YC)try{YC.call(e,YC)}catch{return!0}return e instanceof AA}catch{}return!1},e4={exports:{}},iTe=Ys,Bne=Qs,aTe=iTe("%WeakSet%",!0),QC=Bne("WeakSet.prototype.has",!0);if(QC){var JC=Bne("WeakMap.prototype.has",!0);e4.exports=function(e){if(!e||typeof e!="object")return!1;try{if(QC(e,QC),JC)try{JC(e,JC)}catch{return!0}return e instanceof aTe}catch{}return!1}}else e4.exports=function(e){return!1};var oTe=e4.exports,sTe=Ene,cTe=Ane,uTe=nTe,lTe=oTe,fTe=function(e){if(e&&typeof e=="object"){if(sTe(e))return"Map";if(cTe(e))return"Set";if(uTe(e))return"WeakMap";if(lTe(e))return"WeakSet"}return!1},dTe=Qs,PG=dTe("ArrayBuffer.prototype.byteLength",!0),hTe=$ne,pTe=function(e){return hTe(e)?PG?PG(e):e.byteLength:NaN},Fne=bOe,Ou=Qs,TG=HOe,gTe=Ys,Ay=RPe,yTe=vne,RG=BPe,CG=fne,NG=bne,DG=$ne,$G=_3e,MG=S3e,kG=I3e,LG=G$,UG=rTe,BG=fTe,FG=Nne,jG=pTe,qG=Ou("SharedArrayBuffer.prototype.byteLength",!0),HG=Ou("Date.prototype.getTime"),XC=Object.getPrototypeOf,zG=Ou("Object.prototype.toString"),OA=gTe("%Set%",!0),t4=Ou("Map.prototype.has",!0),IA=Ou("Map.prototype.get",!0),VG=Ou("Map.prototype.size",!0),PA=Ou("Set.prototype.add",!0),jne=Ou("Set.prototype.delete",!0),TA=Ou("Set.prototype.has",!0),gx=Ou("Set.prototype.size",!0);function GG(t,e,r,n){for(var i=Ay(t),a;(a=i.next())&&!a.done;)if(Ic(e,a.value,r,n))return jne(t,a.value),!0;return!1}function qne(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 mTe(t,e,r,n,i,a){var o=qne(r);if(o!=null)return o;var s=IA(e,o),c=Fne({},i,{strict:!1});return typeof s>"u"&&!t4(e,o)||!Ic(n,s,c,a)?!1:!t4(t,o)&&Ic(n,s,c,a)}function vTe(t,e,r){var n=qne(r);return n??(TA(e,n)&&!TA(t,n))}function WG(t,e,r,n,i,a){for(var o=Ay(t),s,c;(s=o.next())&&!s.done;)if(c=s.value,Ic(r,c,i,a)&&Ic(n,IA(e,c),i,a))return jne(t,c),!0;return!1}function Ic(t,e,r,n){var i=r||{};if(i.strict?RG(t,e):t===e)return!0;var a=UG(t),o=UG(e);if(a!==o)return!1;if(!t||!e||typeof t!="object"&&typeof e!="object")return i.strict?RG(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),_Te(t,e,i,n)}function KG(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 bTe(t,e,r,n){if(gx(t)!==gx(e))return!1;for(var i=Ay(t),a=Ay(e),o,s,c;(o=i.next())&&!o.done;)if(o.value&&typeof o.value=="object")c||(c=new OA),PA(c,o.value);else if(!TA(e,o.value)){if(r.strict||!vTe(t,e,o.value))return!1;c||(c=new OA),PA(c,o.value)}if(c){for(;(s=a.next())&&!s.done;)if(s.value&&typeof s.value=="object"){if(!GG(c,s.value,r.strict,n))return!1}else if(!r.strict&&!TA(t,s.value)&&!GG(c,s.value,r.strict,n))return!1;return gx(c)===0}return!0}function wTe(t,e,r,n){if(VG(t)!==VG(e))return!1;for(var i=Ay(t),a=Ay(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 OA),PA(c,u);else if(d=IA(e,u),typeof d>"u"&&!t4(e,u)||!Ic(f,d,r,n)){if(r.strict||!mTe(t,e,u,f,r,n))return!1;c||(c=new OA),PA(c,u)}if(c){for(;(s=a.next())&&!s.done;)if(u=s.value[0],d=s.value[1],u&&typeof u=="object"){if(!WG(c,t,u,d,r,n))return!1}else if(!r.strict&&(!t.has(u)||!Ic(IA(t,u),d,r,n))&&!WG(c,t,u,d,Fne({},r,{strict:!1}),n))return!1;return gx(c)===0}return!0}function _Te(t,e,r,n){var i,a;if(typeof t!=typeof e||t==null||e==null||zG(t)!==zG(e)||CG(t)!==CG(e))return!1;var o=NG(t),s=NG(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=MG(t),d=MG(e);if(f!==d||(f||d)&&(t.source!==e.source||TG(t)!==TG(e)))return!1;var g=$G(t),m=$G(e);if(g!==m||(g||m)&&HG(t)!==HG(e)||r.strict&&XC&&XC(t)!==XC(e))return!1;var w=FG(t),v=FG(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=KG(t),_=KG(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=DG(t),S=DG(e);if(b!==S)return!1;if(b||S)return jG(t)!==jG(e)?!1:typeof Uint8Array=="function"&&Ic(new Uint8Array(t),new Uint8Array(e),r,n);var x=kG(t),O=kG(e);if(x!==O)return!1;if(x||O)return qG(t)!==qG(e)?!1:typeof Uint8Array=="function"&&Ic(new Uint8Array(t),new Uint8Array(e),r,n);if(typeof t!=typeof e)return!1;var E=LG(t),p=LG(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],!Ic(t[a],e[a],r,n))return!1;var I=BG(t),C=BG(e);return I!==C?!1:I==="Set"||C==="Set"?bTe(t,e,r,n):I==="Map"?wTe(t,e,r,n):!0}var ETe=function(e,r,n){return Ic(e,r,n,yTe())},IS={},Hne={},Ct={},r4={exports:{}},zne={},Us={},Sy={},em={},Pr={},Oy={};(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})(Oy);var n4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Oy;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})(n4);(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=Oy,r=n4;var n=Oy;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=n4;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(M,G){return this}}class o extends a{constructor(M,G,ge){super(),this.varKind=M,this.name=G,this.rhs=ge}render({es5:M,_n:G}){const ge=M?r.varKinds.var:this.varKind,Q=this.rhs===void 0?"":` = ${this.rhs}`;return`${ge} ${this.name}${Q};`+G}optimizeNames(M,G){if(M[this.name.str])return this.rhs&&(this.rhs=B(this.rhs,M,G)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class s extends a{constructor(M,G,ge){super(),this.lhs=M,this.rhs=G,this.sideEffects=ge}render({_n:M}){return`${this.lhs} = ${this.rhs};`+M}optimizeNames(M,G){if(!(this.lhs instanceof e.Name&&!M[this.lhs.str]&&!this.sideEffects))return this.rhs=B(this.rhs,M,G),this}get names(){const M=this.lhs instanceof e.Name?{}:{...this.lhs.names};return pe(M,this.rhs)}}class c extends s{constructor(M,G,ge,Q){super(M,ge,Q),this.op=G}render({_n:M}){return`${this.lhs} ${this.op}= ${this.rhs};`+M}}class u extends a{constructor(M){super(),this.label=M,this.names={}}render({_n:M}){return`${this.label}:`+M}}class f extends a{constructor(M){super(),this.label=M,this.names={}}render({_n:M}){return`break${this.label?` ${this.label}`:""};`+M}}class d extends a{constructor(M){super(),this.error=M}render({_n:M}){return`throw ${this.error};`+M}get names(){return this.error.names}}class g extends a{constructor(M){super(),this.code=M}render({_n:M}){return`${this.code};`+M}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(M,G){return this.code=B(this.code,M,G),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class m extends a{constructor(M=[]){super(),this.nodes=M}render(M){return this.nodes.reduce((G,ge)=>G+ge.render(M),"")}optimizeNodes(){const{nodes:M}=this;let G=M.length;for(;G--;){const ge=M[G].optimizeNodes();Array.isArray(ge)?M.splice(G,1,...ge):ge?M[G]=ge:M.splice(G,1)}return M.length>0?this:void 0}optimizeNames(M,G){const{nodes:ge}=this;let Q=ge.length;for(;Q--;){const te=ge[Q];te.optimizeNames(M,G)||(U(M,te.names),ge.splice(Q,1))}return ge.length>0?this:void 0}get names(){return this.nodes.reduce((M,G)=>le(M,G.names),{})}}class w extends m{render(M){return"{"+M._n+super.render(M)+"}"+M._n}}class v extends m{}class y extends w{}y.kind="else";class _ extends w{constructor(M,G){super(G),this.condition=M}render(M){let G=`if(${this.condition})`+super.render(M);return this.else&&(G+="else "+this.else.render(M)),G}optimizeNodes(){super.optimizeNodes();const M=this.condition;if(M===!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 M===!1?G instanceof _?G:G.nodes:this.nodes.length?this:new _(K(M),G instanceof _?[G]:G.nodes);if(!(M===!1||!this.nodes.length))return this}optimizeNames(M,G){var ge;if(this.else=(ge=this.else)===null||ge===void 0?void 0:ge.optimizeNames(M,G),!!(super.optimizeNames(M,G)||this.else))return this.condition=B(this.condition,M,G),this}get names(){const M=super.names;return pe(M,this.condition),this.else&&le(M,this.else.names),M}}_.kind="if";class b extends w{}b.kind="for";class S extends b{constructor(M){super(),this.iteration=M}render(M){return`for(${this.iteration})`+super.render(M)}optimizeNames(M,G){if(super.optimizeNames(M,G))return this.iteration=B(this.iteration,M,G),this}get names(){return le(super.names,this.iteration.names)}}class x extends b{constructor(M,G,ge,Q){super(),this.varKind=M,this.name=G,this.from=ge,this.to=Q}render(M){const G=M.es5?r.varKinds.var:this.varKind,{name:ge,from:Q,to:te}=this;return`for(${G} ${ge}=${Q}; ${ge}<${te}; ${ge}++)`+super.render(M)}get names(){const M=pe(super.names,this.from);return pe(M,this.to)}}class O extends b{constructor(M,G,ge,Q){super(),this.loop=M,this.varKind=G,this.name=ge,this.iterable=Q}render(M){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(M)}optimizeNames(M,G){if(super.optimizeNames(M,G))return this.iterable=B(this.iterable,M,G),this}get names(){return le(super.names,this.iterable.names)}}class E extends w{constructor(M,G,ge){super(),this.name=M,this.args=G,this.async=ge}render(M){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(M)}}E.kind="func";class p extends m{render(M){return"return "+super.render(M)}}p.kind="return";class I extends w{render(M){let G="try"+super.render(M);return this.catch&&(G+=this.catch.render(M)),this.finally&&(G+=this.finally.render(M)),G}optimizeNodes(){var M,G;return super.optimizeNodes(),(M=this.catch)===null||M===void 0||M.optimizeNodes(),(G=this.finally)===null||G===void 0||G.optimizeNodes(),this}optimizeNames(M,G){var ge,Q;return super.optimizeNames(M,G),(ge=this.catch)===null||ge===void 0||ge.optimizeNames(M,G),(Q=this.finally)===null||Q===void 0||Q.optimizeNames(M,G),this}get names(){const M=super.names;return this.catch&&le(M,this.catch.names),this.finally&&le(M,this.finally.names),M}}class C extends w{constructor(M){super(),this.error=M}render(M){return`catch(${this.error})`+super.render(M)}}C.kind="catch";class L extends w{render(M){return"finally"+super.render(M)}}L.kind="finally";class q{constructor(M,G={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...G,_n:G.lines?`
|
|
103
|
+
`:""},this._extScope=M,this._scope=new r.Scope({parent:M}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(M){return this._scope.name(M)}scopeName(M){return this._extScope.name(M)}scopeValue(M,G){const ge=this._extScope.value(M,G);return(this._values[ge.prefix]||(this._values[ge.prefix]=new Set)).add(ge),ge}getScopeValue(M,G){return this._extScope.getValue(M,G)}scopeRefs(M){return this._extScope.scopeRefs(M,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(M,G,ge,Q){const te=this._scope.toName(G);return ge!==void 0&&Q&&(this._constants[te.str]=ge),this._leafNode(new o(M,te,ge)),te}const(M,G,ge){return this._def(r.varKinds.const,M,G,ge)}let(M,G,ge){return this._def(r.varKinds.let,M,G,ge)}var(M,G,ge){return this._def(r.varKinds.var,M,G,ge)}assign(M,G,ge){return this._leafNode(new s(M,G,ge))}add(M,G){return this._leafNode(new c(M,t.operators.ADD,G))}code(M){return typeof M=="function"?M():M!==e.nil&&this._leafNode(new g(M)),this}object(...M){const G=["{"];for(const[ge,Q]of M)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(M,G,ge){if(this._blockNode(new _(M)),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(M){return this._elseNode(new _(M))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(_,y)}_for(M,G){return this._blockNode(M),G&&this.code(G).endFor(),this}for(M,G){return this._for(new S(M),G)}forRange(M,G,ge,Q,te=this.opts.es5?r.varKinds.var:r.varKinds.let){const ce=this._scope.toName(M);return this._for(new x(te,ce,G,ge),()=>Q(ce))}forOf(M,G,ge,Q=r.varKinds.const){const te=this._scope.toName(M);if(this.opts.es5){const ce=G instanceof e.Name?G:this.var("_arr",G);return this.forRange("_i",0,(0,e._)`${ce}.length`,T=>{this.var(te,(0,e._)`${ce}[${T}]`),ge(te)})}return this._for(new O("of",Q,te,G),()=>ge(te))}forIn(M,G,ge,Q=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(M,(0,e._)`Object.keys(${G})`,ge);const te=this._scope.toName(M);return this._for(new O("in",Q,te,G),()=>ge(te))}endFor(){return this._endBlockNode(b)}label(M){return this._leafNode(new u(M))}break(M){return this._leafNode(new f(M))}return(M){const G=new p;if(this._blockNode(G),this.code(M),G.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(p)}try(M,G,ge){if(!G&&!ge)throw new Error('CodeGen: "try" without "catch" and "finally"');const Q=new I;if(this._blockNode(Q),this.code(M),G){const te=this.name("e");this._currNode=Q.catch=new C(te),G(te)}return ge&&(this._currNode=Q.finally=new L,this.code(ge)),this._endBlockNode(C,L)}throw(M){return this._leafNode(new d(M))}block(M,G){return this._blockStarts.push(this._nodes.length),M&&this.code(M).endBlock(G),this}endBlock(M){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||M!==void 0&&ge!==M)throw new Error(`CodeGen: wrong number of nodes: ${ge} vs ${M} expected`);return this._nodes.length=G,this}func(M,G=e.nil,ge,Q){return this._blockNode(new E(M,G,ge)),Q&&this.code(Q).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(M=1){for(;M-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(M){return this._currNode.nodes.push(M),this}_blockNode(M){this._currNode.nodes.push(M),this._nodes.push(M)}_endBlockNode(M,G){const ge=this._currNode;if(ge instanceof M||G&&ge instanceof G)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${G?`${M.kind}/${G.kind}`:M.kind}"`)}_elseNode(M){const G=this._currNode;if(!(G instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=G.else=M,this}get _root(){return this._nodes[0]}get _currNode(){const M=this._nodes;return M[M.length-1]}set _currNode(M){const G=this._nodes;G[G.length-1]=M}}t.CodeGen=q;function le(k,M){for(const G in M)k[G]=(k[G]||0)+(M[G]||0);return k}function pe(k,M){return M instanceof e._CodeOrName?le(k,M.names):k}function B(k,M,G){if(k instanceof e.Name)return ge(k);if(!Q(k))return k;return new e._Code(k._items.reduce((te,ce)=>(ce instanceof e.Name&&(ce=ge(ce)),ce instanceof e._Code?te.push(...ce._items):te.push(ce),te),[]));function ge(te){const ce=G[te.str];return ce===void 0||M[te.str]!==1?te:(delete M[te.str],ce)}function Q(te){return te instanceof e._Code&&te._items.some(ce=>ce instanceof e.Name&&M[ce.str]===1&&G[ce.str]!==void 0)}}function U(k,M){for(const G in M)k[G]=(k[G]||0)-(M[G]||0)}function K(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,e._)`!${H(k)}`}t.not=K;const ne=$(t.operators.AND);function F(...k){return k.reduce(ne)}t.and=F;const j=$(t.operators.OR);function z(...k){return k.reduce(j)}t.or=z;function $(k){return(M,G)=>M===e.nil?G:G===e.nil?M:(0,e._)`${H(M)} ${k} ${H(G)}`}function H(k){return k instanceof e.Name?k:(0,e._)`(${k})`}})(Pr);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=Pr,r=Oy;function n(E){const p={};for(const I of E)p[I]=!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:I,self:C}=E;if(!I.strictSchema||typeof p=="boolean")return;const L=C.RULES.keywords;for(const q in p)L[q]||O(E,`unknown keyword: "${q}"`)}t.checkUnknownRules=a;function o(E,p){if(typeof E=="boolean")return!E;for(const I in E)if(p[I])return!0;return!1}t.schemaHasRules=o;function s(E,p){if(typeof E=="boolean")return!E;for(const I in E)if(I!=="$ref"&&p.all[I])return!0;return!1}t.schemaHasRulesButRef=s;function c({topSchemaRef:E,schemaPath:p},I,C,L){if(!L){if(typeof I=="number"||typeof I=="boolean")return I;if(typeof I=="string")return(0,e._)`${I}`}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 I of E)p(I);else p(E)}t.eachItem=m;function w({mergeNames:E,mergeToName:p,mergeValues:I,resultToName:C}){return(L,q,le,pe)=>{const B=le===void 0?q:le instanceof e.Name?(q instanceof e.Name?E(L,q,le):p(L,q,le),le):q instanceof e.Name?(p(L,le,q),q):I(q,le);return pe===e.Name&&!(B instanceof e.Name)?C(L,B):B}}t.mergeEvaluated={props:w({mergeNames:(E,p,I)=>E.if((0,e._)`${I} !== true && ${p} !== undefined`,()=>{E.if((0,e._)`${p} === true`,()=>E.assign(I,!0),()=>E.assign(I,(0,e._)`${I} || {}`).code((0,e._)`Object.assign(${I}, ${p})`))}),mergeToName:(E,p,I)=>E.if((0,e._)`${I} !== true`,()=>{p===!0?E.assign(I,!0):(E.assign(I,(0,e._)`${I} || {}`),y(E,I,p))}),mergeValues:(E,p)=>E===!0?!0:{...E,...p},resultToName:v}),items:w({mergeNames:(E,p,I)=>E.if((0,e._)`${I} !== true && ${p} !== undefined`,()=>E.assign(I,(0,e._)`${p} === true ? true : ${I} > ${p} ? ${I} : ${p}`)),mergeToName:(E,p,I)=>E.if((0,e._)`${I} !== true`,()=>E.assign(I,p===!0?!0:(0,e._)`${I} > ${p} ? ${I} : ${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 I=E.var("props",(0,e._)`{}`);return p!==void 0&&y(E,I,p),I}t.evaluatedPropsToName=v;function y(E,p,I){Object.keys(I).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,I){if(E instanceof e.Name){const C=p===S.Num;return I?C?(0,e._)`"[" + ${E} + "]"`:(0,e._)`"['" + ${E} + "']"`:C?(0,e._)`"/" + ${E}`:(0,e._)`"/" + ${E}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return I?(0,e.getProperty)(E).toString():"/"+d(E)}t.getErrorPath=x;function O(E,p,I=E.opts.strictSchema){if(I){if(p=`strict mode: ${p}`,I===!0)throw new Error(p);E.self.logger.warn(p)}}t.checkStrictMode=O})(pn);var kc={};Object.defineProperty(kc,"__esModule",{value:!0});const Sa=Pr,xTe={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")};kc.default=xTe;(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=Pr,r=pn,n=kc;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:O,compositeRule:E,allErrors:p}=x,I=d(y,_,b);S??(E||p)?c(O,I):u(x,(0,e._)`[${I}]`)}t.reportError=i;function a(y,_=t.keywordError,b){const{it:S}=y,{gen:x,compositeRule:O,allErrors:E}=S,p=d(y,_,b);c(x,p),O||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:O}){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,O.errorPath))),y.assign((0,e._)`${E}.schemaPath`,(0,e.str)`${O.errSchemaPath}/${_}`),O.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,O=[m(x,b),w(y,b)];return v(y,_,O),S.object(...O)}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:O,schemaValue:E,it:p}=y,{opts:I,propertyName:C,topSchemaRef:L,schemaPath:q}=p;S.push([f.keyword,x],[f.params,typeof _=="function"?_(y):_||(0,e._)`{}`]),I.messages&&S.push([f.message,typeof b=="function"?b(y):b]),I.verbose&&S.push([f.schema,E],[f.parentSchema,(0,e._)`${L}${q}`],[n.default.data,O]),C&&S.push([f.propertyName,C])}})(em);Object.defineProperty(Sy,"__esModule",{value:!0});Sy.boolOrEmptySchema=Sy.topBoolOrEmptySchema=void 0;const ATe=em,STe=Pr,OTe=kc,ITe={message:"boolean schema is false"};function PTe(t){const{gen:e,schema:r,validateName:n}=t;r===!1?Vne(t,!1):typeof r=="object"&&r.$async===!0?e.return(OTe.default.data):(e.assign((0,STe._)`${n}.errors`,null),e.return(!0))}Sy.topBoolOrEmptySchema=PTe;function TTe(t,e){const{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Vne(t)):r.var(e,!0)}Sy.boolOrEmptySchema=TTe;function Vne(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,ATe.reportError)(i,ITe,void 0,e)}var _w={},cp={};Object.defineProperty(cp,"__esModule",{value:!0});cp.getRules=cp.isJSONType=void 0;const RTe=["string","number","integer","boolean","null","object","array"],CTe=new Set(RTe);function NTe(t){return typeof t=="string"&&CTe.has(t)}cp.isJSONType=NTe;function DTe(){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:{}}}cp.getRules=DTe;var Sl={};Object.defineProperty(Sl,"__esModule",{value:!0});Sl.shouldUseRule=Sl.shouldUseGroup=Sl.schemaHasRulesForType=void 0;function $Te({schema:t,self:e},r){const n=e.RULES.types[r];return n&&n!==!0&&Gne(t,n)}Sl.schemaHasRulesForType=$Te;function Gne(t,e){return e.rules.some(r=>Wne(t,r))}Sl.shouldUseGroup=Gne;function Wne(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))}Sl.shouldUseRule=Wne;(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=cp,r=Sl,n=em,i=Pr,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:O,data:E,opts:p}=S,I=d(x,p.coerceTypes),C=x.length>0&&!(I.length===0&&x.length===1&&(0,r.schemaHasRulesForType)(S,x[0]));if(C){const L=v(x,E,p.strictNumbers,o.Wrong);O.if(L,()=>{I.length?g(S,x,I):_(S)})}return C}t.coerceAndCheckDataType=u;const f=new Set(["string","number","integer","boolean","null"]);function d(S,x){return x?S.filter(O=>f.has(O)||x==="array"&&O==="array"):[]}function g(S,x,O){const{gen:E,data:p,opts:I}=S,C=E.let("dataType",(0,i._)`typeof ${p}`),L=E.let("coerced",(0,i._)`undefined`);I.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,I.strictNumbers),()=>E.assign(L,p))),E.if((0,i._)`${L} !== undefined`);for(const le of O)(f.has(le)||le==="array"&&I.coerceTypes==="array")&&q(le);E.else(),_(S),E.endIf(),E.if((0,i._)`${L} !== undefined`,()=>{E.assign(p,L),m(S,L)});function q(le){switch(le){case"string":E.elseIf((0,i._)`${C} == "number" || ${C} == "boolean"`).assign(L,(0,i._)`"" + ${p}`).elseIf((0,i._)`${p} === null`).assign(L,(0,i._)`""`);return;case"number":E.elseIf((0,i._)`${C} == "boolean" || ${p} === null
|
|
104
|
+
|| (${C} == "string" && ${p} && ${p} == +${p})`).assign(L,(0,i._)`+${p}`);return;case"integer":E.elseIf((0,i._)`${C} === "boolean" || ${p} === null
|
|
105
|
+
|| (${C} === "string" && ${p} && ${p} == +${p} && !(${p} % 1))`).assign(L,(0,i._)`+${p}`);return;case"boolean":E.elseIf((0,i._)`${p} === "false" || ${p} === 0 || ${p} === null`).assign(L,!1).elseIf((0,i._)`${p} === "true" || ${p} === 1`).assign(L,!0);return;case"null":E.elseIf((0,i._)`${p} === "" || ${p} === 0 || ${p} === false`),E.assign(L,null);return;case"array":E.elseIf((0,i._)`${C} === "string" || ${C} === "number"
|
|
106
|
+
|| ${C} === "boolean" || ${p} === null`).assign(L,(0,i._)`[${p}]`)}}}function m({gen:S,parentData:x,parentDataProperty:O},E){S.if((0,i._)`${x} !== undefined`,()=>S.assign((0,i._)`${x}[${O}]`,E))}function w(S,x,O,E=o.Correct){const p=E===o.Correct?i.operators.EQ:i.operators.NEQ;let I;switch(S){case"null":return(0,i._)`${x} ${p} null`;case"array":I=(0,i._)`Array.isArray(${x})`;break;case"object":I=(0,i._)`${x} && typeof ${x} == "object" && !Array.isArray(${x})`;break;case"integer":I=C((0,i._)`!(${x} % 1) && !isNaN(${x})`);break;case"number":I=C();break;default:return(0,i._)`typeof ${x} ${p} ${S}`}return E===o.Correct?I:(0,i.not)(I);function C(L=i.nil){return(0,i.and)((0,i._)`typeof ${x} == "number"`,L,O?(0,i._)`isFinite(${x})`:i.nil)}}t.checkDataType=w;function v(S,x,O,E){if(S.length===1)return w(S[0],x,O,E);let p;const I=(0,a.toHash)(S);if(I.array&&I.object){const C=(0,i._)`typeof ${x} != "object"`;p=I.null?C:(0,i._)`!${x} || ${C}`,delete I.null,delete I.array,delete I.object}else p=i.nil;I.number&&delete I.integer;for(const C in I)p=(0,i.and)(p,w(C,x,O,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:O,schema:E}=S,p=(0,a.schemaRefOrVal)(S,E,"type");return{gen:x,keyword:"type",data:O,schema:E.type,schemaCode:p,schemaValue:p,parentSchema:E,params:{},it:S}}})(_w);var PS={};Object.defineProperty(PS,"__esModule",{value:!0});PS.assignDefaults=void 0;const d0=Pr,MTe=pn;function kTe(t,e){const{properties:r,items:n}=t.schema;if(e==="object"&&r)for(const i in r)YG(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,a)=>YG(t,a,i.default))}PS.assignDefaults=kTe;function YG(t,e,r){const{gen:n,compositeRule:i,data:a,opts:o}=t;if(r===void 0)return;const s=(0,d0._)`${a}${(0,d0.getProperty)(e)}`;if(i){(0,MTe.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,d0._)`${s} === undefined`;o.useDefaults==="empty"&&(c=(0,d0._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,d0._)`${s} = ${(0,d0.stringify)(r)}`)}var hu={},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=Pr,uM=pn,uf=kc,LTe=pn;function UTe(t,e){const{gen:r,data:n,it:i}=t;r.if(fM(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Jn._)`${e}`},!0),t.error()})}Kr.checkReportMissingProp=UTe;function BTe({gen:t,data:e,it:{opts:r}},n,i){return(0,Jn.or)(...n.map(a=>(0,Jn.and)(fM(t,e,a,r.ownProperties),(0,Jn._)`${i} = ${a}`)))}Kr.checkMissingProp=BTe;function FTe(t,e){t.setParams({missingProperty:e},!0),t.error()}Kr.reportMissingProp=FTe;function Kne(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Jn._)`Object.prototype.hasOwnProperty`})}Kr.hasPropFunc=Kne;function lM(t,e,r){return(0,Jn._)`${Kne(t)}.call(${e}, ${r})`}Kr.isOwnProperty=lM;function jTe(t,e,r,n){const i=(0,Jn._)`${e}${(0,Jn.getProperty)(r)} !== undefined`;return n?(0,Jn._)`${i} && ${lM(t,e,r)}`:i}Kr.propertyInData=jTe;function fM(t,e,r,n){const i=(0,Jn._)`${e}${(0,Jn.getProperty)(r)} === undefined`;return n?(0,Jn.or)(i,(0,Jn.not)(lM(t,e,r))):i}Kr.noPropertyInData=fM;function Yne(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Kr.allSchemaProperties=Yne;function qTe(t,e){return Yne(e).filter(r=>!(0,uM.alwaysValidSchema)(t,e[r]))}Kr.schemaProperties=qTe;function HTe({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=[[uf.default.instancePath,(0,Jn.strConcat)(uf.default.instancePath,a)],[uf.default.parentData,o.parentData],[uf.default.parentDataProperty,o.parentDataProperty],[uf.default.rootData,uf.default.rootData]];o.opts.dynamicRef&&d.push([uf.default.dynamicAnchors,uf.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=HTe;const zTe=(0,Jn._)`new RegExp`;function VTe({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"?zTe:(0,LTe.useFunc)(t,i)}(${r}, ${n})`})}Kr.usePattern=VTe;function GTe(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:uM.Type.Num},a),e.if((0,Jn.not)(a),s)})}}Kr.validateArray=GTe;function WTe(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,uM.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=WTe;Object.defineProperty(hu,"__esModule",{value:!0});hu.validateKeywordUsage=hu.validSchemaType=hu.funcKeywordCode=hu.macroKeywordCode=void 0;const Xa=Pr,ch=kc,KTe=Kr,YTe=em;function QTe(t,e){const{gen:r,keyword:n,schema:i,parentSchema:a,it:o}=t,s=e.macro.call(o.self,i,a,o),c=Qne(r,n,s);o.opts.validateSchema!==!1&&o.self.validateSchema(s,!0);const u=r.name("valid");t.subschema({schema:s,schemaPath:Xa.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}hu.macroKeywordCode=QTe;function JTe(t,e){var r;const{gen:n,keyword:i,schema:a,parentSchema:o,$data:s,it:c}=t;ZTe(c,e);const u=!s&&e.compile?e.compile.call(c.self,a,o,c):e.validate,f=Qne(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&&QG(t),y(()=>t.error());else{const _=e.async?m():w();e.modifying&&QG(t),y(()=>XTe(t,_))}}function m(){const _=n.let("ruleErrs",null);return n.try(()=>v((0,Xa._)`await `),b=>n.assign(d,!1).if((0,Xa._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(_,(0,Xa._)`${b}.errors`),()=>n.throw(b))),_}function w(){const _=(0,Xa._)`${f}.errors`;return n.assign(_,null),v(Xa.nil),_}function v(_=e.async?(0,Xa._)`await `:Xa.nil){const b=c.opts.passContext?ch.default.this:ch.default.self,S=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,Xa._)`${_}${(0,KTe.callValidateCode)(t,f,b,S)}`,e.modifying)}function y(_){var b;n.if((0,Xa.not)((b=e.valid)!==null&&b!==void 0?b:d),_)}}hu.funcKeywordCode=JTe;function QG(t){const{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Xa._)`${n.parentData}[${n.parentDataProperty}]`))}function XTe(t,e){const{gen:r}=t;r.if((0,Xa._)`Array.isArray(${e})`,()=>{r.assign(ch.default.vErrors,(0,Xa._)`${ch.default.vErrors} === null ? ${e} : ${ch.default.vErrors}.concat(${e})`).assign(ch.default.errors,(0,Xa._)`${ch.default.vErrors}.length`),(0,YTe.extendErrors)(t)},()=>t.error())}function ZTe({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Qne(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,Xa.stringify)(r)})}function eRe(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")}hu.validSchemaType=eRe;function tRe({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)}}hu.validateKeywordUsage=tRe;var nd={};Object.defineProperty(nd,"__esModule",{value:!0});nd.extendSubschemaMode=nd.extendSubschemaData=nd.getSubschema=void 0;const uu=Pr,Jne=pn;function rRe(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,uu._)`${t.schemaPath}${(0,uu.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,uu._)`${t.schemaPath}${(0,uu.getProperty)(e)}${(0,uu.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Jne.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')}nd.getSubschema=rRe;function nRe(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,uu._)`${e.data}${(0,uu.getProperty)(r)}`,!0);c(g),t.errorPath=(0,uu.str)`${u}${(0,Jne.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,uu._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(i!==void 0){const u=i instanceof uu.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]}}nd.extendSubschemaData=nRe;function iRe(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}nd.extendSubschemaMode=iRe;var pa={},dM=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},Xne={exports:{}},Vf=Xne.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(){};yx(e,n,i,t,"",t)};Vf.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Vf.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Vf.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Vf.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 yx(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 Vf.arrayKeywords)for(var g=0;g<d.length;g++)yx(t,e,r,d[g],i+"/"+f+"/"+g,a,i,f,n,g)}else if(f in Vf.propsKeywords){if(d&&typeof d=="object")for(var m in d)yx(t,e,r,d[m],i+"/"+f+"/"+aRe(m),a,i,f,n,m)}else(f in Vf.keywords||t.allKeys&&!(f in Vf.skipKeywords))&&yx(t,e,r,d,i+"/"+f,a,i,f,n)}r(n,i,a,o,s,c,u)}}function aRe(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var oRe=Xne.exports;Object.defineProperty(pa,"__esModule",{value:!0});pa.getSchemaRefs=pa.resolveUrl=pa.normalizeId=pa._getFullPath=pa.getFullPath=pa.inlineRef=void 0;const sRe=pn,cRe=dM,uRe=oRe,lRe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function fRe(t,e=!0){return typeof t=="boolean"?!0:e===!0?!i4(t):e?Zne(t)<=e:!1}pa.inlineRef=fRe;const dRe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function i4(t){for(const e in t){if(dRe.has(e))return!0;const r=t[e];if(Array.isArray(r)&&r.some(i4)||typeof r=="object"&&i4(r))return!0}return!1}function Zne(t){let e=0;for(const r in t){if(r==="$ref")return 1/0;if(e++,!lRe.has(r)&&(typeof t[r]=="object"&&(0,sRe.eachItem)(t[r],n=>e+=Zne(n)),e===1/0))return 1/0}return e}function eie(t,e="",r){r!==!1&&(e=lg(e));const n=t.parse(e);return tie(t,n)}pa.getFullPath=eie;function tie(t,e){return t.serialize(e).split("#")[0]+"#"}pa._getFullPath=tie;const hRe=/#\/?$/;function lg(t){return t?t.replace(hRe,""):""}pa.normalizeId=lg;function pRe(t,e,r){return r=lg(r),t.resolve(e,r)}pa.resolveUrl=pRe;const gRe=/^[a-z_][-a-z0-9._]*$/i;function yRe(t,e){if(typeof t=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,i=lg(t[r]||e),a={"":i},o=eie(n,i,!1),s={},c=new Set;return uRe(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=lg(y?x(y,S):S),c.has(S))throw f(S);c.add(S);let O=this.refs[S];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?u(d,O.schema,S):S!==lg(v)&&(S[0]==="#"?(u(d,s[S],S),s[S]=d):this.refs[S]=v),S}function b(S){if(typeof S=="string"){if(!gRe.test(S))throw new Error(`invalid anchor "${S}"`);_.call(this,`#${S}`)}}}),s;function u(d,g,m){if(g!==void 0&&!cRe(d,g))throw f(m)}function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}}pa.getSchemaRefs=yRe;Object.defineProperty(Us,"__esModule",{value:!0});Us.getData=Us.KeywordCxt=Us.validateFunctionCode=void 0;const rie=Sy,JG=_w,hM=Sl,RA=_w,mRe=PS,Lb=hu,ZC=nd,er=Pr,Or=kc,vRe=pa,Ol=pn,bv=em;function bRe(t){if(aie(t)&&(oie(t),iie(t))){ERe(t);return}nie(t,()=>(0,rie.topBoolOrEmptySchema)(t))}Us.validateFunctionCode=bRe;function nie({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"; ${XG(r,i)}`),_Re(t,i),t.code(a)}):t.func(e,(0,er._)`${Or.default.data}, ${wRe(i)}`,n.$async,()=>t.code(XG(r,i)).code(a))}function wRe(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 _Re(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 ERe(t){const{schema:e,opts:r,gen:n}=t;nie(t,()=>{r.$comment&&e.$comment&&cie(t),IRe(t),n.let(Or.default.vErrors,null),n.let(Or.default.errors,0),r.unevaluated&&xRe(t),sie(t),RRe(t)})}function xRe(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 XG(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 ARe(t,e){if(aie(t)&&(oie(t),iie(t))){SRe(t,e);return}(0,rie.boolOrEmptySchema)(t,e)}function iie({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 aie(t){return typeof t.schema!="boolean"}function SRe(t,e){const{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&cie(t),PRe(t),TRe(t);const a=n.const("_errs",Or.default.errors);sie(t,a),n.var(e,(0,er._)`${a} === ${Or.default.errors}`)}function oie(t){(0,Ol.checkUnknownRules)(t),ORe(t)}function sie(t,e){if(t.opts.jtd)return ZG(t,[],!1,e);const r=(0,JG.getSchemaTypes)(t.schema),n=(0,JG.coerceAndCheckDataType)(t,r);ZG(t,r,!n,e)}function ORe(t){const{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Ol.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function IRe(t){const{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ol.checkStrictMode)(t,"default is ignored in the schema root")}function PRe(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,vRe.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function TRe(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function cie({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 RRe(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&&CRe(t),e.return((0,er._)`${Or.default.errors} === 0`))}function CRe({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 ZG(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,Ol.schemaHasRulesButRef)(a,f))){i.block(()=>fie(t,"$ref",f.all.$ref.definition));return}c.jtd||NRe(t,e),i.block(()=>{for(const g of f.rules)d(g);d(f.post)});function d(g){(0,hM.shouldUseGroup)(a,g)&&(g.type?(i.if((0,RA.checkDataType)(g.type,o,c.strictNumbers)),eW(t,g),e.length===1&&e[0]===g.type&&r&&(i.else(),(0,RA.reportTypeError)(t)),i.endIf()):eW(t,g),s||i.if((0,er._)`${Or.default.errors} === ${n||0}`))}}function eW(t,e){const{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,mRe.assignDefaults)(t,e.type),r.block(()=>{for(const a of e.rules)(0,hM.shouldUseRule)(n,a)&&fie(t,a.keyword,a.definition,e.type)})}function NRe(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(DRe(t,e),t.opts.allowUnionTypes||$Re(t,e),MRe(t,t.dataTypes))}function DRe(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{uie(t.dataTypes,r)||pM(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),LRe(t,e)}}function $Re(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&pM(t,"use allowUnionTypes to allow union type keyword")}function MRe(t,e){const r=t.self.RULES.all;for(const n in r){const i=r[n];if(typeof i=="object"&&(0,hM.shouldUseRule)(t.schema,i)){const{type:a}=i.definition;a.length&&!a.some(o=>kRe(e,o))&&pM(t,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function kRe(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function uie(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function LRe(t,e){const r=[];for(const n of t.dataTypes)uie(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function pM(t,e){const r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Ol.checkStrictMode)(t,e,t.opts.strictTypes)}class lie{constructor(e,r,n){if((0,Lb.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,Ol.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",die(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Lb.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?bv.reportExtraError:bv.reportError)(this,this.def.error,r)}$dataError(){(0,bv.reportError)(this,this.def.$dataError||bv.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,bv.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,RA.checkDataTypes)(c,r,a.opts.strictNumbers,RA.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,ZC.getSubschema)(this.it,e);(0,ZC.extendSubschemaData)(n,this.it,e),(0,ZC.extendSubschemaMode)(n,e);const i={...this.it,...n,items:void 0,props:void 0};return ARe(i,r),i}mergeEvaluated(e,r){const{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Ol.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Ol.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}}Us.KeywordCxt=lie;function fie(t,e,r,n){const i=new lie(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Lb.funcKeywordCode)(i,r):"macro"in r?(0,Lb.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Lb.funcKeywordCode)(i,r)}const URe=/^\/(?:[^~]|~0|~1)*$/,BRe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function die(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,a;if(t==="")return Or.default.rootData;if(t[0]==="/"){if(!URe.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,a=Or.default.rootData}else{const u=BRe.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,Ol.unescapeJsonPointer)(u))}`,o=(0,er._)`${o} && ${a}`);return o;function c(u,f){return`Cannot access ${u} ${f} levels up, current level is ${e}`}}Us.getData=die;var Ew={};Object.defineProperty(Ew,"__esModule",{value:!0});class FRe extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}Ew.default=FRe;var xw={};Object.defineProperty(xw,"__esModule",{value:!0});const eN=pa;class jRe extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,eN.resolveUrl)(e,r,n),this.missingSchema=(0,eN.normalizeId)((0,eN.getFullPath)(e,this.missingRef))}}xw.default=jRe;var To={};Object.defineProperty(To,"__esModule",{value:!0});To.resolveSchema=To.getCompilingSchema=To.resolveRef=To.compileSchema=To.SchemaEnv=void 0;const sc=Pr,qRe=Ew,Yd=kc,xc=pa,tW=pn,HRe=Us;class TS{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,xc.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={}}}To.SchemaEnv=TS;function gM(t){const e=hie.call(this,t);if(e)return e;const r=(0,xc.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,o=new sc.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a});let s;t.$async&&(s=o.scopeValue("Error",{ref:qRe.default,code:(0,sc._)`require("ajv/dist/runtime/validation_error").default`}));const c=o.scopeName("validate");t.validateName=c;const u={gen:o,allErrors:this.opts.allErrors,data:Yd.default.data,parentData:Yd.default.parentData,parentDataProperty:Yd.default.parentDataProperty,dataNames:[Yd.default.data],dataPathArr:[sc.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,sc.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:sc.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,sc._)`""`,opts:this.opts,self:this};let f;try{this._compilations.add(t),(0,HRe.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);const d=o.toString();f=`${o.scopeRefs(Yd.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,t));const m=new Function(`${Yd.default.self}`,`${Yd.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 sc.Name?void 0:w,items:v instanceof sc.Name?void 0:v,dynamicProps:w instanceof sc.Name,dynamicItems:v instanceof sc.Name},m.source&&(m.source.evaluated=(0,sc.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)}}To.compileSchema=gM;function zRe(t,e,r){var n;r=(0,xc.resolveUrl)(this.opts.uriResolver,e,r);const i=t.refs[r];if(i)return i;let a=WRe.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 TS({schema:o,schemaId:s,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=VRe.call(this,a)}To.resolveRef=zRe;function VRe(t){return(0,xc.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:gM.call(this,t)}function hie(t){for(const e of this._compilations)if(GRe(e,t))return e}To.getCompilingSchema=hie;function GRe(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function WRe(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||RS.call(this,t,e)}function RS(t,e){const r=this.opts.uriResolver.parse(e),n=(0,xc._getFullPath)(this.opts.uriResolver,r);let i=(0,xc.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return tN.call(this,r,t);const a=(0,xc.normalizeId)(n),o=this.refs[a]||this.schemas[a];if(typeof o=="string"){const s=RS.call(this,t,o);return typeof(s==null?void 0:s.schema)!="object"?void 0:tN.call(this,r,s)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||gM.call(this,o),a===(0,xc.normalizeId)(e)){const{schema:s}=o,{schemaId:c}=this.opts,u=s[c];return u&&(i=(0,xc.resolveUrl)(this.opts.uriResolver,i,u)),new TS({schema:s,schemaId:c,root:t,baseId:i})}return tN.call(this,r,o)}}To.resolveSchema=RS;const KRe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function tN(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,tW.unescapeFragment)(s)];if(c===void 0)return;r=c;const u=typeof r=="object"&&r[this.opts.schemaId];!KRe.has(s)&&u&&(e=(0,xc.resolveUrl)(this.opts.uriResolver,e,u))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,tW.schemaHasRulesButRef)(r,this.RULES)){const s=(0,xc.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=RS.call(this,n,s)}const{schemaId:o}=this.opts;if(a=a||new TS({schema:r,schemaId:o,root:n,baseId:e}),a.schema!==a.root.schema)return a}const YRe="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",QRe="Meta-schema for $data reference (JSON AnySchema extension proposal)",JRe="object",XRe=["$data"],ZRe={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},eCe=!1,tCe={$id:YRe,description:QRe,type:JRe,required:XRe,properties:ZRe,additionalProperties:eCe};var yM={},a4={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 ue=arguments.length,Z=Array(ue),ye=0;ye<ue;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(ue){return"(?:"+ue+")"}function a(ue){return ue===void 0?"undefined":ue===null?"null":Object.prototype.toString.call(ue).split(" ").pop().split("]").shift().toLowerCase()}function o(ue){return ue.toUpperCase()}function s(ue){return ue!=null?ue instanceof Array?ue:typeof ue.length!="number"||ue.split||ue.setInterval||ue.call?[ue]:Array.prototype.slice.call(ue):[]}function c(ue,Z){var ye=ue;if(Z)for(var Me in Z)ye[Me]=Z[Me];return ye}function u(ue){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="[\\:\\/\\?\\#\\[\\]\\@]",Ot="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",pr=n(wt,Ot),lr=ue?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",en=ue?"[\\uE000-\\uF8FF]":"[]",gr=n(Z,ye,"[\\-\\.\\_\\~]",lr);i(Z+n(Z,ye,"[\\+\\-\\.]")+"*"),i(i(Le+"|"+n(gr,Ot,"[\\:]"))+"*");var Er=i(i("25[0-5]")+"|"+i("2[0-4]"+ye)+"|"+i("1"+ye+ye)+"|"+i("0?[1-9]"+ye)+"|0?0?"+ye),on=i(Er+"\\."+Er+"\\."+Er+"\\."+Er),sr=i(Me+"{1,4}"),Lr=i(i(sr+"\\:"+sr)+"|"+on),gn=i(i(sr+"\\:")+"{6}"+Lr),Ur=i("\\:\\:"+i(sr+"\\:")+"{5}"+Lr),Zn=i(i(sr)+"?\\:\\:"+i(sr+"\\:")+"{4}"+Lr),Si=i(i(i(sr+"\\:")+"{0,1}"+sr)+"?\\:\\:"+i(sr+"\\:")+"{3}"+Lr),ei=i(i(i(sr+"\\:")+"{0,2}"+sr)+"?\\:\\:"+i(sr+"\\:")+"{2}"+Lr),Oi=i(i(i(sr+"\\:")+"{0,3}"+sr)+"?\\:\\:"+sr+"\\:"+Lr),Ii=i(i(i(sr+"\\:")+"{0,4}"+sr)+"?\\:\\:"+Lr),oi=i(i(i(sr+"\\:")+"{0,5}"+sr)+"?\\:\\:"+sr),Fn=i(i(i(sr+"\\:")+"{0,6}"+sr)+"?\\:\\:"),ra=i([gn,Ur,Zn,Si,ei,Oi,Ii,oi,Fn].join("|")),$i=i(i(gr+"|"+Le)+"+");i("[vV]"+Me+"+\\."+n(gr,Ot,"[\\:]")+"+"),i(i(Le+"|"+n(gr,Ot))+"*");var _a=i(Le+"|"+n(gr,Ot,"[\\:\\@]"));return i(i(Le+"|"+n(gr,Ot,"[\\@]"))+"+"),i(i(_a+"|"+n("[\\/\\?]",en))+"*"),{NOT_SCHEME:new RegExp(n("[^]",Z,ye,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",gr,Ot),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",gr,Ot),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",gr,Ot),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",gr,Ot),"g"),NOT_QUERY:new RegExp(n("[^\\%]",gr,Ot,"[\\:\\@\\/\\?]",en),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",gr,Ot,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",gr,Ot),"g"),UNRESERVED:new RegExp(gr,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",gr,pr),"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 ue(Z,ye){var Me=[],Le=!0,wt=!1,Ot=void 0;try{for(var pr=Z[Symbol.iterator](),lr;!(Le=(lr=pr.next()).done)&&(Me.push(lr.value),!(ye&&Me.length===ye));Le=!0);}catch(en){wt=!0,Ot=en}finally{try{!Le&&pr.return&&pr.return()}finally{if(wt)throw Ot}}return Me}return function(Z,ye){if(Array.isArray(Z))return Z;if(Symbol.iterator in Object(Z))return ue(Z,ye);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function(ue){if(Array.isArray(ue)){for(var Z=0,ye=Array(ue.length);Z<ue.length;Z++)ye[Z]=ue[Z];return ye}else return Array.from(ue)},w=2147483647,v=36,y=1,_=26,b=38,S=700,x=72,O=128,E="-",p=/^xn--/,I=/[^\0-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q=v-y,le=Math.floor,pe=String.fromCharCode;function B(ue){throw new RangeError(L[ue])}function U(ue,Z){for(var ye=[],Me=ue.length;Me--;)ye[Me]=Z(ue[Me]);return ye}function K(ue,Z){var ye=ue.split("@"),Me="";ye.length>1&&(Me=ye[0]+"@",ue=ye[1]),ue=ue.replace(C,".");var Le=ue.split("."),wt=U(Le,Z).join(".");return Me+wt}function ne(ue){for(var Z=[],ye=0,Me=ue.length;ye<Me;){var Le=ue.charCodeAt(ye++);if(Le>=55296&&Le<=56319&&ye<Me){var wt=ue.charCodeAt(ye++);(wt&64512)==56320?Z.push(((Le&1023)<<10)+(wt&1023)+65536):(Z.push(Le),ye--)}else Z.push(Le)}return Z}var F=function(Z){return String.fromCodePoint.apply(String,m(Z))},j=function(Z){return Z-48<10?Z-22:Z-65<26?Z-65:Z-97<26?Z-97:v},z=function(Z,ye){return Z+22+75*(Z<26)-((ye!=0)<<5)},$=function(Z,ye,Me){var Le=0;for(Z=Me?le(Z/S):Z>>1,Z+=le(Z/ye);Z>q*_>>1;Le+=v)Z=le(Z/q);return le(Le+(q+1)*Z/(Z+b))},H=function(Z){var ye=[],Me=Z.length,Le=0,wt=O,Ot=x,pr=Z.lastIndexOf(E);pr<0&&(pr=0);for(var lr=0;lr<pr;++lr)Z.charCodeAt(lr)>=128&&B("not-basic"),ye.push(Z.charCodeAt(lr));for(var en=pr>0?pr+1:0;en<Me;){for(var gr=Le,Er=1,on=v;;on+=v){en>=Me&&B("invalid-input");var sr=j(Z.charCodeAt(en++));(sr>=v||sr>le((w-Le)/Er))&&B("overflow"),Le+=sr*Er;var Lr=on<=Ot?y:on>=Ot+_?_:on-Ot;if(sr<Lr)break;var gn=v-Lr;Er>le(w/gn)&&B("overflow"),Er*=gn}var Ur=ye.length+1;Ot=$(Le-gr,Ur,gr==0),le(Le/Ur)>w-wt&&B("overflow"),wt+=le(Le/Ur),Le%=Ur,ye.splice(Le++,0,wt)}return String.fromCodePoint.apply(String,ye)},k=function(Z){var ye=[];Z=ne(Z);var Me=Z.length,Le=O,wt=0,Ot=x,pr=!0,lr=!1,en=void 0;try{for(var gr=Z[Symbol.iterator](),Er;!(pr=(Er=gr.next()).done);pr=!0){var on=Er.value;on<128&&ye.push(pe(on))}}catch(Qe){lr=!0,en=Qe}finally{try{!pr&&gr.return&&gr.return()}finally{if(lr)throw en}}var sr=ye.length,Lr=sr;for(sr&&ye.push(E);Lr<Me;){var gn=w,Ur=!0,Zn=!1,Si=void 0;try{for(var ei=Z[Symbol.iterator](),Oi;!(Ur=(Oi=ei.next()).done);Ur=!0){var Ii=Oi.value;Ii>=Le&&Ii<gn&&(gn=Ii)}}catch(Qe){Zn=!0,Si=Qe}finally{try{!Ur&&ei.return&&ei.return()}finally{if(Zn)throw Si}}var oi=Lr+1;gn-Le>le((w-wt)/oi)&&B("overflow"),wt+=(gn-Le)*oi,Le=gn;var Fn=!0,ra=!1,$i=void 0;try{for(var _a=Z[Symbol.iterator](),as;!(Fn=(as=_a.next()).done);Fn=!0){var X=as.value;if(X<Le&&++wt>w&&B("overflow"),X==Le){for(var me=wt,re=v;;re+=v){var Ee=re<=Ot?y:re>=Ot+_?_:re-Ot;if(me<Ee)break;var be=me-Ee,Oe=v-Ee;ye.push(pe(z(Ee+be%Oe,0))),me=le(be/Oe)}ye.push(pe(z(me,0))),Ot=$(wt,oi,Lr==sr),wt=0,++Lr}}}catch(Qe){ra=!0,$i=Qe}finally{try{!Fn&&_a.return&&_a.return()}finally{if(ra)throw $i}}++wt,++Le}return ye.join("")},M=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 I.test(ye)?"xn--"+k(ye):ye})},ge={version:"2.1.0",ucs2:{decode:ne,encode:F},decode:H,encode:k,toASCII:G,toUnicode:M},Q={};function te(ue){var Z=ue.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 ce(ue){for(var Z="",ye=0,Me=ue.length;ye<Me;){var Le=parseInt(ue.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(ue.substr(ye+4,2),16);Z+=String.fromCharCode((Le&31)<<6|wt&63)}else Z+=ue.substr(ye,6);ye+=6}else if(Le>=224){if(Me-ye>=9){var Ot=parseInt(ue.substr(ye+4,2),16),pr=parseInt(ue.substr(ye+7,2),16);Z+=String.fromCharCode((Le&15)<<12|(Ot&63)<<6|pr&63)}else Z+=ue.substr(ye,9);ye+=9}else Z+=ue.substr(ye,3),ye+=3}return Z}function T(ue,Z){function ye(Me){var Le=ce(Me);return Le.match(Z.UNRESERVED)?Le:Me}return ue.scheme&&(ue.scheme=String(ue.scheme).replace(Z.PCT_ENCODED,ye).toLowerCase().replace(Z.NOT_SCHEME,"")),ue.userinfo!==void 0&&(ue.userinfo=String(ue.userinfo).replace(Z.PCT_ENCODED,ye).replace(Z.NOT_USERINFO,te).replace(Z.PCT_ENCODED,o)),ue.host!==void 0&&(ue.host=String(ue.host).replace(Z.PCT_ENCODED,ye).toLowerCase().replace(Z.NOT_HOST,te).replace(Z.PCT_ENCODED,o)),ue.path!==void 0&&(ue.path=String(ue.path).replace(Z.PCT_ENCODED,ye).replace(ue.scheme?Z.NOT_PATH:Z.NOT_PATH_NOSCHEME,te).replace(Z.PCT_ENCODED,o)),ue.query!==void 0&&(ue.query=String(ue.query).replace(Z.PCT_ENCODED,ye).replace(Z.NOT_QUERY,te).replace(Z.PCT_ENCODED,o)),ue.fragment!==void 0&&(ue.fragment=String(ue.fragment).replace(Z.PCT_ENCODED,ye).replace(Z.NOT_FRAGMENT,te).replace(Z.PCT_ENCODED,o)),ue}function fe(ue){return ue.replace(/^0*(.*)/,"$1")||"0"}function ze(ue,Z){var ye=ue.match(Z.IPV4ADDRESS)||[],Me=g(ye,2),Le=Me[1];return Le?Le.split(".").map(fe).join("."):ue}function tt(ue,Z){var ye=ue.match(Z.IPV6ADDRESS)||[],Me=g(ye,3),Le=Me[1],wt=Me[2];if(Le){for(var Ot=Le.toLowerCase().split("::").reverse(),pr=g(Ot,2),lr=pr[0],en=pr[1],gr=en?en.split(":").map(fe):[],Er=lr.split(":").map(fe),on=Z.IPV4ADDRESS.test(Er[Er.length-1]),sr=on?7:8,Lr=Er.length-sr,gn=Array(sr),Ur=0;Ur<sr;++Ur)gn[Ur]=gr[Ur]||Er[Lr+Ur]||"";on&&(gn[sr-1]=ze(gn[sr-1],Z));var Zn=gn.reduce(function(oi,Fn,ra){if(!Fn||Fn==="0"){var $i=oi[oi.length-1];$i&&$i.index+$i.length===ra?$i.length++:oi.push({index:ra,length:1})}return oi},[]),Si=Zn.sort(function(oi,Fn){return Fn.length-oi.length})[0],ei=void 0;if(Si&&Si.length>1){var Oi=gn.slice(0,Si.index),Ii=gn.slice(Si.index+Si.length);ei=Oi.join(":")+"::"+Ii.join(":")}else ei=gn.join(":");return wt&&(ei+="%"+wt),ei}else return ue}var mt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,vt="".match(/(){0}/)[1]===void 0;function gt(ue){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ye={},Me=Z.iri!==!1?d:f;Z.reference==="suffix"&&(ue=(Z.scheme?Z.scheme+":":"")+"//"+ue);var Le=ue.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=ue.indexOf("@")!==-1?Le[3]:void 0,ye.host=ue.indexOf("//")!==-1?Le[4]:void 0,ye.port=parseInt(Le[5],10),ye.path=Le[6]||"",ye.query=ue.indexOf("?")!==-1?Le[7]:void 0,ye.fragment=ue.indexOf("#")!==-1?Le[8]:void 0,isNaN(ye.port)&&(ye.port=ue.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Le[4]:void 0)),ye.host&&(ye.host=tt(ze(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,ce).toLowerCase())}catch(Ot){ye.error=ye.error||"Host's domain name can not be converted to ASCII via punycode: "+Ot}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(ue,Z){var ye=Z.iri!==!1?d:f,Me=[];return ue.userinfo!==void 0&&(Me.push(ue.userinfo),Me.push("@")),ue.host!==void 0&&Me.push(tt(ze(String(ue.host),ye),ye).replace(ye.IPV6ADDRESS,function(Le,wt,Ot){return"["+wt+(Ot?"%25"+Ot:"")+"]"})),(typeof ue.port=="number"||typeof ue.port=="string")&&(Me.push(":"),Me.push(String(ue.port))),Me.length?Me.join(""):void 0}var Yt=/^\.\.?\//,wr=/^\/\.(\/|$)/,Rt=/^\/\.\.(\/|$)/,Pt=/^\/?(?:.|\n)*?(?=\/|$)/;function kt(ue){for(var Z=[];ue.length;)if(ue.match(Yt))ue=ue.replace(Yt,"");else if(ue.match(wr))ue=ue.replace(wr,"/");else if(ue.match(Rt))ue=ue.replace(Rt,"/"),Z.pop();else if(ue==="."||ue==="..")ue="";else{var ye=ue.match(Pt);if(ye){var Me=ye[0];ue=ue.slice(Me.length),Z.push(Me)}else throw new Error("Unexpected dot segment condition")}return Z.join("")}function Nt(ue){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ye=Z.iri?d:f,Me=[],Le=Q[(Z.scheme||ue.scheme||"").toLowerCase()];if(Le&&Le.serialize&&Le.serialize(ue,Z),ue.host&&!ye.IPV6ADDRESS.test(ue.host)){if(Z.domainHost||Le&&Le.domainHost)try{ue.host=Z.iri?ge.toUnicode(ue.host):ge.toASCII(ue.host.replace(ye.PCT_ENCODED,ce).toLowerCase())}catch(pr){ue.error=ue.error||"Host's domain name can not be converted to "+(Z.iri?"Unicode":"ASCII")+" via punycode: "+pr}}T(ue,ye),Z.reference!=="suffix"&&ue.scheme&&(Me.push(ue.scheme),Me.push(":"));var wt=Lt(ue,Z);if(wt!==void 0&&(Z.reference!=="suffix"&&Me.push("//"),Me.push(wt),ue.path&&ue.path.charAt(0)!=="/"&&Me.push("/")),ue.path!==void 0){var Ot=ue.path;!Z.absolutePath&&(!Le||!Le.absolutePath)&&(Ot=kt(Ot)),wt===void 0&&(Ot=Ot.replace(/^\/\//,"/%2F")),Me.push(Ot)}return ue.query!==void 0&&(Me.push("?"),Me.push(ue.query)),ue.fragment!==void 0&&(Me.push("#"),Me.push(ue.fragment)),Me.join("")}function Kt(ue,Z){var ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Me=arguments[3],Le={};return Me||(ue=gt(Nt(ue,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):((ue.userinfo!==void 0||ue.host!==void 0||ue.port!==void 0)&&!ue.path?Le.path="/"+Z.path:ue.path?Le.path=ue.path.slice(0,ue.path.lastIndexOf("/")+1)+Z.path:Le.path=Z.path,Le.path=kt(Le.path)),Le.query=Z.query):(Le.path=ue.path,Z.query!==void 0?Le.query=Z.query:Le.query=ue.query),Le.userinfo=ue.userinfo,Le.host=ue.host,Le.port=ue.port),Le.scheme=ue.scheme),Le.fragment=Z.fragment,Le}function Ut(ue,Z,ye){var Me=c({scheme:"null"},ye);return Nt(Kt(gt(ue,Me),gt(Z,Me),Me,!0),Me)}function zt(ue,Z){return typeof ue=="string"?ue=Nt(gt(ue,Z),Z):a(ue)==="object"&&(ue=gt(Nt(ue,Z),Z)),ue}function $t(ue,Z,ye){return typeof ue=="string"?ue=Nt(gt(ue,ye),ye):a(ue)==="object"&&(ue=Nt(ue,ye)),typeof Z=="string"?Z=Nt(gt(Z,ye),ye):a(Z)==="object"&&(Z=Nt(Z,ye)),ue===Z}function Dt(ue,Z){return ue&&ue.toString().replace(!Z||!Z.iri?f.ESCAPE:d.ESCAPE,te)}function qt(ue,Z){return ue&&ue.toString().replace(!Z||!Z.iri?f.PCT_ENCODED:d.PCT_ENCODED,ce)}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(ue){return typeof ue.secure=="boolean"?ue.secure:String(ue.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],Ot=Le[1];Z.path=wt&&wt!=="/"?wt:void 0,Z.query=Ot,Z.resourceName=void 0}return Z.fragment=void 0,Z}},nr={scheme:"wss",domainHost:ir.domainHost,parse:ir.parse,serialize:ir.serialize},mr={},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,'[\\"\\\\]'),xr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",$r=new RegExp(wn,"g"),_r=new RegExp(ai,"g"),_e=new RegExp(n("[^]",Dn,"[\\.]",'[\\"]',Kn),"g"),ee=new RegExp(n("[^]",wn,xr),"g"),ve=ee;function Re(ue){var Z=ce(ue);return Z.match($r)?Z:ue}var He={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,Ot={},pr=Me.query.split("&"),lr=0,en=pr.length;lr<en;++lr){var gr=pr[lr].split("=");switch(gr[0]){case"to":for(var Er=gr[1].split(","),on=0,sr=Er.length;on<sr;++on)Le.push(Er[on]);break;case"subject":Me.subject=qt(gr[1],ye);break;case"body":Me.body=qt(gr[1],ye);break;default:wt=!0,Ot[qt(gr[0],ye)]=qt(gr[1],ye);break}}wt&&(Me.headers=Ot)}Me.query=void 0;for(var Lr=0,gn=Le.length;Lr<gn;++Lr){var Ur=Le[Lr].split("@");if(Ur[0]=qt(Ur[0]),ye.unicodeSupport)Ur[1]=qt(Ur[1],ye).toLowerCase();else try{Ur[1]=ge.toASCII(qt(Ur[1],ye).toLowerCase())}catch(Zn){Me.error=Me.error||"Email address's domain name can not be converted to ASCII via punycode: "+Zn}Le[Lr]=Ur.join("@")}return Me},serialize:function(Z,ye){var Me=Z,Le=s(Z.to);if(Le){for(var wt=0,Ot=Le.length;wt<Ot;++wt){var pr=String(Le[wt]),lr=pr.lastIndexOf("@"),en=pr.slice(0,lr).replace(_r,Re).replace(_r,o).replace(_e,te),gr=pr.slice(lr+1);try{gr=ye.iri?ge.toUnicode(gr):ge.toASCII(qt(gr,ye).toLowerCase())}catch(Lr){Me.error=Me.error||"Email address's domain name can not be converted to "+(ye.iri?"Unicode":"ASCII")+" via punycode: "+Lr}Le[wt]=en+"@"+gr}Me.path=Le.join(",")}var Er=Z.headers=Z.headers||{};Z.subject&&(Er.subject=Z.subject),Z.body&&(Er.body=Z.body);var on=[];for(var sr in Er)Er[sr]!==mr[sr]&&on.push(sr.replace(_r,Re).replace(_r,o).replace(ee,te)+"="+Er[sr].replace(_r,Re).replace(_r,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",Ot=Me[1].toLowerCase(),pr=Me[2],lr=wt+":"+(ye.nid||Ot),en=Q[lr];Le.nid=Ot,Le.nss=pr,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),Ot=Q[wt];Ot&&(Z=Ot.serialize(Z,ye));var pr=Z,lr=Z.nss;return pr.path=(Le||ye.nid)+":"+lr,pr}},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[He.scheme]=He,Q[st.scheme]=st,Q[_t.scheme]=_t,r.SCHEMES=Q,r.pctEncChar=te,r.pctDecChars=ce,r.parse=gt,r.removeDotSegments=kt,r.serialize=Nt,r.resolveComponents=Kt,r.resolve=Ut,r.normalize=zt,r.equal=$t,r.escapeComponent=Dt,r.unescapeComponent=qt,Object.defineProperty(r,"__esModule",{value:!0})})})(a4,a4.exports);var rCe=a4.exports;Object.defineProperty(yM,"__esModule",{value:!0});const pie=rCe;pie.code='require("ajv/dist/runtime/uri").default';yM.default=pie;(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=Us;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Pr;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=Ew,i=xw,a=cp,o=To,s=Pr,c=pa,u=_w,f=pn,d=tCe,g=yM,m=(z,$)=>new RegExp(z,$);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(z){var $,H,k,M,G,ge,Q,te,ce,T,fe,ze,tt,mt,vt,gt,Lt,Yt,wr,Rt,Pt,kt,Nt,Kt,Ut;const zt=z.strict,$t=($=z.code)===null||$===void 0?void 0:$.optimize,Dt=$t===!0||$t===void 0?1:$t||0,qt=(k=(H=z.code)===null||H===void 0?void 0:H.regExp)!==null&&k!==void 0?k:m,Mt=(M=z.uriResolver)!==null&&M!==void 0?M:g.default;return{strictSchema:(ge=(G=z.strictSchema)!==null&&G!==void 0?G:zt)!==null&&ge!==void 0?ge:!0,strictNumbers:(te=(Q=z.strictNumbers)!==null&&Q!==void 0?Q:zt)!==null&&te!==void 0?te:!0,strictTypes:(T=(ce=z.strictTypes)!==null&&ce!==void 0?ce:zt)!==null&&T!==void 0?T:"log",strictTuples:(ze=(fe=z.strictTuples)!==null&&fe!==void 0?fe:zt)!==null&&ze!==void 0?ze:"log",strictRequired:(mt=(tt=z.strictRequired)!==null&&tt!==void 0?tt:zt)!==null&&mt!==void 0?mt:!1,code:z.code?{...z.code,optimize:Dt,regExp:qt}:{optimize:Dt,regExp:qt},loopRequired:(vt=z.loopRequired)!==null&&vt!==void 0?vt:b,loopEnum:(gt=z.loopEnum)!==null&>!==void 0?gt:b,meta:(Lt=z.meta)!==null&&Lt!==void 0?Lt:!0,messages:(Yt=z.messages)!==null&&Yt!==void 0?Yt:!0,inlineRefs:(wr=z.inlineRefs)!==null&&wr!==void 0?wr:!0,schemaId:(Rt=z.schemaId)!==null&&Rt!==void 0?Rt:"$id",addUsedSchema:(Pt=z.addUsedSchema)!==null&&Pt!==void 0?Pt:!0,validateSchema:(kt=z.validateSchema)!==null&&kt!==void 0?kt:!0,validateFormats:(Nt=z.validateFormats)!==null&&Nt!==void 0?Nt:!0,unicodeRegExp:(Kt=z.unicodeRegExp)!==null&&Kt!==void 0?Kt:!0,int32range:(Ut=z.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:k}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:v,es5:H,lines:k}),this.logger=le($.logger);const M=$.validateFormats;$.validateFormats=!1,this.RULES=(0,a.getRules)(),O.call(this,y,$,"NOT SUPPORTED"),O.call(this,_,$,"DEPRECATED","warn"),this._metaOpts=L.call(this),$.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords&&C.call(this,$.keywords),typeof $.meta=="object"&&this.addMetaSchema($.meta),p.call(this),$.validateFormats=M}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:$,meta:H,schemaId:k}=this.opts;let M=d;k==="id"&&(M={...d},M.id=M.$id,delete M.$id),H&&$&&this.addMetaSchema(M,M[k],!1)}defaultMeta(){const{meta:$,schemaId:H}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[H]||$:void 0}validate($,H){let k;if(typeof $=="string"){if(k=this.getSchema($),!k)throw new Error(`no schema with key or ref "${$}"`)}else k=this.compile($);const M=k(H);return"$async"in k||(this.errors=k.errors),M}compile($,H){const k=this._addSchema($,H);return k.validate||this._compileSchemaEnv(k)}compileAsync($,H){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:k}=this.opts;return M.call(this,$,H);async function M(T,fe){await G.call(this,T.$schema);const ze=this._addSchema(T,fe);return ze.validate||ge.call(this,ze)}async function G(T){T&&!this.getSchema(T)&&await M.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 ce.call(this,T);this.refs[T]||await G.call(this,fe.$schema),this.refs[T]||this.addSchema(fe,T,H)}async function ce(T){const fe=this._loading[T];if(fe)return fe;try{return await(this._loading[T]=k(T))}finally{delete this._loading[T]}}}addSchema($,H,k,M=this.opts.validateSchema){if(Array.isArray($)){for(const ge of $)this.addSchema(ge,void 0,k,M);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($,k,H,M,!0),this}addMetaSchema($,H,k=this.opts.validateSchema){return this.addSchema($,H,!0,k),this}validateSchema($,H){if(typeof $=="boolean")return!0;let k;if(k=$.$schema,k!==void 0&&typeof k!="string")throw new Error("$schema must be a string");if(k=k||this.opts.defaultMeta||this.defaultMeta(),!k)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const M=this.validate(k,$);if(!M&&H){const G="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(G);else throw new Error(G)}return M}getSchema($){let H;for(;typeof(H=E.call(this,$))=="string";)$=H;if(H===void 0){const{schemaId:k}=this.opts,M=new o.SchemaEnv({schema:{},schemaId:k});if(H=o.resolveSchema.call(this,M,$),!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 k=$[this.opts.schemaId];return k&&(k=(0,c.normalizeId)(k),delete this.schemas[k],delete this.refs[k]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(const H of $)this.addKeyword(H);return this}addKeyword($,H){let k;if(typeof $=="string")k=$,typeof H=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),H.keyword=k);else if(typeof $=="object"&&H===void 0){if(H=$,k=H.keyword,Array.isArray(k)&&!k.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(B.call(this,k,H),!H)return(0,f.eachItem)(k,G=>U.call(this,G)),this;ne.call(this,H);const M={...H,type:(0,u.getJSONTypes)(H.type),schemaType:(0,u.getJSONTypes)(H.schemaType)};return(0,f.eachItem)(k,M.type.length===0?G=>U.call(this,G,M):G=>M.type.forEach(ge=>U.call(this,G,M,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 k of H.rules){const M=k.rules.findIndex(G=>G.keyword===$);M>=0&&k.rules.splice(M,1)}return this}addFormat($,H){return typeof H=="string"&&(H=new RegExp(H)),this.formats[$]=H,this}errorsText($=this.errors,{separator:H=", ",dataVar:k="data"}={}){return!$||$.length===0?"No errors":$.map(M=>`${k}${M.instancePath} ${M.message}`).reduce((M,G)=>M+H+G)}$dataMetaSchema($,H){const k=this.RULES.all;$=JSON.parse(JSON.stringify($));for(const M of H){const G=M.split("/").slice(1);let ge=$;for(const Q of G)ge=ge[Q];for(const Q in k){const te=k[Q];if(typeof te!="object")continue;const{$data:ce}=te.definition,T=ge[Q];ce&&T&&(ge[Q]=j(T))}}return $}_removeAllSchemas($,H){for(const k in $){const M=$[k];(!H||H.test(k))&&(typeof M=="string"?delete $[k]:M&&!M.meta&&(this._cache.delete(M.schema),delete $[k]))}}_addSchema($,H,k,M=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;k=(0,c.normalizeId)(ge||k);const ce=c.getSchemaRefs.call(this,$,k);return te=new o.SchemaEnv({schema:$,schemaId:Q,meta:H,baseId:k,localRefs:ce}),this._cache.set(te.schema,te),G&&!k.startsWith("#")&&(k&&this._checkUnique(k),this.refs[k]=te),M&&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 O(z,$,H,k="error"){for(const M in z){const G=M;G in $&&this.logger[k](`${H}: option ${M}. ${z[G]}`)}}function E(z){return z=(0,c.normalizeId)(z),this.schemas[z]||this.refs[z]}function p(){const z=this.opts.schemas;if(z)if(Array.isArray(z))this.addSchema(z);else for(const $ in z)this.addSchema(z[$],$)}function I(){for(const z in this.opts.formats){const $=this.opts.formats[z];$&&this.addFormat(z,$)}}function C(z){if(Array.isArray(z)){this.addVocabulary(z);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const $ in z){const H=z[$];H.keyword||(H.keyword=$),this.addKeyword(H)}}function L(){const z={...this.opts};for(const $ of w)delete z[$];return z}const q={log(){},warn(){},error(){}};function le(z){if(z===!1)return q;if(z===void 0)return console;if(z.log&&z.warn&&z.error)return z;throw new Error("logger must implement log, warn and error methods")}const pe=/^[a-z_$][a-z0-9_$:-]*$/i;function B(z,$){const{RULES:H}=this;if((0,f.eachItem)(z,k=>{if(H.keywords[k])throw new Error(`Keyword ${k} is already defined`);if(!pe.test(k))throw new Error(`Keyword ${k} has invalid name`)}),!!$&&$.$data&&!("code"in $||"validate"in $))throw new Error('$data keyword must have "code" or "validate" function')}function U(z,$,H){var k;const M=$==null?void 0:$.post;if(H&&M)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:G}=this;let ge=M?G.post:G.rules.find(({type:te})=>te===H);if(ge||(ge={type:H,rules:[]},G.rules.push(ge)),G.keywords[z]=!0,!$)return;const Q={keyword:z,definition:{...$,type:(0,u.getJSONTypes)($.type),schemaType:(0,u.getJSONTypes)($.schemaType)}};$.before?K.call(this,ge,Q,$.before):ge.rules.push(Q),G.all[z]=Q,(k=$.implements)===null||k===void 0||k.forEach(te=>this.addKeyword(te))}function K(z,$,H){const k=z.rules.findIndex(M=>M.keyword===H);k>=0?z.rules.splice(k,0,$):(z.rules.push($),this.logger.warn(`rule ${H} is not defined`))}function ne(z){let{metaSchema:$}=z;$!==void 0&&(z.$data&&this.opts.$data&&($=j($)),z.validateSchema=this.compile($,!0))}const F={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function j(z){return{anyOf:[z,F]}}})(zne);var mM={},vM={},bM={};Object.defineProperty(bM,"__esModule",{value:!0});const nCe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};bM.default=nCe;var up={};Object.defineProperty(up,"__esModule",{value:!0});up.callRef=up.getValidate=void 0;const iCe=xw,rW=Kr,Ao=Pr,h0=kc,nW=To,oE=pn,aCe={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=nW.resolveRef.call(c,u,i,r);if(f===void 0)throw new iCe.default(n.opts.uriResolver,i,r);if(f instanceof nW.SchemaEnv)return g(f);return m(f);function d(){if(a===u)return mx(t,o,a,a.$async);const w=e.scopeValue("root",{ref:u});return mx(t,(0,Ao._)`${w}.validate`,u,u.$async)}function g(w){const v=gie(t,w);mx(t,v,w,w.$async)}function m(w){const v=e.scopeValue("schema",s.code.source===!0?{ref:w,code:(0,Ao.stringify)(w)}:{ref:w}),y=e.name("valid"),_=t.subschema({schema:w,dataTypes:[],schemaPath:Ao.nil,topSchemaRef:v,errSchemaPath:r},y);t.mergeEvaluated(_),t.ok(y)}}};function gie(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Ao._)`${r.scopeValue("wrapper",{ref:e})}.validate`}up.getValidate=gie;function mx(t,e,r,n){const{gen:i,it:a}=t,{allErrors:o,schemaEnv:s,opts:c}=a,u=c.passContext?h0.default.this:Ao.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,Ao._)`await ${(0,rW.callValidateCode)(t,e,u)}`),m(e),o||i.assign(w,!0)},v=>{i.if((0,Ao._)`!(${v} instanceof ${a.ValidationError})`,()=>i.throw(v)),g(v),o||i.assign(w,!1)}),t.ok(w)}function d(){t.result((0,rW.callValidateCode)(t,e,u),()=>m(e),()=>g(e))}function g(w){const v=(0,Ao._)`${w}.errors`;i.assign(h0.default.vErrors,(0,Ao._)`${h0.default.vErrors} === null ? ${v} : ${h0.default.vErrors}.concat(${v})`),i.assign(h0.default.errors,(0,Ao._)`${h0.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=oE.mergeEvaluated.props(i,y.props,a.props));else{const _=i.var("props",(0,Ao._)`${w}.evaluated.props`);a.props=oE.mergeEvaluated.props(i,_,a.props,Ao.Name)}if(a.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(a.items=oE.mergeEvaluated.items(i,y.items,a.items));else{const _=i.var("items",(0,Ao._)`${w}.evaluated.items`);a.items=oE.mergeEvaluated.items(i,_,a.items,Ao.Name)}}}up.callRef=mx;up.default=aCe;Object.defineProperty(vM,"__esModule",{value:!0});const oCe=bM,sCe=up,cCe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",oCe.default,sCe.default];vM.default=cCe;var wM={},_M={};Object.defineProperty(_M,"__esModule",{value:!0});const CA=Pr,lf=CA.operators,NA={maximum:{okStr:"<=",ok:lf.LTE,fail:lf.GT},minimum:{okStr:">=",ok:lf.GTE,fail:lf.LT},exclusiveMaximum:{okStr:"<",ok:lf.LT,fail:lf.GTE},exclusiveMinimum:{okStr:">",ok:lf.GT,fail:lf.LTE}},uCe={message:({keyword:t,schemaCode:e})=>(0,CA.str)`must be ${NA[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,CA._)`{comparison: ${NA[t].okStr}, limit: ${e}}`},lCe={keyword:Object.keys(NA),type:"number",schemaType:"number",$data:!0,error:uCe,code(t){const{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,CA._)`${r} ${NA[e].fail} ${n} || isNaN(${r})`)}};_M.default=lCe;var EM={};Object.defineProperty(EM,"__esModule",{value:!0});const Ub=Pr,fCe={message:({schemaCode:t})=>(0,Ub.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Ub._)`{multipleOf: ${t}}`},dCe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:fCe,code(t){const{gen:e,data:r,schemaCode:n,it:i}=t,a=i.opts.multipleOfPrecision,o=e.let("res"),s=a?(0,Ub._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${a}`:(0,Ub._)`${o} !== parseInt(${o})`;t.fail$data((0,Ub._)`(${n} === 0 || (${o} = ${r}/${n}, ${s}))`)}};EM.default=dCe;var xM={},AM={};Object.defineProperty(AM,"__esModule",{value:!0});function yie(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}AM.default=yie;yie.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(xM,"__esModule",{value:!0});const uh=Pr,hCe=pn,pCe=AM,gCe={message({keyword:t,schemaCode:e}){const r=t==="maxLength"?"more":"fewer";return(0,uh.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,uh._)`{limit: ${t}}`},yCe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:gCe,code(t){const{keyword:e,data:r,schemaCode:n,it:i}=t,a=e==="maxLength"?uh.operators.GT:uh.operators.LT,o=i.opts.unicode===!1?(0,uh._)`${r}.length`:(0,uh._)`${(0,hCe.useFunc)(t.gen,pCe.default)}(${r})`;t.fail$data((0,uh._)`${o} ${a} ${n}`)}};xM.default=yCe;var SM={};Object.defineProperty(SM,"__esModule",{value:!0});const mCe=Kr,DA=Pr,vCe={message:({schemaCode:t})=>(0,DA.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,DA._)`{pattern: ${t}}`},bCe={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,DA._)`(new RegExp(${i}, ${o}))`:(0,mCe.usePattern)(t,n);t.fail$data((0,DA._)`!${s}.test(${e})`)}};SM.default=bCe;var OM={};Object.defineProperty(OM,"__esModule",{value:!0});const Bb=Pr,wCe={message({keyword:t,schemaCode:e}){const r=t==="maxProperties"?"more":"fewer";return(0,Bb.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Bb._)`{limit: ${t}}`},_Ce={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:wCe,code(t){const{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Bb.operators.GT:Bb.operators.LT;t.fail$data((0,Bb._)`Object.keys(${r}).length ${i} ${n}`)}};OM.default=_Ce;var IM={};Object.defineProperty(IM,"__esModule",{value:!0});const wv=Kr,Fb=Pr,ECe=pn,xCe={message:({params:{missingProperty:t}})=>(0,Fb.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Fb._)`{missingProperty: ${t}}`},ACe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:xCe,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,ECe.checkStrictMode)(o,_,o.opts.strictRequired)}}function u(){if(c||a)t.block$data(Fb.nil,d);else for(const m of r)(0,wv.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,wv.checkMissingProp)(t,r,m)),(0,wv.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,wv.noPropertyInData)(e,i,m,s.ownProperties),()=>t.error())})}function g(m,w){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(w,(0,wv.propertyInData)(e,i,m,s.ownProperties)),e.if((0,Fb.not)(w),()=>{t.error(),e.break()})},Fb.nil)}}};IM.default=ACe;var PM={};Object.defineProperty(PM,"__esModule",{value:!0});const jb=Pr,SCe={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}}`},OCe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:SCe,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}`)}};PM.default=OCe;var TM={},Aw={};Object.defineProperty(Aw,"__esModule",{value:!0});const mie=dM;mie.code='require("ajv/dist/runtime/equal").default';Aw.default=mie;Object.defineProperty(TM,"__esModule",{value:!0});const rN=_w,sa=Pr,ICe=pn,PCe=Aw,TCe={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}}`},RCe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:TCe,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,rN.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,rN.checkDataTypes)(u,y,s.opts.strictNumbers,rN.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,ICe.useFunc)(e,PCe.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(_)})))}}};TM.default=RCe;var RM={};Object.defineProperty(RM,"__esModule",{value:!0});const o4=Pr,CCe=pn,NCe=Aw,DCe={message:"must be equal to constant",params:({schemaCode:t})=>(0,o4._)`{allowedValue: ${t}}`},$Ce={keyword:"const",$data:!0,error:DCe,code(t){const{gen:e,data:r,$data:n,schemaCode:i,schema:a}=t;n||a&&typeof a=="object"?t.fail$data((0,o4._)`!${(0,CCe.useFunc)(e,NCe.default)}(${r}, ${i})`):t.fail((0,o4._)`${a} !== ${r}`)}};RM.default=$Ce;var CM={};Object.defineProperty(CM,"__esModule",{value:!0});const db=Pr,MCe=pn,kCe=Aw,LCe={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,db._)`{allowedValues: ${t}}`},UCe={keyword:"enum",schemaType:"array",$data:!0,error:LCe,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,MCe.useFunc)(e,kCe.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,db.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,db._)`${u()}(${r}, ${m})`,()=>e.assign(f,!0).break()))}function g(m,w){const v=i[w];return typeof v=="object"&&v!==null?(0,db._)`${u()}(${r}, ${m}[${w}])`:(0,db._)`${r} === ${v}`}}};CM.default=UCe;Object.defineProperty(wM,"__esModule",{value:!0});const BCe=_M,FCe=EM,jCe=xM,qCe=SM,HCe=OM,zCe=IM,VCe=PM,GCe=TM,WCe=RM,KCe=CM,YCe=[BCe.default,FCe.default,jCe.default,qCe.default,HCe.default,zCe.default,VCe.default,GCe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},WCe.default,KCe.default];wM.default=YCe;var NM={},tm={};Object.defineProperty(tm,"__esModule",{value:!0});tm.validateAdditionalItems=void 0;const lh=Pr,s4=pn,QCe={message:({params:{len:t}})=>(0,lh.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,lh._)`{limit: ${t}}`},JCe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:QCe,code(t){const{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,s4.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}vie(t,n)}};function vie(t,e){const{gen:r,schema:n,data:i,keyword:a,it:o}=t;o.items=!0;const s=r.const("len",(0,lh._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,lh._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,s4.alwaysValidSchema)(o,n)){const u=r.var("valid",(0,lh._)`${s} <= ${e.length}`);r.if((0,lh.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,s,f=>{t.subschema({keyword:a,dataProp:f,dataPropType:s4.Type.Num},u),o.allErrors||r.if((0,lh.not)(u),()=>r.break())})}}tm.validateAdditionalItems=vie;tm.default=JCe;var DM={},rm={};Object.defineProperty(rm,"__esModule",{value:!0});rm.validateTuple=void 0;const iW=Pr,vx=pn,XCe=Kr,ZCe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:r}=t;if(Array.isArray(e))return bie(t,"additionalItems",e);r.items=!0,!(0,vx.alwaysValidSchema)(r,e)&&t.ok((0,XCe.validateArray)(t))}};function bie(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=vx.mergeEvaluated.items(n,r.length,s.items));const c=n.name("valid"),u=n.const("len",(0,iW._)`${a}.length`);r.forEach((d,g)=>{(0,vx.alwaysValidSchema)(s,d)||(n.if((0,iW._)`${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,vx.checkStrictMode)(s,y,g.strictTuples)}}}rm.validateTuple=bie;rm.default=ZCe;Object.defineProperty(DM,"__esModule",{value:!0});const eNe=rm,tNe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,eNe.validateTuple)(t,"items")};DM.default=tNe;var $M={};Object.defineProperty($M,"__esModule",{value:!0});const aW=Pr,rNe=pn,nNe=Kr,iNe=tm,aNe={message:({params:{len:t}})=>(0,aW.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,aW._)`{limit: ${t}}`},oNe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:aNe,code(t){const{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,rNe.alwaysValidSchema)(n,e)&&(i?(0,iNe.validateAdditionalItems)(t,i):t.ok((0,nNe.validateArray)(t)))}};$M.default=oNe;var MM={};Object.defineProperty(MM,"__esModule",{value:!0});const Cs=Pr,sE=pn,sNe={message:({params:{min:t,max:e}})=>e===void 0?(0,Cs.str)`must contain at least ${t} valid item(s)`:(0,Cs.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Cs._)`{minContains: ${t}}`:(0,Cs._)`{minContains: ${t}, maxContains: ${e}}`},cNe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:sNe,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,Cs._)`${i}.length`);if(t.setParams({min:o,max:s}),s===void 0&&o===0){(0,sE.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&o>s){(0,sE.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,sE.alwaysValidSchema)(a,r)){let v=(0,Cs._)`${f} >= ${o}`;s!==void 0&&(v=(0,Cs._)`${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,Cs._)`${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:sE.Type.Num,compositeRule:!0},v),y()})}function w(v){e.code((0,Cs._)`${v}++`),s===void 0?e.if((0,Cs._)`${v} >= ${o}`,()=>e.assign(d,!0).break()):(e.if((0,Cs._)`${v} > ${s}`,()=>e.assign(d,!1).break()),o===1?e.assign(d,!0):e.if((0,Cs._)`${v} >= ${o}`,()=>e.assign(d,!0)))}}};MM.default=cNe;var wie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=Pr,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})(wie);var kM={};Object.defineProperty(kM,"__esModule",{value:!0});const _ie=Pr,uNe=pn,lNe={message:"property name must be valid",params:({params:t})=>(0,_ie._)`{propertyName: ${t.propertyName}}`},fNe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:lNe,code(t){const{gen:e,schema:r,data:n,it:i}=t;if((0,uNe.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,_ie.not)(a),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(a)}};kM.default=fNe;var CS={};Object.defineProperty(CS,"__esModule",{value:!0});const cE=Kr,uc=Pr,dNe=kc,uE=pn,hNe={message:"must NOT have additional properties",params:({params:t})=>(0,uc._)`{additionalProperty: ${t.additionalProperty}}`},pNe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:hNe,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,uE.alwaysValidSchema)(o,r))return;const u=(0,cE.allSchemaProperties)(n.properties),f=(0,cE.allSchemaProperties)(n.patternProperties);d(),t.ok((0,uc._)`${a} === ${dNe.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,uE.schemaRefOrVal)(o,n.properties,"properties");_=(0,cE.isOwnProperty)(e,b,y)}else u.length?_=(0,uc.or)(...u.map(b=>(0,uc._)`${y} === ${b}`)):_=uc.nil;return f.length&&(_=(0,uc.or)(_,...f.map(b=>(0,uc._)`${(0,cE.usePattern)(t,b)}.test(${y})`))),(0,uc.not)(_)}function m(y){e.code((0,uc._)`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,uE.alwaysValidSchema)(o,r)){const _=e.name("valid");c.removeAdditional==="failing"?(v(y,_,!1),e.if((0,uc.not)(_),()=>{t.reset(),m(y)})):(v(y,_),s||e.if((0,uc.not)(_),()=>e.break()))}}function v(y,_,b){const S={keyword:"additionalProperties",dataProp:y,dataPropType:uE.Type.Str};b===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(S,_)}}};CS.default=pNe;var LM={};Object.defineProperty(LM,"__esModule",{value:!0});const gNe=Us,oW=Kr,nN=pn,sW=CS,yNe={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&&sW.default.code(new gNe.KeywordCxt(a,sW.default,"additionalProperties"));const o=(0,oW.allSchemaProperties)(r);for(const d of o)a.definedProperties.add(d);a.opts.unevaluated&&o.length&&a.props!==!0&&(a.props=nN.mergeEvaluated.props(e,(0,nN.toHash)(o),a.props));const s=o.filter(d=>!(0,nN.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,oW.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)}}};LM.default=yNe;var UM={};Object.defineProperty(UM,"__esModule",{value:!0});const cW=Kr,lE=Pr,uW=pn,lW=pn,mNe={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,cW.allSchemaProperties)(r),c=s.filter(v=>(0,uW.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 lE.Name)&&(a.props=(0,lW.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,uW.checkStrictMode)(a,`property ${y} matches pattern ${v} (use allowMatchingProperties)`)}function w(v){e.forIn("key",n,y=>{e.if((0,lE._)`${(0,cW.usePattern)(t,v)}.test(${y})`,()=>{const _=c.includes(v);_||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:y,dataPropType:lW.Type.Str},f),a.opts.unevaluated&&d!==!0?e.assign((0,lE._)`${d}[${y}]`,!0):!_&&!a.allErrors&&e.if((0,lE.not)(f),()=>e.break())})})}}};UM.default=mNe;var BM={};Object.defineProperty(BM,"__esModule",{value:!0});const vNe=pn,bNe={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"}};BM.default=bNe;var FM={};Object.defineProperty(FM,"__esModule",{value:!0});const wNe=Kr,_Ne={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:wNe.validateUnion,error:{message:"must match a schema in anyOf"}};FM.default=_Ne;var jM={};Object.defineProperty(jM,"__esModule",{value:!0});const bx=Pr,ENe=pn,xNe={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,bx._)`{passingSchemas: ${t.passing}}`},ANe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:xNe,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,ENe.alwaysValidSchema)(i,f)?e.var(c,!0):g=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,bx._)`${c} && ${o}`).assign(o,!1).assign(s,(0,bx._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(o,!0),e.assign(s,d),g&&t.mergeEvaluated(g,bx.Name)})})}}};jM.default=ANe;var qM={};Object.defineProperty(qM,"__esModule",{value:!0});const SNe=pn,ONe={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,SNe.alwaysValidSchema)(n,a))return;const s=t.subschema({keyword:"allOf",schemaProp:o},i);t.ok(i),t.mergeEvaluated(s)})}};qM.default=ONe;var HM={};Object.defineProperty(HM,"__esModule",{value:!0});const $A=Pr,Eie=pn,INe={message:({params:t})=>(0,$A.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,$A._)`{failingKeyword: ${t.ifClause}}`},PNe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:INe,code(t){const{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Eie.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=fW(n,"then"),a=fW(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,$A.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,$A._)`${f}`):t.setParams({ifClause:f})}}}};function fW(t,e){const r=t.schema[e];return r!==void 0&&!(0,Eie.alwaysValidSchema)(t,r)}HM.default=PNe;var zM={};Object.defineProperty(zM,"__esModule",{value:!0});const TNe=pn,RNe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,TNe.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};zM.default=RNe;Object.defineProperty(NM,"__esModule",{value:!0});const CNe=tm,NNe=DM,DNe=rm,$Ne=$M,MNe=MM,kNe=wie,LNe=kM,UNe=CS,BNe=LM,FNe=UM,jNe=BM,qNe=FM,HNe=jM,zNe=qM,VNe=HM,GNe=zM;function WNe(t=!1){const e=[jNe.default,qNe.default,HNe.default,zNe.default,VNe.default,GNe.default,LNe.default,UNe.default,kNe.default,BNe.default,FNe.default];return t?e.push(NNe.default,$Ne.default):e.push(CNe.default,DNe.default),e.push(MNe.default),e}NM.default=WNe;var VM={},GM={};Object.defineProperty(GM,"__esModule",{value:!0});const wi=Pr,KNe={message:({schemaCode:t})=>(0,wi.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,wi._)`{format: ${t}}`},YNe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:KNe,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,wi._)`${w}[${o}]`),y=r.let("fType"),_=r.let("format");r.if((0,wi._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(y,(0,wi._)`${v}.type || "string"`).assign(_,(0,wi._)`${v}.validate`),()=>r.assign(y,(0,wi._)`"string"`).assign(_,v)),t.fail$data((0,wi.or)(b(),S()));function b(){return c.strictSchema===!1?wi.nil:(0,wi._)`${o} && !${_}`}function S(){const x=f.$async?(0,wi._)`(${v}.async ? await ${_}(${n}) : ${_}(${n}))`:(0,wi._)`${_}(${n})`,O=(0,wi._)`(typeof ${_} == "function" ? ${x} : ${_}.test(${n}))`;return(0,wi._)`${_} && ${_} !== true && ${y} === ${e} && !${O}`}}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(O());return}throw new Error(O());function O(){return`unknown format "${a}" ignored in schema at path "${u}"`}}function S(O){const E=O instanceof RegExp?(0,wi.regexpCode)(O):c.code.formats?(0,wi._)`${c.code.formats}${(0,wi.getProperty)(a)}`:void 0,p=r.scopeValue("formats",{key:a,ref:O,code:E});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,wi._)`${p}.validate`]:["string",O,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,wi._)`await ${_}(${n})`}return typeof y=="function"?(0,wi._)`${_}(${n})`:(0,wi._)`${_}.test(${n})`}}}};GM.default=YNe;Object.defineProperty(VM,"__esModule",{value:!0});const QNe=GM,JNe=[QNe.default];VM.default=JNe;var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});Iy.contentVocabulary=Iy.metadataVocabulary=void 0;Iy.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Iy.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(mM,"__esModule",{value:!0});const XNe=vM,ZNe=wM,e6e=NM,t6e=VM,dW=Iy,r6e=[XNe.default,ZNe.default,(0,e6e.default)(),t6e.default,dW.metadataVocabulary,dW.contentVocabulary];mM.default=r6e;var WM={},xie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))})(xie);Object.defineProperty(WM,"__esModule",{value:!0});const I0=Pr,c4=xie,hW=To,n6e=pn,i6e={message:({params:{discrError:t,tagName:e}})=>t===c4.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,I0._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},a6e={keyword:"discriminator",type:"object",schemaType:"object",error:i6e,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,I0._)`${r}${(0,I0.getProperty)(s)}`);e.if((0,I0._)`typeof ${u} == "string"`,()=>f(),()=>t.error(!1,{discrError:c4.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,I0._)`${u} === ${w}`),e.assign(c,d(m[w]));e.else(),t.error(!1,{discrError:c4.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,I0.Name),w}function g(){var m;const w={},v=_(i);let y=!0;for(let x=0;x<o.length;x++){let O=o[x];O!=null&&O.$ref&&!(0,n6e.schemaHasRulesButRef)(O,a.self.RULES)&&(O=hW.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,O==null?void 0:O.$ref),O instanceof hW.SchemaEnv&&(O=O.schema));const E=(m=O==null?void 0:O.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||_(O)),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,O){if(x.const)S(x.const,O);else if(x.enum)for(const E of x.enum)S(E,O);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function S(x,O){if(typeof x!="string"||x in w)throw new Error(`discriminator: "${s}" values must be unique strings`);w[x]=O}}}};WM.default=a6e;const o6e="http://json-schema.org/draft-07/schema#",s6e="http://json-schema.org/draft-07/schema#",c6e="Core schema meta-schema",u6e={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:[]}},l6e=["object","boolean"],f6e={$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:"#"}},d6e={$schema:o6e,$id:s6e,title:c6e,definitions:u6e,type:l6e,properties:f6e,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=zne,n=mM,i=WM,a=d6e,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=Us;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var f=Pr;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=Ew;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var g=xw;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(r4,r4.exports);var Aie=r4.exports,u4={exports:{}},l4={exports:{}},f4={exports:{}},d4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Pr,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})(d4,d4.exports);var h6e=d4.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(h6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(f4,f4.exports);var p6e=f4.exports,h4={exports:{}},p4={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})(p4,p4.exports);var g6e=p4.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})(h4,h4.exports);var y6e=h4.exports,g4={exports:{}},y4={exports:{}},NS={};Object.defineProperty(NS,"__esModule",{value:!0});function m6e(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")}}NS.default=m6e;(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(NS).default)("range");e.default=i,t.exports=i})(y4,y4.exports);var v6e=y4.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})(g4,g4.exports);var b6e=g4.exports,m4={exports:{}},v4={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(NS).default)("exclusiveRange");e.default=i,t.exports=i})(v4,v4.exports);var w6e=v4.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(w6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(m4,m4.exports);var _6e=m4.exports,b4={exports:{}},w4={exports:{}},$l={};Object.defineProperty($l,"__esModule",{value:!0});$l.usePattern=$l.metaSchemaRef=void 0;const E6e=Pr,x6e="http://json-schema.org/schema";function A6e({defaultMeta:t}={}){return t===!1?{}:{$ref:t||x6e}}$l.metaSchemaRef=A6e;function S6e({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,E6e._)`new RegExp(${r}, ${n})`})}$l.usePattern=S6e;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Pr,n=$l,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})(w4,w4.exports);var O6e=w4.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(O6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(b4,b4.exports);var I6e=b4.exports,_4={exports:{}},E4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Pr,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 O=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._)`${O}(${E}, ${_})`:(0,r._)`${O}(${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})(E4,E4.exports);var P6e=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(P6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(_4,_4.exports);var T6e=_4.exports,x4={exports:{}},A4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=dM,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})(A4,A4.exports);var R6e=A4.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(R6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(x4,x4.exports);var C6e=x4.exports,S4={exports:{}},O4={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})(O4,O4.exports);var N6e=O4.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(N6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(S4,S4.exports);var D6e=S4.exports,I4={exports:{}},P4={exports:{}},DS={};Object.defineProperty(DS,"__esModule",{value:!0});function $6e(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"}}})}DS.default=$6e;(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(DS).default)("anyRequired");e.default=i,t.exports=i})(P4,P4.exports);var M6e=P4.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(M6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(I4,I4.exports);var k6e=I4.exports,T4={exports:{}},R4={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(DS).default)("oneRequired");e.default=i,t.exports=i})(R4,R4.exports);var L6e=R4.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(L6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(T4,T4.exports);var U6e=T4.exports,C4={exports:{}},N4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Pr,n=$l,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})(N4,N4.exports);var B6e=N4.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})(C4,C4.exports);var F6e=C4.exports,D4={exports:{}},$4={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})($4,$4.exports);var j6e=$4.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})(D4,D4.exports);var q6e=D4.exports,M4={exports:{}},k4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=$l;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})(k4,k4.exports);var H6e=k4.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(H6e),i=(a,o)=>a.addKeyword((0,n.default)(o));e.default=i,t.exports=i})(M4,M4.exports);var z6e=M4.exports,L4={exports:{}},U4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Pr;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})(U4,U4.exports);var V6e=U4.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})(L4,L4.exports);var G6e=L4.exports,B4={exports:{}},F4={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})(F4,F4.exports);var W6e=F4.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(W6e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(B4,B4.exports);var K6e=B4.exports,j4={exports:{}},q4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Pr,n=$l,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})(q4,q4.exports);var Y6e=q4.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(Y6e),i=(a,o)=>((0,n.default)(o).forEach(s=>a.addKeyword(s)),a);e.default=i,t.exports=i})(j4,j4.exports);var Q6e=j4.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(p6e),i=r(y6e),a=r(b6e),o=r(_6e),s=r(I6e),c=r(T6e),u=r(C6e),f=r(D6e),d=r(k6e),g=r(U6e),m=r(F6e),w=r(q6e),v=r(z6e),y=r(G6e),_=r(K6e),b=r(Q6e),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})(l4,l4.exports);var J6e=l4.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(J6e),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})(u4,u4.exports);var X6e=u4.exports,H4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Aie,n=Pr,i=Oy,a=Us,o=em,s=kc,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:O,it:E}=_;if(E.createErrors===!1)return;const p=x,I=n.strConcat(s.default.instancePath,E.errorPath);b.if(r._`${s.default.errors} > 0`,()=>{if(typeof p=="object"){const[k,M]=L(p);M&&q(M),k&&le(k),pe(C(p))}const H=typeof p=="string"?p:p._;H&&B(H),y.keepErrors||U()});function C({properties:H,items:k}){const M={};if(H){M.props={};for(const G in H)M.props[G]=[]}if(k){M.items={};for(let G=0;G<k.length;G++)M.items[G]=[]}return M}function L(H){let k,M;for(const G in H){if(G==="properties"||G==="items")continue;const ge=H[G];if(typeof ge=="object"){k||(k={});const Q=k[G]={};for(const te in ge)Q[te]=[]}else M||(M={}),M[G]=[]}return[k,M]}function q(H){const k=b.const("emErrors",r.stringify(H)),M=b.const("templates",j(H,x));b.forOf("err",s.default.vErrors,te=>b.if(K(te,k),()=>b.code(r._`${k}[${te}.keyword].push(${te})`).assign(r._`${te}.${u}`,!0)));const{singleError:G}=y;if(G){const te=b.let("message",r._`""`),ce=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(ce,r._`${ce}.concat(${k}[${T}])`)}),o.reportError(_,{message:te,params:r._`{errors: ${ce}}`})}else ge(te=>o.reportError(_,{message:Q(te),params:r._`{errors: ${k}[${te}]}`}));function ge(te){b.forIn("key",k,ce=>b.if(r._`${k}[${ce}].length`,()=>te(ce)))}function Q(te){return r._`${te} in ${M} ? ${M}[${te}]() : ${O}[${te}]`}}function le(H){const k=b.const("emErrors",r.stringify(H)),M=[];for(const ce in H)M.push([ce,j(H[ce],x[ce])]);const G=b.const("templates",b.object(...M)),ge=b.scopeValue("obj",{ref:f,code:r.stringify(f)}),Q=b.let("emPropParams"),te=b.let("emParamsErrors");b.forOf("err",s.default.vErrors,ce=>b.if(K(ce,k),()=>{b.assign(Q,r._`${ge}[${ce}.keyword]`),b.assign(te,r._`${k}[${ce}.keyword][${ce}.params[${Q}]]`),b.if(te,()=>b.code(r._`${te}.push(${ce})`).assign(r._`${ce}.${u}`,!0))})),b.forIn("key",k,ce=>b.forIn("keyProp",r._`${k}[${ce}]`,T=>{b.assign(te,r._`${k}[${ce}][${T}]`),b.if(r._`${te}.length`,()=>{const fe=b.const("tmpl",r._`${G}[${ce}] && ${G}[${ce}][${T}]`);o.reportError(_,{message:r._`${fe} ? ${fe}() : ${O}[${ce}][${T}]`,params:r._`{errors: ${te}}`})})}))}function pe(H){const{props:k,items:M}=H;if(!k&&!M)return;const G=r._`typeof ${S} == "object"`,ge=r._`Array.isArray(${S})`,Q=b.let("emErrors");let te,ce;const T=b.let("templates");k&&M?(te=b.let("emChildKwd"),b.if(G),b.if(ge,()=>{fe(M,x.items),b.assign(te,r.str`items`)},()=>{fe(k,x.properties),b.assign(te,r.str`properties`)}),ce=r._`[${te}]`):M?(b.if(ge),fe(M,x.items),ce=r._`.items`):k&&(b.if(n.and(G,n.not(ge))),fe(k,x.properties),ce=r._`.properties`),b.forOf("err",s.default.vErrors,ze=>ne(ze,Q,tt=>b.code(r._`${Q}[${tt}].push(${ze})`).assign(r._`${ze}.${u}`,!0))),b.forIn("key",Q,ze=>b.if(r._`${Q}[${ze}].length`,()=>{o.reportError(_,{message:r._`${ze} in ${T} ? ${T}[${ze}]() : ${O}${ce}[${ze}]`,params:r._`{errors: ${Q}[${ze}]}`}),b.assign(r._`${s.default.vErrors}[${s.default.errors}-1].instancePath`,r._`${I} + "/" + ${ze}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),b.endIf();function fe(ze,tt){b.assign(Q,r.stringify(ze)),b.assign(T,j(ze,tt))}}function B(H){const k=b.const("emErrs",r._`[]`);b.forOf("err",s.default.vErrors,M=>b.if(F(M),()=>b.code(r._`${k}.push(${M})`).assign(r._`${M}.${u}`,!0))),b.if(r._`${k}.length`,()=>o.reportError(_,{message:z(H),params:r._`{errors: ${k}}`}))}function U(){const H=b.const("emErrs",r._`[]`);b.forOf("err",s.default.vErrors,k=>b.if(r._`!${k}.${u}`,()=>b.code(r._`${H}.push(${k})`))),b.assign(s.default.vErrors,H).assign(s.default.errors,r._`${H}.length`)}function K(H,k){return n.and(r._`${H}.keyword !== ${c}`,r._`!${H}.${u}`,r._`${H}.instancePath === ${I}`,r._`${H}.keyword in ${k}`,r._`${H}.schemaPath.indexOf(${E.errSchemaPath}) === 0`,r._`/^\\/[^\\/]*$/.test(${H}.schemaPath.slice(${E.errSchemaPath.length}))`)}function ne(H,k,M){b.if(n.and(r._`${H}.keyword !== ${c}`,r._`!${H}.${u}`,r._`${H}.instancePath.indexOf(${I}) === 0`),()=>{const G=b.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:r._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),ge=b.const("emMatches",r._`${G}.exec(${H}.instancePath.slice(${I}.length))`),Q=b.const("emChild",r._`${ge} && ${ge}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);b.if(r._`${Q} !== undefined && ${Q} in ${k}`,()=>M(Q))})}function F(H){return n.and(r._`${H}.keyword !== ${c}`,r._`!${H}.${u}`,n.or(r._`${H}.instancePath === ${I}`,n.and(r._`${H}.instancePath.indexOf(${I}) === 0`,r._`${H}.instancePath[${I}.length] === "/"`)),r._`${H}.schemaPath.indexOf(${E.errSchemaPath}) === 0`,r._`${H}.schemaPath[${E.errSchemaPath}.length] === "/"`)}function j(H,k){const M=[];for(const G in H){const ge=k[G];d.test(ge)&&M.push([G,$(ge)])}return b.object(...M)}function z(H){return d.test(H)?new i._Code(i.safeStringify(H).replace(g,(k,M)=>`" + JSON.stringify(${a.getData(M,E)}) + "`).replace(m,"")):r.stringify(H)}function $(H){return r._`function(){return ${z(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})(H4,H4.exports);var Z6e=H4.exports,KM=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 Sie=KM(Aie);Ct.Ajv=Sie.default;const e8e=KM(X6e),t8e=KM(Z6e);function r8e(t,e){let r=null;const n=(i,a)=>{if(!r){const o=new Sie.default({$data:!0,allErrors:!0});(0,e8e.default)(o),(0,t8e.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=r8e;function n8e(t,e){return t.validate(e)}Ct.validateType=n8e;(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={}))})(Hne);var Oie={};Object.defineProperty(Oie,"__esModule",{value:!0});var Iie={};Object.defineProperty(Iie,"__esModule",{value:!0});var Pie={};(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={}))})(Pie);var Tie={};(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={}))})(Tie);var Rie={};(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})(Rie);var Cie={};Object.defineProperty(Cie,"__esModule",{value:!0});var Nie={};(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={}))})(Nie);var Die={};(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={}))})(Die);var $ie={};Object.defineProperty($ie,"__esModule",{value:!0});var Mie={};Object.defineProperty(Mie,"__esModule",{value:!0});var kie={};Object.defineProperty(kie,"__esModule",{value:!0});var Lie={};Object.defineProperty(Lie,"__esModule",{value:!0});var Uie={};Object.defineProperty(Uie,"__esModule",{value:!0});var Bie={};Object.defineProperty(Bie,"__esModule",{value:!0});var Fie={};Object.defineProperty(Fie,"__esModule",{value:!0});var jie={};Object.defineProperty(jie,"__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(Hne,t),r(Oie,t),r(Iie,t),r(Pie,t),r(Tie,t),r(Rie,t),r(Cie,t),r(Nie,t),r(Die,t),r($ie,t),r(Mie,t),r(kie,t),r(Lie,t),r(Uie,t),r(Bie,t),r(Fie,t),r(jie,t)})(IS);var $S={},i8e=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($S,"__esModule",{value:!0});$S.createDebounce=void 0;function a8e(){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,i8e([e,r],n,!1))}}$S.createDebounce=a8e;var MS={},YM={exports:{}},fg=typeof Reflect=="object"?Reflect:null,pW=fg&&typeof fg.apply=="function"?fg.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},wx;fg&&typeof fg.ownKeys=="function"?wx=fg.ownKeys:Object.getOwnPropertySymbols?wx=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:wx=function(e){return Object.getOwnPropertyNames(e)};function o8e(t){console&&console.warn&&console.warn(t)}var qie=Number.isNaN||function(e){return e!==e};function kn(){kn.init.call(this)}YM.exports=kn;YM.exports.once=l8e;kn.EventEmitter=kn;kn.prototype._events=void 0;kn.prototype._eventsCount=0;kn.prototype._maxListeners=void 0;var gW=10;function kS(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 gW},set:function(t){if(typeof t!="number"||t<0||qie(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");gW=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||qie(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 Hie(t){return t._maxListeners===void 0?kn.defaultMaxListeners:t._maxListeners}kn.prototype.getMaxListeners=function(){return Hie(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=Kie(c,u),n=0;n<u;++n)pW(f[n],this,r);return!0};function zie(t,e,r,n){var i,a,o;if(kS(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=Hie(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,o8e(s)}return t}kn.prototype.addListener=function(e,r){return zie(this,e,r,!1)};kn.prototype.on=kn.prototype.addListener;kn.prototype.prependListener=function(e,r){return zie(this,e,r,!0)};function s8e(){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 Vie(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=s8e.bind(n);return i.listener=r,n.wrapFn=i,i}kn.prototype.once=function(e,r){return kS(r),this.on(e,Vie(this,e,r)),this};kn.prototype.prependOnceListener=function(e,r){return kS(r),this.prependListener(e,Vie(this,e,r)),this};kn.prototype.removeListener=function(e,r){var n,i,a,o,s;if(kS(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():c8e(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 Gie(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?u8e(i):Kie(i,i.length)}kn.prototype.listeners=function(e){return Gie(this,e,!0)};kn.prototype.rawListeners=function(e){return Gie(this,e,!1)};kn.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Wie.call(t,e)};kn.prototype.listenerCount=Wie;function Wie(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?wx(this._events):[]};function Kie(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function c8e(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function u8e(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function l8e(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))}Yie(t,e,a,{once:!0}),e!=="error"&&f8e(t,i,{once:!0})})}function f8e(t,e,r){typeof t.on=="function"&&Yie(t,"error",e,r)}function Yie(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 fo=YM.exports;const QM=Nc(fo);var LS={};Object.defineProperty(LS,"__esModule",{value:!0});function Qie(){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}LS.future=Qie;LS.default=Qie;var d8e=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(MS,"__esModule",{value:!0});MS.createController=void 0;var h8e=fo,p8e=d8e(LS),MA=IS,Jie=new Map,z4=new Map;window.onmessage=function(e){if(e.data&&e.data.type)switch(e.data.type){case MA.PreviewMessageType.CONTROLLER_RESPONSE:{var r=e.data.payload,n=r.id,i=Jie.get(n);i&&(r.ok?i.resolve(r.result):r.ok===!1&&i.reject(new Error(r.error)));break}case MA.PreviewMessageType.EMOTE_EVENT:{var r=e.data.payload,a=r.type,o=r.payload,s=z4.get(e.source);s&&a&&s.emit(a,o);break}}};var yW=0;function g8e(t){return function(r,n,i){var a=document.getElementById(t),o=t+"-"+yW,s=(0,p8e.default)();Jie.set(o,s);var c=MA.PreviewMessageType.CONTROLLER_REQUEST,u={id:o,namespace:r,method:n,params:i};return(0,MA.sendMessage)(a.contentWindow,c,u),yW++,s}}function y8e(t){var e,r=document.getElementById(t);if(!r)throw new Error('Could not find an iframe with id="'.concat(t,'"'));var n=(e=z4.get(r.contentWindow))!==null&&e!==void 0?e:new h8e.EventEmitter;z4.set(r.contentWindow,n);var i=g8e(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}}}MS.createController=y8e;var US={},H0={},BS={},iN={},Qd={},mW;function m8e(){if(mW)return Qd;mW=1,Object.defineProperty(Qd,"__esModule",{value:!0}),Qd.getEnvFromQueryParam=Qd.getEnvFromTLD=void 0;const t=JM();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}Qd.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 Qd.getEnvFromQueryParam=r,Qd}var vW;function JM(){return vW||(vW=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=m8e();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}(iN)),iN}Object.defineProperty(BS,"__esModule",{value:!0});BS.createConfig=void 0;const v8e=JM();function b8e(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}}BS.createConfig=b8e;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnv=t.Env=t.createConfig=void 0;var e=BS;Object.defineProperty(t,"createConfig",{enumerable:!0,get:function(){return e.createConfig}});var r=JM();Object.defineProperty(t,"Env",{enumerable:!0,get:function(){return r.Env}}),Object.defineProperty(t,"getEnv",{enumerable:!0,get:function(){return r.getEnv}})})(H0);const w8e="https://wearable-preview.decentraland.zone",_8e="https://decentraland.zone/account",E8e="https://decentraland.zone/profile",x8e="https://decentraland.zone/marketplace",A8e="https://decentraland.zone/builder",S8e="https://decentraland.zone/dao",O8e="https://decentraland.zone/governance",I8e="https://decentraland.zone/events",P8e="https://decentraland.zone/places",T8e={WEARABLE_PREVIEW_URL:w8e,ACCOUNT_URL:_8e,PROFILE_URL:E8e,MARKETPLACE_URL:x8e,BUILDER_URL:A8e,DAO_URL:S8e,GOVERNANCE_URL:O8e,EVENTS_URL:I8e,PLACES_URL:P8e},R8e="https://wearable-preview.decentraland.today",C8e="https://decentraland.today/account",N8e="https://decentraland.today/profile",D8e="https://decentraland.today/marketplace",$8e="https://decentraland.today/builder",M8e="https://decentraland.today/dao",k8e="https://decentraland.today/governance",L8e="https://decentraland.today/events",U8e="https://decentraland.today/places",B8e={WEARABLE_PREVIEW_URL:R8e,ACCOUNT_URL:C8e,PROFILE_URL:N8e,MARKETPLACE_URL:D8e,BUILDER_URL:$8e,DAO_URL:M8e,GOVERNANCE_URL:k8e,EVENTS_URL:L8e,PLACES_URL:U8e},F8e="https://wearable-preview.decentraland.org",j8e="https://decentraland.org/account",q8e="https://decentraland.org/profile",H8e="https://decentraland.org/marketplace",z8e="https://decentraland.org/builder",V8e="https://decentraland.org/dao",G8e="https://decentraland.org/governance",W8e="https://decentraland.org/events",K8e="https://decentraland.org/places",Y8e={WEARABLE_PREVIEW_URL:F8e,ACCOUNT_URL:j8e,PROFILE_URL:q8e,MARKETPLACE_URL:H8e,BUILDER_URL:z8e,DAO_URL:V8e,GOVERNANCE_URL:G8e,EVENTS_URL:W8e,PLACES_URL:K8e};var XM=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_v;Object.defineProperty(US,"__esModule",{value:!0});US.config=void 0;var fE=H0,Q8e=XM(T8e),J8e=XM(B8e),X8e=XM(Y8e);US.config=(0,fE.createConfig)((_v={},_v[fE.Env.DEVELOPMENT]=Q8e.default,_v[fE.Env.STAGING]=J8e.default,_v[fE.Env.PRODUCTION]=X8e.default,_v));var Z8e=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)}}(),e4e=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]}),t4e=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r4e=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)&&e4e(e,t,r);return t4e(e,t),e},n4e=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},i4e=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(V$,"__esModule",{value:!0});var Xie=V$.WearablePreview=void 0,bW=r4e(Ge),a4e=i4e(ETe),Ev=IS,o4e=$S,s4e=MS,c4e=US,u4e=(0,o4e.createDebounce)(),l4e=function(t){Z8e(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,O=n.offsetY,E=n.offsetZ,p=n.cameraX,I=n.cameraY,C=n.cameraZ,L=n.wheelZoom,q=n.wheelPrecision,le=n.wheelStart,pe=n.disableBackground,B=n.disableAutoRotate,U=n.disableAutoCenter,K=n.disableFace,ne=n.disableDefaultWearables,F=n.disableDefaultEmotes,j=n.disableFadeEffect,z=n.showSceneBoundaries,$=n.showThumbnailBoundaries,H=n.panning,k=n.lockAlpha,M=n.lockBeta,G=n.lockRadius,ge=n.dev,Q=n.baseUrl,te=n.peerUrl,ce=n.nftServerUrl,T=n.type,fe=i?"contract=".concat(i):"",ze=a?"token=".concat(a):"",tt=o?"item=".concat(o):"",mt=s?"profile=".concat(s):"",vt=c&&c.length>0?c.map(function(ue){return"urn=".concat(ue)}).join("&"):"",gt=u&&u.length>0?u.map(function(ue){return"url=".concat(ue)}).join("&"):"",Lt=f&&f.length>0?f.map(function(ue){return"base64=".concat(ue)}).join("&"):"",Yt=d?"skin=".concat(d):"",wr=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),zt=S?"background=".concat(S):"",$t=isNaN(x)?"":"offsetX=".concat(x),Dt=isNaN(O)?"":"offsetY=".concat(O),qt=isNaN(E)?"":"offsetZ=".concat(E),Mt=isNaN(p)?"":"cameraX=".concat(p),cr=isNaN(I)?"":"cameraY=".concat(I),tr=isNaN(C)?"":"cameraZ=".concat(C),ir=isNaN(L)?"":"wheelZoom=".concat(L),nr=isNaN(q)?"":"wheelPrecision=".concat(q),mr=isNaN(le)?"":"wheelStart=".concat(le),wn=pe?"disableBackground":"",Yr=B?"disableAutoRotate":"",ai=U?"disableAutoCenter":"",Dn=K?"disableFace":"",$n=ne?"disableDefaultWearables":"",Kn=F?"disableDefaultEmotes":"",xr=j?"disableFadeEffect":"",$r=z?"showSceneBoundaries":"",_r=$?"showThumbnailBoundaries":"",_e=te?"peerUrl=".concat(te):"",ee=ce?"nftServerUrl=".concat(ce):"",ve=T?"type=".concat(T):"",Re=H===!1?"panning=false":"",He=k?"lockAlpha=true":"",Xe=M?"lockBeta=true":"",st=G?"lockRadius=true":"",lt=ge?"env=dev":"",_t=Q+"?"+[fe,ze,tt,mt,vt,gt,Lt,Yt,wr,Rt,Pt,kt,Nt,Kt,Ut,zt,$t,Dt,qt,Mt,cr,tr,ir,nr,mr,wn,Yr,ai,Dn,$n,Kn,xr,$r,_r,_e,ee,ve,Re,He,Xe,st,lt].filter(function(ue){return!!ue}).join("&");return _t},r.getOptions=function(){var n=r.props;n.dev;var i=n4e(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 Ev.PreviewMessageType.LOAD:{o();break}case Ev.PreviewMessageType.ERROR:{var f=n.data.payload;s(new Error(f.message));break}case Ev.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,a4e.default)(n,i)){(0,Ev.sendMessage)(r.iframe.contentWindow,Ev.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,s4e.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(){u4e(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"),bW.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:c4e.config.get("WEARABLE_PREVIEW_URL"),onLoad:function(){},onError:function(){},onUpdate:function(){}},e}(bW.PureComponent);Xie=V$.WearablePreview=l4e;var Il={},Py={},aN={},oN={},wW;function Zie(){return wW||(wW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=t.ChainName=void 0;const e=Ct,r=ns();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={}))}(oN)),oN}var Js={};(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={}))})(Js);var _W;function ns(){return _W||(_W=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=Zie(),n=Js;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={}))}(aN)),aN}var Ac={};(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={}))})(Ac);var dg;(function(t){t.Update="Web3ReactUpdate",t.Error="Web3ReactError",t.Deactivate="Web3ReactDeactivate"})(dg||(dg={}));const f4e=Object.freeze(Object.defineProperty({__proto__:null,get ConnectorEvent(){return dg}},Symbol.toStringTag,{value:"Module"})),d4e=uo(f4e);var ZM={},FS={};function h4e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var jS=function(t){h4e(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(dg.Update,i)},r.emitError=function(i){this.emit(dg.Error,i)},r.emitDeactivate=function(){this.emit(dg.Deactivate)},e}(fo.EventEmitter);const p4e=Object.freeze(Object.defineProperty({__proto__:null,AbstractConnector:jS},Symbol.toStringTag,{value:"Module"})),eae=uo(p4e);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractConnector=void 0;const e=eae;Object.defineProperty(t,"AbstractConnector",{enumerable:!0,get:function(){return e.AbstractConnector}})})(FS);var qS={},Ml={},tae={},rae={},nae={};(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={}))})(nae);var iae={};(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={}))})(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(nae,t),r(iae,t)})(rae);var aae={},oae={};(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={}))})(oae);var sae={},Sw={};(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={}))})(Sw);var Ed={};(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={}))})(Ed);var HS={},zS={};(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={}))})(zS);var VS={},ek={};(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={}))})(ek);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.HideableWearableCategory=void 0;const e=Ed,r=Ct,n=ek;(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={}))})(VS);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WearableRepresentation=void 0;const e=Ct,r=zS,n=VS;(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={}))})(HS);var GS={},cae={},tk={},Op={};(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={}))})(Op);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Avatar=t.Link=t.LinkUrl=t.AvatarInfo=t.Snapshots=void 0;const e=Ed,r=Op,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={}))})(tk);var uae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Profile=void 0;const e=Ct,r=tk;(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={}))})(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(tk,t),r(uae,t)})(cae);var lae={},rk={};(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={}))})(rk);var nk={};(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={}))})(nk);var ik={};(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={}))})(ik);var fae={},nm={};Object.defineProperty(nm,"__esModule",{value:!0});nm.displayableProperties=void 0;nm.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var ak={};(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={}))})(ak);var ok={};(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={}))})(ok);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Scene=t.RequiredPermission=void 0;const e=Ct,r=nm,n=rk,i=ik,a=ak,o=ok,s=nk;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={}))})(fae);(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=rk;Object.defineProperty(t,"FeatureToggles",{enumerable:!0,get:function(){return e.FeatureToggles}});var r=nk;Object.defineProperty(t,"WorldConfiguration",{enumerable:!0,get:function(){return r.WorldConfiguration}});var n=ik;Object.defineProperty(t,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=fae;Object.defineProperty(t,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(t,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=ak;Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return a.Source}});var o=ok;Object.defineProperty(t,"SpawnPoint",{enumerable:!0,get:function(){return o.SpawnPoint}})})(lae);var sN={},sk={},ck={};(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={}))})(ck);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.I18N=void 0;const e=Ct,r=ck;(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={}))})(sk);var uk={};(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={}))})(uk);var WS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.isStandard=t.standardProperties=void 0;const e=Sw,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})(WS);var KS={},lk={};(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={}))})(lk);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.isThirdParty=t.thirdPartyProps=void 0;const e=Ct,r=lk;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})(KS);var dae={},hae={},Pl={};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.isBaseAvatar=Pl.requiredBaseItemProps=Pl.baseItemProperties=void 0;const g4e=sk,y4e=uk,m4e=nm;Pl.baseItemProperties=Object.assign(Object.assign({},m4e.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:g4e.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({},y4e.Metrics.schema),{nullable:!0})});Pl.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function v4e(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}Pl.isBaseAvatar=v4e;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Wearable=void 0;const e=Ct,r=Ed,n=HS,i=Pl,a=WS,o=KS,s=VS;(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={}))})(hae);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.HideableWearableCategory=t.BodyPartCategory=t.WearableCategory=t.Wearable=t.WearableRepresentation=void 0;var e=HS;Object.defineProperty(t,"WearableRepresentation",{enumerable:!0,get:function(){return e.WearableRepresentation}});var r=hae;Object.defineProperty(t,"Wearable",{enumerable:!0,get:function(){return r.Wearable}});var n=Ed;Object.defineProperty(t,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=ek;Object.defineProperty(t,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=VS;Object.defineProperty(t,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}})})(dae);var cN={},uN={},fk={},dk={};(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={}))})(dk);var hk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmoteRepresentationADR74=void 0;const e=Ct,r=zS;(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={}))})(hk);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmoteDataADR74=void 0;const e=dk,r=Ct,n=hk;(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={}))})(fk);var EW;function b4e(){return EW||(EW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Emote=void 0;const e=gae(),r=Ct,n=Pl,i=WS,a=KS,o=fk;(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={}))}(uN)),uN}var pae={};(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={}))})(pae);var xW;function w4e(){return xW||(xW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmotePlayMode=t.EmoteCategory=t.EmoteDataADR74=t.EmoteRepresentationADR74=t.Emote=void 0;var e=b4e();Object.defineProperty(t,"Emote",{enumerable:!0,get:function(){return e.Emote}});var r=hk;Object.defineProperty(t,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return r.EmoteRepresentationADR74}});var n=fk;Object.defineProperty(t,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=dk;Object.defineProperty(t,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var a=pae;Object.defineProperty(t,"EmotePlayMode",{enumerable:!0,get:function(){return a.EmotePlayMode}})}(cN)),cN}var AW;function gae(){return AW||(AW=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=sk;Object.defineProperty(t,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=ck;Object.defineProperty(t,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=uk;Object.defineProperty(t,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var o=zS;Object.defineProperty(t,"BodyShape",{enumerable:!0,get:function(){return o.BodyShape}});var s=WS;Object.defineProperty(t,"isStandard",{enumerable:!0,get:function(){return s.isStandard}});var c=KS;Object.defineProperty(t,"isThirdParty",{enumerable:!0,get:function(){return c.isThirdParty}}),r(dae,t),r(w4e(),t)}(sN)),sN}var yae={};(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(lk,t)})(yae);var mae={},YS={};(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={}))})(YS);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PointerChangesSyncDeployment=t.SnapshotSyncDeployment=void 0;const e=Op,r=YS,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={}))})(mae);var vae={},pk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ContentMapping=void 0;const e=Op,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={}))})(pk);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Entity=t.EntityType=void 0;const e=Op,r=pk,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={}))})(vae);var bae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeploymentWithAuthChain=void 0;const e=YS,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={}))})(bae);var wae={},_ae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Outfits=t.Outfit=void 0;const e=Ed,r=Op,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={}))})(_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(_ae,t)})(wae);(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(cae,t),r(lae,t),r(gae(),t),r(nm,t),r(yae,t),r(mae,t),r(vae,t),r(bae,t),r(wae,t)})(GS);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WearableJson=void 0;const e=Sw,r=Ed,n=HS,i=Ct,a=GS;(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={}))})(sae);(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(oae,t),r(sae,t)})(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(rae,t),r(aae,t)})(tae);var Eae={},QS={};(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={}))})(QS);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Bid=t.BidSortBy=void 0;const e=Ct,r=ns(),n=QS,i=Js;(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={}))})(Eae);var xae={};(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={}))})(xae);var Aae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=t.CollectionSortBy=void 0;const e=Ct,r=ns(),n=Js;(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={}))})(Aae);var Sae={},Ow={};(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={}))})(Ow);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=t.ContractSortBy=void 0;const e=Ct,r=ns(),n=Js,i=Ow;(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={}))})(Sae);var Oae={},gk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.NFT=t.NFTSortBy=void 0;const e=Ct,r=ns(),n=GS,i=Js,a=Ow,o=Sw,s=Ed;(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={}))})(gk);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Item=t.ItemSortBy=void 0;const e=Ct,r=ns(),n=Js,i=gk,a=Ow;(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={}))})(Oae);var Iae={};(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={}))})(Iae);var Pae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Mint=t.MintSortBy=void 0;const e=Ct,r=ns(),n=Js;(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={}))})(Pae);var Tae={};(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={}))})(Tae);var Rae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Order=t.OrderSortBy=void 0;const e=Ct,r=ns(),n=QS,i=Js;(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={}))})(Rae);var yk={};(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={}))})(yk);var Cae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Sale=t.SaleSortBy=void 0;const e=Ct,r=ns(),n=yk,i=Js;(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={}))})(Cae);var Nae={};(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=ns(),n=Js;(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={}))})(Nae);var Dae={};(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={}))})(Dae);var $ae={};(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={}))})($ae);var Mae={};(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={}))})(Mae);var kae={};(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={}))})(kae);var Lae={};(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={}))})(Lae);(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(B,U,K,ne){ne===void 0&&(ne=K);var F=Object.getOwnPropertyDescriptor(U,K);(!F||("get"in F?!U.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return U[K]}}),Object.defineProperty(B,ne,F)}:function(B,U,K,ne){ne===void 0&&(ne=K),B[ne]=U[K]}),r=Ne&&Ne.__setModuleDefault||(Object.create?function(B,U){Object.defineProperty(B,"default",{enumerable:!0,value:U})}:function(B,U){B.default=U}),n=Ne&&Ne.__importStar||function(B){if(B&&B.__esModule)return B;var U={};if(B!=null)for(var K in B)K!=="default"&&Object.prototype.hasOwnProperty.call(B,K)&&e(U,B,K);return r(U,B),U},i=Ne&&Ne.__exportStar||function(B,U){for(var K in B)K!=="default"&&!Object.prototype.hasOwnProperty.call(U,K)&&e(U,B,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(tae);t.sdk=a,i(Ct,t);var o=Eae;Object.defineProperty(t,"Bid",{enumerable:!0,get:function(){return o.Bid}}),Object.defineProperty(t,"BidSortBy",{enumerable:!0,get:function(){return o.BidSortBy}});var s=xae;Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return s.Account}}),Object.defineProperty(t,"AccountSortBy",{enumerable:!0,get:function(){return s.AccountSortBy}});var c=ns();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=Zie();Object.defineProperty(t,"ChainName",{enumerable:!0,get:function(){return u.ChainName}}),Object.defineProperty(t,"getChainId",{enumerable:!0,get:function(){return u.getChainId}});var f=Aae;Object.defineProperty(t,"Collection",{enumerable:!0,get:function(){return f.Collection}}),Object.defineProperty(t,"CollectionSortBy",{enumerable:!0,get:function(){return f.CollectionSortBy}});var d=Sae;Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return d.Contract}}),Object.defineProperty(t,"ContractSortBy",{enumerable:!0,get:function(){return d.ContractSortBy}});var g=Oae;Object.defineProperty(t,"Item",{enumerable:!0,get:function(){return g.Item}}),Object.defineProperty(t,"ItemSortBy",{enumerable:!0,get:function(){return g.ItemSortBy}});var m=QS;Object.defineProperty(t,"ListingStatus",{enumerable:!0,get:function(){return m.ListingStatus}});var w=Iae;Object.defineProperty(t,"MetaTransaction",{enumerable:!0,get:function(){return w.MetaTransaction}});var v=Pae;Object.defineProperty(t,"Mint",{enumerable:!0,get:function(){return v.Mint}}),Object.defineProperty(t,"MintSortBy",{enumerable:!0,get:function(){return v.MintSortBy}});var y=Js;Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return y.Network}});var _=Ow;Object.defineProperty(t,"NFTCategory",{enumerable:!0,get:function(){return _.NFTCategory}});var b=gk;Object.defineProperty(t,"NFT",{enumerable:!0,get:function(){return b.NFT}}),Object.defineProperty(t,"NFTSortBy",{enumerable:!0,get:function(){return b.NFTSortBy}});var S=Tae;Object.defineProperty(t,"CatalogSortBy",{enumerable:!0,get:function(){return S.CatalogSortBy}}),Object.defineProperty(t,"CatalogSortDirection",{enumerable:!0,get:function(){return S.CatalogSortDirection}});var x=Rae;Object.defineProperty(t,"Order",{enumerable:!0,get:function(){return x.Order}}),Object.defineProperty(t,"OrderSortBy",{enumerable:!0,get:function(){return x.OrderSortBy}});var O=Ac;Object.defineProperty(t,"ProviderType",{enumerable:!0,get:function(){return O.ProviderType}});var E=Sw;Object.defineProperty(t,"Rarity",{enumerable:!0,get:function(){return E.Rarity}});var p=yk;Object.defineProperty(t,"SaleType",{enumerable:!0,get:function(){return p.SaleType}});var I=Cae;Object.defineProperty(t,"Sale",{enumerable:!0,get:function(){return I.Sale}}),Object.defineProperty(t,"SaleSortBy",{enumerable:!0,get:function(){return I.SaleSortBy}});var C=Nae;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 L=Dae;Object.defineProperty(t,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return L.AnalyticsDayDataSortBy}});var q=$ae;Object.defineProperty(t,"Store",{enumerable:!0,get:function(){return q.Store}});var le=Mae;Object.defineProperty(t,"WearableGender",{enumerable:!0,get:function(){return le.WearableGender}}),Object.defineProperty(t,"GenderFilterOption",{enumerable:!0,get:function(){return le.GenderFilterOption}});var pe=kae;Object.defineProperty(t,"World",{enumerable:!0,get:function(){return pe.World}}),Object.defineProperty(t,"getWorld",{enumerable:!0,get:function(){return pe.getWorld}}),Object.defineProperty(t,"isInsideWorldLimits",{enumerable:!0,get:function(){return pe.isInsideWorldLimits}}),i(IS,t),i(GS,t),i(Op,t),i(Lae,t),i(YS,t),i(pk,t)})(Ml);var qs={};Object.defineProperty(qs,"__esModule",{value:!0});qs.getRpcUrls=qs.getConfiguration=void 0;const Mn=ns(),Ja=Ac,_4e=Object.freeze({storageKey:"decentraland-connect-storage-key",[Ja.ProviderType.INJECTED]:{},[Ja.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:P0(Ja.ProviderType.FORTMATIC)},[Ja.ProviderType.NETWORK]:{urls:P0(Ja.ProviderType.NETWORK)},[Ja.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:P0(Ja.ProviderType.WALLET_LINK)},[Ja.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:P0(Ja.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]}}},[Ja.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:P0(Ja.ProviderType.MAGIC),chains:[Mn.ChainId.ETHEREUM_MAINNET,Mn.ChainId.ETHEREUM_GOERLI,Mn.ChainId.ETHEREUM_SEPOLIA,Mn.ChainId.MATIC_MAINNET,Mn.ChainId.MATIC_MUMBAI]}});function E4e(){return _4e}qs.getConfiguration=E4e;function P0(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 Ja.ProviderType.WALLET_LINK:r="walletlink";break;case Ja.ProviderType.FORTMATIC:r="fortmatic";break;case Ja.ProviderType.MAGIC:r="magic";break;case Ja.ProviderType.WALLET_CONNECT_V2:r="walletconnect-v2";break}if(r)for(const n in e)e[n]+=`?project=${r}`;return e}qs.getRpcUrls=P0;var lN,SW;function x4e(){return SW||(SW=1,lN=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,O){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=O,this.ethNetwork=x,this.queryParams=btoa(JSON.stringify({API_KEY:S,ETH_NETWORK:x})),this.transactions={send:function(p,I){var C=new _(s,{to:p.to,value:p.amount});E.getProvider().sendFortmaticAsync(C,I)}},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 I=new _(m,p);return o.sendFortmaticAsyncWrapper.call(E,I)}},this.configure=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=new _(v);return I.params=[p],o.sendFortmaticAsyncWrapper.call(E,I)}};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,O=!1,E=void 0;try{for(var p,I=document.getElementsByClassName("fortmatic-iframe")[Symbol.iterator]();!(x=(p=I.next()).done);x=!0)if(p.value.src.includes(m.queryParams))return!1}catch(C){O=!0,E=C}finally{try{x||I.return==null||I.return()}finally{if(O)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(O,E){var p=b.requests[y.id].batchResponse;if(O&&O.response&&!(0,f.findExistingResponse)(p,O.response.id))throw p.push({jsonrpc:"2.0",id:O.response.id,error:{code:O.response.code,message:O.response.message}}),b.requests[y.id].cb(null,p),O.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=O;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(_);I.prototype=x.constructor=C,C.constructor=I,C[u]=I.displayName="GeneratorFunction",d.isGeneratorFunction=function(F){var j=typeof F=="function"&&F.constructor;return!!j&&(j===I||(j.displayName||j.name)==="GeneratorFunction")},d.mark=function(F){return Object.setPrototypeOf?Object.setPrototypeOf(F,C):(F.__proto__=C,u in F||(F[u]="GeneratorFunction")),F.prototype=Object.create(x),F},d.awrap=function(F){return{__await:F}},L(q.prototype),q.prototype[c]=function(){return this},d.AsyncIterator=q,d.async=function(F,j,z,$){var H=new q(O(F,j,z,$));return d.isGeneratorFunction(j)?H:H.next().then(function(k){return k.done?k.value:H.next()})},L(x),x[u]="Generator",x[s]=function(){return this},x.toString=function(){return"[object Generator]"},d.keys=function(F){var j=[];for(var z in F)j.push(z);return j.reverse(),function $(){for(;j.length;){var H=j.pop();if(H in F)return $.value=H,$.done=!1,$}return $.done=!0,$}},d.values=K,U.prototype={constructor:U,reset:function(F){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(B),!F)for(var j in this)j.charAt(0)==="t"&&a.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=n)},stop:function(){this.done=!0;var F=this.tryEntries[0].completion;if(F.type==="throw")throw F.arg;return this.rval},dispatchException:function(F){if(this.done)throw F;var j=this;function z(ge,Q){return k.type="throw",k.arg=F,j.next=ge,Q&&(j.method="next",j.arg=n),!!Q}for(var $=this.tryEntries.length-1;$>=0;--$){var H=this.tryEntries[$],k=H.completion;if(H.tryLoc==="root")return z("end");if(H.tryLoc<=this.prev){var M=a.call(H,"catchLoc"),G=a.call(H,"finallyLoc");if(M&&G){if(this.prev<H.catchLoc)return z(H.catchLoc,!0);if(this.prev<H.finallyLoc)return z(H.finallyLoc)}else if(M){if(this.prev<H.catchLoc)return z(H.catchLoc,!0)}else{if(!G)throw new Error("try statement without catch or finally");if(this.prev<H.finallyLoc)return z(H.finallyLoc)}}}},abrupt:function(F,j){for(var z=this.tryEntries.length-1;z>=0;--z){var $=this.tryEntries[z];if($.tryLoc<=this.prev&&a.call($,"finallyLoc")&&this.prev<$.finallyLoc){var H=$;break}}H&&(F==="break"||F==="continue")&&H.tryLoc<=j&&j<=H.finallyLoc&&(H=null);var k=H?H.completion:{};return k.type=F,k.arg=j,H?(this.method="next",this.next=H.finallyLoc,y):this.complete(k)},complete:function(F,j){if(F.type==="throw")throw F.arg;return F.type==="break"||F.type==="continue"?this.next=F.arg:F.type==="return"?(this.rval=this.arg=F.arg,this.method="return",this.next="end"):F.type==="normal"&&j&&(this.next=j),y},finish:function(F){for(var j=this.tryEntries.length-1;j>=0;--j){var z=this.tryEntries[j];if(z.finallyLoc===F)return this.complete(z.completion,z.afterLoc),B(z),y}},catch:function(F){for(var j=this.tryEntries.length-1;j>=0;--j){var z=this.tryEntries[j];if(z.tryLoc===F){var $=z.completion;if($.type==="throw"){var H=$.arg;B(z)}return H}}throw new Error("illegal catch attempt")},delegateYield:function(F,j,z){return this.delegate={iterator:K(F),resultName:j,nextLoc:z},this.method==="next"&&(this.arg=n),y}}}function O(F,j,z,$){var H=j&&j.prototype instanceof p?j:p,k=Object.create(H.prototype),M=new U($||[]);return k._invoke=function(G,ge,Q){var te=g;return function(ce,T){if(te===w)throw new Error("Generator is already running");if(te===v){if(ce==="throw")throw T;return ne()}for(Q.method=ce,Q.arg=T;;){var fe=Q.delegate;if(fe){var ze=le(fe,Q);if(ze){if(ze===y)continue;return ze}}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)}}}(F,z,M),k}function E(F,j,z){try{return{type:"normal",arg:F.call(j,z)}}catch($){return{type:"throw",arg:$}}}function p(){}function I(){}function C(){}function L(F){["next","throw","return"].forEach(function(j){F[j]=function(z){return this._invoke(j,z)}})}function q(F){var j;this._invoke=function(z,$){function H(){return new Promise(function(k,M){(function G(ge,Q,te,ce){var T=E(F[ge],F,Q);if(T.type!=="throw"){var fe=T.arg,ze=fe.value;return ze&&typeof ze=="object"&&a.call(ze,"__await")?Promise.resolve(ze.__await).then(function(tt){G("next",tt,te,ce)},function(tt){G("throw",tt,te,ce)}):Promise.resolve(ze).then(function(tt){fe.value=tt,te(fe)},function(tt){return G("throw",tt,te,ce)})}ce(T.arg)})(z,$,k,M)})}return j=j?j.then(H,H):H()}}function le(F,j){var z=F.iterator[j.method];if(z===n){if(j.delegate=null,j.method==="throw"){if(F.iterator.return&&(j.method="return",j.arg=n,le(F,j),j.method==="throw"))return y;j.method="throw",j.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var $=E(z,F.iterator,j.arg);if($.type==="throw")return j.method="throw",j.arg=$.arg,j.delegate=null,y;var H=$.arg;return H?H.done?(j[F.resultName]=H.value,j.next=F.nextLoc,j.method!=="return"&&(j.method="next",j.arg=n),j.delegate=null,y):H:(j.method="throw",j.arg=new TypeError("iterator result is not an object"),j.delegate=null,y)}function pe(F){var j={tryLoc:F[0]};1 in F&&(j.catchLoc=F[1]),2 in F&&(j.finallyLoc=F[2],j.afterLoc=F[3]),this.tryEntries.push(j)}function B(F){var j=F.completion||{};j.type="normal",delete j.arg,F.completion=j}function U(F){this.tryEntries=[{tryLoc:"root"}],F.forEach(pe,this),this.reset(!0)}function K(F){if(F){var j=F[s];if(j)return j.call(F);if(typeof F.next=="function")return F;if(!isNaN(F.length)){var z=-1,$=function H(){for(;++z<F.length;)if(a.call(F,z))return H.value=F[z],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
|
+
`}])),lN}var A4e=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]}),S4e=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),O4e=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)&&A4e(e,t,r);return S4e(e,t),e};Object.defineProperty(qS,"__esModule",{value:!0});qS.FortmaticConnector=void 0;const I4e=eae,P4e=Ml,T4e=qs;class R4e extends I4e.AbstractConnector{constructor(e){const r=T4e.getConfiguration()[P4e.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(()=>O4e(x4e()));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()}}qS.FortmaticConnector=R4e;var JS={};function V4(){return V4=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},V4.apply(this,arguments)}function mk(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function G4(t){return G4=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},G4(t)}function kA(t,e){return kA=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},kA(t,e)}function C4e(){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 C4e()?_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&&kA(u,o.prototype),u},_x.apply(null,arguments)}function N4e(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function LA(t){var e=typeof Map=="function"?new Map:void 0;return LA=function(n){if(n===null||!N4e(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,G4(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),kA(i,n)},LA(t)}function dE(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 p0(t,e){try{var r=t()}catch(n){return e(n)}return r&&r.then?r.then(void 0,e):r}function zc(t){return t.hasOwnProperty("result")?t.result:t}var Ex=function(t){mk(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}(LA(Error)),Uae=function(t){mk(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}(LA(Error)),D4e=function(t){mk(e,t);function e(n){var i;return i=t.call(this,n)||this,i.handleNetworkChanged=i.handleNetworkChanged.bind(dE(i)),i.handleChainChanged=i.handleChainChanged.bind(dE(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(dE(i)),i.handleClose=i.handleClose.bind(dE(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 V4({provider:window.ethereum},s?{account:s}:{})}var g=function(){if(!s)return Promise.resolve(window.ethereum.enable().then(function(m){return m&&zc(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 Ex;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=p0(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(u){return zc(u)[0]})).then(function(u){s=u})},function(u){if(u.code===4001)throw new Uae});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=zc(window.ethereum.send({method:"net_version"}))}catch{}return a||(window.ethereum.isDapper?a=zc(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=p0(function(){return Promise.resolve(window.ethereum.send("net_version").then(zc)).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 Ex;var a,o=p0(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(zc)).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=zc(window.ethereum.send({method:"eth_accounts"}))[0]),a}var u=function(){if(!a){var f=p0(function(){return Promise.resolve(window.ethereum.enable().then(function(d){return zc(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 Ex;var a,o=p0(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(s){return zc(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(p0(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(i){return zc(i).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(i){return Promise.reject(i)}},e}(jS);const $4e=Object.freeze(Object.defineProperty({__proto__:null,InjectedConnector:D4e,NoEthereumProviderError:Ex,UserRejectedRequestError:Uae},Symbol.toStringTag,{value:"Module"})),M4e=uo($4e);Object.defineProperty(JS,"__esModule",{value:!0});JS.InjectedConnector=void 0;const k4e=M4e;class L4e extends k4e.InjectedConnector{constructor(e){super({supportedChainIds:[e]})}}JS.InjectedConnector=L4e;var XS={},U4e="Invariant failed";function OW(t,e){if(!t)throw new Error(U4e)}function Bae(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,x1(t,e)}function W4(t){return W4=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},W4(t)}function x1(t,e){return x1=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},x1(t,e)}function B4e(){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 xx(t,e,r){return B4e()?xx=Reflect.construct:xx=function(i,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(i,s),u=new c;return o&&x1(u,o.prototype),u},xx.apply(null,arguments)}function F4e(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function K4(t){var e=typeof Map=="function"?new Map:void 0;return K4=function(n){if(n===null||!F4e(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 xx(n,arguments,W4(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),x1(i,n)},K4(t)}var Ax=function(t){Bae(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}(K4(Error)),j4e=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 Ax(c.status+": "+c.statusText,-32e3);return Promise.resolve(c.json()).then(function(u){if("error"in u){var f,d,g;throw new Ax(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 Ax("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},q4e=function(t){Bae(e,t);function e(n){var i,a=n.urls,o=n.defaultChainId;return o||Object.keys(a).length===1||OW(!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 j4e(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())||OW(!1),this.currentChainId=i,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:i})},e}(jS);const H4e=Object.freeze(Object.defineProperty({__proto__:null,NetworkConnector:q4e,RequestError:Ax},Symbol.toStringTag,{value:"Module"})),z4e=uo(H4e);Object.defineProperty(XS,"__esModule",{value:!0});XS.NetworkConnector=void 0;const V4e=Ac,G4e=z4e,W4e=qs;class K4e extends G4e.NetworkConnector{constructor(e){super({urls:W4e.getConfiguration()[V4e.ProviderType.NETWORK].urls,defaultChainId:e})}}XS.NetworkConnector=K4e;var ZS={};const Y4e="modulepreload",Q4e=function(t){return"https://cdn.decentraland.org/@dcl/auth-site/0.1.3-7386581352.commit-0ef8d7f/"+t},IW={},Ty=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=Q4e(a),a in IW)return;IW[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":Y4e,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 Y4(){return Y4=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},Y4.apply(this,arguments)}function J4e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Q4(t,e)}function Q4(t,e){return Q4=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Q4(t,e)}function PW(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var X4e=1,Z4e=function(t){J4e(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(PW(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(PW(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(Ty(()=>import("./index-182c30c0.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(Y4({appName:i.appName,darkMode:i.darkMode},i.appLogoUrl?{appLogoUrl:i.appLogoUrl}:{})),i.provider=i.walletLink.makeWeb3Provider(i.url,X4e)})}();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}(jS);const e5e=Object.freeze(Object.defineProperty({__proto__:null,WalletLinkConnector:Z4e},Symbol.toStringTag,{value:"Module"})),t5e=uo(e5e);Object.defineProperty(ZS,"__esModule",{value:!0});ZS.WalletLinkConnector=void 0;const r5e=Ml,n5e=t5e,i5e=qs;class a5e extends n5e.WalletLinkConnector{constructor(e){const r=i5e.getConfiguration()[r5e.ProviderType.WALLET_LINK];super({url:r.urls[e],appName:r.appName,supportedChainIds:[e]})}}ZS.WalletLinkConnector=a5e;var eO={};const o5e=Symbol(),TW=Object.getPrototypeOf,J4=new WeakMap,s5e=t=>t&&(J4.has(t)?J4.get(t):TW(t)===Object.prototype||TW(t)===Array.prototype),c5e=t=>s5e(t)&&t[o5e]||null,RW=(t,e=!0)=>{J4.set(t,e)},fN=t=>typeof t=="object"&&t!==null,wf=new WeakMap,hE=new WeakSet,u5e=(t=Object.is,e=(u,f)=>new Proxy(u,f),r=u=>fN(u)&&!hE.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 RW(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(hE.has(v))RW(v,!1);else if(v instanceof Promise)delete y.value,y.get=()=>d(v);else if(wf.has(v)){const[_,b]=wf.get(v);y.value=a(_,b(),d)}Object.defineProperty(m,w,y)}),Object.preventExtensions(m)},o=new WeakMap,s=[1,1],c=u=>{if(!fN(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,L=++s[0])=>{d!==L&&(d=L,g.forEach(q=>q(C,L)))};let w=s[1];const v=(C=++s[1])=>(w!==C&&!g.size&&(w=C,_.forEach(([L])=>{const q=L[1](C);q>d&&(d=q)})),d),y=C=>(L,q)=>{const le=[...L];le[1]=[C,...le[1]],m(le,q)},_=new Map,b=(C,L)=>{if(g.size){const q=L[3](y(C));_.set(C,[L,q])}else _.set(C,[L])},S=C=>{var L;const q=_.get(C);q&&(_.delete(C),(L=q[1])==null||L.call(q))},x=C=>(g.add(C),g.size===1&&_.forEach(([q,le],pe)=>{const B=q[3](y(pe));_.set(pe,[q,B])}),()=>{g.delete(C),g.size===0&&_.forEach(([q,le],pe)=>{le&&(le(),_.set(pe,[q]))})}),O=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u)),p=e(O,{deleteProperty(C,L){const q=Reflect.get(C,L);S(L);const le=Reflect.deleteProperty(C,L);return le&&m(["delete",[L],q]),le},set(C,L,q,le){const pe=Reflect.has(C,L),B=Reflect.get(C,L,le);if(pe&&(t(B,q)||o.has(q)&&t(B,o.get(q))))return!0;S(L),fN(q)&&(q=c5e(q)||q);let U=q;if(q instanceof Promise)q.then(K=>{q.status="fulfilled",q.value=K,m(["resolve",[L],K])}).catch(K=>{q.status="rejected",q.reason=K,m(["reject",[L],K])});else{!wf.has(q)&&r(q)&&(U=c(q));const K=!hE.has(U)&&wf.get(U);K&&b(L,K)}return Reflect.set(C,L,U,le),m(["set",[L],q,B]),!0}});o.set(u,p);const I=[O,v,a,x];return wf.set(p,I),Reflect.ownKeys(u).forEach(C=>{const L=Object.getOwnPropertyDescriptor(u,C);"value"in L&&(p[C]=u[C],delete L.value,delete L.writable),Object.defineProperty(O,C,L)}),p})=>[c,wf,hE,t,e,r,n,i,a,o,s],[l5e]=u5e();function xd(t={}){return l5e(t)}function Ip(t,e,r){const n=wf.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 f5e(t,e){const r=wf.get(t),[n,i,a]=r;return a(n,i(),e)}const Wi=xd({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),Fae={state:Wi,subscribe(t){return Ip(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}},$a={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 $a.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const t=navigator.userAgent.toLowerCase();return $a.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($a.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(!$a.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($a.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($a.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem($a.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem($a.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var t;const e=(t=Fae.state.data)==null?void 0:t.Wallet;if(!e)throw new Error('Missing "Wallet" view data');return e}},d5e=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),Oa=xd({enabled:d5e,userSessionId:"",events:[],connectedWalletId:void 0}),h5e={state:Oa,subscribe(t){return Ip(Oa.events,()=>t(f5e(Oa.events[Oa.events.length-1])))},initialize(){Oa.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(Oa.userSessionId=crypto.randomUUID())},setConnectedWalletId(t){Oa.connectedWalletId=t},click(t){if(Oa.enabled){const e={type:"CLICK",name:t.name,userSessionId:Oa.userSessionId,timestamp:Date.now(),data:t};Oa.events.push(e)}},track(t){if(Oa.enabled){const e={type:"TRACK",name:t.name,userSessionId:Oa.userSessionId,timestamp:Date.now(),data:t};Oa.events.push(e)}},view(t){if(Oa.enabled){const e={type:"VIEW",name:t.name,userSessionId:Oa.userSessionId,timestamp:Date.now(),data:t};Oa.events.push(e)}}},Vc=xd({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),Oc={state:Vc,subscribe(t){return Ip(Vc,()=>t(Vc))},setChains(t){Vc.chains=t},setWalletConnectUri(t){Vc.walletConnectUri=t},setIsCustomDesktop(t){Vc.isCustomDesktop=t},setIsCustomMobile(t){Vc.isCustomMobile=t},setIsDataLoaded(t){Vc.isDataLoaded=t},setIsUiLoaded(t){Vc.isUiLoaded=t},setIsAuth(t){Vc.isAuth=t}},pE=xd({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}),Ry={state:pE,subscribe(t){return Ip(pE,()=>t(pE))},setConfig(t){var e,r;h5e.initialize(),Oc.setChains(t.chains),Oc.setIsAuth(!!t.enableAuthMode),Oc.setIsCustomMobile(!!((e=t.mobileWallets)!=null&&e.length)),Oc.setIsCustomDesktop(!!((r=t.desktopWallets)!=null&&r.length)),$a.setModalVersionInStorage(),Object.assign(pE,t)}};var p5e=Object.defineProperty,CW=Object.getOwnPropertySymbols,g5e=Object.prototype.hasOwnProperty,y5e=Object.prototype.propertyIsEnumerable,NW=(t,e,r)=>e in t?p5e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,m5e=(t,e)=>{for(var r in e||(e={}))g5e.call(e,r)&&NW(t,r,e[r]);if(CW)for(var r of CW(e))y5e.call(e,r)&&NW(t,r,e[r]);return t};const X4="https://explorer-api.walletconnect.com",Z4="wcm",e5="js-2.6.2";async function gE(t,e){const r=m5e({sdkType:Z4,sdkVersion:e5},e),n=new URL(t,X4);return n.searchParams.append("projectId",Ry.state.projectId),Object.entries(r).forEach(([i,a])=>{a&&n.searchParams.append(i,String(a))}),(await fetch(n)).json()}const Jd={async getDesktopListings(t){return gE("/w3m/v1/getDesktopListings",t)},async getMobileListings(t){return gE("/w3m/v1/getMobileListings",t)},async getInjectedListings(t){return gE("/w3m/v1/getInjectedListings",t)},async getAllListings(t){return gE("/w3m/v1/getAllListings",t)},getWalletImageUrl(t){return`${X4}/w3m/v1/getWalletImage/${t}?projectId=${Ry.state.projectId}&sdkType=${Z4}&sdkVersion=${e5}`},getAssetImageUrl(t){return`${X4}/w3m/v1/getAssetImage/${t}?projectId=${Ry.state.projectId}&sdkType=${Z4}&sdkVersion=${e5}`}};var v5e=Object.defineProperty,DW=Object.getOwnPropertySymbols,b5e=Object.prototype.hasOwnProperty,w5e=Object.prototype.propertyIsEnumerable,$W=(t,e,r)=>e in t?v5e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_5e=(t,e)=>{for(var r in e||(e={}))b5e.call(e,r)&&$W(t,r,e[r]);if(DW)for(var r of DW(e))w5e.call(e,r)&&$W(t,r,e[r]);return t};const MW=$a.isMobile(),Gc=xd({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),iWe={state:Gc,async getRecomendedWallets(){const{explorerRecommendedWalletIds:t,explorerExcludedWalletIds:e}=Ry.state;if(t==="NONE"||e==="ALL"&&!t)return Gc.recomendedWallets;if($a.isArray(t)){const r={recommendedIds:t.join(",")},{listings:n}=await Jd.getAllListings(r),i=Object.values(n);i.sort((a,o)=>{const s=t.indexOf(a.id),c=t.indexOf(o.id);return s-c}),Gc.recomendedWallets=i}else{const{chains:r,isAuth:n}=Oc.state,i=r==null?void 0:r.join(","),a=$a.isArray(e),o={page:1,sdks:n?"auth_v1":void 0,entries:$a.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:a?e.join(","):void 0},{listings:s}=MW?await Jd.getMobileListings(o):await Jd.getDesktopListings(o);Gc.recomendedWallets=Object.values(s)}return Gc.recomendedWallets},async getWallets(t){const e=_5e({},t),{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:n}=Ry.state,{recomendedWallets:i}=Gc;if(n==="ALL")return Gc.wallets;i.length?e.excludedIds=i.map(d=>d.id).join(","):$a.isArray(r)&&(e.excludedIds=r.join(",")),$a.isArray(n)&&(e.excludedIds=[e.excludedIds,n].filter(Boolean).join(",")),Oc.state.isAuth&&(e.sdks="auth_v1");const{page:a,search:o}=t,{listings:s,total:c}=MW?await Jd.getMobileListings(e):await Jd.getDesktopListings(e),u=Object.values(s),f=o?"search":"wallets";return Gc[f]={listings:[...Gc[f].listings,...u],total:c,page:a??1},{listings:u,total:c}},getWalletImageUrl(t){return Jd.getWalletImageUrl(t)},getAssetImageUrl(t){return Jd.getAssetImageUrl(t)},resetSearch(){Gc.search={listings:[],total:0,page:1}}},g0=xd({open:!1}),dN={state:g0,subscribe(t){return Ip(g0,()=>t(g0))},async open(t){return new Promise(e=>{const{isUiLoaded:r,isDataLoaded:n}=Oc.state;if($a.removeWalletConnectDeepLink(),Oc.setWalletConnectUri(t==null?void 0:t.uri),Oc.setChains(t==null?void 0:t.chains),Fae.reset("ConnectWallet"),r&&n)g0.open=!0,e();else{const i=setInterval(()=>{const a=Oc.state;a.isUiLoaded&&a.isDataLoaded&&(clearInterval(i),g0.open=!0,e())},200)}})},close(){g0.open=!1}};var E5e=Object.defineProperty,kW=Object.getOwnPropertySymbols,x5e=Object.prototype.hasOwnProperty,A5e=Object.prototype.propertyIsEnumerable,LW=(t,e,r)=>e in t?E5e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,S5e=(t,e)=>{for(var r in e||(e={}))x5e.call(e,r)&&LW(t,r,e[r]);if(kW)for(var r of kW(e))A5e.call(e,r)&&LW(t,r,e[r]);return t};function O5e(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const xv=xd({themeMode:O5e()?"dark":"light"}),UW={state:xv,subscribe(t){return Ip(xv,()=>t(xv))},setThemeConfig(t){const{themeMode:e,themeVariables:r}=t;e&&(xv.themeMode=e),r&&(xv.themeVariables=S5e({},r))}},Xd=xd({open:!1,message:"",variant:"success"}),aWe={state:Xd,subscribe(t){return Ip(Xd,()=>t(Xd))},openToast(t,e){Xd.open=!0,Xd.message=t,Xd.variant=e},closeToast(){Xd.open=!1}};let I5e=class{constructor(e){this.openModal=dN.open,this.closeModal=dN.close,this.subscribeModal=dN.subscribe,this.setTheme=UW.setThemeConfig,UW.setThemeConfig(e),Ry.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Ty(()=>import("./index-5d5f068e.js"),[]);const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),Oc.setIsUiLoaded(!0)}}};const P5e=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:I5e},Symbol.toStringTag,{value:"Module"})),T5e=uo(P5e);var vk={},tO={},kr={},jae={};(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}})(jae);Object.defineProperty(kr,"__esModule",{value:!0});var qae=jae;function R5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}kr.readInt16BE=R5e;function C5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}kr.readUint16BE=C5e;function N5e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}kr.readInt16LE=N5e;function D5e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}kr.readUint16LE=D5e;function Hae(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}kr.writeUint16BE=Hae;kr.writeInt16BE=Hae;function zae(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}kr.writeUint16LE=zae;kr.writeInt16LE=zae;function t5(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}kr.readInt32BE=t5;function r5(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}kr.readUint32BE=r5;function n5(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}kr.readInt32LE=n5;function i5(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}kr.readUint32LE=i5;function UA(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}kr.writeUint32BE=UA;kr.writeInt32BE=UA;function BA(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}kr.writeUint32LE=BA;kr.writeInt32LE=BA;function $5e(t,e){e===void 0&&(e=0);var r=t5(t,e),n=t5(t,e+4);return r*4294967296+n-(n>>31)*4294967296}kr.readInt64BE=$5e;function M5e(t,e){e===void 0&&(e=0);var r=r5(t,e),n=r5(t,e+4);return r*4294967296+n}kr.readUint64BE=M5e;function k5e(t,e){e===void 0&&(e=0);var r=n5(t,e),n=n5(t,e+4);return n*4294967296+r-(r>>31)*4294967296}kr.readInt64LE=k5e;function L5e(t,e){e===void 0&&(e=0);var r=i5(t,e),n=i5(t,e+4);return n*4294967296+r}kr.readUint64LE=L5e;function Vae(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),UA(t/4294967296>>>0,e,r),UA(t>>>0,e,r+4),e}kr.writeUint64BE=Vae;kr.writeInt64BE=Vae;function Gae(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),BA(t>>>0,e,r),BA(t/4294967296>>>0,e,r+4),e}kr.writeUint64LE=Gae;kr.writeInt64LE=Gae;function U5e(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}kr.readUintBE=U5e;function B5e(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}kr.readUintLE=B5e;function F5e(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(!qae.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}kr.writeUintBE=F5e;function j5e(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(!qae.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}kr.writeUintLE=j5e;function q5e(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e)}kr.readFloat32BE=q5e;function H5e(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e,!0)}kr.readFloat32LE=H5e;function z5e(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e)}kr.readFloat64BE=z5e;function V5e(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e,!0)}kr.readFloat64LE=V5e;function G5e(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}kr.writeFloat32BE=G5e;function W5e(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}kr.writeFloat32LE=W5e;function K5e(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}kr.writeFloat64BE=K5e;function Y5e(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}kr.writeFloat64LE=Y5e;var is={};Object.defineProperty(is,"__esModule",{value:!0});function Q5e(t){for(var e=0;e<t.length;e++)t[e]=0;return t}is.wipe=Q5e;Object.defineProperty(tO,"__esModule",{value:!0});var Ia=kr,a5=is,J5e=20;function X5e(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,O=a,E=o,p=s,I=c,C=u,L=f,q=d,le=g,pe=m,B=w,U=v,K=y,ne=_,F=b,j=0;j<J5e;j+=2)S=S+p|0,U^=S,U=U>>>32-16|U<<16,q=q+U|0,p^=q,p=p>>>32-12|p<<12,x=x+I|0,K^=x,K=K>>>32-16|K<<16,le=le+K|0,I^=le,I=I>>>32-12|I<<12,O=O+C|0,ne^=O,ne=ne>>>32-16|ne<<16,pe=pe+ne|0,C^=pe,C=C>>>32-12|C<<12,E=E+L|0,F^=E,F=F>>>32-16|F<<16,B=B+F|0,L^=B,L=L>>>32-12|L<<12,O=O+C|0,ne^=O,ne=ne>>>32-8|ne<<8,pe=pe+ne|0,C^=pe,C=C>>>32-7|C<<7,E=E+L|0,F^=E,F=F>>>32-8|F<<8,B=B+F|0,L^=B,L=L>>>32-7|L<<7,x=x+I|0,K^=x,K=K>>>32-8|K<<8,le=le+K|0,I^=le,I=I>>>32-7|I<<7,S=S+p|0,U^=S,U=U>>>32-8|U<<8,q=q+U|0,p^=q,p=p>>>32-7|p<<7,S=S+I|0,F^=S,F=F>>>32-16|F<<16,pe=pe+F|0,I^=pe,I=I>>>32-12|I<<12,x=x+C|0,U^=x,U=U>>>32-16|U<<16,B=B+U|0,C^=B,C=C>>>32-12|C<<12,O=O+L|0,K^=O,K=K>>>32-16|K<<16,q=q+K|0,L^=q,L=L>>>32-12|L<<12,E=E+p|0,ne^=E,ne=ne>>>32-16|ne<<16,le=le+ne|0,p^=le,p=p>>>32-12|p<<12,O=O+L|0,K^=O,K=K>>>32-8|K<<8,q=q+K|0,L^=q,L=L>>>32-7|L<<7,E=E+p|0,ne^=E,ne=ne>>>32-8|ne<<8,le=le+ne|0,p^=le,p=p>>>32-7|p<<7,x=x+C|0,U^=x,U=U>>>32-8|U<<8,B=B+U|0,C^=B,C=C>>>32-7|C<<7,S=S+I|0,F^=S,F=F>>>32-8|F<<8,pe=pe+F|0,I^=pe,I=I>>>32-7|I<<7;Ia.writeUint32LE(S+n|0,t,0),Ia.writeUint32LE(x+i|0,t,4),Ia.writeUint32LE(O+a|0,t,8),Ia.writeUint32LE(E+o|0,t,12),Ia.writeUint32LE(p+s|0,t,16),Ia.writeUint32LE(I+c|0,t,20),Ia.writeUint32LE(C+u|0,t,24),Ia.writeUint32LE(L+f|0,t,28),Ia.writeUint32LE(q+d|0,t,32),Ia.writeUint32LE(le+g|0,t,36),Ia.writeUint32LE(pe+m|0,t,40),Ia.writeUint32LE(B+w|0,t,44),Ia.writeUint32LE(U+v|0,t,48),Ia.writeUint32LE(K+y|0,t,52),Ia.writeUint32LE(ne+_|0,t,56),Ia.writeUint32LE(F+b|0,t,60)}function Wae(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){X5e(s,a,t);for(var u=c;u<c+64&&u<r.length;u++)n[u]=r[u]^s[u-c];eDe(a,0,o)}return a5.wipe(s),i===0&&a5.wipe(a),n}tO.streamXOR=Wae;function Z5e(t,e,r,n){return n===void 0&&(n=0),a5.wipe(r),Wae(t,e,r,r,n)}tO.stream=Z5e;function eDe(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 Kae={},Ad={};Object.defineProperty(Ad,"__esModule",{value:!0});function tDe(t,e,r){return~(t-1)&e|t-1&r}Ad.select=tDe;function rDe(t,e){return(t|0)-(e|0)-1>>>31&1}Ad.lessOrEqual=rDe;function Yae(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}Ad.compare=Yae;function nDe(t,e){return t.length===0||e.length===0?!1:Yae(t,e)!==0}Ad.equal=nDe;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ad,r=is;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],O=this._r[0],E=this._r[1],p=this._r[2],I=this._r[3],C=this._r[4],L=this._r[5],q=this._r[6],le=this._r[7],pe=this._r[8],B=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 F=s[c+6]|s[c+7]<<8;w+=(ne>>>7|F<<9)&8191;var j=s[c+8]|s[c+9]<<8;v+=(F>>>4|j<<12)&8191,y+=j>>>1&8191;var z=s[c+10]|s[c+11]<<8;_+=(j>>>14|z<<2)&8191;var $=s[c+12]|s[c+13]<<8;b+=(z>>>11|$<<5)&8191;var H=s[c+14]|s[c+15]<<8;S+=($>>>8|H<<8)&8191,x+=H>>>5|f;var k=0,M=k;M+=d*O,M+=g*(5*B),M+=m*(5*pe),M+=w*(5*le),M+=v*(5*q),k=M>>>13,M&=8191,M+=y*(5*L),M+=_*(5*C),M+=b*(5*I),M+=S*(5*p),M+=x*(5*E),k+=M>>>13,M&=8191;var G=k;G+=d*E,G+=g*O,G+=m*(5*B),G+=w*(5*pe),G+=v*(5*le),k=G>>>13,G&=8191,G+=y*(5*q),G+=_*(5*L),G+=b*(5*C),G+=S*(5*I),G+=x*(5*p),k+=G>>>13,G&=8191;var ge=k;ge+=d*p,ge+=g*E,ge+=m*O,ge+=w*(5*B),ge+=v*(5*pe),k=ge>>>13,ge&=8191,ge+=y*(5*le),ge+=_*(5*q),ge+=b*(5*L),ge+=S*(5*C),ge+=x*(5*I),k+=ge>>>13,ge&=8191;var Q=k;Q+=d*I,Q+=g*p,Q+=m*E,Q+=w*O,Q+=v*(5*B),k=Q>>>13,Q&=8191,Q+=y*(5*pe),Q+=_*(5*le),Q+=b*(5*q),Q+=S*(5*L),Q+=x*(5*C),k+=Q>>>13,Q&=8191;var te=k;te+=d*C,te+=g*I,te+=m*p,te+=w*E,te+=v*O,k=te>>>13,te&=8191,te+=y*(5*B),te+=_*(5*pe),te+=b*(5*le),te+=S*(5*q),te+=x*(5*L),k+=te>>>13,te&=8191;var ce=k;ce+=d*L,ce+=g*C,ce+=m*I,ce+=w*p,ce+=v*E,k=ce>>>13,ce&=8191,ce+=y*O,ce+=_*(5*B),ce+=b*(5*pe),ce+=S*(5*le),ce+=x*(5*q),k+=ce>>>13,ce&=8191;var T=k;T+=d*q,T+=g*L,T+=m*C,T+=w*I,T+=v*p,k=T>>>13,T&=8191,T+=y*E,T+=_*O,T+=b*(5*B),T+=S*(5*pe),T+=x*(5*le),k+=T>>>13,T&=8191;var fe=k;fe+=d*le,fe+=g*q,fe+=m*L,fe+=w*C,fe+=v*I,k=fe>>>13,fe&=8191,fe+=y*p,fe+=_*E,fe+=b*O,fe+=S*(5*B),fe+=x*(5*pe),k+=fe>>>13,fe&=8191;var ze=k;ze+=d*pe,ze+=g*le,ze+=m*q,ze+=w*L,ze+=v*C,k=ze>>>13,ze&=8191,ze+=y*I,ze+=_*p,ze+=b*E,ze+=S*O,ze+=x*(5*B),k+=ze>>>13,ze&=8191;var tt=k;tt+=d*B,tt+=g*pe,tt+=m*le,tt+=w*q,tt+=v*L,k=tt>>>13,tt&=8191,tt+=y*C,tt+=_*I,tt+=b*p,tt+=S*E,tt+=x*O,k+=tt>>>13,tt&=8191,k=(k<<2)+k|0,k=k+M|0,M=k&8191,k=k>>>13,G+=k,d=M,g=G,m=ge,w=Q,v=te,y=ce,_=T,b=fe,S=ze,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})(Kae);(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=tO,r=Kae,n=is,i=kr,a=Ad;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})(vk);var Qae={},Iw={},bk={};Object.defineProperty(bk,"__esModule",{value:!0});function iDe(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}bk.isSerializableHash=iDe;Object.defineProperty(Iw,"__esModule",{value:!0});var Wc=bk,aDe=Ad,oDe=is,Jae=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),Wc.isSerializableHash(this._inner)&&Wc.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),oDe.wipe(n)}return t.prototype.reset=function(){if(!Wc.isSerializableHash(this._inner)||!Wc.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(){Wc.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Wc.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(!Wc.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(!Wc.isSerializableHash(this._inner)||!Wc.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(!Wc.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},t}();Iw.HMAC=Jae;function sDe(t,e,r){var n=new Jae(t,e);n.update(r);var i=n.digest();return n.clean(),i}Iw.hmac=sDe;Iw.equal=aDe.equal;Object.defineProperty(Qae,"__esModule",{value:!0});var BW=Iw,FW=is,cDe=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=BW.hmac(this._hash,n,r);this._hmac=new BW.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(),FW.wipe(this._buffer),FW.wipe(this._counter),this._bufpos=0},t}(),uDe=Qae.HKDF=cDe,im={},rO={},nO={};Object.defineProperty(nO,"__esModule",{value:!0});nO.BrowserRandomSource=void 0;const jW=65536;class lDe{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+=jW)this._crypto.getRandomValues(r.subarray(n,n+Math.min(r.length-n,jW)));return r}}nO.BrowserRandomSource=lDe;function o5(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 iO={};Object.defineProperty(iO,"__esModule",{value:!0});iO.NodeRandomSource=void 0;const fDe=is;class dDe{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof o5<"u"){const e=X$;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,fDe.wipe)(r),n}}iO.NodeRandomSource=dDe;Object.defineProperty(rO,"__esModule",{value:!0});rO.SystemRandomSource=void 0;const hDe=nO,pDe=iO;class gDe{constructor(){if(this.isAvailable=!1,this.name="",this._source=new hDe.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new pDe.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)}}rO.SystemRandomSource=gDe;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const e=rO,r=kr,n=is;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})(im);var aO={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=kr,r=is;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 O=f+x*4;s[x]=e.readUint32BE(u,O)}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 I=(E>>>7|E<<32-7)^(E>>>18|E<<32-18)^E>>>3;s[x]=(p+s[x-7]|0)+(I+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,I=((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+I|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})(aO);var wk={};(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=im,r=is;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function n(x){const O=new Float64Array(16);if(x)for(let E=0;E<x.length;E++)O[E]=x[E];return O}const i=new Uint8Array(32);i[0]=9;const a=n([56129,1]);function o(x){let O=1;for(let E=0;E<16;E++){let p=x[E]+O+65535;O=Math.floor(p/65536),x[E]=p-O*65536}x[0]+=O-1+37*(O-1)}function s(x,O,E){const p=~(E-1);for(let I=0;I<16;I++){const C=p&(x[I]^O[I]);x[I]^=C,O[I]^=C}}function c(x,O){const E=n(),p=n();for(let I=0;I<16;I++)p[I]=O[I];o(p),o(p),o(p);for(let I=0;I<2;I++){E[0]=p[0]-65517;for(let L=1;L<15;L++)E[L]=p[L]-65535-(E[L-1]>>16&1),E[L-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 I=0;I<16;I++)x[2*I]=p[I]&255,x[2*I+1]=p[I]>>8}function u(x,O){for(let E=0;E<16;E++)x[E]=O[2*E]+(O[2*E+1]<<8);x[15]&=32767}function f(x,O,E){for(let p=0;p<16;p++)x[p]=O[p]+E[p]}function d(x,O,E){for(let p=0;p<16;p++)x[p]=O[p]-E[p]}function g(x,O,E){let p,I,C=0,L=0,q=0,le=0,pe=0,B=0,U=0,K=0,ne=0,F=0,j=0,z=0,$=0,H=0,k=0,M=0,G=0,ge=0,Q=0,te=0,ce=0,T=0,fe=0,ze=0,tt=0,mt=0,vt=0,gt=0,Lt=0,Yt=0,wr=0,Rt=E[0],Pt=E[1],kt=E[2],Nt=E[3],Kt=E[4],Ut=E[5],zt=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],mr=E[15];p=O[0],C+=p*Rt,L+=p*Pt,q+=p*kt,le+=p*Nt,pe+=p*Kt,B+=p*Ut,U+=p*zt,K+=p*$t,ne+=p*Dt,F+=p*qt,j+=p*Mt,z+=p*cr,$+=p*tr,H+=p*ir,k+=p*nr,M+=p*mr,p=O[1],L+=p*Rt,q+=p*Pt,le+=p*kt,pe+=p*Nt,B+=p*Kt,U+=p*Ut,K+=p*zt,ne+=p*$t,F+=p*Dt,j+=p*qt,z+=p*Mt,$+=p*cr,H+=p*tr,k+=p*ir,M+=p*nr,G+=p*mr,p=O[2],q+=p*Rt,le+=p*Pt,pe+=p*kt,B+=p*Nt,U+=p*Kt,K+=p*Ut,ne+=p*zt,F+=p*$t,j+=p*Dt,z+=p*qt,$+=p*Mt,H+=p*cr,k+=p*tr,M+=p*ir,G+=p*nr,ge+=p*mr,p=O[3],le+=p*Rt,pe+=p*Pt,B+=p*kt,U+=p*Nt,K+=p*Kt,ne+=p*Ut,F+=p*zt,j+=p*$t,z+=p*Dt,$+=p*qt,H+=p*Mt,k+=p*cr,M+=p*tr,G+=p*ir,ge+=p*nr,Q+=p*mr,p=O[4],pe+=p*Rt,B+=p*Pt,U+=p*kt,K+=p*Nt,ne+=p*Kt,F+=p*Ut,j+=p*zt,z+=p*$t,$+=p*Dt,H+=p*qt,k+=p*Mt,M+=p*cr,G+=p*tr,ge+=p*ir,Q+=p*nr,te+=p*mr,p=O[5],B+=p*Rt,U+=p*Pt,K+=p*kt,ne+=p*Nt,F+=p*Kt,j+=p*Ut,z+=p*zt,$+=p*$t,H+=p*Dt,k+=p*qt,M+=p*Mt,G+=p*cr,ge+=p*tr,Q+=p*ir,te+=p*nr,ce+=p*mr,p=O[6],U+=p*Rt,K+=p*Pt,ne+=p*kt,F+=p*Nt,j+=p*Kt,z+=p*Ut,$+=p*zt,H+=p*$t,k+=p*Dt,M+=p*qt,G+=p*Mt,ge+=p*cr,Q+=p*tr,te+=p*ir,ce+=p*nr,T+=p*mr,p=O[7],K+=p*Rt,ne+=p*Pt,F+=p*kt,j+=p*Nt,z+=p*Kt,$+=p*Ut,H+=p*zt,k+=p*$t,M+=p*Dt,G+=p*qt,ge+=p*Mt,Q+=p*cr,te+=p*tr,ce+=p*ir,T+=p*nr,fe+=p*mr,p=O[8],ne+=p*Rt,F+=p*Pt,j+=p*kt,z+=p*Nt,$+=p*Kt,H+=p*Ut,k+=p*zt,M+=p*$t,G+=p*Dt,ge+=p*qt,Q+=p*Mt,te+=p*cr,ce+=p*tr,T+=p*ir,fe+=p*nr,ze+=p*mr,p=O[9],F+=p*Rt,j+=p*Pt,z+=p*kt,$+=p*Nt,H+=p*Kt,k+=p*Ut,M+=p*zt,G+=p*$t,ge+=p*Dt,Q+=p*qt,te+=p*Mt,ce+=p*cr,T+=p*tr,fe+=p*ir,ze+=p*nr,tt+=p*mr,p=O[10],j+=p*Rt,z+=p*Pt,$+=p*kt,H+=p*Nt,k+=p*Kt,M+=p*Ut,G+=p*zt,ge+=p*$t,Q+=p*Dt,te+=p*qt,ce+=p*Mt,T+=p*cr,fe+=p*tr,ze+=p*ir,tt+=p*nr,mt+=p*mr,p=O[11],z+=p*Rt,$+=p*Pt,H+=p*kt,k+=p*Nt,M+=p*Kt,G+=p*Ut,ge+=p*zt,Q+=p*$t,te+=p*Dt,ce+=p*qt,T+=p*Mt,fe+=p*cr,ze+=p*tr,tt+=p*ir,mt+=p*nr,vt+=p*mr,p=O[12],$+=p*Rt,H+=p*Pt,k+=p*kt,M+=p*Nt,G+=p*Kt,ge+=p*Ut,Q+=p*zt,te+=p*$t,ce+=p*Dt,T+=p*qt,fe+=p*Mt,ze+=p*cr,tt+=p*tr,mt+=p*ir,vt+=p*nr,gt+=p*mr,p=O[13],H+=p*Rt,k+=p*Pt,M+=p*kt,G+=p*Nt,ge+=p*Kt,Q+=p*Ut,te+=p*zt,ce+=p*$t,T+=p*Dt,fe+=p*qt,ze+=p*Mt,tt+=p*cr,mt+=p*tr,vt+=p*ir,gt+=p*nr,Lt+=p*mr,p=O[14],k+=p*Rt,M+=p*Pt,G+=p*kt,ge+=p*Nt,Q+=p*Kt,te+=p*Ut,ce+=p*zt,T+=p*$t,fe+=p*Dt,ze+=p*qt,tt+=p*Mt,mt+=p*cr,vt+=p*tr,gt+=p*ir,Lt+=p*nr,Yt+=p*mr,p=O[15],M+=p*Rt,G+=p*Pt,ge+=p*kt,Q+=p*Nt,te+=p*Kt,ce+=p*Ut,T+=p*zt,fe+=p*$t,ze+=p*Dt,tt+=p*qt,mt+=p*Mt,vt+=p*cr,gt+=p*tr,Lt+=p*ir,Yt+=p*nr,wr+=p*mr,C+=38*G,L+=38*ge,q+=38*Q,le+=38*te,pe+=38*ce,B+=38*T,U+=38*fe,K+=38*ze,ne+=38*tt,F+=38*mt,j+=38*vt,z+=38*gt,$+=38*Lt,H+=38*Yt,k+=38*wr,I=1,p=C+I+65535,I=Math.floor(p/65536),C=p-I*65536,p=L+I+65535,I=Math.floor(p/65536),L=p-I*65536,p=q+I+65535,I=Math.floor(p/65536),q=p-I*65536,p=le+I+65535,I=Math.floor(p/65536),le=p-I*65536,p=pe+I+65535,I=Math.floor(p/65536),pe=p-I*65536,p=B+I+65535,I=Math.floor(p/65536),B=p-I*65536,p=U+I+65535,I=Math.floor(p/65536),U=p-I*65536,p=K+I+65535,I=Math.floor(p/65536),K=p-I*65536,p=ne+I+65535,I=Math.floor(p/65536),ne=p-I*65536,p=F+I+65535,I=Math.floor(p/65536),F=p-I*65536,p=j+I+65535,I=Math.floor(p/65536),j=p-I*65536,p=z+I+65535,I=Math.floor(p/65536),z=p-I*65536,p=$+I+65535,I=Math.floor(p/65536),$=p-I*65536,p=H+I+65535,I=Math.floor(p/65536),H=p-I*65536,p=k+I+65535,I=Math.floor(p/65536),k=p-I*65536,p=M+I+65535,I=Math.floor(p/65536),M=p-I*65536,C+=I-1+37*(I-1),I=1,p=C+I+65535,I=Math.floor(p/65536),C=p-I*65536,p=L+I+65535,I=Math.floor(p/65536),L=p-I*65536,p=q+I+65535,I=Math.floor(p/65536),q=p-I*65536,p=le+I+65535,I=Math.floor(p/65536),le=p-I*65536,p=pe+I+65535,I=Math.floor(p/65536),pe=p-I*65536,p=B+I+65535,I=Math.floor(p/65536),B=p-I*65536,p=U+I+65535,I=Math.floor(p/65536),U=p-I*65536,p=K+I+65535,I=Math.floor(p/65536),K=p-I*65536,p=ne+I+65535,I=Math.floor(p/65536),ne=p-I*65536,p=F+I+65535,I=Math.floor(p/65536),F=p-I*65536,p=j+I+65535,I=Math.floor(p/65536),j=p-I*65536,p=z+I+65535,I=Math.floor(p/65536),z=p-I*65536,p=$+I+65535,I=Math.floor(p/65536),$=p-I*65536,p=H+I+65535,I=Math.floor(p/65536),H=p-I*65536,p=k+I+65535,I=Math.floor(p/65536),k=p-I*65536,p=M+I+65535,I=Math.floor(p/65536),M=p-I*65536,C+=I-1+37*(I-1),x[0]=C,x[1]=L,x[2]=q,x[3]=le,x[4]=pe,x[5]=B,x[6]=U,x[7]=K,x[8]=ne,x[9]=F,x[10]=j,x[11]=z,x[12]=$,x[13]=H,x[14]=k,x[15]=M}function m(x,O){g(x,O,O)}function w(x,O){const E=n();for(let p=0;p<16;p++)E[p]=O[p];for(let p=253;p>=0;p--)m(E,E),p!==2&&p!==4&&g(E,E,O);for(let p=0;p<16;p++)x[p]=E[p]}function v(x,O){const E=new Uint8Array(32),p=new Float64Array(80),I=n(),C=n(),L=n(),q=n(),le=n(),pe=n();for(let ne=0;ne<31;ne++)E[ne]=x[ne];E[31]=x[31]&127|64,E[0]&=248,u(p,O);for(let ne=0;ne<16;ne++)C[ne]=p[ne];I[0]=q[0]=1;for(let ne=254;ne>=0;--ne){const F=E[ne>>>3]>>>(ne&7)&1;s(I,C,F),s(L,q,F),f(le,I,L),d(I,I,L),f(L,C,q),d(C,C,q),m(q,le),m(pe,I),g(I,L,I),g(L,C,le),f(le,I,L),d(I,I,L),m(C,I),d(L,q,pe),g(I,L,a),f(I,I,q),g(L,L,I),g(I,q,pe),g(q,C,p),m(C,le),s(I,C,F),s(L,q,F)}for(let ne=0;ne<16;ne++)p[ne+16]=I[ne],p[ne+32]=L[ne],p[ne+48]=C[ne],p[ne+64]=q[ne];const B=p.subarray(32),U=p.subarray(16);w(B,B),g(U,U,B);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 O=new Uint8Array(x);return{publicKey:y(O),secretKey:O}}t.generateKeyPairFromSeed=_;function b(x){const O=(0,e.randomBytes)(32,x),E=_(O);return(0,r.wipe)(O),E}t.generateKeyPair=b;function S(x,O,E=!1){if(x.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(O.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const p=v(x,O);if(E){let I=0;for(let C=0;C<p.length;C++)I|=p[C];if(I===0)throw new Error("X25519: invalid shared key")}return p}t.sharedKey=S})(wk);function _k(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function Xae(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?_k(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function s5(t,e){e||(e=t.reduce((i,a)=>i+a.length,0));const r=Xae(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return _k(r)}function yDe(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 O=w[_],E=0,p=S-1;(O!==0||E<y)&&p!==-1;p--,E++)O+=256*x[p]>>>0,x[p]=O%s>>>0,O=O/s>>>0;if(O!==0)throw new Error("Non-zero carry");y=E,_++}for(var I=S-y;I!==S&&x[I]===0;)I++;for(var C=c.repeat(v);I<S;++I)C+=t.charAt(x[I]);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 O=0,E=b-1;(x!==0||O<_)&&E!==-1;E--,O++)x+=s*S[E]>>>0,S[E]=x%256>>>0,x=x/256>>>0;if(x!==0)throw new Error("Non-zero carry");_=O,v++}if(w[v]!==" "){for(var p=b-_;p!==b&&S[p]===0;)p++;for(var I=new Uint8Array(y+(b-p)),C=y;p!==b;)I[C++]=S[p++];return I}}}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 mDe=yDe,vDe=mDe;const bDe=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")},wDe=t=>new TextEncoder().encode(t),_De=t=>new TextDecoder().decode(t);class EDe{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 xDe{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 Zae(this,e)}}class ADe{constructor(e){this.decoders=e}or(e){return Zae(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 Zae=(t,e)=>new ADe({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class SDe{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new EDe(e,r,n),this.decoder=new xDe(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const oO=({name:t,prefix:e,encode:r,decode:n})=>new SDe(t,e,r,n),Pw=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=vDe(r,e);return oO({prefix:t,name:e,encode:n,decode:a=>bDe(i(a))})},ODe=(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},IDe=(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})=>oO({prefix:e,name:t,encode(i){return IDe(i,n,r)},decode(i){return ODe(i,n,r,t)}}),PDe=oO({prefix:"\0",name:"identity",encode:t=>_De(t),decode:t=>wDe(t)}),TDe=Object.freeze(Object.defineProperty({__proto__:null,identity:PDe},Symbol.toStringTag,{value:"Module"})),RDe=ba({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),CDe=Object.freeze(Object.defineProperty({__proto__:null,base2:RDe},Symbol.toStringTag,{value:"Module"})),NDe=ba({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),DDe=Object.freeze(Object.defineProperty({__proto__:null,base8:NDe},Symbol.toStringTag,{value:"Module"})),$De=Pw({prefix:"9",name:"base10",alphabet:"0123456789"}),MDe=Object.freeze(Object.defineProperty({__proto__:null,base10:$De},Symbol.toStringTag,{value:"Module"})),kDe=ba({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),LDe=ba({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),UDe=Object.freeze(Object.defineProperty({__proto__:null,base16:kDe,base16upper:LDe},Symbol.toStringTag,{value:"Module"})),BDe=ba({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),FDe=ba({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),jDe=ba({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),qDe=ba({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),HDe=ba({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),zDe=ba({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),VDe=ba({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),GDe=ba({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),WDe=ba({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),KDe=Object.freeze(Object.defineProperty({__proto__:null,base32:BDe,base32hex:HDe,base32hexpad:VDe,base32hexpadupper:GDe,base32hexupper:zDe,base32pad:jDe,base32padupper:qDe,base32upper:FDe,base32z:WDe},Symbol.toStringTag,{value:"Module"})),YDe=Pw({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),QDe=Pw({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),JDe=Object.freeze(Object.defineProperty({__proto__:null,base36:YDe,base36upper:QDe},Symbol.toStringTag,{value:"Module"})),XDe=Pw({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),ZDe=Pw({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),e$e=Object.freeze(Object.defineProperty({__proto__:null,base58btc:XDe,base58flickr:ZDe},Symbol.toStringTag,{value:"Module"})),t$e=ba({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),r$e=ba({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),n$e=ba({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),i$e=ba({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),a$e=Object.freeze(Object.defineProperty({__proto__:null,base64:t$e,base64pad:r$e,base64url:n$e,base64urlpad:i$e},Symbol.toStringTag,{value:"Module"})),eoe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),o$e=eoe.reduce((t,e,r)=>(t[r]=e,t),[]),s$e=eoe.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function c$e(t){return t.reduce((e,r)=>(e+=o$e[r],e),"")}function u$e(t){const e=[];for(const r of t){const n=s$e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const l$e=oO({prefix:"🚀",name:"base256emoji",encode:c$e,decode:u$e}),f$e=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:l$e},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const qW={...TDe,...CDe,...DDe,...MDe,...UDe,...KDe,...JDe,...e$e,...a$e,...f$e};function toe(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const HW=toe("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),hN=toe("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=Xae(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),roe={utf8:HW,"utf-8":HW,hex:qW.base16,latin1:hN,ascii:hN,binary:hN,...qW};function Co(t,e="utf8"){const r=roe[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 co(t,e="utf8"){const r=roe[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 zW=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))},d$e=function(){function t(e,r,n){this.name=e,this.version=r,this.os=n,this.type="browser"}return t}(),h$e=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=Ha.platform}return t}(),p$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}(),g$e=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),y$e=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),m$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)/,VW=3,b$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",m$e]],GW=[["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 w$e(t){return t?WW(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new y$e:typeof navigator<"u"?WW(navigator.userAgent):x$e()}function _$e(t){return t!==""&&b$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 WW(t){var e=_$e(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new g$e;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<VW&&(i=zW(zW([],i,!0),A$e(VW-i.length),!0)):i=[];var a=i.join("."),o=E$e(t),s=v$e.exec(t);return s&&s[1]?new p$e(r,a,o,s[1]):new d$e(r,a,o)}function E$e(t){for(var e=0,r=GW.length;e<r;e++){var n=GW[e],i=n[0],a=n[1],o=a.exec(t);if(o)return i}return null}function x$e(){var t=typeof Ha<"u"&&Ha.version;return t?new h$e(Ha.version.slice(1)):null}function A$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 c5=function(t,e){return c5=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])},c5(t,e)};function S$e(t,e){c5(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var u5=function(){return u5=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},u5.apply(this,arguments)};function O$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 I$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 P$e(t,e){return function(r,n){e(r,n,t)}}function T$e(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function R$e(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 C$e(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 N$e(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function D$e(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function l5(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 noe(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 $$e(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(noe(arguments[e]));return t}function M$e(){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 A1(t){return this instanceof A1?(this.v=t,this):new A1(t)}function k$e(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 A1?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 L$e(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:A1(t[i](o)),done:i==="return"}:a?a(o):o}:a}}function U$e(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 l5=="function"?l5(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 B$e(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function F$e(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 j$e(t){return t&&t.__esModule?t:{default:t}}function q$e(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function H$e(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 z$e=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return u5},__asyncDelegator:L$e,__asyncGenerator:k$e,__asyncValues:U$e,__await:A1,__awaiter:R$e,__classPrivateFieldGet:q$e,__classPrivateFieldSet:H$e,__createBinding:N$e,__decorate:I$e,__exportStar:D$e,__extends:S$e,__generator:C$e,__importDefault:j$e,__importStar:F$e,__makeTemplateObject:B$e,__metadata:T$e,__param:P$e,__read:noe,__rest:O$e,__spread:$$e,__spreadArrays:M$e,__values:l5},Symbol.toStringTag,{value:"Module"})),Xs=uo(z$e);var pN={},Av={},KW;function V$e(){if(KW)return Av;KW=1,Object.defineProperty(Av,"__esModule",{value:!0}),Av.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return Av.delay=t,Av}var Zd={},gN={},eh={},YW;function G$e(){return YW||(YW=1,Object.defineProperty(eh,"__esModule",{value:!0}),eh.ONE_THOUSAND=eh.ONE_HUNDRED=void 0,eh.ONE_HUNDRED=100,eh.ONE_THOUSAND=1e3),eh}var yN={},QW;function W$e(){return QW||(QW=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}(yN)),yN}var JW;function ioe(){return JW||(JW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Xs;e.__exportStar(G$e(),t),e.__exportStar(W$e(),t)}(gN)),gN}var XW;function K$e(){if(XW)return Zd;XW=1,Object.defineProperty(Zd,"__esModule",{value:!0}),Zd.fromMiliseconds=Zd.toMiliseconds=void 0;const t=ioe();function e(n){return n*t.ONE_THOUSAND}Zd.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return Zd.fromMiliseconds=r,Zd}var ZW;function Y$e(){return ZW||(ZW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Xs;e.__exportStar(V$e(),t),e.__exportStar(K$e(),t)}(pN)),pN}var y0={},eK;function Q$e(){if(eK)return y0;eK=1,Object.defineProperty(y0,"__esModule",{value:!0}),y0.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 y0.Watch=t,y0.default=t,y0}var mN={},Sv={},tK;function J$e(){if(tK)return Sv;tK=1,Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.IWatch=void 0;class t{}return Sv.IWatch=t,Sv}var rK;function X$e(){return rK||(rK=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Xs.__exportStar(J$e(),t)}(mN)),mN}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Xs;e.__exportStar(Y$e(),t),e.__exportStar(Q$e(),t),e.__exportStar(X$e(),t),e.__exportStar(ioe(),t)})(Xt);var qn={};Object.defineProperty(qn,"__esModule",{value:!0});qn.getLocalStorage=qn.getLocalStorageOrThrow=qn.getCrypto=qn.getCryptoOrThrow=ooe=qn.getLocation=qn.getLocationOrThrow=Ek=qn.getNavigator=qn.getNavigatorOrThrow=aoe=qn.getDocument=qn.getDocumentOrThrow=qn.getFromWindowOrThrow=qn.getFromWindow=void 0;function Pp(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}qn.getFromWindow=Pp;function am(t){const e=Pp(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}qn.getFromWindowOrThrow=am;function Z$e(){return am("document")}qn.getDocumentOrThrow=Z$e;function eMe(){return Pp("document")}var aoe=qn.getDocument=eMe;function tMe(){return am("navigator")}qn.getNavigatorOrThrow=tMe;function rMe(){return Pp("navigator")}var Ek=qn.getNavigator=rMe;function nMe(){return am("location")}qn.getLocationOrThrow=nMe;function iMe(){return Pp("location")}var ooe=qn.getLocation=iMe;function aMe(){return am("crypto")}qn.getCryptoOrThrow=aMe;function oMe(){return Pp("crypto")}qn.getCrypto=oMe;function sMe(){return am("localStorage")}qn.getLocalStorageOrThrow=sMe;function cMe(){return Pp("localStorage")}qn.getLocalStorage=cMe;var xk={};Object.defineProperty(xk,"__esModule",{value:!0});var soe=xk.getWindowMetadata=void 0;const nK=qn;function uMe(){let t,e;try{t=nK.getDocumentOrThrow(),e=nK.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}}soe=xk.getWindowMetadata=uMe;var S1={},lMe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),coe="%[a-f0-9]{2}",iK=new RegExp("("+coe+")|([^%]+?)","gi"),aK=new RegExp("("+coe+")+","gi");function f5(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([],f5(r),f5(n))}function fMe(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(iK)||[],r=1;r<e.length;r++)t=f5(e,r).join(""),e=t.match(iK)||[];return t}}function dMe(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},r=aK.exec(t);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch{var n=fMe(r[0]);n!==r[0]&&(e[r[0]]=n)}r=aK.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 hMe=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 dMe(t)}},pMe=(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)]},gMe=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=lMe,r=hMe,n=pMe,i=gMe,a=b=>b==null,o=Symbol("encodeFragmentIdentifier");function s(b){switch(b.arrayFormat){case"index":return S=>(x,O)=>{const E=x.length;return O===void 0||b.skipNull&&O===null||b.skipEmptyString&&O===""?x:O===null?[...x,[f(S,b),"[",E,"]"].join("")]:[...x,[f(S,b),"[",f(E,b),"]=",f(O,b)].join("")]};case"bracket":return S=>(x,O)=>O===void 0||b.skipNull&&O===null||b.skipEmptyString&&O===""?x:O===null?[...x,[f(S,b),"[]"].join("")]:[...x,[f(S,b),"[]=",f(O,b)].join("")];case"colon-list-separator":return S=>(x,O)=>O===void 0||b.skipNull&&O===null||b.skipEmptyString&&O===""?x:O===null?[...x,[f(S,b),":list="].join("")]:[...x,[f(S,b),":list=",f(O,b)].join("")];case"comma":case"separator":case"bracket-separator":{const S=b.arrayFormat==="bracket-separator"?"[]=":"=";return x=>(O,E)=>E===void 0||b.skipNull&&E===null||b.skipEmptyString&&E===""?O:(E=E===null?"":E,O.length===0?[[f(x,b),S,f(E,b)].join("")]:[[O,f(E,b)].join(b.arrayFormatSeparator)])}default:return S=>(x,O)=>O===void 0||b.skipNull&&O===null||b.skipEmptyString&&O===""?x:O===null?[...x,f(S,b)]:[...x,[f(S,b),"=",f(O,b)].join("")]}}function c(b){let S;switch(b.arrayFormat){case"index":return(x,O,E)=>{if(S=/\[(\d*)\]$/.exec(x),x=x.replace(/\[\d*\]$/,""),!S){E[x]=O;return}E[x]===void 0&&(E[x]={}),E[x][S[1]]=O};case"bracket":return(x,O,E)=>{if(S=/(\[\])$/.exec(x),x=x.replace(/\[\]$/,""),!S){E[x]=O;return}if(E[x]===void 0){E[x]=[O];return}E[x]=[].concat(E[x],O)};case"colon-list-separator":return(x,O,E)=>{if(S=/(:list)$/.exec(x),x=x.replace(/:list$/,""),!S){E[x]=O;return}if(E[x]===void 0){E[x]=[O];return}E[x]=[].concat(E[x],O)};case"comma":case"separator":return(x,O,E)=>{const p=typeof O=="string"&&O.includes(b.arrayFormatSeparator),I=typeof O=="string"&&!p&&d(O,b).includes(b.arrayFormatSeparator);O=I?d(O,b):O;const C=p||I?O.split(b.arrayFormatSeparator).map(L=>d(L,b)):O===null?O:d(O,b);E[x]=C};case"bracket-separator":return(x,O,E)=>{const p=/(\[\])$/.test(x);if(x=x.replace(/\[\]$/,""),!p){E[x]=O&&d(O,b);return}const I=O===null?[]:O.split(b.arrayFormatSeparator).map(C=>d(C,b));if(E[x]===void 0){E[x]=I;return}E[x]=[].concat(E[x],I)};default:return(x,O,E)=>{if(E[x]===void 0){E[x]=O;return}E[x]=[].concat(E[x],O)}}}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),O=Object.create(null);if(typeof b!="string"||(b=b.trim().replace(/^[?#&]/,""),!b))return O;for(const E of b.split("&")){if(E==="")continue;let[p,I]=n(S.decode?E.replace(/\+/g," "):E,"=");I=I===void 0?null:["comma","separator","bracket-separator"].includes(S.arrayFormat)?I:d(I,S),x(d(p,S),I,O)}for(const E of Object.keys(O)){const p=O[E];if(typeof p=="object"&&p!==null)for(const I of Object.keys(p))p[I]=y(p[I],S);else O[E]=y(p,S)}return S.sort===!1?O:(S.sort===!0?Object.keys(O).sort():Object.keys(O).sort(S.sort)).reduce((E,p)=>{const I=O[p];return I&&typeof I=="object"&&!Array.isArray(I)?E[p]=g(I):E[p]=I,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=I=>S.skipNull&&a(b[I])||S.skipEmptyString&&b[I]==="",O=s(S),E={};for(const I of Object.keys(b))x(I)||(E[I]=b[I]);const p=Object.keys(E);return S.sort!==!1&&p.sort(S.sort),p.map(I=>{const C=b[I];return C===void 0?"":C===null?f(I,S):Array.isArray(C)?C.length===0&&S.arrayFormat==="bracket-separator"?f(I,S)+"[]":C.reduce(O(I),[]).join("&"):f(I,S)+"="+f(C,S)}).filter(I=>I.length>0).join("&")},t.parseUrl=(b,S)=>{S=Object.assign({decode:!0},S);const[x,O]=n(b,"#");return Object.assign({url:x.split("?")[0]||"",query:_(v(b),S)},S&&S.parseFragmentIdentifier&&O?{fragmentIdentifier:d(O,S)}:{})},t.stringifyUrl=(b,S)=>{S=Object.assign({encode:!0,strict:!0,[o]:!0},S);const x=m(b.url).split("?")[0]||"",O=t.extract(b.url),E=t.parse(O,{sort:!1}),p=Object.assign(E,b.query);let I=t.stringify(p,S);I&&(I=`?${I}`);let C=w(b.url);return b.fragmentIdentifier&&(C=`#${S[o]?f(b.fragmentIdentifier,S):b.fragmentIdentifier}`),`${x}${I}${C}`},t.pick=(b,S,x)=>{x=Object.assign({parseFragmentIdentifier:!0,[o]:!1},x);const{url:O,query:E,fragmentIdentifier:p}=t.parseUrl(b,x);return t.stringifyUrl({url:O,query:i(E,S),fragmentIdentifier:p},x)},t.exclude=(b,S,x)=>{const O=Array.isArray(S)?E=>!S.includes(E):(E,p)=>!S(E,p);return t.pick(b,O,x)}})(S1);const yMe={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"}},mMe=":";function vMe(t){const[e,r]=t.split(mMe);return{namespace:e,reference:r}}function bMe(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 uoe(t,e){return t.includes(":")?[t]:e.chains||[]}const loe="base10",so="base16",d5="base64pad",Ak="utf8",foe=0,Tp=1,wMe=0,oK=1,h5=12,Sk=32;function _Me(){const t=wk.generateKeyPair();return{privateKey:co(t.secretKey,so),publicKey:co(t.publicKey,so)}}function p5(){const t=im.randomBytes(Sk);return co(t,so)}function EMe(t,e){const r=wk.sharedKey(Co(t,so),Co(e,so),!0),n=new uDe(aO.SHA256,r).expand(Sk);return co(n,so)}function xMe(t){const e=aO.hash(Co(t,so));return co(e,so)}function hg(t){const e=aO.hash(Co(t,Ak));return co(e,so)}function AMe(t){return Co(`${t}`,loe)}function Tw(t){return Number(co(t,loe))}function SMe(t){const e=AMe(typeof t.type<"u"?t.type:foe);if(Tw(e)===Tp&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?Co(t.senderPublicKey,so):void 0,n=typeof t.iv<"u"?Co(t.iv,so):im.randomBytes(h5),i=new vk.ChaCha20Poly1305(Co(t.symKey,so)).seal(n,Co(t.message,Ak));return IMe({type:e,sealed:i,iv:n,senderPublicKey:r})}function OMe(t){const e=new vk.ChaCha20Poly1305(Co(t.symKey,so)),{sealed:r,iv:n}=FA(t.encoded),i=e.open(n,r);if(i===null)throw new Error("Failed to decrypt");return co(i,Ak)}function IMe(t){if(Tw(t.type)===Tp){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return co(s5([t.type,t.senderPublicKey,t.iv,t.sealed]),d5)}return co(s5([t.type,t.iv,t.sealed]),d5)}function FA(t){const e=Co(t,d5),r=e.slice(wMe,oK),n=oK;if(Tw(r)===Tp){const s=n+Sk,c=s+h5,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+h5,a=e.slice(n,i),o=e.slice(i);return{type:r,sealed:o,iv:a}}function PMe(t,e){const r=FA(t);return doe({type:Tw(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?co(r.senderPublicKey,so):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function doe(t){const e=(t==null?void 0:t.type)||foe;if(e===Tp){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 sK(t){return t.type===Tp&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var TMe=Object.defineProperty,cK=Object.getOwnPropertySymbols,RMe=Object.prototype.hasOwnProperty,CMe=Object.prototype.propertyIsEnumerable,uK=(t,e,r)=>e in t?TMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,lK=(t,e)=>{for(var r in e||(e={}))RMe.call(e,r)&&uK(t,r,e[r]);if(cK)for(var r of cK(e))CMe.call(e,r)&&uK(t,r,e[r]);return t};const NMe="ReactNative",Xo={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},DMe="js";function Ok(){return typeof Ha<"u"&&typeof Ha.versions<"u"&&typeof Ha.versions.node<"u"}function Rw(){return!aoe()&&!!Ek()&&navigator.product===NMe}function Cw(){return!Ok()&&!!Ek()}function Nw(){return Rw()?Xo.reactNative:Ok()?Xo.node:Cw()?Xo.browser:Xo.unknown}function $Me(t,e){let r=S1.parse(t);return r=lK(lK({},r),e),t=S1.stringify(r),t}function MMe(){return soe()||{name:"",description:"",url:"",icons:[""]}}function kMe(){if(Nw()===Xo.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=w$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 LMe(){var t;const e=Nw();return e===Xo.browser?[e,((t=ooe())==null?void 0:t.host)||"unknown"].join(":"):e}function UMe(t,e,r){const n=kMe(),i=LMe();return[[t,e].join("-"),[DMe,r].join("-"),n,i].join("/")}function BMe({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:a,useOnCloseEvent:o}){const s=r.split("?"),c=UMe(t,e,n),u={auth:i,ua:c,projectId:a,useOnCloseEvent:o||void 0},f=$Me(s[1]||"",u);return s[0]+"?"+f}function xh(t,e){return t.filter(r=>e.includes(r)).length===t.length}function hoe(t){return Object.fromEntries(t.entries())}function poe(t){return new Map(Object.entries(t))}function T0(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 O1(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 goe(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 FMe(t){return goe("topic",t)}function jMe(t){return goe("id",t)}function yoe(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 wc(t,e){return Xt.fromMiliseconds((e||Date.now())+Xt.toMiliseconds(t))}function _f(t){return Date.now()>=Xt.toMiliseconds(t)}function Ti(t,e){return`${t}${e?`:${e}`:""}`}function vN(t=[],e=[]){return[...new Set([...t,...e])]}async function qMe({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=Nw();o===Xo.browser?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):o===Xo.reactNative&&typeof(bn==null?void 0:bn.Linking)<"u"&&await bn.Linking.openURL(a)}catch(n){console.error(n)}}const HMe="irn";function g5(t){return(t==null?void 0:t.relay)||{protocol:HMe}}function Sx(t){const e=yMe[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var zMe=Object.defineProperty,fK=Object.getOwnPropertySymbols,VMe=Object.prototype.hasOwnProperty,GMe=Object.prototype.propertyIsEnumerable,dK=(t,e,r)=>e in t?zMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,WMe=(t,e)=>{for(var r in e||(e={}))VMe.call(e,r)&&dK(t,r,e[r]);if(fK)for(var r of fK(e))GMe.call(e,r)&&dK(t,r,e[r]);return t};function KMe(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 YMe(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=S1.parse(a);return{protocol:n,topic:QMe(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:KMe(o)}}function QMe(t){return t.startsWith("//")?t.substring(2):t}function JMe(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 XMe(t){return`${t.protocol}:${t.topic}@${t.version}?`+S1.stringify(WMe({symKey:t.symKey},JMe(t.relay)))}function om(t){const e=[];return t.forEach(r=>{const[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function ZMe(t){const e=[];return Object.values(t).forEach(r=>{e.push(...om(r.accounts))}),e}function eke(t,e){const r=[];return Object.values(t).forEach(n=>{om(n.accounts).includes(e)&&r.push(...n.methods)}),r}function tke(t,e){const r=[];return Object.values(t).forEach(n=>{om(n.accounts).includes(e)&&r.push(...n.events)}),r}function rke(t,e){const r=Ox(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 Ik(t){return t.includes(":")}function hb(t){return Ik(t)?t.split(":")[0]:t}const nke={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}},ike={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}=ike[t];return{message:e?`${r} ${e}`:r,code:n}}function Ei(t,e){const{message:r,code:n}=nke[t];return{message:e?`${r} ${e}`:r,code:n}}function Eu(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function pg(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function ro(t){return typeof t>"u"}function Qi(t,e){return e&&ro(t)?!0:typeof t=="string"&&!!t.trim().length}function Pk(t,e){return e&&ro(t)?!0:typeof t=="number"&&!isNaN(t)}function ake(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let a=!0;return xh(i,n)?(n.forEach(o=>{const{accounts:s,methods:c,events:u}=t.namespaces[o],f=om(s),d=r[o];(!xh(uoe(o,d),f)||!xh(d.methods,c)||!xh(d.events,u))&&(a=!1)}),a):!1}function jA(t){return Qi(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function oke(t){if(Qi(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&jA(r)}}return!1}function ske(t){if(Qi(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function cke(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function uke(t){return t==null?void 0:t.topic}function lke(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 hK(t){let e=!0;return Eu(t)?t.length&&(e=t.every(r=>Qi(r,!1))):e=!1,e}function fke(t,e,r){let n=null;return Eu(e)&&e.length?e.forEach(i=>{n||jA(i)||(n=Ei("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):jA(t)||(n=Ei("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 dke(t,e,r){let n=null;return Object.entries(t).forEach(([i,a])=>{if(n)return;const o=fke(i,uoe(i,a),`${e} ${r}`);o&&(n=o)}),n}function hke(t,e){let r=null;return Eu(t)?t.forEach(n=>{r||oke(n)||(r=Ei("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=Ei("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function pke(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=hke(n==null?void 0:n.accounts,`${e} namespace`);i&&(r=i)}),r}function gke(t,e){let r=null;return hK(t==null?void 0:t.methods)?hK(t==null?void 0:t.events)||(r=Ei("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=Ei("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function moe(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=gke(n,`${e}, namespace`);i&&(r=i)}),r}function yke(t,e,r){let n=null;if(t&&pg(t)){const i=moe(t,e);i&&(n=i);const a=dke(t,e,r);a&&(n=a)}else n=Tt("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function Ox(t,e){let r=null;if(t&&pg(t)){const n=moe(t,e);n&&(r=n);const i=pke(t,e);i&&(r=i)}else r=Tt("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function voe(t){return Qi(t.protocol,!0)}function mke(t,e){let r=!1;return e&&!t?r=!0:t&&Eu(t)&&t.length&&t.forEach(n=>{r=voe(n)}),r}function vke(t){return typeof t=="number"}function _o(t){return typeof t<"u"&&typeof t!==null}function bke(t){return!(!t||typeof t!="object"||!t.code||!Pk(t.code,!1)||!t.message||!Qi(t.message,!1))}function wke(t){return!(ro(t)||!Qi(t.method,!1))}function _ke(t){return!(ro(t)||ro(t.result)&&ro(t.error)||!Pk(t.id,!1)||!Qi(t.jsonrpc,!1))}function Eke(t){return!(ro(t)||!Qi(t.name,!1))}function pK(t,e){return!(!jA(e)||!ZMe(t).includes(e))}function xke(t,e,r){return Qi(r,!1)?eke(t,e).includes(r):!1}function Ake(t,e,r){return Qi(r,!1)?tke(t,e).includes(r):!1}function gK(t,e,r){let n=null;const i=Ske(t),a=Oke(e),o=Object.keys(i),s=Object.keys(a),c=yK(Object.keys(t)),u=yK(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()}`)),xh(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=om(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||(xh(i[d].methods,a[d].methods)?xh(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 Ske(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 yK(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function Oke(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=om(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 Ike(t,e){return Pk(t,!1)&&t<=e.max&&t>=e.min}function mK(){const t=Nw();return new Promise(e=>{switch(t){case Xo.browser:e(Pke());break;case Xo.reactNative:e(Tke());break;case Xo.node:e(Rke());break;default:e(!0)}})}function Pke(){return Cw()&&(navigator==null?void 0:navigator.onLine)}async function Tke(){if(Rw()&&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 Rke(){return!0}function Cke(t){switch(Nw()){case Xo.browser:Nke(t);break;case Xo.reactNative:Dke(t);break}}function Nke(t){!Rw()&&Cw()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}function Dke(t){Rw()&&typeof bn<"u"&&bn!=null&&bn.NetInfo&&(bn==null||bn.NetInfo.addEventListener(e=>t(e==null?void 0:e.isConnected)))}const bN={};let yE=class{static get(e){return bN[e]}static set(e,r){bN[e]=r}static delete(e){delete bN[e]}};var sO={},Dw={};Object.defineProperty(Dw,"__esModule",{value:!0});function $ke(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}}Dw.safeJsonParse=$ke;function Mke(t){return typeof t=="string"?t:JSON.stringify(t,(e,r)=>typeof r>"u"?null:r)}Dw.safeJsonStringify=Mke;var Ov={exports:{}},vK;function kke(){return vK||(vK=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?Ov.exports=Ne.localStorage:typeof window<"u"&&window.localStorage?Ov.exports=window.localStorage:Ov.exports=new e}()),Ov.exports}var wN={},Iv={},bK;function Lke(){if(bK)return Iv;bK=1,Object.defineProperty(Iv,"__esModule",{value:!0}),Iv.IKeyValueStorage=void 0;class t{}return Iv.IKeyValueStorage=t,Iv}var Pv={},wK;function Uke(){if(wK)return Pv;wK=1,Object.defineProperty(Pv,"__esModule",{value:!0}),Pv.parseEntry=void 0;const t=Dw;function e(r){var n;return[r[0],t.safeJsonParse((n=r[1])!==null&&n!==void 0?n:"")]}return Pv.parseEntry=e,Pv}var _K;function Bke(){return _K||(_K=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Xs;e.__exportStar(Lke(),t),e.__exportStar(Uke(),t)}(wN)),wN}Object.defineProperty(sO,"__esModule",{value:!0});sO.KeyValueStorage=void 0;const R0=Xs,EK=Dw,Fke=R0.__importDefault(kke()),jke=Bke();class boe{constructor(){this.localStorage=Fke.default}getKeys(){return R0.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return R0.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(jke.parseEntry)})}getItem(e){return R0.__awaiter(this,void 0,void 0,function*(){const r=this.localStorage.getItem(e);if(r!==null)return EK.safeJsonParse(r)})}setItem(e,r){return R0.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(e,EK.safeJsonStringify(r))})}removeItem(e){return R0.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(e)})}}sO.KeyValueStorage=boe;var qke=sO.default=boe,sm={},Tv={},_N={},Rv={};let Rp=class{};const Hke=Object.freeze(Object.defineProperty({__proto__:null,IEvents:Rp},Symbol.toStringTag,{value:"Module"})),zke=uo(Hke);var xK;function Vke(){if(xK)return Rv;xK=1,Object.defineProperty(Rv,"__esModule",{value:!0}),Rv.IHeartBeat=void 0;const t=zke;class e extends t.IEvents{constructor(n){super()}}return Rv.IHeartBeat=e,Rv}var AK;function woe(){return AK||(AK=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Xs.__exportStar(Vke(),t)}(_N)),_N}var EN={},th={},SK;function Gke(){if(SK)return th;SK=1,Object.defineProperty(th,"__esModule",{value:!0}),th.HEARTBEAT_EVENTS=th.HEARTBEAT_INTERVAL=void 0;const t=Xt;return th.HEARTBEAT_INTERVAL=t.FIVE_SECONDS,th.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},th}var OK;function _oe(){return OK||(OK=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Xs.__exportStar(Gke(),t)}(EN)),EN}var IK;function Wke(){if(IK)return Tv;IK=1,Object.defineProperty(Tv,"__esModule",{value:!0}),Tv.HeartBeat=void 0;const t=Xs,e=fo,r=Xt,n=woe(),i=_oe();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 Tv.HeartBeat=a,Tv}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Xs;e.__exportStar(Wke(),t),e.__exportStar(woe(),t),e.__exportStar(_oe(),t)})(sm);var un={},xN,PK;function Kke(){if(PK)return xN;PK=1;function t(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}xN=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 xN}var AN,TK;function Yke(){if(TK)return AN;TK=1;const t=Kke();AN=i;const e=O().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 I=E.browser.write||e;E.browser.write&&(E.browser.asObject=!0);const C=E.serializers||{},L=n(E.browser.serialize,C);let q=E.browser.serialize;Array.isArray(E.browser.serialize)&&E.browser.serialize.indexOf("!stdSerializers.err")>-1&&(q=!1);const le=["error","fatal","warn","info","debug","trace"];typeof I=="function"&&(I.error=I.fatal=I.warn=I.info=I.debug=I.trace=I),E.enabled===!1&&(E.level="silent");const pe=E.level||"info",B=Object.create(I);B.log||(B.log=y),Object.defineProperty(B,"levelVal",{get:K}),Object.defineProperty(B,"level",{get:ne,set:F});const U={transmit:p,serialize:L,asObject:E.browser.asObject,levels:le,timestamp:m(E)};B.levels=i.levels,B.level=pe,B.setMaxListeners=B.getMaxListeners=B.emit=B.addListener=B.on=B.prependListener=B.once=B.prependOnceListener=B.removeListener=B.removeAllListeners=B.listeners=B.listenerCount=B.eventNames=B.write=B.flush=y,B.serializers=C,B._serialize=L,B._stdErrSerialize=q,B.child=j,p&&(B._logEvent=d());function K(){return this.level==="silent"?1/0:this.levels.values[this.level]}function ne(){return this._level}function F(z){if(z!=="silent"&&!this.levels.values[z])throw Error("unknown level "+z);this._level=z,a(U,B,"error","log"),a(U,B,"fatal","error"),a(U,B,"warn","error"),a(U,B,"info","log"),a(U,B,"debug","log"),a(U,B,"trace","log")}function j(z,$){if(!z)throw new Error("missing bindings for child Pino");$=$||{},L&&z.serializers&&($.serializers=z.serializers);const H=$.serializers;if(L&&H){var k=Object.assign({},C,H),M=E.browser.serialize===!0?Object.keys(k):L;delete z.serializers,c([z],M,k,this._stdErrSerialize)}function G(ge){this._childLevel=(ge._childLevel|0)+1,this.error=u(ge,z,"error"),this.fatal=u(ge,z,"fatal"),this.warn=u(ge,z,"warn"),this.info=u(ge,z,"info"),this.debug=u(ge,z,"debug"),this.trace=u(ge,z,"trace"),k&&(this.serializers=k,this._serialize=M),p&&(this._logEvent=d([].concat(ge._logEvent.bindings,z)))}return G.prototype=this,new G(this)}return B}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,I,C){const L=Object.getPrototypeOf(p);p[I]=p.levelVal>p.levels.values[I]?y:L[I]?L[I]:e[I]||e[C]||y,o(E,p,I)}function o(E,p,I){!E.transmit&&p[I]===y||(p[I]=function(C){return function(){const q=E.timestamp(),le=new Array(arguments.length),pe=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var B=0;B<le.length;B++)le[B]=arguments[B];if(E.serialize&&!E.asObject&&c(le,this._serialize,this.serializers,this._stdErrSerialize),E.asObject?C.call(pe,s(this,I,le,q)):C.apply(pe,le),E.transmit){const U=E.transmit.level||p.level,K=i.levels.values[U],ne=i.levels.values[I];if(ne<K)return;f(this,{ts:q,methodLevel:I,methodValue:ne,transmitLevel:U,transmitValue:i.levels.values[E.transmit.level||p.level],send:E.transmit.send,val:p.levelVal},le)}}}(p[I]))}function s(E,p,I,C){E._serialize&&c(I,E._serialize,E.serializers,E._stdErrSerialize);const L=I.slice();let q=L[0];const le={};C&&(le.time=C),le.level=i.levels.values[p];let pe=(E._childLevel|0)+1;if(pe<1&&(pe=1),q!==null&&typeof q=="object"){for(;pe--&&typeof L[0]=="object";)Object.assign(le,L.shift());q=L.length?t(L.shift(),L):void 0}else typeof q=="string"&&(q=t(L.shift(),L));return q!==void 0&&(le.msg=q),le}function c(E,p,I,C){for(const L in E)if(C&&E[L]instanceof Error)E[L]=i.stdSerializers.err(E[L]);else if(typeof E[L]=="object"&&!Array.isArray(E[L]))for(const q in E[L])p&&p.indexOf(q)>-1&&q in I&&(E[L][q]=I[q](E[L][q]))}function u(E,p,I){return function(){const C=new Array(1+arguments.length);C[0]=p;for(var L=1;L<C.length;L++)C[L]=arguments[L-1];return E[I].apply(this,C)}}function f(E,p,I){const C=p.send,L=p.ts,q=p.methodLevel,le=p.methodValue,pe=p.val,B=E._logEvent.bindings;c(I,E._serialize||Object.keys(E.serializers),E.serializers,E._stdErrSerialize===void 0?!0:E._stdErrSerialize),E._logEvent.ts=L,E._logEvent.messages=I.filter(function(U){return B.indexOf(U)===-1}),E._logEvent.level.label=q,E._logEvent.level.value=le,C(q,E._logEvent,pe),E._logEvent=d(B)}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 I in E)p[I]===void 0&&(p[I]=E[I]);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 O(){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 AN}var rh={},RK;function Eoe(){return RK||(RK=1,Object.defineProperty(rh,"__esModule",{value:!0}),rh.PINO_CUSTOM_CONTEXT_KEY=rh.PINO_LOGGER_DEFAULTS=void 0,rh.PINO_LOGGER_DEFAULTS={level:"info"},rh.PINO_CUSTOM_CONTEXT_KEY="custom_context"),rh}var Qa={},CK;function Qke(){if(CK)return Qa;CK=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.generateChildLogger=Qa.formatChildLoggerContext=Qa.getLoggerContext=Qa.setBrowserLoggerContext=Qa.getBrowserLoggerContext=Qa.getDefaultLoggerOptions=void 0;const t=Eoe();function e(s){return Object.assign(Object.assign({},s),{level:(s==null?void 0:s.level)||t.PINO_LOGGER_DEFAULTS.level})}Qa.getDefaultLoggerOptions=e;function r(s,c=t.PINO_CUSTOM_CONTEXT_KEY){return s[c]||""}Qa.getBrowserLoggerContext=r;function n(s,c,u=t.PINO_CUSTOM_CONTEXT_KEY){return s[u]=c,s}Qa.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}Qa.getLoggerContext=i;function a(s,c,u=t.PINO_CUSTOM_CONTEXT_KEY){const f=i(s,u);return f.trim()?`${f}/${c}`:c}Qa.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 Qa.generateChildLogger=o,Qa}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const e=Xs,r=e.__importDefault(Yke());Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return r.default}}),e.__exportStar(Eoe(),t),e.__exportStar(Qke(),t)})(un);class Jke extends Rp{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}let Xke=class extends Rp{constructor(e,r){super(),this.core=e,this.logger=r,this.records=new Map}};class Zke{constructor(e,r){this.logger=e,this.core=r}}let eLe=class extends Rp{constructor(e,r){super(),this.relayer=e,this.logger=r}},tLe=class extends Rp{constructor(e){super()}},rLe=class{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}};class nLe extends Rp{constructor(e,r){super(),this.relayer=e,this.logger=r}}let iLe=class extends Rp{constructor(e,r){super(),this.core=e,this.logger=r}},aLe=class{constructor(e,r){this.projectId=e,this.logger=r}},oLe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},sLe=class{constructor(e){this.client=e}};const cLe=t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString()+"n":r),uLe=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 Tk(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return uLe(t)}catch{return t}}function I1(t){return typeof t=="string"?t:cLe(t)||""}var Rk={},xoe={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=kr,r=is;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],O=u[7],E=f[0],p=f[1],I=f[2],C=f[3],L=f[4],q=f[5],le=f[6],pe=f[7],B,U,K,ne,F,j,z,$;m>=128;){for(var H=0;H<16;H++){var k=8*H+g;s[H]=e.readUint32BE(d,k),c[H]=e.readUint32BE(d,k+4)}for(var H=0;H<80;H++){var M=w,G=v,ge=y,Q=_,te=b,ce=S,T=x,fe=O,ze=E,tt=p,mt=I,vt=C,gt=L,Lt=q,Yt=le,wr=pe;if(B=O,U=pe,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=(b>>>14|L<<32-14)^(b>>>18|L<<32-18)^(L>>>41-32|b<<32-(41-32)),U=(L>>>14|b<<32-14)^(L>>>18|b<<32-18)^(b>>>41-32|L<<32-(41-32)),F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,B=b&S^~b&x,U=L&q^~L&le,F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,B=i[H*2],U=i[H*2+1],F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,B=s[H%16],U=c[H%16],F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,K=z&65535|$<<16,ne=F&65535|j<<16,B=K,U=ne,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=(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)),F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,B=w&v^w&y^v&y,U=E&p^E&I^p&I,F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,fe=z&65535|$<<16,wr=F&65535|j<<16,B=Q,U=vt,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=K,U=ne,F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,Q=z&65535|$<<16,vt=F&65535|j<<16,v=M,y=G,_=ge,b=Q,S=te,x=ce,O=T,w=fe,p=ze,I=tt,C=mt,L=vt,q=gt,le=Lt,pe=Yt,E=wr,H%16===15)for(var k=0;k<16;k++)B=s[k],U=c[k],F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=s[(k+9)%16],U=c[(k+9)%16],F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,K=s[(k+1)%16],ne=c[(k+1)%16],B=(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),F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,K=s[(k+14)%16],ne=c[(k+14)%16],B=(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),F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,s[k]=z&65535|$<<16,c[k]=F&65535|j<<16}B=w,U=E,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=u[0],U=f[0],F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,u[0]=w=z&65535|$<<16,f[0]=E=F&65535|j<<16,B=v,U=p,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=u[1],U=f[1],F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,u[1]=v=z&65535|$<<16,f[1]=p=F&65535|j<<16,B=y,U=I,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=u[2],U=f[2],F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,u[2]=y=z&65535|$<<16,f[2]=I=F&65535|j<<16,B=_,U=C,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=u[3],U=f[3],F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,u[3]=_=z&65535|$<<16,f[3]=C=F&65535|j<<16,B=b,U=L,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=u[4],U=f[4],F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,u[4]=b=z&65535|$<<16,f[4]=L=F&65535|j<<16,B=S,U=q,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=u[5],U=f[5],F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,u[5]=S=z&65535|$<<16,f[5]=q=F&65535|j<<16,B=x,U=le,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=u[6],U=f[6],F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,u[6]=x=z&65535|$<<16,f[6]=le=F&65535|j<<16,B=O,U=pe,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=u[7],U=f[7],F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,j+=F>>>16,z+=j>>>16,$+=z>>>16,u[7]=O=z&65535|$<<16,f[7]=pe=F&65535|j<<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})(xoe);(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=im,r=xoe,n=is;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 ce=0;ce<Q.length;ce++)te[ce]=Q[ce];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 ce=0;ce<16;ce++)Q[ce]=te[ce]|0}function w(Q){let te=1;for(let ce=0;ce<16;ce++){let T=Q[ce]+te+65535;te=Math.floor(T/65536),Q[ce]=T-te*65536}Q[0]+=te-1+37*(te-1)}function v(Q,te,ce){const T=~(ce-1);for(let fe=0;fe<16;fe++){const ze=T&(Q[fe]^te[fe]);Q[fe]^=ze,te[fe]^=ze}}function y(Q,te){const ce=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++){ce[0]=T[0]-65517;for(let tt=1;tt<15;tt++)ce[tt]=T[tt]-65535-(ce[tt-1]>>16&1),ce[tt-1]&=65535;ce[15]=T[15]-32767-(ce[14]>>16&1);const ze=ce[15]>>16&1;ce[14]&=65535,v(T,ce,1-ze)}for(let fe=0;fe<16;fe++)Q[2*fe]=T[fe]&255,Q[2*fe+1]=T[fe]>>8}function _(Q,te){let ce=0;for(let T=0;T<32;T++)ce|=Q[T]^te[T];return(1&ce-1>>>8)-1}function b(Q,te){const ce=new Uint8Array(32),T=new Uint8Array(32);return y(ce,Q),y(T,te),_(ce,T)}function S(Q){const te=new Uint8Array(32);return y(te,Q),te[0]&1}function x(Q,te){for(let ce=0;ce<16;ce++)Q[ce]=te[2*ce]+(te[2*ce+1]<<8);Q[15]&=32767}function O(Q,te,ce){for(let T=0;T<16;T++)Q[T]=te[T]+ce[T]}function E(Q,te,ce){for(let T=0;T<16;T++)Q[T]=te[T]-ce[T]}function p(Q,te,ce){let T,fe,ze=0,tt=0,mt=0,vt=0,gt=0,Lt=0,Yt=0,wr=0,Rt=0,Pt=0,kt=0,Nt=0,Kt=0,Ut=0,zt=0,$t=0,Dt=0,qt=0,Mt=0,cr=0,tr=0,ir=0,nr=0,mr=0,wn=0,Yr=0,ai=0,Dn=0,$n=0,Kn=0,xr=0,$r=ce[0],_r=ce[1],_e=ce[2],ee=ce[3],ve=ce[4],Re=ce[5],He=ce[6],Xe=ce[7],st=ce[8],lt=ce[9],_t=ce[10],ue=ce[11],Z=ce[12],ye=ce[13],Me=ce[14],Le=ce[15];T=te[0],ze+=T*$r,tt+=T*_r,mt+=T*_e,vt+=T*ee,gt+=T*ve,Lt+=T*Re,Yt+=T*He,wr+=T*Xe,Rt+=T*st,Pt+=T*lt,kt+=T*_t,Nt+=T*ue,Kt+=T*Z,Ut+=T*ye,zt+=T*Me,$t+=T*Le,T=te[1],tt+=T*$r,mt+=T*_r,vt+=T*_e,gt+=T*ee,Lt+=T*ve,Yt+=T*Re,wr+=T*He,Rt+=T*Xe,Pt+=T*st,kt+=T*lt,Nt+=T*_t,Kt+=T*ue,Ut+=T*Z,zt+=T*ye,$t+=T*Me,Dt+=T*Le,T=te[2],mt+=T*$r,vt+=T*_r,gt+=T*_e,Lt+=T*ee,Yt+=T*ve,wr+=T*Re,Rt+=T*He,Pt+=T*Xe,kt+=T*st,Nt+=T*lt,Kt+=T*_t,Ut+=T*ue,zt+=T*Z,$t+=T*ye,Dt+=T*Me,qt+=T*Le,T=te[3],vt+=T*$r,gt+=T*_r,Lt+=T*_e,Yt+=T*ee,wr+=T*ve,Rt+=T*Re,Pt+=T*He,kt+=T*Xe,Nt+=T*st,Kt+=T*lt,Ut+=T*_t,zt+=T*ue,$t+=T*Z,Dt+=T*ye,qt+=T*Me,Mt+=T*Le,T=te[4],gt+=T*$r,Lt+=T*_r,Yt+=T*_e,wr+=T*ee,Rt+=T*ve,Pt+=T*Re,kt+=T*He,Nt+=T*Xe,Kt+=T*st,Ut+=T*lt,zt+=T*_t,$t+=T*ue,Dt+=T*Z,qt+=T*ye,Mt+=T*Me,cr+=T*Le,T=te[5],Lt+=T*$r,Yt+=T*_r,wr+=T*_e,Rt+=T*ee,Pt+=T*ve,kt+=T*Re,Nt+=T*He,Kt+=T*Xe,Ut+=T*st,zt+=T*lt,$t+=T*_t,Dt+=T*ue,qt+=T*Z,Mt+=T*ye,cr+=T*Me,tr+=T*Le,T=te[6],Yt+=T*$r,wr+=T*_r,Rt+=T*_e,Pt+=T*ee,kt+=T*ve,Nt+=T*Re,Kt+=T*He,Ut+=T*Xe,zt+=T*st,$t+=T*lt,Dt+=T*_t,qt+=T*ue,Mt+=T*Z,cr+=T*ye,tr+=T*Me,ir+=T*Le,T=te[7],wr+=T*$r,Rt+=T*_r,Pt+=T*_e,kt+=T*ee,Nt+=T*ve,Kt+=T*Re,Ut+=T*He,zt+=T*Xe,$t+=T*st,Dt+=T*lt,qt+=T*_t,Mt+=T*ue,cr+=T*Z,tr+=T*ye,ir+=T*Me,nr+=T*Le,T=te[8],Rt+=T*$r,Pt+=T*_r,kt+=T*_e,Nt+=T*ee,Kt+=T*ve,Ut+=T*Re,zt+=T*He,$t+=T*Xe,Dt+=T*st,qt+=T*lt,Mt+=T*_t,cr+=T*ue,tr+=T*Z,ir+=T*ye,nr+=T*Me,mr+=T*Le,T=te[9],Pt+=T*$r,kt+=T*_r,Nt+=T*_e,Kt+=T*ee,Ut+=T*ve,zt+=T*Re,$t+=T*He,Dt+=T*Xe,qt+=T*st,Mt+=T*lt,cr+=T*_t,tr+=T*ue,ir+=T*Z,nr+=T*ye,mr+=T*Me,wn+=T*Le,T=te[10],kt+=T*$r,Nt+=T*_r,Kt+=T*_e,Ut+=T*ee,zt+=T*ve,$t+=T*Re,Dt+=T*He,qt+=T*Xe,Mt+=T*st,cr+=T*lt,tr+=T*_t,ir+=T*ue,nr+=T*Z,mr+=T*ye,wn+=T*Me,Yr+=T*Le,T=te[11],Nt+=T*$r,Kt+=T*_r,Ut+=T*_e,zt+=T*ee,$t+=T*ve,Dt+=T*Re,qt+=T*He,Mt+=T*Xe,cr+=T*st,tr+=T*lt,ir+=T*_t,nr+=T*ue,mr+=T*Z,wn+=T*ye,Yr+=T*Me,ai+=T*Le,T=te[12],Kt+=T*$r,Ut+=T*_r,zt+=T*_e,$t+=T*ee,Dt+=T*ve,qt+=T*Re,Mt+=T*He,cr+=T*Xe,tr+=T*st,ir+=T*lt,nr+=T*_t,mr+=T*ue,wn+=T*Z,Yr+=T*ye,ai+=T*Me,Dn+=T*Le,T=te[13],Ut+=T*$r,zt+=T*_r,$t+=T*_e,Dt+=T*ee,qt+=T*ve,Mt+=T*Re,cr+=T*He,tr+=T*Xe,ir+=T*st,nr+=T*lt,mr+=T*_t,wn+=T*ue,Yr+=T*Z,ai+=T*ye,Dn+=T*Me,$n+=T*Le,T=te[14],zt+=T*$r,$t+=T*_r,Dt+=T*_e,qt+=T*ee,Mt+=T*ve,cr+=T*Re,tr+=T*He,ir+=T*Xe,nr+=T*st,mr+=T*lt,wn+=T*_t,Yr+=T*ue,ai+=T*Z,Dn+=T*ye,$n+=T*Me,Kn+=T*Le,T=te[15],$t+=T*$r,Dt+=T*_r,qt+=T*_e,Mt+=T*ee,cr+=T*ve,tr+=T*Re,ir+=T*He,nr+=T*Xe,mr+=T*st,wn+=T*lt,Yr+=T*_t,ai+=T*ue,Dn+=T*Z,$n+=T*ye,Kn+=T*Me,xr+=T*Le,ze+=38*Dt,tt+=38*qt,mt+=38*Mt,vt+=38*cr,gt+=38*tr,Lt+=38*ir,Yt+=38*nr,wr+=38*mr,Rt+=38*wn,Pt+=38*Yr,kt+=38*ai,Nt+=38*Dn,Kt+=38*$n,Ut+=38*Kn,zt+=38*xr,fe=1,T=ze+fe+65535,fe=Math.floor(T/65536),ze=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=wr+fe+65535,fe=Math.floor(T/65536),wr=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=zt+fe+65535,fe=Math.floor(T/65536),zt=T-fe*65536,T=$t+fe+65535,fe=Math.floor(T/65536),$t=T-fe*65536,ze+=fe-1+37*(fe-1),fe=1,T=ze+fe+65535,fe=Math.floor(T/65536),ze=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=wr+fe+65535,fe=Math.floor(T/65536),wr=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=zt+fe+65535,fe=Math.floor(T/65536),zt=T-fe*65536,T=$t+fe+65535,fe=Math.floor(T/65536),$t=T-fe*65536,ze+=fe-1+37*(fe-1),Q[0]=ze,Q[1]=tt,Q[2]=mt,Q[3]=vt,Q[4]=gt,Q[5]=Lt,Q[6]=Yt,Q[7]=wr,Q[8]=Rt,Q[9]=Pt,Q[10]=kt,Q[11]=Nt,Q[12]=Kt,Q[13]=Ut,Q[14]=zt,Q[15]=$t}function I(Q,te){p(Q,te,te)}function C(Q,te){const ce=i();let T;for(T=0;T<16;T++)ce[T]=te[T];for(T=253;T>=0;T--)I(ce,ce),T!==2&&T!==4&&p(ce,ce,te);for(T=0;T<16;T++)Q[T]=ce[T]}function L(Q,te){const ce=i();let T;for(T=0;T<16;T++)ce[T]=te[T];for(T=250;T>=0;T--)I(ce,ce),T!==1&&p(ce,ce,te);for(T=0;T<16;T++)Q[T]=ce[T]}function q(Q,te){const ce=i(),T=i(),fe=i(),ze=i(),tt=i(),mt=i(),vt=i(),gt=i(),Lt=i();E(ce,Q[1],Q[0]),E(Lt,te[1],te[0]),p(ce,ce,Lt),O(T,Q[0],Q[1]),O(Lt,te[0],te[1]),p(T,T,Lt),p(fe,Q[3],te[3]),p(fe,fe,u),p(ze,Q[2],te[2]),O(ze,ze,ze),E(tt,T,ce),E(mt,ze,fe),O(vt,ze,fe),O(gt,T,ce),p(Q[0],tt,mt),p(Q[1],gt,vt),p(Q[2],vt,mt),p(Q[3],tt,gt)}function le(Q,te,ce){for(let T=0;T<4;T++)v(Q[T],te[T],ce)}function pe(Q,te){const ce=i(),T=i(),fe=i();C(fe,te[2]),p(ce,te[0],fe),p(T,te[1],fe),y(Q,T),Q[31]^=S(ce)<<7}function B(Q,te,ce){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=ce[T/8|0]>>(T&7)&1;le(Q,te,fe),q(te,Q),q(Q,Q),le(Q,te,fe)}}function U(Q,te){const ce=[i(),i(),i(),i()];m(ce[0],f),m(ce[1],d),m(ce[2],s),p(ce[3],f,d),B(Q,ce,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 ce=new Uint8Array(32),T=[i(),i(),i(),i()];U(T,te),pe(ce,T);const fe=new Uint8Array(64);return fe.set(Q),fe.set(ce,32),{publicKey:ce,secretKey:fe}}t.generateKeyPairFromSeed=K;function ne(Q){const te=(0,e.randomBytes)(32,Q),ce=K(te);return(0,n.wipe)(te),ce}t.generateKeyPair=ne;function F(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=F;const j=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 z(Q,te){let ce,T,fe,ze;for(T=63;T>=32;--T){for(ce=0,fe=T-32,ze=T-12;fe<ze;++fe)te[fe]+=ce-16*te[T]*j[fe-(T-32)],ce=Math.floor((te[fe]+128)/256),te[fe]-=ce*256;te[fe]+=ce,te[T]=0}for(ce=0,fe=0;fe<32;fe++)te[fe]+=ce-(te[31]>>4)*j[fe],ce=te[fe]>>8,te[fe]&=255;for(fe=0;fe<32;fe++)te[fe]-=ce*j[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 ce=0;ce<64;ce++)te[ce]=Q[ce];for(let ce=0;ce<64;ce++)Q[ce]=0;z(Q,te)}function H(Q,te){const ce=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 ze=new Uint8Array(64);ze.set(fe.subarray(32),32);const tt=new r.SHA512;tt.update(ze.subarray(32)),tt.update(te);const mt=tt.digest();tt.clean(),$(mt),U(T,mt),pe(ze,T),tt.reset(),tt.update(ze.subarray(0,32)),tt.update(Q.subarray(32)),tt.update(te);const vt=tt.digest();$(vt);for(let gt=0;gt<32;gt++)ce[gt]=mt[gt];for(let gt=0;gt<32;gt++)for(let Lt=0;Lt<32;Lt++)ce[gt+Lt]+=vt[gt]*fe[Lt];return z(ze.subarray(32),ce),ze}t.sign=H;function k(Q,te){const ce=i(),T=i(),fe=i(),ze=i(),tt=i(),mt=i(),vt=i();return m(Q[2],s),x(Q[1],te),I(fe,Q[1]),p(ze,fe,c),E(fe,fe,Q[2]),O(ze,Q[2],ze),I(tt,ze),I(mt,tt),p(vt,mt,tt),p(ce,vt,fe),p(ce,ce,ze),L(ce,ce),p(ce,ce,fe),p(ce,ce,ze),p(ce,ce,ze),p(Q[0],ce,ze),I(T,Q[0]),p(T,T,ze),b(T,fe)&&p(Q[0],Q[0],g),I(T,Q[0]),p(T,T,ze),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 M(Q,te,ce){const T=new Uint8Array(32),fe=[i(),i(),i(),i()],ze=[i(),i(),i(),i()];if(ce.length!==t.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${t.SIGNATURE_LENGTH} bytes`);if(k(ze,Q))return!1;const tt=new r.SHA512;tt.update(ce.subarray(0,32)),tt.update(Q),tt.update(te);const mt=tt.digest();return $(mt),B(fe,ze,mt),U(ze,ce.subarray(32)),q(fe,ze),pe(T,fe),!_(ce,T)}t.verify=M;function G(Q){let te=[i(),i(),i(),i()];if(k(te,Q))throw new Error("Ed25519: invalid public key");let ce=i(),T=i(),fe=te[1];O(ce,s,fe),E(T,s,fe),C(T,T),p(ce,ce,T);let ze=new Uint8Array(32);return y(ze,ce),ze}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 ce=new Uint8Array(te.subarray(0,32));return(0,n.wipe)(te),ce}t.convertSecretKeyToX25519=ge})(Rk);const lLe="EdDSA",fLe="JWT",Aoe=".",Soe="base64url",dLe="utf8",hLe="utf8",pLe=":",gLe="did",yLe="key",NK="base58btc",mLe="z",vLe="K36",bLe=32;function qA(t){return co(Co(I1(t),dLe),Soe)}function Ooe(t){const e=Co(vLe,NK),r=mLe+co(s5([e,t]),NK);return[gLe,yLe,r].join(pLe)}function wLe(t){return co(t,Soe)}function _Le(t){return Co([qA(t.header),qA(t.payload)].join(Aoe),hLe)}function ELe(t){return[qA(t.header),qA(t.payload),wLe(t.signature)].join(Aoe)}function DK(t=im.randomBytes(bLe)){return Rk.generateKeyPairFromSeed(t)}async function xLe(t,e,r,n,i=Xt.fromMiliseconds(Date.now())){const a={alg:lLe,typ:fLe},o=Ooe(n.publicKey),s=i+r,c={iss:o,sub:t,aud:e,iat:i,exp:s},u=_Le({header:a,payload:c}),f=Rk.sign(n.secretKey,u);return ELe({header:a,payload:c,signature:f})}const ALe="PARSE_ERROR",SLe="INVALID_REQUEST",OLe="METHOD_NOT_FOUND",ILe="INVALID_PARAMS",Ioe="INTERNAL_ERROR",Ck="SERVER_ERROR",PLe=[-32700,-32600,-32601,-32602,-32603],qb={[ALe]:{code:-32700,message:"Parse error"},[SLe]:{code:-32600,message:"Invalid Request"},[OLe]:{code:-32601,message:"Method not found"},[ILe]:{code:-32602,message:"Invalid params"},[Ioe]:{code:-32603,message:"Internal error"},[Ck]:{code:-32e3,message:"Server error"}},Poe=Ck;function TLe(t){return PLe.includes(t)}function $K(t){return Object.keys(qb).includes(t)?qb[t]:qb[Poe]}function RLe(t){const e=Object.values(qb).find(r=>r.code===t);return e||qb[Poe]}function Toe(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):t}var Roe={},qu={},MK;function CLe(){if(MK)return qu;MK=1,Object.defineProperty(qu,"__esModule",{value:!0}),qu.isBrowserCryptoAvailable=qu.getSubtleCrypto=qu.getBrowerCrypto=void 0;function t(){return(Ne==null?void 0:Ne.crypto)||(Ne==null?void 0:Ne.msCrypto)||{}}qu.getBrowerCrypto=t;function e(){const n=t();return n.subtle||n.webkitSubtle}qu.getSubtleCrypto=e;function r(){return!!t()&&!!e()}return qu.isBrowserCryptoAvailable=r,qu}var Hu={},kK;function NLe(){if(kK)return Hu;kK=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.isBrowser=Hu.isNode=Hu.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Hu.isReactNative=t;function e(){return typeof Ha<"u"&&typeof Ha.versions<"u"&&typeof Ha.versions.node<"u"}Hu.isNode=e;function r(){return!t()&&!e()}return Hu.isBrowser=r,Hu}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Xs;e.__exportStar(CLe(),t),e.__exportStar(NLe(),t)})(Roe);function Nk(t=3){const e=Date.now()*Math.pow(10,t),r=Math.floor(Math.random()*Math.pow(10,t));return e+r}function Coe(t=6){return BigInt(Nk(t))}function gg(t,e,r){return{id:r||Nk(),jsonrpc:"2.0",method:t,params:e}}function Dk(t,e){return{id:t,jsonrpc:"2.0",result:e}}function cO(t,e,r){return{id:t,jsonrpc:"2.0",error:DLe(e,r)}}function DLe(t,e){return typeof t>"u"?$K(Ioe):(typeof t=="string"&&(t=Object.assign(Object.assign({},$K(Ck)),{message:t})),typeof e<"u"&&(t.data=e),TLe(t.code)&&(t=RLe(t.code)),t)}class $Le{}class MLe extends $Le{constructor(){super()}}class kLe extends MLe{constructor(e){super()}}const LLe="^https?:",ULe="^wss?:";function BLe(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function Noe(t,e){const r=BLe(t);return typeof r>"u"?!1:new RegExp(e).test(r)}function LK(t){return Noe(t,LLe)}function UK(t){return Noe(t,ULe)}function FLe(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function Doe(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function $k(t){return Doe(t)&&"method"in t}function uO(t){return Doe(t)&&(Ju(t)||_c(t))}function Ju(t){return"result"in t}function _c(t){return"error"in t}class zl extends kLe{constructor(e){super(e),this.events=new fo.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(gg(e.method,e.params||[],e.id||Coe().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=>{_c(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),uO(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 SN,BK;function jLe(){return BK||(BK=1,SN=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}),SN}const qLe=()=>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:jLe(),HLe=()=>typeof WebSocket<"u"||typeof bn<"u"&&typeof bn.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",FK=t=>t.split("?")[0],jK=10,zLe=qLe();class VLe{constructor(e){if(this.url=e,this.events=new fo.EventEmitter,this.registering=!1,!UK(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(I1(e))}catch(n){this.onError(e.id,n)}}register(e=this.url){if(!UK(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=Roe.isReactNative()?void 0:{rejectUnauthorized:!FLe(e)},a=new zLe(e,[],i);HLe()?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"?Tk(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),a=cO(e,i);this.events.emit("payload",a)}parseError(e,r=this.url){return Toe(e,FK(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>jK&&this.events.setMaxListeners(jK)}emitError(e){const r=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${FK(this.url)}`));return this.events.emit("register_error",r),r}}var HA={exports:{}};HA.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]",O="[object RegExp]",E="[object Set]",p="[object String]",I="[object Symbol]",C="[object Undefined]",L="[object WeakMap]",q="[object ArrayBuffer]",le="[object DataView]",pe="[object Float32Array]",B="[object Float64Array]",U="[object Int8Array]",K="[object Int16Array]",ne="[object Int32Array]",F="[object Uint8Array]",j="[object Uint8ClampedArray]",z="[object Uint16Array]",$="[object Uint32Array]",H=/[\\^$.*+?()[\]{}|]/g,k=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,G={};G[pe]=G[B]=G[U]=G[K]=G[ne]=G[F]=G[j]=G[z]=G[$]=!0,G[s]=G[c]=G[q]=G[f]=G[le]=G[d]=G[g]=G[m]=G[v]=G[y]=G[b]=G[O]=G[E]=G[p]=G[L]=!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")(),ce=e&&!e.nodeType&&e,T=ce&&!0&&t&&!t.nodeType&&t,fe=T&&T.exports===ce,ze=fe&&ge.process,tt=function(){try{return ze&&ze.binding&&ze.binding("util")}catch{}}(),mt=tt&&tt.isTypedArray;function vt(de,ke){for(var it=-1,We=de==null?0:de.length,Qr=0,fr=[];++it<We;){var yn=de[it];ke(yn,it,de)&&(fr[Qr++]=yn)}return fr}function gt(de,ke){for(var it=-1,We=ke.length,Qr=de.length;++it<We;)de[Qr+it]=ke[it];return de}function Lt(de,ke){for(var it=-1,We=de==null?0:de.length;++it<We;)if(ke(de[it],it,de))return!0;return!1}function Yt(de,ke){for(var it=-1,We=Array(de);++it<de;)We[it]=ke(it);return We}function wr(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(We,Qr){it[++ke]=[Qr,We]}),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(We){it[++ke]=We}),it}var Ut=Array.prototype,zt=Function.prototype,$t=Object.prototype,Dt=te["__core-js_shared__"],qt=zt.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,mr=te.Symbol,wn=te.Uint8Array,Yr=$t.propertyIsEnumerable,ai=Ut.splice,Dn=mr?mr.toStringTag:void 0,$n=Object.getOwnPropertySymbols,Kn=nr?nr.isBuffer:void 0,xr=Nt(Object.keys,Object),$r=jr(te,"DataView"),_r=jr(te,"Map"),_e=jr(te,"Promise"),ee=jr(te,"Set"),ve=jr(te,"WeakMap"),Re=jr(Object,"create"),He=Ft($r),Xe=Ft(_r),st=Ft(_e),lt=Ft(ee),_t=Ft(ve),ue=mr?mr.prototype:void 0,Z=ue?ue.valueOf:void 0;function ye(de){var ke=-1,it=de==null?0:de.length;for(this.clear();++ke<it;){var We=de[ke];this.set(We[0],We[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 Ot(de){var ke=this.__data__;return Re?ke[de]!==void 0:Mt.call(ke,de)}function pr(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=Ot,ye.prototype.set=pr;function lr(de){var ke=-1,it=de==null?0:de.length;for(this.clear();++ke<it;){var We=de[ke];this.set(We[0],We[1])}}function en(){this.__data__=[],this.size=0}function gr(de){var ke=this.__data__,it=re(ke,de);if(it<0)return!1;var We=ke.length-1;return it==We?ke.pop():ai.call(ke,it,1),--this.size,!0}function Er(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__,We=re(it,de);return We<0?(++this.size,it.push([de,ke])):it[We][1]=ke,this}lr.prototype.clear=en,lr.prototype.delete=gr,lr.prototype.get=Er,lr.prototype.has=on,lr.prototype.set=sr;function Lr(de){var ke=-1,it=de==null?0:de.length;for(this.clear();++ke<it;){var We=de[ke];this.set(We[0],We[1])}}function gn(){this.size=0,this.__data__={hash:new ye,map:new(_r||lr),string:new ye}}function Ur(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 Si(de){return _n(this,de).has(de)}function ei(de,ke){var it=_n(this,de),We=it.size;return it.set(de,ke),this.size+=it.size==We?0:1,this}Lr.prototype.clear=gn,Lr.prototype.delete=Ur,Lr.prototype.get=Zn,Lr.prototype.has=Si,Lr.prototype.set=ei;function Oi(de){var ke=-1,it=de==null?0:de.length;for(this.__data__=new Lr;++ke<it;)this.add(de[ke])}function Ii(de){return this.__data__.set(de,n),this}function oi(de){return this.__data__.has(de)}Oi.prototype.add=Oi.prototype.push=Ii,Oi.prototype.has=oi;function Fn(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 as(de){return this.__data__.has(de)}function X(de,ke){var it=this.__data__;if(it instanceof lr){var We=it.__data__;if(!_r||We.length<r-1)return We.push([de,ke]),this.size=++it.size,this;it=this.__data__=new Lr(We)}return it.set(de,ke),this.size=it.size,this}Fn.prototype.clear=ra,Fn.prototype.delete=$i,Fn.prototype.get=_a,Fn.prototype.has=as,Fn.prototype.set=X;function me(de,ke){var it=xn(de),We=!it&&Pi(de),Qr=!it&&!We&&si(de),fr=!it&&!We&&!Qr&&mi(de),yn=it||We||Qr||fr,ar=yn?Yt(de.length,String):[],yr=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")||he(ie,yr)))&&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 We=ke(de);return xn(de)?We:gt(We,it(de))}function be(de){return de==null?de===void 0?C:_:Dn&&Dn in Object(de)?P(de):At(de)}function Oe(de){return qi(de)&&be(de)==s}function Qe(de,ke,it,We,Qr){return de===ke?!0:de==null||ke==null||!qi(de)&&!qi(ke)?de!==de&&ke!==ke:ft(de,ke,it,We,Qe,Qr)}function ft(de,ke,it,We,Qr,fr){var yn=xn(de),ar=xn(ke),yr=yn?c:W(de),ie=ar?c:W(ke);yr=yr==s?b:yr,ie=ie==s?b:ie;var R=yr==b,oe=ie==b,we=yr==ie;if(we&&si(de)){if(!si(ke))return!1;yn=!0,R=!1}if(we&&!R)return fr||(fr=new Fn),yn||mi(de)?Vt(de,ke,it,We,Qr,fr):Tr(de,ke,yr,it,We,Qr,fr);if(!(it&i)){var se=R&&Mt.call(de,"__wrapped__"),Ae=oe&&Mt.call(ke,"__wrapped__");if(se||Ae){var Ie=se?de.value():de,Pe=Ae?ke.value():ke;return fr||(fr=new Fn),Qr(Ie,Pe,it,We,fr)}}return we?(fr||(fr=new Fn),Wr(de,ke,it,We,Qr,fr)):!1}function Ye(de){if(!ho(de)||Ce(de))return!1;var ke=fn(de)?ir:k;return ke.test(Ft(de))}function Ve(de){return qi(de)&&yi(de.length)&&!!G[be(de)]}function ht(de){if(!rt(de))return xr(de);var ke=[];for(var it in Object(de))Mt.call(de,it)&&it!="constructor"&&ke.push(it);return ke}function Vt(de,ke,it,We,Qr,fr){var yn=it&i,ar=de.length,yr=ke.length;if(ar!=yr&&!(yn&&yr>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(We)var Ie=yn?We(Ae,se,R,ke,de,fr):We(se,Ae,R,de,ke,fr);if(Ie!==void 0){if(Ie)continue;oe=!1;break}if(we){if(!Lt(ke,function(Pe,Be){if(!Rt(we,Be)&&(se===Pe||Qr(se,Pe,it,We,fr)))return we.push(Be)})){oe=!1;break}}else if(!(se===Ae||Qr(se,Ae,it,We,fr))){oe=!1;break}}return fr.delete(de),fr.delete(ke),oe}function Tr(de,ke,it,We,Qr,fr,yn){switch(it){case le:if(de.byteLength!=ke.byteLength||de.byteOffset!=ke.byteOffset)return!1;de=de.buffer,ke=ke.buffer;case q: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 O:case p:return de==ke+"";case v:var ar=kt;case E:var yr=We&i;if(ar||(ar=Kt),de.size!=ke.size&&!yr)return!1;var ie=yn.get(de);if(ie)return ie==ke;We|=a,yn.set(de,ke);var R=Vt(ar(de),ar(ke),We,Qr,fr,yn);return yn.delete(de),R;case I:if(Z)return Z.call(de)==Z.call(ke)}return!1}function Wr(de,ke,it,We,Qr,fr){var yn=it&i,ar=Fr(de),yr=ar.length,ie=Fr(ke),R=ie.length;if(yr!=R&&!yn)return!1;for(var oe=yr;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 Ie=yn;++oe<yr;){we=ar[oe];var Pe=de[we],Be=ke[we];if(We)var Ke=yn?We(Be,Pe,we,ke,de,fr):We(Pe,Be,we,de,ke,fr);if(!(Ke===void 0?Pe===Be||Qr(Pe,Be,it,We,fr):Ke)){Ae=!1;break}Ie||(Ie=we=="constructor")}if(Ae&&!Ie){var qe=de.constructor,pt=ke.constructor;qe!=pt&&"constructor"in de&&"constructor"in ke&&!(typeof qe=="function"&&qe instanceof qe&&typeof pt=="function"&&pt instanceof pt)&&(Ae=!1)}return fr.delete(de),fr.delete(ke),Ae}function Fr(de){return Ee(de,po,D)}function _n(de,ke){var it=de.__data__;return Se(ke)?it[typeof ke=="string"?"string":"hash"]:it.map}function jr(de,ke){var it=Pt(de,ke);return Ye(it)?it:void 0}function P(de){var ke=Mt.call(de,Dn),it=de[Dn];try{de[Dn]=void 0;var We=!0}catch{}var Qr=tr.call(de);return We&&(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;($r&&W(new $r(new ArrayBuffer(1)))!=le||_r&&W(new _r)!=v||_e&&W(_e.resolve())!=S||ee&&W(new ee)!=E||ve&&W(new ve)!=L)&&(W=function(de){var ke=be(de),it=ke==b?de.constructor:void 0,We=it?Ft(it):"";if(We)switch(We){case He:return le;case Xe:return v;case st:return S;case lt:return E;case _t:return L}return ke});function he(de,ke){return ke=ke??o,!!ke&&(typeof de=="number"||M.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 Pi=Oe(function(){return arguments}())?Oe:function(de){return qi(de)&&Mt.call(de,"callee")&&!Yr.call(de,"callee")},xn=Array.isArray;function St(de){return de!=null&&yi(de.length)&&!fn(de)}var si=Kn||Ar;function An(de,ke){return Qe(de,ke)}function fn(de){if(!ho(de))return!1;var ke=be(de);return ke==m||ke==w||ke==u||ke==x}function yi(de){return typeof de=="number"&&de>-1&&de%1==0&&de<=o}function ho(de){var ke=typeof de;return de!=null&&(ke=="object"||ke=="function")}function qi(de){return de!=null&&typeof de=="object"}var mi=mt?wr(mt):Ve;function po(de){return St(de)?me(de):ht(de)}function tn(){return[]}function Ar(){return!1}t.exports=An})(HA,HA.exports);var GLe=HA.exports;const WLe=Nc(GLe);function KLe(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 O=w[_],E=0,p=S-1;(O!==0||E<y)&&p!==-1;p--,E++)O+=256*x[p]>>>0,x[p]=O%s>>>0,O=O/s>>>0;if(O!==0)throw new Error("Non-zero carry");y=E,_++}for(var I=S-y;I!==S&&x[I]===0;)I++;for(var C=c.repeat(v);I<S;++I)C+=t.charAt(x[I]);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 O=0,E=b-1;(x!==0||O<_)&&E!==-1;E--,O++)x+=s*S[E]>>>0,S[E]=x%256>>>0,x=x/256>>>0;if(x!==0)throw new Error("Non-zero carry");_=O,v++}if(w[v]!==" "){for(var p=b-_;p!==b&&S[p]===0;)p++;for(var I=new Uint8Array(y+(b-p)),C=y;p!==b;)I[C++]=S[p++];return I}}}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 YLe=KLe,QLe=YLe;const $oe=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")},JLe=t=>new TextEncoder().encode(t),XLe=t=>new TextDecoder().decode(t);class ZLe{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 e9e{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 Moe(this,e)}}class t9e{constructor(e){this.decoders=e}or(e){return Moe(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 Moe=(t,e)=>new t9e({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let r9e=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new ZLe(e,r,n),this.decoder=new e9e(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const lO=({name:t,prefix:e,encode:r,decode:n})=>new r9e(t,e,r,n),$w=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=QLe(r,e);return lO({prefix:t,name:e,encode:n,decode:a=>$oe(i(a))})},n9e=(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},i9e=(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})=>lO({prefix:e,name:t,encode(i){return i9e(i,n,r)},decode(i){return n9e(i,n,r,t)}}),a9e=lO({prefix:"\0",name:"identity",encode:t=>XLe(t),decode:t=>JLe(t)});var o9e=Object.freeze({__proto__:null,identity:a9e});const s9e=wa({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var c9e=Object.freeze({__proto__:null,base2:s9e});const u9e=wa({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var l9e=Object.freeze({__proto__:null,base8:u9e});const f9e=$w({prefix:"9",name:"base10",alphabet:"0123456789"});var d9e=Object.freeze({__proto__:null,base10:f9e});const h9e=wa({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),p9e=wa({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var g9e=Object.freeze({__proto__:null,base16:h9e,base16upper:p9e});const y9e=wa({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),m9e=wa({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),v9e=wa({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),b9e=wa({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),w9e=wa({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),_9e=wa({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),E9e=wa({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),x9e=wa({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),A9e=wa({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var S9e=Object.freeze({__proto__:null,base32:y9e,base32upper:m9e,base32pad:v9e,base32padupper:b9e,base32hex:w9e,base32hexupper:_9e,base32hexpad:E9e,base32hexpadupper:x9e,base32z:A9e});const O9e=$w({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),I9e=$w({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var P9e=Object.freeze({__proto__:null,base36:O9e,base36upper:I9e});const T9e=$w({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),R9e=$w({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var C9e=Object.freeze({__proto__:null,base58btc:T9e,base58flickr:R9e});const N9e=wa({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),D9e=wa({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),$9e=wa({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),M9e=wa({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var k9e=Object.freeze({__proto__:null,base64:N9e,base64pad:D9e,base64url:$9e,base64urlpad:M9e});const koe=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),L9e=koe.reduce((t,e,r)=>(t[r]=e,t),[]),U9e=koe.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function B9e(t){return t.reduce((e,r)=>(e+=L9e[r],e),"")}function F9e(t){const e=[];for(const r of t){const n=U9e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const j9e=lO({prefix:"🚀",name:"base256emoji",encode:B9e,decode:F9e});var q9e=Object.freeze({__proto__:null,base256emoji:j9e}),H9e=Loe,qK=128,z9e=127,V9e=~z9e,G9e=Math.pow(2,31);function Loe(t,e,r){e=e||[],r=r||0;for(var n=r;t>=G9e;)e[r++]=t&255|qK,t/=128;for(;t&V9e;)e[r++]=t&255|qK,t>>>=7;return e[r]=t|0,Loe.bytes=r-n+1,e}var W9e=y5,K9e=128,HK=127;function y5(t,n){var r=0,n=n||0,i=0,a=n,o,s=t.length;do{if(a>=s)throw y5.bytes=0,new RangeError("Could not decode varint");o=t[a++],r+=i<28?(o&HK)<<i:(o&HK)*Math.pow(2,i),i+=7}while(o>=K9e);return y5.bytes=a-n,r}var Y9e=Math.pow(2,7),Q9e=Math.pow(2,14),J9e=Math.pow(2,21),X9e=Math.pow(2,28),Z9e=Math.pow(2,35),e7e=Math.pow(2,42),t7e=Math.pow(2,49),r7e=Math.pow(2,56),n7e=Math.pow(2,63),i7e=function(t){return t<Y9e?1:t<Q9e?2:t<J9e?3:t<X9e?4:t<Z9e?5:t<e7e?6:t<t7e?7:t<r7e?8:t<n7e?9:10},a7e={encode:H9e,decode:W9e,encodingLength:i7e},Uoe=a7e;const zK=(t,e,r=0)=>(Uoe.encode(t,e,r),e),VK=t=>Uoe.encodingLength(t),m5=(t,e)=>{const r=e.byteLength,n=VK(t),i=n+VK(r),a=new Uint8Array(i+r);return zK(t,a,0),zK(r,a,n),a.set(e,i),new o7e(t,r,e,a)};let o7e=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}};const Boe=({name:t,code:e,encode:r})=>new s7e(t,e,r);let s7e=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?m5(this.code,r):r.then(n=>m5(this.code,n))}else throw Error("Unknown type, must be binary type")}};const Foe=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),c7e=Boe({name:"sha2-256",code:18,encode:Foe("SHA-256")}),u7e=Boe({name:"sha2-512",code:19,encode:Foe("SHA-512")});var l7e=Object.freeze({__proto__:null,sha256:c7e,sha512:u7e});const joe=0,f7e="identity",qoe=$oe,d7e=t=>m5(joe,qoe(t)),h7e={code:joe,name:f7e,encode:qoe,digest:d7e};var p7e=Object.freeze({__proto__:null,identity:h7e});new TextEncoder,new TextDecoder;const GK={...o9e,...c9e,...l9e,...d9e,...g9e,...S9e,...P9e,...C9e,...k9e,...q9e};({...l7e,...p7e});function Hoe(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function g7e(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Hoe(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function zoe(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const WK=zoe("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),ON=zoe("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=g7e(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),y7e={utf8:WK,"utf-8":WK,hex:GK.base16,latin1:ON,ascii:ON,binary:ON,...GK};function m7e(t,e="utf8"){const r=y7e[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Hoe(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}const Voe="wc",v7e=2,Mk="core",ld=`${Voe}@2:${Mk}:`,b7e={name:Mk,logger:"error"},w7e={database:":memory:"},_7e="crypto",KK="client_ed25519_seed",E7e=Xt.ONE_DAY,x7e="keychain",A7e="0.3",S7e="messages",O7e="0.3",I7e=Xt.SIX_HOURS,P7e="publisher",Goe="irn",T7e="error",Woe="wss://relay.walletconnect.com",YK="wss://relay.walletconnect.org",R7e="relayer",Ua={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"},C7e="_subscription",zu={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},N7e=Xt.ONE_SECOND,D7e="2.10.4",$7e=1e4,M7e="0.3",k7e="WALLETCONNECT_CLIENT_ID",pc={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},L7e="subscription",U7e="0.3",B7e=Xt.FIVE_SECONDS*1e3,F7e="pairing",j7e="0.3",Cv={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}}},pb={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},Kc={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},q7e="history",H7e="0.3",z7e="expirer",ws={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},V7e="0.3",IN="verify-api",z0="https://verify.walletconnect.com",v5="https://verify.walletconnect.org",G7e=[z0,v5];let W7e=class{constructor(e,r){this.core=e,this.logger=r,this.keychain=new Map,this.name=x7e,this.version=A7e,this.initialized=!1,this.storagePrefix=ld,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,hoe(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?poe(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)}}},K7e=class{constructor(e,r,n){this.core=e,this.logger=r,this.name=_7e,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=DK(i);return Ooe(a.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=_Me();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const a=await this.getClientSeed(),o=DK(a),s=p5();return await xLe(s,i,E7e,o)},this.generateSharedKey=(i,a,o)=>{this.isInitialized();const s=this.getPrivateKey(i),c=EMe(s,a);return this.setSymKey(c,o)},this.setSymKey=async(i,a)=>{this.isInitialized();const o=a||xMe(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=doe(o),c=I1(a);if(sK(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 SMe({type:f,symKey:u,message:c,senderPublicKey:d})},this.decode=async(i,a,o)=>{this.isInitialized();const s=PMe(a,o);if(sK(s)){const c=s.receiverPublicKey,u=s.senderPublicKey;i=await this.generateSharedKey(c,u)}try{const c=this.getSymKey(i),u=OMe({symKey:c,encoded:a});return Tk(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=FA(i);return Tw(a.type)},this.getPayloadSenderPublicKey=i=>{const a=FA(i);return a.senderPublicKey?co(a.senderPublicKey,so):void 0},this.core=e,this.logger=un.generateChildLogger(r,this.name),this.keychain=n||new W7e(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(KK)}catch{e=p5(),await this.keychain.set(KK,e)}return m7e(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 Y7e extends Zke{constructor(e,r){super(e,r),this.logger=e,this.core=r,this.messages=new Map,this.name=S7e,this.version=O7e,this.initialized=!1,this.storagePrefix=ld,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=hg(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=hg(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,hoe(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?poe(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 Q7e=class extends eLe{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.events=new fo.EventEmitter,this.name=P7e,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)||I7e,c=g5(a),u=(a==null?void 0:a.prompt)||!1,f=(a==null?void 0:a.tag)||0,d=(a==null?void 0:a.id)||Coe().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 O1(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(Ua.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:Sx(i.protocol).publish,params:{topic:e,message:r,ttl:n,prompt:a,tag:o},id:s};return ro((c=g.params)==null?void 0:c.prompt)&&((u=g.params)==null||delete u.prompt),ro((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(sm.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Ua.connection_stalled);return}this.checkQueue()}),this.relayer.on(Ua.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}},J7e=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 X7e=Object.defineProperty,Z7e=Object.defineProperties,eUe=Object.getOwnPropertyDescriptors,QK=Object.getOwnPropertySymbols,tUe=Object.prototype.hasOwnProperty,rUe=Object.prototype.propertyIsEnumerable,JK=(t,e,r)=>e in t?X7e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Nv=(t,e)=>{for(var r in e||(e={}))tUe.call(e,r)&&JK(t,r,e[r]);if(QK)for(var r of QK(e))rUe.call(e,r)&&JK(t,r,e[r]);return t},PN=(t,e)=>Z7e(t,eUe(e));let nUe=class extends nLe{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.subscriptions=new Map,this.topicMap=new J7e,this.events=new fo.EventEmitter,this.name=L7e,this.version=U7e,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=ld,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=g5(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)>=B7e&&(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=g5(n);await this.rpcUnsubscribe(e,r,i);const a=Ei("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:Sx(r.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await O1(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Ua.connection_stalled)}return hg(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const r=e[0].relay,n={method:Sx(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 O1(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Ua.connection_stalled)}}rpcUnsubscribe(e,r,n){const i={method:Sx(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,PN(Nv({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,Nv({},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,Nv({},r)),this.topicMap.set(r.topic,e),this.events.emit(pc.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(pc.deleted,PN(Nv({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(pc.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(pc.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);Eu(r)&&this.onBatchSubscribe(r.map((n,i)=>PN(Nv({},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(sm.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(Ua.connect,async()=>{await this.onConnect()}),this.relayer.on(Ua.disconnect,()=>{this.onDisconnect()}),this.events.on(pc.created,async e=>{const r=pc.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),await this.persist()}),this.events.on(pc.deleted,async e=>{const r=pc.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 iUe=Object.defineProperty,XK=Object.getOwnPropertySymbols,aUe=Object.prototype.hasOwnProperty,oUe=Object.prototype.propertyIsEnumerable,ZK=(t,e,r)=>e in t?iUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,sUe=(t,e)=>{for(var r in e||(e={}))aUe.call(e,r)&&ZK(t,r,e[r]);if(XK)for(var r of XK(e))oUe.call(e,r)&&ZK(t,r,e[r]);return t};let cUe=class extends tLe{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new fo.EventEmitter,this.name=R7e,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(Ua.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=r=>{this.logger.error(r),this.events.emit(Ua.error,r),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(zu.payload,this.onPayloadHandler),this.provider.on(zu.connect,this.onConnectHandler),this.provider.on(zu.disconnect,this.onDisconnectHandler),this.provider.on(zu.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||T7e})),this.messages=new Y7e(this.logger,e.core),this.subscriber=new nUe(this,this.logger),this.publisher=new Q7e(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||Woe,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 ${YK}...`),await this.restartTransport(YK)}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)},$7e)}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(pc.created,o),a())};return await Promise.all([new Promise(s=>{a=s,this.subscriber.on(pc.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 O1(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(pc.resubscribed,()=>{r()})}),new Promise(async(r,n)=>{try{await O1(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(zu.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 mK())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 zl(new VLe(BMe({sdkVersion:D7e,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}),$k(e)){if(!e.method.endsWith(C7e))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(sUe({type:"event",event:r.id},o)),this.events.emit(r.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else uO(e)&&this.events.emit(Ua.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Ua.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const r=Dk(e.id,!0);await this.provider.connection.send(r)}unregisterProviderListeners(){this.provider.off(zu.payload,this.onPayloadHandler),this.provider.off(zu.connect,this.onConnectHandler),this.provider.off(zu.disconnect,this.onDisconnectHandler),this.provider.off(zu.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(Ua.connection_stalled,()=>{this.restartTransport().catch(r=>this.logger.error(r))});let e=await mK();Cke(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(Ua.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(N7e)))}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 uUe=Object.defineProperty,eY=Object.getOwnPropertySymbols,lUe=Object.prototype.hasOwnProperty,fUe=Object.prototype.propertyIsEnumerable,tY=(t,e,r)=>e in t?uUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,rY=(t,e)=>{for(var r in e||(e={}))lUe.call(e,r)&&tY(t,r,e[r]);if(eY)for(var r of eY(e))fUe.call(e,r)&&tY(t,r,e[r]);return t};let fO=class extends rLe{constructor(e,r,n,i=ld,a=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,this.map=new Map,this.version=M7e,this.cached=[],this.initialized=!1,this.storagePrefix=ld,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!ro(o)?this.map.set(this.getKey(o),o):cke(o)?this.map.set(o.id,o):uke(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=>WLe(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=rY(rY({},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)}}},dUe=class{constructor(e,r){this.core=e,this.logger=r,this.name=F7e,this.version=j7e,this.events=new QM,this.initialized=!1,this.storagePrefix=ld,this.ignoredPayloadTypes=[Tp],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=p5(),i=await this.core.crypto.setSymKey(n),a=wc(Xt.FIVE_MINUTES),o={protocol:Goe},s={topic:i,expiry:a,relay:o,active:!1},c=XMe({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}=YMe(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=wc(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(pb.create,u),u},this.activate=async({topic:n})=>{this.isInitialized();const i=wc(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}=T0();this.events.once(Ti("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",Ei("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(n,i,a)=>{const o=gg(i,a),s=await this.core.crypto.encode(n,o),c=Cv[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=Dk(n,a),s=await this.core.crypto.encode(i,o),c=await this.core.history.get(i,n),u=Cv[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=cO(n,a),s=await this.core.crypto.encode(i,o),c=await this.core.history.get(i,n),u=Cv[c.request.method]?Cv[c.request.method].res:Cv.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,Ei("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=>_f(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(pb.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(()=>{Ju(i)?this.events.emit(Ti("pairing_ping",a),{}):_c(i)&&this.events.emit(Ti("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(pb.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=Ei("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(Ei("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!_o(n)){const{message:i}=Tt("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(i)}if(!ske(n.uri)){const{message:i}=Tt("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(i)}},this.isValidPing=async n=>{if(!_o(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(!_o(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(_f(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 fO(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(Ua.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{$k(i)?(this.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):uO(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(ws.expired,async e=>{const{topic:r}=yoe(e.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit(pb.expire,{topic:r}))})}},hUe=class extends Xke{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.records=new Map,this.events=new fo.EventEmitter,this.name=q7e,this.version=H7e,this.cached=[],this.initialized=!1,this.storagePrefix=ld,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:wc(Xt.THIRTY_DAYS)};this.records.set(o.id,o),this.events.emit(Kc.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=_c(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.events.emit(Kc.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(Kc.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:gg(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(Kc.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(Kc.created,e=>{const r=Kc.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(Kc.updated,e=>{const r=Kc.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(Kc.deleted,e=>{const r=Kc.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.core.heartbeat.on(sm.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)}}},pUe=class extends iLe{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.expirations=new Map,this.events=new fo.EventEmitter,this.name=z7e,this.version=V7e,this.cached=[],this.initialized=!1,this.storagePrefix=ld,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(ws.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(ws.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 FMe(e);if(typeof e=="number")return jMe(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(ws.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(ws.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(sm.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(ws.created,e=>{const r=ws.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(ws.expired,e=>{const r=ws.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(ws.deleted,e=>{const r=ws.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)}}},gUe=class extends aLe{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,this.name=IN,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async n=>{if(this.verifyDisabled||Rw()||!Cw())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=v5;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,v5)}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(IN))return a();window.addEventListener("message",i);const o=document.createElement("iframe");o.id=IN,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||z0;return G7e.includes(i)||(this.logger.info(`verify url: ${i}, not included in trusted list, assigning default: ${z0}`),i=z0),i},this.logger=un.generateChildLogger(r,this.name),this.verifyUrl=z0,this.abortController=new AbortController,this.isDevEnv=Ok()&&{}.IS_VITEST}get context(){return un.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),Xt.toMiliseconds(e))}};var yUe=Object.defineProperty,nY=Object.getOwnPropertySymbols,mUe=Object.prototype.hasOwnProperty,vUe=Object.prototype.propertyIsEnumerable,iY=(t,e,r)=>e in t?yUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,aY=(t,e)=>{for(var r in e||(e={}))mUe.call(e,r)&&iY(t,r,e[r]);if(nY)for(var r of nY(e))vUe.call(e,r)&&iY(t,r,e[r]);return t};let bUe=class Koe extends Jke{constructor(e){super(e),this.protocol=Voe,this.version=v7e,this.name=Mk,this.events=new fo.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)||Woe,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)||b7e.logger}));this.logger=un.generateChildLogger(r,this.name),this.heartbeat=new sm.HeartBeat,this.crypto=new K7e(this,this.logger,e==null?void 0:e.keychain),this.history=new hUe(this,this.logger),this.expirer=new pUe(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new qke(aY(aY({},w7e),e==null?void 0:e.storageOptions)),this.relayer=new cUe({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new dUe(this,this.logger),this.verify=new gUe(this.projectId||"",this.logger)}static async init(e){const r=new Koe(e);await r.initialize();const n=await r.crypto.getClientId();return await r.storage.setItem(k7e,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 wUe=bUe,Yoe="wc",Qoe=2,Joe="client",kk=`${Yoe}@${Qoe}:${Joe}:`,TN={name:Joe,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},oY="WALLETCONNECT_DEEPLINK_CHOICE",_Ue="proposal",Xoe="Proposal expired",EUe="session",mE=Xt.SEVEN_DAYS,xUe="engine",Dv={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}}},RN={min:Xt.FIVE_MINUTES,max:Xt.SEVEN_DAYS},Vu={idle:"IDLE",active:"ACTIVE"},AUe="request",SUe=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var OUe=Object.defineProperty,IUe=Object.defineProperties,PUe=Object.getOwnPropertyDescriptors,sY=Object.getOwnPropertySymbols,TUe=Object.prototype.hasOwnProperty,RUe=Object.prototype.propertyIsEnumerable,cY=(t,e,r)=>e in t?OUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,wo=(t,e)=>{for(var r in e||(e={}))TUe.call(e,r)&&cY(t,r,e[r]);if(sY)for(var r of sY(e))RUe.call(e,r)&&cY(t,r,e[r]);return t},$v=(t,e)=>IUe(t,PUe(e));class CUe extends sLe{constructor(e){super(e),this.name=xUe,this.events=new QM,this.initialized=!1,this.ignoredPayloadTypes=[Tp],this.requestQueue={state:Vu.idle,queue:[]},this.sessionRequestQueue={state:Vu.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(Dv)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},Xt.toMiliseconds(this.requestQueueDelay)))},this.connect=async r=>{await this.isInitialized();const n=$v(wo({},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=wo({requiredNamespaces:a,optionalNamespaces:o,relays:c??[{protocol:Goe}],proposer:{publicKey:g,metadata:this.client.metadata}},s&&{sessionProperties:s}),{reject:w,resolve:v,done:y}=T0(Xt.FIVE_MINUTES,Xoe);if(this.events.once(Ti("session_connect"),async({error:S,session:x})=>{if(S)w(S);else if(x){x.self.publicKey=g;const O=$v(wo({},x),{requiredNamespaces:x.requiredNamespaces,optionalNamespaces:x.optionalNamespaces});await this.client.session.set(x.topic,O),await this.setExpiry(x.topic,x.expiry),u&&await this.client.core.pairing.updateMetadata({topic:u,metadata:x.peer.metadata}),v(O)}}),!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=wc(Xt.FIVE_MINUTES);return await this.setProposal(_,wo({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||"",pg(f)||(f=rke(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,Ei("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:c}));const v=wo({relay:{protocol:i??"irn"},namespaces:a,requiredNamespaces:f,optionalNamespaces:d,pairingTopic:c,controller:{publicKey:g,metadata:this.client.metadata},expiry:wc(mE)},o&&{sessionProperties:o});await this.client.core.relayer.subscribe(w),await this.sendRequest({topic:w,method:"wc_sessionSettle",params:v,throwOnFailedPublish:!0});const y=$v(wo({},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,wc(mE)),{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,Ei("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}=T0();return this.events.once(Ti("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}=T0();return this.events.once(Ti("session_extend",i),({error:c})=>{c?s(c):o()}),await this.setExpiry(n,wc(mE)),{acknowledged:a}},this.request=async r=>{await this.isInitialized(),await this.isValidRequest(r);const{chainId:n,request:i,topic:a,expiry:o}=r,s=Nk(),{done:c,resolve:u,reject:f}=T0(o,"Request expired. Please try again.");return this.events.once(Ti("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(oY);qMe({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;Ju(i)?await this.sendResult({id:a,topic:n,result:i.result,throwOnFailedPublish:!0}):_c(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}=T0();this.events.once(Ti("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:Ei("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=>ake(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,Ei("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(oY).catch(a=>this.client.logger.warn(a))},this.deleteProposal=async(r,n)=>{await Promise.all([this.client.proposal.delete(r,Ei("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=Vu.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=Dv.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,wc(n))},this.sendRequest=async r=>{const{topic:n,method:i,params:a,expiry:o,relayRpcId:s,clientRpcId:c,throwOnFailedPublish:u}=r,f=gg(i,a,c);if(Cw()&&SUe.includes(i)){const m=hg(JSON.stringify(f));this.client.core.verify.register({attestationId:m})}const d=await this.client.core.crypto.encode(n,f),g=Dv[i].req;return o&&(g.ttl=o),s&&(g.id=s),this.client.core.history.set(n,f),u?(g.internal=$v(wo({},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=Dk(n,a),c=await this.client.core.crypto.encode(i,s),u=await this.client.core.history.get(i,n),f=Dv[u.request.method].res;o?(f.internal=$v(wo({},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=cO(r,i),o=await this.client.core.crypto.encode(n,a),s=await this.client.core.history.get(n,r),c=Dv[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=>{_f(i.expiry)&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{_f(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===Vu.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=Vu.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=Vu.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(wo({},n.params));const o=wc(Xt.FIVE_MINUTES),s=wo({id:a,pairingTopic:r,expiry:o},i);await this.setProposal(a,s);const c=hg(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(Ju(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 _c(n)&&(await this.client.proposal.delete(i,Ei("USER_DISCONNECTED")),this.events.emit(Ti("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=wo({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(Ti("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;Ju(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(Ti("session_approve",i),{})):_c(n)&&(await this.client.session.delete(r,Ei("USER_DISCONNECTED")),this.events.emit(Ti("session_approve",i),{error:n.error}))},this.onSessionUpdateRequest=async(r,n)=>{const{params:i,id:a}=n;try{const o=`${r}_session_update`,s=yE.get(o);if(s&&this.isRequestOutOfSync(s,a)){this.client.logger.info(`Discarding out of sync request - ${a}`);return}this.isValidUpdate(wo({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}),yE.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;Ju(n)?this.events.emit(Ti("session_update",i),{}):_c(n)&&this.events.emit(Ti("session_update",i),{error:n.error})},this.onSessionExtendRequest=async(r,n)=>{const{id:i}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,wc(mE)),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;Ju(n)?this.events.emit(Ti("session_extend",i),{}):_c(n)&&this.events.emit(Ti("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(()=>{Ju(n)?this.events.emit(Ti("session_ping",i),{}):_c(n)&&this.events.emit(Ti("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(Ua.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(wo({topic:r},a));const o=hg(JSON.stringify(gg("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;Ju(n)?this.events.emit(Ti("session_request",i),{result:n.result}):_c(n)&&this.events.emit(Ti("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=yE.get(o);if(s&&this.isRequestOutOfSync(s,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(wo({topic:r},a)),this.client.events.emit("session_event",{id:i,topic:r,params:a}),yE.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=Vu.idle,this.processSessionRequestQueue()},Xt.toMiliseconds(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Vu.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=Vu.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,gg("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer},n.id))},this.isValidConnect=async r=>{if(!_o(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(ro(n)||await this.isValidPairingTopic(n),!mke(s,!0)){const{message:c}=Tt("MISSING_OR_INVALID",`connect() relays: ${s}`);throw new Error(c)}!ro(i)&&pg(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!ro(a)&&pg(a)!==0&&this.validateNamespaces(a,"optionalNamespaces"),ro(o)||this.validateSessionProps(o,"sessionProperties")},this.validateNamespaces=(r,n)=>{const i=yke(r,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=async r=>{if(!_o(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=Ox(i,"approve()");if(c)throw new Error(c.message);const u=gK(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)}ro(o)||this.validateSessionProps(o,"sessionProperties")},this.isValidReject=async r=>{if(!_o(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),!bke(i)){const{message:a}=Tt("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidSessionSettleRequest=r=>{if(!_o(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(!voe(n)){const{message:u}=Tt("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(u)}const s=lke(i,"onSessionSettleRequest()");if(s)throw new Error(s.message);const c=Ox(a,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(_f(o)){const{message:u}=Tt("EXPIRED","onSessionSettleRequest()");throw new Error(u)}},this.isValidUpdate=async r=>{if(!_o(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=Ox(i,"update()");if(o)throw new Error(o.message);const s=gK(a.requiredNamespaces,i,"update()");if(s)throw new Error(s.message)},this.isValidExtend=async r=>{if(!_o(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(!_o(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(!wke(i)){const{message:c}=Tt("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!xke(s,a,i.method)){const{message:c}=Tt("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(c)}if(o&&!Ike(o,RN)){const{message:c}=Tt("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${RN.min} and ${RN.max}`);throw new Error(c)}},this.isValidRespond=async r=>{if(!_o(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),!_ke(i)){const{message:a}=Tt("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidPing=async r=>{if(!_o(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(!_o(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(!Eke(i)){const{message:s}=Tt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(s)}if(!Ake(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(!_o(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||z0,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(Ua.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{$k(i)?(this.client.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):uO(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(ws.expired,async e=>{const{topic:r,id:n}=yoe(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(pb.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(_f(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(_f(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(_f(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:r}=Tt("EXPIRED",`proposal id: ${e}`);throw new Error(r)}}}class NUe extends fO{constructor(e,r){super(e,r,_Ue,kk),this.core=e,this.logger=r}}class DUe extends fO{constructor(e,r){super(e,r,EUe,kk),this.core=e,this.logger=r}}class $Ue extends fO{constructor(e,r){super(e,r,AUe,kk,n=>n.id),this.core=e,this.logger=r}}let MUe=class Zoe extends oLe{constructor(e){super(e),this.protocol=Yoe,this.version=Qoe,this.name=TN.name,this.events=new fo.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)||TN.name,this.metadata=(e==null?void 0:e.metadata)||MMe();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)||TN.logger}));this.core=(e==null?void 0:e.core)||new wUe(e),this.logger=un.generateChildLogger(r,this.name),this.session=new DUe(this.core,this.logger),this.proposal=new NUe(this.core,this.logger),this.pendingRequest=new $Ue(this.core,this.logger),this.engine=new CUe(this)}static async init(e){const r=new Zoe(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 b5={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(B){return B&&DataView.prototype.isPrototypeOf(B)}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(B){return B&&u.indexOf(Object.prototype.toString.call(B))>-1};function d(B){if(typeof B!="string"&&(B=String(B)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(B))throw new TypeError("Invalid character in header field name");return B.toLowerCase()}function g(B){return typeof B!="string"&&(B=String(B)),B}function m(B){var U={next:function(){var K=B.shift();return{done:K===void 0,value:K}}};return s.iterable&&(U[Symbol.iterator]=function(){return U}),U}function w(B){this.map={},B instanceof w?B.forEach(function(U,K){this.append(K,U)},this):Array.isArray(B)?B.forEach(function(U){this.append(U[0],U[1])},this):B&&Object.getOwnPropertyNames(B).forEach(function(U){this.append(U,B[U])},this)}w.prototype.append=function(B,U){B=d(B),U=g(U);var K=this.map[B];this.map[B]=K?K+", "+U:U},w.prototype.delete=function(B){delete this.map[d(B)]},w.prototype.get=function(B){return B=d(B),this.has(B)?this.map[B]:null},w.prototype.has=function(B){return this.map.hasOwnProperty(d(B))},w.prototype.set=function(B,U){this.map[d(B)]=g(U)},w.prototype.forEach=function(B,U){for(var K in this.map)this.map.hasOwnProperty(K)&&B.call(U,this.map[K],K,this)},w.prototype.keys=function(){var B=[];return this.forEach(function(U,K){B.push(K)}),m(B)},w.prototype.values=function(){var B=[];return this.forEach(function(U){B.push(U)}),m(B)},w.prototype.entries=function(){var B=[];return this.forEach(function(U,K){B.push([K,U])}),m(B)},s.iterable&&(w.prototype[Symbol.iterator]=w.prototype.entries);function v(B){if(B.bodyUsed)return Promise.reject(new TypeError("Already read"));B.bodyUsed=!0}function y(B){return new Promise(function(U,K){B.onload=function(){U(B.result)},B.onerror=function(){K(B.error)}})}function _(B){var U=new FileReader,K=y(U);return U.readAsArrayBuffer(B),K}function b(B){var U=new FileReader,K=y(U);return U.readAsText(B),K}function S(B){for(var U=new Uint8Array(B),K=new Array(U.length),ne=0;ne<U.length;ne++)K[ne]=String.fromCharCode(U[ne]);return K.join("")}function x(B){if(B.slice)return B.slice(0);var U=new Uint8Array(B.byteLength);return U.set(new Uint8Array(B)),U.buffer}function O(){return this.bodyUsed=!1,this._initBody=function(B){this._bodyInit=B,B?typeof B=="string"?this._bodyText=B:s.blob&&Blob.prototype.isPrototypeOf(B)?this._bodyBlob=B:s.formData&&FormData.prototype.isPrototypeOf(B)?this._bodyFormData=B:s.searchParams&&URLSearchParams.prototype.isPrototypeOf(B)?this._bodyText=B.toString():s.arrayBuffer&&s.blob&&c(B)?(this._bodyArrayBuffer=x(B.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(B)||f(B))?this._bodyArrayBuffer=x(B):this._bodyText=B=Object.prototype.toString.call(B):this._bodyText="",this.headers.get("content-type")||(typeof B=="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(B)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s.blob&&(this.blob=function(){var B=v(this);if(B)return B;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 B=v(this);if(B)return B;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(B){var U=B.toUpperCase();return E.indexOf(U)>-1?U:B}function I(B,U){U=U||{};var K=U.body;if(B instanceof I){if(B.bodyUsed)throw new TypeError("Already read");this.url=B.url,this.credentials=B.credentials,U.headers||(this.headers=new w(B.headers)),this.method=B.method,this.mode=B.mode,this.signal=B.signal,!K&&B._bodyInit!=null&&(K=B._bodyInit,B.bodyUsed=!0)}else this.url=String(B);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)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function C(B){var U=new FormData;return B.trim().split("&").forEach(function(K){if(K){var ne=K.split("="),F=ne.shift().replace(/\+/g," "),j=ne.join("=").replace(/\+/g," ");U.append(decodeURIComponent(F),decodeURIComponent(j))}}),U}function L(B){var U=new w,K=B.replace(/\r?\n[\t ]+/g," ");return K.split(/\r?\n/).forEach(function(ne){var F=ne.split(":"),j=F.shift().trim();if(j){var z=F.join(":").trim();U.append(j,z)}}),U}O.call(I.prototype);function q(B,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(B)}O.call(q.prototype),q.prototype.clone=function(){return new q(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new w(this.headers),url:this.url})},q.error=function(){var B=new q(null,{status:0,statusText:""});return B.type="error",B};var le=[301,302,303,307,308];q.redirect=function(B,U){if(le.indexOf(U)===-1)throw new RangeError("Invalid status code");return new q(null,{status:U,headers:{location:B}})},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 pe(B,U){return new Promise(function(K,ne){var F=new I(B,U);if(F.signal&&F.signal.aborted)return ne(new o.DOMException("Aborted","AbortError"));var j=new XMLHttpRequest;function z(){j.abort()}j.onload=function(){var $={status:j.status,statusText:j.statusText,headers:L(j.getAllResponseHeaders()||"")};$.url="responseURL"in j?j.responseURL:$.headers.get("X-Request-URL");var H="response"in j?j.response:j.responseText;K(new q(H,$))},j.onerror=function(){ne(new TypeError("Network request failed"))},j.ontimeout=function(){ne(new TypeError("Network request failed"))},j.onabort=function(){ne(new o.DOMException("Aborted","AbortError"))},j.open(F.method,F.url,!0),F.credentials==="include"?j.withCredentials=!0:F.credentials==="omit"&&(j.withCredentials=!1),"responseType"in j&&s.blob&&(j.responseType="blob"),F.headers.forEach(function($,H){j.setRequestHeader(H,$)}),F.signal&&(F.signal.addEventListener("abort",z),j.onreadystatechange=function(){j.readyState===4&&F.signal.removeEventListener("abort",z)}),j.send(typeof F._bodyInit>"u"?null:F._bodyInit)})}return pe.polyfill=!0,a.fetch||(a.fetch=pe,a.Headers=w,a.Request=I,a.Response=q),o.Headers=w,o.Request=I,o.Response=q,o.fetch=pe,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})(b5,b5.exports);var kUe=b5.exports;const uY=Nc(kUe),LUe={Accept:"application/json","Content-Type":"application/json"},UUe="POST",lY={headers:LUe,method:UUe},fY=10;class Sd{constructor(e,r=!1){if(this.url=e,this.disableProviderPing=r,this.events=new fo.EventEmitter,this.isAvailable=!1,this.registering=!1,!LK(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=I1(e),a=await(await uY(this.url,Object.assign(Object.assign({},lY),{body:n}))).json();this.onPayload({data:a})}catch(n){this.onError(e.id,n)}}async register(e=this.url){if(!LK(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=I1({id:1,jsonrpc:"2.0",method:"test",params:[]});await uY(e,Object.assign(Object.assign({},lY),{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"?Tk(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),a=cO(e,i);this.events.emit("payload",a)}parseError(e,r=this.url){return Toe(e,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>fY&&this.events.setMaxListeners(fY)}}const dY="error",BUe="wss://relay.walletconnect.com",FUe="wc",jUe="universal_provider",hY=`${FUe}@2:${jUe}:`,qUe="https://rpc.walletconnect.com/v1/",Vl={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Mv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof bn<"u"?bn:typeof self<"u"?self:{},w5={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,O=32,E=64,p=128,I=256,C=512,L=30,q="...",le=800,pe=16,B=1,U=2,K=3,ne=1/0,F=9007199254740991,j=17976931348623157e292,z=0/0,$=4294967295,H=$-1,k=$>>>1,M=[["ary",p],["bind",y],["bindKey",_],["curry",S],["curryRight",x],["flip",C],["partial",O],["partialRight",E],["rearg",I]],G="[object Arguments]",ge="[object Array]",Q="[object AsyncFunction]",te="[object Boolean]",ce="[object Date]",T="[object DOMException]",fe="[object Error]",ze="[object Function]",tt="[object GeneratorFunction]",mt="[object Map]",vt="[object Number]",gt="[object Null]",Lt="[object Object]",Yt="[object Promise]",wr="[object Proxy]",Rt="[object RegExp]",Pt="[object Set]",kt="[object String]",Nt="[object Symbol]",Kt="[object Undefined]",Ut="[object WeakMap]",zt="[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]",mr="[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,xr=/[&<>"']/g,$r=RegExp(Kn.source),_r=RegExp(xr.source),_e=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,ve=/<%=([\s\S]+?)%>/g,Re=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,He=/^\w*$/,Xe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,st=/[\\^$.*+?()[\]{}|]/g,lt=RegExp(st.source),_t=/^\s+/,ue=/\s/,Z=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ye=/\{\n\/\* \[wrapped with (.+)\] \*/,Me=/,? & /,Le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wt=/[()=,{}\[\]\/\s]/,Ot=/\\(\\)?/g,pr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,en=/^[-+]0x[0-9a-f]+$/i,gr=/^0b[01]+$/i,Er=/^\[object .+?Constructor\]$/,on=/^0o[0-7]+$/i,sr=/^(?:0|[1-9]\d*)$/,Lr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gn=/($^)/,Ur=/['\n\r\u2028\u2029\\]/g,Zn="\\ud800-\\udfff",Si="\\u0300-\\u036f",ei="\\ufe20-\\ufe2f",Oi="\\u20d0-\\u20ff",Ii=Si+ei+Oi,oi="\\u2700-\\u27bf",Fn="a-z\\xdf-\\xf6\\xf8-\\xff",ra="\\xac\\xb1\\xd7\\xf7",$i="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_a="\\u2000-\\u206f",as=" \\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+as,Ee="['’]",be="["+Zn+"]",Oe="["+re+"]",Qe="["+Ii+"]",ft="\\d+",Ye="["+oi+"]",Ve="["+Fn+"]",ht="[^"+Zn+re+ft+oi+Fn+X+"]",Vt="\\ud83c[\\udffb-\\udfff]",Tr="(?:"+Qe+"|"+Vt+")",Wr="[^"+Zn+"]",Fr="(?:\\ud83c[\\udde6-\\uddff]){2}",_n="[\\ud800-\\udbff][\\udc00-\\udfff]",jr="["+X+"]",P="\\u200d",D="(?:"+Ve+"|"+ht+")",W="(?:"+jr+"|"+ht+")",he="(?:"+Ee+"(?:d|ll|m|re|s|t|ve))?",Se="(?:"+Ee+"(?:D|LL|M|RE|S|T|VE))?",Ce=Tr+"?",rt="["+me+"]?",At="(?:"+P+"(?:"+[Wr,Fr,_n].join("|")+")"+rt+Ce+")*",Ft="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pi=rt+Ce+At,xn="(?:"+[Ye,Fr,_n].join("|")+")"+Pi,St="(?:"+[Wr+Qe+"?",Qe,Fr,_n,be].join("|")+")",si=RegExp(Ee,"g"),An=RegExp(Qe,"g"),fn=RegExp(Vt+"(?="+Vt+")|"+St+Pi,"g"),yi=RegExp([jr+"?"+Ve+"+"+he+"(?="+[Oe,jr,"$"].join("|")+")",W+"+"+Se+"(?="+[Oe,jr+D,"$"].join("|")+")",jr+"?"+D+"+"+he,jr+"+"+Se,Jt,Ft,ft,xn].join("|"),"g"),ho=RegExp("["+P+Zn+Ii+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 ]/,mi=["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"],po=-1,tn={};tn[qt]=tn[Mt]=tn[cr]=tn[tr]=tn[ir]=tn[nr]=tn[mr]=tn[wn]=tn[Yr]=!0,tn[G]=tn[ge]=tn[$t]=tn[te]=tn[Dt]=tn[ce]=tn[fe]=tn[ze]=tn[mt]=tn[vt]=tn[Lt]=tn[Rt]=tn[Pt]=tn[kt]=tn[Ut]=!1;var Ar={};Ar[G]=Ar[ge]=Ar[$t]=Ar[Dt]=Ar[te]=Ar[ce]=Ar[qt]=Ar[Mt]=Ar[cr]=Ar[tr]=Ar[ir]=Ar[mt]=Ar[vt]=Ar[Lt]=Ar[Rt]=Ar[Pt]=Ar[kt]=Ar[Nt]=Ar[nr]=Ar[mr]=Ar[wn]=Ar[Yr]=!0,Ar[fe]=Ar[ze]=Ar[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={"&":"&","<":"<",">":">",""":'"',"'":"'"},We={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,fr=parseInt,yn=typeof Mv=="object"&&Mv&&Mv.Object===Object&&Mv,ar=typeof self=="object"&&self&&self.Object===Object&&self,yr=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,Ie=se&&se.isDate,Pe=se&&se.isMap,Be=se&&se.isRegExp,Ke=se&&se.isSet,qe=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 Cr=-1,En=Ue==null?0:Ue.length;++Cr<En;){var Li=Ue[Cr];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,Cr=0,En=[];++et<Bt;){var Li=Ue[et];nt(Li,et,Ue)&&(En[Cr++]=Li)}return En}function Mr(Ue,nt){var et=Ue==null?0:Ue.length;return!!et&&Zs(Ue,nt,0)>-1}function Xr(Ue,nt,et){for(var Bt=-1,Cr=Ue==null?0:Ue.length;++Bt<Cr;)if(et(nt,Ue[Bt]))return!0;return!1}function Sr(Ue,nt){for(var et=-1,Bt=Ue==null?0:Ue.length,Cr=Array(Bt);++et<Bt;)Cr[et]=nt(Ue[et],et,Ue);return Cr}function Hi(Ue,nt){for(var et=-1,Bt=nt.length,Cr=Ue.length;++et<Bt;)Ue[Cr+et]=nt[et];return Ue}function os(Ue,nt,et,Bt){var Cr=-1,En=Ue==null?0:Ue.length;for(Bt&&En&&(et=Ue[++Cr]);++Cr<En;)et=nt(et,Ue[Cr],Cr,Ue);return et}function Lc(Ue,nt,et,Bt){var Cr=Ue==null?0:Ue.length;for(Bt&&Cr&&(et=Ue[--Cr]);Cr--;)et=nt(et,Ue[Cr],Cr,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 ss=Gl("length");function ki(Ue){return Ue.split("")}function di(Ue){return Ue.match(Le)||[]}function Sn(Ue,nt,et){var Bt;return et(Ue,function(Cr,En,Li){if(nt(Cr,En,Li))return Bt=En,!1}),Bt}function Pu(Ue,nt,et,Bt){for(var Cr=Ue.length,En=et+(Bt?1:-1);Bt?En--:++En<Cr;)if(nt(Ue[En],En,Ue))return En;return-1}function Zs(Ue,nt,et){return nt===nt?zp(Ue,nt,et):Pu(Ue,Rd,et)}function Dp(Ue,nt,et,Bt){for(var Cr=et-1,En=Ue.length;++Cr<En;)if(Bt(Ue[Cr],nt))return Cr;return-1}function Rd(Ue){return Ue!==Ue}function Cd(Ue,nt){var et=Ue==null?0:Ue.length;return et?Kl(Ue,nt)/et:z}function Gl(Ue){return function(nt){return nt==null?r:nt[Ue]}}function Wl(Ue){return function(nt){return Ue==null?r:Ue[nt]}}function Nd(Ue,nt,et,Bt,Cr){return Cr(Ue,function(En,Li,Un){et=Bt?(Bt=!1,En):nt(et,En,Li,Un)}),et}function $p(Ue,nt){var et=Ue.length;for(Ue.sort(nt);et--;)Ue[et]=Ue[et].value;return Ue}function Kl(Ue,nt){for(var et,Bt=-1,Cr=Ue.length;++Bt<Cr;){var En=nt(Ue[Bt]);En!==r&&(et=et===r?En:et+En)}return et}function Yl(Ue,nt){for(var et=-1,Bt=Array(Ue);++et<Ue;)Bt[et]=nt(et);return Bt}function Mp(Ue,nt){return Sr(nt,function(et){return[et,Ue[et]]})}function Dd(Ue){return Ue&&Ue.slice(0,Ld(Ue)+1).replace(_t,"")}function zi(Ue){return function(nt){return Ue(nt)}}function Ql(Ue,nt){return Sr(nt,function(et){return Ue[et]})}function Uc(Ue,nt){return Ue.has(nt)}function $d(Ue,nt){for(var et=-1,Bt=Ue.length;++et<Bt&&Zs(nt,Ue[et],0)>-1;);return et}function Md(Ue,nt){for(var et=Ue.length;et--&&Zs(nt,Ue[et],0)>-1;);return et}function kp(Ue,nt){for(var et=Ue.length,Bt=0;et--;)Ue[et]===nt&&++Bt;return Bt}var Lp=Wl(de),Up=Wl(ke);function Bp(Ue){return"\\"+We[Ue]}function Fp(Ue,nt){return Ue==null?r:Ue[nt]}function ec(Ue){return ho.test(Ue)}function jp(Ue){return qi.test(Ue)}function qp(Ue){for(var nt,et=[];!(nt=Ue.next()).done;)et.push(nt.value);return et}function Jl(Ue){var nt=-1,et=Array(Ue.size);return Ue.forEach(function(Bt,Cr){et[++nt]=[Cr,Bt]}),et}function kd(Ue,nt){return function(et){return Ue(nt(et))}}function Bo(Ue,nt){for(var et=-1,Bt=Ue.length,Cr=0,En=[];++et<Bt;){var Li=Ue[et];(Li===nt||Li===f)&&(Ue[et]=f,En[Cr++]=et)}return En}function Tu(Ue){var nt=-1,et=Array(Ue.size);return Ue.forEach(function(Bt){et[++nt]=Bt}),et}function Hp(Ue){var nt=-1,et=Array(Ue.size);return Ue.forEach(function(Bt){et[++nt]=[Bt,Bt]}),et}function zp(Ue,nt,et){for(var Bt=et-1,Cr=Ue.length;++Bt<Cr;)if(Ue[Bt]===nt)return Bt;return-1}function Vp(Ue,nt,et){for(var Bt=et+1;Bt--;)if(Ue[Bt]===nt)return Bt;return Bt}function tc(Ue){return ec(Ue)?kce(Ue):ss(Ue)}function Ea(Ue){return ec(Ue)?Lce(Ue):ki(Ue)}function Ld(Ue){for(var nt=Ue.length;nt--&&ue.test(Ue.charAt(nt)););return nt}var Gp=Wl(it);function kce(Ue){for(var nt=fn.lastIndex=0;fn.test(Ue);)++nt;return nt}function Lce(Ue){return Ue.match(fn)||[]}function Uce(Ue){return Ue.match(yi)||[]}var Bce=function Ue(nt){nt=nt==null?yr:Wp.defaults(yr.Object(),nt,Wp.pick(yr,mi));var et=nt.Array,Bt=nt.Date,Cr=nt.Error,En=nt.Function,Li=nt.Math,Un=nt.Object,RO=nt.RegExp,Fce=nt.String,cs=nt.TypeError,jw=et.prototype,jce=En.prototype,Kp=Un.prototype,qw=nt["__core-js_shared__"],Hw=jce.toString,Tn=Kp.hasOwnProperty,qce=0,EL=function(){var l=/[^.]+$/.exec(qw&&qw.keys&&qw.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),zw=Kp.toString,Hce=Hw.call(Un),zce=yr._,Vce=RO("^"+Hw.call(Tn).replace(st,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vw=oe?nt.Buffer:r,Xl=nt.Symbol,Gw=nt.Uint8Array,xL=Vw?Vw.allocUnsafe:r,Ww=kd(Un.getPrototypeOf,Un),AL=Un.create,SL=Kp.propertyIsEnumerable,Kw=jw.splice,OL=Xl?Xl.isConcatSpreadable:r,lm=Xl?Xl.iterator:r,Ud=Xl?Xl.toStringTag:r,Yw=function(){try{var l=Hd(Un,"defineProperty");return l({},"",{}),l}catch{}}(),Gce=nt.clearTimeout!==yr.clearTimeout&&nt.clearTimeout,Wce=Bt&&Bt.now!==yr.Date.now&&Bt.now,Kce=nt.setTimeout!==yr.setTimeout&&nt.setTimeout,Qw=Li.ceil,Jw=Li.floor,CO=Un.getOwnPropertySymbols,Yce=Vw?Vw.isBuffer:r,IL=nt.isFinite,Qce=jw.join,Jce=kd(Un.keys,Un),Ui=Li.max,xa=Li.min,Xce=Bt.now,Zce=nt.parseInt,PL=Li.random,eue=jw.reverse,NO=Hd(nt,"DataView"),fm=Hd(nt,"Map"),DO=Hd(nt,"Promise"),Yp=Hd(nt,"Set"),dm=Hd(nt,"WeakMap"),hm=Hd(Un,"create"),Xw=dm&&new dm,Qp={},tue=zd(NO),rue=zd(fm),nue=zd(DO),iue=zd(Yp),aue=zd(dm),Zw=Xl?Xl.prototype:r,pm=Zw?Zw.valueOf:r,TL=Zw?Zw.toString:r;function J(l){if(hi(l)&&!Dr(l)&&!(l instanceof rn)){if(l instanceof us)return l;if(Tn.call(l,"__wrapped__"))return R9(l)}return new us(l)}var Jp=function(){function l(){}return function(h){if(!ci(h))return{};if(AL)return AL(h);l.prototype=h;var A=new l;return l.prototype=r,A}}();function e_(){}function us(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=e_.prototype,J.prototype.constructor=J,us.prototype=Jp(e_.prototype),us.prototype.constructor=us;function rn(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=$,this.__views__=[]}function oue(){var l=new rn(this.__wrapped__);return l.__actions__=go(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=go(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=go(this.__views__),l}function sue(){if(this.__filtered__){var l=new rn(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function cue(){var l=this.__wrapped__.value(),h=this.__dir__,A=Dr(l),N=h<0,V=A?l.length:0,ae=wle(0,V,this.__views__),xe=ae.start,De=ae.end,Fe=De-xe,at=N?De:xe-1,ot=this.__iteratees__,dt=ot.length,It=0,Qt=xa(Fe,this.__takeCount__);if(!A||!N&&V==Fe&&Qt==Fe)return ZL(l,this.__actions__);var dr=[];e:for(;Fe--&&It<Qt;){at+=h;for(var qr=-1,hr=l[at];++qr<dt;){var Zr=ot[qr],sn=Zr.iteratee,qo=Zr.type,Ka=sn(hr);if(qo==U)hr=Ka;else if(!Ka){if(qo==B)continue e;break e}}dr[It++]=hr}return dr}rn.prototype=Jp(e_.prototype),rn.prototype.constructor=rn;function Bd(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.__data__=hm?hm(null):{},this.size=0}function lue(l){var h=this.has(l)&&delete this.__data__[l];return this.size-=h?1:0,h}function fue(l){var h=this.__data__;if(hm){var A=h[l];return A===c?r:A}return Tn.call(h,l)?h[l]:r}function due(l){var h=this.__data__;return hm?h[l]!==r:Tn.call(h,l)}function hue(l,h){var A=this.__data__;return this.size+=this.has(l)?0:1,A[l]=hm&&h===r?c:h,this}Bd.prototype.clear=uue,Bd.prototype.delete=lue,Bd.prototype.get=fue,Bd.prototype.has=due,Bd.prototype.set=hue;function Ru(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__=[],this.size=0}function gue(l){var h=this.__data__,A=t_(h,l);if(A<0)return!1;var N=h.length-1;return A==N?h.pop():Kw.call(h,A,1),--this.size,!0}function yue(l){var h=this.__data__,A=t_(h,l);return A<0?r:h[A][1]}function mue(l){return t_(this.__data__,l)>-1}function vue(l,h){var A=this.__data__,N=t_(A,l);return N<0?(++this.size,A.push([l,h])):A[N][1]=h,this}Ru.prototype.clear=pue,Ru.prototype.delete=gue,Ru.prototype.get=yue,Ru.prototype.has=mue,Ru.prototype.set=vue;function Cu(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 bue(){this.size=0,this.__data__={hash:new Bd,map:new(fm||Ru),string:new Bd}}function wue(l){var h=h_(this,l).delete(l);return this.size-=h?1:0,h}function _ue(l){return h_(this,l).get(l)}function Eue(l){return h_(this,l).has(l)}function xue(l,h){var A=h_(this,l),N=A.size;return A.set(l,h),this.size+=A.size==N?0:1,this}Cu.prototype.clear=bue,Cu.prototype.delete=wue,Cu.prototype.get=_ue,Cu.prototype.has=Eue,Cu.prototype.set=xue;function Fd(l){var h=-1,A=l==null?0:l.length;for(this.__data__=new Cu;++h<A;)this.add(l[h])}function Aue(l){return this.__data__.set(l,c),this}function Sue(l){return this.__data__.has(l)}Fd.prototype.add=Fd.prototype.push=Aue,Fd.prototype.has=Sue;function rc(l){var h=this.__data__=new Ru(l);this.size=h.size}function Oue(){this.__data__=new Ru,this.size=0}function Iue(l){var h=this.__data__,A=h.delete(l);return this.size=h.size,A}function Pue(l){return this.__data__.get(l)}function Tue(l){return this.__data__.has(l)}function Rue(l,h){var A=this.__data__;if(A instanceof Ru){var N=A.__data__;if(!fm||N.length<i-1)return N.push([l,h]),this.size=++A.size,this;A=this.__data__=new Cu(N)}return A.set(l,h),this.size=A.size,this}rc.prototype.clear=Oue,rc.prototype.delete=Iue,rc.prototype.get=Pue,rc.prototype.has=Tue,rc.prototype.set=Rue;function RL(l,h){var A=Dr(l),N=!A&&Vd(l),V=!A&&!N&&nf(l),ae=!A&&!N&&!V&&t0(l),xe=A||N||V||ae,De=xe?Yl(l.length,Fce):[],Fe=De.length;for(var at in l)(h||Tn.call(l,at))&&!(xe&&(at=="length"||V&&(at=="offset"||at=="parent")||ae&&(at=="buffer"||at=="byteLength"||at=="byteOffset")||Mu(at,Fe)))&&De.push(at);return De}function CL(l){var h=l.length;return h?l[zO(0,h-1)]:r}function Cue(l,h){return p_(go(l),jd(h,0,l.length))}function Nue(l){return p_(go(l))}function $O(l,h,A){(A!==r&&!nc(l[h],A)||A===r&&!(h in l))&&Nu(l,h,A)}function gm(l,h,A){var N=l[h];(!(Tn.call(l,h)&&nc(N,A))||A===r&&!(h in l))&&Nu(l,h,A)}function t_(l,h){for(var A=l.length;A--;)if(nc(l[A][0],h))return A;return-1}function Due(l,h,A,N){return Zl(l,function(V,ae,xe){h(N,V,A(V),xe)}),N}function NL(l,h){return l&&Fc(h,Vi(h),l)}function $ue(l,h){return l&&Fc(h,mo(h),l)}function Nu(l,h,A){h=="__proto__"&&Yw?Yw(l,h,{configurable:!0,enumerable:!0,value:A,writable:!0}):l[h]=A}function MO(l,h){for(var A=-1,N=h.length,V=et(N),ae=l==null;++A<N;)V[A]=ae?r:gI(l,h[A]);return V}function jd(l,h,A){return l===l&&(A!==r&&(l=l<=A?l:A),h!==r&&(l=l>=h?l:h)),l}function ls(l,h,A,N,V,ae){var xe,De=h&d,Fe=h&g,at=h&m;if(A&&(xe=V?A(l,N,V,ae):A(l)),xe!==r)return xe;if(!ci(l))return l;var ot=Dr(l);if(ot){if(xe=Ele(l),!De)return go(l,xe)}else{var dt=Aa(l),It=dt==ze||dt==tt;if(nf(l))return r9(l,De);if(dt==Lt||dt==G||It&&!V){if(xe=Fe||It?{}:_9(l),!De)return Fe?fle(l,$ue(xe,l)):lle(l,NL(xe,l))}else{if(!Ar[dt])return V?l:{};xe=xle(l,dt,De)}}ae||(ae=new rc);var Qt=ae.get(l);if(Qt)return Qt;ae.set(l,xe),Q9(l)?l.forEach(function(hr){xe.add(ls(hr,h,A,hr,l,ae))}):K9(l)&&l.forEach(function(hr,Zr){xe.set(Zr,ls(hr,h,A,Zr,l,ae))});var dr=at?Fe?tI:eI:Fe?mo:Vi,qr=ot?r:dr(l);return Wt(qr||l,function(hr,Zr){qr&&(Zr=hr,hr=l[Zr]),gm(xe,Zr,ls(hr,h,A,Zr,l,ae))}),xe}function Mue(l){var h=Vi(l);return function(A){return DL(A,l,h)}}function DL(l,h,A){var N=A.length;if(l==null)return!N;for(l=Un(l);N--;){var V=A[N],ae=h[V],xe=l[V];if(xe===r&&!(V in l)||!ae(xe))return!1}return!0}function $L(l,h,A){if(typeof l!="function")throw new cs(o);return Em(function(){l.apply(r,A)},h)}function ym(l,h,A,N){var V=-1,ae=Mr,xe=!0,De=l.length,Fe=[],at=h.length;if(!De)return Fe;A&&(h=Sr(h,zi(A))),N?(ae=Xr,xe=!1):h.length>=i&&(ae=Uc,xe=!1,h=new Fd(h));e:for(;++V<De;){var ot=l[V],dt=A==null?ot:A(ot);if(ot=N||ot!==0?ot:0,xe&&dt===dt){for(var It=at;It--;)if(h[It]===dt)continue e;Fe.push(ot)}else ae(h,dt,N)||Fe.push(ot)}return Fe}var Zl=s9(Bc),ML=s9(LO,!0);function kue(l,h){var A=!0;return Zl(l,function(N,V,ae){return A=!!h(N,V,ae),A}),A}function r_(l,h,A){for(var N=-1,V=l.length;++N<V;){var ae=l[N],xe=h(ae);if(xe!=null&&(De===r?xe===xe&&!jo(xe):A(xe,De)))var De=xe,Fe=ae}return Fe}function Lue(l,h,A,N){var V=l.length;for(A=Br(A),A<0&&(A=-A>V?0:V+A),N=N===r||N>V?V:Br(N),N<0&&(N+=V),N=A>N?0:X9(N);A<N;)l[A++]=h;return l}function kL(l,h){var A=[];return Zl(l,function(N,V,ae){h(N,V,ae)&&A.push(N)}),A}function na(l,h,A,N,V){var ae=-1,xe=l.length;for(A||(A=Sle),V||(V=[]);++ae<xe;){var De=l[ae];h>0&&A(De)?h>1?na(De,h-1,A,N,V):Hi(V,De):N||(V[V.length]=De)}return V}var kO=c9(),LL=c9(!0);function Bc(l,h){return l&&kO(l,h,Vi)}function LO(l,h){return l&&LL(l,h,Vi)}function n_(l,h){return dn(h,function(A){return ku(l[A])})}function qd(l,h){h=tf(h,l);for(var A=0,N=h.length;l!=null&&A<N;)l=l[jc(h[A++])];return A&&A==N?l:r}function UL(l,h,A){var N=h(l);return Dr(l)?N:Hi(N,A(l))}function Ga(l){return l==null?l===r?Kt:gt:Ud&&Ud in Un(l)?ble(l):Nle(l)}function UO(l,h){return l>h}function Uue(l,h){return l!=null&&Tn.call(l,h)}function Bue(l,h){return l!=null&&h in Un(l)}function Fue(l,h,A){return l>=xa(h,A)&&l<Ui(h,A)}function BO(l,h,A){for(var N=A?Xr:Mr,V=l[0].length,ae=l.length,xe=ae,De=et(ae),Fe=1/0,at=[];xe--;){var ot=l[xe];xe&&h&&(ot=Sr(ot,zi(h))),Fe=xa(ot.length,Fe),De[xe]=!A&&(h||V>=120&&ot.length>=120)?new Fd(xe&&ot):r}ot=l[0];var dt=-1,It=De[0];e:for(;++dt<V&&at.length<Fe;){var Qt=ot[dt],dr=h?h(Qt):Qt;if(Qt=A||Qt!==0?Qt:0,!(It?Uc(It,dr):N(at,dr,A))){for(xe=ae;--xe;){var qr=De[xe];if(!(qr?Uc(qr,dr):N(l[xe],dr,A)))continue e}It&&It.push(dr),at.push(Qt)}}return at}function jue(l,h,A,N){return Bc(l,function(V,ae,xe){h(N,A(V),ae,xe)}),N}function mm(l,h,A){h=tf(h,l),l=S9(l,h);var N=l==null?l:l[jc(ds(h))];return N==null?r:pt(N,l,A)}function BL(l){return hi(l)&&Ga(l)==G}function que(l){return hi(l)&&Ga(l)==$t}function Hue(l){return hi(l)&&Ga(l)==ce}function vm(l,h,A,N,V){return l===h?!0:l==null||h==null||!hi(l)&&!hi(h)?l!==l&&h!==h:zue(l,h,A,N,vm,V)}function zue(l,h,A,N,V,ae){var xe=Dr(l),De=Dr(h),Fe=xe?ge:Aa(l),at=De?ge:Aa(h);Fe=Fe==G?Lt:Fe,at=at==G?Lt:at;var ot=Fe==Lt,dt=at==Lt,It=Fe==at;if(It&&nf(l)){if(!nf(h))return!1;xe=!0,ot=!1}if(It&&!ot)return ae||(ae=new rc),xe||t0(l)?v9(l,h,A,N,V,ae):mle(l,h,Fe,A,N,V,ae);if(!(A&w)){var Qt=ot&&Tn.call(l,"__wrapped__"),dr=dt&&Tn.call(h,"__wrapped__");if(Qt||dr){var qr=Qt?l.value():l,hr=dr?h.value():h;return ae||(ae=new rc),V(qr,hr,A,N,ae)}}return It?(ae||(ae=new rc),vle(l,h,A,N,V,ae)):!1}function Vue(l){return hi(l)&&Aa(l)==mt}function FO(l,h,A,N){var V=A.length,ae=V,xe=!N;if(l==null)return!ae;for(l=Un(l);V--;){var De=A[V];if(xe&&De[2]?De[1]!==l[De[0]]:!(De[0]in l))return!1}for(;++V<ae;){De=A[V];var Fe=De[0],at=l[Fe],ot=De[1];if(xe&&De[2]){if(at===r&&!(Fe in l))return!1}else{var dt=new rc;if(N)var It=N(at,ot,Fe,l,h,dt);if(!(It===r?vm(ot,at,w|v,N,dt):It))return!1}}return!0}function FL(l){if(!ci(l)||Ile(l))return!1;var h=ku(l)?Vce:Er;return h.test(zd(l))}function Gue(l){return hi(l)&&Ga(l)==Rt}function Wue(l){return hi(l)&&Aa(l)==Pt}function Kue(l){return hi(l)&&w_(l.length)&&!!tn[Ga(l)]}function jL(l){return typeof l=="function"?l:l==null?vo:typeof l=="object"?Dr(l)?zL(l[0],l[1]):HL(l):u7(l)}function jO(l){if(!_m(l))return Jce(l);var h=[];for(var A in Un(l))Tn.call(l,A)&&A!="constructor"&&h.push(A);return h}function Yue(l){if(!ci(l))return Cle(l);var h=_m(l),A=[];for(var N in l)N=="constructor"&&(h||!Tn.call(l,N))||A.push(N);return A}function qO(l,h){return l<h}function qL(l,h){var A=-1,N=yo(l)?et(l.length):[];return Zl(l,function(V,ae,xe){N[++A]=h(V,ae,xe)}),N}function HL(l){var h=nI(l);return h.length==1&&h[0][2]?x9(h[0][0],h[0][1]):function(A){return A===l||FO(A,l,h)}}function zL(l,h){return aI(l)&&E9(h)?x9(jc(l),h):function(A){var N=gI(A,l);return N===r&&N===h?yI(A,l):vm(h,N,w|v)}}function i_(l,h,A,N,V){l!==h&&kO(h,function(ae,xe){if(V||(V=new rc),ci(ae))Que(l,h,xe,A,i_,N,V);else{var De=N?N(sI(l,xe),ae,xe+"",l,h,V):r;De===r&&(De=ae),$O(l,xe,De)}},mo)}function Que(l,h,A,N,V,ae,xe){var De=sI(l,A),Fe=sI(h,A),at=xe.get(Fe);if(at){$O(l,A,at);return}var ot=ae?ae(De,Fe,A+"",l,h,xe):r,dt=ot===r;if(dt){var It=Dr(Fe),Qt=!It&&nf(Fe),dr=!It&&!Qt&&t0(Fe);ot=Fe,It||Qt||dr?Dr(De)?ot=De:vi(De)?ot=go(De):Qt?(dt=!1,ot=r9(Fe,!0)):dr?(dt=!1,ot=n9(Fe,!0)):ot=[]:xm(Fe)||Vd(Fe)?(ot=De,Vd(De)?ot=Z9(De):(!ci(De)||ku(De))&&(ot=_9(Fe))):dt=!1}dt&&(xe.set(Fe,ot),V(ot,Fe,N,ae,xe),xe.delete(Fe)),$O(l,A,ot)}function VL(l,h){var A=l.length;if(A)return h+=h<0?A:0,Mu(h,A)?l[h]:r}function GL(l,h,A){h.length?h=Sr(h,function(ae){return Dr(ae)?function(xe){return qd(xe,ae.length===1?ae[0]:ae)}:ae}):h=[vo];var N=-1;h=Sr(h,zi(ur()));var V=qL(l,function(ae,xe,De){var Fe=Sr(h,function(at){return at(ae)});return{criteria:Fe,index:++N,value:ae}});return $p(V,function(ae,xe){return ule(ae,xe,A)})}function Jue(l,h){return WL(l,h,function(A,N){return yI(l,N)})}function WL(l,h,A){for(var N=-1,V=h.length,ae={};++N<V;){var xe=h[N],De=qd(l,xe);A(De,xe)&&bm(ae,tf(xe,l),De)}return ae}function Xue(l){return function(h){return qd(h,l)}}function HO(l,h,A,N){var V=N?Dp:Zs,ae=-1,xe=h.length,De=l;for(l===h&&(h=go(h)),A&&(De=Sr(l,zi(A)));++ae<xe;)for(var Fe=0,at=h[ae],ot=A?A(at):at;(Fe=V(De,ot,Fe,N))>-1;)De!==l&&Kw.call(De,Fe,1),Kw.call(l,Fe,1);return l}function KL(l,h){for(var A=l?h.length:0,N=A-1;A--;){var V=h[A];if(A==N||V!==ae){var ae=V;Mu(V)?Kw.call(l,V,1):WO(l,V)}}return l}function zO(l,h){return l+Jw(PL()*(h-l+1))}function Zue(l,h,A,N){for(var V=-1,ae=Ui(Qw((h-l)/(A||1)),0),xe=et(ae);ae--;)xe[N?ae:++V]=l,l+=A;return xe}function VO(l,h){var A="";if(!l||h<1||h>F)return A;do h%2&&(A+=l),h=Jw(h/2),h&&(l+=l);while(h);return A}function Vr(l,h){return cI(A9(l,h,vo),l+"")}function ele(l){return CL(r0(l))}function tle(l,h){var A=r0(l);return p_(A,jd(h,0,A.length))}function bm(l,h,A,N){if(!ci(l))return l;h=tf(h,l);for(var V=-1,ae=h.length,xe=ae-1,De=l;De!=null&&++V<ae;){var Fe=jc(h[V]),at=A;if(Fe==="__proto__"||Fe==="constructor"||Fe==="prototype")return l;if(V!=xe){var ot=De[Fe];at=N?N(ot,Fe,De):r,at===r&&(at=ci(ot)?ot:Mu(h[V+1])?[]:{})}gm(De,Fe,at),De=De[Fe]}return l}var YL=Xw?function(l,h){return Xw.set(l,h),l}:vo,rle=Yw?function(l,h){return Yw(l,"toString",{configurable:!0,enumerable:!1,value:vI(h),writable:!0})}:vo;function nle(l){return p_(r0(l))}function fs(l,h,A){var N=-1,V=l.length;h<0&&(h=-h>V?0:V+h),A=A>V?V:A,A<0&&(A+=V),V=h>A?0:A-h>>>0,h>>>=0;for(var ae=et(V);++N<V;)ae[N]=l[N+h];return ae}function ile(l,h){var A;return Zl(l,function(N,V,ae){return A=h(N,V,ae),!A}),!!A}function a_(l,h,A){var N=0,V=l==null?N:l.length;if(typeof h=="number"&&h===h&&V<=k){for(;N<V;){var ae=N+V>>>1,xe=l[ae];xe!==null&&!jo(xe)&&(A?xe<=h:xe<h)?N=ae+1:V=ae}return V}return GO(l,h,vo,A)}function GO(l,h,A,N){var V=0,ae=l==null?0:l.length;if(ae===0)return 0;h=A(h);for(var xe=h!==h,De=h===null,Fe=jo(h),at=h===r;V<ae;){var ot=Jw((V+ae)/2),dt=A(l[ot]),It=dt!==r,Qt=dt===null,dr=dt===dt,qr=jo(dt);if(xe)var hr=N||dr;else at?hr=dr&&(N||It):De?hr=dr&&It&&(N||!Qt):Fe?hr=dr&&It&&!Qt&&(N||!qr):Qt||qr?hr=!1:hr=N?dt<=h:dt<h;hr?V=ot+1:ae=ot}return xa(ae,H)}function QL(l,h){for(var A=-1,N=l.length,V=0,ae=[];++A<N;){var xe=l[A],De=h?h(xe):xe;if(!A||!nc(De,Fe)){var Fe=De;ae[V++]=xe===0?0:xe}}return ae}function JL(l){return typeof l=="number"?l:jo(l)?z:+l}function Fo(l){if(typeof l=="string")return l;if(Dr(l))return Sr(l,Fo)+"";if(jo(l))return TL?TL.call(l):"";var h=l+"";return h=="0"&&1/l==-ne?"-0":h}function ef(l,h,A){var N=-1,V=Mr,ae=l.length,xe=!0,De=[],Fe=De;if(A)xe=!1,V=Xr;else if(ae>=i){var at=h?null:gle(l);if(at)return Tu(at);xe=!1,V=Uc,Fe=new Fd}else Fe=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 It=Fe.length;It--;)if(Fe[It]===dt)continue e;h&&Fe.push(dt),De.push(ot)}else V(Fe,dt,A)||(Fe!==De&&Fe.push(dt),De.push(ot))}return De}function WO(l,h){return h=tf(h,l),l=S9(l,h),l==null||delete l[jc(ds(h))]}function XL(l,h,A,N){return bm(l,h,A(qd(l,h)),N)}function o_(l,h,A,N){for(var V=l.length,ae=N?V:-1;(N?ae--:++ae<V)&&h(l[ae],ae,l););return A?fs(l,N?0:ae,N?ae+1:V):fs(l,N?ae+1:0,N?V:ae)}function ZL(l,h){var A=l;return A instanceof rn&&(A=A.value()),os(h,function(N,V){return V.func.apply(V.thisArg,Hi([N],V.args))},A)}function KO(l,h,A){var N=l.length;if(N<2)return N?ef(l[0]):[];for(var V=-1,ae=et(N);++V<N;)for(var xe=l[V],De=-1;++De<N;)De!=V&&(ae[V]=ym(ae[V]||xe,l[De],h,A));return ef(na(ae,1),h,A)}function e9(l,h,A){for(var N=-1,V=l.length,ae=h.length,xe={};++N<V;){var De=N<ae?h[N]:r;A(xe,l[N],De)}return xe}function YO(l){return vi(l)?l:[]}function QO(l){return typeof l=="function"?l:vo}function tf(l,h){return Dr(l)?l:aI(l,h)?[l]:T9(On(l))}var ale=Vr;function rf(l,h,A){var N=l.length;return A=A===r?N:A,!h&&A>=N?l:fs(l,h,A)}var t9=Gce||function(l){return yr.clearTimeout(l)};function r9(l,h){if(h)return l.slice();var A=l.length,N=xL?xL(A):new l.constructor(A);return l.copy(N),N}function JO(l){var h=new l.constructor(l.byteLength);return new Gw(h).set(new Gw(l)),h}function ole(l,h){var A=h?JO(l.buffer):l.buffer;return new l.constructor(A,l.byteOffset,l.byteLength)}function sle(l){var h=new l.constructor(l.source,lr.exec(l));return h.lastIndex=l.lastIndex,h}function cle(l){return pm?Un(pm.call(l)):{}}function n9(l,h){var A=h?JO(l.buffer):l.buffer;return new l.constructor(A,l.byteOffset,l.length)}function i9(l,h){if(l!==h){var A=l!==r,N=l===null,V=l===l,ae=jo(l),xe=h!==r,De=h===null,Fe=h===h,at=jo(h);if(!De&&!at&&!ae&&l>h||ae&&xe&&Fe&&!De&&!at||N&&xe&&Fe||!A&&Fe||!V)return 1;if(!N&&!ae&&!at&&l<h||at&&A&&V&&!N&&!ae||De&&A&&V||!xe&&V||!Fe)return-1}return 0}function ule(l,h,A){for(var N=-1,V=l.criteria,ae=h.criteria,xe=V.length,De=A.length;++N<xe;){var Fe=i9(V[N],ae[N]);if(Fe){if(N>=De)return Fe;var at=A[N];return Fe*(at=="desc"?-1:1)}}return l.index-h.index}function a9(l,h,A,N){for(var V=-1,ae=l.length,xe=A.length,De=-1,Fe=h.length,at=Ui(ae-xe,0),ot=et(Fe+at),dt=!N;++De<Fe;)ot[De]=h[De];for(;++V<xe;)(dt||V<ae)&&(ot[A[V]]=l[V]);for(;at--;)ot[De++]=l[V++];return ot}function o9(l,h,A,N){for(var V=-1,ae=l.length,xe=-1,De=A.length,Fe=-1,at=h.length,ot=Ui(ae-De,0),dt=et(ot+at),It=!N;++V<ot;)dt[V]=l[V];for(var Qt=V;++Fe<at;)dt[Qt+Fe]=h[Fe];for(;++xe<De;)(It||V<ae)&&(dt[Qt+A[xe]]=l[V++]);return dt}function go(l,h){var A=-1,N=l.length;for(h||(h=et(N));++A<N;)h[A]=l[A];return h}function Fc(l,h,A,N){var V=!A;A||(A={});for(var ae=-1,xe=h.length;++ae<xe;){var De=h[ae],Fe=N?N(A[De],l[De],De,A,l):r;Fe===r&&(Fe=l[De]),V?Nu(A,De,Fe):gm(A,De,Fe)}return A}function lle(l,h){return Fc(l,iI(l),h)}function fle(l,h){return Fc(l,b9(l),h)}function s_(l,h){return function(A,N){var V=Dr(A)?rr:Due,ae=h?h():{};return V(A,l,ur(N,2),ae)}}function Xp(l){return Vr(function(h,A){var N=-1,V=A.length,ae=V>1?A[V-1]:r,xe=V>2?A[2]:r;for(ae=l.length>3&&typeof ae=="function"?(V--,ae):r,xe&&Wa(A[0],A[1],xe)&&(ae=V<3?r:ae,V=1),h=Un(h);++N<V;){var De=A[N];De&&l(h,De,N,ae)}return h})}function s9(l,h){return function(A,N){if(A==null)return A;if(!yo(A))return l(A,N);for(var V=A.length,ae=h?V:-1,xe=Un(A);(h?ae--:++ae<V)&&N(xe[ae],ae,xe)!==!1;);return A}}function c9(l){return function(h,A,N){for(var V=-1,ae=Un(h),xe=N(h),De=xe.length;De--;){var Fe=xe[l?De:++V];if(A(ae[Fe],Fe,ae)===!1)break}return h}}function dle(l,h,A){var N=h&y,V=wm(l);function ae(){var xe=this&&this!==yr&&this instanceof ae?V:l;return xe.apply(N?A:this,arguments)}return ae}function u9(l){return function(h){h=On(h);var A=ec(h)?Ea(h):r,N=A?A[0]:h.charAt(0),V=A?rf(A,1).join(""):h.slice(1);return N[l]()+V}}function Zp(l){return function(h){return os(s7(o7(h).replace(si,"")),l,"")}}function wm(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=Jp(l.prototype),N=l.apply(A,h);return ci(N)?N:A}}function hle(l,h,A){var N=wm(l);function V(){for(var ae=arguments.length,xe=et(ae),De=ae,Fe=e0(V);De--;)xe[De]=arguments[De];var at=ae<3&&xe[0]!==Fe&&xe[ae-1]!==Fe?[]:Bo(xe,Fe);if(ae-=at.length,ae<A)return p9(l,h,c_,V.placeholder,r,xe,at,r,r,A-ae);var ot=this&&this!==yr&&this instanceof V?N:l;return pt(ot,this,xe)}return V}function l9(l){return function(h,A,N){var V=Un(h);if(!yo(h)){var ae=ur(A,3);h=Vi(h),A=function(De){return ae(V[De],De,V)}}var xe=l(h,A,N);return xe>-1?V[ae?h[xe]:xe]:r}}function f9(l){return $u(function(h){var A=h.length,N=A,V=us.prototype.thru;for(l&&h.reverse();N--;){var ae=h[N];if(typeof ae!="function")throw new cs(o);if(V&&!xe&&d_(ae)=="wrapper")var xe=new us([],!0)}for(N=xe?N:A;++N<A;){ae=h[N];var De=d_(ae),Fe=De=="wrapper"?rI(ae):r;Fe&&oI(Fe[0])&&Fe[1]==(p|S|O|I)&&!Fe[4].length&&Fe[9]==1?xe=xe[d_(Fe[0])].apply(xe,Fe[3]):xe=ae.length==1&&oI(ae)?xe[De]():xe.thru(ae)}return function(){var at=arguments,ot=at[0];if(xe&&at.length==1&&Dr(ot))return xe.plant(ot).value();for(var dt=0,It=A?h[dt].apply(this,at):ot;++dt<A;)It=h[dt].call(this,It);return It}})}function c_(l,h,A,N,V,ae,xe,De,Fe,at){var ot=h&p,dt=h&y,It=h&_,Qt=h&(S|x),dr=h&C,qr=It?r:wm(l);function hr(){for(var Zr=arguments.length,sn=et(Zr),qo=Zr;qo--;)sn[qo]=arguments[qo];if(Qt)var Ka=e0(hr),Ho=kp(sn,Ka);if(N&&(sn=a9(sn,N,V,Qt)),ae&&(sn=o9(sn,ae,xe,Qt)),Zr-=Ho,Qt&&Zr<at){var bi=Bo(sn,Ka);return p9(l,h,c_,hr.placeholder,A,sn,bi,De,Fe,at-Zr)}var ic=dt?A:this,Uu=It?ic[l]:l;return Zr=sn.length,De?sn=Dle(sn,De):dr&&Zr>1&&sn.reverse(),ot&&Fe<Zr&&(sn.length=Fe),this&&this!==yr&&this instanceof hr&&(Uu=qr||wm(Uu)),Uu.apply(ic,sn)}return hr}function d9(l,h){return function(A,N){return jue(A,l,h(N),{})}}function u_(l,h){return function(A,N){var V;if(A===r&&N===r)return h;if(A!==r&&(V=A),N!==r){if(V===r)return N;typeof A=="string"||typeof N=="string"?(A=Fo(A),N=Fo(N)):(A=JL(A),N=JL(N)),V=l(A,N)}return V}}function XO(l){return $u(function(h){return h=Sr(h,zi(ur())),Vr(function(A){var N=this;return l(h,function(V){return pt(V,N,A)})})})}function l_(l,h){h=h===r?" ":Fo(h);var A=h.length;if(A<2)return A?VO(h,l):h;var N=VO(h,Qw(l/tc(h)));return ec(h)?rf(Ea(N),0,l).join(""):N.slice(0,l)}function ple(l,h,A,N){var V=h&y,ae=wm(l);function xe(){for(var De=-1,Fe=arguments.length,at=-1,ot=N.length,dt=et(ot+Fe),It=this&&this!==yr&&this instanceof xe?ae:l;++at<ot;)dt[at]=N[at];for(;Fe--;)dt[at++]=arguments[++De];return pt(It,V?A:this,dt)}return xe}function h9(l){return function(h,A,N){return N&&typeof N!="number"&&Wa(h,A,N)&&(A=N=r),h=Lu(h),A===r?(A=h,h=0):A=Lu(A),N=N===r?h<A?1:-1:Lu(N),Zue(h,A,N,l)}}function f_(l){return function(h,A){return typeof h=="string"&&typeof A=="string"||(h=hs(h),A=hs(A)),l(h,A)}}function p9(l,h,A,N,V,ae,xe,De,Fe,at){var ot=h&S,dt=ot?xe:r,It=ot?r:xe,Qt=ot?ae:r,dr=ot?r:ae;h|=ot?O:E,h&=~(ot?E:O),h&b||(h&=~(y|_));var qr=[l,h,V,Qt,dt,dr,It,De,Fe,at],hr=A.apply(r,qr);return oI(l)&&O9(hr,qr),hr.placeholder=N,I9(hr,l,h)}function ZO(l){var h=Li[l];return function(A,N){if(A=hs(A),N=N==null?0:xa(Br(N),292),N&&IL(A)){var V=(On(A)+"e").split("e"),ae=h(V[0]+"e"+(+V[1]+N));return V=(On(ae)+"e").split("e"),+(V[0]+"e"+(+V[1]-N))}return h(A)}}var gle=Yp&&1/Tu(new Yp([,-0]))[1]==ne?function(l){return new Yp(l)}:_I;function g9(l){return function(h){var A=Aa(h);return A==mt?Jl(h):A==Pt?Hp(h):Mp(h,l(h))}}function Du(l,h,A,N,V,ae,xe,De){var Fe=h&_;if(!Fe&&typeof l!="function")throw new cs(o);var at=N?N.length:0;if(at||(h&=~(O|E),N=V=r),xe=xe===r?xe:Ui(Br(xe),0),De=De===r?De:Br(De),at-=V?V.length:0,h&E){var ot=N,dt=V;N=V=r}var It=Fe?r:rI(l),Qt=[l,h,A,N,V,ot,dt,ae,xe,De];if(It&&Rle(Qt,It),l=Qt[0],h=Qt[1],A=Qt[2],N=Qt[3],V=Qt[4],De=Qt[9]=Qt[9]===r?Fe?0:l.length:Ui(Qt[9]-at,0),!De&&h&(S|x)&&(h&=~(S|x)),!h||h==y)var dr=dle(l,h,A);else h==S||h==x?dr=hle(l,h,De):(h==O||h==(y|O))&&!V.length?dr=ple(l,h,A,N):dr=c_.apply(r,Qt);var qr=It?YL:O9;return I9(qr(dr,Qt),l,h)}function y9(l,h,A,N){return l===r||nc(l,Kp[A])&&!Tn.call(N,A)?h:l}function m9(l,h,A,N,V,ae){return ci(l)&&ci(h)&&(ae.set(h,l),i_(l,h,r,m9,ae),ae.delete(h)),l}function yle(l){return xm(l)?r:l}function v9(l,h,A,N,V,ae){var xe=A&w,De=l.length,Fe=h.length;if(De!=Fe&&!(xe&&Fe>De))return!1;var at=ae.get(l),ot=ae.get(h);if(at&&ot)return at==h&&ot==l;var dt=-1,It=!0,Qt=A&v?new Fd:r;for(ae.set(l,h),ae.set(h,l);++dt<De;){var dr=l[dt],qr=h[dt];if(N)var hr=xe?N(qr,dr,dt,h,l,ae):N(dr,qr,dt,l,h,ae);if(hr!==r){if(hr)continue;It=!1;break}if(Qt){if(!Mi(h,function(Zr,sn){if(!Uc(Qt,sn)&&(dr===Zr||V(dr,Zr,A,N,ae)))return Qt.push(sn)})){It=!1;break}}else if(!(dr===qr||V(dr,qr,A,N,ae))){It=!1;break}}return ae.delete(l),ae.delete(h),It}function mle(l,h,A,N,V,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 Gw(l),new Gw(h)));case te:case ce:case vt:return nc(+l,+h);case fe:return l.name==h.name&&l.message==h.message;case Rt:case kt:return l==h+"";case mt:var De=Jl;case Pt:var Fe=N&w;if(De||(De=Tu),l.size!=h.size&&!Fe)return!1;var at=xe.get(l);if(at)return at==h;N|=v,xe.set(l,h);var ot=v9(De(l),De(h),N,V,ae,xe);return xe.delete(l),ot;case Nt:if(pm)return pm.call(l)==pm.call(h)}return!1}function vle(l,h,A,N,V,ae){var xe=A&w,De=eI(l),Fe=De.length,at=eI(h),ot=at.length;if(Fe!=ot&&!xe)return!1;for(var dt=Fe;dt--;){var It=De[dt];if(!(xe?It in h:Tn.call(h,It)))return!1}var Qt=ae.get(l),dr=ae.get(h);if(Qt&&dr)return Qt==h&&dr==l;var qr=!0;ae.set(l,h),ae.set(h,l);for(var hr=xe;++dt<Fe;){It=De[dt];var Zr=l[It],sn=h[It];if(N)var qo=xe?N(sn,Zr,It,h,l,ae):N(Zr,sn,It,l,h,ae);if(!(qo===r?Zr===sn||V(Zr,sn,A,N,ae):qo)){qr=!1;break}hr||(hr=It=="constructor")}if(qr&&!hr){var Ka=l.constructor,Ho=h.constructor;Ka!=Ho&&"constructor"in l&&"constructor"in h&&!(typeof Ka=="function"&&Ka instanceof Ka&&typeof Ho=="function"&&Ho instanceof Ho)&&(qr=!1)}return ae.delete(l),ae.delete(h),qr}function $u(l){return cI(A9(l,r,D9),l+"")}function eI(l){return UL(l,Vi,iI)}function tI(l){return UL(l,mo,b9)}var rI=Xw?function(l){return Xw.get(l)}:_I;function d_(l){for(var h=l.name+"",A=Qp[h],N=Tn.call(Qp,h)?A.length:0;N--;){var V=A[N],ae=V.func;if(ae==null||ae==l)return V.name}return h}function e0(l){var h=Tn.call(J,"placeholder")?J:l;return h.placeholder}function ur(){var l=J.iteratee||bI;return l=l===bI?jL:l,arguments.length?l(arguments[0],arguments[1]):l}function h_(l,h){var A=l.__data__;return Ole(h)?A[typeof h=="string"?"string":"hash"]:A.map}function nI(l){for(var h=Vi(l),A=h.length;A--;){var N=h[A],V=l[N];h[A]=[N,V,E9(V)]}return h}function Hd(l,h){var A=Fp(l,h);return FL(A)?A:r}function ble(l){var h=Tn.call(l,Ud),A=l[Ud];try{l[Ud]=r;var N=!0}catch{}var V=zw.call(l);return N&&(h?l[Ud]=A:delete l[Ud]),V}var iI=CO?function(l){return l==null?[]:(l=Un(l),dn(CO(l),function(h){return SL.call(l,h)}))}:EI,b9=CO?function(l){for(var h=[];l;)Hi(h,iI(l)),l=Ww(l);return h}:EI,Aa=Ga;(NO&&Aa(new NO(new ArrayBuffer(1)))!=Dt||fm&&Aa(new fm)!=mt||DO&&Aa(DO.resolve())!=Yt||Yp&&Aa(new Yp)!=Pt||dm&&Aa(new dm)!=Ut)&&(Aa=function(l){var h=Ga(l),A=h==Lt?l.constructor:r,N=A?zd(A):"";if(N)switch(N){case tue:return Dt;case rue:return mt;case nue:return Yt;case iue:return Pt;case aue:return Ut}return h});function wle(l,h,A){for(var N=-1,V=A.length;++N<V;){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 _le(l){var h=l.match(ye);return h?h[1].split(Me):[]}function w9(l,h,A){h=tf(h,l);for(var N=-1,V=h.length,ae=!1;++N<V;){var xe=jc(h[N]);if(!(ae=l!=null&&A(l,xe)))break;l=l[xe]}return ae||++N!=V?ae:(V=l==null?0:l.length,!!V&&w_(V)&&Mu(xe,V)&&(Dr(l)||Vd(l)))}function Ele(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"&&!_m(l)?Jp(Ww(l)):{}}function xle(l,h,A){var N=l.constructor;switch(h){case $t:return JO(l);case te:case ce:return new N(+l);case Dt:return ole(l,A);case qt:case Mt:case cr:case tr:case ir:case nr:case mr:case wn:case Yr:return n9(l,A);case mt:return new N;case vt:case kt:return new N(l);case Rt:return sle(l);case Pt:return new N;case Nt:return cle(l)}}function Ale(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 Sle(l){return Dr(l)||Vd(l)||!!(OL&&l&&l[OL])}function Mu(l,h){var A=typeof l;return h=h??F,!!h&&(A=="number"||A!="symbol"&&sr.test(l))&&l>-1&&l%1==0&&l<h}function Wa(l,h,A){if(!ci(A))return!1;var N=typeof h;return(N=="number"?yo(A)&&Mu(h,A.length):N=="string"&&h in A)?nc(A[h],l):!1}function aI(l,h){if(Dr(l))return!1;var A=typeof l;return A=="number"||A=="symbol"||A=="boolean"||l==null||jo(l)?!0:He.test(l)||!Re.test(l)||h!=null&&l in Un(h)}function Ole(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function oI(l){var h=d_(l),A=J[h];if(typeof A!="function"||!(h in rn.prototype))return!1;if(l===A)return!0;var N=rI(A);return!!N&&l===N[0]}function Ile(l){return!!EL&&EL in l}var Ple=qw?ku:xI;function _m(l){var h=l&&l.constructor,A=typeof h=="function"&&h.prototype||Kp;return l===A}function E9(l){return l===l&&!ci(l)}function x9(l,h){return function(A){return A==null?!1:A[l]===h&&(h!==r||l in Un(A))}}function Tle(l){var h=v_(l,function(N){return A.size===u&&A.clear(),N}),A=h.cache;return h}function Rle(l,h){var A=l[1],N=h[1],V=A|N,ae=V<(y|_|p),xe=N==p&&A==S||N==p&&A==I&&l[7].length<=h[8]||N==(p|I)&&h[7].length<=h[8]&&A==S;if(!(ae||xe))return l;N&y&&(l[2]=h[2],V|=A&y?0:b);var De=h[3];if(De){var Fe=l[3];l[3]=Fe?a9(Fe,De,h[4]):De,l[4]=Fe?Bo(l[3],f):h[4]}return De=h[5],De&&(Fe=l[5],l[5]=Fe?o9(Fe,De,h[6]):De,l[6]=Fe?Bo(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]=V,l}function Cle(l){var h=[];if(l!=null)for(var A in Un(l))h.push(A);return h}function Nle(l){return zw.call(l)}function A9(l,h,A){return h=Ui(h===r?l.length-1:h,0),function(){for(var N=arguments,V=-1,ae=Ui(N.length-h,0),xe=et(ae);++V<ae;)xe[V]=N[h+V];V=-1;for(var De=et(h+1);++V<h;)De[V]=N[V];return De[h]=A(xe),pt(l,this,De)}}function S9(l,h){return h.length<2?l:qd(l,fs(h,0,-1))}function Dle(l,h){for(var A=l.length,N=xa(h.length,A),V=go(l);N--;){var ae=h[N];l[N]=Mu(ae,A)?V[ae]:r}return l}function sI(l,h){if(!(h==="constructor"&&typeof l[h]=="function")&&h!="__proto__")return l[h]}var O9=P9(YL),Em=Kce||function(l,h){return yr.setTimeout(l,h)},cI=P9(rle);function I9(l,h,A){var N=h+"";return cI(l,Ale(N,$le(_le(N),A)))}function P9(l){var h=0,A=0;return function(){var N=Xce(),V=pe-(N-A);if(A=N,V>0){if(++h>=le)return arguments[0]}else h=0;return l.apply(r,arguments)}}function p_(l,h){var A=-1,N=l.length,V=N-1;for(h=h===r?N:h;++A<h;){var ae=zO(A,V),xe=l[ae];l[ae]=l[A],l[A]=xe}return l.length=h,l}var T9=Tle(function(l){var h=[];return l.charCodeAt(0)===46&&h.push(""),l.replace(Xe,function(A,N,V,ae){h.push(V?ae.replace(Ot,"$1"):N||A)}),h});function jc(l){if(typeof l=="string"||jo(l))return l;var h=l+"";return h=="0"&&1/l==-ne?"-0":h}function zd(l){if(l!=null){try{return Hw.call(l)}catch{}try{return l+""}catch{}}return""}function $le(l,h){return Wt(M,function(A){var N="_."+A[0];h&A[1]&&!Mr(l,N)&&l.push(N)}),l.sort()}function R9(l){if(l instanceof rn)return l.clone();var h=new us(l.__wrapped__,l.__chain__);return h.__actions__=go(l.__actions__),h.__index__=l.__index__,h.__values__=l.__values__,h}function Mle(l,h,A){(A?Wa(l,h,A):h===r)?h=1:h=Ui(Br(h),0);var N=l==null?0:l.length;if(!N||h<1)return[];for(var V=0,ae=0,xe=et(Qw(N/h));V<N;)xe[ae++]=fs(l,V,V+=h);return xe}function kle(l){for(var h=-1,A=l==null?0:l.length,N=0,V=[];++h<A;){var ae=l[h];ae&&(V[N++]=ae)}return V}function Lle(){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(Dr(A)?go(A):[A],na(h,1))}var Ule=Vr(function(l,h){return vi(l)?ym(l,na(h,1,vi,!0)):[]}),Ble=Vr(function(l,h){var A=ds(h);return vi(A)&&(A=r),vi(l)?ym(l,na(h,1,vi,!0),ur(A,2)):[]}),Fle=Vr(function(l,h){var A=ds(h);return vi(A)&&(A=r),vi(l)?ym(l,na(h,1,vi,!0),r,A):[]});function jle(l,h,A){var N=l==null?0:l.length;return N?(h=A||h===r?1:Br(h),fs(l,h<0?0:h,N)):[]}function qle(l,h,A){var N=l==null?0:l.length;return N?(h=A||h===r?1:Br(h),h=N-h,fs(l,0,h<0?0:h)):[]}function Hle(l,h){return l&&l.length?o_(l,ur(h,3),!0,!0):[]}function zle(l,h){return l&&l.length?o_(l,ur(h,3),!0):[]}function Vle(l,h,A,N){var V=l==null?0:l.length;return V?(A&&typeof A!="number"&&Wa(l,h,A)&&(A=0,N=V),Lue(l,h,A,N)):[]}function C9(l,h,A){var N=l==null?0:l.length;if(!N)return-1;var V=A==null?0:Br(A);return V<0&&(V=Ui(N+V,0)),Pu(l,ur(h,3),V)}function N9(l,h,A){var N=l==null?0:l.length;if(!N)return-1;var V=N-1;return A!==r&&(V=Br(A),V=A<0?Ui(N+V,0):xa(V,N-1)),Pu(l,ur(h,3),V,!0)}function D9(l){var h=l==null?0:l.length;return h?na(l,1):[]}function Gle(l){var h=l==null?0:l.length;return h?na(l,ne):[]}function Wle(l,h){var A=l==null?0:l.length;return A?(h=h===r?1:Br(h),na(l,h)):[]}function Kle(l){for(var h=-1,A=l==null?0:l.length,N={};++h<A;){var V=l[h];N[V[0]]=V[1]}return N}function $9(l){return l&&l.length?l[0]:r}function Yle(l,h,A){var N=l==null?0:l.length;if(!N)return-1;var V=A==null?0:Br(A);return V<0&&(V=Ui(N+V,0)),Zs(l,h,V)}function Qle(l){var h=l==null?0:l.length;return h?fs(l,0,-1):[]}var Jle=Vr(function(l){var h=Sr(l,YO);return h.length&&h[0]===l[0]?BO(h):[]}),Xle=Vr(function(l){var h=ds(l),A=Sr(l,YO);return h===ds(A)?h=r:A.pop(),A.length&&A[0]===l[0]?BO(A,ur(h,2)):[]}),Zle=Vr(function(l){var h=ds(l),A=Sr(l,YO);return h=typeof h=="function"?h:r,h&&A.pop(),A.length&&A[0]===l[0]?BO(A,r,h):[]});function efe(l,h){return l==null?"":Qce.call(l,h)}function ds(l){var h=l==null?0:l.length;return h?l[h-1]:r}function tfe(l,h,A){var N=l==null?0:l.length;if(!N)return-1;var V=N;return A!==r&&(V=Br(A),V=V<0?Ui(N+V,0):xa(V,N-1)),h===h?Vp(l,h,V):Pu(l,Rd,V,!0)}function rfe(l,h){return l&&l.length?VL(l,Br(h)):r}var nfe=Vr(M9);function M9(l,h){return l&&l.length&&h&&h.length?HO(l,h):l}function ife(l,h,A){return l&&l.length&&h&&h.length?HO(l,h,ur(A,2)):l}function afe(l,h,A){return l&&l.length&&h&&h.length?HO(l,h,r,A):l}var ofe=$u(function(l,h){var A=l==null?0:l.length,N=MO(l,h);return KL(l,Sr(h,function(V){return Mu(V,A)?+V:V}).sort(i9)),N});function sfe(l,h){var A=[];if(!(l&&l.length))return A;var N=-1,V=[],ae=l.length;for(h=ur(h,3);++N<ae;){var xe=l[N];h(xe,N,l)&&(A.push(xe),V.push(N))}return KL(l,V),A}function uI(l){return l==null?l:eue.call(l)}function cfe(l,h,A){var N=l==null?0:l.length;return N?(A&&typeof A!="number"&&Wa(l,h,A)?(h=0,A=N):(h=h==null?0:Br(h),A=A===r?N:Br(A)),fs(l,h,A)):[]}function ufe(l,h){return a_(l,h)}function lfe(l,h,A){return GO(l,h,ur(A,2))}function ffe(l,h){var A=l==null?0:l.length;if(A){var N=a_(l,h);if(N<A&&nc(l[N],h))return N}return-1}function dfe(l,h){return a_(l,h,!0)}function hfe(l,h,A){return GO(l,h,ur(A,2),!0)}function pfe(l,h){var A=l==null?0:l.length;if(A){var N=a_(l,h,!0)-1;if(nc(l[N],h))return N}return-1}function gfe(l){return l&&l.length?QL(l):[]}function yfe(l,h){return l&&l.length?QL(l,ur(h,2)):[]}function mfe(l){var h=l==null?0:l.length;return h?fs(l,1,h):[]}function vfe(l,h,A){return l&&l.length?(h=A||h===r?1:Br(h),fs(l,0,h<0?0:h)):[]}function bfe(l,h,A){var N=l==null?0:l.length;return N?(h=A||h===r?1:Br(h),h=N-h,fs(l,h<0?0:h,N)):[]}function wfe(l,h){return l&&l.length?o_(l,ur(h,3),!1,!0):[]}function _fe(l,h){return l&&l.length?o_(l,ur(h,3)):[]}var Efe=Vr(function(l){return ef(na(l,1,vi,!0))}),xfe=Vr(function(l){var h=ds(l);return vi(h)&&(h=r),ef(na(l,1,vi,!0),ur(h,2))}),Afe=Vr(function(l){var h=ds(l);return h=typeof h=="function"?h:r,ef(na(l,1,vi,!0),r,h)});function Sfe(l){return l&&l.length?ef(l):[]}function Ofe(l,h){return l&&l.length?ef(l,ur(h,2)):[]}function Ife(l,h){return h=typeof h=="function"?h:r,l&&l.length?ef(l,r,h):[]}function lI(l){if(!(l&&l.length))return[];var h=0;return l=dn(l,function(A){if(vi(A))return h=Ui(A.length,h),!0}),Yl(h,function(A){return Sr(l,Gl(A))})}function k9(l,h){if(!(l&&l.length))return[];var A=lI(l);return h==null?A:Sr(A,function(N){return pt(h,r,N)})}var Pfe=Vr(function(l,h){return vi(l)?ym(l,h):[]}),Tfe=Vr(function(l){return KO(dn(l,vi))}),Rfe=Vr(function(l){var h=ds(l);return vi(h)&&(h=r),KO(dn(l,vi),ur(h,2))}),Cfe=Vr(function(l){var h=ds(l);return h=typeof h=="function"?h:r,KO(dn(l,vi),r,h)}),Nfe=Vr(lI);function Dfe(l,h){return e9(l||[],h||[],gm)}function $fe(l,h){return e9(l||[],h||[],bm)}var Mfe=Vr(function(l){var h=l.length,A=h>1?l[h-1]:r;return A=typeof A=="function"?(l.pop(),A):r,k9(l,A)});function L9(l){var h=J(l);return h.__chain__=!0,h}function kfe(l,h){return h(l),l}function g_(l,h){return h(l)}var Lfe=$u(function(l){var h=l.length,A=h?l[0]:0,N=this.__wrapped__,V=function(ae){return MO(ae,l)};return h>1||this.__actions__.length||!(N instanceof rn)||!Mu(A)?this.thru(V):(N=N.slice(A,+A+(h?1:0)),N.__actions__.push({func:g_,args:[V],thisArg:r}),new us(N,this.__chain__).thru(function(ae){return h&&!ae.length&&ae.push(r),ae}))});function Ufe(){return L9(this)}function Bfe(){return new us(this.value(),this.__chain__)}function Ffe(){this.__values__===r&&(this.__values__=J9(this.value()));var l=this.__index__>=this.__values__.length,h=l?r:this.__values__[this.__index__++];return{done:l,value:h}}function jfe(){return this}function qfe(l){for(var h,A=this;A instanceof e_;){var N=R9(A);N.__index__=0,N.__values__=r,h?V.__wrapped__=N:h=N;var V=N;A=A.__wrapped__}return V.__wrapped__=l,h}function Hfe(){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:g_,args:[uI],thisArg:r}),new us(h,this.__chain__)}return this.thru(uI)}function zfe(){return ZL(this.__wrapped__,this.__actions__)}var Vfe=s_(function(l,h,A){Tn.call(l,A)?++l[A]:Nu(l,A,1)});function Gfe(l,h,A){var N=Dr(l)?Pn:kue;return A&&Wa(l,h,A)&&(h=r),N(l,ur(h,3))}function Wfe(l,h){var A=Dr(l)?dn:kL;return A(l,ur(h,3))}var Kfe=l9(C9),Yfe=l9(N9);function Qfe(l,h){return na(y_(l,h),1)}function Jfe(l,h){return na(y_(l,h),ne)}function Xfe(l,h,A){return A=A===r?1:Br(A),na(y_(l,h),A)}function U9(l,h){var A=Dr(l)?Wt:Zl;return A(l,ur(h,3))}function B9(l,h){var A=Dr(l)?Jr:ML;return A(l,ur(h,3))}var Zfe=s_(function(l,h,A){Tn.call(l,A)?l[A].push(h):Nu(l,A,[h])});function ede(l,h,A,N){l=yo(l)?l:r0(l),A=A&&!N?Br(A):0;var V=l.length;return A<0&&(A=Ui(V+A,0)),__(l)?A<=V&&l.indexOf(h,A)>-1:!!V&&Zs(l,h,A)>-1}var tde=Vr(function(l,h,A){var N=-1,V=typeof h=="function",ae=yo(l)?et(l.length):[];return Zl(l,function(xe){ae[++N]=V?pt(h,xe,A):mm(xe,h,A)}),ae}),rde=s_(function(l,h,A){Nu(l,A,h)});function y_(l,h){var A=Dr(l)?Sr:qL;return A(l,ur(h,3))}function nde(l,h,A,N){return l==null?[]:(Dr(h)||(h=h==null?[]:[h]),A=N?r:A,Dr(A)||(A=A==null?[]:[A]),GL(l,h,A))}var ide=s_(function(l,h,A){l[A?0:1].push(h)},function(){return[[],[]]});function ade(l,h,A){var N=Dr(l)?os:Nd,V=arguments.length<3;return N(l,ur(h,4),A,V,Zl)}function ode(l,h,A){var N=Dr(l)?Lc:Nd,V=arguments.length<3;return N(l,ur(h,4),A,V,ML)}function sde(l,h){var A=Dr(l)?dn:kL;return A(l,b_(ur(h,3)))}function cde(l){var h=Dr(l)?CL:ele;return h(l)}function ude(l,h,A){(A?Wa(l,h,A):h===r)?h=1:h=Br(h);var N=Dr(l)?Cue:tle;return N(l,h)}function lde(l){var h=Dr(l)?Nue:nle;return h(l)}function fde(l){if(l==null)return 0;if(yo(l))return __(l)?tc(l):l.length;var h=Aa(l);return h==mt||h==Pt?l.size:jO(l).length}function dde(l,h,A){var N=Dr(l)?Mi:ile;return A&&Wa(l,h,A)&&(h=r),N(l,ur(h,3))}var hde=Vr(function(l,h){if(l==null)return[];var A=h.length;return A>1&&Wa(l,h[0],h[1])?h=[]:A>2&&Wa(h[0],h[1],h[2])&&(h=[h[0]]),GL(l,na(h,1),[])}),m_=Wce||function(){return yr.Date.now()};function pde(l,h){if(typeof h!="function")throw new cs(o);return l=Br(l),function(){if(--l<1)return h.apply(this,arguments)}}function F9(l,h,A){return h=A?r:h,h=l&&h==null?l.length:h,Du(l,p,r,r,r,r,h)}function j9(l,h){var A;if(typeof h!="function")throw new cs(o);return l=Br(l),function(){return--l>0&&(A=h.apply(this,arguments)),l<=1&&(h=r),A}}var fI=Vr(function(l,h,A){var N=y;if(A.length){var V=Bo(A,e0(fI));N|=O}return Du(l,N,h,A,V)}),q9=Vr(function(l,h,A){var N=y|_;if(A.length){var V=Bo(A,e0(q9));N|=O}return Du(h,N,l,A,V)});function H9(l,h,A){h=A?r:h;var N=Du(l,S,r,r,r,r,r,h);return N.placeholder=H9.placeholder,N}function z9(l,h,A){h=A?r:h;var N=Du(l,x,r,r,r,r,r,h);return N.placeholder=z9.placeholder,N}function V9(l,h,A){var N,V,ae,xe,De,Fe,at=0,ot=!1,dt=!1,It=!0;if(typeof l!="function")throw new cs(o);h=hs(h)||0,ci(A)&&(ot=!!A.leading,dt="maxWait"in A,ae=dt?Ui(hs(A.maxWait)||0,h):ae,It="trailing"in A?!!A.trailing:It);function Qt(bi){var ic=N,Uu=V;return N=V=r,at=bi,xe=l.apply(Uu,ic),xe}function dr(bi){return at=bi,De=Em(Zr,h),ot?Qt(bi):xe}function qr(bi){var ic=bi-Fe,Uu=bi-at,l7=h-ic;return dt?xa(l7,ae-Uu):l7}function hr(bi){var ic=bi-Fe,Uu=bi-at;return Fe===r||ic>=h||ic<0||dt&&Uu>=ae}function Zr(){var bi=m_();if(hr(bi))return sn(bi);De=Em(Zr,qr(bi))}function sn(bi){return De=r,It&&N?Qt(bi):(N=V=r,xe)}function qo(){De!==r&&t9(De),at=0,N=Fe=V=De=r}function Ka(){return De===r?xe:sn(m_())}function Ho(){var bi=m_(),ic=hr(bi);if(N=arguments,V=this,Fe=bi,ic){if(De===r)return dr(Fe);if(dt)return t9(De),De=Em(Zr,h),Qt(Fe)}return De===r&&(De=Em(Zr,h)),xe}return Ho.cancel=qo,Ho.flush=Ka,Ho}var gde=Vr(function(l,h){return $L(l,1,h)}),yde=Vr(function(l,h,A){return $L(l,hs(h)||0,A)});function mde(l){return Du(l,C)}function v_(l,h){if(typeof l!="function"||h!=null&&typeof h!="function")throw new cs(o);var A=function(){var N=arguments,V=h?h.apply(this,N):N[0],ae=A.cache;if(ae.has(V))return ae.get(V);var xe=l.apply(this,N);return A.cache=ae.set(V,xe)||ae,xe};return A.cache=new(v_.Cache||Cu),A}v_.Cache=Cu;function b_(l){if(typeof l!="function")throw new cs(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 vde(l){return j9(2,l)}var bde=ale(function(l,h){h=h.length==1&&Dr(h[0])?Sr(h[0],zi(ur())):Sr(na(h,1),zi(ur()));var A=h.length;return Vr(function(N){for(var V=-1,ae=xa(N.length,A);++V<ae;)N[V]=h[V].call(this,N[V]);return pt(l,this,N)})}),dI=Vr(function(l,h){var A=Bo(h,e0(dI));return Du(l,O,r,h,A)}),G9=Vr(function(l,h){var A=Bo(h,e0(G9));return Du(l,E,r,h,A)}),wde=$u(function(l,h){return Du(l,I,r,r,r,h)});function _de(l,h){if(typeof l!="function")throw new cs(o);return h=h===r?h:Br(h),Vr(l,h)}function Ede(l,h){if(typeof l!="function")throw new cs(o);return h=h==null?0:Ui(Br(h),0),Vr(function(A){var N=A[h],V=rf(A,0,h);return N&&Hi(V,N),pt(l,this,V)})}function xde(l,h,A){var N=!0,V=!0;if(typeof l!="function")throw new cs(o);return ci(A)&&(N="leading"in A?!!A.leading:N,V="trailing"in A?!!A.trailing:V),V9(l,h,{leading:N,maxWait:h,trailing:V})}function Ade(l){return F9(l,1)}function Sde(l,h){return dI(QO(h),l)}function Ode(){if(!arguments.length)return[];var l=arguments[0];return Dr(l)?l:[l]}function Ide(l){return ls(l,m)}function Pde(l,h){return h=typeof h=="function"?h:r,ls(l,m,h)}function Tde(l){return ls(l,d|m)}function Rde(l,h){return h=typeof h=="function"?h:r,ls(l,d|m,h)}function Cde(l,h){return h==null||DL(l,h,Vi(h))}function nc(l,h){return l===h||l!==l&&h!==h}var Nde=f_(UO),Dde=f_(function(l,h){return l>=h}),Vd=BL(function(){return arguments}())?BL:function(l){return hi(l)&&Tn.call(l,"callee")&&!SL.call(l,"callee")},Dr=et.isArray,$de=Ae?zi(Ae):que;function yo(l){return l!=null&&w_(l.length)&&!ku(l)}function vi(l){return hi(l)&&yo(l)}function Mde(l){return l===!0||l===!1||hi(l)&&Ga(l)==te}var nf=Yce||xI,kde=Ie?zi(Ie):Hue;function Lde(l){return hi(l)&&l.nodeType===1&&!xm(l)}function Ude(l){if(l==null)return!0;if(yo(l)&&(Dr(l)||typeof l=="string"||typeof l.splice=="function"||nf(l)||t0(l)||Vd(l)))return!l.length;var h=Aa(l);if(h==mt||h==Pt)return!l.size;if(_m(l))return!jO(l).length;for(var A in l)if(Tn.call(l,A))return!1;return!0}function Bde(l,h){return vm(l,h)}function Fde(l,h,A){A=typeof A=="function"?A:r;var N=A?A(l,h):r;return N===r?vm(l,h,r,A):!!N}function hI(l){if(!hi(l))return!1;var h=Ga(l);return h==fe||h==T||typeof l.message=="string"&&typeof l.name=="string"&&!xm(l)}function jde(l){return typeof l=="number"&&IL(l)}function ku(l){if(!ci(l))return!1;var h=Ga(l);return h==ze||h==tt||h==Q||h==wr}function W9(l){return typeof l=="number"&&l==Br(l)}function w_(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=F}function ci(l){var h=typeof l;return l!=null&&(h=="object"||h=="function")}function hi(l){return l!=null&&typeof l=="object"}var K9=Pe?zi(Pe):Vue;function qde(l,h){return l===h||FO(l,h,nI(h))}function Hde(l,h,A){return A=typeof A=="function"?A:r,FO(l,h,nI(h),A)}function zde(l){return Y9(l)&&l!=+l}function Vde(l){if(Ple(l))throw new Cr(a);return FL(l)}function Gde(l){return l===null}function Wde(l){return l==null}function Y9(l){return typeof l=="number"||hi(l)&&Ga(l)==vt}function xm(l){if(!hi(l)||Ga(l)!=Lt)return!1;var h=Ww(l);if(h===null)return!0;var A=Tn.call(h,"constructor")&&h.constructor;return typeof A=="function"&&A instanceof A&&Hw.call(A)==Hce}var pI=Be?zi(Be):Gue;function Kde(l){return W9(l)&&l>=-F&&l<=F}var Q9=Ke?zi(Ke):Wue;function __(l){return typeof l=="string"||!Dr(l)&&hi(l)&&Ga(l)==kt}function jo(l){return typeof l=="symbol"||hi(l)&&Ga(l)==Nt}var t0=qe?zi(qe):Kue;function Yde(l){return l===r}function Qde(l){return hi(l)&&Aa(l)==Ut}function Jde(l){return hi(l)&&Ga(l)==zt}var Xde=f_(qO),Zde=f_(function(l,h){return l<=h});function J9(l){if(!l)return[];if(yo(l))return __(l)?Ea(l):go(l);if(lm&&l[lm])return qp(l[lm]());var h=Aa(l),A=h==mt?Jl:h==Pt?Tu:r0;return A(l)}function Lu(l){if(!l)return l===0?l:0;if(l=hs(l),l===ne||l===-ne){var h=l<0?-1:1;return h*j}return l===l?l:0}function Br(l){var h=Lu(l),A=h%1;return h===h?A?h-A:h:0}function X9(l){return l?jd(Br(l),0,$):0}function hs(l){if(typeof l=="number")return l;if(jo(l))return z;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=Dd(l);var A=gr.test(l);return A||on.test(l)?fr(l.slice(2),A?2:8):en.test(l)?z:+l}function Z9(l){return Fc(l,mo(l))}function ehe(l){return l?jd(Br(l),-F,F):l===0?l:0}function On(l){return l==null?"":Fo(l)}var the=Xp(function(l,h){if(_m(h)||yo(h)){Fc(h,Vi(h),l);return}for(var A in h)Tn.call(h,A)&&gm(l,A,h[A])}),e7=Xp(function(l,h){Fc(h,mo(h),l)}),E_=Xp(function(l,h,A,N){Fc(h,mo(h),l,N)}),rhe=Xp(function(l,h,A,N){Fc(h,Vi(h),l,N)}),nhe=$u(MO);function ihe(l,h){var A=Jp(l);return h==null?A:NL(A,h)}var ahe=Vr(function(l,h){l=Un(l);var A=-1,N=h.length,V=N>2?h[2]:r;for(V&&Wa(h[0],h[1],V)&&(N=1);++A<N;)for(var ae=h[A],xe=mo(ae),De=-1,Fe=xe.length;++De<Fe;){var at=xe[De],ot=l[at];(ot===r||nc(ot,Kp[at])&&!Tn.call(l,at))&&(l[at]=ae[at])}return l}),ohe=Vr(function(l){return l.push(r,m9),pt(t7,r,l)});function she(l,h){return Sn(l,ur(h,3),Bc)}function che(l,h){return Sn(l,ur(h,3),LO)}function uhe(l,h){return l==null?l:kO(l,ur(h,3),mo)}function lhe(l,h){return l==null?l:LL(l,ur(h,3),mo)}function fhe(l,h){return l&&Bc(l,ur(h,3))}function dhe(l,h){return l&&LO(l,ur(h,3))}function hhe(l){return l==null?[]:n_(l,Vi(l))}function phe(l){return l==null?[]:n_(l,mo(l))}function gI(l,h,A){var N=l==null?r:qd(l,h);return N===r?A:N}function ghe(l,h){return l!=null&&w9(l,h,Uue)}function yI(l,h){return l!=null&&w9(l,h,Bue)}var yhe=d9(function(l,h,A){h!=null&&typeof h.toString!="function"&&(h=zw.call(h)),l[h]=A},vI(vo)),mhe=d9(function(l,h,A){h!=null&&typeof h.toString!="function"&&(h=zw.call(h)),Tn.call(l,h)?l[h].push(A):l[h]=[A]},ur),vhe=Vr(mm);function Vi(l){return yo(l)?RL(l):jO(l)}function mo(l){return yo(l)?RL(l,!0):Yue(l)}function bhe(l,h){var A={};return h=ur(h,3),Bc(l,function(N,V,ae){Nu(A,h(N,V,ae),N)}),A}function whe(l,h){var A={};return h=ur(h,3),Bc(l,function(N,V,ae){Nu(A,V,h(N,V,ae))}),A}var _he=Xp(function(l,h,A){i_(l,h,A)}),t7=Xp(function(l,h,A,N){i_(l,h,A,N)}),Ehe=$u(function(l,h){var A={};if(l==null)return A;var N=!1;h=Sr(h,function(ae){return ae=tf(ae,l),N||(N=ae.length>1),ae}),Fc(l,tI(l),A),N&&(A=ls(A,d|g|m,yle));for(var V=h.length;V--;)WO(A,h[V]);return A});function xhe(l,h){return r7(l,b_(ur(h)))}var Ahe=$u(function(l,h){return l==null?{}:Jue(l,h)});function r7(l,h){if(l==null)return{};var A=Sr(tI(l),function(N){return[N]});return h=ur(h),WL(l,A,function(N,V){return h(N,V[0])})}function She(l,h,A){h=tf(h,l);var N=-1,V=h.length;for(V||(V=1,l=r);++N<V;){var ae=l==null?r:l[jc(h[N])];ae===r&&(N=V,ae=A),l=ku(ae)?ae.call(l):ae}return l}function Ohe(l,h,A){return l==null?l:bm(l,h,A)}function Ihe(l,h,A,N){return N=typeof N=="function"?N:r,l==null?l:bm(l,h,A,N)}var n7=g9(Vi),i7=g9(mo);function Phe(l,h,A){var N=Dr(l),V=N||nf(l)||t0(l);if(h=ur(h,4),A==null){var ae=l&&l.constructor;V?A=N?new ae:[]:ci(l)?A=ku(ae)?Jp(Ww(l)):{}:A={}}return(V?Wt:Bc)(l,function(xe,De,Fe){return h(A,xe,De,Fe)}),A}function The(l,h){return l==null?!0:WO(l,h)}function Rhe(l,h,A){return l==null?l:XL(l,h,QO(A))}function Che(l,h,A,N){return N=typeof N=="function"?N:r,l==null?l:XL(l,h,QO(A),N)}function r0(l){return l==null?[]:Ql(l,Vi(l))}function Nhe(l){return l==null?[]:Ql(l,mo(l))}function Dhe(l,h,A){return A===r&&(A=h,h=r),A!==r&&(A=hs(A),A=A===A?A:0),h!==r&&(h=hs(h),h=h===h?h:0),jd(hs(l),h,A)}function $he(l,h,A){return h=Lu(h),A===r?(A=h,h=0):A=Lu(A),l=hs(l),Fue(l,h,A)}function Mhe(l,h,A){if(A&&typeof A!="boolean"&&Wa(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=Lu(l),h===r?(h=l,l=0):h=Lu(h)),l>h){var N=l;l=h,h=N}if(A||l%1||h%1){var V=PL();return xa(l+V*(h-l+Qr("1e-"+((V+"").length-1))),h)}return zO(l,h)}var khe=Zp(function(l,h,A){return h=h.toLowerCase(),l+(A?a7(h):h)});function a7(l){return mI(On(l).toLowerCase())}function o7(l){return l=On(l),l&&l.replace(Lr,Lp).replace(An,"")}function Lhe(l,h,A){l=On(l),h=Fo(h);var N=l.length;A=A===r?N:jd(Br(A),0,N);var V=A;return A-=h.length,A>=0&&l.slice(A,V)==h}function Uhe(l){return l=On(l),l&&_r.test(l)?l.replace(xr,Up):l}function Bhe(l){return l=On(l),l&<.test(l)?l.replace(st,"\\$&"):l}var Fhe=Zp(function(l,h,A){return l+(A?"-":"")+h.toLowerCase()}),jhe=Zp(function(l,h,A){return l+(A?" ":"")+h.toLowerCase()}),qhe=u9("toLowerCase");function Hhe(l,h,A){l=On(l),h=Br(h);var N=h?tc(l):0;if(!h||N>=h)return l;var V=(h-N)/2;return l_(Jw(V),A)+l+l_(Qw(V),A)}function zhe(l,h,A){l=On(l),h=Br(h);var N=h?tc(l):0;return h&&N<h?l+l_(h-N,A):l}function Vhe(l,h,A){l=On(l),h=Br(h);var N=h?tc(l):0;return h&&N<h?l_(h-N,A)+l:l}function Ghe(l,h,A){return A||h==null?h=0:h&&(h=+h),Zce(On(l).replace(_t,""),h||0)}function Whe(l,h,A){return(A?Wa(l,h,A):h===r)?h=1:h=Br(h),VO(On(l),h)}function Khe(){var l=arguments,h=On(l[0]);return l.length<3?h:h.replace(l[1],l[2])}var Yhe=Zp(function(l,h,A){return l+(A?"_":"")+h.toLowerCase()});function Qhe(l,h,A){return A&&typeof A!="number"&&Wa(l,h,A)&&(h=A=r),A=A===r?$:A>>>0,A?(l=On(l),l&&(typeof h=="string"||h!=null&&!pI(h))&&(h=Fo(h),!h&&ec(l))?rf(Ea(l),0,A):l.split(h,A)):[]}var Jhe=Zp(function(l,h,A){return l+(A?" ":"")+mI(h)});function Xhe(l,h,A){return l=On(l),A=A==null?0:jd(Br(A),0,l.length),h=Fo(h),l.slice(A,A+h.length)==h}function Zhe(l,h,A){var N=J.templateSettings;A&&Wa(l,h,A)&&(h=r),l=On(l),h=E_({},h,N,y9);var V=E_({},h.imports,N.imports,y9),ae=Vi(V),xe=Ql(V,ae),De,Fe,at=0,ot=h.interpolate||gn,dt="__p += '",It=RO((h.escape||gn).source+"|"+ot.source+"|"+(ot===ve?pr:gn).source+"|"+(h.evaluate||gn).source+"|$","g"),Qt="//# sourceURL="+(Tn.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++po+"]")+`
|
|
150
|
+
`;l.replace(It,function(hr,Zr,sn,qo,Ka,Ho){return sn||(sn=qo),dt+=l.slice(at,Ho).replace(Ur,Bp),Zr&&(De=!0,dt+=`' +
|
|
151
|
+
__e(`+Zr+`) +
|
|
152
|
+
'`),Ka&&(Fe=!0,dt+=`';
|
|
153
|
+
`+Ka+`;
|
|
154
|
+
__p += '`),sn&&(dt+=`' +
|
|
155
|
+
((__t = (`+sn+`)) == null ? '' : __t) +
|
|
156
|
+
'`),at=Ho+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 Cr(s);dt=(Fe?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":"")+(Fe?`, __j = Array.prototype.join;
|
|
163
|
+
function print() { __p += __j.call(arguments, '') }
|
|
164
|
+
`:`;
|
|
165
|
+
`)+dt+`return __p
|
|
166
|
+
}`;var qr=c7(function(){return En(ae,Qt+"return "+dt).apply(r,xe)});if(qr.source=dt,hI(qr))throw qr;return qr}function epe(l){return On(l).toLowerCase()}function tpe(l){return On(l).toUpperCase()}function rpe(l,h,A){if(l=On(l),l&&(A||h===r))return Dd(l);if(!l||!(h=Fo(h)))return l;var N=Ea(l),V=Ea(h),ae=$d(N,V),xe=Md(N,V)+1;return rf(N,ae,xe).join("")}function npe(l,h,A){if(l=On(l),l&&(A||h===r))return l.slice(0,Ld(l)+1);if(!l||!(h=Fo(h)))return l;var N=Ea(l),V=Md(N,Ea(h))+1;return rf(N,0,V).join("")}function ipe(l,h,A){if(l=On(l),l&&(A||h===r))return l.replace(_t,"");if(!l||!(h=Fo(h)))return l;var N=Ea(l),V=$d(N,Ea(h));return rf(N,V).join("")}function ape(l,h){var A=L,N=q;if(ci(h)){var V="separator"in h?h.separator:V;A="length"in h?Br(h.length):A,N="omission"in h?Fo(h.omission):N}l=On(l);var ae=l.length;if(ec(l)){var xe=Ea(l);ae=xe.length}if(A>=ae)return l;var De=A-tc(N);if(De<1)return N;var Fe=xe?rf(xe,0,De).join(""):l.slice(0,De);if(V===r)return Fe+N;if(xe&&(De+=Fe.length-De),pI(V)){if(l.slice(De).search(V)){var at,ot=Fe;for(V.global||(V=RO(V.source,On(lr.exec(V))+"g")),V.lastIndex=0;at=V.exec(ot);)var dt=at.index;Fe=Fe.slice(0,dt===r?De:dt)}}else if(l.indexOf(Fo(V),De)!=De){var It=Fe.lastIndexOf(V);It>-1&&(Fe=Fe.slice(0,It))}return Fe+N}function ope(l){return l=On(l),l&&$r.test(l)?l.replace(Kn,Gp):l}var spe=Zp(function(l,h,A){return l+(A?" ":"")+h.toUpperCase()}),mI=u9("toUpperCase");function s7(l,h,A){return l=On(l),h=A?r:h,h===r?jp(l)?Uce(l):di(l):l.match(h)||[]}var c7=Vr(function(l,h){try{return pt(l,r,h)}catch(A){return hI(A)?A:new Cr(A)}}),cpe=$u(function(l,h){return Wt(h,function(A){A=jc(A),Nu(l,A,fI(l[A],l))}),l});function upe(l){var h=l==null?0:l.length,A=ur();return l=h?Sr(l,function(N){if(typeof N[1]!="function")throw new cs(o);return[A(N[0]),N[1]]}):[],Vr(function(N){for(var V=-1;++V<h;){var ae=l[V];if(pt(ae[0],this,N))return pt(ae[1],this,N)}})}function lpe(l){return Mue(ls(l,d))}function vI(l){return function(){return l}}function fpe(l,h){return l==null||l!==l?h:l}var dpe=f9(),hpe=f9(!0);function vo(l){return l}function bI(l){return jL(typeof l=="function"?l:ls(l,d))}function ppe(l){return HL(ls(l,d))}function gpe(l,h){return zL(l,ls(h,d))}var ype=Vr(function(l,h){return function(A){return mm(A,l,h)}}),mpe=Vr(function(l,h){return function(A){return mm(l,A,h)}});function wI(l,h,A){var N=Vi(h),V=n_(h,N);A==null&&!(ci(h)&&(V.length||!N.length))&&(A=h,h=l,l=this,V=n_(h,Vi(h)));var ae=!(ci(A)&&"chain"in A)||!!A.chain,xe=ku(l);return Wt(V,function(De){var Fe=h[De];l[De]=Fe,xe&&(l.prototype[De]=function(){var at=this.__chain__;if(ae||at){var ot=l(this.__wrapped__),dt=ot.__actions__=go(this.__actions__);return dt.push({func:Fe,args:arguments,thisArg:l}),ot.__chain__=at,ot}return Fe.apply(l,Hi([this.value()],arguments))})}),l}function vpe(){return yr._===this&&(yr._=zce),this}function _I(){}function bpe(l){return l=Br(l),Vr(function(h){return VL(h,l)})}var wpe=XO(Sr),_pe=XO(Pn),Epe=XO(Mi);function u7(l){return aI(l)?Gl(jc(l)):Xue(l)}function xpe(l){return function(h){return l==null?r:qd(l,h)}}var Ape=h9(),Spe=h9(!0);function EI(){return[]}function xI(){return!1}function Ope(){return{}}function Ipe(){return""}function Ppe(){return!0}function Tpe(l,h){if(l=Br(l),l<1||l>F)return[];var A=$,N=xa(l,$);h=ur(h),l-=$;for(var V=Yl(N,h);++A<l;)h(A);return V}function Rpe(l){return Dr(l)?Sr(l,jc):jo(l)?[l]:go(T9(On(l)))}function Cpe(l){var h=++qce;return On(l)+h}var Npe=u_(function(l,h){return l+h},0),Dpe=ZO("ceil"),$pe=u_(function(l,h){return l/h},1),Mpe=ZO("floor");function kpe(l){return l&&l.length?r_(l,vo,UO):r}function Lpe(l,h){return l&&l.length?r_(l,ur(h,2),UO):r}function Upe(l){return Cd(l,vo)}function Bpe(l,h){return Cd(l,ur(h,2))}function Fpe(l){return l&&l.length?r_(l,vo,qO):r}function jpe(l,h){return l&&l.length?r_(l,ur(h,2),qO):r}var qpe=u_(function(l,h){return l*h},1),Hpe=ZO("round"),zpe=u_(function(l,h){return l-h},0);function Vpe(l){return l&&l.length?Kl(l,vo):0}function Gpe(l,h){return l&&l.length?Kl(l,ur(h,2)):0}return J.after=pde,J.ary=F9,J.assign=the,J.assignIn=e7,J.assignInWith=E_,J.assignWith=rhe,J.at=nhe,J.before=j9,J.bind=fI,J.bindAll=cpe,J.bindKey=q9,J.castArray=Ode,J.chain=L9,J.chunk=Mle,J.compact=kle,J.concat=Lle,J.cond=upe,J.conforms=lpe,J.constant=vI,J.countBy=Vfe,J.create=ihe,J.curry=H9,J.curryRight=z9,J.debounce=V9,J.defaults=ahe,J.defaultsDeep=ohe,J.defer=gde,J.delay=yde,J.difference=Ule,J.differenceBy=Ble,J.differenceWith=Fle,J.drop=jle,J.dropRight=qle,J.dropRightWhile=Hle,J.dropWhile=zle,J.fill=Vle,J.filter=Wfe,J.flatMap=Qfe,J.flatMapDeep=Jfe,J.flatMapDepth=Xfe,J.flatten=D9,J.flattenDeep=Gle,J.flattenDepth=Wle,J.flip=mde,J.flow=dpe,J.flowRight=hpe,J.fromPairs=Kle,J.functions=hhe,J.functionsIn=phe,J.groupBy=Zfe,J.initial=Qle,J.intersection=Jle,J.intersectionBy=Xle,J.intersectionWith=Zle,J.invert=yhe,J.invertBy=mhe,J.invokeMap=tde,J.iteratee=bI,J.keyBy=rde,J.keys=Vi,J.keysIn=mo,J.map=y_,J.mapKeys=bhe,J.mapValues=whe,J.matches=ppe,J.matchesProperty=gpe,J.memoize=v_,J.merge=_he,J.mergeWith=t7,J.method=ype,J.methodOf=mpe,J.mixin=wI,J.negate=b_,J.nthArg=bpe,J.omit=Ehe,J.omitBy=xhe,J.once=vde,J.orderBy=nde,J.over=wpe,J.overArgs=bde,J.overEvery=_pe,J.overSome=Epe,J.partial=dI,J.partialRight=G9,J.partition=ide,J.pick=Ahe,J.pickBy=r7,J.property=u7,J.propertyOf=xpe,J.pull=nfe,J.pullAll=M9,J.pullAllBy=ife,J.pullAllWith=afe,J.pullAt=ofe,J.range=Ape,J.rangeRight=Spe,J.rearg=wde,J.reject=sde,J.remove=sfe,J.rest=_de,J.reverse=uI,J.sampleSize=ude,J.set=Ohe,J.setWith=Ihe,J.shuffle=lde,J.slice=cfe,J.sortBy=hde,J.sortedUniq=gfe,J.sortedUniqBy=yfe,J.split=Qhe,J.spread=Ede,J.tail=mfe,J.take=vfe,J.takeRight=bfe,J.takeRightWhile=wfe,J.takeWhile=_fe,J.tap=kfe,J.throttle=xde,J.thru=g_,J.toArray=J9,J.toPairs=n7,J.toPairsIn=i7,J.toPath=Rpe,J.toPlainObject=Z9,J.transform=Phe,J.unary=Ade,J.union=Efe,J.unionBy=xfe,J.unionWith=Afe,J.uniq=Sfe,J.uniqBy=Ofe,J.uniqWith=Ife,J.unset=The,J.unzip=lI,J.unzipWith=k9,J.update=Rhe,J.updateWith=Che,J.values=r0,J.valuesIn=Nhe,J.without=Pfe,J.words=s7,J.wrap=Sde,J.xor=Tfe,J.xorBy=Rfe,J.xorWith=Cfe,J.zip=Nfe,J.zipObject=Dfe,J.zipObjectDeep=$fe,J.zipWith=Mfe,J.entries=n7,J.entriesIn=i7,J.extend=e7,J.extendWith=E_,wI(J,J),J.add=Npe,J.attempt=c7,J.camelCase=khe,J.capitalize=a7,J.ceil=Dpe,J.clamp=Dhe,J.clone=Ide,J.cloneDeep=Tde,J.cloneDeepWith=Rde,J.cloneWith=Pde,J.conformsTo=Cde,J.deburr=o7,J.defaultTo=fpe,J.divide=$pe,J.endsWith=Lhe,J.eq=nc,J.escape=Uhe,J.escapeRegExp=Bhe,J.every=Gfe,J.find=Kfe,J.findIndex=C9,J.findKey=she,J.findLast=Yfe,J.findLastIndex=N9,J.findLastKey=che,J.floor=Mpe,J.forEach=U9,J.forEachRight=B9,J.forIn=uhe,J.forInRight=lhe,J.forOwn=fhe,J.forOwnRight=dhe,J.get=gI,J.gt=Nde,J.gte=Dde,J.has=ghe,J.hasIn=yI,J.head=$9,J.identity=vo,J.includes=ede,J.indexOf=Yle,J.inRange=$he,J.invoke=vhe,J.isArguments=Vd,J.isArray=Dr,J.isArrayBuffer=$de,J.isArrayLike=yo,J.isArrayLikeObject=vi,J.isBoolean=Mde,J.isBuffer=nf,J.isDate=kde,J.isElement=Lde,J.isEmpty=Ude,J.isEqual=Bde,J.isEqualWith=Fde,J.isError=hI,J.isFinite=jde,J.isFunction=ku,J.isInteger=W9,J.isLength=w_,J.isMap=K9,J.isMatch=qde,J.isMatchWith=Hde,J.isNaN=zde,J.isNative=Vde,J.isNil=Wde,J.isNull=Gde,J.isNumber=Y9,J.isObject=ci,J.isObjectLike=hi,J.isPlainObject=xm,J.isRegExp=pI,J.isSafeInteger=Kde,J.isSet=Q9,J.isString=__,J.isSymbol=jo,J.isTypedArray=t0,J.isUndefined=Yde,J.isWeakMap=Qde,J.isWeakSet=Jde,J.join=efe,J.kebabCase=Fhe,J.last=ds,J.lastIndexOf=tfe,J.lowerCase=jhe,J.lowerFirst=qhe,J.lt=Xde,J.lte=Zde,J.max=kpe,J.maxBy=Lpe,J.mean=Upe,J.meanBy=Bpe,J.min=Fpe,J.minBy=jpe,J.stubArray=EI,J.stubFalse=xI,J.stubObject=Ope,J.stubString=Ipe,J.stubTrue=Ppe,J.multiply=qpe,J.nth=rfe,J.noConflict=vpe,J.noop=_I,J.now=m_,J.pad=Hhe,J.padEnd=zhe,J.padStart=Vhe,J.parseInt=Ghe,J.random=Mhe,J.reduce=ade,J.reduceRight=ode,J.repeat=Whe,J.replace=Khe,J.result=She,J.round=Hpe,J.runInContext=Ue,J.sample=cde,J.size=fde,J.snakeCase=Yhe,J.some=dde,J.sortedIndex=ufe,J.sortedIndexBy=lfe,J.sortedIndexOf=ffe,J.sortedLastIndex=dfe,J.sortedLastIndexBy=hfe,J.sortedLastIndexOf=pfe,J.startCase=Jhe,J.startsWith=Xhe,J.subtract=zpe,J.sum=Vpe,J.sumBy=Gpe,J.template=Zhe,J.times=Tpe,J.toFinite=Lu,J.toInteger=Br,J.toLength=X9,J.toLower=epe,J.toNumber=hs,J.toSafeInteger=ehe,J.toString=On,J.toUpper=tpe,J.trim=rpe,J.trimEnd=npe,J.trimStart=ipe,J.truncate=ape,J.unescape=ope,J.uniqueId=Cpe,J.upperCase=spe,J.upperFirst=mI,J.each=U9,J.eachRight=B9,J.first=$9,wI(J,function(){var l={};return Bc(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(Br(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==B||A==K;rn.prototype[l]=function(V){var ae=this.clone();return ae.__iteratees__.push({iteratee:ur(V,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(vo)},rn.prototype.find=function(l){return this.filter(l).head()},rn.prototype.findLast=function(l){return this.reverse().find(l)},rn.prototype.invokeMap=Vr(function(l,h){return typeof l=="function"?new rn(this):this.map(function(A){return mm(A,l,h)})}),rn.prototype.reject=function(l){return this.filter(b_(ur(l)))},rn.prototype.slice=function(l,h){l=Br(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=Br(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($)},Bc(rn.prototype,function(l,h){var A=/^(?:filter|find|map|reject)|While$/.test(h),N=/^(?:head|last)$/.test(h),V=J[N?"take"+(h=="last"?"Right":""):h],ae=N||/^find/.test(h);V&&(J.prototype[h]=function(){var xe=this.__wrapped__,De=N?[1]:arguments,Fe=xe instanceof rn,at=De[0],ot=Fe||Dr(xe),dt=function(Zr){var sn=V.apply(J,Hi([Zr],De));return N&&It?sn[0]:sn};ot&&A&&typeof at=="function"&&at.length!=1&&(Fe=ot=!1);var It=this.__chain__,Qt=!!this.__actions__.length,dr=ae&&!It,qr=Fe&&!Qt;if(!ae&&ot){xe=qr?xe:new rn(this);var hr=l.apply(xe,De);return hr.__actions__.push({func:g_,args:[dt],thisArg:r}),new us(hr,It)}return dr&&qr?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=jw[l],A=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",N=/^(?:pop|shift)$/.test(l);J.prototype[l]=function(){var V=arguments;if(N&&!this.__chain__){var ae=this.value();return h.apply(Dr(ae)?ae:[],V)}return this[A](function(xe){return h.apply(Dr(xe)?xe:[],V)})}}),Bc(rn.prototype,function(l,h){var A=J[h];if(A){var N=A.name+"";Tn.call(Qp,N)||(Qp[N]=[]),Qp[N].push({name:h,func:A})}}),Qp[c_(r,_).name]=[{name:"wrapper",func:r}],rn.prototype.clone=oue,rn.prototype.reverse=sue,rn.prototype.value=cue,J.prototype.at=Lfe,J.prototype.chain=Ufe,J.prototype.commit=Bfe,J.prototype.next=Ffe,J.prototype.plant=qfe,J.prototype.reverse=Hfe,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=zfe,J.prototype.first=J.prototype.head,lm&&(J.prototype[lm]=jfe),J},Wp=Bce();R?((R.exports=Wp)._=Wp,ie._=Wp):yr._=Wp}).call(Mv)})(w5,w5.exports);var HUe=Object.defineProperty,zUe=Object.defineProperties,VUe=Object.getOwnPropertyDescriptors,pY=Object.getOwnPropertySymbols,GUe=Object.prototype.hasOwnProperty,WUe=Object.prototype.propertyIsEnumerable,gY=(t,e,r)=>e in t?HUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vE=(t,e)=>{for(var r in e||(e={}))GUe.call(e,r)&&gY(t,r,e[r]);if(pY)for(var r of pY(e))WUe.call(e,r)&&gY(t,r,e[r]);return t},KUe=(t,e)=>zUe(t,VUe(e));function fd(t,e,r){var n;const i=vMe(t);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${qUe}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function Cp(t){return t.includes(":")?t.split(":")[1]:t}function ese(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function YUe(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 QUe(t={},e={}){const r=yY(t),n=yY(e);return w5.exports.merge(r,n)}function yY(t){var e,r,n,i;const a={};if(!pg(t))return a;for(const[o,s]of Object.entries(t)){const c=Ik(o)?[o]:s.chains,u=s.methods||[],f=s.events||[],d=s.rpcMap||{},g=hb(o);a[g]=KUe(vE(vE({},a[g]),s),{chains:vN(c,(e=a[g])==null?void 0:e.chains),methods:vN(u,(r=a[g])==null?void 0:r.methods),events:vN(f,(n=a[g])==null?void 0:n.events),rpcMap:vE(vE({},d),(i=a[g])==null?void 0:i.rpcMap)})}return a}function JUe(t){return t.includes(":")?t.split(":")[2]:t}function XUe(t){const e={};for(const[r,n]of Object.entries(t)){const i=n.methods||[],a=n.events||[],o=n.accounts||[],s=Ik(r)?[r]:n.chains?n.chains:ese(n.accounts);e[r]={chains:s,methods:i,events:a,accounts:o}}return e}function CN(t){return typeof t=="number"?t:t.includes("0x")?parseInt(t,16):t.includes(":")?Number(t.split(":")[1]):Number(t)}const tse={},ri=t=>tse[t],NN=(t,e)=>{tse[t]=e};class ZUe{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(Vl.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=Cp(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||fd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new zl(new Sd(n,ri("disableProviderPing")))}}class eBe{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(Vl.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||fd(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new zl(new Sd(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(Cp(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 tBe{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(Vl.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=Cp(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||fd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new zl(new Sd(n,ri("disableProviderPing")))}}class rBe{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(Vl.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=Cp(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||fd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new zl(new Sd(n,ri("disableProviderPing")))}}class nBe{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(Vl.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=Cp(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 zl(new Sd(n,ri("disableProviderPing")))}}class iBe{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(Vl.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=Cp(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||fd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new zl(new Sd(n,ri("disableProviderPing")))}}class aBe{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(Vl.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=Cp(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||fd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new zl(new Sd(n,ri("disableProviderPing")))}}class oBe{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||fd(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Vl.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||fd(e,this.namespace);return typeof n>"u"?void 0:new zl(new Sd(n,ri("disableProviderPing")))}}var sBe=Object.defineProperty,cBe=Object.defineProperties,uBe=Object.getOwnPropertyDescriptors,mY=Object.getOwnPropertySymbols,lBe=Object.prototype.hasOwnProperty,fBe=Object.prototype.propertyIsEnumerable,vY=(t,e,r)=>e in t?sBe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,bE=(t,e)=>{for(var r in e||(e={}))lBe.call(e,r)&&vY(t,r,e[r]);if(mY)for(var r of mY(e))fBe.call(e,r)&&vY(t,r,e[r]);return t},DN=(t,e)=>cBe(t,uBe(e));let dBe=class rse{constructor(e){this.events=new QM,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)||dY})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const r=new rse(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:bE({},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:Ei("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=XUe(a.namespaces),this.persist("namespaces",this.namespaces))}).catch(a=>{if(a.message!==Xoe)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(Eu(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 MUe.init({logger:this.providerOpts.logger||dY,relayUrl:this.providerOpts.relayUrl||BUe,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=>hb(r)))];NN("client",this.client),NN("events",this.events),NN("disableProviderPing",this.disableProviderPing),e.forEach(r=>{if(!this.session)return;const n=YUe(r,this.session),i=ese(n),a=QUe(this.namespaces,this.optionalNamespaces),o=DN(bE({},a[r]),{accounts:n,chains:i});switch(r){case"eip155":this.rpcProviders[r]=new eBe({namespace:o});break;case"solana":this.rpcProviders[r]=new tBe({namespace:o});break;case"cosmos":this.rpcProviders[r]=new rBe({namespace:o});break;case"polkadot":this.rpcProviders[r]=new ZUe({namespace:o});break;case"cip34":this.rpcProviders[r]=new nBe({namespace:o});break;case"elrond":this.rpcProviders[r]=new iBe({namespace:o});break;case"multiversx":this.rpcProviders[r]=new aBe({namespace:o});break;case"near":this.rpcProviders[r]=new oBe({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&&Eu(i)&&this.events.emit("accountsChanged",i.map(JUe))}else if(n.name==="chainChanged"){const i=r.chainId,a=r.event.data,o=hb(i),s=CN(i)!==CN(a)?`${o}:${CN(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=DN(bE({},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",DN(bE({},Ei("USER_DISCONNECTED")),{data:e.topic}))}),this.on(Vl.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=>hb(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=hb(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(`${hY}/${e}`,r)}async getFromStore(e){return await this.client.core.storage.getItem(`${hY}/${e}`)}};const hBe=dBe,pBe="wc",gBe="ethereum_provider",yBe=`${pBe}@2:${gBe}:`,mBe="https://rpc.walletconnect.com/v1/",zA=["eth_sendTransaction","personal_sign"],nse=["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"],VA=["chainChanged","accountsChanged"],ise=["chainChanged","accountsChanged","message","disconnect","connect"];var vBe=Object.defineProperty,bBe=Object.defineProperties,wBe=Object.getOwnPropertyDescriptors,bY=Object.getOwnPropertySymbols,_Be=Object.prototype.hasOwnProperty,EBe=Object.prototype.propertyIsEnumerable,wY=(t,e,r)=>e in t?vBe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,gb=(t,e)=>{for(var r in e||(e={}))_Be.call(e,r)&&wY(t,r,e[r]);if(bY)for(var r of bY(e))EBe.call(e,r)&&wY(t,r,e[r]);return t},_Y=(t,e)=>bBe(t,wBe(e));function GA(t){return Number(t[0].split(":")[1])}function $N(t){return`0x${t.toString(16)}`}function xBe(t){const{chains:e,optionalChains:r,methods:n,optionalMethods:i,events:a,optionalEvents:o,rpcMap:s}=t;if(!Eu(e))throw new Error("Invalid chains");const c={chains:e,methods:n||zA,events:a||VA,rpcMap:gb({},e.length?{[GA(e)]:s[GA(e)]}:{})},u=a==null?void 0:a.filter(m=>!VA.includes(m)),f=n==null?void 0:n.filter(m=>!zA.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:nse))],events:[...new Set(c.events.concat(o!=null&&o.length?o:ise))],rpcMap:s};return{required:e.length?c:void 0,optional:r.length?g:void 0}}let ase=class ose{constructor(){this.events=new fo.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=yBe,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 ose;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}=xBe(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(_Y(gb({namespaces:gb({},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=bMe(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:a),this.setAccounts(a),this.events.emit("connect",{chainId:$N(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",$N(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",_Y(gb({},Ei("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",$N(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)||zA:[],c=i.length?(e==null?void 0:e.events)||VA:[],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?GA(this.rpc.chains):GA(this.rpc.optionalChains),this.signer=await hBe.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=T5e.WalletConnectModal}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(gb({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&&Eu(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&&Eu(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])||`${mBe}?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 ABe=ase,SBe=Object.freeze(Object.defineProperty({__proto__:null,EthereumProvider:ABe,OPTIONAL_EVENTS:ise,OPTIONAL_METHODS:nse,REQUIRED_EVENTS:VA,REQUIRED_METHODS:zA,default:ase},Symbol.toStringTag,{value:"Module"})),OBe=uo(SBe);var IBe=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]}),PBe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),TBe=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)&&IBe(e,t,r);return PBe(e,t),e};Object.defineProperty(eO,"__esModule",{value:!0});eO.WalletConnectV2Connector=void 0;const RBe=FS,CBe=Ml,NBe=qs;class Gf extends RBe.AbstractConnector{constructor(e){super({supportedChainIds:(()=>{const{chains:r,optionalChains:n}=Gf.configuration.chains[e];return[...r,...n]})()}),this.desiredChainId=e,this.activate=async()=>{const r=await Promise.resolve().then(()=>TBe(OBe)).then(i=>{const{chains:a,optionalChains:o}=Gf.configuration.chains[this.desiredChainId];return i.default.init({projectId:Gf.configuration.projectId,rpcMap:Gf.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()}}}eO.WalletConnectV2Connector=Gf;Gf.configuration=NBe.getConfiguration()[CBe.ProviderType.WALLET_CONNECT_V2];Gf.clearStorage=t=>{t.removeRegExp(new RegExp("^wc@2:"))};var dO={},Od=(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))(Od||{}),cm=(t=>(t.SyncWeb3Method="SYNC_WEB3_METHOD",t.DuplicateIframe="DUPLICATE_IFRAME",t.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",t.DeprecationNotice="DEPRECATION_NOTICE",t))(cm||{}),hO=(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))(hO||{}),_s=(t=>(t.MetaMask="metamask",t.CoinbaseWallet="coinbase_wallet",t))(_s||{}),Hb=(t=>(t.WalletSelected="wallet_selected",t.WalletConnected="wallet_connected",t.WalletRejected="wallet_rejected",t))(Hb||{}),vr=(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))(vr||{}),Ah=(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))(Ah||{}),P1=(t=>(t.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",t))(P1||{}),sse=(t=>(t.UpdateEmail="update-email",t.MFA="mfa",t.Recovery="recovery",t))(sse||{}),cse=(t=>(t.Retry="retry",t))(cse||{}),use=(t=>(t.EmailSent="email-sent",t.EmailNotDeliverable="email-not-deliverable",t))(use||{}),V0=(t=>(t.VerifyEmailOtp="verify-email-otp",t.Cancel="cancel",t))(V0||{}),lse=(t=>(t.EmailOTPSent="email-otp-sent",t.InvalidEmailOtp="invalid-email-otp",t.ExpiredEmailOtp="expired-email-otp",t))(lse||{}),WA=(t=>(t.Retry="device-retry",t))(WA||{}),fse=(t=>(t.DeviceApproved="device-approved",t.DeviceNeedsApproval="device-needs-approval",t.DeviceVerificationLinkExpired="device-verification-link-expired",t.DeviceVerificationEmailSent="device-verification-email-sent",t))(fse||{}),dse=(t=>(t.Harmony="HARMONY",t))(dse||{}),hse=(t=>(t.PhoneNumber="phone_number",t))(hse||{}),DBe=Object.create,pO=Object.defineProperty,$Be=Object.defineProperties,MBe=Object.getOwnPropertyDescriptor,kBe=Object.getOwnPropertyDescriptors,LBe=Object.getOwnPropertyNames,EY=Object.getOwnPropertySymbols,UBe=Object.getPrototypeOf,pse=Object.prototype.hasOwnProperty,BBe=Object.prototype.propertyIsEnumerable,xY=(t,e,r)=>e in t?pO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Lk=(t,e)=>{for(var r in e||(e={}))pse.call(e,r)&&xY(t,r,e[r]);if(EY)for(var r of EY(e))BBe.call(e,r)&&xY(t,r,e[r]);return t},gse=(t,e)=>$Be(t,kBe(e)),FBe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),jBe=(t,e)=>{for(var r in e)pO(t,r,{get:e[r],enumerable:!0})},qBe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of LBe(e))!pse.call(t,i)&&i!==r&&pO(t,i,{get:()=>e[i],enumerable:!(n=MBe(e,i))||n.enumerable});return t},HBe=(t,e,r)=>(r=t!=null?DBe(UBe(t)):{},qBe(e||!t||!t.__esModule?pO(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())}),zBe=FBe((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,O;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(O=1,b=new Array(_-1);O<_;O++)b[O-1]=arguments[O];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 VBe(t){let e={exports:{}};return t(e,e.exports),e.exports}var GBe=Number.MAX_SAFE_INTEGER||9007199254740991,Uk={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:GBe,MAX_SAFE_COMPONENT_LENGTH:16},WBe=typeof process=="object"&&{}&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},Cn=WBe,Mw=VBe(function(t,e){let{MAX_SAFE_COMPONENT_LENGTH:r}=Uk,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*$")}),AY=/^[0-9]+$/,yse=(t,e)=>{let r=AY.test(t),n=AY.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},KBe=(t,e)=>yse(e,t),YBe={compareIdentifiers:yse,rcompareIdentifiers:KBe},{MAX_LENGTH:SY,MAX_SAFE_INTEGER:wE}=Uk,{re:OY,t:IY}=Mw,{compareIdentifiers:kv}=YBe,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>SY)throw new TypeError(`version is longer than ${SY} characters`);Cn("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;let r=t.trim().match(e.loose?OY[IY.LOOSE]:OY[IY.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>wE||this.major<0)throw new TypeError("Invalid major version");if(this.minor>wE||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>wE||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<wE)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)),kv(this.major,t.major)||kv(this.minor,t.minor)||kv(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 kv(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 kv(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}},QBe=(t,e,r)=>new ua(t,r).compare(new ua(e,r)),um=QBe,JBe=(t,e,r)=>um(t,e,r)===0,XBe=JBe,ZBe=(t,e,r)=>um(t,e,r)!==0,eFe=ZBe,tFe=(t,e,r)=>um(t,e,r)>0,rFe=tFe,nFe=(t,e,r)=>um(t,e,r)>=0,iFe=nFe,aFe=(t,e,r)=>um(t,e,r)<0,oFe=aFe,sFe=(t,e,r)=>um(t,e,r)<=0,cFe=sFe,uFe=(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 XBe(t,r,n);case"!=":return eFe(t,r,n);case">":return rFe(t,r,n);case">=":return iFe(t,r,n);case"<":return oFe(t,r,n);case"<=":return cFe(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},MN=uFe,Lv=Symbol("SemVer ANY"),T1=class{static get ANY(){return Lv}constructor(e,r){if(r&&typeof r=="object"||(r={loose:!!r,includePrerelease:!1}),e instanceof T1){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===Lv?this.value="":this.value=this.operator+this.semver.version,Cn("comp",this)}parse(e){let r=this.options.loose?PY[TY.COMPARATORLOOSE]:PY[TY.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=Lv}toString(){return this.value}test(e){if(Cn("Comparator.test",e,this.options.loose),this.semver===Lv||e===Lv)return!0;if(typeof e=="string")try{e=new ua(e,this.options)}catch{return!1}return MN(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof T1))throw new TypeError("a Comparator is required");if(r&&typeof r=="object"||(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""||new yg(e.value,r).test(this.value);if(e.operator==="")return e.value===""||new yg(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=MN(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=MN(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||a&&o||s||c}},{re:PY,t:TY}=Mw,yg=class{constructor(t,e){if(e&&typeof e=="object"||(e={loose:!!e,includePrerelease:!1}),t instanceof yg)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new yg(t.raw,e);if(t instanceof T1)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?Ma[fa.HYPHENRANGELOOSE]:Ma[fa.HYPHENRANGE];t=t.replace(r,EFe(this.options.includePrerelease)),Cn("hyphen replace",t),t=t.replace(Ma[fa.COMPARATORTRIM],lFe),Cn("comparator trim",t,Ma[fa.COMPARATORTRIM]),t=(t=(t=t.replace(Ma[fa.TILDETRIM],fFe)).replace(Ma[fa.CARETTRIM],dFe)).split(/\s+/).join(" ");let n=e?Ma[fa.COMPARATORLOOSE]:Ma[fa.COMPARATOR];return t.split(" ").map(i=>hFe(i,this.options)).join(" ").split(/\s+/).map(i=>_Fe(i,this.options)).filter(this.options.loose?i=>!!i.match(n):()=>!0).map(i=>new T1(i,this.options))}intersects(t,e){if(!(t instanceof yg))throw new TypeError("a Range is required");return this.set.some(r=>RY(r,e)&&t.set.some(n=>RY(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(xFe(this.set[e],t,this.options))return!0;return!1}},{re:Ma,t:fa,comparatorTrimReplace:lFe,tildeTrimReplace:fFe,caretTrimReplace:dFe}=Mw,RY=(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},hFe=(t,e)=>(Cn("comp",t,e),t=yFe(t,e),Cn("caret",t),t=pFe(t,e),Cn("tildes",t),t=vFe(t,e),Cn("xrange",t),t=wFe(t,e),Cn("stars",t),t),to=t=>!t||t.toLowerCase()==="x"||t==="*",pFe=(t,e)=>t.trim().split(/\s+/).map(r=>gFe(r,e)).join(" "),gFe=(t,e)=>{let r=e.loose?Ma[fa.TILDELOOSE]:Ma[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})},yFe=(t,e)=>t.trim().split(/\s+/).map(r=>mFe(r,e)).join(" "),mFe=(t,e)=>{Cn("caret",t,e);let r=e.loose?Ma[fa.CARETLOOSE]:Ma[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=>bFe(r,e)).join(" ")),bFe=(t,e)=>{t=t.trim();let r=e.loose?Ma[fa.XRANGELOOSE]:Ma[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})},wFe=(t,e)=>(Cn("replaceStars",t,e),t.trim().replace(Ma[fa.STAR],"")),_Fe=(t,e)=>(Cn("replaceGTE0",t,e),t.trim().replace(Ma[e.includePrerelease?fa.GTE0PRE:fa.GTE0],"")),EFe=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(),xFe=(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!==T1.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},AFe=(t,e,r)=>{try{e=new yg(e,r)}catch{return!1}return e.test(t)},{MAX_LENGTH:SFe}=Uk,{re:CY,t:NY}=Mw,OFe=(t,e)=>{if(e&&typeof e=="object"||(e={loose:!!e,includePrerelease:!1}),t instanceof ua)return t;if(typeof t!="string"||t.length>SFe||!(e.loose?CY[NY.LOOSE]:CY[NY.FULL]).test(t))return null;try{return new ua(t,e)}catch{return null}},IFe=OFe,{re:_E,t:EE}=Mw,PFe=(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=_E[EE.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),_E[EE.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;_E[EE.COERCERTL].lastIndex=-1}else r=t.match(_E[EE.COERCE]);return r===null?null:IFe(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};function TFe(t){return String.fromCharCode(parseInt(t.slice(1),16))}function RFe(t){return`%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`}function CFe(t){return btoa(encodeURIComponent(t).replace(/%[0-9A-F]{2}/g,TFe))}function NFe(t){return decodeURIComponent(Array.from(atob(t),RFe).join(""))}function mse(t){return CFe(JSON.stringify(t))}function DFe(t){return JSON.parse(NFe(t))}function yb(t){return typeof t>"u"}function $Fe(t){return t===null}function vse(t){return $Fe(t)||yb(t)}function MFe(t){return vse(t)?!1:!yb(t.jsonrpc)&&!yb(t.id)&&(!yb(t.result)||!yb(t.error))}function kFe(t){return vse(t)?!1:typeof t=="number"&&Object.values(hO).includes(t)}function KA(t){if(!t)return!0;for(let e in t)if(Object.hasOwnProperty.call(t,e))return!1;return!0}var zn={};function LFe(t,e){return Object.assign(zn,e),t}var UFe={"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"},Id=class extends Error{constructor(e,r){super(`Magic SDK Error: [${e}] ${r}`),this.code=e,this.rawMessage=r,this.__proto__=Error,Object.setPrototypeOf(this,Id.prototype)}},R1=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=kFe(r)?r:hO.InternalError,this.message=`Magic RPC Error: [${this.code}] ${this.rawMessage}`,this.data=(e==null?void 0:e.data)||void 0,Object.setPrototypeOf(this,R1.prototype)}},kw=class{constructor(t,e){this.code=t,this.rawMessage=e,this.message=`Magic SDK Warning: [${t}] ${e}`}log(){console.warn(this.message)}},Bk=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,Bk.prototype)}},_5=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 BFe(){return new Id(Od.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.")}function bse(){return new Id(Od.ModalNotReady,"Modal is not ready.")}function FFe(){return new Id(Od.MalformedResponse,"Response from the Magic iframe is malformed.")}function jFe(t){return new Id(Od.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 qFe(t){let e=`Some extensions are incompatible with \`${zn.sdkName}@${zn.version}\`:`;return t.filter(r=>typeof r.compat<"u"&&r.compat!==null).forEach(r=>{let n=r.compat[zn.sdkName];typeof n=="string"?e+=`
|
|
167
|
+
- Extension \`${r.name}\` supports version(s) \`${n}\``:n||(e+=`
|
|
168
|
+
- Extension \`${r.name}\` does not support ${zn.platform} environments.`)}),new Id(Od.IncompatibleExtensions,e)}function HFe(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 Id(Od.InvalidArgument,`Invalid ${e(t.argument)} argument given to \`${t.procedure}\`.
|
|
169
|
+
Expected: \`${t.expected}\`
|
|
170
|
+
Received: \`${t.received}\``)}function zFe(){return new kw(cm.DuplicateIframe,"Duplicate iframes found.")}function VFe(){return new kw(cm.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 GFe(){return new kw(cm.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 \`${zn.defaultEndpoint}\`. Changing this default behavior will lead to unexpected results and potentially security-threatening bugs.`)}function mg(t){let{method:e,removalVersions:r,useInstead:n}=t,i=r[zn.sdkName],a=n?` Use \`${n}\` instead.`:"",o=`\`${e}\` will be removed from \`${zn.sdkName}\` in version \`${i}\`.${a}`;return new kw(cm.DeprecationNotice,o)}function*WFe(){let t=0;for(;;)t<Number.MAX_SAFE_INTEGER?yield++t:t=0}var KFe=WFe();function wse(){return KFe.next().value}var _se=Symbol("Payload pre-processed by Magic SDK");function Ese(t){return Object.defineProperty(t,_se,{value:!0,enumerable:!1}),t}function YFe(t){return!!t[_se]}function YA(t){var e,r,n;return YFe(t)||(t.jsonrpc=(e=t.jsonrpc)!=null?e:"2.0",t.id=wse(),t.method=(r=t.method)!=null?r:"noop",t.params=(n=t.params)!=null?n:[],Ese(t)),t}function an(t,e=[]){return Ese({params:e,method:t,jsonrpc:"2.0",id:wse()})}var Fk=class{constructor(t){t instanceof Fk?(this._jsonrpc=t.payload.jsonrpc,this._id=t.payload.id,this._result=t.payload.result,this._error=t.payload.error):MFe(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}}},QFe=HBe(zBe()),JFe=class extends QFe.default{};function xse(){let t=new JFe;return{emitter:t,createChainingEmitterMethod:(e,r)=>(...n)=>(t[e].apply(t,n),r),createBoundEmitterMethod:e=>(...r)=>t[e].apply(t,r)}}var Ase=Symbol("isPromiEvent");function Sse(t){return!!t[Ase]}function jk(t){let e=Ose(t),{createBoundEmitterMethod:r,createChainingEmitterMethod:n}=xse(),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,{[Ase]:!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 Ose(t){return new Promise((e,r)=>{let n=t(e,r);Promise.resolve(n).catch(r)})}var Np=class{constructor(t){this.sdk=t}get overlay(){return this.sdk.overlay}request(t){let e=this.overlay.post(P1.MAGIC_HANDLE_REQUEST,YA(t)),r=jk((i,a)=>{e.then(o=>{if(n(),o.hasError)a(new R1(o.payload.error));else if(o.hasResult)i(o.payload.result);else throw FFe()}).catch(o=>{n(),a(o)})}),n=this.overlay.on(Ah.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(vr.IntermediaryEvent,[{payloadId:e,eventType:t,args:r}]);this.request(n)}}};function XFe(t,e){let[r]=t.split(".").map(Number);return r>=e}var vg={"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"},ZFe=class extends Np{loginWithMagicLink(t){let e=zn.sdkName==="@magic-sdk/react-native"||zn.sdkName==="@magic-sdk/react-native-bare"||zn.sdkName==="@magic-sdk/react-native-expo";if(e&&XFe(zn.version,19))throw new Error("loginWithMagicLink() is deprecated for this package, please utlize a passcode method like loginWithSMS or loginWithEmailOTP instead.");e&&mg({method:"auth.loginWithMagicLink()",removalVersions:vg,useInstead:"auth.loginWithEmailOTP()"}).log();let{email:r,showUI:n=!0,redirectURI:i,overrides:a}=t,o=an(this.sdk.testMode?vr.LoginWithMagicLinkTestMode:vr.LoginWithMagicLink,[{email:r,showUI:n,redirectURI:i,overrides:a}]);return this.request(o)}loginWithSMS(t){let{phoneNumber:e}=t,r=an(this.sdk.testMode?vr.LoginWithSmsTestMode:vr.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?vr.LoginWithEmailOTPTestMode:vr.LoginWithEmailOTP,[{email:e,showUI:r,deviceCheckUI:n,overrides:i}]),o=this.request(a);return!n&&o&&o.on(WA.Retry,()=>{this.createIntermediaryEvent(WA.Retry,a.id)()}),!r&&o&&(o.on(V0.VerifyEmailOtp,s=>{this.createIntermediaryEvent(V0.VerifyEmailOtp,a.id)(s)}),o.on(V0.Cancel,()=>{this.createIntermediaryEvent(V0.Cancel,a.id)()})),o}loginWithCredential(t){let e=t??"";if(!t&&zn.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?vr.LoginWithCredentialTestMode:vr.LoginWithCredential,[e]);return this.request(r)}setAuthorizationToken(t){let e=an(vr.SetAuthorizationToken,[{jwt:t}]);return this.request(e)}updateEmailWithUI(t){let{email:e,showUI:r=!0}=t,n=an(this.sdk.testMode?vr.UpdateEmailTestMode:vr.UpdateEmail,[{email:e,showUI:r}]);return this.request(n)}},Ise={};jBe(Ise,{clear:()=>eje,getItem:()=>$o,iterate:()=>Pse,key:()=>rje,keys:()=>nje,length:()=>tje,removeItem:()=>gO,setItem:()=>Tl});var xE;function Pd(t){return(...e)=>Ci(this,null,function*(){return xE||(xE=yield zn.configureStorage()),yield xE.ready(),xE[t](...e)})}var $o=Pd("getItem"),Tl=Pd("setItem"),gO=Pd("removeItem"),eje=Pd("clear"),tje=Pd("length"),rje=Pd("key"),nje=Pd("keys"),Pse=Pd("iterate");function ije(){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 Tse="STORE_KEY_PRIVATE_KEY",E5="STORE_KEY_PUBLIC_JWK",Rse="ECDSA",aje="P-256",oje={name:Rse,namedCurve:aje};function yO(){let t=typeof window<"u"&&!!window.crypto,e=t&&!!window.crypto.subtle;return t&&e}function sje(){return Ci(this,null,function*(){let t=yield cje();if(!t){console.info("unable to create public key or webcrypto is unsupported");return}let{subtle:e}=window.crypto,r=yield $o(Tse);if(!r||!e){console.info("unable to find private key or webcrypto unsupported");return}let n={iat:Math.floor(new Date().getTime()/1e3),jti:ije()},i={typ:"dpop+jwt",alg:"ES256",jwk:t},a={protected:DY(JSON.stringify(i)),claims:DY(JSON.stringify(n))},o=lje(`${a.protected}.${a.claims}`),s={name:Rse,hash:{name:"SHA-256"}},c=dje(new Uint8Array(yield e.sign(s,r,o)));return`${a.protected}.${a.claims}.${c}`})}function cje(){return Ci(this,null,function*(){if(!yO()){console.info("webcrypto is not supported");return}return(yield $o(E5))||(yield uje()),$o(E5)})}function uje(){return Ci(this,null,function*(){let{subtle:t}=window.crypto,e=yield t.generateKey(oje,!1,["sign"]),r=yield t.exportKey("jwk",e.publicKey);yield Tl(Tse,e.privateKey),yield Tl(E5,r)})}function DY(t){return Cse(fje(t))}function lje(t){return new TextEncoder().encode(t)}function Cse(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+/g,"")}function fje(t){return encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,r)=>String.fromCharCode(parseInt(r,16)))}function dje(t){let e="";return t.forEach(r=>{e+=String.fromCharCode(r)}),Cse(e)}var qk="ds",Hk="ek",zk="iv",Vk="AES-GCM",hje=256;function Gk(){return Ci(this,null,function*(){let t=[];yield Pse((e,r,n)=>{r.startsWith(`${qk}_`)&&t.push(r)});for(let e of t)yield gO(e)})}function Nse(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 Dse(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 pje(){return Ci(this,null,function*(){if(!yO()){console.info("webcrypto is not supported");return}let{crypto:t}=window;return(yield $o(zk))||t.getRandomValues(new Uint8Array(12))})}function gje(){return Ci(this,null,function*(){if(!yO()){console.info("webcrypto is not supported");return}let{subtle:t}=window.crypto;return(yield $o(Hk))||(yield t.generateKey({name:Vk,length:hje},!1,["encrypt","decrypt"]))})}function yje(t,e){return Ci(this,null,function*(){let r=yield pje(),n=yield gje();if(!r||!n||!t)return;let i=Dse(t),{subtle:a}=window.crypto,o=yield a.encrypt({name:Vk,iv:r},n,i),s=Nse(o);yield Tl(`${qk}_${e}`,s),yield Tl(Hk,n),yield Tl(zk,r)})}function mje(t){return Ci(this,null,function*(){let e=yield $o(`${qk}_${t}`),r=yield $o(zk),n=yield $o(Hk);if(!r||!e||!n||!yO())return;let{subtle:i}=window.crypto,a=yield i.decrypt({name:Vk,iv:r},n,Dse(e));return Nse(a)})}var vje=class extends Np{constructor(){super(...arguments),this.localForageKey="mc_active_wallet"}getIdToken(e){let r=an(this.sdk.testMode?vr.GetIdTokenTestMode:vr.GetIdToken,[e]);return this.request(r)}generateIdToken(e){let r=an(this.sdk.testMode?vr.GenerateIdTokenTestMode:vr.GenerateIdToken,[e]);return this.request(r)}getInfo(){return Ci(this,null,function*(){let e=yield $o(this.localForageKey),r=an(vr.GetInfo,[{walletType:e}]);return this.request(r)})}isLoggedIn(){let e=an(this.sdk.testMode?vr.IsLoggedInTestMode:vr.IsLoggedIn);return this.request(e)}logout(){gO(this.localForageKey),Gk();let e=an(this.sdk.testMode?vr.LogoutTestMode:vr.Logout);return this.request(e)}requestInfoWithUI(e){let r=an(vr.RequestUserInfoWithUI,e?[e]:[]);return this.request(r)}showSettings(e){let r=an(this.sdk.testMode?vr.UserSettingsTestMode:vr.UserSettings,[e]);return this.request(r)}recoverAccount(e){let r=an(this.sdk.testMode?vr.RecoverAccountTestMode:vr.RecoverAccount,[e]);return this.request(r)}getMetadata(){mg({method:"user.getMetadata()",removalVersions:vg,useInstead:"user.getInfo()"}).log();let e=an(this.sdk.testMode?vr.GetMetadataTestMode:vr.GetMetadata);return this.request(e)}updateEmail(e){mg({method:"user.updateEmail()",removalVersions:vg,useInstead:"auth.updateEmailWithUI()"}).log();let{email:r,showUI:n=!0}=e,i=an(this.sdk.testMode?vr.UpdateEmailTestMode:vr.UpdateEmail,[{email:r,showUI:n}]);return this.request(i)}};function QA(t,e){return e?new URL(t,e):new URL(t)}var bje=class extends Np{constructor(){super(...arguments),this.localForageKey="mc_active_wallet"}connectWithUI(){let e=jk((r,n)=>Ci(this,null,function*(){try{if(this.isMetaMaskBrowser()&&(yield this.isWalletEnabled(_s.MetaMask))){let c=yield this.autoConnectIfWalletBrowser(_s.MetaMask);r(c);return}if(this.isCoinbaseWalletBrowser()&&(yield this.isWalletEnabled(_s.CoinbaseWallet))){let c=yield this.autoConnectIfWalletBrowser(_s.CoinbaseWallet);r(c);return}let i=this.getUserEnv(),a=an(vr.Login,[i]),o=this.request(a);o.on(Hb.WalletSelected,c=>this.handleWalletSelected(gse(Lk({},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(vr.ShowUI))}showAddress(){return this.request(an(vr.ShowAddress))}showSendTokensUI(){return this.request(an(vr.ShowSendTokensUI))}showOnRamp(){return this.request(an(vr.ShowOnRamp))}showNFTs(){return this.request(an(vr.ShowNFTs))}showBalances(){return this.request(an(vr.ShowBalances))}sendGaslessTransaction(e,r){return this.request(an(vr.SendGaslessTransaction,[e,r]))}getInfo(){return Ci(this,null,function*(){mg({method:"wallet.getInfo()",removalVersions:vg,useInstead:"user.getInfo()"}).log();let e=yield $o(this.localForageKey),r=an(vr.GetInfo,[{walletType:e}]);return this.request(r)})}disconnect(){mg({method:"wallet.disconnect()",removalVersions:vg,useInstead:"user.logout()"}).log(),gO(this.localForageKey),Gk();let e=an(vr.Disconnect);return this.request(e)}requestUserInfoWithUI(e){mg({method:"wallet.requestUserInfoWithUI()",removalVersions:vg,useInstead:"user.requestUserInfoWithUI()"}).log();let r=an(vr.RequestUserInfoWithUI,e?[e]:[]);return this.request(r)}getProvider(){return Ci(this,null,function*(){switch(yield $o(this.localForageKey)){case _s.MetaMask:return this.getMetaMaskProvider();case _s.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 _s.MetaMask:return this.connectToMetaMask();case _s.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 Tl(this.localForageKey,e.wallet),this.createIntermediaryEvent(Hb.WalletConnected,e.payloadId)(r)}catch(r){console.error(r),this.createIntermediaryEvent(Hb.WalletRejected,e.payloadId)()}})}autoConnectIfWalletBrowser(e){return Ci(this,null,function*(){let r;e===_s.MetaMask&&(r=yield this.getMetaMaskProvider().request({method:"eth_requestAccounts"})),e===_s.CoinbaseWallet&&(r=yield this.getCoinbaseProvider().request({method:"eth_requestAccounts"})),yield Tl(this.localForageKey,e);let n=an(vr.AutoConnect,[{wallet:e,address:r}]);return this.request(n)})}},{createBoundEmitterMethod:AE,createChainingEmitterMethod:m0}=xse(),wje=class extends Np{constructor(){super(...arguments),this.isMagic=!0,this.on=m0("on",this),this.once=m0("once",this),this.addListener=m0("addListener",this),this.off=m0("off",this),this.removeListener=m0("removeListener",this),this.removeAllListeners=m0("removeAllListeners",this),this.emit=AE("emit"),this.eventNames=AE("eventNames"),this.listeners=AE("listeners"),this.listenerCount=AE("listenerCount")}sendAsync(t,e){if(!e)throw HFe({procedure:"Magic.rpcProvider.sendAsync",argument:1,expected:"function",received:e===null?"null":typeof e});if(Array.isArray(t))this.overlay.post(P1.MAGIC_HANDLE_REQUEST,t.map(r=>{let n=YA(r);return this.prefixPayloadMethodForTestMode(n),n})).then(r=>{e(null,r.map(n=>gse(Lk({},n.payload),{error:n.hasError?new R1(n.payload.error):null})))});else{let r=YA(t);this.prefixPayloadMethodForTestMode(r),this.overlay.post(P1.MAGIC_HANDLE_REQUEST,r).then(n=>{e(n.hasError?new R1(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=VFe();return r.log(),new Fk(t).applyError({code:-32603,message:r.rawMessage}).payload}enable(){let t=an(vr.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}`)}},$Y=["request","overlay","sdk"];function _je(t){let e=Object.getPrototypeOf(t),r=[e];for(;e!==Np.prototype;)e=Object.getPrototypeOf(e),r.push(e);return r}var $se=class extends Np{constructor(){super(void 0),this.__sdk_access_field_descriptors__=new Map,this.__is_initialized__=!1,this.utils={createPromiEvent:jk,isPromiEvent:Sse,encodeJSON:mse,decodeJSON:DFe,createJsonRpcRequestPayload:an,standardizeJsonRpcRequestPayload:YA,storage:Ise};let t=[this,..._je(this)];$Y.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 jFe(e)}}))})}init(t){this.__is_initialized__||($Y.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 _5(this,"DEPRECATION_NOTICE",a)}createWarning(t,e){return new _5(this,t,e)}createError(t,e,r){return new Bk(this,t,e,r)}},Eje=class extends $se{},Xh=class extends $se{};Xh.Internal=Eje,Xh.Anonymous="anonymous extension";var xje=class extends Np{purchase(t){let e=an(vr.NFTPurchase,[t]);return this.request(e)}checkout(t){let e=an(vr.NFTCheckout,[t]);return this.request(e)}transfer(t){let e=an(vr.NFTTransfer,[t]);return this.request(e)}};function MY(t){return t.compat&&t.compat[zn.sdkName]!=null?typeof t.compat[zn.sdkName]=="string"?AFe(PFe(zn.version),t.compat[zn.sdkName]):!!t.compat[zn.sdkName]:!0}function Aje(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 Sje(t){var e;let r=(e=t==null?void 0:t.extensions)!=null?e:[],n={},i=[];if(Array.isArray(r)?r.forEach(a=>{MY(a)?(a.init(this),(a.name||a.name!==Xh.Anonymous)&&(this[a.name]=a),a instanceof Xh.Internal&&(KA(a.config)||(n[a.name]=a.config))):i.push(a)}):Object.keys(r).forEach(a=>{if(MY(r[a])){r[a].init(this);let o=r[a];this[a]=o,o instanceof Xh.Internal&&(KA(o.config)||(n[r[a].name]=o.config))}else i.push(r[a])}),i.length)throw qFe(i);return n}var Ix=class{constructor(t,e){this.apiKey=t;var r;if(!t)throw BFe();zn.platform==="react-native"&&(e!=null&&e.endpoint)&&GFe().log();let{defaultEndpoint:n,version:i}=zn;this.testMode=!!(e!=null&&e.testMode),this.endpoint=QA((r=e==null?void 0:e.endpoint)!=null?r:n).origin,this.auth=new ZFe(this),this.user=new vje(this),this.wallet=new bje(this),this.nft=new xje(this),this.rpcProvider=new wje(this);let a=Sje.call(this,e);this.parameters=mse(Lk({API_KEY:this.apiKey,DOMAIN_ORIGIN:window.location?window.location.origin:"",ETH_NETWORK:e==null?void 0:e.network,host:QA(this.endpoint).host,sdk:UFe[zn.sdkName],version:i,ext:KA(a)?void 0:a,locale:(e==null?void 0:e.locale)||"en_US"},zn.bundleId?{bundleId:zn.bundleId}:{})),this.networkHash=Aje(this.apiKey,e==null?void 0:e.network,KA(a)?void 0:a),e!=null&&e.deferPreload||this.preload()}get overlay(){if(!Ix.__overlays__.has(this.parameters)){let t=new zn.ViewController(this.endpoint,this.parameters,this.networkHash);t.init(),Ix.__overlays__.set(this.parameters,t)}return Ix.__overlays__.get(this.parameters)}preload(){return Ci(this,null,function*(){yield this.overlay.checkIsReadyForRequest})}},Mse=Ix;Mse.__overlays__=new Map;function Oje(t,e){return e&&Array.isArray(t)?t.find(r=>r.id===e):t}function Ije(t,e){var r;let n=(r=e.data.response)==null?void 0:r.id,i=Oje(t,n);if(n&&i){let a=new Fk(i).applyResult(e.data.response.result).applyError(e.data.response.error);return{id:n,response:a}}return{}}function Pje(t,e,r){return Ci(this,null,function*(){var n;let i=yield $o("rt"),a;if(zn.platform==="web")try{a=(n=yield $o("jwt"))!=null?n:yield sje()}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 mje(r);return s&&(o.deviceShare=s),o})}function Tje(t){return Ci(this,null,function*(){!t.data.rt||(yield Tl("rt",t.data.rt))})}var Rje=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 Ose((r,n)=>Ci(this,null,function*(){if(!this.isConnectedToInternet){let u=bse();n(u)}this.isReadyForRequest||(yield this.waitForReady());let i=[],a=Array.isArray(e)?e.map(u=>u.id):[],o=yield Pje(`${t}-${this.parameters}`,e,this.networkHash);yield this._post(o);let s=u=>f=>{var d;let{id:g,response:m}=Ije(e,f);if(Tje(f),((d=m==null?void 0:m.payload.error)==null?void 0:d.message)==="User denied account access.")Gk();else if(f.data.deviceShare){let{deviceShare:w}=f.data;yje(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(Ah.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(Ah.MAGIC_OVERLAY_READY,()=>{this.isReadyForRequest=!0,t(),e()})})}listen(){this.on(Ah.MAGIC_HIDE_OVERLAY,()=>{this.hideOverlay()}),this.on(Ah.MAGIC_SHOW_OVERLAY,()=>{this.showOverlay()})}},Cje=Object.create,kse=Object.defineProperty,Nje=Object.getOwnPropertyDescriptor,Dje=Object.getOwnPropertyNames,$je=Object.getPrototypeOf,Mje=Object.prototype.hasOwnProperty,SE=(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')}),Lse=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),kje=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Dje(e))!Mje.call(t,i)&&i!==r&&kse(t,i,{get:()=>e[i],enumerable:!(n=Nje(e,i))||n.enumerable});return t},Use=(t,e,r)=>(r=t!=null?Cje($je(t)):{},kje(e||!t||!t.__esModule?kse(r,"default",{value:t,enumerable:!0}):r,t)),Px=(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())}),Lje=Lse((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 SE=="function"&&SE;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 SE=="function"&&SE,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(O){if(typeof O!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,O!==o&&v(this,O)}d.prototype.catch=function(O){return this.then(null,O)},d.prototype.then=function(O,E){if(typeof O!="function"&&this.state===u||typeof E!="function"&&this.state===c)return this;var p=new this.constructor(o);if(this.state!==f){var I=this.state===u?O:E;m(p,I,this.outcome)}else this.queue.push(new g(p,O,E));return p};function g(O,E,p){this.promise=O,typeof E=="function"&&(this.onFulfilled=E,this.callFulfilled=this.otherCallFulfilled),typeof p=="function"&&(this.onRejected=p,this.callRejected=this.otherCallRejected)}g.prototype.callFulfilled=function(O){s.resolve(this.promise,O)},g.prototype.otherCallFulfilled=function(O){m(this.promise,this.onFulfilled,O)},g.prototype.callRejected=function(O){s.reject(this.promise,O)},g.prototype.otherCallRejected=function(O){m(this.promise,this.onRejected,O)};function m(O,E,p){a(function(){var I;try{I=E(p)}catch(C){return s.reject(O,C)}I===O?s.reject(O,new TypeError("Cannot resolve promise with itself")):s.resolve(O,I)})}s.resolve=function(O,E){var p=y(w,E);if(p.status==="error")return s.reject(O,p.value);var I=p.value;if(I)v(O,I);else{O.state=u,O.outcome=E;for(var C=-1,L=O.queue.length;++C<L;)O.queue[C].callFulfilled(E)}return O},s.reject=function(O,E){O.state=c,O.outcome=E;for(var p=-1,I=O.queue.length;++p<I;)O.queue[p].callRejected(E);return O};function w(O){var E=O&&O.then;if(O&&(typeof O=="object"||typeof O=="function")&&typeof E=="function")return function(){E.apply(O,arguments)}}function v(O,E){var p=!1;function I(le){p||(p=!0,s.reject(O,le))}function C(le){p||(p=!0,s.resolve(O,le))}function L(){E(C,I)}var q=y(L);q.status==="error"&&I(q.value)}function y(O,E){var p={};try{p.value=O(E),p.status="success"}catch(I){p.status="error",p.value=I}return p}d.resolve=_;function _(O){return O instanceof this?O:s.resolve(new this(o),O)}d.reject=b;function b(O){var E=new this(o);return s.reject(E,O)}d.all=S;function S(O){var E=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var p=O.length,I=!1;if(!p)return this.resolve([]);for(var C=new Array(p),L=0,q=-1,le=new this(o);++q<p;)pe(O[q],q);return le;function pe(B,U){E.resolve(B).then(K,function(ne){I||(I=!0,s.reject(le,ne))});function K(ne){C[U]=ne,++L===p&&!I&&(I=!0,s.resolve(le,C))}}}d.race=x;function x(O){var E=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var p=O.length,I=!1;if(!p)return this.resolve([]);for(var C=-1,L=new this(o);++C<p;)q(O[C]);return L;function q(le){E.resolve(le).then(function(pe){I||(I=!0,s.resolve(L,pe))},function(pe){I||(I=!0,s.reject(L,pe))})}}},{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(Oe){if(Oe.name!=="TypeError")throw Oe;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",O="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,O),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+)/),Oe=navigator.userAgent.match(/Edge\//);me(Oe||!be||parseInt(be[1],10)>=43)}}).catch(function(){return!1})}function I(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 L(X){var me=b[X.name],re=me.deferredOperations.pop();if(re)return re.resolve(),re.promise}function q(X,me){var re=b[X.name],Ee=re.deferredOperations.pop();if(Ee)return Ee.reject(me),Ee.promise}function le(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 Oe=c.open.apply(c,be);me&&(Oe.onupgradeneeded=function(Qe){var ft=Oe.result;try{ft.createObjectStore(X.storeName),Qe.oldVersion<=1&&ft.createObjectStore(y)}catch(Ye){if(Ye.name==="ConstraintError")console.warn('The database "'+X.name+'" has been upgraded from version '+Qe.oldVersion+" to version "+Qe.newVersion+', but the storage "'+X.storeName+'" already exists.');else throw Ye}}),Oe.onerror=function(Qe){Qe.preventDefault(),Ee(Oe.error)},Oe.onsuccess=function(){var Qe=Oe.result;Qe.onversionchange=function(ft){ft.target.close()},re(Qe),L(X)}})}function pe(X){return le(X,!1)}function B(X){return le(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 Oe=X.db.version+1;Oe>X.version&&(X.version=Oe)}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 Oe=btoa(be.target.result||"");me({__local_forage_encoded_blob:!0,data:Oe,type:X.type})},Ee.readAsBinaryString(X)})}function ne(X){var me=E(atob(X.data));return f([me],{type:X.type})}function F(X){return X&&X.__local_forage_encoded_blob}function j(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 z(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,pe(X).then(function(Oe){return X.db=Oe,U(X)?B(X):Oe}).then(function(Oe){X.db=me.db=Oe;for(var Qe=0;Qe<re.length;Qe++)re[Qe]._dbInfo.db=Oe}).catch(function(Oe){throw q(X,Oe),Oe})}function $(X,me,re,Ee){Ee===void 0&&(Ee=1);try{var be=X.db.transaction(X.storeName,me);re(null,be)}catch(Oe){if(Ee>0&&(!X.db||Oe.name==="InvalidStateError"||Oe.name==="NotFoundError"))return d.resolve().then(function(){if(!X.db||Oe.name==="NotFoundError"&&!X.db.objectStoreNames.contains(X.storeName)&&X.version<=X.db.version)return X.db&&(X.version=X.db.version+1),B(X)}).then(function(){return z(X).then(function(){$(X,me,re,Ee-1)})}).catch(re);re(Oe)}}function H(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function k(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=j);var Oe=[];function Qe(){return d.resolve()}for(var ft=0;ft<be.forages.length;ft++){var Ye=be.forages[ft];Ye!==me&&Oe.push(Ye._initReady().catch(Qe))}var Ve=be.forages.slice(0);return d.all(Oe).then(function(){return re.db=be.db,pe(re)}).then(function(ht){return re.db=ht,U(re,me._defaultConfig.version)?B(re):ht}).then(function(ht){re.db=be.db=ht,me._dbInfo=re;for(var Vt=0;Vt<Ve.length;Vt++){var Tr=Ve[Vt];Tr!==me&&(Tr._dbInfo.db=re.db,Tr._dbInfo.version=re.version)}})}function M(X,me){var re=this;X=w(X);var Ee=new d(function(be,Oe){re.ready().then(function(){$(re._dbInfo,x,function(Qe,ft){if(Qe)return Oe(Qe);try{var Ye=ft.objectStore(re._dbInfo.storeName),Ve=Ye.get(X);Ve.onsuccess=function(){var ht=Ve.result;ht===void 0&&(ht=null),F(ht)&&(ht=ne(ht)),be(ht)},Ve.onerror=function(){Oe(Ve.error)}}catch(ht){Oe(ht)}})}).catch(Oe)});return g(Ee,me),Ee}function G(X,me){var re=this,Ee=new d(function(be,Oe){re.ready().then(function(){$(re._dbInfo,x,function(Qe,ft){if(Qe)return Oe(Qe);try{var Ye=ft.objectStore(re._dbInfo.storeName),Ve=Ye.openCursor(),ht=1;Ve.onsuccess=function(){var Vt=Ve.result;if(Vt){var Tr=Vt.value;F(Tr)&&(Tr=ne(Tr));var Wr=X(Tr,Vt.key,ht++);Wr!==void 0?be(Wr):Vt.continue()}else be()},Ve.onerror=function(){Oe(Ve.error)}}catch(Vt){Oe(Vt)}})}).catch(Oe)});return g(Ee,me),Ee}function ge(X,me,re){var Ee=this;X=w(X);var be=new d(function(Oe,Qe){var ft;Ee.ready().then(function(){return ft=Ee._dbInfo,S.call(me)==="[object Blob]"?I(ft.db).then(function(Ye){return Ye?me:K(me)}):me}).then(function(Ye){$(Ee._dbInfo,O,function(Ve,ht){if(Ve)return Qe(Ve);try{var Vt=ht.objectStore(Ee._dbInfo.storeName);Ye===null&&(Ye=void 0);var Tr=Vt.put(Ye,X);ht.oncomplete=function(){Ye===void 0&&(Ye=null),Oe(Ye)},ht.onabort=ht.onerror=function(){var Wr=Tr.error?Tr.error:Tr.transaction.error;Qe(Wr)}}catch(Wr){Qe(Wr)}})}).catch(Qe)});return g(be,re),be}function Q(X,me){var re=this;X=w(X);var Ee=new d(function(be,Oe){re.ready().then(function(){$(re._dbInfo,O,function(Qe,ft){if(Qe)return Oe(Qe);try{var Ye=ft.objectStore(re._dbInfo.storeName),Ve=Ye.delete(X);ft.oncomplete=function(){be()},ft.onerror=function(){Oe(Ve.error)},ft.onabort=function(){var ht=Ve.error?Ve.error:Ve.transaction.error;Oe(ht)}}catch(ht){Oe(ht)}})}).catch(Oe)});return g(Ee,me),Ee}function te(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){$(me._dbInfo,O,function(Oe,Qe){if(Oe)return be(Oe);try{var ft=Qe.objectStore(me._dbInfo.storeName),Ye=ft.clear();Qe.oncomplete=function(){Ee()},Qe.onabort=Qe.onerror=function(){var Ve=Ye.error?Ye.error:Ye.transaction.error;be(Ve)}}catch(Ve){be(Ve)}})}).catch(be)});return g(re,X),re}function ce(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){$(me._dbInfo,x,function(Oe,Qe){if(Oe)return be(Oe);try{var ft=Qe.objectStore(me._dbInfo.storeName),Ye=ft.count();Ye.onsuccess=function(){Ee(Ye.result)},Ye.onerror=function(){be(Ye.error)}}catch(Ve){be(Ve)}})}).catch(be)});return g(re,X),re}function T(X,me){var re=this,Ee=new d(function(be,Oe){if(X<0){be(null);return}re.ready().then(function(){$(re._dbInfo,x,function(Qe,ft){if(Qe)return Oe(Qe);try{var Ye=ft.objectStore(re._dbInfo.storeName),Ve=!1,ht=Ye.openKeyCursor();ht.onsuccess=function(){var Vt=ht.result;if(!Vt){be(null);return}X===0||Ve?be(Vt.key):(Ve=!0,Vt.advance(X))},ht.onerror=function(){Oe(ht.error)}}catch(Vt){Oe(Vt)}})}).catch(Oe)});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(Oe,Qe){if(Oe)return be(Oe);try{var ft=Qe.objectStore(me._dbInfo.storeName),Ye=ft.openKeyCursor(),Ve=[];Ye.onsuccess=function(){var ht=Ye.result;if(!ht){Ee(Ve);return}Ve.push(ht.key),ht.continue()},Ye.onerror=function(){be(Ye.error)}}catch(ht){be(ht)}})}).catch(be)});return g(re,X),re}function ze(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 Oe=X.name===re.name&&Ee._dbInfo.db,Qe=Oe?d.resolve(Ee._dbInfo.db):pe(X).then(function(ft){var Ye=b[X.name],Ve=Ye.forages;Ye.db=ft;for(var ht=0;ht<Ve.length;ht++)Ve[ht]._dbInfo.db=ft;return ft});X.storeName?be=Qe.then(function(ft){if(ft.objectStoreNames.contains(X.storeName)){var Ye=ft.version+1;C(X);var Ve=b[X.name],ht=Ve.forages;ft.close();for(var Vt=0;Vt<ht.length;Vt++){var Tr=ht[Vt];Tr._dbInfo.db=null,Tr._dbInfo.version=Ye}var Wr=new d(function(Fr,_n){var jr=c.open(X.name,Ye);jr.onerror=function(P){var D=jr.result;D.close(),_n(P)},jr.onupgradeneeded=function(){var P=jr.result;P.deleteObjectStore(X.storeName)},jr.onsuccess=function(){var P=jr.result;P.close(),Fr(P)}});return Wr.then(function(Fr){Ve.db=Fr;for(var _n=0;_n<ht.length;_n++){var jr=ht[_n];jr._dbInfo.db=Fr,L(jr._dbInfo)}}).catch(function(Fr){throw(q(X,Fr)||d.resolve()).catch(function(){}),Fr})}}):be=Qe.then(function(ft){C(X);var Ye=b[X.name],Ve=Ye.forages;ft.close();for(var ht=0;ht<Ve.length;ht++){var Vt=Ve[ht];Vt._dbInfo.db=null}var Tr=new d(function(Wr,Fr){var _n=c.deleteDatabase(X.name);_n.onerror=function(){var jr=_n.result;jr&&jr.close(),Fr(_n.error)},_n.onblocked=function(){console.warn('dropInstance blocked for database "'+X.name+'" until all open connections are closed')},_n.onsuccess=function(){var jr=_n.result;jr&&jr.close(),Wr(jr)}});return Tr.then(function(Wr){Ye.db=Wr;for(var Fr=0;Fr<Ve.length;Fr++){var _n=Ve[Fr];L(_n._dbInfo)}}).catch(function(Wr){throw(q(X,Wr)||d.resolve()).catch(function(){}),Wr})})}return g(be,me),be}var tt={_driver:"asyncStorage",_initStorage:k,_support:u(),iterate:G,getItem:M,setItem:ge,removeItem:Q,clear:te,length:ce,key:T,keys:fe,dropInstance:ze};function mt(){return typeof openDatabase=="function"}var vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gt="~~local_forage_type~",Lt=/^~~local_forage_type~([^~]+)~/,Yt="__lfsc__:",wr=Yt.length,Rt="arbf",Pt="blob",kt="si08",Nt="ui08",Kt="uic8",Ut="si16",zt="si32",$t="ur16",Dt="ui32",qt="fl32",Mt="fl64",cr=wr+Rt.length,tr=Object.prototype.toString;function ir(X){var me=X.length*.75,re=X.length,Ee,be=0,Oe,Qe,ft,Ye;X[X.length-1]==="="&&(me--,X[X.length-2]==="="&&me--);var Ve=new ArrayBuffer(me),ht=new Uint8Array(Ve);for(Ee=0;Ee<re;Ee+=4)Oe=vt.indexOf(X[Ee]),Qe=vt.indexOf(X[Ee+1]),ft=vt.indexOf(X[Ee+2]),Ye=vt.indexOf(X[Ee+3]),ht[be++]=Oe<<2|Qe>>4,ht[be++]=(Qe&15)<<4|ft>>2,ht[be++]=(ft&3)<<6|Ye&63;return Ve}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 mr(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+=zt: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 Oe=new FileReader;Oe.onload=function(){var Qe=gt+X.type+"~"+nr(this.result);me(Yt+Pt+Qe)},Oe.readAsArrayBuffer(X)}else try{me(JSON.stringify(X))}catch(Qe){console.error("Couldn't convert value into a JSON string: ",X),me(null,Qe)}}function wn(X){if(X.substring(0,wr)!==Yt)return JSON.parse(X);var me=X.substring(cr),re=X.substring(wr,cr),Ee;if(re===Pt&&Lt.test(me)){var be=me.match(Lt);Ee=be[1],me=me.substring(be[0].length)}var Oe=ir(me);switch(re){case Rt:return Oe;case Pt:return f([Oe],{type:Ee});case kt:return new Int8Array(Oe);case Nt:return new Uint8Array(Oe);case Kt:return new Uint8ClampedArray(Oe);case Ut:return new Int16Array(Oe);case $t:return new Uint16Array(Oe);case zt:return new Int32Array(Oe);case Dt:return new Uint32Array(Oe);case qt:return new Float32Array(Oe);case Mt:return new Float64Array(Oe);default:throw new Error("Unkown type: "+re)}}var Yr={serialize:mr,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(Oe,Qe){try{re.db=openDatabase(re.name,String(re.version),re.description,re.size)}catch(ft){return Qe(ft)}re.db.transaction(function(ft){ai(ft,re,function(){me._dbInfo=re,Oe()},function(Ye,Ve){Qe(Ve)})},Qe)});return re.serializer=Yr,be}function $n(X,me,re,Ee,be,Oe){X.executeSql(re,Ee,be,function(Qe,ft){ft.code===ft.SYNTAX_ERR?Qe.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[me.storeName],function(Ye,Ve){Ve.rows.length?Oe(Ye,ft):ai(Ye,me,function(){Ye.executeSql(re,Ee,be,Oe)},Oe)},Oe):Oe(Qe,ft)},Oe)}function Kn(X,me){var re=this;X=w(X);var Ee=new d(function(be,Oe){re.ready().then(function(){var Qe=re._dbInfo;Qe.db.transaction(function(ft){$n(ft,Qe,"SELECT * FROM "+Qe.storeName+" WHERE key = ? LIMIT 1",[X],function(Ye,Ve){var ht=Ve.rows.length?Ve.rows.item(0).value:null;ht&&(ht=Qe.serializer.deserialize(ht)),be(ht)},function(Ye,Ve){Oe(Ve)})})}).catch(Oe)});return g(Ee,me),Ee}function xr(X,me){var re=this,Ee=new d(function(be,Oe){re.ready().then(function(){var Qe=re._dbInfo;Qe.db.transaction(function(ft){$n(ft,Qe,"SELECT * FROM "+Qe.storeName,[],function(Ye,Ve){for(var ht=Ve.rows,Vt=ht.length,Tr=0;Tr<Vt;Tr++){var Wr=ht.item(Tr),Fr=Wr.value;if(Fr&&(Fr=Qe.serializer.deserialize(Fr)),Fr=X(Fr,Wr.key,Tr+1),Fr!==void 0){be(Fr);return}}be()},function(Ye,Ve){Oe(Ve)})})}).catch(Oe)});return g(Ee,me),Ee}function $r(X,me,re,Ee){var be=this;X=w(X);var Oe=new d(function(Qe,ft){be.ready().then(function(){me===void 0&&(me=null);var Ye=me,Ve=be._dbInfo;Ve.serializer.serialize(me,function(ht,Vt){Vt?ft(Vt):Ve.db.transaction(function(Tr){$n(Tr,Ve,"INSERT OR REPLACE INTO "+Ve.storeName+" (key, value) VALUES (?, ?)",[X,ht],function(){Qe(Ye)},function(Wr,Fr){ft(Fr)})},function(Tr){if(Tr.code===Tr.QUOTA_ERR){if(Ee>0){Qe($r.apply(be,[X,Ye,re,Ee-1]));return}ft(Tr)}})})}).catch(ft)});return g(Oe,re),Oe}function _r(X,me,re){return $r.apply(this,[X,me,re,1])}function _e(X,me){var re=this;X=w(X);var Ee=new d(function(be,Oe){re.ready().then(function(){var Qe=re._dbInfo;Qe.db.transaction(function(ft){$n(ft,Qe,"DELETE FROM "+Qe.storeName+" WHERE key = ?",[X],function(){be()},function(Ye,Ve){Oe(Ve)})})}).catch(Oe)});return g(Ee,me),Ee}function ee(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){var Oe=me._dbInfo;Oe.db.transaction(function(Qe){$n(Qe,Oe,"DELETE FROM "+Oe.storeName,[],function(){Ee()},function(ft,Ye){be(Ye)})})}).catch(be)});return g(re,X),re}function ve(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){var Oe=me._dbInfo;Oe.db.transaction(function(Qe){$n(Qe,Oe,"SELECT COUNT(key) as c FROM "+Oe.storeName,[],function(ft,Ye){var Ve=Ye.rows.item(0).c;Ee(Ve)},function(ft,Ye){be(Ye)})})}).catch(be)});return g(re,X),re}function Re(X,me){var re=this,Ee=new d(function(be,Oe){re.ready().then(function(){var Qe=re._dbInfo;Qe.db.transaction(function(ft){$n(ft,Qe,"SELECT key FROM "+Qe.storeName+" WHERE id = ? LIMIT 1",[X+1],function(Ye,Ve){var ht=Ve.rows.length?Ve.rows.item(0).key:null;be(ht)},function(Ye,Ve){Oe(Ve)})})}).catch(Oe)});return g(Ee,me),Ee}function He(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){var Oe=me._dbInfo;Oe.db.transaction(function(Qe){$n(Qe,Oe,"SELECT key FROM "+Oe.storeName,[],function(ft,Ye){for(var Ve=[],ht=0;ht<Ye.rows.length;ht++)Ve.push(Ye.rows.item(ht).key);Ee(Ve)},function(ft,Ye){be(Ye)})})}).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,Oe){for(var Qe=[],ft=0;ft<Oe.rows.length;ft++)Qe.push(Oe.rows.item(ft).name);me({db:X,storeNames:Qe})},function(be,Oe){re(Oe)})},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(Oe){var Qe;X.name===re.name?Qe=Ee._dbInfo.db:Qe=openDatabase(X.name,"","",0),X.storeName?Oe({db:Qe,storeNames:[X.storeName]}):Oe(Xe(Qe))}).then(function(Oe){return new d(function(Qe,ft){Oe.db.transaction(function(Ye){function Ve(Wr){return new d(function(Fr,_n){Ye.executeSql("DROP TABLE IF EXISTS "+Wr,[],function(){Fr()},function(jr,P){_n(P)})})}for(var ht=[],Vt=0,Tr=Oe.storeNames.length;Vt<Tr;Vt++)ht.push(Ve(Oe.storeNames[Vt]));d.all(ht).then(function(){Qe()}).catch(function(Wr){ft(Wr)})},function(Ye){ft(Ye)})})}):be=d.reject("Invalid arguments"),g(be,me),be}var lt={_driver:"webSQLStorage",_initStorage:Dn,_support:mt(),iterate:xr,getItem:Kn,setItem:_r,removeItem:_e,clear:ee,length:ve,key:Re,keys:He,dropInstance:st};function _t(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function ue(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=ue(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 Oe=localStorage.key(be);Oe.indexOf(Ee)===0&&localStorage.removeItem(Oe)}});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,Oe=localStorage.getItem(be.keyPrefix+X);return Oe&&(Oe=be.serializer.deserialize(Oe)),Oe});return g(Ee,me),Ee}function Ot(X,me){var re=this,Ee=re.ready().then(function(){for(var be=re._dbInfo,Oe=be.keyPrefix,Qe=Oe.length,ft=localStorage.length,Ye=1,Ve=0;Ve<ft;Ve++){var ht=localStorage.key(Ve);if(ht.indexOf(Oe)===0){var Vt=localStorage.getItem(ht);if(Vt&&(Vt=be.serializer.deserialize(Vt)),Vt=X(Vt,ht.substring(Qe),Ye++),Vt!==void 0)return Vt}}});return g(Ee,me),Ee}function pr(X,me){var re=this,Ee=re.ready().then(function(){var be=re._dbInfo,Oe;try{Oe=localStorage.key(X)}catch{Oe=null}return Oe&&(Oe=Oe.substring(be.keyPrefix.length)),Oe});return g(Ee,me),Ee}function lr(X){var me=this,re=me.ready().then(function(){for(var Ee=me._dbInfo,be=localStorage.length,Oe=[],Qe=0;Qe<be;Qe++){var ft=localStorage.key(Qe);ft.indexOf(Ee.keyPrefix)===0&&Oe.push(ft.substring(Ee.keyPrefix.length))}return Oe});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 gr(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 Er(X,me,re){var Ee=this;X=w(X);var be=Ee.ready().then(function(){me===void 0&&(me=null);var Oe=me;return new d(function(Qe,ft){var Ye=Ee._dbInfo;Ye.serializer.serialize(me,function(Ve,ht){if(ht)ft(ht);else try{localStorage.setItem(Ye.keyPrefix+X,Ve),Qe(Oe)}catch(Vt){(Vt.name==="QuotaExceededError"||Vt.name==="NS_ERROR_DOM_QUOTA_REACHED")&&ft(Vt),ft(Vt)}})})});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(Oe){X.storeName?Oe(ue(X,Ee._defaultConfig)):Oe(X.name+"/")}).then(function(Oe){for(var Qe=localStorage.length-1;Qe>=0;Qe--){var ft=localStorage.key(Qe);ft.indexOf(Oe)===0&&localStorage.removeItem(ft)}}):be=d.reject("Invalid arguments"),g(be,me),be}var sr={_driver:"localStorageWrapper",_initStorage:Me,_support:_t(),iterate:Ot,getItem:wt,setItem:Er,removeItem:gr,clear:Le,length:en,key:pr,keys:lr,dropInstance:on},Lr=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(Lr(X[Ee],me))return!0;Ee++}return!1},Ur=Array.isArray||function(X){return Object.prototype.toString.call(X)==="[object Array]"},Zn={},Si={},ei={INDEXEDDB:tt,WEBSQL:lt,LOCALSTORAGE:sr},Oi=[ei.INDEXEDDB._driver,ei.WEBSQL._driver,ei.LOCALSTORAGE._driver],Ii=["dropInstance"],oi=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ii),Fn={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)&&(Ur(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({},Fn),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(Oe,Qe){try{var ft=me._driver,Ye=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!me._driver){Qe(Ye);return}for(var Ve=oi.concat("_initStorage"),ht=0,Vt=Ve.length;ht<Vt;ht++){var Tr=Ve[ht],Wr=!gn(Ii,Tr);if((Wr||me[Tr])&&typeof me[Tr]!="function"){Qe(Ye);return}}var Fr=function(){for(var jr=function(he){return function(){var Se=new Error("Method "+he+" is not implemented by the current driver"),Ce=d.reject(Se);return g(Ce,arguments[arguments.length-1]),Ce}},P=0,D=Ii.length;P<D;P++){var W=Ii[P];me[W]||(me[W]=jr(W))}};Fr();var _n=function(jr){Zn[ft]&&console.info("Redefining LocalForage driver: "+ft),Zn[ft]=me,Si[ft]=jr,Oe()};"_support"in me?me._support&&typeof me._support=="function"?me._support().then(_n,Qe):_n(!!me._support):_n(!0)}catch(jr){Qe(jr)}});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;Ur(me)||(me=[me]);var Oe=this._getSupportedDrivers(me);function Qe(){be._config.driver=be.driver()}function ft(ht){return be._extend(ht),Qe(),be._ready=be._initStorage(be._config),be._ready}function Ye(ht){return function(){var Vt=0;function Tr(){for(;Vt<ht.length;){var Wr=ht[Vt];return Vt++,be._dbInfo=null,be._ready=null,be.getDriver(Wr).then(ft).catch(Tr)}Qe();var Fr=new Error("No available storage method found.");return be._driverSet=d.reject(Fr),be._driverSet}return Tr()}}var Ve=this._driverSet!==null?this._driverSet.catch(function(){return d.resolve()}):d.resolve();return this._driverSet=Ve.then(function(){var ht=Oe[0];return be._dbInfo=null,be._ready=null,be.getDriver(ht).then(function(Vt){be._driver=Vt._driver,Qe(),be._wrapLibraryMethodsWithReady(),be._initDriver=Ye(Oe)})}).catch(function(){Qe();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!!Si[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 Oe=me[Ee];this.supports(Oe)&&re.push(Oe)}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}(),as=new _a;n.exports=as},{3:3}]},{},[4])(4)})}),Uje=Lse((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(F){var j=typeof Symbol=="function"&&F[Symbol.iterator],z=0;return j?j.call(F):{next:function(){return F&&z>=F.length&&(F=void 0),{value:F&&F[z++],done:!F}}}}function a(F,j){F=F||[],j=j||{};try{return new Blob(F,j)}catch(k){if(k.name!=="TypeError")throw k;for(var z=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,$=new z,H=0;H<F.length;H+=1)$.append(F[H]);return $.getBlob(j.type)}}var o=/^~~local_forage_type~([^~]+)~/,s=9,c=s+4,u=Object.prototype.toString;function f(F){var j=F.length*.75,z=F.length;F[F.length-1]==="="&&(j--,F[F.length-2]==="="&&j--);for(var $=new ArrayBuffer(j),H=new Uint8Array($),k=0,M=0;k<z;k+=4){var G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(F[k]),ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(F[k+1]),Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(F[k+2]),te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(F[k+3]);H[M++]=G<<2|ge>>4,H[M++]=(ge&15)<<4|Q>>2,H[M++]=(Q&3)<<6|te&63}return $}function d(F){for(var j=new Uint8Array(F),z="",$=0;$<j.length;$+=3)z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[j[$]>>2],z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(j[$]&3)<<4|j[$+1]>>4],z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(j[$+1]&15)<<2|j[$+2]>>6],z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[j[$+2]&63];return j.length%3===2?z=z.substring(0,z.length-1)+"=":j.length%3===1&&(z=z.substring(0,z.length-2)+"=="),z}function g(F,j){var z="";if(F&&(z=u.call(F)),F&&(z==="[object ArrayBuffer]"||F.buffer&&u.call(F.buffer)==="[object ArrayBuffer]")){var $=void 0,H="__lfsc__:";F instanceof ArrayBuffer?($=F,H+="arbf"):($=F.buffer,z==="[object Int8Array]"?H+="si08":z==="[object Uint8Array]"?H+="ui08":z==="[object Uint8ClampedArray]"?H+="uic8":z==="[object Int16Array]"?H+="si16":z==="[object Uint16Array]"?H+="ur16":z==="[object Int32Array]"?H+="si32":z==="[object Uint32Array]"?H+="ui32":z==="[object Float32Array]"?H+="fl32":z==="[object Float64Array]"?H+="fl64":j(new Error("Failed to get type for BinaryArray"))),j(H+d($))}else if(z==="[object Blob]"){var k=new FileReader;k.onload=function(){var M="~~local_forage_type~"+F.type+"~"+d(this.result);j("__lfsc__:blob"+M)},k.readAsArrayBuffer(F)}else try{j(JSON.stringify(F))}catch(M){console.error("Couldn't convert value into a JSON string: ",F),j(null,M)}}function m(F){if(F.substring(0,s)!=="__lfsc__:")return JSON.parse(F);var j=F.substring(c),z=F.substring(s,c),$;if(z==="blob"&&o.test(j)){var H=j.match(o);$=H[1],j=j.substring(H[0].length)}var k=f(j);switch(z){case"arbf":return k;case"blob":return a([k],{type:$});case"si08":return new Int8Array(k);case"ui08":return new Uint8Array(k);case"uic8":return new Uint8ClampedArray(k);case"si16":return new Int16Array(k);case"ur16":return new Uint16Array(k);case"si32":return new Int32Array(k);case"ui32":return new Uint32Array(k);case"fl32":return new Float32Array(k);case"fl64":return new Float64Array(k);default:throw new Error("Unkown type: "+z)}}function w(F){var j,z;if(F===null||typeof F!="object"||"isActiveClone"in F)return F;var $=F instanceof Date?new Date(F):F.constructor();try{for(var H=i(Object.keys(F)),k=H.next();!k.done;k=H.next()){var M=k.value;Object.prototype.hasOwnProperty.call(F,M)&&(F.isActiveClone=null,$[M]=w(F[M]),delete F.isActiveClone)}}catch(G){j={error:G}}finally{try{k&&!k.done&&(z=H.return)&&z.call(H)}finally{if(j)throw j.error}}return $}function v(F,j){return(F.name||j.name)+"/"+(F.storeName||j.storeName)+"/"}function y(F,j){j&&F.then(function(z){j(null,z)},function(z){j(z)})}function _(){for(var F=[],j=0;j<arguments.length;j++)F[j]=arguments[j];if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}function b(F,j){var z=this;if(j=_.apply(this,arguments),F=typeof F!="function"&&F||{},!F.name){var $=this.config();F.name=F.name||$.name,F.storeName=F.storeName||$.storeName}var H;return F.name?H=new Promise(function(k){F.storeName?k(v(F,z._defaultConfig)):k(F.name+"/")}):H=Promise.reject("Invalid arguments"),{promise:H,callback:j}}function S(F){return typeof F!="string"&&(console.warn(F+" used as a key, but it is not a string."),F=String(F)),F}var x={bufferToString:d,deserialize:m,serialize:g,stringToBuffer:f},O={},E=function(){function F(j){this.kp=j,this.data={}}return F.resolve=function(j){return O[j]||(O[j]=new F(j)),O[j]},F.prototype.clear=function(){this.data={}},F.prototype.drop=function(){this.clear(),delete O[this.kp]},F.prototype.get=function(j){return this.data[j]},F.prototype.key=function(j){return this.keys()[j]},F.prototype.keys=function(){return Object.keys(this.data)},F.prototype.rm=function(j){delete this.data[j]},F.prototype.set=function(j,z){this.data[j]=z},F}();function p(F){var j=F?w(F):{},z=v(j,this._defaultConfig),$=E.resolve(z);return this._dbInfo=j,this._dbInfo.serializer=x,this._dbInfo.keyPrefix=z,this._dbInfo.mStore=$,Promise.resolve()}function I(F){var j=this,z=this.ready().then(function(){j._dbInfo.mStore.clear()});return y(z,F),z}function C(F,j){var z=b.apply(this,arguments),$=z.promise,H=z.callback,k=$.then(function(M){E.resolve(M).drop()});return y(k,H),$}function L(F,j){var z=this;F=S(F);var $=this.ready().then(function(){var H=z._dbInfo.mStore.get(F);return H==null?null:z._dbInfo.serializer.deserialize(H)});return y($,j),$}function q(F,j){var z=this,$=this.ready().then(function(){for(var H=z._dbInfo.mStore,k=H.keys(),M=0;M<k.length;M++){var G=H.get(k[M]);if(G&&(G=z._dbInfo.serializer.deserialize(G)),G=F(G,k[M],M+1),G!==void 0)return G}});return y($,j),$}function le(F,j){var z=this,$=this.ready().then(function(){var H;try{H=z._dbInfo.mStore.key(F),H===void 0&&(H=null)}catch{H=null}return H});return y($,j),$}function pe(F){var j=this,z=this.ready().then(function(){return j._dbInfo.mStore.keys()});return y(z,F),z}function B(F){var j=this.keys().then(function(z){return z.length});return y(j,F),j}function U(F,j){var z=this;F=S(F);var $=this.ready().then(function(){z._dbInfo.mStore.rm(F)});return y($,j),$}function K(F,j,z){var $=this;F=S(F);var H=this.ready().then(function(){j===void 0&&(j=null);var k=j;return new Promise(function(M,G){$._dbInfo.serializer.serialize(j,function(ge,Q){if(Q)G(Q);else try{$._dbInfo.mStore.set(F,ge),M(k)}catch(te){G(te)}})})});return y(H,z),H}var ne=!0;r._support=ne,r._driver=n,r._initStorage=p,r.clear=I,r.dropInstance=C,r.getItem=L,r.iterate=q,r.key=le,r.keys=pe,r.length=B,r.removeItem=U,r.setItem=K,Object.defineProperty(r,"__esModule",{value:!0})})}),kN=Use(Lje()),kY=Use(Uje()),Bje={display:"none",position:"fixed",top:"0",right:"0",width:"100%",height:"100%",borderRadius:"0",border:"none",zIndex:"2147483647"};function Fje(t){for(let[e,r]of Object.entries(Bje))t.style[e]=r}function jje(t){return!![].slice.call(document.querySelectorAll(".magic-iframe")).find(r=>r.src.includes(t))}var qje=class extends Rje{constructor(){super(...arguments),this.activeElement=null}init(){this.test="hello",this.iframe=new Promise(t=>{let e=()=>{if(jje(encodeURIComponent(this.parameters)))zFe().log();else{let r=document.createElement("iframe");r.classList.add("magic-iframe"),r.dataset.magicIframeLabel=QA(this.endpoint).host,r.title="Secure Modal",r.src=QA(`/send?params=${encodeURIComponent(this.parameters)}`,this.endpoint).href,Fje(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 Px(this,null,function*(){let t=yield this.iframe;t.style.display="block",this.activeElement=document.activeElement,t.focus()})}hideOverlay(){return Px(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 Px(this,null,function*(){let e=yield this.iframe;if(e&&e.contentWindow)e.contentWindow.postMessage(t,this.endpoint);else throw bse()})}},Hje=LFe(Mse,{platform:"web",sdkName:"magic-sdk",version:"21.4.1",defaultEndpoint:"https://auth.magic.link/",ViewController:qje,configureStorage:()=>Px(void 0,null,function*(){let t=kN.default.createInstance({name:"MagicAuthLocalStorageDB",storeName:"MagicAuthLocalStorage"});return yield t.defineDriver(kY),yield t.setDriver([kN.default.INDEXEDDB,kN.default.LOCALSTORAGE,kY._driver]),t})});const Wk=Object.freeze(Object.defineProperty({__proto__:null,DeepLinkPage:sse,DeviceVerificationEventEmit:WA,DeviceVerificationEventOnReceived:fse,EthChainType:dse,Events:Hb,Extension:Xh,ExtensionError:Bk,ExtensionWarning:_5,LoginWithEmailOTPEventEmit:V0,LoginWithEmailOTPEventOnReceived:lse,LoginWithMagicLinkEventEmit:cse,LoginWithMagicLinkEventOnReceived:use,Magic:Hje,MagicIncomingWindowMessage:Ah,MagicOutgoingWindowMessage:P1,MagicPayloadMethod:vr,RPCError:R1,RPCErrorCode:hO,RecoveryMethodType:hse,SDKError:Id,SDKErrorCode:Od,SDKWarning:kw,SDKWarningCode:cm,Wallets:_s,isPromiEvent:Sse},Symbol.toStringTag,{value:"Module"})),zje=uo(Wk);var Bse={exports:{}},LN={exports:{}},LY;function Fse(){return LY||(LY=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 O=0;O<x;O++){var E=b[O>>>2]>>>24-O%4*8&255;_[S+O>>>2]|=E<<24-(S+O)%4*8}else for(var O=0;O<x;O+=4)_[S+O>>>2]=b[O>>>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,I=987654321,C=4294967295;return function(){I=36969*(I&65535)+(I>>16)&C,p=18e3*(p&65535)+(p>>16)&C;var L=(I<<16)+p&C;return L/=4294967296,L+=.5,L*(n.random()>.5?1:-1)}},S=0,x;S<y;S+=4){var O=b((x||n.random())*4294967296);x=O()*987654071,_.push(O()*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 O=_[x>>>2]>>>24-x%4*8&255;S.push((O>>>4).toString(16)),S.push((O&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 O=_[x>>>2]>>>24-x%4*8&255;S.push(String.fromCharCode(O))}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,O=x*4,E=S/O;y?E=n.ceil(E):E=n.max((E|0)-this._minBufferSize,0);var p=E*x,I=n.min(p*4,S);if(p){for(var C=0;C<p;C+=x)this._doProcessBlock(b,C);var L=b.splice(0,p);_.sigBytes-=I}return new u.init(L,I)},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})}(LN)),LN.exports}(function(t,e){(function(r,n){t.exports=n(Fse())})(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],O=v[5],E=v[6],p=v[7],I=0;I<64;I++){if(I<16)d[I]=m[w+I]|0;else{var C=d[I-15],L=(C<<25|C>>>7)^(C<<14|C>>>18)^C>>>3,q=d[I-2],le=(q<<15|q>>>17)^(q<<13|q>>>19)^q>>>10;d[I]=L+d[I-7]+le+d[I-16]}var pe=x&O^~x&E,B=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+pe+f[I]+d[I],F=U+B;p=E,E=O,O=x,x=S+ne|0,S=b,b=_,_=y,y=ne+F|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]+O|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})})(Bse);var Vje=Bse.exports;const Gje=Nc(Vje);var jse={exports:{}};(function(t,e){(function(r,n){t.exports=n(Fse())})(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})})(jse);var Wje=jse.exports;const Kje=Nc(Wje);var Lw=(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())}),qse=(t=>(t.ParseRedirectResult="magic_oauth_parse_redirect_result",t))(qse||{}),Hse=(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))(Hse||{}),UY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",zse=typeof window<"u"&&!!window.crypto,Yje=zse&&!!window.crypto.subtle;function Qje(t){return Array.from(t).map(e=>UY[e%UY.length]).join("")}function BY(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(Kje.stringify(t))}function Jje(t){return Lw(this,null,function*(){if(Yje){let e=new TextEncoder().encode(t);return crypto.subtle.digest("SHA-256",e).then(BY)}return BY(Gje(t))})}function FY(t){let e=new Uint8Array(t);if(zse)window.crypto.getRandomValues(e);else for(let r=0;r<t;r+=1)e[r]=Math.floor(Math.random()*Math.floor(255));return Qje(e)}function Xje(){return Lw(this,null,function*(){let t=FY(128),e=FY(128),r=yield Jje(e);return{verifier:e,challenge:r,state:t}})}var Zje=class extends Xh.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=>Lw(this,null,function*(){let{provider:r,query:n}=yield eqe.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),tqe.call(this,t)}},JA="oauth_redirect_metadata";function eqe(t){return Lw(this,null,function*(){yield this.utils.storage.removeItem(JA);let{provider:e,redirectURI:r,scope:n,loginHint:i}=t,{verifier:a,challenge:o,state:s}=yield Xje(),c=JSON.stringify({verifier:a,state:s});return yield this.utils.storage.setItem(JA,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 tqe(t){return this.utils.createPromiEvent((e,r)=>Lw(this,null,function*(){var n;let i=yield this.utils.storage.getItem(JA),{verifier:a,state:o}=JSON.parse(i);this.utils.storage.removeItem(JA);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 Kk=Object.freeze(Object.defineProperty({__proto__:null,OAuthErrorCode:Hse,OAuthExtension:Zje,OAuthPayloadMethods:qse},Symbol.toStringTag,{value:"Module"})),rqe=uo(Kk);var nqe=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]}),iqe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jY=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)&&nqe(e,t,r);return iqe(e,t),e};Object.defineProperty(dO,"__esModule",{value:!0});dO.MagicConnector=void 0;const qY=Ml,HY=qs,aqe=FS;class oqe extends aqe.AbstractConnector{constructor(e){super({supportedChainIds:HY.getConfiguration()[qY.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(()=>jY(zje)),{OAuthExtension:i}=await Promise.resolve().then(()=>jY(rqe)),a=HY.getConfiguration()[qY.ProviderType.MAGIC];return new n(a.apiKey,{extensions:[new i],network:{rpcUrl:a.urls[r],chainId:r}})},this.chainId=e,this.account=null}}dO.MagicConnector=oqe;(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(FS,t),r(qS,t),r(JS,t),r(XS,t),r(ZS,t),r(eO,t),r(dO,t)})(ZM);var Vse={},Uw={};Object.defineProperty(Uw,"__esModule",{value:!0});Uw.Storage=void 0;class sqe{}Uw.Storage=sqe;var mO={};Object.defineProperty(mO,"__esModule",{value:!0});mO.LocalStorage=void 0;const cqe=Uw;class uqe extends cqe.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)}}}mO.LocalStorage=uqe;(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(Uw,t),r(mO,t)})(Vse);var vO={};Object.defineProperty(vO,"__esModule",{value:!0});vO.ProviderAdapter=void 0;class Yk{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 Yk(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)}}vO.ProviderAdapter=Yk;Object.defineProperty(Py,"__esModule",{value:!0});Py.connection=Py.ConnectionManager=void 0;const zY=ns(),Vo=Ac,OE=d4e,ff=ZM,lqe=Vse,UN=qs,VY=vO;class Gse{constructor(e){this.storage=e,this.getWalletName=()=>{if(this.connector instanceof ff.WalletConnectV2Connector)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:r}=UN.getConfiguration();this.storage.remove(r),ff.WalletConnectV2Connector.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=()=>{this.connector&&(this.connector.removeListener(OE.ConnectorEvent.Deactivate,this.handleWeb3ReactDeactivate),this.connector.removeAllListeners(OE.ConnectorEvent.Update)),this.disconnect().catch(console.error)}}async connect(e,r=zY.ChainId.ETHEREUM_MAINNET){this.connector=this.buildConnector(e,r),this.connector.on(OE.ConnectorEvent.Deactivate,this.handleWeb3ReactDeactivate),e===Vo.ProviderType.MAGIC&&this.connector.on(OE.ConnectorEvent.Update,({chainId:a})=>{a&&this.setConnectionData(e,a)});const{provider:n,account:i}=await this.connector.activate();return this.setConnectionData(e,r),{provider:VY.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===Vo.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=[Vo.ProviderType.FORTMATIC,Vo.ProviderType.WALLET_CONNECT,Vo.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?e.unshift(Vo.ProviderType.INJECTED):e.unshift(Vo.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=zY.ChainId.ETHEREUM_MAINNET){const i=await this.buildConnector(e,r).getProvider();return VY.ProviderAdapter.adapt(i)}buildConnector(e,r){switch(e){case Vo.ProviderType.INJECTED:return new ff.InjectedConnector(r);case Vo.ProviderType.FORTMATIC:return new ff.FortmaticConnector(r);case Vo.ProviderType.MAGIC:return new ff.MagicConnector(r);case Vo.ProviderType.WALLET_LINK:return new ff.WalletLinkConnector(r);case Vo.ProviderType.NETWORK:return new ff.NetworkConnector(r);case Vo.ProviderType.WALLET_CONNECT_V2:return new ff.WalletConnectV2Connector(r);default:throw new Error(`Invalid provider ${e}`)}}getConnectionData(){const{storageKey:e}=UN.getConfiguration(),r=this.storage.get(e);return r?JSON.parse(r):void 0}setConnectionData(e,r){const{storageKey:n}=UN.getConfiguration(),i=JSON.stringify({providerType:e,chainId:r});this.storage.set(n,i)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}Py.ConnectionManager=Gse;Py.connection=new Gse(new lqe.LocalStorage);var Wse={};Object.defineProperty(Wse,"__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(Py,t),r(ZM,t),r(qs,t),r(Wse,t)})(Il);const fqe="https://auth-api.decentraland.zone",dqe={AUTH_SERVER_URL:fqe},hqe="https://auth-api.decentraland.org",pqe={AUTH_SERVER_URL:hqe},gqe="https://auth-api.decentraland.today",yqe={AUTH_SERVER_URL:gqe},mqe=H0.createConfig({[H0.Env.DEVELOPMENT]:dqe,[H0.Env.STAGING]:yqe,[H0.Env.PRODUCTION]:pqe},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:{}.VITE_REACT_APP_DCL_DEFAULT_ENV??"dev"}}),vqe="_background_19zmp_1",bqe="_main_19zmp_20",wqe="_left_19zmp_30",_qe="_right_19zmp_39",Eqe="_changeAccount_19zmp_53",xqe="_errorLogo_19zmp_59",Aqe="_logo_19zmp_68",Sqe="_title_19zmp_74",Oqe="_description_19zmp_81",Iqe="_code_19zmp_88",Pqe="_buttons_19zmp_95",Tqe="_closeWindow_19zmp_105",zr={background:vqe,main:bqe,left:wqe,right:_qe,changeAccount:Eqe,errorLogo:xqe,logo:Aqe,title:Sqe,description:Oqe,code:Iqe,buttons:Pqe,closeWindow:Tqe},Rqe=()=>{const t=Mye(),e=I2(),[r,n]=Ge.useState(2),i=Ge.useRef(),a=Ge.useRef(),o=Ge.useRef(),s=Ge.useRef(),c=t.requestId??"",u=Ge.useCallback(async()=>new ate(await Il.connection.getProvider()),[]),f=Ge.useCallback(()=>{e(`/login?redirectTo=/auth/requests/${c}&fromRequests=true`)},[]);Ge.useEffect(()=>((async()=>{try{await Il.connection.tryPreviousConnection()}catch{f();return}try{const _=await BN("recover",{requestId:c});i.current=_;const x=await(await(await u()).getSigner()).getAddress();if(s.current=x,_.sender&&_.sender!==x.toLowerCase()){n(1);return}o.current=setTimeout(()=>{n(0)},new Date(_.expiration).getTime()-Date.now()),_.method==="dcl_personal_sign"?n(4):n(8)}catch(_){a.current=_.message,n(3)}})(),()=>{clearTimeout(o.current)}),[]),Ge.useEffect(()=>{r!==4&&r!==8&&clearTimeout(o.current)},[r]);const d=Ge.useCallback(()=>{n(5)},[]),g=Ge.useCallback(async()=>{const b=await(await u()).getSigner(),S=await b.signMessage(i.current.params[0]),x=await BN("outcome",{requestId:c,sender:await b.getAddress(),result:S});x.error?(a.current=x.error,n(6)):n(7)},[u]),m=Ge.useCallback(()=>{n(9)},[]),w=Ge.useCallback(async()=>{const _=await u(),b=await _.getSigner(),S=await _.send(i.current.method,i.current.params),x=await BN("outcome",{requestId:c,sender:await b.getAddress(),result:S});x.error?(a.current=x.error,n(10)):n(11)},[u]),v=Ge.useCallback(async()=>{await Il.connection.disconnect(),f()},[]),y=Ge.useCallback(_=>Je.jsxs("div",{children:[Je.jsx("div",{className:zr.background}),Je.jsxs("div",{className:zr.main,children:[Je.jsx("div",{className:zr.left,children:_.children}),Je.jsx("div",{className:zr.right,children:s.current?Je.jsxs(Je.Fragment,{children:[Je.jsx(Xie,{lockBeta:!0,panning:!1,disableBackground:!0,profile:s.current,dev:!1}),Je.jsx("div",{className:zr.changeAccount,children:Je.jsx(cu.Button,{inverted:!0,onClick:v,children:"Change Account"})})]}):null})]})]}),[]);return r===0?Je.jsxs(y,{children:[Je.jsx("div",{className:zr.errorLogo}),Je.jsx("div",{className:zr.title,children:"Looks like you took too long and the request has expired"}),Je.jsx("div",{className:zr.description,children:"Please return to Decentraland's Desktop App to try again."}),Je.jsx(nh,{})]}):r===1?Je.jsxs(y,{children:[Je.jsx("div",{className:zr.errorLogo}),Je.jsx("div",{className:zr.title,children:"Looks like you are connected with a different account."}),Je.jsx("div",{className:zr.description,children:"Please change your wallet account to the one connected to the Desktop App."})]}):r===2?Je.jsx(y,{children:Je.jsx("div",{className:zr.left,children:Je.jsx(xS,{active:!0,size:"huge"})})}):r===3?Je.jsxs(y,{children:[Je.jsx("div",{className:zr.errorLogo}),Je.jsx("div",{className:zr.title,children:"There was an error recovering the request..."}),Je.jsx("div",{className:zr.description,children:"The request is not available anymore. Feel free to create a new one and try again."}),Je.jsx(nh,{})]}):r===4&&i.current?Je.jsxs(y,{children:[Je.jsx("div",{className:zr.logo}),Je.jsx("div",{className:zr.title,children:"Verify Sign In"}),Je.jsx("div",{className:zr.description,children:"Do you see the same verification number on your Desktop App?"}),Je.jsx("div",{className:zr.code,children:i.current.code}),Je.jsxs("div",{className:zr.buttons,children:[Je.jsx(cu.Button,{inverted:!0,onClick:d,children:"No"}),Je.jsx(cu.Button,{primary:!0,onClick:g,children:"Yes, they are the same"})]})]}):r===5?Je.jsxs(y,{children:[Je.jsx("div",{className:zr.errorLogo}),Je.jsx("div",{className:zr.title,children:"Did the number not match, or was this action not taken by you?"}),Je.jsx("div",{className:zr.description,children:"If you're trying to sign in, retry the action. If this action was not initiated by you, dismiss this message."}),Je.jsx(nh,{})]}):r===7?Je.jsxs(y,{children:[Je.jsx("div",{className:zr.logo}),Je.jsx("div",{className:zr.title,children:"Your account is ready!"}),Je.jsx("div",{className:zr.description,children:"Return to the Desktop App and enjoy Decentraland."}),Je.jsx(nh,{})]}):r===8&&i.current?Je.jsxs(y,{children:[Je.jsx("div",{className:zr.logo}),Je.jsx("div",{className:zr.title,children:"The Desktop App wants to interact with your wallet."}),Je.jsx("div",{className:zr.description,children:"Review the following data carefully on your wallet before approving it."}),Je.jsxs("div",{className:zr.buttons,children:[Je.jsx(cu.Button,{inverted:!0,onClick:m,children:"Deny"}),Je.jsx(cu.Button,{primary:!0,onClick:w,children:"Allow"})]})]}):r===9?Je.jsxs(y,{children:[Je.jsx("div",{className:zr.errorLogo}),Je.jsx("div",{className:zr.title,children:"Was this action not initiated by you?"}),Je.jsx("div",{className:zr.description,children:"If this action was not initiated by you, dismiss this message."}),Je.jsx(nh,{})]}):r===11?Je.jsxs(y,{children:[Je.jsx("div",{className:zr.logo}),Je.jsx("div",{className:zr.title,children:"Wallet interaction complete"}),Je.jsx("div",{className:zr.description,children:"The action has been executed successfuly."}),Je.jsx(nh,{})]}):r===6||r===10?Je.jsxs(y,{children:[Je.jsx("div",{className:zr.errorLogo}),Je.jsx("div",{className:zr.title,children:"There was an error while trying to submit the request."}),Je.jsx("div",{className:zr.description,children:"Return to the Desktop App to try again, or contant support if the error persists."}),Je.jsx(nh,{})]}):null},nh=()=>Je.jsx("div",{className:zr.closeWindow,children:"You can close this window."}),BN=async(t,e)=>{const r=mqe.get("AUTH_SERVER_URL"),n=ox(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},Cqe=()=>{const t=I2(),e=cw(),r=Ge.useCallback(async()=>{try{const n=await Il.connection.tryPreviousConnection();return!!(n.account&&n.provider)}catch{return!1}},[]);return Ge.useEffect(()=>{r().then(n=>{n?window.location.href="/":t({pathname:"/login",search:e.search})})},[r,t]),Je.jsx(xS,{active:!0,size:"huge"})},Kse=()=>{const t=cw(),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}};var bO={},wO=br;bO.__esModule=!0;var Qk=bO.default=void 0,Nqe=wO(Bn()),Dqe=wO(ii);wO(Ln());var $qe=wO(Ge),C0=Wn();function lp(t){var e=t.children,r=t.className,n=t.content,i=t.image,a=t.scrolling,o=(0,Dqe.default)(r,(0,C0.useKeyOnly)(i,"image"),(0,C0.useKeyOnly)(a,"scrolling"),"content"),s=(0,C0.getUnhandledProps)(lp,t),c=(0,C0.getElementType)(lp,t);return $qe.default.createElement(c,(0,Nqe.default)({},s,{className:o}),C0.childrenUtils.isNil(e)?n:e)}lp.handledProps=["as","children","className","content","image","scrolling"];lp.propTypes={};lp.create=(0,C0.createShorthandFactory)(lp,function(t){return{content:t}});var Mqe=lp;Qk=bO.default=Mqe;var Jk={},_O={},FN,GY;function kqe(){if(GY)return FN;GY=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 FN=t,FN}var jN,WY;function Lqe(){if(WY)return jN;WY=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 jN=t,jN}var qN,KY;function Yse(){if(KY)return qN;KY=1;var t=kqe(),e=bw(),r=wd(),n=Lqe(),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 qN=a,qN}var HN,YY;function Qse(){return YY||(YY=1,HN=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}),HN}var IE={},QY;function Uqe(){if(QY)return IE;QY=1;var t=br;IE.__esModule=!0;var e=t(wS());return IE.default=e.default,IE}var Uv={},PE={},JY;function Bqe(){if(JY)return PE;JY=1;var t=br;PE.__esModule=!0;var e=t(H$());return PE.default=e.default,PE}var XY;function Fqe(){if(XY)return Uv;XY=1;var t=Ws,e=br;Uv.__esModule=!0,Uv.default=void 0;var r=e(Bn()),n=e($c()),i=e(bS()),a=e(Ks()),o=e(ii);e(Ln());var s=t(Ge),c=Wn(),u=e(Bqe()),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,O){(0,a.default)(b,"onClick",x,O),(0,a.default)(w.props,"onActionClick",x,O)}}},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,O=(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:O}),(0,i.default)(_,function(I){return u.default.create(I,{overrideProps:v.handleButtonOverrides})})):s.default.createElement(p,(0,r.default)({},E,{className:O}),x):s.default.createElement(p,(0,r.default)({},E,{className:O}),b)},g}(s.Component);return Uv.default=f,f.handledProps=["actions","as","children","className","content","onActionClick"],f.propTypes={},f.create=(0,c.createShorthandFactory)(f,function(d){return{actions:d}}),Uv}var Bv={},ZY;function jqe(){if(ZY)return Bv;ZY=1;var t=br;Bv.__esModule=!0,Bv.default=void 0;var e=t(Bn()),r=t(ii);t(Ln());var n=t(Ge),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 Bv.default=o,Bv}var Fv={},eQ;function qqe(){if(eQ)return Fv;eQ=1;var t=br;Fv.__esModule=!0,Fv.default=void 0;var e=t(Bn()),r=vd,n=t(ii);t(Ln());var i=t(Ge),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),O=(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(O,(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 Fv.default=s,Fv}var jv={},tQ;function Hqe(){if(tQ)return jv;tQ=1;var t=br;jv.__esModule=!0,jv.default=void 0;var e=t(Bn()),r=t(ii);t(Ln());var n=t(Ge),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 jv.default=o,jv}var Gu={},rQ;function zqe(){if(rQ)return Gu;rQ=1,Gu.__esModule=!0,Gu.isLegacy=Gu.getLegacyStyles=Gu.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};Gu.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}};Gu.getLegacyStyles=n;var i=function(){return!window.ActiveXObject&&"ActiveXObject"in window};return Gu.isLegacy=i,Gu}var Vqe=Ws,ta=br;_O.__esModule=!0;_O.default=void 0;var v0=ta(Bn()),Gqe=ta($c()),Wqe=ta(vS()),Kqe=ta(U$()),Yqe=ta(F$()),Qqe=ta(Yse()),Jqe=ta(Are()),df=ta(Ks()),nQ=vd,Xqe=ta(ii);ta(Ln());var Wu=Vqe(Ge),Zqe=ta(Qse()),Pa=Wn(),eHe=ta(Uqe()),iQ=ta(q$()),Jse=ta(Fqe()),Xse=ta(bO),tHe=ta(jqe()),Zse=ta(qqe()),ece=ta(Hqe()),zN=zqe(),Iu=function(t){(0,Gqe.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,zN.isLegacy)(),n.ref=(0,Wu.createRef)(),n.dimmerRef=(0,Wu.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,df.default)(s,"onActionClick",u,f),(0,df.default)(n.props,"onActionClick",u,n.props),n.handleClose(u)}}},n.handleClose=function(s){n.setState({open:!1}),(0,df.default)(n.props,"onClose",s,(0,v0.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,df.default)(n.props,"onClose",s,(0,v0.default)({},n.props,{open:!1})))},n.handleIconOverrides=function(s){return{onClick:function(u){(0,df.default)(s,"onClick",u),n.handleClose(u)}}},n.handleOpen=function(s){(0,df.default)(n.props,"onOpen",s,(0,v0.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,df.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,df.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,zN.canFit)(f);c=!d;var g=n.legacy?(0,zN.getLegacyStyles)(d,s,f):{};(0,Zqe.default)(n.state.legacyStyles,g)||(u.legacyStyles=g),n.state.scrolling!==c&&(u.scrolling=c)}(0,Jqe.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,O=(0,Xqe.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,I=eHe.default.create(p,{overrideProps:n.handleIconOverrides});return Wu.default.createElement(nQ.Ref,{innerRef:n.ref},Wu.default.createElement(E,(0,v0.default)({},s,{className:O,style:(0,v0.default)({},S,_)}),I,Pa.childrenUtils.isNil(d)?Wu.default.createElement(Wu.default.Fragment,null,ece.default.create(v,{autoGenerateKey:!1}),Xse.default.create(w,{autoGenerateKey:!1}),Jse.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,Wu.isValidElement)(u)?u:null;var w=(0,Pa.getUnhandledProps)(e,this.props),v=iQ.default.handledProps,y=(0,Qqe.default)(w,function(b,S,x){return(0,Yqe.default)(v,x)||(b[x]=S),b},{}),_=(0,Kqe.default)(w,v);return Wu.default.createElement(iQ.default,(0,v0.default)({closeOnDocumentClick:o},_,{trigger:u,eventPool:c,mountNode:m,open:d,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount}),Wu.default.createElement(nQ.Ref,{innerRef:this.dimmerRef},Zse.default.create((0,Wqe.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);Iu.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"];Iu.propTypes={};Iu.defaultProps={centered:!0,dimmer:!0,closeOnDimmerClick:!0,closeOnDocumentClick:!1,eventPool:"Modal"};Iu.autoControlledProps=["open"];Iu.Actions=Jse.default;Iu.Content=Xse.default;Iu.Description=tHe.default;Iu.Dimmer=Zse.default;Iu.Header=ece.default;var rHe=Iu;_O.default=rHe;(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=_O;Object.defineProperty(t,"Modal",{enumerable:!0,get:function(){return e(r).default}})})(Jk);var Xk={};var nHe=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)}}(),iHe=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]}),aHe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),oHe=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)&&iHe(e,t,r);return aHe(e,t),e};Object.defineProperty(Xk,"__esModule",{value:!0});var Zk=Xk.ModalNavigation=void 0,ih=oHe(Ge),sHe=function(t){nHe(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 ih.createElement("div",{className:"dcl modal-navigation"},ih.createElement("div",{className:"dcl modal-navigation-title"},n),i&&ih.createElement("div",{className:"dcl modal-navigation-subtitle"},i),a&&ih.createElement("div",{className:"dcl modal-navigation-button modal-navigation-back",onClick:a}),s&&ih.createElement("div",{className:"dcl modal-navigation-button modal-navigation-info",onClick:s}),o&&ih.createElement("div",{className:"dcl modal-navigation-button modal-navigation-close",onClick:o}))},e}(ih.PureComponent);Zk=Xk.ModalNavigation=sHe;const cHe="https://cdn.decentraland.org/@dcl/auth-site/0.1.3-7386581352.commit-0ef8d7f/assets/warning-057948e8.svg";var Ri=(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))(Ri||{});function uHe(t,e){switch(t){case Ri.ERROR:return"You did not confirm this action in your digital wallet extension. To continue, please try again.";case Ri.CONNECTING_WALLET:case Ri.WAITING_FOR_SIGNATURE:return e===Ml.ProviderType.MAGIC?"Almost done! Confirm your request to login Decentraland":"Confirm in your digital wallet extension to continue.";case Ri.VALIDATING_SIGN_IN:return"Just a moment, we're verifying your login credentials...";case Ri.LOADING_MAGIC:return"Redirecting..."}}const lHe="_main_1qx1l_1",fHe="_content_1qx1l_8",dHe="_errorImage_1qx1l_16",hHe="_message_1qx1l_22",pHe="_loader_1qx1l_29",qv={main:lHe,content:fHe,errorImage:dHe,message:hHe,loader:pHe},tce=t=>{const{open:e,state:r,providerType:n,onClose:i,onTryAgain:a}=t,o=r===Ri.CONNECTING_WALLET||r===Ri.WAITING_FOR_SIGNATURE||r===Ri.LOADING_MAGIC||r===Ri.VALIDATING_SIGN_IN;return Je.jsxs(Jk.Modal,{size:"tiny",open:e,children:[Je.jsx(Zk,{title:"",onClose:o?void 0:i}),Je.jsx("div",{className:qv.main,children:Je.jsxs("div",{className:qv.content,children:[r===Ri.ERROR&&Je.jsx("img",{className:qv.errorImage,src:cHe}),o&&Je.jsx(xS,{className:qv.loader,size:"huge",inline:!0}),Je.jsx("p",{className:qv.message,children:uHe(r,n)}),r===Ri.ERROR&&Je.jsx(cu.Button,{primary:!0,onClick:a,children:"Try again"})]})}),Je.jsx(Qk,{})]})};var rce={},nce={},x5={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((he,Se)=>{P=Ce=>{he(Ce),W.isPending=!1},D=Ce=>{Se(Ce),W.isPending=!1}}).catch(he=>Promise.reject(he));return W.resolve=P,W.reject=D,"finally"in W||(W.finally=he=>{W.then(he),W.catch(he)}),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",he=W?window:{};he.JS_SHA3_NO_WINDOW&&(W=!1);var Se=!W&&typeof self=="object";!he.JS_SHA3_NO_NODE_JS&&typeof Ha=="object"&&Ha.versions&&Ha.versions.node?he=Ne:Se&&(he=self);var Ce=!he.JS_SHA3_NO_COMMON_JS&&P.exports,rt=!he.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",At="0123456789abcdef".split(""),Ft=[4,1024,262144,67108864],Jt=[0,8,16,24],Pi=[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};!he.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(R){return Object.prototype.toString.call(R)==="[object Array]"}),!rt||!he.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]()}},yi=function(R,oe,we){return function(se,Ae){return new ar(R,oe,Ae).update(se)[we]()}},ho=function(R,oe,we){return function(se,Ae,Ie,Pe){return Ar["cshake"+R].update(se,Ae,Ie,Pe)[we]()}},qi=function(R,oe,we){return function(se,Ae,Ie,Pe){return Ar["kmac"+R].update(se,Ae,Ie,Pe)[we]()}},mi=function(R,oe,we,se){for(var Ae=0;Ae<si.length;++Ae){var Ie=si[Ae];R[Ie]=oe(we,se,Ie)}return R},po=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)},mi(we,fn,R,oe)},tn=[{name:"keccak",padding:[1,256,65536,16777216],bits:xn,createMethod:po},{name:"sha3",padding:[6,1536,393216,100663296],bits:xn,createMethod:po},{name:"shake",padding:[31,7936,2031616,520093696],bits:St,createMethod:function(R,oe){var we=yi(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)},mi(we,yi,R,oe)}},{name:"cshake",padding:Ft,bits:St,createMethod:function(R,oe){var we=An[R],se=ho(R,0,"hex");return se.create=function(Ae,Ie,Pe){return Ie||Pe?new ar(R,oe,Ae).bytepad([Ie,Pe],we):Ar["shake"+R].create(Ae)},se.update=function(Ae,Ie,Pe,Be){return se.create(Ie,Pe,Be).update(Ae)},mi(se,ho,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,Ie,Pe){return new yr(R,oe,Ie).bytepad(["KMAC",Pe],we).bytepad([Ae],we)},se.update=function(Ae,Ie,Pe,Be){return se.create(Ae,Pe,Be).update(Ie)},mi(se,qi,R,oe)}}],Ar={},de=[],ke=0;ke<tn.length;++ke)for(var it=tn[ke],We=it.bits,Qr=0;Qr<We.length;++Qr){var fr=it.name+"_"+We[Qr];if(de.push(fr),Ar[fr]=it.createMethod(We[Qr],it.padding),it.name!=="sha3"){var yn=it.name+We[Qr];de.push(yn),Ar[yn]=Ar[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 yr(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,Ie=this.blocks,Pe=this.byteCount,Be=R.length,Ke=this.blockCount,qe=0,pt=this.s;qe<Be;){if(this.reset)for(this.reset=!1,Ie[0]=this.block,se=1;se<Ke+1;++se)Ie[se]=0;if(oe)for(se=this.start;qe<Be&&se<Pe;++qe)Ie[se>>2]|=R[qe]<<Jt[3&se++];else for(se=this.start;qe<Be&&se<Pe;++qe)(Ae=R.charCodeAt(qe))<128?Ie[se>>2]|=Ae<<Jt[3&se++]:Ae<2048?(Ie[se>>2]|=(192|Ae>>6)<<Jt[3&se++],Ie[se>>2]|=(128|63&Ae)<<Jt[3&se++]):Ae<55296||Ae>=57344?(Ie[se>>2]|=(224|Ae>>12)<<Jt[3&se++],Ie[se>>2]|=(128|Ae>>6&63)<<Jt[3&se++],Ie[se>>2]|=(128|63&Ae)<<Jt[3&se++]):(Ae=65536+((1023&Ae)<<10|1023&R.charCodeAt(++qe)),Ie[se>>2]|=(240|Ae>>18)<<Jt[3&se++],Ie[se>>2]|=(128|Ae>>12&63)<<Jt[3&se++],Ie[se>>2]|=(128|Ae>>6&63)<<Jt[3&se++],Ie[se>>2]|=(128|63&Ae)<<Jt[3&se++]);if(this.lastByteIndex=se,se>=Pe){for(this.start=se-Pe,this.block=Ie[Ke],se=0;se<Ke;++se)pt[se]^=Ie[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 Ie=0;Ie<R.length;++Ie){var Pe=R.charCodeAt(Ie);Pe<128?se+=1:Pe<2048?se+=2:Pe<55296||Pe>=57344?se+=3:(Pe=65536+((1023&Pe)<<10|1023&R.charCodeAt(++Ie)),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,Ie=[];return Ie.length=Ae,this.update(Ie),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,Ie=0,Pe=0,Be="";Pe<se;){for(Ie=0;Ie<oe&&Pe<se;++Ie,++Pe)R=we[Ie],Be+=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),Ie=0)}return Ae&&(R=we[Ie],Be+=At[R>>4&15]+At[15&R],Ae>1&&(Be+=At[R>>12&15]+At[R>>8&15]),Ae>2&&(Be+=At[R>>20&15]+At[R>>16&15])),Be},ar.prototype.arrayBuffer=function(){this.finalize();var R,oe=this.blockCount,we=this.s,se=this.outputBlocks,Ae=this.extraBytes,Ie=0,Pe=0,Be=this.outputBits>>3;R=Ae?new ArrayBuffer(se+1<<2):new ArrayBuffer(Be);for(var Ke=new Uint32Array(R);Pe<se;){for(Ie=0;Ie<oe&&Pe<se;++Ie,++Pe)Ke[Pe]=we[Ie];Pe%oe==0&&ie(we)}return Ae&&(Ke[Ie]=we[Ie],R=R.slice(0,Be)),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,Ie=this.extraBytes,Pe=0,Be=0,Ke=[];Be<Ae;){for(Pe=0;Pe<we&&Be<Ae;++Pe,++Be)R=Be<<2,oe=se[Pe],Ke[R]=255&oe,Ke[R+1]=oe>>8&255,Ke[R+2]=oe>>16&255,Ke[R+3]=oe>>24&255;Be%we==0&&ie(se)}return Ie&&(R=Be<<2,oe=se[Pe],Ke[R]=255&oe,Ie>1&&(Ke[R+1]=oe>>8&255),Ie>2&&(Ke[R+2]=oe>>16&255)),Ke},yr.prototype=new ar,yr.prototype.finalize=function(){return this.encode(this.outputBits,!0),ar.prototype.finalize.call(this)};var ie=function(R){var oe,we,se,Ae,Ie,Pe,Be,Ke,qe,pt,rr,Wt,Jr,Pn,dn,Mr,Xr,Sr,Hi,os,Lc,Mi,ss,ki,di,Sn,Pu,Zs,Dp,Rd,Cd,Gl,Wl,Nd,$p,Kl,Yl,Mp,Dd,zi,Ql,Uc,$d,Md,kp,Lp,Up,Bp,Fp,ec,jp,qp,Jl,kd,Bo,Tu,Hp,zp,Vp,tc,Ea,Ld,Gp;for(se=0;se<48;se+=2)Ae=R[0]^R[10]^R[20]^R[30]^R[40],Ie=R[1]^R[11]^R[21]^R[31]^R[41],Pe=R[2]^R[12]^R[22]^R[32]^R[42],Be=R[3]^R[13]^R[23]^R[33]^R[43],Ke=R[4]^R[14]^R[24]^R[34]^R[44],qe=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|Be>>>31),we=(Jr=R[9]^R[19]^R[29]^R[39]^R[49])^(Be<<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^(Ke<<1|qe>>>31),we=Ie^(qe<<1|Ke>>>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=Be^(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=Ke^(Wt<<1|Jr>>>31),we=qe^(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|Ie>>>31),we=rr^(Ie<<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],Lp=R[11]<<4|R[10]>>>28,Up=R[10]<<4|R[11]>>>28,Zs=R[20]<<3|R[21]>>>29,Dp=R[21]<<3|R[20]>>>29,tc=R[31]<<9|R[30]>>>23,Ea=R[30]<<9|R[31]>>>23,Uc=R[40]<<18|R[41]>>>14,$d=R[41]<<18|R[40]>>>14,Nd=R[2]<<1|R[3]>>>31,$p=R[3]<<1|R[2]>>>31,Mr=R[13]<<12|R[12]>>>20,Xr=R[12]<<12|R[13]>>>20,Bp=R[22]<<10|R[23]>>>22,Fp=R[23]<<10|R[22]>>>22,Rd=R[33]<<13|R[32]>>>19,Cd=R[32]<<13|R[33]>>>19,Ld=R[42]<<2|R[43]>>>30,Gp=R[43]<<2|R[42]>>>30,kd=R[5]<<30|R[4]>>>2,Bo=R[4]<<30|R[5]>>>2,Kl=R[14]<<6|R[15]>>>26,Yl=R[15]<<6|R[14]>>>26,Sr=R[25]<<11|R[24]>>>21,Hi=R[24]<<11|R[25]>>>21,ec=R[34]<<15|R[35]>>>17,jp=R[35]<<15|R[34]>>>17,Gl=R[45]<<29|R[44]>>>3,Wl=R[44]<<29|R[45]>>>3,ki=R[6]<<28|R[7]>>>4,di=R[7]<<28|R[6]>>>4,Tu=R[17]<<23|R[16]>>>9,Hp=R[16]<<23|R[17]>>>9,Mp=R[26]<<25|R[27]>>>7,Dd=R[27]<<25|R[26]>>>7,os=R[36]<<21|R[37]>>>11,Lc=R[37]<<21|R[36]>>>11,qp=R[47]<<24|R[46]>>>8,Jl=R[46]<<24|R[47]>>>8,Md=R[8]<<27|R[9]>>>5,kp=R[9]<<27|R[8]>>>5,Sn=R[18]<<20|R[19]>>>12,Pu=R[19]<<20|R[18]>>>12,zp=R[29]<<7|R[28]>>>25,Vp=R[28]<<7|R[29]>>>25,zi=R[38]<<8|R[39]>>>24,Ql=R[39]<<8|R[38]>>>24,Mi=R[48]<<14|R[49]>>>18,ss=R[49]<<14|R[48]>>>18,R[0]=Pn^~Mr&Sr,R[1]=dn^~Xr&Hi,R[10]=ki^~Sn&Zs,R[11]=di^~Pu&Dp,R[20]=Nd^~Kl&Mp,R[21]=$p^~Yl&Dd,R[30]=Md^~Lp&Bp,R[31]=kp^~Up&Fp,R[40]=kd^~Tu&zp,R[41]=Bo^~Hp&Vp,R[2]=Mr^~Sr&os,R[3]=Xr^~Hi&Lc,R[12]=Sn^~Zs&Rd,R[13]=Pu^~Dp&Cd,R[22]=Kl^~Mp&zi,R[23]=Yl^~Dd&Ql,R[32]=Lp^~Bp&ec,R[33]=Up^~Fp&jp,R[42]=Tu^~zp&tc,R[43]=Hp^~Vp&Ea,R[4]=Sr^~os&Mi,R[5]=Hi^~Lc&ss,R[14]=Zs^~Rd&Gl,R[15]=Dp^~Cd&Wl,R[24]=Mp^~zi&Uc,R[25]=Dd^~Ql&$d,R[34]=Bp^~ec&qp,R[35]=Fp^~jp&Jl,R[44]=zp^~tc&Ld,R[45]=Vp^~Ea&Gp,R[6]=os^~Mi&Pn,R[7]=Lc^~ss&dn,R[16]=Rd^~Gl&ki,R[17]=Cd^~Wl&di,R[26]=zi^~Uc&Nd,R[27]=Ql^~$d&$p,R[36]=ec^~qp&Md,R[37]=jp^~Jl&kp,R[46]=tc^~Ld&kd,R[47]=Ea^~Gp&Bo,R[8]=Mi^~Pn&Mr,R[9]=ss^~dn&Xr,R[18]=Gl^~ki&Sn,R[19]=Wl^~di&Pu,R[28]=Uc^~Nd&Kl,R[29]=$d^~$p&Yl,R[38]=qp^~Md&Lp,R[39]=Jl^~kp&Up,R[48]=Ld^~kd&Tu,R[49]=Gp^~Bo&Hp,R[0]^=Pi[se],R[1]^=Pi[se+1]};if(Ce)P.exports=Ar;else for(ke=0;ke<de.length;++ke)he[de[ke]]=Ar[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 O(P){for(var D,W,he=1,Se=P.length,Ce=P[0]+"";he<Se;){for(D=P[he++]+"",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,he,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],he=Ce&&!Ce[0],W||he)return W?he?0:-At:rt;if(rt!=At)return rt;if(W=rt<0,he=Ft==Jt,!Se||!Ce)return he?0:!Se^W?1:-1;if(!he)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,he){if(P<D||P>W||P!==d(P))throw Error(g+(he||"Argument")+(typeof P=="number"?P<D||P>W?" out of range: ":" not an integer: ":" not a primitive number: ")+String(P))}function I(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 L(P,D,W){var he,Se;if(D<0){for(Se=W+".";++D;Se+=W);P=Se+P}else if(++D>(he=P.length)){for(Se=W,D-=he;--D;Se+=W);P+=Se}else D<he&&(P=P.slice(0,D)+"."+P.slice(D));return P}var q=function P(D){var W,he,Se,Ce,rt,At,Ft,Jt,Pi,xn,St=We.prototype={constructor:We,toString:null,valueOf:null},si=new We(1),An=20,fn=4,yi=-7,ho=21,qi=-1e7,mi=1e7,po=!1,tn=1,Ar=0,de={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},ke="0123456789abcdefghijklmnopqrstuvwxyz",it=!0;function We(ie,R){var oe,we,se,Ae,Ie,Pe,Be,Ke,qe=this;if(!(qe instanceof We))return new We(ie,R);if(R==null){if(ie&&ie._isBigNumber===!0)return qe.s=ie.s,void(!ie.c||ie.e>mi?qe.c=qe.e=null:ie.e<qi?qe.c=[qe.e=0]:(qe.e=ie.e,qe.c=ie.c.slice()));if((Pe=typeof ie=="number")&&0*ie==0){if(qe.s=1/ie<0?(ie=-ie,-1):1,ie===~~ie){for(Ae=0,Ie=ie;Ie>=10;Ie/=10,Ae++);return void(Ae>mi?qe.c=qe.e=null:(qe.e=Ae,qe.c=[ie]))}Ke=String(ie)}else{if(!u.test(Ke=String(ie)))return Se(qe,Ke,Pe);qe.s=Ke.charCodeAt(0)==45?(Ke=Ke.slice(1),-1):1}(Ae=Ke.indexOf("."))>-1&&(Ke=Ke.replace(".","")),(Ie=Ke.search(/e/i))>0?(Ae<0&&(Ae=Ie),Ae+=+Ke.slice(Ie+1),Ke=Ke.substring(0,Ie)):Ae<0&&(Ae=Ke.length)}else{if(p(R,2,ke.length,"Base"),R==10&&it)return ar(qe=new We(ie),An+qe.e+1,fn);if(Ke=String(ie),Pe=typeof ie=="number"){if(0*ie!=0)return Se(qe,Ke,Pe,R);if(qe.s=1/ie<0?(Ke=Ke.slice(1),-1):1,We.DEBUG&&Ke.replace(/^0\.0*|\./,"").length>15)throw Error(m+ie)}else qe.s=Ke.charCodeAt(0)===45?(Ke=Ke.slice(1),-1):1;for(oe=ke.slice(0,R),Ae=Ie=0,Be=Ke.length;Ie<Be;Ie++)if(oe.indexOf(we=Ke.charAt(Ie))<0){if(we=="."){if(Ie>Ae){Ae=Be;continue}}else if(!se&&(Ke==Ke.toUpperCase()&&(Ke=Ke.toLowerCase())||Ke==Ke.toLowerCase()&&(Ke=Ke.toUpperCase()))){se=!0,Ie=-1,Ae=0;continue}return Se(qe,String(ie),Pe,R)}Pe=!1,(Ae=(Ke=he(Ke,R,10,qe.s)).indexOf("."))>-1?Ke=Ke.replace(".",""):Ae=Ke.length}for(Ie=0;Ke.charCodeAt(Ie)===48;Ie++);for(Be=Ke.length;Ke.charCodeAt(--Be)===48;);if(Ke=Ke.slice(Ie,++Be)){if(Be-=Ie,Pe&&We.DEBUG&&Be>15&&(ie>y||ie!==d(ie)))throw Error(m+qe.s*ie);if((Ae=Ae-Ie-1)>mi)qe.c=qe.e=null;else if(Ae<qi)qe.c=[qe.e=0];else{if(qe.e=Ae,qe.c=[],Ie=(Ae+1)%v,Ae<0&&(Ie+=v),Ie<Be){for(Ie&&qe.c.push(+Ke.slice(0,Ie)),Be-=v;Ie<Be;)qe.c.push(+Ke.slice(Ie,Ie+=v));Ie=v-(Ke=Ke.slice(Ie)).length}else Ie-=Be;for(;Ie--;Ke+="0");qe.c.push(+Ke)}}else qe.c=[qe.e=0]}function Qr(ie,R,oe,we){var se,Ae,Ie,Pe,Be;if(oe==null?oe=fn:p(oe,0,8),!ie.c)return ie.toString();if(se=ie.c[0],Ie=ie.e,R==null)Be=O(ie.c),Be=we==1||we==2&&(Ie<=yi||Ie>=ho)?C(Be,Ie):L(Be,Ie,"0");else if(Ae=(ie=ar(new We(ie),R,oe)).e,Pe=(Be=O(ie.c)).length,we==1||we==2&&(R<=Ae||Ae<=yi)){for(;Pe<R;Be+="0",Pe++);Be=C(Be,Ae)}else if(R-=Ie,Be=L(Be,Ae,"0"),Ae+1>Pe){if(--R>0)for(Be+=".";R--;Be+="0");}else if((R+=Ae-Pe)>0)for(Ae+1==Pe&&(Be+=".");R--;Be+="0");return ie.s<0&&se?"-"+Be:Be}function fr(ie,R){for(var oe,we=1,se=new We(ie[0]);we<ie.length;we++){if(!(oe=new We(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)>mi?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,Ie,Pe,Be,Ke,qe,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,Ie=R,qe=(Be=pt[Ke=0])/rr[se-Ie-1]%10|0;else if((Ke=f((Ae+1)/v))>=pt.length){if(!we)break e;for(;pt.length<=Ke;pt.push(0));Be=qe=0,se=1,Ie=(Ae%=v)-v+1}else{for(Be=Pe=pt[Ke],se=1;Pe>=10;Pe/=10,se++);qe=(Ie=(Ae%=v)-v+se)<0?0:Be/rr[se-Ie-1]%10|0}if(we=we||R<0||pt[Ke+1]!=null||(Ie<0?Be:Be%rr[se-Ie-1]),we=oe<4?(qe||we)&&(oe==0||oe==(ie.s<0?3:2)):qe>5||qe==5&&(oe==4||we||oe==6&&(Ae>0?Ie>0?Be/rr[se-Ie]:0:pt[Ke-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=Ke,Pe=1,Ke--):(pt.length=Ke+1,Pe=rr[v-Ae],pt[Ke]=Ie>0?d(Be/rr[se-Ie]%rr[Ie])*Pe:0),we)for(;;){if(Ke==0){for(Ae=1,Ie=pt[0];Ie>=10;Ie/=10,Ae++);for(Ie=pt[0]+=Pe,Pe=1;Ie>=10;Ie/=10,Pe++);Ae!=Pe&&(ie.e++,pt[0]==w&&(pt[0]=1));break}if(pt[Ke]+=Pe,pt[Ke]!=w)break;pt[Ke--]=0,Pe=1}for(Ae=pt.length;pt[--Ae]===0;pt.pop());}ie.e>mi?ie.c=ie.e=null:ie.e<qi&&(ie.c=[ie.e=0])}return ie}function yr(ie){var R,oe=ie.e;return oe===null?ie.toString():(R=O(ie.c),R=oe<=yi||oe>=ho?C(R,oe):L(R,oe,"0"),ie.s<0?"-"+R:R)}return We.clone=P,We.ROUND_UP=0,We.ROUND_DOWN=1,We.ROUND_CEIL=2,We.ROUND_FLOOR=3,We.ROUND_HALF_UP=4,We.ROUND_HALF_DOWN=5,We.ROUND_HALF_EVEN=6,We.ROUND_HALF_CEIL=7,We.ROUND_HALF_FLOOR=8,We.EUCLID=9,We.config=We.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),yi=oe[0],ho=oe[1]):(p(oe,-S,S,R),yi=-(ho=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],mi=oe[1];else{if(p(oe,-S,S,R),!oe)throw Error(g+R+" cannot be zero: "+oe);qi=-(mi=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 po=!oe,Error(g+"crypto unavailable");po=oe}else po=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),Ar=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:[yi,ho],RANGE:[qi,mi],CRYPTO:po,MODULO_MODE:tn,POW_PRECISION:Ar,FORMAT:de,ALPHABET:ke}},We.isBigNumber=function(ie){if(!ie||ie._isBigNumber!==!0)return!1;if(!We.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)},We.maximum=We.max=function(){return fr(arguments,St.lt)},We.minimum=We.min=function(){return fr(arguments,St.gt)},We.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,Ie=0,Pe=[],Be=new We(si);if(ie==null?ie=An:p(ie,0,S),se=f(ie/v),po)if(crypto.getRandomValues){for(R=crypto.getRandomValues(new Uint32Array(se*=2));Ie<se;)(Ae=131072*R[Ie]+(R[Ie+1]>>>11))>=9e15?(oe=crypto.getRandomValues(new Uint32Array(2)),R[Ie]=oe[0],R[Ie+1]=oe[1]):(Pe.push(Ae%1e14),Ie+=2);Ie=se/2}else{if(!crypto.randomBytes)throw po=!1,Error(g+"crypto unavailable");for(R=crypto.randomBytes(se*=7);Ie<se;)(Ae=281474976710656*(31&R[Ie])+1099511627776*R[Ie+1]+4294967296*R[Ie+2]+16777216*R[Ie+3]+(R[Ie+4]<<16)+(R[Ie+5]<<8)+R[Ie+6])>=9e15?crypto.randomBytes(7).copy(R,Ie):(Pe.push(Ae%1e14),Ie+=7);Ie=se/7}if(!po)for(;Ie<se;)(Ae=rt())<9e15&&(Pe[Ie++]=Ae%1e14);for(se=Pe[--Ie],ie%=v,se&&ie&&(Ae=_[v-ie],Pe[Ie]=d(se/Ae)*Ae);Pe[Ie]===0;Pe.pop(),Ie--);if(Ie<0)Pe=[we=0];else{for(we=-1;Pe[0]===0;Pe.splice(0,1),we-=v);for(Ie=1,Ae=Pe[0];Ae>=10;Ae/=10,Ie++);Ie<v&&(we-=v-Ie)}return Be.e=we,Be.c=Pe,Be}),We.sum=function(){for(var ie=1,R=arguments,oe=new We(R[0]);ie<R.length;)oe=oe.plus(R[ie++]);return oe},he=function(){var ie="0123456789";function R(oe,we,se,Ae){for(var Ie,Pe,Be=[0],Ke=0,qe=oe.length;Ke<qe;){for(Pe=Be.length;Pe--;Be[Pe]*=we);for(Be[0]+=Ae.indexOf(oe.charAt(Ke++)),Ie=0;Ie<Be.length;Ie++)Be[Ie]>se-1&&(Be[Ie+1]==null&&(Be[Ie+1]=0),Be[Ie+1]+=Be[Ie]/se|0,Be[Ie]%=se)}return Be.reverse()}return function(oe,we,se,Ae,Ie){var Pe,Be,Ke,qe,pt,rr,Wt,Jr,Pn=oe.indexOf("."),dn=An,Mr=fn;for(Pn>=0&&(qe=Ar,Ar=0,oe=oe.replace(".",""),rr=(Jr=new We(we)).pow(oe.length-Pn),Ar=qe,Jr.c=R(L(O(rr.c),rr.e,"0"),10,se,ie),Jr.e=Jr.c.length),Ke=qe=(Wt=R(oe,we,se,Ie?(Pe=ke,ie):(Pe=ie,ke))).length;Wt[--qe]==0;Wt.pop());if(!Wt[0])return Pe.charAt(0);if(Pn<0?--Ke:(rr.c=Wt,rr.e=Ke,rr.s=Ae,Wt=(rr=W(rr,Jr,dn,Mr,se)).c,pt=rr.r,Ke=rr.e),Pn=Wt[Be=Ke+dn+1],qe=se/2,pt=pt||Be<0||Wt[Be+1]!=null,pt=Mr<4?(Pn!=null||pt)&&(Mr==0||Mr==(rr.s<0?3:2)):Pn>qe||Pn==qe&&(Mr==4||pt||Mr==6&&1&Wt[Be-1]||Mr==(rr.s<0?8:7)),Be<1||!Wt[0])oe=pt?L(Pe.charAt(1),-dn,Pe.charAt(0)):Pe.charAt(0);else{if(Wt.length=Be,pt)for(--se;++Wt[--Be]>se;)Wt[Be]=0,Be||(++Ke,Wt=[1].concat(Wt));for(qe=Wt.length;!Wt[--qe];);for(Pn=0,oe="";Pn<=qe;oe+=Pe.charAt(Wt[Pn++]));oe=L(oe,Ke,Pe.charAt(0))}return oe}}(),W=function(){function ie(we,se,Ae){var Ie,Pe,Be,Ke,qe=0,pt=we.length,rr=se%b,Wt=se/b|0;for(we=we.slice();pt--;)qe=((Pe=rr*(Be=we[pt]%b)+(Ie=Wt*Be+(Ke=we[pt]/b|0)*rr)%b*b+qe)/Ae|0)+(Ie/b|0)+Wt*Ke,we[pt]=Pe%Ae;return qe&&(we=[qe].concat(we)),we}function R(we,se,Ae,Ie){var Pe,Be;if(Ae!=Ie)Be=Ae>Ie?1:-1;else for(Pe=Be=0;Pe<Ae;Pe++)if(we[Pe]!=se[Pe]){Be=we[Pe]>se[Pe]?1:-1;break}return Be}function oe(we,se,Ae,Ie){for(var Pe=0;Ae--;)we[Ae]-=Pe,Pe=we[Ae]<se[Ae]?1:0,we[Ae]=Pe*Ie+we[Ae]-se[Ae];for(;!we[0]&&we.length>1;we.splice(0,1));}return function(we,se,Ae,Ie,Pe){var Be,Ke,qe,pt,rr,Wt,Jr,Pn,dn,Mr,Xr,Sr,Hi,os,Lc,Mi,ss,ki=we.s==se.s?1:-1,di=we.c,Sn=se.c;if(!(di&&di[0]&&Sn&&Sn[0]))return new We(we.s&&se.s&&(di?!Sn||di[0]!=Sn[0]:Sn)?di&&di[0]==0||!Sn?0*ki:ki/0:NaN);for(dn=(Pn=new We(ki)).c=[],ki=Ae+(Ke=we.e-se.e)+1,Pe||(Pe=w,Ke=x(we.e/v)-x(se.e/v),ki=ki/v|0),qe=0;Sn[qe]==(di[qe]||0);qe++);if(Sn[qe]>(di[qe]||0)&&Ke--,ki<0)dn.push(1),pt=!0;else{for(os=di.length,Mi=Sn.length,qe=0,ki+=2,(rr=d(Pe/(Sn[0]+1)))>1&&(Sn=ie(Sn,rr,Pe),di=ie(di,rr,Pe),Mi=Sn.length,os=di.length),Hi=Mi,Xr=(Mr=di.slice(0,Mi)).length;Xr<Mi;Mr[Xr++]=0);ss=Sn.slice(),ss=[0].concat(ss),Lc=Sn[0],Sn[1]>=Pe/2&&Lc++;do{if(rr=0,(Be=R(Sn,Mr,Mi,Xr))<0){if(Sr=Mr[0],Mi!=Xr&&(Sr=Sr*Pe+(Mr[1]||0)),(rr=d(Sr/Lc))>1)for(rr>=Pe&&(rr=Pe-1),Jr=(Wt=ie(Sn,rr,Pe)).length,Xr=Mr.length;R(Wt,Mr,Jr,Xr)==1;)rr--,oe(Wt,Mi<Jr?ss:Sn,Jr,Pe),Jr=Wt.length,Be=1;else rr==0&&(Be=rr=1),Jr=(Wt=Sn.slice()).length;if(Jr<Xr&&(Wt=[0].concat(Wt)),oe(Mr,Wt,Xr,Pe),Xr=Mr.length,Be==-1)for(;R(Sn,Mr,Mi,Xr)<1;)rr++,oe(Mr,Mi<Xr?ss:Sn,Xr,Pe),Xr=Mr.length}else Be===0&&(rr++,Mr=[0]);dn[qe++]=rr,Mr[0]?Mr[Xr++]=di[Hi]||0:(Mr=[di[Hi]],Xr=1)}while((Hi++<os||Mr[0]!=null)&&ki--);pt=Mr[0]!=null,dn[0]||dn.splice(0,1)}if(Pe==w){for(qe=1,ki=dn[0];ki>=10;ki/=10,qe++);ar(Pn,Ae+(Pn.e=qe+Ke*v-1)+1,Ie,pt)}else Pn.e=Ke,Pn.r=+pt;return Pn}}(),At=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Ft=/^([^.]+)\.$/,Jt=/^\.([^.]+)$/,Pi=/^-?(Infinity|NaN)$/,xn=/^\s*\+(?=[\w.])|^\s+|\s+$/g,Se=function(ie,R,oe,we){var se,Ae=oe?R:R.replace(xn,"");if(Pi.test(Ae))ie.s=isNaN(Ae)?null:Ae<0?-1:1;else{if(!oe&&(Ae=Ae.replace(At,function(Ie,Pe,Be){return se=(Be=Be.toLowerCase())=="x"?16:Be=="b"?2:8,we&&we!=se?Ie:Pe}),we&&(se=we,Ae=Ae.replace(Ft,"$1").replace(Jt,"0.$1")),R!=Ae))return new We(Ae,se);if(We.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 We(this);return ie.s<0&&(ie.s=1),ie},St.comparedTo=function(ie,R){return E(this,new We(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 We(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 We(ie,R),An,fn)},St.dividedToIntegerBy=St.idiv=function(ie,R){return W(this,new We(ie,R),0,1)},St.exponentiatedBy=St.pow=function(ie,R){var oe,we,se,Ae,Ie,Pe,Be,Ke,qe=this;if((ie=new We(ie)).c&&!ie.isInteger())throw Error(g+"Exponent not an integer: "+yr(ie));if(R!=null&&(R=new We(R)),Ie=ie.e>14,!qe.c||!qe.c[0]||qe.c[0]==1&&!qe.e&&qe.c.length==1||!ie.c||!ie.c[0])return Ke=new We(Math.pow(+yr(qe),Ie?ie.s*(2-I(ie)):+yr(ie))),R?Ke.mod(R):Ke;if(Pe=ie.s<0,R){if(R.c?!R.c[0]:!R.s)return new We(NaN);(we=!Pe&&qe.isInteger()&&R.isInteger())&&(qe=qe.mod(R))}else{if(ie.e>9&&(qe.e>0||qe.e<-1||(qe.e==0?qe.c[0]>1||Ie&&qe.c[1]>=24e7:qe.c[0]<8e13||Ie&&qe.c[0]<=9999975e7)))return Ae=qe.s<0&&I(ie)?-0:0,qe.e>-1&&(Ae=1/Ae),new We(Pe?1/Ae:Ae);Ar&&(Ae=f(Ar/v+2))}for(Ie?(oe=new We(.5),Pe&&(ie.s=1),Be=I(ie)):Be=(se=Math.abs(+yr(ie)))%2,Ke=new We(si);;){if(Be){if(!(Ke=Ke.times(qe)).c)break;Ae?Ke.c.length>Ae&&(Ke.c.length=Ae):we&&(Ke=Ke.mod(R))}if(se){if((se=d(se/2))===0)break;Be=se%2}else if(ar(ie=ie.times(oe),ie.e+1,1),ie.e>14)Be=I(ie);else{if((se=+yr(ie))==0)break;Be=se%2}qe=qe.times(qe),Ae?qe.c&&qe.c.length>Ae&&(qe.c.length=Ae):we&&(qe=qe.mod(R))}return we?Ke:(Pe&&(Ke=si.div(Ke)),R?Ke.mod(R):Ae?ar(Ke,Ar,fn,void 0):Ke)},St.integerValue=function(ie){var R=new We(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 We(ie,R))===0},St.isFinite=function(){return!!this.c},St.isGreaterThan=St.gt=function(ie,R){return E(this,new We(ie,R))>0},St.isGreaterThanOrEqualTo=St.gte=function(ie,R){return(R=E(this,new We(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 We(ie,R))<0},St.isLessThanOrEqualTo=St.lte=function(ie,R){return(R=E(this,new We(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,Ie=this,Pe=Ie.s;if(R=(ie=new We(ie,R)).s,!Pe||!R)return new We(NaN);if(Pe!=R)return ie.s=-R,Ie.plus(ie);var Be=Ie.e/v,Ke=ie.e/v,qe=Ie.c,pt=ie.c;if(!Be||!Ke){if(!qe||!pt)return qe?(ie.s=-R,ie):new We(pt?Ie:NaN);if(!qe[0]||!pt[0])return pt[0]?(ie.s=-R,ie):new We(qe[0]?Ie:fn==3?-0:0)}if(Be=x(Be),Ke=x(Ke),qe=qe.slice(),Pe=Be-Ke){for((Ae=Pe<0)?(Pe=-Pe,se=qe):(Ke=Be,se=pt),se.reverse(),R=Pe;R--;se.push(0));se.reverse()}else for(we=(Ae=(Pe=qe.length)<(R=pt.length))?Pe:R,Pe=R=0;R<we;R++)if(qe[R]!=pt[R]){Ae=qe[R]<pt[R];break}if(Ae&&(se=qe,qe=pt,pt=se,ie.s=-ie.s),(R=(we=pt.length)-(oe=qe.length))>0)for(;R--;qe[oe++]=0);for(R=w-1;we>Pe;){if(qe[--we]<pt[we]){for(oe=we;oe&&!qe[--oe];qe[oe]=R);--qe[oe],qe[we]+=w}qe[we]-=pt[we]}for(;qe[0]==0;qe.splice(0,1),--Ke);return qe[0]?yn(ie,qe,Ke):(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 We(ie,R),!se.c||!ie.s||ie.c&&!ie.c[0]?new We(NaN):!ie.c||se.c&&!se.c[0]?new We(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,Ie,Pe,Be,Ke,qe,pt,rr,Wt,Jr,Pn,dn,Mr=this,Xr=Mr.c,Sr=(ie=new We(ie,R)).c;if(!(Xr&&Sr&&Xr[0]&&Sr[0]))return!Mr.s||!ie.s||Xr&&!Xr[0]&&!Sr||Sr&&!Sr[0]&&!Xr?ie.c=ie.e=ie.s=null:(ie.s*=Mr.s,Xr&&Sr?(ie.c=[0],ie.e=0):ie.c=ie.e=null),ie;for(we=x(Mr.e/v)+x(ie.e/v),ie.s*=Mr.s,(Be=Xr.length)<(pt=Sr.length)&&(Jr=Xr,Xr=Sr,Sr=Jr,se=Be,Be=pt,pt=se),se=Be+pt,Jr=[];se--;Jr.push(0));for(Pn=w,dn=b,se=pt;--se>=0;){for(oe=0,rr=Sr[se]%dn,Wt=Sr[se]/dn|0,Ae=se+(Ie=Be);Ae>se;)oe=((Ke=rr*(Ke=Xr[--Ie]%dn)+(Pe=Wt*Ke+(qe=Xr[Ie]/dn|0)*rr)%dn*dn+Jr[Ae]+oe)/Pn|0)+(Pe/dn|0)+Wt*qe,Jr[Ae--]=Ke%Pn;Jr[Ae]=oe}return oe?++we:Jr.splice(0,1),yn(ie,Jr,we)},St.negated=function(){var ie=new We(this);return ie.s=-ie.s||null,ie},St.plus=function(ie,R){var oe,we=this,se=we.s;if(R=(ie=new We(ie,R)).s,!se||!R)return new We(NaN);if(se!=R)return ie.s=-R,we.minus(ie);var Ae=we.e/v,Ie=ie.e/v,Pe=we.c,Be=ie.c;if(!Ae||!Ie){if(!Pe||!Be)return new We(se/0);if(!Pe[0]||!Be[0])return Be[0]?ie:new We(Pe[0]?we:0*se)}if(Ae=x(Ae),Ie=x(Ie),Pe=Pe.slice(),se=Ae-Ie){for(se>0?(Ie=Ae,oe=Be):(se=-se,oe=Pe),oe.reverse();se--;oe.push(0));oe.reverse()}for((se=Pe.length)-(R=Be.length)<0&&(oe=Be,Be=Pe,Pe=oe,R=se),se=0;R;)se=(Pe[--R]=Pe[R]+Be[R]+se)/w|0,Pe[R]=w===Pe[R]?0:Pe[R]%w;return se&&(Pe=[se].concat(Pe),++Ie),yn(ie,Pe,Ie)},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 We(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,Ie=Ae.c,Pe=Ae.s,Be=Ae.e,Ke=An+4,qe=new We("0.5");if(Pe!==1||!Ie||!Ie[0])return new We(!Pe||Pe<0&&(!Ie||Ie[0])?NaN:Ie?Ae:1/0);if((Pe=Math.sqrt(+yr(Ae)))==0||Pe==1/0?(((R=O(Ie)).length+Be)%2==0&&(R+="0"),Pe=Math.sqrt(+R),Be=x((Be+1)/2)-(Be<0||Be%2),oe=new We(R=Pe==1/0?"5e"+Be:(R=Pe.toExponential()).slice(0,R.indexOf("e")+1)+Be)):oe=new We(Pe+""),oe.c[0]){for((Pe=(Be=oe.e)+Ke)<3&&(Pe=0);;)if(se=oe,oe=qe.times(se.plus(W(Ae,se,Ke,1))),O(se.c).slice(0,Pe)===(R=O(oe.c)).slice(0,Pe)){if(oe.e<Be&&--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}Ke+=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,Ie=we.split("."),Pe=+oe.groupSize,Be=+oe.secondaryGroupSize,Ke=oe.groupSeparator||"",qe=Ie[0],pt=Ie[1],rr=se.s<0,Wt=rr?qe.slice(1):qe,Jr=Wt.length;if(Be&&(Ae=Pe,Pe=Be,Be=Ae,Jr-=Ae),Pe>0&&Jr>0){for(Ae=Jr%Pe||Pe,qe=Wt.substr(0,Ae);Ae<Jr;Ae+=Pe)qe+=Ke+Wt.substr(Ae,Pe);Be>0&&(qe+=Ke+Wt.slice(Ae)),rr&&(qe="-"+qe)}we=pt?qe+(oe.decimalSeparator||"")+((Be=+oe.fractionGroupSize)?pt.replace(new RegExp("\\d{"+Be+"}\\B","g"),"$&"+(oe.fractionGroupSeparator||"")):pt):qe}return(oe.prefix||"")+we+(oe.suffix||"")},St.toFraction=function(ie){var R,oe,we,se,Ae,Ie,Pe,Be,Ke,qe,pt,rr,Wt=this,Jr=Wt.c;if(ie!=null&&(!(Pe=new We(ie)).isInteger()&&(Pe.c||Pe.s!==1)||Pe.lt(si)))throw Error(g+"Argument "+(Pe.isInteger()?"out of range: ":"not an integer: ")+yr(Pe));if(!Jr)return new We(Wt);for(R=new We(si),Ke=oe=new We(si),we=Be=new We(si),rr=O(Jr),Ae=R.e=rr.length-Wt.e-1,R.c[0]=_[(Ie=Ae%v)<0?v+Ie:Ie],ie=!ie||Pe.comparedTo(R)>0?Ae>0?R:Ke:Pe,Ie=mi,mi=1/0,Pe=new We(rr),Be.c[0]=0;qe=W(Pe,R,0,1),(se=oe.plus(qe.times(we))).comparedTo(ie)!=1;)oe=we,we=se,Ke=Be.plus(qe.times(se=Ke)),Be=se,R=Pe.minus(qe.times(se=R)),Pe=se;return se=W(ie.minus(oe),we,0,1),Be=Be.plus(se.times(Ke)),oe=oe.plus(se.times(we)),Be.s=Ke.s=Wt.s,pt=W(Ke,we,Ae*=2,fn).minus(Wt).abs().comparedTo(W(Be,oe,Ae,fn).minus(Wt).abs())<1?[Ke,we]:[Be,oe],mi=Ie,pt},St.toNumber=function(){return+yr(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<=yi||se>=ho?C(O(oe.c),se):L(O(oe.c),se,"0"):ie===10&&it?R=L(O((oe=ar(new We(oe),An+se+1,fn)).c),oe.e,"0"):(p(ie,2,ke.length,"Base"),R=he(L(O(oe.c),se,"0"),10,ie,we,!0)),we<0&&oe.c[0]&&(R="-"+R)),R},St.valueOf=St.toJSON=function(){return yr(this)},St._isBigNumber=!0,St[Symbol.toStringTag]="BigNumber",St[Symbol.for("nodejs.util.inspect.custom")]=St.valueOf,D!=null&&We.set(D),We}();const le={ROUNDING_MODE:q.ROUND_DOWN};function pe(P){return new TextEncoder().encode(P)}function B(P){return typeof P=="string"?B(F(P)):new TextDecoder().decode(P)}q.config(le);const U="UNKNOWN_ERROR",K="INVALID_ARGUMENT";function ne(P,D=U,W={}){const he=[];Object.keys(W).forEach(rt=>{try{he.push(rt+"="+JSON.stringify(W[rt]))}catch{he.push(rt+"="+JSON.stringify(W[rt].toString()))}});const Se=P;he.length&&(P+=" ("+he.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 F(P){if(typeof P!="string")throw new Error("hexToBytes only accept strings, got: "+typeof P);if(P.substr(0,2)==="0x")return F(P.substr(2));const D=new Uint8Array(Math.ceil(P.length/2));let W=0;for(let he=0;he<P.length;he+=2){const Se=parseInt(P.substr(he,2),16);if(isNaN(Se))throw new Error("Cannot read hex string:"+JSON.stringify(P));D[W]=Se,W++}return D}function j(P){return Array.from(P).map(D=>D.toString(16).padStart(2,"0")).join("")}function z(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 he=F(W);return c.keccak256(he)}return c.keccak256(pe(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 k(P){let D="",W=0;const he=P.length;for(P.substring(0,2)==="0x"&&(W=2);W<he;W+=2){const Se=parseInt(P.substr(W,2),16);D+=String.fromCharCode(Se)}return D}function M(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 he=0;for(const Se of P)W.set(Se,he),he+=Se.length;return W}function ge(P,D){const W=[];return D.forEach(function(he){if(typeof he.components=="object"){if(he.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let Se="";const Ce=he.type.indexOf("[");Ce>=0&&(Se=he.type.substring(Ce));const rt=ge(P,he.components);nr(rt)&&P?W.push("tuple("+rt.join(",")+")"+Se):P?W.push("("+rt+")"):W.push("("+rt.join(",")+")"+Se)}else W.push(he.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 ce(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 ze(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"+j(pe(P));if(P instanceof Uint8Array)return"0x"+j(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 j(pe(D))}if(P instanceof Uint8Array)return"0x"+j(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 q(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 q(j(D),16):new q(D,10):new q(D.replace("0x","").toLowerCase(),16))}function wr(P){return new q(new Array(P).fill("1").join(""),2)}function Rt(P,D=256){const W=Yt(P).integerValue();return W.isLessThan(0)?wr(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=wr(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))||zt(P))}function zt(P){const D=P.replace("0x",""),W=z(D.toLowerCase());for(let he=0;he<40;he++)if(parseInt(W[he],16)>7&&D[he].toUpperCase()!==D[he]||parseInt(W[he],16)<=7&&D[he].toLowerCase()!==D[he])return!1;return!0}function $t(P){if(P===void 0)return"";const D=P.toLowerCase().replace("0x",""),W=z(D);let he="0x";for(let Se=0;Se<D.length;Se++)parseInt(W[Se],16)>7?he+=D[Se].toUpperCase():he+=D[Se];return he}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 q}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 mr,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,(mr=r.TransactionStatus||(r.TransactionStatus={})).pending="pending",mr.confirmed="confirmed",mr.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":xr(P)}function xr(P){return P==null?null:$n(P)?P:gt(P)}function $r(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 _r(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 He(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 He(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 he=0;he<P.length;he+=2)W.push(parseInt(P.substr(he,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 he=D[W];if(he<0||he>=256||parseInt(String(he))!==he)return!1}return!0}(P))return new Uint8Array(P);throw ne("invalid arrayify value",void 0,{arg:"value",value:P,type:typeof P})}function ue(P,D,W){Object.defineProperty(P,D,{enumerable:!0,value:W,writable:!1})}const Z=new q(-1),ye=new q(0),Me=new q(1),Le=new q("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function wt(P){return function(D,W){function he(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 he(rt);Ce.state.allowType=!1,Ce.type=Ot(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=Ot(Ce.type);const Ft=Ce;if(Ce=Ce.parent,!Ce)throw he(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=Ot(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=Ot(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 he(rt);Ce.type+=At,Ce.state.allowArray=!1,Ce.state.allowName=!1,Ce.state.readArray=!0;break;case"]":if(!Ce.state.readArray)throw he(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 he(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=Ot(Se.type),Se}(P,!0)}function Ot(P){return P.match(/^uint($|[^1-9])/)?P="uint256"+P.substring(4):P.match(/^int($|[^1-9])/)&&(P="int256"+P.substring(3)),P}const pr=new RegExp(/^bytes([0-9]*)$/),lr=new RegExp(/^(u?int)([0-9]*)$/),en=new RegExp(/^(.*)\[([0-9]*)\]$/),gr=function(P,D){const W=P.match(lr);return W&&parseInt(W[2])<=48?D.toNumber():D};class Er{constructor(D,W,he,Se="",Ce){this.coerceFunc=D,this.name=W,this.type=he,this.localName=Se,this.dynamic=Ce}}class on extends Er{constructor(D){super(D.coerceFunc,D.name,D.type,void 0,D.dynamic),ue(this,"coder",D)}encode(D){return this.coder.encode(D)}decode(D,W){return this.coder.decode(D,W)}}class sr extends Er{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 Lr(P,D){return new q(P.toString(2).substr(-D),2)}class gn extends Er{constructor(D,W,he,Se){const Ce=(he?"int":"uint")+8*W;super(D,Ce,Ce,Se,!1),this.size=W,this.signed=he}encode(D){try{let W=Yt(D);if(this.signed){let Se=Lr(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(Lr(Le,8*this.size)))throw new Error("out-of-bounds");W=Lr(Rt(W,8*this.size),8*this.size),this.signed&&(W=Rt(Nt(W,8*this.size),256));const he=H(Rt(W).toString(16),64);if(he.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 F(he)}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 he=32-this.size;let Se=new q(j(D.slice(W+he,W+32)),16);return Se=this.signed?Nt(Se,8*this.size):Lr(Se,8*this.size),{consumed:32,value:this.coerceFunc(this.name,Se)}}}const Ur=new gn(function(P,D){return D},32,!1,"none");class Zn extends Er{constructor(D,W,he){const Se="bytes"+W;super(D,Se,Se,he,!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 he=_t(D);if(he.length>this.length)throw new Error("incorrect data length");W.set(he)}catch(he){throw ne("invalid "+this.name+" value. Use hex strings or Uint8Array",K,{arg:this.localName,coderType:this.name,value:he.value||D,details:he.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 Si(P){const D=32*Math.ceil(P.length/32),W=new Uint8Array(D-P.length);return G(Ur.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 he=Ur.decode(P,D).value;try{he=he.toNumber()}catch(Se){throw Se("dynamic bytes count too large",K,{arg:W,coderType:"dynamicBytes",value:he.toString()})}if(P.length<D+32+he)throw ne("insufficient data for dynamicBytes type",K,{arg:W,coderType:"dynamicBytes",value:gt(P.slice(D,D+32+he))});return{consumed:32+32*Math.ceil(he/32),value:P.slice(D+32,D+32+he)}}function Oi(P){return 32*Math.ceil(P/32)}function Ii(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 he=0,Se=0;W.forEach(function(Ft){Ft.dynamic?(he+=32,Se+=Oi(Ft.value.length)):he+=Oi(Ft.value.length)});let Ce=0,rt=he;const At=new Uint8Array(he+Se);return W.forEach(function(Ft){Ft.dynamic?(At.set(Ur.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 Fn extends Er{constructor(D,W,he,Se){super(D,"array",W.type+"["+(he>=0?he:"")+"]",Se,he===-1||W.dynamic),this.coder=W,this.length=he}encode(D){if(!Array.isArray(D))throw ne("expected array value",K,{arg:this.localName,coderType:"array",value:D});let W=this.length,he=new Uint8Array(0);W===-1&&(W=D.length,he=Ur.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(he,Ii(Se,D))}decode(D,W){let he=0,Se=this.length;if(Se===-1){let At;try{At=Ur.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()})}he+=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 Pi=Jt;let xn=0;const St=[];return At.forEach(function(si){let An;if(si.dynamic){const fn=Ur.decode(Ft,Jt);An=si.decode(Ft,Pi+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+=he,rt.value=this.coerceFunc(this.type,rt.value),rt}}class ra extends Er{constructor(D,W,he){let Se=!1;const Ce=[];W.forEach(function(rt){rt.dynamic&&(Se=!0),Ce.push(rt.type)}),super(D,"tuple","tuple("+Ce.join(",")+")",he,Se),this.coders=W}encode(D){return Ii(this.coders,D)}decode(D,W){const he=function(Se,Ce,rt){const At=rt;let Ft=0;const Jt=new oi;return Se.forEach(function(Pi){let xn;if(Pi.dynamic){const St=Ur.decode(Ce,rt);xn=Pi.decode(Ce,At+St.value.toNumber()),xn.consumed=St.consumed}else xn=Pi.decode(Ce,rt);xn.value!==void 0&&Jt.push(xn.value),rt+=xn.consumed,Ft+=xn.consumed}),Se.forEach(function(Pi,xn){let St=Pi.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 he.value=this.coerceFunc(this.type,he.value),he}}const $i={address:class extends Er{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(F(Xe(W)),12)}catch(he){throw ne(`invalid address (${he.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 Er{constructor(P,D){super(P,"bool","bool",D,!1)}encode(P){return Ur.encode(P?1:0)}decode(P,D){try{const W=Ur.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 Er{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 Si(pe(P))}decode(P,D){const W=ei(P,D,this.localName);return W.value=this.coerceFunc("string",B(W.value)),W}},bytes:class extends Er{constructor(P,D){super(P,"bytes","bytes",D,!0)}encode(P){try{return Si(_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 he=D.type.match(lr);if(he){const Se=parseInt(he[2]||"256");if(Se===0||Se>256||Se%8!=0)throw ne("invalid "+he[1]+" bit length",K,{arg:"param",value:D});return new gn(P,Se/8,he[1]==="int",D.name)}if(he=D.type.match(pr),he){const Se=parseInt(he[1]);if(Se===0||Se>32)throw ne("invalid bytes length",K,{arg:"param",value:D});return new Zn(P,Se,D.name)}if(he=D.type.match(en),he){const Se=Object.assign({},D),Ce=parseInt(he[2]||"-1");return Se.type=he[1],new Fn(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 as{constructor(D){(function(W,he){if(!(W instanceof he))throw ne("missing new","MISSING_NEW",{name:he.name})})(this,as),D||(D=gr),ue(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 he=D.map(Se=>typeof Se=="string"?wt(Se):Se).map(Se=>_a(this.coerceFunc,Se));return new ra(this.coerceFunc,he,"_").encode(W)}decode(D,W){const he=D.map(Se=>typeof Se=="string"?wt(Se):Se).map(Se=>_a(this.coerceFunc,Se));return new ra(this.coerceFunc,he,"_").decode(W,0).value}}const X=new as;var me,re;function Ee(P,D,W,he){var Se,Ce=arguments.length,rt=Ce<3?D:he===null?he=Object.getOwnPropertyDescriptor(D,W):he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")rt=Reflect.decorate(P,D,W,he);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 j(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,F("0x"+D.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class Oe{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,he=D.length,Se=this.params,new Error(`Invalid number of input parameters to RPC method "${W}" given: ${he}, expected: ${Se}`);var W,he,Se}formatInput(D){return this.inputFormatter?this.inputFormatter.map(function(W,he){return W?W(D[he]):D[he]}):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 he=this.toPayload(W);if(!D)throw new Error("Missing RequestManager in method#exec");const Se=await D.sendAsync(he);return this.formatOutput(Se)}}class Qe{constructor(D){this.getter=D.getter,this.outputFormatter=D.outputFormatter}formatOutput(D){return this.outputFormatter(D)}async execute(D,...W){const he=await D.sendAsync({method:this.getter,params:[]});return this.formatOutput(he)}}function ft(P){return new Promise(D=>setTimeout(D,P))}r.eth=void 0,(re=r.eth||(r.eth={})).eth_getBalance=new Oe({callName:"eth_getBalance",params:2,inputFormatter:[Xe,Kn],outputFormatter:Dn}),re.eth_getStorageAt=new Oe({callName:"eth_getStorageAt",params:3,inputFormatter:[Xe,gt,Kn],outputFormatter:ze}),re.eth_getCode=new Oe({callName:"eth_getCode",params:2,inputFormatter:[Xe,Kn],outputFormatter:ze}),re.eth_getBlockByHash=new Oe({callName:"eth_getBlockByHash",params:2,inputFormatter:[xr,function(P){return!!P}],outputFormatter:Re}),re.eth_getBlockByNumber=new Oe({callName:"eth_getBlockByNumber",params:2,inputFormatter:[xr,function(P){return!!P}],outputFormatter:Re}),re.eth_getUncleByBlockHashAndIndex=new Oe({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[xr,gt],outputFormatter:Re}),re.eth_getUncleByBlockNumberAndIndex=new Oe({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[xr,gt],outputFormatter:Re}),re.eth_getBlockTransactionCountByHash=new Oe({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[xr],outputFormatter:T}),re.eth_getBlockTransactionCountByNumber=new Oe({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[xr],outputFormatter:T}),re.eth_getUncleCountByBlockHash=new Oe({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[xr],outputFormatter:T}),re.eth_getUncleCountByBlockNumber=new Oe({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[xr],outputFormatter:T}),re.eth_getTransactionByHash=new Oe({callName:"eth_getTransactionByHash",params:1,inputFormatter:[_r],outputFormatter:ee}),re.eth_getTransactionByBlockHashAndIndex=new Oe({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[xr,gt],outputFormatter:ee}),re.eth_getTransactionByBlockNumberAndIndex=new Oe({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[xr,gt],outputFormatter:ee}),re.eth_getTransactionReceipt=new Oe({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[_r],outputFormatter:ve}),re.eth_getTransactionCount=new Oe({callName:"eth_getTransactionCount",params:2,inputFormatter:[Xe,Kn],outputFormatter:T}),re.eth_sendRawTransaction=new Oe({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:ze}),re.web3_sha3=new Oe({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:ze}),re.eth_sendTransaction=new Oe({callName:"eth_sendTransaction",params:1,inputFormatter:[_e],outputFormatter:ze}),re.eth_sign=new Oe({callName:"eth_sign",params:2,inputFormatter:[Xe,null],outputFormatter:ze}),re.eth_call=new Oe({callName:"eth_call",params:2,inputFormatter:[$r,Kn],outputFormatter:ze}),re.eth_estimateGas=new Oe({callName:"eth_estimateGas",params:1,inputFormatter:[$r],outputFormatter:T}),re.eth_submitWork=new Oe({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:mt}),re.eth_getWork=new Oe({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:Dt}),re.eth_coinbase=new Qe({getter:"eth_coinbase",outputFormatter:qt}),re.eth_mining=new Qe({getter:"eth_mining",outputFormatter:mt}),re.eth_hashrate=new Qe({getter:"eth_hashrate",outputFormatter:T}),re.eth_syncing=new Qe({getter:"eth_syncing",outputFormatter:lt}),re.eth_gasPrice=new Qe({getter:"eth_gasPrice",outputFormatter:Dn}),re.eth_accounts=new Qe({getter:"eth_accounts",outputFormatter:Dt}),re.eth_blockNumber=new Qe({getter:"eth_blockNumber",outputFormatter:T}),re.eth_protocolVersion=new Qe({getter:"eth_protocolVersion",outputFormatter:T}),re.web3_clientVersion=new Qe({getter:"web3_clientVersion",outputFormatter:fe}),re.net_version=new Qe({getter:"net_version",outputFormatter:fe}),re.shh_version=new Oe({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:T}),re.shh_post=new Oe({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:mt}),re.personal_newAccount=new Oe({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:qt}),re.personal_importRawKey=new Oe({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:qt}),re.personal_sign=new Oe({callName:"personal_sign",params:3,inputFormatter:[tt,Xe,null],outputFormatter:ze}),re.personal_ecRecover=new Oe({callName:"personal_ecRecover",params:2,inputFormatter:[tt,null],outputFormatter:qt}),re.personal_unlockAccount=new Oe({callName:"personal_unlockAccount",params:3,inputFormatter:[Xe,null,ce],outputFormatter:mt}),re.personal_sendTransaction=new Oe({callName:"personal_sendTransaction",params:2,inputFormatter:[_e,null],outputFormatter:ze}),re.personal_lockAccount=new Oe({callName:"personal_lockAccount",params:1,inputFormatter:[Xe],outputFormatter:mt}),re.personal_listAccounts=new Qe({getter:"personal_listAccounts",outputFormatter:Dt}),re.net_listening=new Qe({getter:"net_listening",outputFormatter:mt}),re.net_peerCount=new Qe({getter:"net_peerCount",outputFormatter:T}),re.eth_newFilter=new Oe({callName:"eth_newFilter",params:1,inputFormatter:[st],outputFormatter:gt}),re.eth_getLogs=new Oe({callName:"eth_getLogs",params:1,inputFormatter:[Dt],outputFormatter:Dt}),re.eth_newBlockFilter=new Oe({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:gt}),re.eth_newPendingTransactionFilter=new Oe({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:gt}),re.eth_uninstallFilter=new Oe({callName:"eth_uninstallFilter",params:1,inputFormatter:[gt],outputFormatter:mt}),re.eth_getFilterLogs=new Oe({callName:"eth_getFilterLogs",params:1,inputFormatter:[gt],outputFormatter:Dt}),re.eth_getFilterChanges=new Oe({callName:"eth_getFilterChanges",params:1,inputFormatter:[gt],outputFormatter:Dt}),re.eth_submitHashrate=new Oe({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:mt}),re.shh_newIdentity=new Oe({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:ze}),re.shh_hasIdentity=new Oe({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:mt}),re.shh_newGroup=new Oe({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:ze}),re.shh_addToGroup=new Oe({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:mt}),re.shh_newFilter=new Oe({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:gt}),re.shh_uninstallFilter=new Oe({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:mt}),re.shh_getLogs=new Oe({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:Dt}),re.shh_getFilterMessages=new Oe({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:Dt}),re.shh_getFilterChanges=new Oe({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:Dt}),re.shh_getMessages=new Oe({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:Dt});function Ye(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(...he){return W.execute(this,...he)}})}class Ve{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 he=Yr(D.method,D.params),Se=o();return this.requests.set(he.id,Se),W.sendAsync(he,(Ce,rt)=>{this.requests.delete(he.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 he=_r(D);if(await this.isTxDropped(he,W)){const Se=await this.getTransactionAndReceipt(he);return Object.assign(Object.assign({},Se),{status:r.TransactionStatus.failed})}for(;;){const Se=await this.getTransactionAndReceipt(he);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,he=null;const Se=_r(D);try{const rt=(await this.eth_accounts())[0];rt&&(he=await this.eth_getTransactionCount(rt,"latest"))}catch{he=null}try{if(W=await this.eth_getTransactionByHash(Se),W===null)return null}catch{return null}if(W.blockNumber===null){if(he!==null){if(W.nonce<he)return{hash:Se,type:r.TransactionType.replaced,nonce:W.nonce};if(W.nonce>he)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 he=W;for(;he>0;){if(await this.getTransactionAndReceipt(D)!==null)return!1;he-=1,await ft(2e3)}return!0}async getTransactionAndReceipt(D){D=_r(D);const[W,he]=await Promise.all([this.eth_getTransactionByHash(D),this.eth_getTransactionReceipt(D)]);return Object.assign(Object.assign({},W),{receipt:he})}isPending(D){return D&&D.blockNumber===null}isFailure(D){return D&&(!D.receipt||D.receipt.status===0)}}Ee([Ye,be("design:type",Function)],Ve.prototype,"web3_clientVersion",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"web3_sha3",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"net_version",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"net_peerCount",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"net_listening",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_protocolVersion",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_syncing",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_coinbase",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_mining",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_hashrate",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_gasPrice",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_accounts",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_blockNumber",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getBalance",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getStorageAt",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getTransactionCount",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getBlockTransactionCountByHash",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getBlockTransactionCountByNumber",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getUncleCountByBlockHash",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getUncleCountByBlockNumber",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getCode",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_sign",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_sendTransaction",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_sendRawTransaction",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_call",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_estimateGas",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getBlockByHash",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getBlockByNumber",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getTransactionByHash",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getTransactionReceipt",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_newFilter",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_newBlockFilter",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_newPendingTransactionFilter",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_uninstallFilter",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getFilterChanges",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getFilterLogs",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getLogs",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_getWork",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_submitWork",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"eth_submitHashrate",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"shh_post",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"shh_version",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"shh_newIdentity",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"shh_hasIdentity",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"shh_newGroup",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"shh_addToGroup",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"shh_newFilter",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"shh_uninstallFilter",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"shh_getFilterChanges",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"shh_getMessages",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"personal_unlockAccount",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"personal_newAccount",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"personal_listAccounts",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"personal_lockAccount",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"personal_importRawKey",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"personal_sendTransaction",void 0),Ee([Ye,be("design:type",Function)],Ve.prototype,"personal_sign",void 0),Ee([Ye,be("design:type",Function)],Ve.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=M(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 he=W.length,Se=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${he}, expected: ${Se}`);var he,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 he=this.signature();let Se=r.coder.encodeParams(this._inputTypes,D);return Se.indexOf("0x")===0&&(Se=Se.substr(2)),W.data="0x"+he+Se,W}signature(){return z(this._name).slice(0,8)}unpackOutput(D){if(!D)return;const W=D.length>=2?D.slice(2):D,he=r.coder.decodeParams(this._outputTypes,W);return he.length===1?he[0]:he}async execute(D,W,...he){if(!D)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const Se=this.toPayload(he);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(he),Ce=this.toPayload(he);Ce.to=W;const rt=await D.eth_call(Ce,Se);return this.unpackOutput(rt)}}estimateGas(D,W,...he){if(!(D instanceof Ve))throw new Error("estimateGas needs to receive a RequestManager as first argument");const Se=this.toPayload(he);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(),he=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]=he),D[W][this.typeName()]=he}}function Vt(P){if(P==null)return null;const D=String(P).toString();return D.indexOf("0x")===0?D:j(pe(D))}class Tr{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(he=>{this.formatter?W.forEach(Se=>{he(this.formatter(Se))}):W.forEach(Se=>he(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 Tr{constructor(D,W,he=Se=>Se){super(D),this.requestManager=D,this.options=W,this.formatter=he,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(Se){return Vt(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"?xr(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?xr(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 Fr{constructor(D,W,he){this.requestManager=D,this.address=he,this._anonymous=!1,this._params=W.inputs||[],this._name=M(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 z(this._name)}encode(D={},W={}){const he={topics:[],address:this.address};W.fromBlock!==void 0&&(he.fromBlock=xr(W.fromBlock)||void 0),W.toBlock!==void 0&&(he.toBlock=xr(W.toBlock)||void 0),he.topics=he.topics||[],this._anonymous||he.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 he.topics=he.topics.concat(Se),he}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(""),he=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?he.shift():Ce.shift(),At},{});return Object.assign(Object.assign({},He(D)),{event:this.displayName(),address:D.address,args:rt})}async execute(D,W){const he=this.encode(D,W),Se=this.decode.bind(this);return new Wr(this.requestManager,he,Se)}attachToContract(D){const W=this.execute.bind(this),he=this.displayName();D.events[he]||(D.events[he]=W),D.events[he][this.typeName()]=this.execute.bind(this,D)}}class _n{constructor(D,W,he){this._requestManager=D,this._json=W,this._address=he}encode(D={}){const W={address:this._address};return D.fromBlock!==void 0&&(W.fromBlock=xr(D.fromBlock)||void 0),D.toBlock!==void 0&&(W.toBlock=xr(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):"",he=this._json.filter(function(Se){return W===z(M(Se))})[0];return he?new Fr(this._requestManager,he,this._address).decode(D):He(D)}async execute(D){const W=this.encode(D),he=this.decode.bind(this);return new Wr(this._requestManager,W,he)}getAllEventsFunction(){return this.execute.bind(this)}}class jr{constructor(D,W,he){var Se;this.requestManager=D,this.abi=W,this.address=he,this.events={},this.transactionHash=null,this.address=he,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 Fr(Ce.requestManager,Ft,Ce.address)}).forEach(function(Ft){Ft.attachToContract(Ce)}),At.getAllEventsFunction()}(this)}}r.AbstractFilter=Tr,r.BigNumber=q,r.Contract=jr,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 he=(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+=he,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,Pi){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(Pi).then(yi=>{yi&&yi.blockHash?xn.resolve(yi):setTimeout(si,1e3)},yi=>xn.reject(yi))};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 jr(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 he=this.options.fetch||globalThis.fetch;if(he===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),he(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=Oe,r.Property=Qe,r.RequestManager=Ve,r.SHHFilter=class extends Tr{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 Vt(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=Fr,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 he;if(P instanceof Array)he=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)}he=Se}he.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 he=W;this.lastChunk&&(he=this.lastChunk+he);let Se=null;try{Se=JSON.parse(he)}catch{return this.lastChunk=he,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 he=new Error("Error in web socket");he.data=W,this.timeout(he)},D.onclose=W=>{this.timeout(new Error(`Connection closed (${W&&W.reason||"Unknown reason"})`))},D.onmessage=W=>{const he=typeof W.data=="string"?W.data:"";this.debug&&console.log("RECV << "+W.data),this.parseResponse(he).forEach(Se=>{Se instanceof Array?Se.forEach(Ce=>this.processMessage(Ce)):this.processMessage(Se)})}}},r.bytesToHex=j,r.bytesToUtf8String=B,r.concatBytes=G,r.default=Ve,r.extractDisplayName=Q,r.extractTypeName=te,r.fromAscii=function(P,D=0){let W="";for(let he=0;he<P.length;he++){const Se=P.charCodeAt(he).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=F,r.inputAddressFormatter=Xe,r.inputBlockNumberFormatter=xr,r.inputCallFormatter=$r,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"+j(pe(D))}),P):null},r.inputTransactionFormatter=_e,r.inputTransactionId=_r,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=zt,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=He,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 k(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=z,r.signedIsNegative=Pt,r.stringToUtf8Bytes=pe,r.toAddress=qt,r.toArray=Dt,r.toAscii=k,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=ze,r.toDecimal=T,r.toHex=gt,r.toJsonRpcRequest=Yr,r.toNullDecimal=ce,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=M,Object.defineProperty(r,"__esModule",{value:!0})})})(x5,x5.exports);var EO=x5.exports,xO={};Object.defineProperty(xO,"__esModule",{value:!0});xO.SignatureValidator=void 0;const gHe=EO;async function yHe(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 gHe.ContractFactory(t,r).at(e)}xO.SignatureValidator=yHe;var eL={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AuthLink=t.AuthLinkType=t.AuthChain=void 0;const e=Ml;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}})})(eL);var AO={};Object.defineProperty(AO,"__esModule",{value:!0});AO.moveMinutes=void 0;function mHe(t){const e=new Date;return e.setMinutes(e.getMinutes()+t),e}AO.moveMinutes=mHe;var tL={};Object.defineProperty(tL,"__esModule",{value:!0});const Hv=EO;class vHe{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,Hv.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,Hv.toBigNumber)(n.number).toNumber(),timestamp:(0,Hv.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,Hv.toBigNumber)(e==="latest"?await this.requestManager.eth_blockNumber():e).toNumber(),timestamp:(0,Hv.toBigNumber)(r).toNumber()},this.requests++,this.savedBlocks[e.toString()]}}tL.default=vHe;var ka={},rL={},ice={},ga={};Object.defineProperty(ga,"__esModule",{value:!0});ga.output=ga.exists=ga.hash=ga.bytes=ga.bool=ga.number=void 0;function XA(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}ga.number=XA;function ace(t){if(typeof t!="boolean")throw new Error(`Expected boolean, not ${t}`)}ga.bool=ace;function nL(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=nL;function oce(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");XA(t.outputLen),XA(t.blockLen)}ga.hash=oce;function sce(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=sce;function cce(t,e){nL(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}ga.output=cce;const bHe={number:XA,bool:ace,bytes:nL,hash:oce,exists:sce,output:cce};ga.default=bHe;var Cy={},SO={};Object.defineProperty(SO,"__esModule",{value:!0});SO.crypto=void 0;SO.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=SO,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,O)=>x<<32-O|x>>>O;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,O)=>O.toString(16).padStart(2,"0"));function s(x){if(!(x instanceof Uint8Array))throw new Error("Uint8Array expected");let O="";for(let E=0;E<x.length;E++)O+=o[x[E]];return O}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 O=new Uint8Array(x.length/2);for(let E=0;E<O.length;E++){const p=E*2,I=x.slice(p,p+2),C=Number.parseInt(I,16);if(Number.isNaN(C)||C<0)throw new Error("Invalid byte sequence");O[E]=C}return O}t.hexToBytes=c;const u=async()=>{};t.nextTick=u;async function f(x,O,E){let p=Date.now();for(let I=0;I<x;I++){E(I);const C=Date.now()-p;C>=0&&C<O||(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 O=x.reduce((p,I)=>p+I.length,0),E=new Uint8Array(O);for(let p=0,I=0;p<x.length;p++){const C=x[p];E.set(C,I),I+=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,O){if(O!==void 0&&(typeof O!="object"||!v(O)))throw new TypeError("Options should be object or undefined");return Object.assign(x,O)}t.checkOpts=y;function _(x){const O=p=>x().update(g(p)).digest(),E=x();return O.outputLen=E.outputLen,O.blockLen=E.blockLen,O.create=()=>x(),O}t.wrapConstructor=_;function b(x){const O=(p,I)=>x(I).update(g(p)).digest(),E=x({});return O.outputLen=E.outputLen,O.blockLen=E.blockLen,O.create=p=>x(p),O}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})(Cy);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;const e=ga,r=Cy;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)})(ice);var fp={},OO={};Object.defineProperty(OO,"__esModule",{value:!0});OO.SHA2=void 0;const VN=ga,zv=Cy;function wHe(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 _He extends zv.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,zv.createView)(this.buffer)}update(e){VN.default.exists(this);const{view:r,buffer:n,blockLen:i}=this;e=(0,zv.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,zv.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){VN.default.exists(this),VN.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;wHe(n,i-8,BigInt(this.length*8),a),this.process(n,0);const s=(0,zv.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}}OO.SHA2=_He;Object.defineProperty(fp,"__esModule",{value:!0});fp.sha224=fp.sha256=void 0;const EHe=OO,Es=Cy,xHe=(t,e,r)=>t&e^~t&r,AHe=(t,e,r)=>t&e^t&r^e&r,SHe=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]),hf=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),pf=new Uint32Array(64);class uce extends EHe.SHA2{constructor(){super(64,32,8,!1),this.A=hf[0]|0,this.B=hf[1]|0,this.C=hf[2]|0,this.D=hf[3]|0,this.E=hf[4]|0,this.F=hf[5]|0,this.G=hf[6]|0,this.H=hf[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)pf[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const g=pf[d-15],m=pf[d-2],w=(0,Es.rotr)(g,7)^(0,Es.rotr)(g,18)^g>>>3,v=(0,Es.rotr)(m,17)^(0,Es.rotr)(m,19)^m>>>10;pf[d]=v+pf[d-7]+w+pf[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,Es.rotr)(s,6)^(0,Es.rotr)(s,11)^(0,Es.rotr)(s,25),m=f+g+xHe(s,c,u)+SHe[d]+pf[d]|0,v=((0,Es.rotr)(n,2)^(0,Es.rotr)(n,13)^(0,Es.rotr)(n,22))+AHe(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(){pf.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class OHe extends uce{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}}fp.sha256=(0,Es.wrapConstructor)(()=>new uce);fp.sha224=(0,Es.wrapConstructor)(()=>new OHe);var A5={};(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=X$,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"),He=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Xe=ve,st=BigInt("0x100000000000000000000000000000000"),lt=c(Xe*_e,ee),_t=c(-Re*_e,ee);let ue=k(_e-lt*ve-_t*He,ee),Z=k(-lt*Re-_t*Xe,ee);const ye=ue>st,Me=Z>st;if(ye&&(ue=ee-ue),Me&&(Z=ee-Z),ue>st||Z>st)throw new Error("splitScalarEndo: Endomorphism failed, k="+_e);return{k1neg:ye,k1:ue,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=k(_e*_e),He=k(Re*_e);return k(He+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,He)=>Re.toAffine(ve[He]))}static normalizeZ(ee){return S.toAffineBatch(ee).map(S.fromAffine)}equals(ee){b(ee);const{x:ve,y:Re,z:He}=this,{x:Xe,y:st,z:lt}=ee,_t=k(He*He),ue=k(lt*lt),Z=k(ve*ue),ye=k(Xe*_t),Me=k(k(Re*lt)*ue),Le=k(k(st*He)*_t);return Z===ye&&Me===Le}negate(){return new S(this.x,k(-this.y),this.z)}double(){const{x:ee,y:ve,z:Re}=this,He=k(ee*ee),Xe=k(ve*ve),st=k(Xe*Xe),lt=ee+Xe,_t=k(i*(k(lt*lt)-He-st)),ue=k(a*He),Z=k(ue*ue),ye=k(Z-i*_t),Me=k(ue*(_t-ye)-o*st),Le=k(i*ve*Re);return new S(ye,Me,Le)}add(ee){b(ee);const{x:ve,y:Re,z:He}=this,{x:Xe,y:st,z:lt}=ee;if(Xe===r||st===r)return this;if(ve===r||Re===r)return ee;const _t=k(He*He),ue=k(lt*lt),Z=k(ve*ue),ye=k(Xe*_t),Me=k(k(Re*lt)*ue),Le=k(k(st*He)*_t),wt=k(ye-Z),Ot=k(Le-Me);if(wt===r)return Ot===r?this.double():S.ZERO;const pr=k(wt*wt),lr=k(wt*pr),en=k(Z*pr),gr=k(Ot*Ot-lr-i*en),Er=k(Ot*(en-gr)-Me*lr),on=k(He*lt*wt);return new S(gr,Er,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:He,k1:Xe,k2neg:st,k2:lt}=u.splitScalar(Re),_t=ve,ue=ve,Z=this;for(;Xe>r||lt>r;)Xe&n&&(_t=_t.add(Z)),lt&n&&(ue=ue.add(Z)),Z=Z.double(),Xe>>=n,lt>>=n;return He&&(_t=_t.negate()),st&&(ue=ue.negate()),ue=new S(k(ue.x*u.beta),ue.y,ue.z),_t.add(ue)}precomputeWindow(ee){const ve=y?128/ee+1:256/ee+1,Re=[];let He=this,Xe=He;for(let st=0;st<ve;st++){Xe=He,Re.push(Xe);for(let lt=1;lt<2**(ee-1);lt++)Xe=Xe.add(He),Re.push(Xe);He=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 He=ve&&O.get(ve);He||(He=this.precomputeWindow(Re),ve&&Re!==1&&(He=S.normalizeZ(He),O.set(ve,He)));let Xe=S.ZERO,st=S.BASE;const lt=1+(y?128/Re:256/Re),_t=2**(Re-1),ue=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&ue);ee>>=ye,wt>_t&&(wt-=Z,ee+=n);const Ot=Le,pr=Le+Math.abs(wt)-1,lr=Me%2!==0,en=wt<0;wt===0?st=st.add(x(lr,He[Ot])):Xe=Xe.add(x(en,He[pr]))}return{p:Xe,f:st}}multiply(ee,ve){let Re=H(ee),He,Xe;if(y){const{k1neg:st,k1:lt,k2neg:_t,k2:ue}=u.splitScalar(Re);let{p:Z,f:ye}=this.wNAF(lt,ve),{p:Me,f:Le}=this.wNAF(ue,ve);Z=x(st,Z),Me=x(_t,Me),Me=new S(k(Me.x*u.beta),Me.y,Me.z),He=Z.add(Me),Xe=ye.add(Le)}else{const{p:st,f:lt}=this.wNAF(Re,ve);He=st,Xe=lt}return S.normalizeZ([He,Xe])[0]}toAffine(ee){const{x:ve,y:Re,z:He}=this,Xe=this.equals(S.ZERO);ee==null&&(ee=Xe?o:ge(He));const st=ee,lt=k(st*st),_t=k(lt*st),ue=k(ve*lt),Z=k(Re*_t),ye=k(He*st);if(Xe)return E.ZERO;if(ye!==n)throw new Error("invZ was invalid");return new E(ue,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 O=new WeakMap;class E{constructor(ee,ve){this.x=ee,this.y=ve}_setWindowSize(ee){this._WINDOW_SIZE=ee,O.delete(this)}hasEvenY(){return this.y%i===r}static fromCompressedHex(ee){const ve=ee.length===32,Re=z(ve?ee:ee.subarray(1));if(!mt(Re))throw new Error("Point is not on curve");const He=v(Re);let Xe=G(He);const st=(Xe&n)===n;ve?st&&(Xe=k(-Xe)):(ee[0]&1)===1!==st&&(Xe=k(-Xe));const lt=new E(Re,Xe);return lt.assertValidity(),lt}static fromUncompressedHex(ee){const ve=z(ee.subarray(1,f+1)),Re=z(ee.subarray(f+1,f*2+1)),He=new E(ve,Re);return He.assertValidity(),He}static fromHex(ee){const ve=$(ee),Re=ve.length,He=ve[0];if(Re===f)return this.fromCompressedHex(ve);if(Re===m&&(He===2||He===3))return this.fromCompressedHex(ve);if(Re===w&&He===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:He,s:Xe}=Yt(ve);if(![0,1,2,3].includes(Re))throw new Error("Cannot recover: invalid recovery bit");const st=ce($(ee)),{n:lt}=s,_t=Re===2||Re===3?He+lt:He,ue=ge(_t,lt),Z=k(-st*ue,lt),ye=k(Xe*ue,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 j(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 He=k(Re*Re),Xe=v(ve);if(k(He-Xe)!==r)throw new Error(ee)}equals(ee){return this.x===ee.x&&this.y===ee.y}negate(){return new E(this.x,k(-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 He=S.fromAffine(this),Xe=ve===r||ve===n||this!==E.BASE?He.multiplyUnsafe(ve):He.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 I(_e){if(_e.length<2||_e[0]!==2)throw new Error(`Invalid signature integer tag: ${pe(_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:z(ve),left:_e.subarray(ee+2)}}function C(_e){if(_e.length<2||_e[0]!=48)throw new Error(`Invalid signature tag: ${pe(_e)}`);if(_e[1]!==_e.length-2)throw new Error("Invalid signature: incorrect length");const{data:ee,left:ve}=I(_e.subarray(2)),{data:Re,left:He}=I(ve);if(He.length)throw new Error(`Invalid signature: left bytes after parsing: ${pe(He)}`);return{r:ee,s:Re}}class L{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 He=ve?pe(ee):ee;if(He.length!==128)throw new Error(`${Re}: Expected 64-byte hex`);return new L(F(He.slice(0,64)),F(He.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:He}=C(ve?ee:j(ee));return new L(Re,He)}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 L(this.r,k(-this.s,s.n)):this}toDERRawBytes(){return j(this.toDERHex())}toDERHex(){const ee=p(ne(this.s)),ve=p(ne(this.r)),Re=ee.length/2,He=ve.length/2,Xe=ne(Re),st=ne(He);return`30${ne(He+Re+4)}02${st}${ve}02${Xe}${ee}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return j(this.toCompactHex())}toCompactHex(){return U(this.r)+U(this.s)}}t.Signature=L;function q(..._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,He)=>Re+He.length,0),ve=new Uint8Array(ee);for(let Re=0,He=0;Re<_e.length;Re++){const Xe=_e[Re];ve.set(Xe,He),He+=Xe.length}return ve}const le=Array.from({length:256},(_e,ee)=>ee.toString(16).padStart(2,"0"));function pe(_e){if(!(_e instanceof Uint8Array))throw new Error("Expected Uint8Array");let ee="";for(let ve=0;ve<_e.length;ve++)ee+=le[_e[ve]];return ee}const B=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function U(_e){if(typeof _e!="bigint")throw new Error("Expected bigint");if(!(r<=_e&&_e<B))throw new Error("Expected number 0 <= n < 2^256");return _e.toString(16).padStart(64,"0")}function K(_e){const ee=j(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 F(_e){if(typeof _e!="string")throw new TypeError("hexToNumber: expected string, got "+typeof _e);return BigInt(`0x${_e}`)}function j(_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,He=_e.slice(Re,Re+2),Xe=Number.parseInt(He,16);if(Number.isNaN(Xe)||Xe<0)throw new Error("Invalid byte sequence");ee[ve]=Xe}return ee}function z(_e){return F(pe(_e))}function $(_e){return _e instanceof Uint8Array?Uint8Array.from(_e):j(_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 k(_e,ee=s.P){const ve=_e%ee;return ve>=r?ve:ee+ve}function M(_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),He=BigInt(22),Xe=BigInt(23),st=BigInt(44),lt=BigInt(88),_t=_e*_e*_e%ee,ue=_t*_t*_e%ee,Z=M(ue,a)*ue%ee,ye=M(Z,a)*ue%ee,Me=M(ye,i)*_t%ee,Le=M(Me,Re)*Me%ee,wt=M(Le,He)*Le%ee,Ot=M(wt,st)*wt%ee,pr=M(Ot,lt)*Ot%ee,lr=M(pr,st)*wt%ee,en=M(lr,a)*ue%ee,gr=M(en,Xe)*Le%ee,Er=M(gr,ve)*_t%ee,on=M(Er,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=k(_e,ee),Re=ee,He=r,Xe=n;for(;ve!==r;){const lt=Re/ve,_t=Re%ve,ue=He-Xe*lt;Re=ve,ve=_t,He=Xe,Xe=ue}if(Re!==n)throw new Error("invert: does not exist");return k(He,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,k(Xe*st,ee)),n),He=ge(Re,ee);return _e.reduceRight((Xe,st,lt)=>st===r?Xe:(ve[lt]=k(Xe*ve[lt],ee),k(Xe*st,ee)),He),ve}function te(_e){const ee=_e.length*8-d*8,ve=z(_e);return ee>0?ve>>BigInt(ee):ve}function ce(_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 ze{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 q(...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 q(...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:He}=s,Xe=ce(_e,!0);if(!tt(Xe))return;const st=ge(Xe,He),lt=E.BASE.multiply(Xe),_t=k(lt.x,He);if(_t===r)return;const ue=k(st*k(ee+ve*_t,He),He);if(ue===r)return;let Z=new L(_t,ue),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=F(_e)}else if(_e instanceof Uint8Array){if(_e.length!==d)throw new Error("Expected 32 bytes of private key");ee=z(_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 L)return _e.assertValidity(),_e;try{return L.fromDER(_e)}catch{return L.fromCompact(_e)}}function wr(_e,ee=!1){return E.fromPrivateKey(_e).toRawBytes(ee)}t.getPublicKey=wr;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 z(ee)}function Kt(_e){const ee=Nt(_e),ve=k(ee,s.n);return Ut(ve<r?ee:ve)}function Ut(_e){return K(_e)}function zt(_e,ee,ve){if(_e==null)throw new Error(`sign: expected valid message hash, not "${_e}"`);const Re=$(_e),He=gt(ee),Xe=[Ut(He),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=q(...Xe),lt=Nt(Re);return{seed:st,m:lt,d:He}}function $t(_e,ee){const{sig:ve,recovery:Re}=_e,{der:He,recovered:Xe}=Object.assign({canonical:!0,der:!0},ee),st=He?ve.toDERRawBytes():ve.toCompactRawBytes();return Xe?[st,Re]:st}async function Dt(_e,ee,ve={}){const{seed:Re,m:He,d:Xe}=zt(_e,ee,ve.extraEntropy),st=new ze(g,d);await st.reseed(Re);let lt;for(;!(lt=vt(await st.generate(),He,Xe,ve.canonical));)await st.reseed();return $t(lt,ve)}t.sign=Dt;function qt(_e,ee,ve={}){const{seed:Re,m:He,d:Xe}=zt(_e,ee,ve.extraEntropy),st=new ze(g,d);st.reseedSync(Re);let lt;for(;!(lt=vt(st.generateSync(),He,Xe,ve.canonical));)st.reseedSync();return $t(lt,ve)}t.signSync=qt;const Mt={strict:!0};function cr(_e,ee,ve,Re=Mt){let He;try{He=Yt(_e),ee=$(ee)}catch{return!1}const{r:Xe,s:st}=He;if(Re.strict&&He.hasHighS())return!1;const lt=ce(ee);let _t;try{_t=Lt(ve)}catch{return!1}const{n:ue}=s,Z=ge(st,ue),ye=k(lt*Z,ue),Me=k(Xe*Z,ue),Le=E.BASE.multiplyAndAddUnsafe(_t,ye,Me);return Le?k(Le.x,ue)===Xe:!1}t.verify=cr;function tr(_e){return k(z(_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=z(ve.subarray(0,32)),He=z(ve.subarray(32,64));return new ir(Re,He)}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 j(this.toHex())}}function nr(_e){return E.fromPrivateKey(_e).toRawX()}class mr{constructor(ee,ve,Re=t.utils.randomBytes()){if(ee==null)throw new TypeError(`sign: Expected valid message, not "${ee}"`);this.m=$(ee);const{x:He,scalar:Xe}=this.getScalar(gt(ve));if(this.px=He,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^z(ve))}finalizeNonce(ee){const ve=k(z(ee),s.n);if(ve===r)throw new Error("sign: Creation of signature failed. k is zero");const{point:Re,x:He,scalar:Xe}=this.getScalar(ve);return{R:Re,rx:He,k:Xe}}finalizeSig(ee,ve,Re,He){return new ir(ee.x,k(ve+Re*He,s.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:ee,d:ve,px:Re,rand:He}=this,Xe=t.utils.taggedHash,st=this.initNonce(ve,await Xe($r.aux,He)),{R:lt,rx:_t,k:ue}=this.finalizeNonce(await Xe($r.nonce,st,Re,ee)),Z=tr(await Xe($r.challenge,_t,Re,ee)),ye=this.finalizeSig(lt,ue,Z,ve);return await $n(ye,ee,Re)||this.error(),ye}calcSync(){const{m:ee,d:ve,px:Re,rand:He}=this,Xe=t.utils.taggedHashSync,st=this.initNonce(ve,Xe($r.aux,He)),{R:lt,rx:_t,k:ue}=this.finalizeNonce(Xe($r.nonce,st,Re,ee)),Z=tr(Xe($r.challenge,_t,Re,ee)),ye=this.finalizeSig(lt,ue,Z,ve);return Kn(ye,ee,Re)||this.error(),ye}}async function wn(_e,ee,ve){return new mr(_e,ee,ve).calc()}function Yr(_e,ee,ve){return new mr(_e,ee,ve).calcSync()}function ai(_e,ee,ve){const Re=_e instanceof ir,He=Re?_e:ir.fromHex(_e);return Re&&He.assertValidity(),{...He,m:$(ee),P:Lt(ve)}}function Dn(_e,ee,ve,Re){const He=E.BASE.multiplyAndAddUnsafe(ee,gt(ve),k(-Re,s.n));return!(!He||!He.hasEvenY()||He.x!==_e)}async function $n(_e,ee,ve){try{const{r:Re,s:He,m:Xe,P:st}=ai(_e,ee,ve),lt=tr(await t.utils.taggedHash($r.challenge,K(Re),st.toRawX(),Xe));return Dn(Re,st,He,lt)}catch{return!1}}function Kn(_e,ee,ve){try{const{r:Re,s:He,m:Xe,P:st}=ai(_e,ee,ve),lt=tr(t.utils.taggedHashSync($r.challenge,K(Re),st.toRawX(),Xe));return Dn(Re,st,He,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 xr={node:e,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},$r={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},_r={};t.utils={bytesToHex:pe,hexToBytes:j,concatBytes:q,mod:k,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=k(z(_e),s.n-n)+n;return K(ve)},randomBytes:(_e=32)=>{if(xr.web)return xr.web.getRandomValues(new Uint8Array(_e));if(xr.node){const{randomBytes:ee}=xr.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(xr.web){const ee=await xr.web.subtle.digest("SHA-256",q(..._e));return new Uint8Array(ee)}else if(xr.node){const{createHash:ee}=xr.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(xr.web){const ve=await xr.web.subtle.importKey("raw",_e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),Re=q(...ee),He=await xr.web.subtle.sign("HMAC",ve,Re);return new Uint8Array(He)}else if(xr.node){const{createHmac:ve}=xr.node,Re=ve("sha256",_e);return ee.forEach(He=>Re.update(He)),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=_r[_e];if(ve===void 0){const Re=await t.utils.sha256(Uint8Array.from(_e,He=>He.charCodeAt(0)));ve=q(Re,Re),_r[_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=_r[_e];if(ve===void 0){const Re=T(Uint8Array.from(_e,He=>He.charCodeAt(0)));ve=q(Re,Re),_r[_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)}}})})(A5);(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=ice,r=fp,n=A5;var i=A5;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()}})(rL);var Nr={},ZA={exports:{}};ZA.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=Cy,a=n.default.bool;e.assertBool=a;const o=n.default.bytes;e.assertBytes=o;var s=Cy;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 o5=="function"&&o5.bind(t);return{node:m&&!g?m("crypto"):void 0,web:g}})()})(ZA,ZA.exports);var IHe=ZA.exports,PHe=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]}),THe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),RHe=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)&&PHe(e,t,r);return THe(e,t),e};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.contextRandomize=Nr.ecdh=Nr.signatureNormalize=Nr.signatureImport=Nr.signatureExport=Nr.privateKeyTweakMul=Nr.publicKeyTweakMul=Nr.publicKeyTweakAdd=Nr.publicKeyCombine=Nr.publicKeyNegate=Nr.privateKeyNegate=Nr.privateKeyTweakAdd=Nr.ecdsaVerify=Nr.ecdsaRecover=Nr.ecdsaSign=Nr.publicKeyConvert=Nr.publicKeyVerify=Nr.publicKeyCreate=Nr.privateKeyVerify=Nr.createPrivateKey=Nr.createPrivateKeySync=void 0;const CHe=fp,ti=RHe(rL),Rr=IHe;function NHe(t){if(typeof t!="string")throw new TypeError("hexToNumber: expected string, got "+typeof t);return BigInt(`0x${t}`)}const dd=t=>NHe((0,Rr.toHex)(t)),IO=t=>t.toString(16).padStart(64,"0"),S5=t=>(0,Rr.hexToBytes)(IO(t)),{mod:lce}=ti.utils,Pc=ti.CURVE.n;function Hs(t=n=>new Uint8Array(n),e,r){return typeof t=="function"&&(t=t(e)),(0,Rr.assertBytes)(t,e),r&&t.set(r),t}function C1(t){return(0,Rr.assertBytes)(t,64),ti.Signature.fromCompact(t)}function fce(){return ti.utils.randomPrivateKey()}Nr.createPrivateKeySync=fce;async function DHe(){return fce()}Nr.createPrivateKey=DHe;function $He(t){return(0,Rr.assertBytes)(t,32),ti.utils.isValidPrivateKey(t)}Nr.privateKeyVerify=$He;function MHe(t,e=!0,r){(0,Rr.assertBytes)(t,32),(0,Rr.assertBool)(e);const n=ti.getPublicKey(t,e);return Hs(r,e?33:65,n)}Nr.publicKeyCreate=MHe;function kHe(t){(0,Rr.assertBytes)(t,33,65);try{return ti.Point.fromHex(t),!0}catch{return!1}}Nr.publicKeyVerify=kHe;function LHe(t,e=!0,r){(0,Rr.assertBytes)(t,33,65),(0,Rr.assertBool)(e);const n=ti.Point.fromHex(t).toRawBytes(e);return Hs(r,e?33:65,n)}Nr.publicKeyConvert=LHe;function UHe(t,e,r={noncefn:void 0,data:void 0},n){if((0,Rr.assertBytes)(t,32),(0,Rr.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:Hs(n,64,i),recid:a}}Nr.ecdsaSign=UHe;function BHe(t,e,r,n=!0,i){(0,Rr.assertBytes)(r,32),(0,Rr.assertBool)(n);const a=C1(t).toHex(),o=ti.Point.fromSignature(r,a,e);return Hs(i,n?33:65,o.toRawBytes(n))}Nr.ecdsaRecover=BHe;function FHe(t,e,r){(0,Rr.assertBytes)(t,64),(0,Rr.assertBytes)(e,32),(0,Rr.assertBytes)(r,33,65),(0,Rr.assertBytes)(t,64);const n=dd(t.slice(0,32)),i=dd(t.slice(32,64));if(n>=Pc||i>=Pc)throw new Error("Cannot parse signature");const a=ti.Point.fromHex(r);let o;try{o=C1(t)}catch{return!1}return ti.verify(o,e,a)}Nr.ecdsaVerify=FHe;function jHe(t,e){(0,Rr.assertBytes)(t,32),(0,Rr.assertBytes)(e,32);let r=dd(e);if(r===0n)throw new Error("Tweak must not be zero");if(r>=Pc)throw new Error("Tweak bigger than curve order");if(r+=dd(t),r>=Pc&&(r-=Pc),r===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return t.set((0,Rr.hexToBytes)(IO(r))),t}Nr.privateKeyTweakAdd=jHe;function qHe(t){(0,Rr.assertBytes)(t,32);const e=lce(-dd(t),Pc);return t.set((0,Rr.hexToBytes)(IO(e))),t}Nr.privateKeyNegate=qHe;function HHe(t,e=!0,r){(0,Rr.assertBytes)(t,33,65),(0,Rr.assertBool)(e);const n=ti.Point.fromHex(t).negate();return Hs(r,e?33:65,n.toRawBytes(e))}Nr.publicKeyNegate=HHe;function zHe(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,Rr.assertBytes)(i,33,65);(0,Rr.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 Hs(r,e?33:65,n.toRawBytes(e))}Nr.publicKeyCombine=zHe;function VHe(t,e,r=!0,n){(0,Rr.assertBytes)(t,33,65),(0,Rr.assertBytes)(e,32),(0,Rr.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 Hs(n,r?33:65,o.toRawBytes(r))}Nr.publicKeyTweakAdd=VHe;function GHe(t,e,r=!0,n){(0,Rr.assertBytes)(t,33,65),(0,Rr.assertBytes)(e,32),(0,Rr.assertBool)(r);const i=dd(e);if(i===0n)throw new Error("Tweak must not be zero");if(i<=1||i>=Pc)throw new Error("Tweak is zero or bigger than curve order");const a=ti.Point.fromHex(t).multiply(i);return Hs(n,r?33:65,a.toRawBytes(r))}Nr.publicKeyTweakMul=GHe;function WHe(t,e){(0,Rr.assertBytes)(t,32),(0,Rr.assertBytes)(e,32);const r=dd(e);if(r<=1||r>=Pc)throw new Error("Tweak is zero or bigger than curve order");const n=lce(r*dd(t),Pc);if(n===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return t.set((0,Rr.hexToBytes)(IO(n))),t}Nr.privateKeyTweakMul=WHe;function KHe(t,e){const r=C1(t).toRawBytes();return Hs(e,72,C1(t).toRawBytes()).slice(0,r.length)}Nr.signatureExport=KHe;function YHe(t,e){(0,Rr.assertBytes)(t);const r=ti.Signature.fromDER(t);return Hs(e,64,(0,Rr.hexToBytes)(r.toCompactHex()))}Nr.signatureImport=YHe;function QHe(t){const e=C1(t);return e.s>Pc/2n&&t.set(S5(Pc-e.s),32),t}Nr.signatureNormalize=QHe;function JHe(t,e,r={},n){if((0,Rr.assertBytes)(t,33,65),(0,Rr.assertBytes)(e,32),typeof r!="object"||r===null)throw new TypeError("secp256k1.ecdh: options should be object");r.data!==void 0&&(0,Rr.assertBytes)(r.data);const i=ti.Point.fromHex(ti.getSharedSecret(e,t));if(r.hashfn===void 0)return Hs(n,32,(0,CHe.sha256)(i.toRawBytes(!0)));if(typeof r.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");r.xbuf!==void 0&&(0,Rr.assertBytes)(r.xbuf,32),r.ybuf!==void 0&&(0,Rr.assertBytes)(r.ybuf,32),(0,Rr.assertBytes)(n,32);const a=r.xbuf||new Uint8Array(32);a.set(S5(i.x));const o=r.ybuf||new Uint8Array(32);o.set(S5(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 Hs(n,32,s)}Nr.ecdh=JHe;function XHe(t){t!==null&&(0,Rr.assertBytes)(t,32)}Nr.contextRandomize=XHe;Object.defineProperty(ka,"__esModule",{value:!0});ka.createUnsafeIdentity=ka.computeAddress=ka.ethSign=ka.createEthereumMessageHash=ka.sign=ka.recoverAddressFromEthSignature=ka.recoverPublicKey=void 0;const Jo=EO,aQ=rL,dce=Nr;function hce(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,dce.ecdsaRecover)(r,n,e,!1).slice(1)}ka.recoverPublicKey=hce;function ZHe(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 pce(t,e){if(typeof t=="string"){if((0,Jo.isHex)(t))return pce((0,Jo.hexToBytes)(t),e);throw new Error("String signatures must be encoded in hex")}return aL(hce(ZHe(t),iL(e)))}ka.recoverAddressFromEthSignature=pce;function gce(t,e){const r=(0,dce.ecdsaSign)(e,t),n=r.recid===1?"1c":"1b";return(0,Jo.toHex)(r.signature)+n}ka.sign=gce;function iL(t){const e=typeof t=="string"?(0,Jo.stringToUtf8Bytes)(t):t,r=(0,Jo.concatBytes)((0,Jo.stringToUtf8Bytes)(`Ethereum Signed Message:
|
|
178
|
+
`),(0,Jo.stringToUtf8Bytes)(String(e.length)),e);return(0,Jo.hexToBytes)((0,Jo.sha3)(r))}ka.createEthereumMessageHash=iL;function eze(t,e){return gce(t,iL(e))}ka.ethSign=eze;function aL(t){const e=t.length===65&&t[0]===4?t.slice(1):t;return(0,Jo.getAddress)((0,Jo.sha3)(e).substring(24))}ka.computeAddress=aL;function tze(){const t=aQ.utils.randomPrivateKey(),e=(0,aQ.getPublicKey)(t).slice(1),r=aL(e);return{privateKey:(0,Jo.bytesToHex)(t),publicKey:(0,Jo.bytesToHex)(e),address:r}}ka.createUnsafeIdentity=tze;(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(C,L,q,le){le===void 0&&(le=q);var pe=Object.getOwnPropertyDescriptor(L,q);(!pe||("get"in pe?!L.__esModule:pe.writable||pe.configurable))&&(pe={enumerable:!0,get:function(){return L[q]}}),Object.defineProperty(C,le,pe)}:function(C,L,q,le){le===void 0&&(le=q),C[le]=L[q]}),r=Ne&&Ne.__setModuleDefault||(Object.create?function(C,L){Object.defineProperty(C,"default",{enumerable:!0,value:L})}:function(C,L){C.default=L}),n=Ne&&Ne.__importStar||function(C){if(C&&C.__esModule)return C;var L={};if(C!=null)for(var q in C)q!=="default"&&Object.prototype.hasOwnProperty.call(C,q)&&e(L,C,q);return r(L,C),L},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(EO),o=xO,s=eL,c=AO,u=i(tL),f=ka;t.VALID_SIGNATURE="VALID_SIGNATURE",t.ERC1654_MAGIC_VALUE="1626ba7e";const d=132;var g;(function(C){async function L(z,$,H,k=Date.now()){let M="";if(!C.isValidAuthChain($))return{ok:!1,message:"ERROR: Malformed authChain"};for(const ge of $){const Q=I(ge.type);try{const{nextAuthority:te}=await Q(M,ge,{provider:H,dateToValidateExpirationInMillis:k});M=te||""}catch(te){return{ok:!1,message:`ERROR. Link type: ${ge.type}. ${te.message}.`}}}const G=M===z;return{ok:G,message:G?void 0:`ERROR: Invalid final authority. Expected: ${z}. Current ${M}.`}}C.validateSignature=L;function q(z){for(const[$,H]of z.entries())if($===0&&H.type!==s.AuthLinkType.SIGNER||H.type===s.AuthLinkType.SIGNER&&$!==0)return!1;return!0}C.isValidAuthChain=q;function le(z){return(0,a.hexToBytes)((0,a.sha3)((0,a.stringToUtf8Bytes)(z)))}C.createEIP1271MessageHash=le;function pe(z,$,H){return[{type:s.AuthLinkType.SIGNER,payload:$,signature:""},{type:x(H),payload:z,signature:H}]}C.createSimpleAuthChain=pe;function B(z,$,H,k){const M=(0,c.moveMinutes)(H),G=C.getEphemeralMessage($.address,M),ge=C.createSignature(z,G),Q=C.createSignature($,k);return[{type:s.AuthLinkType.SIGNER,payload:z.address,signature:""},{type:s.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:G,signature:ge},{type:s.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:k,signature:Q}]}C.createAuthChain=B;async function U(z,$,H,k){const M=new Date;M.setMinutes(M.getMinutes()+H);const G=C.getEphemeralMessage($.address,M),ge=await k(G),Q=[{type:s.AuthLinkType.SIGNER,payload:z,signature:""},{type:S(ge),payload:G,signature:ge}];return{ephemeralIdentity:$,expiration:M,authChain:Q}}C.initializeAuthChain=U;function K(z,$){const H=C.createSignature(z.ephemeralIdentity,$);return[...z.authChain,{type:s.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:$,signature:H}]}C.signPayload=K,C.createEthereumMessageHash=f.createEthereumMessageHash;function ne(z,$){return(0,f.ethSign)((0,a.hexToBytes)(z.privateKey),$)}C.createSignature=ne;function F(z){return z.length>0&&z[0].type===s.AuthLinkType.SIGNER?z[0].payload:"Invalid-Owner-Address"}C.ownerAddress=F;function j(z,$){return`Decentraland Login
|
|
179
|
+
Ephemeral address: ${z}
|
|
180
|
+
Expiration: ${$.toISOString()}`}C.getEphemeralMessage=j})(g=t.Authenticator||(t.Authenticator={}));const m=async(C,L)=>({nextAuthority:L.payload});t.SIGNER_VALIDATOR=m;const w=async(C,L)=>{if(!L.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const q=(0,f.recoverAddressFromEthSignature)(L.signature,L.payload),le=C.toLocaleLowerCase(),pe=q.toLocaleLowerCase();if(le===pe)return{nextAuthority:L.payload};throw new Error(`Invalid signer address. Expected: ${le}. Actual: ${pe}`)};t.ECDSA_SIGNED_ENTITY_VALIDATOR=w;const v=async(C,L,q)=>{if(!L.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:le,ephemeralAddress:pe,expiration:B}=O(L.payload),U=q.dateToValidateExpirationInMillis?q.dateToValidateExpirationInMillis:Date.now();if(B>U){const K=(0,f.recoverAddressFromEthSignature)(L.signature,le),ne=C.toLocaleLowerCase(),F=K.toLocaleLowerCase();if(ne===F)return{nextAuthority:pe};throw new Error(`Invalid signer address. Expected: ${ne}. Actual: ${F}`)}throw new Error(`Ephemeral key expired. Expiration: ${B}. Test: ${U}`)};t.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=v;const y=async(C,L,q)=>{if(!L.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:le,ephemeralAddress:pe,expiration:B}=O(L.payload),U=q!=null&&q.dateToValidateExpirationInMillis?q==null?void 0:q.dateToValidateExpirationInMillis:Date.now();if(B>U&&await p(q.provider,C,le,L.signature,U))return{nextAuthority:pe};throw new Error(`Ephemeral key expired. Expiration: ${B}. Test: ${U}`)};t.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=y;const _=async(C,L,q)=>{if(!L.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await p(q.provider,C,L.payload,L.signature,q.dateToValidateExpirationInMillis))return{nextAuthority:L.payload};throw new Error("Invalid validation")};t.EIP_1654_SIGNED_ENTITY_VALIDATOR=_;const b=async(C,L)=>({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 O(C){const L=C.replace(/\r/g,""),q=L.split(`
|
|
181
|
+
`),le=q[1].substring(19),pe=q[2].substring(12),B=Date.parse(pe);return{message:L,ephemeralAddress:le,expiration:B}}t.parseEmphemeralPayload=O;async function E(C,L,q,le){const pe=g.createEIP1271MessageHash(L),B=(0,a.hexToBytes)(q);let U;try{U=(0,a.bytesToHex)(await C.isValidSignature(pe,B,le))}catch{}if(U===t.ERC1654_MAGIC_VALUE)return!0;const K=(0,f.createEthereumMessageHash)(L);try{U=(0,a.bytesToHex)(await C.isValidSignature(K,B,le))}catch{}return U===t.ERC1654_MAGIC_VALUE}t.isValidEIP1271Signature=E;async function p(C,L,q,le,pe){if(!C)throw new Error("Missing provider");const B=new a.default(C),U=await(0,o.SignatureValidator)(B,L);let K=await E(U,q,le);if(K)return!0;const ne=new u.default(B);try{const{block:F}=await ne.getDate(pe,!1);if(K=await E(U,q,le,F),K)return!0}catch(F){throw new Error(`Invalid validation. Error: ${F.message}`)}throw new Error(`Invalid validation. Expected: ${t.ERC1654_MAGIC_VALUE}. Actual: ${K}`)}function I(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}}})(nce);(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(nce,t),r(eL,t)})(rce);var O5={},pu={},I5={exports:{}},P5={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})(P5,P5.exports);var oL=P5.exports,T5={exports:{}},R5={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})(R5,R5.exports);var yce=R5.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=i(oL),n=i(yce);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})(T5,T5.exports);var rze=T5.exports,C5={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var r=n(oL);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})(C5,C5.exports);var nze=C5.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=_;var r=o(oL),n=o(rze),i=o(nze),a=o(yce);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,O=new Array(S);x<S;x++)O[x]=b[x];return O}function d(b,S){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(b)))){var x=[],O=!0,E=!1,p=void 0;try{for(var I=b[Symbol.iterator](),C;!(O=(C=I.next()).done)&&(x.push(C.value),!(S&&x.length===S));O=!0);}catch(L){E=!0,p=L}finally{try{!O&&I.return!=null&&I.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 O=S[x];if(b===O||v(O)&&O.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,O,E,p,I,C,L,q;if(L=b.split("#"),b=L.shift(),L=b.split("?"),b=L.shift(),L=b.split("://"),L.length>1){if(x=L.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;L[0]=b.slice(2)}}if(b=L.join("://"),b==="")return!1;if(L=b.split("/"),b=L.shift(),b===""&&!S.require_host)return!0;if(L=b.split("@"),L.length>1){if(S.disallow_auth||L[0]===""||(O=L.shift(),O.indexOf(":")>=0&&O.split(":").length>2))return!1;var le=O.split(":"),pe=s(le,2),B=pe[0],U=pe[1];if(B===""&&U==="")return!1}p=L.join("@"),C=null,q=null;var K=p.match(w);if(K?(E="",q=K[1],C=K[2]||null):(L=p.split(":"),E=L.shift(),L.length&&(C=L.join(":"))),C!==null&&C.length>0){if(I=parseInt(C,10),!/^[0-9]+$/.test(C)||I<=0||I>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)&&(!q||!(0,i.default)(q,6))||(E=E||q,S.host_blacklist&&y(E,S.host_blacklist)))}t.exports=e.default,t.exports.default=e.default})(I5,I5.exports);var ize=I5.exports,sL={};(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()}`}})(sL);Object.defineProperty(pu,"__esModule",{value:!0});pu.clearIdentity=pu.storeIdentity=pu.getIdentity=pu.init=void 0;const aze=ize,xu=sL,mce=xu.SINGLE_SIGN_ON_TARGET,oQ=500,oze=5;let sQ=0,e2="";const sze={protocols:["https"],require_protocol:!0};function cze(t,e={}){if(!(0,aze.default)(t,{...sze,...e}))throw new Error(`Invalid url: ${t}`);if(e2)throw new Error("Already initialized");const r=document.createElement("iframe");r.id=mce,r.src=t,r.style.width="0",r.style.height="0",r.style.border="none",r.style.position="absolute",document.body.appendChild(r),e2=t}pu.init=cze;async function uze(t){let e;try{e=(await PO(await cL(),xu.Action.GET,{user:t})).identity??null}catch(r){uL(r),e=(0,xu.localStorageGetIdentity)(t)}return e}pu.getIdentity=uze;async function lze(t,e){try{await PO(await cL(),xu.Action.STORE,{user:t,identity:e})}catch(r){uL(r),(0,xu.localStorageStoreIdentity)(t,e)}}pu.storeIdentity=lze;async function fze(t){try{await PO(await cL(),xu.Action.CLEAR,{user:t})}catch(e){uL(e),(0,xu.localStorageClearIdentity)(t)}}pu.clearIdentity=fze;async function cL(){if(!e2)throw new Error("Not initialized");for(let t=0;t<oze;t++){const e=document.getElementById(mce),r=e==null?void 0:e.contentWindow;if(!r){await dze(oQ);continue}try{await PO(r,xu.Action.PING,{},oQ)}catch{continue}return r}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function PO(t,e,r,n=0){sQ++;const i=sQ;let a=null;const o=new Promise((s,c)=>{a=({data:u})=>{!u||u.target!==xu.SINGLE_SIGN_ON_TARGET||u.id!==i||(u.error?c(new Error(u.error)):s(u))},window.addEventListener("message",a)});t.postMessage((0,xu.createMessage)({id:i,action:e,...r}),e2);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 dze(t){return new Promise(e=>setTimeout(e,t))}function uL(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(pu,t),r(sL,t)})(O5);var vce={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})()})(vce);var hze=vce.exports;const dp=Nc(hze);var pze=wS();const gze=Nc(pze),yze="https://cdn.decentraland.org/@dcl/auth-site/0.1.3-7386581352.commit-0ef8d7f/assets/logo-9a364aec.svg";var Vv={},GN,cQ;function mze(){if(cQ)return GN;cQ=1;var t=Mc(),e=vS();function r(n){return t(n)&&n.nodeType===1&&!e(n)}return GN=r,GN}var bce=Ge.createContext(),wce=Ge.createContext();function vze(t){var e=t.children,r=Ge.useState(null),n=r[0],i=r[1],a=Ge.useRef(!1);Ge.useEffect(function(){return function(){a.current=!0}},[]);var o=Ge.useCallback(function(s){a.current||i(s)},[]);return Ge.createElement(bce.Provider,{value:n},Ge.createElement(wce.Provider,{value:o},e))}var _ce=function(e){return Array.isArray(e)?e[0]:e},Ece=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)}},N5=function(e,r){if(typeof e=="function")return Ece(e,r);e!=null&&(e.current=r)},uQ=function(e){return e.reduce(function(r,n){var i=n[0],a=n[1];return r[i]=a,r},{})},lQ=typeof window<"u"&&window.document&&window.document.createElement?Ge.useLayoutEffect:Ge.useEffect,Mo="top",zs="bottom",Vs="right",ko="left",lL="auto",Bw=[Mo,zs,Vs,ko],Ny="start",N1="end",bze="clippingParents",xce="viewport",Gv="popper",wze="reference",fQ=Bw.reduce(function(t,e){return t.concat([e+"-"+Ny,e+"-"+N1])},[]),Ace=[].concat(Bw,[lL]).reduce(function(t,e){return t.concat([e,e+"-"+Ny,e+"-"+N1])},[]),_ze="beforeRead",Eze="read",xze="afterRead",Aze="beforeMain",Sze="main",Oze="afterMain",Ize="beforeWrite",Pze="write",Tze="afterWrite",Rze=[_ze,Eze,xze,Aze,Sze,Oze,Ize,Pze,Tze];function Au(t){return t?(t.nodeName||"").toLowerCase():null}function es(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function hp(t){var e=es(t).Element;return t instanceof e||t instanceof Element}function Bs(t){var e=es(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function fL(t){if(typeof ShadowRoot>"u")return!1;var e=es(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Cze(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];!Bs(a)||!Au(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 Nze(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},{});!Bs(i)||!Au(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(c){i.removeAttribute(c)}))})}}const Dze={name:"applyStyles",enabled:!0,phase:"write",fn:Cze,effect:Nze,requires:["computeStyles"]};function bu(t){return t.split("-")[0]}var Zh=Math.max,t2=Math.min,Dy=Math.round;function D5(){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 Sce(){return!/^((?!chrome|android).)*safari/i.test(D5())}function $y(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),i=1,a=1;e&&Bs(t)&&(i=t.offsetWidth>0&&Dy(n.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Dy(n.height)/t.offsetHeight||1);var o=hp(t)?es(t):window,s=o.visualViewport,c=!Sce()&&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 dL(t){var e=$y(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 Oce(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&fL(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function kl(t){return es(t).getComputedStyle(t)}function $ze(t){return["table","td","th"].indexOf(Au(t))>=0}function Td(t){return((hp(t)?t.ownerDocument:t.document)||window.document).documentElement}function TO(t){return Au(t)==="html"?t:t.assignedSlot||t.parentNode||(fL(t)?t.host:null)||Td(t)}function dQ(t){return!Bs(t)||kl(t).position==="fixed"?null:t.offsetParent}function Mze(t){var e=/firefox/i.test(D5()),r=/Trident/i.test(D5());if(r&&Bs(t)){var n=kl(t);if(n.position==="fixed")return null}var i=TO(t);for(fL(i)&&(i=i.host);Bs(i)&&["html","body"].indexOf(Au(i))<0;){var a=kl(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 Fw(t){for(var e=es(t),r=dQ(t);r&&$ze(r)&&kl(r).position==="static";)r=dQ(r);return r&&(Au(r)==="html"||Au(r)==="body"&&kl(r).position==="static")?e:r||Mze(t)||e}function hL(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function zb(t,e,r){return Zh(t,t2(e,r))}function kze(t,e,r){var n=zb(t,e,r);return n>r?r:n}function Ice(){return{top:0,right:0,bottom:0,left:0}}function Pce(t){return Object.assign({},Ice(),t)}function Tce(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var Lze=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,Pce(typeof e!="number"?e:Tce(e,Bw))};function Uze(t){var e,r=t.state,n=t.name,i=t.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,s=bu(r.placement),c=hL(s),u=[ko,Vs].indexOf(s)>=0,f=u?"height":"width";if(!(!a||!o)){var d=Lze(i.padding,r),g=dL(a),m=c==="y"?Mo:ko,w=c==="y"?zs:Vs,v=r.rects.reference[f]+r.rects.reference[c]-o[c]-r.rects.popper[f],y=o[c]-r.rects.reference[c],_=Fw(a),b=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,S=v/2-y/2,x=d[m],O=b-g[f]-d[w],E=b/2-g[f]/2+S,p=zb(x,E,O),I=c;r.modifiersData[n]=(e={},e[I]=p,e.centerOffset=p-E,e)}}function Bze(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)||Oce(e.elements.popper,i)&&(e.elements.arrow=i))}const Fze={name:"arrow",enabled:!0,phase:"main",fn:Uze,effect:Bze,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function My(t){return t.split("-")[1]}var jze={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qze(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:Dy(r*i)/i||0,y:Dy(n*i)/i||0}}function hQ(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=ko,x=Mo,O=window;if(u){var E=Fw(r),p="clientHeight",I="clientWidth";if(E===es(r)&&(E=Td(r),kl(E).position!=="static"&&s==="absolute"&&(p="scrollHeight",I="scrollWidth")),E=E,i===Mo||(i===ko||i===Vs)&&a===N1){x=zs;var C=d&&E===O&&O.visualViewport?O.visualViewport.height:E[p];v-=C-n.height,v*=c?1:-1}if(i===ko||(i===Mo||i===zs)&&a===N1){S=Vs;var L=d&&E===O&&O.visualViewport?O.visualViewport.width:E[I];m-=L-n.width,m*=c?1:-1}}var q=Object.assign({position:s},u&&jze),le=f===!0?qze({x:m,y:v},es(r)):{x:m,y:v};if(m=le.x,v=le.y,c){var pe;return Object.assign({},q,(pe={},pe[x]=b?"0":"",pe[S]=_?"0":"",pe.transform=(O.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",pe))}return Object.assign({},q,(e={},e[x]=b?v+"px":"",e[S]=_?m+"px":"",e.transform="",e))}function Hze(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:bu(e.placement),variation:My(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,hQ(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,hQ(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 zze={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hze,data:{}};var TE={passive:!0};function Vze(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=es(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&u.forEach(function(f){f.addEventListener("scroll",r.update,TE)}),s&&c.addEventListener("resize",r.update,TE),function(){a&&u.forEach(function(f){f.removeEventListener("scroll",r.update,TE)}),s&&c.removeEventListener("resize",r.update,TE)}}const Gze={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vze,data:{}};var Wze={left:"right",right:"left",bottom:"top",top:"bottom"};function Tx(t){return t.replace(/left|right|bottom|top/g,function(e){return Wze[e]})}var Kze={start:"end",end:"start"};function pQ(t){return t.replace(/start|end/g,function(e){return Kze[e]})}function pL(t){var e=es(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function gL(t){return $y(Td(t)).left+pL(t).scrollLeft}function Yze(t,e){var r=es(t),n=Td(t),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var u=Sce();(u||!u&&e==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+gL(t),y:c}}function Qze(t){var e,r=Td(t),n=pL(t),i=(e=t.ownerDocument)==null?void 0:e.body,a=Zh(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Zh(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+gL(t),c=-n.scrollTop;return kl(i||r).direction==="rtl"&&(s+=Zh(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:c}}function yL(t){var e=kl(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function Rce(t){return["html","body","#document"].indexOf(Au(t))>=0?t.ownerDocument.body:Bs(t)&&yL(t)?t:Rce(TO(t))}function Vb(t,e){var r;e===void 0&&(e=[]);var n=Rce(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),a=es(n),o=i?[a].concat(a.visualViewport||[],yL(n)?n:[]):n,s=e.concat(o);return i?s:s.concat(Vb(TO(o)))}function $5(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Jze(t,e){var r=$y(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 gQ(t,e,r){return e===xce?$5(Yze(t,r)):hp(e)?Jze(e,r):$5(Qze(Td(t)))}function Xze(t){var e=Vb(TO(t)),r=["absolute","fixed"].indexOf(kl(t).position)>=0,n=r&&Bs(t)?Fw(t):t;return hp(n)?e.filter(function(i){return hp(i)&&Oce(i,n)&&Au(i)!=="body"}):[]}function Zze(t,e,r,n){var i=e==="clippingParents"?Xze(t):[].concat(e),a=[].concat(i,[r]),o=a[0],s=a.reduce(function(c,u){var f=gQ(t,u,n);return c.top=Zh(f.top,c.top),c.right=t2(f.right,c.right),c.bottom=t2(f.bottom,c.bottom),c.left=Zh(f.left,c.left),c},gQ(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 Cce(t){var e=t.reference,r=t.element,n=t.placement,i=n?bu(n):null,a=n?My(n):null,o=e.x+e.width/2-r.width/2,s=e.y+e.height/2-r.height/2,c;switch(i){case Mo:c={x:o,y:e.y-r.height};break;case zs:c={x:o,y:e.y+e.height};break;case Vs:c={x:e.x+e.width,y:s};break;case ko:c={x:e.x-r.width,y:s};break;default:c={x:e.x,y:e.y}}var u=i?hL(i):null;if(u!=null){var f=u==="y"?"height":"width";switch(a){case Ny:c[u]=c[u]-(e[f]/2-r[f]/2);break;case N1:c[u]=c[u]+(e[f]/2-r[f]/2);break}}return c}function D1(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?bze:s,u=r.rootBoundary,f=u===void 0?xce:u,d=r.elementContext,g=d===void 0?Gv:d,m=r.altBoundary,w=m===void 0?!1:m,v=r.padding,y=v===void 0?0:v,_=Pce(typeof y!="number"?y:Tce(y,Bw)),b=g===Gv?wze:Gv,S=t.rects.popper,x=t.elements[w?b:g],O=Zze(hp(x)?x:x.contextElement||Td(t.elements.popper),c,f,o),E=$y(t.elements.reference),p=Cce({reference:E,element:S,strategy:"absolute",placement:i}),I=$5(Object.assign({},S,p)),C=g===Gv?I:E,L={top:O.top-C.top+_.top,bottom:C.bottom-O.bottom+_.bottom,left:O.left-C.left+_.left,right:C.right-O.right+_.right},q=t.modifiersData.offset;if(g===Gv&&q){var le=q[i];Object.keys(L).forEach(function(pe){var B=[Vs,zs].indexOf(pe)>=0?1:-1,U=[Mo,zs].indexOf(pe)>=0?"y":"x";L[pe]+=le[U]*B})}return L}function eVe(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?Ace:c,f=My(n),d=f?s?fQ:fQ.filter(function(w){return My(w)===f}):Bw,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]=D1(t,{placement:v,boundary:i,rootBoundary:a,padding:o})[bu(v)],w},{});return Object.keys(m).sort(function(w,v){return m[w]-m[v]})}function tVe(t){if(bu(t)===lL)return[];var e=Tx(t);return[pQ(t),e,pQ(e)]}function rVe(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,_=bu(y),b=_===y,S=c||(b||!w?[Tx(y)]:tVe(y)),x=[y].concat(S).reduce(function(M,G){return M.concat(bu(G)===lL?eVe(e,{placement:G,boundary:f,rootBoundary:d,padding:u,flipVariations:w,allowedAutoPlacements:v}):G)},[]),O=e.rects.reference,E=e.rects.popper,p=new Map,I=!0,C=x[0],L=0;L<x.length;L++){var q=x[L],le=bu(q),pe=My(q)===Ny,B=[Mo,zs].indexOf(le)>=0,U=B?"width":"height",K=D1(e,{placement:q,boundary:f,rootBoundary:d,altBoundary:g,padding:u}),ne=B?pe?Vs:ko:pe?zs:Mo;O[U]>E[U]&&(ne=Tx(ne));var F=Tx(ne),j=[];if(a&&j.push(K[le]<=0),s&&j.push(K[ne]<=0,K[F]<=0),j.every(function(M){return M})){C=q,I=!1;break}p.set(q,j)}if(I)for(var z=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(ce){return ce})});if(ge)return C=ge,"break"},H=z;H>0;H--){var k=$(H);if(k==="break")break}e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}}const nVe={name:"flip",enabled:!0,phase:"main",fn:rVe,requiresIfExists:["offset"],data:{_skip:!1}};function yQ(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 mQ(t){return[Mo,Vs,zs,ko].some(function(e){return t[e]>=0})}function iVe(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,o=D1(e,{elementContext:"reference"}),s=D1(e,{altBoundary:!0}),c=yQ(o,n),u=yQ(s,i,a),f=mQ(c),d=mQ(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 aVe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:iVe};function oVe(t,e,r){var n=bu(t),i=[ko,Mo].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,[ko,Vs].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function sVe(t){var e=t.state,r=t.options,n=t.name,i=r.offset,a=i===void 0?[0,0]:i,o=Ace.reduce(function(f,d){return f[d]=oVe(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 cVe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:sVe};function uVe(t){var e=t.state,r=t.name;e.modifiersData[r]=Cce({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const lVe={name:"popperOffsets",enabled:!0,phase:"read",fn:uVe,data:{}};function fVe(t){return t==="x"?"y":"x"}function dVe(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=D1(e,{boundary:c,rootBoundary:u,padding:d,altBoundary:f}),_=bu(e.placement),b=My(e.placement),S=!b,x=hL(_),O=fVe(x),E=e.modifiersData.popperOffsets,p=e.rects.reference,I=e.rects.popper,C=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,L=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),q=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,le={x:0,y:0};if(E){if(a){var pe,B=x==="y"?Mo:ko,U=x==="y"?zs:Vs,K=x==="y"?"height":"width",ne=E[x],F=ne+y[B],j=ne-y[U],z=m?-I[K]/2:0,$=b===Ny?p[K]:I[K],H=b===Ny?-I[K]:-p[K],k=e.elements.arrow,M=m&&k?dL(k):{width:0,height:0},G=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ice(),ge=G[B],Q=G[U],te=zb(0,p[K],M[K]),ce=S?p[K]/2-z-te-ge-L.mainAxis:$-te-ge-L.mainAxis,T=S?-p[K]/2+z+te+Q+L.mainAxis:H+te+Q+L.mainAxis,fe=e.elements.arrow&&Fw(e.elements.arrow),ze=fe?x==="y"?fe.clientTop||0:fe.clientLeft||0:0,tt=(pe=q==null?void 0:q[x])!=null?pe:0,mt=ne+ce-tt-ze,vt=ne+T-tt,gt=zb(m?t2(F,mt):F,ne,m?Zh(j,vt):j);E[x]=gt,le[x]=gt-ne}if(s){var Lt,Yt=x==="x"?Mo:ko,wr=x==="x"?zs:Vs,Rt=E[O],Pt=O==="y"?"height":"width",kt=Rt+y[Yt],Nt=Rt-y[wr],Kt=[Mo,ko].indexOf(_)!==-1,Ut=(Lt=q==null?void 0:q[O])!=null?Lt:0,zt=Kt?kt:Rt-p[Pt]-I[Pt]-Ut+L.altAxis,$t=Kt?Rt+p[Pt]+I[Pt]-Ut-L.altAxis:Nt,Dt=m&&Kt?kze(zt,Rt,$t):zb(m?zt:kt,Rt,m?$t:Nt);E[O]=Dt,le[O]=Dt-Rt}e.modifiersData[n]=le}}const hVe={name:"preventOverflow",enabled:!0,phase:"main",fn:dVe,requiresIfExists:["offset"]};function pVe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function gVe(t){return t===es(t)||!Bs(t)?pL(t):pVe(t)}function yVe(t){var e=t.getBoundingClientRect(),r=Dy(e.width)/t.offsetWidth||1,n=Dy(e.height)/t.offsetHeight||1;return r!==1||n!==1}function mVe(t,e,r){r===void 0&&(r=!1);var n=Bs(e),i=Bs(e)&&yVe(e),a=Td(e),o=$y(t,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Au(e)!=="body"||yL(a))&&(s=gVe(e)),Bs(e)?(c=$y(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):a&&(c.x=gL(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function vVe(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 bVe(t){var e=vVe(t);return Rze.reduce(function(r,n){return r.concat(e.filter(function(i){return i.phase===n}))},[])}function wVe(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function _Ve(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 vQ={placement:"bottom",modifiers:[],strategy:"absolute"};function bQ(){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 EVe(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,i=e.defaultOptions,a=i===void 0?vQ:i;return function(s,c,u){u===void 0&&(u=a);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},vQ,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:hp(s)?Vb(s):s.contextElement?Vb(s.contextElement):[],popper:Vb(c)};var S=bVe(_Ve([].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(bQ(b,S)){f.rects={reference:mVe(b,Fw(S),f.options.strategy==="fixed"),popper:dL(S)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(L){return f.modifiersData[L.name]=Object.assign({},L.data)});for(var x=0;x<f.orderedModifiers.length;x++){if(f.reset===!0){f.reset=!1,x=-1;continue}var O=f.orderedModifiers[x],E=O.fn,p=O.options,I=p===void 0?{}:p,C=O.name;typeof E=="function"&&(f=E({state:f,options:I,name:C,instance:m})||f)}}}},update:wVe(function(){return new Promise(function(y){m.forceUpdate(),y(f)})}),destroy:function(){v(),g=!0}};if(!bQ(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 O=x({state:f,name:_,instance:m,options:S}),E=function(){};d.push(O||E)}})}function v(){d.forEach(function(y){return y()}),d=[]}return m}}var xVe=[Gze,lVe,zze,Dze,cVe,nVe,hVe,Fze,aVe],AVe=EVe({defaultModifiers:xVe}),SVe=typeof Element<"u",OVe=typeof Map=="function",IVe=typeof Set=="function",PVe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Rx(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(!Rx(t[n],e[n]))return!1;return!0}var a;if(OVe&&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(!Rx(n.value[1],e.get(n.value[0])))return!1;return!0}if(IVe&&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(PVe&&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(SVe&&t instanceof Element)return!1;for(n=r;n--!==0;)if(!((i[n]==="_owner"||i[n]==="__v"||i[n]==="__o")&&t.$$typeof)&&!Rx(t[i[n]],e[i[n]]))return!1;return!0}return t!==t&&e!==e}var TVe=function(e,r){try{return Rx(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 RVe=Nc(TVe);var CVe=[],Nce=function(e,r,n){n===void 0&&(n={});var i=Ge.useRef(null),a={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||CVe},o=Ge.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=o[0],c=o[1],u=Ge.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(m){var w=m.state,v=Object.keys(w.elements);c1.flushSync(function(){c({styles:uQ(v.map(function(y){return[y,w.styles[y]||{}]})),attributes:uQ(v.map(function(y){return[y,w.attributes[y]]}))})})},requires:["computeStyles"]}},[]),f=Ge.useMemo(function(){var g={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[u,{name:"applyStyles",enabled:!1}])};return RVe(i.current,g)?i.current||g:(i.current=g,g)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,u]),d=Ge.useRef();return lQ(function(){d.current&&d.current.setOptions(f)},[f]),lQ(function(){if(!(e==null||r==null)){var g=n.createPopper||AVe,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}},NVe=function(){},DVe=function(){return Promise.resolve(null)},$Ve=[];function MVe(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?$Ve:a,s=t.referenceElement,c=t.onFirstUpdate,u=t.innerRef,f=t.children,d=Ge.useContext(bce),g=Ge.useState(null),m=g[0],w=g[1],v=Ge.useState(null),y=v[0],_=v[1];Ge.useEffect(function(){N5(u,m)},[u,m]);var b=Ge.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=Nce(s||d,m,b),x=S.state,O=S.styles,E=S.forceUpdate,p=S.update,I=Ge.useMemo(function(){return{ref:w,style:O.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:O.arrow,ref:_},forceUpdate:E||NVe,update:p||DVe}},[w,_,r,x,O,p,E]);return _ce(f)(I)}var kVe=function(){},LVe=kVe;const UVe=Nc(LVe);function BVe(t){var e=t.children,r=t.innerRef,n=Ge.useContext(wce),i=Ge.useCallback(function(a){N5(r,a),Ece(n,a)},[r,n]);return Ge.useEffect(function(){return function(){return N5(r,null)}},[]),Ge.useEffect(function(){UVe(!!n,"`Reference` should not be used outside of a `Manager` component.")},[n]),_ce(e)({ref:i})}const FVe=Object.freeze(Object.defineProperty({__proto__:null,Manager:vze,Popper:MVe,Reference:BVe,usePopper:Nce},Symbol.toStringTag,{value:"Module"})),jVe=uo(FVe);var Ku={},WN,wQ;function qVe(){if(wQ)return WN;wQ=1;var t=T$();function e(r,n,i,a){return t(r,function(o,s,c){n(a,i(o),s,c)}),a}return WN=e,WN}var KN,_Q;function HVe(){if(_Q)return KN;_Q=1;var t=qVe();function e(r,n){return function(i,a){return t(i,r,n(a),{})}}return KN=e,KN}var YN,EQ;function zVe(){if(EQ)return YN;EQ=1;var t=Zte(),e=HVe(),r=md(),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 YN=a,YN}var xQ;function VVe(){if(xQ)return Ku;xQ=1;var t=br;Ku.__esModule=!0,Ku.placementMapping=Ku.positions=Ku.positionsMapping=void 0;var e=t(zVe()),r=t(Hl()),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"};Ku.positionsMapping=n;var i=(0,r.default)(n);Ku.positions=i;var a=(0,e.default)(n);return Ku.placementMapping=a,Ku}var Wv={},QN={exports:{}},JN={exports:{}},XN={exports:{}},AQ;function GVe(){return AQ||(AQ=1,function(t){var e=g$.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}(XN)),XN.exports}var SQ;function WVe(){return SQ||(SQ=1,function(t){var e=g$.default,r=GVe();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}(JN)),JN.exports}var OQ;function KVe(){return OQ||(OQ=1,function(t){var e=WVe();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}(QN)),QN.exports}var IQ;function YVe(){if(IQ)return Wv;IQ=1;var t=br;Wv.__esModule=!0,Wv.default=void 0;var e=t(KVe()),r=t(b$()),n=t(Ks()),i=vd,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 Wv.default=s,Wv}var RE={},PQ;function QVe(){if(PQ)return RE;PQ=1;var t=br;RE.__esModule=!0,RE.default=a;var e=t(Bn()),r=t(ii);t(Ln());var n=t(Ge),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}}),RE}var CE={},TQ;function JVe(){if(TQ)return CE;TQ=1;var t=br;CE.__esModule=!0,CE.default=a;var e=t(Bn()),r=t(ii);t(Ln());var n=t(Ge),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}}),CE}var RQ;function XVe(){if(RQ)return Vv;RQ=1;var t=Ws,e=br;Vv.__esModule=!0,Vv.default=void 0;var r=e(Bn()),n=e($c());e(j$());var i=e(ql()),a=e(O$()),o=e(Ks()),s=e(mze()),c=e(Di()),u=e(U$()),f=e(F$()),d=e(Yse()),g=e(B$()),m=e(ii);e(Ln());var w=t(Ge),v=jVe,y=e(Qse()),_=Wn(),b=e(q$()),S=VVe(),x=e(YVe()),O=e(QVe()),E=e(JVe()),p=function(I){(0,n.default)(C,I);function C(){for(var q,le=arguments.length,pe=new Array(le),B=0;B<le;B++)pe[B]=arguments[B];return q=I.call.apply(I,[this].concat(pe))||this,q.state={},q.open=!1,q.zIndexWasSynced=!1,q.triggerRef=w.default.createRef(),q.elementRef=w.default.createRef(),q.getPortalProps=function(){var U={},K=q.props,ne=K.on,F=K.hoverable,j=(0,c.default)(ne)?ne:[ne];return F&&(U.closeOnPortalMouseLeave=!0,U.mouseLeaveDelay=300),(0,f.default)(j,"hover")&&(U.openOnTriggerClick=!1,U.closeOnTriggerClick=!1,U.openOnTriggerMouseEnter=!0,U.closeOnTriggerMouseLeave=!0,U.mouseLeaveDelay=70,U.mouseEnterDelay=50),(0,f.default)(j,"click")&&(U.openOnTriggerClick=!0,U.closeOnTriggerClick=!0,U.closeOnDocumentClick=!0),(0,f.default)(j,"focus")&&(U.openOnTriggerFocus=!0,U.closeOnTriggerBlur=!0),U},q.hideOnScroll=function(U){(0,s.default)(U.target)&&q.elementRef.current.contains(U.target)||(q.setState({closed:!0}),_.eventStack.unsub("scroll",q.hideOnScroll,{target:window}),q.timeoutId=setTimeout(function(){q.setState({closed:!1})},50),q.handleClose(U))},q.handleClose=function(U){(0,o.default)(q.props,"onClose",U,(0,r.default)({},q.props,{open:!1}))},q.handleOpen=function(U){(0,o.default)(q.props,"onOpen",U,(0,r.default)({},q.props,{open:!0}))},q.handlePortalMount=function(U){(0,o.default)(q.props,"onMount",U,q.props)},q.handlePortalUnmount=function(U){q.positionUpdate=null,(0,o.default)(q.props,"onUnmount",U,q.props)},q.renderContent=function(U){var K=U.placement,ne=U.ref,F=U.update,j=U.style,z=q.props,$=z.basic,H=z.children,k=z.className,M=z.content,G=z.hideOnScroll,ge=z.flowing,Q=z.header,te=z.inverted,ce=z.popper,T=z.size,fe=z.style,ze=z.wide,tt=q.state.contentRestProps;q.positionUpdate=F;var mt=(0,m.default)("ui",S.placementMapping[K],T,(0,_.useKeyOrValueAndKey)(ze,"wide"),(0,_.useKeyOnly)($,"basic"),(0,_.useKeyOnly)(ge,"flowing"),(0,_.useKeyOnly)(te,"inverted"),"popup transition visible",k),vt=(0,_.getElementType)(C,q.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:q.elementRef}),_.childrenUtils.isNil(H)?w.default.createElement(w.default.Fragment,null,E.default.create(Q,{autoGenerateKey:!1}),O.default.create(M,{autoGenerateKey:!1})):H,G&&w.default.createElement(g.default,{on:q.hideOnScroll,name:"scroll",target:"window"}));return(0,_.createHTMLDivision)(ce||{},{overrideProps:{children:Lt,ref:ne,style:(0,r.default)({display:"flex"},j)}})},q}C.getDerivedStateFromProps=function(le,pe){if(pe.closed||pe.disabled)return{};var B=(0,_.getUnhandledProps)(C,le),U=(0,d.default)(B,function(ne,F,j){return(0,f.default)(b.default.handledProps,j)||(ne[j]=F),ne},{}),K=(0,u.default)(B,b.default.handledProps);return{contentRestProps:U,portalRestProps:K}};var L=C.prototype;return L.componentDidUpdate=function(le){var pe=(0,y.default)(this.props.popperDependencies,le.popperDependencies);pe||this.handleUpdate()},L.componentWillUnmount=function(){clearTimeout(this.timeoutId)},L.handleUpdate=function(){this.positionUpdate&&this.positionUpdate()},L.render=function(){var le=this,pe=this.props,B=pe.context,U=pe.disabled,K=pe.eventsEnabled,ne=pe.offset,F=pe.pinned,j=pe.popper,z=pe.popperModifiers,$=pe.position,H=pe.positionFixed,k=pe.trigger,M=this.state,G=M.closed,ge=M.portalRestProps;if(G||U)return k;var Q=[{name:"arrow",enabled:!1},{name:"eventListeners",options:{scroll:!!K,resize:!!K}},{name:"flip",enabled:!F},{name:"preventOverflow",enabled:!!ne},{name:"offset",enabled:!!ne,options:{offset:ne}}].concat(z,[{name:"syncZIndex",enabled:!0,phase:"beforeRead",fn:function(fe){var ze,tt=fe.state;if(!le.zIndexWasSynced){var mt=j==null||(ze=j.style)==null?void 0:ze.zIndex;(0,a.default)(mt)&&(tt.elements.popper.style.zIndex=window.getComputedStyle(tt.elements.popper.firstChild).zIndex),le.zIndexWasSynced=!0}},effect:function(){return function(){le.zIndexWasSynced=!1}}}]),te=(0,x.default)((0,i.default)(B)?this.triggerRef:B),ce=(0,r.default)({},this.getPortalProps(),ge);return w.default.createElement(b.default,(0,r.default)({},ce,{onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount,trigger:k,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 Vv.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=O.default,p.Header=E.default,Vv}var ZVe=br,eGe=ZVe(XVe()),tGe=eGe.default;const rGe="_button_1uvkr_1",nGe="_icon_1uvkr_5",NE={button:rGe,icon:nGe,"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"},Dce=t=>{const{className:e,children:r,type:n,testId:i,showTooltip:a,tooltipPosition:o,disabled:s,loading:c,onClick:u}=t;return Je.jsx(tGe,{position:a&&o?o:"top center",disabled:!a,trigger:Je.jsxs(cu.Button,{primary:!0,size:"small","data-testid":`${i}-${n}-button`,className:dp(e,NE.button),onClick:()=>u(n),disabled:s,loading:c,children:[c?null:Je.jsx("div",{role:"img","aria-label":n,className:dp(NE.icon,NE[`icon-${n}`],NE.primaryImage)}),r]},n),content:n,on:"hover"})},iGe="social-primary-test-id",aGe="social-secondary-test-id",oGe="web3-primary-test-id",sGe="web3-secondary-test-id",cGe="show-more-button-test-id",uGe="_connection_ge0tp_3",lGe="_dclLogo_ge0tp_9",fGe="_title_ge0tp_15",dGe="_subtitle_ge0tp_20",hGe="_primaryButton_ge0tp_29",pGe="_primaryImage_ge0tp_38",gGe="_primaryMessage_ge0tp_42",yGe="_primaryMagic_ge0tp_50",mGe="_primaryLearnMore_ge0tp_61",vGe="_primary_ge0tp_29",bGe="_showMore_ge0tp_76",wGe="_showMoreButton_ge0tp_80",_Ge="_showMoreSecondaryOptions_ge0tp_89",EGe="_primaryOption_ge0tp_103",xGe="_secondaryOptionButton_ge0tp_107",Za={connection:uGe,dclLogo:lGe,title:fGe,subtitle:dGe,primaryButton:hGe,primaryImage:pGe,primaryMessage:gGe,primaryMagic:yGe,primaryLearnMore:mGe,primary:vGe,showMore:bGe,showMoreButton:wGe,showMoreSecondaryOptions:_Ge,primaryOption:EGe,secondaryOptionButton:xGe},CQ=({message:t,children:e,option:r,testId:n,loadingOption:i,onConnect:a})=>Je.jsxs("div",{className:Za.primary,"data-testid":n,children:[Je.jsx("div",{className:Za.primaryMessage,children:t}),Je.jsx(Dce,{disabled:!!i,loading:i===r,type:r,onClick:a,className:dp(Za.primaryButton,Za.primaryOption),testId:n,children:e})]}),NQ=({options:t,tooltipDirection:e,testId:r,loadingOption:n,onConnect:i})=>Je.jsx("div",{className:Za.showMoreSecondaryOptions,"data-testid":r,children:t.map(a=>Je.jsx(Dce,{className:dp(Za.primaryButton,Za.secondaryOptionButton),showTooltip:!0,tooltipPosition:e,type:a,onClick:i,testId:r,loading:n===a,disabled:!!n},a))}),AGe={i18n:{title:"Unlock Your Virtual World.",subtitle:"Access and start exploring.",accessWith:t=>`Access with ${t}`,connectWith:t=>`Connect with ${t}`,moreOptions:"More Options",socialMessage:t=>Je.jsxs(Je.Fragment,{children:["Access secured by ",t]}),web3Message:t=>Je.jsxs(Je.Fragment,{children:["Curious about wallets? ",t("Learn More")]})}},SGe=t=>{const{i18n:e=AGe.i18n,onConnect:r,onLearnMore:n,socialOptions:i,web3Options:a,className:o,loadingOption:s}=t,[c,u]=Ge.useState(!1),f=Ge.useCallback(()=>{u(!c)},[c]),d=i&&i.secondary&&i.secondary.length>0,g=a&&a.secondary&&a.secondary.length>0;return Je.jsxs("div",{className:dp(o,Za.connection),children:[Je.jsx("img",{className:Za.dclLogo,src:yze,alt:"Decentraland logo"}),Je.jsxs("div",{children:[Je.jsx("h1",{className:Za.title,children:e.title}),Je.jsx("h2",{className:Za.subtitle,children:e.subtitle}),i?Je.jsx(CQ,{onConnect:r,testId:iGe,option:i==null?void 0:i.primary,loadingOption:s,message:Je.jsx(Je.Fragment,{children:e.socialMessage(Je.jsx("div",{className:Za.primaryMagic,role:"img","aria-label":"Magic"}))}),children:Je.jsx(Je.Fragment,{children:e.accessWith(i==null?void 0:i.primary)})}):null,a?Je.jsx(CQ,{onConnect:r,testId:oGe,option:a==null?void 0:a.primary,loadingOption:s,message:e.web3Message(m=>Je.jsx("span",{className:Za.primaryLearnMore,role:"button",onClick:n,children:m})),children:Je.jsx(Je.Fragment,{children:e.connectWith(a==null?void 0:a.primary)})}):null]}),Je.jsxs("div",{className:Za.showMore,children:[(g||d)&&Je.jsxs(cu.Button,{"data-testid":cGe,basic:!0,size:"medium",fluid:!0,className:Za.showMoreButton,onClick:f,children:[e.moreOptions,Je.jsx(gze,{name:c?"chevron up":"chevron down"})]}),c&&d&&Je.jsx(NQ,{testId:aGe,options:i.secondary,onConnect:r,tooltipDirection:"top center",loadingOption:s}),c&&g&&Je.jsx(NQ,{testId:sGe,options:a.secondary,onConnect:r,tooltipDirection:"bottom center",loadingOption:s})]})]})};var Hn=(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))(Hn||{});const OGe=60*24*30,IGe=Il.getConfiguration().magic.apiKey;function $ce(t){switch(t){case Hn.DISCORD:case Hn.X:case Hn.GOOGLE:case Hn.APPLE:return Ac.ProviderType.MAGIC;case Hn.WALLET_CONNECT:case Hn.METAMASK_MOBILE:return Ac.ProviderType.WALLET_CONNECT_V2;case Hn.COINBASE:case Hn.WALLET_LINK:return Ac.ProviderType.WALLET_LINK;case Hn.FORTMATIC:return Ac.ProviderType.FORTMATIC;case Hn.METAMASK:case Hn.DAPPER:case Hn.SAMSUNG:return Ac.ProviderType.INJECTED;default:throw new Error("Invalid provider")}}async function PGe(t,e){const r=new ate(e),n=S8.createRandom(),i={address:n.address.toString(),publicKey:xt(n.publicKey),privateKey:xt(n.privateKey)},a=await r.getSigner();return rce.Authenticator.initializeAuthChain(t,i,OGe,o=>a.signMessage(o))}async function DQ(t){const e=$ce(t);if(Ac.ProviderType.MAGIC===e){const{Magic:n}=await Ty(()=>Promise.resolve().then(()=>Wk),void 0),{OAuthExtension:i}=await Ty(()=>Promise.resolve().then(()=>Kk),void 0),a=new n(IGe,{extensions:[new i]}),o=new URL(window.location.href);o.pathname="/auth/callback",await a.oauth.loginWithRedirect({provider:t===Hn.X?"twitter":t,redirectURI:o.href})}const r=await Il.connection.connect(e);if(!r.account||!r.provider)throw new Error("Could not get provider");return r}function TGe(t){return[Hn.APPLE,Hn.GOOGLE,Hn.X,Hn.DISCORD].includes(t)}async function Mce(t,e){let r;const n=O5.localStorageGetIdentity(t);return n?r=n:(r=await PGe(t,e),O5.localStorageStoreIdentity(t,r)),r}const RGe=Il.getConfiguration().magic.apiKey,CGe=()=>{const t=Kse(),e=I2(),[r,n]=Ge.useState(!0),i=Ge.useCallback(async()=>{var s;const o=await Il.connection.connect(Ml.ProviderType.MAGIC);await Mce(((s=o.account)==null?void 0:s.toLowerCase())??"",o.provider)},[]),a=Ge.useCallback(async()=>{const{Magic:o}=await Ty(()=>Promise.resolve().then(()=>Wk),void 0),{OAuthExtension:s}=await Ty(()=>Promise.resolve().then(()=>Kk),void 0),c=new o(RGe,{extensions:[new s]});try{await(c==null?void 0:c.oauth.getRedirectResult()),n(!1),await i(),t?window.location.href=decodeURIComponent(t):window.location.href="/"}catch(u){console.log(u),e("/login")}},[e]);return Ge.useEffect(()=>{a()},[]),Je.jsx(tce,{open:!0,state:r?Ri.VALIDATING_SIGN_IN:Ri.WAITING_FOR_SIGNATURE,onTryAgain:i,providerType:Ml.ProviderType.MAGIC})},NGe="_main_1c8le_1",DGe="_infoModal_1c8le_11",$Ge="_infoContent_1c8le_15",MGe="_info_1c8le_11",kGe="_infoImage_1c8le_26",LGe="_assets_1c8le_34",UGe="_login_1c8le_38",BGe="_goBackButton_1c8le_42",cc={main:NGe,infoModal:DGe,infoContent:$Ge,info:MGe,infoImage:kGe,assets:LGe,login:UGe,goBackButton:BGe},FGe={i18n:{title:"What is a wallet?",assets:{title:"A home for your digital assets",text:"Wallets are used to send, receive, store, and display digital assets like Ethereum and NFTs."},logIn:{title:"A New Way To Log In",text:"Instead of creating new accounts and passwords on every website, just connect your wallet."},goBack:"Return to log in page"}},jGe=t=>{const{i18n:e=FGe.i18n,onClose:r,open:n}=t;return Je.jsxs(Jk.Modal,{size:"tiny",open:n,className:cc.infoModal,children:[Je.jsx(Zk,{title:"",onClose:r}),Je.jsx(Qk,{className:cc.infoContent,children:Je.jsxs("div",{className:cc.main,children:[Je.jsx("h1",{className:cc.title,children:e==null?void 0:e.title}),Je.jsxs("article",{className:cc.info,children:[Je.jsx("div",{className:dp(cc.infoImage,cc.assets)}),Je.jsx("h3",{children:e==null?void 0:e.assets.title}),Je.jsx("p",{children:e==null?void 0:e.assets.text})]}),Je.jsxs("article",{className:cc.info,children:[Je.jsx("div",{className:dp(cc.infoImage,cc.login)}),Je.jsx("h3",{children:e==null?void 0:e.logIn.title}),Je.jsx("p",{children:e==null?void 0:e.logIn.text})]}),Je.jsx(cu.Button,{className:cc.goBackButton,secondary:!0,inverted:!0,onClick:r,children:e==null?void 0:e.goBack})]})})]})},qGe="_main_1vyd9_1",HGe="_left_1vyd9_22",zGe="_leftInfo_1vyd9_32",VGe="_right_1vyd9_41",GGe="_footer_1vyd9_50",WGe="_guestInfo_1vyd9_69",DE={main:qGe,left:HGe,leftInfo:zGe,right:VGe,footer:GGe,guestInfo:WGe},KGe=()=>{const[t]=Zye(),[e,r]=Ge.useState(Ri.CONNECTING_WALLET),[n,i]=Ge.useState(!1),[a,o]=Ge.useState(!1),[s,c]=Ge.useState(),u=Kse(),f=u&&new URL(u).pathname==="/play",d=Ge.useCallback(()=>{i(!n)},[i,n]),g=Ge.useMemo(()=>{if(u){const y=new URL(u);return y.searchParams.append("guest","true"),y.toString()}return""},[u]),m=Ge.useCallback(async y=>{var _;if(c(y),TGe(y))r(Ri.LOADING_MAGIC),await DQ(y);else try{o(!0),r(Ri.CONNECTING_WALLET);const b=await DQ(y);t.get("fromRequests")!=="true"&&(r(Ri.WAITING_FOR_SIGNATURE),await Mce(((_=b.account)==null?void 0:_.toLowerCase())??"",b.provider)),u?window.location.href=decodeURIComponent(u):window.location.href="/",o(!1)}catch{r(Ri.ERROR)}},[r,o,c,u,t]),w=Ge.useCallback(()=>{o(!1),c(void 0),r(Ri.CONNECTING_WALLET)},[o]),v=Ge.useCallback(()=>{s&&m(s)},[s]);return Je.jsxs("main",{className:DE.main,children:[Je.jsx(jGe,{open:n,onClose:d}),Je.jsx(tce,{open:a,state:e,onClose:w,onTryAgain:v,providerType:s?$ce(s):null}),Je.jsx("div",{className:DE.left,children:Je.jsxs("div",{className:DE.leftInfo,children:[Je.jsx(SGe,{onLearnMore:d,onConnect:m,loadingOption:s,socialOptions:{primary:Hn.GOOGLE,secondary:[Hn.DISCORD,Hn.APPLE,Hn.X]},web3Options:{primary:Hn.METAMASK,secondary:[Hn.FORTMATIC,Hn.COINBASE,Hn.WALLET_CONNECT]}}),f&&Je.jsxs("div",{className:DE.guestInfo,children:["Quick dive? ",Je.jsx("a",{href:g,children:"Explore as a guest"})]})]})})]})};aye.render(Je.jsx(QQ.StrictMode,{children:Je.jsx(Xye,{basename:"/auth",children:Je.jsxs(Yye,{children:[Je.jsx(Zv,{path:"/login",element:Je.jsx(KGe,{})}),Je.jsx(Zv,{path:"/callback",element:Je.jsx(CGe,{})}),Je.jsx(Zv,{path:"/requests/:requestId",element:Je.jsx(Rqe,{})}),Je.jsx(Zv,{path:"*",element:Je.jsx(Cqe,{})})]})})}),document.getElementById("root"));export{ut as B,h5e as R,Fae as T,S$e as _,ii as a,Ha as b,Ne as c,Nc as d,fo as e,dN as f,uo as g,$a as h,UW as n,aWe as o,Oc as p,X$ as r,vne as s,iWe as t,Ry as y};
|
|
187
|
+
//# sourceMappingURL=index-e1990c9b.js.map
|