@dcl/auth-site 0.1.3-7359128689.commit-62bca57 → 0.1.3-7378840092.commit-24eec55

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.
@@ -0,0 +1,187 @@
1
+ var b0e=Object.defineProperty;var w0e=(t,e,r)=>e in t?b0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var je=(t,e,r)=>(w0e(t,typeof e!="symbol"?e+"":e,r),r),HI=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var K=(t,e,r)=>(HI(t,e,"read from private field"),r?r.call(t):e.get(t)),Je=(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)=>(HI(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Bm=(t,e,r,n)=>({set _(i){Te(t,e,i,r)},get _(){return K(t,e,n)}}),ut=(t,e,r)=>(HI(t,e,"access private method"),r);function _0e(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 Bc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function fo(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 cJ={exports:{}},bw={};/*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */var U7=Object.getOwnPropertySymbols,E0e=Object.prototype.hasOwnProperty,x0e=Object.prototype.propertyIsEnumerable;function A0e(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function S0e(){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 uJ=S0e()?Object.assign:function(t,e){for(var r,n=A0e(t),i,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var o in r)E0e.call(r,o)&&(n[o]=r[o]);if(U7){i=U7(r);for(var s=0;s<i.length;s++)x0e.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n},lJ={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 sD=uJ,Jy=60103,fJ=60106;hn.Fragment=60107;hn.StrictMode=60108;hn.Profiler=60114;var dJ=60109,hJ=60110,pJ=60112;hn.Suspense=60113;var gJ=60115,yJ=60116;if(typeof Symbol=="function"&&Symbol.for){var cc=Symbol.for;Jy=cc("react.element"),fJ=cc("react.portal"),hn.Fragment=cc("react.fragment"),hn.StrictMode=cc("react.strict_mode"),hn.Profiler=cc("react.profiler"),dJ=cc("react.provider"),hJ=cc("react.context"),pJ=cc("react.forward_ref"),hn.Suspense=cc("react.suspense"),gJ=cc("react.memo"),yJ=cc("react.lazy")}var B7=typeof Symbol=="function"&&Symbol.iterator;function O0e(t){return t===null||typeof t!="object"?null:(t=B7&&t[B7]||t["@@iterator"],typeof t=="function"?t:null)}function ww(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 mJ={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vJ={};function Xy(t,e,r){this.props=t,this.context=e,this.refs=vJ,this.updater=r||mJ}Xy.prototype.isReactComponent={};Xy.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error(ww(85));this.updater.enqueueSetState(this,t,e,"setState")};Xy.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function bJ(){}bJ.prototype=Xy.prototype;function cD(t,e,r){this.props=t,this.context=e,this.refs=vJ,this.updater=r||mJ}var uD=cD.prototype=new bJ;uD.constructor=cD;sD(uD,Xy.prototype);uD.isPureReactComponent=!0;var lD={current:null},wJ=Object.prototype.hasOwnProperty,_J={key:!0,ref:!0,__self:!0,__source:!0};function EJ(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)wJ.call(e,n)&&!_J.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:Jy,type:t,key:a,ref:o,props:i,_owner:lD.current}}function I0e(t,e){return{$$typeof:Jy,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function fD(t){return typeof t=="object"&&t!==null&&t.$$typeof===Jy}function P0e(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var F7=/\/+/g;function zI(t,e){return typeof t=="object"&&t!==null&&t.key!=null?P0e(""+t.key):e.toString(36)}function ZE(t,e,r,n,i){var a=typeof t;(a==="undefined"||a==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Jy:case fJ:o=!0}}if(o)return o=t,i=i(o),t=n===""?"."+zI(o,0):n,Array.isArray(i)?(r="",t!=null&&(r=t.replace(F7,"$&/")+"/"),ZE(i,e,r,"",function(u){return u})):i!=null&&(fD(i)&&(i=I0e(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(F7,"$&/")+"/")+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+zI(a,s);o+=ZE(a,e,r,c,i)}else if(c=O0e(t),typeof c=="function")for(t=c.call(t),s=0;!(a=t.next()).done;)a=a.value,c=n+zI(a,s++),o+=ZE(a,e,r,c,i);else if(a==="object")throw e=""+t,Error(ww(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e));return o}function H_(t,e,r){if(t==null)return t;var n=[],i=0;return ZE(t,n,"","",function(a){return e.call(r,a,i++)}),n}function T0e(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 xJ={current:null};function zl(){var t=xJ.current;if(t===null)throw Error(ww(321));return t}var R0e={ReactCurrentDispatcher:xJ,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:lD,IsSomeRendererActing:{current:!1},assign:sD};hn.Children={map:H_,forEach:function(t,e,r){H_(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return H_(t,function(){e++}),e},toArray:function(t){return H_(t,function(e){return e})||[]},only:function(t){if(!fD(t))throw Error(ww(143));return t}};hn.Component=Xy;hn.PureComponent=cD;hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R0e;hn.cloneElement=function(t,e,r){if(t==null)throw Error(ww(267,t));var n=sD({},t.props),i=t.key,a=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(a=e.ref,o=lD.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var s=t.type.defaultProps;for(c in e)wJ.call(e,c)&&!_J.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:Jy,type:t.type,key:i,ref:a,props:n,_owner:o}};hn.createContext=function(t,e){return e===void 0&&(e=null),t={$$typeof:hJ,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider={$$typeof:dJ,_context:t},t.Consumer=t};hn.createElement=EJ;hn.createFactory=function(t){var e=EJ.bind(null,t);return e.type=t,e};hn.createRef=function(){return{current:null}};hn.forwardRef=function(t){return{$$typeof:pJ,render:t}};hn.isValidElement=fD;hn.lazy=function(t){return{$$typeof:yJ,_payload:{_status:-1,_result:t},_init:T0e}};hn.memo=function(t,e){return{$$typeof:gJ,type:t,compare:e===void 0?null:e}};hn.useCallback=function(t,e){return zl().useCallback(t,e)};hn.useContext=function(t,e){return zl().useContext(t,e)};hn.useDebugValue=function(){};hn.useEffect=function(t,e){return zl().useEffect(t,e)};hn.useImperativeHandle=function(t,e,r){return zl().useImperativeHandle(t,e,r)};hn.useLayoutEffect=function(t,e){return zl().useLayoutEffect(t,e)};hn.useMemo=function(t,e){return zl().useMemo(t,e)};hn.useReducer=function(t,e,r){return zl().useReducer(t,e,r)};hn.useRef=function(t){return zl().useRef(t)};hn.useState=function(t){return zl().useState(t)};hn.version="17.0.2";lJ.exports=hn;var ze=lJ.exports;const AJ=Bc(ze),C0e=_0e({__proto__:null,default:AJ},[ze]);/** @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 N0e=ze,SJ=60103;bw.Fragment=60107;if(typeof Symbol=="function"&&Symbol.for){var j7=Symbol.for;SJ=j7("react.element"),bw.Fragment=j7("react.fragment")}var D0e=N0e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$0e=Object.prototype.hasOwnProperty,M0e={key:!0,ref:!0,__self:!0,__source:!0};function OJ(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)$0e.call(e,n)&&!M0e.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:SJ,type:t,key:a,ref:o,props:i,_owner:D0e.current}}bw.jsx=OJ;bw.jsxs=OJ;cJ.exports=bw;var We=cJ.exports;var IJ={exports:{}},Ys={},PJ={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,Y=!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(Y=!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,Y&&(Y=!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)&&(Y?n():Y=!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);PJ.exports=TJ;var k0e=PJ.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 C2=ze,ii=uJ,Zi=k0e;function wt(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(!C2)throw Error(wt(227));var RJ=new Set,c1={};function Sp(t,e){_y(t,e),_y(t+"Capture",e)}function _y(t,e){for(c1[t]=e,t=0;t<e.length;t++)RJ.add(e[t])}var Ll=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),L0e=/^[: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]*$/,q7=Object.prototype.hasOwnProperty,H7={},z7={};function U0e(t){return q7.call(z7,t)?!0:q7.call(H7,t)?!1:L0e.test(t)?z7[t]=!0:(H7[t]=!0,!1)}function B0e(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 F0e(t,e,r,n){if(e===null||typeof e>"u"||B0e(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 ho(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 ba={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ba[t]=new ho(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ba[e]=new ho(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ba[t]=new ho(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ba[t]=new ho(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){ba[t]=new ho(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ba[t]=new ho(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ba[t]=new ho(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ba[t]=new ho(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ba[t]=new ho(t,5,!1,t.toLowerCase(),null,!1,!1)});var dD=/[\-:]([a-z])/g;function hD(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(dD,hD);ba[e]=new ho(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(dD,hD);ba[e]=new ho(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(dD,hD);ba[e]=new ho(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ba[t]=new ho(t,1,!1,t.toLowerCase(),null,!1,!1)});ba.xlinkHref=new ho("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ba[t]=new ho(t,1,!1,t.toLowerCase(),null,!0,!0)});function pD(t,e,r,n){var i=ba.hasOwnProperty(e)?ba[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||(F0e(e,r,i,n)&&(r=null),n||i===null?U0e(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 Op=C2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,lb=60103,Ah=60106,Cf=60107,gD=60108,Cb=60114,yD=60109,mD=60110,N2=60112,Nb=60113,Qx=60120,D2=60115,vD=60116,bD=60121,wD=60128,CJ=60129,_D=60130,w6=60131;if(typeof Symbol=="function"&&Symbol.for){var Wi=Symbol.for;lb=Wi("react.element"),Ah=Wi("react.portal"),Cf=Wi("react.fragment"),gD=Wi("react.strict_mode"),Cb=Wi("react.profiler"),yD=Wi("react.provider"),mD=Wi("react.context"),N2=Wi("react.forward_ref"),Nb=Wi("react.suspense"),Qx=Wi("react.suspense_list"),D2=Wi("react.memo"),vD=Wi("react.lazy"),bD=Wi("react.block"),Wi("react.scope"),wD=Wi("react.opaque.id"),CJ=Wi("react.debug_trace_mode"),_D=Wi("react.offscreen"),w6=Wi("react.legacy_hidden")}var V7=typeof Symbol=="function"&&Symbol.iterator;function Fm(t){return t===null||typeof t!="object"?null:(t=V7&&t[V7]||t["@@iterator"],typeof t=="function"?t:null)}var VI;function fb(t){if(VI===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);VI=e&&e[1]||""}return`
34
+ `+VI+t}var GI=!1;function z_(t,e){if(!t||GI)return"";GI=!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{GI=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?fb(t):""}function j0e(t){switch(t.tag){case 5:return fb(t.type);case 16:return fb("Lazy");case 13:return fb("Suspense");case 19:return fb("SuspenseList");case 0:case 2:case 15:return t=z_(t.type,!1),t;case 11:return t=z_(t.type.render,!1),t;case 22:return t=z_(t.type._render,!1),t;case 1:return t=z_(t.type,!0),t;default:return""}}function cg(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 Cf:return"Fragment";case Ah:return"Portal";case Cb:return"Profiler";case gD:return"StrictMode";case Nb:return"Suspense";case Qx:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case mD:return(t.displayName||"Context")+".Consumer";case yD:return(t._context.displayName||"Context")+".Provider";case N2:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case D2:return cg(t.type);case bD:return cg(t._render);case vD:e=t._payload,t=t._init;try{return cg(t(e))}catch{}}return null}function dd(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function NJ(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function q0e(t){var e=NJ(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 V_(t){t._valueTracker||(t._valueTracker=q0e(t))}function DJ(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=NJ(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Jx(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 _6(t,e){var r=e.checked;return ii({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function G7(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=dd(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 $J(t,e){e=e.checked,e!=null&&pD(t,"checked",e,!1)}function E6(t,e){$J(t,e);var r=dd(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")?x6(t,e.type,r):e.hasOwnProperty("defaultValue")&&x6(t,e.type,dd(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 x6(t,e,r){(e!=="number"||Jx(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}function H0e(t){var e="";return C2.Children.forEach(t,function(r){r!=null&&(e+=r)}),e}function A6(t,e){return t=ii({children:void 0},e),(e=H0e(e.children))&&(t.children=e),t}function ug(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=""+dd(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 S6(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(wt(91));return ii({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function K7(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(wt(92));if(Array.isArray(r)){if(!(1>=r.length))throw Error(wt(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:dd(r)}}function MJ(t,e){var r=dd(e.value),n=dd(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 Y7(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}var O6={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function kJ(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 I6(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?kJ(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var G_,LJ=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!==O6.svg||"innerHTML"in t)t.innerHTML=e;else{for(G_=G_||document.createElement("div"),G_.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=G_.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function u1(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Db={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},z0e=["Webkit","ms","Moz","O"];Object.keys(Db).forEach(function(t){z0e.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Db[e]=Db[t]})});function UJ(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Db.hasOwnProperty(t)&&Db[t]?(""+e).trim():e+"px"}function BJ(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=UJ(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var V0e=ii({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 P6(t,e){if(e){if(V0e[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(wt(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(wt(60));if(!(typeof e.dangerouslySetInnerHTML=="object"&&"__html"in e.dangerouslySetInnerHTML))throw Error(wt(61))}if(e.style!=null&&typeof e.style!="object")throw Error(wt(62))}}function T6(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 ED(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var R6=null,lg=null,fg=null;function Q7(t){if(t=Ew(t)){if(typeof R6!="function")throw Error(wt(280));var e=t.stateNode;e&&(e=B2(e),R6(t.stateNode,t.type,e))}}function FJ(t){lg?fg?fg.push(t):fg=[t]:lg=t}function jJ(){if(lg){var t=lg,e=fg;if(fg=lg=null,Q7(t),e)for(t=0;t<e.length;t++)Q7(e[t])}}function xD(t,e){return t(e)}function qJ(t,e,r,n,i){return t(e,r,n,i)}function AD(){}var HJ=xD,Sh=!1,WI=!1;function SD(){(lg!==null||fg!==null)&&(AD(),jJ())}function G0e(t,e,r){if(WI)return t(e,r);WI=!0;try{return HJ(t,e,r)}finally{WI=!1,SD()}}function l1(t,e){var r=t.stateNode;if(r===null)return null;var n=B2(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(wt(231,e,typeof r));return r}var C6=!1;if(Ll)try{var jm={};Object.defineProperty(jm,"passive",{get:function(){C6=!0}}),window.addEventListener("test",jm,jm),window.removeEventListener("test",jm,jm)}catch{C6=!1}function W0e(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 $b=!1,Xx=null,Zx=!1,N6=null,K0e={onError:function(t){$b=!0,Xx=t}};function Y0e(t,e,r,n,i,a,o,s,c){$b=!1,Xx=null,W0e.apply(K0e,arguments)}function Q0e(t,e,r,n,i,a,o,s,c){if(Y0e.apply(this,arguments),$b){if($b){var u=Xx;$b=!1,Xx=null}else throw Error(wt(198));Zx||(Zx=!0,N6=u)}}function Ip(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 zJ(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 J7(t){if(Ip(t)!==t)throw Error(wt(188))}function J0e(t){var e=t.alternate;if(!e){if(e=Ip(t),e===null)throw Error(wt(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 J7(i),t;if(a===n)return J7(i),e;a=a.sibling}throw Error(wt(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(wt(189))}}if(r.alternate!==n)throw Error(wt(190))}if(r.tag!==3)throw Error(wt(188));return r.stateNode.current===r?t:e}function VJ(t){if(t=J0e(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 X7(t,e){for(var r=t.alternate;e!==null;){if(e===t||e===r)return!0;e=e.return}return!1}var GJ,OD,WJ,KJ,D6=!1,yu=[],td=null,rd=null,nd=null,f1=new Map,d1=new Map,qm=[],Z7="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 $6(t,e,r,n,i){return{blockedOn:t,domEventName:e,eventSystemFlags:r|16,nativeEvent:i,targetContainers:[n]}}function eU(t,e){switch(t){case"focusin":case"focusout":td=null;break;case"dragenter":case"dragleave":rd=null;break;case"mouseover":case"mouseout":nd=null;break;case"pointerover":case"pointerout":f1.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":d1.delete(e.pointerId)}}function Hm(t,e,r,n,i,a){return t===null||t.nativeEvent!==a?(t=$6(e,r,n,i,a),e!==null&&(e=Ew(e),e!==null&&OD(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function X0e(t,e,r,n,i){switch(e){case"focusin":return td=Hm(td,t,e,r,n,i),!0;case"dragenter":return rd=Hm(rd,t,e,r,n,i),!0;case"mouseover":return nd=Hm(nd,t,e,r,n,i),!0;case"pointerover":var a=i.pointerId;return f1.set(a,Hm(f1.get(a)||null,t,e,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,d1.set(a,Hm(d1.get(a)||null,t,e,r,n,i)),!0}return!1}function Z0e(t){var e=Oh(t.target);if(e!==null){var r=Ip(e);if(r!==null){if(e=r.tag,e===13){if(e=zJ(r),e!==null){t.blockedOn=e,KJ(t.lanePriority,function(){Zi.unstable_runWithPriority(t.priority,function(){WJ(r)})});return}}else if(e===3&&r.stateNode.hydrate){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ex(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=RD(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r!==null)return e=Ew(r),e!==null&&OD(e),t.blockedOn=r,!1;e.shift()}return!0}function tU(t,e,r){ex(t)&&r.delete(e)}function ege(){for(D6=!1;0<yu.length;){var t=yu[0];if(t.blockedOn!==null){t=Ew(t.blockedOn),t!==null&&GJ(t);break}for(var e=t.targetContainers;0<e.length;){var r=RD(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r!==null){t.blockedOn=r;break}e.shift()}t.blockedOn===null&&yu.shift()}td!==null&&ex(td)&&(td=null),rd!==null&&ex(rd)&&(rd=null),nd!==null&&ex(nd)&&(nd=null),f1.forEach(tU),d1.forEach(tU)}function zm(t,e){t.blockedOn===e&&(t.blockedOn=null,D6||(D6=!0,Zi.unstable_scheduleCallback(Zi.unstable_NormalPriority,ege)))}function YJ(t){function e(i){return zm(i,t)}if(0<yu.length){zm(yu[0],t);for(var r=1;r<yu.length;r++){var n=yu[r];n.blockedOn===t&&(n.blockedOn=null)}}for(td!==null&&zm(td,t),rd!==null&&zm(rd,t),nd!==null&&zm(nd,t),f1.forEach(e),d1.forEach(e),r=0;r<qm.length;r++)n=qm[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<qm.length&&(r=qm[0],r.blockedOn===null);)Z0e(r),r.blockedOn===null&&qm.shift()}function W_(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var z0={animationend:W_("Animation","AnimationEnd"),animationiteration:W_("Animation","AnimationIteration"),animationstart:W_("Animation","AnimationStart"),transitionend:W_("Transition","TransitionEnd")},KI={},QJ={};Ll&&(QJ=document.createElement("div").style,"AnimationEvent"in window||(delete z0.animationend.animation,delete z0.animationiteration.animation,delete z0.animationstart.animation),"TransitionEvent"in window||delete z0.transitionend.transition);function $2(t){if(KI[t])return KI[t];if(!z0[t])return t;var e=z0[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in QJ)return KI[t]=e[r];return t}var JJ=$2("animationend"),XJ=$2("animationiteration"),ZJ=$2("animationstart"),eX=$2("transitionend"),tX=new Map,ID=new Map,tge=["abort","abort",JJ,"animationEnd",XJ,"animationIteration",ZJ,"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",eX,"transitionEnd","waiting","waiting"];function PD(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)),ID.set(n,e),tX.set(n,i),Sp(i,[n])}}var rge=Zi.unstable_now;rge();var qn=8;function R0(t){if(1&t)return qn=15,1;if(2&t)return qn=14,2;if(4&t)return qn=13,4;var e=24&t;return e!==0?(qn=12,e):t&32?(qn=11,32):(e=192&t,e!==0?(qn=10,e):t&256?(qn=9,256):(e=3584&t,e!==0?(qn=8,e):t&4096?(qn=7,4096):(e=4186112&t,e!==0?(qn=6,e):(e=62914560&t,e!==0?(qn=5,e):t&67108864?(qn=4,67108864):t&134217728?(qn=3,134217728):(e=805306368&t,e!==0?(qn=2,e):1073741824&t?(qn=1,1073741824):(qn=8,t))))))}function nge(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 ige(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(wt(358,t))}}function h1(t,e){var r=t.pendingLanes;if(r===0)return qn=0;var n=0,i=0,a=t.expiredLanes,o=t.suspendedLanes,s=t.pingedLanes;if(a!==0)n=a,i=qn=15;else if(a=r&134217727,a!==0){var c=a&~o;c!==0?(n=R0(c),i=qn):(s&=a,s!==0&&(n=R0(s),i=qn))}else a=r&~o,a!==0?(n=R0(a),i=qn):s!==0&&(n=R0(s),i=qn);if(n===0)return 0;if(n=31-hd(n),n=r&((0>n?0:1<<n)<<1)-1,e!==0&&e!==n&&!(e&o)){if(R0(e),i<=qn)return e;qn=i}if(e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-hd(e),i=1<<r,n|=t[r],e&=~i;return n}function rX(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function eA(t,e){switch(t){case 15:return 1;case 14:return 2;case 12:return t=C0(24&~e),t===0?eA(10,e):t;case 10:return t=C0(192&~e),t===0?eA(8,e):t;case 8:return t=C0(3584&~e),t===0&&(t=C0(4186112&~e),t===0&&(t=512)),t;case 2:return e=C0(805306368&~e),e===0&&(e=268435456),e}throw Error(wt(358,t))}function C0(t){return t&-t}function YI(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function M2(t,e,r){t.pendingLanes|=e;var n=e-1;t.suspendedLanes&=n,t.pingedLanes&=n,t=t.eventTimes,e=31-hd(e),t[e]=r}var hd=Math.clz32?Math.clz32:sge,age=Math.log,oge=Math.LN2;function sge(t){return t===0?32:31-(age(t)/oge|0)|0}var cge=Zi.unstable_UserBlockingPriority,uge=Zi.unstable_runWithPriority,tx=!0;function lge(t,e,r,n){Sh||AD();var i=TD,a=Sh;Sh=!0;try{qJ(i,t,e,r,n)}finally{(Sh=a)||SD()}}function fge(t,e,r,n){uge(cge,TD.bind(null,t,e,r,n))}function TD(t,e,r,n){if(tx){var i;if((i=(e&4)===0)&&0<yu.length&&-1<Z7.indexOf(t))t=$6(null,t,e,r,n),yu.push(t);else{var a=RD(t,e,r,n);if(a===null)i&&eU(t,n);else{if(i){if(-1<Z7.indexOf(t)){t=$6(a,t,e,r,n),yu.push(t);return}if(X0e(a,t,e,r,n))return;eU(t,n)}gX(t,e,n,null,r)}}}}function RD(t,e,r,n){var i=ED(n);if(i=Oh(i),i!==null){var a=Ip(i);if(a===null)i=null;else{var o=a.tag;if(o===13){if(i=zJ(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 gX(t,e,n,i,r),null}var Wf=null,CD=null,rx=null;function nX(){if(rx)return rx;var t,e=CD,r=e.length,n,i="value"in Wf?Wf.value:Wf.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 rx=i.slice(t,1<n?1-n:void 0)}function nx(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 K_(){return!0}function rU(){return!1}function ns(t){function e(r,n,i,a,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in t)t.hasOwnProperty(s)&&(r=t[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?K_:rU,this.isPropagationStopped=rU,this}return ii(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=K_)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=K_)},persist:function(){},isPersistent:K_}),e}var Zy={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ND=ns(Zy),_w=ii({},Zy,{view:0,detail:0}),dge=ns(_w),QI,JI,Vm,k2=ii({},_w,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:DD,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!==Vm&&(Vm&&t.type==="mousemove"?(QI=t.screenX-Vm.screenX,JI=t.screenY-Vm.screenY):JI=QI=0,Vm=t),QI)},movementY:function(t){return"movementY"in t?t.movementY:JI}}),nU=ns(k2),hge=ii({},k2,{dataTransfer:0}),pge=ns(hge),gge=ii({},_w,{relatedTarget:0}),XI=ns(gge),yge=ii({},Zy,{animationName:0,elapsedTime:0,pseudoElement:0}),mge=ns(yge),vge=ii({},Zy,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),bge=ns(vge),wge=ii({},Zy,{data:0}),iU=ns(wge),_ge={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ege={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"},xge={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Age(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=xge[t])?!!e[t]:!1}function DD(){return Age}var Sge=ii({},_w,{key:function(t){if(t.key){var e=_ge[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=nx(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Ege[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:DD,charCode:function(t){return t.type==="keypress"?nx(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?nx(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Oge=ns(Sge),Ige=ii({},k2,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),aU=ns(Ige),Pge=ii({},_w,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:DD}),Tge=ns(Pge),Rge=ii({},Zy,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cge=ns(Rge),Nge=ii({},k2,{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}),Dge=ns(Nge),$ge=[9,13,27,32],$D=Ll&&"CompositionEvent"in window,Mb=null;Ll&&"documentMode"in document&&(Mb=document.documentMode);var Mge=Ll&&"TextEvent"in window&&!Mb,iX=Ll&&(!$D||Mb&&8<Mb&&11>=Mb),oU=String.fromCharCode(32),sU=!1;function aX(t,e){switch(t){case"keyup":return $ge.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oX(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var V0=!1;function kge(t,e){switch(t){case"compositionend":return oX(e);case"keypress":return e.which!==32?null:(sU=!0,oU);case"textInput":return t=e.data,t===oU&&sU?null:t;default:return null}}function Lge(t,e){if(V0)return t==="compositionend"||!$D&&aX(t,e)?(t=nX(),rx=CD=Wf=null,V0=!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 iX&&e.locale!=="ko"?null:e.data;default:return null}}var Uge={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 cU(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Uge[t.type]:e==="textarea"}function sX(t,e,r,n){FJ(n),e=tA(e,"onChange"),0<e.length&&(r=new ND("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var kb=null,p1=null;function Bge(t){dX(t,0)}function L2(t){var e=W0(t);if(DJ(e))return t}function Fge(t,e){if(t==="change")return e}var cX=!1;if(Ll){var ZI;if(Ll){var eP="oninput"in document;if(!eP){var uU=document.createElement("div");uU.setAttribute("oninput","return;"),eP=typeof uU.oninput=="function"}ZI=eP}else ZI=!1;cX=ZI&&(!document.documentMode||9<document.documentMode)}function lU(){kb&&(kb.detachEvent("onpropertychange",uX),p1=kb=null)}function uX(t){if(t.propertyName==="value"&&L2(p1)){var e=[];if(sX(e,p1,t,ED(t)),t=Bge,Sh)t(e);else{Sh=!0;try{xD(t,e)}finally{Sh=!1,SD()}}}}function jge(t,e,r){t==="focusin"?(lU(),kb=e,p1=r,kb.attachEvent("onpropertychange",uX)):t==="focusout"&&lU()}function qge(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return L2(p1)}function Hge(t,e){if(t==="click")return L2(e)}function zge(t,e){if(t==="input"||t==="change")return L2(e)}function Vge(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ms=typeof Object.is=="function"?Object.is:Vge,Gge=Object.prototype.hasOwnProperty;function g1(t,e){if(Ms(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++)if(!Gge.call(e,r[n])||!Ms(t[r[n]],e[r[n]]))return!1;return!0}function fU(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function dU(t,e){var r=fU(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=fU(r)}}function lX(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?lX(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function hU(){for(var t=window,e=Jx();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Jx(t.document)}return e}function M6(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 Wge=Ll&&"documentMode"in document&&11>=document.documentMode,G0=null,k6=null,Lb=null,L6=!1;function pU(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;L6||G0==null||G0!==Jx(n)||(n=G0,"selectionStart"in n&&M6(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}),Lb&&g1(Lb,n)||(Lb=n,n=tA(k6,"onSelect"),0<n.length&&(e=new ND("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=G0)))}PD("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);PD("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);PD(tge,2);for(var gU="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),tP=0;tP<gU.length;tP++)ID.set(gU[tP],0);_y("onMouseEnter",["mouseout","mouseover"]);_y("onMouseLeave",["mouseout","mouseover"]);_y("onPointerEnter",["pointerout","pointerover"]);_y("onPointerLeave",["pointerout","pointerover"]);Sp("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Sp("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Sp("onBeforeInput",["compositionend","keypress","textInput","paste"]);Sp("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Sp("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Sp("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var db="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),fX=new Set("cancel close invalid load scroll toggle".split(" ").concat(db));function yU(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,Q0e(n,e,void 0,t),t.currentTarget=null}function dX(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;yU(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;yU(i,s,u),a=c}}}if(Zx)throw t=N6,Zx=!1,N6=null,t}function Qn(t,e){var r=mX(e),n=t+"__bubble";r.has(n)||(pX(e,t,2,!1),r.add(n))}var mU="_reactListening"+Math.random().toString(36).slice(2);function hX(t){t[mU]||(t[mU]=!0,RJ.forEach(function(e){fX.has(e)||vU(e,!1,t,null),vU(e,!0,t,null)}))}function vU(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&&fX.has(t)){if(t!=="scroll")return;i|=2,a=n}var o=mX(a),s=t+"__"+(e?"capture":"bubble");o.has(s)||(e&&(i|=4),pX(a,t,i,e),o.add(s))}function pX(t,e,r,n){var i=ID.get(e);switch(i===void 0?2:i){case 0:i=lge;break;case 1:i=fge;break;default:i=TD}r=i.bind(null,e,r,t),i=void 0,!C6||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 gX(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=Oh(s),o===null)return;if(c=o.tag,c===5||c===6){n=a=o;continue e}s=s.parentNode}}n=n.return}G0e(function(){var u=a,f=ED(r),d=[];e:{var g=tX.get(t);if(g!==void 0){var m=ND,w=t;switch(t){case"keypress":if(nx(r)===0)break e;case"keydown":case"keyup":m=Oge;break;case"focusin":w="focus",m=XI;break;case"focusout":w="blur",m=XI;break;case"beforeblur":case"afterblur":m=XI;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=nU;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=pge;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Tge;break;case JJ:case XJ:case ZJ:m=mge;break;case eX:m=Cge;break;case"scroll":m=dge;break;case"wheel":m=Dge;break;case"copy":case"cut":case"paste":m=bge;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=aU}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=l1(b,_),x!=null&&v.push(y1(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)&&(Oh(w)||w[em]))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?Oh(w):null,w!==null&&(y=Ip(w),w!==y||w.tag!==5&&w.tag!==6)&&(w=null)):(m=null,w=u),m!==w)){if(v=nU,x="onMouseLeave",_="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(v=aU,x="onPointerLeave",_="onPointerEnter",b="pointer"),y=m==null?g:W0(m),S=w==null?g:W0(w),g=new v(x,b+"leave",m,r,f),g.target=y,g.relatedTarget=S,x=null,Oh(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=h0(S))b++;for(S=0,x=_;x;x=h0(x))S++;for(;0<b-S;)v=h0(v),b--;for(;0<S-b;)_=h0(_),S--;for(;b--;){if(v===_||_!==null&&v===_.alternate)break t;v=h0(v),_=h0(_)}v=null}else v=null;m!==null&&bU(d,g,m,v,!1),w!==null&&y!==null&&bU(d,y,w,v,!0)}}e:{if(g=u?W0(u):window,m=g.nodeName&&g.nodeName.toLowerCase(),m==="select"||m==="input"&&g.type==="file")var O=Fge;else if(cU(g))if(cX)O=zge;else{O=qge;var E=jge}else(m=g.nodeName)&&m.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(O=Hge);if(O&&(O=O(t,u))){sX(d,O,r,f);break e}E&&E(t,g,u),t==="focusout"&&(E=g._wrapperState)&&E.controlled&&g.type==="number"&&x6(g,"number",g.value)}switch(E=u?W0(u):window,t){case"focusin":(cU(E)||E.contentEditable==="true")&&(G0=E,k6=u,Lb=null);break;case"focusout":Lb=k6=G0=null;break;case"mousedown":L6=!0;break;case"contextmenu":case"mouseup":case"dragend":L6=!1,pU(d,r,f);break;case"selectionchange":if(Wge)break;case"keydown":case"keyup":pU(d,r,f)}var p;if($D)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 V0?aX(t,r)&&(I="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(I="onCompositionStart");I&&(iX&&r.locale!=="ko"&&(V0||I!=="onCompositionStart"?I==="onCompositionEnd"&&V0&&(p=nX()):(Wf=f,CD="value"in Wf?Wf.value:Wf.textContent,V0=!0)),E=tA(u,I),0<E.length&&(I=new iU(I,t,null,r,f),d.push({event:I,listeners:E}),p?I.data=p:(p=oX(r),p!==null&&(I.data=p)))),(p=Mge?kge(t,r):Lge(t,r))&&(u=tA(u,"onBeforeInput"),0<u.length&&(f=new iU("onBeforeInput","beforeinput",null,r,f),d.push({event:f,listeners:u}),f.data=p))}dX(d,e)})}function y1(t,e,r){return{instance:t,listener:e,currentTarget:r}}function tA(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=l1(t,r),a!=null&&n.unshift(y1(t,a,i)),a=l1(t,e),a!=null&&n.push(y1(t,a,i))),t=t.return}return n}function h0(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function bU(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=l1(r,a),c!=null&&o.unshift(y1(r,c,s))):i||(c=l1(r,a),c!=null&&o.push(y1(r,c,s)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}function rA(){}var rP=null,nP=null;function yX(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function U6(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 wU=typeof setTimeout=="function"?setTimeout:void 0,Kge=typeof clearTimeout=="function"?clearTimeout:void 0;function MD(t){t.nodeType===1?t.textContent="":t.nodeType===9&&(t=t.body,t!=null&&(t.textContent=""))}function dg(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break}return t}function _U(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 iP=0;function Yge(t){return{$$typeof:wD,toString:t,valueOf:t}}var U2=Math.random().toString(36).slice(2),Kf="__reactFiber$"+U2,nA="__reactProps$"+U2,em="__reactContainer$"+U2,EU="__reactEvents$"+U2;function Oh(t){var e=t[Kf];if(e)return e;for(var r=t.parentNode;r;){if(e=r[em]||r[Kf]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=_U(t);t!==null;){if(r=t[Kf])return r;t=_U(t)}return e}t=r,r=t.parentNode}return null}function Ew(t){return t=t[Kf]||t[em],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function W0(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(wt(33))}function B2(t){return t[nA]||null}function mX(t){var e=t[EU];return e===void 0&&(e=t[EU]=new Set),e}var B6=[],K0=-1;function _d(t){return{current:t}}function Zn(t){0>K0||(t.current=B6[K0],B6[K0]=null,K0--)}function yi(t,e){K0++,B6[K0]=t.current,t.current=e}var pd={},Va=_d(pd),$o=_d(!1),dp=pd;function Ey(t,e){var r=t.type.contextTypes;if(!r)return pd;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 Mo(t){return t=t.childContextTypes,t!=null}function iA(){Zn($o),Zn(Va)}function xU(t,e,r){if(Va.current!==pd)throw Error(wt(168));yi(Va,e),yi($o,r)}function vX(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(wt(108,cg(e)||"Unknown",i));return ii({},r,n)}function ix(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||pd,dp=Va.current,yi(Va,t),yi($o,$o.current),!0}function AU(t,e,r){var n=t.stateNode;if(!n)throw Error(wt(169));r?(t=vX(t,e,dp),n.__reactInternalMemoizedMergedChildContext=t,Zn($o),Zn(Va),yi(Va,t)):Zn($o),yi($o,r)}var kD=null,ip=null,Qge=Zi.unstable_runWithPriority,LD=Zi.unstable_scheduleCallback,F6=Zi.unstable_cancelCallback,Jge=Zi.unstable_shouldYield,SU=Zi.unstable_requestPaint,j6=Zi.unstable_now,Xge=Zi.unstable_getCurrentPriorityLevel,F2=Zi.unstable_ImmediatePriority,bX=Zi.unstable_UserBlockingPriority,wX=Zi.unstable_NormalPriority,_X=Zi.unstable_LowPriority,EX=Zi.unstable_IdlePriority,aP={},Zge=SU!==void 0?SU:function(){},ol=null,ax=null,oP=!1,OU=j6(),ja=1e4>OU?j6:function(){return j6()-OU};function xy(){switch(Xge()){case F2:return 99;case bX:return 98;case wX:return 97;case _X:return 96;case EX:return 95;default:throw Error(wt(332))}}function xX(t){switch(t){case 99:return F2;case 98:return bX;case 97:return wX;case 96:return _X;case 95:return EX;default:throw Error(wt(332))}}function hp(t,e){return t=xX(t),Qge(t,e)}function m1(t,e,r){return t=xX(t),LD(t,e,r)}function Cu(){if(ax!==null){var t=ax;ax=null,F6(t)}AX()}function AX(){if(!oP&&ol!==null){oP=!0;var t=0;try{var e=ol;hp(99,function(){for(;t<e.length;t++){var r=e[t];do r=r(!0);while(r!==null)}}),ol=null}catch(r){throw ol!==null&&(ol=ol.slice(t+1)),LD(F2,Cu),r}finally{oP=!1}}}var eye=Op.ReactCurrentBatchConfig;function yc(t,e){if(t&&t.defaultProps){e=ii({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}var aA=_d(null),oA=null,Y0=null,sA=null;function UD(){sA=Y0=oA=null}function BD(t){var e=aA.current;Zn(aA),t.type._context._currentValue=e}function SX(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 hg(t,e){oA=t,sA=Y0=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Cc=!0),t.firstContext=null)}function Hs(t,e){if(sA!==t&&e!==!1&&e!==0)if((typeof e!="number"||e===1073741823)&&(sA=t,e=1073741823),e={context:t,observedBits:e,next:null},Y0===null){if(oA===null)throw Error(wt(308));Y0=e,oA.dependencies={lanes:0,firstContext:e,responders:null}}else Y0=Y0.next=e;return t._currentValue}var Sf=!1;function FD(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function OX(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 id(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ad(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 IU(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 v1(t,e,r,n){var i=t.updateQueue;Sf=!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=ii({},d,s);break e;case 2:Sf=!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,Aw|=o,t.lanes=o,t.memoizedState=d}}function PU(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(wt(191,i));i.call(n)}}}var IX=new C2.Component().refs;function cA(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:ii({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var j2={isMounted:function(t){return(t=t._reactInternals)?Ip(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=ts(),i=od(t),a=id(n,i);a.payload=e,r!=null&&(a.callback=r),ad(t,a),sd(t,i,n)},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=ts(),i=od(t),a=id(n,i);a.tag=1,a.payload=e,r!=null&&(a.callback=r),ad(t,a),sd(t,i,n)},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=ts(),n=od(t),i=id(r,n);i.tag=2,e!=null&&(i.callback=e),ad(t,i),sd(t,n,r)}};function TU(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?!g1(r,n)||!g1(i,a):!0}function PX(t,e,r){var n=!1,i=pd,a=e.contextType;return typeof a=="object"&&a!==null?a=Hs(a):(i=Mo(e)?dp:Va.current,n=e.contextTypes,a=(n=n!=null)?Ey(t,i):pd),e=new e(r,a),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=j2,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=a),e}function RU(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&&j2.enqueueReplaceState(e,e.state,null)}function q6(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs=IX,FD(t);var a=e.contextType;typeof a=="object"&&a!==null?i.context=Hs(a):(a=Mo(e)?dp:Va.current,i.context=Ey(t,a)),v1(t,r,i,n),i.state=t.memoizedState,a=e.getDerivedStateFromProps,typeof a=="function"&&(cA(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&&j2.enqueueReplaceState(i,i.state,null),v1(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4)}var Y_=Array.isArray;function Gm(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(wt(309));var n=r.stateNode}if(!n)throw Error(wt(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===IX&&(o=n.refs={}),a===null?delete o[i]:o[i]=a},e._stringRef=i,e)}if(typeof t!="string")throw Error(wt(284));if(!r._owner)throw Error(wt(290,t))}return t}function Q_(t,e){if(t.type!=="textarea")throw Error(wt(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=yd(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?(_=fP(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=Gm(y,_,b),S.return=y,S):(S=ux(b.type,b.key,b.props,null,y.mode,S),S.ref=Gm(y,_,b),S.return=y,S)}function u(y,_,b,S){return _===null||_.tag!==4||_.stateNode.containerInfo!==b.containerInfo||_.stateNode.implementation!==b.implementation?(_=dP(b,y.mode,S),_.return=y,_):(_=i(_,b.children||[]),_.return=y,_)}function f(y,_,b,S,x){return _===null||_.tag!==7?(_=mg(b,y.mode,S,x),_.return=y,_):(_=i(_,b),_.return=y,_)}function d(y,_,b){if(typeof _=="string"||typeof _=="number")return _=fP(""+_,y.mode,b),_.return=y,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case lb:return b=ux(_.type,_.key,_.props,null,y.mode,b),b.ref=Gm(y,null,_),b.return=y,b;case Ah:return _=dP(_,y.mode,b),_.return=y,_}if(Y_(_)||Fm(_))return _=mg(_,y.mode,b,null),_.return=y,_;Q_(y,_)}return null}function g(y,_,b,S){var x=_!==null?_.key:null;if(typeof b=="string"||typeof b=="number")return x!==null?null:s(y,_,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case lb:return b.key===x?b.type===Cf?f(y,_,b.props.children,S,x):c(y,_,b,S):null;case Ah:return b.key===x?u(y,_,b,S):null}if(Y_(b)||Fm(b))return x!==null?null:f(y,_,b,S,null);Q_(y,b)}return null}function m(y,_,b,S,x){if(typeof S=="string"||typeof S=="number")return y=y.get(b)||null,s(_,y,""+S,x);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case lb:return y=y.get(S.key===null?b:S.key)||null,S.type===Cf?f(_,y,S.props.children,x,S.key):c(_,y,S,x);case Ah:return y=y.get(S.key===null?b:S.key)||null,u(_,y,S,x)}if(Y_(S)||Fm(S))return y=y.get(b)||null,f(_,y,S,x,null);Q_(_,S)}return null}function w(y,_,b,S){for(var x=null,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=Fm(b);if(typeof x!="function")throw Error(wt(150));if(b=x.call(b),b==null)throw Error(wt(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===Cf&&b.key===null;x&&(b=b.props.children);var O=typeof b=="object"&&b!==null;if(O)switch(b.$$typeof){case lb:e:{for(O=b.key,x=_;x!==null;){if(x.key===O){switch(x.tag){case 7:if(b.type===Cf){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=Gm(y,x,b),_.return=y,y=_;break e}}r(y,x);break}else e(y,x);x=x.sibling}b.type===Cf?(_=mg(b.props.children,y.mode,S,b.key),_.return=y,y=_):(S=ux(b.type,b.key,b.props,null,y.mode,S),S.ref=Gm(y,_,b),S.return=y,y=S)}return o(y);case Ah: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}_=dP(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,_),_=fP(b,y.mode,S),_.return=y,y=_),o(y);if(Y_(b))return w(y,_,b,S);if(Fm(b))return v(y,_,b,S);if(O&&Q_(y,b),typeof b>"u"&&!x)switch(y.tag){case 1:case 22:case 0:case 11:case 15:throw Error(wt(152,cg(y.type)||"Component"))}return r(y,_)}}var uA=TX(!0),RX=TX(!1),xw={},_u=_d(xw),b1=_d(xw),w1=_d(xw);function Ih(t){if(t===xw)throw Error(wt(174));return t}function H6(t,e){switch(yi(w1,e),yi(b1,t),yi(_u,xw),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:I6(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=I6(e,t)}Zn(_u),yi(_u,e)}function Ay(){Zn(_u),Zn(b1),Zn(w1)}function CU(t){Ih(w1.current);var e=Ih(_u.current),r=I6(e,t.type);e!==r&&(yi(b1,t),yi(_u,r))}function jD(t){b1.current===t&&(Zn(_u),Zn(b1))}var gi=_d(0);function lA(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 Al=null,Yf=null,Eu=!1;function CX(t,e){var r=ks(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=e,r.return=t,r.flags=8,t.lastEffect!==null?(t.lastEffect.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r}function NU(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 z6(t){if(Eu){var e=Yf;if(e){var r=e;if(!NU(t,e)){if(e=dg(r.nextSibling),!e||!NU(t,e)){t.flags=t.flags&-1025|2,Eu=!1,Al=t;return}CX(Al,r)}Al=t,Yf=dg(e.firstChild)}else t.flags=t.flags&-1025|2,Eu=!1,Al=t}}function DU(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Al=t}function J_(t){if(t!==Al)return!1;if(!Eu)return DU(t),Eu=!0,!1;var e=t.type;if(t.tag!==5||e!=="head"&&e!=="body"&&!U6(e,t.memoizedProps))for(e=Yf;e;)CX(t,e),e=dg(e.nextSibling);if(DU(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(wt(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Yf=dg(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Yf=null}}else Yf=Al?dg(t.stateNode.nextSibling):null;return!0}function sP(){Yf=Al=null,Eu=!1}var pg=[];function qD(){for(var t=0;t<pg.length;t++)pg[t]._workInProgressVersionPrimary=null;pg.length=0}var Ub=Op.ReactCurrentDispatcher,Us=Op.ReactCurrentBatchConfig,_1=0,Si=null,$a=null,fa=null,fA=!1,Bb=!1;function _o(){throw Error(wt(321))}function HD(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!Ms(t[r],e[r]))return!1;return!0}function zD(t,e,r,n,i,a){if(_1=a,Si=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Ub.current=t===null||t.memoizedState===null?rye:nye,t=r(n,i),Bb){a=0;do{if(Bb=!1,!(25>a))throw Error(wt(301));a+=1,fa=$a=null,e.updateQueue=null,Ub.current=iye,t=r(n,i)}while(Bb)}if(Ub.current=gA,e=$a!==null&&$a.next!==null,_1=0,fa=$a=Si=null,fA=!1,e)throw Error(wt(300));return t}function Ph(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fa===null?Si.memoizedState=fa=t:fa=fa.next=t,fa}function Pp(){if($a===null){var t=Si.alternate;t=t!==null?t.memoizedState:null}else t=$a.next;var e=fa===null?Si.memoizedState:fa.next;if(e!==null)fa=e,$a=t;else{if(t===null)throw Error(wt(310));$a=t,t={memoizedState:$a.memoizedState,baseState:$a.baseState,baseQueue:$a.baseQueue,queue:$a.queue,next:null},fa===null?Si.memoizedState=fa=t:fa=fa.next=t}return fa}function mu(t,e){return typeof e=="function"?e(t):e}function Wm(t){var e=Pp(),r=e.queue;if(r===null)throw Error(wt(311));r.lastRenderedReducer=t;var n=$a,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){i=i.next,n=n.baseState;var s=o=a=null,c=i;do{var u=c.lane;if((_1&u)===u)s!==null&&(s=s.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),n=c.eagerReducer===t?c.eagerState:t(n,c.action);else{var f={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};s===null?(o=s=f,a=n):s=s.next=f,Si.lanes|=u,Aw|=u}c=c.next}while(c!==null&&c!==i);s===null?a=n:s.next=o,Ms(n,e.memoizedState)||(Cc=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=s,r.lastRenderedState=n}return[e.memoizedState,r.dispatch]}function Km(t){var e=Pp(),r=e.queue;if(r===null)throw Error(wt(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,a=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=t(a,o.action),o=o.next;while(o!==i);Ms(a,e.memoizedState)||(Cc=!0),e.memoizedState=a,e.baseQueue===null&&(e.baseState=a),r.lastRenderedState=a}return[a,n]}function $U(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=(_1&t)===t)&&(e._workInProgressVersionPrimary=n,pg.push(e))),t)return r(e._source);throw pg.push(e),Error(wt(350))}function NX(t,e,r,n){var i=so;if(i===null)throw Error(wt(349));var a=e._getVersion,o=a(e._source),s=Ub.current,c=s.useState(function(){return $U(i,e,r)}),u=c[1],f=c[0];c=fa;var d=t.memoizedState,g=d.refs,m=g.getSnapshot,w=d.source;d=d.subscribe;var v=Si;return t.memoizedState={refs:g,source:e,subscribe:n},s.useEffect(function(){g.getSnapshot=r,g.setSnapshot=u;var y=a(e._source);if(!Ms(o,y)){y=r(e._source),Ms(f,y)||(u(y),y=od(v),i.mutableReadLanes|=y&i.pendingLanes),y=i.mutableReadLanes,i.entangledLanes|=y;for(var _=i.entanglements,b=y;0<b;){var S=31-hd(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=od(v);i.mutableReadLanes|=b&i.pendingLanes}catch(S){_(function(){throw S})}})},[e,n]),Ms(m,r)&&Ms(w,e)&&Ms(d,n)||(t={pending:null,dispatch:null,lastRenderedReducer:mu,lastRenderedState:f},t.dispatch=u=WD.bind(null,Si,t),c.queue=t,c.baseQueue=null,f=$U(i,e,r),c.memoizedState=c.baseState=f),f}function DX(t,e,r){var n=Pp();return NX(n,t,e,r)}function Ym(t){var e=Ph();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t=e.queue={pending:null,dispatch:null,lastRenderedReducer:mu,lastRenderedState:t},t=t.dispatch=WD.bind(null,Si,t),[e.memoizedState,t]}function dA(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Si.updateQueue,e===null?(e={lastEffect:null},Si.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function MU(t){var e=Ph();return t={current:t},e.memoizedState=t}function hA(){return Pp().memoizedState}function V6(t,e,r,n){var i=Ph();Si.flags|=t,i.memoizedState=dA(1|e,r,void 0,n===void 0?null:n)}function VD(t,e,r,n){var i=Pp();n=n===void 0?null:n;var a=void 0;if($a!==null){var o=$a.memoizedState;if(a=o.destroy,n!==null&&HD(n,o.deps)){dA(e,r,a,n);return}}Si.flags|=t,i.memoizedState=dA(1|e,r,a,n)}function kU(t,e){return V6(516,4,t,e)}function pA(t,e){return VD(516,4,t,e)}function $X(t,e){return VD(4,2,t,e)}function MX(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 kX(t,e,r){return r=r!=null?r.concat([t]):null,VD(4,2,MX.bind(null,e,t),r)}function GD(){}function LX(t,e){var r=Pp();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&HD(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function UX(t,e){var r=Pp();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&HD(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function tye(t,e){var r=xy();hp(98>r?98:r,function(){t(!0)}),hp(97<r?97:r,function(){var n=Us.transition;Us.transition=1;try{t(!1),e()}finally{Us.transition=n}})}function WD(t,e,r){var n=ts(),i=od(t),a={lane:i,action:r,eagerReducer:null,eagerState:null,next:null},o=e.pending;if(o===null?a.next=a:(a.next=o.next,o.next=a),e.pending=a,o=t.alternate,t===Si||o!==null&&o===Si)Bb=fA=!0;else{if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,c=o(s,r);if(a.eagerReducer=o,a.eagerState=c,Ms(c,s))return}catch{}finally{}sd(t,i,n)}}var gA={readContext:Hs,useCallback:_o,useContext:_o,useEffect:_o,useImperativeHandle:_o,useLayoutEffect:_o,useMemo:_o,useReducer:_o,useRef:_o,useState:_o,useDebugValue:_o,useDeferredValue:_o,useTransition:_o,useMutableSource:_o,useOpaqueIdentifier:_o,unstable_isNewReconciler:!1},rye={readContext:Hs,useCallback:function(t,e){return Ph().memoizedState=[t,e===void 0?null:e],t},useContext:Hs,useEffect:kU,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,V6(4,2,MX.bind(null,e,t),r)},useLayoutEffect:function(t,e){return V6(4,2,t,e)},useMemo:function(t,e){var r=Ph();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Ph();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=WD.bind(null,Si,t),[n.memoizedState,t]},useRef:MU,useState:Ym,useDebugValue:GD,useDeferredValue:function(t){var e=Ym(t),r=e[0],n=e[1];return kU(function(){var i=Us.transition;Us.transition=1;try{n(t)}finally{Us.transition=i}},[t]),r},useTransition:function(){var t=Ym(!1),e=t[0];return t=tye.bind(null,t[1]),MU(t),[t,e]},useMutableSource:function(t,e,r){var n=Ph();return n.memoizedState={refs:{getSnapshot:e,setSnapshot:null},source:t,subscribe:r},NX(n,t,e,r)},useOpaqueIdentifier:function(){if(Eu){var t=!1,e=Yge(function(){throw t||(t=!0,r("r:"+(iP++).toString(36))),Error(wt(355))}),r=Ym(e)[1];return!(Si.mode&2)&&(Si.flags|=516,dA(5,function(){r("r:"+(iP++).toString(36))},void 0,null)),e}return e="r:"+(iP++).toString(36),Ym(e),e},unstable_isNewReconciler:!1},nye={readContext:Hs,useCallback:LX,useContext:Hs,useEffect:pA,useImperativeHandle:kX,useLayoutEffect:$X,useMemo:UX,useReducer:Wm,useRef:hA,useState:function(){return Wm(mu)},useDebugValue:GD,useDeferredValue:function(t){var e=Wm(mu),r=e[0],n=e[1];return pA(function(){var i=Us.transition;Us.transition=1;try{n(t)}finally{Us.transition=i}},[t]),r},useTransition:function(){var t=Wm(mu)[0];return[hA().current,t]},useMutableSource:DX,useOpaqueIdentifier:function(){return Wm(mu)[0]},unstable_isNewReconciler:!1},iye={readContext:Hs,useCallback:LX,useContext:Hs,useEffect:pA,useImperativeHandle:kX,useLayoutEffect:$X,useMemo:UX,useReducer:Km,useRef:hA,useState:function(){return Km(mu)},useDebugValue:GD,useDeferredValue:function(t){var e=Km(mu),r=e[0],n=e[1];return pA(function(){var i=Us.transition;Us.transition=1;try{n(t)}finally{Us.transition=i}},[t]),r},useTransition:function(){var t=Km(mu)[0];return[hA().current,t]},useMutableSource:DX,useOpaqueIdentifier:function(){return Km(mu)[0]},unstable_isNewReconciler:!1},aye=Op.ReactCurrentOwner,Cc=!1;function Io(t,e,r,n){e.child=t===null?RX(e,null,r,n):uA(e,t.child,r,n)}function LU(t,e,r,n,i){r=r.render;var a=e.ref;return hg(e,i),n=zD(t,e,r,n,a,i),t!==null&&!Cc?(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,Sl(t,e,i)):(e.flags|=1,Io(t,e,n,i),e.child)}function UU(t,e,r,n,i,a){if(t===null){var o=r.type;return typeof o=="function"&&!ZD(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,BX(t,e,o,n,i,a)):(t=ux(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:g1,r(i,n)&&t.ref===e.ref)?Sl(t,e,a):(e.flags|=1,t=yd(o,n),t.ref=e.ref,t.return=e,e.child=t)}function BX(t,e,r,n,i,a){if(t!==null&&g1(t.memoizedProps,n)&&t.ref===e.ref)if(Cc=!1,(a&i)!==0)t.flags&16384&&(Cc=!0);else return e.lanes=t.lanes,Sl(t,e,a);return G6(t,e,r,n,a)}function cP(t,e,r){var n=e.pendingProps,i=n.children,a=t!==null?t.memoizedState:null;if(n.mode==="hidden"||n.mode==="unstable-defer-without-hiding")if(!(e.mode&4))e.memoizedState={baseLanes:0},Z_(e,r);else if(r&1073741824)e.memoizedState={baseLanes:0},Z_(e,a!==null?a.baseLanes:r);else return t=a!==null?a.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t},Z_(e,t),null;else a!==null?(n=a.baseLanes|r,e.memoizedState=null):n=r,Z_(e,n);return Io(t,e,i,r),e.child}function FX(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=128)}function G6(t,e,r,n,i){var a=Mo(r)?dp:Va.current;return a=Ey(e,a),hg(e,i),r=zD(t,e,r,n,a,i),t!==null&&!Cc?(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,Sl(t,e,i)):(e.flags|=1,Io(t,e,r,i),e.child)}function BU(t,e,r,n,i){if(Mo(r)){var a=!0;ix(e)}else a=!1;if(hg(e,i),e.stateNode===null)t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),PX(e,r,n),q6(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=Hs(u):(u=Mo(r)?dp:Va.current,u=Ey(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)&&RU(e,o,n,u),Sf=!1;var g=e.memoizedState;o.state=g,v1(e,n,o,i),c=e.memoizedState,s!==n||g!==c||$o.current||Sf?(typeof f=="function"&&(cA(e,r,f,n),c=e.memoizedState),(s=Sf||TU(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,OX(t,e),s=e.memoizedProps,u=e.type===e.elementType?s:yc(e.type,s),o.props=u,d=e.pendingProps,g=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=Hs(c):(c=Mo(r)?dp:Va.current,c=Ey(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)&&RU(e,o,n,c),Sf=!1,g=e.memoizedState,o.state=g,v1(e,n,o,i);var w=e.memoizedState;s!==d||g!==w||$o.current||Sf?(typeof m=="function"&&(cA(e,r,m,n),w=e.memoizedState),(u=Sf||TU(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 W6(t,e,r,n,a,i)}function W6(t,e,r,n,i,a){FX(t,e);var o=(e.flags&64)!==0;if(!n&&!o)return i&&AU(e,r,!1),Sl(t,e,a);n=e.stateNode,aye.current=e;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=uA(e,t.child,null,a),e.child=uA(e,null,s,a)):Io(t,e,s,a),e.memoizedState=n.state,i&&AU(e,r,!0),e.child}function FU(t){var e=t.stateNode;e.pendingContext?xU(t,e.pendingContext,e.pendingContext!==e.context):e.context&&xU(t,e.context,!1),H6(t,e.containerInfo)}var X_={dehydrated:null,retryLane:0};function jU(t,e,r){var n=e.pendingProps,i=gi.current,a=!1,o;return(o=(e.flags&64)!==0)||(o=t!==null&&t.memoizedState===null?!1:(i&2)!==0),o?(a=!0,e.flags&=-65):t!==null&&t.memoizedState===null||n.fallback===void 0||n.unstable_avoidThisFallback===!0||(i|=1),yi(gi,i&1),t===null?(n.fallback!==void 0&&z6(e),t=n.children,i=n.fallback,a?(t=qU(e,t,i,r),e.child.memoizedState={baseLanes:r},e.memoizedState=X_,t):typeof n.unstable_expectedLoadTime=="number"?(t=qU(e,t,i,r),e.child.memoizedState={baseLanes:r},e.memoizedState=X_,e.lanes=33554432,t):(r=e$({mode:"visible",children:t},e.mode,r,null),r.return=e,e.child=r)):t.memoizedState!==null?a?(n=zU(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=X_,n):(r=HU(t,e,n.children,r),e.memoizedState=null,r):a?(n=zU(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=X_,n):(r=HU(t,e,n.children,r),e.memoizedState=null,r)}function qU(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=e$(e,i,0,null),r=mg(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r}function HU(t,e,r,n){var i=t.child;return t=i.sibling,r=yd(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 zU(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=yd(o,s),t!==null?n=yd(t,n):(n=mg(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),SX(t.return,e)}function uP(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 GU(t,e,r){var n=e.pendingProps,i=n.revealOrder,a=n.tail;if(Io(t,e,n.children,r),n=gi.current,n&2)n=n&1|2,e.flags|=64;else{if(t!==null&&t.flags&64)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&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(yi(gi,n),!(e.mode&2))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&lA(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),uP(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&&lA(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}uP(e,!0,r,null,a,e.lastEffect);break;case"together":uP(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function Sl(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Aw|=e.lanes,r&e.childLanes){if(t!==null&&e.child!==t.child)throw Error(wt(153));if(e.child!==null){for(t=e.child,r=yd(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=yd(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}return null}var jX,K6,qX,HX;jX=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}};K6=function(){};qX=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Ih(_u.current);var a=null;switch(r){case"input":i=_6(t,i),n=_6(t,n),a=[];break;case"option":i=A6(t,i),n=A6(t,n),a=[];break;case"select":i=ii({},i,{value:void 0}),n=ii({},n,{value:void 0}),a=[];break;case"textarea":i=S6(t,i),n=S6(t,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=rA)}P6(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"&&(c1.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"&&(c1.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Qn("scroll",t),a||s===c||(a=[])):typeof c=="object"&&c!==null&&c.$$typeof===wD?c.toString():(a=a||[]).push(u,c))}r&&(a=a||[]).push("style",r);var u=a;(e.updateQueue=u)&&(e.flags|=4)}};HX=function(t,e,r,n){r!==n&&(e.flags|=4)};function Qm(t,e){if(!Eu)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 oye(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 Mo(e.type)&&iA(),null;case 3:return Ay(),Zn($o),Zn(Va),qD(),n=e.stateNode,n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(J_(e)?e.flags|=4:n.hydrate||(e.flags|=256)),K6(e),null;case 5:jD(e);var i=Ih(w1.current);if(r=e.type,t!==null&&e.stateNode!=null)qX(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=128);else{if(!n){if(e.stateNode===null)throw Error(wt(166));return null}if(t=Ih(_u.current),J_(e)){n=e.stateNode,r=e.type;var a=e.memoizedProps;switch(n[Kf]=e,n[nA]=a,r){case"dialog":Qn("cancel",n),Qn("close",n);break;case"iframe":case"object":case"embed":Qn("load",n);break;case"video":case"audio":for(t=0;t<db.length;t++)Qn(db[t],n);break;case"source":Qn("error",n);break;case"img":case"image":case"link":Qn("error",n),Qn("load",n);break;case"details":Qn("toggle",n);break;case"input":G7(n,a),Qn("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Qn("invalid",n);break;case"textarea":K7(n,a),Qn("invalid",n)}P6(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]):c1.hasOwnProperty(o)&&i!=null&&o==="onScroll"&&Qn("scroll",n));switch(r){case"input":V_(n),W7(n,a,!0);break;case"textarea":V_(n),Y7(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=rA)}n=t,e.updateQueue=n,n!==null&&(e.flags|=4)}else{switch(o=i.nodeType===9?i:i.ownerDocument,t===O6.html&&(t=kJ(r)),t===O6.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[Kf]=e,t[nA]=n,jX(t,e,!1,!1),e.stateNode=t,o=T6(r,n),r){case"dialog":Qn("cancel",t),Qn("close",t),i=n;break;case"iframe":case"object":case"embed":Qn("load",t),i=n;break;case"video":case"audio":for(i=0;i<db.length;i++)Qn(db[i],t);i=n;break;case"source":Qn("error",t),i=n;break;case"img":case"image":case"link":Qn("error",t),Qn("load",t),i=n;break;case"details":Qn("toggle",t),i=n;break;case"input":G7(t,n),i=_6(t,n),Qn("invalid",t);break;case"option":i=A6(t,n);break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=ii({},n,{value:void 0}),Qn("invalid",t);break;case"textarea":K7(t,n),i=S6(t,n),Qn("invalid",t);break;default:i=n}P6(r,i);var s=i;for(a in s)if(s.hasOwnProperty(a)){var c=s[a];a==="style"?BJ(t,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&LJ(t,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&u1(t,c):typeof c=="number"&&u1(t,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(c1.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Qn("scroll",t):c!=null&&pD(t,a,c,o))}switch(r){case"input":V_(t),W7(t,n,!1);break;case"textarea":V_(t),Y7(t);break;case"option":n.value!=null&&t.setAttribute("value",""+dd(n.value));break;case"select":t.multiple=!!n.multiple,a=n.value,a!=null?ug(t,!!n.multiple,a,!1):n.defaultValue!=null&&ug(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=rA)}yX(r,n)&&(e.flags|=4)}e.ref!==null&&(e.flags|=128)}return null;case 6:if(t&&e.stateNode!=null)HX(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(wt(166));r=Ih(w1.current),Ih(_u.current),J_(e)?(n=e.stateNode,r=e.memoizedProps,n[Kf]=e,n.nodeValue!==r&&(e.flags|=4)):(n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Kf]=e,e.stateNode=n)}return null;case 13:return Zn(gi),n=e.memoizedState,e.flags&64?(e.lanes=r,e):(n=n!==null,r=!1,t===null?e.memoizedProps.fallback!==void 0&&J_(e):r=t.memoizedState!==null,n&&!r&&e.mode&2&&(t===null&&e.memoizedProps.unstable_avoidThisFallback!==!0||gi.current&1?pa===0&&(pa=3):((pa===0||pa===3)&&(pa=4),so===null||!(Aw&134217727)&&!(rm&134217727)||gg(so,qa))),(n||r)&&(e.flags|=4),null);case 4:return Ay(),K6(e),t===null&&hX(e.stateNode.containerInfo),null;case 10:return BD(e),null;case 17:return Mo(e.type)&&iA(),null;case 19:if(Zn(gi),n=e.memoizedState,n===null)return null;if(a=(e.flags&64)!==0,o=n.rendering,o===null)if(a)Qm(n,!1);else{if(pa!==0||t!==null&&t.flags&64)for(t=e.child;t!==null;){if(o=lA(t),o!==null){for(e.flags|=64,Qm(n,!1),a=o.updateQueue,a!==null&&(e.updateQueue=a,e.flags|=4),n.lastEffect===null&&(e.firstEffect=null),e.lastEffect=n.lastEffect,n=r,r=e.child;r!==null;)a=r,t=n,a.flags&=2,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null,o=a.alternate,o===null?(a.childLanes=0,a.lanes=t,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,t=o.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return yi(gi,gi.current&1|2),e.child}t=t.sibling}n.tail!==null&&ja()>e8&&(e.flags|=64,a=!0,Qm(n,!1),e.lanes=33554432)}else{if(!a)if(t=lA(o),t!==null){if(e.flags|=64,a=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Qm(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!Eu)return e=e.lastEffect=n.lastEffect,e!==null&&(e.nextEffect=null),null}else 2*ja()-n.renderingStartTime>e8&&r!==1073741824&&(e.flags|=64,a=!0,Qm(n,!1),e.lanes=33554432);n.isBackwards?(o.sibling=e.child,e.child=o):(r=n.last,r!==null?r.sibling=o:e.child=o,n.last=o)}return n.tail!==null?(r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=e.lastEffect,n.renderingStartTime=ja(),r.sibling=null,e=gi.current,yi(gi,a?e&1|2:e&1),r):null;case 23:case 24:return XD(),t!==null&&t.memoizedState!==null!=(e.memoizedState!==null)&&n.mode!=="unstable-defer-without-hiding"&&(e.flags|=4),null}throw Error(wt(156,e.tag))}function sye(t){switch(t.tag){case 1:Mo(t.type)&&iA();var e=t.flags;return e&4096?(t.flags=e&-4097|64,t):null;case 3:if(Ay(),Zn($o),Zn(Va),qD(),e=t.flags,e&64)throw Error(wt(285));return t.flags=e&-4097|64,t;case 5:return jD(t),null;case 13:return Zn(gi),e=t.flags,e&4096?(t.flags=e&-4097|64,t):null;case 19:return Zn(gi),null;case 4:return Ay(),null;case 10:return BD(t),null;case 23:case 24:return XD(),null;default:return null}}function KD(t,e){try{var r="",n=e;do r+=j0e(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 Y6(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var cye=typeof WeakMap=="function"?WeakMap:Map;function zX(t,e,r){r=id(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){mA||(mA=!0,t8=n),Y6(t,e)},r}function VX(t,e,r){r=id(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return Y6(t,e),n(i)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){typeof n!="function"&&(vu===null?vu=new Set([this]):vu.add(this),Y6(t,e));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}var uye=typeof WeakSet=="function"?WeakSet:Set;function WU(t){var e=t.ref;if(e!==null)if(typeof e=="function")try{e(null)}catch(r){cd(t,r)}else e.current=null}function lye(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:yc(e.type,r),n),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:e.flags&256&&MD(e.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(wt(163))}function fye(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&&(eZ(r,t),bye(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:yc(r.type,e.memoizedProps),t.componentDidUpdate(n,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),e=r.updateQueue,e!==null&&PU(r,e,t);return;case 3:if(e=r.updateQueue,e!==null){if(t=null,r.child!==null)switch(r.child.tag){case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}PU(r,e,t)}return;case 5:t=r.stateNode,e===null&&r.flags&4&&yX(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&&YJ(r))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(wt(163))}function KU(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=UJ("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 YU(t,e){if(ip&&typeof ip.onCommitFiberUnmount=="function")try{ip.onCommitFiberUnmount(kD,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)eZ(e,r);else{n=e;try{i()}catch(a){cd(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){cd(e,a)}break;case 5:WU(e);break;case 4:GX(t,e)}}function QU(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 JU(t){return t.tag===5||t.tag===3||t.tag===4}function XU(t){e:{for(var e=t.return;e!==null;){if(JU(e))break e;e=e.return}throw Error(wt(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(wt(161))}r.flags&16&&(u1(e,""),r.flags&=-17);e:t:for(r=t;;){for(;r.sibling===null;){if(r.return===null||JU(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?Q6(t,r,e):J6(t,r,e)}function Q6(t,e,r){var n=t.tag,i=n===5||n===6;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.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=rA));else if(n!==4&&(t=t.child,t!==null))for(Q6(t,e,r),t=t.sibling;t!==null;)Q6(t,e,r),t=t.sibling}function J6(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(J6(t,e,r),t=t.sibling;t!==null;)J6(t,e,r),t=t.sibling}function GX(t,e){for(var r=e,n=!1,i,a;;){if(!n){n=r.return;e:for(;;){if(n===null)throw Error(wt(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(YU(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(YU(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 lP(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[nA]=n,t==="input"&&n.type==="radio"&&n.name!=null&&$J(r,n),T6(t,i),e=T6(t,n),i=0;i<a.length;i+=2){var o=a[i],s=a[i+1];o==="style"?BJ(r,s):o==="dangerouslySetInnerHTML"?LJ(r,s):o==="children"?u1(r,s):pD(r,o,s,e)}switch(t){case"input":E6(r,n);break;case"textarea":MJ(r,n);break;case"select":t=r._wrapperState.wasMultiple,r._wrapperState.wasMultiple=!!n.multiple,a=n.value,a!=null?ug(r,!!n.multiple,a,!1):t!==!!n.multiple&&(n.defaultValue!=null?ug(r,!!n.multiple,n.defaultValue,!0):ug(r,!!n.multiple,n.multiple?[]:"",!1))}}}return;case 6:if(e.stateNode===null)throw Error(wt(162));e.stateNode.nodeValue=e.memoizedProps;return;case 3:r=e.stateNode,r.hydrate&&(r.hydrate=!1,YJ(r.containerInfo));return;case 12:return;case 13:e.memoizedState!==null&&(JD=ja(),KU(e.child,!0)),ZU(e);return;case 19:ZU(e);return;case 17:return;case 23:case 24:KU(e,e.memoizedState!==null);return}throw Error(wt(163))}function ZU(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new uye),e.forEach(function(n){var i=Eye.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function dye(t,e){return t!==null&&(t=t.memoizedState,t===null||t.dehydrated!==null)?(e=e.memoizedState,e!==null&&e.dehydrated===null):!1}var hye=Math.ceil,yA=Op.ReactCurrentDispatcher,YD=Op.ReactCurrentOwner,Ir=0,so=null,ji=null,qa=0,pp=0,X6=_d(0),pa=0,q2=null,tm=0,Aw=0,rm=0,QD=0,Z6=null,JD=0,e8=1/0;function nm(){e8=ja()+500}var Ht=null,mA=!1,t8=null,vu=null,gd=!1,Fb=null,hb=90,r8=[],n8=[],Rl=null,jb=0,i8=null,ox=-1,El=0,sx=0,qb=null,cx=!1;function ts(){return Ir&48?ja():ox!==-1?ox:ox=ja()}function od(t){if(t=t.mode,!(t&2))return 1;if(!(t&4))return xy()===99?1:2;if(El===0&&(El=tm),eye.transition!==0){sx!==0&&(sx=Z6!==null?Z6.pendingLanes:0),t=El;var e=4186112&~sx;return e&=-e,e===0&&(t=4186112&~t,e=t&-t,e===0&&(e=8192)),e}return t=xy(),Ir&4&&t===98?t=eA(12,El):(t=nge(t),t=eA(t,El)),t}function sd(t,e,r){if(50<jb)throw jb=0,i8=null,Error(wt(185));if(t=H2(t,e),t===null)return null;M2(t,e,r),t===so&&(rm|=e,pa===4&&gg(t,qa));var n=xy();e===1?Ir&8&&!(Ir&48)?a8(t):(zs(t,r),Ir===0&&(nm(),Cu())):(!(Ir&4)||n!==98&&n!==99||(Rl===null?Rl=new Set([t]):Rl.add(t)),zs(t,r)),Z6=t}function H2(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 zs(t,e){for(var r=t.callbackNode,n=t.suspendedLanes,i=t.pingedLanes,a=t.expirationTimes,o=t.pendingLanes;0<o;){var s=31-hd(o),c=1<<s,u=a[s];if(u===-1){if(!(c&n)||c&i){u=e,R0(c);var f=qn;a[s]=10<=f?u+250:6<=f?u+5e3:-1}}else u<=e&&(t.expiredLanes|=c);o&=~c}if(n=h1(t,t===so?qa:0),e=qn,n===0)r!==null&&(r!==aP&&F6(r),t.callbackNode=null,t.callbackPriority=0);else{if(r!==null){if(t.callbackPriority===e)return;r!==aP&&F6(r)}e===15?(r=a8.bind(null,t),ol===null?(ol=[r],ax=LD(F2,AX)):ol.push(r),r=aP):e===14?r=m1(99,a8.bind(null,t)):(r=ige(e),r=m1(r,WX.bind(null,t))),t.callbackPriority=e,t.callbackNode=r}}function WX(t){if(ox=-1,sx=El=0,Ir&48)throw Error(wt(327));var e=t.callbackNode;if(Ed()&&t.callbackNode!==e)return null;var r=h1(t,t===so?qa:0);if(r===0)return null;var n=r,i=Ir;Ir|=16;var a=JX();(so!==t||qa!==n)&&(nm(),yg(t,n));do try{yye();break}catch(s){QX(t,s)}while(1);if(UD(),yA.current=a,Ir=i,ji!==null?n=0:(so=null,qa=0,n=pa),tm&rm)yg(t,0);else if(n!==0){if(n===2&&(Ir|=64,t.hydrate&&(t.hydrate=!1,MD(t.containerInfo)),r=rX(t),r!==0&&(n=pb(t,r))),n===1)throw e=q2,yg(t,0),gg(t,r),zs(t,ja()),e;switch(t.finishedWork=t.current.alternate,t.finishedLanes=r,n){case 0:case 1:throw Error(wt(345));case 2:gh(t);break;case 3:if(gg(t,r),(r&62914560)===r&&(n=JD+500-ja(),10<n)){if(h1(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){ts(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=wU(gh.bind(null,t),n);break}gh(t);break;case 4:if(gg(t,r),(r&4186112)===r)break;for(n=t.eventTimes,i=-1;0<r;){var o=31-hd(r);a=1<<o,o=n[o],o>i&&(i=o),r&=~a}if(r=i,r=ja()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hye(r/1960))-r,10<r){t.timeoutHandle=wU(gh.bind(null,t),r);break}gh(t);break;case 5:gh(t);break;default:throw Error(wt(329))}}return zs(t,ja()),t.callbackNode===e?WX.bind(null,t):null}function gg(t,e){for(e&=~QD,e&=~rm,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-hd(e),n=1<<r;t[r]=-1,e&=~n}}function a8(t){if(Ir&48)throw Error(wt(327));if(Ed(),t===so&&t.expiredLanes&qa){var e=qa,r=pb(t,e);tm&rm&&(e=h1(t,e),r=pb(t,e))}else e=h1(t,0),r=pb(t,e);if(t.tag!==0&&r===2&&(Ir|=64,t.hydrate&&(t.hydrate=!1,MD(t.containerInfo)),e=rX(t),e!==0&&(r=pb(t,e))),r===1)throw r=q2,yg(t,0),gg(t,e),zs(t,ja()),r;return t.finishedWork=t.current.alternate,t.finishedLanes=e,gh(t),zs(t,ja()),null}function pye(){if(Rl!==null){var t=Rl;Rl=null,t.forEach(function(e){e.expiredLanes|=24&e.pendingLanes,zs(e,ja())})}Cu()}function KX(t,e){var r=Ir;Ir|=1;try{return t(e)}finally{Ir=r,Ir===0&&(nm(),Cu())}}function YX(t,e){var r=Ir;Ir&=-2,Ir|=8;try{return t(e)}finally{Ir=r,Ir===0&&(nm(),Cu())}}function Z_(t,e){yi(X6,pp),pp|=e,tm|=e}function XD(){pp=X6.current,Zn(X6)}function yg(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,Kge(r)),ji!==null)for(r=ji.return;r!==null;){var n=r;switch(n.tag){case 1:n=n.type.childContextTypes,n!=null&&iA();break;case 3:Ay(),Zn($o),Zn(Va),qD();break;case 5:jD(n);break;case 4:Ay();break;case 13:Zn(gi);break;case 19:Zn(gi);break;case 10:BD(n);break;case 23:case 24:XD()}r=r.return}so=t,ji=yd(t.current,null),qa=pp=tm=e,pa=0,q2=null,QD=rm=Aw=0}function QX(t,e){do{var r=ji;try{if(UD(),Ub.current=gA,fA){for(var n=Si.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}fA=!1}if(_1=0,fa=$a=Si=null,Bb=!1,YD.current=null,r===null||r.return===null){pa=1,q2=e,ji=null;break}e:{var a=t,o=r.return,s=r,c=e;if(e=qa,s.flags|=2048,s.firstEffect=s.lastEffect=null,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c;if(!(s.mode&2)){var f=s.alternate;f?(s.updateQueue=f.updateQueue,s.memoizedState=f.memoizedState,s.lanes=f.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=(gi.current&1)!==0,g=o;do{var m;if(m=g.tag===13){var w=g.memoizedState;if(w!==null)m=w.dehydrated!==null;else{var v=g.memoizedProps;m=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!d}}if(m){var y=g.updateQueue;if(y===null){var _=new Set;_.add(u),g.updateQueue=_}else y.add(u);if(!(g.mode&2)){if(g.flags|=64,s.flags|=16384,s.flags&=-2981,s.tag===1)if(s.alternate===null)s.tag=17;else{var b=id(-1,1);b.tag=2,ad(s,b)}s.lanes|=1;break e}c=void 0,s=e;var S=a.pingCache;if(S===null?(S=a.pingCache=new cye,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=_ye.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((cg(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.`)}pa!==5&&(pa=2),c=KD(c,s),g=o;do{switch(g.tag){case 3:a=c,g.flags|=4096,e&=-e,g.lanes|=e;var O=zX(g,a,e);IU(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"&&(vu===null||!vu.has(p)))){g.flags|=4096,e&=-e,g.lanes|=e;var I=VX(g,a,e);IU(g,I);break e}}g=g.return}while(g!==null)}ZX(r)}catch(C){e=C,ji===r&&r!==null&&(ji=r=r.return);continue}break}while(1)}function JX(){var t=yA.current;return yA.current=gA,t===null?gA:t}function pb(t,e){var r=Ir;Ir|=16;var n=JX();so===t&&qa===e||yg(t,e);do try{gye();break}catch(i){QX(t,i)}while(1);if(UD(),Ir=r,yA.current=n,ji!==null)throw Error(wt(261));return so=null,qa=0,pa}function gye(){for(;ji!==null;)XX(ji)}function yye(){for(;ji!==null&&!Jge();)XX(ji)}function XX(t){var e=tZ(t.alternate,t,pp);t.memoizedProps=t.pendingProps,e===null?ZX(t):ji=e,YD.current=null}function ZX(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&2048){if(r=sye(e),r!==null){r.flags&=2047,ji=r;return}t!==null&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}else{if(r=oye(r,e,pp),r!==null){ji=r;return}if(r=e,r.tag!==24&&r.tag!==23||r.memoizedState===null||pp&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){ji=e;return}ji=e=t}while(e!==null);pa===0&&(pa=5)}function gh(t){var e=xy();return hp(99,mye.bind(null,t,e)),null}function mye(t,e){do Ed();while(Fb!==null);if(Ir&48)throw Error(wt(327));var r=t.finishedWork;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(wt(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-hd(a),u=1<<c;i[c]=0,o[c]=-1,s[c]=-1,a&=~u}if(Rl!==null&&!(n&24)&&Rl.has(t)&&Rl.delete(t),t===so&&(ji=so=null,qa=0),1<r.flags?r.lastEffect!==null?(r.lastEffect.nextEffect=r,n=r.firstEffect):n=r:n=r.firstEffect,n!==null){if(i=Ir,Ir|=32,YD.current=null,rP=tx,o=hU(),M6(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;nP={focusedElem:o,selectionRange:s},tx=!1,qb=null,cx=!1,Ht=n;do try{vye()}catch(C){if(Ht===null)throw Error(wt(330));cd(Ht,C),Ht=Ht.nextEffect}while(Ht!==null);qb=null,Ht=n;do try{for(o=t;Ht!==null;){var b=Ht.flags;if(b&16&&u1(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:XU(Ht),Ht.flags&=-3;break;case 6:XU(Ht),Ht.flags&=-3,lP(Ht.alternate,Ht);break;case 1024:Ht.flags&=-1025;break;case 1028:Ht.flags&=-1025,lP(Ht.alternate,Ht);break;case 4:lP(Ht.alternate,Ht);break;case 8:s=Ht,GX(o,s);var O=s.alternate;QU(s),O!==null&&QU(O)}Ht=Ht.nextEffect}}catch(C){if(Ht===null)throw Error(wt(330));cd(Ht,C),Ht=Ht.nextEffect}while(Ht!==null);if(x=nP,S=hU(),b=x.focusedElem,o=x.selectionRange,S!==b&&b&&b.ownerDocument&&lX(b.ownerDocument.documentElement,b)){for(o!==null&&M6(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=dU(b,O),a=dU(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}tx=!!rP,nP=rP=null,t.current=r,Ht=n;do try{for(b=t;Ht!==null;){var E=Ht.flags;if(E&36&&fye(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(wt(330));cd(Ht,C),Ht=Ht.nextEffect}while(Ht!==null);Ht=null,Zge(),Ir=i}else t.current=r;if(gd)gd=!1,Fb=t,hb=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&&(vu=null),n===1?t===i8?jb++:(jb=0,i8=t):jb=0,r=r.stateNode,ip&&typeof ip.onCommitFiberRoot=="function")try{ip.onCommitFiberRoot(kD,r,void 0,(r.current.flags&64)===64)}catch{}if(zs(t,ja()),mA)throw mA=!1,t=t8,t8=null,t;return Ir&8||Cu(),null}function vye(){for(;Ht!==null;){var t=Ht.alternate;cx||qb===null||(Ht.flags&8?X7(Ht,qb)&&(cx=!0):Ht.tag===13&&dye(t,Ht)&&X7(Ht,qb)&&(cx=!0));var e=Ht.flags;e&256&&lye(t,Ht),!(e&512)||gd||(gd=!0,m1(97,function(){return Ed(),null})),Ht=Ht.nextEffect}}function Ed(){if(hb!==90){var t=97<hb?97:hb;return hb=90,hp(t,wye)}return!1}function bye(t,e){r8.push(e,t),gd||(gd=!0,m1(97,function(){return Ed(),null}))}function eZ(t,e){n8.push(e,t),gd||(gd=!0,m1(97,function(){return Ed(),null}))}function wye(){if(Fb===null)return!1;var t=Fb;if(Fb=null,Ir&48)throw Error(wt(331));var e=Ir;Ir|=32;var r=n8;n8=[];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(wt(330));cd(a,c)}}for(r=r8,r8=[],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(wt(330));cd(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,Cu(),!0}function eB(t,e,r){e=KD(r,e),e=zX(t,e,1),ad(t,e),e=ts(),t=H2(t,1),t!==null&&(M2(t,1,e),zs(t,e))}function cd(t,e){if(t.tag===3)eB(t,t,e);else for(var r=t.return;r!==null;){if(r.tag===3){eB(r,t,e);break}else if(r.tag===1){var n=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(vu===null||!vu.has(n))){t=KD(e,t);var i=VX(r,t,1);if(ad(r,i),i=ts(),r=H2(r,1),r!==null)M2(r,1,i),zs(r,i);else if(typeof n.componentDidCatch=="function"&&(vu===null||!vu.has(n)))try{n.componentDidCatch(e,t)}catch{}break}}r=r.return}}function _ye(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=ts(),t.pingedLanes|=t.suspendedLanes&r,so===t&&(qa&r)===r&&(pa===4||pa===3&&(qa&62914560)===qa&&500>ja()-JD?yg(t,0):QD|=r),zs(t,e)}function Eye(t,e){var r=t.stateNode;r!==null&&r.delete(e),e=0,e===0&&(e=t.mode,e&2?e&4?(El===0&&(El=tm),e=C0(62914560&~El),e===0&&(e=4194304)):e=xy()===99?1:2:e=1),r=ts(),t=H2(t,e),t!==null&&(M2(t,e,r),zs(t,r))}var tZ;tZ=function(t,e,r){var n=e.lanes;if(t!==null)if(t.memoizedProps!==e.pendingProps||$o.current)Cc=!0;else if(r&n)Cc=!!(t.flags&16384);else{switch(Cc=!1,e.tag){case 3:FU(e),sP();break;case 5:CU(e);break;case 1:Mo(e.type)&&ix(e);break;case 4:H6(e,e.stateNode.containerInfo);break;case 10:n=e.memoizedProps.value;var i=e.type._context;yi(aA,i._currentValue),i._currentValue=n;break;case 13:if(e.memoizedState!==null)return r&e.child.childLanes?jU(t,e,r):(yi(gi,gi.current&1),e=Sl(t,e,r),e!==null?e.sibling:null);yi(gi,gi.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&64){if(n)return GU(t,e,r);e.flags|=64}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),yi(gi,gi.current),n)break;return null;case 23:case 24:return e.lanes=0,cP(t,e,r)}return Sl(t,e,r)}else Cc=!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=Ey(e,Va.current),hg(e,r),i=zD(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,Mo(n)){var a=!0;ix(e)}else a=!1;e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,FD(e);var o=n.getDerivedStateFromProps;typeof o=="function"&&cA(e,n,o,t),i.updater=j2,e.stateNode=i,i._reactInternals=e,q6(e,n,t,r),e=W6(null,e,n,!0,a,r)}else e.tag=0,Io(null,e,i,r),e=e.child;return e;case 16:i=e.elementType;e:{switch(t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,a=i._init,i=a(i._payload),e.type=i,a=e.tag=Aye(i),t=yc(i,t),a){case 0:e=G6(null,e,i,t,r);break e;case 1:e=BU(null,e,i,t,r);break e;case 11:e=LU(null,e,i,t,r);break e;case 14:e=UU(null,e,i,yc(i.type,t),n,r);break e}throw Error(wt(306,i,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:yc(n,i),G6(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:yc(n,i),BU(t,e,n,i,r);case 3:if(FU(e),n=e.updateQueue,t===null||n===null)throw Error(wt(282));if(n=e.pendingProps,i=e.memoizedState,i=i!==null?i.element:null,OX(t,e),v1(e,n,null,r),n=e.memoizedState.element,n===i)sP(),e=Sl(t,e,r);else{if(i=e.stateNode,(a=i.hydrate)&&(Yf=dg(e.stateNode.containerInfo.firstChild),Al=e,a=Eu=!0),a){if(t=i.mutableSourceEagerHydrationData,t!=null)for(i=0;i<t.length;i+=2)a=t[i],a._workInProgressVersionPrimary=t[i+1],pg.push(a);for(r=RX(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|1024,r=r.sibling}else Io(t,e,n,r),sP();e=e.child}return e;case 5:return CU(e),t===null&&z6(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,U6(n,i)?o=null:a!==null&&U6(n,a)&&(e.flags|=16),FX(t,e),Io(t,e,o,r),e.child;case 6:return t===null&&z6(e),null;case 13:return jU(t,e,r);case 4:return H6(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=uA(e,null,n,r):Io(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:yc(n,i),LU(t,e,n,i,r);case 7:return Io(t,e,e.pendingProps,r),e.child;case 8:return Io(t,e,e.pendingProps.children,r),e.child;case 12:return Io(t,e,e.pendingProps.children,r),e.child;case 10:e:{n=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=i.value;var s=e.type._context;if(yi(aA,s._currentValue),s._currentValue=a,o!==null)if(s=o.value,a=Ms(s,a)?0:(typeof n._calculateChangedBits=="function"?n._calculateChangedBits(s,a):1073741823)|0,a===0){if(o.children===i.children&&!$o.current){e=Sl(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=id(-1,r&-r),u.tag=2,ad(s,u)),s.lanes|=r,u=s.alternate,u!==null&&(u.lanes|=r),SX(s.return,r),c.lanes|=r;break}u=u.next}}else o=s.tag===10&&s.type===e.type?null:s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Io(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,a=e.pendingProps,n=a.children,hg(e,r),i=Hs(i,a.unstable_observedBits),n=n(i),e.flags|=1,Io(t,e,n,r),e.child;case 14:return i=e.type,a=yc(i,e.pendingProps),a=yc(i.type,a),UU(t,e,i,a,n,r);case 15:return BX(t,e,e.type,e.pendingProps,n,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:yc(n,i),t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),e.tag=1,Mo(n)?(t=!0,ix(e)):t=!1,hg(e,r),PX(e,n,i),q6(e,n,i,r),W6(null,e,n,!0,t,r);case 19:return GU(t,e,r);case 23:return cP(t,e,r);case 24:return cP(t,e,r)}throw Error(wt(156,e.tag))};function xye(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function ks(t,e,r,n){return new xye(t,e,r,n)}function ZD(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Aye(t){if(typeof t=="function")return ZD(t)?1:0;if(t!=null){if(t=t.$$typeof,t===N2)return 11;if(t===D2)return 14}return 2}function yd(t,e){var r=t.alternate;return r===null?(r=ks(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function ux(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")ZD(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Cf:return mg(r.children,i,a,e);case CJ:o=8,i|=16;break;case gD:o=8,i|=1;break;case Cb:return t=ks(12,r,e,i|8),t.elementType=Cb,t.type=Cb,t.lanes=a,t;case Nb:return t=ks(13,r,e,i),t.type=Nb,t.elementType=Nb,t.lanes=a,t;case Qx:return t=ks(19,r,e,i),t.elementType=Qx,t.lanes=a,t;case _D:return e$(r,i,a,e);case w6:return t=ks(24,r,e,i),t.elementType=w6,t.lanes=a,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case yD:o=10;break e;case mD:o=9;break e;case N2:o=11;break e;case D2:o=14;break e;case vD:o=16,n=null;break e;case bD:o=22;break e}throw Error(wt(130,t==null?t:typeof t,""))}return e=ks(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function mg(t,e,r,n){return t=ks(7,t,n,e),t.lanes=r,t}function e$(t,e,r,n){return t=ks(23,t,n,e),t.elementType=_D,t.lanes=r,t}function fP(t,e,r){return t=ks(6,t,null,e),t.lanes=r,t}function dP(t,e,r){return e=ks(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Sye(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=YI(0),this.expirationTimes=YI(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=YI(0),this.mutableSourceEagerHydrationData=null}function Oye(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ah,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function vA(t,e,r,n){var i=e.current,a=ts(),o=od(i);e:if(r){r=r._reactInternals;t:{if(Ip(r)!==r||r.tag!==1)throw Error(wt(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(Mo(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(s!==null);throw Error(wt(171))}if(r.tag===1){var c=r.type;if(Mo(c)){r=vX(r,c,s);break e}}r=s}else r=pd;return e.context===null?e.context=r:e.pendingContext=r,e=id(a,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),ad(i,e),sd(i,o,a),o}function hP(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 tB(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function t$(t,e){tB(t,e),(t=t.alternate)&&tB(t,e)}function Iye(){return null}function r$(t,e,r){var n=r!=null&&r.hydrationOptions!=null&&r.hydrationOptions.mutableSources||null;if(r=new Sye(t,e,r!=null&&r.hydrate===!0),e=ks(3,null,null,e===2?7:e===1?3:0),r.current=e,e.stateNode=r,FD(e),t[em]=r.current,hX(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}r$.prototype.render=function(t){vA(t,this._internalRoot,null,null)};r$.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;vA(null,t,null,function(){e[em]=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 Pye(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 r$(t,0,e?{hydrate:!0}:void 0)}function z2(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=hP(o);s.call(u)}}vA(e,o,t,i)}else{if(a=r._reactRootContainer=Pye(r,n),o=a._internalRoot,typeof i=="function"){var c=i;i=function(){var u=hP(o);c.call(u)}}YX(function(){vA(e,o,t,i)})}return hP(o)}GJ=function(t){if(t.tag===13){var e=ts();sd(t,4,e),t$(t,4)}};OD=function(t){if(t.tag===13){var e=ts();sd(t,67108864,e),t$(t,67108864)}};WJ=function(t){if(t.tag===13){var e=ts(),r=od(t);sd(t,r,e),t$(t,r)}};KJ=function(t,e){return e()};R6=function(t,e,r){switch(e){case"input":if(E6(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=B2(n);if(!i)throw Error(wt(90));DJ(n),E6(n,i)}}}break;case"textarea":MJ(t,r);break;case"select":e=r.value,e!=null&&ug(t,!!r.multiple,e,!1)}};xD=KX;qJ=function(t,e,r,n,i){var a=Ir;Ir|=4;try{return hp(98,t.bind(null,e,r,n,i))}finally{Ir=a,Ir===0&&(nm(),Cu())}};AD=function(){!(Ir&49)&&(pye(),Ed())};HJ=function(t,e){var r=Ir;Ir|=2;try{return t(e)}finally{Ir=r,Ir===0&&(nm(),Cu())}};function rZ(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Sw(e))throw Error(wt(200));return Oye(t,e,null,r)}var Tye={Events:[Ew,W0,B2,FJ,jJ,Ed,{current:!1}]},Jm={findFiberByHostInstance:Oh,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},Rye={bundleType:Jm.bundleType,version:Jm.version,rendererPackageName:Jm.rendererPackageName,rendererConfig:Jm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Op.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=VJ(t),t===null?null:t.stateNode},findFiberByHostInstance:Jm.findFiberByHostInstance||Iye,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var eE=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!eE.isDisabled&&eE.supportsFiber)try{kD=eE.inject(Rye),ip=eE}catch{}}Ys.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Tye;Ys.createPortal=rZ;Ys.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(wt(188)):Error(wt(268,Object.keys(t)));return t=VJ(e),t=t===null?null:t.stateNode,t};Ys.flushSync=function(t,e){var r=Ir;if(r&48)return t(e);Ir|=1;try{if(t)return hp(99,t.bind(null,e))}finally{Ir=r,Cu()}};Ys.hydrate=function(t,e,r){if(!Sw(e))throw Error(wt(200));return z2(null,t,e,!0,r)};Ys.render=function(t,e,r){if(!Sw(e))throw Error(wt(200));return z2(null,t,e,!1,r)};Ys.unmountComponentAtNode=function(t){if(!Sw(t))throw Error(wt(40));return t._reactRootContainer?(YX(function(){z2(null,null,t,!1,function(){t._reactRootContainer=null,t[em]=null})}),!0):!1};Ys.unstable_batchedUpdates=KX;Ys.unstable_createPortal=function(t,e){return rZ(t,e,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Ys.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Sw(r))throw Error(wt(200));if(t==null||t._reactInternals===void 0)throw Error(wt(38));return z2(t,e,r,!1,n)};Ys.version="17.0.2";function nZ(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nZ)}catch(t){console.error(t)}}nZ(),IJ.exports=Ys;var E1=IJ.exports;const Cye=Bc(E1);/**
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 x1(){return x1=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},x1.apply(this,arguments)}var Qf;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Qf||(Qf={}));const rB="popstate";function Nye(t){t===void 0&&(t={});function e(n,i){let{pathname:a,search:o,hash:s}=n.location;return o8("",{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:iZ(i)}return $ye(e,r,null,t)}function qi(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function n$(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Dye(){return Math.random().toString(36).substr(2,8)}function nB(t,e){return{usr:t.state,key:t.key,idx:e}}function o8(t,e,r,n){return r===void 0&&(r=null),x1({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?im(e):e,{state:r,key:e&&e.key||n||Dye()})}function iZ(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 im(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 $ye(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(x1({},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=o8(v.location,y,_);r&&r(b,y),u=f()+1;let S=nB(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=o8(v.location,y,_);r&&r(b,y),u=f();let S=nB(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:iZ(y);return qi(_,"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(rB,d),c=y,()=>{i.removeEventListener(rB,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 iB;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(iB||(iB={}));function Mye(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?im(e):e,i=sZ(n.pathname||"/",r);if(i==null)return null;let a=aZ(t);kye(a);let o=null;for(let s=0;o==null&&s<a.length;++s)o=Vye(a[s],Kye(i));return o}function aZ(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("/")&&(qi(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=ap([n,c.relativePath]),f=r.concat(c);a.children&&a.children.length>0&&(qi(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),aZ(a.children,e,f,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:Hye(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 oZ(a.path))i(a,o,c)}),e}function oZ(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=oZ(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 kye(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:zye(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Lye=/^:\w+$/,Uye=3,Bye=2,Fye=1,jye=10,qye=-2,aB=t=>t==="*";function Hye(t,e){let r=t.split("/"),n=r.length;return r.some(aB)&&(n+=qye),e&&(n+=Bye),r.filter(i=>!aB(i)).reduce((i,a)=>i+(Lye.test(a)?Uye:a===""?Fye:jye),n)}function zye(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 Vye(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=Gye({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:ap([i,f.pathname]),pathnameBase:eme(ap([i,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(i=ap([i,f.pathnameBase]))}return a}function Gye(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=Wye(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]=Yye(s[d]||"",f),u},{}),pathname:a,pathnameBase:o,pattern:t}}function Wye(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),n$(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 Kye(t){try{return decodeURI(t)}catch(e){return n$(!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 Yye(t,e){try{return decodeURIComponent(t)}catch(r){return n$(!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 sZ(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 Qye(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?im(t):t;return{pathname:r?r.startsWith("/")?r:Jye(r,e):e,search:tme(n),hash:rme(i)}}function Jye(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 pP(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 Xye(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Zye(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=im(t):(i=x1({},t),qi(!i.pathname||!i.pathname.includes("?"),pP("?","pathname","search",i)),qi(!i.pathname||!i.pathname.includes("#"),pP("#","pathname","hash",i)),qi(!i.search||!i.search.includes("#"),pP("#","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=Qye(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const ap=t=>t.join("/").replace(/\/\/+/g,"/"),eme=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),tme=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,rme=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function nme(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const cZ=["post","put","patch","delete"];new Set(cZ);const ime=["get",...cZ];new Set(ime);/**
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 bA(){return bA=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},bA.apply(this,arguments)}const i$=ze.createContext(null),ame=ze.createContext(null),V2=ze.createContext(null),G2=ze.createContext(null),Tp=ze.createContext({outlet:null,matches:[],isDataRoute:!1}),uZ=ze.createContext(null);function W2(){return ze.useContext(G2)!=null}function Ow(){return W2()||qi(!1),ze.useContext(G2).location}function lZ(t){ze.useContext(V2).static||ze.useLayoutEffect(t)}function Iw(){let{isDataRoute:t}=ze.useContext(Tp);return t?bme():ome()}function ome(){W2()||qi(!1);let t=ze.useContext(i$),{basename:e,navigator:r}=ze.useContext(V2),{matches:n}=ze.useContext(Tp),{pathname:i}=Ow(),a=JSON.stringify(Xye(n).map(c=>c.pathnameBase)),o=ze.useRef(!1);return lZ(()=>{o.current=!0}),ze.useCallback(function(c,u){if(u===void 0&&(u={}),!o.current)return;if(typeof c=="number"){r.go(c);return}let f=Zye(c,JSON.parse(a),i,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:ap([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,a,i,t])}function sme(){let{matches:t}=ze.useContext(Tp),e=t[t.length-1];return e?e.params:{}}function cme(t,e){return ume(t,e)}function ume(t,e,r){W2()||qi(!1);let{navigator:n}=ze.useContext(V2),{matches:i}=ze.useContext(Tp),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let c=Ow(),u;if(e){var f;let v=typeof e=="string"?im(e):e;s==="/"||(f=v.pathname)!=null&&f.startsWith(s)||qi(!1),u=v}else u=c;let d=u.pathname||"/",g=s==="/"?d:d.slice(s.length)||"/",m=Mye(t,{pathname:g}),w=pme(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},o,v.params),pathname:ap([s,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:ap([s,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,r);return e&&w?ze.createElement(G2.Provider,{value:{location:bA({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Qf.Pop}},w):w}function lme(){let t=vme(),e=nme(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 ze.createElement(ze.Fragment,null,ze.createElement("h2",null,"Unexpected Application Error!"),ze.createElement("h3",{style:{fontStyle:"italic"}},e),r?ze.createElement("pre",{style:i},r):null,a)}const fme=ze.createElement(lme,null);class dme extends ze.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?ze.createElement(Tp.Provider,{value:this.props.routeContext},ze.createElement(uZ.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function hme(t){let{routeContext:e,match:r,children:n}=t,i=ze.useContext(i$);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),ze.createElement(Tp.Provider,{value:e},n)}function pme(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||qi(!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||fme);let g=e.concat(a.slice(0,u+1)),m=()=>{let w;return f?w=d:c.route.Component?w=ze.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=s,ze.createElement(hme,{match:c,routeContext:{outlet:s,matches:g,isDataRoute:r!=null},children:w})};return r&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?ze.createElement(dme,{location:r.location,revalidation:r.revalidation,component:d,error:f,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var fZ=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(fZ||{}),wA=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}(wA||{});function gme(t){let e=ze.useContext(i$);return e||qi(!1),e}function yme(t){let e=ze.useContext(ame);return e||qi(!1),e}function mme(t){let e=ze.useContext(Tp);return e||qi(!1),e}function dZ(t){let e=mme(),r=e.matches[e.matches.length-1];return r.route.id||qi(!1),r.route.id}function vme(){var t;let e=ze.useContext(uZ),r=yme(wA.UseRouteError),n=dZ(wA.UseRouteError);return e||((t=r.errors)==null?void 0:t[n])}function bme(){let{router:t}=gme(fZ.UseNavigateStable),e=dZ(wA.UseNavigateStable),r=ze.useRef(!1);return lZ(()=>{r.current=!0}),ze.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,bA({fromRouteId:e},a)))},[t,e])}function N0(t){qi(!1)}function wme(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Qf.Pop,navigator:a,static:o=!1}=t;W2()&&qi(!1);let s=e.replace(/^\/*/,"/"),c=ze.useMemo(()=>({basename:s,navigator:a,static:o}),[s,a,o]);typeof n=="string"&&(n=im(n));let{pathname:u="/",search:f="",hash:d="",state:g=null,key:m="default"}=n,w=ze.useMemo(()=>{let v=sZ(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:ze.createElement(V2.Provider,{value:c},ze.createElement(G2.Provider,{children:r,value:w}))}function _me(t){let{children:e,location:r}=t;return cme(s8(e),r)}new Promise(()=>{});function s8(t,e){e===void 0&&(e=[]);let r=[];return ze.Children.forEach(t,(n,i)=>{if(!ze.isValidElement(n))return;let a=[...e,i];if(n.type===ze.Fragment){r.push.apply(r,s8(n.props.children,a));return}n.type!==N0&&qi(!1),!n.props.index||!n.props.children||qi(!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=s8(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 c8(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 Eme(t,e){let r=c8(t);return e&&e.forEach((n,i)=>{r.has(i)||e.getAll(i).forEach(a=>{r.append(i,a)})}),r}const xme="startTransition",oB=C0e[xme];function Ame(t){let{basename:e,children:r,future:n,window:i}=t,a=ze.useRef();a.current==null&&(a.current=Nye({window:i,v5Compat:!0}));let o=a.current,[s,c]=ze.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},f=ze.useCallback(d=>{u&&oB?oB(()=>c(d)):c(d)},[c,u]);return ze.useLayoutEffect(()=>o.listen(f),[o,f]),ze.createElement(wme,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o})}var sB;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(sB||(sB={}));var cB;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(cB||(cB={}));function Sme(t){let e=ze.useRef(c8(t)),r=ze.useRef(!1),n=Ow(),i=ze.useMemo(()=>Eme(n.search,r.current?null:e.current),[n.search]),a=Iw(),o=ze.useCallback((s,c)=>{const u=c8(typeof s=="function"?s(i):s);r.current=!0,a("?"+u,c)},[a,i]);return[i,o]}const hZ="6.8.0";function Ome(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 Da(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 Jt(t,e,r){for(let n in e){let i=e[n];const a=r?r[n]:null;a&&Ome(i,a,n),Object.defineProperty(t,n,{enumerable:!0,value:i,writable:!1})}}function Q0(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(Q0).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 Q0(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=>`${Q0(r)}: ${Q0(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Bs(t,e){return t&&t.code===e}function a$(t){return Bs(t,"CALL_EXCEPTION")}function Fi(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: ${Q0(r)}`);for(const o in r){if(o==="shortMessage")continue;const s=r[o];a.push(o+"="+Q0(s))}}a.push(`code=${e}`),a.push(`version=${hZ}`),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 Jt(i,{code:e}),r&&Object.assign(i,r),i.shortMessage==null&&Jt(i,{shortMessage:n}),i}function at(t,e,r,n){if(!t)throw Fi(e,r,n)}function De(t,e,r,n){at(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function pZ(t,e,r){r==null&&(r=""),r&&(r=": "+r),at(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),at(t<=e,"too many arguemnts"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const Ime=["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 gZ(t){at(Ime.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function xd(t,e,r){if(r==null&&(r=""),t!==e){let n=r,i="new";r&&(n+=".",i+=" "+r),at(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function yZ(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}De(!1,"invalid BytesLike value",e||"value",t)}function zt(t,e){return yZ(t,e,!1)}function Fa(t,e){return yZ(t,e,!0)}function di(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&t.length!==2+2*e||e===!0&&t.length%2!==0)}function mZ(t){return di(t,!0)||t instanceof Uint8Array}const uB="0123456789abcdef";function xt(t){const e=zt(t);let r="0x";for(let n=0;n<e.length;n++){const i=e[n];r+=uB[(i&240)>>4]+uB[i&15]}return r}function Wn(t){return"0x"+t.map(e=>xt(e).substring(2)).join("")}function vg(t){return di(t,!0)?(t.length-2)/2:zt(t).length}function Jn(t,e,r){const n=zt(t);return r!=null&&r>n.length&&at(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),xt(n.slice(e??0,r??n.length))}function vZ(t,e,r){const n=zt(t);at(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 gp(t,e){return vZ(t,e,!0)}function Pme(t,e){return vZ(t,e,!1)}const K2=BigInt(0),Pc=BigInt(1),J0=9007199254740991;function _A(t,e){const r=Y2(t,"value"),n=BigInt(Fr(e,"width"));if(at(r>>n===K2,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Pc){const i=(Pc<<n)-Pc;return-((~r&i)+Pc)}return r}function bZ(t,e){let r=ar(t,"value");const n=BigInt(Fr(e,"width")),i=Pc<<n-Pc;if(r<K2){r=-r,at(r<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});const a=(Pc<<n)-Pc;return(~r&a)+Pc}else at(r<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});return r}function Th(t,e){const r=Y2(t,"value"),n=BigInt(Fr(e,"bits"));return r&(Pc<<n)-Pc}function ar(t,e){switch(typeof t){case"bigint":return t;case"number":return De(Number.isInteger(t),"underflow",e||"value",t),De(t>=-J0&&t<=J0,"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){De(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}De(!1,"invalid BigNumberish value",e||"value",t)}function Y2(t,e){const r=ar(t,e);return at(r>=K2,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const lB="0123456789abcdef";function Pw(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=lB[r>>4],e+=lB[r&15];return BigInt(e)}return ar(t)}function Fr(t,e){switch(typeof t){case"bigint":return De(t>=-J0&&t<=J0,"overflow",e||"value",t),Number(t);case"number":return De(Number.isInteger(t),"underflow",e||"value",t),De(t>=-J0&&t<=J0,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return Fr(BigInt(t),e)}catch(r){De(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}De(!1,"invalid numeric value",e||"value",t)}function Tme(t){return Fr(Pw(t))}function Ul(t,e){let n=Y2(t,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const i=Fr(e,"width");for(at(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 No(t){const e=Y2(t,"value");if(e===K2)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 X0(t){let e=xt(mZ(t)?t:No(t)).substring(2);for(;e.startsWith("0");)e=e.substring(1);return e===""&&(e="0"),"0x"+e}const u8="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let tE=null;function Rme(t){if(tE==null){tE={};for(let r=0;r<u8.length;r++)tE[u8[r]]=BigInt(r)}const e=tE[t];return De(e!=null,"invalid base58 value","letter",t),e}const Cme=BigInt(0),l8=BigInt(58);function wZ(t){let e=Pw(zt(t)),r="";for(;e;)r=u8[Number(e%l8)]+r,e/=l8;return r}function Nme(t){let e=Cme;for(let r=0;r<t.length;r++)e*=l8,e+=Rme(t[r]);return e}function Dme(t){t=atob(t);const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return zt(e)}function $me(t){const e=zt(t);let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}var Dg;class _Z{constructor(e,r,n){je(this,"filter");je(this,"emitter");Je(this,Dg,void 0);Te(this,Dg,r),Jt(this,{emitter:e,filter:n})}async removeListener(){K(this,Dg)!=null&&await this.emitter.off(this.filter,K(this,Dg))}}Dg=new WeakMap;function Mme(t,e,r,n,i){De(!1,`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function EZ(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 kme(t,e,r,n,i){return t==="OVERLONG"?(De(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),EZ(t,e,r))}const Lme=Object.freeze({error:Mme,ignore:EZ,replace:kme});function Ume(t,e){e==null&&(e=Lme.error);const r=zt(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 co(t,e){e!=null&&(gZ(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);De(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 Bme(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function o$(t,e){return Bme(Ume(t,e))}function xZ(t){async function e(r,n){const i=r.url.split(":")[0].toLowerCase();at(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),at(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 Fme=12,jme=250;let fB=xZ();const qme=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Hme=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let gP=!1;async function AZ(t,e){try{const r=t.match(qme);if(!r)throw new Error("invalid data");return new ud(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?Dme(r[3]):Vme(r[3]))}catch{return new ud(599,"BAD REQUEST (invalid data: URI)",{},null,new md(t))}}function SZ(t){async function e(r,n){try{const i=r.match(Hme);if(!i)throw new Error("invalid link");return new md(`${t}${i[2]}`)}catch{return new ud(599,"BAD REQUEST (invalid IPFS URI)",{},null,new md(r))}}return e}const rE={data:AZ,ipfs:SZ("https://gateway.ipfs.io/ipfs/")},OZ=new WeakMap;var Lh,Nf;class zme{constructor(e){Je(this,Lh,void 0);Je(this,Nf,void 0);Te(this,Lh,[]),Te(this,Nf,!1),OZ.set(e,()=>{if(!K(this,Nf)){Te(this,Nf,!0);for(const r of K(this,Lh))setTimeout(()=>{r()},0);Te(this,Lh,[])}})}addListener(e){at(!K(this,Nf),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),K(this,Lh).push(e)}get cancelled(){return K(this,Nf)}checkSignal(){at(!this.cancelled,"cancelled","CANCELLED",{})}}Lh=new WeakMap,Nf=new WeakMap;function nE(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var $g,Mg,bc,cl,kg,Lg,Yi,Yo,ul,Uh,Bh,Fh,iu,ll,Df,jh,gb;const x2=class x2{constructor(e){Je(this,jh);Je(this,$g,void 0);Je(this,Mg,void 0);Je(this,bc,void 0);Je(this,cl,void 0);Je(this,kg,void 0);Je(this,Lg,void 0);Je(this,Yi,void 0);Je(this,Yo,void 0);Je(this,ul,void 0);Je(this,Uh,void 0);Je(this,Bh,void 0);Je(this,Fh,void 0);Je(this,iu,void 0);Je(this,ll,void 0);Je(this,Df,void 0);Te(this,Lg,String(e)),Te(this,$g,!1),Te(this,Mg,!0),Te(this,bc,{}),Te(this,cl,""),Te(this,kg,3e5),Te(this,ll,{slotInterval:jme,maxAttempts:Fme}),Te(this,Df,null)}get url(){return K(this,Lg)}set url(e){Te(this,Lg,String(e))}get body(){return K(this,Yi)==null?null:new Uint8Array(K(this,Yi))}set body(e){if(e==null)Te(this,Yi,void 0),Te(this,Yo,void 0);else if(typeof e=="string")Te(this,Yi,co(e)),Te(this,Yo,"text/plain");else if(e instanceof Uint8Array)Te(this,Yi,e),Te(this,Yo,"application/octet-stream");else if(typeof e=="object")Te(this,Yi,co(JSON.stringify(e))),Te(this,Yo,"application/json");else throw new Error("invalid body")}hasBody(){return K(this,Yi)!=null}get method(){return K(this,cl)?K(this,cl):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),Te(this,cl,String(e).toUpperCase())}get headers(){const e=Object.assign({},K(this,bc));return K(this,ul)&&(e.authorization=`Basic ${$me(co(K(this,ul)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&K(this,Yo)&&(e["content-type"]=K(this,Yo)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){K(this,bc)[String(e).toLowerCase()]=String(r)}clearHeaders(){Te(this,bc,{})}[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 K(this,ul)||null}setCredentials(e,r){De(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),Te(this,ul,`${e}:${r}`)}get allowGzip(){return K(this,Mg)}set allowGzip(e){Te(this,Mg,!!e)}get allowInsecureAuthentication(){return!!K(this,$g)}set allowInsecureAuthentication(e){Te(this,$g,!!e)}get timeout(){return K(this,kg)}set timeout(e){De(e>=0,"timeout must be non-zero","timeout",e),Te(this,kg,e)}get preflightFunc(){return K(this,Uh)||null}set preflightFunc(e){Te(this,Uh,e)}get processFunc(){return K(this,Bh)||null}set processFunc(e){Te(this,Bh,e)}get retryFunc(){return K(this,Fh)||null}set retryFunc(e){Te(this,Fh,e)}get getUrlFunc(){return K(this,Df)||fB}set getUrlFunc(e){Te(this,Df,e)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${K(this,Yi)?xt(K(this,Yi)):"null"}>`}setThrottleParams(e){e.slotInterval!=null&&(K(this,ll).slotInterval=e.slotInterval),e.maxAttempts!=null&&(K(this,ll).maxAttempts=e.maxAttempts)}send(){return at(K(this,iu)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),Te(this,iu,new zme(this)),ut(this,jh,gb).call(this,0,dB()+this.timeout,0,this,new ud(0,"",{},null,this))}cancel(){at(K(this,iu)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=OZ.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();at(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 x2(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,Te(i,bc,Object.assign({},K(this,bc))),K(this,Yi)&&Te(i,Yi,new Uint8Array(K(this,Yi))),Te(i,Yo,K(this,Yo)),i}clone(){const e=new x2(this.url);return Te(e,cl,K(this,cl)),K(this,Yi)&&Te(e,Yi,K(this,Yi)),Te(e,Yo,K(this,Yo)),Te(e,bc,Object.assign({},K(this,bc))),Te(e,ul,K(this,ul)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),Te(e,Uh,K(this,Uh)),Te(e,Bh,K(this,Bh)),Te(e,Fh,K(this,Fh)),Te(e,Df,K(this,Df)),e}static lockConfig(){gP=!0}static getGateway(e){return rE[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(gP)throw new Error("gateways locked");rE[e]=r}static registerGetUrl(e){if(gP)throw new Error("gateways locked");fB=e}static createGetUrlFunc(e){return xZ()}static createDataGateway(){return AZ}static createIpfsGatewayFunc(e){return SZ(e)}};$g=new WeakMap,Mg=new WeakMap,bc=new WeakMap,cl=new WeakMap,kg=new WeakMap,Lg=new WeakMap,Yi=new WeakMap,Yo=new WeakMap,ul=new WeakMap,Uh=new WeakMap,Bh=new WeakMap,Fh=new WeakMap,iu=new WeakMap,ll=new WeakMap,Df=new WeakMap,jh=new WeakSet,gb=async function(e,r,n,i,a){var f,d,g;if(e>=K(this,ll).maxAttempts)return a.makeServerError("exceeded maximum retry limit");at(dB()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await Gme(n);let o=this.clone();const s=(o.url.split(":")[0]||"").toLowerCase();if(s in rE){const m=await rE[s](o.url,nE(K(i,iu)));if(m instanceof ud){let w=m;if(this.processFunc){nE(K(i,iu));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,nE(K(i,iu)));let u=new ud(c.statusCode,c.statusMessage,c.headers,c.body,i);if(u.statusCode===301||u.statusCode===302){try{const m=u.headers.location||"";return ut(f=o.redirect(m),jh,gb).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=K(this,ll).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof m=="string"&&m.match(/^[1-9][0-9]*$/)&&(w=parseInt(m)),ut(d=o.clone(),jh,gb).call(d,e+1,r,w,i,u)}if(this.processFunc){nE(K(i,iu));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=K(this,ll).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return m.stall>=0&&(w=m.stall),ut(g=o.clone(),jh,gb).call(g,e+1,r,w,i,u)}}return u};let md=x2;var K1,Y1,Q1,wc,Ug,qh;const zL=class zL{constructor(e,r,n,i,a){Je(this,K1,void 0);Je(this,Y1,void 0);Je(this,Q1,void 0);Je(this,wc,void 0);Je(this,Ug,void 0);Je(this,qh,void 0);Te(this,K1,e),Te(this,Y1,r),Te(this,Q1,Object.keys(n).reduce((o,s)=>(o[s.toLowerCase()]=String(n[s]),o),{})),Te(this,wc,i==null?null:new Uint8Array(i)),Te(this,Ug,a||null),Te(this,qh,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${K(this,wc)?xt(K(this,wc)):"null"}>`}get statusCode(){return K(this,K1)}get statusMessage(){return K(this,Y1)}get headers(){return Object.assign({},K(this,Q1))}get body(){return K(this,wc)==null?null:new Uint8Array(K(this,wc))}get bodyText(){try{return K(this,wc)==null?"":o$(K(this,wc))}catch{at(!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{at(!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 zL(599,n,this.headers,this.body,K(this,Ug)||void 0);return Te(i,qh,{message:e,error:r}),i}throwThrottleError(e,r){r==null?r=-1:De(Number.isInteger(r)&&r>=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw Jt(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return K(this,wc)!=null}get request(){return K(this,Ug)}ok(){return K(this,qh).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=K(this,qh);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`),at(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r})}};K1=new WeakMap,Y1=new WeakMap,Q1=new WeakMap,wc=new WeakMap,Ug=new WeakMap,qh=new WeakMap;let ud=zL;function dB(){return new Date().getTime()}function Vme(t){return co(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function Gme(t){return new Promise(e=>setTimeout(e,t))}const Wme=BigInt(-1),hc=BigInt(0),Z0=BigInt(1),Kme=BigInt(5),p0={};let bg="0000";for(;bg.length<80;)bg+=bg;function th(t){let e=bg;for(;e.length<t;)e+=e;return BigInt("1"+e.substring(0,t))}function Xm(t,e,r){const n=BigInt(e.width);if(e.signed){const i=Z0<<n-Z0;at(r==null||t>=-i&&t<i,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t>hc?t=_A(Th(t,n),n):t=-_A(Th(-t,n),n)}else{const i=Z0<<n;at(r==null||t>=0&&t<i,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t=(t%i+i)%i&i-Z0}return t}function yP(t){typeof t=="number"&&(t=`fixed128x${t}`);let e=!0,r=128,n=18;if(typeof t=="string"){if(t!=="fixed")if(t==="ufixed")e=!1;else{const a=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);De(a,"invalid fixed format","format",t),e=a[1]!=="u",r=parseInt(a[2]),n=parseInt(a[3])}}else if(t){const a=t,o=(s,c,u)=>a[s]==null?u:(De(typeof a[s]===c,"invalid fixed format ("+s+" not "+c+")","format."+s,a[s]),a[s]);e=o("signed","boolean",e),r=o("width","number",r),n=o("decimals","number",n)}De(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),De(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const i=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:i}}function Yme(t,e){let r="";t<hc&&(r="-",t*=Wme);let n=t.toString();if(e===0)return r+n;for(;n.length<=e;)n=bg+n;const i=n.length-e;for(n=n.substring(0,i)+"."+n.substring(i);n[0]==="0"&&n[1]!==".";)n=n.substring(1);for(;n[n.length-1]==="0"&&n[n.length-2]!==".";)n=n.substring(0,n.length-1);return r+n}var _c,Mn,Xa,fl,yh,Ec,tl,J1,d8,X1,h8,Z1,p8,ew,g8;const Tf=class Tf{constructor(e,r,n){Je(this,fl);Je(this,Ec);Je(this,J1);Je(this,X1);Je(this,Z1);Je(this,ew);je(this,"format");Je(this,_c,void 0);Je(this,Mn,void 0);Je(this,Xa,void 0);je(this,"_value");xd(e,p0,"FixedNumber"),Te(this,Mn,r),Te(this,_c,n);const i=Yme(r,n.decimals);Jt(this,{format:n.name,_value:i}),Te(this,Xa,th(n.decimals))}get signed(){return K(this,_c).signed}get width(){return K(this,_c).width}get decimals(){return K(this,_c).decimals}get value(){return K(this,Mn)}addUnsafe(e){return ut(this,J1,d8).call(this,e)}add(e){return ut(this,J1,d8).call(this,e,"add")}subUnsafe(e){return ut(this,X1,h8).call(this,e)}sub(e){return ut(this,X1,h8).call(this,e,"sub")}mulUnsafe(e){return ut(this,Z1,p8).call(this,e)}mul(e){return ut(this,Z1,p8).call(this,e,"mul")}mulSignal(e){ut(this,fl,yh).call(this,e);const r=K(this,Mn)*K(e,Mn);return at(r%K(this,Xa)===hc,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),ut(this,Ec,tl).call(this,r/K(this,Xa),"mulSignal")}divUnsafe(e){return ut(this,ew,g8).call(this,e)}div(e){return ut(this,ew,g8).call(this,e,"div")}divSignal(e){at(K(e,Mn)!==hc,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),ut(this,fl,yh).call(this,e);const r=K(this,Mn)*K(this,Xa);return at(r%K(e,Mn)===hc,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),ut(this,Ec,tl).call(this,r/K(e,Mn),"divSignal")}cmp(e){let r=this.value,n=e.value;const i=this.decimals-e.decimals;return i>0?n*=th(i):i<0&&(r*=th(-i)),r<n?-1:r>n?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=K(this,Mn);return K(this,Mn)<hc&&(e-=K(this,Xa)-Z0),e=K(this,Mn)/K(this,Xa)*K(this,Xa),ut(this,Ec,tl).call(this,e,"floor")}ceiling(){let e=K(this,Mn);return K(this,Mn)>hc&&(e+=K(this,Xa)-Z0),e=K(this,Mn)/K(this,Xa)*K(this,Xa),ut(this,Ec,tl).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=Kme*th(r-1);let i=this.value+n;const a=th(r);return i=i/a*a,Xm(i,K(this,_c),"round"),new Tf(p0,i,K(this,_c))}isZero(){return K(this,Mn)===hc}isNegative(){return K(this,Mn)<hc}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Tf.fromString(this.toString(),e)}static fromValue(e,r,n){const i=r==null?0:Fr(r),a=yP(n);let o=ar(e,"value");const s=i-a.decimals;if(s>0){const c=th(s);at(o%c===hc,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else s<0&&(o*=th(-s));return Xm(o,a,"fromValue"),new Tf(p0,o,a)}static fromString(e,r){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);De(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const i=yP(r);let a=n[2]||"0",o=n[3]||"";for(;o.length<i.decimals;)o+=bg;at(o.substring(i.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),o=o.substring(0,i.decimals);const s=BigInt(n[1]+a+o);return Xm(s,i,"fromString"),new Tf(p0,s,i)}static fromBytes(e,r){let n=Pw(zt(e,"value"));const i=yP(r);return i.signed&&(n=_A(n,i.width)),Xm(n,i,"fromBytes"),new Tf(p0,n,i)}};_c=new WeakMap,Mn=new WeakMap,Xa=new WeakMap,fl=new WeakSet,yh=function(e){De(this.format===e.format,"incompatible format; use fixedNumber.toFormat","other",e)},Ec=new WeakSet,tl=function(e,r){return e=Xm(e,K(this,_c),r),new Tf(p0,e,K(this,_c))},J1=new WeakSet,d8=function(e,r){return ut(this,fl,yh).call(this,e),ut(this,Ec,tl).call(this,K(this,Mn)+K(e,Mn),r)},X1=new WeakSet,h8=function(e,r){return ut(this,fl,yh).call(this,e),ut(this,Ec,tl).call(this,K(this,Mn)-K(e,Mn),r)},Z1=new WeakSet,p8=function(e,r){return ut(this,fl,yh).call(this,e),ut(this,Ec,tl).call(this,K(this,Mn)*K(e,Mn)/K(this,Xa),r)},ew=new WeakSet,g8=function(e,r){return at(K(e,Mn)!==hc,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),ut(this,fl,yh).call(this,e),ut(this,Ec,tl).call(this,K(this,Mn)*K(this,Xa)/K(e,Mn),r)};let f8=Tf;function Qme(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function hB(t,e,r){let n=0;for(let i=0;i<r;i++)n=n*256+t[e+i];return n}function pB(t,e,r,n){const i=[];for(;r<e+1+n;){const a=IZ(t,r);i.push(a.result),r+=a.consumed,at(r<=e+1+n,"child data too short","BUFFER_OVERRUN",{buffer:t,length:n,offset:e})}return{consumed:1+n,result:i}}function IZ(t,e){at(t.length!==0,"data too short","BUFFER_OVERRUN",{buffer:t,length:0,offset:1});const r=n=>{at(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=hB(t,e+1,n);return r(e+1+n+i),pB(t,e,e+1+n,n+i)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),pB(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const i=hB(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:Qme(t[e])}}function s$(t){const e=zt(t,"data"),r=IZ(e,0);return De(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function gB(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function PZ(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(a){n=n.concat(PZ(a))}),n.length<=55)return n.unshift(192+n.length),n;const i=gB(n.length);return i.unshift(247+i.length),i.concat(n)}const e=Array.prototype.slice.call(zt(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=gB(e.length);return r.unshift(183+r.length),r.concat(e)}const yB="0123456789abcdef";function A1(t){let e="0x";for(const r of PZ(t))e+=yB[r>>4],e+=yB[r&15];return e}const Jme=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Xme(t,e){let r=18;if(typeof e=="string"){const n=Jme.indexOf(e);De(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=Fr(e,"unit"));return f8.fromValue(t,r,{decimals:r,width:512}).toString()}function Zme(t){return Xme(t,18)}function eve(t){const e=zt(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 ao=32,y8=new Uint8Array(ao),tve=["then"],iE={};function Zm(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}var $f;const o1=class o1 extends Array{constructor(...r){const n=r[0];let i=r[1],a=(r[2]||[]).slice(),o=!0;n!==iE&&(i=r,a=[],o=!1);super(i.length);Je(this,$f,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,$f,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=Fr(u,"%index");if(g<0||g>=this.length)throw new RangeError("out of result range");const m=c[g];return m instanceof Error&&Zm(`index ${g}`,m),m}if(tve.indexOf(u)>=0)return Reflect.get(c,u,f);const d=c[u];if(d instanceof Function)return function(...g){return d.apply(this===f?c:this,g)};if(!(u in c))return c.getValue.apply(this===f?c:this,[u])}return Reflect.get(c,u,f)}})}toArray(){const r=[];return this.forEach((n,i)=>{n instanceof Error&&Zm(`index ${i}`,n),r.push(n)}),r}toObject(){return K(this,$f).reduce((r,n,i)=>(at(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(K(this,$f)[o]);return new o1(iE,i,a)}filter(r,n){const i=[],a=[];for(let o=0;o<this.length;o++){const s=this[o];s instanceof Error&&Zm(`index ${o}`,s),r.call(n,s,o,this)&&(i.push(s),a.push(K(this,$f)[o]))}return new o1(iE,i,a)}map(r,n){const i=[];for(let a=0;a<this.length;a++){const o=this[a];o instanceof Error&&Zm(`index ${a}`,o),i.push(r.call(n,o,a,this))}return i}getValue(r){const n=K(this,$f).indexOf(r);if(n===-1)return;const i=this[n];return i instanceof Error&&Zm(`property ${JSON.stringify(r)}`,i.error),i}static fromItems(r,n){return new o1(iE,r,n)}};$f=new WeakMap;let EA=o1;function mB(t){let e=No(t);return at(e.length<=ao,"value out-of-bounds","BUFFER_OVERRUN",{buffer:e,length:ao,offset:e.length}),e.length!==ao&&(e=Fa(Wn([y8.slice(e.length%ao),e]))),e}class Vl{constructor(e,r,n,i){je(this,"name");je(this,"type");je(this,"localName");je(this,"dynamic");Jt(this,{name:e,type:r,localName:n,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,r){De(!1,e,this.localName,r)}}var dl,Hh,Bg,lx;class m8{constructor(){Je(this,Bg);Je(this,dl,void 0);Je(this,Hh,void 0);Te(this,dl,[]),Te(this,Hh,0)}get data(){return Wn(K(this,dl))}get length(){return K(this,Hh)}appendWriter(e){return ut(this,Bg,lx).call(this,Fa(e.data))}writeBytes(e){let r=Fa(e);const n=r.length%ao;return n&&(r=Fa(Wn([r,y8.slice(n)]))),ut(this,Bg,lx).call(this,r)}writeValue(e){return ut(this,Bg,lx).call(this,mB(e))}writeUpdatableValue(){const e=K(this,dl).length;return K(this,dl).push(y8),Te(this,Hh,K(this,Hh)+ao),r=>{K(this,dl)[e]=mB(r)}}}dl=new WeakMap,Hh=new WeakMap,Bg=new WeakSet,lx=function(e){return K(this,dl).push(e),Te(this,Hh,K(this,Hh)+e.length),e.length};var Qo,Ps,A2,TZ;const VL=class VL{constructor(e,r){Je(this,A2);je(this,"allowLoose");Je(this,Qo,void 0);Je(this,Ps,void 0);Jt(this,{allowLoose:!!r}),Te(this,Qo,Fa(e)),Te(this,Ps,0)}get data(){return xt(K(this,Qo))}get dataLength(){return K(this,Qo).length}get consumed(){return K(this,Ps)}get bytes(){return new Uint8Array(K(this,Qo))}subReader(e){return new VL(K(this,Qo).slice(K(this,Ps)+e),this.allowLoose)}readBytes(e,r){let n=ut(this,A2,TZ).call(this,0,e,!!r);return Te(this,Ps,K(this,Ps)+n.length),n.slice(0,e)}readValue(){return Pw(this.readBytes(ao))}readIndex(){return Tme(this.readBytes(ao))}};Qo=new WeakMap,Ps=new WeakMap,A2=new WeakSet,TZ=function(e,r,n){let i=Math.ceil(r/ao)*ao;return K(this,Ps)+i>K(this,Qo).length&&(this.allowLoose&&n&&K(this,Ps)+r<=K(this,Qo).length?i=r:at(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Fa(K(this,Qo)),length:K(this,Qo).length,offset:K(this,Ps)+i})),K(this,Qo).slice(K(this,Ps),K(this,Ps)+i)};let v8=VL;const bn=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{};function Xo(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function c$(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");Xo(t.outputLen),Xo(t.blockLen)}function Sy(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 CZ(t,e){c$(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const mP=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const NZ=t=>t instanceof Uint8Array,fx=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),dx=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Yc=(t,e)=>t<<32-e|t>>>e,rve=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!rve)throw new Error("Non little-endian hardware is not supported");const nve=async()=>{};async function vB(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 nve(),n+=a)}}function ive(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Oy(t){if(typeof t=="string"&&(t=ive(t)),!NZ(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function ave(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!NZ(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class u${clone(){return this._cloneInto()}}const ove={}.toString;function DZ(t,e){if(e!==void 0&&ove.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function Q2(t){const e=n=>t().update(Oy(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function sve(t=32){if(mP&&typeof mP.getRandomValues=="function")return mP.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}let $Z=class extends u${constructor(e,r){super(),this.finished=!1,this.destroyed=!1,RZ(e);const n=Oy(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 Sy(this),this.iHash.update(e),this}digestInto(e){Sy(this),c$(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 J2=(t,e,r)=>new $Z(t,e).update(r).digest();J2.create=(t,e)=>new $Z(t,e);function cve(t,e,r,n){RZ(t);const i=DZ({dkLen:32,asyncTick:10},n),{c:a,dkLen:o,asyncTick:s}=i;if(Xo(a),Xo(o),Xo(s),a<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=Oy(e),u=Oy(r),f=new Uint8Array(o),d=J2.create(t,c),g=d._cloneInto().update(u);return{c:a,dkLen:o,asyncTick:s,DK:f,PRF:d,PRFSalt:g}}function uve(t,e,r,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),i.fill(0),r}function l$(t,e,r,n){const{c:i,dkLen:a,DK:o,PRF:s,PRFSalt:c}=cve(t,e,r,n);let u;const f=new Uint8Array(4),d=dx(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 uve(s,c,o,u,g)}function lve(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 f$=class extends u${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=dx(this.buffer)}update(e){Sy(this);const{view:r,buffer:n,blockLen:i}=this;e=Oy(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=dx(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){Sy(this),CZ(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;lve(n,i-8,BigInt(this.length*8),a),this.process(n,0);const s=dx(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 fve=(t,e,r)=>t&e^~t&r,dve=(t,e,r)=>t&e^t&r^e&r,hve=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]),df=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),hf=new Uint32Array(64);let pve=class extends f${constructor(){super(64,32,8,!1),this.A=df[0]|0,this.B=df[1]|0,this.C=df[2]|0,this.D=df[3]|0,this.E=df[4]|0,this.F=df[5]|0,this.G=df[6]|0,this.H=df[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)hf[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const g=hf[d-15],m=hf[d-2],w=Yc(g,7)^Yc(g,18)^g>>>3,v=Yc(m,17)^Yc(m,19)^m>>>10;hf[d]=v+hf[d-7]+w+hf[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=Yc(s,6)^Yc(s,11)^Yc(s,25),m=f+g+fve(s,c,u)+hve[d]+hf[d]|0,v=(Yc(n,2)^Yc(n,13)^Yc(n,22))+dve(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(){hf.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const am=Q2(()=>new pve),aE=BigInt(2**32-1),b8=BigInt(32);function MZ(t,e=!1){return e?{h:Number(t&aE),l:Number(t>>b8&aE)}:{h:Number(t>>b8&aE)|0,l:Number(t&aE)|0}}function kZ(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}=MZ(t[i],e);[r[i],n[i]]=[a,o]}return[r,n]}const gve=(t,e)=>BigInt(t>>>0)<<b8|BigInt(e>>>0),yve=(t,e,r)=>t>>>r,mve=(t,e,r)=>t<<32-r|e>>>r,vve=(t,e,r)=>t>>>r|e<<32-r,bve=(t,e,r)=>t<<32-r|e>>>r,wve=(t,e,r)=>t<<64-r|e>>>r-32,_ve=(t,e,r)=>t>>>r-32|e<<64-r,Eve=(t,e)=>e,xve=(t,e)=>t,LZ=(t,e,r)=>t<<r|e>>>32-r,UZ=(t,e,r)=>e<<r|t>>>32-r,BZ=(t,e,r)=>e<<r-32|t>>>64-r,FZ=(t,e,r)=>t<<r-32|e>>>64-r;function Ave(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const Sve=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Ove=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Ive=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),Pve=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,Tve=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),Rve=(t,e,r,n,i,a)=>e+r+n+i+a+(t/2**32|0)|0,Cve={fromBig:MZ,split:kZ,toBig:gve,shrSH:yve,shrSL:mve,rotrSH:vve,rotrSL:bve,rotrBH:wve,rotrBL:_ve,rotr32H:Eve,rotr32L:xve,rotlSH:LZ,rotlSL:UZ,rotlBH:BZ,rotlBL:FZ,add:Ave,add3L:Sve,add3H:Ove,add4L:Ive,add4H:Pve,add5H:Rve,add5L:Tve},zr=Cve,[Nve,Dve]=(()=>zr.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))))(),pf=new Uint32Array(80),gf=new Uint32Array(80);class $ve extends f${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)pf[S]=e.getUint32(r),gf[S]=e.getUint32(r+=4);for(let S=16;S<80;S++){const x=pf[S-15]|0,O=gf[S-15]|0,E=zr.rotrSH(x,O,1)^zr.rotrSH(x,O,8)^zr.shrSH(x,O,7),p=zr.rotrSL(x,O,1)^zr.rotrSL(x,O,8)^zr.shrSL(x,O,7),I=pf[S-2]|0,C=gf[S-2]|0,L=zr.rotrSH(I,C,19)^zr.rotrBH(I,C,61)^zr.shrSH(I,C,6),q=zr.rotrSL(I,C,19)^zr.rotrBL(I,C,61)^zr.shrSL(I,C,6),le=zr.add4L(p,q,gf[S-7],gf[S-16]),pe=zr.add4H(le,E,L,pf[S-7],pf[S-16]);pf[S]=pe|0,gf[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=zr.rotrSH(d,g,14)^zr.rotrSH(d,g,18)^zr.rotrBH(d,g,41),O=zr.rotrSL(d,g,14)^zr.rotrSL(d,g,18)^zr.rotrBL(d,g,41),E=d&m^~d&v,p=g&w^~g&y,I=zr.add5L(b,O,p,Dve[S],gf[S]),C=zr.add5H(I,_,x,E,Nve[S],pf[S]),L=I|0,q=zr.rotrSH(n,i,28)^zr.rotrBH(n,i,34)^zr.rotrBH(n,i,39),le=zr.rotrSL(n,i,28)^zr.rotrBL(n,i,34)^zr.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}=zr.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=zr.add3L(L,le,B);n=zr.add3H(U,C,q,pe),i=U|0}({h:n,l:i}=zr.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:a,l:o}=zr.add(this.Bh|0,this.Bl|0,a|0,o|0),{h:s,l:c}=zr.add(this.Ch|0,this.Cl|0,s|0,c|0),{h:u,l:f}=zr.add(this.Dh|0,this.Dl|0,u|0,f|0),{h:d,l:g}=zr.add(this.Eh|0,this.El|0,d|0,g|0),{h:m,l:w}=zr.add(this.Fh|0,this.Fl|0,m|0,w|0),{h:v,l:y}=zr.add(this.Gh|0,this.Gl|0,v|0,y|0),{h:_,l:b}=zr.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(){pf.fill(0),gf.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 d$=Q2(()=>new $ve);function Mve(){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 bB=Mve(),wB=bB.crypto||bB.msCrypto;function kve(t){switch(t){case"sha256":return am.create();case"sha512":return d$.create()}De(!1,"invalid hashing algorithm name","algorithm",t)}function Lve(t,e){const r={sha256:am,sha512:d$}[t];return De(r!=null,"invalid hmac algorithm","algorithm",t),J2.create(r,e)}function Uve(t,e,r,n,i){const a={sha256:am,sha512:d$}[i];return De(a!=null,"invalid pbkdf2 algorithm","algorithm",i),l$(a,t,e,{c:r,dkLen:n})}function Bve(t){at(wB!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),De(Number.isInteger(t)&&t>0&&t<=1024,"invalid length","length",t);const e=new Uint8Array(t);return wB.getRandomValues(e),e}let jZ=!1;const qZ=function(t,e,r){return Lve(t,e).update(r).digest()};let HZ=qZ;function om(t,e,r){const n=zt(e,"key"),i=zt(r,"data");return xt(HZ(t,n,i))}om._=qZ;om.lock=function(){jZ=!0};om.register=function(t){if(jZ)throw new Error("computeHmac is locked");HZ=t};Object.freeze(om);const[zZ,VZ,GZ]=[[],[],[]],Fve=BigInt(0),ev=BigInt(1),jve=BigInt(2),qve=BigInt(7),Hve=BigInt(256),zve=BigInt(113);for(let t=0,e=ev,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],zZ.push(2*(5*n+r)),VZ.push((t+1)*(t+2)/2%64);let i=Fve;for(let a=0;a<7;a++)e=(e<<ev^(e>>qve)*zve)%Hve,e&jve&&(i^=ev<<(ev<<BigInt(a))-ev);GZ.push(i)}const[Vve,Gve]=kZ(GZ,!0),_B=(t,e,r)=>r>32?BZ(t,e,r):LZ(t,e,r),EB=(t,e,r)=>r>32?FZ(t,e,r):UZ(t,e,r);function Wve(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=_B(u,f,1)^r[s],g=EB(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=VZ[o],c=_B(i,a,s),u=EB(i,a,s),f=zZ[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]^=Vve[n],t[1]^=Gve[n]}r.fill(0)}class h$ extends u${constructor(e,r,n,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Xo(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=fx(this.state)}keccak(){Wve(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Sy(this);const{blockLen:r,state:n}=this;e=Oy(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){Sy(this,!1),c$(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,a=e.length;i<a;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,a-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Xo(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(CZ(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 h$(r,n,i,o,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}const Kve=(t,e,r)=>Q2(()=>new h$(e,t,r)),Yve=Kve(1,136,256/8);let WZ=!1;const KZ=function(t){return Yve(t)};let YZ=KZ;function Gn(t){const e=zt(t,"data");return xt(YZ(e))}Gn._=KZ;Gn.lock=function(){WZ=!0};Gn.register=function(t){if(WZ)throw new TypeError("keccak256 is locked");YZ=t};Object.freeze(Gn);const Qve=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),QZ=Uint8Array.from({length:16},(t,e)=>e),Jve=QZ.map(t=>(9*t+5)%16);let p$=[QZ],g$=[Jve];for(let t=0;t<4;t++)for(let e of[p$,g$])e.push(e[t].map(r=>Qve[r]));const JZ=[[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)),Xve=p$.map((t,e)=>t.map(r=>JZ[e][r])),Zve=g$.map((t,e)=>t.map(r=>JZ[e][r])),ebe=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),tbe=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),oE=(t,e)=>t<<e|t>>>32-e;function xB(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 sE=new Uint32Array(16);class rbe extends f${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)sE[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=ebe[m],y=tbe[m],_=p$[m],b=g$[m],S=Xve[m],x=Zve[m];for(let O=0;O<16;O++){const E=oE(n+xB(m,a,s,u)+sE[_[O]]+v,S[O])+d|0;n=d,d=u,u=oE(s,10)|0,s=a,a=E}for(let O=0;O<16;O++){const E=oE(i+xB(w,o,c,f)+sE[b[O]]+y,x[O])+g|0;i=g,g=f,f=oE(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(){sE.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const nbe=Q2(()=>new rbe);let XZ=!1;const ZZ=function(t){return nbe(t)};let eee=ZZ;function sm(t){const e=zt(t,"data");return xt(eee(e))}sm._=ZZ;sm.lock=function(){XZ=!0};sm.register=function(t){if(XZ)throw new TypeError("ripemd160 is locked");eee=t};Object.freeze(sm);let tee=!1;const ree=function(t,e,r,n,i){return Uve(t,e,r,n,i)};let nee=ree;function Ad(t,e,r,n,i){const a=zt(t,"password"),o=zt(e,"salt");return xt(nee(a,o,r,n,i))}Ad._=ree;Ad.lock=function(){tee=!0};Ad.register=function(t){if(tee)throw new Error("pbkdf2 is locked");nee=t};Object.freeze(Ad);let iee=!1;const aee=function(t){return new Uint8Array(Bve(t))};let oee=aee;function Cl(t){return oee(t)}Cl._=aee;Cl.lock=function(){iee=!0};Cl.register=function(t){if(iee)throw new Error("randomBytes is locked");oee=t};Object.freeze(Cl);const mn=(t,e)=>t<<e|t>>>32-e;function AB(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,Y=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(Y+le|0,7),I^=mn(z+Y|0,9),le^=mn(I+z|0,13),Y^=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(Y+U|0,7),B^=mn(ne+Y|0,9),U^=mn(B+ne|0,13),Y^=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+Y|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 wg(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)AB(r,o,t,e,r,a),s>0&&(o+=16),AB(r,a,t,e+=16,r,o)}function see(t,e,r){const n=DZ({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:i,r:a,p:o,dkLen:s,asyncTick:c,maxmem:u,onProgress:f}=n;if(Xo(i),Xo(a),Xo(o),Xo(s),Xo(c),Xo(u),f!==void 0&&typeof f!="function")throw new Error("progressCb should be function");const d=128*a,g=d/4;if(i<=1||i&i-1||i>=2**(d/8)||i>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(o<0||o>(2**32-1)*32/d)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(s<0||s>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const m=d*(i+o);if(m>u)throw new Error(`Scrypt: parameters too large, ${m} (128 * r * (N + p)) > ${u} (maxmem)`);const w=l$(am,t,e,{c:1,dkLen:d*o}),v=fx(w),y=fx(new Uint8Array(d*i)),_=fx(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 cee(t,e,r,n,i){const a=l$(am,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),i.fill(0),a}function ibe(t,e,r){const{N:n,r:i,p:a,dkLen:o,blockSize32:s,V:c,B32:u,B:f,tmp:d,blockMixCb:g}=see(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++)wg(c,y,c,y+=s,i),g();wg(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+_];wg(d,0,u,w,i),g()}}return cee(t,o,f,c,d)}async function abe(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}=see(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 vB(n-1,m,()=>{wg(c,y,c,y+=s,i),g()}),wg(c,(n-1)*s,u,v,i),g(),await vB(n,m,()=>{const _=u[v+s-16]%n;for(let b=0;b<s;b++)d[b]=u[v+b]^c[_*s+b];wg(d,0,u,v,i),g()})}return cee(t,o,f,c,d)}let uee=!1,lee=!1;const fee=async function(t,e,r,n,i,a,o){return await abe(t,e,{N:r,r:n,p:i,dkLen:a,onProgress:o})},dee=function(t,e,r,n,i,a){return ibe(t,e,{N:r,r:n,p:i,dkLen:a})};let hee=fee,pee=dee;async function cm(t,e,r,n,i,a,o){const s=zt(t,"passwd"),c=zt(e,"salt");return xt(await hee(s,c,r,n,i,a,o))}cm._=fee;cm.lock=function(){lee=!0};cm.register=function(t){if(lee)throw new Error("scrypt is locked");hee=t};Object.freeze(cm);function um(t,e,r,n,i,a){const o=zt(t,"passwd"),s=zt(e,"salt");return xt(pee(o,s,r,n,i,a))}um._=dee;um.lock=function(){uee=!0};um.register=function(t){if(uee)throw new Error("scryptSync is locked");pee=t};Object.freeze(um);const gee=function(t){return kve("sha256").update(t).digest()};let yee=gee,mee=!1;function kc(t){const e=zt(t,"data");return xt(yee(e))}kc._=gee;kc.lock=function(){mee=!0};kc.register=function(t){if(mee)throw new Error("sha256 is locked");yee=t};Object.freeze(kc);Object.freeze(kc);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const vee=BigInt(0),X2=BigInt(1),obe=BigInt(2),Z2=t=>t instanceof Uint8Array,sbe=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Iy(t){if(!Z2(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=sbe[t[r]];return e}function bee(t){const e=t.toString(16);return e.length&1?`0${e}`:e}function y$(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 op(t){return y$(Iy(t))}function m$(t){if(!Z2(t))throw new Error("Uint8Array expected");return y$(Iy(Uint8Array.from(t).reverse()))}function Ty(t,e){return Py(t.toString(16).padStart(e*2,"0"))}function v$(t,e){return Ty(t,e).reverse()}function cbe(t){return Py(bee(t))}function mc(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(Z2(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 S1(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!Z2(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function ube(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 lbe(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function fbe(t){let e;for(e=0;t>vee;t>>=X2,e+=1);return e}function dbe(t,e){return t>>BigInt(e)&X2}const hbe=(t,e,r)=>t|(r?X2:vee)<<BigInt(e),b$=t=>(obe<<BigInt(t-1))-X2,vP=t=>new Uint8Array(t),SB=t=>Uint8Array.from(t);function wee(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=vP(t),i=vP(t),a=0;const o=()=>{n.fill(1),i.fill(0),a=0},s=(...d)=>r(i,n,...d),c=(d=vP())=>{i=s(SB([0]),d),n=s(),d.length!==0&&(i=s(SB([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 S1(...g)};return(d,g)=>{o(),c(d);let m;for(;!(m=g(u()));)c();return o(),m}}const pbe={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 Tw(t,e,r={}){const n=(i,a,o)=>{const s=pbe[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 gbe=Object.freeze(Object.defineProperty({__proto__:null,bitGet:dbe,bitLen:fbe,bitMask:b$,bitSet:hbe,bytesToHex:Iy,bytesToNumberBE:op,bytesToNumberLE:m$,concatBytes:S1,createHmacDrbg:wee,ensureBytes:mc,equalBytes:ube,hexToBytes:Py,hexToNumber:y$,numberToBytesBE:Ty,numberToBytesLE:v$,numberToHexUnpadded:bee,numberToVarBytesBE:cbe,utf8ToBytes:lbe,validateObject:Tw},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Xi=BigInt(0),Ai=BigInt(1),vh=BigInt(2),ybe=BigInt(3),w8=BigInt(4),OB=BigInt(5),IB=BigInt(8);BigInt(9);BigInt(16);function Po(t,e){const r=t%e;return r>=Xi?r:e+r}function mbe(t,e,r){if(r<=Xi||e<Xi)throw new Error("Expected power/modulo > 0");if(r===Ai)return Xi;let n=Ai;for(;e>Xi;)e&Ai&&(n=n*t%r),t=t*t%r,e>>=Ai;return n}function ys(t,e,r){let n=t;for(;e-- >Xi;)n*=n,n%=r;return n}function _8(t,e){if(t===Xi||e<=Xi)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=Po(t,e),n=e,i=Xi,a=Ai;for(;r!==Xi;){const s=n/r,c=n%r,u=i-a*s;n=r,r=c,i=a,a=u}if(n!==Ai)throw new Error("invert: does not exist");return Po(i,e)}function vbe(t){const e=(t-Ai)/vh;let r,n,i;for(r=t-Ai,n=0;r%vh===Xi;r/=vh,n++);for(i=vh;i<t&&mbe(i,e,t)!==t-Ai;i++);if(n===1){const o=(t+Ai)/w8;return function(c,u){const f=c.pow(u,o);if(!c.eql(c.sqr(f),u))throw new Error("Cannot find square root");return f}}const a=(r+Ai)/vh;return function(s,c){if(s.pow(c,e)===s.neg(s.ONE))throw new Error("Cannot find square root");let u=n,f=s.pow(s.mul(s.ONE,i),r),d=s.pow(c,a),g=s.pow(c,r);for(;!s.eql(g,s.ONE);){if(s.eql(g,s.ZERO))return s.ZERO;let m=1;for(let v=s.sqr(g);m<u&&!s.eql(v,s.ONE);m++)v=s.sqr(v);const w=s.pow(f,Ai<<BigInt(u-m-1));f=s.sqr(w),d=s.mul(d,w),g=s.mul(g,f),u=m}return d}}function bbe(t){if(t%w8===ybe){const e=(t+Ai)/w8;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%IB===OB){const e=(t-OB)/IB;return function(n,i){const a=n.mul(i,vh),o=n.pow(a,e),s=n.mul(i,o),c=n.mul(n.mul(s,vh),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 vbe(t)}const wbe=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function _be(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=wbe.reduce((n,i)=>(n[i]="function",n),e);return Tw(t,r)}function Ebe(t,e,r){if(r<Xi)throw new Error("Expected power > 0");if(r===Xi)return t.ONE;if(r===Ai)return e;let n=t.ONE,i=e;for(;r>Xi;)r&Ai&&(n=t.mul(n,i)),i=t.sqr(i),r>>=Ai;return n}function xbe(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 _ee(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Abe(t,e,r=!1,n={}){if(t<=Xi)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:a}=_ee(t,e);if(a>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=bbe(t),s=Object.freeze({ORDER:t,BITS:i,BYTES:a,MASK:b$(i),ZERO:Xi,ONE:Ai,create:c=>Po(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return Xi<=c&&c<t},is0:c=>c===Xi,isOdd:c=>(c&Ai)===Ai,neg:c=>Po(-c,t),eql:(c,u)=>c===u,sqr:c=>Po(c*c,t),add:(c,u)=>Po(c+u,t),sub:(c,u)=>Po(c-u,t),mul:(c,u)=>Po(c*u,t),pow:(c,u)=>Ebe(s,c,u),div:(c,u)=>Po(c*_8(u,t),t),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>_8(c,t),sqrt:n.sqrt||(c=>o(s,c)),invertBatch:c=>xbe(s,c),cmov:(c,u,f)=>f?u:c,toBytes:c=>r?v$(c,a):Ty(c,a),fromBytes:c=>{if(c.length!==a)throw new Error(`Fp.fromBytes: expected ${a}, got ${c.length}`);return r?m$(c):op(c)}});return Object.freeze(s)}function Eee(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 xee(t){const e=Eee(t);return e+Math.ceil(e/2)}function Sbe(t,e,r=!1){const n=t.length,i=Eee(e),a=xee(e);if(n<16||n<a||n>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${n}`);const o=r?op(t):m$(t),s=Po(o,e-Ai)+Ai;return r?v$(s,i):Ty(s,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Obe=BigInt(0),bP=BigInt(1);function Ibe(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>Obe;)a&bP&&(o=o.add(s)),s=s.double(),a>>=bP;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+=bP);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 Aee(t){return _be(t.Fp),Tw(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({..._ee(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Pbe(t){const e=Aee(t);Tw(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:Tbe,hexToBytes:Rbe}=gbe,Rh={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=Rh;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:Tbe(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=Rh,r=typeof t=="string"?Rbe(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}=Rh._parseInt(r.subarray(2)),{d:o,l:s}=Rh._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}`}},xl=BigInt(0),Ns=BigInt(1);BigInt(2);const PB=BigInt(3);BigInt(4);function Cbe(t){const e=Pbe(t),{Fp:r}=e,n=e.toBytes||((w,v,y)=>{const _=v.toAffine();return S1(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"&&xl<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=Iy(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:op(mc("private key",w,y))}catch{throw new Error(`private key must be ${y} bytes, hex or bigint, not ${typeof w}`)}return _&&(S=Po(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(mc("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,PB),{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,PB);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 Y=r.add(S,O);return U=r.mul(U,Y),Y=r.add(q,pe),U=r.sub(U,Y),Y=r.add(_,b),E=r.add(x,O),Y=r.mul(Y,E),E=r.add(le,pe),Y=r.sub(Y,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(Y,U),E=r.mul(B,E),E=r.sub(E,q),q=r.mul(B,le),I=r.mul(Y,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===xl)return y;if(s(v),v===Ns)return this;const{endo:_}=e;if(!_)return m.unsafeLadder(this,v);let{k1neg:b,k1:S,k2neg:x,k2:O}=_.splitScalar(v),E=y,p=y,I=this;for(;S>xl||O>xl;)S&Ns&&(E=E.add(I)),O&Ns&&(p=p.add(I)),I=I.double(),S>>=Ns,O>>=Ns;return b&&(E=E.negate()),x&&(p=p.negate()),p=new d(r.mul(p.px,_.beta),p.py,p.pz),E.add(p)}multiply(v){s(v);let y=v,_,b;const{endo:S}=e;if(S){const{k1neg:x,k1: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===xl||E===Ns||!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===Ns)return!0;if(y)return y(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:v,clearCofactor:y}=e;return v===Ns?this:y?y(d,this):this.multiplyUnsafe(e.h)}toRawBytes(v=!0){return this.assertValidity(),n(d,this,v)}toHex(v=!0){return Iy(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=Ibe(d,e.endo?Math.ceil(g/2):g);return{CURVE:e,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:a,isWithinCurveOrder:o}}function Nbe(t){const e=Aee(t);return Tw(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function Dbe(t){const e=Nbe(t),{Fp:r,n}=e,i=r.BYTES+1,a=2*r.BYTES+1;function o(U){return xl<U&&U<r.ORDER}function s(U){return Po(U,n)}function c(U){return _8(U,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:f,weierstrassEquation:d,isWithinCurveOrder:g}=Cbe({...e,toBytes(U,Y,ne){const F=Y.toAffine(),j=r.toBytes(F.x),z=S1;return ne?z(Uint8Array.from([Y.hasEvenY()?2:3]),j):z(Uint8Array.from([4]),j,r.toBytes(F.y))},fromBytes(U){const Y=U.length,ne=U[0],F=U.subarray(1);if(Y===i&&(ne===2||ne===3)){const j=op(F);if(!o(j))throw new Error("Point is not on curve");const z=d(j);let $=r.sqrt(z);const H=($&Ns)===Ns;return(ne&1)===1!==H&&($=r.neg($)),{x:j,y:$}}else if(Y===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 ${Y} was invalid. Expected ${i} compressed bytes or ${a} uncompressed bytes`)}}),m=U=>Iy(Ty(U,e.nByteLength));function w(U){const Y=n>>Ns;return U>Y}function v(U){return w(U)?s(-U):U}const y=(U,Y,ne)=>op(U.slice(Y,ne));class _{constructor(Y,ne,F){this.r=Y,this.s=ne,this.recovery=F,this.assertValidity()}static fromCompact(Y){const ne=e.nByteLength;return Y=mc("compactSignature",Y,ne*2),new _(y(Y,0,ne),y(Y,ne,2*ne))}static fromDER(Y){const{r:ne,s:F}=Rh.toSig(mc("DER",Y));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(Y){return new _(this.r,this.s,Y)}recoverPublicKey(Y){const{r:ne,s:F,recovery:j}=this,z=p(mc("msgHash",Y));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 Rh.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=xee(e.n);return Sbe(e.randomBytes(U),e.n)},precompute(U=8,Y=u.BASE){return Y._setWindowSize(U),Y.multiply(BigInt(3)),Y}};function S(U,Y=!0){return u.fromPrivateKey(U).toRawBytes(Y)}function x(U){const Y=U instanceof Uint8Array,ne=typeof U=="string",F=(Y||ne)&&U.length;return Y?F===i||F===a:ne?F===2*i||F===2*a:U instanceof u}function O(U,Y,ne=!0){if(x(U))throw new Error("first arg must be private key");if(!x(Y))throw new Error("second arg must be public key");return u.fromHex(Y).multiply(f(U)).toRawBytes(ne)}const E=e.bits2int||function(U){const Y=op(U),ne=U.length*8-e.nBitLength;return ne>0?Y>>BigInt(ne):Y},p=e.bits2int_modN||function(U){return s(E(U))},I=b$(e.nBitLength);function C(U){if(typeof U!="bigint")throw new Error("bigint expected");if(!(xl<=U&&U<I))throw new Error(`bigint expected < 2^${e.nBitLength}`);return Ty(U,e.nByteLength)}function L(U,Y,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=mc("msgHash",U),$&&(U=mc("prehashed msgHash",F(U)));const k=p(U),M=f(Y),G=[C(M),C(k)];if(H!=null){const ce=H===!0?j(r.BYTES):H;G.push(mc("extraEntropy",ce))}const ge=S1(...G),Q=k;function te(ce){const T=E(ce);if(!g(T))return;const fe=c(T),Ve=u.BASE.multiply(T).toAffine(),tt=s(Ve.x);if(tt===xl)return;const vt=s(fe*s(Q+tt*M));if(vt===xl)return;let bt=(Ve.x===tt?0:2)|Number(Ve.y&Ns),yt=vt;return z&&w(vt)&&(yt=v(vt),bt^=1),new _(tt,yt,bt)}return{seed:ge,k2sig:te}}const q={lowS:e.lowS,prehash:!1},le={lowS:e.lowS,prehash:!1};function pe(U,Y,ne=q){const{seed:F,k2sig:j}=L(U,Y,ne),z=e;return wee(z.hash.outputLen,z.nByteLength,z.hmac)(F,j)}u.BASE._setWindowSize(8);function B(U,Y,ne,F=le){var Ve;const j=U;if(Y=mc("msgHash",Y),ne=mc("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 Rh.Err))throw tt;H=_.fromCompact(j)}else if(typeof j=="object"&&typeof j.r=="bigint"&&typeof j.s=="bigint"){const{r:tt,s:vt}=j;H=new _(tt,vt)}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;$&&(Y=e.hash(Y));const{r:M,s:G}=H,ge=p(Y),Q=c(G),te=s(ge*Q),ce=s(M*Q),T=(Ve=u.BASE.multiplyAndAddUnsafe(k,te,ce))==null?void 0:Ve.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 $be(t){return{hash:t,hmac:(e,...r)=>J2(t,e,ave(...r)),randomBytes:sve}}function Mbe(t,e){const r=n=>Dbe({...t,...$be(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const See=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),TB=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),kbe=BigInt(1),E8=BigInt(2),RB=(t,e)=>(t+e/E8)/e;function Lbe(t){const e=See,r=BigInt(3),n=BigInt(6),i=BigInt(11),a=BigInt(22),o=BigInt(23),s=BigInt(44),c=BigInt(88),u=t*t*t%e,f=u*u*t%e,d=ys(f,r,e)*f%e,g=ys(d,r,e)*f%e,m=ys(g,E8,e)*u%e,w=ys(m,i,e)*m%e,v=ys(w,a,e)*w%e,y=ys(v,s,e)*v%e,_=ys(y,c,e)*y%e,b=ys(_,s,e)*v%e,S=ys(b,r,e)*f%e,x=ys(S,o,e)*w%e,O=ys(x,n,e)*u%e,E=ys(O,E8,e);if(!x8.eql(x8.sqr(E),t))throw new Error("Cannot find square root");return E}const x8=Abe(See,void 0,void 0,{sqrt:Lbe}),Ef=Mbe({a:BigInt(0),b:BigInt(7),Fp:x8,n:TB,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=TB,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-kbe*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,o=BigInt("0x100000000000000000000000000000000"),s=RB(a*t,e),c=RB(-n*t,e);let u=Po(t-s*r-c*i,e),f=Po(-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}}}},am);BigInt(0);Ef.ProjectivePoint;const A8="0x0000000000000000000000000000000000000000",CB="0x0000000000000000000000000000000000000000000000000000000000000000",Ube=`Ethereum Signed Message:
69
+ `,NB=BigInt(0),DB=BigInt(1),$B=BigInt(2),MB=BigInt(27),kB=BigInt(28),cE=BigInt(35),g0={};function LB(t){return gp(No(t),32)}var Fg,jg,qg,zh;const pc=class pc{constructor(e,r,n,i){Je(this,Fg,void 0);Je(this,jg,void 0);Je(this,qg,void 0);Je(this,zh,void 0);xd(e,g0,"Signature"),Te(this,Fg,r),Te(this,jg,n),Te(this,qg,i),Te(this,zh,null)}get r(){return K(this,Fg)}set r(e){De(vg(e)===32,"invalid r","value",e),Te(this,Fg,xt(e))}get s(){return K(this,jg)}set s(e){De(vg(e)===32,"invalid s","value",e);const r=xt(e);De(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),Te(this,jg,r)}get v(){return K(this,qg)}set v(e){const r=Fr(e,"value");De(r===27||r===28,"invalid v","v",e),Te(this,qg,r)}get networkV(){return K(this,zh)}get legacyChainId(){const e=this.networkV;return e==null?null:pc.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=zt(this.s);return this.yParity&&(e[0]|=128),xt(e)}get compactSerialized(){return Wn([this.r,this.yParityAndS])}get serialized(){return Wn([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 pc(g0,this.r,this.s,this.v);return this.networkV&&Te(e,zh,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=ar(e,"v");return r==MB||r==kB?NB:(De(r>=cE,"invalid EIP-155 v","v",e),(r-cE)/$B)}static getChainIdV(e,r){return ar(e)*$B+BigInt(35+r-27)}static getNormalizedV(e){const r=ar(e);return r===NB||r===MB?27:r===DB||r===kB?28:(De(r>=cE,"invalid v","v",e),r&DB?27:28)}static from(e){function r(u,f){De(u,f,"signature",e)}if(e==null)return new pc(g0,CB,CB,27);if(typeof e=="string"){const u=zt(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 pc(g0,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=pc.getNormalizedV(u[64]);return new pc(g0,f,xt(d),g)}r(!1,"invalid raw signature length")}if(e instanceof pc)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(di(f,32),"invalid yParityAndS");const d=zt(f);return d[0]&=127,xt(d)}r(!1,"missing s")}(e.s,e.yParityAndS);r((zt(a)[0]&128)==0,"non-canonical s");const{networkV:o,v:s}=function(u,f,d){if(u!=null){const g=ar(u);return{networkV:g>=cE?g:void 0,v:pc.getNormalizedV(g)}}if(f!=null)return r(di(f,32),"invalid yParityAndS"),{v:zt(f)[0]&128?28:27};if(d!=null){switch(Fr(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 pc(g0,i,a,s);return o&&Te(c,zh,o),r(e.yParity==null||Fr(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};Fg=new WeakMap,jg=new WeakMap,qg=new WeakMap,zh=new WeakMap;let Lc=pc;var hl;const Eh=class Eh{constructor(e){Je(this,hl,void 0);De(vg(e)===32,"invalid private key","privateKey","[REDACTED]"),Te(this,hl,xt(e))}get privateKey(){return K(this,hl)}get publicKey(){return Eh.computePublicKey(K(this,hl))}get compressedPublicKey(){return Eh.computePublicKey(K(this,hl),!0)}sign(e){De(vg(e)===32,"invalid digest length","digest",e);const r=Ef.sign(Fa(e),Fa(K(this,hl)),{lowS:!0});return Lc.from({r:Ul(r.r,32),s:Ul(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=Eh.computePublicKey(e);return xt(Ef.getSharedSecret(Fa(K(this,hl)),zt(r),!1))}static computePublicKey(e,r){let n=zt(e,"key");if(n.length===32){const a=Ef.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=Ef.ProjectivePoint.fromHex(n);return xt(i.toRawBytes(r))}static recoverPublicKey(e,r){De(vg(e)===32,"invalid digest length","digest",e);const n=Lc.from(r);let i=Ef.Signature.fromCompact(Fa(Wn([n.r,n.s])));i=i.addRecoveryBit(n.yParity);const a=i.recoverPublicKey(Fa(e));return De(a!=null,"invalid signautre for digest","signature",r),"0x"+a.toHex(!1)}static addPoints(e,r,n){const i=Ef.ProjectivePoint.fromHex(Eh.computePublicKey(e).substring(2)),a=Ef.ProjectivePoint.fromHex(Eh.computePublicKey(r).substring(2));return"0x"+i.add(a).toHex(!!n)}};hl=new WeakMap;let xu=Eh;const Bbe=BigInt(0),Fbe=BigInt(36);function UB(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=zt(Gn(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 w$={};for(let t=0;t<10;t++)w$[String(t)]=String(t);for(let t=0;t<26;t++)w$[String.fromCharCode(65+t)]=String(10+t);const BB=15;function jbe(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>w$[n]).join("");for(;e.length>=BB;){let n=e.substring(0,BB);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 qbe=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function Hbe(t){t=t.toLowerCase();let e=Bbe;for(let r=0;r<t.length;r++)e=e*Fbe+qbe[t[r]];return e}function ln(t){if(De(typeof t=="string","invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);const e=UB(t);return De(!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}$/)){De(t.substring(2,4)===jbe(t),"bad icap checksum","address",t);let e=Hbe(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return UB("0x"+e)}De(!1,"invalid address","address",t)}function zbe(t){const e=ln(t.from);let n=ar(t.nonce,"tx.nonce").toString(16);return n==="0"?n="0x":n.length%2?n="0x0"+n:n="0x"+n,ln(Jn(Gn(A1([e,n])),12))}function Oee(t){return t&&typeof t.getAddress=="function"}async function wP(t,e){const r=await e;return(r==null||r==="0x0000000000000000000000000000000000000000")&&(at(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),De(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),ln(r)}function ma(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?ln(t):(at(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),wP(t,e.resolveName(t)));if(Oee(t))return wP(t,t.getAddress());if(t&&typeof t.then=="function")return wP(t,t);De(!1,"unsupported addressable value","target",t)}const nl={};function jt(t,e){let r=!1;return e<0&&(r=!0,e*=-1),new Ha(nl,`${r?"":"u"}int${e}`,t,{signed:r,width:e})}function vn(t,e){return new Ha(nl,`bytes${e||""}`,t,{size:e})}const FB=Symbol.for("_ethers_typed");var Vh;const al=class al{constructor(e,r,n,i){je(this,"type");je(this,"value");Je(this,Vh,void 0);je(this,"_typedSymbol");i==null&&(i=null),xd(nl,e,"Typed"),Jt(this,{_typedSymbol:FB,type:r,value:n}),Te(this,Vh,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 K(this,Vh)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return K(this,Vh)===!0?-1:K(this,Vh)===!1?this.value.length:null}static from(e,r){return new al(nl,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 al(nl,"address",e)}static bool(e){return new al(nl,"bool",!!e)}static bytes(e){return new al(nl,"bytes",e)}static string(e){return new al(nl,"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 al(nl,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===FB}static dereference(e,r){if(al.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Vh=new WeakMap;let Ha=al;class Vbe extends Vl{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=Ha.dereference(r,"string");try{n=ln(n)}catch(i){return this._throwError(i.message,r)}return e.writeValue(n)}decode(e){return ln(Ul(e.readValue(),20))}}class Gbe extends Vl{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 Iee(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 at(f,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:r}),at(!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 De(!1,"invalid tuple value","tuple",r);De(e.length===n.length,"types/value length mismatch","tuple",r);let i=new m8,a=new m8,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 Pee(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(Bs(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(Bs(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)}),EA.fromItems(r,n)}class Wbe extends Vl{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");Jt(this,{coder:r,length:n})}defaultValue(){const r=this.coder.defaultValue(),n=[];for(let i=0;i<this.length;i++)n.push(r);return n}encode(r,n){const i=Ha.dereference(n,"array");Array.isArray(i)||this._throwError("expected array value",i);let a=this.length;a===-1&&(a=i.length,r.writeValue(i.length)),pZ(i.length,a,"coder array"+(this.localName?" "+this.localName:""));let o=[];for(let s=0;s<i.length;s++)o.push(this.coder);return Iee(r,o,i)}decode(r){let n=this.length;n===-1&&(n=r.readIndex(),at(n*ao<=r.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:r.bytes,offset:n*ao,length:r.dataLength}));let i=[];for(let a=0;a<n;a++)i.push(new Gbe(this.coder));return Pee(r,i)}}class Kbe extends Vl{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,r){const n=Ha.dereference(r,"bool");return e.writeValue(n?1:0)}decode(e){return!!e.readValue()}}class Tee extends Vl{constructor(e,r){super(e,e,r,!0)}defaultValue(){return"0x"}encode(e,r){r=Fa(r);let n=e.writeValue(r.length);return n+=e.writeBytes(r),n}decode(e){return e.readBytes(e.readIndex(),!0)}}class Ybe extends Tee{constructor(e){super("bytes",e)}decode(e){return xt(super.decode(e))}}class Qbe extends Vl{constructor(r,n){let i="bytes"+String(r);super(i,i,n,!1);je(this,"size");Jt(this,{size:r},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(r,n){let i=Fa(Ha.dereference(n,this.type));return i.length!==this.size&&this._throwError("incorrect data length",n),r.writeBytes(i)}decode(r){return xt(r.readBytes(this.size))}}const Jbe=new Uint8Array([]);class Xbe extends Vl{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes(Jbe)}decode(e){return e.readBytes(0),null}}const Zbe=BigInt(0),e1e=BigInt(1),t1e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class r1e extends Vl{constructor(r,n,i){const a=(n?"int":"uint")+r*8;super(a,a,i,!1);je(this,"size");je(this,"signed");Jt(this,{size:r,signed:n},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(r,n){let i=ar(Ha.dereference(n,this.type)),a=Th(t1e,ao*8);if(this.signed){let o=Th(a,this.size*8-1);(i>o||i<-(o+e1e))&&this._throwError("value out-of-bounds",n),i=bZ(i,8*ao)}else(i<Zbe||i>Th(a,this.size*8))&&this._throwError("value out-of-bounds",n);return r.writeValue(i)}decode(r){let n=Th(r.readValue(),this.size*8);return this.signed&&(n=_A(n,this.size*8)),n}}class n1e extends Tee{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,co(Ha.dereference(r,"string")))}decode(e){return o$(super.decode(e))}}class uE extends Vl{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");Jt(this,{coders:Object.freeze(r.slice())})}defaultValue(){const r=[];this.coders.forEach(i=>{r.push(i.defaultValue())});const n=this.coders.reduce((i,a)=>{const o=a.localName;return o&&(i[o]||(i[o]=0),i[o]++),i},{});return this.coders.forEach((i,a)=>{let o=i.localName;!o||n[o]!==1||(o==="length"&&(o="_length"),r[o]==null&&(r[o]=r[a]))}),Object.freeze(r)}encode(r,n){const i=Ha.dereference(n,"tuple");return Iee(r,this.coders,i)}decode(r){return Pee(r,this.coders)}}function Bl(t){return Gn(co(t))}var i1e="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 jB=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),qB=4;function a1e(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 o1e(t){let e=0;return()=>t[e++]}function Ree(t){return o1e(a1e(s1e(t)))}function s1e(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 c1e(t){return t&1?~t>>1:t>>1}function u1e(t,e){let r=Array(t);for(let n=0,i=0;n<t;n++)r[n]=i+=c1e(e());return r}function O1(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 Cee(t){return I1(()=>{let e=O1(t);if(e.length)return e})}function Nee(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(l1e(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(f1e(r,t))}return e.flat()}function I1(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function Dee(t,e,r){let n=Array(t).fill().map(()=>[]);for(let i=0;i<e;i++)u1e(t,r).forEach((a,o)=>n[o].push(a));return n}function l1e(t,e){let r=1+e(),n=e(),i=I1(e);return Dee(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 f1e(t,e){let r=1+e();return Dee(r,1+t,e).map(i=>[i[0],i.slice(1)])}function d1e(t){let e=[],r=O1(t);return i(n([]),[]),e;function n(a){let o=t(),s=I1(()=>{let c=O1(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 h1e(t){return t.toString(16).toUpperCase().padStart(2,"0")}function $ee(t){return`{${h1e(t)}}`}function p1e(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 Ry(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 g1e(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 y1e="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,xA=4352,AA=4449,SA=4519,Mee=19,kee=21,Cy=28,OA=kee*Cy,m1e=Mee*OA,v1e=P1+m1e,b1e=xA+Mee,w1e=AA+kee,_1e=SA+Cy;function yb(t){return t>>24&255}function Lee(t){return t&16777215}let S8,HB,O8,hx;function E1e(){let t=Ree(y1e);S8=new Map(Cee(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),HB=new Set(O1(t)),O8=new Map,hx=new Map;for(let[e,r]of Nee(t)){if(!HB.has(e)&&r.length==2){let[n,i]=r,a=hx.get(n);a||(a=new Map,hx.set(n,a)),a.set(i,e)}O8.set(e,r.reverse())}}function Uee(t){return t>=P1&&t<v1e}function x1e(t,e){if(t>=xA&&t<b1e&&e>=AA&&e<w1e)return P1+(t-xA)*OA+(e-AA)*Cy;if(Uee(t)&&e>SA&&e<_1e&&(t-P1)%Cy==0)return t+(e-SA);{let r=hx.get(t);return r&&(r=r.get(e),r)?r:-1}}function Bee(t){S8||E1e();let e=[],r=[],n=!1;function i(a){let o=S8.get(a);o&&(n=!0,a|=o),e.push(a)}for(let a of t)for(;;){if(a<128)e.push(a);else if(Uee(a)){let o=a-P1,s=o/OA|0,c=o%OA/Cy|0,u=o%Cy;i(xA+s),i(AA+c),u>0&&i(SA+u)}else{let o=O8.get(a);o?r.push(...o):i(a)}if(!r.length)break;a=r.pop()}if(n&&e.length>1){let a=yb(e[0]);for(let o=1;o<e.length;o++){let s=yb(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=yb(e[--c]),a<=s))break}a=yb(e[o])}}return e}function A1e(t){let e=[],r=[],n=-1,i=0;for(let a of t){let o=yb(a),s=Lee(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=x1e(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 Fee(t){return Bee(t).map(Lee)}function S1e(t){return A1e(Bee(t))}const zB=45,jee=".",qee=65039,Hee=1,eg=t=>Array.from(t);function T1(t,e){return t.P.has(e)||t.Q.has(e)}class O1e extends Array{get is_emoji(){return!0}}let I8,zee,Ch,P8,Vee,_g,_P,D0,Gee,VB,T8;function _$(){if(I8)return;let t=Ree(i1e);const e=()=>O1(t),r=()=>new Set(e());I8=new Map(Nee(t)),zee=r(),Ch=e(),P8=new Set(e().map(f=>Ch[f])),Ch=new Set(Ch),Vee=r(),r();let n=Cee(t),i=t();const a=()=>new Set(e().flatMap(f=>n[f]).concat(e()));_g=I1(f=>{let d=I1(t).map(g=>g+96);if(d.length){let g=f>=i;d[0]-=32,d=Ry(d),g&&(d=`Restricted[${d}]`);let m=a(),w=a(),v=!t();return{N:d,P:m,Q:w,M:v,R:g}}}),_P=r(),D0=new Map;let o=e().concat(eg(_P)).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),_P.has(f)||D0.set(f,m)});for(let{V:f,M:d}of new Set(D0.values())){let g=[];for(let w of f){let v=_g.filter(_=>T1(_,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=>eg(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 _g){for(let d of f.P)u(d);for(let d of f.Q)u(d)}for(let f of s)!D0.has(f)&&!c.has(f)&&D0.set(f,Hee);Gee=new Set(eg(s).concat(eg(Fee(s)))),VB=d1e(t).map(f=>O1e.from(f)).sort(g1e),T8=new Map;for(let f of VB){let d=[T8];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===qee?d.push(...m):d=m}for(let g of d)g.V=f}}function E$(t){return(Wee(t)?"":`${x$(eS([t]))} `)+$ee(t)}function x$(t){return`"${t}"‎`}function I1e(t){if(t.length>=4&&t[2]==zB&&t[3]==zB)throw new Error(`invalid label extension: "${Ry(t.slice(0,4))}"`)}function P1e(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function T1e(t){let e=t[0],r=jB.get(e);if(r)throw Hb(`leading ${r}`);let n=t.length,i=-1;for(let a=1;a<n;a++){e=t[a];let o=jB.get(e);if(o){if(i==a)throw Hb(`${r} + ${o}`);i=a+1,r=o}}if(i==n)throw Hb(`trailing ${r}`)}function eS(t,e=$ee){let r=[];R1e(t[0])&&r.push("◌");let n=0,i=t.length;for(let a=0;a<i;a++){let o=t[a];Wee(o)&&(r.push(Ry(t.slice(n,a))),r.push(e(o)),n=a+1)}return r.push(Ry(t.slice(n,i))),r.join("")}function R1e(t){return _$(),Ch.has(t)}function Wee(t){return _$(),Vee.has(t)}function C1e(t){return M1e(N1e(t,S1e,U1e))}function N1e(t,e,r){if(!t)return[];_$();let n=0;return t.split(jee).map(i=>{let a=p1e(i),o={input:a,offset:n};n+=a.length+1;try{let s=o.tokens=L1e(a,e,r),c=s.length,u;if(!c)throw new Error("empty label");let f=o.output=s.flat();if(P1e(f),!(o.emoji=c>1||s[0].is_emoji)&&f.every(g=>g<128))I1e(f),u="ASCII";else{let g=s.flatMap(m=>m.is_emoji?[]:m);if(!g.length)u="Emoji";else{if(Ch.has(f[0]))throw Hb("leading combining mark");for(let v=1;v<c;v++){let y=s[v];if(!y.is_emoji&&Ch.has(y[0]))throw Hb(`emoji + combining mark: "${Ry(s[v-1])} + ${eS([y[0]])}"`)}T1e(f);let m=eg(new Set(g)),[w]=$1e(m);k1e(w,g),D1e(w,m),u=w.N}}o.type=u}catch(s){o.error=s}return o})}function D1e(t,e){let r,n=[];for(let i of e){let a=D0.get(i);if(a===Hee)return;if(a){let o=a.M.get(i);if(r=r?r.filter(s=>o.has(s)):eg(o),!r.length)return}else n.push(i)}if(r){for(let i of r)if(n.every(a=>T1(i,a)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function $1e(t){let e=_g;for(let r of t){let n=e.filter(i=>T1(i,r));if(!n.length)throw _g.some(i=>T1(i,r))?Yee(e[0],r):Kee(r);if(e=n,n.length==1)break}return e}function M1e(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 ${x$(eS(e))}: ${i}`)}return Ry(n)}).join(jee)}function Kee(t){return new Error(`disallowed character: ${E$(t)}`)}function Yee(t,e){let r=E$(e),n=_g.find(i=>i.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function Hb(t){return new Error(`illegal placement: ${t}`)}function k1e(t,e){for(let r of e)if(!T1(t,r))throw Yee(t,r);if(t.M){let r=Fee(e);for(let n=1,i=r.length;n<i;n++)if(P8.has(r[n])){let a=n+1;for(let o;a<i&&P8.has(o=r[a]);a++)for(let s=n;s<a;s++)if(r[s]==o)throw new Error(`duplicate non-spacing marks: ${E$(o)}`);if(a-n>qB)throw new Error(`excessive non-spacing marks: ${x$(eS(r.slice(n-1,a)))} (${a-n}/${qB})`);n=a}}}function L1e(t,e,r){let n=[],i=[];for(t=t.slice().reverse();t.length;){let a=B1e(t);if(a)i.length&&(n.push(e(i)),i=[]),n.push(r(a));else{let o=t.pop();if(Gee.has(o))i.push(o);else{let s=I8.get(o);if(s)i.push(...s);else if(!zee.has(o))throw Kee(o)}}}return i.length&&n.push(e(i)),n}function U1e(t){return t.filter(e=>e!=qee)}function B1e(t,e){let r=T8,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 Qee=new Uint8Array(32);Qee.fill(0);function GB(t){return De(t.length!==0,"invalid ENS name; empty component","comp",t),t}function Jee(t){const e=co(F1e(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i<e.length;i++)e[i]===46&&(r.push(GB(e.slice(n,i))),n=i+1);return De(n<e.length,"invalid ENS name; empty component","name",t),r.push(GB(e.slice(n))),r}function F1e(t){try{if(t.length===0)throw new Error("empty label");return C1e(t)}catch(e){De(!1,`invalid ENS name (${e.message})`,"name",t)}}function R8(t){De(typeof t=="string","invalid ENS name; not a string","name",t),De(t.length,"invalid ENS name (empty label)","name",t);let e=Qee;const r=Jee(t);for(;r.length;)e=Gn(Wn([e,Gn(r.pop())]));return xt(e)}function j1e(t){return xt(Wn(Jee(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 EP(t,e){return{address:ln(t),storageKeys:e.map((r,n)=>(De(di(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function Rp(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(De(r.length===2,"invalid slot set",`value[${n}]`,r),EP(r[0],r[1])):(De(r!=null&&typeof r=="object","invalid address-slot set","value",t),EP(r.address,r.storageKeys)));De(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 EP(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function Rw(t){let e;return typeof t=="string"?e=xu.computePublicKey(t,!1):e=t.publicKey,ln(Gn("0x"+e.substring(4)).substring(26))}function q1e(t,e){return Rw(xu.recoverPublicKey(t,e))}const To=BigInt(0),H1e=BigInt(2),z1e=BigInt(27),V1e=BigInt(28),G1e=BigInt(35),W1e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function A$(t){return t==="0x"?null:ln(t)}function Xee(t,e){try{return Rp(t)}catch(r){De(!1,r.message,e,t)}}function tS(t,e){return t==="0x"?0:Fr(t,e)}function ro(t,e){if(t==="0x")return To;const r=ar(t,e);return De(r<=W1e,"value exceeds uint size",e,r),r}function ha(t,e){const r=ar(t,"value"),n=No(r);return De(n.length<=32,"value too large",`tx.${e}`,r),n}function Zee(t){return Rp(t).map(e=>[e.address,e.storageKeys])}function K1e(t){const e=s$(t);De(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);const r={type:0,nonce:tS(e[0],"nonce"),gasPrice:ro(e[1],"gasPrice"),gasLimit:ro(e[2],"gasLimit"),to:A$(e[3]),value:ro(e[4],"value"),data:xt(e[5]),chainId:To};if(e.length===6)return r;const n=ro(e[6],"v"),i=ro(e[7],"r"),a=ro(e[8],"s");if(i===To&&a===To)r.chainId=n;else{let o=(n-G1e)/H1e;o<To&&(o=To),r.chainId=o,De(o!==To||n===z1e||n===V1e,"non-canonical legacy v","v",e[6]),r.signature=Lc.from({r:gp(e[7],32),s:gp(e[8],32),v:n}),r.hash=Gn(t)}return r}function WB(t,e){const r=[ha(t.nonce||0,"nonce"),ha(t.gasPrice||0,"gasPrice"),ha(t.gasLimit||0,"gasLimit"),t.to!=null?ln(t.to):"0x",ha(t.value||0,"value"),t.data||"0x"];let n=To;if(t.chainId!=To)n=ar(t.chainId,"tx.chainId"),De(!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!==To&&(r.push(No(n)),r.push("0x"),r.push("0x")),A1(r);let i=BigInt(27+e.yParity);return n!==To?i=Lc.getChainIdV(n,e.v):BigInt(e.v)!==i&&De(!1,"tx.chainId/sig.v mismatch","sig",e),r.push(No(i)),r.push(No(e.r)),r.push(No(e.s)),A1(r)}function ete(t,e){let r;try{if(r=tS(e[0],"yParity"),r!==0&&r!==1)throw new Error("bad yParity")}catch{De(!1,"invalid yParity","yParity",e[0])}const n=gp(e[1],32),i=gp(e[2],32),a=Lc.from({r:n,s:i,yParity:r});t.signature=a}function Y1e(t){const e=s$(zt(t).slice(1));De(Array.isArray(e)&&(e.length===9||e.length===12),"invalid field count for transaction type: 2","data",xt(t));const r=ro(e[2],"maxPriorityFeePerGas"),n=ro(e[3],"maxFeePerGas"),i={type:2,chainId:ro(e[0],"chainId"),nonce:tS(e[1],"nonce"),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:ro(e[4],"gasLimit"),to:A$(e[5]),value:ro(e[6],"value"),data:xt(e[7]),accessList:Xee(e[8],"accessList")};return e.length===9||(i.hash=Gn(t),ete(i,e.slice(9))),i}function KB(t,e){const r=[ha(t.chainId||0,"chainId"),ha(t.nonce||0,"nonce"),ha(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),ha(t.maxFeePerGas||0,"maxFeePerGas"),ha(t.gasLimit||0,"gasLimit"),t.to!=null?ln(t.to):"0x",ha(t.value||0,"value"),t.data||"0x",Zee(t.accessList||[])];return e&&(r.push(ha(e.yParity,"yParity")),r.push(No(e.r)),r.push(No(e.s))),Wn(["0x02",A1(r)])}function Q1e(t){const e=s$(zt(t).slice(1));De(Array.isArray(e)&&(e.length===8||e.length===11),"invalid field count for transaction type: 1","data",xt(t));const r={type:1,chainId:ro(e[0],"chainId"),nonce:tS(e[1],"nonce"),gasPrice:ro(e[2],"gasPrice"),gasLimit:ro(e[3],"gasLimit"),to:A$(e[4]),value:ro(e[5],"value"),data:xt(e[6]),accessList:Xee(e[7],"accessList")};return e.length===8||(r.hash=Gn(t),ete(r,e.slice(8))),r}function YB(t,e){const r=[ha(t.chainId||0,"chainId"),ha(t.nonce||0,"nonce"),ha(t.gasPrice||0,"gasPrice"),ha(t.gasLimit||0,"gasLimit"),t.to!=null?ln(t.to):"0x",ha(t.value||0,"value"),t.data||"0x",Zee(t.accessList||[])];return e&&(r.push(ha(e.yParity,"recoveryParam")),r.push(No(e.r)),r.push(No(e.s))),Wn(["0x01",A1(r)])}var pl,Hg,zg,Vg,Gg,Wg,Kg,Yg,Qg,Jg,Xg,Zg;const Rf=class Rf{constructor(){Je(this,pl,void 0);Je(this,Hg,void 0);Je(this,zg,void 0);Je(this,Vg,void 0);Je(this,Gg,void 0);Je(this,Wg,void 0);Je(this,Kg,void 0);Je(this,Yg,void 0);Je(this,Qg,void 0);Je(this,Jg,void 0);Je(this,Xg,void 0);Je(this,Zg,void 0);Te(this,pl,null),Te(this,Hg,null),Te(this,Vg,0),Te(this,Gg,BigInt(0)),Te(this,Wg,null),Te(this,Kg,null),Te(this,Yg,null),Te(this,zg,"0x"),Te(this,Qg,BigInt(0)),Te(this,Jg,BigInt(0)),Te(this,Xg,null),Te(this,Zg,null)}get type(){return K(this,pl)}set type(e){switch(e){case null:Te(this,pl,null);break;case 0:case"legacy":Te(this,pl,0);break;case 1:case"berlin":case"eip-2930":Te(this,pl,1);break;case 2:case"london":case"eip-1559":Te(this,pl,2);break;default:De(!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 K(this,Hg)}set to(e){Te(this,Hg,e==null?null:ln(e))}get nonce(){return K(this,Vg)}set nonce(e){Te(this,Vg,Fr(e,"value"))}get gasLimit(){return K(this,Gg)}set gasLimit(e){Te(this,Gg,ar(e))}get gasPrice(){const e=K(this,Wg);return e==null&&(this.type===0||this.type===1)?To:e}set gasPrice(e){Te(this,Wg,e==null?null:ar(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=K(this,Kg);return e??(this.type===2?To:null)}set maxPriorityFeePerGas(e){Te(this,Kg,e==null?null:ar(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=K(this,Yg);return e??(this.type===2?To:null)}set maxFeePerGas(e){Te(this,Yg,e==null?null:ar(e,"maxFeePerGas"))}get data(){return K(this,zg)}set data(e){Te(this,zg,xt(e))}get value(){return K(this,Qg)}set value(e){Te(this,Qg,ar(e,"value"))}get chainId(){return K(this,Jg)}set chainId(e){Te(this,Jg,ar(e))}get signature(){return K(this,Xg)||null}set signature(e){Te(this,Xg,e==null?null:Lc.from(e))}get accessList(){const e=K(this,Zg)||null;return e??(this.type===1||this.type===2?[]:null)}set accessList(e){Te(this,Zg,e==null?null:Rp(e))}get hash(){return this.signature==null?null:Gn(this.serialized)}get unsignedHash(){return Gn(this.unsignedSerialized)}get from(){return this.signature==null?null:q1e(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:xu.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){switch(at(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 YB(this,this.signature);case 2:return KB(this,this.signature)}at(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get unsignedSerialized(){switch(this.inferType()){case 0:return WB(this);case 1:return YB(this);case 2:return KB(this)}at(!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&&at(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),at(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),at(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 Rf.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 Rf;if(typeof e=="string"){const n=zt(e);if(n[0]>=127)return Rf.from(K1e(n));switch(n[0]){case 1:return Rf.from(Q1e(n));case 2:return Rf.from(Y1e(n))}at(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new Rf;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=Lc.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.hash!=null&&(De(r.isSigned(),"unsigned transaction cannot define hash","tx",e),De(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(De(r.isSigned(),"unsigned transaction cannot define from","tx",e),De(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};pl=new WeakMap,Hg=new WeakMap,zg=new WeakMap,Vg=new WeakMap,Gg=new WeakMap,Wg=new WeakMap,Kg=new WeakMap,Yg=new WeakMap,Qg=new WeakMap,Jg=new WeakMap,Xg=new WeakMap,Zg=new WeakMap;let R1=Rf;function J1e(t){return typeof t=="string"&&(t=co(t)),Gn(Wn([co(Ube),co(String(t.length)),t]))}const tte=new Uint8Array(32);tte.fill(0);const X1e=BigInt(-1),rte=BigInt(0),nte=BigInt(1),Z1e=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function ewe(t){const e=zt(t),r=e.length%32;return r?Wn([e,tte.slice(r)]):xt(e)}const twe=Ul(nte,32),rwe=Ul(rte,32),QB={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},xP=["name","version","chainId","verifyingContract","salt"];function JB(t){return function(e){return De(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const nwe={name:JB("name"),version:JB("version"),chainId:function(t){const e=ar(t,"domain.chainId");return De(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):X0(e)},verifyingContract:function(t){try{return ln(t).toLowerCase()}catch{}De(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=zt(t,"domain.salt");return De(e.length===32,'invalid domain value "salt"',"domain.salt",t),xt(e)}};function AP(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");De(n%8===0&&n!==0&&n<=256&&(e[2]==null||e[2]===String(n)),"invalid numeric width","type",t);const i=Th(Z1e,r?n-1:n),a=r?(i+nte)*X1e:rte;return function(o){const s=ar(o,"value");return De(s>=a&&s<=i,`value out-of-bounds for ${t}`,"value",s),Ul(r?bZ(s,256):s,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return De(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const i=zt(n);return De(i.length===r,`invalid length for ${t}`,"value",n),ewe(n)}}}switch(t){case"address":return function(e){return gp(ln(e),32)};case"bool":return function(e){return e?twe:rwe};case"bytes":return function(e){return Gn(e)};case"string":return function(e){return Bl(e)}}return null}function XB(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}var tw,gl,ey,S2,ite;const Ss=class Ss{constructor(e){Je(this,S2);je(this,"primaryType");Je(this,tw,void 0);Je(this,gl,void 0);Je(this,ey,void 0);Te(this,tw,JSON.stringify(e)),Te(this,gl,new Map),Te(this,ey,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]){De(!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;De(f!==s,`circular type reference to ${JSON.stringify(f)}`,"types",e),!AP(f)&&(De(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);De(a.length!==0,"missing primary type","types",e),De(a.length===1,`ambiguous primary types or unused types: ${a.map(s=>JSON.stringify(s)).join(", ")}`,"types",e),Jt(this,{primaryType:a[0]});function o(s,c){De(!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(),K(this,gl).set(s,XB(s,e[s])+u.map(f=>XB(f,e[f])).join(""))}}get types(){return JSON.parse(K(this,tw))}getEncoder(e){let r=K(this,ey).get(e);return r||(r=ut(this,S2,ite).call(this,e),K(this,ey).set(e,r)),r}encodeType(e){const r=K(this,gl).get(e);return De(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Gn(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(AP(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i)return De(!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),{});De(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Ss(e)}static getPrimaryType(e){return Ss.from(e).primaryType}static hashStruct(e,r,n){return Ss.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const i=QB[n];De(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>xP.indexOf(n.name)-xP.indexOf(i.name)),Ss.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Wn(["0x1901",Ss.hashDomain(e),Ss.from(r).hash(n)])}static hash(e,r,n){return Gn(Ss.encode(e,r,n))}static async resolveNames(e,r,n,i){e=Object.assign({},e);for(const s in e)e[s]==null&&delete e[s];const a={};e.verifyingContract&&!di(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");const o=Ss.from(r);o.visit(n,(s,c)=>(s==="address"&&!di(c,20)&&(a[c]="0x"),c));for(const s in a)a[s]=await i(s);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=o.visit(n,(s,c)=>s==="address"&&a[c]?a[c]:c),{domain:e,value:n}}static getPayload(e,r,n){Ss.hashDomain(e);const i={},a=[];xP.forEach(c=>{const u=e[c];u!=null&&(i[c]=nwe[c](u),a.push({name:c,type:QB[c]}))});const o=Ss.from(r),s=Object.assign({},r);return De(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(zt(u));if(c.match(/^u?int/))return ar(u).toString();switch(c){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return De(typeof u=="string","invalid string","value",u),u}De(!1,"unsupported type","type",c)})}}};tw=new WeakMap,gl=new WeakMap,ey=new WeakMap,S2=new WeakSet,ite=function(e){{const i=AP(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],a=this.getEncoder(i);return o=>{De(!r[3]||parseInt(r[3])===o.length,`array length mismatch; expected length ${parseInt(r[3])}`,"value",o);let s=o.map(a);return K(this,gl).has(i)&&(s=s.map(Gn)),Gn(Wn(s))}}const n=this.types[e];if(n){const i=Bl(K(this,gl).get(e));return a=>{const o=n.map(({name:s,type:c})=>{const u=this.getEncoder(c)(a[s]);return K(this,gl).has(c)?Gn(u):u});return o.unshift(i),Wn(o)}}De(!1,`unknown type: ${e}`,"type",e)};let Ny=Ss;function oo(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const iwe="external public payable",awe=oo(iwe.split(" ")),ate="constant external internal payable private public pure view",owe=oo(ate.split(" ")),ote="constructor error event fallback function receive struct",ste=oo(ote.split(" ")),cte="calldata memory storage payable indexed",swe=oo(cte.split(" ")),cwe="tuple returns",uwe=[ote,cte,cwe,ate].join(" "),lwe=oo(uwe.split(" ")),fwe={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},dwe=new RegExp("^(\\s*)"),hwe=new RegExp("^([0-9]+)"),pwe=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),ute=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),lte=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var ua,xc,rw,C8;const O2=class O2{constructor(e){Je(this,rw);Je(this,ua,void 0);Je(this,xc,void 0);Te(this,ua,0),Te(this,xc,e.slice())}get offset(){return K(this,ua)}get length(){return K(this,xc).length-K(this,ua)}clone(){return new O2(K(this,xc))}reset(){Te(this,ua,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=ut(this,rw,C8).call(this,K(this,ua)+1,e.match+1);return Te(this,ua,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;K(this,ua)<e.match-1;){const n=this.peek().linkNext;r.push(ut(this,rw,C8).call(this,K(this,ua)+1,n)),Te(this,ua,n)}return Te(this,ua,e.match+1),r}peek(){if(K(this,ua)>=K(this,xc).length)throw new Error("out-of-bounds");return K(this,xc)[K(this,ua)]}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 Bm(this,ua)._++,e}toString(){const e=[];for(let r=K(this,ua);r<K(this,xc).length;r++){const n=K(this,xc)[r];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(" ")}>`}};ua=new WeakMap,xc=new WeakMap,rw=new WeakSet,C8=function(e=0,r=0){return new O2(K(this,xc).slice(e,r).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let Uc=O2;function Sd(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(dwe);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=fwe[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=Fr(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(pwe),s){if(c.text=s[1],a+=c.text.length,lwe.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(lte)){c.type="TYPE";continue}c.type="ID";continue}if(s=o.match(hwe),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 Uc(e.map(o=>Object.freeze(o)))}function ZB(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 rS(t,e){if(e.peekKeyword(ste)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function Fl(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 fte(t){let e=Fl(t,owe);return ZB(e,oo("constant payable nonpayable".split(" "))),ZB(e,oo("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 Nl(t,e){return t.popParams().map(r=>va.from(r,e))}function dte(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return ar(t.pop().text);throw new Error("invalid gas")}return null}function yp(t){if(t.length)throw new Error(`unexpected tokens: ${t.toString()}`)}const gwe=new RegExp(/^(.*)\[([0-9]*)\]$/);function eF(t){const e=t.match(lte);if(De(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);De(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);De(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const fi={},Bo=Symbol.for("_ethers_internal"),tF="_ParamTypeInternal",rF="_ErrorInternal",nF="_EventInternal",iF="_ConstructorInternal",aF="_FallbackInternal",oF="_FunctionInternal",sF="_StructInternal";var ty,px;const Os=class Os{constructor(e,r,n,i,a,o,s,c){Je(this,ty);je(this,"name");je(this,"type");je(this,"baseType");je(this,"indexed");je(this,"components");je(this,"arrayLength");je(this,"arrayChildren");if(xd(e,fi,"ParamType"),Object.defineProperty(this,Bo,{value:tF}),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("");Jt(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 ut(this,ty,px).call(this,n,e,r,a=>{i[0]=a}),n.length&&await Promise.all(n),i[0]}static from(e,r){if(Os.isParamType(e))return e;if(typeof e=="string")try{return Os.from(Sd(e),r)}catch{De(!1,"invalid param type","obj",e)}else if(e instanceof Uc){let s="",c="",u=null;Fl(e,oo(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",u=e.popParams().map(v=>Os.from(v)),s=`tuple(${u.map(v=>v.format()).join(",")})`):(s=eF(e.popType("TYPE")),c=s);let f=null,d=null;for(;e.length&&e.peekType("BRACKET");){const v=e.pop();f=new Os(fi,"",s,c,null,u,d,f),d=v.value,s+=v.text,c="array",u=null}let g=null;if(Fl(e,swe).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 Os(fi,w,s,c,g,u,d,f)}const n=e.name;De(!n||typeof n=="string"&&n.match(ute),"invalid name","obj.name",n);let i=e.indexed;i!=null&&(De(r,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let a=e.type,o=a.match(gwe);if(o){const s=parseInt(o[2]||"-1"),c=Os.from({type:o[1],components:e.components});return new Os(fi,n||"",a,"array",i,null,s,c)}if(a==="tuple"||a.startsWith("tuple(")||a.startsWith("(")){const s=e.components!=null?e.components.map(u=>Os.from(u)):null;return new Os(fi,n||"",a,"tuple",i,s,null,null)}return a=eF(e.type),new Os(fi,n||"",a,a,i,null,null,null)}static isParamType(e){return e&&e[Bo]===tF}};ty=new WeakSet,px=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;ut(f=o,ty,px).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;ut(f=o[u],ty,px).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 va=Os;class mp{constructor(e,r,n){je(this,"type");je(this,"inputs");xd(e,fi,"Fragment"),n=Object.freeze(n.slice()),Jt(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{mp.from(JSON.parse(e))}catch{}return mp.from(Sd(e))}if(e instanceof Uc)switch(e.peekKeyword(ste)){case"constructor":return Ol.from(e);case"error":return Ro.from(e);case"event":return du.from(e);case"fallback":case"receive":return sl.from(e);case"function":return hu.from(e);case"struct":return sp.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Ol.from(e);case"error":return Ro.from(e);case"event":return du.from(e);case"fallback":case"receive":return sl.from(e);case"function":return hu.from(e);case"struct":return sp.from(e)}at(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}De(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Ol.isFragment(e)}static isError(e){return Ro.isFragment(e)}static isEvent(e){return du.isFragment(e)}static isFunction(e){return hu.isFragment(e)}static isStruct(e){return sp.isFragment(e)}}class nS extends mp{constructor(r,n,i,a){super(r,n,a);je(this,"name");De(typeof i=="string"&&i.match(ute),"invalid identifier","name",i),a=Object.freeze(a.slice()),Jt(this,{name:i})}}function C1(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}class Ro extends nS{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,Bo,{value:rF})}get selector(){return Bl(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+C1(e,this.inputs)),r.join(" ")}static from(e){if(Ro.isFragment(e))return e;if(typeof e=="string")return Ro.from(Sd(e));if(e instanceof Uc){const r=rS("error",e),n=Nl(e);return yp(e),new Ro(fi,r,n)}return new Ro(fi,e.name,e.inputs?e.inputs.map(va.from):[])}static isFragment(e){return e&&e[Bo]===rF}}class du extends nS{constructor(r,n,i,a){super(r,"event",n,i);je(this,"anonymous");Object.defineProperty(this,Bo,{value:nF}),Jt(this,{anonymous:a})}get topicHash(){return Bl(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+C1(r,this.inputs)),r!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(r,n){return n=(n||[]).map(a=>va.from(a)),new du(fi,r,n,!1).topicHash}static from(r){if(du.isFragment(r))return r;if(typeof r=="string")try{return du.from(Sd(r))}catch{De(!1,"invalid event fragment","obj",r)}else if(r instanceof Uc){const n=rS("event",r),i=Nl(r,!0),a=!!Fl(r,oo(["anonymous"])).has("anonymous");return yp(r),new du(fi,n,i,a)}return new du(fi,r.name,r.inputs?r.inputs.map(n=>va.from(n,!0)):[],!!r.anonymous)}static isFragment(r){return r&&r[Bo]===nF}}class Ol extends mp{constructor(r,n,i,a,o){super(r,n,i);je(this,"payable");je(this,"gas");Object.defineProperty(this,Bo,{value:iF}),Jt(this,{payable:a,gas:o})}format(r){if(at(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${C1(r,this.inputs)}`];return n.push(this.payable?"payable":"nonpayable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(r){if(Ol.isFragment(r))return r;if(typeof r=="string")try{return Ol.from(Sd(r))}catch{De(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof Uc){Fl(r,oo(["constructor"]));const n=Nl(r),i=!!Fl(r,awe).has("payable"),a=dte(r);return yp(r),new Ol(fi,"constructor",n,i,a)}return new Ol(fi,"constructor",r.inputs?r.inputs.map(va.from):[],!!r.payable,r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[Bo]===iF}}class sl extends mp{constructor(r,n,i){super(r,"fallback",n);je(this,"payable");Object.defineProperty(this,Bo,{value:aF}),Jt(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(sl.isFragment(r))return r;if(typeof r=="string")try{return sl.from(Sd(r))}catch{De(!1,"invalid fallback fragment","obj",r)}else if(r instanceof Uc){const n=r.toString(),i=r.peekKeyword(oo(["fallback","receive"]));if(De(i,"type must be fallback or receive","obj",n),r.popKeyword(oo(["fallback","receive"]))==="receive"){const c=Nl(r);return De(c.length===0,"receive cannot have arguments","obj.inputs",c),Fl(r,oo(["payable"])),yp(r),new sl(fi,[],!0)}let o=Nl(r);o.length?De(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(c=>c.format("minimal")).join(", ")):o=[va.from("bytes")];const s=fte(r);if(De(s==="nonpayable"||s==="payable","fallback cannot be constants","obj.stateMutability",s),Fl(r,oo(["returns"])).has("returns")){const c=Nl(r);De(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(u=>u.format("minimal")).join(", "))}return yp(r),new sl(fi,o,s==="payable")}if(r.type==="receive")return new sl(fi,[],!0);if(r.type==="fallback"){const n=[va.from("bytes")],i=r.stateMutability==="payable";return new sl(fi,n,i)}De(!1,"invalid fallback description","obj",r)}static isFragment(r){return r&&r[Bo]===aF}}class hu extends nS{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,Bo,{value:oF}),o=Object.freeze(o.slice()),Jt(this,{constant:i==="view"||i==="pure",gas:s,outputs:o,payable:i==="payable",stateMutability:i})}get selector(){return Bl(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+C1(r,this.inputs)),r!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(C1(r,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(r,n){return n=(n||[]).map(a=>va.from(a)),new hu(fi,r,"view",n,[],null).selector}static from(r){if(hu.isFragment(r))return r;if(typeof r=="string")try{return hu.from(Sd(r))}catch{De(!1,"invalid function fragment","obj",r)}else if(r instanceof Uc){const i=rS("function",r),a=Nl(r),o=fte(r);let s=[];Fl(r,oo(["returns"])).has("returns")&&(s=Nl(r));const c=dte(r);return yp(r),new hu(fi,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 hu(fi,r.name,n,r.inputs?r.inputs.map(va.from):[],r.outputs?r.outputs.map(va.from):[],r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[Bo]===oF}}class sp extends nS{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,Bo,{value:sF})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return sp.from(Sd(e))}catch{De(!1,"invalid struct fragment","obj",e)}else if(e instanceof Uc){const r=rS("struct",e),n=Nl(e);return yp(e),new sp(fi,r,n)}return new sp(fi,e.name,e.inputs?e.inputs.map(va.from):[])}static isFragment(e){return e&&e[Bo]===sF}}const Fc=new Map;Fc.set(0,"GENERIC_PANIC");Fc.set(1,"ASSERT_FALSE");Fc.set(17,"OVERFLOW");Fc.set(18,"DIVIDE_BY_ZERO");Fc.set(33,"ENUM_RANGE_ERROR");Fc.set(34,"BAD_STORAGE_DATA");Fc.set(49,"STACK_UNDERFLOW");Fc.set(50,"ARRAY_RANGE_ERROR");Fc.set(65,"OUT_OF_MEMORY");Fc.set(81,"UNINITIALIZED_FUNCTION_CALL");const ywe=new RegExp(/^bytes([0-9]*)$/),mwe=new RegExp(/^(u?int)([0-9]*)$/);let SP=null;function vwe(t,e,r,n){let i="missing revert data",a=null;const o=null;let s=null;if(r){i="execution reverted";const u=zt(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 ${Fc.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)),Fi(i,"CALL_EXCEPTION",{action:t,data:r,reason:a,transaction:c,invocation:o,revert:s})}var Mf,$0;const I2=class I2{constructor(){Je(this,Mf)}getDefaultValue(e){const r=e.map(i=>ut(this,Mf,$0).call(this,va.from(i)));return new uE(r,"_").defaultValue()}encode(e,r){pZ(r.length,e.length,"types/values length mismatch");const n=e.map(o=>ut(this,Mf,$0).call(this,va.from(o))),i=new uE(n,"_"),a=new m8;return i.encode(a,r),a.data}decode(e,r,n){const i=e.map(o=>ut(this,Mf,$0).call(this,va.from(o)));return new uE(i,"_").decode(new v8(r,n))}static defaultAbiCoder(){return SP==null&&(SP=new I2),SP}static getBuiltinCallException(e,r,n){return vwe(e,r,n,I2.defaultAbiCoder())}};Mf=new WeakSet,$0=function(e){if(e.isArray())return new Wbe(ut(this,Mf,$0).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new uE(e.components.map(n=>ut(this,Mf,$0).call(this,n)),e.name);switch(e.baseType){case"address":return new Vbe(e.name);case"bool":return new Kbe(e.name);case"string":return new n1e(e.name);case"bytes":return new Ybe(e.name);case"":return new Xbe(e.name)}let r=e.type.match(mwe);if(r){let n=parseInt(r[2]||"256");return De(n!==0&&n<=256&&n%8===0,"invalid "+r[1]+" bit length","param",e),new r1e(n/8,r[1]==="int",e.name)}if(r=e.type.match(ywe),r){let n=parseInt(r[1]);return De(n!==0&&n<=32,"invalid bytes length","param",e),new Qbe(n,e.name)}De(!1,"invalid type","type",e.type)};let N1=I2;class bwe{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();Jt(this,{fragment:e,name:i,signature:a,topic:r,args:n})}}class wwe{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();Jt(this,{fragment:e,name:a,args:n,signature:o,selector:r,value:i})}}class _we{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();Jt(this,{fragment:e,name:i,args:n,signature:a,selector:r})}}class cF{constructor(e){je(this,"hash");je(this,"_isIndexed");Jt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const uF={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"},lF={"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&&uF[t.toString()]&&(e=uF[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var au,ou,su,Ra,ry,gx,ny,yx;const ag=class ag{constructor(e){Je(this,ry);Je(this,ny);je(this,"fragments");je(this,"deploy");je(this,"fallback");je(this,"receive");Je(this,au,void 0);Je(this,ou,void 0);Je(this,su,void 0);Je(this,Ra,void 0);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,Te(this,su,new Map),Te(this,au,new Map),Te(this,ou,new Map);const n=[];for(const o of r)try{n.push(mp.from(o))}catch(s){console.log("EE",s)}Jt(this,{fragments:Object.freeze(n)});let i=null,a=!1;Te(this,Ra,this.getAbiCoder()),this.fragments.forEach((o,s)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}Jt(this,{deploy:o});return;case"fallback":o.inputs.length===0?a=!0:(De(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${s}]`,o),i=o,a=i.payable);return;case"function":c=K(this,su);break;case"event":c=K(this,ou);break;case"error":c=K(this,au);break;default:return}const u=o.format();c.has(u)||c.set(u,o)}),this.deploy||Jt(this,{deploy:Ol.from("constructor()")}),Jt(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 N1.defaultAbiCoder()}getFunctionName(e){const r=ut(this,ry,gx).call(this,e,null,!1);return De(r,"no matching function","key",e),r.name}hasFunction(e){return!!ut(this,ry,gx).call(this,e,null,!1)}getFunction(e,r){return ut(this,ry,gx).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(K(this,su).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(K(this,su).get(i),n)}}getEventName(e){const r=ut(this,ny,yx).call(this,e,null,!1);return De(r,"no matching event","key",e),r.name}hasEvent(e){return!!ut(this,ny,yx).call(this,e,null,!1)}getEvent(e,r){return ut(this,ny,yx).call(this,e,r||null,!0)}forEachEvent(e){const r=Array.from(K(this,ou).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(K(this,ou).get(i),n)}}getError(e,r){if(di(e)){const i=e.toLowerCase();if(lF[i])return Ro.from(lF[i].signature);for(const a of K(this,au).values())if(i===a.selector)return a;return null}if(e.indexOf("(")===-1){const i=[];for(const[a,o]of K(this,au))a.split("(")[0]===e&&i.push(o);if(i.length===0)return e==="Error"?Ro.from("error Error(string)"):e==="Panic"?Ro.from("error Panic(uint256)"):null;if(i.length>1){const a=i.map(o=>JSON.stringify(o.format())).join(", ");De(!1,`ambiguous error description (i.e. ${a})`,"name",e)}return i[0]}if(e=Ro.from(e).format(),e==="Error(string)")return Ro.from("error Error(string)");if(e==="Panic(uint256)")return Ro.from("error Panic(uint256)");const n=K(this,au).get(e);return n||null}forEachError(e){const r=Array.from(K(this,au).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(K(this,au).get(i),n)}}_decodeParams(e,r){return K(this,Ra).decode(e,r)}_encodeParams(e,r){return K(this,Ra).encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);De(n,"unknown error","fragment",e),e=n}return De(Jn(r,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",r),this._decodeParams(e.inputs,Jn(r,4))}encodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);De(n,"unknown error","fragment",e),e=n}return Wn([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);De(n,"unknown function","fragment",e),e=n}return De(Jn(r,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",r),this._decodeParams(e.inputs,Jn(r,4))}encodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);De(n,"unknown function","fragment",e),e=n}return Wn([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionResult(e,r){if(typeof e=="string"){const a=this.getFunction(e);De(a,"unknown function","fragment",e),e=a}let n="invalid length for result data";const i=Fa(r);if(i.length%32===0)try{return K(this,Ra).decode(e.outputs,i)}catch{n="could not decode result data"}at(!1,n,"BAD_DATA",{value:xt(i),info:{method:e.name,signature:e.format()}})}makeError(e,r){const n=zt(e,"data"),i=N1.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=K(this,Ra).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);De(n,"unknown function","fragment",e),e=n}return xt(K(this,Ra).encode(e.outputs,r||[]))}encodeFilterTopics(e,r){if(typeof e=="string"){const a=this.getEvent(e);De(a,"unknown event","eventFragment",e),e=a}at(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"?Bl(o):a.type==="bytes"?Gn(xt(o)):(a.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":a.type.match(/^u?int/)?o=Ul(o):a.type.match(/^bytes/)?o=Pme(o,32):a.type==="address"&&K(this,Ra).encode(["address"],[o]),gp(xt(o),32));for(r.forEach((a,o)=>{const s=e.inputs[o];if(!s.indexed){De(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"?De(!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);De(o,"unknown event","eventFragment",e),e=o}const n=[],i=[],a=[];return e.anonymous||n.push(e.topicHash),De(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(Bl(c));else if(o.type==="bytes")n.push(Gn(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(K(this,Ra).encode([o.type],[c]))}else i.push(o),a.push(c)}),{data:K(this,Ra).encode(i,a),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const m=this.getEvent(e);De(m,"unknown event","eventFragment",e),e=m}if(n!=null&&!e.anonymous){const m=e.topicHash;De(di(n[0],32)&&n[0].toLowerCase()===m,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const i=[],a=[],o=[];e.inputs.forEach((m,w)=>{m.indexed?m.type==="string"||m.type==="bytes"||m.baseType==="tuple"||m.baseType==="array"?(i.push(va.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?K(this,Ra).decode(i,Wn(n)):null,c=K(this,Ra).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 cF(null);else if(o[w])v=new cF(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)}),EA.fromItems(u,f)}parseTransaction(e){const r=zt(e.data,"tx.data"),n=ar(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(xt(r.slice(0,4)));if(!i)return null;const a=K(this,Ra).decode(i.inputs,r.slice(4));return new wwe(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 bwe(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=xt(e),n=this.getError(Jn(r,0,4));if(!n)return null;const i=K(this,Ra).decode(n.inputs,Jn(r,4));return new _we(n,n.selector,i)}static from(e){return e instanceof ag?e:typeof e=="string"?new ag(JSON.parse(e)):typeof e.format=="function"?new ag(e.format("json")):new ag(e)}};au=new WeakMap,ou=new WeakMap,su=new WeakMap,Ra=new WeakMap,ry=new WeakSet,gx=function(e,r,n){if(di(e)){const a=e.toLowerCase();for(const o of K(this,su).values())if(a===o.selector)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of K(this,su))o.split("(")[0]===e&&a.push(s);if(r){const o=r.length>0?r[r.length-1]:null;let s=r.length,c=!0;Ha.isTyped(o)&&o.type==="overrides"&&(c=!1,s--);for(let u=a.length-1;u>=0;u--){const f=a[u].inputs.length;f!==s&&(!c||f!==s-1)&&a.splice(u,1)}for(let u=a.length-1;u>=0;u--){const f=a[u].inputs;for(let d=0;d<r.length;d++)if(Ha.isTyped(r[d])){if(d>=f.length){if(r[d].type==="overrides")continue;a.splice(u,1);break}if(r[d].type!==f[d].baseType){a.splice(u,1);break}}}}if(a.length===1&&r&&r.length!==a[0].inputs.length){const o=r[r.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&a.splice(0,1)}if(a.length===0)return null;if(a.length>1&&n){const o=a.map(s=>JSON.stringify(s.format())).join(", ");De(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return a[0]}const i=K(this,su).get(hu.from(e).format());return i||null},ny=new WeakSet,yx=function(e,r,n){if(di(e)){const a=e.toLowerCase();for(const o of K(this,ou).values())if(a===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const a=[];for(const[o,s]of K(this,ou))o.split("(")[0]===e&&a.push(s);if(r){for(let o=a.length-1;o>=0;o--)a[o].inputs.length<r.length&&a.splice(o,1);for(let o=a.length-1;o>=0;o--){const s=a[o].inputs;for(let c=0;c<r.length;c++)if(Ha.isTyped(r[c])&&r[c].type!==s[c].baseType){a.splice(o,1);break}}}if(a.length===0)return null;if(a.length>1&&n){const o=a.map(s=>JSON.stringify(s.format())).join(", ");De(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return a[0]}const i=K(this,ou).get(du.from(e).format());return i||null};let N8=ag;const hte=BigInt(0);function zb(t){return t??null}function Ua(t){return t==null?null:t.toString()}class fF{constructor(e,r,n){je(this,"gasPrice");je(this,"maxFeePerGas");je(this,"maxPriorityFeePerGas");Jt(this,{gasPrice:zb(e),maxFeePerGas:zb(r),maxPriorityFeePerGas:zb(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Ua(e),maxFeePerGas:Ua(r),maxPriorityFeePerGas:Ua(n)}}}function IA(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]=ar(t[i],`request.${i}`));const n="type,nonce".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=Fr(t[i],`request.${i}`));return t.accessList&&(e.accessList=Rp(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 yl;class Ewe{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");Je(this,yl,void 0);Te(this,yl,e.transactions.map(n=>typeof n!="string"?new D1(n,r):n)),Jt(this,{provider:r,hash:zb(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:zb(e.baseFeePerGas)})}get transactions(){return K(this,yl).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=K(this,yl).slice();return e.length===0?[]:(at(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:i,gasUsed:a,hash:o,miner:s,nonce:c,number:u,parentHash:f,timestamp:d,transactions:g}=this;return{_type:"Block",baseFeePerGas:Ua(e),difficulty:Ua(r),extraData:n,gasLimit:Ua(i),gasUsed:Ua(a),hash:o,miner:s,nonce:c,number:u,parentHash:f,timestamp:d,transactions:g}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>e<this.length?{value:r[e++],done:!1}:{value:void 0,done:!0}}}get length(){return K(this,yl).length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(e){let r;if(typeof e=="number")r=K(this,yl)[e];else{const n=e.toLowerCase();for(const i of K(this,yl))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;De(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return xwe(this)}}yl=new WeakMap;class Cw{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());Jt(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 at(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return at(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return at(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return Awe(this)}}var nw;class pte{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");Je(this,nw,void 0);Te(this,nw,Object.freeze(e.logs.map(i=>new Cw(i,r))));let n=hte;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),Jt(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 K(this,nw)}toJSON(){const{to:e,from:r,contractAddress:n,hash:i,index:a,blockHash:o,blockNumber:s,logsBloom:c,logs:u,status:f,root:d}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:s,contractAddress:n,cumulativeGasUsed:Ua(this.cumulativeGasUsed),from:r,gasPrice:Ua(this.gasPrice),gasUsed:Ua(this.gasUsed),hash:i,index:a,logs:u,logsBloom:c,root:d,status:f,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(e==null)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(e==null)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return yte(this)}reorderedEvent(e){return at(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),gte(this,e)}}nw=new WeakMap;var kf;const GL=class GL{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");Je(this,kf,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,kf,-1)}toJSON(){const{blockNumber:e,blockHash:r,index:n,hash:i,type:a,to:o,from:s,nonce:c,data:u,signature:f,accessList:d}=this;return{_type:"TransactionReceipt",accessList:d,blockNumber:e,blockHash:r,chainId:Ua(this.chainId),data:u,from:s,gasLimit:Ua(this.gasLimit),gasPrice:Ua(this.gasPrice),hash:i,maxFeePerGas:Ua(this.maxFeePerGas),maxPriorityFeePerGas:Ua(this.maxPriorityFeePerGas),nonce:c,signature:f,to:o,index:n,type:a,value:Ua(this.value)}}async getBlock(){let e=this.blockNumber;if(e==null){const n=await this.getTransaction();n&&(e=n.blockNumber)}if(e==null)return null;const r=this.provider.getBlock(e);if(r==null)throw new Error("TODO");return r}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:r,blockNumber:n}=await Da({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=K(this,kf),o=-1,s=a===-1;const c=async()=>{if(s)return null;const{blockNumber:g,nonce:m}=await Da({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<K(this,kf)&&(o=K(this,kf)));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===hte&&(S="cancelled"),at(!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;at(!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(Fi("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(Bs(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 at(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),yte(this)}reorderedEvent(e){return at(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),at(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),gte(this,e)}replaceableTransaction(e){De(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new GL(this,this.provider);return Te(r,kf,e),r}};kf=new WeakMap;let D1=GL;function xwe(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function gte(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function yte(t){return{orphan:"drop-transaction",tx:t}}function Awe(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 S$ extends Cw{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);Jt(this,{args:a,fragment:i,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class mte extends Cw{constructor(r,n){super(r,r.provider);je(this,"error");Jt(this,{error:n})}}var iy;class Swe extends pte{constructor(r,n,i){super(i,n);Je(this,iy,void 0);Te(this,iy,r)}get logs(){return super.logs.map(r=>{const n=r.topics.length?K(this,iy).getEvent(r.topics[0]):null;if(n)try{return new S$(r,K(this,iy),n)}catch(i){return new mte(r,i)}return r})}}iy=new WeakMap;var iw;class O$ extends D1{constructor(r,n,i){super(i,n);Je(this,iw,void 0);Te(this,iw,r)}async wait(r){const n=await super.wait(r);return n==null?null:new Swe(K(this,iw),this.provider,n)}}iw=new WeakMap;class vte extends _Z{constructor(r,n,i,a){super(r,n,i);je(this,"log");Jt(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 Owe extends vte{constructor(e,r,n,i,a){super(e,r,n,new S$(a,e.interface,i));const o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);Jt(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const dF=BigInt(0);function bte(t){return t&&typeof t.call=="function"}function wte(t){return t&&typeof t.estimateGas=="function"}function iS(t){return t&&typeof t.resolveName=="function"}function _te(t){return t&&typeof t.sendTransaction=="function"}function Ete(t){if(t!=null){if(iS(t))return t;if(t.provider)return t.provider}}var aw;class Iwe{constructor(e,r,n){Je(this,aw,void 0);je(this,"fragment");if(Jt(this,{fragment:r}),r.inputs.length<n.length)throw new Error("too many arguments");const i=vp(e.runner,"resolveName"),a=iS(i)?i:null;Te(this,aw,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=>ma(g,a))):ma(d,a):d)));return e.interface.encodeFilterTopics(r,o)}())}getTopicFilter(){return K(this,aw)}}aw=new WeakMap;function vp(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function Nh(t){return t==null?null:t.provider||null}async function xte(t,e){const r=Ha.dereference(t,"overrides");De(typeof r=="object","invalid overrides parameter","overrides",t);const n=IA(r);return De(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),De(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function Pwe(t,e,r){const n=vp(t,"resolveName"),i=iS(n)?n:null;return await Promise.all(e.map((a,o)=>a.walkAsync(r[o],(s,c)=>(c=Ha.dereference(c,s),s==="address"?ma(c,i):c))))}function Twe(t){const e=async function(o){const s=await xte(o,["data"]);s.to=await t.getAddress(),s.from&&(s.from=await ma(s.from,Ete(t.runner)));const c=t.interface,u=ar(s.value||dF,"overrides.value")===dF,f=(s.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!f&&!u&&De(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),De(c.fallback||f,"cannot send data to receive-only contract","overrides.data",s.data);const d=c.receive||c.fallback&&c.fallback.payable;return De(d||u,"cannot send value to non-payable fallback","overrides.value",s.value),De(c.fallback||f,"cannot send data to receive-only contract","overrides.data",s.data),s},r=async function(o){const s=vp(t.runner,"call");at(bte(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 a$(u)&&u.data?t.interface.makeError(u.data,c):u}},n=async function(o){const s=t.runner;at(_te(s),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await s.sendTransaction(await e(o)),u=Nh(t.runner);return new O$(t.interface,u,c)},i=async function(o){const s=vp(t.runner,"estimateGas");return at(wte(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 Jt(a,{_contract:t,estimateGas:i,populateTransaction:e,send:n,staticCall:r}),a}function Rwe(t,e){const r=function(...u){const f=t.interface.getFunction(e,u);return at(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 xte(u.pop()),d.from&&(d.from=await ma(d.from,Ete(t.runner)))),f.inputs.length!==u.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const g=await Pwe(t.runner,f.inputs,u);return Object.assign({},d,await Da({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;at(_te(f),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const d=await f.sendTransaction(await n(...u)),g=Nh(t.runner);return new O$(t.interface,g,d)},o=async function(...u){const f=vp(t.runner,"estimateGas");return at(wte(f),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await f.estimateGas(await n(...u))},s=async function(...u){const f=vp(t.runner,"call");at(bte(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 a$(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 Jt(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 at(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),u}}),c}function Cwe(t,e){const r=function(...i){const a=t.interface.getEvent(e,i);return at(a,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),a},n=function(...i){return new Iwe(t,r(...i),i)};return Jt(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 at(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}const PA=Symbol.for("_ethersInternal_contract"),Ate=new WeakMap;function Nwe(t,e){Ate.set(t[PA],e)}function Ko(t){return Ate.get(t[PA])}function Dwe(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function I$(t,e){let r,n=null;if(Array.isArray(e)){const a=function(o){if(di(o,32))return o;const s=t.interface.getEvent(o);return De(s,"unknown fragment","name",o),s.topicHash};r=e.map(o=>o==null?null:Array.isArray(o)?o.map(a):a(o))}else e==="*"?r=[null]:typeof e=="string"?di(e,32)?r=[e]:(n=t.interface.getEvent(e),De(n,"unknown fragment","event",e),r=[n.topicHash]):Dwe(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):De(!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 mb(t,e){const{subs:r}=Ko(t);return r.get((await I$(t,e)).tag)||null}async function hF(t,e,r){const n=Nh(t.runner);at(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:a,topics:o}=await I$(t,r),{addr:s,subs:c}=Ko(t);let u=c.get(a);if(!u){const d={address:s||t,topics:o},g=y=>{let _=i;if(_==null)try{_=t.interface.getEvent(y.topics[0])}catch{}if(_){const b=_,S=i?t.interface.decodeEventLog(i,y.data,y.topics):[];$8(t,r,S,x=>new Owe(t,x,r,b,y))}else $8(t,r,[],b=>new vte(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 D8=Promise.resolve();async function $we(t,e,r,n){await D8;const i=await mb(t,e);if(!i)return!1;const a=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:s})=>{const c=Array.from(r);n&&c.push(n(s?null:o));try{o.call(t,...c)}catch{}return!s}),i.listeners.length===0&&(i.stop(),Ko(t).subs.delete(i.tag)),a>0}async function $8(t,e,r,n){try{await D8}catch{}const i=$we(t,e,r,n);return D8=i,await i}const lE=["then"];var SWe;const s1=class s1{constructor(e,r,n,i){je(this,"target");je(this,"interface");je(this,"runner");je(this,"filters");je(this,SWe);je(this,"fallback");De(typeof e=="string"||Oee(e),"invalid value for Contract target","target",e),n==null&&(n=null);const a=N8.from(r);Jt(this,{target:e,runner:n,interface:a}),Object.defineProperty(this,PA,{value:{}});let o,s=null,c=null;if(i){const d=Nh(n);c=new O$(this.interface,d,i)}let u=new Map;if(typeof e=="string")if(di(e))s=e,o=Promise.resolve(e);else{const d=vp(n,"resolveName");if(!iS(d))throw Fi("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=d.resolveName(e).then(g=>{if(g==null)throw Fi("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Ko(this).addr=g,g})}else o=e.getAddress().then(d=>{if(d==null)throw new Error("TODO");return Ko(this).addr=d,d});Nwe(this,{addrPromise:o,addr:s,deployTx:c,subs:u});const f=new Proxy({},{get:(d,g,m)=>{if(typeof g=="symbol"||lE.indexOf(g)>=0)return Reflect.get(d,g,m);try{return this.getEvent(g)}catch(w){if(!Bs(w,"INVALID_ARGUMENT")||w.argument!=="key")throw w}},has:(d,g)=>lE.indexOf(g)>=0?Reflect.has(d,g):Reflect.has(d,g)||this.interface.hasEvent(String(g))});return Jt(this,{filters:f}),Jt(this,{fallback:a.receive||a.fallback?Twe(this):null}),new Proxy(this,{get:(d,g,m)=>{if(typeof g=="symbol"||g in d||lE.indexOf(g)>=0)return Reflect.get(d,g,m);try{return d.getFunction(g)}catch(w){if(!Bs(w,"INVALID_ARGUMENT")||w.argument!=="key")throw w}},has:(d,g)=>typeof g=="symbol"||g in d||lE.indexOf(g)>=0?Reflect.has(d,g):d.interface.hasFunction(g)})}connect(e){return new s1(this.target,this.interface,e)}attach(e){return new s1(e,this.interface,this.runner)}async getAddress(){return await Ko(this).addrPromise}async getDeployedCode(){const e=Nh(this.runner);at(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=Nh(this.runner);return at(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,a)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);n.once("block",o)}catch(s){a(s)}};o()})}deploymentTransaction(){return Ko(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),Rwe(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),Cwe(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:i,addrPromise:a}=Ko(this),o=i||await a,{fragment:s,topics:c}=await I$(this,e),u={address:o,topics:c,fromBlock:r,toBlock:n},f=Nh(this.runner);return at(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 S$(d,this.interface,g)}catch(m){return new mte(d,m)}return new Cw(d,f)})}async on(e,r){const n=await hF(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await hF(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await $8(this,e,r,null)}async listenerCount(e){if(e){const i=await mb(this,e);return i?i.listeners.length:0}const{subs:r}=Ko(this);let n=0;for(const{listeners:i}of r.values())n+=i.length;return n}async listeners(e){if(e){const i=await mb(this,e);return i?i.listeners.map(({listener:a})=>a):[]}const{subs:r}=Ko(this);let n=[];for(const{listeners:i}of r.values())n=n.concat(i.map(({listener:a})=>a));return n}async off(e,r){const n=await mb(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:a})=>a).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(r==null||n.listeners.length===0)&&(n.stop(),Ko(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await mb(this,e);if(!r)return this;r.stop(),Ko(this).subs.delete(r.tag)}else{const{subs:r}=Ko(this);for(const{tag:n,stop:i}of r.values())i(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends s1{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)}};SWe=PA;let M8=s1;function Mwe(){return M8}class Vb extends Mwe(){}function OP(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):De(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class kwe{constructor(e){je(this,"name");Jt(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 Ste=new RegExp("^(ipfs)://(.*)$","i"),pF=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Ste,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Lf,Gh,Uf,M0,P2,Ote;const og=class og{constructor(e,r,n){Je(this,Uf);je(this,"provider");je(this,"address");je(this,"name");Je(this,Lf,void 0);Je(this,Gh,void 0);Jt(this,{provider:e,address:r,name:n}),Te(this,Lf,null),Te(this,Gh,new Vb(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 K(this,Lf)==null&&Te(this,Lf,(async()=>{try{return await K(this,Gh).supportsInterface("0x9061b923")}catch(e){if(Bs(e,"CALL_EXCEPTION"))return!1;throw Te(this,Lf,null),e}})()),await K(this,Lf)}async getAddress(e){if(e==null&&(e=60),e===60)try{const a=await ut(this,Uf,M0).call(this,"addr(bytes32)");return a==null||a===A8?null:a}catch(a){if(Bs(a,"CALL_EXCEPTION"))return null;throw a}if(e>=0&&e<2147483648){let a=e+2147483648;const o=await ut(this,Uf,M0).call(this,"addr(bytes32,uint)",[a]);if(di(o,20))return ln(o)}let r=null;for(const a of this.provider.plugins)if(a instanceof kwe&&a.supportsCoinType(e)){r=a;break}if(r==null)return null;const n=await ut(this,Uf,M0).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;at(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await ut(this,Uf,M0).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await ut(this,Uf,M0).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}://${wZ("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;at(!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<pF.length;n++){const i=r.match(pF[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 Vb(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}",Ul(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 md(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(Ste)==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 at(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 ut(i=og,P2,Ote).call(i,e,n);if(a!=null){const o=new og(e,a,r);return n!==r&&!await o.supportsWildcard()?null:o}n=n.split(".").slice(1).join(".")}}};Lf=new WeakMap,Gh=new WeakMap,Uf=new WeakSet,M0=async function(e,r){r=(r||[]).slice();const n=K(this,Gh).interface;r.unshift(R8(this.name));let i=null;await this.supportsWildcard()&&(i=n.getFunction(e),at(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),r=[j1e(this.name),n.encodeFunctionData(i,r)],e="resolve(bytes,bytes)"),r.push({enableCcipRead:!0});try{const a=await K(this,Gh)[e](...r);return i?n.decodeFunctionResult(i,a)[0]:a}catch(a){if(!Bs(a,"CALL_EXCEPTION"))throw a}return null},P2=new WeakSet,Ote=async function(e,r){const n=await og.getEnsAddress(e);try{const a=await new Vb(n,["function resolver(bytes32) view returns (address)"],e).resolver(R8(r),{enableCcipRead:!0});return a===A8?null:a}catch(i){throw i}return null},Je(og,P2);let TA=og;const gF=BigInt(0);function li(t,e){return function(r){return r==null?e:t(r)}}function P$(t){return e=>{if(!Array.isArray(e))throw new Error("not an array");return e.map(r=>t(r))}}function Nw(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";at(!1,`invalid value for value.${i} (${s})`,"BAD_DATA",{value:r})}}return n}}function Lwe(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}De(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Dy(t){return De(di(t,!0),"invalid data","value",t),t}function Fs(t){return De(di(t,32),"invalid hash","value",t),t}const Uwe=Nw({address:ln,blockHash:Fs,blockNumber:Fr,data:Dy,index:Fr,removed:li(Lwe,!1),topics:P$(Fs),transactionHash:Fs,transactionIndex:Fr},{index:["logIndex"]});function Bwe(t){return Uwe(t)}const Fwe=Nw({hash:li(Fs),parentHash:Fs,number:Fr,timestamp:Fr,nonce:li(Dy),difficulty:ar,gasLimit:ar,gasUsed:ar,miner:li(ln),extraData:Dy,baseFeePerGas:li(ar)});function jwe(t){const e=Fwe(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:Ite(r)),e}const qwe=Nw({transactionIndex:Fr,blockNumber:Fr,transactionHash:Fs,address:ln,topics:P$(Fs),data:Dy,index:Fr,blockHash:Fs},{index:["logIndex"]});function Hwe(t){return qwe(t)}const zwe=Nw({to:li(ln,null),from:li(ln,null),contractAddress:li(ln,null),index:Fr,root:li(xt),gasUsed:ar,logsBloom:li(Dy),blockHash:Fs,hash:Fs,logs:P$(Hwe),blockNumber:Fr,cumulativeGasUsed:ar,effectiveGasPrice:li(ar),status:li(Fr),type:li(Fr,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function Vwe(t){return zwe(t)}function Ite(t){t.to&&ar(t.to)===gF&&(t.to="0x0000000000000000000000000000000000000000");const e=Nw({hash:Fs,type:r=>r==="0x"||r==null?0:Fr(r),accessList:li(Rp,null),blockHash:li(Fs,null),blockNumber:li(Fr,null),transactionIndex:li(Fr,null),from:ln,gasPrice:li(ar),maxPriorityFeePerGas:li(ar),maxFeePerGas:li(ar),gasLimit:ar,to:li(ln,null),value:ar,nonce:Fr,data:Dy,creates:li(ln,null),chainId:li(ar,null)},{data:["input"],gasLimit:["gas"]})(t);if(e.to==null&&e.creates==null&&(e.creates=zbe(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=Lc.from(t.signature):e.signature=Lc.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&ar(e.blockHash)===gF&&(e.blockHash=null),e}const Gwe="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Dw{constructor(e){je(this,"name");Jt(this,{name:e})}clone(){return new Dw(this.name)}}class aS extends Dw{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),De(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),Jt(this,i)}clone(){return new aS(this.effectiveBlock,this)}}class oS extends Dw{constructor(r,n){super("org.ethers.plugins.network.Ens");je(this,"address");je(this,"targetNetwork");Jt(this,{address:r||Gwe,targetNetwork:n??1})}clone(){return new oS(this.address,this.targetNetwork)}}var ow,sw;class Pte extends Dw{constructor(r,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");Je(this,ow,void 0);Je(this,sw,void 0);Te(this,ow,r),Te(this,sw,n)}get url(){return K(this,ow)}get processFunc(){return K(this,sw)}clone(){return this}}ow=new WeakMap,sw=new WeakMap;const IP=new Map;var ay,oy,Bf;const sg=class sg{constructor(e,r){Je(this,ay,void 0);Je(this,oy,void 0);Je(this,Bf,void 0);Te(this,ay,e),Te(this,oy,ar(r)),Te(this,Bf,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return K(this,ay)}set name(e){Te(this,ay,e)}get chainId(){return K(this,oy)}set chainId(e){Te(this,oy,ar(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===ar(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===ar(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===ar(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(K(this,Bf).values())}attachPlugin(e){if(K(this,Bf).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return K(this,Bf).set(e.name,e.clone()),this}getPlugin(e){return K(this,Bf).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new sg(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 aS;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=Rp(e.accessList);for(const a in i)n+=r.txAccessListAddress+r.txAccessListStorageKey*i[a].storageKeys.length}return n}static from(e){if(Kwe(),e==null)return sg.from("mainnet");if(typeof e=="number"&&(e=BigInt(e)),typeof e=="string"||typeof e=="bigint"){const r=IP.get(e);if(r)return r();if(typeof e=="bigint")return new sg("unknown",e);De(!1,"unknown network","network",e)}if(typeof e.clone=="function")return e.clone();if(typeof e=="object"){De(typeof e.name=="string"&&typeof e.chainId=="number","invalid network object name or chainId","network",e);const r=new sg(e.name,e.chainId);return(e.ensAddress||e.ensNetwork!=null)&&r.attachPlugin(new oS(e.ensAddress,e.ensNetwork)),r}De(!1,"invalid network","network",e)}static register(e,r){typeof e=="number"&&(e=BigInt(e));const n=IP.get(e);n&&De(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",e),IP.set(e,r)}};ay=new WeakMap,oy=new WeakMap,Bf=new WeakMap;let Il=sg;function yF(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 mF(t){return new Pte(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:yF(s.maxFee,9),maxPriorityFeePerGas:yF(s.maxPriorityFee,9)}}catch(a){at(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:a})}})}function Wwe(t){return new Pte("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 vF=!1;function Kwe(){if(vF)return;vF=!0;function t(e,r,n){const i=function(){const a=new Il(e,r);return n.ensNetwork!=null&&a.attachPlugin(new oS(null,n.ensNetwork)),a.attachPlugin(new aS),(n.plugins||[]).forEach(o=>{a.attachPlugin(o)}),a};Il.register(e,i),Il.register(r,i),n.altNames&&n.altNames.forEach(a=>{Il.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:[mF("https://gasstation.polygon.technology/v2")]}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[mF("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[Wwe(BigInt("1000000"))]}),t("optimism-goerli",420,{}),t("xdai",100,{ensNetwork:1})}function k8(t){return JSON.parse(JSON.stringify(t))}var ml,Ts,Ff,cu,sy,mx;class Ywe{constructor(e){Je(this,sy);Je(this,ml,void 0);Je(this,Ts,void 0);Je(this,Ff,void 0);Je(this,cu,void 0);Te(this,ml,e),Te(this,Ts,null),Te(this,Ff,4e3),Te(this,cu,-2)}get pollingInterval(){return K(this,Ff)}set pollingInterval(e){Te(this,Ff,e)}start(){K(this,Ts)||(Te(this,Ts,K(this,ml)._setTimeout(ut(this,sy,mx).bind(this),K(this,Ff))),ut(this,sy,mx).call(this))}stop(){K(this,Ts)&&(K(this,ml)._clearTimeout(K(this,Ts)),Te(this,Ts,null))}pause(e){this.stop(),e&&Te(this,cu,-2)}resume(){this.start()}}ml=new WeakMap,Ts=new WeakMap,Ff=new WeakMap,cu=new WeakMap,sy=new WeakSet,mx=async function(){try{const e=await K(this,ml).getBlockNumber();if(K(this,cu)===-2){Te(this,cu,e);return}if(e!==K(this,cu)){for(let r=K(this,cu)+1;r<=e;r++){if(K(this,Ts)==null)return;await K(this,ml).emit("block",r)}Te(this,cu,e)}}catch{}K(this,Ts)!=null&&Te(this,Ts,K(this,ml)._setTimeout(ut(this,sy,mx).bind(this),K(this,Ff)))};var Wh,Kh,jf;class Tte{constructor(e){Je(this,Wh,void 0);Je(this,Kh,void 0);Je(this,jf,void 0);Te(this,Wh,e),Te(this,jf,!1),Te(this,Kh,r=>{this._poll(r,K(this,Wh))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){K(this,jf)||(Te(this,jf,!0),K(this,Kh).call(this,-2),K(this,Wh).on("block",K(this,Kh)))}stop(){K(this,jf)&&(Te(this,jf,!1),K(this,Wh).off("block",K(this,Kh)))}pause(e){this.stop()}resume(){this.start()}}Wh=new WeakMap,Kh=new WeakMap,jf=new WeakMap;var T2;class Qwe extends Tte{constructor(r,n){super(r);Je(this,T2,void 0);Te(this,T2,k8(n))}async _poll(r,n){throw new Error("@TODO")}}T2=new WeakMap;var cy;class Jwe extends Tte{constructor(r,n){super(r);Je(this,cy,void 0);Te(this,cy,n)}async _poll(r,n){const i=await n.getTransactionReceipt(K(this,cy));i&&n.emit(K(this,cy),i)}}cy=new WeakMap;var vl,uy,ly,qf,Rs,R2,Rte;class T${constructor(e,r){Je(this,R2);Je(this,vl,void 0);Je(this,uy,void 0);Je(this,ly,void 0);Je(this,qf,void 0);Je(this,Rs,void 0);Te(this,vl,e),Te(this,uy,k8(r)),Te(this,ly,ut(this,R2,Rte).bind(this)),Te(this,qf,!1),Te(this,Rs,-2)}start(){K(this,qf)||(Te(this,qf,!0),K(this,Rs)===-2&&K(this,vl).getBlockNumber().then(e=>{Te(this,Rs,e)}),K(this,vl).on("block",K(this,ly)))}stop(){K(this,qf)&&(Te(this,qf,!1),K(this,vl).off("block",K(this,ly)))}pause(e){this.stop(),e&&Te(this,Rs,-2)}resume(){this.start()}}vl=new WeakMap,uy=new WeakMap,ly=new WeakMap,qf=new WeakMap,Rs=new WeakMap,R2=new WeakSet,Rte=async function(e){if(K(this,Rs)===-2)return;const r=k8(K(this,uy));r.fromBlock=K(this,Rs)+1,r.toBlock=e;const n=await K(this,vl).getLogs(r);if(n.length===0){K(this,Rs)<e-60&&Te(this,Rs,e-60);return}for(const i of n)K(this,vl).emit(K(this,uy),i),Te(this,Rs,i.blockNumber)};const Xwe=BigInt(2),Zwe=10;function fE(t){return t&&typeof t.then=="function"}function vx(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 Cte{constructor(e){je(this,"name");Jt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function e_e(t){return JSON.parse(JSON.stringify(t))}function L8(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function PP(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"pending":case"debug":case"error":case"network":return{type:t,tag:t}}if(di(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:vx("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:vx("orphan",r),filter:e_e(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(i=>i==null?null:Array.isArray(i)?L8(i.map(a=>a.toLowerCase())):i.toLowerCase())};if(r.address){const i=[],a=[],o=s=>{di(s)?i.push(s):a.push((async()=>{i.push(await ma(s,e))})())};Array.isArray(r.address)?r.address.forEach(o):o(r.address),a.length&&await Promise.all(a),n.address=L8(i.map(s=>s.toLowerCase()))}return{filter:n,tag:vx("event",n),type:"event"}}De(!1,"unknown ProviderEvent","event",t)}function TP(){return new Date().getTime()}const t_e={cacheTimeout:250,pollingInterval:4e3};var Ca,Hf,Na,fy,Jo,Yh,zf,bl,cw,Cs,dy,hy,Ao,bs,uw,U8,lw,B8,Qh,vb,fw,F8,Jh,bb,py,bx;class r_e{constructor(e,r){Je(this,Ao);Je(this,uw);Je(this,lw);Je(this,Qh);Je(this,fw);Je(this,Jh);Je(this,py);Je(this,Ca,void 0);Je(this,Hf,void 0);Je(this,Na,void 0);Je(this,fy,void 0);Je(this,Jo,void 0);Je(this,Yh,void 0);Je(this,zf,void 0);Je(this,bl,void 0);Je(this,cw,void 0);Je(this,Cs,void 0);Je(this,dy,void 0);Je(this,hy,void 0);if(Te(this,hy,Object.assign({},t_e,r||{})),e==="any")Te(this,Yh,!0),Te(this,Jo,null);else if(e){const n=Il.from(e);Te(this,Yh,!1),Te(this,Jo,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else Te(this,Yh,!1),Te(this,Jo,null);Te(this,bl,-1),Te(this,zf,new Map),Te(this,Ca,new Map),Te(this,Hf,new Map),Te(this,Na,null),Te(this,fy,!1),Te(this,cw,1),Te(this,Cs,new Map),Te(this,dy,!1)}get pollingInterval(){return K(this,hy).pollingInterval}get provider(){return this}get plugins(){return Array.from(K(this,Hf).values())}attachPlugin(e){if(K(this,Hf).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return K(this,Hf).set(e.name,e.connect(this)),this}getPlugin(e){return K(this,Hf).get(e)||null}get disableCcipRead(){return K(this,dy)}set disableCcipRead(e){Te(this,dy,!!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 md(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{}at(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)}at(!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 Ewe(jwe(e),this)}_wrapLog(e,r){return new Cw(Bwe(e),this)}_wrapTransactionReceipt(e,r){return new pte(Vwe(e),this)}_wrapTransactionResponse(e,r){return new D1(Ite(e),this)}_detectNetwork(){at(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){at(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Fr(await ut(this,Ao,bs).call(this,{method:"getBlockNumber"}),"%response");return K(this,bl)>=0&&Te(this,bl,e),e}_getAddress(e){return ma(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(di(e))return di(e,32)?e:X0(e);if(typeof e=="bigint"&&(e=Fr(e,"blockTag")),typeof e=="number")return e>=0?X0(e):K(this,bl)>=0?X0(K(this,bl)+e):this.getBlockNumber().then(r=>X0(r+e));De(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?L8(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=IA(e),n=[];if(["to","from"].forEach(i=>{if(r[i]==null)return;const a=ma(r[i],this);fE(a)?n.push(async function(){r[i]=await a}()):r[i]=a}),r.blockTag!=null){const i=this._getBlockTag(r.blockTag);fE(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(K(this,Jo)==null){const i=this._detectNetwork().then(a=>(this.emit("network",a,null),a),a=>{throw K(this,Jo)===i&&Te(this,Jo,null),a});return Te(this,Jo,i),(await i).clone()}const e=K(this,Jo),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(K(this,Yh)?(this.emit("network",n,r),K(this,Jo)===e&&Te(this,Jo,Promise.resolve(n))):at(!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 Da({_block:ut(this,fw,F8).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await ut(this,Ao,bs).call(this,{method:"getGasPrice"});return ar(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*Xwe+s),new fF(a,o,s)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new md(n.url),a=await n.processFunc(r,this,i);return new fF(a.gasPrice,a.maxFeePerGas,a.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return fE(r)&&(r=await r),ar(await ut(this,Ao,bs).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await Da({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await ut(this,lw,B8).call(this,ut(this,uw,U8).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return ar(await ut(this,Qh,vb).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return Fr(await ut(this,Qh,vb).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return xt(await ut(this,Qh,vb).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const i=ar(r,"position");return xt(await ut(this,Qh,vb).call(this,{method:"getStorage",position:i},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:i}=await Da({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),a=R1.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 Da({network:this.getNetwork(),params:ut(this,fw,F8).call(this,e,!!r)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){const{network:r,params:n}=await Da({network:this.getNetwork(),params:ut(this,Ao,bs).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await Da({network:this.getNetwork(),params:ut(this,Ao,bs).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await ut(this,Ao,bs).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await Da({network:this.getNetwork(),result:ut(this,Ao,bs).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:xt(r)}async getLogs(e){let r=this._getFilter(e);fE(r)&&(r=await r);const{network:n,params:i}=await Da({network:this.getNetwork(),params:ut(this,Ao,bs).call(this,{method:"getLogs",filter:r})});return i.map(a=>this._wrapLog(a,n))}_getProvider(e){at(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await TA.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=R8(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await TA.getEnsAddress(this),a=await new Vb(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(a==null||a===A8)return null;const s=await new Vb(a,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(s)!==e?null:s}catch(n){if(Bs(n,"BAD_DATA")&&n.value==="0x"||Bs(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(Fi("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){at(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=K(this,Cs).get(e);r&&(r.timer&&clearTimeout(r.timer),K(this,Cs).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=Bm(this,cw)._++,i=()=>{K(this,Cs).delete(n),e()};if(this.paused)K(this,Cs).set(n,{timer:null,func:i,time:r});else{const a=setTimeout(i,r);K(this,Cs).set(n,{timer:a,func:i,time:TP()})}return n}_forEachSubscriber(e){for(const r of K(this,Ca).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new Cte(e.type);case"block":{const r=new Ywe(this);return r.pollingInterval=this.pollingInterval,r}case"event":return new T$(this,e.filter);case"transaction":return new Jwe(this,e.hash);case"orphan":return new Qwe(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of K(this,Ca).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),K(this,Na)!=null&&r.pause(K(this,Na));break}}async on(e,r){const n=await ut(this,py,bx).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,K(this,Na)!=null&&n.subscriber.pause(K(this,Na))),this}async once(e,r){const n=await ut(this,py,bx).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,K(this,Na)!=null&&n.subscriber.pause(K(this,Na))),this}async emit(e,...r){const n=await ut(this,Jh,bb).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 _Z(this,o?null:a,e);try{a.call(this,...r,s)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),K(this,Ca).delete(n.tag)),i>0}async listenerCount(e){if(e){const n=await ut(this,Jh,bb).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of K(this,Ca).values())r+=n.length;return r}async listeners(e){if(e){const n=await ut(this,Jh,bb).call(this,e);return n?n.listeners.map(({listener:i})=>i):[]}let r=[];for(const{listeners:n}of K(this,Ca).values())r=r.concat(n.map(({listener:i})=>i));return r}async off(e,r){const n=await ut(this,Jh,bb).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(),K(this,Ca).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:i}=await ut(this,py,bx).call(this,e);n&&i.stop(),K(this,Ca).delete(r)}else for(const[r,{started:n,subscriber:i}]of K(this,Ca))n&&i.stop(),K(this,Ca).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 K(this,fy)}destroy(){this.removeAllListeners();for(const e of K(this,Cs).keys())this._clearTimeout(e);Te(this,fy,!0)}get paused(){return K(this,Na)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(Te(this,bl,-1),K(this,Na)!=null){if(K(this,Na)==!!e)return;at(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),Te(this,Na,!!e);for(const r of K(this,Cs).values())r.timer&&clearTimeout(r.timer),r.time=TP()-r.time}resume(){if(K(this,Na)!=null){this._forEachSubscriber(e=>e.resume()),Te(this,Na,null);for(const e of K(this,Cs).values()){let r=e.time;r<0&&(r=0),e.time=TP(),setTimeout(e.func,r)}}}}Ca=new WeakMap,Hf=new WeakMap,Na=new WeakMap,fy=new WeakMap,Jo=new WeakMap,Yh=new WeakMap,zf=new WeakMap,bl=new WeakMap,cw=new WeakMap,Cs=new WeakMap,dy=new WeakMap,hy=new WeakMap,Ao=new WeakSet,bs=async function(e){const r=K(this,hy).cacheTimeout;if(r<0)return await this._perform(e);const n=vx(e.method,e);let i=K(this,zf).get(n);return i||(i=this._perform(e),K(this,zf).set(n,i),setTimeout(()=>{K(this,zf).get(n)===i&&K(this,zf).delete(n)},r)),await i},uw=new WeakSet,U8=async function(e,r,n){at(n<Zwe,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:r,enableCcipRead:!0})});const i=IA(e);try{return xt(await this._perform({method:"call",transaction:i,blockTag:r}))}catch(a){if(!this.disableCcipRead&&a$(a)&&a.data&&n>=0&&r==="latest"&&i.to!=null&&Jn(a.data,0,4)==="0x556f1830"){const o=a.data,s=await ma(i.to,this);let c;try{c=s_e(Jn(a.data,4))}catch(d){at(!1,d.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}at(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);at(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:Wn([c.selector,o_e([u,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:f});try{const d=await ut(this,uw,U8).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}},lw=new WeakSet,B8=async function(e){const{value:r}=await Da({network:this.getNetwork(),value:e});return r},Qh=new WeakSet,vb=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 ut(this,lw,B8).call(this,ut(this,Ao,bs).call(this,Object.assign(e,{address:i,blockTag:a})))},fw=new WeakSet,F8=async function(e,r){if(di(e,32))return await ut(this,Ao,bs).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await ut(this,Ao,bs).call(this,{method:"getBlock",blockTag:n,includeTransactions:r})},Jh=new WeakSet,bb=async function(e,r){let n=await PP(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=await PP({orphan:"drop-log",log:r[0]},this)),K(this,Ca).get(n.tag)||null},py=new WeakSet,bx=async function(e){const r=await PP(e,this),n=r.tag;let i=K(this,Ca).get(n);return i||(i={subscriber:this._getSubscriber(r),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},K(this,Ca).set(n,i)),i};function n_e(t,e){try{const r=j8(t,e);if(r)return o$(r)}catch{}return null}function j8(t,e){if(t==="0x")return null;try{const r=Fr(Jn(t,e,e+32)),n=Fr(Jn(t,r,r+32));return Jn(t,r+32,r+32+n)}catch{}return null}function bF(t){const e=No(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 i_e(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const a_e=new Uint8Array([]);function o_e(t){const e=[];let r=0;for(let n=0;n<t.length;n++)e.push(a_e),r+=32;for(let n=0;n<t.length;n++){const i=zt(t[n]);e[n]=bF(r),e.push(bF(i.length)),e.push(i_e(i)),r+=32+Math.ceil(i.length/32)*32}return Wn(e)}const wF="0x0000000000000000000000000000000000000000000000000000000000000000";function s_e(t){const e={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};at(vg(t)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=Jn(t,0,32);at(Jn(r,0,12)===Jn(wF,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=Jn(r,12);try{const n=[],i=Fr(Jn(t,32,64)),a=Fr(Jn(t,i,i+32)),o=Jn(t,i+32);for(let s=0;s<a;s++){const c=n_e(o,s*32);if(c==null)throw new Error("abort");n.push(c)}e.urls=n}catch{at(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const n=j8(t,64);if(n==null)throw new Error("abort");e.calldata=n}catch{at(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}at(Jn(t,100,128)===Jn(wF,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),e.selector=Jn(t,96,100);try{const n=j8(t,128);if(n==null)throw new Error("abort");e.extraData=n}catch{at(!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 y0(t,e){if(t.provider)return t.provider;at(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function _F(t,e){let r=IA(e);if(r.to!=null&&(r.to=ma(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),ma(n,t)]).then(([i,a])=>(De(i.toLowerCase()===a.toLowerCase(),"transaction from mismatch","tx.from",a),i))}else r.from=t.getAddress();return await Da(r)}class R${constructor(e){je(this,"provider");Jt(this,{provider:e||null})}async getNonce(e){return y0(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await _F(this,e)}async populateTransaction(e){const r=y0(this,"populateTransaction"),n=await _F(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=ar(n.chainId);De(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)?De(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&a&&De(!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();at(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?(at(!a,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):at(!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 Da(n)}async estimateGas(e){return y0(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return y0(this,"call").call(await this.populateCall(e))}async resolveName(e){return await y0(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=y0(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=R1.from(n);return await r.broadcastTransaction(await this.signTransaction(i))}}var gy,wx;const WL=class WL extends R${constructor(r,n){super(n);Je(this,gy);je(this,"address");Jt(this,{address:r})}async getAddress(){return this.address}connect(r){return new WL(this.address,r)}async signTransaction(r){ut(this,gy,wx).call(this,"transactions","signTransaction")}async signMessage(r){ut(this,gy,wx).call(this,"messages","signMessage")}async signTypedData(r,n,i){ut(this,gy,wx).call(this,"typed-data","signTypedData")}};gy=new WeakSet,wx=function(r,n){at(!1,`VoidSigner cannot sign ${r}`,"UNSUPPORTED_OPERATION",{operation:n})};let q8=WL;function c_e(t){return JSON.parse(JSON.stringify(t))}var So,uu,Xh,Vf,Zh,yy,dw,H8,hw,z8;class Nte{constructor(e){Je(this,dw);Je(this,hw);Je(this,So,void 0);Je(this,uu,void 0);Je(this,Xh,void 0);Je(this,Vf,void 0);Je(this,Zh,void 0);Je(this,yy,void 0);Te(this,So,e),Te(this,uu,null),Te(this,Xh,ut(this,dw,H8).bind(this)),Te(this,Vf,!1),Te(this,Zh,null),Te(this,yy,!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(){K(this,Vf)||(Te(this,Vf,!0),ut(this,dw,H8).call(this,-2))}stop(){K(this,Vf)&&(Te(this,Vf,!1),Te(this,yy,!0),ut(this,hw,z8).call(this),K(this,So).off("block",K(this,Xh)))}pause(e){e&&ut(this,hw,z8).call(this),K(this,So).off("block",K(this,Xh))}resume(){this.start()}}So=new WeakMap,uu=new WeakMap,Xh=new WeakMap,Vf=new WeakMap,Zh=new WeakMap,yy=new WeakMap,dw=new WeakSet,H8=async function(e){try{K(this,uu)==null&&Te(this,uu,this._subscribe(K(this,So)));let r=null;try{r=await K(this,uu)}catch(a){if(!Bs(a,"UNSUPPORTED_OPERATION")||a.operation!=="eth_newFilter")throw a}if(r==null){Te(this,uu,null),K(this,So)._recoverSubscriber(this,this._recover(K(this,So)));return}const n=await K(this,So).getNetwork();if(K(this,Zh)||Te(this,Zh,n),K(this,Zh).chainId!==n.chainId)throw new Error("chaid changed");if(K(this,yy))return;const i=await K(this,So).send("eth_getFilterChanges",[r]);await this._emitResults(K(this,So),i)}catch(r){console.log("@TODO",r)}K(this,So).once("block",K(this,Xh))},hw=new WeakSet,z8=function(){const e=K(this,uu);e&&(Te(this,uu,null),e.then(r=>{K(this,So).send("eth_uninstallFilter",[r])}))};var ep;class u_e extends Nte{constructor(r,n){super(r);Je(this,ep,void 0);Te(this,ep,c_e(n))}_recover(r){return new T$(r,K(this,ep))}async _subscribe(r){return await r.send("eth_newFilter",[K(this,ep)])}async _emitResults(r,n){for(const i of n)r.emit(K(this,ep),r._wrapLog(i,r._network))}}ep=new WeakMap;class l_e extends Nte{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const f_e="bigint,boolean,function,number,string,symbol".split(/,/g);function _x(t){if(t==null||f_e.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(_x);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 d_e(t){return new Promise(e=>{setTimeout(e,t)})}function m0(t){return t&&t.toLowerCase()}function EF(t){return t&&typeof t.pollingInterval=="number"}const h_e={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class RP extends R${constructor(r,n){super(r);je(this,"address");n=ln(n),Jt(this,{address:n})}connect(r){at(!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=_x(r),i=[];if(n.from){const o=n.from;i.push((async()=>{const s=await ma(o,this.provider);De(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 ma(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=_x(r);if(n.from){const a=await ma(n.from,this.provider);De(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"?co(r):r;return await this.provider.send("personal_sign",[xt(n),this.address.toLowerCase()])}async signTypedData(r,n,i){const a=_x(i),o=await Ny.resolveNames(r,n,a,async s=>{const c=await ma(s);return De(c!=null,"TypedData does not support null address","value",s),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(Ny.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"?co(r):r;return await this.provider.send("eth_sign",[this.address.toLowerCase(),xt(n)])}}var tp,my,wl,lu,Ac,_l,pw,V8;class p_e extends r_e{constructor(r,n){super(r,n);Je(this,pw);Je(this,tp,void 0);Je(this,my,void 0);Je(this,wl,void 0);Je(this,lu,void 0);Je(this,Ac,void 0);Je(this,_l,void 0);Te(this,my,1),Te(this,tp,Object.assign({},h_e,n||{})),Te(this,wl,[]),Te(this,lu,null),Te(this,_l,null);{let a=null;const o=new Promise(s=>{a=s});Te(this,Ac,{promise:o,resolve:a})}const i=this._getOption("staticNetwork");i&&(De(r==null||i.matches(r),"staticNetwork MUST match network object","options",n),Te(this,_l,i))}_getOption(r){return K(this,tp)[r]}get _network(){return at(K(this,_l),"network is not available yet","NETWORK_ERROR"),K(this,_l)}async _perform(r){if(r.method==="call"||r.method==="estimateGas"){let i=r.transaction;if(i&&i.type!=null&&ar(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 Il.from(ar(await this.send("eth_chainId",[])));const n={id:Bm(this,my)._++,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 Il.from(ar(i.result));throw this.getRpcError(n,i)}_start(){K(this,Ac)==null||K(this,Ac).resolve==null||(K(this,Ac).resolve(),Te(this,Ac,null),(async()=>{for(;K(this,_l)==null&&!this.destroyed;)try{Te(this,_l,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",Fi("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:r}})),await d_e(1e3)}ut(this,pw,V8).call(this)})())}async _waitUntilReady(){if(K(this,Ac)!=null)return await K(this,Ac).promise}_getSubscriber(r){return r.type==="pending"?new l_e(this):r.type==="event"?this._getOption("polling")?new T$(this,r.filter):new u_e(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new Cte("orphan"):super._getSubscriber(r)}get ready(){return K(this,Ac)==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]=X0(ar(r[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{r[i]!=null&&(n[i]=xt(r[i]))}),r.accessList&&(n.accessList=Rp(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:[m0(r.address),r.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[m0(r.address),r.blockTag]};case"getCode":return{method:"eth_getCode",args:[m0(r.address),r.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[m0(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(m0):r.filter.address=m0(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 Fi("insufficient funds","INSUFFICIENT_FUNDS",{transaction:r.params[0],info:{payload:r,error:a}})}if(i==="eth_call"||i==="eth_estimateGas"){const c=G8(a),u=N1.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(y_e(a));if(typeof a.message=="string"&&a.message.match(/user denied|ethers-user-denied/i))return Fi("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 Fi("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:a}});if(o.match(/nonce/i)&&o.match(/too low/i))return Fi("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:a}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return Fi("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:a}});if(o.match(/only replay-protected/i))return Fi("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?Fi("unsupported operation","UNSUPPORTED_OPERATION",{operation:r.method,info:{error:a,payload:r}}):Fi("could not coalesce error","UNKNOWN_ERROR",{error:a,payload:r})}send(r,n){if(this.destroyed)return Promise.reject(Fi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r}));const i=Bm(this,my)._++,a=new Promise((o,s)=>{K(this,wl).push({resolve:o,reject:s,payload:{method:r,params:n,id:i,jsonrpc:"2.0"}})});return ut(this,pw,V8).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 RP(this,a[r])}const{accounts:i}=await Da({network:this.getNetwork(),accounts:n});r=ln(r);for(const a of i)if(ln(a)===r)return new RP(this,r);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new RP(this,n))}destroy(){K(this,lu)&&(clearTimeout(K(this,lu)),Te(this,lu,null));for(const{payload:r,reject:n}of K(this,wl))n(Fi("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r.method}));Te(this,wl,[]),super.destroy()}}tp=new WeakMap,my=new WeakMap,wl=new WeakMap,lu=new WeakMap,Ac=new WeakMap,_l=new WeakMap,pw=new WeakSet,V8=function(){if(K(this,lu))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");Te(this,lu,setTimeout(()=>{Te(this,lu,null);const n=K(this,wl);for(Te(this,wl,[]);n.length;){const i=[n.shift()];for(;n.length&&i.length!==K(this,tp).batchMaxCount;)if(i.push(n.shift()),JSON.stringify(i.map(o=>o.payload)).length>K(this,tp).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(Fi("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=Fi("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 Gf;class g_e extends p_e{constructor(r,n){super(r,n);Je(this,Gf,void 0);Te(this,Gf,4e3)}_getSubscriber(r){const n=super._getSubscriber(r);return EF(n)&&(n.pollingInterval=K(this,Gf)),n}get pollingInterval(){return K(this,Gf)}set pollingInterval(r){if(!Number.isInteger(r)||r<0)throw new Error("invalid interval");Te(this,Gf,r),this._forEachSubscriber(n=>{EF(n)&&(n.pollingInterval=K(this,Gf))})}}Gf=new WeakMap;function G8(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&di(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=G8(t[e]);if(r)return r}return null}if(typeof t=="string")try{return G8(JSON.parse(t))}catch{}return null}function W8(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)W8(t[r],e);if(typeof t=="string")try{return W8(JSON.parse(t),e)}catch{}}}function y_e(t){const e=[];return W8(t,e),e}var vy;class RA extends g_e{constructor(r,n){super(n,{batchMaxCount:1});Je(this,vy,void 0);Te(this,vy,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){De(!Array.isArray(r),"EIP-1193 does not support batch request","payload",r);try{const n=await K(this,vy).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 K(this,vy).call(this,"eth_requestAccounts",[])}catch(n){const i=n.payload;throw this.getRpcError(i,{id:i.id,error:n})}return await super.getSigner(r)}}vy=new WeakMap;var by;const KL=class KL extends R${constructor(r,n){super(n);je(this,"address");Je(this,by,void 0);De(r&&typeof r.sign=="function","invalid private key","privateKey","[ REDACTED ]"),Te(this,by,r);const i=Rw(this.signingKey.publicKey);Jt(this,{address:i})}get signingKey(){return K(this,by)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(r){return new KL(K(this,by),r)}async signTransaction(r){const{to:n,from:i}=await Da({to:r.to?ma(r.to,this.provider):void 0,from:r.from?ma(r.from,this.provider):void 0});n!=null&&(r.to=n),i!=null&&(r.from=i),r.from!=null&&(De(ln(r.from)===this.address,"transaction from address mismatch","tx.from",r.from),delete r.from);const a=R1.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(J1e(r)).serialized}async signTypedData(r,n,i){const a=await Ny.resolveNames(r,n,i,async o=>{at(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 at(s!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:o}),s});return this.signingKey.sign(Ny.hash(a.domain,n,a.value)).serialized}};by=new WeakMap;let CA=KL;const NA=" !#$%&'()*+,-./<=>?@[]^_`{|}~",m_e=/^[a-z]*$/i;function xF(t,e){let r=97;return t.reduce((n,i)=>(i===e?r++:i.match(m_e)?n.push(String.fromCharCode(r)+i):(r=97,n.push(i)),n),[])}function v_e(t,e){for(let i=NA.length-1;i>=0;i--)t=t.split(NA[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 xF(xF(r,";"),":")}function b_e(t){return De(t[0]==="0","unsupported auwl data","data",t),v_e(t.substring(1+2*NA.length),t.substring(1,1+2*NA.length))}class w_e{constructor(e){je(this,"locale");Jt(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var wy,gw,rp,yw,K8;class __e extends w_e{constructor(r,n,i){super(r);Je(this,yw);Je(this,wy,void 0);Je(this,gw,void 0);Je(this,rp,void 0);Te(this,wy,n),Te(this,gw,i),Te(this,rp,null)}get _data(){return K(this,wy)}_decodeWords(){return b_e(K(this,wy))}getWord(r){const n=ut(this,yw,K8).call(this);return De(r>=0&&r<n.length,`invalid word index: ${r}`,"index",r),n[r]}getWordIndex(r){return ut(this,yw,K8).call(this).indexOf(r)}}wy=new WeakMap,gw=new WeakMap,rp=new WeakMap,yw=new WeakSet,K8=function(){if(K(this,rp)==null){const r=this._decodeWords();if(Bl(r.join(`
70
+ `)+`
71
+ `)!==K(this,gw))throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);Te(this,rp,r)}return K(this,rp)};const E_e="0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO",x_e="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60";let CP=null;class bp extends __e{constructor(){super("en",E_e,x_e)}static wordlist(){return CP==null&&(CP=new bp),CP}}function Dte(t){return(1<<t)-1<<8-t&255}function A_e(t){return(1<<t)-1&255}function NP(t,e){gZ("NFKD"),e==null&&(e=bp.wordlist());const r=e.split(t);De(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"));De(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=Dte(o),c=zt(kc(n.slice(0,a/8)))[0]&s;return De(c===(n[n.length-1]&s),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),xt(n.slice(0,a/8))}function DP(t,e){De(t.length%4===0&&t.length>=16&&t.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),e==null&&(e=bp.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]&A_e(8-n)),n+=3);const i=t.length/4,a=parseInt(kc(t).substring(2,4),16)&Dte(i);return r[r.length-1]<<=i,r[r.length-1]|=a>>8-i,e.join(r.map(o=>e.getWord(o)))}const $P={};class $y{constructor(e,r,n,i,a){je(this,"phrase");je(this,"password");je(this,"wordlist");je(this,"entropy");i==null&&(i=""),a==null&&(a=bp.wordlist()),xd(e,$P,"Mnemonic"),Jt(this,{phrase:n,password:i,wordlist:a,entropy:r})}computeSeed(){const e=co("mnemonic"+this.password,"NFKD");return Ad(co(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,r,n){const i=NP(e,n);return e=DP(zt(i),n),new $y($P,i,e,r,n)}static fromEntropy(e,r,n){const i=zt(e,"entropy"),a=DP(i,n);return new $y($P,xt(i),a,r,n)}static entropyToPhrase(e,r){const n=zt(e,"entropy");return DP(n,r)}static phraseToEntropy(e,r){return NP(e,r)}static isValidMnemonic(e,r){try{return NP(e,r),!0}catch{}return!1}}/*! MIT License. Copyright 2015-2022 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */var aa=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)},MP=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},Ex,ws,ru;const S_e={16:10,24:12,32:14},O_e=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],ms=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],dE=[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],I_e=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],P_e=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],T_e=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],R_e=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],C_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],N_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],D_e=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],$_e=[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],M_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],k_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],L_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],U_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 kP(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 C${get key(){return aa(this,Ex,"f").slice()}constructor(e){if(Ex.set(this,void 0),ws.set(this,void 0),ru.set(this,void 0),!(this instanceof C$))throw Error("AES must be instanitated with `new`");MP(this,Ex,new Uint8Array(e),"f");const r=S_e[this.key.length];if(r==null)throw new TypeError("invalid key size (must be 16, 24 or 32 bytes)");MP(this,ru,[],"f"),MP(this,ws,[],"f");for(let f=0;f<=r;f++)aa(this,ru,"f").push([0,0,0,0]),aa(this,ws,"f").push([0,0,0,0]);const n=(r+1)*4,i=this.key.length/4,a=kP(this.key);let o;for(let f=0;f<i;f++)o=f>>2,aa(this,ru,"f")[o][f%4]=a[f],aa(this,ws,"f")[r-o][f%4]=a[f];let s=0,c=i,u;for(;c<n;){if(u=a[i-1],a[0]^=ms[u>>16&255]<<24^ms[u>>8&255]<<16^ms[u&255]<<8^ms[u>>24&255]^O_e[s]<<24,s+=1,i!=8)for(let m=1;m<i;m++)a[m]^=a[m-1];else{for(let m=1;m<i/2;m++)a[m]^=a[m-1];u=a[i/2-1],a[i/2]^=ms[u&255]^ms[u>>8&255]<<8^ms[u>>16&255]<<16^ms[u>>24&255]<<24;for(let m=i/2+1;m<i;m++)a[m]^=a[m-1]}let f=0,d,g;for(;f<i&&c<n;)d=c>>2,g=c%4,aa(this,ru,"f")[d][g]=a[f],aa(this,ws,"f")[r-d][g]=a[f++],c++}for(let f=1;f<r;f++)for(let d=0;d<4;d++)u=aa(this,ws,"f")[f][d],aa(this,ws,"f")[f][d]=M_e[u>>24&255]^k_e[u>>16&255]^L_e[u>>8&255]^U_e[u&255]}encrypt(e){if(e.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const r=aa(this,ru,"f").length-1,n=[0,0,0,0];let i=kP(e);for(let s=0;s<4;s++)i[s]^=aa(this,ru,"f")[0][s];for(let s=1;s<r;s++){for(let c=0;c<4;c++)n[c]=I_e[i[c]>>24&255]^P_e[i[(c+1)%4]>>16&255]^T_e[i[(c+2)%4]>>8&255]^R_e[i[(c+3)%4]&255]^aa(this,ru,"f")[s][c];i=n.slice()}const a=new Uint8Array(16);let o=0;for(let s=0;s<4;s++)o=aa(this,ru,"f")[r][s],a[4*s]=(ms[i[s]>>24&255]^o>>24)&255,a[4*s+1]=(ms[i[(s+1)%4]>>16&255]^o>>16)&255,a[4*s+2]=(ms[i[(s+2)%4]>>8&255]^o>>8)&255,a[4*s+3]=(ms[i[(s+3)%4]&255]^o)&255;return a}decrypt(e){if(e.length!=16)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const r=aa(this,ws,"f").length-1,n=[0,0,0,0];let i=kP(e);for(let s=0;s<4;s++)i[s]^=aa(this,ws,"f")[0][s];for(let s=1;s<r;s++){for(let c=0;c<4;c++)n[c]=C_e[i[c]>>24&255]^N_e[i[(c+3)%4]>>16&255]^D_e[i[(c+2)%4]>>8&255]^$_e[i[(c+1)%4]&255]^aa(this,ws,"f")[s][c];i=n.slice()}const a=new Uint8Array(16);let o=0;for(let s=0;s<4;s++)o=aa(this,ws,"f")[r][s],a[4*s]=(dE[i[s]>>24&255]^o>>24)&255,a[4*s+1]=(dE[i[(s+3)%4]>>16&255]^o>>16)&255,a[4*s+2]=(dE[i[(s+2)%4]>>8&255]^o>>8)&255,a[4*s+3]=(dE[i[(s+1)%4]&255]^o)&255;return a}}Ex=new WeakMap,ws=new WeakMap,ru=new WeakMap;class $te{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 C$(r)},name:{enumerable:!0,value:e}})}}var hE=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},v0=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)},wb,rl;class N$ extends $te{constructor(e,r){if(super("ECC",e,N$),wb.set(this,void 0),rl.set(this,void 0),r){if(r.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");hE(this,wb,new Uint8Array(r),"f")}else hE(this,wb,new Uint8Array(16),"f");hE(this,rl,this.iv,"f")}get iv(){return new Uint8Array(v0(this,wb,"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++)v0(this,rl,"f")[i]^=e[n+i];hE(this,rl,this.aes.encrypt(v0(this,rl,"f")),"f"),r.set(v0(this,rl,"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]^v0(this,rl,"f")[a],v0(this,rl,"f")[a]=e[n+a]}return r}}wb=new WeakMap,rl=new WeakMap;var b0=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},vs=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},_b,mh,_s;class My extends $te{constructor(e,r){super("CTR",e,My),_b.set(this,void 0),mh.set(this,void 0),_s.set(this,void 0),b0(this,_s,new Uint8Array(16),"f"),vs(this,_s,"f").fill(0),b0(this,_b,vs(this,_s,"f"),"f"),b0(this,mh,16,"f"),r==null&&(r=1),typeof r=="number"?this.setCounterValue(r):this.setCounterBytes(r)}get counter(){return new Uint8Array(vs(this,_s,"f"))}setCounterValue(e){if(!Number.isInteger(e)||e<0||e>Number.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let r=15;r>=0;--r)vs(this,_s,"f")[r]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(e.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");vs(this,_s,"f").set(e)}increment(){for(let e=15;e>=0;e--)if(vs(this,_s,"f")[e]===255)vs(this,_s,"f")[e]=0;else{vs(this,_s,"f")[e]++;break}}encrypt(e){var r,n;const i=new Uint8Array(e);for(let a=0;a<i.length;a++)vs(this,mh,"f")===16&&(b0(this,_b,this.aes.encrypt(vs(this,_s,"f")),"f"),b0(this,mh,0,"f"),this.increment()),i[a]^=vs(this,_b,"f")[b0(this,mh,(n=vs(this,mh,"f"),r=n++,n),"f"),r];return i}decrypt(e){return this.encrypt(e)}}_b=new WeakMap,mh=new WeakMap,_s=new WeakMap;function B_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 Mte(t){return typeof t=="string"&&!t.startsWith("0x")&&(t="0x"+t),Fa(t)}function tv(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}function $w(t){return typeof t=="string"?co(t,"NFKC"):Fa(t)}function Ei(t,e){const r=e.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);De(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(De(!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 Mte(o);if(i==="array"&&Array.isArray(o)||i===typeof o)return o;De(!1,`wrong type found for ${i} `,"path",n)}return o}const kte="m/44'/60'/0'/0/0";function AF(t){try{const e=JSON.parse(t);if((e.version!=null?parseInt(e.version):0)===3)return!0}catch{}return!1}function F_e(t,e,r){if(Ei(t,"crypto.cipher:string")==="aes-128-ctr"){const i=Ei(t,"crypto.cipherparams.iv:data!"),a=new My(e,i);return xt(a.decrypt(r))}at(!1,"unsupported cipher","UNSUPPORTED_OPERATION",{operation:"decrypt"})}function DA(t,e){const r=zt(e),n=Ei(t,"crypto.ciphertext:data!"),i=xt(Gn(Wn([r.slice(16,32),n]))).substring(2);De(i===Ei(t,"crypto.mac:string!").toLowerCase(),"incorrect password","password","[ REDACTED ]");const a=F_e(t,r.slice(0,16),n),o=Rw(a);if(t.address){let u=t.address.toLowerCase();u.startsWith("0x")||(u="0x"+u),De(ln(u)===o,"keystore address/privateKey mismatch","address",t.address)}const s={address:o,privateKey:a};if(Ei(t,"x-ethers.version:string")==="0.1"){const u=r.slice(32,64),f=Ei(t,"x-ethers.mnemonicCiphertext:data!"),d=Ei(t,"x-ethers.mnemonicCounter:data!"),g=new My(u,d);s.mnemonic={path:Ei(t,"x-ethers.path:string")||kte,locale:Ei(t,"x-ethers.locale:string")||"en",entropy:xt(zt(g.decrypt(f)))}}return s}function Lte(t){const e=Ei(t,"crypto.kdf:string");if(e&&typeof e=="string"){if(e.toLowerCase()==="scrypt"){const r=Ei(t,"crypto.kdfparams.salt:data!"),n=Ei(t,"crypto.kdfparams.n:int!"),i=Ei(t,"crypto.kdfparams.r:int!"),a=Ei(t,"crypto.kdfparams.p:int!");De(n>0&&(n&n-1)===0,"invalid kdf.N","kdf.N",n),De(i>0&&a>0,"invalid kdf","kdf",e);const o=Ei(t,"crypto.kdfparams.dklen:int!");return De(o===32,"invalid kdf.dklen","kdf.dflen",o),{name:"scrypt",salt:r,N:n,r:i,p:a,dkLen:64}}else if(e.toLowerCase()==="pbkdf2"){const r=Ei(t,"crypto.kdfparams.salt:data!"),n=Ei(t,"crypto.kdfparams.prf:string!"),i=n.split("-").pop();De(i==="sha256"||i==="sha512","invalid kdf.pdf","kdf.pdf",n);const a=Ei(t,"crypto.kdfparams.c:int!"),o=Ei(t,"crypto.kdfparams.dklen:int!");return De(o===32,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:r,count:a,dkLen:o,algorithm:i}}}De(!1,"unsupported key-derivation function","kdf",e)}function j_e(t,e){const r=JSON.parse(t),n=$w(e),i=Lte(r);if(i.name==="pbkdf2"){const{salt:d,count:g,dkLen:m,algorithm:w}=i,v=Ad(n,d,g,m,w);return DA(r,v)}at(i.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:a,N:o,r:s,p:c,dkLen:u}=i,f=um(n,a,o,s,c,u);return DA(r,f)}function SF(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}async function q_e(t,e,r){const n=JSON.parse(t),i=$w(e),a=Lte(n);if(a.name==="pbkdf2"){r&&(r(0),await SF(0));const{salt:g,count:m,dkLen:w,algorithm:v}=a,y=Ad(i,g,m,w,v);return r&&(r(1),await SF(0)),DA(n,y)}at(a.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:a});const{salt:o,N:s,r:c,p:u,dkLen:f}=a,d=await cm(i,o,s,c,u,f,r);return DA(n,d)}function Ute(t){const e=t.salt!=null?zt(t.salt,"options.salt"):Cl(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)),De(typeof r=="number"&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),De(typeof n=="number"&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),De(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 Bte(t,e,r,n){const i=zt(r.privateKey,"privateKey"),a=n.iv!=null?zt(n.iv,"options.iv"):Cl(16);De(a.length===16,"invalid options.iv length","options.iv",n.iv);const o=n.uuid!=null?zt(n.uuid,"options.uuid"):Cl(16);De(o.length===16,"invalid options.uuid length","options.uuid",n.iv);const s=t.slice(0,16),c=t.slice(16,32),u=new My(s,a),f=zt(u.encrypt(i)),d=Gn(Wn([c,f])),g={address:r.address.substring(2).toLowerCase(),id:eve(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/${hZ}`,w=r.mnemonic.path||kte,v=r.mnemonic.locale||"en",y=t.slice(32,64),_=zt(r.mnemonic.entropy,"account.mnemonic.entropy"),b=Cl(16),S=new My(y,b),x=zt(S.encrypt(_)),O=new Date,p="UTC--"+(O.getUTCFullYear()+"-"+tv(O.getUTCMonth()+1,2)+"-"+tv(O.getUTCDate(),2)+"T"+tv(O.getUTCHours(),2)+"-"+tv(O.getUTCMinutes(),2)+"-"+tv(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 Fte(t,e,r){r==null&&(r={});const n=$w(e),i=Ute(r),a=um(n,i.salt,i.N,i.r,i.p,64);return Bte(zt(a),i,t,r)}async function jte(t,e,r){r==null&&(r={});const n=$w(e),i=Ute(r),a=await cm(n,i.salt,i.N,i.r,i.p,64,r.progressCallback);return Bte(zt(a),i,t,r)}const LP="m/44'/60'/0'/0/0",H_e=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),ld=2147483648,z_e=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),V_e="0123456789abcdef";function $A(t,e){let r="";for(;t;)r=V_e[t%16]+r,t=Math.trunc(t/16);for(;r.length<e*2;)r="0"+r;return"0x"+r}function Y8(t){const e=zt(t),r=Jn(kc(kc(e)),0,4),n=Wn([e,r]);return wZ(n)}const nu={};function qte(t,e,r,n){const i=new Uint8Array(37);t&ld?(at(n!=null,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),i.set(zt(n),1)):i.set(zt(r));for(let o=24;o>=0;o-=8)i[33+(o>>3)]=t>>24-o&255;const a=zt(om("sha512",e,i));return{IL:a.slice(0,32),IR:a.slice(32)}}function Hte(t,e){const r=e.split("/");De(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));De(o<ld,"invalid path index",`path[${i}]`,a),n=n.deriveChild(ld+o)}else if(a.match(/^[0-9]+$/)){const o=parseInt(a);De(o<ld,"invalid path index",`path[${i}]`,a),n=n.deriveChild(o)}else De(!1,"invalid path component",`path[${i}]`,a)}return n}var mw,Q8,np,Eb;const gc=class gc extends CA{constructor(r,n,i,a,o,s,c,u,f){super(n,f);Je(this,mw);je(this,"publicKey");je(this,"fingerprint");je(this,"parentFingerprint");je(this,"mnemonic");je(this,"chainCode");je(this,"path");je(this,"index");je(this,"depth");xd(r,nu,"HDNodeWallet"),Jt(this,{publicKey:n.compressedPublicKey});const d=Jn(sm(kc(this.publicKey)),0,4);Jt(this,{parentFingerprint:i,fingerprint:d,chainCode:a,path:o,index:s,depth:c}),Jt(this,{mnemonic:u})}connect(r){return new gc(nu,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,r)}async encrypt(r,n){return await jte(ut(this,mw,Q8).call(this),r,{progressCallback:n})}encryptSync(r){return Fte(ut(this,mw,Q8).call(this),r)}get extendedKey(){return at(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),Y8(Wn(["0x0488ADE4",$A(this.depth,1),this.parentFingerprint,$A(this.index,4),this.chainCode,Wn(["0x00",this.privateKey])]))}hasPath(){return this.path!=null}neuter(){return new $1(nu,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(r){const n=Fr(r,"index");De(n<=4294967295,"invalid index","index",n);let i=this.path;i&&(i+="/"+(n&~ld),n&ld&&(i+="'"));const{IR:a,IL:o}=qte(n,this.chainCode,this.publicKey,this.privateKey),s=new xu(Ul((Pw(o)+BigInt(this.privateKey))%z_e,32));return new gc(nu,s,this.fingerprint,xt(a),i,n,this.depth+1,this.mnemonic,this.provider)}derivePath(r){return Hte(this,r)}static fromExtendedKey(r){const n=No(Nme(r));De(n.length===82||Y8(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 $1(nu,Rw(u),u,a,s,null,o,i,null)}case"0x0488ade4":case"0x04358394 ":if(c[0]!==0)break;return new gc(nu,new xu(c.slice(1)),a,s,null,o,i,null,null)}De(!1,"invalid extended key prefix","extendedKey","[ REDACTED ]")}static createRandom(r,n,i){var o;r==null&&(r=""),n==null&&(n=LP),i==null&&(i=bp.wordlist());const a=$y.fromEntropy(Cl(16),r,i);return ut(o=gc,np,Eb).call(o,a.computeSeed(),a).derivePath(n)}static fromMnemonic(r,n){var i;return n||(n=LP),ut(i=gc,np,Eb).call(i,r.computeSeed(),r).derivePath(n)}static fromPhrase(r,n,i,a){var s;n==null&&(n=""),i==null&&(i=LP),a==null&&(a=bp.wordlist());const o=$y.fromPhrase(r,n,a);return ut(s=gc,np,Eb).call(s,o.computeSeed(),o).derivePath(i)}static fromSeed(r){var n;return ut(n=gc,np,Eb).call(n,r,null)}};mw=new WeakSet,Q8=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},np=new WeakSet,Eb=function(r,n){De(mZ(r),"invalid seed","seed","[REDACTED]");const i=zt(r,"seed");De(i.length>=16&&i.length<=64,"invalid seed","seed","[REDACTED]");const a=zt(om("sha512",H_e,i)),o=new xu(xt(a.slice(0,32)));return new gc(nu,o,"0x00000000",xt(a.slice(32)),"m",0,0,n,null)},Je(gc,np);let Gb=gc;class $1 extends q8{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");xd(r,nu,"HDNodeVoidWallet"),Jt(this,{publicKey:i});const d=Jn(sm(kc(i)),0,4);Jt(this,{publicKey:i,fingerprint:d,parentFingerprint:a,chainCode:o,path:s,index:c,depth:u})}connect(r){return new $1(nu,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,r)}get extendedKey(){return at(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),Y8(Wn(["0x0488B21E",$A(this.depth,1),this.parentFingerprint,$A(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(r){const n=Fr(r,"index");De(n<=4294967295,"invalid index","index",n);let i=this.path;i&&(i+="/"+(n&~ld),n&ld&&(i+="'"));const{IR:a,IL:o}=qte(n,this.chainCode,this.publicKey,null),s=xu.addPoints(o,this.publicKey,!0),c=Rw(s);return new $1(nu,c,s,this.fingerprint,xt(a),i,n,this.depth+1,this.provider)}derivePath(r){return Hte(this,r)}}function OF(t){try{if(JSON.parse(t).encseed)return!0}catch{}return!1}function IF(t,e){const r=JSON.parse(t),n=$w(e),i=ln(Ei(r,"ethaddr:string!")),a=Mte(Ei(r,"encseed:string!"));De(a&&a.length%16===0,"invalid encseed","json",t);const o=zt(Ad(n,n,2e3,32,"sha256")).slice(0,16),s=a.slice(0,16),c=a.slice(16),u=new N$(o,s),f=B_e(zt(u.decrypt(c)));let d="";for(let g=0;g<f.length;g++)d+=String.fromCharCode(f[g]);return{address:i,privateKey:Bl(d)}}function PF(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}var vw,X8;const xh=class xh extends CA{constructor(e,r){typeof e=="string"&&!e.startsWith("0x")&&(e="0x"+e);let n=typeof e=="string"?new xu(e):e;super(n,r)}connect(e){return new xh(this.signingKey,e)}async encrypt(e,r){const n={address:this.address,privateKey:this.privateKey};return await jte(n,e,{progressCallback:r})}encryptSync(e){const r={address:this.address,privateKey:this.privateKey};return Fte(r,e)}static async fromEncryptedJson(e,r,n){var a;let i=null;return AF(e)?i=await q_e(e,r,n):OF(e)&&(n&&(n(0),await PF(0)),i=IF(e,r),n&&(n(1),await PF(0))),ut(a=xh,vw,X8).call(a,i)}static fromEncryptedJsonSync(e,r){var i;let n=null;return AF(e)?n=j_e(e,r):OF(e)?n=IF(e,r):De(!1,"invalid JSON wallet","json","[ REDACTED ]"),ut(i=xh,vw,X8).call(i,n)}static createRandom(e){const r=Gb.createRandom();return e?r.connect(e):r}static fromPhrase(e,r){const n=Gb.fromPhrase(e);return r?n.connect(r):n}};vw=new WeakSet,X8=function(e){if(De(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&e.mnemonic.locale==="en"){const n=$y.fromEntropy(e.mnemonic.entropy),i=Gb.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 xh(e.privateKey);return De(r.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),r},Je(xh,vw);let J8=xh;var Ls={},rv={},zte={exports:{}},Vte={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})(Vte);var D$=Vte.exports;(function(t){var e=D$.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})(zte);var Qs=zte.exports,Gte={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})(Gte);var br=Gte.exports,UP={exports:{}},TF;function Fn(){return TF||(TF=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}(UP)),UP.exports}var BP={exports:{}},FP={exports:{}},RF;function G_e(){return RF||(RF=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}(FP)),FP.exports}var CF;function jc(){return CF||(CF=1,function(t){var e=G_e();function r(n,i){n.prototype=Object.create(i.prototype),n.prototype.constructor=n,e(n,i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(BP)),BP.exports}var jP,NF;function Wte(){if(NF)return jP;NF=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 jP=t,jP}var qP,DF;function $i(){if(DF)return qP;DF=1;var t=Array.isArray;return qP=t,qP}var HP,$F;function Kte(){if($F)return HP;$F=1;var t=typeof Ne=="object"&&Ne&&Ne.Object===Object&&Ne;return HP=t,HP}var zP,MF;function Gl(){if(MF)return zP;MF=1;var t=Kte(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return zP=r,zP}var VP,kF;function Mw(){if(kF)return VP;kF=1;var t=Gl(),e=t.Symbol;return VP=e,VP}var GP,LF;function W_e(){if(LF)return GP;LF=1;var t=Mw(),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 GP=a,GP}var WP,UF;function K_e(){if(UF)return WP;UF=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return WP=r,WP}var KP,BF;function Wl(){if(BF)return KP;BF=1;var t=Mw(),e=W_e(),r=K_e(),n="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function o(s){return s==null?s===void 0?i:n:a&&a in Object(s)?e(s):r(s)}return KP=o,KP}var YP,FF;function qc(){if(FF)return YP;FF=1;function t(e){return e!=null&&typeof e=="object"}return YP=t,YP}var QP,jF;function lm(){if(jF)return QP;jF=1;var t=Wl(),e=qc(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return QP=n,QP}var JP,qF;function $$(){if(qF)return JP;qF=1;var t=$i(),e=lm(),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 JP=i,JP}var XP,HF;function Kl(){if(HF)return XP;HF=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return XP=t,XP}var ZP,zF;function sS(){if(zF)return ZP;zF=1;var t=Wl(),e=Kl(),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 ZP=o,ZP}var e3,VF;function Y_e(){if(VF)return e3;VF=1;var t=Gl(),e=t["__core-js_shared__"];return e3=e,e3}var t3,GF;function Q_e(){if(GF)return t3;GF=1;var t=Y_e(),e=function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!e&&e in n}return t3=r,t3}var r3,WF;function Yte(){if(WF)return r3;WF=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 r3=r,r3}var n3,KF;function J_e(){if(KF)return n3;KF=1;var t=sS(),e=Q_e(),r=Kl(),n=Yte(),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 n3=d,n3}var i3,YF;function X_e(){if(YF)return i3;YF=1;function t(e,r){return e==null?void 0:e[r]}return i3=t,i3}var a3,QF;function Cp(){if(QF)return a3;QF=1;var t=J_e(),e=X_e();function r(n,i){var a=e(n,i);return t(a)?a:void 0}return a3=r,a3}var o3,JF;function cS(){if(JF)return o3;JF=1;var t=Cp(),e=t(Object,"create");return o3=e,o3}var s3,XF;function Z_e(){if(XF)return s3;XF=1;var t=cS();function e(){this.__data__=t?t(null):{},this.size=0}return s3=e,s3}var c3,ZF;function eEe(){if(ZF)return c3;ZF=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return c3=t,c3}var u3,ej;function tEe(){if(ej)return u3;ej=1;var t=cS(),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 u3=i,u3}var l3,tj;function rEe(){if(tj)return l3;tj=1;var t=cS(),e=Object.prototype,r=e.hasOwnProperty;function n(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return l3=n,l3}var f3,rj;function nEe(){if(rj)return f3;rj=1;var t=cS(),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 f3=r,f3}var d3,nj;function iEe(){if(nj)return d3;nj=1;var t=Z_e(),e=eEe(),r=tEe(),n=rEe(),i=nEe();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var u=o[s];this.set(u[0],u[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,d3=a,d3}var h3,ij;function aEe(){if(ij)return h3;ij=1;function t(){this.__data__=[],this.size=0}return h3=t,h3}var p3,aj;function uS(){if(aj)return p3;aj=1;function t(e,r){return e===r||e!==e&&r!==r}return p3=t,p3}var g3,oj;function lS(){if(oj)return g3;oj=1;var t=uS();function e(r,n){for(var i=r.length;i--;)if(t(r[i][0],n))return i;return-1}return g3=e,g3}var y3,sj;function oEe(){if(sj)return y3;sj=1;var t=lS(),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 y3=n,y3}var m3,cj;function sEe(){if(cj)return m3;cj=1;var t=lS();function e(r){var n=this.__data__,i=t(n,r);return i<0?void 0:n[i][1]}return m3=e,m3}var v3,uj;function cEe(){if(uj)return v3;uj=1;var t=lS();function e(r){return t(this.__data__,r)>-1}return v3=e,v3}var b3,lj;function uEe(){if(lj)return b3;lj=1;var t=lS();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 b3=e,b3}var w3,fj;function fS(){if(fj)return w3;fj=1;var t=aEe(),e=oEe(),r=sEe(),n=cEe(),i=uEe();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,w3=a,w3}var _3,dj;function M$(){if(dj)return _3;dj=1;var t=Cp(),e=Gl(),r=t(e,"Map");return _3=r,_3}var E3,hj;function lEe(){if(hj)return E3;hj=1;var t=iEe(),e=fS(),r=M$();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return E3=n,E3}var x3,pj;function fEe(){if(pj)return x3;pj=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return x3=t,x3}var A3,gj;function dS(){if(gj)return A3;gj=1;var t=fEe();function e(r,n){var i=r.__data__;return t(n)?i[typeof n=="string"?"string":"hash"]:i.map}return A3=e,A3}var S3,yj;function dEe(){if(yj)return S3;yj=1;var t=dS();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return S3=e,S3}var O3,mj;function hEe(){if(mj)return O3;mj=1;var t=dS();function e(r){return t(this,r).get(r)}return O3=e,O3}var I3,vj;function pEe(){if(vj)return I3;vj=1;var t=dS();function e(r){return t(this,r).has(r)}return I3=e,I3}var P3,bj;function gEe(){if(bj)return P3;bj=1;var t=dS();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 P3=e,P3}var T3,wj;function k$(){if(wj)return T3;wj=1;var t=lEe(),e=dEe(),r=hEe(),n=pEe(),i=gEe();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,T3=a,T3}var R3,_j;function L$(){if(_j)return R3;_j=1;var t=k$(),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,R3=r,R3}var C3,Ej;function yEe(){if(Ej)return C3;Ej=1;var t=L$(),e=500;function r(n){var i=t(n,function(o){return a.size===e&&a.clear(),o}),a=i.cache;return i}return C3=r,C3}var N3,xj;function mEe(){if(xj)return N3;xj=1;var t=yEe(),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 N3=n,N3}var D3,Aj;function Np(){if(Aj)return D3;Aj=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 D3=t,D3}var $3,Sj;function U$(){if(Sj)return $3;Sj=1;var t=Mw(),e=Np(),r=$i(),n=lm(),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 $3=s,$3}var M3,Oj;function B$(){if(Oj)return M3;Oj=1;var t=U$();function e(r){return r==null?"":t(r)}return M3=e,M3}var k3,Ij;function kw(){if(Ij)return k3;Ij=1;var t=$i(),e=$$(),r=mEe(),n=B$();function i(a,o){return t(a)?a:e(a,o)?[a]:r(n(a))}return k3=i,k3}var L3,Pj;function vEe(){if(Pj)return L3;Pj=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return L3=t,L3}var U3,Tj;function fm(){if(Tj)return U3;Tj=1;var t=lm(),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 U3=r,U3}var B3,Rj;function Lw(){if(Rj)return B3;Rj=1;var t=kw(),e=fm();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 B3=r,B3}var F3,Cj;function F$(){if(Cj)return F3;Cj=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 F3=t,F3}var j3,Nj;function bEe(){if(Nj)return j3;Nj=1;var t=Lw(),e=F$();function r(n,i){return i.length<2?n:t(n,e(i,0,-1))}return j3=r,j3}var q3,Dj;function wEe(){if(Dj)return q3;Dj=1;var t=Wte(),e=kw(),r=vEe(),n=bEe(),i=fm();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 q3=a,q3}var H3,$j;function Od(){if($j)return H3;$j=1;function t(e){return e}return H3=t,H3}var z3,Mj;function Qte(){if(Mj)return z3;Mj=1;var t=Wte(),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 z3=r,z3}var V3,kj;function Jte(){if(kj)return V3;kj=1;function t(e){return function(){return e}}return V3=t,V3}var G3,Lj;function Xte(){if(Lj)return G3;Lj=1;var t=Cp(),e=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}}();return G3=e,G3}var W3,Uj;function _Ee(){if(Uj)return W3;Uj=1;var t=Jte(),e=Xte(),r=Od(),n=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return W3=n,W3}var K3,Bj;function EEe(){if(Bj)return K3;Bj=1;var t=800,e=16,r=Date.now;function n(i){var a=0,o=0;return function(){var s=r(),c=e-(s-o);if(o=s,c>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return K3=n,K3}var Y3,Fj;function Zte(){if(Fj)return Y3;Fj=1;var t=_Ee(),e=EEe(),r=e(t);return Y3=r,Y3}var Q3,jj;function Uw(){if(jj)return Q3;jj=1;var t=Od(),e=Qte(),r=Zte();function n(i,a){return r(e(i,a,t),i+"")}return Q3=n,Q3}var J3,qj;function Js(){if(qj)return J3;qj=1;var t=wEe(),e=Uw(),r=e(t);return J3=r,J3}var X3,Hj;function Yl(){if(Hj)return X3;Hj=1;function t(e){return e==null}return X3=t,X3}function xEe(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var ere={exports:{}},Nn={};/** @license React v16.13.1
72
+ * react-is.production.min.js
73
+ *
74
+ * Copyright (c) Facebook, Inc. and its affiliates.
75
+ *
76
+ * This source code is licensed under the MIT license found in the
77
+ * LICENSE file in the root directory of this source tree.
78
+ */var ea=typeof Symbol=="function"&&Symbol.for,j$=ea?Symbol.for("react.element"):60103,q$=ea?Symbol.for("react.portal"):60106,hS=ea?Symbol.for("react.fragment"):60107,pS=ea?Symbol.for("react.strict_mode"):60108,gS=ea?Symbol.for("react.profiler"):60114,yS=ea?Symbol.for("react.provider"):60109,mS=ea?Symbol.for("react.context"):60110,H$=ea?Symbol.for("react.async_mode"):60111,vS=ea?Symbol.for("react.concurrent_mode"):60111,bS=ea?Symbol.for("react.forward_ref"):60112,wS=ea?Symbol.for("react.suspense"):60113,AEe=ea?Symbol.for("react.suspense_list"):60120,_S=ea?Symbol.for("react.memo"):60115,ES=ea?Symbol.for("react.lazy"):60116,SEe=ea?Symbol.for("react.block"):60121,OEe=ea?Symbol.for("react.fundamental"):60117,IEe=ea?Symbol.for("react.responder"):60118,PEe=ea?Symbol.for("react.scope"):60119;function is(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case j$:switch(t=t.type,t){case H$:case vS:case hS:case gS:case pS:case wS:return t;default:switch(t=t&&t.$$typeof,t){case mS:case bS:case ES:case _S:case yS:return t;default:return e}}case q$:return e}}}function tre(t){return is(t)===vS}Nn.AsyncMode=H$;Nn.ConcurrentMode=vS;Nn.ContextConsumer=mS;Nn.ContextProvider=yS;Nn.Element=j$;Nn.ForwardRef=bS;Nn.Fragment=hS;Nn.Lazy=ES;Nn.Memo=_S;Nn.Portal=q$;Nn.Profiler=gS;Nn.StrictMode=pS;Nn.Suspense=wS;Nn.isAsyncMode=function(t){return tre(t)||is(t)===H$};Nn.isConcurrentMode=tre;Nn.isContextConsumer=function(t){return is(t)===mS};Nn.isContextProvider=function(t){return is(t)===yS};Nn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===j$};Nn.isForwardRef=function(t){return is(t)===bS};Nn.isFragment=function(t){return is(t)===hS};Nn.isLazy=function(t){return is(t)===ES};Nn.isMemo=function(t){return is(t)===_S};Nn.isPortal=function(t){return is(t)===q$};Nn.isProfiler=function(t){return is(t)===gS};Nn.isStrictMode=function(t){return is(t)===pS};Nn.isSuspense=function(t){return is(t)===wS};Nn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===hS||t===vS||t===gS||t===pS||t===wS||t===AEe||typeof t=="object"&&t!==null&&(t.$$typeof===ES||t.$$typeof===_S||t.$$typeof===yS||t.$$typeof===mS||t.$$typeof===bS||t.$$typeof===OEe||t.$$typeof===IEe||t.$$typeof===PEe||t.$$typeof===SEe)};Nn.typeOf=is;ere.exports=Nn;var TEe=ere.exports;function Z8(t,e){return Z8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Z8(t,e)}function rre(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Z8(t,e)}var Jf=function(e,r){if(typeof e=="function"){e(r);return}e!==null&&typeof e=="object"&&(e.current=r)},REe=function(e){return e!==null&&typeof e=="object"&&e.hasOwnProperty("current")},nre=function(t){rre(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=E1.findDOMNode(this);this.prevNode=i,Jf(this.props.innerRef,i)},r.componentDidUpdate=function(i){var a=E1.findDOMNode(this);this.prevNode!==a&&(this.prevNode=a,Jf(this.props.innerRef,a)),i.innerRef!==this.props.innerRef&&Jf(this.props.innerRef,a)},r.componentWillUnmount=function(){Jf(this.props.innerRef,null),delete this.prevNode},r.render=function(){var i=this.props.children;return i},e}(ze.Component),ire=function(t){rre(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;Jf(u.ref,s),Jf(f,s),n.currentNode=s},n}var r=e.prototype;return r.componentDidUpdate=function(i){i.innerRef!==this.props.innerRef&&Jf(this.props.innerRef,this.currentNode)},r.componentWillUnmount=function(){delete this.currentNode},r.render=function(){var i=this.props.children;return ze.cloneElement(i,{ref:this.handleRefOverride})},e}(ze.Component),CEe=["children","innerRef"],NEe=function(e){var r=e.children,n=e.innerRef,i=xEe(e,CEe),a=ze.Children.only(r),o=TEe.isForwardRef(a)?ire:nre,s=a&&i&&Object.keys(i).length>0?ze.cloneElement(a,i):a;return ze.createElement(o,{innerRef:n},s)};const DEe=Object.freeze(Object.defineProperty({__proto__:null,Ref:NEe,RefFindNode:nre,RefForward:ire,handleRef:Jf,isRefObject:REe},Symbol.toStringTag,{value:"Module"})),Id=fo(DEe);function are(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=are(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function zj(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=are(t))&&(n&&(n+=" "),n+=e);return n}const $Ee=Object.freeze(Object.defineProperty({__proto__:null,clsx:zj,default:zj},Symbol.toStringTag,{value:"Module"})),ai=fo($Ee);var Z3={exports:{}},eT,Vj;function MEe(){if(Vj)return eT;Vj=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return eT=t,eT}var tT,Gj;function kEe(){if(Gj)return tT;Gj=1;var t=MEe();function e(){}function r(){}return r.resetWarningCache=e,tT=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},tT}var Wj;function Un(){return Wj||(Wj=1,Z3.exports=kEe()()),Z3.exports}var rT={},nv={},nT={exports:{}},Kj;function LEe(){return Kj||(Kj=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}(nT)),nT.exports}var iT,Yj;function z$(){if(Yj)return iT;Yj=1;function t(e){return e===void 0}return iT=t,iT}var aT,Qj;function UEe(){if(Qj)return aT;Qj=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 aT=t,aT}var oT,Jj;function BEe(){if(Jj)return oT;Jj=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return oT=e,oT}var sT,Xj;function ore(){if(Xj)return sT;Xj=1;var t=BEe(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return sT=r,sT}var cT,Zj;function sre(){if(Zj)return cT;Zj=1;var t=ore(),e=Kl(),r=lm(),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 cT=c,cT}var uT,eq;function V$(){if(eq)return uT;eq=1;var t=sre(),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 uT=n,uT}var lT,tq;function xS(){if(tq)return lT;tq=1;var t=V$();function e(r){var n=t(r),i=n%1;return n===n?i?n-i:n:0}return lT=e,lT}var fT,rq;function FEe(){if(rq)return fT;rq=1;var t=UEe(),e=U$(),r=xS(),n=B$();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 fT=i,fT}var dT,nq;function cre(){if(nq)return dT;nq=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 dT=t,dT}var hT,iq;function jEe(){if(iq)return hT;iq=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 hT=t,hT}var pT,aq;function qEe(){if(aq)return pT;aq=1;var t=jEe(),e=t();return pT=e,pT}var gT,oq;function HEe(){if(oq)return gT;oq=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return gT=t,gT}var yT,sq;function zEe(){if(sq)return yT;sq=1;var t=Wl(),e=qc(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return yT=n,yT}var mT,cq;function AS(){if(cq)return mT;cq=1;var t=zEe(),e=qc(),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 mT=a,mT}var xb={exports:{}},vT,uq;function VEe(){if(uq)return vT;uq=1;function t(){return!1}return vT=t,vT}xb.exports;var lq;function SS(){return lq||(lq=1,function(t,e){var r=Gl(),n=VEe(),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}(xb,xb.exports)),xb.exports}var bT,fq;function OS(){if(fq)return bT;fq=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 bT=r,bT}var wT,dq;function G$(){if(dq)return wT;dq=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return wT=e,wT}var _T,hq;function GEe(){if(hq)return _T;hq=1;var t=Wl(),e=G$(),r=qc(),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 _T=le,_T}var ET,pq;function IS(){if(pq)return ET;pq=1;function t(e){return function(r){return e(r)}}return ET=t,ET}var Ab={exports:{}};Ab.exports;var gq;function WEe(){return gq||(gq=1,function(t,e){var r=Kte(),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}(Ab,Ab.exports)),Ab.exports}var xT,yq;function PS(){if(yq)return xT;yq=1;var t=GEe(),e=IS(),r=WEe(),n=r&&r.isTypedArray,i=n?e(n):t;return xT=i,xT}var AT,mq;function KEe(){if(mq)return AT;mq=1;var t=HEe(),e=AS(),r=$i(),n=SS(),i=OS(),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 AT=c,AT}var ST,vq;function ure(){if(vq)return ST;vq=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return ST=e,ST}var OT,bq;function lre(){if(bq)return OT;bq=1;function t(e,r){return function(n){return e(r(n))}}return OT=t,OT}var IT,wq;function YEe(){if(wq)return IT;wq=1;var t=lre(),e=t(Object.keys,Object);return IT=e,IT}var PT,_q;function fre(){if(_q)return PT;_q=1;var t=ure(),e=YEe(),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 PT=i,PT}var TT,Eq;function Pd(){if(Eq)return TT;Eq=1;var t=sS(),e=G$();function r(n){return n!=null&&e(n.length)&&!t(n)}return TT=r,TT}var RT,xq;function Ql(){if(xq)return RT;xq=1;var t=KEe(),e=fre(),r=Pd();function n(i){return r(i)?t(i):e(i)}return RT=n,RT}var CT,Aq;function W$(){if(Aq)return CT;Aq=1;var t=qEe(),e=Ql();function r(n,i){return n&&t(n,i,e)}return CT=r,CT}var NT,Sq;function QEe(){if(Sq)return NT;Sq=1;var t=Pd();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 NT=e,NT}var DT,Oq;function Bw(){if(Oq)return DT;Oq=1;var t=W$(),e=QEe(),r=e(t);return DT=r,DT}var $T,Iq;function JEe(){if(Iq)return $T;Iq=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 $T=e,$T}var MT,Pq;function XEe(){if(Pq)return MT;Pq=1;var t=fS();function e(){this.__data__=new t,this.size=0}return MT=e,MT}var kT,Tq;function ZEe(){if(Tq)return kT;Tq=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return kT=t,kT}var LT,Rq;function exe(){if(Rq)return LT;Rq=1;function t(e){return this.__data__.get(e)}return LT=t,LT}var UT,Cq;function txe(){if(Cq)return UT;Cq=1;function t(e){return this.__data__.has(e)}return UT=t,UT}var BT,Nq;function rxe(){if(Nq)return BT;Nq=1;var t=fS(),e=M$(),r=k$(),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 BT=i,BT}var FT,Dq;function dre(){if(Dq)return FT;Dq=1;var t=fS(),e=XEe(),r=ZEe(),n=exe(),i=txe(),a=rxe();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,FT=o,FT}var jT,$q;function nxe(){if($q)return jT;$q=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return jT=e,jT}var qT,Mq;function ixe(){if(Mq)return qT;Mq=1;function t(e){return this.__data__.has(e)}return qT=t,qT}var HT,kq;function TS(){if(kq)return HT;kq=1;var t=k$(),e=nxe(),r=ixe();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,HT=n,HT}var zT,Lq;function hre(){if(Lq)return zT;Lq=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 zT=t,zT}var VT,Uq;function RS(){if(Uq)return VT;Uq=1;function t(e,r){return e.has(r)}return VT=t,VT}var GT,Bq;function pre(){if(Bq)return GT;Bq=1;var t=TS(),e=hre(),r=RS(),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 GT=a,GT}var WT,Fq;function axe(){if(Fq)return WT;Fq=1;var t=Gl(),e=t.Uint8Array;return WT=e,WT}var KT,jq;function oxe(){if(jq)return KT;jq=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return KT=t,KT}var YT,qq;function K$(){if(qq)return YT;qq=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return YT=t,YT}var QT,Hq;function sxe(){if(Hq)return QT;Hq=1;var t=Mw(),e=axe(),r=uS(),n=pre(),i=oxe(),a=K$(),o=1,s=2,c="[object Boolean]",u="[object Date]",f="[object Error]",d="[object Map]",g="[object Number]",m="[object RegExp]",w="[object Set]",v="[object String]",y="[object Symbol]",_="[object ArrayBuffer]",b="[object DataView]",S=t?t.prototype:void 0,x=S?S.valueOf:void 0;function 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 Y=n(pe(E),pe(p),C,L,q,le);return le.delete(E),Y;case y:if(x)return x.call(E)==x.call(p)}return!1}return QT=O,QT}var JT,zq;function gre(){if(zq)return JT;zq=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 JT=t,JT}var XT,Vq;function cxe(){if(Vq)return XT;Vq=1;var t=gre(),e=$i();function r(n,i,a){var o=i(n);return e(n)?o:t(o,a(n))}return XT=r,XT}var ZT,Gq;function uxe(){if(Gq)return ZT;Gq=1;function t(){return[]}return ZT=t,ZT}var eR,Wq;function lxe(){if(Wq)return eR;Wq=1;var t=cre(),e=uxe(),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 eR=a,eR}var tR,Kq;function fxe(){if(Kq)return tR;Kq=1;var t=cxe(),e=lxe(),r=Ql();function n(i){return t(i,r,e)}return tR=n,tR}var rR,Yq;function dxe(){if(Yq)return rR;Yq=1;var t=fxe(),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 rR=i,rR}var nR,Qq;function hxe(){if(Qq)return nR;Qq=1;var t=Cp(),e=Gl(),r=t(e,"DataView");return nR=r,nR}var iR,Jq;function pxe(){if(Jq)return iR;Jq=1;var t=Cp(),e=Gl(),r=t(e,"Promise");return iR=r,iR}var aR,Xq;function yre(){if(Xq)return aR;Xq=1;var t=Cp(),e=Gl(),r=t(e,"Set");return aR=r,aR}var oR,Zq;function gxe(){if(Zq)return oR;Zq=1;var t=Cp(),e=Gl(),r=t(e,"WeakMap");return oR=r,oR}var sR,eH;function mre(){if(eH)return sR;eH=1;var t=hxe(),e=M$(),r=pxe(),n=yre(),i=gxe(),a=Wl(),o=Yte(),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}),sR=b,sR}var cR,tH;function yxe(){if(tH)return cR;tH=1;var t=dre(),e=pre(),r=sxe(),n=dxe(),i=mre(),a=$i(),o=SS(),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 cR=w,cR}var uR,rH;function Y$(){if(rH)return uR;rH=1;var t=yxe(),e=qc();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 uR=r,uR}var lR,nH;function mxe(){if(nH)return lR;nH=1;var t=dre(),e=Y$(),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 lR=i,lR}var fR,iH;function vre(){if(iH)return fR;iH=1;var t=Kl();function e(r){return r===r&&!t(r)}return fR=e,fR}var dR,aH;function vxe(){if(aH)return dR;aH=1;var t=vre(),e=Ql();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 dR=r,dR}var hR,oH;function bre(){if(oH)return hR;oH=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return hR=t,hR}var pR,sH;function bxe(){if(sH)return pR;sH=1;var t=mxe(),e=vxe(),r=bre();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 pR=n,pR}var gR,cH;function wxe(){if(cH)return gR;cH=1;var t=Lw();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return gR=e,gR}var yR,uH;function _xe(){if(uH)return yR;uH=1;function t(e,r){return e!=null&&r in Object(e)}return yR=t,yR}var mR,lH;function wre(){if(lH)return mR;lH=1;var t=kw(),e=AS(),r=$i(),n=OS(),i=G$(),a=fm();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 mR=o,mR}var vR,fH;function _re(){if(fH)return vR;fH=1;var t=_xe(),e=wre();function r(n,i){return n!=null&&e(n,i,t)}return vR=r,vR}var bR,dH;function Exe(){if(dH)return bR;dH=1;var t=Y$(),e=wxe(),r=_re(),n=$$(),i=vre(),a=bre(),o=fm(),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 bR=u,bR}var wR,hH;function xxe(){if(hH)return wR;hH=1;function t(e){return function(r){return r==null?void 0:r[e]}}return wR=t,wR}var _R,pH;function Axe(){if(pH)return _R;pH=1;var t=Lw();function e(r){return function(n){return t(n,r)}}return _R=e,_R}var ER,gH;function Sxe(){if(gH)return ER;gH=1;var t=xxe(),e=Axe(),r=$$(),n=fm();function i(a){return r(a)?t(n(a)):e(a)}return ER=i,ER}var xR,yH;function Td(){if(yH)return xR;yH=1;var t=bxe(),e=Exe(),r=Od(),n=$i(),i=Sxe();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 xR=a,xR}var AR,mH;function Oxe(){if(mH)return AR;mH=1;var t=cre(),e=JEe(),r=Td(),n=$i();function i(a,o){var s=n(a)?t:e;return s(a,r(o,3))}return AR=i,AR}var SR,vH;function Ere(){if(vH)return SR;vH=1;var t=fre(),e=mre(),r=AS(),n=$i(),i=Pd(),a=SS(),o=ure(),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 OR,bH;function xre(){if(bH)return OR;bH=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 OR=t,OR}var IR,wH;function Ixe(){if(wH)return IR;wH=1;function t(e){return e!==e}return IR=t,IR}var PR,_H;function Pxe(){if(_H)return PR;_H=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 PR=t,PR}var TR,EH;function CS(){if(EH)return TR;EH=1;var t=xre(),e=Ixe(),r=Pxe();function n(i,a,o){return a===a?r(i,a,o):t(i,e,o)}return TR=n,TR}var RR,xH;function Q$(){if(xH)return RR;xH=1;var t=CS();function e(r,n){var i=r==null?0:r.length;return!!i&&t(r,n,0)>-1}return RR=e,RR}var CR,AH;function J$(){if(AH)return CR;AH=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 CR=t,CR}var NR,SH;function Txe(){if(SH)return NR;SH=1;var t=TS(),e=Q$(),r=J$(),n=Np(),i=IS(),a=RS(),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 NR=s,NR}var DR,OH;function X$(){if(OH)return DR;OH=1;var t=Pd(),e=qc();function r(n){return e(n)&&t(n)}return DR=r,DR}var $R,IH;function Rxe(){if(IH)return $R;IH=1;var t=X$();function e(r){return t(r)?r:[]}return $R=e,$R}var MR,PH;function Cxe(){if(PH)return MR;PH=1;var t=Np(),e=Txe(),r=Uw(),n=Rxe(),i=r(function(a){var o=t(a,n);return o.length&&o[0]===a[0]?e(o):[]});return MR=i,MR}var kR,TH;function Nxe(){if(TH)return kR;TH=1;var t=Object.prototype,e=t.hasOwnProperty;function r(n,i){return n!=null&&e.call(n,i)}return kR=r,kR}var LR,RH;function Are(){if(RH)return LR;RH=1;var t=Nxe(),e=wre();function r(n,i){return n!=null&&e(n,i,t)}return LR=r,LR}var UR,CH;function Sre(){if(CH)return UR;CH=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 UR=t,UR}var BR,NH;function Dxe(){if(NH)return BR;NH=1;var t=Od();function e(r){return typeof r=="function"?r:t}return BR=e,BR}var FR,DH;function Ore(){if(DH)return FR;DH=1;var t=Sre(),e=Bw(),r=Dxe(),n=$i();function i(a,o){var s=n(a)?t:e;return s(a,r(o))}return FR=i,FR}var jR,$H;function $xe(){return $H||($H=1,jR=Ore()),jR}var MH;function Mxe(){if(MH)return nv;MH=1;var t=br;nv.__esModule=!0,nv.default=void 0;var e=t(Fn()),r=t(LEe()),n=t(jc()),i=t(z$());t(FEe()),t(Oxe()),t(Ere()),t(Ql()),t(Cxe()),t(Are()),t($xe());var a=t(Js()),o=t(ze),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 nv.default=u,nv}var Vu={},qR,kH;function kxe(){if(kH)return qR;kH=1;var t=Td(),e=Pd(),r=Ql();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 qR=n,qR}var HR,LH;function Lxe(){if(LH)return HR;LH=1;var t=xre(),e=Td(),r=xS(),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 HR=i,HR}var zR,UH;function Uxe(){if(UH)return zR;UH=1;var t=kxe(),e=Lxe(),r=t(e);return zR=r,zR}var VR,BH;function Bxe(){if(BH)return VR;BH=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 VR=e,VR}var GR,FH;function Z$(){if(FH)return GR;FH=1;var t=uS(),e=Pd(),r=OS(),n=Kl();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 GR=i,GR}var WR,jH;function Ire(){if(jH)return WR;jH=1;var t=hre(),e=Td(),r=Bxe(),n=$i(),i=Z$();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 WR=a,WR}var qH;function Fxe(){if(qH)return Vu;qH=1;var t=br;Vu.__esModule=!0,Vu.isNil=Vu.findByType=Vu.someByType=void 0;var e=t(Uxe()),r=t(Ire()),n=ze,i=function(c,u){return(0,r.default)(n.Children.toArray(c),{type:u})};Vu.someByType=i;var a=function(c,u){return(0,e.default)(n.Children.toArray(c),{type:u})};Vu.findByType=a;var o=function(c){return c==null||Array.isArray(c)&&c.length===0};return Vu.isNil=o,Vu}var oa={},w0={},HH;function eM(){if(HH)return w0;HH=1,w0.__esModule=!0,w0.numberToWord=e,w0.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"};w0.numberToWordMap=t;function e(r){var n=typeof r;return n==="string"||n==="number"?t[r]||r:""}return w0}var zH;function jxe(){if(zH)return oa;zH=1,oa.__esModule=!0,oa.useWidthProp=oa.useVerticalAlignProp=oa.useTextAlignProp=oa.useMultipleProp=oa.useKeyOrValueAndKey=oa.useValueAndKey=oa.useKeyOnly=void 0;var t=eM(),e=function(u,f){return u&&f};oa.useKeyOnly=e;var r=function(u,f){return u&&u!==!0&&u+" "+f};oa.useValueAndKey=r;var n=function(u,f){return u&&(u===!0?f:u+" "+f)};oa.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(" ")};oa.useMultipleProp=i;var a=function(u){return u==="justified"?"justified":r(u,"aligned")};oa.useTextAlignProp=a;var o=function(u){return r(u,"aligned")};oa.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 oa.useWidthProp=s,oa}var Rn={},KR,VH;function Pre(){if(VH)return KR;VH=1;var t=TS(),e=Q$(),r=J$(),n=Np(),i=IS(),a=RS(),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 KR=s,KR}var YR,GH;function qxe(){if(GH)return YR;GH=1;var t=Mw(),e=AS(),r=$i(),n=t?t.isConcatSpreadable:void 0;function i(a){return r(a)||e(a)||!!(n&&a&&a[n])}return YR=i,YR}var QR,WH;function tM(){if(WH)return QR;WH=1;var t=gre(),e=qxe();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 QR=r,QR}var JR,KH;function Hxe(){if(KH)return JR;KH=1;var t=Pre(),e=tM(),r=Uw(),n=X$(),i=r(function(a,o){return n(a)?t(a,e(o,1,n,!0)):[]});return JR=i,JR}var XR,YH;function zxe(){if(YH)return XR;YH=1;var t=F$();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 XR=e,XR}var ZR,QH;function Vxe(){if(QH)return ZR;QH=1;var t=CS();function e(r,n){for(var i=r.length;i--&&t(n,r[i],0)>-1;);return i}return ZR=e,ZR}var eC,JH;function Gxe(){if(JH)return eC;JH=1;var t=CS();function e(r,n){for(var i=-1,a=r.length;++i<a&&t(n,r[i],0)>-1;);return i}return eC=e,eC}var tC,XH;function Wxe(){if(XH)return tC;XH=1;function t(e){return e.split("")}return tC=t,tC}var rC,ZH;function Kxe(){if(ZH)return rC;ZH=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 rC=c,rC}var nC,ez;function Yxe(){if(ez)return nC;ez=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 nC=x,nC}var iC,tz;function Qxe(){if(tz)return iC;tz=1;var t=Wxe(),e=Kxe(),r=Yxe();function n(i){return e(i)?r(i):t(i)}return iC=n,iC}var aC,rz;function Jxe(){if(rz)return aC;rz=1;var t=U$(),e=ore(),r=zxe(),n=Vxe(),i=Gxe(),a=Qxe(),o=B$();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 aC=s,aC}var oC,nz;function Xxe(){if(nz)return oC;nz=1;var t=Xte();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return oC=e,oC}var sC,iz;function Zxe(){if(iz)return sC;iz=1;var t=Xxe(),e=uS(),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 sC=i,sC}var cC,az;function eAe(){if(az)return cC;az=1;var t=Zxe(),e=kw(),r=OS(),n=Kl(),i=fm();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 cC=a,cC}var uC,oz;function tAe(){if(oz)return uC;oz=1;var t=Lw(),e=eAe(),r=kw();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 uC=n,uC}var lC,sz;function rAe(){if(sz)return lC;sz=1;var t=tAe(),e=_re();function r(n,i){return t(n,i,function(a,o){return e(n,o)})}return lC=r,lC}var fC,cz;function nAe(){if(cz)return fC;cz=1;var t=tM();function e(r){var n=r==null?0:r.length;return n?t(r,1):[]}return fC=e,fC}var dC,uz;function iAe(){if(uz)return dC;uz=1;var t=nAe(),e=Qte(),r=Zte();function n(i){return r(e(i,void 0,t),i+"")}return dC=n,dC}var hC,lz;function rM(){if(lz)return hC;lz=1;var t=rAe(),e=iAe(),r=e(function(n,i){return n==null?{}:t(n,i)});return hC=r,hC}var pC,fz;function Tre(){if(fz)return pC;fz=1;var t=lre(),e=t(Object.getPrototypeOf,Object);return pC=e,pC}var gC,dz;function NS(){if(dz)return gC;dz=1;var t=Wl(),e=Tre(),r=qc(),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 gC=u,gC}var yC,hz;function aAe(){if(hz)return yC;hz=1;var t=lm();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 yC=e,yC}var mC,pz;function oAe(){if(pz)return mC;pz=1;function t(e,r){return e<r}return mC=t,mC}var vC,gz;function sAe(){if(gz)return vC;gz=1;var t=aAe(),e=oAe(),r=Od();function n(i){return i&&i.length?t(i,r,e):void 0}return vC=n,vC}var bC,yz;function cAe(){if(yz)return bC;yz=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 bC=t,bC}var wC,mz;function uAe(){if(mz)return wC;mz=1;var t=cAe(),e=Od();function r(n){return n&&n.length?t(n,e):0}return wC=r,wC}var _C,vz;function Rre(){if(vz)return _C;vz=1;var t=Bw(),e=Pd();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 _C=r,_C}var EC,bz;function DS(){if(bz)return EC;bz=1;var t=Np(),e=Td(),r=Rre(),n=$i();function i(a,o){var s=n(a)?t:r;return s(a,e(o,3))}return EC=i,EC}var xC,wz;function lAe(){if(wz)return xC;wz=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return xC=t,xC}var AC,_z;function fAe(){if(_z)return AC;_z=1;var t=lm();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 AC=e,AC}var SC,Ez;function dAe(){if(Ez)return SC;Ez=1;var t=fAe();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 OC,xz;function hAe(){if(xz)return OC;xz=1;var t=Np(),e=Lw(),r=Td(),n=Rre(),i=lAe(),a=IS(),o=dAe(),s=Od(),c=$i();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 OC=u,OC}var IC,Az;function pAe(){if(Az)return IC;Az=1;var t=tM(),e=hAe(),r=Uw(),n=Z$(),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 IC=i,IC}var PC,Sz;function gAe(){if(Sz)return PC;Sz=1;var t=F$(),e=xS();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 PC=r,PC}var iv={},Oz;function Cre(){if(Oz)return iv;Oz=1,iv.__esModule=!0,iv.default=void 0;var t=function(){return 0},e=t;return iv.default=e,iv}var Iz;function yAe(){if(Iz)return Rn;Iz=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(Hxe()),r=t(Jxe()),n=t(Kl()),i=t(rM()),a=t(Ql()),o=t(NS()),s=t(Yl()),c=t(sAe()),u=t(uAe()),f=t(DS()),d=t(pAe()),g=t(gAe()),m=t(L$()),w=t(Un()),v=t(Cre()),y=function(){var U;return(U=Object.prototype.toString).call.apply(U,arguments)},_=function(U,Y){if(U[Y]!==void 0&&!(typeof Element>"u")&&!(U[Y]instanceof Element))return new Error('Invalid prop "'+Y+'" 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 Y=(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=Y($);if(!k.some(function(M){return M.score===0}))return new Error(["Invalid prop `"+j+"` of value `"+$+"` supplied to `"+z+"`.",`
79
+
80
+ Instead of \``+$+"`, did you mean:",k.map(function(M){return`
81
+ - `+M.suggestion}).join(""),`
82
+ `].join(""))}}}};Rn.suggest=b;var S=function(U){return function(Y,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)(Y[ne])||Y[ne]===!1)){var j=U.reduce(function(z,$){return!(0,s.default)(Y[$])&&Y[$]!==!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(Y,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,[Y,ne,F].concat(z));M&&H.push(M)}),H[0]}};Rn.every=x;var O=function(U,Y){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 Y!="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=Y.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(Y,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(Y[ne]!==void 0){var j=U.filter(function(z){return Y[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(Y,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=Y[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,Y){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),Y)if(typeof Y=="function"){for(var $=arguments.length,H=new Array($>3?$-3:0),k=3;k<$;k++)H[k-3]=arguments[k];var M=Y.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 av={},pE={exports:{}},ov={},TC={exports:{}};/*!
83
+ Copyright (c) 2015 Jed Watson.
84
+ Based on code that is Copyright 2013-2015, Facebook, Inc.
85
+ All rights reserved.
86
+ */var Pz;function mAe(){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})()}(TC)),TC.exports}var Tz;function vAe(){if(Tz)return ov;Tz=1,Object.defineProperty(ov,"__esModule",{value:!0});var t=mAe();Un();var e=ze;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={},ov.instance=x,ov.default=O,ov}var Rz;function nM(){if(Rz)return pE.exports;Rz=1;var t;return t=vAe(),pE.exports=t.default,pE.exports.instance=t.instance,pE.exports}var Cz;function bAe(){if(Cz)return av;Cz=1,av.__esModule=!0,av.default=void 0;var t=nM(),e=t.instance;return av.default=e,av}var sa={},RC,Nz;function wAe(){if(Nz)return RC;Nz=1;function t(){}return RC=t,RC}var CC,Dz;function _Ae(){if(Dz)return CC;Dz=1;var t=yre(),e=wAe(),r=K$(),n=1/0,i=t&&1/r(new t([,-0]))[1]==n?function(a){return new t(a)}:e;return CC=i,CC}var NC,$z;function EAe(){if($z)return NC;$z=1;var t=TS(),e=Q$(),r=J$(),n=RS(),i=_Ae(),a=K$(),o=200;function s(c,u,f){var d=-1,g=e,m=c.length,w=!0,v=[],y=v;if(f)w=!1,g=r;else if(m>=o){var _=u?null:i(c);if(_)return a(_);w=!1,g=n,y=new t}else y=u?[]:v;e:for(;++d<m;){var b=c[d],S=u?u(b):b;if(b=f||b!==0?b:0,w&&S===S){for(var x=y.length;x--;)if(y[x]===S)continue e;u&&y.push(S),v.push(b)}else g(y,S,f)||(y!==v&&y.push(S),v.push(b))}return v}return NC=s,NC}var DC,Mz;function Nre(){if(Mz)return DC;Mz=1;var t=EAe();function e(r){return r&&r.length?t(r):[]}return DC=e,DC}var $C,kz;function xAe(){if(kz)return $C;kz=1;var t=Wl(),e=qc(),r="[object Number]";function n(i){return typeof i=="number"||e(i)&&t(i)==r}return $C=n,$C}var MC,Lz;function Dre(){if(Lz)return MC;Lz=1;var t=Wl(),e=$i(),r=qc(),n="[object String]";function i(a){return typeof a=="string"||!e(a)&&r(a)&&t(a)==n}return MC=i,MC}var kC,Uz;function AAe(){if(Uz)return kC;Uz=1;var t=Wl(),e=qc(),r="[object Boolean]";function n(i){return i===!0||i===!1||e(i)&&t(i)==r}return kC=n,kC}var Bz;function SAe(){if(Bz)return sa;Bz=1;var t=Qs,e=br;sa.__esModule=!0,sa.createShorthand=m,sa.createShorthandFactory=w,sa.createHTMLParagraph=sa.createHTMLLabel=sa.createHTMLInput=sa.createHTMLImage=sa.createHTMLIframe=sa.createHTMLDivision=void 0;var r=e(Fn()),n=e(Nre()),i=e($i()),a=e(NS()),o=e(sS()),s=e(xAe()),c=e(Dre()),u=e(AAe()),f=e(Yl()),d=e(ai),g=t(ze);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,Y=U.defaultProps,ne=Y===void 0?{}:Y,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}});sa.createHTMLDivision=v;var y=w("iframe",function(O){return{src:O}});sa.createHTMLIframe=y;var _=w("img",function(O){return{src:O}});sa.createHTMLImage=_;var b=w("input",function(O){return{type:O}});sa.createHTMLInput=b;var S=w("label",function(O){return{children:O}});sa.createHTMLLabel=S;var x=w("p",function(O){return{children:O}});return sa.createHTMLParagraph=x,sa}var sv={},Fz;function OAe(){if(Fz)return sv;Fz=1,sv.__esModule=!0,sv.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 sv.default=e,sv}var cv={},jz;function IAe(){if(jz)return cv;jz=1,cv.__esModule=!0,cv.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 cv.default=e,cv}var Go={},LC,qz;function PAe(){if(qz)return LC;qz=1;var t=Np();function e(r,n){return t(n,function(i){return r[i]})}return LC=e,LC}var UC,Hz;function $re(){if(Hz)return UC;Hz=1;var t=PAe(),e=Ql();function r(n){return n==null?[]:t(n,e(n))}return UC=r,UC}var BC,zz;function iM(){if(zz)return BC;zz=1;var t=CS(),e=Pd(),r=Dre(),n=xS(),i=$re(),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 BC=o,BC}var Vz;function TAe(){if(Vz)return Go;Vz=1;var t=br;Go.__esModule=!0,Go.partitionHTMLProps=Go.htmlImageProps=Go.htmlInputProps=Go.htmlInputEvents=Go.htmlInputAttrs=void 0;var e=t(iM()),r=t(Ore()),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"];Go.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"];Go.htmlInputEvents=i;var a=[].concat(n,i);Go.htmlInputProps=a;var o=["alt","height","src","srcSet","width","loading"];Go.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 Go.partitionHTMLProps=s,Go}var uv={},Gz;function Mre(){if(Gz)return uv;Gz=1;var t=br;uv.__esModule=!0,uv.default=void 0;var e=t(Yl()),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 uv.default=a,uv}var lv={},FC,Wz;function RAe(){if(Wz)return FC;Wz=1;var t=Math.max,e=Math.min;function r(n,i,a){return n>=e(i,a)&&n<t(i,a)}return FC=r,FC}var jC,Kz;function CAe(){if(Kz)return jC;Kz=1;var t=RAe(),e=V$(),r=sre();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 jC=n,jC}var qC,Yz;function NAe(){if(Yz)return qC;Yz=1;function t(e){return e&&e.length?e[0]:void 0}return qC=t,qC}var HC,Qz;function DAe(){return Qz||(Qz=1,HC=NAe()),HC}var Jz;function $Ae(){if(Jz)return lv;Jz=1;var t=br;lv.__esModule=!0,lv.default=void 0;var e=t(CAe()),r=t(DAe()),n=t(Js()),i=t(Yl()),a=t(Ire()),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 lv.default=s,lv}var gE={},fv={},Qa={},Xz;function kre(){if(Xz)return Qa;Xz=1,Qa.__esModule=!0,Qa.createLastItem=Qa.createNextItem=Qa.createPageFactory=Qa.createPrevItem=Qa.createFirstPage=Qa.createEllipsisItem=void 0;var t=function(s){return{active:!1,type:"ellipsisItem",value:s}};Qa.createEllipsisItem=t;var e=function(){return{active:!1,type:"firstItem",value:1}};Qa.createFirstPage=e;var r=function(s){return{active:!1,type:"prevItem",value:Math.max(1,s-1)}};Qa.createPrevItem=r;var n=function(s){return function(c){return{active:s===c,type:"pageItem",value:c}}};Qa.createPageFactory=n;var i=function(s,c){return{active:!1,type:"nextItem",value:Math.min(s+1,c)}};Qa.createNextItem=i;var a=function(s){return{active:!1,type:"lastItem",value:s}};return Qa.createLastItem=a,Qa}var rh={},zC,Zz;function MAe(){if(Zz)return zC;Zz=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 zC=r,zC}var VC,eV;function kAe(){if(eV)return VC;eV=1;var t=MAe(),e=Z$(),r=V$();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 VC=n,VC}var GC,tV;function LAe(){if(tV)return GC;tV=1;var t=kAe(),e=t();return GC=e,GC}var nh={},rV;function UAe(){if(rV)return nh;rV=1,nh.__esModule=!0,nh.createInnerSuffix=nh.createInnerPrefix=void 0;var t=kre(),e=function(i,a,o){var s=a-1,c=s!==i+1,u=c?t.createEllipsisItem:o;return u(s)};nh.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 nh.createInnerSuffix=r,nh}var nV;function BAe(){if(nV)return rh;nV=1;var t=br;rh.__esModule=!0,rh.createComplexRange=rh.createSimpleRange=void 0;var e=t(LAe()),r=t(DS()),n=UAe(),i=function(s,c,u){return(0,r.default)((0,e.default)(s,c+1),u)};rh.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 rh.createComplexRange=a,rh}var ih={},iV;function FAe(){if(iV)return ih;iV=1,ih.__esModule=!0,ih.typifyOptions=ih.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};ih.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 ih.typifyOptions=e,ih}var aV;function jAe(){if(aV)return fv;aV=1,fv.__esModule=!0,fv.default=void 0;var t=kre(),e=BAe(),r=FAe(),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 fv.default=i,fv}var oV;function qAe(){if(oV)return gE;oV=1;var t=br;gE.__esModule=!0;var e=t(jAe());return gE.default=e.default,gE}var mt={},sV;function HAe(){if(sV)return mt;sV=1;var t=br;mt.__esModule=!0,mt.ALL_ICONS_IN_ALL_CONTEXTS=mt.COMPONENT_CONTEXT_SPECIFIC_ICONS=mt.ICONS_AND_ALIASES=mt.ICON_ALIASES=mt.ICONS=mt.BRANDS=mt.WRITING=mt.VEHICLES=mt.USERS_PEOPLE=mt.STATUS=mt.SPORTS=mt.SPINNERS=mt.SHAPES=mt.PAYMENTS_SHOPPING=mt.OBJECTS=mt.MEDICAL=mt.MAPS=mt.LOGISTICS=mt.INTERFACES=mt.IMAGES=mt.HEALTH=mt.HANDS_GESTURES=mt.GENDERS=mt.FILES=mt.EDITORS=mt.DESIGN=mt.DATE_TIME=mt.CURRENCY=mt.COMPUTERS=mt.COMMUNICATION=mt.CODE=mt.CHESS=mt.BUSINESS=mt.AUDIO_VIDEO=mt.ARROWS=mt.ACCESSIBILITY=mt.TRANSITIONS=mt.STATIC_TRANSITIONS=mt.DIRECTIONAL_TRANSITIONS=mt.WIDTHS=mt.VISIBILITY=mt.VERTICAL_ALIGNMENTS=mt.TEXT_ALIGNMENTS=mt.SIZES=mt.FLOATS=mt.COLORS=void 0;var e=t(Nre()),r=t($re()),n=t(Ql()),i=eM(),a=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","black"];mt.COLORS=a;var o=["left","right"];mt.FLOATS=o;var s=["mini","tiny","small","medium","large","big","huge","massive"];mt.SIZES=s;var c=["left","center","right","justified"];mt.TEXT_ALIGNMENTS=c;var u=["bottom","middle","top"];mt.VERTICAL_ALIGNMENTS=u;var f=["mobile","tablet","computer","large screen","widescreen"];mt.VISIBILITY=f;var d=[].concat((0,n.default)(i.numberToWordMap),(0,n.default)(i.numberToWordMap).map(Number),(0,r.default)(i.numberToWordMap));mt.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"];mt.DIRECTIONAL_TRANSITIONS=g;var m=["jiggle","flash","shake","pulse","tada","bounce","glow"];mt.STATIC_TRANSITIONS=m;var w=[].concat(g,m);mt.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"];mt.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"];mt.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"];mt.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"];mt.BUSINESS=b;var S=["chess","chess bishop","chess board","chess king","chess knight","chess pawn","chess queen","chess rook","square full"];mt.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"];mt.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"];mt.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"];mt.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"];mt.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"];mt.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"];mt.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"];mt.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"];mt.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"];mt.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"];mt.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"];mt.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"];mt.IMAGES=U;var Y=["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"];mt.INTERFACES=Y;var ne=["box","boxes","clipboard check","clipboard list","dolly","dolly flatbed","pallet","shipping fast","truck","warehouse"];mt.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"];mt.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"];mt.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"];mt.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"];mt.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"];mt.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"];mt.SPINNERS=k;var M=["baseball ball","basketball ball","bowling ball","football ball","futbol","futbol outline","golf ball","hockey puck","quidditch","table tennis","volleyball ball"];mt.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"];mt.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"];mt.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"];mt.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"];mt.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"];mt.BRANDS=ce;var T=(0,e.default)([].concat(v,y,_,b,S,x,O,E,p,I,C,L,q,le,pe,B,U,Y,ne,F,j,z,$,H,k,M,G,ge,Q,te,ce));mt.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"];mt.ICON_ALIASES=fe;var Ve=(0,e.default)([].concat(T,fe));mt.ICONS_AND_ALIASES=Ve;var tt=["left dropdown"];mt.COMPONENT_CONTEXT_SPECIFIC_ICONS=tt;var vt=(0,e.default)([].concat(Ve,tt));return mt.ALL_ICONS_IN_ALL_CONTEXTS=vt,mt}var dv={},cV;function zAe(){if(cV)return dv;cV=1,dv.__esModule=!0,dv.default=void 0;var t=function(r){return typeof r=="number"||typeof r=="string"?[r,r]:r};return dv.default=t,dv}var hv={},uV;function VAe(){if(uV)return hv;uV=1,hv.__esModule=!0,hv.default=void 0;var t=function(r,n){return typeof r=="number"||typeof r=="string"?r:r[n]};return hv.default=t,hv}var pv={},WC,lV;function GAe(){if(lV)return WC;lV=1;var t=Y$();function e(r,n){return t(r,n)}return WC=e,WC}var KC,fV;function WAe(){if(fV)return KC;fV=1;var t=Kl(),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 KC=r,KC}var YC,dV;function KAe(){if(dV)return YC;dV=1;var t=Sre(),e=WAe(),r=W$(),n=Td(),i=Tre(),a=$i(),o=SS(),s=sS(),c=Kl(),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 YC=f,YC}var hV;function YAe(){if(hV)return pv;hV=1;var t=br;pv.__esModule=!0,pv.default=void 0;var e=t(GAe()),r=t(Are()),n=t(KAe()),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 pv.default=i,pv}var Qc={},gv={},pV;function QAe(){if(pV)return gv;pV=1;var t=br;gv.__esModule=!0,gv.default=void 0;var e=t(ze),r=t(Mre()),n=(0,r.default)()?e.default.useLayoutEffect:e.default.useEffect,i=n;return gv.default=i,gv}var gV;function JAe(){if(gV)return Qc;gV=1;var t=br;Qc.__esModule=!0,Qc.computeClassNames=a,Qc.computeClassNamesDifference=o,Qc.default=d,Qc.NodeRegistry=Qc.handleClassNamesChange=void 0;var e=Id,r=t(ze),n=t(QAe()),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)};Qc.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};Qc.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 Qc}var yV;function Kn(){return yV||(yV=1,function(t){var e=Qs,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(Mxe());t.ModernAutoControlledComponent=i.default;var a=e(Fxe());t.childrenUtils=a;var o=jxe();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(yAe());t.customPropTypes=s;var c=r(bAe());t.eventStack=c.default;var u=SAe();Object.keys(u).forEach(function(p){p==="default"||p==="__esModule"||Object.prototype.hasOwnProperty.call(n,p)||(t[p]=u[p])});var f=r(OAe());t.getUnhandledProps=f.default;var d=r(IAe());t.getElementType=d.default;var g=TAe();t.htmlInputAttrs=g.htmlInputAttrs,t.htmlInputEvents=g.htmlInputEvents,t.htmlInputProps=g.htmlInputProps,t.htmlImageProps=g.htmlImageProps,t.partitionHTMLProps=g.partitionHTMLProps;var m=r(Mre());t.isBrowser=m.default;var w=r($Ae());t.doesNodeContainClick=w.default;var v=r(Cre());t.leven=v.default;var y=r(qAe());t.createPaginationItems=y.default;var _=e(HAe());t.SUI=_;var b=eM();t.numberToWordMap=b.numberToWordMap,t.numberToWord=b.numberToWord;var S=r(zAe());t.normalizeOffset=S.default;var x=r(VAe());t.normalizeTransitionDuration=x.default;var O=r(YAe());t.objectDiff=O.default;var E=r(JAe());t.useClassNamesOnNode=E.default}(rT)),rT}var yv={},QC,mV;function aM(){if(mV)return QC;mV=1;var t=Pre(),e=Uw(),r=X$(),n=e(function(i,a){return r(i)?t(i,a):[]});return QC=n,QC}var mv={},vV;function XAe(){if(vV)return mv;vV=1;var t=br;mv.__esModule=!0,mv.default=void 0;var e=t(Fn());t(aM());var r=t(ai);t(Un());var n=t(ze),i=Kn();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 mv.default=o,mv}var bV;function $S(){if(bV)return yv;bV=1;var t=Qs,e=br;yv.__esModule=!0,yv.default=void 0;var r=e(Fn()),n=e(jc());e(aM());var i=e(Js()),a=e(Yl()),o=e(ai);e(Un());var s=t(ze),c=Kn(),u=e(XAe()),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),Y=(0,c.getUnhandledProps)(m,this.props),ne=(0,c.getElementType)(m,this.props),F=this.getIconAriaOptions();return s.default.createElement(ne,(0,r.default)({},Y,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 yv.default=d,yv}var vv={},bv={},yE={},wv={},mE={},_v={},JC,wV;function ZAe(){if(wV)return JC;wV=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["]"],JC=a,JC}var vE={},XC={exports:{}},In={};/**
87
+ * @license React
88
+ * react-is.production.min.js
89
+ *
90
+ * Copyright (c) Facebook, Inc. and its affiliates.
91
+ *
92
+ * This source code is licensed under the MIT license found in the
93
+ * LICENSE file in the root directory of this source tree.
94
+ */var _V;function e2e(){if(_V)return In;_V=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 EV;function t2e(){return EV||(EV=1,XC.exports=e2e()),XC.exports}var xV;function r2e(){if(xV)return vE;xV=1;var t=Qs,e=br;vE.__esModule=!0,vE.default=i;var r=e(ze),n=t(t2e());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 vE}var Ev={},AV;function n2e(){if(AV)return Ev;AV=1;var t=Qs,e=br;Ev.__esModule=!0,Ev.default=void 0;var r=e(jc()),n=e(Js()),i=Id;e(Un());var a=t(ze),o=E1,s=Kn(),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 Ev.default=u,Ev}var SV;function i2e(){if(SV)return _v;SV=1;var t=br;_v.__esModule=!0,_v.default=void 0;var e=t(Fn()),r=t(jc()),n=t(Js()),i=t(nM()),a=Id,o=t(ZAe());t(Un());var s=t(ze),c=Kn();t(r2e());var u=t(n2e()),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 _v.default=d,_v}var OV;function oM(){if(OV)return mE;OV=1;var t=br;mE.__esModule=!0;var e=t(i2e());return mE.default=e.default,mE}var xv={},IV;function a2e(){if(IV)return xv;IV=1;var t=br;xv.__esModule=!0,xv.default=void 0;var e=t(Fn()),r=t(ai);t(Un());var n=t(ze),i=Kn();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 xv.default=o,xv}var Av={},PV;function o2e(){if(PV)return Av;PV=1;var t=Qs,e=br;Av.__esModule=!0,Av.default=void 0;var r=e(Fn()),n=e(jc()),i=e(Js()),a=Id,o=e(ai);e(Un());var s=t(ze),c=Kn(),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 Av.default=u,u.handledProps=["active","as","children","className","content","disabled","inverted","onClick","onClickOutside","page","simple","verticalAlign"],u.propTypes={},Av}var TV;function s2e(){if(TV)return wv;TV=1;var t=Qs,e=br;wv.__esModule=!0,wv.default=void 0;var r=e(Fn()),n=e(jc());e(Un());var i=t(ze),a=Kn(),o=e(oM()),s=e(a2e()),c=e(o2e()),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 wv.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}}),wv}var RV;function c2e(){if(RV)return yE;RV=1;var t=br;yE.__esModule=!0;var e=t(s2e());return yE.default=e.default,yE}var Sv={},CV;function u2e(){if(CV)return Sv;CV=1;var t=br;Sv.__esModule=!0,Sv.default=void 0;var e=t(Fn()),r=t(ai);t(Un());var n=t(ze),i=Kn();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 Sv.default=o,Sv}var NV;function l2e(){if(NV)return bv;NV=1;var t=br;bv.__esModule=!0,bv.default=void 0;var e=t(Fn()),r=t(Yl()),n=t(ai);t(Un());var i=t(ze),a=Kn(),o=t(c2e()),s=t(Lre()),c=t(u2e());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,Y=d.ui,ne=(0,n.default)((0,a.useKeyOnly)(Y,"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 bv.default=f,bv}var Ov={},DV;function f2e(){if(DV)return Ov;DV=1;var t=br;Ov.__esModule=!0,Ov.default=void 0;var e=t(Fn()),r=t(ai);t(Un());var n=t(ze),i=Kn();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 Ov.default=o,Ov}var Iv={},$V;function d2e(){if($V)return Iv;$V=1;var t=br;Iv.__esModule=!0,Iv.default=void 0;var e=t(Fn()),r=t(ai);t(Un());var n=t(ze),i=Kn();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 Iv.default=o,Iv}var MV;function Lre(){if(MV)return vv;MV=1;var t=Qs,e=br;vv.__esModule=!0,vv.default=void 0;var r=e(Fn()),n=e(jc()),i=e(z$()),a=e(Js()),o=e(ai);e(Un());var s=t(ze),c=Kn(),u=e($S()),f=e(l2e()),d=e(f2e()),g=e(d2e()),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,Y=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(Y,{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 vv.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}}),vv}var Pv={},kV;function h2e(){if(kV)return Pv;kV=1;var t=br;Pv.__esModule=!0,Pv.default=void 0;var e=t(Fn()),r=t(ai);t(Un());var n=t(ze),i=Kn();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 Pv.default=o,Pv}var Tv={},LV;function p2e(){if(LV)return Tv;LV=1;var t=br;Tv.__esModule=!0,Tv.default=void 0;var e=t(Fn()),r=t(DS()),n=t(Yl()),i=t(ai);t(Un());var a=t(ze),o=Kn(),s=t(sM());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,Y=(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:Y}),o.childrenUtils.isNil(w)?b:w):a.default.createElement(F,(0,e.default)({},ne,{className:Y}),(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 Tv.default=u,Tv}var Rv={},UV;function g2e(){if(UV)return Rv;UV=1;var t=br;Rv.__esModule=!0,Rv.default=void 0;var e=t(Fn()),r=t(ai);t(Un());var n=t(ze),i=Kn();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 Rv.default=o,Rv}var BV;function sM(){if(BV)return rv;BV=1;var t=Qs,e=br;rv.__esModule=!0,rv.default=void 0;var r=e(Fn()),n=e(jc()),i=e(Js()),a=e(Yl()),o=Id,s=e(ai);e(Un());var c=t(ze),u=Kn(),f=e($S()),d=e(Lre()),g=e(h2e()),m=e(p2e()),w=e(g2e()),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,Y=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")),Ve=(0,s.default)((0,u.useKeyOrValueAndKey)(H||!!$,"labeled")),tt=(0,s.default)((0,u.useKeyOnly)(Y,"disabled"),(0,u.useValueAndKey)(ne,"floated")),vt=(0,u.getUnhandledProps)(b,this.props),bt=(0,u.getElementType)(b,this.props,this.computeElementType),yt=this.computeTabIndex(bt);if(!(0,a.default)($)){var Lt=(0,s.default)("ui",fe,"button",le),Yt=(0,s.default)("ui",Ve,"button",le,tt),wr=d.default.create($,{defaultProps:{basic:!0,pointing:H==="left"?"right":"left"},autoGenerateKey:!1});return c.default.createElement(bt,(0,r.default)({},vt,{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:Y,type:T,tabIndex:yt},f.default.create(j,{autoGenerateKey:!1})," ",U)),(H==="right"||!H)&&wr)}var Rt=(0,s.default)("ui",fe,tt,Ve,"button",le),Pt=!u.childrenUtils.isNil(L),kt=this.computeButtonAriaRole(bt);return c.default.createElement(o.Ref,{innerRef:this.ref},c.default.createElement(bt,(0,r.default)({},vt,{className:Rt,"aria-pressed":ce?!!E:void 0,disabled:Y&&bt==="button"||void 0,onClick:this.handleClick,role:kt,type:T,tabIndex:yt}),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 rv.default=y,rv}(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=sM();Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return e(r).default}})})(Ls);var Dc={},ky={},ZC={},Ct={},e4={exports:{}},Ure={},js={},Ly={},dm={},Pr={},Uy={};(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})(Uy);var t4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Uy;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})(t4);(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=Uy,r=t4;var n=Uy;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=t4;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 _(Y(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?`
95
+ `:""},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 Y(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,e._)`!${H(k)}`}t.not=Y;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=Uy;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 Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});const Oa=Pr,y2e={data:new Oa.Name("data"),valCxt:new Oa.Name("valCxt"),instancePath:new Oa.Name("instancePath"),parentData:new Oa.Name("parentData"),parentDataProperty:new Oa.Name("parentDataProperty"),rootData:new Oa.Name("rootData"),dynamicAnchors:new Oa.Name("dynamicAnchors"),vErrors:new Oa.Name("vErrors"),errors:new Oa.Name("errors"),this:new Oa.Name("this"),self:new Oa.Name("self"),scope:new Oa.Name("scope"),json:new Oa.Name("json"),jsonPos:new Oa.Name("jsonPos"),jsonLen:new Oa.Name("jsonLen"),jsonPart:new Oa.Name("jsonPart")};Hc.default=y2e;(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=Hc;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])}})(dm);Object.defineProperty(Ly,"__esModule",{value:!0});Ly.boolOrEmptySchema=Ly.topBoolOrEmptySchema=void 0;const m2e=dm,v2e=Pr,b2e=Hc,w2e={message:"boolean schema is false"};function _2e(t){const{gen:e,schema:r,validateName:n}=t;r===!1?Bre(t,!1):typeof r=="object"&&r.$async===!0?e.return(b2e.default.data):(e.assign((0,v2e._)`${n}.errors`,null),e.return(!0))}Ly.topBoolOrEmptySchema=_2e;function E2e(t,e){const{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Bre(t)):r.var(e,!0)}Ly.boolOrEmptySchema=E2e;function Bre(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,m2e.reportError)(i,w2e,void 0,e)}var Fw={},wp={};Object.defineProperty(wp,"__esModule",{value:!0});wp.getRules=wp.isJSONType=void 0;const x2e=["string","number","integer","boolean","null","object","array"],A2e=new Set(x2e);function S2e(t){return typeof t=="string"&&A2e.has(t)}wp.isJSONType=S2e;function O2e(){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:{}}}wp.getRules=O2e;var Dl={};Object.defineProperty(Dl,"__esModule",{value:!0});Dl.shouldUseRule=Dl.shouldUseGroup=Dl.schemaHasRulesForType=void 0;function I2e({schema:t,self:e},r){const n=e.RULES.types[r];return n&&n!==!0&&Fre(t,n)}Dl.schemaHasRulesForType=I2e;function Fre(t,e){return e.rules.some(r=>jre(t,r))}Dl.shouldUseGroup=Fre;function jre(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))}Dl.shouldUseRule=jre;(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=wp,r=Dl,n=dm,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
96
+ || (${C} == "string" && ${p} && ${p} == +${p})`).assign(L,(0,i._)`+${p}`);return;case"integer":E.elseIf((0,i._)`${C} === "boolean" || ${p} === null
97
+ || (${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"
98
+ || ${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}}})(Fw);var MS={};Object.defineProperty(MS,"__esModule",{value:!0});MS.assignDefaults=void 0;const _0=Pr,P2e=pn;function T2e(t,e){const{properties:r,items:n}=t.schema;if(e==="object"&&r)for(const i in r)FV(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,a)=>FV(t,a,i.default))}MS.assignDefaults=T2e;function FV(t,e,r){const{gen:n,compositeRule:i,data:a,opts:o}=t;if(r===void 0)return;const s=(0,_0._)`${a}${(0,_0.getProperty)(e)}`;if(i){(0,P2e.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,_0._)`${s} === undefined`;o.useDefaults==="empty"&&(c=(0,_0._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,_0._)`${s} = ${(0,_0.stringify)(r)}`)}var bu={},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 Xn=Pr,cM=pn,yf=Hc,R2e=pn;function C2e(t,e){const{gen:r,data:n,it:i}=t;r.if(lM(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Xn._)`${e}`},!0),t.error()})}Kr.checkReportMissingProp=C2e;function N2e({gen:t,data:e,it:{opts:r}},n,i){return(0,Xn.or)(...n.map(a=>(0,Xn.and)(lM(t,e,a,r.ownProperties),(0,Xn._)`${i} = ${a}`)))}Kr.checkMissingProp=N2e;function D2e(t,e){t.setParams({missingProperty:e},!0),t.error()}Kr.reportMissingProp=D2e;function qre(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Xn._)`Object.prototype.hasOwnProperty`})}Kr.hasPropFunc=qre;function uM(t,e,r){return(0,Xn._)`${qre(t)}.call(${e}, ${r})`}Kr.isOwnProperty=uM;function $2e(t,e,r,n){const i=(0,Xn._)`${e}${(0,Xn.getProperty)(r)} !== undefined`;return n?(0,Xn._)`${i} && ${uM(t,e,r)}`:i}Kr.propertyInData=$2e;function lM(t,e,r,n){const i=(0,Xn._)`${e}${(0,Xn.getProperty)(r)} === undefined`;return n?(0,Xn.or)(i,(0,Xn.not)(uM(t,e,r))):i}Kr.noPropertyInData=lM;function Hre(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Kr.allSchemaProperties=Hre;function M2e(t,e){return Hre(e).filter(r=>!(0,cM.alwaysValidSchema)(t,e[r]))}Kr.schemaProperties=M2e;function k2e({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:o},s,c,u){const f=u?(0,Xn._)`${t}, ${e}, ${n}${i}`:e,d=[[yf.default.instancePath,(0,Xn.strConcat)(yf.default.instancePath,a)],[yf.default.parentData,o.parentData],[yf.default.parentDataProperty,o.parentDataProperty],[yf.default.rootData,yf.default.rootData]];o.opts.dynamicRef&&d.push([yf.default.dynamicAnchors,yf.default.dynamicAnchors]);const g=(0,Xn._)`${f}, ${r.object(...d)}`;return c!==Xn.nil?(0,Xn._)`${s}.call(${c}, ${g})`:(0,Xn._)`${s}(${g})`}Kr.callValidateCode=k2e;const L2e=(0,Xn._)`new RegExp`;function U2e({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,Xn._)`${i.code==="new RegExp"?L2e:(0,R2e.useFunc)(t,i)}(${r}, ${n})`})}Kr.usePattern=U2e;function B2e(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,Xn._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:cM.Type.Num},a),e.if((0,Xn.not)(a),s)})}}Kr.validateArray=B2e;function F2e(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,cM.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,Xn._)`${o} || ${s}`),t.mergeValidEvaluated(f,s)||e.if((0,Xn.not)(o))})),t.result(o,()=>t.reset(),()=>t.error(!0))}Kr.validateUnion=F2e;Object.defineProperty(bu,"__esModule",{value:!0});bu.validateKeywordUsage=bu.validSchemaType=bu.funcKeywordCode=bu.macroKeywordCode=void 0;const eo=Pr,bh=Hc,j2e=Kr,q2e=dm;function H2e(t,e){const{gen:r,keyword:n,schema:i,parentSchema:a,it:o}=t,s=e.macro.call(o.self,i,a,o),c=zre(r,n,s);o.opts.validateSchema!==!1&&o.self.validateSchema(s,!0);const u=r.name("valid");t.subschema({schema:s,schemaPath:eo.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}bu.macroKeywordCode=H2e;function z2e(t,e){var r;const{gen:n,keyword:i,schema:a,parentSchema:o,$data:s,it:c}=t;G2e(c,e);const u=!s&&e.compile?e.compile.call(c.self,a,o,c):e.validate,f=zre(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&&jV(t),y(()=>t.error());else{const _=e.async?m():w();e.modifying&&jV(t),y(()=>V2e(t,_))}}function m(){const _=n.let("ruleErrs",null);return n.try(()=>v((0,eo._)`await `),b=>n.assign(d,!1).if((0,eo._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(_,(0,eo._)`${b}.errors`),()=>n.throw(b))),_}function w(){const _=(0,eo._)`${f}.errors`;return n.assign(_,null),v(eo.nil),_}function v(_=e.async?(0,eo._)`await `:eo.nil){const b=c.opts.passContext?bh.default.this:bh.default.self,S=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,eo._)`${_}${(0,j2e.callValidateCode)(t,f,b,S)}`,e.modifying)}function y(_){var b;n.if((0,eo.not)((b=e.valid)!==null&&b!==void 0?b:d),_)}}bu.funcKeywordCode=z2e;function jV(t){const{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,eo._)`${n.parentData}[${n.parentDataProperty}]`))}function V2e(t,e){const{gen:r}=t;r.if((0,eo._)`Array.isArray(${e})`,()=>{r.assign(bh.default.vErrors,(0,eo._)`${bh.default.vErrors} === null ? ${e} : ${bh.default.vErrors}.concat(${e})`).assign(bh.default.errors,(0,eo._)`${bh.default.vErrors}.length`),(0,q2e.extendErrors)(t)},()=>t.error())}function G2e({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function zre(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,eo.stringify)(r)})}function W2e(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")}bu.validSchemaType=W2e;function K2e({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)}}bu.validateKeywordUsage=K2e;var fd={};Object.defineProperty(fd,"__esModule",{value:!0});fd.extendSubschemaMode=fd.extendSubschemaData=fd.getSubschema=void 0;const pu=Pr,Vre=pn;function Y2e(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,pu._)`${t.schemaPath}${(0,pu.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,pu._)`${t.schemaPath}${(0,pu.getProperty)(e)}${(0,pu.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Vre.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')}fd.getSubschema=Y2e;function Q2e(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,pu._)`${e.data}${(0,pu.getProperty)(r)}`,!0);c(g),t.errorPath=(0,pu.str)`${u}${(0,Vre.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,pu._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(i!==void 0){const u=i instanceof pu.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]}}fd.extendSubschemaData=Q2e;function J2e(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}fd.extendSubschemaMode=J2e;var ga={},fM=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},Gre={exports:{}},Xf=Gre.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(){};xx(e,n,i,t,"",t)};Xf.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Xf.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Xf.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Xf.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 xx(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 Xf.arrayKeywords)for(var g=0;g<d.length;g++)xx(t,e,r,d[g],i+"/"+f+"/"+g,a,i,f,n,g)}else if(f in Xf.propsKeywords){if(d&&typeof d=="object")for(var m in d)xx(t,e,r,d[m],i+"/"+f+"/"+X2e(m),a,i,f,n,m)}else(f in Xf.keywords||t.allKeys&&!(f in Xf.skipKeywords))&&xx(t,e,r,d,i+"/"+f,a,i,f,n)}r(n,i,a,o,s,c,u)}}function X2e(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var Z2e=Gre.exports;Object.defineProperty(ga,"__esModule",{value:!0});ga.getSchemaRefs=ga.resolveUrl=ga.normalizeId=ga._getFullPath=ga.getFullPath=ga.inlineRef=void 0;const eSe=pn,tSe=fM,rSe=Z2e,nSe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function iSe(t,e=!0){return typeof t=="boolean"?!0:e===!0?!r4(t):e?Wre(t)<=e:!1}ga.inlineRef=iSe;const aSe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function r4(t){for(const e in t){if(aSe.has(e))return!0;const r=t[e];if(Array.isArray(r)&&r.some(r4)||typeof r=="object"&&r4(r))return!0}return!1}function Wre(t){let e=0;for(const r in t){if(r==="$ref")return 1/0;if(e++,!nSe.has(r)&&(typeof t[r]=="object"&&(0,eSe.eachItem)(t[r],n=>e+=Wre(n)),e===1/0))return 1/0}return e}function Kre(t,e="",r){r!==!1&&(e=Eg(e));const n=t.parse(e);return Yre(t,n)}ga.getFullPath=Kre;function Yre(t,e){return t.serialize(e).split("#")[0]+"#"}ga._getFullPath=Yre;const oSe=/#\/?$/;function Eg(t){return t?t.replace(oSe,""):""}ga.normalizeId=Eg;function sSe(t,e,r){return r=Eg(r),t.resolve(e,r)}ga.resolveUrl=sSe;const cSe=/^[a-z_][-a-z0-9._]*$/i;function uSe(t,e){if(typeof t=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,i=Eg(t[r]||e),a={"":i},o=Kre(n,i,!1),s={},c=new Set;return rSe(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=Eg(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!==Eg(v)&&(S[0]==="#"?(u(d,s[S],S),s[S]=d):this.refs[S]=v),S}function b(S){if(typeof S=="string"){if(!cSe.test(S))throw new Error(`invalid anchor "${S}"`);_.call(this,`#${S}`)}}}),s;function u(d,g,m){if(g!==void 0&&!tSe(d,g))throw f(m)}function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}}ga.getSchemaRefs=uSe;Object.defineProperty(js,"__esModule",{value:!0});js.getData=js.KeywordCxt=js.validateFunctionCode=void 0;const Qre=Ly,qV=Fw,dM=Dl,MA=Fw,lSe=MS,Wb=bu,eN=fd,er=Pr,Or=Hc,fSe=ga,$l=pn,Cv=dm;function dSe(t){if(Zre(t)&&(ene(t),Xre(t))){gSe(t);return}Jre(t,()=>(0,Qre.topBoolOrEmptySchema)(t))}js.validateFunctionCode=dSe;function Jre({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"; ${HV(r,i)}`),pSe(t,i),t.code(a)}):t.func(e,(0,er._)`${Or.default.data}, ${hSe(i)}`,n.$async,()=>t.code(HV(r,i)).code(a))}function hSe(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 pSe(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 gSe(t){const{schema:e,opts:r,gen:n}=t;Jre(t,()=>{r.$comment&&e.$comment&&rne(t),wSe(t),n.let(Or.default.vErrors,null),n.let(Or.default.errors,0),r.unevaluated&&ySe(t),tne(t),xSe(t)})}function ySe(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 HV(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 mSe(t,e){if(Zre(t)&&(ene(t),Xre(t))){vSe(t,e);return}(0,Qre.boolOrEmptySchema)(t,e)}function Xre({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 Zre(t){return typeof t.schema!="boolean"}function vSe(t,e){const{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&rne(t),_Se(t),ESe(t);const a=n.const("_errs",Or.default.errors);tne(t,a),n.var(e,(0,er._)`${a} === ${Or.default.errors}`)}function ene(t){(0,$l.checkUnknownRules)(t),bSe(t)}function tne(t,e){if(t.opts.jtd)return zV(t,[],!1,e);const r=(0,qV.getSchemaTypes)(t.schema),n=(0,qV.coerceAndCheckDataType)(t,r);zV(t,r,!n,e)}function bSe(t){const{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,$l.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function wSe(t){const{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,$l.checkStrictMode)(t,"default is ignored in the schema root")}function _Se(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,fSe.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function ESe(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function rne({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 xSe(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&&ASe(t),e.return((0,er._)`${Or.default.errors} === 0`))}function ASe({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 zV(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,$l.schemaHasRulesButRef)(a,f))){i.block(()=>ane(t,"$ref",f.all.$ref.definition));return}c.jtd||SSe(t,e),i.block(()=>{for(const g of f.rules)d(g);d(f.post)});function d(g){(0,dM.shouldUseGroup)(a,g)&&(g.type?(i.if((0,MA.checkDataType)(g.type,o,c.strictNumbers)),VV(t,g),e.length===1&&e[0]===g.type&&r&&(i.else(),(0,MA.reportTypeError)(t)),i.endIf()):VV(t,g),s||i.if((0,er._)`${Or.default.errors} === ${n||0}`))}}function VV(t,e){const{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,lSe.assignDefaults)(t,e.type),r.block(()=>{for(const a of e.rules)(0,dM.shouldUseRule)(n,a)&&ane(t,a.keyword,a.definition,e.type)})}function SSe(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(OSe(t,e),t.opts.allowUnionTypes||ISe(t,e),PSe(t,t.dataTypes))}function OSe(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{nne(t.dataTypes,r)||hM(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),RSe(t,e)}}function ISe(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&hM(t,"use allowUnionTypes to allow union type keyword")}function PSe(t,e){const r=t.self.RULES.all;for(const n in r){const i=r[n];if(typeof i=="object"&&(0,dM.shouldUseRule)(t.schema,i)){const{type:a}=i.definition;a.length&&!a.some(o=>TSe(e,o))&&hM(t,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function TSe(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function nne(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function RSe(t,e){const r=[];for(const n of t.dataTypes)nne(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function hM(t,e){const r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,$l.checkStrictMode)(t,e,t.opts.strictTypes)}class ine{constructor(e,r,n){if((0,Wb.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$l.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",one(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Wb.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Or.default.errors))}result(e,r,n){this.failResult((0,er.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,er.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:r}=this;this.fail((0,er._)`${r} !== undefined && (${(0,er.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Cv.reportExtraError:Cv.reportError)(this,this.def.error,r)}$dataError(){(0,Cv.reportError)(this,this.def.$dataError||Cv.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Cv.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,MA.checkDataTypes)(c,r,a.opts.strictNumbers,MA.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,eN.getSubschema)(this.it,e);(0,eN.extendSubschemaData)(n,this.it,e),(0,eN.extendSubschemaMode)(n,e);const i={...this.it,...n,items:void 0,props:void 0};return mSe(i,r),i}mergeEvaluated(e,r){const{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=$l.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=$l.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}}js.KeywordCxt=ine;function ane(t,e,r,n){const i=new ine(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Wb.funcKeywordCode)(i,r):"macro"in r?(0,Wb.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Wb.funcKeywordCode)(i,r)}const CSe=/^\/(?:[^~]|~0|~1)*$/,NSe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function one(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,a;if(t==="")return Or.default.rootData;if(t[0]==="/"){if(!CSe.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,a=Or.default.rootData}else{const u=NSe.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,$l.unescapeJsonPointer)(u))}`,o=(0,er._)`${o} && ${a}`);return o;function c(u,f){return`Cannot access ${u} ${f} levels up, current level is ${e}`}}js.getData=one;var jw={};Object.defineProperty(jw,"__esModule",{value:!0});class DSe extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}jw.default=DSe;var qw={};Object.defineProperty(qw,"__esModule",{value:!0});const tN=ga;class $Se extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,tN.resolveUrl)(e,r,n),this.missingSchema=(0,tN.normalizeId)((0,tN.getFullPath)(e,this.missingRef))}}qw.default=$Se;var Co={};Object.defineProperty(Co,"__esModule",{value:!0});Co.resolveSchema=Co.getCompilingSchema=Co.resolveRef=Co.compileSchema=Co.SchemaEnv=void 0;const uc=Pr,MSe=jw,ah=Hc,Tc=ga,GV=pn,kSe=js;class kS{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,Tc.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={}}}Co.SchemaEnv=kS;function pM(t){const e=sne.call(this,t);if(e)return e;const r=(0,Tc.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,o=new uc.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a});let s;t.$async&&(s=o.scopeValue("Error",{ref:MSe.default,code:(0,uc._)`require("ajv/dist/runtime/validation_error").default`}));const c=o.scopeName("validate");t.validateName=c;const u={gen:o,allErrors:this.opts.allErrors,data:ah.default.data,parentData:ah.default.parentData,parentDataProperty:ah.default.parentDataProperty,dataNames:[ah.default.data],dataPathArr:[uc.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,uc.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:uc.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,uc._)`""`,opts:this.opts,self:this};let f;try{this._compilations.add(t),(0,kSe.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);const d=o.toString();f=`${o.scopeRefs(ah.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,t));const m=new Function(`${ah.default.self}`,`${ah.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:o._values}),this.opts.unevaluated){const{props:w,items:v}=u;m.evaluated={props:w instanceof uc.Name?void 0:w,items:v instanceof uc.Name?void 0:v,dynamicProps:w instanceof uc.Name,dynamicItems:v instanceof uc.Name},m.source&&(m.source.evaluated=(0,uc.stringify)(m.evaluated))}return t.validate=m,t}catch(d){throw delete t.validate,delete t.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(t)}}Co.compileSchema=pM;function LSe(t,e,r){var n;r=(0,Tc.resolveUrl)(this.opts.uriResolver,e,r);const i=t.refs[r];if(i)return i;let a=FSe.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 kS({schema:o,schemaId:s,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=USe.call(this,a)}Co.resolveRef=LSe;function USe(t){return(0,Tc.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:pM.call(this,t)}function sne(t){for(const e of this._compilations)if(BSe(e,t))return e}Co.getCompilingSchema=sne;function BSe(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function FSe(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||LS.call(this,t,e)}function LS(t,e){const r=this.opts.uriResolver.parse(e),n=(0,Tc._getFullPath)(this.opts.uriResolver,r);let i=(0,Tc.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return rN.call(this,r,t);const a=(0,Tc.normalizeId)(n),o=this.refs[a]||this.schemas[a];if(typeof o=="string"){const s=LS.call(this,t,o);return typeof(s==null?void 0:s.schema)!="object"?void 0:rN.call(this,r,s)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||pM.call(this,o),a===(0,Tc.normalizeId)(e)){const{schema:s}=o,{schemaId:c}=this.opts,u=s[c];return u&&(i=(0,Tc.resolveUrl)(this.opts.uriResolver,i,u)),new kS({schema:s,schemaId:c,root:t,baseId:i})}return rN.call(this,r,o)}}Co.resolveSchema=LS;const jSe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function rN(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,GV.unescapeFragment)(s)];if(c===void 0)return;r=c;const u=typeof r=="object"&&r[this.opts.schemaId];!jSe.has(s)&&u&&(e=(0,Tc.resolveUrl)(this.opts.uriResolver,e,u))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,GV.schemaHasRulesButRef)(r,this.RULES)){const s=(0,Tc.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=LS.call(this,n,s)}const{schemaId:o}=this.opts;if(a=a||new kS({schema:r,schemaId:o,root:n,baseId:e}),a.schema!==a.root.schema)return a}const qSe="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",HSe="Meta-schema for $data reference (JSON AnySchema extension proposal)",zSe="object",VSe=["$data"],GSe={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},WSe=!1,KSe={$id:qSe,description:HSe,type:zSe,required:VSe,properties:GSe,additionalProperties:WSe};var gM={},n4={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)),_t="[\\:\\/\\?\\#\\[\\]\\@]",Ot="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",pr=n(_t,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),ei=i(i(sr)+"?\\:\\:"+i(sr+"\\:")+"{4}"+Lr),Oi=i(i(i(sr+"\\:")+"{0,1}"+sr)+"?\\:\\:"+i(sr+"\\:")+"{3}"+Lr),ti=i(i(i(sr+"\\:")+"{0,2}"+sr)+"?\\:\\:"+i(sr+"\\:")+"{2}"+Lr),Ii=i(i(i(sr+"\\:")+"{0,3}"+sr)+"?\\:\\:"+sr+"\\:"+Lr),Pi=i(i(i(sr+"\\:")+"{0,4}"+sr)+"?\\:\\:"+Lr),si=i(i(i(sr+"\\:")+"{0,5}"+sr)+"?\\:\\:"+sr),jn=i(i(i(sr+"\\:")+"{0,6}"+sr)+"?\\:\\:"),na=i([gn,Ur,ei,Oi,ti,Ii,Pi,si,jn].join("|")),Mi=i(i(gr+"|"+Le)+"+");i("[vV]"+Me+"+\\."+n(gr,Ot,"[\\:]")+"+"),i(i(Le+"|"+n(gr,Ot))+"*");var Ea=i(Le+"|"+n(gr,Ot,"[\\:\\@]"));return i(i(Le+"|"+n(gr,Ot,"[\\@]"))+"+"),i(i(Ea+"|"+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("^\\[?("+na+")"+i(i("\\%25|\\%(?!"+Me+"{2})")+"("+Mi+")")+"?\\]?$")}}var f=u(!1),d=u(!0),g=function(){function ue(Z,ye){var Me=[],Le=!0,_t=!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){_t=!0,Ot=en}finally{try{!Le&&pr.return&&pr.return()}finally{if(_t)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 Y(ue,Z){var ye=ue.split("@"),Me="";ye.length>1&&(Me=ye[0]+"@",ue=ye[1]),ue=ue.replace(C,".");var Le=ue.split("."),_t=U(Le,Z).join(".");return Me+_t}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 _t=ue.charCodeAt(ye++);(_t&64512)==56320?Z.push(((Le&1023)<<10)+(_t&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,_t=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-_t&&B("overflow"),_t+=le(Le/Ur),Le%=Ur,ye.splice(Le++,0,_t)}return String.fromCodePoint.apply(String,ye)},k=function(Z){var ye=[];Z=ne(Z);var Me=Z.length,Le=O,_t=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(Xe){lr=!0,en=Xe}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,ei=!1,Oi=void 0;try{for(var ti=Z[Symbol.iterator](),Ii;!(Ur=(Ii=ti.next()).done);Ur=!0){var Pi=Ii.value;Pi>=Le&&Pi<gn&&(gn=Pi)}}catch(Xe){ei=!0,Oi=Xe}finally{try{!Ur&&ti.return&&ti.return()}finally{if(ei)throw Oi}}var si=Lr+1;gn-Le>le((w-_t)/si)&&B("overflow"),_t+=(gn-Le)*si,Le=gn;var jn=!0,na=!1,Mi=void 0;try{for(var Ea=Z[Symbol.iterator](),ss;!(jn=(ss=Ea.next()).done);jn=!0){var X=ss.value;if(X<Le&&++_t>w&&B("overflow"),X==Le){for(var me=_t,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=$(_t,si,Lr==sr),_t=0,++Lr}}}catch(Xe){na=!0,Mi=Xe}finally{try{!jn&&Ea.return&&Ea.return()}finally{if(na)throw Mi}}++_t,++Le}return ye.join("")},M=function(Z){return Y(Z,function(ye){return p.test(ye)?H(ye.slice(4).toLowerCase()):ye})},G=function(Z){return Y(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 _t=parseInt(ue.substr(ye+4,2),16);Z+=String.fromCharCode((Le&31)<<6|_t&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 Ve(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],_t=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]=Ve(gn[sr-1],Z));var ei=gn.reduce(function(si,jn,na){if(!jn||jn==="0"){var Mi=si[si.length-1];Mi&&Mi.index+Mi.length===na?Mi.length++:si.push({index:na,length:1})}return si},[]),Oi=ei.sort(function(si,jn){return jn.length-si.length})[0],ti=void 0;if(Oi&&Oi.length>1){var Ii=gn.slice(0,Oi.index),Pi=gn.slice(Oi.index+Oi.length);ti=Ii.join(":")+"::"+Pi.join(":")}else ti=gn.join(":");return _t&&(ti+="%"+_t),ti}else return ue}var vt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,bt="".match(/(){0}/)[1]===void 0;function yt(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(vt);if(Le){bt?(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(Ve(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 _t=Q[(Z.scheme||ye.scheme||"").toLowerCase()];if(!Z.unicodeSupport&&(!_t||!_t.unicodeSupport)){if(ye.host&&(Z.domainHost||_t&&_t.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);_t&&_t.parse&&_t.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(Ve(String(ue.host),ye),ye).replace(ye.IPV6ADDRESS,function(Le,_t,Ot){return"["+_t+(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 _t=Lt(ue,Z);if(_t!==void 0&&(Z.reference!=="suffix"&&Me.push("//"),Me.push(_t),ue.path&&ue.path.charAt(0)!=="/"&&Me.push("/")),ue.path!==void 0){var Ot=ue.path;!Z.absolutePath&&(!Le||!Le.absolutePath)&&(Ot=kt(Ot)),_t===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=yt(Nt(ue,ye),ye),Z=yt(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(yt(ue,Me),yt(Z,Me),Me,!0),Me)}function Vt(ue,Z){return typeof ue=="string"?ue=Nt(yt(ue,Z),Z):a(ue)==="object"&&(ue=yt(Nt(ue,Z),Z)),ue}function $t(ue,Z,ye){return typeof ue=="string"?ue=Nt(yt(ue,ye),ye):a(ue)==="object"&&(ue=Nt(ue,ye)),typeof Z=="string"?Z=Nt(yt(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),_t=Le[0],Ot=Le[1];Z.path=_t&&_t!=="/"?_t: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]",oi=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]",Yn=n($n,'[\\"\\\\]'),xr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",$r=new RegExp(wn,"g"),_r=new RegExp(oi,"g"),_e=new RegExp(n("[^]",Dn,"[\\.]",'[\\"]',Yn),"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 _t=!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:_t=!0,Ot[qt(gr[0],ye)]=qt(gr[1],ye);break}}_t&&(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(ei){Me.error=Me.error||"Email address's domain name can not be converted to ASCII via punycode: "+ei}Le[Lr]=Ur.join("@")}return Me},serialize:function(Z,ye){var Me=Z,Le=s(Z.to);if(Le){for(var _t=0,Ot=Le.length;_t<Ot;++_t){var pr=String(Le[_t]),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[_t]=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}},Ze=/^([^\:]+)\:(.*)/,ct={scheme:"urn",parse:function(Z,ye){var Me=Z.path&&Z.path.match(Ze),Le=Z;if(Me){var _t=ye.scheme||Le.scheme||"urn",Ot=Me[1].toLowerCase(),pr=Me[2],lr=_t+":"+(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,_t=Me+":"+(ye.nid||Le),Ot=Q[_t];Ot&&(Z=Ot.serialize(Z,ye));var pr=Z,lr=Z.nss;return pr.path=(Le||ye.nid)+":"+lr,pr}},ft=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Et={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(ft))&&(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[ct.scheme]=ct,Q[Et.scheme]=Et,r.SCHEMES=Q,r.pctEncChar=te,r.pctDecChars=ce,r.parse=yt,r.removeDotSegments=kt,r.serialize=Nt,r.resolveComponents=Kt,r.resolve=Ut,r.normalize=Vt,r.equal=$t,r.escapeComponent=Dt,r.unescapeComponent=qt,Object.defineProperty(r,"__esModule",{value:!0})})})(n4,n4.exports);var YSe=n4.exports;Object.defineProperty(gM,"__esModule",{value:!0});const cne=YSe;cne.code='require("ajv/dist/runtime/uri").default';gM.default=cne;(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=js;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=jw,i=qw,a=wp,o=Co,s=Pr,c=ga,u=Fw,f=pn,d=KSe,g=gM,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,Ve,tt,vt,bt,yt,Lt,Yt,wr,Rt,Pt,kt,Nt,Kt,Ut;const Vt=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:Vt)!==null&&ge!==void 0?ge:!0,strictNumbers:(te=(Q=z.strictNumbers)!==null&&Q!==void 0?Q:Vt)!==null&&te!==void 0?te:!0,strictTypes:(T=(ce=z.strictTypes)!==null&&ce!==void 0?ce:Vt)!==null&&T!==void 0?T:"log",strictTuples:(Ve=(fe=z.strictTuples)!==null&&fe!==void 0?fe:Vt)!==null&&Ve!==void 0?Ve:"log",strictRequired:(vt=(tt=z.strictRequired)!==null&&tt!==void 0?tt:Vt)!==null&&vt!==void 0?vt:!1,code:z.code?{...z.code,optimize:Dt,regExp:qt}:{optimize:Dt,regExp:qt},loopRequired:(bt=z.loopRequired)!==null&&bt!==void 0?bt:b,loopEnum:(yt=z.loopEnum)!==null&&yt!==void 0?yt: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 Ve=this._addSchema(T,fe);return Ve.validate||ge.call(this,Ve)}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?Y.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 Y(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]}}})(Ure);var yM={},mM={},vM={};Object.defineProperty(vM,"__esModule",{value:!0});const QSe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};vM.default=QSe;var _p={};Object.defineProperty(_p,"__esModule",{value:!0});_p.callRef=_p.getValidate=void 0;const JSe=qw,WV=Kr,Oo=Pr,E0=Hc,KV=Co,bE=pn,XSe={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=KV.resolveRef.call(c,u,i,r);if(f===void 0)throw new JSe.default(n.opts.uriResolver,i,r);if(f instanceof KV.SchemaEnv)return g(f);return m(f);function d(){if(a===u)return Ax(t,o,a,a.$async);const w=e.scopeValue("root",{ref:u});return Ax(t,(0,Oo._)`${w}.validate`,u,u.$async)}function g(w){const v=une(t,w);Ax(t,v,w,w.$async)}function m(w){const v=e.scopeValue("schema",s.code.source===!0?{ref:w,code:(0,Oo.stringify)(w)}:{ref:w}),y=e.name("valid"),_=t.subschema({schema:w,dataTypes:[],schemaPath:Oo.nil,topSchemaRef:v,errSchemaPath:r},y);t.mergeEvaluated(_),t.ok(y)}}};function une(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Oo._)`${r.scopeValue("wrapper",{ref:e})}.validate`}_p.getValidate=une;function Ax(t,e,r,n){const{gen:i,it:a}=t,{allErrors:o,schemaEnv:s,opts:c}=a,u=c.passContext?E0.default.this:Oo.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,Oo._)`await ${(0,WV.callValidateCode)(t,e,u)}`),m(e),o||i.assign(w,!0)},v=>{i.if((0,Oo._)`!(${v} instanceof ${a.ValidationError})`,()=>i.throw(v)),g(v),o||i.assign(w,!1)}),t.ok(w)}function d(){t.result((0,WV.callValidateCode)(t,e,u),()=>m(e),()=>g(e))}function g(w){const v=(0,Oo._)`${w}.errors`;i.assign(E0.default.vErrors,(0,Oo._)`${E0.default.vErrors} === null ? ${v} : ${E0.default.vErrors}.concat(${v})`),i.assign(E0.default.errors,(0,Oo._)`${E0.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=bE.mergeEvaluated.props(i,y.props,a.props));else{const _=i.var("props",(0,Oo._)`${w}.evaluated.props`);a.props=bE.mergeEvaluated.props(i,_,a.props,Oo.Name)}if(a.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(a.items=bE.mergeEvaluated.items(i,y.items,a.items));else{const _=i.var("items",(0,Oo._)`${w}.evaluated.items`);a.items=bE.mergeEvaluated.items(i,_,a.items,Oo.Name)}}}_p.callRef=Ax;_p.default=XSe;Object.defineProperty(mM,"__esModule",{value:!0});const ZSe=vM,eOe=_p,tOe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",ZSe.default,eOe.default];mM.default=tOe;var bM={},wM={};Object.defineProperty(wM,"__esModule",{value:!0});const kA=Pr,mf=kA.operators,LA={maximum:{okStr:"<=",ok:mf.LTE,fail:mf.GT},minimum:{okStr:">=",ok:mf.GTE,fail:mf.LT},exclusiveMaximum:{okStr:"<",ok:mf.LT,fail:mf.GTE},exclusiveMinimum:{okStr:">",ok:mf.GT,fail:mf.LTE}},rOe={message:({keyword:t,schemaCode:e})=>(0,kA.str)`must be ${LA[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,kA._)`{comparison: ${LA[t].okStr}, limit: ${e}}`},nOe={keyword:Object.keys(LA),type:"number",schemaType:"number",$data:!0,error:rOe,code(t){const{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,kA._)`${r} ${LA[e].fail} ${n} || isNaN(${r})`)}};wM.default=nOe;var _M={};Object.defineProperty(_M,"__esModule",{value:!0});const Kb=Pr,iOe={message:({schemaCode:t})=>(0,Kb.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Kb._)`{multipleOf: ${t}}`},aOe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:iOe,code(t){const{gen:e,data:r,schemaCode:n,it:i}=t,a=i.opts.multipleOfPrecision,o=e.let("res"),s=a?(0,Kb._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${a}`:(0,Kb._)`${o} !== parseInt(${o})`;t.fail$data((0,Kb._)`(${n} === 0 || (${o} = ${r}/${n}, ${s}))`)}};_M.default=aOe;var EM={},xM={};Object.defineProperty(xM,"__esModule",{value:!0});function lne(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}xM.default=lne;lne.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(EM,"__esModule",{value:!0});const wh=Pr,oOe=pn,sOe=xM,cOe={message({keyword:t,schemaCode:e}){const r=t==="maxLength"?"more":"fewer";return(0,wh.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,wh._)`{limit: ${t}}`},uOe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:cOe,code(t){const{keyword:e,data:r,schemaCode:n,it:i}=t,a=e==="maxLength"?wh.operators.GT:wh.operators.LT,o=i.opts.unicode===!1?(0,wh._)`${r}.length`:(0,wh._)`${(0,oOe.useFunc)(t.gen,sOe.default)}(${r})`;t.fail$data((0,wh._)`${o} ${a} ${n}`)}};EM.default=uOe;var AM={};Object.defineProperty(AM,"__esModule",{value:!0});const lOe=Kr,UA=Pr,fOe={message:({schemaCode:t})=>(0,UA.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,UA._)`{pattern: ${t}}`},dOe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:fOe,code(t){const{data:e,$data:r,schema:n,schemaCode:i,it:a}=t,o=a.opts.unicodeRegExp?"u":"",s=r?(0,UA._)`(new RegExp(${i}, ${o}))`:(0,lOe.usePattern)(t,n);t.fail$data((0,UA._)`!${s}.test(${e})`)}};AM.default=dOe;var SM={};Object.defineProperty(SM,"__esModule",{value:!0});const Yb=Pr,hOe={message({keyword:t,schemaCode:e}){const r=t==="maxProperties"?"more":"fewer";return(0,Yb.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Yb._)`{limit: ${t}}`},pOe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:hOe,code(t){const{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Yb.operators.GT:Yb.operators.LT;t.fail$data((0,Yb._)`Object.keys(${r}).length ${i} ${n}`)}};SM.default=pOe;var OM={};Object.defineProperty(OM,"__esModule",{value:!0});const Nv=Kr,Qb=Pr,gOe=pn,yOe={message:({params:{missingProperty:t}})=>(0,Qb.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Qb._)`{missingProperty: ${t}}`},mOe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:yOe,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,gOe.checkStrictMode)(o,_,o.opts.strictRequired)}}function u(){if(c||a)t.block$data(Qb.nil,d);else for(const m of r)(0,Nv.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,Nv.checkMissingProp)(t,r,m)),(0,Nv.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,Nv.noPropertyInData)(e,i,m,s.ownProperties),()=>t.error())})}function g(m,w){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(w,(0,Nv.propertyInData)(e,i,m,s.ownProperties)),e.if((0,Qb.not)(w),()=>{t.error(),e.break()})},Qb.nil)}}};OM.default=mOe;var IM={};Object.defineProperty(IM,"__esModule",{value:!0});const Jb=Pr,vOe={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}}`},bOe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:vOe,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}`)}};IM.default=bOe;var PM={},Hw={};Object.defineProperty(Hw,"__esModule",{value:!0});const fne=fM;fne.code='require("ajv/dist/runtime/equal").default';Hw.default=fne;Object.defineProperty(PM,"__esModule",{value:!0});const nN=Fw,ca=Pr,wOe=pn,_Oe=Hw,EOe={message:({params:{i:t,j:e}})=>(0,ca.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,ca._)`{i: ${t}, j: ${e}}`},xOe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:EOe,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,nN.getSchemaTypes)(a.items):[];t.block$data(c,f,(0,ca._)`${o} === false`),t.ok(c);function f(){const w=e.let("i",(0,ca._)`${r}.length`),v=e.let("j");t.setParams({i:w,j:v}),e.assign(c,!0),e.if((0,ca._)`${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,nN.checkDataTypes)(u,y,s.opts.strictNumbers,nN.DataType.Wrong),b=e.const("indices",(0,ca._)`{}`);e.for((0,ca._)`;${w}--;`,()=>{e.let(y,(0,ca._)`${r}[${w}]`),e.if(_,(0,ca._)`continue`),u.length>1&&e.if((0,ca._)`typeof ${y} == "string"`,(0,ca._)`${y} += "_"`),e.if((0,ca._)`typeof ${b}[${y}] == "number"`,()=>{e.assign(v,(0,ca._)`${b}[${y}]`),t.error(),e.assign(c,!1).break()}).code((0,ca._)`${b}[${y}] = ${w}`)})}function m(w,v){const y=(0,wOe.useFunc)(e,_Oe.default),_=e.name("outer");e.label(_).for((0,ca._)`;${w}--;`,()=>e.for((0,ca._)`${v} = ${w}; ${v}--;`,()=>e.if((0,ca._)`${y}(${r}[${w}], ${r}[${v}])`,()=>{t.error(),e.assign(c,!1).break(_)})))}}};PM.default=xOe;var TM={};Object.defineProperty(TM,"__esModule",{value:!0});const i4=Pr,AOe=pn,SOe=Hw,OOe={message:"must be equal to constant",params:({schemaCode:t})=>(0,i4._)`{allowedValue: ${t}}`},IOe={keyword:"const",$data:!0,error:OOe,code(t){const{gen:e,data:r,$data:n,schemaCode:i,schema:a}=t;n||a&&typeof a=="object"?t.fail$data((0,i4._)`!${(0,AOe.useFunc)(e,SOe.default)}(${r}, ${i})`):t.fail((0,i4._)`${a} !== ${r}`)}};TM.default=IOe;var RM={};Object.defineProperty(RM,"__esModule",{value:!0});const Sb=Pr,POe=pn,TOe=Hw,ROe={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Sb._)`{allowedValues: ${t}}`},COe={keyword:"enum",schemaType:"array",$data:!0,error:ROe,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,POe.useFunc)(e,TOe.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,Sb.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,Sb._)`${u()}(${r}, ${m})`,()=>e.assign(f,!0).break()))}function g(m,w){const v=i[w];return typeof v=="object"&&v!==null?(0,Sb._)`${u()}(${r}, ${m}[${w}])`:(0,Sb._)`${r} === ${v}`}}};RM.default=COe;Object.defineProperty(bM,"__esModule",{value:!0});const NOe=wM,DOe=_M,$Oe=EM,MOe=AM,kOe=SM,LOe=OM,UOe=IM,BOe=PM,FOe=TM,jOe=RM,qOe=[NOe.default,DOe.default,$Oe.default,MOe.default,kOe.default,LOe.default,UOe.default,BOe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},FOe.default,jOe.default];bM.default=qOe;var CM={},hm={};Object.defineProperty(hm,"__esModule",{value:!0});hm.validateAdditionalItems=void 0;const _h=Pr,a4=pn,HOe={message:({params:{len:t}})=>(0,_h.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,_h._)`{limit: ${t}}`},zOe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:HOe,code(t){const{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,a4.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}dne(t,n)}};function dne(t,e){const{gen:r,schema:n,data:i,keyword:a,it:o}=t;o.items=!0;const s=r.const("len",(0,_h._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,_h._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,a4.alwaysValidSchema)(o,n)){const u=r.var("valid",(0,_h._)`${s} <= ${e.length}`);r.if((0,_h.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,s,f=>{t.subschema({keyword:a,dataProp:f,dataPropType:a4.Type.Num},u),o.allErrors||r.if((0,_h.not)(u),()=>r.break())})}}hm.validateAdditionalItems=dne;hm.default=zOe;var NM={},pm={};Object.defineProperty(pm,"__esModule",{value:!0});pm.validateTuple=void 0;const YV=Pr,Sx=pn,VOe=Kr,GOe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:r}=t;if(Array.isArray(e))return hne(t,"additionalItems",e);r.items=!0,!(0,Sx.alwaysValidSchema)(r,e)&&t.ok((0,VOe.validateArray)(t))}};function hne(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=Sx.mergeEvaluated.items(n,r.length,s.items));const c=n.name("valid"),u=n.const("len",(0,YV._)`${a}.length`);r.forEach((d,g)=>{(0,Sx.alwaysValidSchema)(s,d)||(n.if((0,YV._)`${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,Sx.checkStrictMode)(s,y,g.strictTuples)}}}pm.validateTuple=hne;pm.default=GOe;Object.defineProperty(NM,"__esModule",{value:!0});const WOe=pm,KOe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,WOe.validateTuple)(t,"items")};NM.default=KOe;var DM={};Object.defineProperty(DM,"__esModule",{value:!0});const QV=Pr,YOe=pn,QOe=Kr,JOe=hm,XOe={message:({params:{len:t}})=>(0,QV.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,QV._)`{limit: ${t}}`},ZOe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:XOe,code(t){const{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,YOe.alwaysValidSchema)(n,e)&&(i?(0,JOe.validateAdditionalItems)(t,i):t.ok((0,QOe.validateArray)(t)))}};DM.default=ZOe;var $M={};Object.defineProperty($M,"__esModule",{value:!0});const Ds=Pr,wE=pn,eIe={message:({params:{min:t,max:e}})=>e===void 0?(0,Ds.str)`must contain at least ${t} valid item(s)`:(0,Ds.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Ds._)`{minContains: ${t}}`:(0,Ds._)`{minContains: ${t}, maxContains: ${e}}`},tIe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:eIe,code(t){const{gen:e,schema:r,parentSchema:n,data:i,it:a}=t;let o,s;const{minContains:c,maxContains:u}=n;a.opts.next?(o=c===void 0?1:c,s=u):o=1;const f=e.const("len",(0,Ds._)`${i}.length`);if(t.setParams({min:o,max:s}),s===void 0&&o===0){(0,wE.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&o>s){(0,wE.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,wE.alwaysValidSchema)(a,r)){let v=(0,Ds._)`${f} >= ${o}`;s!==void 0&&(v=(0,Ds._)`${v} && ${f} <= ${s}`),t.pass(v);return}a.items=!0;const d=e.name("valid");s===void 0&&o===1?m(d,()=>e.if(d,()=>e.break())):o===0?(e.let(d,!0),s!==void 0&&e.if((0,Ds._)`${i}.length > 0`,g)):(e.let(d,!1),g()),t.result(d,()=>t.reset());function g(){const v=e.name("_valid"),y=e.let("count",0);m(v,()=>e.if(v,()=>w(y)))}function m(v,y){e.forRange("i",0,f,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:wE.Type.Num,compositeRule:!0},v),y()})}function w(v){e.code((0,Ds._)`${v}++`),s===void 0?e.if((0,Ds._)`${v} >= ${o}`,()=>e.assign(d,!0).break()):(e.if((0,Ds._)`${v} > ${s}`,()=>e.assign(d,!1).break()),o===1?e.assign(d,!0):e.if((0,Ds._)`${v} >= ${o}`,()=>e.assign(d,!0)))}}};$M.default=tIe;var pne={};(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},
99
+ missingProperty: ${d},
100
+ depsCount: ${u},
101
+ 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})(pne);var MM={};Object.defineProperty(MM,"__esModule",{value:!0});const gne=Pr,rIe=pn,nIe={message:"property name must be valid",params:({params:t})=>(0,gne._)`{propertyName: ${t.propertyName}}`},iIe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:nIe,code(t){const{gen:e,schema:r,data:n,it:i}=t;if((0,rIe.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,gne.not)(a),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(a)}};MM.default=iIe;var US={};Object.defineProperty(US,"__esModule",{value:!0});const _E=Kr,dc=Pr,aIe=Hc,EE=pn,oIe={message:"must NOT have additional properties",params:({params:t})=>(0,dc._)`{additionalProperty: ${t.additionalProperty}}`},sIe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:oIe,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,EE.alwaysValidSchema)(o,r))return;const u=(0,_E.allSchemaProperties)(n.properties),f=(0,_E.allSchemaProperties)(n.patternProperties);d(),t.ok((0,dc._)`${a} === ${aIe.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,EE.schemaRefOrVal)(o,n.properties,"properties");_=(0,_E.isOwnProperty)(e,b,y)}else u.length?_=(0,dc.or)(...u.map(b=>(0,dc._)`${y} === ${b}`)):_=dc.nil;return f.length&&(_=(0,dc.or)(_,...f.map(b=>(0,dc._)`${(0,_E.usePattern)(t,b)}.test(${y})`))),(0,dc.not)(_)}function m(y){e.code((0,dc._)`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,EE.alwaysValidSchema)(o,r)){const _=e.name("valid");c.removeAdditional==="failing"?(v(y,_,!1),e.if((0,dc.not)(_),()=>{t.reset(),m(y)})):(v(y,_),s||e.if((0,dc.not)(_),()=>e.break()))}}function v(y,_,b){const S={keyword:"additionalProperties",dataProp:y,dataPropType:EE.Type.Str};b===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(S,_)}}};US.default=sIe;var kM={};Object.defineProperty(kM,"__esModule",{value:!0});const cIe=js,JV=Kr,iN=pn,XV=US,uIe={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&&XV.default.code(new cIe.KeywordCxt(a,XV.default,"additionalProperties"));const o=(0,JV.allSchemaProperties)(r);for(const d of o)a.definedProperties.add(d);a.opts.unevaluated&&o.length&&a.props!==!0&&(a.props=iN.mergeEvaluated.props(e,(0,iN.toHash)(o),a.props));const s=o.filter(d=>!(0,iN.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,JV.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)}}};kM.default=uIe;var LM={};Object.defineProperty(LM,"__esModule",{value:!0});const ZV=Kr,xE=Pr,eG=pn,tG=pn,lIe={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,ZV.allSchemaProperties)(r),c=s.filter(v=>(0,eG.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 xE.Name)&&(a.props=(0,tG.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,eG.checkStrictMode)(a,`property ${y} matches pattern ${v} (use allowMatchingProperties)`)}function w(v){e.forIn("key",n,y=>{e.if((0,xE._)`${(0,ZV.usePattern)(t,v)}.test(${y})`,()=>{const _=c.includes(v);_||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:y,dataPropType:tG.Type.Str},f),a.opts.unevaluated&&d!==!0?e.assign((0,xE._)`${d}[${y}]`,!0):!_&&!a.allErrors&&e.if((0,xE.not)(f),()=>e.break())})})}}};LM.default=lIe;var UM={};Object.defineProperty(UM,"__esModule",{value:!0});const fIe=pn,dIe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:r,it:n}=t;if((0,fIe.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"}};UM.default=dIe;var BM={};Object.defineProperty(BM,"__esModule",{value:!0});const hIe=Kr,pIe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:hIe.validateUnion,error:{message:"must match a schema in anyOf"}};BM.default=pIe;var FM={};Object.defineProperty(FM,"__esModule",{value:!0});const Ox=Pr,gIe=pn,yIe={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Ox._)`{passingSchemas: ${t.passing}}`},mIe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:yIe,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,gIe.alwaysValidSchema)(i,f)?e.var(c,!0):g=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,Ox._)`${c} && ${o}`).assign(o,!1).assign(s,(0,Ox._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(o,!0),e.assign(s,d),g&&t.mergeEvaluated(g,Ox.Name)})})}}};FM.default=mIe;var jM={};Object.defineProperty(jM,"__esModule",{value:!0});const vIe=pn,bIe={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,vIe.alwaysValidSchema)(n,a))return;const s=t.subschema({keyword:"allOf",schemaProp:o},i);t.ok(i),t.mergeEvaluated(s)})}};jM.default=bIe;var qM={};Object.defineProperty(qM,"__esModule",{value:!0});const BA=Pr,yne=pn,wIe={message:({params:t})=>(0,BA.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,BA._)`{failingKeyword: ${t.ifClause}}`},_Ie={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:wIe,code(t){const{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,yne.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=rG(n,"then"),a=rG(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,BA.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,BA._)`${f}`):t.setParams({ifClause:f})}}}};function rG(t,e){const r=t.schema[e];return r!==void 0&&!(0,yne.alwaysValidSchema)(t,r)}qM.default=_Ie;var HM={};Object.defineProperty(HM,"__esModule",{value:!0});const EIe=pn,xIe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,EIe.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};HM.default=xIe;Object.defineProperty(CM,"__esModule",{value:!0});const AIe=hm,SIe=NM,OIe=pm,IIe=DM,PIe=$M,TIe=pne,RIe=MM,CIe=US,NIe=kM,DIe=LM,$Ie=UM,MIe=BM,kIe=FM,LIe=jM,UIe=qM,BIe=HM;function FIe(t=!1){const e=[$Ie.default,MIe.default,kIe.default,LIe.default,UIe.default,BIe.default,RIe.default,CIe.default,TIe.default,NIe.default,DIe.default];return t?e.push(SIe.default,IIe.default):e.push(AIe.default,OIe.default),e.push(PIe.default),e}CM.default=FIe;var zM={},VM={};Object.defineProperty(VM,"__esModule",{value:!0});const _i=Pr,jIe={message:({schemaCode:t})=>(0,_i.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,_i._)`{format: ${t}}`},qIe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:jIe,code(t,e){const{gen:r,data:n,$data:i,schema:a,schemaCode:o,it:s}=t,{opts:c,errSchemaPath:u,schemaEnv:f,self:d}=s;if(!c.validateFormats)return;i?g():m();function g(){const w=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,_i._)`${w}[${o}]`),y=r.let("fType"),_=r.let("format");r.if((0,_i._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(y,(0,_i._)`${v}.type || "string"`).assign(_,(0,_i._)`${v}.validate`),()=>r.assign(y,(0,_i._)`"string"`).assign(_,v)),t.fail$data((0,_i.or)(b(),S()));function b(){return c.strictSchema===!1?_i.nil:(0,_i._)`${o} && !${_}`}function S(){const x=f.$async?(0,_i._)`(${v}.async ? await ${_}(${n}) : ${_}(${n}))`:(0,_i._)`${_}(${n})`,O=(0,_i._)`(typeof ${_} == "function" ? ${x} : ${_}.test(${n}))`;return(0,_i._)`${_} && ${_} !== 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,_i.regexpCode)(O):c.code.formats?(0,_i._)`${c.code.formats}${(0,_i.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,_i._)`${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,_i._)`await ${_}(${n})`}return typeof y=="function"?(0,_i._)`${_}(${n})`:(0,_i._)`${_}.test(${n})`}}}};VM.default=qIe;Object.defineProperty(zM,"__esModule",{value:!0});const HIe=VM,zIe=[HIe.default];zM.default=zIe;var By={};Object.defineProperty(By,"__esModule",{value:!0});By.contentVocabulary=By.metadataVocabulary=void 0;By.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];By.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(yM,"__esModule",{value:!0});const VIe=mM,GIe=bM,WIe=CM,KIe=zM,nG=By,YIe=[VIe.default,GIe.default,(0,WIe.default)(),KIe.default,nG.metadataVocabulary,nG.contentVocabulary];yM.default=YIe;var GM={},mne={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))})(mne);Object.defineProperty(GM,"__esModule",{value:!0});const k0=Pr,o4=mne,iG=Co,QIe=pn,JIe={message:({params:{discrError:t,tagName:e}})=>t===o4.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,k0._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},XIe={keyword:"discriminator",type:"object",schemaType:"object",error:JIe,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,k0._)`${r}${(0,k0.getProperty)(s)}`);e.if((0,k0._)`typeof ${u} == "string"`,()=>f(),()=>t.error(!1,{discrError:o4.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,k0._)`${u} === ${w}`),e.assign(c,d(m[w]));e.else(),t.error(!1,{discrError:o4.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,k0.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,QIe.schemaHasRulesButRef)(O,a.self.RULES)&&(O=iG.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,O==null?void 0:O.$ref),O instanceof iG.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}}}};GM.default=XIe;const ZIe="http://json-schema.org/draft-07/schema#",ePe="http://json-schema.org/draft-07/schema#",tPe="Core schema meta-schema",rPe={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:[]}},nPe=["object","boolean"],iPe={$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:"#"}},aPe={$schema:ZIe,$id:ePe,title:tPe,definitions:rPe,type:nPe,properties:iPe,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=Ure,n=yM,i=GM,a=aPe,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=js;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=jw;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var g=qw;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(e4,e4.exports);var vne=e4.exports,s4={exports:{}},c4={exports:{}},u4={exports:{}},l4={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})(l4,l4.exports);var oPe=l4.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(oPe),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(u4,u4.exports);var sPe=u4.exports,f4={exports:{}},gu=[],Is=[],cPe=typeof Uint8Array<"u"?Uint8Array:Array,WM=!1;function bne(){WM=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)gu[e]=t[e],Is[t.charCodeAt(e)]=e;Is["-".charCodeAt(0)]=62,Is["_".charCodeAt(0)]=63}function uPe(t){WM||bne();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 cPe(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=Is[t.charCodeAt(e)]<<18|Is[t.charCodeAt(e+1)]<<12|Is[t.charCodeAt(e+2)]<<6|Is[t.charCodeAt(e+3)],o[c++]=i>>16&255,o[c++]=i>>8&255,o[c++]=i&255;return a===2?(i=Is[t.charCodeAt(e)]<<2|Is[t.charCodeAt(e+1)]>>4,o[c++]=i&255):a===1&&(i=Is[t.charCodeAt(e)]<<10|Is[t.charCodeAt(e+1)]<<4|Is[t.charCodeAt(e+2)]>>2,o[c++]=i>>8&255,o[c++]=i&255),o}function lPe(t){return gu[t>>18&63]+gu[t>>12&63]+gu[t>>6&63]+gu[t&63]}function fPe(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(lPe(n));return i.join("")}function aG(t){WM||bne();for(var e,r=t.length,n=r%3,i="",a=[],o=16383,s=0,c=r-n;s<c;s+=o)a.push(fPe(t,s,s+o>c?c:s+o));return n===1?(e=t[r-1],i+=gu[e>>2],i+=gu[e<<4&63],i+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],i+=gu[e>>10],i+=gu[e>>4&63],i+=gu[e<<2&63],i+="="),a.push(i),a.join("")}function BS(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 wne(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 dPe={}.toString,_ne=Array.isArray||function(t){return dPe.call(t)=="[object Array]"};/*!
102
+ * The buffer module from node.js, for the browser.
103
+ *
104
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
105
+ * @license MIT
106
+ */var hPe=50;lt.TYPED_ARRAY_SUPPORT=bn.TYPED_ARRAY_SUPPORT!==void 0?bn.TYPED_ARRAY_SUPPORT:!0;FA();function FA(){return lt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Pl(t,e){if(FA()<e)throw new RangeError("Invalid typed array length");return lt.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=lt.prototype):(t===null&&(t=new lt(e)),t.length=e),t}function lt(t,e,r){if(!lt.TYPED_ARRAY_SUPPORT&&!(this instanceof lt))return new lt(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 KM(this,t)}return Ene(this,t,e,r)}lt.poolSize=8192;lt._augment=function(t){return t.__proto__=lt.prototype,t};function Ene(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?yPe(t,e,r,n):typeof e=="string"?gPe(t,e,r):mPe(t,e)}lt.from=function(t,e,r){return Ene(null,t,e,r)};lt.TYPED_ARRAY_SUPPORT&&(lt.prototype.__proto__=Uint8Array.prototype,lt.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&lt[Symbol.species]);function xne(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 pPe(t,e,r,n){return xne(e),e<=0?Pl(t,e):r!==void 0?typeof n=="string"?Pl(t,e).fill(r,n):Pl(t,e).fill(r):Pl(t,e)}lt.alloc=function(t,e,r){return pPe(null,t,e,r)};function KM(t,e){if(xne(e),t=Pl(t,e<0?0:YM(e)|0),!lt.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}lt.allocUnsafe=function(t){return KM(null,t)};lt.allocUnsafeSlow=function(t){return KM(null,t)};function gPe(t,e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!lt.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=Ane(e,r)|0;t=Pl(t,n);var i=t.write(e,r);return i!==n&&(t=t.slice(0,i)),t}function d4(t,e){var r=e.length<0?0:YM(e.length)|0;t=Pl(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function yPe(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),lt.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=lt.prototype):t=d4(t,e),t}function mPe(t,e){if(Ou(e)){var r=YM(e.length)|0;return t=Pl(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"||kPe(e.length)?Pl(t,0):d4(t,e);if(e.type==="Buffer"&&_ne(e.data))return d4(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function YM(t){if(t>=FA())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+FA().toString(16)+" bytes");return t|0}lt.isBuffer=LPe;function Ou(t){return!!(t!=null&&t._isBuffer)}lt.compare=function(e,r){if(!Ou(e)||!Ou(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};lt.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}};lt.concat=function(e,r){if(!_ne(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return lt.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=lt.allocUnsafe(r),a=0;for(n=0;n<e.length;++n){var o=e[n];if(!Ou(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function Ane(t,e){if(Ou(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 jA(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Cne(t).length;default:if(n)return jA(t).length;e=(""+e).toLowerCase(),n=!0}}lt.byteLength=Ane;function vPe(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 PPe(this,e,r);case"utf8":case"utf-8":return Ine(this,e,r);case"ascii":return OPe(this,e,r);case"latin1":case"binary":return IPe(this,e,r);case"base64":return APe(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return TPe(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}lt.prototype._isBuffer=!0;function Dh(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}lt.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)Dh(this,r,r+1);return this};lt.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)Dh(this,r,r+3),Dh(this,r+1,r+2);return this};lt.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)Dh(this,r,r+7),Dh(this,r+1,r+6),Dh(this,r+2,r+5),Dh(this,r+3,r+4);return this};lt.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Ine(this,0,e):vPe.apply(this,arguments)};lt.prototype.equals=function(e){if(!Ou(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:lt.compare(this,e)===0};lt.prototype.inspect=function(){var e="",r=hPe;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"};lt.prototype.compare=function(e,r,n,i,a){if(!Ou(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 Sne(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=lt.from(e,n)),Ou(e))return e.length===0?-1:oG(t,e,r,n,i);if(typeof e=="number")return e=e&255,lt.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):oG(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function oG(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}lt.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};lt.prototype.indexOf=function(e,r,n){return Sne(this,e,r,n,!0)};lt.prototype.lastIndexOf=function(e,r,n){return Sne(this,e,r,n,!1)};function bPe(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 wPe(t,e,r,n){return qS(jA(e,t.length-r),t,r,n)}function One(t,e,r,n){return qS($Pe(e),t,r,n)}function _Pe(t,e,r,n){return One(t,e,r,n)}function EPe(t,e,r,n){return qS(Cne(e),t,r,n)}function xPe(t,e,r,n){return qS(MPe(e,t.length-r),t,r,n)}lt.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 bPe(this,e,r,n);case"utf8":case"utf-8":return wPe(this,e,r,n);case"ascii":return One(this,e,r,n);case"latin1":case"binary":return _Pe(this,e,r,n);case"base64":return EPe(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xPe(this,e,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};lt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function APe(t,e,r){return e===0&&r===t.length?aG(t):aG(t.slice(e,r))}function Ine(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 SPe(n)}var sG=4096;function SPe(t){var e=t.length;if(e<=sG)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=sG));return r}function OPe(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 IPe(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 PPe(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+=DPe(t[a]);return i}function TPe(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}lt.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(lt.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=lt.prototype;else{var a=r-e;i=new lt(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+e]}return i};function ta(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")}lt.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||ta(e,r,this.length);for(var i=this[e],a=1,o=0;++o<r&&(a*=256);)i+=this[e+o]*a;return i};lt.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||ta(e,r,this.length);for(var i=this[e+--r],a=1;r>0&&(a*=256);)i+=this[e+--r]*a;return i};lt.prototype.readUInt8=function(e,r){return r||ta(e,1,this.length),this[e]};lt.prototype.readUInt16LE=function(e,r){return r||ta(e,2,this.length),this[e]|this[e+1]<<8};lt.prototype.readUInt16BE=function(e,r){return r||ta(e,2,this.length),this[e]<<8|this[e+1]};lt.prototype.readUInt32LE=function(e,r){return r||ta(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};lt.prototype.readUInt32BE=function(e,r){return r||ta(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};lt.prototype.readIntLE=function(e,r,n){e=e|0,r=r|0,n||ta(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};lt.prototype.readIntBE=function(e,r,n){e=e|0,r=r|0,n||ta(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};lt.prototype.readInt8=function(e,r){return r||ta(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};lt.prototype.readInt16LE=function(e,r){r||ta(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};lt.prototype.readInt16BE=function(e,r){r||ta(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};lt.prototype.readInt32LE=function(e,r){return r||ta(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};lt.prototype.readInt32BE=function(e,r){return r||ta(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};lt.prototype.readFloatLE=function(e,r){return r||ta(e,4,this.length),BS(this,e,!0,23,4)};lt.prototype.readFloatBE=function(e,r){return r||ta(e,4,this.length),BS(this,e,!1,23,4)};lt.prototype.readDoubleLE=function(e,r){return r||ta(e,8,this.length),BS(this,e,!0,52,8)};lt.prototype.readDoubleBE=function(e,r){return r||ta(e,8,this.length),BS(this,e,!1,52,8)};function Fo(t,e,r,n,i,a){if(!Ou(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")}lt.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;Fo(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};lt.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;Fo(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};lt.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||Fo(this,e,r,1,255,0),lt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};function FS(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}lt.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r|0,n||Fo(this,e,r,2,65535,0),lt.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):FS(this,e,r,!0),r+2};lt.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||Fo(this,e,r,2,65535,0),lt.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):FS(this,e,r,!1),r+2};function jS(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}lt.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||Fo(this,e,r,4,4294967295,0),lt.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255):jS(this,e,r,!0),r+4};lt.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||Fo(this,e,r,4,4294967295,0),lt.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):jS(this,e,r,!1),r+4};lt.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r|0,!i){var a=Math.pow(2,8*n-1);Fo(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};lt.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r|0,!i){var a=Math.pow(2,8*n-1);Fo(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};lt.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||Fo(this,e,r,1,127,-128),lt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=e&255,r+1};lt.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r|0,n||Fo(this,e,r,2,32767,-32768),lt.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):FS(this,e,r,!0),r+2};lt.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||Fo(this,e,r,2,32767,-32768),lt.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):FS(this,e,r,!1),r+2};lt.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||Fo(this,e,r,4,2147483647,-2147483648),lt.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):jS(this,e,r,!0),r+4};lt.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||Fo(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),lt.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):jS(this,e,r,!1),r+4};function Pne(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 Tne(t,e,r,n,i){return i||Pne(t,e,r,4),wne(t,e,r,n,23,4),r+4}lt.prototype.writeFloatLE=function(e,r,n){return Tne(this,e,r,!0,n)};lt.prototype.writeFloatBE=function(e,r,n){return Tne(this,e,r,!1,n)};function Rne(t,e,r,n,i){return i||Pne(t,e,r,8),wne(t,e,r,n,52,8),r+8}lt.prototype.writeDoubleLE=function(e,r,n){return Rne(this,e,r,!0,n)};lt.prototype.writeDoubleBE=function(e,r,n){return Rne(this,e,r,!1,n)};lt.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||!lt.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};lt.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"&&!lt.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=Ou(e)?e:jA(new lt(e,i).toString()),c=s.length;for(o=0;o<n-r;++o)this[o+r]=s[o%c]}return this};var RPe=/[^+\/0-9A-Za-z-_]/g;function CPe(t){if(t=NPe(t).replace(RPe,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function NPe(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function DPe(t){return t<16?"0"+t.toString(16):t.toString(16)}function jA(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 $Pe(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function MPe(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 Cne(t){return uPe(CPe(t))}function qS(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 kPe(t){return t!==t}function LPe(t){return t!=null&&(!!t._isBuffer||Nne(t)||UPe(t))}function Nne(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function UPe(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Nne(t.slice(0,0))}var h4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r={Object,Array,Function,Number,String,Date,RegExp};typeof lt<"u"&&(r.Buffer=lt),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})(h4,h4.exports);var BPe=h4.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(BPe),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(f4,f4.exports);var FPe=f4.exports,p4={exports:{}},g4={exports:{}},HS={};Object.defineProperty(HS,"__esModule",{value:!0});function jPe(t){return()=>({keyword:t,type:"number",schemaType:"array",macro:function([r,n]){return e(r,n),t==="range"?{minimum:r,maximum:n}:{exclusiveMinimum:r,exclusiveMaximum:n}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function e(r,n){if(r>n||t==="exclusiveRange"&&r===n)throw new Error("There are no numbers in range")}}HS.default=jPe;(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const i=(0,r(HS).default)("range");e.default=i,t.exports=i})(g4,g4.exports);var qPe=g4.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(qPe),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(p4,p4.exports);var HPe=p4.exports,y4={exports:{}},m4={exports:{}};(function(t,e){var r=Ne&&Ne.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const i=(0,r(HS).default)("exclusiveRange");e.default=i,t.exports=i})(m4,m4.exports);var zPe=m4.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(zPe),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(y4,y4.exports);var VPe=y4.exports,v4={exports:{}},b4={exports:{}},jl={};Object.defineProperty(jl,"__esModule",{value:!0});jl.usePattern=jl.metaSchemaRef=void 0;const GPe=Pr,WPe="http://json-schema.org/schema";function KPe({defaultMeta:t}={}){return t===!1?{}:{$ref:t||WPe}}jl.metaSchemaRef=KPe;function YPe({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,GPe._)`new RegExp(${r}, ${n})`})}jl.usePattern=YPe;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Pr,n=jl,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})(b4,b4.exports);var QPe=b4.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(QPe),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(v4,v4.exports);var JPe=v4.exports,w4={exports:{}},_4={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})(_4,_4.exports);var XPe=_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(XPe),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(w4,w4.exports);var ZPe=w4.exports,E4={exports:{}},x4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=fM,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})(x4,x4.exports);var e3e=x4.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(e3e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(E4,E4.exports);var t3e=E4.exports,A4={exports:{}},S4={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})(S4,S4.exports);var r3e=S4.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(r3e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(A4,A4.exports);var n3e=A4.exports,O4={exports:{}},I4={exports:{}},zS={};Object.defineProperty(zS,"__esModule",{value:!0});function i3e(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"}}})}zS.default=i3e;(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(zS).default)("anyRequired");e.default=i,t.exports=i})(I4,I4.exports);var a3e=I4.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(a3e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(O4,O4.exports);var o3e=O4.exports,P4={exports:{}},T4={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(zS).default)("oneRequired");e.default=i,t.exports=i})(T4,T4.exports);var s3e=T4.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(s3e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(P4,P4.exports);var c3e=P4.exports,R4={exports:{}},C4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Pr,n=jl,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})(C4,C4.exports);var u3e=C4.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(u3e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(R4,R4.exports);var l3e=R4.exports,N4={exports:{}},D4={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})(D4,D4.exports);var f3e=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(f3e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(N4,N4.exports);var d3e=N4.exports,$4={exports:{}},M4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=jl;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})(M4,M4.exports);var h3e=M4.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(h3e),i=(a,o)=>a.addKeyword((0,n.default)(o));e.default=i,t.exports=i})($4,$4.exports);var p3e=$4.exports,k4={exports:{}},L4={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})(L4,L4.exports);var g3e=L4.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(g3e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(k4,k4.exports);var y3e=k4.exports,U4={exports:{}},B4={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})(B4,B4.exports);var m3e=B4.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(m3e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(U4,U4.exports);var v3e=U4.exports,F4={exports:{}},j4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Pr,n=jl,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})(j4,j4.exports);var b3e=j4.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(b3e),i=(a,o)=>((0,n.default)(o).forEach(s=>a.addKeyword(s)),a);e.default=i,t.exports=i})(F4,F4.exports);var w3e=F4.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(sPe),i=r(FPe),a=r(HPe),o=r(VPe),s=r(JPe),c=r(ZPe),u=r(t3e),f=r(n3e),d=r(o3e),g=r(c3e),m=r(l3e),w=r(d3e),v=r(p3e),y=r(y3e),_=r(v3e),b=r(w3e),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})(c4,c4.exports);var _3e=c4.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(_3e),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})(s4,s4.exports);var E3e=s4.exports,q4={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=vne,n=Pr,i=Uy,a=js,o=dm,s=Hc,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(Y(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(Y(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,Ve=>ne(Ve,Q,tt=>b.code(r._`${Q}[${tt}].push(${Ve})`).assign(r._`${Ve}.${u}`,!0))),b.forIn("key",Q,Ve=>b.if(r._`${Q}[${Ve}].length`,()=>{o.reportError(_,{message:r._`${Ve} in ${T} ? ${T}[${Ve}]() : ${O}${ce}[${Ve}]`,params:r._`{errors: ${Q}[${Ve}]}`}),b.assign(r._`${s.default.vErrors}[${s.default.errors}-1].instancePath`,r._`${I} + "/" + ${Ve}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),b.endIf();function fe(Ve,tt){b.assign(Q,r.stringify(Ve)),b.assign(T,j(Ve,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 Y(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})(q4,q4.exports);var x3e=q4.exports,QM=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 Dne=QM(vne);Ct.Ajv=Dne.default;const A3e=QM(E3e),S3e=QM(x3e);function O3e(t,e){let r=null;const n=(i,a)=>{if(!r){const o=new Dne.default({$data:!0,allErrors:!0});(0,A3e.default)(o),(0,S3e.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=O3e;function I3e(t,e){return t.validate(e)}Ct.validateType=I3e;var aN={},cG;function $ne(){return cG||(cG=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=t.ChainName=void 0;const e=Ct,r=as();var n;(function(a){a.ETHEREUM_MAINNET="Ethereum Mainnet",a.ETHEREUM_ROPSTEN="Ropsten",a.ETHEREUM_RINKEBY="Rinkeby",a.ETHEREUM_GOERLI="Goerli",a.ETHEREUM_KOVAN="Kovan",a.ETHEREUM_SEPOLIA="Sepolia",a.MATIC_MAINNET="Polygon",a.MATIC_MUMBAI="Mumbai"})(n=t.ChainName||(t.ChainName={}));function i(a){switch(a){case n.ETHEREUM_MAINNET:return r.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return r.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return r.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return r.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return r.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return r.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return r.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return r.ChainId.MATIC_MUMBAI;default:return null}}t.getChainId=i,function(a){a.schema={type:"string",enum:Object.values(a)},a.validate=(0,e.generateLazyValidator)(a.schema)}(n=t.ChainName||(t.ChainName={}))}(aN)),aN}var Xs={};(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={}))})(Xs);var uG;function as(){return uG||(uG=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=$ne(),n=Xs;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={}))}(ZC)),ZC}var Rc={};(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={}))})(Rc);var xg;(function(t){t.Update="Web3ReactUpdate",t.Error="Web3ReactError",t.Deactivate="Web3ReactDeactivate"})(xg||(xg={}));const P3e=Object.freeze(Object.defineProperty({__proto__:null,get ConnectorEvent(){return xg}},Symbol.toStringTag,{value:"Module"})),T3e=fo(P3e);var JM={},VS={},XM={exports:{}},Ag=typeof Reflect=="object"?Reflect:null,lG=Ag&&typeof Ag.apply=="function"?Ag.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},Ix;Ag&&typeof Ag.ownKeys=="function"?Ix=Ag.ownKeys:Object.getOwnPropertySymbols?Ix=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Ix=function(e){return Object.getOwnPropertyNames(e)};function R3e(t){console&&console.warn&&console.warn(t)}var Mne=Number.isNaN||function(e){return e!==e};function Ln(){Ln.init.call(this)}XM.exports=Ln;XM.exports.once=$3e;Ln.EventEmitter=Ln;Ln.prototype._events=void 0;Ln.prototype._eventsCount=0;Ln.prototype._maxListeners=void 0;var fG=10;function GS(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Ln,"defaultMaxListeners",{enumerable:!0,get:function(){return fG},set:function(t){if(typeof t!="number"||t<0||Mne(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");fG=t}});Ln.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};Ln.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Mne(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 kne(t){return t._maxListeners===void 0?Ln.defaultMaxListeners:t._maxListeners}Ln.prototype.getMaxListeners=function(){return kne(this)};Ln.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")lG(c,this,r);else for(var u=c.length,f=jne(c,u),n=0;n<u;++n)lG(f[n],this,r);return!0};function Lne(t,e,r,n){var i,a,o;if(GS(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=kne(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,R3e(s)}return t}Ln.prototype.addListener=function(e,r){return Lne(this,e,r,!1)};Ln.prototype.on=Ln.prototype.addListener;Ln.prototype.prependListener=function(e,r){return Lne(this,e,r,!0)};function C3e(){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 Une(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=C3e.bind(n);return i.listener=r,n.wrapFn=i,i}Ln.prototype.once=function(e,r){return GS(r),this.on(e,Une(this,e,r)),this};Ln.prototype.prependOnceListener=function(e,r){return GS(r),this.prependListener(e,Une(this,e,r)),this};Ln.prototype.removeListener=function(e,r){var n,i,a,o,s;if(GS(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():N3e(n,a),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,s||r)}return this};Ln.prototype.off=Ln.prototype.removeListener;Ln.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 Bne(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?D3e(i):jne(i,i.length)}Ln.prototype.listeners=function(e){return Bne(this,e,!0)};Ln.prototype.rawListeners=function(e){return Bne(this,e,!1)};Ln.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Fne.call(t,e)};Ln.prototype.listenerCount=Fne;function Fne(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}Ln.prototype.eventNames=function(){return this._eventsCount>0?Ix(this._events):[]};function jne(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function N3e(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function D3e(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function $3e(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))}qne(t,e,a,{once:!0}),e!=="error"&&M3e(t,i,{once:!0})})}function M3e(t,e,r){typeof t.on=="function"&&qne(t,"error",e,r)}function qne(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 po=XM.exports;const ZM=Bc(po);function k3e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var WS=function(t){k3e(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(xg.Update,i)},r.emitError=function(i){this.emit(xg.Error,i)},r.emitDeactivate=function(){this.emit(xg.Deactivate)},e}(po.EventEmitter);const L3e=Object.freeze(Object.defineProperty({__proto__:null,AbstractConnector:WS},Symbol.toStringTag,{value:"Module"})),Hne=fo(L3e);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractConnector=void 0;const e=Hne;Object.defineProperty(t,"AbstractConnector",{enumerable:!0,get:function(){return e.AbstractConnector}})})(VS);var KS={},ql={},zne={},Vne={},Gne={};(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={}))})(Gne);var Wne={};(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={}))})(Wne);(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(Gne,t),r(Wne,t)})(Vne);var Kne={},Yne={};(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={}))})(Yne);var Qne={},zw={};(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={}))})(zw);var Rd={};(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={}))})(Rd);var YS={},QS={};(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={}))})(QS);var JS={},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=Rd,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={}))})(JS);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WearableRepresentation=void 0;const e=Ct,r=QS,n=JS;(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={}))})(YS);var XS={},Jne={},tk={},Dp={};(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={}))})(Dp);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Avatar=t.Link=t.LinkUrl=t.AvatarInfo=t.Snapshots=void 0;const e=Rd,r=Dp,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 Xne={};(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={}))})(Xne);(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(Xne,t)})(Jne);var Zne={},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 eie={},gm={};Object.defineProperty(gm,"__esModule",{value:!0});gm.displayableProperties=void 0;gm.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=gm,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={}))})(eie);(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=eie;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}})})(Zne);var oN={},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 ZS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.isStandard=t.standardProperties=void 0;const e=zw,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})(ZS);var eO={},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})(eO);var tie={},rie={},Ml={};Object.defineProperty(Ml,"__esModule",{value:!0});Ml.isBaseAvatar=Ml.requiredBaseItemProps=Ml.baseItemProperties=void 0;const U3e=sk,B3e=uk,F3e=gm;Ml.baseItemProperties=Object.assign(Object.assign({},F3e.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:U3e.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({},B3e.Metrics.schema),{nullable:!0})});Ml.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function j3e(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}Ml.isBaseAvatar=j3e;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Wearable=void 0;const e=Ct,r=Rd,n=YS,i=Ml,a=ZS,o=eO,s=JS;(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={}))})(rie);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.HideableWearableCategory=t.BodyPartCategory=t.WearableCategory=t.Wearable=t.WearableRepresentation=void 0;var e=YS;Object.defineProperty(t,"WearableRepresentation",{enumerable:!0,get:function(){return e.WearableRepresentation}});var r=rie;Object.defineProperty(t,"Wearable",{enumerable:!0,get:function(){return r.Wearable}});var n=Rd;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=JS;Object.defineProperty(t,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}})})(tie);var sN={},cN={},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=QS;(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 dG;function q3e(){return dG||(dG=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Emote=void 0;const e=iie(),r=Ct,n=Ml,i=ZS,a=eO,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={}))}(cN)),cN}var nie={};(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={}))})(nie);var hG;function H3e(){return hG||(hG=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmotePlayMode=t.EmoteCategory=t.EmoteDataADR74=t.EmoteRepresentationADR74=t.Emote=void 0;var e=q3e();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=nie;Object.defineProperty(t,"EmotePlayMode",{enumerable:!0,get:function(){return a.EmotePlayMode}})}(sN)),sN}var pG;function iie(){return pG||(pG=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=QS;Object.defineProperty(t,"BodyShape",{enumerable:!0,get:function(){return o.BodyShape}});var s=ZS;Object.defineProperty(t,"isStandard",{enumerable:!0,get:function(){return s.isStandard}});var c=eO;Object.defineProperty(t,"isThirdParty",{enumerable:!0,get:function(){return c.isThirdParty}}),r(tie,t),r(H3e(),t)}(oN)),oN}var aie={};(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)})(aie);var oie={},tO={};(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={}))})(tO);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PointerChangesSyncDeployment=t.SnapshotSyncDeployment=void 0;const e=Dp,r=tO,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={}))})(oie);var sie={},pk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ContentMapping=void 0;const e=Dp,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=Dp,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={}))})(sie);var cie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeploymentWithAuthChain=void 0;const e=tO,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={}))})(cie);var uie={},lie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Outfits=t.Outfit=void 0;const e=Rd,r=Dp,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={}))})(lie);(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(lie,t)})(uie);(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(Jne,t),r(Zne,t),r(iie(),t),r(gm,t),r(aie,t),r(oie,t),r(sie,t),r(cie,t),r(uie,t)})(XS);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WearableJson=void 0;const e=zw,r=Rd,n=YS,i=Ct,a=XS;(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={}))})(Qne);(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(Yne,t),r(Qne,t)})(Kne);(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(Vne,t),r(Kne,t)})(zne);var fie={},rO={};(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={}))})(rO);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Bid=t.BidSortBy=void 0;const e=Ct,r=as(),n=rO,i=Xs;(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={}))})(fie);var die={};(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={}))})(die);var hie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=t.CollectionSortBy=void 0;const e=Ct,r=as(),n=Xs;(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={}))})(hie);var pie={},Vw={};(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={}))})(Vw);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=t.ContractSortBy=void 0;const e=Ct,r=as(),n=Xs,i=Vw;(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={}))})(pie);var gie={},gk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.NFT=t.NFTSortBy=void 0;const e=Ct,r=as(),n=XS,i=Xs,a=Vw,o=zw,s=Rd;(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=as(),n=Xs,i=gk,a=Vw;(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={}))})(gie);var yie={};(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={}))})(yie);var mie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Mint=t.MintSortBy=void 0;const e=Ct,r=as(),n=Xs;(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={}))})(mie);var vie={};(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={}))})(vie);var bie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Order=t.OrderSortBy=void 0;const e=Ct,r=as(),n=rO,i=Xs;(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={}))})(bie);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 wie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Sale=t.SaleSortBy=void 0;const e=Ct,r=as(),n=yk,i=Xs;(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={}))})(wie);var _ie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RentalListingCreation=t.PeriodCreation=t.RentalsListingsSortBy=t.RentalsListingsFilterByCategory=t.RentalsListingSortDirection=t.RentalStatus=void 0;const e=Ct,r=as(),n=Xs;(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={}))})(_ie);var Eie={};(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={}))})(Eie);var xie={};(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={}))})(xie);var Aie={};(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={}))})(Aie);var Sie={};(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={}))})(Sie);var nO={},Oie={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewCamera=void 0;const e=Ct;(function(r){r.STATIC="static",r.INTERACTIVE="interactive"})(t.PreviewCamera||(t.PreviewCamera={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.PreviewCamera||(t.PreviewCamera={}))})(Oie);var Iie={};Object.defineProperty(Iie,"__esModule",{value:!0});var Pie={};Object.defineProperty(Pie,"__esModule",{value:!0});var Tie={};(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={}))})(Tie);var Rie={};(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={}))})(Rie);var Cie={};(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})(Cie);var Nie={};Object.defineProperty(Nie,"__esModule",{value:!0});var Die={};(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={}))})(Die);var $ie={};(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={}))})($ie);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});var qie={};Object.defineProperty(qie,"__esModule",{value:!0});(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(n,i,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(i,a);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,o,s)}:function(n,i,a,o){o===void 0&&(o=a),n[o]=i[a]}),r=Ne&&Ne.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(Oie,t),r(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),r(qie,t)})(nO);var Hie={};(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={}))})(Hie);(function(t){var e=Ne&&Ne.__createBinding||(Object.create?function(B,U,Y,ne){ne===void 0&&(ne=Y);var F=Object.getOwnPropertyDescriptor(U,Y);(!F||("get"in F?!U.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return U[Y]}}),Object.defineProperty(B,ne,F)}:function(B,U,Y,ne){ne===void 0&&(ne=Y),B[ne]=U[Y]}),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 Y in B)Y!=="default"&&Object.prototype.hasOwnProperty.call(B,Y)&&e(U,B,Y);return r(U,B),U},i=Ne&&Ne.__exportStar||function(B,U){for(var Y in B)Y!=="default"&&!Object.prototype.hasOwnProperty.call(U,Y)&&e(U,B,Y)};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(zne);t.sdk=a,i(Ct,t);var o=fie;Object.defineProperty(t,"Bid",{enumerable:!0,get:function(){return o.Bid}}),Object.defineProperty(t,"BidSortBy",{enumerable:!0,get:function(){return o.BidSortBy}});var s=die;Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return s.Account}}),Object.defineProperty(t,"AccountSortBy",{enumerable:!0,get:function(){return s.AccountSortBy}});var c=as();Object.defineProperty(t,"ChainId",{enumerable:!0,get:function(){return c.ChainId}}),Object.defineProperty(t,"getChainName",{enumerable:!0,get:function(){return c.getChainName}}),Object.defineProperty(t,"getURNProtocol",{enumerable:!0,get:function(){return c.getURNProtocol}});var u=$ne();Object.defineProperty(t,"ChainName",{enumerable:!0,get:function(){return u.ChainName}}),Object.defineProperty(t,"getChainId",{enumerable:!0,get:function(){return u.getChainId}});var f=hie;Object.defineProperty(t,"Collection",{enumerable:!0,get:function(){return f.Collection}}),Object.defineProperty(t,"CollectionSortBy",{enumerable:!0,get:function(){return f.CollectionSortBy}});var d=pie;Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return d.Contract}}),Object.defineProperty(t,"ContractSortBy",{enumerable:!0,get:function(){return d.ContractSortBy}});var g=gie;Object.defineProperty(t,"Item",{enumerable:!0,get:function(){return g.Item}}),Object.defineProperty(t,"ItemSortBy",{enumerable:!0,get:function(){return g.ItemSortBy}});var m=rO;Object.defineProperty(t,"ListingStatus",{enumerable:!0,get:function(){return m.ListingStatus}});var w=yie;Object.defineProperty(t,"MetaTransaction",{enumerable:!0,get:function(){return w.MetaTransaction}});var v=mie;Object.defineProperty(t,"Mint",{enumerable:!0,get:function(){return v.Mint}}),Object.defineProperty(t,"MintSortBy",{enumerable:!0,get:function(){return v.MintSortBy}});var y=Xs;Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return y.Network}});var _=Vw;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=vie;Object.defineProperty(t,"CatalogSortBy",{enumerable:!0,get:function(){return S.CatalogSortBy}}),Object.defineProperty(t,"CatalogSortDirection",{enumerable:!0,get:function(){return S.CatalogSortDirection}});var x=bie;Object.defineProperty(t,"Order",{enumerable:!0,get:function(){return x.Order}}),Object.defineProperty(t,"OrderSortBy",{enumerable:!0,get:function(){return x.OrderSortBy}});var O=Rc;Object.defineProperty(t,"ProviderType",{enumerable:!0,get:function(){return O.ProviderType}});var E=zw;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=wie;Object.defineProperty(t,"Sale",{enumerable:!0,get:function(){return I.Sale}}),Object.defineProperty(t,"SaleSortBy",{enumerable:!0,get:function(){return I.SaleSortBy}});var C=_ie;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=Eie;Object.defineProperty(t,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return L.AnalyticsDayDataSortBy}});var q=xie;Object.defineProperty(t,"Store",{enumerable:!0,get:function(){return q.Store}});var le=Aie;Object.defineProperty(t,"WearableGender",{enumerable:!0,get:function(){return le.WearableGender}}),Object.defineProperty(t,"GenderFilterOption",{enumerable:!0,get:function(){return le.GenderFilterOption}});var pe=Sie;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(nO,t),i(XS,t),i(Dp,t),i(Hie,t),i(tO,t),i(pk,t)})(ql);var Vs={};Object.defineProperty(Vs,"__esModule",{value:!0});Vs.getRpcUrls=Vs.getConfiguration=void 0;const kn=as(),Za=Rc,z3e=Object.freeze({storageKey:"decentraland-connect-storage-key",[Za.ProviderType.INJECTED]:{},[Za.ProviderType.FORTMATIC]:{apiKeys:{[kn.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[kn.ChainId.ETHEREUM_ROPSTEN]:"pk_test_5B728BEFE5C10911",[kn.ChainId.ETHEREUM_RINKEBY]:"pk_test_5B728BEFE5C10911",[kn.ChainId.ETHEREUM_KOVAN]:"pk_test_5B728BEFE5C10911",[kn.ChainId.ETHEREUM_GOERLI]:"pk_test_5B728BEFE5C10911",[kn.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:L0(Za.ProviderType.FORTMATIC)},[Za.ProviderType.NETWORK]:{urls:L0(Za.ProviderType.NETWORK)},[Za.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:L0(Za.ProviderType.WALLET_LINK)},[Za.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:L0(Za.ProviderType.WALLET_CONNECT_V2),chains:{[kn.ChainId.ETHEREUM_MAINNET]:{chains:[kn.ChainId.ETHEREUM_MAINNET],optionalChains:[kn.ChainId.MATIC_MAINNET]},[kn.ChainId.ETHEREUM_GOERLI]:{chains:[kn.ChainId.ETHEREUM_GOERLI],optionalChains:[kn.ChainId.MATIC_MUMBAI]},[kn.ChainId.ETHEREUM_SEPOLIA]:{chains:[kn.ChainId.ETHEREUM_SEPOLIA],optionalChains:[kn.ChainId.MATIC_MUMBAI]}}},[Za.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:L0(Za.ProviderType.MAGIC),chains:[kn.ChainId.ETHEREUM_MAINNET,kn.ChainId.ETHEREUM_GOERLI,kn.ChainId.ETHEREUM_SEPOLIA,kn.ChainId.MATIC_MAINNET,kn.ChainId.MATIC_MUMBAI]}});function V3e(){return z3e}Vs.getConfiguration=V3e;function L0(t){const e={[kn.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[kn.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[kn.ChainId.ETHEREUM_ROPSTEN]:"https://rpc.decentraland.org/ropsten",[kn.ChainId.ETHEREUM_RINKEBY]:"https://rpc.decentraland.org/rinkeby",[kn.ChainId.ETHEREUM_GOERLI]:"https://rpc.decentraland.org/goerli",[kn.ChainId.ETHEREUM_KOVAN]:"https://rpc.decentraland.org/kovan",[kn.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[kn.ChainId.MATIC_MUMBAI]:"https://rpc.decentraland.org/mumbai"};let r="";switch(t){case Za.ProviderType.WALLET_LINK:r="walletlink";break;case Za.ProviderType.FORTMATIC:r="fortmatic";break;case Za.ProviderType.MAGIC:r="magic";break;case Za.ProviderType.WALLET_CONNECT_V2:r="walletconnect-v2";break}if(r)for(const n in e)e[n]+=`?project=${r}`;return e}Vs.getRpcUrls=L0;var uN,gG;function G3e(){return gG||(gG=1,uN=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(Y([])));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=Y,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:Y(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 Ve=le(fe,Q);if(Ve){if(Ve===y)continue;return Ve}}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,Ve=fe.value;return Ve&&typeof Ve=="object"&&a.call(Ve,"__await")?Promise.resolve(Ve.__await).then(function(tt){G("next",tt,te,ce)},function(tt){G("throw",tt,te,ce)}):Promise.resolve(Ve).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 Y(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=`
107
+ .fortmatic-iframe {
108
+ display: none;
109
+ position: fixed;
110
+ top: 0;
111
+ right: 0;
112
+ width: 100%;
113
+ height: 100%;
114
+ border: none;
115
+ border-radius: 0;
116
+ z-index: 2147483647;
117
+ }
118
+ `}])),uN}var W3e=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]}),K3e=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Y3e=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)&&W3e(e,t,r);return K3e(e,t),e};Object.defineProperty(KS,"__esModule",{value:!0});KS.FortmaticConnector=void 0;const Q3e=Hne,J3e=ql,X3e=Vs;class Z3e extends Q3e.AbstractConnector{constructor(e){const r=X3e.getConfiguration()[J3e.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(()=>Y3e(G3e()));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()}}KS.FortmaticConnector=Z3e;var iO={};function H4(){return H4=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},H4.apply(this,arguments)}function mk(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function z4(t){return z4=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},z4(t)}function qA(t,e){return qA=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},qA(t,e)}function eTe(){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 Px(t,e,r){return eTe()?Px=Reflect.construct:Px=function(i,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(i,s),u=new c;return o&&qA(u,o.prototype),u},Px.apply(null,arguments)}function tTe(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function HA(t){var e=typeof Map=="function"?new Map:void 0;return HA=function(n){if(n===null||!tTe(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 Px(n,arguments,z4(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),qA(i,n)},HA(t)}function AE(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function x0(t,e){try{var r=t()}catch(n){return e(n)}return r&&r.then?r.then(void 0,e):r}function Jc(t){return t.hasOwnProperty("result")?t.result:t}var Tx=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}(HA(Error)),zie=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}(HA(Error)),rTe=function(t){mk(e,t);function e(n){var i;return i=t.call(this,n)||this,i.handleNetworkChanged=i.handleNetworkChanged.bind(AE(i)),i.handleChainChanged=i.handleChainChanged.bind(AE(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(AE(i)),i.handleClose=i.handleClose.bind(AE(i)),i}var r=e.prototype;return r.handleChainChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},r.handleAccountsChanged=function(i){i.length===0?this.emitDeactivate():this.emitUpdate({account:i[0]})},r.handleClose=function(i,a){this.emitDeactivate()},r.handleNetworkChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},r.activate=function(){try{var i=function(f){if(a)return f;function d(){return H4({provider:window.ethereum},s?{account:s}:{})}var g=function(){if(!s)return Promise.resolve(window.ethereum.enable().then(function(m){return m&&Jc(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 Tx;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=x0(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(u){return Jc(u)[0]})).then(function(u){s=u})},function(u){if(u.code===4001)throw new zie});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=Jc(window.ethereum.send({method:"net_version"}))}catch{}return a||(window.ethereum.isDapper?a=Jc(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=x0(function(){return Promise.resolve(window.ethereum.send("net_version").then(Jc)).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 Tx;var a,o=x0(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(Jc)).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=Jc(window.ethereum.send({method:"eth_accounts"}))[0]),a}var u=function(){if(!a){var f=x0(function(){return Promise.resolve(window.ethereum.enable().then(function(d){return Jc(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 Tx;var a,o=x0(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(s){return Jc(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(x0(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(i){return Jc(i).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(i){return Promise.reject(i)}},e}(WS);const nTe=Object.freeze(Object.defineProperty({__proto__:null,InjectedConnector:rTe,NoEthereumProviderError:Tx,UserRejectedRequestError:zie},Symbol.toStringTag,{value:"Module"})),iTe=fo(nTe);Object.defineProperty(iO,"__esModule",{value:!0});iO.InjectedConnector=void 0;const aTe=iTe;class oTe extends aTe.InjectedConnector{constructor(e){super({supportedChainIds:[e]})}}iO.InjectedConnector=oTe;var aO={},sTe="Invariant failed";function yG(t,e){if(!t)throw new Error(sTe)}function Vie(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,M1(t,e)}function V4(t){return V4=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},V4(t)}function M1(t,e){return M1=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},M1(t,e)}function cTe(){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 Rx(t,e,r){return cTe()?Rx=Reflect.construct:Rx=function(i,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(i,s),u=new c;return o&&M1(u,o.prototype),u},Rx.apply(null,arguments)}function uTe(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function G4(t){var e=typeof Map=="function"?new Map:void 0;return G4=function(n){if(n===null||!uTe(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 Rx(n,arguments,V4(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),M1(i,n)},G4(t)}var Cx=function(t){Vie(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}(G4(Error)),lTe=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 Cx(c.status+": "+c.statusText,-32e3);return Promise.resolve(c.json()).then(function(u){if("error"in u){var f,d,g;throw new Cx(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 Cx("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},fTe=function(t){Vie(e,t);function e(n){var i,a=n.urls,o=n.defaultChainId;return o||Object.keys(a).length===1||yG(!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 lTe(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())||yG(!1),this.currentChainId=i,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:i})},e}(WS);const dTe=Object.freeze(Object.defineProperty({__proto__:null,NetworkConnector:fTe,RequestError:Cx},Symbol.toStringTag,{value:"Module"})),hTe=fo(dTe);Object.defineProperty(aO,"__esModule",{value:!0});aO.NetworkConnector=void 0;const pTe=Rc,gTe=hTe,yTe=Vs;class mTe extends gTe.NetworkConnector{constructor(e){super({urls:yTe.getConfiguration()[pTe.ProviderType.NETWORK].urls,defaultChainId:e})}}aO.NetworkConnector=mTe;var oO={};const vTe="modulepreload",bTe=function(t){return"https://cdn.decentraland.org/@dcl/auth-site/0.1.3-7378840092.commit-24eec55/"+t},mG={},Fy=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=bTe(a),a in mG)return;mG[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":vTe,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 W4(){return W4=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},W4.apply(this,arguments)}function wTe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,K4(t,e)}function K4(t,e){return K4=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},K4(t,e)}function vG(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var _Te=1,ETe=function(t){wTe(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(vG(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(vG(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(Fy(()=>import("./index-bbaa3fa3.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(W4({appName:i.appName,darkMode:i.darkMode},i.appLogoUrl?{appLogoUrl:i.appLogoUrl}:{})),i.provider=i.walletLink.makeWeb3Provider(i.url,_Te)})}();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}(WS);const xTe=Object.freeze(Object.defineProperty({__proto__:null,WalletLinkConnector:ETe},Symbol.toStringTag,{value:"Module"})),ATe=fo(xTe);Object.defineProperty(oO,"__esModule",{value:!0});oO.WalletLinkConnector=void 0;const STe=ql,OTe=ATe,ITe=Vs;class PTe extends OTe.WalletLinkConnector{constructor(e){const r=ITe.getConfiguration()[STe.ProviderType.WALLET_LINK];super({url:r.urls[e],appName:r.appName,supportedChainIds:[e]})}}oO.WalletLinkConnector=PTe;var sO={};const TTe=Symbol(),bG=Object.getPrototypeOf,Y4=new WeakMap,RTe=t=>t&&(Y4.has(t)?Y4.get(t):bG(t)===Object.prototype||bG(t)===Array.prototype),CTe=t=>RTe(t)&&t[TTe]||null,wG=(t,e=!0)=>{Y4.set(t,e)},lN=t=>typeof t=="object"&&t!==null,Of=new WeakMap,SE=new WeakSet,NTe=(t=Object.is,e=(u,f)=>new Proxy(u,f),r=u=>lN(u)&&!SE.has(u)&&(Array.isArray(u)||!(Symbol.iterator in u))&&!(u instanceof WeakMap)&&!(u instanceof WeakSet)&&!(u instanceof Error)&&!(u instanceof Number)&&!(u instanceof Date)&&!(u instanceof String)&&!(u instanceof RegExp)&&!(u instanceof ArrayBuffer),n=u=>{switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:throw u}},i=new WeakMap,a=(u,f,d=n)=>{const g=i.get(u);if((g==null?void 0:g[0])===f)return g[1];const m=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u));return wG(m,!0),i.set(u,[f,m]),Reflect.ownKeys(u).forEach(w=>{if(Object.getOwnPropertyDescriptor(m,w))return;const v=Reflect.get(u,w),y={value:v,enumerable:!0,configurable:!0};if(SE.has(v))wG(v,!1);else if(v instanceof Promise)delete y.value,y.get=()=>d(v);else if(Of.has(v)){const[_,b]=Of.get(v);y.value=a(_,b(),d)}Object.defineProperty(m,w,y)}),Object.preventExtensions(m)},o=new WeakMap,s=[1,1],c=u=>{if(!lN(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),lN(q)&&(q=CTe(q)||q);let U=q;if(q instanceof Promise)q.then(Y=>{q.status="fulfilled",q.value=Y,m(["resolve",[L],Y])}).catch(Y=>{q.status="rejected",q.reason=Y,m(["reject",[L],Y])});else{!Of.has(q)&&r(q)&&(U=c(q));const Y=!SE.has(U)&&Of.get(U);Y&&b(L,Y)}return Reflect.set(C,L,U,le),m(["set",[L],q,B]),!0}});o.set(u,p);const I=[O,v,a,x];return Of.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,Of,SE,t,e,r,n,i,a,o,s],[DTe]=NTe();function Cd(t={}){return DTe(t)}function $p(t,e,r){const n=Of.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 $Te(t,e){const r=Of.get(t),[n,i,a]=r;return a(n,i(),e)}const Ki=Cd({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),Gie={state:Ki,subscribe(t){return $p(Ki,()=>t(Ki))},push(t,e){t!==Ki.view&&(Ki.view=t,e&&(Ki.data=e),Ki.history.push(t))},reset(t){Ki.view=t,Ki.history=[t]},replace(t){Ki.history.length>1&&(Ki.history[Ki.history.length-1]=t,Ki.view=t)},goBack(){if(Ki.history.length>1){Ki.history.pop();const[t]=Ki.history.slice(-1);Ki.view=t}},setData(t){Ki.data=t}},Ma={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return Ma.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const t=navigator.userAgent.toLowerCase();return Ma.isMobile()&&(t.includes("iphone")||t.includes("ipad"))},isHttpUrl(t){return t.startsWith("http://")||t.startsWith("https://")},isArray(t){return Array.isArray(t)&&t.length>0},formatNativeUrl(t,e,r){if(Ma.isHttpUrl(t))return this.formatUniversalUrl(t,e,r);let n=t;n.includes("://")||(n=t.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r);const i=encodeURIComponent(e);return`${n}wc?uri=${i}`},formatUniversalUrl(t,e,r){if(!Ma.isHttpUrl(t))return this.formatNativeUrl(t,e,r);let n=t;n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,r);const i=encodeURIComponent(e);return`${n}wc?uri=${i}`},async wait(t){return new Promise(e=>{setTimeout(e,t)})},openHref(t,e){window.open(t,e,"noreferrer noopener")},setWalletConnectDeepLink(t,e){try{localStorage.setItem(Ma.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:e}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(t){try{const[e]=t.split("?");localStorage.setItem(Ma.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(Ma.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(Ma.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var t;const e=(t=Gie.state.data)==null?void 0:t.Wallet;if(!e)throw new Error('Missing "Wallet" view data');return e}},MTe=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),Ia=Cd({enabled:MTe,userSessionId:"",events:[],connectedWalletId:void 0}),kTe={state:Ia,subscribe(t){return $p(Ia.events,()=>t($Te(Ia.events[Ia.events.length-1])))},initialize(){Ia.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(Ia.userSessionId=crypto.randomUUID())},setConnectedWalletId(t){Ia.connectedWalletId=t},click(t){if(Ia.enabled){const e={type:"CLICK",name:t.name,userSessionId:Ia.userSessionId,timestamp:Date.now(),data:t};Ia.events.push(e)}},track(t){if(Ia.enabled){const e={type:"TRACK",name:t.name,userSessionId:Ia.userSessionId,timestamp:Date.now(),data:t};Ia.events.push(e)}},view(t){if(Ia.enabled){const e={type:"VIEW",name:t.name,userSessionId:Ia.userSessionId,timestamp:Date.now(),data:t};Ia.events.push(e)}}},Xc=Cd({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),Nc={state:Xc,subscribe(t){return $p(Xc,()=>t(Xc))},setChains(t){Xc.chains=t},setWalletConnectUri(t){Xc.walletConnectUri=t},setIsCustomDesktop(t){Xc.isCustomDesktop=t},setIsCustomMobile(t){Xc.isCustomMobile=t},setIsDataLoaded(t){Xc.isDataLoaded=t},setIsUiLoaded(t){Xc.isUiLoaded=t},setIsAuth(t){Xc.isAuth=t}},OE=Cd({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}),jy={state:OE,subscribe(t){return $p(OE,()=>t(OE))},setConfig(t){var e,r;kTe.initialize(),Nc.setChains(t.chains),Nc.setIsAuth(!!t.enableAuthMode),Nc.setIsCustomMobile(!!((e=t.mobileWallets)!=null&&e.length)),Nc.setIsCustomDesktop(!!((r=t.desktopWallets)!=null&&r.length)),Ma.setModalVersionInStorage(),Object.assign(OE,t)}};var LTe=Object.defineProperty,_G=Object.getOwnPropertySymbols,UTe=Object.prototype.hasOwnProperty,BTe=Object.prototype.propertyIsEnumerable,EG=(t,e,r)=>e in t?LTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,FTe=(t,e)=>{for(var r in e||(e={}))UTe.call(e,r)&&EG(t,r,e[r]);if(_G)for(var r of _G(e))BTe.call(e,r)&&EG(t,r,e[r]);return t};const Q4="https://explorer-api.walletconnect.com",J4="wcm",X4="js-2.6.2";async function IE(t,e){const r=FTe({sdkType:J4,sdkVersion:X4},e),n=new URL(t,Q4);return n.searchParams.append("projectId",jy.state.projectId),Object.entries(r).forEach(([i,a])=>{a&&n.searchParams.append(i,String(a))}),(await fetch(n)).json()}const oh={async getDesktopListings(t){return IE("/w3m/v1/getDesktopListings",t)},async getMobileListings(t){return IE("/w3m/v1/getMobileListings",t)},async getInjectedListings(t){return IE("/w3m/v1/getInjectedListings",t)},async getAllListings(t){return IE("/w3m/v1/getAllListings",t)},getWalletImageUrl(t){return`${Q4}/w3m/v1/getWalletImage/${t}?projectId=${jy.state.projectId}&sdkType=${J4}&sdkVersion=${X4}`},getAssetImageUrl(t){return`${Q4}/w3m/v1/getAssetImage/${t}?projectId=${jy.state.projectId}&sdkType=${J4}&sdkVersion=${X4}`}};var jTe=Object.defineProperty,xG=Object.getOwnPropertySymbols,qTe=Object.prototype.hasOwnProperty,HTe=Object.prototype.propertyIsEnumerable,AG=(t,e,r)=>e in t?jTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zTe=(t,e)=>{for(var r in e||(e={}))qTe.call(e,r)&&AG(t,r,e[r]);if(xG)for(var r of xG(e))HTe.call(e,r)&&AG(t,r,e[r]);return t};const SG=Ma.isMobile(),Zc=Cd({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),CWe={state:Zc,async getRecomendedWallets(){const{explorerRecommendedWalletIds:t,explorerExcludedWalletIds:e}=jy.state;if(t==="NONE"||e==="ALL"&&!t)return Zc.recomendedWallets;if(Ma.isArray(t)){const r={recommendedIds:t.join(",")},{listings:n}=await oh.getAllListings(r),i=Object.values(n);i.sort((a,o)=>{const s=t.indexOf(a.id),c=t.indexOf(o.id);return s-c}),Zc.recomendedWallets=i}else{const{chains:r,isAuth:n}=Nc.state,i=r==null?void 0:r.join(","),a=Ma.isArray(e),o={page:1,sdks:n?"auth_v1":void 0,entries:Ma.RECOMMENDED_WALLET_AMOUNT,chains:i,version:2,excludedIds:a?e.join(","):void 0},{listings:s}=SG?await oh.getMobileListings(o):await oh.getDesktopListings(o);Zc.recomendedWallets=Object.values(s)}return Zc.recomendedWallets},async getWallets(t){const e=zTe({},t),{explorerRecommendedWalletIds:r,explorerExcludedWalletIds:n}=jy.state,{recomendedWallets:i}=Zc;if(n==="ALL")return Zc.wallets;i.length?e.excludedIds=i.map(d=>d.id).join(","):Ma.isArray(r)&&(e.excludedIds=r.join(",")),Ma.isArray(n)&&(e.excludedIds=[e.excludedIds,n].filter(Boolean).join(",")),Nc.state.isAuth&&(e.sdks="auth_v1");const{page:a,search:o}=t,{listings:s,total:c}=SG?await oh.getMobileListings(e):await oh.getDesktopListings(e),u=Object.values(s),f=o?"search":"wallets";return Zc[f]={listings:[...Zc[f].listings,...u],total:c,page:a??1},{listings:u,total:c}},getWalletImageUrl(t){return oh.getWalletImageUrl(t)},getAssetImageUrl(t){return oh.getAssetImageUrl(t)},resetSearch(){Zc.search={listings:[],total:0,page:1}}},A0=Cd({open:!1}),fN={state:A0,subscribe(t){return $p(A0,()=>t(A0))},async open(t){return new Promise(e=>{const{isUiLoaded:r,isDataLoaded:n}=Nc.state;if(Ma.removeWalletConnectDeepLink(),Nc.setWalletConnectUri(t==null?void 0:t.uri),Nc.setChains(t==null?void 0:t.chains),Gie.reset("ConnectWallet"),r&&n)A0.open=!0,e();else{const i=setInterval(()=>{const a=Nc.state;a.isUiLoaded&&a.isDataLoaded&&(clearInterval(i),A0.open=!0,e())},200)}})},close(){A0.open=!1}};var VTe=Object.defineProperty,OG=Object.getOwnPropertySymbols,GTe=Object.prototype.hasOwnProperty,WTe=Object.prototype.propertyIsEnumerable,IG=(t,e,r)=>e in t?VTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,KTe=(t,e)=>{for(var r in e||(e={}))GTe.call(e,r)&&IG(t,r,e[r]);if(OG)for(var r of OG(e))WTe.call(e,r)&&IG(t,r,e[r]);return t};function YTe(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const Dv=Cd({themeMode:YTe()?"dark":"light"}),PG={state:Dv,subscribe(t){return $p(Dv,()=>t(Dv))},setThemeConfig(t){const{themeMode:e,themeVariables:r}=t;e&&(Dv.themeMode=e),r&&(Dv.themeVariables=KTe({},r))}},sh=Cd({open:!1,message:"",variant:"success"}),NWe={state:sh,subscribe(t){return $p(sh,()=>t(sh))},openToast(t,e){sh.open=!0,sh.message=t,sh.variant=e},closeToast(){sh.open=!1}};let QTe=class{constructor(e){this.openModal=fN.open,this.closeModal=fN.close,this.subscribeModal=fN.subscribe,this.setTheme=PG.setThemeConfig,PG.setThemeConfig(e),jy.setConfig(e),this.initUi()}async initUi(){if(typeof window<"u"){await Fy(()=>import("./index-10563468.js"),[]);const e=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",e),Nc.setIsUiLoaded(!0)}}};const JTe=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:QTe},Symbol.toStringTag,{value:"Module"})),XTe=fo(JTe);function Wie(){throw new Error("setTimeout has not been defined")}function Kie(){throw new Error("clearTimeout has not been defined")}var xf=Wie,Af=Kie;typeof bn.setTimeout=="function"&&(xf=setTimeout);typeof bn.clearTimeout=="function"&&(Af=clearTimeout);function Yie(t){if(xf===setTimeout)return setTimeout(t,0);if((xf===Wie||!xf)&&setTimeout)return xf=setTimeout,setTimeout(t,0);try{return xf(t,0)}catch{try{return xf.call(null,t,0)}catch{return xf.call(this,t,0)}}}function ZTe(t){if(Af===clearTimeout)return clearTimeout(t);if((Af===Kie||!Af)&&clearTimeout)return Af=clearTimeout,clearTimeout(t);try{return Af(t)}catch{try{return Af.call(null,t)}catch{return Af.call(this,t)}}}var Tl=[],Sg=!1,$h,Nx=-1;function eRe(){!Sg||!$h||(Sg=!1,$h.length?Tl=$h.concat(Tl):Nx=-1,Tl.length&&Qie())}function Qie(){if(!Sg){var t=Yie(eRe);Sg=!0;for(var e=Tl.length;e;){for($h=Tl,Tl=[];++Nx<e;)$h&&$h[Nx].run();Nx=-1,e=Tl.length}$h=null,Sg=!1,ZTe(t)}}function tRe(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];Tl.push(new Jie(t,e)),Tl.length===1&&!Sg&&Yie(Qie)}function Jie(t,e){this.fun=t,this.array=e}Jie.prototype.run=function(){this.fun.apply(null,this.array)};var rRe="browser",nRe="browser",iRe=!0,aRe={},oRe=[],sRe="",cRe={},uRe={},lRe={};function Mp(){}var fRe=Mp,dRe=Mp,hRe=Mp,pRe=Mp,gRe=Mp,yRe=Mp,mRe=Mp;function vRe(t){throw new Error("process.binding is not supported")}function bRe(){return"/"}function wRe(t){throw new Error("process.chdir is not supported")}function _Re(){return 0}var U0=bn.performance||{},ERe=U0.now||U0.mozNow||U0.msNow||U0.oNow||U0.webkitNow||function(){return new Date().getTime()};function xRe(t){var e=ERe.call(U0)*.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 ARe=new Date;function SRe(){var t=new Date,e=t-ARe;return e/1e3}var za={nextTick:tRe,title:rRe,browser:iRe,env:aRe,argv:oRe,version:sRe,versions:cRe,on:fRe,addListener:dRe,once:hRe,off:pRe,removeListener:gRe,removeAllListeners:yRe,emit:mRe,binding:vRe,cwd:bRe,chdir:wRe,umask:_Re,hrtime:xRe,platform:nRe,release:uRe,config:lRe,uptime:SRe},vk={},cO={},kr={},Xie={};(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}})(Xie);Object.defineProperty(kr,"__esModule",{value:!0});var Zie=Xie;function ORe(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}kr.readInt16BE=ORe;function IRe(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}kr.readUint16BE=IRe;function PRe(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}kr.readInt16LE=PRe;function TRe(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}kr.readUint16LE=TRe;function eae(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=eae;kr.writeInt16BE=eae;function tae(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=tae;kr.writeInt16LE=tae;function Z4(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}kr.readInt32BE=Z4;function e5(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=e5;function t5(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}kr.readInt32LE=t5;function r5(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=r5;function zA(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=zA;kr.writeInt32BE=zA;function VA(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=VA;kr.writeInt32LE=VA;function RRe(t,e){e===void 0&&(e=0);var r=Z4(t,e),n=Z4(t,e+4);return r*4294967296+n-(n>>31)*4294967296}kr.readInt64BE=RRe;function CRe(t,e){e===void 0&&(e=0);var r=e5(t,e),n=e5(t,e+4);return r*4294967296+n}kr.readUint64BE=CRe;function NRe(t,e){e===void 0&&(e=0);var r=t5(t,e),n=t5(t,e+4);return n*4294967296+r-(r>>31)*4294967296}kr.readInt64LE=NRe;function DRe(t,e){e===void 0&&(e=0);var r=r5(t,e),n=r5(t,e+4);return n*4294967296+r}kr.readUint64LE=DRe;function rae(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),zA(t/4294967296>>>0,e,r),zA(t>>>0,e,r+4),e}kr.writeUint64BE=rae;kr.writeInt64BE=rae;function nae(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),VA(t>>>0,e,r),VA(t/4294967296>>>0,e,r+4),e}kr.writeUint64LE=nae;kr.writeInt64LE=nae;function $Re(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=$Re;function MRe(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=MRe;function kRe(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(!Zie.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=kRe;function LRe(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(!Zie.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=LRe;function URe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e)}kr.readFloat32BE=URe;function BRe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e,!0)}kr.readFloat32LE=BRe;function FRe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e)}kr.readFloat64BE=FRe;function jRe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e,!0)}kr.readFloat64LE=jRe;function qRe(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=qRe;function HRe(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=HRe;function zRe(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=zRe;function VRe(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=VRe;var os={};Object.defineProperty(os,"__esModule",{value:!0});function GRe(t){for(var e=0;e<t.length;e++)t[e]=0;return t}os.wipe=GRe;Object.defineProperty(cO,"__esModule",{value:!0});var Pa=kr,n5=os,WRe=20;function KRe(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,Y=y,ne=_,F=b,j=0;j<WRe;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,Y^=x,Y=Y>>>32-16|Y<<16,le=le+Y|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,Y^=x,Y=Y>>>32-8|Y<<8,le=le+Y|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,Y^=O,Y=Y>>>32-16|Y<<16,q=q+Y|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,Y^=O,Y=Y>>>32-8|Y<<8,q=q+Y|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;Pa.writeUint32LE(S+n|0,t,0),Pa.writeUint32LE(x+i|0,t,4),Pa.writeUint32LE(O+a|0,t,8),Pa.writeUint32LE(E+o|0,t,12),Pa.writeUint32LE(p+s|0,t,16),Pa.writeUint32LE(I+c|0,t,20),Pa.writeUint32LE(C+u|0,t,24),Pa.writeUint32LE(L+f|0,t,28),Pa.writeUint32LE(q+d|0,t,32),Pa.writeUint32LE(le+g|0,t,36),Pa.writeUint32LE(pe+m|0,t,40),Pa.writeUint32LE(B+w|0,t,44),Pa.writeUint32LE(U+v|0,t,48),Pa.writeUint32LE(Y+y|0,t,52),Pa.writeUint32LE(ne+_|0,t,56),Pa.writeUint32LE(F+b|0,t,60)}function iae(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){KRe(s,a,t);for(var u=c;u<c+64&&u<r.length;u++)n[u]=r[u]^s[u-c];QRe(a,0,o)}return n5.wipe(s),i===0&&n5.wipe(a),n}cO.streamXOR=iae;function YRe(t,e,r,n){return n===void 0&&(n=0),n5.wipe(r),iae(t,e,r,r,n)}cO.stream=YRe;function QRe(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 aae={},Nd={};Object.defineProperty(Nd,"__esModule",{value:!0});function JRe(t,e,r){return~(t-1)&e|t-1&r}Nd.select=JRe;function XRe(t,e){return(t|0)-(e|0)-1>>>31&1}Nd.lessOrEqual=XRe;function oae(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}Nd.compare=oae;function ZRe(t,e){return t.length===0||e.length===0?!1:oae(t,e)!==0}Nd.equal=ZRe;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Nd,r=os;t.DIGEST_LENGTH=16;var n=function(){function o(s){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var c=s[0]|s[1]<<8;this._r[0]=c&8191;var u=s[2]|s[3]<<8;this._r[1]=(c>>>13|u<<3)&8191;var f=s[4]|s[5]<<8;this._r[2]=(u>>>10|f<<6)&7939;var d=s[6]|s[7]<<8;this._r[3]=(f>>>7|d<<9)&8191;var g=s[8]|s[9]<<8;this._r[4]=(d>>>4|g<<12)&255,this._r[5]=g>>>1&8190;var m=s[10]|s[11]<<8;this._r[6]=(g>>>14|m<<2)&8191;var w=s[12]|s[13]<<8;this._r[7]=(m>>>11|w<<5)&8065;var v=s[14]|s[15]<<8;this._r[8]=(w>>>8|v<<8)&8191,this._r[9]=v>>>5&127,this._pad[0]=s[16]|s[17]<<8,this._pad[1]=s[18]|s[19]<<8,this._pad[2]=s[20]|s[21]<<8,this._pad[3]=s[22]|s[23]<<8,this._pad[4]=s[24]|s[25]<<8,this._pad[5]=s[26]|s[27]<<8,this._pad[6]=s[28]|s[29]<<8,this._pad[7]=s[30]|s[31]<<8}return o.prototype._blocks=function(s,c,u){for(var f=this._fin?0:2048,d=this._h[0],g=this._h[1],m=this._h[2],w=this._h[3],v=this._h[4],y=this._h[5],_=this._h[6],b=this._h[7],S=this._h[8],x=this._h[9],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 Y=s[c+2]|s[c+3]<<8;g+=(U>>>13|Y<<3)&8191;var ne=s[c+4]|s[c+5]<<8;m+=(Y>>>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 Ve=k;Ve+=d*pe,Ve+=g*le,Ve+=m*q,Ve+=w*L,Ve+=v*C,k=Ve>>>13,Ve&=8191,Ve+=y*I,Ve+=_*p,Ve+=b*E,Ve+=S*O,Ve+=x*(5*B),k+=Ve>>>13,Ve&=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=Ve,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})(aae);(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=cO,r=aae,n=os,i=kr,a=Nd;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 sae={},Gw={},bk={};Object.defineProperty(bk,"__esModule",{value:!0});function eCe(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}bk.isSerializableHash=eCe;Object.defineProperty(Gw,"__esModule",{value:!0});var eu=bk,tCe=Nd,rCe=os,cae=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),eu.isSerializableHash(this._inner)&&eu.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),rCe.wipe(n)}return t.prototype.reset=function(){if(!eu.isSerializableHash(this._inner)||!eu.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(){eu.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),eu.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(!eu.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(!eu.isSerializableHash(this._inner)||!eu.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(!eu.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},t}();Gw.HMAC=cae;function nCe(t,e,r){var n=new cae(t,e);n.update(r);var i=n.digest();return n.clean(),i}Gw.hmac=nCe;Gw.equal=tCe.equal;Object.defineProperty(sae,"__esModule",{value:!0});var TG=Gw,RG=os,iCe=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=TG.hmac(this._hash,n,r);this._hmac=new TG.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(),RG.wipe(this._buffer),RG.wipe(this._counter),this._bufpos=0},t}(),aCe=sae.HKDF=iCe,ym={},uO={},lO={};Object.defineProperty(lO,"__esModule",{value:!0});lO.BrowserRandomSource=void 0;const CG=65536;class oCe{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+=CG)this._crypto.getRandomValues(r.subarray(n,n+Math.min(r.length-n,CG)));return r}}lO.BrowserRandomSource=oCe;function i5(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 fO={};const sCe={},cCe=Object.freeze(Object.defineProperty({__proto__:null,default:sCe},Symbol.toStringTag,{value:"Module"})),wk=fo(cCe);Object.defineProperty(fO,"__esModule",{value:!0});fO.NodeRandomSource=void 0;const uCe=os;class lCe{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof i5<"u"){const e=wk;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,uCe.wipe)(r),n}}fO.NodeRandomSource=lCe;Object.defineProperty(uO,"__esModule",{value:!0});uO.SystemRandomSource=void 0;const fCe=lO,dCe=fO;class hCe{constructor(){if(this.isAvailable=!1,this.name="",this._source=new fCe.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new dCe.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)}}uO.SystemRandomSource=hCe;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const e=uO,r=kr,n=os;t.defaultRandomSource=new e.SystemRandomSource;function i(u,f=t.defaultRandomSource){return f.randomBytes(u)}t.randomBytes=i;function a(u=t.defaultRandomSource){const f=i(4,u),d=(0,r.readUint32LE)(f);return(0,n.wipe)(f),d}t.randomUint32=a;const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function s(u,f=o,d=t.defaultRandomSource){if(f.length<2)throw new Error("randomString charset is too short");if(f.length>256)throw new Error("randomString charset is too long");let g="";const m=f.length,w=256-256%m;for(;u>0;){const v=i(Math.ceil(u*256/w),d);for(let y=0;y<v.length&&u>0;y++){const _=v[y];_<w&&(g+=f.charAt(_%m),u--)}(0,n.wipe)(v)}return g}t.randomString=s;function c(u,f=o,d=t.defaultRandomSource){const g=Math.ceil(u/(Math.log(f.length)/Math.LN2));return s(g,f,d)}t.randomStringForEntropy=c})(ym);var dO={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=kr,r=os;t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64;var n=function(){function s(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return s.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},s.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},s.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},s.prototype.update=function(c,u){if(u===void 0&&(u=c.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var f=0;if(this._bytesHashed+=u,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&u>0;)this._buffer[this._bufferLength++]=c[f++],u--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(u>=this.blockSize&&(f=a(this._temp,this._state,c,f,u),u%=this.blockSize);u>0;)this._buffer[this._bufferLength++]=c[f++],u--;return this},s.prototype.finish=function(c){if(!this._finished){var u=this._bytesHashed,f=this._bufferLength,d=u/536870912|0,g=u<<3,m=u%64<56?64:128;this._buffer[f]=128;for(var w=f+1;w<m-8;w++)this._buffer[w]=0;e.writeUint32BE(d,this._buffer,m-8),e.writeUint32BE(g,this._buffer,m-4),a(this._temp,this._state,this._buffer,0,m),this._finished=!0}for(var w=0;w<this.digestLength/4;w++)e.writeUint32BE(this._state[w],c,w*4);return this},s.prototype.digest=function(){var c=new Uint8Array(this.digestLength);return this.finish(c),c},s.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(c){return this._state.set(c.state),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(c){r.wipe(c.state),c.buffer&&r.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},s}();t.SHA256=n;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function a(s,c,u,f,d){for(;d>=64;){for(var g=c[0],m=c[1],w=c[2],v=c[3],y=c[4],_=c[5],b=c[6],S=c[7],x=0;x<16;x++){var 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})(dO);var _k={};(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=ym,r=os;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,Y=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,Ve=0,tt=0,vt=0,bt=0,yt=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],Vt=E[6],$t=E[7],Dt=E[8],qt=E[9],Mt=E[10],cr=E[11],tr=E[12],ir=E[13],nr=E[14],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*Vt,Y+=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,Y+=p*Vt,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,Y+=p*Ut,ne+=p*Vt,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,Y+=p*Kt,ne+=p*Ut,F+=p*Vt,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,Y+=p*Nt,ne+=p*Kt,F+=p*Ut,j+=p*Vt,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,Y+=p*kt,ne+=p*Nt,F+=p*Kt,j+=p*Ut,z+=p*Vt,$+=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,Y+=p*Pt,ne+=p*kt,F+=p*Nt,j+=p*Kt,z+=p*Ut,$+=p*Vt,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],Y+=p*Rt,ne+=p*Pt,F+=p*kt,j+=p*Nt,z+=p*Kt,$+=p*Ut,H+=p*Vt,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*Vt,M+=p*$t,G+=p*Dt,ge+=p*qt,Q+=p*Mt,te+=p*cr,ce+=p*tr,T+=p*ir,fe+=p*nr,Ve+=p*mr,p=O[9],F+=p*Rt,j+=p*Pt,z+=p*kt,$+=p*Nt,H+=p*Kt,k+=p*Ut,M+=p*Vt,G+=p*$t,ge+=p*Dt,Q+=p*qt,te+=p*Mt,ce+=p*cr,T+=p*tr,fe+=p*ir,Ve+=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*Vt,ge+=p*$t,Q+=p*Dt,te+=p*qt,ce+=p*Mt,T+=p*cr,fe+=p*tr,Ve+=p*ir,tt+=p*nr,vt+=p*mr,p=O[11],z+=p*Rt,$+=p*Pt,H+=p*kt,k+=p*Nt,M+=p*Kt,G+=p*Ut,ge+=p*Vt,Q+=p*$t,te+=p*Dt,ce+=p*qt,T+=p*Mt,fe+=p*cr,Ve+=p*tr,tt+=p*ir,vt+=p*nr,bt+=p*mr,p=O[12],$+=p*Rt,H+=p*Pt,k+=p*kt,M+=p*Nt,G+=p*Kt,ge+=p*Ut,Q+=p*Vt,te+=p*$t,ce+=p*Dt,T+=p*qt,fe+=p*Mt,Ve+=p*cr,tt+=p*tr,vt+=p*ir,bt+=p*nr,yt+=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*Vt,ce+=p*$t,T+=p*Dt,fe+=p*qt,Ve+=p*Mt,tt+=p*cr,vt+=p*tr,bt+=p*ir,yt+=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*Vt,T+=p*$t,fe+=p*Dt,Ve+=p*qt,tt+=p*Mt,vt+=p*cr,bt+=p*tr,yt+=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*Vt,fe+=p*$t,Ve+=p*Dt,tt+=p*qt,vt+=p*Mt,bt+=p*cr,yt+=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,Y+=38*Ve,ne+=38*tt,F+=38*vt,j+=38*bt,z+=38*yt,$+=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=Y+I+65535,I=Math.floor(p/65536),Y=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=Y+I+65535,I=Math.floor(p/65536),Y=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]=Y,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 Y=new Uint8Array(32);return c(Y,U),Y}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})(_k);function Ek(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function uae(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Ek(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function a5(t,e){e||(e=t.reduce((i,a)=>i+a.length,0));const r=uae(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return Ek(r)}function pCe(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 gCe=pCe,yCe=gCe;const mCe=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")},vCe=t=>new TextEncoder().encode(t),bCe=t=>new TextDecoder().decode(t);let wCe=class{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")}},_Ce=class{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 lae(this,e)}};class ECe{constructor(e){this.decoders=e}or(e){return lae(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 lae=(t,e)=>new ECe({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class xCe{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new wCe(e,r,n),this.decoder=new _Ce(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const hO=({name:t,prefix:e,encode:r,decode:n})=>new xCe(t,e,r,n),Ww=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=yCe(r,e);return hO({prefix:t,name:e,encode:n,decode:a=>mCe(i(a))})},ACe=(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},SCe=(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})=>hO({prefix:e,name:t,encode(i){return SCe(i,n,r)},decode(i){return ACe(i,n,r,t)}}),OCe=hO({prefix:"\0",name:"identity",encode:t=>bCe(t),decode:t=>vCe(t)}),ICe=Object.freeze(Object.defineProperty({__proto__:null,identity:OCe},Symbol.toStringTag,{value:"Module"})),PCe=wa({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),TCe=Object.freeze(Object.defineProperty({__proto__:null,base2:PCe},Symbol.toStringTag,{value:"Module"})),RCe=wa({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),CCe=Object.freeze(Object.defineProperty({__proto__:null,base8:RCe},Symbol.toStringTag,{value:"Module"})),NCe=Ww({prefix:"9",name:"base10",alphabet:"0123456789"}),DCe=Object.freeze(Object.defineProperty({__proto__:null,base10:NCe},Symbol.toStringTag,{value:"Module"})),$Ce=wa({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),MCe=wa({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),kCe=Object.freeze(Object.defineProperty({__proto__:null,base16:$Ce,base16upper:MCe},Symbol.toStringTag,{value:"Module"})),LCe=wa({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),UCe=wa({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),BCe=wa({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),FCe=wa({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),jCe=wa({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),qCe=wa({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),HCe=wa({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),zCe=wa({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),VCe=wa({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),GCe=Object.freeze(Object.defineProperty({__proto__:null,base32:LCe,base32hex:jCe,base32hexpad:HCe,base32hexpadupper:zCe,base32hexupper:qCe,base32pad:BCe,base32padupper:FCe,base32upper:UCe,base32z:VCe},Symbol.toStringTag,{value:"Module"})),WCe=Ww({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),KCe=Ww({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),YCe=Object.freeze(Object.defineProperty({__proto__:null,base36:WCe,base36upper:KCe},Symbol.toStringTag,{value:"Module"})),QCe=Ww({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),JCe=Ww({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),XCe=Object.freeze(Object.defineProperty({__proto__:null,base58btc:QCe,base58flickr:JCe},Symbol.toStringTag,{value:"Module"})),ZCe=wa({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),eNe=wa({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),tNe=wa({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),rNe=wa({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),nNe=Object.freeze(Object.defineProperty({__proto__:null,base64:ZCe,base64pad:eNe,base64url:tNe,base64urlpad:rNe},Symbol.toStringTag,{value:"Module"})),fae=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),iNe=fae.reduce((t,e,r)=>(t[r]=e,t),[]),aNe=fae.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function oNe(t){return t.reduce((e,r)=>(e+=iNe[r],e),"")}function sNe(t){const e=[];for(const r of t){const n=aNe[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const cNe=hO({prefix:"🚀",name:"base256emoji",encode:oNe,decode:sNe}),uNe=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:cNe},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const NG={...ICe,...TCe,...CCe,...DCe,...kCe,...GCe,...YCe,...XCe,...nNe,...uNe};function dae(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const DG=dae("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),dN=dae("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=uae(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),hae={utf8:DG,"utf-8":DG,hex:NG.base16,latin1:dN,ascii:dN,binary:dN,...NG};function Do(t,e="utf8"){const r=hae[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Ek(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}function lo(t,e="utf8"){const r=hae[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 $G=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))},lNe=function(){function t(e,r,n){this.name=e,this.version=r,this.os=n,this.type="browser"}return t}(),fNe=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=za.platform}return t}(),dNe=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}(),hNe=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),pNe=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),gNe=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,yNe=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,MG=3,mNe=[["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",gNe]],kG=[["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 vNe(t){return t?LG(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new pNe:typeof navigator<"u"?LG(navigator.userAgent):_Ne()}function bNe(t){return t!==""&&mNe.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 LG(t){var e=bNe(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new hNe;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<MG&&(i=$G($G([],i,!0),ENe(MG-i.length),!0)):i=[];var a=i.join("."),o=wNe(t),s=yNe.exec(t);return s&&s[1]?new dNe(r,a,o,s[1]):new lNe(r,a,o)}function wNe(t){for(var e=0,r=kG.length;e<r;e++){var n=kG[e],i=n[0],a=n[1],o=a.exec(t);if(o)return i}return null}function _Ne(){var t=typeof za<"u"&&za.version;return t?new fNe(za.version.slice(1)):null}function ENe(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}var Zt={};/*! *****************************************************************************
119
+ Copyright (c) Microsoft Corporation.
120
+
121
+ Permission to use, copy, modify, and/or distribute this software for any
122
+ purpose with or without fee is hereby granted.
123
+
124
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
125
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
126
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
127
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
128
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
129
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
130
+ PERFORMANCE OF THIS SOFTWARE.
131
+ ***************************************************************************** */var o5=function(t,e){return o5=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])},o5(t,e)};function xNe(t,e){o5(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var s5=function(){return s5=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},s5.apply(this,arguments)};function ANe(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 SNe(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 ONe(t,e){return function(r,n){e(r,n,t)}}function INe(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function PNe(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 TNe(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 RNe(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function CNe(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function c5(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 pae(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 NNe(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(pae(arguments[e]));return t}function DNe(){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 k1(t){return this instanceof k1?(this.v=t,this):new k1(t)}function $Ne(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 k1?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 MNe(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:k1(t[i](o)),done:i==="return"}:a?a(o):o}:a}}function kNe(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 c5=="function"?c5(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 LNe(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function UNe(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 BNe(t){return t&&t.__esModule?t:{default:t}}function FNe(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function jNe(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 qNe=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return s5},__asyncDelegator:MNe,__asyncGenerator:$Ne,__asyncValues:kNe,__await:k1,__awaiter:PNe,__classPrivateFieldGet:FNe,__classPrivateFieldSet:jNe,__createBinding:RNe,__decorate:SNe,__exportStar:CNe,__extends:xNe,__generator:TNe,__importDefault:BNe,__importStar:UNe,__makeTemplateObject:LNe,__metadata:INe,__param:ONe,__read:pae,__rest:ANe,__spread:NNe,__spreadArrays:DNe,__values:c5},Symbol.toStringTag,{value:"Module"})),Zs=fo(qNe);var hN={},$v={},UG;function HNe(){if(UG)return $v;UG=1,Object.defineProperty($v,"__esModule",{value:!0}),$v.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return $v.delay=t,$v}var ch={},pN={},uh={},BG;function zNe(){return BG||(BG=1,Object.defineProperty(uh,"__esModule",{value:!0}),uh.ONE_THOUSAND=uh.ONE_HUNDRED=void 0,uh.ONE_HUNDRED=100,uh.ONE_THOUSAND=1e3),uh}var gN={},FG;function VNe(){return FG||(FG=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}(gN)),gN}var jG;function gae(){return jG||(jG=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zs;e.__exportStar(zNe(),t),e.__exportStar(VNe(),t)}(pN)),pN}var qG;function GNe(){if(qG)return ch;qG=1,Object.defineProperty(ch,"__esModule",{value:!0}),ch.fromMiliseconds=ch.toMiliseconds=void 0;const t=gae();function e(n){return n*t.ONE_THOUSAND}ch.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return ch.fromMiliseconds=r,ch}var HG;function WNe(){return HG||(HG=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zs;e.__exportStar(HNe(),t),e.__exportStar(GNe(),t)}(hN)),hN}var S0={},zG;function KNe(){if(zG)return S0;zG=1,Object.defineProperty(S0,"__esModule",{value:!0}),S0.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 S0.Watch=t,S0.default=t,S0}var yN={},Mv={},VG;function YNe(){if(VG)return Mv;VG=1,Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.IWatch=void 0;class t{}return Mv.IWatch=t,Mv}var GG;function QNe(){return GG||(GG=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Zs.__exportStar(YNe(),t)}(yN)),yN}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zs;e.__exportStar(WNe(),t),e.__exportStar(KNe(),t),e.__exportStar(QNe(),t),e.__exportStar(gae(),t)})(Zt);var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.getLocalStorage=Hn.getLocalStorageOrThrow=Hn.getCrypto=Hn.getCryptoOrThrow=mae=Hn.getLocation=Hn.getLocationOrThrow=xk=Hn.getNavigator=Hn.getNavigatorOrThrow=yae=Hn.getDocument=Hn.getDocumentOrThrow=Hn.getFromWindowOrThrow=Hn.getFromWindow=void 0;function kp(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}Hn.getFromWindow=kp;function mm(t){const e=kp(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}Hn.getFromWindowOrThrow=mm;function JNe(){return mm("document")}Hn.getDocumentOrThrow=JNe;function XNe(){return kp("document")}var yae=Hn.getDocument=XNe;function ZNe(){return mm("navigator")}Hn.getNavigatorOrThrow=ZNe;function e6e(){return kp("navigator")}var xk=Hn.getNavigator=e6e;function t6e(){return mm("location")}Hn.getLocationOrThrow=t6e;function r6e(){return kp("location")}var mae=Hn.getLocation=r6e;function n6e(){return mm("crypto")}Hn.getCryptoOrThrow=n6e;function i6e(){return kp("crypto")}Hn.getCrypto=i6e;function a6e(){return mm("localStorage")}Hn.getLocalStorageOrThrow=a6e;function o6e(){return kp("localStorage")}Hn.getLocalStorage=o6e;var Ak={};Object.defineProperty(Ak,"__esModule",{value:!0});var vae=Ak.getWindowMetadata=void 0;const WG=Hn;function s6e(){let t,e;try{t=WG.getDocumentOrThrow(),e=WG.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}}vae=Ak.getWindowMetadata=s6e;var L1={},c6e=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),bae="%[a-f0-9]{2}",KG=new RegExp("("+bae+")|([^%]+?)","gi"),YG=new RegExp("("+bae+")+","gi");function u5(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([],u5(r),u5(n))}function u6e(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(KG)||[],r=1;r<e.length;r++)t=u5(e,r).join(""),e=t.match(KG)||[];return t}}function l6e(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},r=YG.exec(t);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch{var n=u6e(r[0]);n!==r[0]&&(e[r[0]]=n)}r=YG.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 f6e=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 l6e(t)}},d6e=(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)]},h6e=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=c6e,r=f6e,n=d6e,i=h6e,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)}})(L1);const p6e={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"}},g6e=":";function y6e(t){const[e,r]=t.split(g6e);return{namespace:e,reference:r}}function m6e(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 wae(t,e){return t.includes(":")?[t]:e.chains||[]}const _ae="base10",uo="base16",l5="base64pad",Sk="utf8",Eae=0,Lp=1,v6e=0,QG=1,f5=12,Ok=32;function b6e(){const t=_k.generateKeyPair();return{privateKey:lo(t.secretKey,uo),publicKey:lo(t.publicKey,uo)}}function d5(){const t=ym.randomBytes(Ok);return lo(t,uo)}function w6e(t,e){const r=_k.sharedKey(Do(t,uo),Do(e,uo),!0),n=new aCe(dO.SHA256,r).expand(Ok);return lo(n,uo)}function _6e(t){const e=dO.hash(Do(t,uo));return lo(e,uo)}function Og(t){const e=dO.hash(Do(t,Sk));return lo(e,uo)}function E6e(t){return Do(`${t}`,_ae)}function Kw(t){return Number(lo(t,_ae))}function x6e(t){const e=E6e(typeof t.type<"u"?t.type:Eae);if(Kw(e)===Lp&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?Do(t.senderPublicKey,uo):void 0,n=typeof t.iv<"u"?Do(t.iv,uo):ym.randomBytes(f5),i=new vk.ChaCha20Poly1305(Do(t.symKey,uo)).seal(n,Do(t.message,Sk));return S6e({type:e,sealed:i,iv:n,senderPublicKey:r})}function A6e(t){const e=new vk.ChaCha20Poly1305(Do(t.symKey,uo)),{sealed:r,iv:n}=GA(t.encoded),i=e.open(n,r);if(i===null)throw new Error("Failed to decrypt");return lo(i,Sk)}function S6e(t){if(Kw(t.type)===Lp){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return lo(a5([t.type,t.senderPublicKey,t.iv,t.sealed]),l5)}return lo(a5([t.type,t.iv,t.sealed]),l5)}function GA(t){const e=Do(t,l5),r=e.slice(v6e,QG),n=QG;if(Kw(r)===Lp){const s=n+Ok,c=s+f5,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+f5,a=e.slice(n,i),o=e.slice(i);return{type:r,sealed:o,iv:a}}function O6e(t,e){const r=GA(t);return xae({type:Kw(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?lo(r.senderPublicKey,uo):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function xae(t){const e=(t==null?void 0:t.type)||Eae;if(e===Lp){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 JG(t){return t.type===Lp&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var I6e=Object.defineProperty,XG=Object.getOwnPropertySymbols,P6e=Object.prototype.hasOwnProperty,T6e=Object.prototype.propertyIsEnumerable,ZG=(t,e,r)=>e in t?I6e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,eW=(t,e)=>{for(var r in e||(e={}))P6e.call(e,r)&&ZG(t,r,e[r]);if(XG)for(var r of XG(e))T6e.call(e,r)&&ZG(t,r,e[r]);return t};const R6e="ReactNative",es={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},C6e="js";function Ik(){return typeof za<"u"&&typeof za.versions<"u"&&typeof za.versions.node<"u"}function Yw(){return!yae()&&!!xk()&&navigator.product===R6e}function Qw(){return!Ik()&&!!xk()}function Jw(){return Yw()?es.reactNative:Ik()?es.node:Qw()?es.browser:es.unknown}function N6e(t,e){let r=L1.parse(t);return r=eW(eW({},r),e),t=L1.stringify(r),t}function D6e(){return vae()||{name:"",description:"",url:"",icons:[""]}}function $6e(){if(Jw()===es.reactNative&&typeof bn<"u"&&typeof(bn==null?void 0:bn.Platform)<"u"){const{OS:r,Version:n}=bn.Platform;return[r,n].join("-")}const t=vNe();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 M6e(){var t;const e=Jw();return e===es.browser?[e,((t=mae())==null?void 0:t.host)||"unknown"].join(":"):e}function k6e(t,e,r){const n=$6e(),i=M6e();return[[t,e].join("-"),[C6e,r].join("-"),n,i].join("/")}function L6e({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:a,useOnCloseEvent:o}){const s=r.split("?"),c=k6e(t,e,n),u={auth:i,ua:c,projectId:a,useOnCloseEvent:o||void 0},f=N6e(s[1]||"",u);return s[0]+"?"+f}function Mh(t,e){return t.filter(r=>e.includes(r)).length===t.length}function Aae(t){return Object.fromEntries(t.entries())}function Sae(t){return new Map(Object.entries(t))}function B0(t=Zt.FIVE_MINUTES,e){const r=Zt.toMiliseconds(t||Zt.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 U1(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 Oae(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 U6e(t){return Oae("topic",t)}function B6e(t){return Oae("id",t)}function Iae(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 Sc(t,e){return Zt.fromMiliseconds((e||Date.now())+Zt.toMiliseconds(t))}function If(t){return Date.now()>=Zt.toMiliseconds(t)}function Ri(t,e){return`${t}${e?`:${e}`:""}`}function mN(t=[],e=[]){return[...new Set([...t,...e])]}async function F6e({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=Jw();o===es.browser?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):o===es.reactNative&&typeof(bn==null?void 0:bn.Linking)<"u"&&await bn.Linking.openURL(a)}catch(n){console.error(n)}}const j6e="irn";function h5(t){return(t==null?void 0:t.relay)||{protocol:j6e}}function Dx(t){const e=p6e[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var q6e=Object.defineProperty,tW=Object.getOwnPropertySymbols,H6e=Object.prototype.hasOwnProperty,z6e=Object.prototype.propertyIsEnumerable,rW=(t,e,r)=>e in t?q6e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,V6e=(t,e)=>{for(var r in e||(e={}))H6e.call(e,r)&&rW(t,r,e[r]);if(tW)for(var r of tW(e))z6e.call(e,r)&&rW(t,r,e[r]);return t};function G6e(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 W6e(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=L1.parse(a);return{protocol:n,topic:K6e(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:G6e(o)}}function K6e(t){return t.startsWith("//")?t.substring(2):t}function Y6e(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 Q6e(t){return`${t.protocol}:${t.topic}@${t.version}?`+L1.stringify(V6e({symKey:t.symKey},Y6e(t.relay)))}function vm(t){const e=[];return t.forEach(r=>{const[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function J6e(t){const e=[];return Object.values(t).forEach(r=>{e.push(...vm(r.accounts))}),e}function X6e(t,e){const r=[];return Object.values(t).forEach(n=>{vm(n.accounts).includes(e)&&r.push(...n.methods)}),r}function Z6e(t,e){const r=[];return Object.values(t).forEach(n=>{vm(n.accounts).includes(e)&&r.push(...n.events)}),r}function e8e(t,e){const r=$x(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 Pk(t){return t.includes(":")}function Ob(t){return Pk(t)?t.split(":")[0]:t}const t8e={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}},r8e={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}=r8e[t];return{message:e?`${r} ${e}`:r,code:n}}function xi(t,e){const{message:r,code:n}=t8e[t];return{message:e?`${r} ${e}`:r,code:n}}function Iu(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function Ig(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function io(t){return typeof t>"u"}function Ji(t,e){return e&&io(t)?!0:typeof t=="string"&&!!t.trim().length}function Tk(t,e){return e&&io(t)?!0:typeof t=="number"&&!isNaN(t)}function n8e(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let a=!0;return Mh(i,n)?(n.forEach(o=>{const{accounts:s,methods:c,events:u}=t.namespaces[o],f=vm(s),d=r[o];(!Mh(wae(o,d),f)||!Mh(d.methods,c)||!Mh(d.events,u))&&(a=!1)}),a):!1}function WA(t){return Ji(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function i8e(t){if(Ji(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&WA(r)}}return!1}function a8e(t){if(Ji(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function o8e(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function s8e(t){return t==null?void 0:t.topic}function c8e(t,e){let r=null;return Ji(t==null?void 0:t.publicKey,!1)||(r=Tt("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function nW(t){let e=!0;return Iu(t)?t.length&&(e=t.every(r=>Ji(r,!1))):e=!1,e}function u8e(t,e,r){let n=null;return Iu(e)&&e.length?e.forEach(i=>{n||WA(i)||(n=xi("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):WA(t)||(n=xi("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function l8e(t,e,r){let n=null;return Object.entries(t).forEach(([i,a])=>{if(n)return;const o=u8e(i,wae(i,a),`${e} ${r}`);o&&(n=o)}),n}function f8e(t,e){let r=null;return Iu(t)?t.forEach(n=>{r||i8e(n)||(r=xi("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=xi("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function d8e(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=f8e(n==null?void 0:n.accounts,`${e} namespace`);i&&(r=i)}),r}function h8e(t,e){let r=null;return nW(t==null?void 0:t.methods)?nW(t==null?void 0:t.events)||(r=xi("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=xi("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function Pae(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=h8e(n,`${e}, namespace`);i&&(r=i)}),r}function p8e(t,e,r){let n=null;if(t&&Ig(t)){const i=Pae(t,e);i&&(n=i);const a=l8e(t,e,r);a&&(n=a)}else n=Tt("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function $x(t,e){let r=null;if(t&&Ig(t)){const n=Pae(t,e);n&&(r=n);const i=d8e(t,e);i&&(r=i)}else r=Tt("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function Tae(t){return Ji(t.protocol,!0)}function g8e(t,e){let r=!1;return e&&!t?r=!0:t&&Iu(t)&&t.length&&t.forEach(n=>{r=Tae(n)}),r}function y8e(t){return typeof t=="number"}function xo(t){return typeof t<"u"&&typeof t!==null}function m8e(t){return!(!t||typeof t!="object"||!t.code||!Tk(t.code,!1)||!t.message||!Ji(t.message,!1))}function v8e(t){return!(io(t)||!Ji(t.method,!1))}function b8e(t){return!(io(t)||io(t.result)&&io(t.error)||!Tk(t.id,!1)||!Ji(t.jsonrpc,!1))}function w8e(t){return!(io(t)||!Ji(t.name,!1))}function iW(t,e){return!(!WA(e)||!J6e(t).includes(e))}function _8e(t,e,r){return Ji(r,!1)?X6e(t,e).includes(r):!1}function E8e(t,e,r){return Ji(r,!1)?Z6e(t,e).includes(r):!1}function aW(t,e,r){let n=null;const i=x8e(t),a=A8e(e),o=Object.keys(i),s=Object.keys(a),c=oW(Object.keys(t)),u=oW(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.
132
+ Required: ${f.toString()}
133
+ Received: ${Object.keys(e).toString()}`)),Mh(o,s)||(n=Tt("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.
134
+ Required: ${o.toString()}
135
+ Approved: ${s.toString()}`)),Object.keys(e).forEach(d=>{if(!d.includes(":")||n)return;const g=vm(e[d].accounts);g.includes(d)||(n=Tt("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${d}
136
+ Required: ${d}
137
+ Approved: ${g.toString()}`))}),o.forEach(d=>{n||(Mh(i[d].methods,a[d].methods)?Mh(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 x8e(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 oW(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function A8e(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=vm(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 S8e(t,e){return Tk(t,!1)&&t<=e.max&&t>=e.min}function sW(){const t=Jw();return new Promise(e=>{switch(t){case es.browser:e(O8e());break;case es.reactNative:e(I8e());break;case es.node:e(P8e());break;default:e(!0)}})}function O8e(){return Qw()&&(navigator==null?void 0:navigator.onLine)}async function I8e(){if(Yw()&&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 P8e(){return!0}function T8e(t){switch(Jw()){case es.browser:R8e(t);break;case es.reactNative:C8e(t);break}}function R8e(t){!Yw()&&Qw()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}function C8e(t){Yw()&&typeof bn<"u"&&bn!=null&&bn.NetInfo&&(bn==null||bn.NetInfo.addEventListener(e=>t(e==null?void 0:e.isConnected)))}const vN={};let PE=class{static get(e){return vN[e]}static set(e,r){vN[e]=r}static delete(e){delete vN[e]}};var pO={},Xw={};Object.defineProperty(Xw,"__esModule",{value:!0});function N8e(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}}Xw.safeJsonParse=N8e;function D8e(t){return typeof t=="string"?t:JSON.stringify(t,(e,r)=>typeof r>"u"?null:r)}Xw.safeJsonStringify=D8e;var kv={exports:{}},cW;function $8e(){return cW||(cW=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?kv.exports=Ne.localStorage:typeof window<"u"&&window.localStorage?kv.exports=window.localStorage:kv.exports=new e}()),kv.exports}var bN={},Lv={},uW;function M8e(){if(uW)return Lv;uW=1,Object.defineProperty(Lv,"__esModule",{value:!0}),Lv.IKeyValueStorage=void 0;class t{}return Lv.IKeyValueStorage=t,Lv}var Uv={},lW;function k8e(){if(lW)return Uv;lW=1,Object.defineProperty(Uv,"__esModule",{value:!0}),Uv.parseEntry=void 0;const t=Xw;function e(r){var n;return[r[0],t.safeJsonParse((n=r[1])!==null&&n!==void 0?n:"")]}return Uv.parseEntry=e,Uv}var fW;function L8e(){return fW||(fW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zs;e.__exportStar(M8e(),t),e.__exportStar(k8e(),t)}(bN)),bN}Object.defineProperty(pO,"__esModule",{value:!0});pO.KeyValueStorage=void 0;const F0=Zs,dW=Xw,U8e=F0.__importDefault($8e()),B8e=L8e();class Rae{constructor(){this.localStorage=U8e.default}getKeys(){return F0.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return F0.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(B8e.parseEntry)})}getItem(e){return F0.__awaiter(this,void 0,void 0,function*(){const r=this.localStorage.getItem(e);if(r!==null)return dW.safeJsonParse(r)})}setItem(e,r){return F0.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(e,dW.safeJsonStringify(r))})}removeItem(e){return F0.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(e)})}}pO.KeyValueStorage=Rae;var F8e=pO.default=Rae,bm={},Bv={},wN={},Fv={};let Up=class{};const j8e=Object.freeze(Object.defineProperty({__proto__:null,IEvents:Up},Symbol.toStringTag,{value:"Module"})),q8e=fo(j8e);var hW;function H8e(){if(hW)return Fv;hW=1,Object.defineProperty(Fv,"__esModule",{value:!0}),Fv.IHeartBeat=void 0;const t=q8e;class e extends t.IEvents{constructor(n){super()}}return Fv.IHeartBeat=e,Fv}var pW;function Cae(){return pW||(pW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Zs.__exportStar(H8e(),t)}(wN)),wN}var _N={},lh={},gW;function z8e(){if(gW)return lh;gW=1,Object.defineProperty(lh,"__esModule",{value:!0}),lh.HEARTBEAT_EVENTS=lh.HEARTBEAT_INTERVAL=void 0;const t=Zt;return lh.HEARTBEAT_INTERVAL=t.FIVE_SECONDS,lh.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},lh}var yW;function Nae(){return yW||(yW=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Zs.__exportStar(z8e(),t)}(_N)),_N}var mW;function V8e(){if(mW)return Bv;mW=1,Object.defineProperty(Bv,"__esModule",{value:!0}),Bv.HeartBeat=void 0;const t=Zs,e=po,r=Zt,n=Cae(),i=Nae();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 Bv.HeartBeat=a,Bv}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zs;e.__exportStar(V8e(),t),e.__exportStar(Cae(),t),e.__exportStar(Nae(),t)})(bm);var un={},EN,vW;function G8e(){if(vW)return EN;vW=1;function t(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}EN=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 EN}var xN,bW;function W8e(){if(bW)return xN;bW=1;const t=G8e();xN=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:Y}),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 Y(){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,Y=i.levels.values[U],ne=i.levels.values[I];if(ne<Y)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 xN}var fh={},wW;function Dae(){return wW||(wW=1,Object.defineProperty(fh,"__esModule",{value:!0}),fh.PINO_CUSTOM_CONTEXT_KEY=fh.PINO_LOGGER_DEFAULTS=void 0,fh.PINO_LOGGER_DEFAULTS={level:"info"},fh.PINO_CUSTOM_CONTEXT_KEY="custom_context"),fh}var Ja={},_W;function K8e(){if(_W)return Ja;_W=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.generateChildLogger=Ja.formatChildLoggerContext=Ja.getLoggerContext=Ja.setBrowserLoggerContext=Ja.getBrowserLoggerContext=Ja.getDefaultLoggerOptions=void 0;const t=Dae();function e(s){return Object.assign(Object.assign({},s),{level:(s==null?void 0:s.level)||t.PINO_LOGGER_DEFAULTS.level})}Ja.getDefaultLoggerOptions=e;function r(s,c=t.PINO_CUSTOM_CONTEXT_KEY){return s[c]||""}Ja.getBrowserLoggerContext=r;function n(s,c,u=t.PINO_CUSTOM_CONTEXT_KEY){return s[u]=c,s}Ja.setBrowserLoggerContext=n;function i(s,c=t.PINO_CUSTOM_CONTEXT_KEY){let u="";return typeof s.bindings>"u"?u=r(s,c):u=s.bindings().context||"",u}Ja.getLoggerContext=i;function a(s,c,u=t.PINO_CUSTOM_CONTEXT_KEY){const f=i(s,u);return f.trim()?`${f}/${c}`:c}Ja.formatChildLoggerContext=a;function o(s,c,u=t.PINO_CUSTOM_CONTEXT_KEY){const f=a(s,c,u),d=s.child({context:f});return n(d,f,u)}return Ja.generateChildLogger=o,Ja}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const e=Zs,r=e.__importDefault(W8e());Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return r.default}}),e.__exportStar(Dae(),t),e.__exportStar(K8e(),t)})(un);class Y8e extends Up{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}let Q8e=class extends Up{constructor(e,r){super(),this.core=e,this.logger=r,this.records=new Map}};class J8e{constructor(e,r){this.logger=e,this.core=r}}let X8e=class extends Up{constructor(e,r){super(),this.relayer=e,this.logger=r}},Z8e=class extends Up{constructor(e){super()}},e4e=class{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}};class t4e extends Up{constructor(e,r){super(),this.relayer=e,this.logger=r}}let r4e=class extends Up{constructor(e,r){super(),this.core=e,this.logger=r}},n4e=class{constructor(e,r){this.projectId=e,this.logger=r}},i4e=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},a4e=class{constructor(e){this.client=e}};const o4e=t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString()+"n":r),s4e=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 Rk(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return s4e(t)}catch{return t}}function B1(t){return typeof t=="string"?t:o4e(t)||""}var Ck={},$ae={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=kr,r=os;t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var n=function(){function s(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return s.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},s.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},s.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},s.prototype.update=function(c,u){if(u===void 0&&(u=c.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var f=0;if(this._bytesHashed+=u,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&u>0;)this._buffer[this._bufferLength++]=c[f++],u--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(u>=this.blockSize&&(f=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,c,f,u),u%=this.blockSize);u>0;)this._buffer[this._bufferLength++]=c[f++],u--;return this},s.prototype.finish=function(c){if(!this._finished){var u=this._bytesHashed,f=this._bufferLength,d=u/536870912|0,g=u<<3,m=u%128<112?128:256;this._buffer[f]=128;for(var w=f+1;w<m-8;w++)this._buffer[w]=0;e.writeUint32BE(d,this._buffer,m-8),e.writeUint32BE(g,this._buffer,m-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,m),this._finished=!0}for(var w=0;w<this.digestLength/8;w++)e.writeUint32BE(this._stateHi[w],c,w*8),e.writeUint32BE(this._stateLo[w],c,w*8+4);return this},s.prototype.digest=function(){var c=new Uint8Array(this.digestLength);return this.finish(c),c},s.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(c){return this._stateHi.set(c.stateHi),this._stateLo.set(c.stateLo),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(c){r.wipe(c.stateHi),r.wipe(c.stateLo),c.buffer&&r.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},s}();t.SHA512=n;var i=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function a(s,c,u,f,d,g,m){for(var w=u[0],v=u[1],y=u[2],_=u[3],b=u[4],S=u[5],x=u[6],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,Y,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,Ve=E,tt=p,vt=I,bt=C,yt=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,Y=z&65535|$<<16,ne=F&65535|j<<16,B=Y,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=bt,F=U&65535,j=U>>>16,z=B&65535,$=B>>>16,B=Y,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,bt=F&65535|j<<16,v=M,y=G,_=ge,b=Q,S=te,x=ce,O=T,w=fe,p=Ve,I=tt,C=vt,L=bt,q=yt,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,Y=s[(k+1)%16],ne=c[(k+1)%16],B=(Y>>>1|ne<<32-1)^(Y>>>8|ne<<32-8)^Y>>>7,U=(ne>>>1|Y<<32-1)^(ne>>>8|Y<<32-8)^(ne>>>7|Y<<32-7),F+=U&65535,j+=U>>>16,z+=B&65535,$+=B>>>16,Y=s[(k+14)%16],ne=c[(k+14)%16],B=(Y>>>19|ne<<32-19)^(ne>>>61-32|Y<<32-(61-32))^Y>>>6,U=(ne>>>19|Y<<32-19)^(Y>>>61-32|ne<<32-(61-32))^(ne>>>6|Y<<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})($ae);(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=ym,r=$ae,n=os;t.SIGNATURE_LENGTH=64,t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=64,t.SEED_LENGTH=32;function i(Q){const te=new Float64Array(16);if(Q)for(let 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 Ve=T&(Q[fe]^te[fe]);Q[fe]^=Ve,te[fe]^=Ve}}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 Ve=ce[15]>>16&1;ce[14]&=65535,v(T,ce,1-Ve)}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,Ve=0,tt=0,vt=0,bt=0,yt=0,Lt=0,Yt=0,wr=0,Rt=0,Pt=0,kt=0,Nt=0,Kt=0,Ut=0,Vt=0,$t=0,Dt=0,qt=0,Mt=0,cr=0,tr=0,ir=0,nr=0,mr=0,wn=0,Yr=0,oi=0,Dn=0,$n=0,Yn=0,xr=0,$r=ce[0],_r=ce[1],_e=ce[2],ee=ce[3],ve=ce[4],Re=ce[5],He=ce[6],Ze=ce[7],ct=ce[8],ft=ce[9],Et=ce[10],ue=ce[11],Z=ce[12],ye=ce[13],Me=ce[14],Le=ce[15];T=te[0],Ve+=T*$r,tt+=T*_r,vt+=T*_e,bt+=T*ee,yt+=T*ve,Lt+=T*Re,Yt+=T*He,wr+=T*Ze,Rt+=T*ct,Pt+=T*ft,kt+=T*Et,Nt+=T*ue,Kt+=T*Z,Ut+=T*ye,Vt+=T*Me,$t+=T*Le,T=te[1],tt+=T*$r,vt+=T*_r,bt+=T*_e,yt+=T*ee,Lt+=T*ve,Yt+=T*Re,wr+=T*He,Rt+=T*Ze,Pt+=T*ct,kt+=T*ft,Nt+=T*Et,Kt+=T*ue,Ut+=T*Z,Vt+=T*ye,$t+=T*Me,Dt+=T*Le,T=te[2],vt+=T*$r,bt+=T*_r,yt+=T*_e,Lt+=T*ee,Yt+=T*ve,wr+=T*Re,Rt+=T*He,Pt+=T*Ze,kt+=T*ct,Nt+=T*ft,Kt+=T*Et,Ut+=T*ue,Vt+=T*Z,$t+=T*ye,Dt+=T*Me,qt+=T*Le,T=te[3],bt+=T*$r,yt+=T*_r,Lt+=T*_e,Yt+=T*ee,wr+=T*ve,Rt+=T*Re,Pt+=T*He,kt+=T*Ze,Nt+=T*ct,Kt+=T*ft,Ut+=T*Et,Vt+=T*ue,$t+=T*Z,Dt+=T*ye,qt+=T*Me,Mt+=T*Le,T=te[4],yt+=T*$r,Lt+=T*_r,Yt+=T*_e,wr+=T*ee,Rt+=T*ve,Pt+=T*Re,kt+=T*He,Nt+=T*Ze,Kt+=T*ct,Ut+=T*ft,Vt+=T*Et,$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*Ze,Ut+=T*ct,Vt+=T*ft,$t+=T*Et,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*Ze,Vt+=T*ct,$t+=T*ft,Dt+=T*Et,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,Vt+=T*Ze,$t+=T*ct,Dt+=T*ft,qt+=T*Et,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,Vt+=T*He,$t+=T*Ze,Dt+=T*ct,qt+=T*ft,Mt+=T*Et,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,Vt+=T*Re,$t+=T*He,Dt+=T*Ze,qt+=T*ct,Mt+=T*ft,cr+=T*Et,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,Vt+=T*ve,$t+=T*Re,Dt+=T*He,qt+=T*Ze,Mt+=T*ct,cr+=T*ft,tr+=T*Et,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,Vt+=T*ee,$t+=T*ve,Dt+=T*Re,qt+=T*He,Mt+=T*Ze,cr+=T*ct,tr+=T*ft,ir+=T*Et,nr+=T*ue,mr+=T*Z,wn+=T*ye,Yr+=T*Me,oi+=T*Le,T=te[12],Kt+=T*$r,Ut+=T*_r,Vt+=T*_e,$t+=T*ee,Dt+=T*ve,qt+=T*Re,Mt+=T*He,cr+=T*Ze,tr+=T*ct,ir+=T*ft,nr+=T*Et,mr+=T*ue,wn+=T*Z,Yr+=T*ye,oi+=T*Me,Dn+=T*Le,T=te[13],Ut+=T*$r,Vt+=T*_r,$t+=T*_e,Dt+=T*ee,qt+=T*ve,Mt+=T*Re,cr+=T*He,tr+=T*Ze,ir+=T*ct,nr+=T*ft,mr+=T*Et,wn+=T*ue,Yr+=T*Z,oi+=T*ye,Dn+=T*Me,$n+=T*Le,T=te[14],Vt+=T*$r,$t+=T*_r,Dt+=T*_e,qt+=T*ee,Mt+=T*ve,cr+=T*Re,tr+=T*He,ir+=T*Ze,nr+=T*ct,mr+=T*ft,wn+=T*Et,Yr+=T*ue,oi+=T*Z,Dn+=T*ye,$n+=T*Me,Yn+=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*Ze,mr+=T*ct,wn+=T*ft,Yr+=T*Et,oi+=T*ue,Dn+=T*Z,$n+=T*ye,Yn+=T*Me,xr+=T*Le,Ve+=38*Dt,tt+=38*qt,vt+=38*Mt,bt+=38*cr,yt+=38*tr,Lt+=38*ir,Yt+=38*nr,wr+=38*mr,Rt+=38*wn,Pt+=38*Yr,kt+=38*oi,Nt+=38*Dn,Kt+=38*$n,Ut+=38*Yn,Vt+=38*xr,fe=1,T=Ve+fe+65535,fe=Math.floor(T/65536),Ve=T-fe*65536,T=tt+fe+65535,fe=Math.floor(T/65536),tt=T-fe*65536,T=vt+fe+65535,fe=Math.floor(T/65536),vt=T-fe*65536,T=bt+fe+65535,fe=Math.floor(T/65536),bt=T-fe*65536,T=yt+fe+65535,fe=Math.floor(T/65536),yt=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=Vt+fe+65535,fe=Math.floor(T/65536),Vt=T-fe*65536,T=$t+fe+65535,fe=Math.floor(T/65536),$t=T-fe*65536,Ve+=fe-1+37*(fe-1),fe=1,T=Ve+fe+65535,fe=Math.floor(T/65536),Ve=T-fe*65536,T=tt+fe+65535,fe=Math.floor(T/65536),tt=T-fe*65536,T=vt+fe+65535,fe=Math.floor(T/65536),vt=T-fe*65536,T=bt+fe+65535,fe=Math.floor(T/65536),bt=T-fe*65536,T=yt+fe+65535,fe=Math.floor(T/65536),yt=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=Vt+fe+65535,fe=Math.floor(T/65536),Vt=T-fe*65536,T=$t+fe+65535,fe=Math.floor(T/65536),$t=T-fe*65536,Ve+=fe-1+37*(fe-1),Q[0]=Ve,Q[1]=tt,Q[2]=vt,Q[3]=bt,Q[4]=yt,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]=Vt,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(),Ve=i(),tt=i(),vt=i(),bt=i(),yt=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(Ve,Q[2],te[2]),O(Ve,Ve,Ve),E(tt,T,ce),E(vt,Ve,fe),O(bt,Ve,fe),O(yt,T,ce),p(Q[0],tt,vt),p(Q[1],yt,bt),p(Q[2],bt,vt),p(Q[3],tt,yt)}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 Y(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=Y;function ne(Q){const te=(0,e.randomBytes)(32,Q),ce=Y(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,Ve;for(T=63;T>=32;--T){for(ce=0,fe=T-32,Ve=T-12;fe<Ve;++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 Ve=new Uint8Array(64);Ve.set(fe.subarray(32),32);const tt=new r.SHA512;tt.update(Ve.subarray(32)),tt.update(te);const vt=tt.digest();tt.clean(),$(vt),U(T,vt),pe(Ve,T),tt.reset(),tt.update(Ve.subarray(0,32)),tt.update(Q.subarray(32)),tt.update(te);const bt=tt.digest();$(bt);for(let yt=0;yt<32;yt++)ce[yt]=vt[yt];for(let yt=0;yt<32;yt++)for(let Lt=0;Lt<32;Lt++)ce[yt+Lt]+=bt[yt]*fe[Lt];return z(Ve.subarray(32),ce),Ve}t.sign=H;function k(Q,te){const ce=i(),T=i(),fe=i(),Ve=i(),tt=i(),vt=i(),bt=i();return m(Q[2],s),x(Q[1],te),I(fe,Q[1]),p(Ve,fe,c),E(fe,fe,Q[2]),O(Ve,Q[2],Ve),I(tt,Ve),I(vt,tt),p(bt,vt,tt),p(ce,bt,fe),p(ce,ce,Ve),L(ce,ce),p(ce,ce,fe),p(ce,ce,Ve),p(ce,ce,Ve),p(Q[0],ce,Ve),I(T,Q[0]),p(T,T,Ve),b(T,fe)&&p(Q[0],Q[0],g),I(T,Q[0]),p(T,T,Ve),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()],Ve=[i(),i(),i(),i()];if(ce.length!==t.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${t.SIGNATURE_LENGTH} bytes`);if(k(Ve,Q))return!1;const tt=new r.SHA512;tt.update(ce.subarray(0,32)),tt.update(Q),tt.update(te);const vt=tt.digest();return $(vt),B(fe,Ve,vt),U(Ve,ce.subarray(32)),q(fe,Ve),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 Ve=new Uint8Array(32);return y(Ve,ce),Ve}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})(Ck);const c4e="EdDSA",u4e="JWT",Mae=".",kae="base64url",l4e="utf8",f4e="utf8",d4e=":",h4e="did",p4e="key",EW="base58btc",g4e="z",y4e="K36",m4e=32;function KA(t){return lo(Do(B1(t),l4e),kae)}function Lae(t){const e=Do(y4e,EW),r=g4e+lo(a5([e,t]),EW);return[h4e,p4e,r].join(d4e)}function v4e(t){return lo(t,kae)}function b4e(t){return Do([KA(t.header),KA(t.payload)].join(Mae),f4e)}function w4e(t){return[KA(t.header),KA(t.payload),v4e(t.signature)].join(Mae)}function xW(t=ym.randomBytes(m4e)){return Ck.generateKeyPairFromSeed(t)}async function _4e(t,e,r,n,i=Zt.fromMiliseconds(Date.now())){const a={alg:c4e,typ:u4e},o=Lae(n.publicKey),s=i+r,c={iss:o,sub:t,aud:e,iat:i,exp:s},u=b4e({header:a,payload:c}),f=Ck.sign(n.secretKey,u);return w4e({header:a,payload:c,signature:f})}const E4e="PARSE_ERROR",x4e="INVALID_REQUEST",A4e="METHOD_NOT_FOUND",S4e="INVALID_PARAMS",Uae="INTERNAL_ERROR",Nk="SERVER_ERROR",O4e=[-32700,-32600,-32601,-32602,-32603],Xb={[E4e]:{code:-32700,message:"Parse error"},[x4e]:{code:-32600,message:"Invalid Request"},[A4e]:{code:-32601,message:"Method not found"},[S4e]:{code:-32602,message:"Invalid params"},[Uae]:{code:-32603,message:"Internal error"},[Nk]:{code:-32e3,message:"Server error"}},Bae=Nk;function I4e(t){return O4e.includes(t)}function AW(t){return Object.keys(Xb).includes(t)?Xb[t]:Xb[Bae]}function P4e(t){const e=Object.values(Xb).find(r=>r.code===t);return e||Xb[Bae]}function Fae(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):t}var jae={},Gu={},SW;function T4e(){if(SW)return Gu;SW=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.isBrowserCryptoAvailable=Gu.getSubtleCrypto=Gu.getBrowerCrypto=void 0;function t(){return(Ne==null?void 0:Ne.crypto)||(Ne==null?void 0:Ne.msCrypto)||{}}Gu.getBrowerCrypto=t;function e(){const n=t();return n.subtle||n.webkitSubtle}Gu.getSubtleCrypto=e;function r(){return!!t()&&!!e()}return Gu.isBrowserCryptoAvailable=r,Gu}var Wu={},OW;function R4e(){if(OW)return Wu;OW=1,Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.isBrowser=Wu.isNode=Wu.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Wu.isReactNative=t;function e(){return typeof za<"u"&&typeof za.versions<"u"&&typeof za.versions.node<"u"}Wu.isNode=e;function r(){return!t()&&!e()}return Wu.isBrowser=r,Wu}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zs;e.__exportStar(T4e(),t),e.__exportStar(R4e(),t)})(jae);function Dk(t=3){const e=Date.now()*Math.pow(10,t),r=Math.floor(Math.random()*Math.pow(10,t));return e+r}function qae(t=6){return BigInt(Dk(t))}function Pg(t,e,r){return{id:r||Dk(),jsonrpc:"2.0",method:t,params:e}}function $k(t,e){return{id:t,jsonrpc:"2.0",result:e}}function gO(t,e,r){return{id:t,jsonrpc:"2.0",error:C4e(e,r)}}function C4e(t,e){return typeof t>"u"?AW(Uae):(typeof t=="string"&&(t=Object.assign(Object.assign({},AW(Nk)),{message:t})),typeof e<"u"&&(t.data=e),I4e(t.code)&&(t=P4e(t.code)),t)}class N4e{}class D4e extends N4e{constructor(){super()}}class $4e extends D4e{constructor(e){super()}}const M4e="^https?:",k4e="^wss?:";function L4e(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function Hae(t,e){const r=L4e(t);return typeof r>"u"?!1:new RegExp(e).test(r)}function IW(t){return Hae(t,M4e)}function PW(t){return Hae(t,k4e)}function U4e(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function zae(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function Mk(t){return zae(t)&&"method"in t}function yO(t){return zae(t)&&(il(t)||Oc(t))}function il(t){return"result"in t}function Oc(t){return"error"in t}class Jl extends $4e{constructor(e){super(e),this.events=new po.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(Pg(e.method,e.params||[],e.id||qae().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=>{Oc(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),yO(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 AN,TW;function B4e(){return TW||(TW=1,AN=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}),AN}const F4e=()=>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:B4e(),j4e=()=>typeof WebSocket<"u"||typeof bn<"u"&&typeof bn.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",RW=t=>t.split("?")[0],CW=10,q4e=F4e();class H4e{constructor(e){if(this.url=e,this.events=new po.EventEmitter,this.registering=!1,!PW(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(B1(e))}catch(n){this.onError(e.id,n)}}register(e=this.url){if(!PW(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=jae.isReactNative()?void 0:{rejectUnauthorized:!U4e(e)},a=new q4e(e,[],i);j4e()?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"?Rk(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),a=gO(e,i);this.events.emit("payload",a)}parseError(e,r=this.url){return Fae(e,RW(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>CW&&this.events.setMaxListeners(CW)}emitError(e){const r=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${RW(this.url)}`));return this.events.emit("register_error",r),r}}var YA={exports:{}};YA.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]",Y="[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[Y]=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,Ve=fe&&ge.process,tt=function(){try{return Ve&&Ve.binding&&Ve.binding("util")}catch{}}(),vt=tt&&tt.isTypedArray;function bt(de,ke){for(var it=-1,Ke=de==null?0:de.length,Qr=0,fr=[];++it<Ke;){var yn=de[it];ke(yn,it,de)&&(fr[Qr++]=yn)}return fr}function yt(de,ke){for(var it=-1,Ke=ke.length,Qr=de.length;++it<Ke;)de[Qr+it]=ke[it];return de}function Lt(de,ke){for(var it=-1,Ke=de==null?0:de.length;++it<Ke;)if(ke(de[it],it,de))return!0;return!1}function Yt(de,ke){for(var it=-1,Ke=Array(de);++it<de;)Ke[it]=ke(it);return Ke}function 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(Ke,Qr){it[++ke]=[Qr,Ke]}),it}function Nt(de,ke){return function(it){return de(ke(it))}}function Kt(de){var ke=-1,it=Array(de.size);return de.forEach(function(Ke){it[++ke]=Ke}),it}var Ut=Array.prototype,Vt=Function.prototype,$t=Object.prototype,Dt=te["__core-js_shared__"],qt=Vt.toString,Mt=$t.hasOwnProperty,cr=function(){var de=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||"");return de?"Symbol(src)_1."+de:""}(),tr=$t.toString,ir=RegExp("^"+qt.call(Mt).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nr=fe?te.Buffer:void 0,mr=te.Symbol,wn=te.Uint8Array,Yr=$t.propertyIsEnumerable,oi=Ut.splice,Dn=mr?mr.toStringTag:void 0,$n=Object.getOwnPropertySymbols,Yn=nr?nr.isBuffer:void 0,xr=Nt(Object.keys,Object),$r=qr(te,"DataView"),_r=qr(te,"Map"),_e=qr(te,"Promise"),ee=qr(te,"Set"),ve=qr(te,"WeakMap"),Re=qr(Object,"create"),He=Ft($r),Ze=Ft(_r),ct=Ft(_e),ft=Ft(ee),Et=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 Ke=de[ke];this.set(Ke[0],Ke[1])}}function Me(){this.__data__=Re?Re(null):{},this.size=0}function Le(de){var ke=this.has(de)&&delete this.__data__[de];return this.size-=ke?1:0,ke}function _t(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=_t,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 Ke=de[ke];this.set(Ke[0],Ke[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 Ke=ke.length-1;return it==Ke?ke.pop():oi.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__,Ke=re(it,de);return Ke<0?(++this.size,it.push([de,ke])):it[Ke][1]=ke,this}lr.prototype.clear=en,lr.prototype.delete=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 Ke=de[ke];this.set(Ke[0],Ke[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 ei(de){return _n(this,de).get(de)}function Oi(de){return _n(this,de).has(de)}function ti(de,ke){var it=_n(this,de),Ke=it.size;return it.set(de,ke),this.size+=it.size==Ke?0:1,this}Lr.prototype.clear=gn,Lr.prototype.delete=Ur,Lr.prototype.get=ei,Lr.prototype.has=Oi,Lr.prototype.set=ti;function Ii(de){var ke=-1,it=de==null?0:de.length;for(this.__data__=new Lr;++ke<it;)this.add(de[ke])}function Pi(de){return this.__data__.set(de,n),this}function si(de){return this.__data__.has(de)}Ii.prototype.add=Ii.prototype.push=Pi,Ii.prototype.has=si;function jn(de){var ke=this.__data__=new lr(de);this.size=ke.size}function na(){this.__data__=new lr,this.size=0}function Mi(de){var ke=this.__data__,it=ke.delete(de);return this.size=ke.size,it}function Ea(de){return this.__data__.get(de)}function ss(de){return this.__data__.has(de)}function X(de,ke){var it=this.__data__;if(it instanceof lr){var Ke=it.__data__;if(!_r||Ke.length<r-1)return Ke.push([de,ke]),this.size=++it.size,this;it=this.__data__=new Lr(Ke)}return it.set(de,ke),this.size=it.size,this}jn.prototype.clear=na,jn.prototype.delete=Mi,jn.prototype.get=Ea,jn.prototype.has=ss,jn.prototype.set=X;function me(de,ke){var it=xn(de),Ke=!it&&Ti(de),Qr=!it&&!Ke&&ci(de),fr=!it&&!Ke&&!Qr&&vi(de),yn=it||Ke||Qr||fr,or=yn?Yt(de.length,String):[],yr=or.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)))&&or.push(ie);return or}function re(de,ke){for(var it=de.length;it--;)if(Xt(de[it][0],ke))return it;return-1}function Ee(de,ke,it){var Ke=ke(de);return xn(de)?Ke:yt(Ke,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 Hi(de)&&be(de)==s}function Xe(de,ke,it,Ke,Qr){return de===ke?!0:de==null||ke==null||!Hi(de)&&!Hi(ke)?de!==de&&ke!==ke:dt(de,ke,it,Ke,Xe,Qr)}function dt(de,ke,it,Ke,Qr,fr){var yn=xn(de),or=xn(ke),yr=yn?c:W(de),ie=or?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&&ci(de)){if(!ci(ke))return!1;yn=!0,R=!1}if(we&&!R)return fr||(fr=new jn),yn||vi(de)?Gt(de,ke,it,Ke,Qr,fr):Tr(de,ke,yr,it,Ke,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 jn),Qr(Ie,Pe,it,Ke,fr)}}return we?(fr||(fr=new jn),Wr(de,ke,it,Ke,Qr,fr)):!1}function Qe(de){if(!go(de)||Ce(de))return!1;var ke=fn(de)?ir:k;return ke.test(Ft(de))}function Ge(de){return Hi(de)&&mi(de.length)&&!!G[be(de)]}function pt(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 Gt(de,ke,it,Ke,Qr,fr){var yn=it&i,or=de.length,yr=ke.length;if(or!=yr&&!(yn&&yr>or))return!1;var ie=fr.get(de);if(ie&&fr.get(ke))return ie==ke;var R=-1,oe=!0,we=it&a?new Ii:void 0;for(fr.set(de,ke),fr.set(ke,de);++R<or;){var se=de[R],Ae=ke[R];if(Ke)var Ie=yn?Ke(Ae,se,R,ke,de,fr):Ke(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,Ke,fr)))return we.push(Be)})){oe=!1;break}}else if(!(se===Ae||Qr(se,Ae,it,Ke,fr))){oe=!1;break}}return fr.delete(de),fr.delete(ke),oe}function Tr(de,ke,it,Ke,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 Xt(+de,+ke);case g:return de.name==ke.name&&de.message==ke.message;case O:case p:return de==ke+"";case v:var or=kt;case E:var yr=Ke&i;if(or||(or=Kt),de.size!=ke.size&&!yr)return!1;var ie=yn.get(de);if(ie)return ie==ke;Ke|=a,yn.set(de,ke);var R=Gt(or(de),or(ke),Ke,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,Ke,Qr,fr){var yn=it&i,or=jr(de),yr=or.length,ie=jr(ke),R=ie.length;if(yr!=R&&!yn)return!1;for(var oe=yr;oe--;){var we=or[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=or[oe];var Pe=de[we],Be=ke[we];if(Ke)var Ye=yn?Ke(Be,Pe,we,ke,de,fr):Ke(Pe,Be,we,de,ke,fr);if(!(Ye===void 0?Pe===Be||Qr(Pe,Be,it,Ke,fr):Ye)){Ae=!1;break}Ie||(Ie=we=="constructor")}if(Ae&&!Ie){var qe=de.constructor,gt=ke.constructor;qe!=gt&&"constructor"in de&&"constructor"in ke&&!(typeof qe=="function"&&qe instanceof qe&&typeof gt=="function"&&gt instanceof gt)&&(Ae=!1)}return fr.delete(de),fr.delete(ke),Ae}function jr(de){return Ee(de,yo,D)}function _n(de,ke){var it=de.__data__;return Se(ke)?it[typeof ke=="string"?"string":"hash"]:it.map}function qr(de,ke){var it=Pt(de,ke);return Qe(it)?it:void 0}function P(de){var ke=Mt.call(de,Dn),it=de[Dn];try{de[Dn]=void 0;var Ke=!0}catch{}var Qr=tr.call(de);return Ke&&(ke?de[Dn]=it:delete de[Dn]),Qr}var D=$n?function(de){return de==null?[]:(de=Object(de),bt($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,Ke=it?Ft(it):"";if(Ke)switch(Ke){case He:return le;case Ze:return v;case ct:return S;case ft:return E;case Et: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 Xt(de,ke){return de===ke||de!==de&&ke!==ke}var Ti=Oe(function(){return arguments}())?Oe:function(de){return Hi(de)&&Mt.call(de,"callee")&&!Yr.call(de,"callee")},xn=Array.isArray;function St(de){return de!=null&&mi(de.length)&&!fn(de)}var ci=Yn||Ar;function An(de,ke){return Xe(de,ke)}function fn(de){if(!go(de))return!1;var ke=be(de);return ke==m||ke==w||ke==u||ke==x}function mi(de){return typeof de=="number"&&de>-1&&de%1==0&&de<=o}function go(de){var ke=typeof de;return de!=null&&(ke=="object"||ke=="function")}function Hi(de){return de!=null&&typeof de=="object"}var vi=vt?wr(vt):Ge;function yo(de){return St(de)?me(de):pt(de)}function tn(){return[]}function Ar(){return!1}t.exports=An})(YA,YA.exports);var z4e=YA.exports;const V4e=Bc(z4e);function G4e(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 W4e=G4e,K4e=W4e;const Vae=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")},Y4e=t=>new TextEncoder().encode(t),Q4e=t=>new TextDecoder().decode(t);class J4e{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 X4e{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 Gae(this,e)}}class Z4e{constructor(e){this.decoders=e}or(e){return Gae(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 Gae=(t,e)=>new Z4e({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let e5e=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new J4e(e,r,n),this.decoder=new X4e(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const mO=({name:t,prefix:e,encode:r,decode:n})=>new e5e(t,e,r,n),Zw=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=K4e(r,e);return mO({prefix:t,name:e,encode:n,decode:a=>Vae(i(a))})},t5e=(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},r5e=(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},_a=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>mO({prefix:e,name:t,encode(i){return r5e(i,n,r)},decode(i){return t5e(i,n,r,t)}}),n5e=mO({prefix:"\0",name:"identity",encode:t=>Q4e(t),decode:t=>Y4e(t)});var i5e=Object.freeze({__proto__:null,identity:n5e});const a5e=_a({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var o5e=Object.freeze({__proto__:null,base2:a5e});const s5e=_a({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var c5e=Object.freeze({__proto__:null,base8:s5e});const u5e=Zw({prefix:"9",name:"base10",alphabet:"0123456789"});var l5e=Object.freeze({__proto__:null,base10:u5e});const f5e=_a({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),d5e=_a({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var h5e=Object.freeze({__proto__:null,base16:f5e,base16upper:d5e});const p5e=_a({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),g5e=_a({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),y5e=_a({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),m5e=_a({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),v5e=_a({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),b5e=_a({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),w5e=_a({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),_5e=_a({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),E5e=_a({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var x5e=Object.freeze({__proto__:null,base32:p5e,base32upper:g5e,base32pad:y5e,base32padupper:m5e,base32hex:v5e,base32hexupper:b5e,base32hexpad:w5e,base32hexpadupper:_5e,base32z:E5e});const A5e=Zw({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),S5e=Zw({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var O5e=Object.freeze({__proto__:null,base36:A5e,base36upper:S5e});const I5e=Zw({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),P5e=Zw({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var T5e=Object.freeze({__proto__:null,base58btc:I5e,base58flickr:P5e});const R5e=_a({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),C5e=_a({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),N5e=_a({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),D5e=_a({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var $5e=Object.freeze({__proto__:null,base64:R5e,base64pad:C5e,base64url:N5e,base64urlpad:D5e});const Wae=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),M5e=Wae.reduce((t,e,r)=>(t[r]=e,t),[]),k5e=Wae.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function L5e(t){return t.reduce((e,r)=>(e+=M5e[r],e),"")}function U5e(t){const e=[];for(const r of t){const n=k5e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const B5e=mO({prefix:"🚀",name:"base256emoji",encode:L5e,decode:U5e});var F5e=Object.freeze({__proto__:null,base256emoji:B5e}),j5e=Kae,NW=128,q5e=127,H5e=~q5e,z5e=Math.pow(2,31);function Kae(t,e,r){e=e||[],r=r||0;for(var n=r;t>=z5e;)e[r++]=t&255|NW,t/=128;for(;t&H5e;)e[r++]=t&255|NW,t>>>=7;return e[r]=t|0,Kae.bytes=r-n+1,e}var V5e=p5,G5e=128,DW=127;function p5(t,n){var r=0,n=n||0,i=0,a=n,o,s=t.length;do{if(a>=s)throw p5.bytes=0,new RangeError("Could not decode varint");o=t[a++],r+=i<28?(o&DW)<<i:(o&DW)*Math.pow(2,i),i+=7}while(o>=G5e);return p5.bytes=a-n,r}var W5e=Math.pow(2,7),K5e=Math.pow(2,14),Y5e=Math.pow(2,21),Q5e=Math.pow(2,28),J5e=Math.pow(2,35),X5e=Math.pow(2,42),Z5e=Math.pow(2,49),eDe=Math.pow(2,56),tDe=Math.pow(2,63),rDe=function(t){return t<W5e?1:t<K5e?2:t<Y5e?3:t<Q5e?4:t<J5e?5:t<X5e?6:t<Z5e?7:t<eDe?8:t<tDe?9:10},nDe={encode:j5e,decode:V5e,encodingLength:rDe},Yae=nDe;const $W=(t,e,r=0)=>(Yae.encode(t,e,r),e),MW=t=>Yae.encodingLength(t),g5=(t,e)=>{const r=e.byteLength,n=MW(t),i=n+MW(r),a=new Uint8Array(i+r);return $W(t,a,0),$W(r,a,n),a.set(e,i),new iDe(t,r,e,a)};let iDe=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}};const Qae=({name:t,code:e,encode:r})=>new aDe(t,e,r);let aDe=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?g5(this.code,r):r.then(n=>g5(this.code,n))}else throw Error("Unknown type, must be binary type")}};const Jae=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),oDe=Qae({name:"sha2-256",code:18,encode:Jae("SHA-256")}),sDe=Qae({name:"sha2-512",code:19,encode:Jae("SHA-512")});var cDe=Object.freeze({__proto__:null,sha256:oDe,sha512:sDe});const Xae=0,uDe="identity",Zae=Vae,lDe=t=>g5(Xae,Zae(t)),fDe={code:Xae,name:uDe,encode:Zae,digest:lDe};var dDe=Object.freeze({__proto__:null,identity:fDe});new TextEncoder,new TextDecoder;const kW={...i5e,...o5e,...c5e,...l5e,...h5e,...x5e,...O5e,...T5e,...$5e,...F5e};({...cDe,...dDe});function eoe(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function hDe(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?eoe(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function toe(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const LW=toe("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),SN=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=hDe(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),pDe={utf8:LW,"utf-8":LW,hex:kW.base16,latin1:SN,ascii:SN,binary:SN,...kW};function gDe(t,e="utf8"){const r=pDe[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?eoe(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}const roe="wc",yDe=2,kk="core",vd=`${roe}@2:${kk}:`,mDe={name:kk,logger:"error"},vDe={database:":memory:"},bDe="crypto",UW="client_ed25519_seed",wDe=Zt.ONE_DAY,_De="keychain",EDe="0.3",xDe="messages",ADe="0.3",SDe=Zt.SIX_HOURS,ODe="publisher",noe="irn",IDe="error",ioe="wss://relay.walletconnect.com",BW="wss://relay.walletconnect.org",PDe="relayer",Ba={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},TDe="_subscription",Ku={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},RDe=Zt.ONE_SECOND,CDe="2.10.4",NDe=1e4,DDe="0.3",$De="WALLETCONNECT_CLIENT_ID",vc={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},MDe="subscription",kDe="0.3",LDe=Zt.FIVE_SECONDS*1e3,UDe="pairing",BDe="0.3",jv={wc_pairingDelete:{req:{ttl:Zt.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Zt.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Zt.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Zt.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Zt.ONE_DAY,prompt:!1,tag:0},res:{ttl:Zt.ONE_DAY,prompt:!1,tag:0}}},Ib={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},tu={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},FDe="history",jDe="0.3",qDe="expirer",Es={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},HDe="0.3",ON="verify-api",tg="https://verify.walletconnect.com",y5="https://verify.walletconnect.org",zDe=[tg,y5];let VDe=class{constructor(e,r){this.core=e,this.logger=r,this.keychain=new Map,this.name=_De,this.version=EDe,this.initialized=!1,this.storagePrefix=vd,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,Aae(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Sae(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)}}},GDe=class{constructor(e,r,n){this.core=e,this.logger=r,this.name=bDe,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=xW(i);return Lae(a.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=b6e();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const a=await this.getClientSeed(),o=xW(a),s=d5();return await _4e(s,i,wDe,o)},this.generateSharedKey=(i,a,o)=>{this.isInitialized();const s=this.getPrivateKey(i),c=w6e(s,a);return this.setSymKey(c,o)},this.setSymKey=async(i,a)=>{this.isInitialized();const o=a||_6e(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=xae(o),c=B1(a);if(JG(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 x6e({type:f,symKey:u,message:c,senderPublicKey:d})},this.decode=async(i,a,o)=>{this.isInitialized();const s=O6e(a,o);if(JG(s)){const c=s.receiverPublicKey,u=s.senderPublicKey;i=await this.generateSharedKey(c,u)}try{const c=this.getSymKey(i),u=A6e({symKey:c,encoded:a});return Rk(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=GA(i);return Kw(a.type)},this.getPayloadSenderPublicKey=i=>{const a=GA(i);return a.senderPublicKey?lo(a.senderPublicKey,uo):void 0},this.core=e,this.logger=un.generateChildLogger(r,this.name),this.keychain=n||new VDe(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(UW)}catch{e=d5(),await this.keychain.set(UW,e)}return gDe(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 WDe extends J8e{constructor(e,r){super(e,r),this.logger=e,this.core=r,this.messages=new Map,this.name=xDe,this.version=ADe,this.initialized=!1,this.storagePrefix=vd,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=Og(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=Og(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,Aae(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?Sae(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 KDe=class extends X8e{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.events=new po.EventEmitter,this.name=ODe,this.queue=new Map,this.publishTimeout=Zt.toMiliseconds(Zt.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)||SDe,c=h5(a),u=(a==null?void 0:a.prompt)||!1,f=(a==null?void 0:a.tag)||0,d=(a==null?void 0:a.id)||qae().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 U1(this.rpcPublish(n,i,s,c,u,f,d),this.publishTimeout,"Failed to publish payload, please try again."),this.removeRequestFromQueue(d),this.relayer.events.emit(Ba.publish,g)}catch(w){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,(o=a==null?void 0:a.internal)!=null&&o.throwOnFailedPublish)throw this.removeRequestFromQueue(d),w;return}finally{clearTimeout(m)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:a}})}catch(s){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(s),s}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.relayer=e,this.logger=un.generateChildLogger(r,this.name),this.registerEventListeners()}get context(){return un.getLoggerContext(this.logger)}rpcPublish(e,r,n,i,a,o,s){var c,u,f,d;const g={method:Dx(i.protocol).publish,params:{topic:e,message:r,ttl:n,prompt:a,tag:o},id:s};return io((c=g.params)==null?void 0:c.prompt)&&((u=g.params)==null||delete u.prompt),io((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(bm.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Ba.connection_stalled);return}this.checkQueue()}),this.relayer.on(Ba.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}},YDe=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 QDe=Object.defineProperty,JDe=Object.defineProperties,XDe=Object.getOwnPropertyDescriptors,FW=Object.getOwnPropertySymbols,ZDe=Object.prototype.hasOwnProperty,e$e=Object.prototype.propertyIsEnumerable,jW=(t,e,r)=>e in t?QDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,qv=(t,e)=>{for(var r in e||(e={}))ZDe.call(e,r)&&jW(t,r,e[r]);if(FW)for(var r of FW(e))e$e.call(e,r)&&jW(t,r,e[r]);return t},IN=(t,e)=>JDe(t,XDe(e));let t$e=class extends t4e{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.subscriptions=new Map,this.topicMap=new YDe,this.events=new po.EventEmitter,this.name=MDe,this.version=kDe,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=vd,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=h5(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 Zt.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)>=LDe&&(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=h5(n);await this.rpcUnsubscribe(e,r,i);const a=xi("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,r,a),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,r){const n={method:Dx(r.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await U1(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Ba.connection_stalled)}return Og(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const r=e[0].relay,n={method:Dx(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 U1(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Ba.connection_stalled)}}rpcUnsubscribe(e,r,n){const i={method:Dx(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,IN(qv({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,qv({},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,qv({},r)),this.topicMap.set(r.topic,e),this.events.emit(vc.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(vc.deleted,IN(qv({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(vc.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(vc.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);Iu(r)&&this.onBatchSubscribe(r.map((n,i)=>IN(qv({},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(bm.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(Ba.connect,async()=>{await this.onConnect()}),this.relayer.on(Ba.disconnect,()=>{this.onDisconnect()}),this.events.on(vc.created,async e=>{const r=vc.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),await this.persist()}),this.events.on(vc.deleted,async e=>{const r=vc.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 r$e=Object.defineProperty,qW=Object.getOwnPropertySymbols,n$e=Object.prototype.hasOwnProperty,i$e=Object.prototype.propertyIsEnumerable,HW=(t,e,r)=>e in t?r$e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,a$e=(t,e)=>{for(var r in e||(e={}))n$e.call(e,r)&&HW(t,r,e[r]);if(qW)for(var r of qW(e))i$e.call(e,r)&&HW(t,r,e[r]);return t};let o$e=class extends Z8e{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new po.EventEmitter,this.name=PDe,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=async r=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(r)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.onPayloadHandler=r=>{this.onProviderPayload(r)},this.onConnectHandler=()=>{this.events.emit(Ba.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=r=>{this.logger.error(r),this.events.emit(Ba.error,r),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Ku.payload,this.onPayloadHandler),this.provider.on(Ku.connect,this.onConnectHandler),this.provider.on(Ku.disconnect,this.onDisconnectHandler),this.provider.on(Ku.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||IDe})),this.messages=new WDe(this.logger,e.core),this.subscriber=new t$e(this,this.logger),this.publisher=new KDe(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||ioe,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 ${BW}...`),await this.restartTransport(BW)}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)},NDe)}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(vc.created,o),a())};return await Promise.all([new Promise(s=>{a=s,this.subscriber.on(vc.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 U1(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(vc.resubscribed,()=>{r()})}),new Promise(async(r,n)=>{try{await U1(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(Ku.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 sW())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 Jl(new H4e(L6e({sdkVersion:CDe,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}),Mk(e)){if(!e.method.endsWith(TDe))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(a$e({type:"event",event:r.id},o)),this.events.emit(r.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else yO(e)&&this.events.emit(Ba.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Ba.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const r=$k(e.id,!0);await this.provider.connection.send(r)}unregisterProviderListeners(){this.provider.off(Ku.payload,this.onPayloadHandler),this.provider.off(Ku.connect,this.onConnectHandler),this.provider.off(Ku.disconnect,this.onDisconnectHandler),this.provider.off(Ku.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(Ba.connection_stalled,()=>{this.restartTransport().catch(r=>this.logger.error(r))});let e=await sW();T8e(async r=>{this.initialized&&e!==r&&(e=r,r?await this.restartTransport().catch(n=>this.logger.error(n)):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch(n=>this.logger.error(n))))})}onProviderDisconnect(){this.events.emit(Ba.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout(async()=>{await this.restartTransport().catch(e=>this.logger.error(e))},Zt.toMiliseconds(RDe)))}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 s$e=Object.defineProperty,zW=Object.getOwnPropertySymbols,c$e=Object.prototype.hasOwnProperty,u$e=Object.prototype.propertyIsEnumerable,VW=(t,e,r)=>e in t?s$e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,GW=(t,e)=>{for(var r in e||(e={}))c$e.call(e,r)&&VW(t,r,e[r]);if(zW)for(var r of zW(e))u$e.call(e,r)&&VW(t,r,e[r]);return t};let vO=class extends e4e{constructor(e,r,n,i=vd,a=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,this.map=new Map,this.version=DDe,this.cached=[],this.initialized=!1,this.storagePrefix=vd,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!io(o)?this.map.set(this.getKey(o),o):o8e(o)?this.map.set(o.id,o):s8e(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=>V4e(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=GW(GW({},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)}}},l$e=class{constructor(e,r){this.core=e,this.logger=r,this.name=UDe,this.version=BDe,this.events=new ZM,this.initialized=!1,this.storagePrefix=vd,this.ignoredPayloadTypes=[Lp],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=d5(),i=await this.core.crypto.setSymKey(n),a=Sc(Zt.FIVE_MINUTES),o={protocol:noe},s={topic:i,expiry:a,relay:o,active:!1},c=Q6e({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}=W6e(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=Sc(Zt.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(Ib.create,u),u},this.activate=async({topic:n})=>{this.isInitialized();const i=Sc(Zt.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}=B0();this.events.once(Ri("pairing_ping",a),({error:u})=>{u?c(u):s()}),await o()}},this.updateExpiry=async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})},this.updateMetadata=async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",xi("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(n,i,a)=>{const o=Pg(i,a),s=await this.core.crypto.encode(n,o),c=jv[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=$k(n,a),s=await this.core.crypto.encode(i,o),c=await this.core.history.get(i,n),u=jv[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=gO(n,a),s=await this.core.crypto.encode(i,o),c=await this.core.history.get(i,n),u=jv[c.request.method]?jv[c.request.method].res:jv.unregistered_method.res;await this.core.relayer.publish(i,s,u),await this.core.history.resolve(o)},this.deletePairing=async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,xi("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(i=>If(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(Ib.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(()=>{il(i)?this.events.emit(Ri("pairing_ping",a),{}):Oc(i)&&this.events.emit(Ri("pairing_ping",a),{error:i.error})},500)},this.onPairingDeleteRequest=async(n,i)=>{const{id:a}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(Ib.delete,{id:a,topic:n})}catch(o){await this.sendError(a,n,o),this.logger.error(o)}},this.onUnknownRpcMethodRequest=async(n,i)=>{const{id:a,method:o}=i;try{if(this.registeredMethods.includes(o))return;const s=xi("WC_METHOD_UNSUPPORTED",o);await this.sendError(a,n,s),this.logger.error(s)}catch(s){await this.sendError(a,n,s),this.logger.error(s)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(xi("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!xo(n)){const{message:i}=Tt("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(i)}if(!a8e(n.uri)){const{message:i}=Tt("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(i)}},this.isValidPing=async n=>{if(!xo(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(!xo(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(!Ji(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(If(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 vO(this.core,this.logger,this.name,this.storagePrefix)}get context(){return un.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Ba.message,async e=>{const{topic:r,message:n}=e;if(!this.pairings.keys.includes(r)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const i=await this.core.crypto.decode(r,n);try{Mk(i)?(this.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):yO(i)&&(await this.core.history.resolve(i),await this.onRelayEventResponse({topic:r,payload:i}),this.core.history.delete(r,i.id))}catch(a){this.logger.error(a)}})}registerExpirerEvents(){this.core.expirer.on(Es.expired,async e=>{const{topic:r}=Iae(e.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit(Ib.expire,{topic:r}))})}},f$e=class extends Q8e{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.records=new Map,this.events=new po.EventEmitter,this.name=FDe,this.version=jDe,this.cached=[],this.initialized=!1,this.storagePrefix=vd,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:Sc(Zt.THIRTY_DAYS)};this.records.set(o.id,o),this.events.emit(tu.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=Oc(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.events.emit(tu.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(tu.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:Pg(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(tu.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(tu.created,e=>{const r=tu.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(tu.updated,e=>{const r=tu.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(tu.deleted,e=>{const r=tu.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.core.heartbeat.on(bm.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{Zt.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)}}},d$e=class extends r4e{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.expirations=new Map,this.events=new po.EventEmitter,this.name=qDe,this.version=HDe,this.cached=[],this.initialized=!1,this.storagePrefix=vd,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(n,i)=>{this.isInitialized();const a=this.formatTarget(n),o={target:a,expiry:i};this.expirations.set(a,o),this.checkExpiry(a,o),this.events.emit(Es.created,{target:a,expiration:o})},this.get=n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)},this.del=n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),a=this.getExpiration(i);this.expirations.delete(i),this.events.emit(Es.deleted,{target:i,expiration:a})}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=un.generateChildLogger(r,this.name)}get context(){return un.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return U6e(e);if(typeof e=="number")return B6e(e);const{message:r}=Tt("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(r)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Es.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:r}=Tt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const r=this.expirations.get(e);if(!r){const{message:n}=Tt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}checkExpiry(e,r){const{expiry:n}=r;Zt.toMiliseconds(n)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(Es.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(bm.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Es.created,e=>{const r=Es.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(Es.expired,e=>{const r=Es.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(Es.deleted,e=>{const r=Es.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}}},h$e=class extends n4e{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,this.name=ON,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async n=>{if(this.verifyDisabled||Yw()||!Qw())return;const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);this.verifyUrl!==i&&this.removeIframe(),this.verifyUrl=i;try{await this.createIframe()}catch(a){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(a)}if(!this.initialized){this.removeIframe(),this.verifyUrl=y5;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,y5)}return a},this.fetchAttestation=async(n,i)=>{this.logger.info(`resolving attestation: ${n} from url: ${i}`);const a=this.startAbortTimer(Zt.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(ON))return a();window.addEventListener("message",i);const o=document.createElement("iframe");o.id=ON,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")},Zt.toMiliseconds(Zt.FIVE_SECONDS)))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=n=>{let i=n||tg;return zDe.includes(i)||(this.logger.info(`verify url: ${i}, not included in trusted list, assigning default: ${tg}`),i=tg),i},this.logger=un.generateChildLogger(r,this.name),this.verifyUrl=tg,this.abortController=new AbortController,this.isDevEnv=Ik()&&{}.IS_VITEST}get context(){return un.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),Zt.toMiliseconds(e))}};var p$e=Object.defineProperty,WW=Object.getOwnPropertySymbols,g$e=Object.prototype.hasOwnProperty,y$e=Object.prototype.propertyIsEnumerable,KW=(t,e,r)=>e in t?p$e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,YW=(t,e)=>{for(var r in e||(e={}))g$e.call(e,r)&&KW(t,r,e[r]);if(WW)for(var r of WW(e))y$e.call(e,r)&&KW(t,r,e[r]);return t};let m$e=class aoe extends Y8e{constructor(e){super(e),this.protocol=roe,this.version=yDe,this.name=kk,this.events=new po.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)||ioe,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)||mDe.logger}));this.logger=un.generateChildLogger(r,this.name),this.heartbeat=new bm.HeartBeat,this.crypto=new GDe(this,this.logger,e==null?void 0:e.keychain),this.history=new f$e(this,this.logger),this.expirer=new d$e(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new F8e(YW(YW({},vDe),e==null?void 0:e.storageOptions)),this.relayer=new o$e({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new l$e(this,this.logger),this.verify=new h$e(this.projectId||"",this.logger)}static async init(e){const r=new aoe(e);await r.initialize();const n=await r.crypto.getClientId();return await r.storage.setItem($De,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 v$e=m$e,ooe="wc",soe=2,coe="client",Lk=`${ooe}@${soe}:${coe}:`,PN={name:coe,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},QW="WALLETCONNECT_DEEPLINK_CHOICE",b$e="proposal",uoe="Proposal expired",w$e="session",TE=Zt.SEVEN_DAYS,_$e="engine",Hv={wc_sessionPropose:{req:{ttl:Zt.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Zt.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Zt.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Zt.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Zt.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Zt.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Zt.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Zt.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Zt.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Zt.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Zt.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Zt.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Zt.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Zt.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Zt.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Zt.THIRTY_SECONDS,prompt:!1,tag:1115}}},TN={min:Zt.FIVE_MINUTES,max:Zt.SEVEN_DAYS},Yu={idle:"IDLE",active:"ACTIVE"},E$e="request",x$e=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var A$e=Object.defineProperty,S$e=Object.defineProperties,O$e=Object.getOwnPropertyDescriptors,JW=Object.getOwnPropertySymbols,I$e=Object.prototype.hasOwnProperty,P$e=Object.prototype.propertyIsEnumerable,XW=(t,e,r)=>e in t?A$e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Eo=(t,e)=>{for(var r in e||(e={}))I$e.call(e,r)&&XW(t,r,e[r]);if(JW)for(var r of JW(e))P$e.call(e,r)&&XW(t,r,e[r]);return t},zv=(t,e)=>S$e(t,O$e(e));class T$e extends a4e{constructor(e){super(e),this.name=_$e,this.events=new ZM,this.initialized=!1,this.ignoredPayloadTypes=[Lp],this.requestQueue={state:Yu.idle,queue:[]},this.sessionRequestQueue={state:Yu.idle,queue:[]},this.requestQueueDelay=Zt.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(Hv)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},Zt.toMiliseconds(this.requestQueueDelay)))},this.connect=async r=>{await this.isInitialized();const n=zv(Eo({},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=Eo({requiredNamespaces:a,optionalNamespaces:o,relays:c??[{protocol:noe}],proposer:{publicKey:g,metadata:this.client.metadata}},s&&{sessionProperties:s}),{reject:w,resolve:v,done:y}=B0(Zt.FIVE_MINUTES,uoe);if(this.events.once(Ri("session_connect"),async({error:S,session:x})=>{if(S)w(S);else if(x){x.self.publicKey=g;const O=zv(Eo({},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=Sc(Zt.FIVE_MINUTES);return await this.setProposal(_,Eo({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||"",Ig(f)||(f=e8e(a,"approve()"));const g=await this.client.core.crypto.generateKeyPair(),m=u.publicKey,w=await this.client.core.crypto.generateSharedKey(g,m);c&&n&&(await this.client.core.pairing.updateMetadata({topic:c,metadata:u.metadata}),await this.sendResult({id:n,topic:c,result:{relay:{protocol:i??"irn"},responderPublicKey:g}}),await this.client.proposal.delete(n,xi("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:c}));const v=Eo({relay:{protocol:i??"irn"},namespaces:a,requiredNamespaces:f,optionalNamespaces:d,pairingTopic:c,controller:{publicKey:g,metadata:this.client.metadata},expiry:Sc(TE)},o&&{sessionProperties:o});await this.client.core.relayer.subscribe(w),await this.sendRequest({topic:w,method:"wc_sessionSettle",params:v,throwOnFailedPublish:!0});const y=zv(Eo({},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,Sc(TE)),{topic:w,acknowledged:()=>new Promise(_=>setTimeout(()=>_(this.client.session.get(w)),500))}},this.reject=async r=>{await this.isInitialized(),await this.isValidReject(r);const{id:n,reason:i}=r,{pairingTopic:a}=this.client.proposal.get(n);a&&(await this.sendError(n,a,i),await this.client.proposal.delete(n,xi("USER_DISCONNECTED")))},this.update=async r=>{await this.isInitialized(),await this.isValidUpdate(r);const{topic:n,namespaces:i}=r,a=await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i}}),{done:o,resolve:s,reject:c}=B0();return this.events.once(Ri("session_update",a),({error:u})=>{u?c(u):s()}),await this.client.session.update(n,{namespaces:i}),{acknowledged:o}},this.extend=async r=>{await this.isInitialized(),await this.isValidExtend(r);const{topic:n}=r,i=await this.sendRequest({topic:n,method:"wc_sessionExtend",params:{}}),{done:a,resolve:o,reject:s}=B0();return this.events.once(Ri("session_extend",i),({error:c})=>{c?s(c):o()}),await this.setExpiry(n,Sc(TE)),{acknowledged:a}},this.request=async r=>{await this.isInitialized(),await this.isValidRequest(r);const{chainId:n,request:i,topic:a,expiry:o}=r,s=Dk(),{done:c,resolve:u,reject:f}=B0(o,"Request expired. Please try again.");return this.events.once(Ri("session_request",s),({error:d,result:g})=>{d?f(d):u(g)}),await Promise.all([new Promise(async d=>{await this.sendRequest({clientRpcId:s,topic:a,method:"wc_sessionRequest",params:{request:i,chainId:n},expiry:o,throwOnFailedPublish:!0}).catch(g=>f(g)),this.client.events.emit("session_request_sent",{topic:a,request:i,chainId:n,id:s}),d()}),new Promise(async d=>{const g=await this.client.core.storage.getItem(QW);F6e({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;il(i)?await this.sendResult({id:a,topic:n,result:i.result,throwOnFailedPublish:!0}):Oc(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}=B0();this.events.once(Ri("session_ping",i),({error:c})=>{c?s(c):o()}),await a()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async r=>{await this.isInitialized(),await this.isValidEmit(r);const{topic:n,event:i,chainId:a}=r;await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:a}})},this.disconnect=async r=>{await this.isInitialized(),await this.isValidDisconnect(r);const{topic:n}=r;this.client.session.keys.includes(n)?(await this.sendRequest({topic:n,method:"wc_sessionDelete",params:xi("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession(n)):await this.client.core.pairing.disconnect({topic:n})},this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(n=>n8e(n,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async r=>{if(r.pairingTopic)try{const n=this.client.core.pairing.pairings.get(r.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(a=>{var o,s;return((o=a.peerMetadata)==null?void 0:o.url)&&((s=a.peerMetadata)==null?void 0:s.url)===r.peer.metadata.url&&a.topic&&a.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(a=>this.client.core.pairing.disconnect({topic:a.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async(r,n)=>{const{self:i}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),this.client.session.delete(r,xi("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(i.publicKey)&&await this.client.core.crypto.deleteKeyPair(i.publicKey),this.client.core.crypto.keychain.has(r)&&await this.client.core.crypto.deleteSymKey(r),n||this.client.core.expirer.del(r),this.client.core.storage.removeItem(QW).catch(a=>this.client.logger.warn(a))},this.deleteProposal=async(r,n)=>{await Promise.all([this.client.proposal.delete(r,xi("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deletePendingSessionRequest=async(r,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(a=>a.id!==r),i&&(this.sessionRequestQueue.state=Yu.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=Hv.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,Sc(n))},this.sendRequest=async r=>{const{topic:n,method:i,params:a,expiry:o,relayRpcId:s,clientRpcId:c,throwOnFailedPublish:u}=r,f=Pg(i,a,c);if(Qw()&&x$e.includes(i)){const m=Og(JSON.stringify(f));this.client.core.verify.register({attestationId:m})}const d=await this.client.core.crypto.encode(n,f),g=Hv[i].req;return o&&(g.ttl=o),s&&(g.id=s),this.client.core.history.set(n,f),u?(g.internal=zv(Eo({},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=$k(n,a),c=await this.client.core.crypto.encode(i,s),u=await this.client.core.history.get(i,n),f=Hv[u.request.method].res;o?(f.internal=zv(Eo({},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=gO(r,i),o=await this.client.core.crypto.encode(n,a),s=await this.client.core.history.get(n,r),c=Hv[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=>{If(i.expiry)&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{If(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===Yu.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=Yu.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=Yu.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(Eo({},n.params));const o=Sc(Zt.FIVE_MINUTES),s=Eo({id:a,pairingTopic:r,expiry:o},i);await this.setProposal(a,s);const c=Og(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(il(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 Oc(n)&&(await this.client.proposal.delete(i,xi("USER_DISCONNECTED")),this.events.emit(Ri("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(r,n)=>{const{id:i,params:a}=n;try{this.isValidSessionSettleRequest(a);const{relay:o,controller:s,expiry:c,namespaces:u,requiredNamespaces:f,optionalNamespaces:d,sessionProperties:g,pairingTopic:m}=n.params,w=Eo({topic:r,relay:o,expiry:c,namespaces:u,acknowledged:!0,pairingTopic:m,requiredNamespaces:f,optionalNamespaces:d,controller:s.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:s.publicKey,metadata:s.metadata}},g&&{sessionProperties:g});await this.sendResult({id:n.id,topic:r,result:!0}),this.events.emit(Ri("session_connect"),{session:w}),this.cleanupDuplicatePairings(w)}catch(o){await this.sendError(i,r,o),this.client.logger.error(o)}},this.onSessionSettleResponse=async(r,n)=>{const{id:i}=n;il(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(Ri("session_approve",i),{})):Oc(n)&&(await this.client.session.delete(r,xi("USER_DISCONNECTED")),this.events.emit(Ri("session_approve",i),{error:n.error}))},this.onSessionUpdateRequest=async(r,n)=>{const{params:i,id:a}=n;try{const o=`${r}_session_update`,s=PE.get(o);if(s&&this.isRequestOutOfSync(s,a)){this.client.logger.info(`Discarding out of sync request - ${a}`);return}this.isValidUpdate(Eo({topic:r},i)),await this.client.session.update(r,{namespaces:i.namespaces}),await this.sendResult({id:a,topic:r,result:!0}),this.client.events.emit("session_update",{id:a,topic:r,params:i}),PE.set(o,a)}catch(o){await this.sendError(a,r,o),this.client.logger.error(o)}},this.isRequestOutOfSync=(r,n)=>parseInt(n.toString().slice(0,-3))<=parseInt(r.toString().slice(0,-3)),this.onSessionUpdateResponse=(r,n)=>{const{id:i}=n;il(n)?this.events.emit(Ri("session_update",i),{}):Oc(n)&&this.events.emit(Ri("session_update",i),{error:n.error})},this.onSessionExtendRequest=async(r,n)=>{const{id:i}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,Sc(TE)),await this.sendResult({id:i,topic:r,result:!0}),this.client.events.emit("session_extend",{id:i,topic:r})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionExtendResponse=(r,n)=>{const{id:i}=n;il(n)?this.events.emit(Ri("session_extend",i),{}):Oc(n)&&this.events.emit(Ri("session_extend",i),{error:n.error})},this.onSessionPingRequest=async(r,n)=>{const{id:i}=n;try{this.isValidPing({topic:r}),await this.sendResult({id:i,topic:r,result:!0}),this.client.events.emit("session_ping",{id:i,topic:r})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionPingResponse=(r,n)=>{const{id:i}=n;setTimeout(()=>{il(n)?this.events.emit(Ri("session_ping",i),{}):Oc(n)&&this.events.emit(Ri("session_ping",i),{error:n.error})},500)},this.onSessionDeleteRequest=async(r,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),await Promise.all([new Promise(a=>{this.client.core.relayer.once(Ba.publish,async()=>{a(await this.deleteSession(r))})}),this.sendResult({id:i,topic:r,result:!0})]),this.client.events.emit("session_delete",{id:i,topic:r})}catch(a){this.client.logger.error(a)}},this.onSessionRequest=async(r,n)=>{const{id:i,params:a}=n;try{this.isValidRequest(Eo({topic:r},a));const o=Og(JSON.stringify(Pg("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;il(n)?this.events.emit(Ri("session_request",i),{result:n.result}):Oc(n)&&this.events.emit(Ri("session_request",i),{error:n.error})},this.onSessionEventRequest=async(r,n)=>{const{id:i,params:a}=n;try{const o=`${r}_session_event_${a.event.name}`,s=PE.get(o);if(s&&this.isRequestOutOfSync(s,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(Eo({topic:r},a)),this.client.events.emit("session_event",{id:i,topic:r,params:a}),PE.set(o,i)}catch(o){await this.sendError(i,r,o),this.client.logger.error(o)}},this.addSessionRequestToSessionRequestQueue=r=>{this.sessionRequestQueue.queue.push(r)},this.cleanupAfterResponse=r=>{this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=Yu.idle,this.processSessionRequestQueue()},Zt.toMiliseconds(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Yu.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=Yu.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,Pg("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer},n.id))},this.isValidConnect=async r=>{if(!xo(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(io(n)||await this.isValidPairingTopic(n),!g8e(s,!0)){const{message:c}=Tt("MISSING_OR_INVALID",`connect() relays: ${s}`);throw new Error(c)}!io(i)&&Ig(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!io(a)&&Ig(a)!==0&&this.validateNamespaces(a,"optionalNamespaces"),io(o)||this.validateSessionProps(o,"sessionProperties")},this.validateNamespaces=(r,n)=>{const i=p8e(r,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=async r=>{if(!xo(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=$x(i,"approve()");if(c)throw new Error(c.message);const u=aW(s.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!Ji(a,!0)){const{message:f}=Tt("MISSING_OR_INVALID",`approve() relayProtocol: ${a}`);throw new Error(f)}io(o)||this.validateSessionProps(o,"sessionProperties")},this.isValidReject=async r=>{if(!xo(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),!m8e(i)){const{message:a}=Tt("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidSessionSettleRequest=r=>{if(!xo(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(!Tae(n)){const{message:u}=Tt("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(u)}const s=c8e(i,"onSessionSettleRequest()");if(s)throw new Error(s.message);const c=$x(a,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(If(o)){const{message:u}=Tt("EXPIRED","onSessionSettleRequest()");throw new Error(u)}},this.isValidUpdate=async r=>{if(!xo(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=$x(i,"update()");if(o)throw new Error(o.message);const s=aW(a.requiredNamespaces,i,"update()");if(s)throw new Error(s.message)},this.isValidExtend=async r=>{if(!xo(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(!xo(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(!iW(s,a)){const{message:c}=Tt("MISSING_OR_INVALID",`request() chainId: ${a}`);throw new Error(c)}if(!v8e(i)){const{message:c}=Tt("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!_8e(s,a,i.method)){const{message:c}=Tt("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(c)}if(o&&!S8e(o,TN)){const{message:c}=Tt("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${TN.min} and ${TN.max}`);throw new Error(c)}},this.isValidRespond=async r=>{if(!xo(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),!b8e(i)){const{message:a}=Tt("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidPing=async r=>{if(!xo(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(!xo(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(!iW(o,a)){const{message:s}=Tt("MISSING_OR_INVALID",`emit() chainId: ${a}`);throw new Error(s)}if(!w8e(i)){const{message:s}=Tt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(s)}if(!E8e(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(!xo(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||tg,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(!Ji(i,!1)){const{message:a}=Tt("MISSING_OR_INVALID",`${n} must be in Record<string, string> format. Received: ${JSON.stringify(i)}`);throw new Error(a)}})}}async isInitialized(){if(!this.initialized){const{message:e}=Tt("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Ba.message,async e=>{const{topic:r,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const i=await this.client.core.crypto.decode(r,n);try{Mk(i)?(this.client.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):yO(i)?(await this.client.core.history.resolve(i),await this.onRelayEventResponse({topic:r,payload:i}),this.client.core.history.delete(r,i.id)):this.onRelayEventUnknownPayload({topic:r,payload:i})}catch(a){this.client.logger.error(a)}})}registerExpirerEvents(){this.client.core.expirer.on(Es.expired,async e=>{const{topic:r,id:n}=Iae(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(Ib.create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!Ji(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(If(this.client.core.pairing.pairings.get(e).expiry)){const{message:r}=Tt("EXPIRED",`pairing topic: ${e}`);throw new Error(r)}}async isValidSessionTopic(e){if(!Ji(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(If(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(Ji(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(!y8e(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(If(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:r}=Tt("EXPIRED",`proposal id: ${e}`);throw new Error(r)}}}class R$e extends vO{constructor(e,r){super(e,r,b$e,Lk),this.core=e,this.logger=r}}class C$e extends vO{constructor(e,r){super(e,r,w$e,Lk),this.core=e,this.logger=r}}class N$e extends vO{constructor(e,r){super(e,r,E$e,Lk,n=>n.id),this.core=e,this.logger=r}}let D$e=class loe extends i4e{constructor(e){super(e),this.protocol=ooe,this.version=soe,this.name=PN.name,this.events=new po.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)||PN.name,this.metadata=(e==null?void 0:e.metadata)||D6e();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)||PN.logger}));this.core=(e==null?void 0:e.core)||new v$e(e),this.logger=un.generateChildLogger(r,this.name),this.session=new C$e(this.core,this.logger),this.proposal=new R$e(this.core,this.logger),this.pendingRequest=new N$e(this.core,this.logger),this.engine=new T$e(this)}static async init(e){const r=new loe(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 m5={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 Y=B.shift();return{done:Y===void 0,value:Y}}};return s.iterable&&(U[Symbol.iterator]=function(){return U}),U}function w(B){this.map={},B instanceof w?B.forEach(function(U,Y){this.append(Y,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 Y=this.map[B];this.map[B]=Y?Y+", "+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 Y in this.map)this.map.hasOwnProperty(Y)&&B.call(U,this.map[Y],Y,this)},w.prototype.keys=function(){var B=[];return this.forEach(function(U,Y){B.push(Y)}),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,Y){B.push([Y,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,Y){B.onload=function(){U(B.result)},B.onerror=function(){Y(B.error)}})}function _(B){var U=new FileReader,Y=y(U);return U.readAsArrayBuffer(B),Y}function b(B){var U=new FileReader,Y=y(U);return U.readAsText(B),Y}function S(B){for(var U=new Uint8Array(B),Y=new Array(U.length),ne=0;ne<U.length;ne++)Y[ne]=String.fromCharCode(U[ne]);return Y.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 Y=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,!Y&&B._bodyInit!=null&&(Y=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")&&Y)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(Y)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function C(B){var U=new FormData;return B.trim().split("&").forEach(function(Y){if(Y){var ne=Y.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,Y=B.replace(/\r?\n[\t ]+/g," ");return Y.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,Y){this.message=U,this.name=Y;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(Y,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;Y(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})(m5,m5.exports);var $$e=m5.exports;const ZW=Bc($$e),M$e={Accept:"application/json","Content-Type":"application/json"},k$e="POST",eK={headers:M$e,method:k$e},tK=10;class Dd{constructor(e,r=!1){if(this.url=e,this.disableProviderPing=r,this.events=new po.EventEmitter,this.isAvailable=!1,this.registering=!1,!IW(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=B1(e),a=await(await ZW(this.url,Object.assign(Object.assign({},eK),{body:n}))).json();this.onPayload({data:a})}catch(n){this.onError(e.id,n)}}async register(e=this.url){if(!IW(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=B1({id:1,jsonrpc:"2.0",method:"test",params:[]});await ZW(e,Object.assign(Object.assign({},eK),{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"?Rk(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),a=gO(e,i);this.events.emit("payload",a)}parseError(e,r=this.url){return Fae(e,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>tK&&this.events.setMaxListeners(tK)}}const rK="error",L$e="wss://relay.walletconnect.com",U$e="wc",B$e="universal_provider",nK=`${U$e}@2:${B$e}:`,F$e="https://rpc.walletconnect.com/v1/",Xl={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Vv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof bn<"u"?bn:typeof self<"u"?self:{},v5={exports:{}};/**
138
+ * @license
139
+ * Lodash <https://lodash.com/>
140
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
141
+ * Released under MIT license <https://lodash.com/license>
142
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
143
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
144
+ */(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,Y=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]",Ve="[object Function]",tt="[object GeneratorFunction]",vt="[object Map]",bt="[object Number]",yt="[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]",Vt="[object WeakSet]",$t="[object ArrayBuffer]",Dt="[object DataView]",qt="[object Float32Array]",Mt="[object Float64Array]",cr="[object Int8Array]",tr="[object Int16Array]",ir="[object Int32Array]",nr="[object Uint8Array]",mr="[object Uint8ClampedArray]",wn="[object Uint16Array]",Yr="[object Uint32Array]",oi=/\b__p \+= '';/g,Dn=/\b(__p \+=) '' \+/g,$n=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Yn=/&(?:amp|lt|gt|quot|#39);/g,xr=/[&<>"']/g,$r=RegExp(Yn.source),_r=RegExp(xr.source),_e=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,ve=/<%=([\s\S]+?)%>/g,Re=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,He=/^\w*$/,Ze=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ct=/[\\^$.*+?()[\]{}|]/g,ft=RegExp(ct.source),Et=/^\s+/,ue=/\s/,Z=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ye=/\{\n\/\* \[wrapped with (.+)\] \*/,Me=/,? & /,Le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_t=/[()=,{}\[\]\/\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,ei="\\ud800-\\udfff",Oi="\\u0300-\\u036f",ti="\\ufe20-\\ufe2f",Ii="\\u20d0-\\u20ff",Pi=Oi+ti+Ii,si="\\u2700-\\u27bf",jn="a-z\\xdf-\\xf6\\xf8-\\xff",na="\\xac\\xb1\\xd7\\xf7",Mi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ea="\\u2000-\\u206f",ss=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",X="A-Z\\xc0-\\xd6\\xd8-\\xde",me="\\ufe0e\\ufe0f",re=na+Mi+Ea+ss,Ee="['’]",be="["+ei+"]",Oe="["+re+"]",Xe="["+Pi+"]",dt="\\d+",Qe="["+si+"]",Ge="["+jn+"]",pt="[^"+ei+re+dt+si+jn+X+"]",Gt="\\ud83c[\\udffb-\\udfff]",Tr="(?:"+Xe+"|"+Gt+")",Wr="[^"+ei+"]",jr="(?:\\ud83c[\\udde6-\\uddff]){2}",_n="[\\ud800-\\udbff][\\udc00-\\udfff]",qr="["+X+"]",P="\\u200d",D="(?:"+Ge+"|"+pt+")",W="(?:"+qr+"|"+pt+")",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,jr,_n].join("|")+")"+rt+Ce+")*",Ft="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Xt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ti=rt+Ce+At,xn="(?:"+[Qe,jr,_n].join("|")+")"+Ti,St="(?:"+[Wr+Xe+"?",Xe,jr,_n,be].join("|")+")",ci=RegExp(Ee,"g"),An=RegExp(Xe,"g"),fn=RegExp(Gt+"(?="+Gt+")|"+St+Ti,"g"),mi=RegExp([qr+"?"+Ge+"+"+he+"(?="+[Oe,qr,"$"].join("|")+")",W+"+"+Se+"(?="+[Oe,qr+D,"$"].join("|")+")",qr+"?"+D+"+"+he,qr+"+"+Se,Xt,Ft,dt,xn].join("|"),"g"),go=RegExp("["+P+ei+Pi+me+"]"),Hi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vi=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],yo=-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[Ve]=tn[vt]=tn[bt]=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[vt]=Ar[bt]=Ar[Lt]=Ar[Rt]=Ar[Pt]=Ar[kt]=Ar[Nt]=Ar[nr]=Ar[mr]=Ar[wn]=Ar[Yr]=!0,Ar[fe]=Ar[Ve]=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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},it={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ke={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,fr=parseInt,yn=typeof Vv=="object"&&Vv&&Vv.Object===Object&&Vv,or=typeof self=="object"&&self&&self.Object===Object&&self,yr=yn||or||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,Ye=se&&se.isSet,qe=se&&se.isTypedArray;function gt(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 Ui=Ue[Cr];nt(Bt,Ui,et(Ui),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 Ui=Ue[et];nt(Ui,et,Ue)&&(En[Cr++]=Ui)}return En}function Mr(Ue,nt){var et=Ue==null?0:Ue.length;return!!et&&rc(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 zi(Ue,nt){for(var et=-1,Bt=nt.length,Cr=Ue.length;++et<Bt;)Ue[Cr+et]=nt[et];return Ue}function cs(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 zc(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 ki(Ue,nt){for(var et=-1,Bt=Ue==null?0:Ue.length;++et<Bt;)if(nt(Ue[et],et,Ue))return!0;return!1}var us=Zl("length");function Li(Ue){return Ue.split("")}function hi(Ue){return Ue.match(Le)||[]}function Sn(Ue,nt,et){var Bt;return et(Ue,function(Cr,En,Ui){if(nt(Cr,En,Ui))return Bt=En,!1}),Bt}function $u(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 rc(Ue,nt,et){return nt===nt?e0(Ue,nt,et):$u(Ue,Bd,et)}function Hp(Ue,nt,et,Bt){for(var Cr=et-1,En=Ue.length;++Cr<En;)if(Bt(Ue[Cr],nt))return Cr;return-1}function Bd(Ue){return Ue!==Ue}function Fd(Ue,nt){var et=Ue==null?0:Ue.length;return et?tf(Ue,nt)/et:z}function Zl(Ue){return function(nt){return nt==null?r:nt[Ue]}}function ef(Ue){return function(nt){return Ue==null?r:Ue[nt]}}function jd(Ue,nt,et,Bt,Cr){return Cr(Ue,function(En,Ui,Bn){et=Bt?(Bt=!1,En):nt(et,En,Ui,Bn)}),et}function zp(Ue,nt){var et=Ue.length;for(Ue.sort(nt);et--;)Ue[et]=Ue[et].value;return Ue}function tf(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 rf(Ue,nt){for(var et=-1,Bt=Array(Ue);++et<Ue;)Bt[et]=nt(et);return Bt}function Vp(Ue,nt){return Sr(nt,function(et){return[et,Ue[et]]})}function qd(Ue){return Ue&&Ue.slice(0,Gd(Ue)+1).replace(Et,"")}function Vi(Ue){return function(nt){return Ue(nt)}}function nf(Ue,nt){return Sr(nt,function(et){return Ue[et]})}function Vc(Ue,nt){return Ue.has(nt)}function Hd(Ue,nt){for(var et=-1,Bt=Ue.length;++et<Bt&&rc(nt,Ue[et],0)>-1;);return et}function zd(Ue,nt){for(var et=Ue.length;et--&&rc(nt,Ue[et],0)>-1;);return et}function Gp(Ue,nt){for(var et=Ue.length,Bt=0;et--;)Ue[et]===nt&&++Bt;return Bt}var Wp=ef(de),Kp=ef(ke);function Yp(Ue){return"\\"+Ke[Ue]}function Qp(Ue,nt){return Ue==null?r:Ue[nt]}function nc(Ue){return go.test(Ue)}function Jp(Ue){return Hi.test(Ue)}function Xp(Ue){for(var nt,et=[];!(nt=Ue.next()).done;)et.push(nt.value);return et}function af(Ue){var nt=-1,et=Array(Ue.size);return Ue.forEach(function(Bt,Cr){et[++nt]=[Cr,Bt]}),et}function Vd(Ue,nt){return function(et){return Ue(nt(et))}}function jo(Ue,nt){for(var et=-1,Bt=Ue.length,Cr=0,En=[];++et<Bt;){var Ui=Ue[et];(Ui===nt||Ui===f)&&(Ue[et]=f,En[Cr++]=et)}return En}function Mu(Ue){var nt=-1,et=Array(Ue.size);return Ue.forEach(function(Bt){et[++nt]=Bt}),et}function Zp(Ue){var nt=-1,et=Array(Ue.size);return Ue.forEach(function(Bt){et[++nt]=[Bt,Bt]}),et}function e0(Ue,nt,et){for(var Bt=et-1,Cr=Ue.length;++Bt<Cr;)if(Ue[Bt]===nt)return Bt;return-1}function t0(Ue,nt,et){for(var Bt=et+1;Bt--;)if(Ue[Bt]===nt)return Bt;return Bt}function ic(Ue){return nc(Ue)?cue(Ue):us(Ue)}function xa(Ue){return nc(Ue)?uue(Ue):Li(Ue)}function Gd(Ue){for(var nt=Ue.length;nt--&&ue.test(Ue.charAt(nt)););return nt}var r0=ef(it);function cue(Ue){for(var nt=fn.lastIndex=0;fn.test(Ue);)++nt;return nt}function uue(Ue){return Ue.match(fn)||[]}function lue(Ue){return Ue.match(mi)||[]}var fue=function Ue(nt){nt=nt==null?yr:n0.defaults(yr.Object(),nt,n0.pick(yr,vi));var et=nt.Array,Bt=nt.Date,Cr=nt.Error,En=nt.Function,Ui=nt.Math,Bn=nt.Object,YO=nt.RegExp,due=nt.String,ls=nt.TypeError,s_=et.prototype,hue=En.prototype,i0=Bn.prototype,c_=nt["__core-js_shared__"],u_=hue.toString,Tn=i0.hasOwnProperty,pue=0,YL=function(){var l=/[^.]+$/.exec(c_&&c_.keys&&c_.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),l_=i0.toString,gue=u_.call(Bn),yue=yr._,mue=YO("^"+u_.call(Tn).replace(ct,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),f_=oe?nt.Buffer:r,of=nt.Symbol,d_=nt.Uint8Array,QL=f_?f_.allocUnsafe:r,h_=Vd(Bn.getPrototypeOf,Bn),JL=Bn.create,XL=i0.propertyIsEnumerable,p_=s_.splice,ZL=of?of.isConcatSpreadable:r,Sm=of?of.iterator:r,Wd=of?of.toStringTag:r,g_=function(){try{var l=Xd(Bn,"defineProperty");return l({},"",{}),l}catch{}}(),vue=nt.clearTimeout!==yr.clearTimeout&&nt.clearTimeout,bue=Bt&&Bt.now!==yr.Date.now&&Bt.now,wue=nt.setTimeout!==yr.setTimeout&&nt.setTimeout,y_=Ui.ceil,m_=Ui.floor,QO=Bn.getOwnPropertySymbols,_ue=f_?f_.isBuffer:r,e9=nt.isFinite,Eue=s_.join,xue=Vd(Bn.keys,Bn),Bi=Ui.max,Aa=Ui.min,Aue=Bt.now,Sue=nt.parseInt,t9=Ui.random,Oue=s_.reverse,JO=Xd(nt,"DataView"),Om=Xd(nt,"Map"),XO=Xd(nt,"Promise"),a0=Xd(nt,"Set"),Im=Xd(nt,"WeakMap"),Pm=Xd(Bn,"create"),v_=Im&&new Im,o0={},Iue=Zd(JO),Pue=Zd(Om),Tue=Zd(XO),Rue=Zd(a0),Cue=Zd(Im),b_=of?of.prototype:r,Tm=b_?b_.valueOf:r,r9=b_?b_.toString:r;function J(l){if(pi(l)&&!Dr(l)&&!(l instanceof rn)){if(l instanceof fs)return l;if(Tn.call(l,"__wrapped__"))return n7(l)}return new fs(l)}var s0=function(){function l(){}return function(h){if(!ui(h))return{};if(JL)return JL(h);l.prototype=h;var A=new l;return l.prototype=r,A}}();function w_(){}function fs(l,h){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=r}J.templateSettings={escape:_e,evaluate:ee,interpolate:ve,variable:"",imports:{_:J}},J.prototype=w_.prototype,J.prototype.constructor=J,fs.prototype=s0(w_.prototype),fs.prototype.constructor=fs;function rn(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=$,this.__views__=[]}function Nue(){var l=new rn(this.__wrapped__);return l.__actions__=mo(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=mo(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=mo(this.__views__),l}function Due(){if(this.__filtered__){var l=new rn(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function $ue(){var l=this.__wrapped__.value(),h=this.__dir__,A=Dr(l),N=h<0,V=A?l.length:0,ae=Gle(0,V,this.__views__),xe=ae.start,$e=ae.end,Fe=$e-xe,ot=N?$e:xe-1,st=this.__iteratees__,ht=st.length,It=0,Qt=Aa(Fe,this.__takeCount__);if(!A||!N&&V==Fe&&Qt==Fe)return O9(l,this.__actions__);var dr=[];e:for(;Fe--&&It<Qt;){ot+=h;for(var Hr=-1,hr=l[ot];++Hr<ht;){var Zr=st[Hr],sn=Zr.iteratee,zo=Zr.type,Ya=sn(hr);if(zo==U)hr=Ya;else if(!Ya){if(zo==B)continue e;break e}}dr[It++]=hr}return dr}rn.prototype=s0(w_.prototype),rn.prototype.constructor=rn;function Kd(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 Mue(){this.__data__=Pm?Pm(null):{},this.size=0}function kue(l){var h=this.has(l)&&delete this.__data__[l];return this.size-=h?1:0,h}function Lue(l){var h=this.__data__;if(Pm){var A=h[l];return A===c?r:A}return Tn.call(h,l)?h[l]:r}function Uue(l){var h=this.__data__;return Pm?h[l]!==r:Tn.call(h,l)}function Bue(l,h){var A=this.__data__;return this.size+=this.has(l)?0:1,A[l]=Pm&&h===r?c:h,this}Kd.prototype.clear=Mue,Kd.prototype.delete=kue,Kd.prototype.get=Lue,Kd.prototype.has=Uue,Kd.prototype.set=Bue;function ku(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 Fue(){this.__data__=[],this.size=0}function jue(l){var h=this.__data__,A=__(h,l);if(A<0)return!1;var N=h.length-1;return A==N?h.pop():p_.call(h,A,1),--this.size,!0}function que(l){var h=this.__data__,A=__(h,l);return A<0?r:h[A][1]}function Hue(l){return __(this.__data__,l)>-1}function zue(l,h){var A=this.__data__,N=__(A,l);return N<0?(++this.size,A.push([l,h])):A[N][1]=h,this}ku.prototype.clear=Fue,ku.prototype.delete=jue,ku.prototype.get=que,ku.prototype.has=Hue,ku.prototype.set=zue;function Lu(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 Vue(){this.size=0,this.__data__={hash:new Kd,map:new(Om||ku),string:new Kd}}function Gue(l){var h=D_(this,l).delete(l);return this.size-=h?1:0,h}function Wue(l){return D_(this,l).get(l)}function Kue(l){return D_(this,l).has(l)}function Yue(l,h){var A=D_(this,l),N=A.size;return A.set(l,h),this.size+=A.size==N?0:1,this}Lu.prototype.clear=Vue,Lu.prototype.delete=Gue,Lu.prototype.get=Wue,Lu.prototype.has=Kue,Lu.prototype.set=Yue;function Yd(l){var h=-1,A=l==null?0:l.length;for(this.__data__=new Lu;++h<A;)this.add(l[h])}function Que(l){return this.__data__.set(l,c),this}function Jue(l){return this.__data__.has(l)}Yd.prototype.add=Yd.prototype.push=Que,Yd.prototype.has=Jue;function ac(l){var h=this.__data__=new ku(l);this.size=h.size}function Xue(){this.__data__=new ku,this.size=0}function Zue(l){var h=this.__data__,A=h.delete(l);return this.size=h.size,A}function ele(l){return this.__data__.get(l)}function tle(l){return this.__data__.has(l)}function rle(l,h){var A=this.__data__;if(A instanceof ku){var N=A.__data__;if(!Om||N.length<i-1)return N.push([l,h]),this.size=++A.size,this;A=this.__data__=new Lu(N)}return A.set(l,h),this.size=A.size,this}ac.prototype.clear=Xue,ac.prototype.delete=Zue,ac.prototype.get=ele,ac.prototype.has=tle,ac.prototype.set=rle;function n9(l,h){var A=Dr(l),N=!A&&eh(l),V=!A&&!N&&ff(l),ae=!A&&!N&&!V&&f0(l),xe=A||N||V||ae,$e=xe?rf(l.length,due):[],Fe=$e.length;for(var ot in l)(h||Tn.call(l,ot))&&!(xe&&(ot=="length"||V&&(ot=="offset"||ot=="parent")||ae&&(ot=="buffer"||ot=="byteLength"||ot=="byteOffset")||ju(ot,Fe)))&&$e.push(ot);return $e}function i9(l){var h=l.length;return h?l[uI(0,h-1)]:r}function nle(l,h){return $_(mo(l),Qd(h,0,l.length))}function ile(l){return $_(mo(l))}function ZO(l,h,A){(A!==r&&!oc(l[h],A)||A===r&&!(h in l))&&Uu(l,h,A)}function Rm(l,h,A){var N=l[h];(!(Tn.call(l,h)&&oc(N,A))||A===r&&!(h in l))&&Uu(l,h,A)}function __(l,h){for(var A=l.length;A--;)if(oc(l[A][0],h))return A;return-1}function ale(l,h,A,N){return sf(l,function(V,ae,xe){h(N,V,A(V),xe)}),N}function a9(l,h){return l&&Wc(h,Gi(h),l)}function ole(l,h){return l&&Wc(h,bo(h),l)}function Uu(l,h,A){h=="__proto__"&&g_?g_(l,h,{configurable:!0,enumerable:!0,value:A,writable:!0}):l[h]=A}function eI(l,h){for(var A=-1,N=h.length,V=et(N),ae=l==null;++A<N;)V[A]=ae?r:$I(l,h[A]);return V}function Qd(l,h,A){return l===l&&(A!==r&&(l=l<=A?l:A),h!==r&&(l=l>=h?l:h)),l}function ds(l,h,A,N,V,ae){var xe,$e=h&d,Fe=h&g,ot=h&m;if(A&&(xe=V?A(l,N,V,ae):A(l)),xe!==r)return xe;if(!ui(l))return l;var st=Dr(l);if(st){if(xe=Kle(l),!$e)return mo(l,xe)}else{var ht=Sa(l),It=ht==Ve||ht==tt;if(ff(l))return T9(l,$e);if(ht==Lt||ht==G||It&&!V){if(xe=Fe||It?{}:K9(l),!$e)return Fe?Lle(l,ole(xe,l)):kle(l,a9(xe,l))}else{if(!Ar[ht])return V?l:{};xe=Yle(l,ht,$e)}}ae||(ae=new ac);var Qt=ae.get(l);if(Qt)return Qt;ae.set(l,xe),x7(l)?l.forEach(function(hr){xe.add(ds(hr,h,A,hr,l,ae))}):_7(l)&&l.forEach(function(hr,Zr){xe.set(Zr,ds(hr,h,A,Zr,l,ae))});var dr=ot?Fe?wI:bI:Fe?bo:Gi,Hr=st?r:dr(l);return Wt(Hr||l,function(hr,Zr){Hr&&(Zr=hr,hr=l[Zr]),Rm(xe,Zr,ds(hr,h,A,Zr,l,ae))}),xe}function sle(l){var h=Gi(l);return function(A){return o9(A,l,h)}}function o9(l,h,A){var N=A.length;if(l==null)return!N;for(l=Bn(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 s9(l,h,A){if(typeof l!="function")throw new ls(o);return Lm(function(){l.apply(r,A)},h)}function Cm(l,h,A,N){var V=-1,ae=Mr,xe=!0,$e=l.length,Fe=[],ot=h.length;if(!$e)return Fe;A&&(h=Sr(h,Vi(A))),N?(ae=Xr,xe=!1):h.length>=i&&(ae=Vc,xe=!1,h=new Yd(h));e:for(;++V<$e;){var st=l[V],ht=A==null?st:A(st);if(st=N||st!==0?st:0,xe&&ht===ht){for(var It=ot;It--;)if(h[It]===ht)continue e;Fe.push(st)}else ae(h,ht,N)||Fe.push(st)}return Fe}var sf=$9(Gc),c9=$9(rI,!0);function cle(l,h){var A=!0;return sf(l,function(N,V,ae){return A=!!h(N,V,ae),A}),A}function E_(l,h,A){for(var N=-1,V=l.length;++N<V;){var ae=l[N],xe=h(ae);if(xe!=null&&($e===r?xe===xe&&!Ho(xe):A(xe,$e)))var $e=xe,Fe=ae}return Fe}function ule(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:S7(N);A<N;)l[A++]=h;return l}function u9(l,h){var A=[];return sf(l,function(N,V,ae){h(N,V,ae)&&A.push(N)}),A}function ia(l,h,A,N,V){var ae=-1,xe=l.length;for(A||(A=Jle),V||(V=[]);++ae<xe;){var $e=l[ae];h>0&&A($e)?h>1?ia($e,h-1,A,N,V):zi(V,$e):N||(V[V.length]=$e)}return V}var tI=M9(),l9=M9(!0);function Gc(l,h){return l&&tI(l,h,Gi)}function rI(l,h){return l&&l9(l,h,Gi)}function x_(l,h){return dn(h,function(A){return qu(l[A])})}function Jd(l,h){h=uf(h,l);for(var A=0,N=h.length;l!=null&&A<N;)l=l[Kc(h[A++])];return A&&A==N?l:r}function f9(l,h,A){var N=h(l);return Dr(l)?N:zi(N,A(l))}function Wa(l){return l==null?l===r?Kt:yt:Wd&&Wd in Bn(l)?Vle(l):ife(l)}function nI(l,h){return l>h}function lle(l,h){return l!=null&&Tn.call(l,h)}function fle(l,h){return l!=null&&h in Bn(l)}function dle(l,h,A){return l>=Aa(h,A)&&l<Bi(h,A)}function iI(l,h,A){for(var N=A?Xr:Mr,V=l[0].length,ae=l.length,xe=ae,$e=et(ae),Fe=1/0,ot=[];xe--;){var st=l[xe];xe&&h&&(st=Sr(st,Vi(h))),Fe=Aa(st.length,Fe),$e[xe]=!A&&(h||V>=120&&st.length>=120)?new Yd(xe&&st):r}st=l[0];var ht=-1,It=$e[0];e:for(;++ht<V&&ot.length<Fe;){var Qt=st[ht],dr=h?h(Qt):Qt;if(Qt=A||Qt!==0?Qt:0,!(It?Vc(It,dr):N(ot,dr,A))){for(xe=ae;--xe;){var Hr=$e[xe];if(!(Hr?Vc(Hr,dr):N(l[xe],dr,A)))continue e}It&&It.push(dr),ot.push(Qt)}}return ot}function hle(l,h,A,N){return Gc(l,function(V,ae,xe){h(N,A(V),ae,xe)}),N}function Nm(l,h,A){h=uf(h,l),l=X9(l,h);var N=l==null?l:l[Kc(ps(h))];return N==null?r:gt(N,l,A)}function d9(l){return pi(l)&&Wa(l)==G}function ple(l){return pi(l)&&Wa(l)==$t}function gle(l){return pi(l)&&Wa(l)==ce}function Dm(l,h,A,N,V){return l===h?!0:l==null||h==null||!pi(l)&&!pi(h)?l!==l&&h!==h:yle(l,h,A,N,Dm,V)}function yle(l,h,A,N,V,ae){var xe=Dr(l),$e=Dr(h),Fe=xe?ge:Sa(l),ot=$e?ge:Sa(h);Fe=Fe==G?Lt:Fe,ot=ot==G?Lt:ot;var st=Fe==Lt,ht=ot==Lt,It=Fe==ot;if(It&&ff(l)){if(!ff(h))return!1;xe=!0,st=!1}if(It&&!st)return ae||(ae=new ac),xe||f0(l)?V9(l,h,A,N,V,ae):Hle(l,h,Fe,A,N,V,ae);if(!(A&w)){var Qt=st&&Tn.call(l,"__wrapped__"),dr=ht&&Tn.call(h,"__wrapped__");if(Qt||dr){var Hr=Qt?l.value():l,hr=dr?h.value():h;return ae||(ae=new ac),V(Hr,hr,A,N,ae)}}return It?(ae||(ae=new ac),zle(l,h,A,N,V,ae)):!1}function mle(l){return pi(l)&&Sa(l)==vt}function aI(l,h,A,N){var V=A.length,ae=V,xe=!N;if(l==null)return!ae;for(l=Bn(l);V--;){var $e=A[V];if(xe&&$e[2]?$e[1]!==l[$e[0]]:!($e[0]in l))return!1}for(;++V<ae;){$e=A[V];var Fe=$e[0],ot=l[Fe],st=$e[1];if(xe&&$e[2]){if(ot===r&&!(Fe in l))return!1}else{var ht=new ac;if(N)var It=N(ot,st,Fe,l,h,ht);if(!(It===r?Dm(st,ot,w|v,N,ht):It))return!1}}return!0}function h9(l){if(!ui(l)||Zle(l))return!1;var h=qu(l)?mue:Er;return h.test(Zd(l))}function vle(l){return pi(l)&&Wa(l)==Rt}function ble(l){return pi(l)&&Sa(l)==Pt}function wle(l){return pi(l)&&F_(l.length)&&!!tn[Wa(l)]}function p9(l){return typeof l=="function"?l:l==null?wo:typeof l=="object"?Dr(l)?m9(l[0],l[1]):y9(l):k7(l)}function oI(l){if(!km(l))return xue(l);var h=[];for(var A in Bn(l))Tn.call(l,A)&&A!="constructor"&&h.push(A);return h}function _le(l){if(!ui(l))return nfe(l);var h=km(l),A=[];for(var N in l)N=="constructor"&&(h||!Tn.call(l,N))||A.push(N);return A}function sI(l,h){return l<h}function g9(l,h){var A=-1,N=vo(l)?et(l.length):[];return sf(l,function(V,ae,xe){N[++A]=h(V,ae,xe)}),N}function y9(l){var h=EI(l);return h.length==1&&h[0][2]?Q9(h[0][0],h[0][1]):function(A){return A===l||aI(A,l,h)}}function m9(l,h){return AI(l)&&Y9(h)?Q9(Kc(l),h):function(A){var N=$I(A,l);return N===r&&N===h?MI(A,l):Dm(h,N,w|v)}}function A_(l,h,A,N,V){l!==h&&tI(h,function(ae,xe){if(V||(V=new ac),ui(ae))Ele(l,h,xe,A,A_,N,V);else{var $e=N?N(OI(l,xe),ae,xe+"",l,h,V):r;$e===r&&($e=ae),ZO(l,xe,$e)}},bo)}function Ele(l,h,A,N,V,ae,xe){var $e=OI(l,A),Fe=OI(h,A),ot=xe.get(Fe);if(ot){ZO(l,A,ot);return}var st=ae?ae($e,Fe,A+"",l,h,xe):r,ht=st===r;if(ht){var It=Dr(Fe),Qt=!It&&ff(Fe),dr=!It&&!Qt&&f0(Fe);st=Fe,It||Qt||dr?Dr($e)?st=$e:bi($e)?st=mo($e):Qt?(ht=!1,st=T9(Fe,!0)):dr?(ht=!1,st=R9(Fe,!0)):st=[]:Um(Fe)||eh(Fe)?(st=$e,eh($e)?st=O7($e):(!ui($e)||qu($e))&&(st=K9(Fe))):ht=!1}ht&&(xe.set(Fe,st),V(st,Fe,N,ae,xe),xe.delete(Fe)),ZO(l,A,st)}function v9(l,h){var A=l.length;if(A)return h+=h<0?A:0,ju(h,A)?l[h]:r}function b9(l,h,A){h.length?h=Sr(h,function(ae){return Dr(ae)?function(xe){return Jd(xe,ae.length===1?ae[0]:ae)}:ae}):h=[wo];var N=-1;h=Sr(h,Vi(ur()));var V=g9(l,function(ae,xe,$e){var Fe=Sr(h,function(ot){return ot(ae)});return{criteria:Fe,index:++N,value:ae}});return zp(V,function(ae,xe){return Mle(ae,xe,A)})}function xle(l,h){return w9(l,h,function(A,N){return MI(l,N)})}function w9(l,h,A){for(var N=-1,V=h.length,ae={};++N<V;){var xe=h[N],$e=Jd(l,xe);A($e,xe)&&$m(ae,uf(xe,l),$e)}return ae}function Ale(l){return function(h){return Jd(h,l)}}function cI(l,h,A,N){var V=N?Hp:rc,ae=-1,xe=h.length,$e=l;for(l===h&&(h=mo(h)),A&&($e=Sr(l,Vi(A)));++ae<xe;)for(var Fe=0,ot=h[ae],st=A?A(ot):ot;(Fe=V($e,st,Fe,N))>-1;)$e!==l&&p_.call($e,Fe,1),p_.call(l,Fe,1);return l}function _9(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;ju(V)?p_.call(l,V,1):dI(l,V)}}return l}function uI(l,h){return l+m_(t9()*(h-l+1))}function Sle(l,h,A,N){for(var V=-1,ae=Bi(y_((h-l)/(A||1)),0),xe=et(ae);ae--;)xe[N?ae:++V]=l,l+=A;return xe}function lI(l,h){var A="";if(!l||h<1||h>F)return A;do h%2&&(A+=l),h=m_(h/2),h&&(l+=l);while(h);return A}function Gr(l,h){return II(J9(l,h,wo),l+"")}function Ole(l){return i9(d0(l))}function Ile(l,h){var A=d0(l);return $_(A,Qd(h,0,A.length))}function $m(l,h,A,N){if(!ui(l))return l;h=uf(h,l);for(var V=-1,ae=h.length,xe=ae-1,$e=l;$e!=null&&++V<ae;){var Fe=Kc(h[V]),ot=A;if(Fe==="__proto__"||Fe==="constructor"||Fe==="prototype")return l;if(V!=xe){var st=$e[Fe];ot=N?N(st,Fe,$e):r,ot===r&&(ot=ui(st)?st:ju(h[V+1])?[]:{})}Rm($e,Fe,ot),$e=$e[Fe]}return l}var E9=v_?function(l,h){return v_.set(l,h),l}:wo,Ple=g_?function(l,h){return g_(l,"toString",{configurable:!0,enumerable:!1,value:LI(h),writable:!0})}:wo;function Tle(l){return $_(d0(l))}function hs(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 Rle(l,h){var A;return sf(l,function(N,V,ae){return A=h(N,V,ae),!A}),!!A}function S_(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&&!Ho(xe)&&(A?xe<=h:xe<h)?N=ae+1:V=ae}return V}return fI(l,h,wo,A)}function fI(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,$e=h===null,Fe=Ho(h),ot=h===r;V<ae;){var st=m_((V+ae)/2),ht=A(l[st]),It=ht!==r,Qt=ht===null,dr=ht===ht,Hr=Ho(ht);if(xe)var hr=N||dr;else ot?hr=dr&&(N||It):$e?hr=dr&&It&&(N||!Qt):Fe?hr=dr&&It&&!Qt&&(N||!Hr):Qt||Hr?hr=!1:hr=N?ht<=h:ht<h;hr?V=st+1:ae=st}return Aa(ae,H)}function x9(l,h){for(var A=-1,N=l.length,V=0,ae=[];++A<N;){var xe=l[A],$e=h?h(xe):xe;if(!A||!oc($e,Fe)){var Fe=$e;ae[V++]=xe===0?0:xe}}return ae}function A9(l){return typeof l=="number"?l:Ho(l)?z:+l}function qo(l){if(typeof l=="string")return l;if(Dr(l))return Sr(l,qo)+"";if(Ho(l))return r9?r9.call(l):"";var h=l+"";return h=="0"&&1/l==-ne?"-0":h}function cf(l,h,A){var N=-1,V=Mr,ae=l.length,xe=!0,$e=[],Fe=$e;if(A)xe=!1,V=Xr;else if(ae>=i){var ot=h?null:jle(l);if(ot)return Mu(ot);xe=!1,V=Vc,Fe=new Yd}else Fe=h?[]:$e;e:for(;++N<ae;){var st=l[N],ht=h?h(st):st;if(st=A||st!==0?st:0,xe&&ht===ht){for(var It=Fe.length;It--;)if(Fe[It]===ht)continue e;h&&Fe.push(ht),$e.push(st)}else V(Fe,ht,A)||(Fe!==$e&&Fe.push(ht),$e.push(st))}return $e}function dI(l,h){return h=uf(h,l),l=X9(l,h),l==null||delete l[Kc(ps(h))]}function S9(l,h,A,N){return $m(l,h,A(Jd(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?hs(l,N?0:ae,N?ae+1:V):hs(l,N?ae+1:0,N?V:ae)}function O9(l,h){var A=l;return A instanceof rn&&(A=A.value()),cs(h,function(N,V){return V.func.apply(V.thisArg,zi([N],V.args))},A)}function hI(l,h,A){var N=l.length;if(N<2)return N?cf(l[0]):[];for(var V=-1,ae=et(N);++V<N;)for(var xe=l[V],$e=-1;++$e<N;)$e!=V&&(ae[V]=Cm(ae[V]||xe,l[$e],h,A));return cf(ia(ae,1),h,A)}function I9(l,h,A){for(var N=-1,V=l.length,ae=h.length,xe={};++N<V;){var $e=N<ae?h[N]:r;A(xe,l[N],$e)}return xe}function pI(l){return bi(l)?l:[]}function gI(l){return typeof l=="function"?l:wo}function uf(l,h){return Dr(l)?l:AI(l,h)?[l]:r7(On(l))}var Cle=Gr;function lf(l,h,A){var N=l.length;return A=A===r?N:A,!h&&A>=N?l:hs(l,h,A)}var P9=vue||function(l){return yr.clearTimeout(l)};function T9(l,h){if(h)return l.slice();var A=l.length,N=QL?QL(A):new l.constructor(A);return l.copy(N),N}function yI(l){var h=new l.constructor(l.byteLength);return new d_(h).set(new d_(l)),h}function Nle(l,h){var A=h?yI(l.buffer):l.buffer;return new l.constructor(A,l.byteOffset,l.byteLength)}function Dle(l){var h=new l.constructor(l.source,lr.exec(l));return h.lastIndex=l.lastIndex,h}function $le(l){return Tm?Bn(Tm.call(l)):{}}function R9(l,h){var A=h?yI(l.buffer):l.buffer;return new l.constructor(A,l.byteOffset,l.length)}function C9(l,h){if(l!==h){var A=l!==r,N=l===null,V=l===l,ae=Ho(l),xe=h!==r,$e=h===null,Fe=h===h,ot=Ho(h);if(!$e&&!ot&&!ae&&l>h||ae&&xe&&Fe&&!$e&&!ot||N&&xe&&Fe||!A&&Fe||!V)return 1;if(!N&&!ae&&!ot&&l<h||ot&&A&&V&&!N&&!ae||$e&&A&&V||!xe&&V||!Fe)return-1}return 0}function Mle(l,h,A){for(var N=-1,V=l.criteria,ae=h.criteria,xe=V.length,$e=A.length;++N<xe;){var Fe=C9(V[N],ae[N]);if(Fe){if(N>=$e)return Fe;var ot=A[N];return Fe*(ot=="desc"?-1:1)}}return l.index-h.index}function N9(l,h,A,N){for(var V=-1,ae=l.length,xe=A.length,$e=-1,Fe=h.length,ot=Bi(ae-xe,0),st=et(Fe+ot),ht=!N;++$e<Fe;)st[$e]=h[$e];for(;++V<xe;)(ht||V<ae)&&(st[A[V]]=l[V]);for(;ot--;)st[$e++]=l[V++];return st}function D9(l,h,A,N){for(var V=-1,ae=l.length,xe=-1,$e=A.length,Fe=-1,ot=h.length,st=Bi(ae-$e,0),ht=et(st+ot),It=!N;++V<st;)ht[V]=l[V];for(var Qt=V;++Fe<ot;)ht[Qt+Fe]=h[Fe];for(;++xe<$e;)(It||V<ae)&&(ht[Qt+A[xe]]=l[V++]);return ht}function mo(l,h){var A=-1,N=l.length;for(h||(h=et(N));++A<N;)h[A]=l[A];return h}function Wc(l,h,A,N){var V=!A;A||(A={});for(var ae=-1,xe=h.length;++ae<xe;){var $e=h[ae],Fe=N?N(A[$e],l[$e],$e,A,l):r;Fe===r&&(Fe=l[$e]),V?Uu(A,$e,Fe):Rm(A,$e,Fe)}return A}function kle(l,h){return Wc(l,xI(l),h)}function Lle(l,h){return Wc(l,G9(l),h)}function I_(l,h){return function(A,N){var V=Dr(A)?rr:ale,ae=h?h():{};return V(A,l,ur(N,2),ae)}}function c0(l){return Gr(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&&Ka(A[0],A[1],xe)&&(ae=V<3?r:ae,V=1),h=Bn(h);++N<V;){var $e=A[N];$e&&l(h,$e,N,ae)}return h})}function $9(l,h){return function(A,N){if(A==null)return A;if(!vo(A))return l(A,N);for(var V=A.length,ae=h?V:-1,xe=Bn(A);(h?ae--:++ae<V)&&N(xe[ae],ae,xe)!==!1;);return A}}function M9(l){return function(h,A,N){for(var V=-1,ae=Bn(h),xe=N(h),$e=xe.length;$e--;){var Fe=xe[l?$e:++V];if(A(ae[Fe],Fe,ae)===!1)break}return h}}function Ule(l,h,A){var N=h&y,V=Mm(l);function ae(){var xe=this&&this!==yr&&this instanceof ae?V:l;return xe.apply(N?A:this,arguments)}return ae}function k9(l){return function(h){h=On(h);var A=nc(h)?xa(h):r,N=A?A[0]:h.charAt(0),V=A?lf(A,1).join(""):h.slice(1);return N[l]()+V}}function u0(l){return function(h){return cs($7(D7(h).replace(ci,"")),l,"")}}function Mm(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=s0(l.prototype),N=l.apply(A,h);return ui(N)?N:A}}function Ble(l,h,A){var N=Mm(l);function V(){for(var ae=arguments.length,xe=et(ae),$e=ae,Fe=l0(V);$e--;)xe[$e]=arguments[$e];var ot=ae<3&&xe[0]!==Fe&&xe[ae-1]!==Fe?[]:jo(xe,Fe);if(ae-=ot.length,ae<A)return j9(l,h,P_,V.placeholder,r,xe,ot,r,r,A-ae);var st=this&&this!==yr&&this instanceof V?N:l;return gt(st,this,xe)}return V}function L9(l){return function(h,A,N){var V=Bn(h);if(!vo(h)){var ae=ur(A,3);h=Gi(h),A=function($e){return ae(V[$e],$e,V)}}var xe=l(h,A,N);return xe>-1?V[ae?h[xe]:xe]:r}}function U9(l){return Fu(function(h){var A=h.length,N=A,V=fs.prototype.thru;for(l&&h.reverse();N--;){var ae=h[N];if(typeof ae!="function")throw new ls(o);if(V&&!xe&&N_(ae)=="wrapper")var xe=new fs([],!0)}for(N=xe?N:A;++N<A;){ae=h[N];var $e=N_(ae),Fe=$e=="wrapper"?_I(ae):r;Fe&&SI(Fe[0])&&Fe[1]==(p|S|O|I)&&!Fe[4].length&&Fe[9]==1?xe=xe[N_(Fe[0])].apply(xe,Fe[3]):xe=ae.length==1&&SI(ae)?xe[$e]():xe.thru(ae)}return function(){var ot=arguments,st=ot[0];if(xe&&ot.length==1&&Dr(st))return xe.plant(st).value();for(var ht=0,It=A?h[ht].apply(this,ot):st;++ht<A;)It=h[ht].call(this,It);return It}})}function P_(l,h,A,N,V,ae,xe,$e,Fe,ot){var st=h&p,ht=h&y,It=h&_,Qt=h&(S|x),dr=h&C,Hr=It?r:Mm(l);function hr(){for(var Zr=arguments.length,sn=et(Zr),zo=Zr;zo--;)sn[zo]=arguments[zo];if(Qt)var Ya=l0(hr),Vo=Gp(sn,Ya);if(N&&(sn=N9(sn,N,V,Qt)),ae&&(sn=D9(sn,ae,xe,Qt)),Zr-=Vo,Qt&&Zr<ot){var wi=jo(sn,Ya);return j9(l,h,P_,hr.placeholder,A,sn,wi,$e,Fe,ot-Zr)}var sc=ht?A:this,zu=It?sc[l]:l;return Zr=sn.length,$e?sn=afe(sn,$e):dr&&Zr>1&&sn.reverse(),st&&Fe<Zr&&(sn.length=Fe),this&&this!==yr&&this instanceof hr&&(zu=Hr||Mm(zu)),zu.apply(sc,sn)}return hr}function B9(l,h){return function(A,N){return hle(A,l,h(N),{})}}function T_(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=qo(A),N=qo(N)):(A=A9(A),N=A9(N)),V=l(A,N)}return V}}function mI(l){return Fu(function(h){return h=Sr(h,Vi(ur())),Gr(function(A){var N=this;return l(h,function(V){return gt(V,N,A)})})})}function R_(l,h){h=h===r?" ":qo(h);var A=h.length;if(A<2)return A?lI(h,l):h;var N=lI(h,y_(l/ic(h)));return nc(h)?lf(xa(N),0,l).join(""):N.slice(0,l)}function Fle(l,h,A,N){var V=h&y,ae=Mm(l);function xe(){for(var $e=-1,Fe=arguments.length,ot=-1,st=N.length,ht=et(st+Fe),It=this&&this!==yr&&this instanceof xe?ae:l;++ot<st;)ht[ot]=N[ot];for(;Fe--;)ht[ot++]=arguments[++$e];return gt(It,V?A:this,ht)}return xe}function F9(l){return function(h,A,N){return N&&typeof N!="number"&&Ka(h,A,N)&&(A=N=r),h=Hu(h),A===r?(A=h,h=0):A=Hu(A),N=N===r?h<A?1:-1:Hu(N),Sle(h,A,N,l)}}function C_(l){return function(h,A){return typeof h=="string"&&typeof A=="string"||(h=gs(h),A=gs(A)),l(h,A)}}function j9(l,h,A,N,V,ae,xe,$e,Fe,ot){var st=h&S,ht=st?xe:r,It=st?r:xe,Qt=st?ae:r,dr=st?r:ae;h|=st?O:E,h&=~(st?E:O),h&b||(h&=~(y|_));var Hr=[l,h,V,Qt,ht,dr,It,$e,Fe,ot],hr=A.apply(r,Hr);return SI(l)&&Z9(hr,Hr),hr.placeholder=N,e7(hr,l,h)}function vI(l){var h=Ui[l];return function(A,N){if(A=gs(A),N=N==null?0:Aa(Br(N),292),N&&e9(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 jle=a0&&1/Mu(new a0([,-0]))[1]==ne?function(l){return new a0(l)}:FI;function q9(l){return function(h){var A=Sa(h);return A==vt?af(h):A==Pt?Zp(h):Vp(h,l(h))}}function Bu(l,h,A,N,V,ae,xe,$e){var Fe=h&_;if(!Fe&&typeof l!="function")throw new ls(o);var ot=N?N.length:0;if(ot||(h&=~(O|E),N=V=r),xe=xe===r?xe:Bi(Br(xe),0),$e=$e===r?$e:Br($e),ot-=V?V.length:0,h&E){var st=N,ht=V;N=V=r}var It=Fe?r:_I(l),Qt=[l,h,A,N,V,st,ht,ae,xe,$e];if(It&&rfe(Qt,It),l=Qt[0],h=Qt[1],A=Qt[2],N=Qt[3],V=Qt[4],$e=Qt[9]=Qt[9]===r?Fe?0:l.length:Bi(Qt[9]-ot,0),!$e&&h&(S|x)&&(h&=~(S|x)),!h||h==y)var dr=Ule(l,h,A);else h==S||h==x?dr=Ble(l,h,$e):(h==O||h==(y|O))&&!V.length?dr=Fle(l,h,A,N):dr=P_.apply(r,Qt);var Hr=It?E9:Z9;return e7(Hr(dr,Qt),l,h)}function H9(l,h,A,N){return l===r||oc(l,i0[A])&&!Tn.call(N,A)?h:l}function z9(l,h,A,N,V,ae){return ui(l)&&ui(h)&&(ae.set(h,l),A_(l,h,r,z9,ae),ae.delete(h)),l}function qle(l){return Um(l)?r:l}function V9(l,h,A,N,V,ae){var xe=A&w,$e=l.length,Fe=h.length;if($e!=Fe&&!(xe&&Fe>$e))return!1;var ot=ae.get(l),st=ae.get(h);if(ot&&st)return ot==h&&st==l;var ht=-1,It=!0,Qt=A&v?new Yd:r;for(ae.set(l,h),ae.set(h,l);++ht<$e;){var dr=l[ht],Hr=h[ht];if(N)var hr=xe?N(Hr,dr,ht,h,l,ae):N(dr,Hr,ht,l,h,ae);if(hr!==r){if(hr)continue;It=!1;break}if(Qt){if(!ki(h,function(Zr,sn){if(!Vc(Qt,sn)&&(dr===Zr||V(dr,Zr,A,N,ae)))return Qt.push(sn)})){It=!1;break}}else if(!(dr===Hr||V(dr,Hr,A,N,ae))){It=!1;break}}return ae.delete(l),ae.delete(h),It}function Hle(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 d_(l),new d_(h)));case te:case ce:case bt:return oc(+l,+h);case fe:return l.name==h.name&&l.message==h.message;case Rt:case kt:return l==h+"";case vt:var $e=af;case Pt:var Fe=N&w;if($e||($e=Mu),l.size!=h.size&&!Fe)return!1;var ot=xe.get(l);if(ot)return ot==h;N|=v,xe.set(l,h);var st=V9($e(l),$e(h),N,V,ae,xe);return xe.delete(l),st;case Nt:if(Tm)return Tm.call(l)==Tm.call(h)}return!1}function zle(l,h,A,N,V,ae){var xe=A&w,$e=bI(l),Fe=$e.length,ot=bI(h),st=ot.length;if(Fe!=st&&!xe)return!1;for(var ht=Fe;ht--;){var It=$e[ht];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 Hr=!0;ae.set(l,h),ae.set(h,l);for(var hr=xe;++ht<Fe;){It=$e[ht];var Zr=l[It],sn=h[It];if(N)var zo=xe?N(sn,Zr,It,h,l,ae):N(Zr,sn,It,l,h,ae);if(!(zo===r?Zr===sn||V(Zr,sn,A,N,ae):zo)){Hr=!1;break}hr||(hr=It=="constructor")}if(Hr&&!hr){var Ya=l.constructor,Vo=h.constructor;Ya!=Vo&&"constructor"in l&&"constructor"in h&&!(typeof Ya=="function"&&Ya instanceof Ya&&typeof Vo=="function"&&Vo instanceof Vo)&&(Hr=!1)}return ae.delete(l),ae.delete(h),Hr}function Fu(l){return II(J9(l,r,o7),l+"")}function bI(l){return f9(l,Gi,xI)}function wI(l){return f9(l,bo,G9)}var _I=v_?function(l){return v_.get(l)}:FI;function N_(l){for(var h=l.name+"",A=o0[h],N=Tn.call(o0,h)?A.length:0;N--;){var V=A[N],ae=V.func;if(ae==null||ae==l)return V.name}return h}function l0(l){var h=Tn.call(J,"placeholder")?J:l;return h.placeholder}function ur(){var l=J.iteratee||UI;return l=l===UI?p9:l,arguments.length?l(arguments[0],arguments[1]):l}function D_(l,h){var A=l.__data__;return Xle(h)?A[typeof h=="string"?"string":"hash"]:A.map}function EI(l){for(var h=Gi(l),A=h.length;A--;){var N=h[A],V=l[N];h[A]=[N,V,Y9(V)]}return h}function Xd(l,h){var A=Qp(l,h);return h9(A)?A:r}function Vle(l){var h=Tn.call(l,Wd),A=l[Wd];try{l[Wd]=r;var N=!0}catch{}var V=l_.call(l);return N&&(h?l[Wd]=A:delete l[Wd]),V}var xI=QO?function(l){return l==null?[]:(l=Bn(l),dn(QO(l),function(h){return XL.call(l,h)}))}:jI,G9=QO?function(l){for(var h=[];l;)zi(h,xI(l)),l=h_(l);return h}:jI,Sa=Wa;(JO&&Sa(new JO(new ArrayBuffer(1)))!=Dt||Om&&Sa(new Om)!=vt||XO&&Sa(XO.resolve())!=Yt||a0&&Sa(new a0)!=Pt||Im&&Sa(new Im)!=Ut)&&(Sa=function(l){var h=Wa(l),A=h==Lt?l.constructor:r,N=A?Zd(A):"";if(N)switch(N){case Iue:return Dt;case Pue:return vt;case Tue:return Yt;case Rue:return Pt;case Cue:return Ut}return h});function Gle(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=Aa(h,l+xe);break;case"takeRight":l=Bi(l,h-xe);break}}return{start:l,end:h}}function Wle(l){var h=l.match(ye);return h?h[1].split(Me):[]}function W9(l,h,A){h=uf(h,l);for(var N=-1,V=h.length,ae=!1;++N<V;){var xe=Kc(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&&F_(V)&&ju(xe,V)&&(Dr(l)||eh(l)))}function Kle(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 K9(l){return typeof l.constructor=="function"&&!km(l)?s0(h_(l)):{}}function Yle(l,h,A){var N=l.constructor;switch(h){case $t:return yI(l);case te:case ce:return new N(+l);case Dt:return Nle(l,A);case qt:case Mt:case cr:case tr:case ir:case nr:case mr:case wn:case Yr:return R9(l,A);case vt:return new N;case bt:case kt:return new N(l);case Rt:return Dle(l);case Pt:return new N;case Nt:return $le(l)}}function Qle(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,`{
145
+ /* [wrapped with `+h+`] */
146
+ `)}function Jle(l){return Dr(l)||eh(l)||!!(ZL&&l&&l[ZL])}function ju(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 Ka(l,h,A){if(!ui(A))return!1;var N=typeof h;return(N=="number"?vo(A)&&ju(h,A.length):N=="string"&&h in A)?oc(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||Ho(l)?!0:He.test(l)||!Re.test(l)||h!=null&&l in Bn(h)}function Xle(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function SI(l){var h=N_(l),A=J[h];if(typeof A!="function"||!(h in rn.prototype))return!1;if(l===A)return!0;var N=_I(A);return!!N&&l===N[0]}function Zle(l){return!!YL&&YL in l}var efe=c_?qu:qI;function km(l){var h=l&&l.constructor,A=typeof h=="function"&&h.prototype||i0;return l===A}function Y9(l){return l===l&&!ui(l)}function Q9(l,h){return function(A){return A==null?!1:A[l]===h&&(h!==r||l in Bn(A))}}function tfe(l){var h=U_(l,function(N){return A.size===u&&A.clear(),N}),A=h.cache;return h}function rfe(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 $e=h[3];if($e){var Fe=l[3];l[3]=Fe?N9(Fe,$e,h[4]):$e,l[4]=Fe?jo(l[3],f):h[4]}return $e=h[5],$e&&(Fe=l[5],l[5]=Fe?D9(Fe,$e,h[6]):$e,l[6]=Fe?jo(l[5],f):h[6]),$e=h[7],$e&&(l[7]=$e),N&p&&(l[8]=l[8]==null?h[8]:Aa(l[8],h[8])),l[9]==null&&(l[9]=h[9]),l[0]=h[0],l[1]=V,l}function nfe(l){var h=[];if(l!=null)for(var A in Bn(l))h.push(A);return h}function ife(l){return l_.call(l)}function J9(l,h,A){return h=Bi(h===r?l.length-1:h,0),function(){for(var N=arguments,V=-1,ae=Bi(N.length-h,0),xe=et(ae);++V<ae;)xe[V]=N[h+V];V=-1;for(var $e=et(h+1);++V<h;)$e[V]=N[V];return $e[h]=A(xe),gt(l,this,$e)}}function X9(l,h){return h.length<2?l:Jd(l,hs(h,0,-1))}function afe(l,h){for(var A=l.length,N=Aa(h.length,A),V=mo(l);N--;){var ae=h[N];l[N]=ju(ae,A)?V[ae]:r}return l}function OI(l,h){if(!(h==="constructor"&&typeof l[h]=="function")&&h!="__proto__")return l[h]}var Z9=t7(E9),Lm=wue||function(l,h){return yr.setTimeout(l,h)},II=t7(Ple);function e7(l,h,A){var N=h+"";return II(l,Qle(N,ofe(Wle(N),A)))}function t7(l){var h=0,A=0;return function(){var N=Aue(),V=pe-(N-A);if(A=N,V>0){if(++h>=le)return arguments[0]}else h=0;return l.apply(r,arguments)}}function $_(l,h){var A=-1,N=l.length,V=N-1;for(h=h===r?N:h;++A<h;){var ae=uI(A,V),xe=l[ae];l[ae]=l[A],l[A]=xe}return l.length=h,l}var r7=tfe(function(l){var h=[];return l.charCodeAt(0)===46&&h.push(""),l.replace(Ze,function(A,N,V,ae){h.push(V?ae.replace(Ot,"$1"):N||A)}),h});function Kc(l){if(typeof l=="string"||Ho(l))return l;var h=l+"";return h=="0"&&1/l==-ne?"-0":h}function Zd(l){if(l!=null){try{return u_.call(l)}catch{}try{return l+""}catch{}}return""}function ofe(l,h){return Wt(M,function(A){var N="_."+A[0];h&A[1]&&!Mr(l,N)&&l.push(N)}),l.sort()}function n7(l){if(l instanceof rn)return l.clone();var h=new fs(l.__wrapped__,l.__chain__);return h.__actions__=mo(l.__actions__),h.__index__=l.__index__,h.__values__=l.__values__,h}function sfe(l,h,A){(A?Ka(l,h,A):h===r)?h=1:h=Bi(Br(h),0);var N=l==null?0:l.length;if(!N||h<1)return[];for(var V=0,ae=0,xe=et(y_(N/h));V<N;)xe[ae++]=hs(l,V,V+=h);return xe}function cfe(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 ufe(){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 zi(Dr(A)?mo(A):[A],ia(h,1))}var lfe=Gr(function(l,h){return bi(l)?Cm(l,ia(h,1,bi,!0)):[]}),ffe=Gr(function(l,h){var A=ps(h);return bi(A)&&(A=r),bi(l)?Cm(l,ia(h,1,bi,!0),ur(A,2)):[]}),dfe=Gr(function(l,h){var A=ps(h);return bi(A)&&(A=r),bi(l)?Cm(l,ia(h,1,bi,!0),r,A):[]});function hfe(l,h,A){var N=l==null?0:l.length;return N?(h=A||h===r?1:Br(h),hs(l,h<0?0:h,N)):[]}function pfe(l,h,A){var N=l==null?0:l.length;return N?(h=A||h===r?1:Br(h),h=N-h,hs(l,0,h<0?0:h)):[]}function gfe(l,h){return l&&l.length?O_(l,ur(h,3),!0,!0):[]}function yfe(l,h){return l&&l.length?O_(l,ur(h,3),!0):[]}function mfe(l,h,A,N){var V=l==null?0:l.length;return V?(A&&typeof A!="number"&&Ka(l,h,A)&&(A=0,N=V),ule(l,h,A,N)):[]}function i7(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=Bi(N+V,0)),$u(l,ur(h,3),V)}function a7(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?Bi(N+V,0):Aa(V,N-1)),$u(l,ur(h,3),V,!0)}function o7(l){var h=l==null?0:l.length;return h?ia(l,1):[]}function vfe(l){var h=l==null?0:l.length;return h?ia(l,ne):[]}function bfe(l,h){var A=l==null?0:l.length;return A?(h=h===r?1:Br(h),ia(l,h)):[]}function wfe(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 s7(l){return l&&l.length?l[0]:r}function _fe(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=Bi(N+V,0)),rc(l,h,V)}function Efe(l){var h=l==null?0:l.length;return h?hs(l,0,-1):[]}var xfe=Gr(function(l){var h=Sr(l,pI);return h.length&&h[0]===l[0]?iI(h):[]}),Afe=Gr(function(l){var h=ps(l),A=Sr(l,pI);return h===ps(A)?h=r:A.pop(),A.length&&A[0]===l[0]?iI(A,ur(h,2)):[]}),Sfe=Gr(function(l){var h=ps(l),A=Sr(l,pI);return h=typeof h=="function"?h:r,h&&A.pop(),A.length&&A[0]===l[0]?iI(A,r,h):[]});function Ofe(l,h){return l==null?"":Eue.call(l,h)}function ps(l){var h=l==null?0:l.length;return h?l[h-1]:r}function Ife(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?Bi(N+V,0):Aa(V,N-1)),h===h?t0(l,h,V):$u(l,Bd,V,!0)}function Pfe(l,h){return l&&l.length?v9(l,Br(h)):r}var Tfe=Gr(c7);function c7(l,h){return l&&l.length&&h&&h.length?cI(l,h):l}function Rfe(l,h,A){return l&&l.length&&h&&h.length?cI(l,h,ur(A,2)):l}function Cfe(l,h,A){return l&&l.length&&h&&h.length?cI(l,h,r,A):l}var Nfe=Fu(function(l,h){var A=l==null?0:l.length,N=eI(l,h);return _9(l,Sr(h,function(V){return ju(V,A)?+V:V}).sort(C9)),N});function Dfe(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 _9(l,V),A}function PI(l){return l==null?l:Oue.call(l)}function $fe(l,h,A){var N=l==null?0:l.length;return N?(A&&typeof A!="number"&&Ka(l,h,A)?(h=0,A=N):(h=h==null?0:Br(h),A=A===r?N:Br(A)),hs(l,h,A)):[]}function Mfe(l,h){return S_(l,h)}function kfe(l,h,A){return fI(l,h,ur(A,2))}function Lfe(l,h){var A=l==null?0:l.length;if(A){var N=S_(l,h);if(N<A&&oc(l[N],h))return N}return-1}function Ufe(l,h){return S_(l,h,!0)}function Bfe(l,h,A){return fI(l,h,ur(A,2),!0)}function Ffe(l,h){var A=l==null?0:l.length;if(A){var N=S_(l,h,!0)-1;if(oc(l[N],h))return N}return-1}function jfe(l){return l&&l.length?x9(l):[]}function qfe(l,h){return l&&l.length?x9(l,ur(h,2)):[]}function Hfe(l){var h=l==null?0:l.length;return h?hs(l,1,h):[]}function zfe(l,h,A){return l&&l.length?(h=A||h===r?1:Br(h),hs(l,0,h<0?0:h)):[]}function Vfe(l,h,A){var N=l==null?0:l.length;return N?(h=A||h===r?1:Br(h),h=N-h,hs(l,h<0?0:h,N)):[]}function Gfe(l,h){return l&&l.length?O_(l,ur(h,3),!1,!0):[]}function Wfe(l,h){return l&&l.length?O_(l,ur(h,3)):[]}var Kfe=Gr(function(l){return cf(ia(l,1,bi,!0))}),Yfe=Gr(function(l){var h=ps(l);return bi(h)&&(h=r),cf(ia(l,1,bi,!0),ur(h,2))}),Qfe=Gr(function(l){var h=ps(l);return h=typeof h=="function"?h:r,cf(ia(l,1,bi,!0),r,h)});function Jfe(l){return l&&l.length?cf(l):[]}function Xfe(l,h){return l&&l.length?cf(l,ur(h,2)):[]}function Zfe(l,h){return h=typeof h=="function"?h:r,l&&l.length?cf(l,r,h):[]}function TI(l){if(!(l&&l.length))return[];var h=0;return l=dn(l,function(A){if(bi(A))return h=Bi(A.length,h),!0}),rf(h,function(A){return Sr(l,Zl(A))})}function u7(l,h){if(!(l&&l.length))return[];var A=TI(l);return h==null?A:Sr(A,function(N){return gt(h,r,N)})}var ede=Gr(function(l,h){return bi(l)?Cm(l,h):[]}),tde=Gr(function(l){return hI(dn(l,bi))}),rde=Gr(function(l){var h=ps(l);return bi(h)&&(h=r),hI(dn(l,bi),ur(h,2))}),nde=Gr(function(l){var h=ps(l);return h=typeof h=="function"?h:r,hI(dn(l,bi),r,h)}),ide=Gr(TI);function ade(l,h){return I9(l||[],h||[],Rm)}function ode(l,h){return I9(l||[],h||[],$m)}var sde=Gr(function(l){var h=l.length,A=h>1?l[h-1]:r;return A=typeof A=="function"?(l.pop(),A):r,u7(l,A)});function l7(l){var h=J(l);return h.__chain__=!0,h}function cde(l,h){return h(l),l}function M_(l,h){return h(l)}var ude=Fu(function(l){var h=l.length,A=h?l[0]:0,N=this.__wrapped__,V=function(ae){return eI(ae,l)};return h>1||this.__actions__.length||!(N instanceof rn)||!ju(A)?this.thru(V):(N=N.slice(A,+A+(h?1:0)),N.__actions__.push({func:M_,args:[V],thisArg:r}),new fs(N,this.__chain__).thru(function(ae){return h&&!ae.length&&ae.push(r),ae}))});function lde(){return l7(this)}function fde(){return new fs(this.value(),this.__chain__)}function dde(){this.__values__===r&&(this.__values__=A7(this.value()));var l=this.__index__>=this.__values__.length,h=l?r:this.__values__[this.__index__++];return{done:l,value:h}}function hde(){return this}function pde(l){for(var h,A=this;A instanceof w_;){var N=n7(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 gde(){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:M_,args:[PI],thisArg:r}),new fs(h,this.__chain__)}return this.thru(PI)}function yde(){return O9(this.__wrapped__,this.__actions__)}var mde=I_(function(l,h,A){Tn.call(l,A)?++l[A]:Uu(l,A,1)});function vde(l,h,A){var N=Dr(l)?Pn:cle;return A&&Ka(l,h,A)&&(h=r),N(l,ur(h,3))}function bde(l,h){var A=Dr(l)?dn:u9;return A(l,ur(h,3))}var wde=L9(i7),_de=L9(a7);function Ede(l,h){return ia(k_(l,h),1)}function xde(l,h){return ia(k_(l,h),ne)}function Ade(l,h,A){return A=A===r?1:Br(A),ia(k_(l,h),A)}function f7(l,h){var A=Dr(l)?Wt:sf;return A(l,ur(h,3))}function d7(l,h){var A=Dr(l)?Jr:c9;return A(l,ur(h,3))}var Sde=I_(function(l,h,A){Tn.call(l,A)?l[A].push(h):Uu(l,A,[h])});function Ode(l,h,A,N){l=vo(l)?l:d0(l),A=A&&!N?Br(A):0;var V=l.length;return A<0&&(A=Bi(V+A,0)),j_(l)?A<=V&&l.indexOf(h,A)>-1:!!V&&rc(l,h,A)>-1}var Ide=Gr(function(l,h,A){var N=-1,V=typeof h=="function",ae=vo(l)?et(l.length):[];return sf(l,function(xe){ae[++N]=V?gt(h,xe,A):Nm(xe,h,A)}),ae}),Pde=I_(function(l,h,A){Uu(l,A,h)});function k_(l,h){var A=Dr(l)?Sr:g9;return A(l,ur(h,3))}function Tde(l,h,A,N){return l==null?[]:(Dr(h)||(h=h==null?[]:[h]),A=N?r:A,Dr(A)||(A=A==null?[]:[A]),b9(l,h,A))}var Rde=I_(function(l,h,A){l[A?0:1].push(h)},function(){return[[],[]]});function Cde(l,h,A){var N=Dr(l)?cs:jd,V=arguments.length<3;return N(l,ur(h,4),A,V,sf)}function Nde(l,h,A){var N=Dr(l)?zc:jd,V=arguments.length<3;return N(l,ur(h,4),A,V,c9)}function Dde(l,h){var A=Dr(l)?dn:u9;return A(l,B_(ur(h,3)))}function $de(l){var h=Dr(l)?i9:Ole;return h(l)}function Mde(l,h,A){(A?Ka(l,h,A):h===r)?h=1:h=Br(h);var N=Dr(l)?nle:Ile;return N(l,h)}function kde(l){var h=Dr(l)?ile:Tle;return h(l)}function Lde(l){if(l==null)return 0;if(vo(l))return j_(l)?ic(l):l.length;var h=Sa(l);return h==vt||h==Pt?l.size:oI(l).length}function Ude(l,h,A){var N=Dr(l)?ki:Rle;return A&&Ka(l,h,A)&&(h=r),N(l,ur(h,3))}var Bde=Gr(function(l,h){if(l==null)return[];var A=h.length;return A>1&&Ka(l,h[0],h[1])?h=[]:A>2&&Ka(h[0],h[1],h[2])&&(h=[h[0]]),b9(l,ia(h,1),[])}),L_=bue||function(){return yr.Date.now()};function Fde(l,h){if(typeof h!="function")throw new ls(o);return l=Br(l),function(){if(--l<1)return h.apply(this,arguments)}}function h7(l,h,A){return h=A?r:h,h=l&&h==null?l.length:h,Bu(l,p,r,r,r,r,h)}function p7(l,h){var A;if(typeof h!="function")throw new ls(o);return l=Br(l),function(){return--l>0&&(A=h.apply(this,arguments)),l<=1&&(h=r),A}}var RI=Gr(function(l,h,A){var N=y;if(A.length){var V=jo(A,l0(RI));N|=O}return Bu(l,N,h,A,V)}),g7=Gr(function(l,h,A){var N=y|_;if(A.length){var V=jo(A,l0(g7));N|=O}return Bu(h,N,l,A,V)});function y7(l,h,A){h=A?r:h;var N=Bu(l,S,r,r,r,r,r,h);return N.placeholder=y7.placeholder,N}function m7(l,h,A){h=A?r:h;var N=Bu(l,x,r,r,r,r,r,h);return N.placeholder=m7.placeholder,N}function v7(l,h,A){var N,V,ae,xe,$e,Fe,ot=0,st=!1,ht=!1,It=!0;if(typeof l!="function")throw new ls(o);h=gs(h)||0,ui(A)&&(st=!!A.leading,ht="maxWait"in A,ae=ht?Bi(gs(A.maxWait)||0,h):ae,It="trailing"in A?!!A.trailing:It);function Qt(wi){var sc=N,zu=V;return N=V=r,ot=wi,xe=l.apply(zu,sc),xe}function dr(wi){return ot=wi,$e=Lm(Zr,h),st?Qt(wi):xe}function Hr(wi){var sc=wi-Fe,zu=wi-ot,L7=h-sc;return ht?Aa(L7,ae-zu):L7}function hr(wi){var sc=wi-Fe,zu=wi-ot;return Fe===r||sc>=h||sc<0||ht&&zu>=ae}function Zr(){var wi=L_();if(hr(wi))return sn(wi);$e=Lm(Zr,Hr(wi))}function sn(wi){return $e=r,It&&N?Qt(wi):(N=V=r,xe)}function zo(){$e!==r&&P9($e),ot=0,N=Fe=V=$e=r}function Ya(){return $e===r?xe:sn(L_())}function Vo(){var wi=L_(),sc=hr(wi);if(N=arguments,V=this,Fe=wi,sc){if($e===r)return dr(Fe);if(ht)return P9($e),$e=Lm(Zr,h),Qt(Fe)}return $e===r&&($e=Lm(Zr,h)),xe}return Vo.cancel=zo,Vo.flush=Ya,Vo}var jde=Gr(function(l,h){return s9(l,1,h)}),qde=Gr(function(l,h,A){return s9(l,gs(h)||0,A)});function Hde(l){return Bu(l,C)}function U_(l,h){if(typeof l!="function"||h!=null&&typeof h!="function")throw new ls(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(U_.Cache||Lu),A}U_.Cache=Lu;function B_(l){if(typeof l!="function")throw new ls(o);return function(){var h=arguments;switch(h.length){case 0:return!l.call(this);case 1:return!l.call(this,h[0]);case 2:return!l.call(this,h[0],h[1]);case 3:return!l.call(this,h[0],h[1],h[2])}return!l.apply(this,h)}}function zde(l){return p7(2,l)}var Vde=Cle(function(l,h){h=h.length==1&&Dr(h[0])?Sr(h[0],Vi(ur())):Sr(ia(h,1),Vi(ur()));var A=h.length;return Gr(function(N){for(var V=-1,ae=Aa(N.length,A);++V<ae;)N[V]=h[V].call(this,N[V]);return gt(l,this,N)})}),CI=Gr(function(l,h){var A=jo(h,l0(CI));return Bu(l,O,r,h,A)}),b7=Gr(function(l,h){var A=jo(h,l0(b7));return Bu(l,E,r,h,A)}),Gde=Fu(function(l,h){return Bu(l,I,r,r,r,h)});function Wde(l,h){if(typeof l!="function")throw new ls(o);return h=h===r?h:Br(h),Gr(l,h)}function Kde(l,h){if(typeof l!="function")throw new ls(o);return h=h==null?0:Bi(Br(h),0),Gr(function(A){var N=A[h],V=lf(A,0,h);return N&&zi(V,N),gt(l,this,V)})}function Yde(l,h,A){var N=!0,V=!0;if(typeof l!="function")throw new ls(o);return ui(A)&&(N="leading"in A?!!A.leading:N,V="trailing"in A?!!A.trailing:V),v7(l,h,{leading:N,maxWait:h,trailing:V})}function Qde(l){return h7(l,1)}function Jde(l,h){return CI(gI(h),l)}function Xde(){if(!arguments.length)return[];var l=arguments[0];return Dr(l)?l:[l]}function Zde(l){return ds(l,m)}function ehe(l,h){return h=typeof h=="function"?h:r,ds(l,m,h)}function the(l){return ds(l,d|m)}function rhe(l,h){return h=typeof h=="function"?h:r,ds(l,d|m,h)}function nhe(l,h){return h==null||o9(l,h,Gi(h))}function oc(l,h){return l===h||l!==l&&h!==h}var ihe=C_(nI),ahe=C_(function(l,h){return l>=h}),eh=d9(function(){return arguments}())?d9:function(l){return pi(l)&&Tn.call(l,"callee")&&!XL.call(l,"callee")},Dr=et.isArray,ohe=Ae?Vi(Ae):ple;function vo(l){return l!=null&&F_(l.length)&&!qu(l)}function bi(l){return pi(l)&&vo(l)}function she(l){return l===!0||l===!1||pi(l)&&Wa(l)==te}var ff=_ue||qI,che=Ie?Vi(Ie):gle;function uhe(l){return pi(l)&&l.nodeType===1&&!Um(l)}function lhe(l){if(l==null)return!0;if(vo(l)&&(Dr(l)||typeof l=="string"||typeof l.splice=="function"||ff(l)||f0(l)||eh(l)))return!l.length;var h=Sa(l);if(h==vt||h==Pt)return!l.size;if(km(l))return!oI(l).length;for(var A in l)if(Tn.call(l,A))return!1;return!0}function fhe(l,h){return Dm(l,h)}function dhe(l,h,A){A=typeof A=="function"?A:r;var N=A?A(l,h):r;return N===r?Dm(l,h,r,A):!!N}function NI(l){if(!pi(l))return!1;var h=Wa(l);return h==fe||h==T||typeof l.message=="string"&&typeof l.name=="string"&&!Um(l)}function hhe(l){return typeof l=="number"&&e9(l)}function qu(l){if(!ui(l))return!1;var h=Wa(l);return h==Ve||h==tt||h==Q||h==wr}function w7(l){return typeof l=="number"&&l==Br(l)}function F_(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=F}function ui(l){var h=typeof l;return l!=null&&(h=="object"||h=="function")}function pi(l){return l!=null&&typeof l=="object"}var _7=Pe?Vi(Pe):mle;function phe(l,h){return l===h||aI(l,h,EI(h))}function ghe(l,h,A){return A=typeof A=="function"?A:r,aI(l,h,EI(h),A)}function yhe(l){return E7(l)&&l!=+l}function mhe(l){if(efe(l))throw new Cr(a);return h9(l)}function vhe(l){return l===null}function bhe(l){return l==null}function E7(l){return typeof l=="number"||pi(l)&&Wa(l)==bt}function Um(l){if(!pi(l)||Wa(l)!=Lt)return!1;var h=h_(l);if(h===null)return!0;var A=Tn.call(h,"constructor")&&h.constructor;return typeof A=="function"&&A instanceof A&&u_.call(A)==gue}var DI=Be?Vi(Be):vle;function whe(l){return w7(l)&&l>=-F&&l<=F}var x7=Ye?Vi(Ye):ble;function j_(l){return typeof l=="string"||!Dr(l)&&pi(l)&&Wa(l)==kt}function Ho(l){return typeof l=="symbol"||pi(l)&&Wa(l)==Nt}var f0=qe?Vi(qe):wle;function _he(l){return l===r}function Ehe(l){return pi(l)&&Sa(l)==Ut}function xhe(l){return pi(l)&&Wa(l)==Vt}var Ahe=C_(sI),She=C_(function(l,h){return l<=h});function A7(l){if(!l)return[];if(vo(l))return j_(l)?xa(l):mo(l);if(Sm&&l[Sm])return Xp(l[Sm]());var h=Sa(l),A=h==vt?af:h==Pt?Mu:d0;return A(l)}function Hu(l){if(!l)return l===0?l:0;if(l=gs(l),l===ne||l===-ne){var h=l<0?-1:1;return h*j}return l===l?l:0}function Br(l){var h=Hu(l),A=h%1;return h===h?A?h-A:h:0}function S7(l){return l?Qd(Br(l),0,$):0}function gs(l){if(typeof l=="number")return l;if(Ho(l))return z;if(ui(l)){var h=typeof l.valueOf=="function"?l.valueOf():l;l=ui(h)?h+"":h}if(typeof l!="string")return l===0?l:+l;l=qd(l);var A=gr.test(l);return A||on.test(l)?fr(l.slice(2),A?2:8):en.test(l)?z:+l}function O7(l){return Wc(l,bo(l))}function Ohe(l){return l?Qd(Br(l),-F,F):l===0?l:0}function On(l){return l==null?"":qo(l)}var Ihe=c0(function(l,h){if(km(h)||vo(h)){Wc(h,Gi(h),l);return}for(var A in h)Tn.call(h,A)&&Rm(l,A,h[A])}),I7=c0(function(l,h){Wc(h,bo(h),l)}),q_=c0(function(l,h,A,N){Wc(h,bo(h),l,N)}),Phe=c0(function(l,h,A,N){Wc(h,Gi(h),l,N)}),The=Fu(eI);function Rhe(l,h){var A=s0(l);return h==null?A:a9(A,h)}var Che=Gr(function(l,h){l=Bn(l);var A=-1,N=h.length,V=N>2?h[2]:r;for(V&&Ka(h[0],h[1],V)&&(N=1);++A<N;)for(var ae=h[A],xe=bo(ae),$e=-1,Fe=xe.length;++$e<Fe;){var ot=xe[$e],st=l[ot];(st===r||oc(st,i0[ot])&&!Tn.call(l,ot))&&(l[ot]=ae[ot])}return l}),Nhe=Gr(function(l){return l.push(r,z9),gt(P7,r,l)});function Dhe(l,h){return Sn(l,ur(h,3),Gc)}function $he(l,h){return Sn(l,ur(h,3),rI)}function Mhe(l,h){return l==null?l:tI(l,ur(h,3),bo)}function khe(l,h){return l==null?l:l9(l,ur(h,3),bo)}function Lhe(l,h){return l&&Gc(l,ur(h,3))}function Uhe(l,h){return l&&rI(l,ur(h,3))}function Bhe(l){return l==null?[]:x_(l,Gi(l))}function Fhe(l){return l==null?[]:x_(l,bo(l))}function $I(l,h,A){var N=l==null?r:Jd(l,h);return N===r?A:N}function jhe(l,h){return l!=null&&W9(l,h,lle)}function MI(l,h){return l!=null&&W9(l,h,fle)}var qhe=B9(function(l,h,A){h!=null&&typeof h.toString!="function"&&(h=l_.call(h)),l[h]=A},LI(wo)),Hhe=B9(function(l,h,A){h!=null&&typeof h.toString!="function"&&(h=l_.call(h)),Tn.call(l,h)?l[h].push(A):l[h]=[A]},ur),zhe=Gr(Nm);function Gi(l){return vo(l)?n9(l):oI(l)}function bo(l){return vo(l)?n9(l,!0):_le(l)}function Vhe(l,h){var A={};return h=ur(h,3),Gc(l,function(N,V,ae){Uu(A,h(N,V,ae),N)}),A}function Ghe(l,h){var A={};return h=ur(h,3),Gc(l,function(N,V,ae){Uu(A,V,h(N,V,ae))}),A}var Whe=c0(function(l,h,A){A_(l,h,A)}),P7=c0(function(l,h,A,N){A_(l,h,A,N)}),Khe=Fu(function(l,h){var A={};if(l==null)return A;var N=!1;h=Sr(h,function(ae){return ae=uf(ae,l),N||(N=ae.length>1),ae}),Wc(l,wI(l),A),N&&(A=ds(A,d|g|m,qle));for(var V=h.length;V--;)dI(A,h[V]);return A});function Yhe(l,h){return T7(l,B_(ur(h)))}var Qhe=Fu(function(l,h){return l==null?{}:xle(l,h)});function T7(l,h){if(l==null)return{};var A=Sr(wI(l),function(N){return[N]});return h=ur(h),w9(l,A,function(N,V){return h(N,V[0])})}function Jhe(l,h,A){h=uf(h,l);var N=-1,V=h.length;for(V||(V=1,l=r);++N<V;){var ae=l==null?r:l[Kc(h[N])];ae===r&&(N=V,ae=A),l=qu(ae)?ae.call(l):ae}return l}function Xhe(l,h,A){return l==null?l:$m(l,h,A)}function Zhe(l,h,A,N){return N=typeof N=="function"?N:r,l==null?l:$m(l,h,A,N)}var R7=q9(Gi),C7=q9(bo);function epe(l,h,A){var N=Dr(l),V=N||ff(l)||f0(l);if(h=ur(h,4),A==null){var ae=l&&l.constructor;V?A=N?new ae:[]:ui(l)?A=qu(ae)?s0(h_(l)):{}:A={}}return(V?Wt:Gc)(l,function(xe,$e,Fe){return h(A,xe,$e,Fe)}),A}function tpe(l,h){return l==null?!0:dI(l,h)}function rpe(l,h,A){return l==null?l:S9(l,h,gI(A))}function npe(l,h,A,N){return N=typeof N=="function"?N:r,l==null?l:S9(l,h,gI(A),N)}function d0(l){return l==null?[]:nf(l,Gi(l))}function ipe(l){return l==null?[]:nf(l,bo(l))}function ape(l,h,A){return A===r&&(A=h,h=r),A!==r&&(A=gs(A),A=A===A?A:0),h!==r&&(h=gs(h),h=h===h?h:0),Qd(gs(l),h,A)}function ope(l,h,A){return h=Hu(h),A===r?(A=h,h=0):A=Hu(A),l=gs(l),dle(l,h,A)}function spe(l,h,A){if(A&&typeof A!="boolean"&&Ka(l,h,A)&&(h=A=r),A===r&&(typeof h=="boolean"?(A=h,h=r):typeof l=="boolean"&&(A=l,l=r)),l===r&&h===r?(l=0,h=1):(l=Hu(l),h===r?(h=l,l=0):h=Hu(h)),l>h){var N=l;l=h,h=N}if(A||l%1||h%1){var V=t9();return Aa(l+V*(h-l+Qr("1e-"+((V+"").length-1))),h)}return uI(l,h)}var cpe=u0(function(l,h,A){return h=h.toLowerCase(),l+(A?N7(h):h)});function N7(l){return kI(On(l).toLowerCase())}function D7(l){return l=On(l),l&&l.replace(Lr,Wp).replace(An,"")}function upe(l,h,A){l=On(l),h=qo(h);var N=l.length;A=A===r?N:Qd(Br(A),0,N);var V=A;return A-=h.length,A>=0&&l.slice(A,V)==h}function lpe(l){return l=On(l),l&&_r.test(l)?l.replace(xr,Kp):l}function fpe(l){return l=On(l),l&&ft.test(l)?l.replace(ct,"\\$&"):l}var dpe=u0(function(l,h,A){return l+(A?"-":"")+h.toLowerCase()}),hpe=u0(function(l,h,A){return l+(A?" ":"")+h.toLowerCase()}),ppe=k9("toLowerCase");function gpe(l,h,A){l=On(l),h=Br(h);var N=h?ic(l):0;if(!h||N>=h)return l;var V=(h-N)/2;return R_(m_(V),A)+l+R_(y_(V),A)}function ype(l,h,A){l=On(l),h=Br(h);var N=h?ic(l):0;return h&&N<h?l+R_(h-N,A):l}function mpe(l,h,A){l=On(l),h=Br(h);var N=h?ic(l):0;return h&&N<h?R_(h-N,A)+l:l}function vpe(l,h,A){return A||h==null?h=0:h&&(h=+h),Sue(On(l).replace(Et,""),h||0)}function bpe(l,h,A){return(A?Ka(l,h,A):h===r)?h=1:h=Br(h),lI(On(l),h)}function wpe(){var l=arguments,h=On(l[0]);return l.length<3?h:h.replace(l[1],l[2])}var _pe=u0(function(l,h,A){return l+(A?"_":"")+h.toLowerCase()});function Epe(l,h,A){return A&&typeof A!="number"&&Ka(l,h,A)&&(h=A=r),A=A===r?$:A>>>0,A?(l=On(l),l&&(typeof h=="string"||h!=null&&!DI(h))&&(h=qo(h),!h&&nc(l))?lf(xa(l),0,A):l.split(h,A)):[]}var xpe=u0(function(l,h,A){return l+(A?" ":"")+kI(h)});function Ape(l,h,A){return l=On(l),A=A==null?0:Qd(Br(A),0,l.length),h=qo(h),l.slice(A,A+h.length)==h}function Spe(l,h,A){var N=J.templateSettings;A&&Ka(l,h,A)&&(h=r),l=On(l),h=q_({},h,N,H9);var V=q_({},h.imports,N.imports,H9),ae=Gi(V),xe=nf(V,ae),$e,Fe,ot=0,st=h.interpolate||gn,ht="__p += '",It=YO((h.escape||gn).source+"|"+st.source+"|"+(st===ve?pr:gn).source+"|"+(h.evaluate||gn).source+"|$","g"),Qt="//# sourceURL="+(Tn.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++yo+"]")+`
147
+ `;l.replace(It,function(hr,Zr,sn,zo,Ya,Vo){return sn||(sn=zo),ht+=l.slice(ot,Vo).replace(Ur,Yp),Zr&&($e=!0,ht+=`' +
148
+ __e(`+Zr+`) +
149
+ '`),Ya&&(Fe=!0,ht+=`';
150
+ `+Ya+`;
151
+ __p += '`),sn&&(ht+=`' +
152
+ ((__t = (`+sn+`)) == null ? '' : __t) +
153
+ '`),ot=Vo+hr.length,hr}),ht+=`';
154
+ `;var dr=Tn.call(h,"variable")&&h.variable;if(!dr)ht=`with (obj) {
155
+ `+ht+`
156
+ }
157
+ `;else if(_t.test(dr))throw new Cr(s);ht=(Fe?ht.replace(oi,""):ht).replace(Dn,"$1").replace($n,"$1;"),ht="function("+(dr||"obj")+`) {
158
+ `+(dr?"":`obj || (obj = {});
159
+ `)+"var __t, __p = ''"+($e?", __e = _.escape":"")+(Fe?`, __j = Array.prototype.join;
160
+ function print() { __p += __j.call(arguments, '') }
161
+ `:`;
162
+ `)+ht+`return __p
163
+ }`;var Hr=M7(function(){return En(ae,Qt+"return "+ht).apply(r,xe)});if(Hr.source=ht,NI(Hr))throw Hr;return Hr}function Ope(l){return On(l).toLowerCase()}function Ipe(l){return On(l).toUpperCase()}function Ppe(l,h,A){if(l=On(l),l&&(A||h===r))return qd(l);if(!l||!(h=qo(h)))return l;var N=xa(l),V=xa(h),ae=Hd(N,V),xe=zd(N,V)+1;return lf(N,ae,xe).join("")}function Tpe(l,h,A){if(l=On(l),l&&(A||h===r))return l.slice(0,Gd(l)+1);if(!l||!(h=qo(h)))return l;var N=xa(l),V=zd(N,xa(h))+1;return lf(N,0,V).join("")}function Rpe(l,h,A){if(l=On(l),l&&(A||h===r))return l.replace(Et,"");if(!l||!(h=qo(h)))return l;var N=xa(l),V=Hd(N,xa(h));return lf(N,V).join("")}function Cpe(l,h){var A=L,N=q;if(ui(h)){var V="separator"in h?h.separator:V;A="length"in h?Br(h.length):A,N="omission"in h?qo(h.omission):N}l=On(l);var ae=l.length;if(nc(l)){var xe=xa(l);ae=xe.length}if(A>=ae)return l;var $e=A-ic(N);if($e<1)return N;var Fe=xe?lf(xe,0,$e).join(""):l.slice(0,$e);if(V===r)return Fe+N;if(xe&&($e+=Fe.length-$e),DI(V)){if(l.slice($e).search(V)){var ot,st=Fe;for(V.global||(V=YO(V.source,On(lr.exec(V))+"g")),V.lastIndex=0;ot=V.exec(st);)var ht=ot.index;Fe=Fe.slice(0,ht===r?$e:ht)}}else if(l.indexOf(qo(V),$e)!=$e){var It=Fe.lastIndexOf(V);It>-1&&(Fe=Fe.slice(0,It))}return Fe+N}function Npe(l){return l=On(l),l&&$r.test(l)?l.replace(Yn,r0):l}var Dpe=u0(function(l,h,A){return l+(A?" ":"")+h.toUpperCase()}),kI=k9("toUpperCase");function $7(l,h,A){return l=On(l),h=A?r:h,h===r?Jp(l)?lue(l):hi(l):l.match(h)||[]}var M7=Gr(function(l,h){try{return gt(l,r,h)}catch(A){return NI(A)?A:new Cr(A)}}),$pe=Fu(function(l,h){return Wt(h,function(A){A=Kc(A),Uu(l,A,RI(l[A],l))}),l});function Mpe(l){var h=l==null?0:l.length,A=ur();return l=h?Sr(l,function(N){if(typeof N[1]!="function")throw new ls(o);return[A(N[0]),N[1]]}):[],Gr(function(N){for(var V=-1;++V<h;){var ae=l[V];if(gt(ae[0],this,N))return gt(ae[1],this,N)}})}function kpe(l){return sle(ds(l,d))}function LI(l){return function(){return l}}function Lpe(l,h){return l==null||l!==l?h:l}var Upe=U9(),Bpe=U9(!0);function wo(l){return l}function UI(l){return p9(typeof l=="function"?l:ds(l,d))}function Fpe(l){return y9(ds(l,d))}function jpe(l,h){return m9(l,ds(h,d))}var qpe=Gr(function(l,h){return function(A){return Nm(A,l,h)}}),Hpe=Gr(function(l,h){return function(A){return Nm(l,A,h)}});function BI(l,h,A){var N=Gi(h),V=x_(h,N);A==null&&!(ui(h)&&(V.length||!N.length))&&(A=h,h=l,l=this,V=x_(h,Gi(h)));var ae=!(ui(A)&&"chain"in A)||!!A.chain,xe=qu(l);return Wt(V,function($e){var Fe=h[$e];l[$e]=Fe,xe&&(l.prototype[$e]=function(){var ot=this.__chain__;if(ae||ot){var st=l(this.__wrapped__),ht=st.__actions__=mo(this.__actions__);return ht.push({func:Fe,args:arguments,thisArg:l}),st.__chain__=ot,st}return Fe.apply(l,zi([this.value()],arguments))})}),l}function zpe(){return yr._===this&&(yr._=yue),this}function FI(){}function Vpe(l){return l=Br(l),Gr(function(h){return v9(h,l)})}var Gpe=mI(Sr),Wpe=mI(Pn),Kpe=mI(ki);function k7(l){return AI(l)?Zl(Kc(l)):Ale(l)}function Ype(l){return function(h){return l==null?r:Jd(l,h)}}var Qpe=F9(),Jpe=F9(!0);function jI(){return[]}function qI(){return!1}function Xpe(){return{}}function Zpe(){return""}function e0e(){return!0}function t0e(l,h){if(l=Br(l),l<1||l>F)return[];var A=$,N=Aa(l,$);h=ur(h),l-=$;for(var V=rf(N,h);++A<l;)h(A);return V}function r0e(l){return Dr(l)?Sr(l,Kc):Ho(l)?[l]:mo(r7(On(l)))}function n0e(l){var h=++pue;return On(l)+h}var i0e=T_(function(l,h){return l+h},0),a0e=vI("ceil"),o0e=T_(function(l,h){return l/h},1),s0e=vI("floor");function c0e(l){return l&&l.length?E_(l,wo,nI):r}function u0e(l,h){return l&&l.length?E_(l,ur(h,2),nI):r}function l0e(l){return Fd(l,wo)}function f0e(l,h){return Fd(l,ur(h,2))}function d0e(l){return l&&l.length?E_(l,wo,sI):r}function h0e(l,h){return l&&l.length?E_(l,ur(h,2),sI):r}var p0e=T_(function(l,h){return l*h},1),g0e=vI("round"),y0e=T_(function(l,h){return l-h},0);function m0e(l){return l&&l.length?tf(l,wo):0}function v0e(l,h){return l&&l.length?tf(l,ur(h,2)):0}return J.after=Fde,J.ary=h7,J.assign=Ihe,J.assignIn=I7,J.assignInWith=q_,J.assignWith=Phe,J.at=The,J.before=p7,J.bind=RI,J.bindAll=$pe,J.bindKey=g7,J.castArray=Xde,J.chain=l7,J.chunk=sfe,J.compact=cfe,J.concat=ufe,J.cond=Mpe,J.conforms=kpe,J.constant=LI,J.countBy=mde,J.create=Rhe,J.curry=y7,J.curryRight=m7,J.debounce=v7,J.defaults=Che,J.defaultsDeep=Nhe,J.defer=jde,J.delay=qde,J.difference=lfe,J.differenceBy=ffe,J.differenceWith=dfe,J.drop=hfe,J.dropRight=pfe,J.dropRightWhile=gfe,J.dropWhile=yfe,J.fill=mfe,J.filter=bde,J.flatMap=Ede,J.flatMapDeep=xde,J.flatMapDepth=Ade,J.flatten=o7,J.flattenDeep=vfe,J.flattenDepth=bfe,J.flip=Hde,J.flow=Upe,J.flowRight=Bpe,J.fromPairs=wfe,J.functions=Bhe,J.functionsIn=Fhe,J.groupBy=Sde,J.initial=Efe,J.intersection=xfe,J.intersectionBy=Afe,J.intersectionWith=Sfe,J.invert=qhe,J.invertBy=Hhe,J.invokeMap=Ide,J.iteratee=UI,J.keyBy=Pde,J.keys=Gi,J.keysIn=bo,J.map=k_,J.mapKeys=Vhe,J.mapValues=Ghe,J.matches=Fpe,J.matchesProperty=jpe,J.memoize=U_,J.merge=Whe,J.mergeWith=P7,J.method=qpe,J.methodOf=Hpe,J.mixin=BI,J.negate=B_,J.nthArg=Vpe,J.omit=Khe,J.omitBy=Yhe,J.once=zde,J.orderBy=Tde,J.over=Gpe,J.overArgs=Vde,J.overEvery=Wpe,J.overSome=Kpe,J.partial=CI,J.partialRight=b7,J.partition=Rde,J.pick=Qhe,J.pickBy=T7,J.property=k7,J.propertyOf=Ype,J.pull=Tfe,J.pullAll=c7,J.pullAllBy=Rfe,J.pullAllWith=Cfe,J.pullAt=Nfe,J.range=Qpe,J.rangeRight=Jpe,J.rearg=Gde,J.reject=Dde,J.remove=Dfe,J.rest=Wde,J.reverse=PI,J.sampleSize=Mde,J.set=Xhe,J.setWith=Zhe,J.shuffle=kde,J.slice=$fe,J.sortBy=Bde,J.sortedUniq=jfe,J.sortedUniqBy=qfe,J.split=Epe,J.spread=Kde,J.tail=Hfe,J.take=zfe,J.takeRight=Vfe,J.takeRightWhile=Gfe,J.takeWhile=Wfe,J.tap=cde,J.throttle=Yde,J.thru=M_,J.toArray=A7,J.toPairs=R7,J.toPairsIn=C7,J.toPath=r0e,J.toPlainObject=O7,J.transform=epe,J.unary=Qde,J.union=Kfe,J.unionBy=Yfe,J.unionWith=Qfe,J.uniq=Jfe,J.uniqBy=Xfe,J.uniqWith=Zfe,J.unset=tpe,J.unzip=TI,J.unzipWith=u7,J.update=rpe,J.updateWith=npe,J.values=d0,J.valuesIn=ipe,J.without=ede,J.words=$7,J.wrap=Jde,J.xor=tde,J.xorBy=rde,J.xorWith=nde,J.zip=ide,J.zipObject=ade,J.zipObjectDeep=ode,J.zipWith=sde,J.entries=R7,J.entriesIn=C7,J.extend=I7,J.extendWith=q_,BI(J,J),J.add=i0e,J.attempt=M7,J.camelCase=cpe,J.capitalize=N7,J.ceil=a0e,J.clamp=ape,J.clone=Zde,J.cloneDeep=the,J.cloneDeepWith=rhe,J.cloneWith=ehe,J.conformsTo=nhe,J.deburr=D7,J.defaultTo=Lpe,J.divide=o0e,J.endsWith=upe,J.eq=oc,J.escape=lpe,J.escapeRegExp=fpe,J.every=vde,J.find=wde,J.findIndex=i7,J.findKey=Dhe,J.findLast=_de,J.findLastIndex=a7,J.findLastKey=$he,J.floor=s0e,J.forEach=f7,J.forEachRight=d7,J.forIn=Mhe,J.forInRight=khe,J.forOwn=Lhe,J.forOwnRight=Uhe,J.get=$I,J.gt=ihe,J.gte=ahe,J.has=jhe,J.hasIn=MI,J.head=s7,J.identity=wo,J.includes=Ode,J.indexOf=_fe,J.inRange=ope,J.invoke=zhe,J.isArguments=eh,J.isArray=Dr,J.isArrayBuffer=ohe,J.isArrayLike=vo,J.isArrayLikeObject=bi,J.isBoolean=she,J.isBuffer=ff,J.isDate=che,J.isElement=uhe,J.isEmpty=lhe,J.isEqual=fhe,J.isEqualWith=dhe,J.isError=NI,J.isFinite=hhe,J.isFunction=qu,J.isInteger=w7,J.isLength=F_,J.isMap=_7,J.isMatch=phe,J.isMatchWith=ghe,J.isNaN=yhe,J.isNative=mhe,J.isNil=bhe,J.isNull=vhe,J.isNumber=E7,J.isObject=ui,J.isObjectLike=pi,J.isPlainObject=Um,J.isRegExp=DI,J.isSafeInteger=whe,J.isSet=x7,J.isString=j_,J.isSymbol=Ho,J.isTypedArray=f0,J.isUndefined=_he,J.isWeakMap=Ehe,J.isWeakSet=xhe,J.join=Ofe,J.kebabCase=dpe,J.last=ps,J.lastIndexOf=Ife,J.lowerCase=hpe,J.lowerFirst=ppe,J.lt=Ahe,J.lte=She,J.max=c0e,J.maxBy=u0e,J.mean=l0e,J.meanBy=f0e,J.min=d0e,J.minBy=h0e,J.stubArray=jI,J.stubFalse=qI,J.stubObject=Xpe,J.stubString=Zpe,J.stubTrue=e0e,J.multiply=p0e,J.nth=Pfe,J.noConflict=zpe,J.noop=FI,J.now=L_,J.pad=gpe,J.padEnd=ype,J.padStart=mpe,J.parseInt=vpe,J.random=spe,J.reduce=Cde,J.reduceRight=Nde,J.repeat=bpe,J.replace=wpe,J.result=Jhe,J.round=g0e,J.runInContext=Ue,J.sample=$de,J.size=Lde,J.snakeCase=_pe,J.some=Ude,J.sortedIndex=Mfe,J.sortedIndexBy=kfe,J.sortedIndexOf=Lfe,J.sortedLastIndex=Ufe,J.sortedLastIndexBy=Bfe,J.sortedLastIndexOf=Ffe,J.startCase=xpe,J.startsWith=Ape,J.subtract=y0e,J.sum=m0e,J.sumBy=v0e,J.template=Spe,J.times=t0e,J.toFinite=Hu,J.toInteger=Br,J.toLength=S7,J.toLower=Ope,J.toNumber=gs,J.toSafeInteger=Ohe,J.toString=On,J.toUpper=Ipe,J.trim=Ppe,J.trimEnd=Tpe,J.trimStart=Rpe,J.truncate=Cpe,J.unescape=Npe,J.uniqueId=n0e,J.upperCase=Dpe,J.upperFirst=kI,J.each=f7,J.eachRight=d7,J.first=s7,BI(J,function(){var l={};return Gc(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:Bi(Br(A),0);var N=this.__filtered__&&!h?new rn(this):this.clone();return N.__filtered__?N.__takeCount__=Aa(A,N.__takeCount__):N.__views__.push({size:Aa(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==Y;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(wo)},rn.prototype.find=function(l){return this.filter(l).head()},rn.prototype.findLast=function(l){return this.reverse().find(l)},rn.prototype.invokeMap=Gr(function(l,h){return typeof l=="function"?new rn(this):this.map(function(A){return Nm(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($)},Gc(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__,$e=N?[1]:arguments,Fe=xe instanceof rn,ot=$e[0],st=Fe||Dr(xe),ht=function(Zr){var sn=V.apply(J,zi([Zr],$e));return N&&It?sn[0]:sn};st&&A&&typeof ot=="function"&&ot.length!=1&&(Fe=st=!1);var It=this.__chain__,Qt=!!this.__actions__.length,dr=ae&&!It,Hr=Fe&&!Qt;if(!ae&&st){xe=Hr?xe:new rn(this);var hr=l.apply(xe,$e);return hr.__actions__.push({func:M_,args:[ht],thisArg:r}),new fs(hr,It)}return dr&&Hr?l.apply(this,$e):(hr=this.thru(ht),dr?N?hr.value()[0]:hr.value():hr)})}),Wt(["pop","push","shift","sort","splice","unshift"],function(l){var h=s_[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)})}}),Gc(rn.prototype,function(l,h){var A=J[h];if(A){var N=A.name+"";Tn.call(o0,N)||(o0[N]=[]),o0[N].push({name:h,func:A})}}),o0[P_(r,_).name]=[{name:"wrapper",func:r}],rn.prototype.clone=Nue,rn.prototype.reverse=Due,rn.prototype.value=$ue,J.prototype.at=ude,J.prototype.chain=lde,J.prototype.commit=fde,J.prototype.next=dde,J.prototype.plant=pde,J.prototype.reverse=gde,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=yde,J.prototype.first=J.prototype.head,Sm&&(J.prototype[Sm]=hde),J},n0=fue();R?((R.exports=n0)._=n0,ie._=n0):yr._=n0}).call(Vv)})(v5,v5.exports);var j$e=Object.defineProperty,q$e=Object.defineProperties,H$e=Object.getOwnPropertyDescriptors,iK=Object.getOwnPropertySymbols,z$e=Object.prototype.hasOwnProperty,V$e=Object.prototype.propertyIsEnumerable,aK=(t,e,r)=>e in t?j$e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,RE=(t,e)=>{for(var r in e||(e={}))z$e.call(e,r)&&aK(t,r,e[r]);if(iK)for(var r of iK(e))V$e.call(e,r)&&aK(t,r,e[r]);return t},G$e=(t,e)=>q$e(t,H$e(e));function bd(t,e,r){var n;const i=y6e(t);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${F$e}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function Bp(t){return t.includes(":")?t.split(":")[1]:t}function foe(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function W$e(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 K$e(t={},e={}){const r=oK(t),n=oK(e);return v5.exports.merge(r,n)}function oK(t){var e,r,n,i;const a={};if(!Ig(t))return a;for(const[o,s]of Object.entries(t)){const c=Pk(o)?[o]:s.chains,u=s.methods||[],f=s.events||[],d=s.rpcMap||{},g=Ob(o);a[g]=G$e(RE(RE({},a[g]),s),{chains:mN(c,(e=a[g])==null?void 0:e.chains),methods:mN(u,(r=a[g])==null?void 0:r.methods),events:mN(f,(n=a[g])==null?void 0:n.events),rpcMap:RE(RE({},d),(i=a[g])==null?void 0:i.rpcMap)})}return a}function Y$e(t){return t.includes(":")?t.split(":")[2]:t}function Q$e(t){const e={};for(const[r,n]of Object.entries(t)){const i=n.methods||[],a=n.events||[],o=n.accounts||[],s=Pk(r)?[r]:n.chains?n.chains:foe(n.accounts);e[r]={chains:s,methods:i,events:a,accounts:o}}return e}function RN(t){return typeof t=="number"?t:t.includes("0x")?parseInt(t,16):t.includes(":")?Number(t.split(":")[1]):Number(t)}const doe={},ni=t=>doe[t],CN=(t,e)=>{doe[t]=e};class J$e{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=ni("events"),this.client=ni("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(Xl.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=Bp(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||bd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Jl(new Dd(n,ni("disableProviderPing")))}}class X$e{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=ni("events"),this.client=ni("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(Xl.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||bd(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Jl(new Dd(n,ni("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(Bp(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 Z$e{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=ni("events"),this.client=ni("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(Xl.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=Bp(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||bd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Jl(new Dd(n,ni("disableProviderPing")))}}class eMe{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=ni("events"),this.client=ni("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(Xl.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=Bp(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||bd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Jl(new Dd(n,ni("disableProviderPing")))}}class tMe{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=ni("events"),this.client=ni("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(Xl.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=Bp(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 Jl(new Dd(n,ni("disableProviderPing")))}}class rMe{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=ni("events"),this.client=ni("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(Xl.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=Bp(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||bd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Jl(new Dd(n,ni("disableProviderPing")))}}class nMe{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=ni("events"),this.client=ni("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(Xl.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=Bp(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||bd(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Jl(new Dd(n,ni("disableProviderPing")))}}class iMe{constructor(e){this.name="near",this.namespace=e.namespace,this.events=ni("events"),this.client=ni("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||bd(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(Xl.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||bd(e,this.namespace);return typeof n>"u"?void 0:new Jl(new Dd(n,ni("disableProviderPing")))}}var aMe=Object.defineProperty,oMe=Object.defineProperties,sMe=Object.getOwnPropertyDescriptors,sK=Object.getOwnPropertySymbols,cMe=Object.prototype.hasOwnProperty,uMe=Object.prototype.propertyIsEnumerable,cK=(t,e,r)=>e in t?aMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,CE=(t,e)=>{for(var r in e||(e={}))cMe.call(e,r)&&cK(t,r,e[r]);if(sK)for(var r of sK(e))uMe.call(e,r)&&cK(t,r,e[r]);return t},NN=(t,e)=>oMe(t,sMe(e));let lMe=class hoe{constructor(e){this.events=new ZM,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)||rK})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const r=new hoe(e);return await r.initialize(),r}async request(e,r){const[n,i]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:CE({},e),chainId:`${n}:${i}`,topic:this.session.topic})}sendAsync(e,r,n){this.request(e,n).then(i=>r(null,i)).catch(i=>r(i,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:xi("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}removeListener(e,r){this.events.removeListener(e,r)}off(e,r){this.events.off(e,r)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await i().then(a=>{this.session=a,this.namespaces||(this.namespaces=Q$e(a.namespaces),this.persist("namespaces",this.namespaces))}).catch(a=>{if(a.message!==uoe)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(Iu(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 D$e.init({logger:this.providerOpts.logger||rK,relayUrl:this.providerOpts.relayUrl||L$e,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=>Ob(r)))];CN("client",this.client),CN("events",this.events),CN("disableProviderPing",this.disableProviderPing),e.forEach(r=>{if(!this.session)return;const n=W$e(r,this.session),i=foe(n),a=K$e(this.namespaces,this.optionalNamespaces),o=NN(CE({},a[r]),{accounts:n,chains:i});switch(r){case"eip155":this.rpcProviders[r]=new X$e({namespace:o});break;case"solana":this.rpcProviders[r]=new Z$e({namespace:o});break;case"cosmos":this.rpcProviders[r]=new eMe({namespace:o});break;case"polkadot":this.rpcProviders[r]=new J$e({namespace:o});break;case"cip34":this.rpcProviders[r]=new tMe({namespace:o});break;case"elrond":this.rpcProviders[r]=new rMe({namespace:o});break;case"multiversx":this.rpcProviders[r]=new nMe({namespace:o});break;case"near":this.rpcProviders[r]=new iMe({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&&Iu(i)&&this.events.emit("accountsChanged",i.map(Y$e))}else if(n.name==="chainChanged"){const i=r.chainId,a=r.event.data,o=Ob(i),s=RN(i)!==RN(a)?`${o}:${RN(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=NN(CE({},a),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:r})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",NN(CE({},xi("USER_DISCONNECTED")),{data:e.topic}))}),this.on(Xl.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=>Ob(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=Ob(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(`${nK}/${e}`,r)}async getFromStore(e){return await this.client.core.storage.getItem(`${nK}/${e}`)}};const fMe=lMe,dMe="wc",hMe="ethereum_provider",pMe=`${dMe}@2:${hMe}:`,gMe="https://rpc.walletconnect.com/v1/",QA=["eth_sendTransaction","personal_sign"],poe=["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"],JA=["chainChanged","accountsChanged"],goe=["chainChanged","accountsChanged","message","disconnect","connect"];var yMe=Object.defineProperty,mMe=Object.defineProperties,vMe=Object.getOwnPropertyDescriptors,uK=Object.getOwnPropertySymbols,bMe=Object.prototype.hasOwnProperty,wMe=Object.prototype.propertyIsEnumerable,lK=(t,e,r)=>e in t?yMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pb=(t,e)=>{for(var r in e||(e={}))bMe.call(e,r)&&lK(t,r,e[r]);if(uK)for(var r of uK(e))wMe.call(e,r)&&lK(t,r,e[r]);return t},fK=(t,e)=>mMe(t,vMe(e));function XA(t){return Number(t[0].split(":")[1])}function DN(t){return`0x${t.toString(16)}`}function _Me(t){const{chains:e,optionalChains:r,methods:n,optionalMethods:i,events:a,optionalEvents:o,rpcMap:s}=t;if(!Iu(e))throw new Error("Invalid chains");const c={chains:e,methods:n||QA,events:a||JA,rpcMap:Pb({},e.length?{[XA(e)]:s[XA(e)]}:{})},u=a==null?void 0:a.filter(m=>!JA.includes(m)),f=n==null?void 0:n.filter(m=>!QA.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:poe))],events:[...new Set(c.events.concat(o!=null&&o.length?o:goe))],rpcMap:s};return{required:e.length?c:void 0,optional:r.length?g:void 0}}let yoe=class moe{constructor(){this.events=new po.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=pMe,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 moe;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}=_Me(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(fK(Pb({namespaces:Pb({},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=m6e(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:a),this.setAccounts(a),this.events.emit("connect",{chainId:DN(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",DN(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",fK(Pb({},xi("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var r,n;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const r=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",DN(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)||QA:[],c=i.length?(e==null?void 0:e.events)||JA:[],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?XA(this.rpc.chains):XA(this.rpc.optionalChains),this.signer=await fMe.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=XTe.WalletConnectModal}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(Pb({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&&Iu(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&&Iu(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])||`${gMe}?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 EMe=yoe,xMe=Object.freeze(Object.defineProperty({__proto__:null,EthereumProvider:EMe,OPTIONAL_EVENTS:goe,OPTIONAL_METHODS:poe,REQUIRED_EVENTS:JA,REQUIRED_METHODS:QA,default:yoe},Symbol.toStringTag,{value:"Module"})),AMe=fo(xMe);var SMe=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]}),OMe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),IMe=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)&&SMe(e,t,r);return OMe(e,t),e};Object.defineProperty(sO,"__esModule",{value:!0});sO.WalletConnectV2Connector=void 0;const PMe=VS,TMe=ql,RMe=Vs;class Zf extends PMe.AbstractConnector{constructor(e){super({supportedChainIds:(()=>{const{chains:r,optionalChains:n}=Zf.configuration.chains[e];return[...r,...n]})()}),this.desiredChainId=e,this.activate=async()=>{const r=await Promise.resolve().then(()=>IMe(AMe)).then(i=>{const{chains:a,optionalChains:o}=Zf.configuration.chains[this.desiredChainId];return i.default.init({projectId:Zf.configuration.projectId,rpcMap:Zf.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()}}}sO.WalletConnectV2Connector=Zf;Zf.configuration=RMe.getConfiguration()[TMe.ProviderType.WALLET_CONNECT_V2];Zf.clearStorage=t=>{t.removeRegExp(new RegExp("^wc@2:"))};var bO={},$d=(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))($d||{}),wm=(t=>(t.SyncWeb3Method="SYNC_WEB3_METHOD",t.DuplicateIframe="DUPLICATE_IFRAME",t.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",t.DeprecationNotice="DEPRECATION_NOTICE",t))(wm||{}),wO=(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))(wO||{}),xs=(t=>(t.MetaMask="metamask",t.CoinbaseWallet="coinbase_wallet",t))(xs||{}),Zb=(t=>(t.WalletSelected="wallet_selected",t.WalletConnected="wallet_connected",t.WalletRejected="wallet_rejected",t))(Zb||{}),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||{}),kh=(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))(kh||{}),F1=(t=>(t.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",t))(F1||{}),voe=(t=>(t.UpdateEmail="update-email",t.MFA="mfa",t.Recovery="recovery",t))(voe||{}),boe=(t=>(t.Retry="retry",t))(boe||{}),woe=(t=>(t.EmailSent="email-sent",t.EmailNotDeliverable="email-not-deliverable",t))(woe||{}),rg=(t=>(t.VerifyEmailOtp="verify-email-otp",t.Cancel="cancel",t))(rg||{}),_oe=(t=>(t.EmailOTPSent="email-otp-sent",t.InvalidEmailOtp="invalid-email-otp",t.ExpiredEmailOtp="expired-email-otp",t))(_oe||{}),ZA=(t=>(t.Retry="device-retry",t))(ZA||{}),Eoe=(t=>(t.DeviceApproved="device-approved",t.DeviceNeedsApproval="device-needs-approval",t.DeviceVerificationLinkExpired="device-verification-link-expired",t.DeviceVerificationEmailSent="device-verification-email-sent",t))(Eoe||{}),xoe=(t=>(t.Harmony="HARMONY",t))(xoe||{}),Aoe=(t=>(t.PhoneNumber="phone_number",t))(Aoe||{}),CMe=Object.create,_O=Object.defineProperty,NMe=Object.defineProperties,DMe=Object.getOwnPropertyDescriptor,$Me=Object.getOwnPropertyDescriptors,MMe=Object.getOwnPropertyNames,dK=Object.getOwnPropertySymbols,kMe=Object.getPrototypeOf,Soe=Object.prototype.hasOwnProperty,LMe=Object.prototype.propertyIsEnumerable,hK=(t,e,r)=>e in t?_O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Uk=(t,e)=>{for(var r in e||(e={}))Soe.call(e,r)&&hK(t,r,e[r]);if(dK)for(var r of dK(e))LMe.call(e,r)&&hK(t,r,e[r]);return t},Ooe=(t,e)=>NMe(t,$Me(e)),UMe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),BMe=(t,e)=>{for(var r in e)_O(t,r,{get:e[r],enumerable:!0})},FMe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of MMe(e))!Soe.call(t,i)&&i!==r&&_O(t,i,{get:()=>e[i],enumerable:!(n=DMe(e,i))||n.enumerable});return t},jMe=(t,e,r)=>(r=t!=null?CMe(kMe(t)):{},FMe(e||!t||!t.__esModule?_O(r,"default",{value:t,enumerable:!0}):r,t)),Ni=(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())}),qMe=UMe((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 HMe(t){let e={exports:{}};return t(e,e.exports),e.exports}var zMe=Number.MAX_SAFE_INTEGER||9007199254740991,Bk={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:zMe,MAX_SAFE_COMPONENT_LENGTH:16},VMe=typeof process=="object"&&{}&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},Cn=VMe,e_=HMe(function(t,e){let{MAX_SAFE_COMPONENT_LENGTH:r}=Bk,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*$")}),pK=/^[0-9]+$/,Ioe=(t,e)=>{let r=pK.test(t),n=pK.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},GMe=(t,e)=>Ioe(e,t),WMe={compareIdentifiers:Ioe,rcompareIdentifiers:GMe},{MAX_LENGTH:gK,MAX_SAFE_INTEGER:NE}=Bk,{re:yK,t:mK}=e_,{compareIdentifiers:Gv}=WMe,la=class{constructor(t,e){if(e&&typeof e=="object"||(e={loose:!!e,includePrerelease:!1}),t instanceof la){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>gK)throw new TypeError(`version is longer than ${gK} characters`);Cn("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;let r=t.trim().match(e.loose?yK[mK.LOOSE]:yK[mK.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>NE||this.major<0)throw new TypeError("Invalid major version");if(this.minor>NE||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>NE||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<NE)return i}return n}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Cn("SemVer.compare",this.version,this.options,t),!(t instanceof la)){if(typeof t=="string"&&t===this.version)return 0;t=new la(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof la||(t=new la(t,this.options)),Gv(this.major,t.major)||Gv(this.minor,t.minor)||Gv(this.patch,t.patch)}comparePre(t){if(t instanceof la||(t=new la(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 Gv(r,n)}while(++e)}compareBuild(t){t instanceof la||(t=new la(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 Gv(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}},KMe=(t,e,r)=>new la(t,r).compare(new la(e,r)),_m=KMe,YMe=(t,e,r)=>_m(t,e,r)===0,QMe=YMe,JMe=(t,e,r)=>_m(t,e,r)!==0,XMe=JMe,ZMe=(t,e,r)=>_m(t,e,r)>0,eke=ZMe,tke=(t,e,r)=>_m(t,e,r)>=0,rke=tke,nke=(t,e,r)=>_m(t,e,r)<0,ike=nke,ake=(t,e,r)=>_m(t,e,r)<=0,oke=ake,ske=(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 QMe(t,r,n);case"!=":return XMe(t,r,n);case">":return eke(t,r,n);case">=":return rke(t,r,n);case"<":return ike(t,r,n);case"<=":return oke(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},$N=ske,Wv=Symbol("SemVer ANY"),j1=class{static get ANY(){return Wv}constructor(e,r){if(r&&typeof r=="object"||(r={loose:!!r,includePrerelease:!1}),e instanceof j1){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===Wv?this.value="":this.value=this.operator+this.semver.version,Cn("comp",this)}parse(e){let r=this.options.loose?vK[bK.COMPARATORLOOSE]:vK[bK.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 la(n[2],this.options.loose):this.semver=Wv}toString(){return this.value}test(e){if(Cn("Comparator.test",e,this.options.loose),this.semver===Wv||e===Wv)return!0;if(typeof e=="string")try{e=new la(e,this.options)}catch{return!1}return $N(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof j1))throw new TypeError("a Comparator is required");if(r&&typeof r=="object"||(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""||new Tg(e.value,r).test(this.value);if(e.operator==="")return e.value===""||new Tg(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=$N(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=$N(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||a&&o||s||c}},{re:vK,t:bK}=e_,Tg=class{constructor(t,e){if(e&&typeof e=="object"||(e={loose:!!e,includePrerelease:!1}),t instanceof Tg)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new Tg(t.raw,e);if(t instanceof j1)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${t}`);this.format()}format(){return this.range=this.set.map(t=>t.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(t){let{loose:e}=this.options;t=t.trim();let r=e?ka[da.HYPHENRANGELOOSE]:ka[da.HYPHENRANGE];t=t.replace(r,wke(this.options.includePrerelease)),Cn("hyphen replace",t),t=t.replace(ka[da.COMPARATORTRIM],cke),Cn("comparator trim",t,ka[da.COMPARATORTRIM]),t=(t=(t=t.replace(ka[da.TILDETRIM],uke)).replace(ka[da.CARETTRIM],lke)).split(/\s+/).join(" ");let n=e?ka[da.COMPARATORLOOSE]:ka[da.COMPARATOR];return t.split(" ").map(i=>fke(i,this.options)).join(" ").split(/\s+/).map(i=>bke(i,this.options)).filter(this.options.loose?i=>!!i.match(n):()=>!0).map(i=>new j1(i,this.options))}intersects(t,e){if(!(t instanceof Tg))throw new TypeError("a Range is required");return this.set.some(r=>wK(r,e)&&t.set.some(n=>wK(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 la(t,this.options)}catch{return!1}for(let e=0;e<this.set.length;e++)if(_ke(this.set[e],t,this.options))return!0;return!1}},{re:ka,t:da,comparatorTrimReplace:cke,tildeTrimReplace:uke,caretTrimReplace:lke}=e_,wK=(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},fke=(t,e)=>(Cn("comp",t,e),t=pke(t,e),Cn("caret",t),t=dke(t,e),Cn("tildes",t),t=yke(t,e),Cn("xrange",t),t=vke(t,e),Cn("stars",t),t),no=t=>!t||t.toLowerCase()==="x"||t==="*",dke=(t,e)=>t.trim().split(/\s+/).map(r=>hke(r,e)).join(" "),hke=(t,e)=>{let r=e.loose?ka[da.TILDELOOSE]:ka[da.TILDE];return t.replace(r,(n,i,a,o,s)=>{let c;return Cn("tilde",t,n,i,a,o,s),no(i)?c="":no(a)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:no(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})},pke=(t,e)=>t.trim().split(/\s+/).map(r=>gke(r,e)).join(" "),gke=(t,e)=>{Cn("caret",t,e);let r=e.loose?ka[da.CARETLOOSE]:ka[da.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),no(a)?u="":no(o)?u=`>=${a}.0.0${n} <${+a+1}.0.0-0`:no(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})},yke=(t,e)=>(Cn("replaceXRanges",t,e),t.split(/\s+/).map(r=>mke(r,e)).join(" ")),mke=(t,e)=>{t=t.trim();let r=e.loose?ka[da.XRANGELOOSE]:ka[da.XRANGE];return t.replace(r,(n,i,a,o,s,c)=>{Cn("xRange",t,n,i,a,o,s,c);let u=no(a),f=u||no(o),d=f||no(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})},vke=(t,e)=>(Cn("replaceStars",t,e),t.trim().replace(ka[da.STAR],"")),bke=(t,e)=>(Cn("replaceGTE0",t,e),t.trim().replace(ka[e.includePrerelease?da.GTE0PRE:da.GTE0],"")),wke=t=>(e,r,n,i,a,o,s,c,u,f,d,g,m)=>`${r=no(n)?"":no(i)?`>=${n}.0.0${t?"-0":""}`:no(a)?`>=${n}.${i}.0${t?"-0":""}`:o?`>=${r}`:`>=${r}${t?"-0":""}`} ${c=no(u)?"":no(f)?`<${+u+1}.0.0-0`:no(d)?`<${u}.${+f+1}.0-0`:g?`<=${u}.${f}.${d}-${g}`:t?`<${u}.${f}.${+d+1}-0`:`<=${c}`}`.trim(),_ke=(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!==j1.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},Eke=(t,e,r)=>{try{e=new Tg(e,r)}catch{return!1}return e.test(t)},{MAX_LENGTH:xke}=Bk,{re:_K,t:EK}=e_,Ake=(t,e)=>{if(e&&typeof e=="object"||(e={loose:!!e,includePrerelease:!1}),t instanceof la)return t;if(typeof t!="string"||t.length>xke||!(e.loose?_K[EK.LOOSE]:_K[EK.FULL]).test(t))return null;try{return new la(t,e)}catch{return null}},Ske=Ake,{re:DE,t:$E}=e_,Oke=(t,e)=>{if(t instanceof la)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;let r=null;if((e=e||{}).rtl){let n;for(;(n=DE[$E.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),DE[$E.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;DE[$E.COERCERTL].lastIndex=-1}else r=t.match(DE[$E.COERCE]);return r===null?null:Ske(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};function Ike(t){return String.fromCharCode(parseInt(t.slice(1),16))}function Pke(t){return`%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`}function Tke(t){return btoa(encodeURIComponent(t).replace(/%[0-9A-F]{2}/g,Ike))}function Rke(t){return decodeURIComponent(Array.from(atob(t),Pke).join(""))}function Poe(t){return Tke(JSON.stringify(t))}function Cke(t){return JSON.parse(Rke(t))}function Tb(t){return typeof t>"u"}function Nke(t){return t===null}function Toe(t){return Nke(t)||Tb(t)}function Dke(t){return Toe(t)?!1:!Tb(t.jsonrpc)&&!Tb(t.id)&&(!Tb(t.result)||!Tb(t.error))}function $ke(t){return Toe(t)?!1:typeof t=="number"&&Object.values(wO).includes(t)}function e2(t){if(!t)return!0;for(let e in t)if(Object.hasOwnProperty.call(t,e))return!1;return!0}var Vn={};function Mke(t,e){return Object.assign(Vn,e),t}var kke={"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"},Md=class extends Error{constructor(e,r){super(`Magic SDK Error: [${e}] ${r}`),this.code=e,this.rawMessage=r,this.__proto__=Error,Object.setPrototypeOf(this,Md.prototype)}},q1=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=$ke(r)?r:wO.InternalError,this.message=`Magic RPC Error: [${this.code}] ${this.rawMessage}`,this.data=(e==null?void 0:e.data)||void 0,Object.setPrototypeOf(this,q1.prototype)}},t_=class{constructor(t,e){this.code=t,this.rawMessage=e,this.message=`Magic SDK Warning: [${t}] ${e}`}log(){console.warn(this.message)}},Fk=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,Fk.prototype)}},b5=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 Lke(){return new Md($d.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.")}function Roe(){return new Md($d.ModalNotReady,"Modal is not ready.")}function Uke(){return new Md($d.MalformedResponse,"Response from the Magic iframe is malformed.")}function Bke(t){return new Md($d.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 Fke(t){let e=`Some extensions are incompatible with \`${Vn.sdkName}@${Vn.version}\`:`;return t.filter(r=>typeof r.compat<"u"&&r.compat!==null).forEach(r=>{let n=r.compat[Vn.sdkName];typeof n=="string"?e+=`
164
+ - Extension \`${r.name}\` supports version(s) \`${n}\``:n||(e+=`
165
+ - Extension \`${r.name}\` does not support ${Vn.platform} environments.`)}),new Md($d.IncompatibleExtensions,e)}function jke(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 Md($d.InvalidArgument,`Invalid ${e(t.argument)} argument given to \`${t.procedure}\`.
166
+ Expected: \`${t.expected}\`
167
+ Received: \`${t.received}\``)}function qke(){return new t_(wm.DuplicateIframe,"Duplicate iframes found.")}function Hke(){return new t_(wm.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 zke(){return new t_(wm.ReactNativeEndpointConfiguration,`CUSTOM DOMAINS ARE NOT SUPPORTED WHEN USING MAGIC SDK WITH REACT NATIVE! The \`endpoint\` parameter SHOULD NOT be provided. The Magic \`<iframe>\` is automatically wrapped by a WebView pointed at \`${Vn.defaultEndpoint}\`. Changing this default behavior will lead to unexpected results and potentially security-threatening bugs.`)}function Rg(t){let{method:e,removalVersions:r,useInstead:n}=t,i=r[Vn.sdkName],a=n?` Use \`${n}\` instead.`:"",o=`\`${e}\` will be removed from \`${Vn.sdkName}\` in version \`${i}\`.${a}`;return new t_(wm.DeprecationNotice,o)}function*Vke(){let t=0;for(;;)t<Number.MAX_SAFE_INTEGER?yield++t:t=0}var Gke=Vke();function Coe(){return Gke.next().value}var Noe=Symbol("Payload pre-processed by Magic SDK");function Doe(t){return Object.defineProperty(t,Noe,{value:!0,enumerable:!1}),t}function Wke(t){return!!t[Noe]}function t2(t){var e,r,n;return Wke(t)||(t.jsonrpc=(e=t.jsonrpc)!=null?e:"2.0",t.id=Coe(),t.method=(r=t.method)!=null?r:"noop",t.params=(n=t.params)!=null?n:[],Doe(t)),t}function an(t,e=[]){return Doe({params:e,method:t,jsonrpc:"2.0",id:Coe()})}var jk=class{constructor(t){t instanceof jk?(this._jsonrpc=t.payload.jsonrpc,this._id=t.payload.id,this._result=t.payload.result,this._error=t.payload.error):Dke(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}}},Kke=jMe(qMe()),Yke=class extends Kke.default{};function $oe(){let t=new Yke;return{emitter:t,createChainingEmitterMethod:(e,r)=>(...n)=>(t[e].apply(t,n),r),createBoundEmitterMethod:e=>(...r)=>t[e].apply(t,r)}}var Moe=Symbol("isPromiEvent");function koe(t){return!!t[Moe]}function qk(t){let e=Loe(t),{createBoundEmitterMethod:r,createChainingEmitterMethod:n}=$oe(),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,{[Moe]:!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 Loe(t){return new Promise((e,r)=>{let n=t(e,r);Promise.resolve(n).catch(r)})}var Fp=class{constructor(t){this.sdk=t}get overlay(){return this.sdk.overlay}request(t){let e=this.overlay.post(F1.MAGIC_HANDLE_REQUEST,t2(t)),r=qk((i,a)=>{e.then(o=>{if(n(),o.hasError)a(new q1(o.payload.error));else if(o.hasResult)i(o.payload.result);else throw Uke()}).catch(o=>{n(),a(o)})}),n=this.overlay.on(kh.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 Qke(t,e){let[r]=t.split(".").map(Number);return r>=e}var Cg={"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"},Jke=class extends Fp{loginWithMagicLink(t){let e=Vn.sdkName==="@magic-sdk/react-native"||Vn.sdkName==="@magic-sdk/react-native-bare"||Vn.sdkName==="@magic-sdk/react-native-expo";if(e&&Qke(Vn.version,19))throw new Error("loginWithMagicLink() is deprecated for this package, please utlize a passcode method like loginWithSMS or loginWithEmailOTP instead.");e&&Rg({method:"auth.loginWithMagicLink()",removalVersions:Cg,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(ZA.Retry,()=>{this.createIntermediaryEvent(ZA.Retry,a.id)()}),!r&&o&&(o.on(rg.VerifyEmailOtp,s=>{this.createIntermediaryEvent(rg.VerifyEmailOtp,a.id)(s)}),o.on(rg.Cancel,()=>{this.createIntermediaryEvent(rg.Cancel,a.id)()})),o}loginWithCredential(t){let e=t??"";if(!t&&Vn.platform==="web"){e=window.location.search;let n=window.location.origin+window.location.pathname;window.history.replaceState(null,"",n)}let r=an(this.sdk.testMode?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)}},Uoe={};BMe(Uoe,{clear:()=>Xke,getItem:()=>ko,iterate:()=>Boe,key:()=>eLe,keys:()=>tLe,length:()=>Zke,removeItem:()=>EO,setItem:()=>kl});var ME;function kd(t){return(...e)=>Ni(this,null,function*(){return ME||(ME=yield Vn.configureStorage()),yield ME.ready(),ME[t](...e)})}var ko=kd("getItem"),kl=kd("setItem"),EO=kd("removeItem"),Xke=kd("clear"),Zke=kd("length"),eLe=kd("key"),tLe=kd("keys"),Boe=kd("iterate");function rLe(){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 Foe="STORE_KEY_PRIVATE_KEY",w5="STORE_KEY_PUBLIC_JWK",joe="ECDSA",nLe="P-256",iLe={name:joe,namedCurve:nLe};function xO(){let t=typeof window<"u"&&!!window.crypto,e=t&&!!window.crypto.subtle;return t&&e}function aLe(){return Ni(this,null,function*(){let t=yield oLe();if(!t){console.info("unable to create public key or webcrypto is unsupported");return}let{subtle:e}=window.crypto,r=yield ko(Foe);if(!r||!e){console.info("unable to find private key or webcrypto unsupported");return}let n={iat:Math.floor(new Date().getTime()/1e3),jti:rLe()},i={typ:"dpop+jwt",alg:"ES256",jwk:t},a={protected:xK(JSON.stringify(i)),claims:xK(JSON.stringify(n))},o=cLe(`${a.protected}.${a.claims}`),s={name:joe,hash:{name:"SHA-256"}},c=lLe(new Uint8Array(yield e.sign(s,r,o)));return`${a.protected}.${a.claims}.${c}`})}function oLe(){return Ni(this,null,function*(){if(!xO()){console.info("webcrypto is not supported");return}return(yield ko(w5))||(yield sLe()),ko(w5)})}function sLe(){return Ni(this,null,function*(){let{subtle:t}=window.crypto,e=yield t.generateKey(iLe,!1,["sign"]),r=yield t.exportKey("jwk",e.publicKey);yield kl(Foe,e.privateKey),yield kl(w5,r)})}function xK(t){return qoe(uLe(t))}function cLe(t){return new TextEncoder().encode(t)}function qoe(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+/g,"")}function uLe(t){return encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,r)=>String.fromCharCode(parseInt(r,16)))}function lLe(t){let e="";return t.forEach(r=>{e+=String.fromCharCode(r)}),qoe(e)}var Hk="ds",zk="ek",Vk="iv",Gk="AES-GCM",fLe=256;function Wk(){return Ni(this,null,function*(){let t=[];yield Boe((e,r,n)=>{r.startsWith(`${Hk}_`)&&t.push(r)});for(let e of t)yield EO(e)})}function Hoe(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 zoe(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 dLe(){return Ni(this,null,function*(){if(!xO()){console.info("webcrypto is not supported");return}let{crypto:t}=window;return(yield ko(Vk))||t.getRandomValues(new Uint8Array(12))})}function hLe(){return Ni(this,null,function*(){if(!xO()){console.info("webcrypto is not supported");return}let{subtle:t}=window.crypto;return(yield ko(zk))||(yield t.generateKey({name:Gk,length:fLe},!1,["encrypt","decrypt"]))})}function pLe(t,e){return Ni(this,null,function*(){let r=yield dLe(),n=yield hLe();if(!r||!n||!t)return;let i=zoe(t),{subtle:a}=window.crypto,o=yield a.encrypt({name:Gk,iv:r},n,i),s=Hoe(o);yield kl(`${Hk}_${e}`,s),yield kl(zk,n),yield kl(Vk,r)})}function gLe(t){return Ni(this,null,function*(){let e=yield ko(`${Hk}_${t}`),r=yield ko(Vk),n=yield ko(zk);if(!r||!e||!n||!xO())return;let{subtle:i}=window.crypto,a=yield i.decrypt({name:Gk,iv:r},n,zoe(e));return Hoe(a)})}var yLe=class extends Fp{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 Ni(this,null,function*(){let e=yield ko(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(){EO(this.localForageKey),Wk();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(){Rg({method:"user.getMetadata()",removalVersions:Cg,useInstead:"user.getInfo()"}).log();let e=an(this.sdk.testMode?vr.GetMetadataTestMode:vr.GetMetadata);return this.request(e)}updateEmail(e){Rg({method:"user.updateEmail()",removalVersions:Cg,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 r2(t,e){return e?new URL(t,e):new URL(t)}var mLe=class extends Fp{constructor(){super(...arguments),this.localForageKey="mc_active_wallet"}connectWithUI(){let e=qk((r,n)=>Ni(this,null,function*(){try{if(this.isMetaMaskBrowser()&&(yield this.isWalletEnabled(xs.MetaMask))){let c=yield this.autoConnectIfWalletBrowser(xs.MetaMask);r(c);return}if(this.isCoinbaseWalletBrowser()&&(yield this.isWalletEnabled(xs.CoinbaseWallet))){let c=yield this.autoConnectIfWalletBrowser(xs.CoinbaseWallet);r(c);return}let i=this.getUserEnv(),a=an(vr.Login,[i]),o=this.request(a);o.on(Zb.WalletSelected,c=>this.handleWalletSelected(Ooe(Uk({},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 Ni(this,null,function*(){Rg({method:"wallet.getInfo()",removalVersions:Cg,useInstead:"user.getInfo()"}).log();let e=yield ko(this.localForageKey),r=an(vr.GetInfo,[{walletType:e}]);return this.request(r)})}disconnect(){Rg({method:"wallet.disconnect()",removalVersions:Cg,useInstead:"user.logout()"}).log(),EO(this.localForageKey),Wk();let e=an(vr.Disconnect);return this.request(e)}requestUserInfoWithUI(e){Rg({method:"wallet.requestUserInfoWithUI()",removalVersions:Cg,useInstead:"user.requestUserInfoWithUI()"}).log();let r=an(vr.RequestUserInfoWithUI,e?[e]:[]);return this.request(r)}getProvider(){return Ni(this,null,function*(){switch(yield ko(this.localForageKey)){case xs.MetaMask:return this.getMetaMaskProvider();case xs.CoinbaseWallet:return this.getCoinbaseProvider();default:return this.sdk.rpcProvider}})}isMetaMaskInstalled(){var e,r,n;return((e=window.ethereum)==null?void 0:e.isMetaMask)||!!((n=(r=window.ethereum)==null?void 0:r.providers)!=null&&n.find(i=>i==null?void 0:i.isMetaMask))}isMetaMaskBrowser(){return this.isMobile()&&this.isMetaMaskInstalled()}getMetaMaskProvider(){var e,r;return((r=(e=window.ethereum)==null?void 0:e.providers)==null?void 0:r.find(n=>n==null?void 0:n.isMetaMask))||window.ethereum}connectToMetaMask(){if(this.isMobile()&&!this.isMetaMaskInstalled()){let e=`https://metamask.app.link/dapp/${window.location.href.replace(/(^\w+:|^)\/\//,"")}`;window.location.href=e}return this.getMetaMaskProvider().request({method:"eth_requestAccounts"})}isCoinbaseWalletInstalled(){var e,r,n;return((e=window.ethereum)==null?void 0:e.isCoinbaseWallet)||!!((n=(r=window.ethereum)==null?void 0:r.providers)!=null&&n.find(i=>i==null?void 0:i.isCoinbaseWallet))}isCoinbaseWalletBrowser(){var e;return!!((e=window.ethereum)!=null&&e.isCoinbaseBrowser)}getCoinbaseProvider(){var e,r;return((r=(e=window.ethereum)==null?void 0:e.providers)==null?void 0:r.find(n=>n==null?void 0:n.isCoinbaseWallet))||window.ethereum}connectToCoinbaseWallet(){if(this.isMobile()&&!this.isCoinbaseWalletBrowser()){let e=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(window.location.href)}`;window.location.href=e}return this.getCoinbaseProvider().request({method:"eth_requestAccounts"})}isMobile(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Silk|Opera Mini/i.test(navigator.userAgent)}getUserEnv(){return{env:{isMetaMaskInstalled:this.isMetaMaskInstalled(),isCoinbaseWalletInstalled:this.isCoinbaseWalletInstalled()}}}connectToThirdPartyWallet(e){switch(e){case xs.MetaMask:return this.connectToMetaMask();case xs.CoinbaseWallet:return this.connectToCoinbaseWallet();default:throw new Error(`Invalid provider: ${e}. Must be one of "metamask" or "coinbase_wallet".`)}}isWalletEnabled(e){let r=an("mc_is_wallet_enabled",[{wallet:e}]);return this.request(r)}handleWalletSelected(e){return Ni(this,null,function*(){try{let r=yield this.connectToThirdPartyWallet(e.wallet);yield kl(this.localForageKey,e.wallet),this.createIntermediaryEvent(Zb.WalletConnected,e.payloadId)(r)}catch(r){console.error(r),this.createIntermediaryEvent(Zb.WalletRejected,e.payloadId)()}})}autoConnectIfWalletBrowser(e){return Ni(this,null,function*(){let r;e===xs.MetaMask&&(r=yield this.getMetaMaskProvider().request({method:"eth_requestAccounts"})),e===xs.CoinbaseWallet&&(r=yield this.getCoinbaseProvider().request({method:"eth_requestAccounts"})),yield kl(this.localForageKey,e);let n=an(vr.AutoConnect,[{wallet:e,address:r}]);return this.request(n)})}},{createBoundEmitterMethod:kE,createChainingEmitterMethod:O0}=$oe(),vLe=class extends Fp{constructor(){super(...arguments),this.isMagic=!0,this.on=O0("on",this),this.once=O0("once",this),this.addListener=O0("addListener",this),this.off=O0("off",this),this.removeListener=O0("removeListener",this),this.removeAllListeners=O0("removeAllListeners",this),this.emit=kE("emit"),this.eventNames=kE("eventNames"),this.listeners=kE("listeners"),this.listenerCount=kE("listenerCount")}sendAsync(t,e){if(!e)throw jke({procedure:"Magic.rpcProvider.sendAsync",argument:1,expected:"function",received:e===null?"null":typeof e});if(Array.isArray(t))this.overlay.post(F1.MAGIC_HANDLE_REQUEST,t.map(r=>{let n=t2(r);return this.prefixPayloadMethodForTestMode(n),n})).then(r=>{e(null,r.map(n=>Ooe(Uk({},n.payload),{error:n.hasError?new q1(n.payload.error):null})))});else{let r=t2(t);this.prefixPayloadMethodForTestMode(r),this.overlay.post(F1.MAGIC_HANDLE_REQUEST,r).then(n=>{e(n.hasError?new q1(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=Hke();return r.log(),new jk(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}`)}},AK=["request","overlay","sdk"];function bLe(t){let e=Object.getPrototypeOf(t),r=[e];for(;e!==Fp.prototype;)e=Object.getPrototypeOf(e),r.push(e);return r}var Voe=class extends Fp{constructor(){super(void 0),this.__sdk_access_field_descriptors__=new Map,this.__is_initialized__=!1,this.utils={createPromiEvent:qk,isPromiEvent:koe,encodeJSON:Poe,decodeJSON:Cke,createJsonRpcRequestPayload:an,standardizeJsonRpcRequestPayload:t2,storage:Uoe};let t=[this,...bLe(this)];AK.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 Bke(e)}}))})}init(t){this.__is_initialized__||(AK.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 b5(this,"DEPRECATION_NOTICE",a)}createWarning(t,e){return new b5(this,t,e)}createError(t,e,r){return new Fk(this,t,e,r)}},wLe=class extends Voe{},cp=class extends Voe{};cp.Internal=wLe,cp.Anonymous="anonymous extension";var _Le=class extends Fp{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 SK(t){return t.compat&&t.compat[Vn.sdkName]!=null?typeof t.compat[Vn.sdkName]=="string"?Eke(Oke(Vn.version),t.compat[Vn.sdkName]):!!t.compat[Vn.sdkName]:!0}function ELe(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 xLe(t){var e;let r=(e=t==null?void 0:t.extensions)!=null?e:[],n={},i=[];if(Array.isArray(r)?r.forEach(a=>{SK(a)?(a.init(this),(a.name||a.name!==cp.Anonymous)&&(this[a.name]=a),a instanceof cp.Internal&&(e2(a.config)||(n[a.name]=a.config))):i.push(a)}):Object.keys(r).forEach(a=>{if(SK(r[a])){r[a].init(this);let o=r[a];this[a]=o,o instanceof cp.Internal&&(e2(o.config)||(n[r[a].name]=o.config))}else i.push(r[a])}),i.length)throw Fke(i);return n}var Mx=class{constructor(t,e){this.apiKey=t;var r;if(!t)throw Lke();Vn.platform==="react-native"&&(e!=null&&e.endpoint)&&zke().log();let{defaultEndpoint:n,version:i}=Vn;this.testMode=!!(e!=null&&e.testMode),this.endpoint=r2((r=e==null?void 0:e.endpoint)!=null?r:n).origin,this.auth=new Jke(this),this.user=new yLe(this),this.wallet=new mLe(this),this.nft=new _Le(this),this.rpcProvider=new vLe(this);let a=xLe.call(this,e);this.parameters=Poe(Uk({API_KEY:this.apiKey,DOMAIN_ORIGIN:window.location?window.location.origin:"",ETH_NETWORK:e==null?void 0:e.network,host:r2(this.endpoint).host,sdk:kke[Vn.sdkName],version:i,ext:e2(a)?void 0:a,locale:(e==null?void 0:e.locale)||"en_US"},Vn.bundleId?{bundleId:Vn.bundleId}:{})),this.networkHash=ELe(this.apiKey,e==null?void 0:e.network,e2(a)?void 0:a),e!=null&&e.deferPreload||this.preload()}get overlay(){if(!Mx.__overlays__.has(this.parameters)){let t=new Vn.ViewController(this.endpoint,this.parameters,this.networkHash);t.init(),Mx.__overlays__.set(this.parameters,t)}return Mx.__overlays__.get(this.parameters)}preload(){return Ni(this,null,function*(){yield this.overlay.checkIsReadyForRequest})}},Goe=Mx;Goe.__overlays__=new Map;function ALe(t,e){return e&&Array.isArray(t)?t.find(r=>r.id===e):t}function SLe(t,e){var r;let n=(r=e.data.response)==null?void 0:r.id,i=ALe(t,n);if(n&&i){let a=new jk(i).applyResult(e.data.response.result).applyError(e.data.response.error);return{id:n,response:a}}return{}}function OLe(t,e,r){return Ni(this,null,function*(){var n;let i=yield ko("rt"),a;if(Vn.platform==="web")try{a=(n=yield ko("jwt"))!=null?n:yield aLe()}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 gLe(r);return s&&(o.deviceShare=s),o})}function ILe(t){return Ni(this,null,function*(){!t.data.rt||(yield kl("rt",t.data.rt))})}var PLe=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 Ni(this,null,function*(){return Loe((r,n)=>Ni(this,null,function*(){if(!this.isConnectedToInternet){let u=Roe();n(u)}this.isReadyForRequest||(yield this.waitForReady());let i=[],a=Array.isArray(e)?e.map(u=>u.id):[],o=yield OLe(`${t}-${this.parameters}`,e,this.networkHash);yield this._post(o);let s=u=>f=>{var d;let{id:g,response:m}=SLe(e,f);if(ILe(f),((d=m==null?void 0:m.payload.error)==null?void 0:d.message)==="User denied account access.")Wk();else if(f.data.deviceShare){let{deviceShare:w}=f.data;pLe(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(kh.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(kh.MAGIC_OVERLAY_READY,()=>{this.isReadyForRequest=!0,t(),e()})})}listen(){this.on(kh.MAGIC_HIDE_OVERLAY,()=>{this.hideOverlay()}),this.on(kh.MAGIC_SHOW_OVERLAY,()=>{this.showOverlay()})}},TLe=Object.create,Woe=Object.defineProperty,RLe=Object.getOwnPropertyDescriptor,CLe=Object.getOwnPropertyNames,NLe=Object.getPrototypeOf,DLe=Object.prototype.hasOwnProperty,LE=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')}),Koe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),$Le=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of CLe(e))!DLe.call(t,i)&&i!==r&&Woe(t,i,{get:()=>e[i],enumerable:!(n=RLe(e,i))||n.enumerable});return t},Yoe=(t,e,r)=>(r=t!=null?TLe(NLe(t)):{},$Le(e||!t||!t.__esModule?Woe(r,"default",{value:t,enumerable:!0}):r,t)),kx=(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())}),MLe=Koe((t,e)=>{(function(r){if(typeof t=="object"&&typeof e<"u")e.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=r()}})(function(){return function r(n,i,a){function o(u,f){if(!i[u]){if(!n[u]){var d=typeof LE=="function"&&LE;if(!f&&d)return d(u,!0);if(s)return s(u,!0);var g=new Error("Cannot find module '"+u+"'");throw g.code="MODULE_NOT_FOUND",g}var m=i[u]={exports:{}};n[u][0].call(m.exports,function(w){var v=n[u][1][w];return o(v||w)},m,m.exports,r,n,i,a)}return i[u].exports}for(var s=typeof LE=="function"&&LE,c=0;c<a.length;c++)o(a[c]);return o}({1:[function(r,n,i){(function(a){var o=a.MutationObserver||a.WebKitMutationObserver,s;if(o){var c=0,u=new o(w),f=a.document.createTextNode("");u.observe(f,{characterData:!0}),s=function(){f.data=c=++c%2}}else if(!a.setImmediate&&typeof a.MessageChannel<"u"){var d=new a.MessageChannel;d.port1.onmessage=w,s=function(){d.port2.postMessage(0)}}else"document"in a&&"onreadystatechange"in a.document.createElement("script")?s=function(){var y=a.document.createElement("script");y.onreadystatechange=function(){w(),y.onreadystatechange=null,y.parentNode.removeChild(y),y=null},a.document.documentElement.appendChild(y)}:s=function(){setTimeout(w,0)};var g,m=[];function w(){g=!0;for(var y,_,b=m.length;b;){for(_=m,m=[],y=-1;++y<b;)_[y]();b=m.length}g=!1}n.exports=v;function v(y){m.push(y)===1&&!g&&s()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,n,i){var a=r(1);function o(){}var s={},c=["REJECTED"],u=["FULFILLED"],f=["PENDING"];n.exports=d;function d(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(Y,function(ne){I||(I=!0,s.reject(le,ne))});function Y(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(Xe){var dt=Oe.result;try{dt.createObjectStore(X.storeName),Xe.oldVersion<=1&&dt.createObjectStore(y)}catch(Qe){if(Qe.name==="ConstraintError")console.warn('The database "'+X.name+'" has been upgraded from version '+Xe.oldVersion+" to version "+Xe.newVersion+', but the storage "'+X.storeName+'" already exists.');else throw Qe}}),Oe.onerror=function(Xe){Xe.preventDefault(),Ee(Oe.error)},Oe.onsuccess=function(){var Xe=Oe.result;Xe.onversionchange=function(dt){dt.target.close()},re(Xe),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 Y(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 Xe=0;Xe<re.length;Xe++)re[Xe]._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 Xe(){return d.resolve()}for(var dt=0;dt<be.forages.length;dt++){var Qe=be.forages[dt];Qe!==me&&Oe.push(Qe._initReady().catch(Xe))}var Ge=be.forages.slice(0);return d.all(Oe).then(function(){return re.db=be.db,pe(re)}).then(function(pt){return re.db=pt,U(re,me._defaultConfig.version)?B(re):pt}).then(function(pt){re.db=be.db=pt,me._dbInfo=re;for(var Gt=0;Gt<Ge.length;Gt++){var Tr=Ge[Gt];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(Xe,dt){if(Xe)return Oe(Xe);try{var Qe=dt.objectStore(re._dbInfo.storeName),Ge=Qe.get(X);Ge.onsuccess=function(){var pt=Ge.result;pt===void 0&&(pt=null),F(pt)&&(pt=ne(pt)),be(pt)},Ge.onerror=function(){Oe(Ge.error)}}catch(pt){Oe(pt)}})}).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(Xe,dt){if(Xe)return Oe(Xe);try{var Qe=dt.objectStore(re._dbInfo.storeName),Ge=Qe.openCursor(),pt=1;Ge.onsuccess=function(){var Gt=Ge.result;if(Gt){var Tr=Gt.value;F(Tr)&&(Tr=ne(Tr));var Wr=X(Tr,Gt.key,pt++);Wr!==void 0?be(Wr):Gt.continue()}else be()},Ge.onerror=function(){Oe(Ge.error)}}catch(Gt){Oe(Gt)}})}).catch(Oe)});return g(Ee,me),Ee}function ge(X,me,re){var Ee=this;X=w(X);var be=new d(function(Oe,Xe){var dt;Ee.ready().then(function(){return dt=Ee._dbInfo,S.call(me)==="[object Blob]"?I(dt.db).then(function(Qe){return Qe?me:Y(me)}):me}).then(function(Qe){$(Ee._dbInfo,O,function(Ge,pt){if(Ge)return Xe(Ge);try{var Gt=pt.objectStore(Ee._dbInfo.storeName);Qe===null&&(Qe=void 0);var Tr=Gt.put(Qe,X);pt.oncomplete=function(){Qe===void 0&&(Qe=null),Oe(Qe)},pt.onabort=pt.onerror=function(){var Wr=Tr.error?Tr.error:Tr.transaction.error;Xe(Wr)}}catch(Wr){Xe(Wr)}})}).catch(Xe)});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(Xe,dt){if(Xe)return Oe(Xe);try{var Qe=dt.objectStore(re._dbInfo.storeName),Ge=Qe.delete(X);dt.oncomplete=function(){be()},dt.onerror=function(){Oe(Ge.error)},dt.onabort=function(){var pt=Ge.error?Ge.error:Ge.transaction.error;Oe(pt)}}catch(pt){Oe(pt)}})}).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,Xe){if(Oe)return be(Oe);try{var dt=Xe.objectStore(me._dbInfo.storeName),Qe=dt.clear();Xe.oncomplete=function(){Ee()},Xe.onabort=Xe.onerror=function(){var Ge=Qe.error?Qe.error:Qe.transaction.error;be(Ge)}}catch(Ge){be(Ge)}})}).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,Xe){if(Oe)return be(Oe);try{var dt=Xe.objectStore(me._dbInfo.storeName),Qe=dt.count();Qe.onsuccess=function(){Ee(Qe.result)},Qe.onerror=function(){be(Qe.error)}}catch(Ge){be(Ge)}})}).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(Xe,dt){if(Xe)return Oe(Xe);try{var Qe=dt.objectStore(re._dbInfo.storeName),Ge=!1,pt=Qe.openKeyCursor();pt.onsuccess=function(){var Gt=pt.result;if(!Gt){be(null);return}X===0||Ge?be(Gt.key):(Ge=!0,Gt.advance(X))},pt.onerror=function(){Oe(pt.error)}}catch(Gt){Oe(Gt)}})}).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,Xe){if(Oe)return be(Oe);try{var dt=Xe.objectStore(me._dbInfo.storeName),Qe=dt.openKeyCursor(),Ge=[];Qe.onsuccess=function(){var pt=Qe.result;if(!pt){Ee(Ge);return}Ge.push(pt.key),pt.continue()},Qe.onerror=function(){be(Qe.error)}}catch(pt){be(pt)}})}).catch(be)});return g(re,X),re}function Ve(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,Xe=Oe?d.resolve(Ee._dbInfo.db):pe(X).then(function(dt){var Qe=b[X.name],Ge=Qe.forages;Qe.db=dt;for(var pt=0;pt<Ge.length;pt++)Ge[pt]._dbInfo.db=dt;return dt});X.storeName?be=Xe.then(function(dt){if(dt.objectStoreNames.contains(X.storeName)){var Qe=dt.version+1;C(X);var Ge=b[X.name],pt=Ge.forages;dt.close();for(var Gt=0;Gt<pt.length;Gt++){var Tr=pt[Gt];Tr._dbInfo.db=null,Tr._dbInfo.version=Qe}var Wr=new d(function(jr,_n){var qr=c.open(X.name,Qe);qr.onerror=function(P){var D=qr.result;D.close(),_n(P)},qr.onupgradeneeded=function(){var P=qr.result;P.deleteObjectStore(X.storeName)},qr.onsuccess=function(){var P=qr.result;P.close(),jr(P)}});return Wr.then(function(jr){Ge.db=jr;for(var _n=0;_n<pt.length;_n++){var qr=pt[_n];qr._dbInfo.db=jr,L(qr._dbInfo)}}).catch(function(jr){throw(q(X,jr)||d.resolve()).catch(function(){}),jr})}}):be=Xe.then(function(dt){C(X);var Qe=b[X.name],Ge=Qe.forages;dt.close();for(var pt=0;pt<Ge.length;pt++){var Gt=Ge[pt];Gt._dbInfo.db=null}var Tr=new d(function(Wr,jr){var _n=c.deleteDatabase(X.name);_n.onerror=function(){var qr=_n.result;qr&&qr.close(),jr(_n.error)},_n.onblocked=function(){console.warn('dropInstance blocked for database "'+X.name+'" until all open connections are closed')},_n.onsuccess=function(){var qr=_n.result;qr&&qr.close(),Wr(qr)}});return Tr.then(function(Wr){Qe.db=Wr;for(var jr=0;jr<Ge.length;jr++){var _n=Ge[jr];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:Ve};function vt(){return typeof openDatabase=="function"}var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yt="~~local_forage_type~",Lt=/^~~local_forage_type~([^~]+)~/,Yt="__lfsc__:",wr=Yt.length,Rt="arbf",Pt="blob",kt="si08",Nt="ui08",Kt="uic8",Ut="si16",Vt="si32",$t="ur16",Dt="ui32",qt="fl32",Mt="fl64",cr=wr+Rt.length,tr=Object.prototype.toString;function ir(X){var me=X.length*.75,re=X.length,Ee,be=0,Oe,Xe,dt,Qe;X[X.length-1]==="="&&(me--,X[X.length-2]==="="&&me--);var Ge=new ArrayBuffer(me),pt=new Uint8Array(Ge);for(Ee=0;Ee<re;Ee+=4)Oe=bt.indexOf(X[Ee]),Xe=bt.indexOf(X[Ee+1]),dt=bt.indexOf(X[Ee+2]),Qe=bt.indexOf(X[Ee+3]),pt[be++]=Oe<<2|Xe>>4,pt[be++]=(Xe&15)<<4|dt>>2,pt[be++]=(dt&3)<<6|Qe&63;return Ge}function nr(X){var me=new Uint8Array(X),re="",Ee;for(Ee=0;Ee<me.length;Ee+=3)re+=bt[me[Ee]>>2],re+=bt[(me[Ee]&3)<<4|me[Ee+1]>>4],re+=bt[(me[Ee+1]&15)<<2|me[Ee+2]>>6],re+=bt[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+=Vt:re==="[object Uint32Array]"?be+=Dt:re==="[object Float32Array]"?be+=qt:re==="[object Float64Array]"?be+=Mt:me(new Error("Failed to get type for BinaryArray"))),me(be+nr(Ee))}else if(re==="[object Blob]"){var Oe=new FileReader;Oe.onload=function(){var Xe=yt+X.type+"~"+nr(this.result);me(Yt+Pt+Xe)},Oe.readAsArrayBuffer(X)}else try{me(JSON.stringify(X))}catch(Xe){console.error("Couldn't convert value into a JSON string: ",X),me(null,Xe)}}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 Vt: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 oi(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,Xe){try{re.db=openDatabase(re.name,String(re.version),re.description,re.size)}catch(dt){return Xe(dt)}re.db.transaction(function(dt){oi(dt,re,function(){me._dbInfo=re,Oe()},function(Qe,Ge){Xe(Ge)})},Xe)});return re.serializer=Yr,be}function $n(X,me,re,Ee,be,Oe){X.executeSql(re,Ee,be,function(Xe,dt){dt.code===dt.SYNTAX_ERR?Xe.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[me.storeName],function(Qe,Ge){Ge.rows.length?Oe(Qe,dt):oi(Qe,me,function(){Qe.executeSql(re,Ee,be,Oe)},Oe)},Oe):Oe(Xe,dt)},Oe)}function Yn(X,me){var re=this;X=w(X);var Ee=new d(function(be,Oe){re.ready().then(function(){var Xe=re._dbInfo;Xe.db.transaction(function(dt){$n(dt,Xe,"SELECT * FROM "+Xe.storeName+" WHERE key = ? LIMIT 1",[X],function(Qe,Ge){var pt=Ge.rows.length?Ge.rows.item(0).value:null;pt&&(pt=Xe.serializer.deserialize(pt)),be(pt)},function(Qe,Ge){Oe(Ge)})})}).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 Xe=re._dbInfo;Xe.db.transaction(function(dt){$n(dt,Xe,"SELECT * FROM "+Xe.storeName,[],function(Qe,Ge){for(var pt=Ge.rows,Gt=pt.length,Tr=0;Tr<Gt;Tr++){var Wr=pt.item(Tr),jr=Wr.value;if(jr&&(jr=Xe.serializer.deserialize(jr)),jr=X(jr,Wr.key,Tr+1),jr!==void 0){be(jr);return}}be()},function(Qe,Ge){Oe(Ge)})})}).catch(Oe)});return g(Ee,me),Ee}function $r(X,me,re,Ee){var be=this;X=w(X);var Oe=new d(function(Xe,dt){be.ready().then(function(){me===void 0&&(me=null);var Qe=me,Ge=be._dbInfo;Ge.serializer.serialize(me,function(pt,Gt){Gt?dt(Gt):Ge.db.transaction(function(Tr){$n(Tr,Ge,"INSERT OR REPLACE INTO "+Ge.storeName+" (key, value) VALUES (?, ?)",[X,pt],function(){Xe(Qe)},function(Wr,jr){dt(jr)})},function(Tr){if(Tr.code===Tr.QUOTA_ERR){if(Ee>0){Xe($r.apply(be,[X,Qe,re,Ee-1]));return}dt(Tr)}})})}).catch(dt)});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 Xe=re._dbInfo;Xe.db.transaction(function(dt){$n(dt,Xe,"DELETE FROM "+Xe.storeName+" WHERE key = ?",[X],function(){be()},function(Qe,Ge){Oe(Ge)})})}).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(Xe){$n(Xe,Oe,"DELETE FROM "+Oe.storeName,[],function(){Ee()},function(dt,Qe){be(Qe)})})}).catch(be)});return g(re,X),re}function ve(X){var me=this,re=new d(function(Ee,be){me.ready().then(function(){var Oe=me._dbInfo;Oe.db.transaction(function(Xe){$n(Xe,Oe,"SELECT COUNT(key) as c FROM "+Oe.storeName,[],function(dt,Qe){var Ge=Qe.rows.item(0).c;Ee(Ge)},function(dt,Qe){be(Qe)})})}).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 Xe=re._dbInfo;Xe.db.transaction(function(dt){$n(dt,Xe,"SELECT key FROM "+Xe.storeName+" WHERE id = ? LIMIT 1",[X+1],function(Qe,Ge){var pt=Ge.rows.length?Ge.rows.item(0).key:null;be(pt)},function(Qe,Ge){Oe(Ge)})})}).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(Xe){$n(Xe,Oe,"SELECT key FROM "+Oe.storeName,[],function(dt,Qe){for(var Ge=[],pt=0;pt<Qe.rows.length;pt++)Ge.push(Qe.rows.item(pt).key);Ee(Ge)},function(dt,Qe){be(Qe)})})}).catch(be)});return g(re,X),re}function Ze(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 Xe=[],dt=0;dt<Oe.rows.length;dt++)Xe.push(Oe.rows.item(dt).name);me({db:X,storeNames:Xe})},function(be,Oe){re(Oe)})},function(Ee){re(Ee)})})}function ct(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 Xe;X.name===re.name?Xe=Ee._dbInfo.db:Xe=openDatabase(X.name,"","",0),X.storeName?Oe({db:Xe,storeNames:[X.storeName]}):Oe(Ze(Xe))}).then(function(Oe){return new d(function(Xe,dt){Oe.db.transaction(function(Qe){function Ge(Wr){return new d(function(jr,_n){Qe.executeSql("DROP TABLE IF EXISTS "+Wr,[],function(){jr()},function(qr,P){_n(P)})})}for(var pt=[],Gt=0,Tr=Oe.storeNames.length;Gt<Tr;Gt++)pt.push(Ge(Oe.storeNames[Gt]));d.all(pt).then(function(){Xe()}).catch(function(Wr){dt(Wr)})},function(Qe){dt(Qe)})})}):be=d.reject("Invalid arguments"),g(be,me),be}var ft={_driver:"webSQLStorage",_initStorage:Dn,_support:vt(),iterate:xr,getItem:Yn,setItem:_r,removeItem:_e,clear:ee,length:ve,key:Re,keys:He,dropInstance:ct};function Et(){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 _t(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,Xe=Oe.length,dt=localStorage.length,Qe=1,Ge=0;Ge<dt;Ge++){var pt=localStorage.key(Ge);if(pt.indexOf(Oe)===0){var Gt=localStorage.getItem(pt);if(Gt&&(Gt=be.serializer.deserialize(Gt)),Gt=X(Gt,pt.substring(Xe),Qe++),Gt!==void 0)return Gt}}});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=[],Xe=0;Xe<be;Xe++){var dt=localStorage.key(Xe);dt.indexOf(Ee.keyPrefix)===0&&Oe.push(dt.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(Xe,dt){var Qe=Ee._dbInfo;Qe.serializer.serialize(me,function(Ge,pt){if(pt)dt(pt);else try{localStorage.setItem(Qe.keyPrefix+X,Ge),Xe(Oe)}catch(Gt){(Gt.name==="QuotaExceededError"||Gt.name==="NS_ERROR_DOM_QUOTA_REACHED")&&dt(Gt),dt(Gt)}})})});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 Xe=localStorage.length-1;Xe>=0;Xe--){var dt=localStorage.key(Xe);dt.indexOf(Oe)===0&&localStorage.removeItem(dt)}}):be=d.reject("Invalid arguments"),g(be,me),be}var sr={_driver:"localStorageWrapper",_initStorage:Me,_support:Et(),iterate:Ot,getItem:_t,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]"},ei={},Oi={},ti={INDEXEDDB:tt,WEBSQL:ft,LOCALSTORAGE:sr},Ii=[ti.INDEXEDDB._driver,ti.WEBSQL._driver,ti.LOCALSTORAGE._driver],Pi=["dropInstance"],si=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Pi),jn={description:"",driver:Ii.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function na(X,me){X[me]=function(){var re=arguments;return X.ready().then(function(){return X[me].apply(X,re)})}}function Mi(){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 Ea=function(){function X(me){o(this,X);for(var re in ti)if(ti.hasOwnProperty(re)){var Ee=ti[re],be=Ee._driver;this[re]=be,ei[be]||this.defineDriver(Ee)}this._defaultConfig=Mi({},jn),this._config=Mi({},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,Xe){try{var dt=me._driver,Qe=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!me._driver){Xe(Qe);return}for(var Ge=si.concat("_initStorage"),pt=0,Gt=Ge.length;pt<Gt;pt++){var Tr=Ge[pt],Wr=!gn(Pi,Tr);if((Wr||me[Tr])&&typeof me[Tr]!="function"){Xe(Qe);return}}var jr=function(){for(var qr=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=Pi.length;P<D;P++){var W=Pi[P];me[W]||(me[W]=qr(W))}};jr();var _n=function(qr){ei[dt]&&console.info("Redefining LocalForage driver: "+dt),ei[dt]=me,Oi[dt]=qr,Oe()};"_support"in me?me._support&&typeof me._support=="function"?me._support().then(_n,Xe):_n(!!me._support):_n(!0)}catch(qr){Xe(qr)}});return m(be,re,Ee),be},X.prototype.driver=function(){return this._driver||null},X.prototype.getDriver=function(me,re,Ee){var be=ei[me]?d.resolve(ei[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 Xe(){be._config.driver=be.driver()}function dt(pt){return be._extend(pt),Xe(),be._ready=be._initStorage(be._config),be._ready}function Qe(pt){return function(){var Gt=0;function Tr(){for(;Gt<pt.length;){var Wr=pt[Gt];return Gt++,be._dbInfo=null,be._ready=null,be.getDriver(Wr).then(dt).catch(Tr)}Xe();var jr=new Error("No available storage method found.");return be._driverSet=d.reject(jr),be._driverSet}return Tr()}}var Ge=this._driverSet!==null?this._driverSet.catch(function(){return d.resolve()}):d.resolve();return this._driverSet=Ge.then(function(){var pt=Oe[0];return be._dbInfo=null,be._ready=null,be.getDriver(pt).then(function(Gt){be._driver=Gt._driver,Xe(),be._wrapLibraryMethodsWithReady(),be._initDriver=Qe(Oe)})}).catch(function(){Xe();var pt=new Error("No available storage method found.");return be._driverSet=d.reject(pt),be._driverSet}),m(this._driverSet,re,Ee),this._driverSet},X.prototype.supports=function(me){return!!Oi[me]},X.prototype._extend=function(me){Mi(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=si.length;me<re;me++)na(this,si[me])},X.prototype.createInstance=function(me){return new X(me)},X}(),ss=new Ea;n.exports=ss},{3:3}]},{},[4])(4)})}),kLe=Koe((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 Y(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=Y,Object.defineProperty(r,"__esModule",{value:!0})})}),MN=Yoe(MLe()),OK=Yoe(kLe()),LLe={display:"none",position:"fixed",top:"0",right:"0",width:"100%",height:"100%",borderRadius:"0",border:"none",zIndex:"2147483647"};function ULe(t){for(let[e,r]of Object.entries(LLe))t.style[e]=r}function BLe(t){return!![].slice.call(document.querySelectorAll(".magic-iframe")).find(r=>r.src.includes(t))}var FLe=class extends PLe{constructor(){super(...arguments),this.activeElement=null}init(){this.test="hello",this.iframe=new Promise(t=>{let e=()=>{if(BLe(encodeURIComponent(this.parameters)))qke().log();else{let r=document.createElement("iframe");r.classList.add("magic-iframe"),r.dataset.magicIframeLabel=r2(this.endpoint).host,r.title="Secure Modal",r.src=r2(`/send?params=${encodeURIComponent(this.parameters)}`,this.endpoint).href,ULe(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 kx(this,null,function*(){let t=yield this.iframe;t.style.display="block",this.activeElement=document.activeElement,t.focus()})}hideOverlay(){return kx(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 kx(this,null,function*(){let e=yield this.iframe;if(e&&e.contentWindow)e.contentWindow.postMessage(t,this.endpoint);else throw Roe()})}},jLe=Mke(Goe,{platform:"web",sdkName:"magic-sdk",version:"21.4.1",defaultEndpoint:"https://auth.magic.link/",ViewController:FLe,configureStorage:()=>kx(void 0,null,function*(){let t=MN.default.createInstance({name:"MagicAuthLocalStorageDB",storeName:"MagicAuthLocalStorage"});return yield t.defineDriver(OK),yield t.setDriver([MN.default.INDEXEDDB,MN.default.LOCALSTORAGE,OK._driver]),t})});const Kk=Object.freeze(Object.defineProperty({__proto__:null,DeepLinkPage:voe,DeviceVerificationEventEmit:ZA,DeviceVerificationEventOnReceived:Eoe,EthChainType:xoe,Events:Zb,Extension:cp,ExtensionError:Fk,ExtensionWarning:b5,LoginWithEmailOTPEventEmit:rg,LoginWithEmailOTPEventOnReceived:_oe,LoginWithMagicLinkEventEmit:boe,LoginWithMagicLinkEventOnReceived:woe,Magic:jLe,MagicIncomingWindowMessage:kh,MagicOutgoingWindowMessage:F1,MagicPayloadMethod:vr,RPCError:q1,RPCErrorCode:wO,RecoveryMethodType:Aoe,SDKError:Md,SDKErrorCode:$d,SDKWarning:t_,SDKWarningCode:wm,Wallets:xs,isPromiEvent:koe},Symbol.toStringTag,{value:"Module"})),qLe=fo(Kk);var Qoe={exports:{}},kN={exports:{}},IK;function Joe(){return IK||(IK=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})}(kN)),kN.exports}(function(t,e){(function(r,n){t.exports=n(Joe())})(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),Y=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),ne=p+Y+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})})(Qoe);var HLe=Qoe.exports;const zLe=Bc(HLe);var Xoe={exports:{}};(function(t,e){(function(r,n){t.exports=n(Joe())})(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})})(Xoe);var VLe=Xoe.exports;const GLe=Bc(VLe);var r_=(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())}),Zoe=(t=>(t.ParseRedirectResult="magic_oauth_parse_redirect_result",t))(Zoe||{}),ese=(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))(ese||{}),PK="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",tse=typeof window<"u"&&!!window.crypto,WLe=tse&&!!window.crypto.subtle;function KLe(t){return Array.from(t).map(e=>PK[e%PK.length]).join("")}function TK(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(GLe.stringify(t))}function YLe(t){return r_(this,null,function*(){if(WLe){let e=new TextEncoder().encode(t);return crypto.subtle.digest("SHA-256",e).then(TK)}return TK(zLe(t))})}function RK(t){let e=new Uint8Array(t);if(tse)window.crypto.getRandomValues(e);else for(let r=0;r<t;r+=1)e[r]=Math.floor(Math.random()*Math.floor(255));return KLe(e)}function QLe(){return r_(this,null,function*(){let t=RK(128),e=RK(128),r=yield YLe(e);return{verifier:e,challenge:r,state:t}})}var JLe=class extends cp.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=>r_(this,null,function*(){let{provider:r,query:n}=yield XLe.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),ZLe.call(this,t)}},n2="oauth_redirect_metadata";function XLe(t){return r_(this,null,function*(){yield this.utils.storage.removeItem(n2);let{provider:e,redirectURI:r,scope:n,loginHint:i}=t,{verifier:a,challenge:o,state:s}=yield QLe(),c=JSON.stringify({verifier:a,state:s});return yield this.utils.storage.setItem(n2,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 ZLe(t){return this.utils.createPromiEvent((e,r)=>r_(this,null,function*(){var n;let i=yield this.utils.storage.getItem(n2),{verifier:a,state:o}=JSON.parse(i);this.utils.storage.removeItem(n2);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 Yk=Object.freeze(Object.defineProperty({__proto__:null,OAuthErrorCode:ese,OAuthExtension:JLe,OAuthPayloadMethods:Zoe},Symbol.toStringTag,{value:"Module"})),e9e=fo(Yk);var t9e=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]}),r9e=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CK=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)&&t9e(e,t,r);return r9e(e,t),e};Object.defineProperty(bO,"__esModule",{value:!0});bO.MagicConnector=void 0;const NK=ql,DK=Vs,n9e=VS;class i9e extends n9e.AbstractConnector{constructor(e){super({supportedChainIds:DK.getConfiguration()[NK.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(()=>CK(qLe)),{OAuthExtension:i}=await Promise.resolve().then(()=>CK(e9e)),a=DK.getConfiguration()[NK.ProviderType.MAGIC];return new n(a.apiKey,{extensions:[new i],network:{rpcUrl:a.urls[r],chainId:r}})},this.chainId=e,this.account=null}}bO.MagicConnector=i9e;(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(VS,t),r(KS,t),r(iO,t),r(aO,t),r(oO,t),r(sO,t),r(bO,t)})(JM);var rse={},n_={};Object.defineProperty(n_,"__esModule",{value:!0});n_.Storage=void 0;class a9e{}n_.Storage=a9e;var AO={};Object.defineProperty(AO,"__esModule",{value:!0});AO.LocalStorage=void 0;const o9e=n_;class s9e extends o9e.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)}}}AO.LocalStorage=s9e;(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(n_,t),r(AO,t)})(rse);var SO={};Object.defineProperty(SO,"__esModule",{value:!0});SO.ProviderAdapter=void 0;class Qk{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 Qk(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)}}SO.ProviderAdapter=Qk;Object.defineProperty(ky,"__esModule",{value:!0});ky.connection=ky.ConnectionManager=void 0;const $K=as(),Wo=Rc,UE=T3e,vf=JM,c9e=rse,LN=Vs,MK=SO;class nse{constructor(e){this.storage=e,this.getWalletName=()=>{if(this.connector instanceof vf.WalletConnectV2Connector)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:r}=LN.getConfiguration();this.storage.remove(r),vf.WalletConnectV2Connector.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=()=>{this.connector&&(this.connector.removeListener(UE.ConnectorEvent.Deactivate,this.handleWeb3ReactDeactivate),this.connector.removeAllListeners(UE.ConnectorEvent.Update)),this.disconnect().catch(console.error)}}async connect(e,r=$K.ChainId.ETHEREUM_MAINNET){this.connector=this.buildConnector(e,r),this.connector.on(UE.ConnectorEvent.Deactivate,this.handleWeb3ReactDeactivate),e===Wo.ProviderType.MAGIC&&this.connector.on(UE.ConnectorEvent.Update,({chainId:a})=>{a&&this.setConnectionData(e,a)});const{provider:n,account:i}=await this.connector.activate();return this.setConnectionData(e,r),{provider:MK.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===Wo.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=[Wo.ProviderType.FORTMATIC,Wo.ProviderType.WALLET_CONNECT,Wo.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?e.unshift(Wo.ProviderType.INJECTED):e.unshift(Wo.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=$K.ChainId.ETHEREUM_MAINNET){const i=await this.buildConnector(e,r).getProvider();return MK.ProviderAdapter.adapt(i)}buildConnector(e,r){switch(e){case Wo.ProviderType.INJECTED:return new vf.InjectedConnector(r);case Wo.ProviderType.FORTMATIC:return new vf.FortmaticConnector(r);case Wo.ProviderType.MAGIC:return new vf.MagicConnector(r);case Wo.ProviderType.WALLET_LINK:return new vf.WalletLinkConnector(r);case Wo.ProviderType.NETWORK:return new vf.NetworkConnector(r);case Wo.ProviderType.WALLET_CONNECT_V2:return new vf.WalletConnectV2Connector(r);default:throw new Error(`Invalid provider ${e}`)}}getConnectionData(){const{storageKey:e}=LN.getConfiguration(),r=this.storage.get(e);return r?JSON.parse(r):void 0}setConnectionData(e,r){const{storageKey:n}=LN.getConfiguration(),i=JSON.stringify({providerType:e,chainId:r});this.storage.set(n,i)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}ky.ConnectionManager=nse;ky.connection=new nse(new c9e.LocalStorage);var ise={};Object.defineProperty(ise,"__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(ky,t),r(JM,t),r(Vs,t),r(ise,t)})(Dc);function kK(t){return t!=null&&typeof t=="object"&&"message"in t}const u9e=()=>{const[t,e]=ze.useState(),[r,n]=ze.useState(),[i,a]=ze.useState(),[o,s]=ze.useState(),c=ze.useCallback(async()=>{a(void 0),s(void 0);try{const f=await Dc.connection.tryPreviousConnection(),m=await(await new RA(f.provider).getSigner()).signMessage("Hello world");s(m)}catch(f){a(kK(f)?f.message:"Unknown error")}},[]),u=ze.useCallback(async()=>{n(void 0),e(void 0);try{const f=await Dc.connection.tryPreviousConnection(),g=await new RA(f.provider).getBalance(f.account??"");e(Zme(g))}catch(f){n(kK(f)?f.message:"Unknown error")}},[]);return We.jsxs("div",{children:[We.jsx("h1",{children:"This is a simple test page"}),We.jsxs("div",{children:[We.jsx("p",{children:"Sign message test"}),We.jsx(Ls.Button,{primary:!0,size:"small",onClick:c,children:"Sign message"}),o?We.jsxs("p",{children:["Signed message: ",o]}):null,i?We.jsxs("p",{children:["Error: ",i]}):null]}),We.jsxs("div",{children:[We.jsx("br",{}),We.jsx("p",{children:"Get balance test"}),We.jsx(Ls.Button,{primary:!0,size:"small",onClick:u,children:"Get balance"}),t?We.jsxs("p",{children:["Balance: ",t]}):null,r?We.jsxs("p",{children:["Error: ",r]}):null]})]})},Pu=Object.create(null);Pu.open="0";Pu.close="1";Pu.ping="2";Pu.pong="3";Pu.message="4";Pu.upgrade="5";Pu.noop="6";const Lx=Object.create(null);Object.keys(Pu).forEach(t=>{Lx[Pu[t]]=t});const _5={type:"error",data:"parser error"},ase=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ose=typeof ArrayBuffer=="function",sse=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Jk=({type:t,data:e},r,n)=>ase&&e instanceof Blob?r?n(e):LK(e,n):ose&&(e instanceof ArrayBuffer||sse(e))?r?n(e):LK(new Blob([e]),n):n(Pu[t]+(e||"")),LK=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function UK(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let UN;function l9e(t,e){if(ase&&t.data instanceof Blob)return t.data.arrayBuffer().then(UK).then(e);if(ose&&(t.data instanceof ArrayBuffer||sse(t.data)))return e(UK(t.data));Jk(t,!1,r=>{UN||(UN=new TextEncoder),e(UN.encode(r))})}const BK="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rb=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<BK.length;t++)Rb[BK.charCodeAt(t)]=t;const f9e=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=Rb[t.charCodeAt(n)],o=Rb[t.charCodeAt(n+1)],s=Rb[t.charCodeAt(n+2)],c=Rb[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},d9e=typeof ArrayBuffer=="function",Xk=(t,e)=>{if(typeof t!="string")return{type:"message",data:cse(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:h9e(t.substring(1),e)}:Lx[r]?t.length>1?{type:Lx[r],data:t.substring(1)}:{type:Lx[r]}:_5},h9e=(t,e)=>{if(d9e){const r=f9e(t);return cse(r,e)}else return{base64:!0,data:t}},cse=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},use=String.fromCharCode(30),p9e=(t,e)=>{const r=t.length,n=new Array(r);let i=0;t.forEach((a,o)=>{Jk(a,!1,s=>{n[o]=s,++i===r&&e(n.join(use))})})},g9e=(t,e)=>{const r=t.split(use),n=[];for(let i=0;i<r.length;i++){const a=Xk(r[i],e);if(n.push(a),a.type==="error")break}return n};function y9e(){return new TransformStream({transform(t,e){l9e(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 BN;function BE(t){return t.reduce((e,r)=>e+r.length,0)}function FE(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 m9e(t,e){BN||(BN=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(BE(r)<1)break;const c=FE(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(BE(r)<2)break;const c=FE(r,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(BE(r)<8)break;const c=FE(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(_5);break}i=f*Math.pow(2,32)+u.getUint32(4),n=3}else{if(BE(r)<i)break;const c=FE(r,i);s.enqueue(Xk(a?c:BN.decode(c),e)),n=0}if(i===0||i>t){s.enqueue(_5);break}}}})}const lse=4;function Di(t){if(t)return v9e(t)}function v9e(t){for(var e in Di.prototype)t[e]=Di.prototype[e];return t}Di.prototype.on=Di.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};Di.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};Di.prototype.off=Di.prototype.removeListener=Di.prototype.removeAllListeners=Di.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};Di.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};Di.prototype.emitReserved=Di.prototype.emit;Di.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};Di.prototype.hasListeners=function(t){return!!this.listeners(t).length};const $s=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function fse(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const b9e=$s.setTimeout,w9e=$s.clearTimeout;function OO(t,e){e.useNativeTimers?(t.setTimeoutFn=b9e.bind($s),t.clearTimeoutFn=w9e.bind($s)):(t.setTimeoutFn=$s.setTimeout.bind($s),t.clearTimeoutFn=$s.clearTimeout.bind($s))}const _9e=1.33;function E9e(t){return typeof t=="string"?x9e(t):Math.ceil((t.byteLength||t.size)*_9e)}function x9e(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 A9e(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function S9e(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 O9e extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class Zk extends Di{constructor(e){super(),this.writable=!1,OO(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,r,n){return super.emitReserved("error",new O9e(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=Xk(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=A9e(e);return r.length?"?"+r:""}}const dse="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),E5=64,I9e={};let FK=0,jE=0,jK;function qK(t){let e="";do e=dse[t%E5]+e,t=Math.floor(t/E5);while(t>0);return e}function hse(){const t=qK(+new Date);return t!==jK?(FK=0,jK=t):t+"."+qK(FK++)}for(;jE<E5;jE++)I9e[dse[jE]]=jE;let pse=!1;try{pse=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const P9e=pse;function gse(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||P9e))return new XMLHttpRequest}catch{}if(!e)try{return new $s[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function T9e(){}const R9e=function(){return new gse({xdomain:!1}).responseType!=null}();class C9e extends Zk{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=R9e&&!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)};g9e(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,p9e(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]=hse()),!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 Au(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 Au extends Di{constructor(e,r){super(),OO(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=fse(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const n=this.xhr=new gse(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=Au.requestsCount++,Au.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=T9e,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Au.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()}}Au.requestsCount=0;Au.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",HK);else if(typeof addEventListener=="function"){const t="onpagehide"in $s?"pagehide":"unload";addEventListener(t,HK,!1)}}function HK(){for(let t in Au.requests)Au.requests.hasOwnProperty(t)&&Au.requests[t].abort()}const eL=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0))(),qE=$s.WebSocket||$s.MozWebSocket,zK=!0,N9e="arraybuffer",VK=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class D9e extends Zk{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=VK?{}:fse(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=zK&&!VK?r?new qE(e,r):new qE(e):new qE(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;Jk(n,this.supportsBinary,a=>{const o={};try{zK&&this.ws.send(a)}catch{}i&&eL(()=>{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]=hse()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}check(){return!!qE}}class $9e extends Zk{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=m9e(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),i=y9e();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&&eL(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const M9e={websocket:D9e,webtransport:$9e,polling:C9e},k9e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,L9e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function x5(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=k9e.exec(t||""),a={},o=14;for(;o--;)a[L9e[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=U9e(a,a.path),a.queryKey=B9e(a,a.query),a}function U9e(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 B9e(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,a){i&&(r[i]=a)}),r}let yse=class j0 extends Di{constructor(e,r={}){super(),this.binaryType=N9e,this.writeBuffer=[],e&&typeof e=="object"&&(r=e,e=null),e?(e=x5(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=x5(r.host).host),OO(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=S9e(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=lse,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 M9e[e](n)}open(){let e;if(this.opts.rememberUpgrade&&j0.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;j0.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;j0.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",j0.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+=E9e(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){j0.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}};yse.protocol=lse;function F9e(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=x5(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 j9e=typeof ArrayBuffer=="function",q9e=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,mse=Object.prototype.toString,H9e=typeof Blob=="function"||typeof Blob<"u"&&mse.call(Blob)==="[object BlobConstructor]",z9e=typeof File=="function"||typeof File<"u"&&mse.call(File)==="[object FileConstructor]";function tL(t){return j9e&&(t instanceof ArrayBuffer||q9e(t))||H9e&&t instanceof Blob||z9e&&t instanceof File}function Ux(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Ux(t[r]))return!0;return!1}if(tL(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ux(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Ux(t[r]))return!0;return!1}function V9e(t){const e=[],r=t.data,n=t;return n.data=A5(r,e),n.attachments=e.length,{packet:n,buffers:e}}function A5(t,e){if(!t)return t;if(tL(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]=A5(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]=A5(t[n],e));return r}return t}function G9e(t,e){return t.data=S5(t.data,e),delete t.attachments,t}function S5(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]=S5(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=S5(t[r],e));return t}const W9e=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],K9e=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={}));class Y9e{constructor(e){this.replacer=e}encode(e){return(e.type===cn.EVENT||e.type===cn.ACK)&&Ux(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=V9e(e),n=this.encodeAsString(r.packet),i=r.buffers;return i.unshift(n),i}}function GK(t){return Object.prototype.toString.call(t)==="[object Object]"}class rL extends Di{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 Q9e(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(tL(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(rL.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 GK(r);case cn.DISCONNECT:return r===void 0;case cn.CONNECT_ERROR:return typeof r=="string"||GK(r);case cn.EVENT:case cn.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&W9e.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 Q9e{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=G9e(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const J9e=Object.freeze(Object.defineProperty({__proto__:null,Decoder:rL,Encoder:Y9e,get PacketType(){return cn},protocol:K9e},Symbol.toStringTag,{value:"Module"}));function Ic(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const X9e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class vse extends Di{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=[Ic(e,"open",this.onopen.bind(this)),Ic(e,"packet",this.onpacket.bind(this)),Ic(e,"error",this.onerror.bind(this)),Ic(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(X9e.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 Em(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}Em.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};Em.prototype.reset=function(){this.attempts=0};Em.prototype.setMin=function(t){this.ms=t};Em.prototype.setMax=function(t){this.max=t};Em.prototype.setJitter=function(t){this.jitter=t};let O5=class extends Di{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,OO(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 Em({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||J9e;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 yse(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=Ic(r,"open",function(){n.onopen(),e&&e()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),e?e(s):this.maybeReconnectOnOpen()},o=Ic(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(Ic(e,"ping",this.onping.bind(this)),Ic(e,"data",this.ondata.bind(this)),Ic(e,"error",this.onerror.bind(this)),Ic(e,"close",this.onclose.bind(this)),Ic(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){eL(()=>{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 vse(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 Kv={};function Bx(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=F9e(t,e.path||"/socket.io"),n=r.source,i=r.id,a=r.path,o=Kv[i]&&a in Kv[i].nsps,s=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let c;return s?c=new O5(n,e):(Kv[i]||(Kv[i]=new O5(n,e)),c=Kv[i]),r.query&&!e.query&&(e.query=r.queryKey),c.socket(r.path,e)}Object.assign(Bx,{Manager:O5,Socket:vse,io:Bx,connect:Bx});var nL={},IO={},PO=br;IO.__esModule=!0;IO.default=void 0;var Z9e=PO(Fn()),e7e=PO(ai);PO(Un());var t7e=PO(ze),Qu=Kn();function H1(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,e7e.default)("ui",u,(0,Qu.useKeyOnly)(e,"active"),(0,Qu.useKeyOnly)(a,"disabled"),(0,Qu.useKeyOnly)(o,"indeterminate"),(0,Qu.useKeyOnly)(c,"inverted"),(0,Qu.useKeyOnly)(r||i,"text"),(0,Qu.useKeyOrValueAndKey)(s,"inline"),"loader",n),d=(0,Qu.getUnhandledProps)(H1,t),g=(0,Qu.getElementType)(H1,t);return t7e.default.createElement(g,(0,Z9e.default)({},d,{className:f}),Qu.childrenUtils.isNil(r)?i:r)}H1.handledProps=["active","as","children","className","content","disabled","indeterminate","inline","inverted","size"];H1.propTypes={};var r7e=H1;IO.default=r7e;var n7e=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)}}(),I5=Ne&&Ne.__assign||function(){return I5=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},I5.apply(this,arguments)},i7e=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]}),a7e=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o7e=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)&&i7e(e,t,r);return a7e(e,t),e},s7e=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nL,"__esModule",{value:!0});var TO=nL.Loader=void 0,WK=o7e(ze),c7e=s7e(IO),u7e=function(t){n7e(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 WK.createElement(c7e.default,I5({"aria-live":"polite","aria-label":"Loading",role:"status"},this.props,{className:this.getClassName()}))},e}(WK.PureComponent);TO=nL.Loader=u7e;var iL={},KK=Object.prototype.toString,bse=function(e){var r=KK.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&KK.call(e.callee)==="[object Function]"),n},FN,YK;function l7e(){if(YK)return FN;YK=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=bse,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 FN=t,FN}var f7e=Array.prototype.slice,d7e=bse,QK=Object.keys,Fx=QK?function(e){return QK(e)}:l7e(),JK=Object.keys;Fx.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 d7e(n)?JK(f7e.call(n)):JK(n)})}else Object.keys=Fx;return Object.keys||Fx};var aL=Fx,RO=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},XK=typeof Symbol<"u"&&Symbol,h7e=RO,oL=function(){return typeof XK!="function"||typeof Symbol!="function"||typeof XK("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:h7e()},ZK={foo:{}},p7e=Object,g7e=function(){return{__proto__:ZK}.foo===ZK.foo&&!({__proto__:null}instanceof p7e)},y7e="Function.prototype.bind called on incompatible ",m7e=Object.prototype.toString,v7e=Math.max,b7e="[object Function]",eY=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},w7e=function(e,r){for(var n=[],i=r||0,a=0;i<e.length;i+=1,a+=1)n[a]=e[i];return n},_7e=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r},E7e=function(e){var r=this;if(typeof r!="function"||m7e.apply(r)!==b7e)throw new TypeError(y7e+r);for(var n=w7e(arguments,1),i,a=function(){if(this instanceof i){var f=r.apply(this,eY(n,arguments));return Object(f)===f?f:this}return r.apply(e,eY(n,arguments))},o=v7e(0,r.length-n.length),s=[],c=0;c<o;c++)s[c]="$"+c;if(i=Function("binder","return function ("+_7e(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},x7e=E7e,sL=Function.prototype.bind||x7e,A7e=Function.prototype.call,S7e=Object.prototype.hasOwnProperty,O7e=sL,wse=O7e.call(A7e,S7e),nn,qy=SyntaxError,_se=Function,Ng=TypeError,jN=function(t){try{return _se('"use strict"; return ('+t+").constructor;")()}catch{}},up=Object.getOwnPropertyDescriptor;if(up)try{up({},"")}catch{up=null}var qN=function(){throw new Ng},I7e=up?function(){try{return arguments.callee,qN}catch{try{return up(arguments,"callee").get}catch{return qN}}}():qN,I0=oL(),P7e=g7e(),Qi=Object.getPrototypeOf||(P7e?function(t){return t.__proto__}:null),q0={},T7e=typeof Uint8Array>"u"||!Qi?nn:Qi(Uint8Array),lp={"%AggregateError%":typeof AggregateError>"u"?nn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?nn:ArrayBuffer,"%ArrayIteratorPrototype%":I0&&Qi?Qi([][Symbol.iterator]()):nn,"%AsyncFromSyncIteratorPrototype%":nn,"%AsyncFunction%":q0,"%AsyncGenerator%":q0,"%AsyncGeneratorFunction%":q0,"%AsyncIteratorPrototype%":q0,"%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%":_se,"%GeneratorFunction%":q0,"%Int8Array%":typeof Int8Array>"u"?nn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?nn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?nn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I0&&Qi?Qi(Qi([][Symbol.iterator]())):nn,"%JSON%":typeof JSON=="object"?JSON:nn,"%Map%":typeof Map>"u"?nn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I0||!Qi?nn:Qi(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"||!I0||!Qi?nn:Qi(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?nn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I0&&Qi?Qi(""[Symbol.iterator]()):nn,"%Symbol%":I0?Symbol:nn,"%SyntaxError%":qy,"%ThrowTypeError%":I7e,"%TypedArray%":T7e,"%TypeError%":Ng,"%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(Qi)try{null.error}catch(t){var R7e=Qi(Qi(t));lp["%Error.prototype%"]=R7e}var C7e=function t(e){var r;if(e==="%AsyncFunction%")r=jN("async function () {}");else if(e==="%GeneratorFunction%")r=jN("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=jN("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Qi&&(r=Qi(i.prototype))}return lp[e]=r,r},tY={"%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"]},i_=sL,i2=wse,N7e=i_.call(Function.call,Array.prototype.concat),D7e=i_.call(Function.apply,Array.prototype.splice),rY=i_.call(Function.call,String.prototype.replace),a2=i_.call(Function.call,String.prototype.slice),$7e=i_.call(Function.call,RegExp.prototype.exec),M7e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,k7e=/\\(\\)?/g,L7e=function(e){var r=a2(e,0,1),n=a2(e,-1);if(r==="%"&&n!=="%")throw new qy("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new qy("invalid intrinsic syntax, expected opening `%`");var i=[];return rY(e,M7e,function(a,o,s,c){i[i.length]=s?rY(c,k7e,"$1"):o||a}),i},U7e=function(e,r){var n=e,i;if(i2(tY,n)&&(i=tY[n],n="%"+i[0]+"%"),i2(lp,n)){var a=lp[n];if(a===q0&&(a=C7e(n)),typeof a>"u"&&!r)throw new Ng("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new qy("intrinsic "+e+" does not exist!")},ec=function(e,r){if(typeof e!="string"||e.length===0)throw new Ng("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ng('"allowMissing" argument must be a boolean');if($7e(/^%?[^%]*%?$/,e)===null)throw new qy("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=L7e(e),i=n.length>0?n[0]:"",a=U7e("%"+i+"%",r),o=a.name,s=a.value,c=!1,u=a.alias;u&&(i=u[0],D7e(n,N7e([0,1],u)));for(var f=1,d=!0;f<n.length;f+=1){var g=n[f],m=a2(g,0,1),w=a2(g,-1);if((m==='"'||m==="'"||m==="`"||w==='"'||w==="'"||w==="`")&&m!==w)throw new qy("property names with quotes must have matching quotes");if((g==="constructor"||!d)&&(c=!0),i+="."+g,o="%"+i+"%",i2(lp,o))s=lp[o];else if(s!=null){if(!(g in s)){if(!r)throw new Ng("base intrinsic for "+e+" exists, but the property is not available.");return}if(up&&f+1>=n.length){var v=up(s,g);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[g]}else d=i2(s,g),s=s[g];d&&!c&&(lp[o]=s)}}return s},B7e=ec,P5=B7e("%Object.defineProperty%",!0),T5=function(){if(P5)try{return P5({},"a",{value:1}),!0}catch{return!1}return!1};T5.hasArrayLengthDefineBug=function(){if(!T5())return null;try{return P5([],"length",{value:1}).length!==1}catch{return!0}};var CO=T5,F7e=ec,jx=F7e("%Object.getOwnPropertyDescriptor%",!0);if(jx)try{jx([],"length")}catch{jx=null}var cL=jx,j7e=CO(),uL=ec,e1=j7e&&uL("%Object.defineProperty%",!0);if(e1)try{e1({},"a",{value:1})}catch{e1=!1}var q7e=uL("%SyntaxError%"),P0=uL("%TypeError%"),nY=cL,lL=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new P0("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new P0("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new P0("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new P0("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new P0("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new P0("`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=!!nY&&nY(e,r);if(e1)e1(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 q7e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},H7e=aL,z7e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",V7e=Object.prototype.toString,G7e=Array.prototype.concat,iY=lL,W7e=function(t){return typeof t=="function"&&V7e.call(t)==="[object Function]"},Ese=CO(),K7e=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!W7e(n)||!n())return}Ese?iY(t,e,r,!0):iY(t,e,r)},xse=function(t,e){var r=arguments.length>2?arguments[2]:{},n=H7e(e);z7e&&(n=G7e.call(n,Object.getOwnPropertySymbols(e)));for(var i=0;i<n.length;i+=1)K7e(t,n[i],e[n[i]],r[n[i]])};xse.supportsDescriptors=!!Ese;var jp=xse,Ase={exports:{}},Sse=ec,aY=lL,Y7e=CO(),oY=cL,sY=Sse("%TypeError%"),Q7e=Sse("%Math.floor%"),J7e=function(e,r){if(typeof e!="function")throw new sY("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Q7e(r)!==r)throw new sY("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in e&&oY){var o=oY(e,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(Y7e?aY(e,"length",r,!0,!0):aY(e,"length",r)),e};(function(t){var e=sL,r=ec,n=J7e,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})(Ase);var xm=Ase.exports,Ose=ec,Ise=xm,X7e=Ise(Ose("String.prototype.indexOf")),tc=function(e,r){var n=Ose(e,!!r);return typeof n=="function"&&X7e(e,".prototype.")>-1?Ise(n):n},Z7e=aL,Pse=RO(),Tse=tc,cY=Object,eUe=Tse("Array.prototype.push"),uY=Tse("Object.prototype.propertyIsEnumerable"),tUe=Pse?Object.getOwnPropertySymbols:null,Rse=function(e,r){if(e==null)throw new TypeError("target must be an object");var n=cY(e);if(arguments.length===1)return n;for(var i=1;i<arguments.length;++i){var a=cY(arguments[i]),o=Z7e(a),s=Pse&&(Object.getOwnPropertySymbols||tUe);if(s)for(var c=s(a),u=0;u<c.length;++u){var f=c[u];uY(a,f)&&eUe(o,f)}for(var d=0;d<o.length;++d){var g=o[d];if(uY(a,g)){var m=a[g];n[g]=m}}}return n},HN=Rse,rUe=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},nUe=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},Cse=function(){return!Object.assign||rUe()||nUe()?HN:Object.assign},iUe=jp,aUe=Cse,oUe=function(){var e=aUe();return iUe(Object,{assign:e},{assign:function(){return Object.assign!==e}}),e},sUe=jp,cUe=xm,uUe=Rse,Nse=Cse,lUe=oUe,fUe=cUe.apply(Nse()),Dse=function(e,r){return fUe(Object,arguments)};sUe(Dse,{getPolyfill:Nse,implementation:uUe,shim:lUe});var dUe=Dse,z1=function(){return typeof(function(){}).name=="string"},t1=Object.getOwnPropertyDescriptor;if(t1)try{t1([],"length")}catch{t1=null}z1.functionsHaveConfigurableNames=function(){if(!z1()||!t1)return!1;var e=t1(function(){},"name");return!!e&&!!e.configurable};var hUe=Function.prototype.bind;z1.boundFunctionsHaveNames=function(){return z1()&&typeof hUe=="function"&&(function(){}).bind().name!==""};var pUe=z1,lY=lL,gUe=CO(),yUe=pUe.functionsHaveConfigurableNames(),mUe=TypeError,vUe=function(e,r){if(typeof e!="function")throw new mUe("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||yUe)&&(gUe?lY(e,"name",r,!0,!0):lY(e,"name",r)),e},bUe=vUe,wUe=Object,_Ue=TypeError,$se=bUe(function(){if(this!=null&&this!==wUe(this))throw new _Ue("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),EUe=$se,xUe=jp.supportsDescriptors,AUe=Object.getOwnPropertyDescriptor,Mse=function(){if(xUe&&/a/mig.flags==="gim"){var e=AUe(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 EUe},SUe=jp.supportsDescriptors,OUe=Mse,IUe=Object.getOwnPropertyDescriptor,PUe=Object.defineProperty,TUe=TypeError,fY=Object.getPrototypeOf,RUe=/a/,CUe=function(){if(!SUe||!fY)throw new TUe("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=OUe(),r=fY(RUe),n=IUe(r,"flags");return(!n||n.get!==e)&&PUe(r,"flags",{configurable:!0,enumerable:!1,get:e}),e},NUe=jp,DUe=xm,$Ue=$se,kse=Mse,MUe=CUe,Lse=DUe(kse());NUe(Lse,{getPolyfill:kse,implementation:$Ue,shim:MUe});var kUe=Lse,qx={exports:{}},LUe=RO,qp=function(){return LUe()&&!!Symbol.toStringTag},UUe=qp(),BUe=tc,R5=BUe("Object.prototype.toString"),NO=function(e){return UUe&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:R5(e)==="[object Arguments]"},Use=function(e){return NO(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&R5(e)!=="[object Array]"&&R5(e.callee)==="[object Function]"},FUe=function(){return NO(arguments)}();NO.isLegacyArguments=Use;var Bse=FUe?NO:Use,fL=typeof Map=="function"&&Map.prototype,zN=Object.getOwnPropertyDescriptor&&fL?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o2=fL&&zN&&typeof zN.get=="function"?zN.get:null,dY=fL&&Map.prototype.forEach,dL=typeof Set=="function"&&Set.prototype,VN=Object.getOwnPropertyDescriptor&&dL?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s2=dL&&VN&&typeof VN.get=="function"?VN.get:null,hY=dL&&Set.prototype.forEach,jUe=typeof WeakMap=="function"&&WeakMap.prototype,r1=jUe?WeakMap.prototype.has:null,qUe=typeof WeakSet=="function"&&WeakSet.prototype,n1=qUe?WeakSet.prototype.has:null,HUe=typeof WeakRef=="function"&&WeakRef.prototype,pY=HUe?WeakRef.prototype.deref:null,zUe=Boolean.prototype.valueOf,VUe=Object.prototype.toString,GUe=Function.prototype.toString,WUe=String.prototype.match,hL=String.prototype.slice,ed=String.prototype.replace,KUe=String.prototype.toUpperCase,gY=String.prototype.toLowerCase,Fse=RegExp.prototype.test,yY=Array.prototype.concat,fu=Array.prototype.join,YUe=Array.prototype.slice,mY=Math.floor,C5=typeof BigInt=="function"?BigInt.prototype.valueOf:null,GN=Object.getOwnPropertySymbols,N5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Hy=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ga=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Hy||"symbol")?Symbol.toStringTag:null,jse=Object.prototype.propertyIsEnumerable,vY=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function bY(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Fse.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-mY(-t):mY(t);if(n!==t){var i=String(n),a=hL.call(e,i.length+1);return ed.call(i,r,"$&_")+"."+ed.call(ed.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ed.call(e,r,"$&_")}var D5=wk,wY=D5.custom,_Y=Hse(wY)?wY:null,QUe=function t(e,r,n,i){var a=r||{};if(Pf(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Pf(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=Pf(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(Pf(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(Pf(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 Vse(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return s?bY(e,c):c}if(typeof e=="bigint"){var u=String(e)+"n";return s?bY(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 $5(e)?"[Array]":"[Object]";var d=pBe(a,n);if(typeof i>"u")i=[];else if(zse(i,e)>=0)return"[Circular]";function g(pe,B,U){if(B&&(i=YUe.call(i),i.push(B)),U){var Y={depth:a.depth};return Pf(a,"quoteStyle")&&(Y.quoteStyle=a.quoteStyle),t(pe,Y,n+1,i)}return t(pe,a,n+1,i)}if(typeof e=="function"&&!EY(e)){var m=aBe(e),w=HE(e,g);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(w.length>0?" { "+fu.call(w,", ")+" }":"")}if(Hse(e)){var v=Hy?ed.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):N5.call(e);return typeof e=="object"&&!Hy?Yv(v):v}if(fBe(e)){for(var y="<"+gY.call(String(e.nodeName)),_=e.attributes||[],b=0;b<_.length;b++)y+=" "+_[b].name+"="+qse(JUe(_[b].value),"double",a);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+gY.call(String(e.nodeName))+">",y}if($5(e)){if(e.length===0)return"[]";var S=HE(e,g);return d&&!hBe(S)?"["+M5(S,d)+"]":"[ "+fu.call(S,", ")+" ]"}if(ZUe(e)){var x=HE(e,g);return!("cause"in Error.prototype)&&"cause"in e&&!jse.call(e,"cause")?"{ ["+String(e)+"] "+fu.call(yY.call("[cause]: "+g(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+fu.call(x,", ")+" }"}if(typeof e=="object"&&o){if(_Y&&typeof e[_Y]=="function"&&D5)return D5(e,{depth:f-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(oBe(e)){var O=[];return dY&&dY.call(e,function(pe,B){O.push(g(B,e,!0)+" => "+g(pe,e))}),xY("Map",o2.call(e),O,d)}if(uBe(e)){var E=[];return hY&&hY.call(e,function(pe){E.push(g(pe,e))}),xY("Set",s2.call(e),E,d)}if(sBe(e))return WN("WeakMap");if(lBe(e))return WN("WeakSet");if(cBe(e))return WN("WeakRef");if(tBe(e))return Yv(g(Number(e)));if(nBe(e))return Yv(g(C5.call(e)));if(rBe(e))return Yv(zUe.call(e));if(eBe(e))return Yv(g(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===Ne)return"{ [object globalThis] }";if(!XUe(e)&&!EY(e)){var p=HE(e,g),I=vY?vY(e)===Object.prototype:e instanceof Object||e.constructor===Object,C=e instanceof Object?"":"null prototype",L=!I&&Ga&&Object(e)===e&&Ga in e?hL.call(Ld(e),8,-1):C?"Object":"",q=I||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",le=q+(L||C?"["+fu.call(yY.call([],L||[],C||[]),": ")+"] ":"");return p.length===0?le+"{}":d?le+"{"+M5(p,d)+"}":le+"{ "+fu.call(p,", ")+" }"}return String(e)};function qse(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function JUe(t){return ed.call(String(t),/"/g,"&quot;")}function $5(t){return Ld(t)==="[object Array]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function XUe(t){return Ld(t)==="[object Date]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function EY(t){return Ld(t)==="[object RegExp]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function ZUe(t){return Ld(t)==="[object Error]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function eBe(t){return Ld(t)==="[object String]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function tBe(t){return Ld(t)==="[object Number]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function rBe(t){return Ld(t)==="[object Boolean]"&&(!Ga||!(typeof t=="object"&&Ga in t))}function Hse(t){if(Hy)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!N5)return!1;try{return N5.call(t),!0}catch{}return!1}function nBe(t){if(!t||typeof t!="object"||!C5)return!1;try{return C5.call(t),!0}catch{}return!1}var iBe=Object.prototype.hasOwnProperty||function(t){return t in this};function Pf(t,e){return iBe.call(t,e)}function Ld(t){return VUe.call(t)}function aBe(t){if(t.name)return t.name;var e=WUe.call(GUe.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function zse(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 oBe(t){if(!o2||!t||typeof t!="object")return!1;try{o2.call(t);try{s2.call(t)}catch{return!0}return t instanceof Map}catch{}return!1}function sBe(t){if(!r1||!t||typeof t!="object")return!1;try{r1.call(t,r1);try{n1.call(t,n1)}catch{return!0}return t instanceof WeakMap}catch{}return!1}function cBe(t){if(!pY||!t||typeof t!="object")return!1;try{return pY.call(t),!0}catch{}return!1}function uBe(t){if(!s2||!t||typeof t!="object")return!1;try{s2.call(t);try{o2.call(t)}catch{return!0}return t instanceof Set}catch{}return!1}function lBe(t){if(!n1||!t||typeof t!="object")return!1;try{n1.call(t,n1);try{r1.call(t,r1)}catch{return!0}return t instanceof WeakSet}catch{}return!1}function fBe(t){return!t||typeof t!="object"?!1:typeof HTMLElement<"u"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Vse(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Vse(hL.call(t,0,e.maxStringLength),e)+n}var i=ed.call(ed.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,dBe);return qse(i,"single",e)}function dBe(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":"")+KUe.call(e.toString(16))}function Yv(t){return"Object("+t+")"}function WN(t){return t+" { ? }"}function xY(t,e,r,n){var i=n?M5(r,n):fu.call(r,", ");return t+" ("+e+") {"+i+"}"}function hBe(t){for(var e=0;e<t.length;e++)if(zse(t[e],`
168
+ `)>=0)return!1;return!0}function pBe(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=fu.call(Array(t.indent+1)," ");else return null;return{base:r,prev:fu.call(Array(e+1),r)}}function M5(t,e){if(t.length===0)return"";var r=`
169
+ `+e.prev+e.base;return r+fu.call(t,","+r)+`
170
+ `+e.prev}function HE(t,e){var r=$5(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=Pf(t,i)?e(t[i],t):""}var a=typeof GN=="function"?GN(t):[],o;if(Hy){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var c in t)Pf(t,c)&&(r&&String(Number(c))===c&&c<t.length||Hy&&o["$"+c]instanceof Symbol||(Fse.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof GN=="function")for(var u=0;u<a.length;u++)jse.call(t,a[u])&&n.push("["+e(a[u])+"]: "+e(t[a[u]],t));return n}var pL=ec,Am=tc,gBe=QUe,yBe=pL("%TypeError%"),zE=pL("%WeakMap%",!0),VE=pL("%Map%",!0),mBe=Am("WeakMap.prototype.get",!0),vBe=Am("WeakMap.prototype.set",!0),bBe=Am("WeakMap.prototype.has",!0),wBe=Am("Map.prototype.get",!0),_Be=Am("Map.prototype.set",!0),EBe=Am("Map.prototype.has",!0),gL=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},xBe=function(t,e){var r=gL(t,e);return r&&r.value},ABe=function(t,e,r){var n=gL(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},SBe=function(t,e){return!!gL(t,e)},Gse=function(){var e,r,n,i={assert:function(a){if(!i.has(a))throw new yBe("Side channel does not contain "+gBe(a))},get:function(a){if(zE&&a&&(typeof a=="object"||typeof a=="function")){if(e)return mBe(e,a)}else if(VE){if(r)return wBe(r,a)}else if(n)return xBe(n,a)},has:function(a){if(zE&&a&&(typeof a=="object"||typeof a=="function")){if(e)return bBe(e,a)}else if(VE){if(r)return EBe(r,a)}else if(n)return SBe(n,a);return!1},set:function(a,o){zE&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new zE),vBe(e,a,o)):VE?(r||(r=new VE),_Be(r,a,o)):(n||(n={key:{},next:null}),ABe(n,a,o))}};return i},OBe=ec,IBe=wse,Qv=Gse(),Ju=OBe("%TypeError%"),yL={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(Qv.assert(t),!yL.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=Qv.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=Qv.get(t);return!!r&&IBe(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=Qv.get(t);n||(n={},Qv.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(yL);var PBe=yL,Jv=PBe,TBe=SyntaxError,AY=typeof StopIteration=="object"?StopIteration:null,RBe=function(e){if(!AY)throw new TBe("this environment lacks StopIteration");Jv.set(e,"[[Done]]",!1);var r={next:function(){var i=Jv.get(this,"[[Iterator]]"),a=Jv.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(o){if(Jv.set(i,"[[Done]]",!0),o!==AY)throw o;return{done:!0,value:void 0}}}};return Jv.set(r,"[[Iterator]]",e),r},CBe={}.toString,Wse=Array.isArray||function(t){return CBe.call(t)=="[object Array]"},NBe=String.prototype.valueOf,DBe=function(e){try{return NBe.call(e),!0}catch{return!1}},$Be=Object.prototype.toString,MBe="[object String]",kBe=qp(),Kse=function(e){return typeof e=="string"?!0:typeof e!="object"?!1:kBe?DBe(e):$Be.call(e)===MBe},mL=typeof Map=="function"&&Map.prototype?Map:null,LBe=typeof Set=="function"&&Set.prototype?Set:null,c2;mL||(c2=function(e){return!1});var Yse=mL?Map.prototype.has:null,SY=LBe?Set.prototype.has:null;!c2&&!Yse&&(c2=function(e){return!1});var Qse=c2||function(e){if(!e||typeof e!="object")return!1;try{if(Yse.call(e),SY)try{SY.call(e)}catch{return!0}return e instanceof mL}catch{}return!1},UBe=typeof Map=="function"&&Map.prototype?Map:null,vL=typeof Set=="function"&&Set.prototype?Set:null,u2;vL||(u2=function(e){return!1});var OY=UBe?Map.prototype.has:null,Jse=vL?Set.prototype.has:null;!u2&&!Jse&&(u2=function(e){return!1});var Xse=u2||function(e){if(!e||typeof e!="object")return!1;try{if(Jse.call(e),OY)try{OY.call(e)}catch{return!0}return e instanceof vL}catch{}return!1},IY=Bse,PY=RBe;if(oL()||RO()){var KN=Symbol.iterator;qx.exports=function(e){if(e!=null&&typeof e[KN]<"u")return e[KN]();if(IY(e))return Array.prototype[KN].call(e)}}else{var BBe=Wse,FBe=Kse,TY=ec,jBe=TY("%Map%",!0),qBe=TY("%Set%",!0),lc=tc,RY=lc("Array.prototype.push"),CY=lc("String.prototype.charCodeAt"),HBe=lc("String.prototype.slice"),zBe=function(e,r){var n=e.length;if(r+1>=n)return r+1;var i=CY(e,r);if(i<55296||i>56319)return r+1;var a=CY(e,r+1);return a<56320||a>57343?r+1:r+2},YN=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}}}},NY=function(e,r){if(BBe(e)||IY(e))return YN(e);if(FBe(e)){var n=0;return{next:function(){var a=zBe(e,n),o=HBe(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(!jBe&&!qBe)qx.exports=function(e){if(e!=null)return NY(e,!0)};else{var VBe=Qse,GBe=Xse,DY=lc("Map.prototype.forEach",!0),$Y=lc("Set.prototype.forEach",!0);if(typeof za>"u"||!za.versions||!za.versions.node)var MY=lc("Map.prototype.iterator",!0),kY=lc("Set.prototype.iterator",!0);var LY=lc("Map.prototype.@@iterator",!0)||lc("Map.prototype._es6-shim iterator_",!0),UY=lc("Set.prototype.@@iterator",!0)||lc("Set.prototype._es6-shim iterator_",!0),WBe=function(e){if(VBe(e)){if(MY)return PY(MY(e));if(LY)return LY(e);if(DY){var r=[];return DY(e,function(i,a){RY(r,[a,i])}),YN(r)}}if(GBe(e)){if(kY)return PY(kY(e));if(UY)return UY(e);if($Y){var n=[];return $Y(e,function(i){RY(n,i)}),YN(n)}}};qx.exports=function(e){return WBe(e)||NY(e)}}}var KBe=qx.exports,BY=function(t){return t!==t},Zse=function(e,r){return e===0&&r===0?1/e===1/r:!!(e===r||BY(e)&&BY(r))},YBe=Zse,ece=function(){return typeof Object.is=="function"?Object.is:YBe},QBe=ece,JBe=jp,XBe=function(){var e=QBe();return JBe(Object,{is:e},{is:function(){return Object.is!==e}}),e},ZBe=jp,eFe=xm,tFe=Zse,tce=ece,rFe=XBe,rce=eFe(tce(),Object);ZBe(rce,{getPolyfill:tce,implementation:tFe,shim:rFe});var nFe=rce,nce=Function.prototype.toString,ng=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,k5,Hx;if(typeof ng=="function"&&typeof Object.defineProperty=="function")try{k5=Object.defineProperty({},"length",{get:function(){throw Hx}}),Hx={},ng(function(){throw 42},null,k5)}catch(t){t!==Hx&&(ng=null)}else ng=null;var iFe=/^\s*class\b/,L5=function(e){try{var r=nce.call(e);return iFe.test(r)}catch{return!1}},QN=function(e){try{return L5(e)?!1:(nce.call(e),!0)}catch{return!1}},zx=Object.prototype.toString,aFe="[object Object]",oFe="[object Function]",sFe="[object GeneratorFunction]",cFe="[object HTMLAllCollection]",uFe="[object HTML document.all class]",lFe="[object HTMLCollection]",fFe=typeof Symbol=="function"&&!!Symbol.toStringTag,dFe=!(0 in[,]),U5=function(){return!1};if(typeof document=="object"){var hFe=document.all;zx.call(hFe)===zx.call(document.all)&&(U5=function(e){if((dFe||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=zx.call(e);return(r===cFe||r===uFe||r===lFe||r===aFe)&&e("")==null}catch{}return!1})}var pFe=ng?function(e){if(U5(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{ng(e,null,k5)}catch(r){if(r!==Hx)return!1}return!L5(e)&&QN(e)}:function(e){if(U5(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(fFe)return QN(e);if(L5(e))return!1;var r=zx.call(e);return r!==oFe&&r!==sFe&&!/^\[object HTML/.test(r)?!1:QN(e)},gFe=pFe,yFe=Object.prototype.toString,ice=Object.prototype.hasOwnProperty,mFe=function(e,r,n){for(var i=0,a=e.length;i<a;i++)ice.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},vFe=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)},bFe=function(e,r,n){for(var i in e)ice.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},wFe=function(e,r,n){if(!gFe(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),yFe.call(e)==="[object Array]"?mFe(e,r,i):typeof e=="string"?vFe(e,r,i):bFe(e,r,i)},_Fe=wFe,JN=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],EFe=typeof globalThis>"u"?Ne:globalThis,xFe=function(){for(var e=[],r=0;r<JN.length;r++)typeof EFe[JN[r]]=="function"&&(e[e.length]=JN[r]);return e},l2=_Fe,AFe=xFe,FY=xm,bL=tc,Vx=cL,SFe=bL("Object.prototype.toString"),ace=qp(),jY=typeof globalThis>"u"?Ne:globalThis,B5=AFe(),wL=bL("String.prototype.slice"),XN=Object.getPrototypeOf,OFe=bL("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n<e.length;n+=1)if(e[n]===r)return n;return-1},f2={__proto__:null};ace&&Vx&&XN?l2(B5,function(t){var e=new jY[t];if(Symbol.toStringTag in e){var r=XN(e),n=Vx(r,Symbol.toStringTag);if(!n){var i=XN(r);n=Vx(i,Symbol.toStringTag)}f2["$"+t]=FY(n.get)}}):l2(B5,function(t){var e=new jY[t],r=e.slice||e.set;r&&(f2["$"+t]=FY(r))});var IFe=function(e){var r=!1;return l2(f2,function(n,i){if(!r)try{"$"+n(e)===i&&(r=wL(i,1))}catch{}}),r},PFe=function(e){var r=!1;return l2(f2,function(n,i){if(!r)try{n(e),r=wL(i,1)}catch{}}),r},oce=function(e){if(!e||typeof e!="object")return!1;if(!ace){var r=wL(SFe(e),8,-1);return OFe(B5,r)>-1?r:r!=="Object"?!1:PFe(e)}return Vx?IFe(e):null},TFe=oce,RFe=function(e){return!!TFe(e)},CFe=xm,NFe=tc,sce=ec,DFe=RFe,qY=sce("ArrayBuffer",!0),HY=sce("Float32Array",!0),Gx=NFe("ArrayBuffer.prototype.byteLength",!0),zY=qY&&!Gx&&new qY().slice,VY=zY&&CFe(zY),cce=Gx||VY?function(e){if(!e||typeof e!="object")return!1;try{return Gx?Gx(e):VY(e,0),!0}catch{return!1}}:HY?function(e){try{return new HY(e).buffer===e&&!DFe(e)}catch(r){return typeof e=="object"&&r.name==="RangeError"}}:function(e){return!1},$Fe=Date.prototype.getDay,MFe=function(e){try{return $Fe.call(e),!0}catch{return!1}},kFe=Object.prototype.toString,LFe="[object Date]",UFe=qp(),BFe=function(e){return typeof e!="object"||e===null?!1:UFe?MFe(e):kFe.call(e)===LFe},F5=tc,uce=qp(),lce,fce,j5,q5;if(uce){lce=F5("Object.prototype.hasOwnProperty"),fce=F5("RegExp.prototype.exec"),j5={};var ZN=function(){throw j5};q5={toString:ZN,valueOf:ZN},typeof Symbol.toPrimitive=="symbol"&&(q5[Symbol.toPrimitive]=ZN)}var FFe=F5("Object.prototype.toString"),jFe=Object.getOwnPropertyDescriptor,qFe="[object RegExp]",HFe=uce?function(e){if(!e||typeof e!="object")return!1;var r=jFe(e,"lastIndex"),n=r&&lce(r,"value");if(!n)return!1;try{fce(e,q5)}catch(i){return i===j5}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:FFe(e)===qFe},zFe=tc,GY=zFe("SharedArrayBuffer.prototype.byteLength",!0),VFe=GY?function(e){if(!e||typeof e!="object")return!1;try{return GY(e),!0}catch{return!1}}:function(e){return!1},GFe=Number.prototype.toString,WFe=function(e){try{return GFe.call(e),!0}catch{return!1}},KFe=Object.prototype.toString,YFe="[object Number]",QFe=qp(),JFe=function(e){return typeof e=="number"?!0:typeof e!="object"?!1:QFe?WFe(e):KFe.call(e)===YFe},dce=tc,XFe=dce("Boolean.prototype.toString"),ZFe=dce("Object.prototype.toString"),eje=function(e){try{return XFe(e),!0}catch{return!1}},tje="[object Boolean]",rje=qp(),nje=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:rje&&Symbol.toStringTag in e?eje(e):ZFe(e)===tje},H5={exports:{}},ije=Object.prototype.toString,aje=oL();if(aje){var oje=Symbol.prototype.toString,sje=/^Symbol\(.*\)$/,cje=function(e){return typeof e.valueOf()!="symbol"?!1:sje.test(oje.call(e))};H5.exports=function(e){if(typeof e=="symbol")return!0;if(ije.call(e)!=="[object Symbol]")return!1;try{return cje(e)}catch{return!1}}}else H5.exports=function(e){return!1};var uje=H5.exports,z5={exports:{}},WY=typeof BigInt<"u"&&BigInt,lje=function(){return typeof WY=="function"&&typeof BigInt=="function"&&typeof WY(42)=="bigint"&&typeof BigInt(42)=="bigint"},fje=lje();if(fje){var dje=BigInt.prototype.valueOf,hje=function(e){try{return dje.call(e),!0}catch{}return!1};z5.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:hje(e)}}else z5.exports=function(e){return!1};var pje=z5.exports,gje=Kse,yje=JFe,mje=nje,vje=uje,bje=pje,wje=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(gje(e))return"String";if(yje(e))return"Number";if(mje(e))return"Boolean";if(vje(e))return"Symbol";if(bje(e))return"BigInt"},d2=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,KY=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,h2;d2||(h2=function(e){return!1});var V5=d2?d2.prototype.has:null,e6=KY?KY.prototype.has:null;!h2&&!V5&&(h2=function(e){return!1});var _je=h2||function(e){if(!e||typeof e!="object")return!1;try{if(V5.call(e,V5),e6)try{e6.call(e,e6)}catch{return!0}return e instanceof d2}catch{}return!1},G5={exports:{}},Eje=ec,hce=tc,xje=Eje("%WeakSet%",!0),t6=hce("WeakSet.prototype.has",!0);if(t6){var r6=hce("WeakMap.prototype.has",!0);G5.exports=function(e){if(!e||typeof e!="object")return!1;try{if(t6(e,t6),r6)try{r6(e,r6)}catch{return!0}return e instanceof xje}catch{}return!1}}else G5.exports=function(e){return!1};var Aje=G5.exports,Sje=Qse,Oje=Xse,Ije=_je,Pje=Aje,Tje=function(e){if(e&&typeof e=="object"){if(Sje(e))return"Map";if(Oje(e))return"Set";if(Ije(e))return"WeakMap";if(Pje(e))return"WeakSet"}return!1},Rje=tc,YY=Rje("ArrayBuffer.prototype.byteLength",!0),Cje=cce,Nje=function(e){return Cje(e)?YY?YY(e):e.byteLength:NaN},pce=dUe,Nu=tc,QY=kUe,Dje=ec,zy=KBe,$je=Gse,JY=nFe,XY=Bse,ZY=Wse,eQ=cce,tQ=BFe,rQ=HFe,nQ=VFe,iQ=aL,aQ=wje,oQ=Tje,sQ=oce,cQ=Nje,uQ=Nu("SharedArrayBuffer.prototype.byteLength",!0),lQ=Nu("Date.prototype.getTime"),n6=Object.getPrototypeOf,fQ=Nu("Object.prototype.toString"),p2=Dje("%Set%",!0),W5=Nu("Map.prototype.has",!0),g2=Nu("Map.prototype.get",!0),dQ=Nu("Map.prototype.size",!0),y2=Nu("Set.prototype.add",!0),gce=Nu("Set.prototype.delete",!0),m2=Nu("Set.prototype.has",!0),Wx=Nu("Set.prototype.size",!0);function hQ(t,e,r,n){for(var i=zy(t),a;(a=i.next())&&!a.done;)if($c(e,a.value,r,n))return gce(t,a.value),!0;return!1}function yce(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 Mje(t,e,r,n,i,a){var o=yce(r);if(o!=null)return o;var s=g2(e,o),c=pce({},i,{strict:!1});return typeof s>"u"&&!W5(e,o)||!$c(n,s,c,a)?!1:!W5(t,o)&&$c(n,s,c,a)}function kje(t,e,r){var n=yce(r);return n??(m2(e,n)&&!m2(t,n))}function pQ(t,e,r,n,i,a){for(var o=zy(t),s,c;(s=o.next())&&!s.done;)if(c=s.value,$c(r,c,i,a)&&$c(n,g2(e,c),i,a))return gce(t,c),!0;return!1}function $c(t,e,r,n){var i=r||{};if(i.strict?JY(t,e):t===e)return!0;var a=aQ(t),o=aQ(e);if(a!==o)return!1;if(!t||!e||typeof t!="object"&&typeof e!="object")return i.strict?JY(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),Bje(t,e,i,n)}function gQ(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 Lje(t,e,r,n){if(Wx(t)!==Wx(e))return!1;for(var i=zy(t),a=zy(e),o,s,c;(o=i.next())&&!o.done;)if(o.value&&typeof o.value=="object")c||(c=new p2),y2(c,o.value);else if(!m2(e,o.value)){if(r.strict||!kje(t,e,o.value))return!1;c||(c=new p2),y2(c,o.value)}if(c){for(;(s=a.next())&&!s.done;)if(s.value&&typeof s.value=="object"){if(!hQ(c,s.value,r.strict,n))return!1}else if(!r.strict&&!m2(t,s.value)&&!hQ(c,s.value,r.strict,n))return!1;return Wx(c)===0}return!0}function Uje(t,e,r,n){if(dQ(t)!==dQ(e))return!1;for(var i=zy(t),a=zy(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 p2),y2(c,u);else if(d=g2(e,u),typeof d>"u"&&!W5(e,u)||!$c(f,d,r,n)){if(r.strict||!Mje(t,e,u,f,r,n))return!1;c||(c=new p2),y2(c,u)}if(c){for(;(s=a.next())&&!s.done;)if(u=s.value[0],d=s.value[1],u&&typeof u=="object"){if(!pQ(c,t,u,d,r,n))return!1}else if(!r.strict&&(!t.has(u)||!$c(g2(t,u),d,r,n))&&!pQ(c,t,u,d,pce({},r,{strict:!1}),n))return!1;return Wx(c)===0}return!0}function Bje(t,e,r,n){var i,a;if(typeof t!=typeof e||t==null||e==null||fQ(t)!==fQ(e)||XY(t)!==XY(e))return!1;var o=ZY(t),s=ZY(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=rQ(t),d=rQ(e);if(f!==d||(f||d)&&(t.source!==e.source||QY(t)!==QY(e)))return!1;var g=tQ(t),m=tQ(e);if(g!==m||(g||m)&&lQ(t)!==lQ(e)||r.strict&&n6&&n6(t)!==n6(e))return!1;var w=sQ(t),v=sQ(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=gQ(t),_=gQ(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=eQ(t),S=eQ(e);if(b!==S)return!1;if(b||S)return cQ(t)!==cQ(e)?!1:typeof Uint8Array=="function"&&$c(new Uint8Array(t),new Uint8Array(e),r,n);var x=nQ(t),O=nQ(e);if(x!==O)return!1;if(x||O)return uQ(t)!==uQ(e)?!1:typeof Uint8Array=="function"&&$c(new Uint8Array(t),new Uint8Array(e),r,n);if(typeof t!=typeof e)return!1;var E=iQ(t),p=iQ(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],!$c(t[a],e[a],r,n))return!1;var I=oQ(t),C=oQ(e);return I!==C?!1:I==="Set"||C==="Set"?Lje(t,e,r,n):I==="Map"?Uje(t,e,r,n):!0}var Fje=function(e,r,n){return $c(e,r,n,$je())},DO={},jje=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(DO,"__esModule",{value:!0});DO.createDebounce=void 0;function qje(){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,jje([e,r],n,!1))}}DO.createDebounce=qje;var $O={},MO={};Object.defineProperty(MO,"__esModule",{value:!0});function mce(){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}MO.future=mce;MO.default=mce;var Hje=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($O,"__esModule",{value:!0});$O.createController=void 0;var zje=po,Vje=Hje(MO),v2=nO,vce=new Map,K5=new Map;window.onmessage=function(e){if(e.data&&e.data.type)switch(e.data.type){case v2.PreviewMessageType.CONTROLLER_RESPONSE:{var r=e.data.payload,n=r.id,i=vce.get(n);i&&(r.ok?i.resolve(r.result):r.ok===!1&&i.reject(new Error(r.error)));break}case v2.PreviewMessageType.EMOTE_EVENT:{var r=e.data.payload,a=r.type,o=r.payload,s=K5.get(e.source);s&&a&&s.emit(a,o);break}}};var yQ=0;function Gje(t){return function(r,n,i){var a=document.getElementById(t),o=t+"-"+yQ,s=(0,Vje.default)();vce.set(o,s);var c=v2.PreviewMessageType.CONTROLLER_REQUEST,u={id:o,namespace:r,method:n,params:i};return(0,v2.sendMessage)(a.contentWindow,c,u),yQ++,s}}function Wje(t){var e,r=document.getElementById(t);if(!r)throw new Error('Could not find an iframe with id="'.concat(t,'"'));var n=(e=K5.get(r.contentWindow))!==null&&e!==void 0?e:new zje.EventEmitter;K5.set(r.contentWindow,n);var i=Gje(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}}}$O.createController=Wje;var kO={},ig={},LO={},i6={},dh={},mQ;function Kje(){if(mQ)return dh;mQ=1,Object.defineProperty(dh,"__esModule",{value:!0}),dh.getEnvFromQueryParam=dh.getEnvFromTLD=void 0;const t=_L();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}dh.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 dh.getEnvFromQueryParam=r,dh}var vQ;function _L(){return vQ||(vQ=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=Kje();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}(i6)),i6}Object.defineProperty(LO,"__esModule",{value:!0});LO.createConfig=void 0;const Yje=_L();function Qje(t,e){const r=(0,Yje.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}}LO.createConfig=Qje;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnv=t.Env=t.createConfig=void 0;var e=LO;Object.defineProperty(t,"createConfig",{enumerable:!0,get:function(){return e.createConfig}});var r=_L();Object.defineProperty(t,"Env",{enumerable:!0,get:function(){return r.Env}}),Object.defineProperty(t,"getEnv",{enumerable:!0,get:function(){return r.getEnv}})})(ig);const Jje="https://wearable-preview.decentraland.zone",Xje="https://decentraland.zone/account",Zje="https://decentraland.zone/profile",eqe="https://decentraland.zone/marketplace",tqe="https://decentraland.zone/builder",rqe="https://decentraland.zone/dao",nqe="https://decentraland.zone/governance",iqe="https://decentraland.zone/events",aqe="https://decentraland.zone/places",oqe={WEARABLE_PREVIEW_URL:Jje,ACCOUNT_URL:Xje,PROFILE_URL:Zje,MARKETPLACE_URL:eqe,BUILDER_URL:tqe,DAO_URL:rqe,GOVERNANCE_URL:nqe,EVENTS_URL:iqe,PLACES_URL:aqe},sqe="https://wearable-preview.decentraland.today",cqe="https://decentraland.today/account",uqe="https://decentraland.today/profile",lqe="https://decentraland.today/marketplace",fqe="https://decentraland.today/builder",dqe="https://decentraland.today/dao",hqe="https://decentraland.today/governance",pqe="https://decentraland.today/events",gqe="https://decentraland.today/places",yqe={WEARABLE_PREVIEW_URL:sqe,ACCOUNT_URL:cqe,PROFILE_URL:uqe,MARKETPLACE_URL:lqe,BUILDER_URL:fqe,DAO_URL:dqe,GOVERNANCE_URL:hqe,EVENTS_URL:pqe,PLACES_URL:gqe},mqe="https://wearable-preview.decentraland.org",vqe="https://decentraland.org/account",bqe="https://decentraland.org/profile",wqe="https://decentraland.org/marketplace",_qe="https://decentraland.org/builder",Eqe="https://decentraland.org/dao",xqe="https://decentraland.org/governance",Aqe="https://decentraland.org/events",Sqe="https://decentraland.org/places",Oqe={WEARABLE_PREVIEW_URL:mqe,ACCOUNT_URL:vqe,PROFILE_URL:bqe,MARKETPLACE_URL:wqe,BUILDER_URL:_qe,DAO_URL:Eqe,GOVERNANCE_URL:xqe,EVENTS_URL:Aqe,PLACES_URL:Sqe};var EL=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Xv;Object.defineProperty(kO,"__esModule",{value:!0});kO.config=void 0;var GE=ig,Iqe=EL(oqe),Pqe=EL(yqe),Tqe=EL(Oqe);kO.config=(0,GE.createConfig)((Xv={},Xv[GE.Env.DEVELOPMENT]=Iqe.default,Xv[GE.Env.STAGING]=Pqe.default,Xv[GE.Env.PRODUCTION]=Tqe.default,Xv));var Rqe=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)}}(),Cqe=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]}),Nqe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Dqe=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)&&Cqe(e,t,r);return Nqe(e,t),e},$qe=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},Mqe=Ne&&Ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iL,"__esModule",{value:!0});var bce=iL.WearablePreview=void 0,bQ=Dqe(ze),kqe=Mqe(Fje),Zv=nO,Lqe=DO,Uqe=$O,Bqe=kO,Fqe=(0,Lqe.createDebounce)(),jqe=function(t){Rqe(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,Y=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):"",Ve=a?"token=".concat(a):"",tt=o?"item=".concat(o):"",vt=s?"profile=".concat(s):"",bt=c&&c.length>0?c.map(function(ue){return"urn=".concat(ue)}).join("&"):"",yt=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),Vt=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":"",oi=U?"disableAutoCenter":"",Dn=Y?"disableFace":"",$n=ne?"disableDefaultWearables":"",Yn=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":"",Ze=M?"lockBeta=true":"",ct=G?"lockRadius=true":"",ft=ge?"env=dev":"",Et=Q+"?"+[fe,Ve,tt,vt,bt,yt,Lt,Yt,wr,Rt,Pt,kt,Nt,Kt,Ut,Vt,$t,Dt,qt,Mt,cr,tr,ir,nr,mr,wn,Yr,oi,Dn,$n,Yn,xr,$r,_r,_e,ee,ve,Re,He,Ze,ct,ft].filter(function(ue){return!!ue}).join("&");return Et},r.getOptions=function(){var n=r.props;n.dev;var i=$qe(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 Zv.PreviewMessageType.LOAD:{o();break}case Zv.PreviewMessageType.ERROR:{var f=n.data.payload;s(new Error(f.message));break}case Zv.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,kqe.default)(n,i)){(0,Zv.sendMessage)(r.iframe.contentWindow,Zv.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,Uqe.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(){Fqe(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"),bQ.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:Bqe.config.get("WEARABLE_PREVIEW_URL"),onLoad:function(){},onError:function(){},onUpdate:function(){}},e}(bQ.PureComponent);bce=iL.WearablePreview=jqe;const qqe="https://auth-api.decentraland.zone",Hqe={AUTH_SERVER_URL:qqe},zqe="https://auth-api.decentraland.org",Vqe={AUTH_SERVER_URL:zqe},Gqe="https://auth-api.decentraland.today",Wqe={AUTH_SERVER_URL:Gqe},Kqe=ig.createConfig({[ig.Env.DEVELOPMENT]:Hqe,[ig.Env.STAGING]:Wqe,[ig.Env.PRODUCTION]:Vqe},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:{}.VITE_REACT_APP_DCL_DEFAULT_ENV??"dev"}}),Yqe="_background_19zmp_1",Qqe="_main_19zmp_20",Jqe="_left_19zmp_30",Xqe="_right_19zmp_39",Zqe="_changeAccount_19zmp_53",eHe="_errorLogo_19zmp_59",tHe="_logo_19zmp_68",rHe="_title_19zmp_74",nHe="_description_19zmp_81",iHe="_code_19zmp_88",aHe="_buttons_19zmp_95",oHe="_closeWindow_19zmp_105",Vr={background:Yqe,main:Qqe,left:Jqe,right:Xqe,changeAccount:Zqe,errorLogo:eHe,logo:tHe,title:rHe,description:nHe,code:iHe,buttons:aHe,closeWindow:oHe},sHe=()=>{const t=sme(),e=Iw(),[r,n]=ze.useState(2),i=ze.useRef(),a=ze.useRef(),o=ze.useRef(),s=ze.useRef(),c=t.requestId??"",u=ze.useCallback(async()=>new RA(await Dc.connection.getProvider()),[]),f=ze.useCallback(()=>{e(`/login?redirectTo=/auth/requests/${c}&fromRequests=true`)},[]);ze.useEffect(()=>((async()=>{try{await Dc.connection.tryPreviousConnection()}catch{f();return}try{const _=await a6("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)}),[]),ze.useEffect(()=>{r!==4&&r!==8&&clearTimeout(o.current)},[r]);const d=ze.useCallback(()=>{n(5)},[]),g=ze.useCallback(async()=>{const b=await(await u()).getSigner(),S=await b.signMessage(i.current.params[0]),x=await a6("outcome",{requestId:c,sender:await b.getAddress(),result:S});x.error?(a.current=x.error,n(6)):n(7)},[u]),m=ze.useCallback(()=>{n(9)},[]),w=ze.useCallback(async()=>{const _=await u(),b=await _.getSigner(),S=await _.send(i.current.method,i.current.params),x=await a6("outcome",{requestId:c,sender:await b.getAddress(),result:S});x.error?(a.current=x.error,n(10)):n(11)},[u]),v=ze.useCallback(async()=>{await Dc.connection.disconnect(),f()},[]),y=ze.useCallback(_=>We.jsxs("div",{children:[We.jsx("div",{className:Vr.background}),We.jsxs("div",{className:Vr.main,children:[We.jsx("div",{className:Vr.left,children:_.children}),We.jsx("div",{className:Vr.right,children:s.current?We.jsxs(We.Fragment,{children:[We.jsx(bce,{lockBeta:!0,panning:!1,disableBackground:!0,profile:s.current,dev:!1}),We.jsx("div",{className:Vr.changeAccount,children:We.jsx(Ls.Button,{inverted:!0,onClick:v,children:"Change Account"})})]}):null})]})]}),[]);return r===0?We.jsxs(y,{children:[We.jsx("div",{className:Vr.errorLogo}),We.jsx("div",{className:Vr.title,children:"Looks like you took too long and the request has expired"}),We.jsx("div",{className:Vr.description,children:"Please return to Decentraland's Desktop App to try again."}),We.jsx(hh,{})]}):r===1?We.jsxs(y,{children:[We.jsx("div",{className:Vr.errorLogo}),We.jsx("div",{className:Vr.title,children:"Looks like you are connected with a different account."}),We.jsx("div",{className:Vr.description,children:"Please change your wallet account to the one connected to the Desktop App."})]}):r===2?We.jsx(y,{children:We.jsx("div",{className:Vr.left,children:We.jsx(TO,{active:!0,size:"huge"})})}):r===3?We.jsxs(y,{children:[We.jsx("div",{className:Vr.errorLogo}),We.jsx("div",{className:Vr.title,children:"There was an error recovering the request..."}),We.jsx("div",{className:Vr.description,children:"The request is not available anymore. Feel free to create a new one and try again."}),We.jsx(hh,{})]}):r===4&&i.current?We.jsxs(y,{children:[We.jsx("div",{className:Vr.logo}),We.jsx("div",{className:Vr.title,children:"Verify Sign In"}),We.jsx("div",{className:Vr.description,children:"Do you see the same verification number on your Desktop App?"}),We.jsx("div",{className:Vr.code,children:i.current.code}),We.jsxs("div",{className:Vr.buttons,children:[We.jsx(Ls.Button,{inverted:!0,onClick:d,children:"No"}),We.jsx(Ls.Button,{primary:!0,onClick:g,children:"Yes, they are the same"})]})]}):r===5?We.jsxs(y,{children:[We.jsx("div",{className:Vr.errorLogo}),We.jsx("div",{className:Vr.title,children:"Did the number not match, or was this action not taken by you?"}),We.jsx("div",{className:Vr.description,children:"If you're trying to sign in, retry the action. If this action was not initiated by you, dismiss this message."}),We.jsx(hh,{})]}):r===7?We.jsxs(y,{children:[We.jsx("div",{className:Vr.logo}),We.jsx("div",{className:Vr.title,children:"Your account is ready!"}),We.jsx("div",{className:Vr.description,children:"Return to the Desktop App and enjoy Decentraland."}),We.jsx(hh,{})]}):r===8&&i.current?We.jsxs(y,{children:[We.jsx("div",{className:Vr.logo}),We.jsx("div",{className:Vr.title,children:"The Desktop App wants to interact with your wallet."}),We.jsx("div",{className:Vr.description,children:"Review the following data carefully on your wallet before approving it."}),We.jsxs("div",{className:Vr.buttons,children:[We.jsx(Ls.Button,{inverted:!0,onClick:m,children:"Deny"}),We.jsx(Ls.Button,{primary:!0,onClick:w,children:"Allow"})]})]}):r===9?We.jsxs(y,{children:[We.jsx("div",{className:Vr.errorLogo}),We.jsx("div",{className:Vr.title,children:"Was this action not initiated by you?"}),We.jsx("div",{className:Vr.description,children:"If this action was not initiated by you, dismiss this message."}),We.jsx(hh,{})]}):r===11?We.jsxs(y,{children:[We.jsx("div",{className:Vr.logo}),We.jsx("div",{className:Vr.title,children:"Wallet interaction complete"}),We.jsx("div",{className:Vr.description,children:"The action has been executed successfuly."}),We.jsx(hh,{})]}):r===6||r===10?We.jsxs(y,{children:[We.jsx("div",{className:Vr.errorLogo}),We.jsx("div",{className:Vr.title,children:"There was an error while trying to submit the request."}),We.jsx("div",{className:Vr.description,children:"Return to the Desktop App to try again, or contant support if the error persists."}),We.jsx(hh,{})]}):null},hh=()=>We.jsx("div",{className:Vr.closeWindow,children:"You can close this window."}),a6=async(t,e)=>{const r=Kqe.get("AUTH_SERVER_URL"),n=Bx(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},cHe=()=>{const t=Iw(),e=Ow(),r=ze.useCallback(async()=>{try{const n=await Dc.connection.tryPreviousConnection();return!!(n.account&&n.provider)}catch{return!1}},[]);return ze.useEffect(()=>{r().then(n=>{t(n?"/user":{pathname:"/login",search:e.search})})},[r,t]),We.jsx(TO,{active:!0,size:"huge"})},wce=()=>{const t=Ow(),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 UO={},BO=br;UO.__esModule=!0;var xL=UO.default=void 0,uHe=BO(Fn()),lHe=BO(ai);BO(Un());var fHe=BO(ze),H0=Kn();function Ep(t){var e=t.children,r=t.className,n=t.content,i=t.image,a=t.scrolling,o=(0,lHe.default)(r,(0,H0.useKeyOnly)(i,"image"),(0,H0.useKeyOnly)(a,"scrolling"),"content"),s=(0,H0.getUnhandledProps)(Ep,t),c=(0,H0.getElementType)(Ep,t);return fHe.default.createElement(c,(0,uHe.default)({},s,{className:o}),H0.childrenUtils.isNil(e)?n:e)}Ep.handledProps=["as","children","className","content","image","scrolling"];Ep.propTypes={};Ep.create=(0,H0.createShorthandFactory)(Ep,function(t){return{content:t}});var dHe=Ep;xL=UO.default=dHe;var AL={},FO={},o6,wQ;function hHe(){if(wQ)return o6;wQ=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 o6=t,o6}var s6,_Q;function pHe(){if(_Q)return s6;_Q=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 s6=t,s6}var c6,EQ;function _ce(){if(EQ)return c6;EQ=1;var t=hHe(),e=Bw(),r=Td(),n=pHe(),i=$i();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 c6=a,c6}var u6,xQ;function Ece(){return xQ||(xQ=1,u6=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}),u6}var WE={},AQ;function gHe(){if(AQ)return WE;AQ=1;var t=br;WE.__esModule=!0;var e=t($S());return WE.default=e.default,WE}var eb={},KE={},SQ;function yHe(){if(SQ)return KE;SQ=1;var t=br;KE.__esModule=!0;var e=t(sM());return KE.default=e.default,KE}var OQ;function mHe(){if(OQ)return eb;OQ=1;var t=Qs,e=br;eb.__esModule=!0,eb.default=void 0;var r=e(Fn()),n=e(jc()),i=e(DS()),a=e(Js()),o=e(ai);e(Un());var s=t(ze),c=Kn(),u=e(yHe()),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 eb.default=f,f.handledProps=["actions","as","children","className","content","onActionClick"],f.propTypes={},f.create=(0,c.createShorthandFactory)(f,function(d){return{actions:d}}),eb}var tb={},IQ;function vHe(){if(IQ)return tb;IQ=1;var t=br;tb.__esModule=!0,tb.default=void 0;var e=t(Fn()),r=t(ai);t(Un());var n=t(ze),i=Kn();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 tb.default=o,tb}var rb={},PQ;function bHe(){if(PQ)return rb;PQ=1;var t=br;rb.__esModule=!0,rb.default=void 0;var e=t(Fn()),r=Id,n=t(ai);t(Un());var i=t(ze),a=Kn();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 rb.default=s,rb}var nb={},TQ;function wHe(){if(TQ)return nb;TQ=1;var t=br;nb.__esModule=!0,nb.default=void 0;var e=t(Fn()),r=t(ai);t(Un());var n=t(ze),i=Kn();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 nb.default=o,nb}var Xu={},RQ;function _He(){if(RQ)return Xu;RQ=1,Xu.__esModule=!0,Xu.isLegacy=Xu.getLegacyStyles=Xu.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};Xu.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}};Xu.getLegacyStyles=n;var i=function(){return!window.ActiveXObject&&"ActiveXObject"in window};return Xu.isLegacy=i,Xu}var EHe=Qs,ra=br;FO.__esModule=!0;FO.default=void 0;var T0=ra(Fn()),xHe=ra(jc()),AHe=ra(NS()),SHe=ra(rM()),OHe=ra(iM()),IHe=ra(_ce()),PHe=ra(Ere()),bf=ra(Js()),CQ=Id,THe=ra(ai);ra(Un());var Zu=EHe(ze),RHe=ra(Ece()),Ta=Kn(),CHe=ra(gHe()),NQ=ra(oM()),xce=ra(mHe()),Ace=ra(UO),NHe=ra(vHe()),Sce=ra(bHe()),Oce=ra(wHe()),l6=_He(),Du=function(t){(0,xHe.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,Ta.isBrowser)()&&(0,l6.isLegacy)(),n.ref=(0,Zu.createRef)(),n.dimmerRef=(0,Zu.createRef)(),n.latestDocumentMouseDownEvent=null,n.getMountNode=function(){return(0,Ta.isBrowser)()?n.props.mountNode||document.body:null},n.handleActionsOverrides=function(s){return{onActionClick:function(u,f){(0,bf.default)(s,"onActionClick",u,f),(0,bf.default)(n.props,"onActionClick",u,n.props),n.handleClose(u)}}},n.handleClose=function(s){n.setState({open:!1}),(0,bf.default)(n.props,"onClose",s,(0,T0.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,Ta.doesNodeContainClick)(n.ref.current,u)||(0,Ta.doesNodeContainClick)(n.ref.current,s))&&(n.setState({open:!1}),(0,bf.default)(n.props,"onClose",s,(0,T0.default)({},n.props,{open:!1})))},n.handleIconOverrides=function(s){return{onClick:function(u){(0,bf.default)(s,"onClick",u),n.handleClose(u)}}},n.handleOpen=function(s){(0,bf.default)(n.props,"onOpen",s,(0,T0.default)({},n.props,{open:!0})),n.setState({open:!0})},n.handlePortalMount=function(s){var c=n.props.eventPool;n.setState({scrolling:!1}),n.setPositionAndClassNames(),Ta.eventStack.sub("mousedown",n.handleDocumentMouseDown,{pool:c,target:n.dimmerRef.current}),Ta.eventStack.sub("click",n.handleDocumentClick,{pool:c,target:n.dimmerRef.current}),(0,bf.default)(n.props,"onMount",s,n.props)},n.handlePortalUnmount=function(s){var c=n.props.eventPool;cancelAnimationFrame(n.animationRequestId),Ta.eventStack.unsub("mousedown",n.handleDocumentMouseDown,{pool:c,target:n.dimmerRef.current}),Ta.eventStack.unsub("click",n.handleDocumentClick,{pool:c,target:n.dimmerRef.current}),(0,bf.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,l6.canFit)(f);c=!d;var g=n.legacy?(0,l6.getLegacyStyles)(d,s,f):{};(0,RHe.default)(n.state.legacyStyles,g)||(u.legacyStyles=g),n.state.scrolling!==c&&(u.scrolling=c)}(0,PHe.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,THe.default)("ui",y,(0,Ta.useKeyOnly)(f,"basic"),(0,Ta.useKeyOnly)(n.legacy,"legacy"),(0,Ta.useKeyOnly)(x,"scrolling"),"modal transition visible active",g),E=(0,Ta.getElementType)(e,n.props),p=m===!0?"close":m,I=CHe.default.create(p,{overrideProps:n.handleIconOverrides});return Zu.default.createElement(CQ.Ref,{innerRef:n.ref},Zu.default.createElement(E,(0,T0.default)({},s,{className:O,style:(0,T0.default)({},S,_)}),I,Ta.childrenUtils.isNil(d)?Zu.default.createElement(Zu.default.Fragment,null,Oce.default.create(v,{autoGenerateKey:!1}),Ace.default.create(w,{autoGenerateKey:!1}),xce.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,Ta.isBrowser)())return(0,Zu.isValidElement)(u)?u:null;var w=(0,Ta.getUnhandledProps)(e,this.props),v=NQ.default.handledProps,y=(0,IHe.default)(w,function(b,S,x){return(0,OHe.default)(v,x)||(b[x]=S),b},{}),_=(0,SHe.default)(w,v);return Zu.default.createElement(NQ.default,(0,T0.default)({closeOnDocumentClick:o},_,{trigger:u,eventPool:c,mountNode:m,open:d,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount}),Zu.default.createElement(CQ.Ref,{innerRef:this.dimmerRef},Sce.default.create((0,AHe.default)(s)?s:{},{autoGenerateKey:!1,defaultProps:{blurring:s==="blurring",inverted:s==="inverted"},overrideProps:{children:this.renderContent(y),centered:a,mountNode:m,scrolling:g}})))},e}(Ta.ModernAutoControlledComponent);Du.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"];Du.propTypes={};Du.defaultProps={centered:!0,dimmer:!0,closeOnDimmerClick:!0,closeOnDocumentClick:!1,eventPool:"Modal"};Du.autoControlledProps=["open"];Du.Actions=xce.default;Du.Content=Ace.default;Du.Description=NHe.default;Du.Dimmer=Sce.default;Du.Header=Oce.default;var DHe=Du;FO.default=DHe;(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=FO;Object.defineProperty(t,"Modal",{enumerable:!0,get:function(){return e(r).default}})})(AL);var SL={};var $He=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)}}(),MHe=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]}),kHe=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),LHe=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)&&MHe(e,t,r);return kHe(e,t),e};Object.defineProperty(SL,"__esModule",{value:!0});var OL=SL.ModalNavigation=void 0,ph=LHe(ze),UHe=function(t){$He(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 ph.createElement("div",{className:"dcl modal-navigation"},ph.createElement("div",{className:"dcl modal-navigation-title"},n),i&&ph.createElement("div",{className:"dcl modal-navigation-subtitle"},i),a&&ph.createElement("div",{className:"dcl modal-navigation-button modal-navigation-back",onClick:a}),s&&ph.createElement("div",{className:"dcl modal-navigation-button modal-navigation-info",onClick:s}),o&&ph.createElement("div",{className:"dcl modal-navigation-button modal-navigation-close",onClick:o}))},e}(ph.PureComponent);OL=SL.ModalNavigation=UHe;const BHe="https://cdn.decentraland.org/@dcl/auth-site/0.1.3-7378840092.commit-24eec55/assets/warning-057948e8.svg";var Ci=(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))(Ci||{});function FHe(t,e){switch(t){case Ci.ERROR:return"You did not confirm this action in your digital wallet extension. To continue, please try again.";case Ci.CONNECTING_WALLET:case Ci.WAITING_FOR_SIGNATURE:return e===ql.ProviderType.MAGIC?"Almost done! Confirm your request to login Decentraland":"Confirm in your digital wallet extension to continue.";case Ci.VALIDATING_SIGN_IN:return"Just a moment, we're verifying your login credentials...";case Ci.LOADING_MAGIC:return"Redirecting..."}}const jHe="_main_1qx1l_1",qHe="_content_1qx1l_8",HHe="_errorImage_1qx1l_16",zHe="_message_1qx1l_22",VHe="_loader_1qx1l_29",ib={main:jHe,content:qHe,errorImage:HHe,message:zHe,loader:VHe},Ice=t=>{const{open:e,state:r,providerType:n,onClose:i,onTryAgain:a}=t,o=r===Ci.CONNECTING_WALLET||r===Ci.WAITING_FOR_SIGNATURE||r===Ci.LOADING_MAGIC||r===Ci.VALIDATING_SIGN_IN;return We.jsxs(AL.Modal,{size:"tiny",open:e,children:[We.jsx(OL,{title:"",onClose:o?void 0:i}),We.jsx("div",{className:ib.main,children:We.jsxs("div",{className:ib.content,children:[r===Ci.ERROR&&We.jsx("img",{className:ib.errorImage,src:BHe}),o&&We.jsx(TO,{className:ib.loader,size:"huge",inline:!0}),We.jsx("p",{className:ib.message,children:FHe(r,n)}),r===Ci.ERROR&&We.jsx(Ls.Button,{primary:!0,onClick:a,children:"Try again"})]})}),We.jsx(xL,{})]})};var Pce={},Tce={},Y5={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 za=="object"&&za.versions&&za.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],Xt=[0,8,16,24],Ti=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],xn=[224,256,384,512],St=[128,256],ci=["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 or(R,oe,R).update(se)[we]()}},mi=function(R,oe,we){return function(se,Ae){return new or(R,oe,Ae).update(se)[we]()}},go=function(R,oe,we){return function(se,Ae,Ie,Pe){return Ar["cshake"+R].update(se,Ae,Ie,Pe)[we]()}},Hi=function(R,oe,we){return function(se,Ae,Ie,Pe){return Ar["kmac"+R].update(se,Ae,Ie,Pe)[we]()}},vi=function(R,oe,we,se){for(var Ae=0;Ae<ci.length;++Ae){var Ie=ci[Ae];R[Ie]=oe(we,se,Ie)}return R},yo=function(R,oe){var we=fn(R,oe,"hex");return we.create=function(){return new or(R,oe,R)},we.update=function(se){return we.create().update(se)},vi(we,fn,R,oe)},tn=[{name:"keccak",padding:[1,256,65536,16777216],bits:xn,createMethod:yo},{name:"sha3",padding:[6,1536,393216,100663296],bits:xn,createMethod:yo},{name:"shake",padding:[31,7936,2031616,520093696],bits:St,createMethod:function(R,oe){var we=mi(R,oe,"hex");return we.create=function(se){return new or(R,oe,se)},we.update=function(se,Ae){return we.create(Ae).update(se)},vi(we,mi,R,oe)}},{name:"cshake",padding:Ft,bits:St,createMethod:function(R,oe){var we=An[R],se=go(R,0,"hex");return se.create=function(Ae,Ie,Pe){return Ie||Pe?new or(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)},vi(se,go,R,oe)}},{name:"kmac",padding:Ft,bits:St,createMethod:function(R,oe){var we=An[R],se=Hi(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)},vi(se,Hi,R,oe)}}],Ar={},de=[],ke=0;ke<tn.length;++ke)for(var it=tn[ke],Ke=it.bits,Qr=0;Qr<Ke.length;++Qr){var fr=it.name+"_"+Ke[Qr];if(de.push(fr),Ar[fr]=it.createMethod(Ke[Qr],it.padding),it.name!=="sha3"){var yn=it.name+Ke[Qr];de.push(yn),Ar[yn]=Ar[fr]}}function or(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){or.call(this,R,oe,we)}or.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,Ye=this.blockCount,qe=0,gt=this.s;qe<Be;){if(this.reset)for(this.reset=!1,Ie[0]=this.block,se=1;se<Ye+1;++se)Ie[se]=0;if(oe)for(se=this.start;qe<Be&&se<Pe;++qe)Ie[se>>2]|=R[qe]<<Xt[3&se++];else for(se=this.start;qe<Be&&se<Pe;++qe)(Ae=R.charCodeAt(qe))<128?Ie[se>>2]|=Ae<<Xt[3&se++]:Ae<2048?(Ie[se>>2]|=(192|Ae>>6)<<Xt[3&se++],Ie[se>>2]|=(128|63&Ae)<<Xt[3&se++]):Ae<55296||Ae>=57344?(Ie[se>>2]|=(224|Ae>>12)<<Xt[3&se++],Ie[se>>2]|=(128|Ae>>6&63)<<Xt[3&se++],Ie[se>>2]|=(128|63&Ae)<<Xt[3&se++]):(Ae=65536+((1023&Ae)<<10|1023&R.charCodeAt(++qe)),Ie[se>>2]|=(240|Ae>>18)<<Xt[3&se++],Ie[se>>2]|=(128|Ae>>12&63)<<Xt[3&se++],Ie[se>>2]|=(128|Ae>>6&63)<<Xt[3&se++],Ie[se>>2]|=(128|63&Ae)<<Xt[3&se++]);if(this.lastByteIndex=se,se>=Pe){for(this.start=se-Pe,this.block=Ie[Ye],se=0;se<Ye;++se)gt[se]^=Ie[se];ie(gt),this.reset=!0}else this.start=se}return this},or.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},or.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},or.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},or.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)}},or.prototype.toString=or.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},or.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 Ye=new Uint32Array(R);Pe<se;){for(Ie=0;Ie<oe&&Pe<se;++Ie,++Pe)Ye[Pe]=we[Ie];Pe%oe==0&&ie(we)}return Ae&&(Ye[Ie]=we[Ie],R=R.slice(0,Be)),R},or.prototype.buffer=or.prototype.arrayBuffer,or.prototype.digest=or.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,Ye=[];Be<Ae;){for(Pe=0;Pe<we&&Be<Ae;++Pe,++Be)R=Be<<2,oe=se[Pe],Ye[R]=255&oe,Ye[R+1]=oe>>8&255,Ye[R+2]=oe>>16&255,Ye[R+3]=oe>>24&255;Be%we==0&&ie(se)}return Ie&&(R=Be<<2,oe=se[Pe],Ye[R]=255&oe,Ie>1&&(Ye[R+1]=oe>>8&255),Ie>2&&(Ye[R+2]=oe>>16&255)),Ye},yr.prototype=new or,yr.prototype.finalize=function(){return this.encode(this.outputBits,!0),or.prototype.finalize.call(this)};var ie=function(R){var oe,we,se,Ae,Ie,Pe,Be,Ye,qe,gt,rr,Wt,Jr,Pn,dn,Mr,Xr,Sr,zi,cs,zc,ki,us,Li,hi,Sn,$u,rc,Hp,Bd,Fd,Zl,ef,jd,zp,tf,rf,Vp,qd,Vi,nf,Vc,Hd,zd,Gp,Wp,Kp,Yp,Qp,nc,Jp,Xp,af,Vd,jo,Mu,Zp,e0,t0,ic,xa,Gd,r0;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],Ye=R[4]^R[14]^R[24]^R[34]^R[44],qe=R[5]^R[15]^R[25]^R[35]^R[45],gt=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^(Ye<<1|qe>>>31),we=Ie^(qe<<1|Ye>>>31),R[2]^=oe,R[3]^=we,R[12]^=oe,R[13]^=we,R[22]^=oe,R[23]^=we,R[32]^=oe,R[33]^=we,R[42]^=oe,R[43]^=we,oe=Pe^(gt<<1|rr>>>31),we=Be^(rr<<1|gt>>>31),R[4]^=oe,R[5]^=we,R[14]^=oe,R[15]^=we,R[24]^=oe,R[25]^=we,R[34]^=oe,R[35]^=we,R[44]^=oe,R[45]^=we,oe=Ye^(Wt<<1|Jr>>>31),we=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=gt^(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],Wp=R[11]<<4|R[10]>>>28,Kp=R[10]<<4|R[11]>>>28,rc=R[20]<<3|R[21]>>>29,Hp=R[21]<<3|R[20]>>>29,ic=R[31]<<9|R[30]>>>23,xa=R[30]<<9|R[31]>>>23,Vc=R[40]<<18|R[41]>>>14,Hd=R[41]<<18|R[40]>>>14,jd=R[2]<<1|R[3]>>>31,zp=R[3]<<1|R[2]>>>31,Mr=R[13]<<12|R[12]>>>20,Xr=R[12]<<12|R[13]>>>20,Yp=R[22]<<10|R[23]>>>22,Qp=R[23]<<10|R[22]>>>22,Bd=R[33]<<13|R[32]>>>19,Fd=R[32]<<13|R[33]>>>19,Gd=R[42]<<2|R[43]>>>30,r0=R[43]<<2|R[42]>>>30,Vd=R[5]<<30|R[4]>>>2,jo=R[4]<<30|R[5]>>>2,tf=R[14]<<6|R[15]>>>26,rf=R[15]<<6|R[14]>>>26,Sr=R[25]<<11|R[24]>>>21,zi=R[24]<<11|R[25]>>>21,nc=R[34]<<15|R[35]>>>17,Jp=R[35]<<15|R[34]>>>17,Zl=R[45]<<29|R[44]>>>3,ef=R[44]<<29|R[45]>>>3,Li=R[6]<<28|R[7]>>>4,hi=R[7]<<28|R[6]>>>4,Mu=R[17]<<23|R[16]>>>9,Zp=R[16]<<23|R[17]>>>9,Vp=R[26]<<25|R[27]>>>7,qd=R[27]<<25|R[26]>>>7,cs=R[36]<<21|R[37]>>>11,zc=R[37]<<21|R[36]>>>11,Xp=R[47]<<24|R[46]>>>8,af=R[46]<<24|R[47]>>>8,zd=R[8]<<27|R[9]>>>5,Gp=R[9]<<27|R[8]>>>5,Sn=R[18]<<20|R[19]>>>12,$u=R[19]<<20|R[18]>>>12,e0=R[29]<<7|R[28]>>>25,t0=R[28]<<7|R[29]>>>25,Vi=R[38]<<8|R[39]>>>24,nf=R[39]<<8|R[38]>>>24,ki=R[48]<<14|R[49]>>>18,us=R[49]<<14|R[48]>>>18,R[0]=Pn^~Mr&Sr,R[1]=dn^~Xr&zi,R[10]=Li^~Sn&rc,R[11]=hi^~$u&Hp,R[20]=jd^~tf&Vp,R[21]=zp^~rf&qd,R[30]=zd^~Wp&Yp,R[31]=Gp^~Kp&Qp,R[40]=Vd^~Mu&e0,R[41]=jo^~Zp&t0,R[2]=Mr^~Sr&cs,R[3]=Xr^~zi&zc,R[12]=Sn^~rc&Bd,R[13]=$u^~Hp&Fd,R[22]=tf^~Vp&Vi,R[23]=rf^~qd&nf,R[32]=Wp^~Yp&nc,R[33]=Kp^~Qp&Jp,R[42]=Mu^~e0&ic,R[43]=Zp^~t0&xa,R[4]=Sr^~cs&ki,R[5]=zi^~zc&us,R[14]=rc^~Bd&Zl,R[15]=Hp^~Fd&ef,R[24]=Vp^~Vi&Vc,R[25]=qd^~nf&Hd,R[34]=Yp^~nc&Xp,R[35]=Qp^~Jp&af,R[44]=e0^~ic&Gd,R[45]=t0^~xa&r0,R[6]=cs^~ki&Pn,R[7]=zc^~us&dn,R[16]=Bd^~Zl&Li,R[17]=Fd^~ef&hi,R[26]=Vi^~Vc&jd,R[27]=nf^~Hd&zp,R[36]=nc^~Xp&zd,R[37]=Jp^~af&Gp,R[46]=ic^~Gd&Vd,R[47]=xa^~r0&jo,R[8]=ki^~Pn&Mr,R[9]=us^~dn&Xr,R[18]=Zl^~Li&Sn,R[19]=ef^~hi&$u,R[28]=Vc^~jd&tf,R[29]=Hd^~zp&rf,R[38]=Xp^~zd&Wp,R[39]=af^~Gp&Kp,R[48]=Gd^~Vd&Mu,R[49]=r0^~jo&Zp,R[0]^=Ti[se],R[1]^=Ti[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,Xt=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==Xt,!Se||!Ce)return he?0:!Se^W?1:-1;if(!he)return Ft>Xt^W?1:-1;for(At=(Ft=Se.length)<(Xt=Ce.length)?Ft:Xt,rt=0;rt<At;rt++)if(Se[rt]!=Ce[rt])return Se[rt]>Ce[rt]^W?1:-1;return Ft==Xt?0:Ft>Xt^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,Xt,Ti,xn,St=Ke.prototype={constructor:Ke,toString:null,valueOf:null},ci=new Ke(1),An=20,fn=4,mi=-7,go=21,Hi=-1e7,vi=1e7,yo=!1,tn=1,Ar=0,de={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},ke="0123456789abcdefghijklmnopqrstuvwxyz",it=!0;function Ke(ie,R){var oe,we,se,Ae,Ie,Pe,Be,Ye,qe=this;if(!(qe instanceof Ke))return new Ke(ie,R);if(R==null){if(ie&&ie._isBigNumber===!0)return qe.s=ie.s,void(!ie.c||ie.e>vi?qe.c=qe.e=null:ie.e<Hi?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>vi?qe.c=qe.e=null:(qe.e=Ae,qe.c=[ie]))}Ye=String(ie)}else{if(!u.test(Ye=String(ie)))return Se(qe,Ye,Pe);qe.s=Ye.charCodeAt(0)==45?(Ye=Ye.slice(1),-1):1}(Ae=Ye.indexOf("."))>-1&&(Ye=Ye.replace(".","")),(Ie=Ye.search(/e/i))>0?(Ae<0&&(Ae=Ie),Ae+=+Ye.slice(Ie+1),Ye=Ye.substring(0,Ie)):Ae<0&&(Ae=Ye.length)}else{if(p(R,2,ke.length,"Base"),R==10&&it)return or(qe=new Ke(ie),An+qe.e+1,fn);if(Ye=String(ie),Pe=typeof ie=="number"){if(0*ie!=0)return Se(qe,Ye,Pe,R);if(qe.s=1/ie<0?(Ye=Ye.slice(1),-1):1,Ke.DEBUG&&Ye.replace(/^0\.0*|\./,"").length>15)throw Error(m+ie)}else qe.s=Ye.charCodeAt(0)===45?(Ye=Ye.slice(1),-1):1;for(oe=ke.slice(0,R),Ae=Ie=0,Be=Ye.length;Ie<Be;Ie++)if(oe.indexOf(we=Ye.charAt(Ie))<0){if(we=="."){if(Ie>Ae){Ae=Be;continue}}else if(!se&&(Ye==Ye.toUpperCase()&&(Ye=Ye.toLowerCase())||Ye==Ye.toLowerCase()&&(Ye=Ye.toUpperCase()))){se=!0,Ie=-1,Ae=0;continue}return Se(qe,String(ie),Pe,R)}Pe=!1,(Ae=(Ye=he(Ye,R,10,qe.s)).indexOf("."))>-1?Ye=Ye.replace(".",""):Ae=Ye.length}for(Ie=0;Ye.charCodeAt(Ie)===48;Ie++);for(Be=Ye.length;Ye.charCodeAt(--Be)===48;);if(Ye=Ye.slice(Ie,++Be)){if(Be-=Ie,Pe&&Ke.DEBUG&&Be>15&&(ie>y||ie!==d(ie)))throw Error(m+qe.s*ie);if((Ae=Ae-Ie-1)>vi)qe.c=qe.e=null;else if(Ae<Hi)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(+Ye.slice(0,Ie)),Be-=v;Ie<Be;)qe.c.push(+Ye.slice(Ie,Ie+=v));Ie=v-(Ye=Ye.slice(Ie)).length}else Ie-=Be;for(;Ie--;Ye+="0");qe.c.push(+Ye)}}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<=mi||Ie>=go)?C(Be,Ie):L(Be,Ie,"0");else if(Ae=(ie=or(new Ke(ie),R,oe)).e,Pe=(Be=O(ie.c)).length,we==1||we==2&&(R<=Ae||Ae<=mi)){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 Ke(ie[0]);we<ie.length;we++){if(!(oe=new Ke(ie[we])).s){se=oe;break}R.call(se,oe)&&(se=oe)}return se}function yn(ie,R,oe){for(var we=1,se=R.length;!R[--se];R.pop());for(se=R[0];se>=10;se/=10,we++);return(oe=we+oe*v-1)>vi?ie.c=ie.e=null:oe<Hi?ie.c=[ie.e=0]:(ie.e=oe,ie.c=R),ie}function or(ie,R,oe,we){var se,Ae,Ie,Pe,Be,Ye,qe,gt=ie.c,rr=_;if(gt){e:{for(se=1,Pe=gt[0];Pe>=10;Pe/=10,se++);if((Ae=R-se)<0)Ae+=v,Ie=R,qe=(Be=gt[Ye=0])/rr[se-Ie-1]%10|0;else if((Ye=f((Ae+1)/v))>=gt.length){if(!we)break e;for(;gt.length<=Ye;gt.push(0));Be=qe=0,se=1,Ie=(Ae%=v)-v+1}else{for(Be=Pe=gt[Ye],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||gt[Ye+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:gt[Ye-1])%10&1||oe==(ie.s<0?8:7)),R<1||!gt[0])return gt.length=0,we?(R-=ie.e+1,gt[0]=rr[(v-R%v)%v],ie.e=-R||0):gt[0]=ie.e=0,ie;if(Ae==0?(gt.length=Ye,Pe=1,Ye--):(gt.length=Ye+1,Pe=rr[v-Ae],gt[Ye]=Ie>0?d(Be/rr[se-Ie]%rr[Ie])*Pe:0),we)for(;;){if(Ye==0){for(Ae=1,Ie=gt[0];Ie>=10;Ie/=10,Ae++);for(Ie=gt[0]+=Pe,Pe=1;Ie>=10;Ie/=10,Pe++);Ae!=Pe&&(ie.e++,gt[0]==w&&(gt[0]=1));break}if(gt[Ye]+=Pe,gt[Ye]!=w)break;gt[Ye--]=0,Pe=1}for(Ae=gt.length;gt[--Ae]===0;gt.pop());}ie.e>vi?ie.c=ie.e=null:ie.e<Hi&&(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<=mi||oe>=go?C(R,oe):L(R,oe,"0"),ie.s<0?"-"+R:R)}return Ke.clone=P,Ke.ROUND_UP=0,Ke.ROUND_DOWN=1,Ke.ROUND_CEIL=2,Ke.ROUND_FLOOR=3,Ke.ROUND_HALF_UP=4,Ke.ROUND_HALF_DOWN=5,Ke.ROUND_HALF_EVEN=6,Ke.ROUND_HALF_CEIL=7,Ke.ROUND_HALF_FLOOR=8,Ke.EUCLID=9,Ke.config=Ke.set=function(ie){var R,oe;if(ie!=null){if(typeof ie!="object")throw Error(g+"Object expected: "+ie);if(ie.hasOwnProperty(R="DECIMAL_PLACES")&&(p(oe=ie[R],0,S,R),An=oe),ie.hasOwnProperty(R="ROUNDING_MODE")&&(p(oe=ie[R],0,8,R),fn=oe),ie.hasOwnProperty(R="EXPONENTIAL_AT")&&((oe=ie[R])&&oe.pop?(p(oe[0],-S,0,R),p(oe[1],0,S,R),mi=oe[0],go=oe[1]):(p(oe,-S,S,R),mi=-(go=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),Hi=oe[0],vi=oe[1];else{if(p(oe,-S,S,R),!oe)throw Error(g+R+" cannot be zero: "+oe);Hi=-(vi=oe<0?-oe:oe)}if(ie.hasOwnProperty(R="CRYPTO")){if((oe=ie[R])!==!!oe)throw Error(g+R+" not true or false: "+oe);if(oe){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw yo=!oe,Error(g+"crypto unavailable");yo=oe}else yo=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:[mi,go],RANGE:[Hi,vi],CRYPTO:yo,MODULO_MODE:tn,POW_PRECISION:Ar,FORMAT:de,ALPHABET:ke}},Ke.isBigNumber=function(ie){if(!ie||ie._isBigNumber!==!0)return!1;if(!Ke.DEBUG)return!0;var R,oe,we=ie.c,se=ie.e,Ae=ie.s;e:if({}.toString.call(we)=="[object Array]"){if((Ae===1||Ae===-1)&&se>=-S&&se<=S&&se===d(se)){if(we[0]===0){if(se===0&&we.length===1)return!0;break e}if((R=(se+1)%v)<1&&(R+=v),String(we[0]).length==R){for(R=0;R<we.length;R++)if((oe=we[R])<0||oe>=w||oe!==d(oe))break e;if(oe!==0)return!0}}}else if(we===null&&se===null&&(Ae===null||Ae===1||Ae===-1))return!0;throw Error(g+"Invalid BigNumber: "+ie)},Ke.maximum=Ke.max=function(){return fr(arguments,St.lt)},Ke.minimum=Ke.min=function(){return fr(arguments,St.gt)},Ke.random=(Ce=9007199254740992,rt=Math.random()*Ce&2097151?function(){return d(Math.random()*Ce)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(ie){var R,oe,we,se,Ae,Ie=0,Pe=[],Be=new Ke(ci);if(ie==null?ie=An:p(ie,0,S),se=f(ie/v),yo)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 yo=!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(!yo)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}),Ke.sum=function(){for(var ie=1,R=arguments,oe=new Ke(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],Ye=0,qe=oe.length;Ye<qe;){for(Pe=Be.length;Pe--;Be[Pe]*=we);for(Be[0]+=Ae.indexOf(oe.charAt(Ye++)),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,Ye,qe,gt,rr,Wt,Jr,Pn=oe.indexOf("."),dn=An,Mr=fn;for(Pn>=0&&(qe=Ar,Ar=0,oe=oe.replace(".",""),rr=(Jr=new Ke(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),Ye=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?--Ye:(rr.c=Wt,rr.e=Ye,rr.s=Ae,Wt=(rr=W(rr,Jr,dn,Mr,se)).c,gt=rr.r,Ye=rr.e),Pn=Wt[Be=Ye+dn+1],qe=se/2,gt=gt||Be<0||Wt[Be+1]!=null,gt=Mr<4?(Pn!=null||gt)&&(Mr==0||Mr==(rr.s<0?3:2)):Pn>qe||Pn==qe&&(Mr==4||gt||Mr==6&&1&Wt[Be-1]||Mr==(rr.s<0?8:7)),Be<1||!Wt[0])oe=gt?L(Pe.charAt(1),-dn,Pe.charAt(0)):Pe.charAt(0);else{if(Wt.length=Be,gt)for(--se;++Wt[--Be]>se;)Wt[Be]=0,Be||(++Ye,Wt=[1].concat(Wt));for(qe=Wt.length;!Wt[--qe];);for(Pn=0,oe="";Pn<=qe;oe+=Pe.charAt(Wt[Pn++]));oe=L(oe,Ye,Pe.charAt(0))}return oe}}(),W=function(){function ie(we,se,Ae){var Ie,Pe,Be,Ye,qe=0,gt=we.length,rr=se%b,Wt=se/b|0;for(we=we.slice();gt--;)qe=((Pe=rr*(Be=we[gt]%b)+(Ie=Wt*Be+(Ye=we[gt]/b|0)*rr)%b*b+qe)/Ae|0)+(Ie/b|0)+Wt*Ye,we[gt]=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,Ye,qe,gt,rr,Wt,Jr,Pn,dn,Mr,Xr,Sr,zi,cs,zc,ki,us,Li=we.s==se.s?1:-1,hi=we.c,Sn=se.c;if(!(hi&&hi[0]&&Sn&&Sn[0]))return new Ke(we.s&&se.s&&(hi?!Sn||hi[0]!=Sn[0]:Sn)?hi&&hi[0]==0||!Sn?0*Li:Li/0:NaN);for(dn=(Pn=new Ke(Li)).c=[],Li=Ae+(Ye=we.e-se.e)+1,Pe||(Pe=w,Ye=x(we.e/v)-x(se.e/v),Li=Li/v|0),qe=0;Sn[qe]==(hi[qe]||0);qe++);if(Sn[qe]>(hi[qe]||0)&&Ye--,Li<0)dn.push(1),gt=!0;else{for(cs=hi.length,ki=Sn.length,qe=0,Li+=2,(rr=d(Pe/(Sn[0]+1)))>1&&(Sn=ie(Sn,rr,Pe),hi=ie(hi,rr,Pe),ki=Sn.length,cs=hi.length),zi=ki,Xr=(Mr=hi.slice(0,ki)).length;Xr<ki;Mr[Xr++]=0);us=Sn.slice(),us=[0].concat(us),zc=Sn[0],Sn[1]>=Pe/2&&zc++;do{if(rr=0,(Be=R(Sn,Mr,ki,Xr))<0){if(Sr=Mr[0],ki!=Xr&&(Sr=Sr*Pe+(Mr[1]||0)),(rr=d(Sr/zc))>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,ki<Jr?us: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,ki,Xr)<1;)rr++,oe(Mr,ki<Xr?us:Sn,Xr,Pe),Xr=Mr.length}else Be===0&&(rr++,Mr=[0]);dn[qe++]=rr,Mr[0]?Mr[Xr++]=hi[zi]||0:(Mr=[hi[zi]],Xr=1)}while((zi++<cs||Mr[0]!=null)&&Li--);gt=Mr[0]!=null,dn[0]||dn.splice(0,1)}if(Pe==w){for(qe=1,Li=dn[0];Li>=10;Li/=10,qe++);or(Pn,Ae+(Pn.e=qe+Ye*v-1)+1,Ie,gt)}else Pn.e=Ye,Pn.r=+gt;return Pn}}(),At=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Ft=/^([^.]+)\.$/,Xt=/^\.([^.]+)$/,Ti=/^-?(Infinity|NaN)$/,xn=/^\s*\+(?=[\w.])|^\s+|\s+$/g,Se=function(ie,R,oe,we){var se,Ae=oe?R:R.replace(xn,"");if(Ti.test(Ae))ie.s=isNaN(Ae)?null:Ae<0?-1:1;else{if(!oe&&(Ae=Ae.replace(At,function(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(Xt,"0.$1")),R!=Ae))return new Ke(Ae,se);if(Ke.DEBUG)throw Error(g+"Not a"+(we?" base "+we:"")+" number: "+R);ie.s=null}ie.c=ie.e=null},St.absoluteValue=St.abs=function(){var ie=new Ke(this);return ie.s<0&&(ie.s=1),ie},St.comparedTo=function(ie,R){return E(this,new Ke(ie,R))},St.decimalPlaces=St.dp=function(ie,R){var oe,we,se,Ae=this;if(ie!=null)return p(ie,0,S),R==null?R=fn:p(R,0,8),or(new Ke(Ae),ie+Ae.e+1,R);if(!(oe=Ae.c))return null;if(we=((se=oe.length-1)-x(this.e/v))*v,se=oe[se])for(;se%10==0;se/=10,we--);return we<0&&(we=0),we},St.dividedBy=St.div=function(ie,R){return W(this,new Ke(ie,R),An,fn)},St.dividedToIntegerBy=St.idiv=function(ie,R){return W(this,new Ke(ie,R),0,1)},St.exponentiatedBy=St.pow=function(ie,R){var oe,we,se,Ae,Ie,Pe,Be,Ye,qe=this;if((ie=new Ke(ie)).c&&!ie.isInteger())throw Error(g+"Exponent not an integer: "+yr(ie));if(R!=null&&(R=new Ke(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 Ye=new Ke(Math.pow(+yr(qe),Ie?ie.s*(2-I(ie)):+yr(ie))),R?Ye.mod(R):Ye;if(Pe=ie.s<0,R){if(R.c?!R.c[0]:!R.s)return new Ke(NaN);(we=!Pe&&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 Ke(Pe?1/Ae:Ae);Ar&&(Ae=f(Ar/v+2))}for(Ie?(oe=new Ke(.5),Pe&&(ie.s=1),Be=I(ie)):Be=(se=Math.abs(+yr(ie)))%2,Ye=new Ke(ci);;){if(Be){if(!(Ye=Ye.times(qe)).c)break;Ae?Ye.c.length>Ae&&(Ye.c.length=Ae):we&&(Ye=Ye.mod(R))}if(se){if((se=d(se/2))===0)break;Be=se%2}else if(or(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?Ye:(Pe&&(Ye=ci.div(Ye)),R?Ye.mod(R):Ae?or(Ye,Ar,fn,void 0):Ye)},St.integerValue=function(ie){var R=new Ke(this);return ie==null?ie=fn:p(ie,0,8),or(R,R.e+1,ie)},St.isEqualTo=St.eq=function(ie,R){return E(this,new Ke(ie,R))===0},St.isFinite=function(){return!!this.c},St.isGreaterThan=St.gt=function(ie,R){return E(this,new Ke(ie,R))>0},St.isGreaterThanOrEqualTo=St.gte=function(ie,R){return(R=E(this,new Ke(ie,R)))===1||R===0},St.isInteger=function(){return!!this.c&&x(this.e/v)>this.c.length-2},St.isLessThan=St.lt=function(ie,R){return E(this,new Ke(ie,R))<0},St.isLessThanOrEqualTo=St.lte=function(ie,R){return(R=E(this,new Ke(ie,R)))===-1||R===0},St.isNaN=function(){return!this.s},St.isNegative=function(){return this.s<0},St.isPositive=function(){return this.s>0},St.isZero=function(){return!!this.c&&this.c[0]==0},St.minus=function(ie,R){var oe,we,se,Ae,Ie=this,Pe=Ie.s;if(R=(ie=new Ke(ie,R)).s,!Pe||!R)return new Ke(NaN);if(Pe!=R)return ie.s=-R,Ie.plus(ie);var Be=Ie.e/v,Ye=ie.e/v,qe=Ie.c,gt=ie.c;if(!Be||!Ye){if(!qe||!gt)return qe?(ie.s=-R,ie):new Ke(gt?Ie:NaN);if(!qe[0]||!gt[0])return gt[0]?(ie.s=-R,ie):new Ke(qe[0]?Ie:fn==3?-0:0)}if(Be=x(Be),Ye=x(Ye),qe=qe.slice(),Pe=Be-Ye){for((Ae=Pe<0)?(Pe=-Pe,se=qe):(Ye=Be,se=gt),se.reverse(),R=Pe;R--;se.push(0));se.reverse()}else for(we=(Ae=(Pe=qe.length)<(R=gt.length))?Pe:R,Pe=R=0;R<we;R++)if(qe[R]!=gt[R]){Ae=qe[R]<gt[R];break}if(Ae&&(se=qe,qe=gt,gt=se,ie.s=-ie.s),(R=(we=gt.length)-(oe=qe.length))>0)for(;R--;qe[oe++]=0);for(R=w-1;we>Pe;){if(qe[--we]<gt[we]){for(oe=we;oe&&!qe[--oe];qe[oe]=R);--qe[oe],qe[we]+=w}qe[we]-=gt[we]}for(;qe[0]==0;qe.splice(0,1),--Ye);return qe[0]?yn(ie,qe,Ye):(ie.s=fn==3?-1:1,ie.c=[ie.e=0],ie)},St.modulo=St.mod=function(ie,R){var oe,we,se=this;return ie=new Ke(ie,R),!se.c||!ie.s||ie.c&&!ie.c[0]?new Ke(NaN):!ie.c||se.c&&!se.c[0]?new Ke(se):(tn==9?(we=ie.s,ie.s=1,oe=W(se,ie,0,3),ie.s=we,oe.s*=we):oe=W(se,ie,0,tn),(ie=se.minus(oe.times(ie))).c[0]||tn!=1||(ie.s=se.s),ie)},St.multipliedBy=St.times=function(ie,R){var oe,we,se,Ae,Ie,Pe,Be,Ye,qe,gt,rr,Wt,Jr,Pn,dn,Mr=this,Xr=Mr.c,Sr=(ie=new Ke(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)<(gt=Sr.length)&&(Jr=Xr,Xr=Sr,Sr=Jr,se=Be,Be=gt,gt=se),se=Be+gt,Jr=[];se--;Jr.push(0));for(Pn=w,dn=b,se=gt;--se>=0;){for(oe=0,rr=Sr[se]%dn,Wt=Sr[se]/dn|0,Ae=se+(Ie=Be);Ae>se;)oe=((Ye=rr*(Ye=Xr[--Ie]%dn)+(Pe=Wt*Ye+(qe=Xr[Ie]/dn|0)*rr)%dn*dn+Jr[Ae]+oe)/Pn|0)+(Pe/dn|0)+Wt*qe,Jr[Ae--]=Ye%Pn;Jr[Ae]=oe}return oe?++we:Jr.splice(0,1),yn(ie,Jr,we)},St.negated=function(){var ie=new Ke(this);return ie.s=-ie.s||null,ie},St.plus=function(ie,R){var oe,we=this,se=we.s;if(R=(ie=new Ke(ie,R)).s,!se||!R)return new Ke(NaN);if(se!=R)return ie.s=-R,we.minus(ie);var Ae=we.e/v,Ie=ie.e/v,Pe=we.c,Be=ie.c;if(!Ae||!Ie){if(!Pe||!Be)return new Ke(se/0);if(!Pe[0]||!Be[0])return Be[0]?ie:new Ke(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),or(new Ke(Ae),ie,R);if(!(oe=Ae.c))return null;if(we=(se=oe.length-1)*v+1,se=oe[se]){for(;se%10==0;se/=10,we--);for(se=oe[0];se>=10;se/=10,we++);}return ie&&Ae.e+1>we&&(we=Ae.e+1),we},St.shiftedBy=function(ie){return p(ie,-9007199254740991,y),this.times("1e"+ie)},St.squareRoot=St.sqrt=function(){var ie,R,oe,we,se,Ae=this,Ie=Ae.c,Pe=Ae.s,Be=Ae.e,Ye=An+4,qe=new Ke("0.5");if(Pe!==1||!Ie||!Ie[0])return new Ke(!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 Ke(R=Pe==1/0?"5e"+Be:(R=Pe.toExponential()).slice(0,R.indexOf("e")+1)+Be)):oe=new Ke(Pe+""),oe.c[0]){for((Pe=(Be=oe.e)+Ye)<3&&(Pe=0);;)if(se=oe,oe=qe.times(se.plus(W(Ae,se,Ye,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")||(or(oe,oe.e+An+2,1),ie=!oe.times(oe).eq(Ae));break}if(!we&&(or(se,se.e+An+2,0),se.times(se).eq(Ae))){oe=se;break}Ye+=4,Pe+=4,we=1}}return or(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,Ye=oe.groupSeparator||"",qe=Ie[0],gt=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+=Ye+Wt.substr(Ae,Pe);Be>0&&(qe+=Ye+Wt.slice(Ae)),rr&&(qe="-"+qe)}we=gt?qe+(oe.decimalSeparator||"")+((Be=+oe.fractionGroupSize)?gt.replace(new RegExp("\\d{"+Be+"}\\B","g"),"$&"+(oe.fractionGroupSeparator||"")):gt):qe}return(oe.prefix||"")+we+(oe.suffix||"")},St.toFraction=function(ie){var R,oe,we,se,Ae,Ie,Pe,Be,Ye,qe,gt,rr,Wt=this,Jr=Wt.c;if(ie!=null&&(!(Pe=new Ke(ie)).isInteger()&&(Pe.c||Pe.s!==1)||Pe.lt(ci)))throw Error(g+"Argument "+(Pe.isInteger()?"out of range: ":"not an integer: ")+yr(Pe));if(!Jr)return new Ke(Wt);for(R=new Ke(ci),Ye=oe=new Ke(ci),we=Be=new Ke(ci),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:Ye:Pe,Ie=vi,vi=1/0,Pe=new Ke(rr),Be.c[0]=0;qe=W(Pe,R,0,1),(se=oe.plus(qe.times(we))).comparedTo(ie)!=1;)oe=we,we=se,Ye=Be.plus(qe.times(se=Ye)),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(Ye)),oe=oe.plus(se.times(we)),Be.s=Ye.s=Wt.s,gt=W(Ye,we,Ae*=2,fn).minus(Wt).abs().comparedTo(W(Be,oe,Ae,fn).minus(Wt).abs())<1?[Ye,we]:[Be,oe],vi=Ie,gt},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<=mi||se>=go?C(O(oe.c),se):L(O(oe.c),se,"0"):ie===10&&it?R=L(O((oe=or(new Ke(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&&Ke.set(D),Ke}();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",Y="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 Ve(P){return typeof P=="string"&&!P.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(P)?"0x"+P:yt(P)}function tt(P){if(typeof P=="string")return P.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(P)?yt(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 vt(P){return typeof P=="boolean"?P:Yt(P).toNumber()!==0}function bt(P){const D=Yt(P),W=D.toString(16);return D.isLessThan(0)?"-0x"+W.substr(1):"0x"+W}function yt(P){if(ir(P))return bt(+P);if(Mt(P))return bt(P);if(cr(P)){const D=P;if(D.indexOf("-0x")===0)return bt(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 bt(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",Y,{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",Y,{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))||Vt(P))}function Vt(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(yt(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 oi(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 Yn(P){return P===void 0?"latest":xr(P)}function xr(P){return P==null?null:$n(P)?P:yt(P)}function $r(P){return P.from&&(P.from=Ze(P.from)),P.to&&(P.to=Ze(P.to)),P.gasPrice!==void 0&&(P.gasPrice=bt(P.gasPrice)),P.gas!==void 0&&(P.gas=bt(P.gas)),P.value!==void 0&&(P.value=bt(P.value)),P.nonce!==void 0&&(P.nonce=bt(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=Ze(P.from),P.to&&(P.to=Ze(P.to)),P.gasPrice!==void 0&&(P.gasPrice=bt(P.gasPrice)),P.gas!==void 0&&(P.gas=bt(P.gas)),P.value!==void 0&&(P.value=bt(P.value)),P.nonce!==void 0&&(P.nonce=bt(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 Ze(P){if(Kt(P))return P;if(Ut(P))return"0x"+P;throw new Error(`Invalid address: ${JSON.stringify(P)}`)}function ct(P){return P}function ft(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 Et(P){if(P===null)throw ne("cannot convert null value to array",Y,{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",Y,{arg:"value",value:P});if(D[1]!=="0x")throw ne("hex string must have 0x prefix",Y,{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 _t(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 Xt={type:"",name:"",parent:Ce.parent,state:{allowType:!0}};Ce.parent.components.push(Xt),delete Ce.parent,Ce=Xt;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 Et([])}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",Y,{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",Y,{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",Y,{arg:this.localName,coderType:this.name,value:yt(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 ei 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=Et(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",Y,{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",Y,{arg:this.localName,coderType:this.name,value:yt(D.slice(W,W+32))});return{consumed:32,value:this.coerceFunc(this.name,D.slice(W,W+this.length))}}}function Oi(P){const D=32*Math.ceil(P.length/32),W=new Uint8Array(D-P.length);return G(Ur.encode(P.length),P,W)}function ti(P,D,W){if(P.length<D+32)throw ne("insufficient data for dynamicBytes length",Y,{arg:W,coderType:"dynamicBytes",value:yt(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",Y,{arg:W,coderType:"dynamicBytes",value:he.toString()})}if(P.length<D+32+he)throw ne("insufficient data for dynamicBytes type",Y,{arg:W,coderType:"dynamicBytes",value:yt(P.slice(D,D+32+he))});return{consumed:32+32*Math.ceil(he/32),value:P.slice(D+32,D+32+he)}}function Ii(P){return 32*Math.ceil(P/32)}function Pi(P,D){if(!Array.isArray(D)){if(!D||typeof D!="object")throw ne("invalid tuple value",Y,{coderType:"tuple",value:D});{const Ft=[];P.forEach(function(Xt){Ft.push(D[Xt.localName])}),D=Ft}}if(P.length!==D.length)throw ne("types/value length mismatch",Y,{coderType:"tuple",value:D});const W=[];P.forEach(function(Ft,Xt){W.push({dynamic:Ft.dynamic,value:Ft.encode(D[Xt])})});let he=0,Se=0;W.forEach(function(Ft){Ft.dynamic?(he+=32,Se+=Ii(Ft.value.length)):he+=Ii(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+=Ii(Ft.value.length)):(At.set(Ft.value,Ce),Ce+=Ii(Ft.value.length))}),At}class si extends Array{}class jn 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",Y,{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,Pi(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",Y,{arg:this.localName,coderType:"array",value:Ft.value})}try{Se=At.value.toNumber()}catch{throw ne("array count too large",Y,{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,Xt){const Ti=Xt;let xn=0;const St=[];return At.forEach(function(ci){let An;if(ci.dynamic){const fn=Ur.decode(Ft,Xt);An=ci.decode(Ft,Ti+fn.value.toNumber()),An.consumed=fn.consumed}else An=ci.decode(Ft,Xt);An.value!==void 0&&St.push(An.value),Xt+=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 na 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 Pi(this.coders,D)}decode(D,W){const he=function(Se,Ce,rt){const At=rt;let Ft=0;const Xt=new si;return Se.forEach(function(Ti){let xn;if(Ti.dynamic){const St=Ur.decode(Ce,rt);xn=Ti.decode(Ce,At+St.value.toNumber()),xn.consumed=St.consumed}else xn=Ti.decode(Ce,rt);xn.value!==void 0&&Xt.push(xn.value),rt+=xn.consumed,Ft+=xn.consumed}),Se.forEach(function(Ti,xn){let St=Ti.localName;St&&(St==="length"&&(St="_length"),Xt[St]!==null&&Xt[St]!==void 0||(Xt[St]=Xt[xn]))}),{value:Xt,consumed:Ft}}(this.coders,D,W);return he.value=this.coerceFunc(this.type,he.value),he}}const Mi={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",Y,{arg:this.localName,coderType:"address",value:P});try{D.set(F(Ze(W)),12)}catch(he){throw ne(`invalid address (${he.message})`,Y,{arg:this.localName,coderType:"address",value:P})}return D}decode(P,D){if(P.length<D+32)throw ne("insufficuent data for address type",Y,{arg:this.localName,coderType:"address",value:yt(P.slice(D,D+32)),missingBytes:D+32-P.length});return{consumed:32,value:this.coerceFunc("address",kt(yt(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",Y,{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",Y,{arg:this.localName,coderType:"string",value:P});return Oi(pe(P))}decode(P,D){const W=ti(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 Oi(Et(P))}catch(D){throw D("invalid bytes value",Y,{arg:this.localName,coderType:"bytes",value:D.value})}}decode(P,D){const W=ti(P,D,this.localName);return W.value=this.coerceFunc("bytes",W.value),W}},function:class extends ei{constructor(P,D){super(P,24,D)}}};function Ea(P,D){const W=Mi[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",Y,{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",Y,{arg:"param",value:D});return new ei(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 jn(P,Ea(P,Se),Ce,D.name)}if(D.type.substring(0,5)==="tuple")return function(Se,Ce,rt){Ce||(Ce=[]);const At=Ce.map(Ft=>Ea(Se,Ft));return new na(Se,At,rt)}(P,D.components,D.name);if(D.type==="")return new sr(P,D.name);throw ne("invalid type",Y,{arg:"type",value:D.type,fullType:D})}class ss{constructor(D){(function(W,he){if(!(W instanceof he))throw ne("missing new","MISSING_NEW",{name:he.name})})(this,ss),D||(D=gr),ue(this,"coerceFunc",D)}encode(D,W){if(D.length!==W.length)throw ne("types/values length mismatch",Y,{count:{types:D.length,values:W.length},value:{types:D,values:W}});const he=D.map(Se=>typeof Se=="string"?_t(Se):Se).map(Se=>Ea(this.coerceFunc,Se));return new na(this.coerceFunc,he,"_").encode(W)}decode(D,W){const he=D.map(Se=>typeof Se=="string"?_t(Se):Se).map(Se=>Ea(this.coerceFunc,Se));return new na(this.coerceFunc,he,"_").decode(W,0).value}}const X=new ss;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 Xe{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 dt(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:[Ze,Yn],outputFormatter:Dn}),re.eth_getStorageAt=new Oe({callName:"eth_getStorageAt",params:3,inputFormatter:[Ze,yt,Yn],outputFormatter:Ve}),re.eth_getCode=new Oe({callName:"eth_getCode",params:2,inputFormatter:[Ze,Yn],outputFormatter:Ve}),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,yt],outputFormatter:Re}),re.eth_getUncleByBlockNumberAndIndex=new Oe({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[xr,yt],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,yt],outputFormatter:ee}),re.eth_getTransactionByBlockNumberAndIndex=new Oe({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[xr,yt],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:[Ze,Yn],outputFormatter:T}),re.eth_sendRawTransaction=new Oe({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:Ve}),re.web3_sha3=new Oe({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:Ve}),re.eth_sendTransaction=new Oe({callName:"eth_sendTransaction",params:1,inputFormatter:[_e],outputFormatter:Ve}),re.eth_sign=new Oe({callName:"eth_sign",params:2,inputFormatter:[Ze,null],outputFormatter:Ve}),re.eth_call=new Oe({callName:"eth_call",params:2,inputFormatter:[$r,Yn],outputFormatter:Ve}),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:vt}),re.eth_getWork=new Oe({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:Dt}),re.eth_coinbase=new Xe({getter:"eth_coinbase",outputFormatter:qt}),re.eth_mining=new Xe({getter:"eth_mining",outputFormatter:vt}),re.eth_hashrate=new Xe({getter:"eth_hashrate",outputFormatter:T}),re.eth_syncing=new Xe({getter:"eth_syncing",outputFormatter:ft}),re.eth_gasPrice=new Xe({getter:"eth_gasPrice",outputFormatter:Dn}),re.eth_accounts=new Xe({getter:"eth_accounts",outputFormatter:Dt}),re.eth_blockNumber=new Xe({getter:"eth_blockNumber",outputFormatter:T}),re.eth_protocolVersion=new Xe({getter:"eth_protocolVersion",outputFormatter:T}),re.web3_clientVersion=new Xe({getter:"web3_clientVersion",outputFormatter:fe}),re.net_version=new Xe({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:vt}),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,Ze,null],outputFormatter:Ve}),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:[Ze,null,ce],outputFormatter:vt}),re.personal_sendTransaction=new Oe({callName:"personal_sendTransaction",params:2,inputFormatter:[_e,null],outputFormatter:Ve}),re.personal_lockAccount=new Oe({callName:"personal_lockAccount",params:1,inputFormatter:[Ze],outputFormatter:vt}),re.personal_listAccounts=new Xe({getter:"personal_listAccounts",outputFormatter:Dt}),re.net_listening=new Xe({getter:"net_listening",outputFormatter:vt}),re.net_peerCount=new Xe({getter:"net_peerCount",outputFormatter:T}),re.eth_newFilter=new Oe({callName:"eth_newFilter",params:1,inputFormatter:[ct],outputFormatter:yt}),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:yt}),re.eth_newPendingTransactionFilter=new Oe({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:yt}),re.eth_uninstallFilter=new Oe({callName:"eth_uninstallFilter",params:1,inputFormatter:[yt],outputFormatter:vt}),re.eth_getFilterLogs=new Oe({callName:"eth_getFilterLogs",params:1,inputFormatter:[yt],outputFormatter:Dt}),re.eth_getFilterChanges=new Oe({callName:"eth_getFilterChanges",params:1,inputFormatter:[yt],outputFormatter:Dt}),re.eth_submitHashrate=new Oe({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:vt}),re.shh_newIdentity=new Oe({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:Ve}),re.shh_hasIdentity=new Oe({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:vt}),re.shh_newGroup=new Oe({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:Ve}),re.shh_addToGroup=new Oe({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:vt}),re.shh_newFilter=new Oe({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:yt}),re.shh_uninstallFilter=new Oe({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:vt}),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 Qe(P,D){const W=r.eth[D];if(!W)throw new Error(`Could not find the method/property named ${D.toString()}`);Object.defineProperty(P,D,{value:function(...he){return W.execute(this,...he)}})}class Ge{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):oi(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 dt(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 dt(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([Qe,be("design:type",Function)],Ge.prototype,"web3_clientVersion",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"web3_sha3",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"net_version",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"net_peerCount",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"net_listening",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_protocolVersion",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_syncing",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_coinbase",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_mining",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_hashrate",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_gasPrice",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_accounts",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_blockNumber",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getBalance",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getStorageAt",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getTransactionCount",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getBlockTransactionCountByHash",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getBlockTransactionCountByNumber",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getUncleCountByBlockHash",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getUncleCountByBlockNumber",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getCode",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_sign",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_sendTransaction",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_sendRawTransaction",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_call",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_estimateGas",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getBlockByHash",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getBlockByNumber",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getTransactionByHash",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getTransactionReceipt",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_newFilter",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_newBlockFilter",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_newPendingTransactionFilter",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_uninstallFilter",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getFilterChanges",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getFilterLogs",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getLogs",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_getWork",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_submitWork",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"eth_submitHashrate",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"shh_post",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"shh_version",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"shh_newIdentity",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"shh_hasIdentity",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"shh_newGroup",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"shh_addToGroup",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"shh_newFilter",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"shh_uninstallFilter",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"shh_getFilterChanges",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"shh_getMessages",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"personal_unlockAccount",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"personal_newAccount",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"personal_listAccounts",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"personal_lockAccount",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"personal_importRawKey",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"personal_sendTransaction",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"personal_sign",void 0),Ee([Qe,be("design:type",Function)],Ge.prototype,"personal_ecRecover",void 0);class pt{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])&&Yn(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 Ge))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 Gt(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 Gt(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 jr{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 jr(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 qr{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 pt(Ce)}).forEach(function(Ce){Ce.attachToContract(Se)}),this.allEvents=function(Ce){const rt=Ce.abi.filter(function(Ft){return Ft.type==="event"}),At=new _n(Ce.requestManager,rt,Ce.address);return rt.map(function(Ft){return new jr(Ce.requestManager,Ft,Ce.address)}).forEach(function(Ft){Ft.attachToContract(Ce)}),At.getAllEventsFunction()}(this)}}r.AbstractFilter=Tr,r.BigNumber=q,r.Contract=qr,r.ContractFactory=class{constructor(P,D){this.requestManager=P,this.abi=D}async deploy(...P){let D;const W=P[P.length-1];if(tr(W)&&!nr(W)&&(D=P.pop()),!D)throw new Error("Missing options object");if(!D.data||typeof D.data!="string")throw new Error("Invalid options.data");if(T(D.value)>0&&!(this.abi.filter(function(Xt){return Xt.type==="constructor"&&Xt.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(Xt){return Xt.type==="constructor"&&Xt.inputs&&Xt.inputs.length===Ce.length}).map(function(Xt){return Xt.inputs||[]}).map(function(Xt){return r.coder.encodeParams(Xt,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(Xt,Ti){const xn=o();let St=0;const ci=()=>{St++,St>50?xn.reject(new Error("Contract transaction couldn't be found after 50 blocks")):Xt.eth_getTransactionReceipt(Ti).then(mi=>{mi&&mi.blockHash?xn.resolve(mi):setTimeout(ci,1e3)},mi=>xn.reject(mi))};ci();const An=await xn,fn=await Xt.eth_getCode(An.contractAddress,"latest");if(fn&&fn.length>3)return An.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:fn,receipt:An})}(this.requestManager,rt),Ft=await this.at(At);return Ft.transactionHash=rt,Ft}async at(P){if(!Ut(P))throw new TypeError(`Invalid address ${JSON.stringify(P)}`);return new qr(this.requestManager,this.abi,P)}},r.EthBlockFilter=class extends Wr{constructor(P){super(P,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},r.EthFilter=Wr,r.EthPendingTransactionFilter=class extends Wr{constructor(P){super(P,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},r.HTTPProvider=class{constructor(P,D={}){this.host=P,this.options=D,this.debug=!1,this.host=P||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(P,D){try{let W=null;W=P instanceof Array?P.map(Ce=>n(Ce)):n(P);const 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=Xe,r.RequestManager=Ge,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 Gt(W)}),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const P=await this.filterId;return this.requestManager.shh_getMessages(P)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const P=await this.filterId;return this.requestManager.shh_getFilterChanges(P)}async uninstall(){const P=await this.filterId;return this.requestManager.shh_uninstallFilter(P)}},r.SolidityEvent=jr,r.SolidityFunction=pt,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=Ge,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=bt,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=Ze,r.inputBlockNumberFormatter=xr,r.inputCallFormatter=$r,r.inputDefaultBlockNumberFormatter=Yn,r.inputFilterOptions=ct,r.inputPostFormatter=function(P){return P?(P.ttl=bt(P.ttl),P.workToProve=bt(P.workToProve),P.priority=bt(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=Vt,r.isFunction=function(P){return typeof P=="function"},r.isHex=function(P){return typeof P=="string"&&/^0x[0-9a-fA-F]+$/.test(P)},r.isJson=function(P){try{return!!JSON.parse(P)}catch{return!1}},r.isObject=tr,r.isPredefinedBlockNumber=$n,r.isStrictAddress=Kt,r.isString=cr,r.isTopic=function(P){return!!/^(0x)?[0-9a-f]{64}$/i.test(P)&&!!/^(0x)?[0-9a-f]{64}$/i.test(P)},r.isValidResponse=oi,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=ft,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=vt,r.toChecksumAddress=$t,r.toData=Ve,r.toDecimal=T,r.toHex=yt,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})})})(Y5,Y5.exports);var jO=Y5.exports,qO={};Object.defineProperty(qO,"__esModule",{value:!0});qO.SignatureValidator=void 0;const GHe=jO;async function WHe(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)}qO.SignatureValidator=WHe;var IL={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AuthLink=t.AuthLinkType=t.AuthChain=void 0;const e=ql;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}})})(IL);var HO={};Object.defineProperty(HO,"__esModule",{value:!0});HO.moveMinutes=void 0;function KHe(t){const e=new Date;return e.setMinutes(e.getMinutes()+t),e}HO.moveMinutes=KHe;var PL={};Object.defineProperty(PL,"__esModule",{value:!0});const ab=jO;class YHe{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,ab.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,ab.toBigNumber)(n.number).toNumber(),timestamp:(0,ab.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,ab.toBigNumber)(e==="latest"?await this.requestManager.eth_blockNumber():e).toNumber(),timestamp:(0,ab.toBigNumber)(r).toNumber()},this.requests++,this.savedBlocks[e.toString()]}}PL.default=YHe;var La={},TL={},Rce={},ya={};Object.defineProperty(ya,"__esModule",{value:!0});ya.output=ya.exists=ya.hash=ya.bytes=ya.bool=ya.number=void 0;function b2(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}ya.number=b2;function Cce(t){if(typeof t!="boolean")throw new Error(`Expected boolean, not ${t}`)}ya.bool=Cce;function RL(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}`)}ya.bytes=RL;function Nce(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");b2(t.outputLen),b2(t.blockLen)}ya.hash=Nce;function Dce(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")}ya.exists=Dce;function $ce(t,e){RL(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}ya.output=$ce;const QHe={number:b2,bool:Cce,bytes:RL,hash:Nce,exists:Dce,output:$ce};ya.default=QHe;var Vy={},zO={};Object.defineProperty(zO,"__esModule",{value:!0});zO.crypto=void 0;zO.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=zO,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})(Vy);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;const e=ya,r=Vy;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)})(Rce);var xp={},VO={};Object.defineProperty(VO,"__esModule",{value:!0});VO.SHA2=void 0;const f6=ya,ob=Vy;function JHe(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 XHe extends ob.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,ob.createView)(this.buffer)}update(e){f6.default.exists(this);const{view:r,buffer:n,blockLen:i}=this;e=(0,ob.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,ob.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){f6.default.exists(this),f6.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;JHe(n,i-8,BigInt(this.length*8),a),this.process(n,0);const s=(0,ob.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}}VO.SHA2=XHe;Object.defineProperty(xp,"__esModule",{value:!0});xp.sha224=xp.sha256=void 0;const ZHe=VO,As=Vy,eze=(t,e,r)=>t&e^~t&r,tze=(t,e,r)=>t&e^t&r^e&r,rze=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]),wf=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_f=new Uint32Array(64);class Mce extends ZHe.SHA2{constructor(){super(64,32,8,!1),this.A=wf[0]|0,this.B=wf[1]|0,this.C=wf[2]|0,this.D=wf[3]|0,this.E=wf[4]|0,this.F=wf[5]|0,this.G=wf[6]|0,this.H=wf[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)_f[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const g=_f[d-15],m=_f[d-2],w=(0,As.rotr)(g,7)^(0,As.rotr)(g,18)^g>>>3,v=(0,As.rotr)(m,17)^(0,As.rotr)(m,19)^m>>>10;_f[d]=v+_f[d-7]+w+_f[d-16]|0}let{A:n,B:i,C:a,D:o,E:s,F:c,G:u,H:f}=this;for(let d=0;d<64;d++){const g=(0,As.rotr)(s,6)^(0,As.rotr)(s,11)^(0,As.rotr)(s,25),m=f+g+eze(s,c,u)+rze[d]+_f[d]|0,v=((0,As.rotr)(n,2)^(0,As.rotr)(n,13)^(0,As.rotr)(n,22))+tze(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(){_f.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class nze extends Mce{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}}xp.sha256=(0,As.wrapConstructor)(()=>new Mce);xp.sha224=(0,As.wrapConstructor)(()=>new nze);var Q5={};(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=wk,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"),Ze=ve,ct=BigInt("0x100000000000000000000000000000000"),ft=c(Ze*_e,ee),Et=c(-Re*_e,ee);let ue=k(_e-ft*ve-Et*He,ee),Z=k(-ft*Re-Et*Ze,ee);const ye=ue>ct,Me=Z>ct;if(ye&&(ue=ee-ue),Me&&(Z=ee-Z),ue>ct||Z>ct)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:Ze,y:ct,z:ft}=ee,Et=k(He*He),ue=k(ft*ft),Z=k(ve*ue),ye=k(Ze*Et),Me=k(k(Re*ft)*ue),Le=k(k(ct*He)*Et);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),Ze=k(ve*ve),ct=k(Ze*Ze),ft=ee+Ze,Et=k(i*(k(ft*ft)-He-ct)),ue=k(a*He),Z=k(ue*ue),ye=k(Z-i*Et),Me=k(ue*(Et-ye)-o*ct),Le=k(i*ve*Re);return new S(ye,Me,Le)}add(ee){b(ee);const{x:ve,y:Re,z:He}=this,{x:Ze,y:ct,z:ft}=ee;if(Ze===r||ct===r)return this;if(ve===r||Re===r)return ee;const Et=k(He*He),ue=k(ft*ft),Z=k(ve*ue),ye=k(Ze*Et),Me=k(k(Re*ft)*ue),Le=k(k(ct*He)*Et),_t=k(ye-Z),Ot=k(Le-Me);if(_t===r)return Ot===r?this.double():S.ZERO;const pr=k(_t*_t),lr=k(_t*pr),en=k(Z*pr),gr=k(Ot*Ot-lr-i*en),Er=k(Ot*(en-gr)-Me*lr),on=k(He*ft*_t);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:Ze,k2neg:ct,k2:ft}=u.splitScalar(Re),Et=ve,ue=ve,Z=this;for(;Ze>r||ft>r;)Ze&n&&(Et=Et.add(Z)),ft&n&&(ue=ue.add(Z)),Z=Z.double(),Ze>>=n,ft>>=n;return He&&(Et=Et.negate()),ct&&(ue=ue.negate()),ue=new S(k(ue.x*u.beta),ue.y,ue.z),Et.add(ue)}precomputeWindow(ee){const ve=y?128/ee+1:256/ee+1,Re=[];let He=this,Ze=He;for(let ct=0;ct<ve;ct++){Ze=He,Re.push(Ze);for(let ft=1;ft<2**(ee-1);ft++)Ze=Ze.add(He),Re.push(Ze);He=Ze.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 Ze=S.ZERO,ct=S.BASE;const ft=1+(y?128/Re:256/Re),Et=2**(Re-1),ue=BigInt(2**Re-1),Z=2**Re,ye=BigInt(Re);for(let Me=0;Me<ft;Me++){const Le=Me*Et;let _t=Number(ee&ue);ee>>=ye,_t>Et&&(_t-=Z,ee+=n);const Ot=Le,pr=Le+Math.abs(_t)-1,lr=Me%2!==0,en=_t<0;_t===0?ct=ct.add(x(lr,He[Ot])):Ze=Ze.add(x(en,He[pr]))}return{p:Ze,f:ct}}multiply(ee,ve){let Re=H(ee),He,Ze;if(y){const{k1neg:ct,k1:ft,k2neg:Et,k2:ue}=u.splitScalar(Re);let{p:Z,f:ye}=this.wNAF(ft,ve),{p:Me,f:Le}=this.wNAF(ue,ve);Z=x(ct,Z),Me=x(Et,Me),Me=new S(k(Me.x*u.beta),Me.y,Me.z),He=Z.add(Me),Ze=ye.add(Le)}else{const{p:ct,f:ft}=this.wNAF(Re,ve);He=ct,Ze=ft}return S.normalizeZ([He,Ze])[0]}toAffine(ee){const{x:ve,y:Re,z:He}=this,Ze=this.equals(S.ZERO);ee==null&&(ee=Ze?o:ge(He));const ct=ee,ft=k(ct*ct),Et=k(ft*ct),ue=k(ve*ft),Z=k(Re*Et),ye=k(He*ct);if(Ze)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(!vt(Re))throw new Error("Point is not on curve");const He=v(Re);let Ze=G(He);const ct=(Ze&n)===n;ve?ct&&(Ze=k(-Ze)):(ee[0]&1)===1!==ct&&(Ze=k(-Ze));const ft=new E(Re,Ze);return ft.assertValidity(),ft}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(yt(ee))}static fromSignature(ee,ve,Re){const{r:He,s:Ze}=Yt(ve);if(![0,1,2,3].includes(Re))throw new Error("Cannot recover: invalid recovery bit");const ct=ce($(ee)),{n:ft}=s,Et=Re===2||Re===3?He+ft:He,ue=ge(Et,ft),Z=k(-ct*ue,ft),ye=k(Ze*ue,ft),Me=Re&1?"03":"02",Le=E.fromHex(Me+U(Et)),_t=E.BASE.multiplyAndAddUnsafe(Le,Z,ye);if(!_t)throw new Error("Cannot recover signature: point at infinify");return _t.assertValidity(),_t}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(!vt(ve)||!vt(Re))throw new Error(ee);const He=k(Re*Re),Ze=v(ve);if(k(He-Ze)!==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),Ze=ve===r||ve===n||this!==E.BASE?He.multiplyUnsafe(ve):He.multiply(ve),ct=S.fromAffine(ee).multiplyUnsafe(Re),ft=Ze.add(ct);return ft.equals(S.ZERO)?void 0:ft.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,Ze=ne(Re),ct=ne(He);return`30${ne(He+Re+4)}02${ct}${ve}02${Ze}${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 Ze=_e[Re];ve.set(Ze,He),He+=Ze.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 Y(_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),Ze=Number.parseInt(He,16);if(Number.isNaN(Ze)||Ze<0)throw new Error("Invalid byte sequence");ee[ve]=Ze}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),Ze=BigInt(23),ct=BigInt(44),ft=BigInt(88),Et=_e*_e*_e%ee,ue=Et*Et*_e%ee,Z=M(ue,a)*ue%ee,ye=M(Z,a)*ue%ee,Me=M(ye,i)*Et%ee,Le=M(Me,Re)*Me%ee,_t=M(Le,He)*Le%ee,Ot=M(_t,ct)*_t%ee,pr=M(Ot,ft)*Ot%ee,lr=M(pr,ct)*_t%ee,en=M(lr,a)*ue%ee,gr=M(en,Ze)*Le%ee,Er=M(gr,ve)*Et%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,Ze=n;for(;ve!==r;){const ft=Re/ve,Et=Re%ve,ue=He-Ze*ft;Re=ve,ve=Et,He=Ze,Ze=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((Ze,ct,ft)=>ct===r?Ze:(ve[ft]=Ze,k(Ze*ct,ee)),n),He=ge(Re,ee);return _e.reduceRight((Ze,ct,ft)=>ct===r?Ze:(ve[ft]=k(Ze*ve[ft],ee),k(Ze*ct,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 Ve{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 vt(_e){return r<_e&&_e<s.P}function bt(_e,ee,ve,Re=!0){const{n:He}=s,Ze=ce(_e,!0);if(!tt(Ze))return;const ct=ge(Ze,He),ft=E.BASE.multiply(Ze),Et=k(ft.x,He);if(Et===r)return;const ue=k(ct*k(ee+ve*Et,He),He);if(ue===r)return;let Z=new L(Et,ue),ye=(ft.x===Z.r?0:2)|Number(ft.y&n);return Re&&Z.hasHighS()&&(Z=Z.normalizeS(),ye^=1),{sig:Z,recovery:ye}}function yt(_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(yt(_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 Y(_e)}function Vt(_e,ee,ve){if(_e==null)throw new Error(`sign: expected valid message hash, not "${_e}"`);const Re=$(_e),He=yt(ee),Ze=[Ut(He),Kt(Re)];if(ve!=null){ve===!0&&(ve=t.utils.randomBytes(f));const Et=$(ve);if(Et.length!==f)throw new Error(`sign: Expected ${f} bytes of extra data`);Ze.push(Et)}const ct=q(...Ze),ft=Nt(Re);return{seed:ct,m:ft,d:He}}function $t(_e,ee){const{sig:ve,recovery:Re}=_e,{der:He,recovered:Ze}=Object.assign({canonical:!0,der:!0},ee),ct=He?ve.toDERRawBytes():ve.toCompactRawBytes();return Ze?[ct,Re]:ct}async function Dt(_e,ee,ve={}){const{seed:Re,m:He,d:Ze}=Vt(_e,ee,ve.extraEntropy),ct=new Ve(g,d);await ct.reseed(Re);let ft;for(;!(ft=bt(await ct.generate(),He,Ze,ve.canonical));)await ct.reseed();return $t(ft,ve)}t.sign=Dt;function qt(_e,ee,ve={}){const{seed:Re,m:He,d:Ze}=Vt(_e,ee,ve.extraEntropy),ct=new Ve(g,d);ct.reseedSync(Re);let ft;for(;!(ft=bt(ct.generateSync(),He,Ze,ve.canonical));)ct.reseedSync();return $t(ft,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:Ze,s:ct}=He;if(Re.strict&&He.hasHighS())return!1;const ft=ce(ee);let Et;try{Et=Lt(ve)}catch{return!1}const{n:ue}=s,Z=ge(ct,ue),ye=k(ft*Z,ue),Me=k(Ze*Z,ue),Le=E.BASE.multiplyAndAddUnsafe(Et,ye,Me);return Le?k(Le.x,ue)===Ze:!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(!vt(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:Ze}=this.getScalar(yt(ve));if(this.px=He,this.d=Ze,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 Y(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:Ze}=this.getScalar(ve);return{R:Re,rx:He,k:Ze}}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,Ze=t.utils.taggedHash,ct=this.initNonce(ve,await Ze($r.aux,He)),{R:ft,rx:Et,k:ue}=this.finalizeNonce(await Ze($r.nonce,ct,Re,ee)),Z=tr(await Ze($r.challenge,Et,Re,ee)),ye=this.finalizeSig(ft,ue,Z,ve);return await $n(ye,ee,Re)||this.error(),ye}calcSync(){const{m:ee,d:ve,px:Re,rand:He}=this,Ze=t.utils.taggedHashSync,ct=this.initNonce(ve,Ze($r.aux,He)),{R:ft,rx:Et,k:ue}=this.finalizeNonce(Ze($r.nonce,ct,Re,ee)),Z=tr(Ze($r.challenge,Et,Re,ee)),ye=this.finalizeSig(ft,ue,Z,ve);return Yn(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 oi(_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,yt(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:Ze,P:ct}=oi(_e,ee,ve),ft=tr(await t.utils.taggedHash($r.challenge,Y(Re),ct.toRawX(),Ze));return Dn(Re,ct,He,ft)}catch{return!1}}function Yn(_e,ee,ve){try{const{r:Re,s:He,m:Ze,P:ct}=oi(_e,ee,ve),ft=tr(t.utils.taggedHashSync($r.challenge,Y(Re),ct.toRawX(),Ze));return Dn(Re,ct,He,ft)}catch(Re){if(Re instanceof _)throw Re;return!1}}t.schnorr={Signature:ir,getPublicKey:nr,sign:wn,verify:$n,signSync:Yr,verifySync:Yn},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 yt(_e),!0}catch{return!1}},_bigintTo32Bytes:Y,_normalizePrivateKey:yt,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 Y(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)}}})})(Q5);(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=Rce,r=xp,n=Q5;var i=Q5;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()}})(TL);var Nr={},w2={exports:{}};w2.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(ya),i=Vy,a=n.default.bool;e.assertBool=a;const o=n.default.bytes;e.assertBytes=o;var s=Vy;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 i5=="function"&&i5.bind(t);return{node:m&&!g?m("crypto"):void 0,web:g}})()})(w2,w2.exports);var ize=w2.exports,aze=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]}),oze=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sze=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)&&aze(e,t,r);return oze(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 cze=xp,ri=sze(TL),Rr=ize;function uze(t){if(typeof t!="string")throw new TypeError("hexToNumber: expected string, got "+typeof t);return BigInt(`0x${t}`)}const wd=t=>uze((0,Rr.toHex)(t)),GO=t=>t.toString(16).padStart(64,"0"),J5=t=>(0,Rr.hexToBytes)(GO(t)),{mod:kce}=ri.utils,Mc=ri.CURVE.n;function Gs(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 V1(t){return(0,Rr.assertBytes)(t,64),ri.Signature.fromCompact(t)}function Lce(){return ri.utils.randomPrivateKey()}Nr.createPrivateKeySync=Lce;async function lze(){return Lce()}Nr.createPrivateKey=lze;function fze(t){return(0,Rr.assertBytes)(t,32),ri.utils.isValidPrivateKey(t)}Nr.privateKeyVerify=fze;function dze(t,e=!0,r){(0,Rr.assertBytes)(t,32),(0,Rr.assertBool)(e);const n=ri.getPublicKey(t,e);return Gs(r,e?33:65,n)}Nr.publicKeyCreate=dze;function hze(t){(0,Rr.assertBytes)(t,33,65);try{return ri.Point.fromHex(t),!0}catch{return!1}}Nr.publicKeyVerify=hze;function pze(t,e=!0,r){(0,Rr.assertBytes)(t,33,65),(0,Rr.assertBool)(e);const n=ri.Point.fromHex(t).toRawBytes(e);return Gs(r,e?33:65,n)}Nr.publicKeyConvert=pze;function gze(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]=ri.signSync(t,e,{recovered:!0,der:!1});return{signature:Gs(n,64,i),recid:a}}Nr.ecdsaSign=gze;function yze(t,e,r,n=!0,i){(0,Rr.assertBytes)(r,32),(0,Rr.assertBool)(n);const a=V1(t).toHex(),o=ri.Point.fromSignature(r,a,e);return Gs(i,n?33:65,o.toRawBytes(n))}Nr.ecdsaRecover=yze;function mze(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=wd(t.slice(0,32)),i=wd(t.slice(32,64));if(n>=Mc||i>=Mc)throw new Error("Cannot parse signature");const a=ri.Point.fromHex(r);let o;try{o=V1(t)}catch{return!1}return ri.verify(o,e,a)}Nr.ecdsaVerify=mze;function vze(t,e){(0,Rr.assertBytes)(t,32),(0,Rr.assertBytes)(e,32);let r=wd(e);if(r===0n)throw new Error("Tweak must not be zero");if(r>=Mc)throw new Error("Tweak bigger than curve order");if(r+=wd(t),r>=Mc&&(r-=Mc),r===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return t.set((0,Rr.hexToBytes)(GO(r))),t}Nr.privateKeyTweakAdd=vze;function bze(t){(0,Rr.assertBytes)(t,32);const e=kce(-wd(t),Mc);return t.set((0,Rr.hexToBytes)(GO(e))),t}Nr.privateKeyNegate=bze;function wze(t,e=!0,r){(0,Rr.assertBytes)(t,33,65),(0,Rr.assertBool)(e);const n=ri.Point.fromHex(t).negate();return Gs(r,e?33:65,n.toRawBytes(e))}Nr.publicKeyNegate=wze;function _ze(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=>ri.Point.fromHex(i)).reduce((i,a)=>i.add(a),ri.Point.ZERO);if(n.equals(ri.Point.ZERO))throw new Error("Combined result must not be zero");return Gs(r,e?33:65,n.toRawBytes(e))}Nr.publicKeyCombine=_ze;function Eze(t,e,r=!0,n){(0,Rr.assertBytes)(t,33,65),(0,Rr.assertBytes)(e,32),(0,Rr.assertBool)(r);const i=ri.Point.fromHex(t),a=ri.Point.fromPrivateKey(e),o=i.add(a);if(a.equals(ri.Point.ZERO)||o.equals(ri.Point.ZERO))throw new Error("Tweak must not be zero");return Gs(n,r?33:65,o.toRawBytes(r))}Nr.publicKeyTweakAdd=Eze;function xze(t,e,r=!0,n){(0,Rr.assertBytes)(t,33,65),(0,Rr.assertBytes)(e,32),(0,Rr.assertBool)(r);const i=wd(e);if(i===0n)throw new Error("Tweak must not be zero");if(i<=1||i>=Mc)throw new Error("Tweak is zero or bigger than curve order");const a=ri.Point.fromHex(t).multiply(i);return Gs(n,r?33:65,a.toRawBytes(r))}Nr.publicKeyTweakMul=xze;function Aze(t,e){(0,Rr.assertBytes)(t,32),(0,Rr.assertBytes)(e,32);const r=wd(e);if(r<=1||r>=Mc)throw new Error("Tweak is zero or bigger than curve order");const n=kce(r*wd(t),Mc);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)(GO(n))),t}Nr.privateKeyTweakMul=Aze;function Sze(t,e){const r=V1(t).toRawBytes();return Gs(e,72,V1(t).toRawBytes()).slice(0,r.length)}Nr.signatureExport=Sze;function Oze(t,e){(0,Rr.assertBytes)(t);const r=ri.Signature.fromDER(t);return Gs(e,64,(0,Rr.hexToBytes)(r.toCompactHex()))}Nr.signatureImport=Oze;function Ize(t){const e=V1(t);return e.s>Mc/2n&&t.set(J5(Mc-e.s),32),t}Nr.signatureNormalize=Ize;function Pze(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=ri.Point.fromHex(ri.getSharedSecret(e,t));if(r.hashfn===void 0)return Gs(n,32,(0,cze.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(J5(i.x));const o=r.ybuf||new Uint8Array(32);o.set(J5(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 Gs(n,32,s)}Nr.ecdh=Pze;function Tze(t){t!==null&&(0,Rr.assertBytes)(t,32)}Nr.contextRandomize=Tze;Object.defineProperty(La,"__esModule",{value:!0});La.createUnsafeIdentity=La.computeAddress=La.ethSign=La.createEthereumMessageHash=La.sign=La.recoverAddressFromEthSignature=La.recoverPublicKey=void 0;const Zo=jO,DQ=TL,Uce=Nr;function Bce(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,Uce.ecdsaRecover)(r,n,e,!1).slice(1)}La.recoverPublicKey=Bce;function Rze(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 Fce(t,e){if(typeof t=="string"){if((0,Zo.isHex)(t))return Fce((0,Zo.hexToBytes)(t),e);throw new Error("String signatures must be encoded in hex")}return NL(Bce(Rze(t),CL(e)))}La.recoverAddressFromEthSignature=Fce;function jce(t,e){const r=(0,Uce.ecdsaSign)(e,t),n=r.recid===1?"1c":"1b";return(0,Zo.toHex)(r.signature)+n}La.sign=jce;function CL(t){const e=typeof t=="string"?(0,Zo.stringToUtf8Bytes)(t):t,r=(0,Zo.concatBytes)((0,Zo.stringToUtf8Bytes)(`Ethereum Signed Message:
178
+ `),(0,Zo.stringToUtf8Bytes)(String(e.length)),e);return(0,Zo.hexToBytes)((0,Zo.sha3)(r))}La.createEthereumMessageHash=CL;function Cze(t,e){return jce(t,CL(e))}La.ethSign=Cze;function NL(t){const e=t.length===65&&t[0]===4?t.slice(1):t;return(0,Zo.getAddress)((0,Zo.sha3)(e).substring(24))}La.computeAddress=NL;function Nze(){const t=DQ.utils.randomPrivateKey(),e=(0,DQ.getPublicKey)(t).slice(1),r=NL(e);return{privateKey:(0,Zo.bytesToHex)(t),publicKey:(0,Zo.bytesToHex)(e),address:r}}La.createUnsafeIdentity=Nze;(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(jO),o=qO,s=IL,c=HO,u=i(PL),f=La;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 Y(z,$){const H=C.createSignature(z.ephemeralIdentity,$);return[...z.authChain,{type:s.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:$,signature:H}]}C.signPayload=Y,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 Y=(0,f.recoverAddressFromEthSignature)(L.signature,le),ne=C.toLocaleLowerCase(),F=Y.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 Y=(0,f.createEthereumMessageHash)(L);try{U=(0,a.bytesToHex)(await C.isValidSignature(Y,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 Y=await E(U,q,le);if(Y)return!0;const ne=new u.default(B);try{const{block:F}=await ne.getDate(pe,!1);if(Y=await E(U,q,le,F),Y)return!0}catch(F){throw new Error(`Invalid validation. Error: ${F.message}`)}throw new Error(`Invalid validation. Expected: ${t.ERC1654_MAGIC_VALUE}. Actual: ${Y}`)}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}}})(Tce);(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(Tce,t),r(IL,t)})(Pce);var X5={},wu={},Z5={exports:{}},eD={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})(eD,eD.exports);var DL=eD.exports,tD={exports:{}},rD={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})(rD,rD.exports);var qce=rD.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=i(DL),n=i(qce);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})(tD,tD.exports);var Dze=tD.exports,nD={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var r=n(DL);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})(nD,nD.exports);var $ze=nD.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=_;var r=o(DL),n=o(Dze),i=o($ze),a=o(qce);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 Y=p.match(w);if(Y?(E="",q=Y[1],C=Y[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})(Z5,Z5.exports);var Mze=Z5.exports,$L={};(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()}`}})($L);Object.defineProperty(wu,"__esModule",{value:!0});wu.clearIdentity=wu.storeIdentity=wu.getIdentity=wu.init=void 0;const kze=Mze,Tu=$L,Hce=Tu.SINGLE_SIGN_ON_TARGET,$Q=500,Lze=5;let MQ=0,_2="";const Uze={protocols:["https"],require_protocol:!0};function Bze(t,e={}){if(!(0,kze.default)(t,{...Uze,...e}))throw new Error(`Invalid url: ${t}`);if(_2)throw new Error("Already initialized");const r=document.createElement("iframe");r.id=Hce,r.src=t,r.style.width="0",r.style.height="0",r.style.border="none",r.style.position="absolute",document.body.appendChild(r),_2=t}wu.init=Bze;async function Fze(t){let e;try{e=(await WO(await ML(),Tu.Action.GET,{user:t})).identity??null}catch(r){kL(r),e=(0,Tu.localStorageGetIdentity)(t)}return e}wu.getIdentity=Fze;async function jze(t,e){try{await WO(await ML(),Tu.Action.STORE,{user:t,identity:e})}catch(r){kL(r),(0,Tu.localStorageStoreIdentity)(t,e)}}wu.storeIdentity=jze;async function qze(t){try{await WO(await ML(),Tu.Action.CLEAR,{user:t})}catch(e){kL(e),(0,Tu.localStorageClearIdentity)(t)}}wu.clearIdentity=qze;async function ML(){if(!_2)throw new Error("Not initialized");for(let t=0;t<Lze;t++){const e=document.getElementById(Hce),r=e==null?void 0:e.contentWindow;if(!r){await Hze($Q);continue}try{await WO(r,Tu.Action.PING,{},$Q)}catch{continue}return r}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function WO(t,e,r,n=0){MQ++;const i=MQ;let a=null;const o=new Promise((s,c)=>{a=({data:u})=>{!u||u.target!==Tu.SINGLE_SIGN_ON_TARGET||u.id!==i||(u.error?c(new Error(u.error)):s(u))},window.addEventListener("message",a)});t.postMessage((0,Tu.createMessage)({id:i,action:e,...r}),_2);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 Hze(t){return new Promise(e=>setTimeout(e,t))}function kL(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(wu,t),r($L,t)})(X5);var zce={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})()})(zce);var zze=zce.exports;const Gy=Bc(zze);var Vze=$S();const Gze=Bc(Vze),Wze="https://cdn.decentraland.org/@dcl/auth-site/0.1.3-7378840092.commit-24eec55/assets/logo-9a364aec.svg";var sb={},d6,kQ;function Kze(){if(kQ)return d6;kQ=1;var t=qc(),e=NS();function r(n){return t(n)&&n.nodeType===1&&!e(n)}return d6=r,d6}var Vce=ze.createContext(),Gce=ze.createContext();function Yze(t){var e=t.children,r=ze.useState(null),n=r[0],i=r[1],a=ze.useRef(!1);ze.useEffect(function(){return function(){a.current=!0}},[]);var o=ze.useCallback(function(s){a.current||i(s)},[]);return ze.createElement(Vce.Provider,{value:n},ze.createElement(Gce.Provider,{value:o},e))}var Wce=function(e){return Array.isArray(e)?e[0]:e},Kce=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)}},iD=function(e,r){if(typeof e=="function")return Kce(e,r);e!=null&&(e.current=r)},LQ=function(e){return e.reduce(function(r,n){var i=n[0],a=n[1];return r[i]=a,r},{})},UQ=typeof window<"u"&&window.document&&window.document.createElement?ze.useLayoutEffect:ze.useEffect,Lo="top",Ws="bottom",Ks="right",Uo="left",LL="auto",a_=[Lo,Ws,Ks,Uo],Wy="start",G1="end",Qze="clippingParents",Yce="viewport",cb="popper",Jze="reference",BQ=a_.reduce(function(t,e){return t.concat([e+"-"+Wy,e+"-"+G1])},[]),Qce=[].concat(a_,[LL]).reduce(function(t,e){return t.concat([e,e+"-"+Wy,e+"-"+G1])},[]),Xze="beforeRead",Zze="read",eVe="afterRead",tVe="beforeMain",rVe="main",nVe="afterMain",iVe="beforeWrite",aVe="write",oVe="afterWrite",sVe=[Xze,Zze,eVe,tVe,rVe,nVe,iVe,aVe,oVe];function Ru(t){return t?(t.nodeName||"").toLowerCase():null}function rs(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ap(t){var e=rs(t).Element;return t instanceof e||t instanceof Element}function qs(t){var e=rs(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function UL(t){if(typeof ShadowRoot>"u")return!1;var e=rs(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function cVe(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];!qs(a)||!Ru(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 uVe(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},{});!qs(i)||!Ru(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(c){i.removeAttribute(c)}))})}}const lVe={name:"applyStyles",enabled:!0,phase:"write",fn:cVe,effect:uVe,requires:["computeStyles"]};function Su(t){return t.split("-")[0]}var fp=Math.max,E2=Math.min,Ky=Math.round;function aD(){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 Jce(){return!/^((?!chrome|android).)*safari/i.test(aD())}function Yy(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),i=1,a=1;e&&qs(t)&&(i=t.offsetWidth>0&&Ky(n.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Ky(n.height)/t.offsetHeight||1);var o=Ap(t)?rs(t):window,s=o.visualViewport,c=!Jce()&&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 BL(t){var e=Yy(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 Xce(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&UL(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Hl(t){return rs(t).getComputedStyle(t)}function fVe(t){return["table","td","th"].indexOf(Ru(t))>=0}function Ud(t){return((Ap(t)?t.ownerDocument:t.document)||window.document).documentElement}function KO(t){return Ru(t)==="html"?t:t.assignedSlot||t.parentNode||(UL(t)?t.host:null)||Ud(t)}function FQ(t){return!qs(t)||Hl(t).position==="fixed"?null:t.offsetParent}function dVe(t){var e=/firefox/i.test(aD()),r=/Trident/i.test(aD());if(r&&qs(t)){var n=Hl(t);if(n.position==="fixed")return null}var i=KO(t);for(UL(i)&&(i=i.host);qs(i)&&["html","body"].indexOf(Ru(i))<0;){var a=Hl(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 o_(t){for(var e=rs(t),r=FQ(t);r&&fVe(r)&&Hl(r).position==="static";)r=FQ(r);return r&&(Ru(r)==="html"||Ru(r)==="body"&&Hl(r).position==="static")?e:r||dVe(t)||e}function FL(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function i1(t,e,r){return fp(t,E2(e,r))}function hVe(t,e,r){var n=i1(t,e,r);return n>r?r:n}function Zce(){return{top:0,right:0,bottom:0,left:0}}function eue(t){return Object.assign({},Zce(),t)}function tue(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var pVe=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,eue(typeof e!="number"?e:tue(e,a_))};function gVe(t){var e,r=t.state,n=t.name,i=t.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,s=Su(r.placement),c=FL(s),u=[Uo,Ks].indexOf(s)>=0,f=u?"height":"width";if(!(!a||!o)){var d=pVe(i.padding,r),g=BL(a),m=c==="y"?Lo:Uo,w=c==="y"?Ws:Ks,v=r.rects.reference[f]+r.rects.reference[c]-o[c]-r.rects.popper[f],y=o[c]-r.rects.reference[c],_=o_(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=i1(x,E,O),I=c;r.modifiersData[n]=(e={},e[I]=p,e.centerOffset=p-E,e)}}function yVe(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)||Xce(e.elements.popper,i)&&(e.elements.arrow=i))}const mVe={name:"arrow",enabled:!0,phase:"main",fn:gVe,effect:yVe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qy(t){return t.split("-")[1]}var vVe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bVe(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:Ky(r*i)/i||0,y:Ky(n*i)/i||0}}function jQ(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=Uo,x=Lo,O=window;if(u){var E=o_(r),p="clientHeight",I="clientWidth";if(E===rs(r)&&(E=Ud(r),Hl(E).position!=="static"&&s==="absolute"&&(p="scrollHeight",I="scrollWidth")),E=E,i===Lo||(i===Uo||i===Ks)&&a===G1){x=Ws;var C=d&&E===O&&O.visualViewport?O.visualViewport.height:E[p];v-=C-n.height,v*=c?1:-1}if(i===Uo||(i===Lo||i===Ws)&&a===G1){S=Ks;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&&vVe),le=f===!0?bVe({x:m,y:v},rs(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 wVe(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:Su(e.placement),variation:Qy(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,jQ(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,jQ(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 _Ve={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:wVe,data:{}};var YE={passive:!0};function EVe(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,c=rs(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&u.forEach(function(f){f.addEventListener("scroll",r.update,YE)}),s&&c.addEventListener("resize",r.update,YE),function(){a&&u.forEach(function(f){f.removeEventListener("scroll",r.update,YE)}),s&&c.removeEventListener("resize",r.update,YE)}}const xVe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:EVe,data:{}};var AVe={left:"right",right:"left",bottom:"top",top:"bottom"};function Kx(t){return t.replace(/left|right|bottom|top/g,function(e){return AVe[e]})}var SVe={start:"end",end:"start"};function qQ(t){return t.replace(/start|end/g,function(e){return SVe[e]})}function jL(t){var e=rs(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function qL(t){return Yy(Ud(t)).left+jL(t).scrollLeft}function OVe(t,e){var r=rs(t),n=Ud(t),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var u=Jce();(u||!u&&e==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+qL(t),y:c}}function IVe(t){var e,r=Ud(t),n=jL(t),i=(e=t.ownerDocument)==null?void 0:e.body,a=fp(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=fp(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+qL(t),c=-n.scrollTop;return Hl(i||r).direction==="rtl"&&(s+=fp(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:c}}function HL(t){var e=Hl(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function rue(t){return["html","body","#document"].indexOf(Ru(t))>=0?t.ownerDocument.body:qs(t)&&HL(t)?t:rue(KO(t))}function a1(t,e){var r;e===void 0&&(e=[]);var n=rue(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),a=rs(n),o=i?[a].concat(a.visualViewport||[],HL(n)?n:[]):n,s=e.concat(o);return i?s:s.concat(a1(KO(o)))}function oD(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function PVe(t,e){var r=Yy(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 HQ(t,e,r){return e===Yce?oD(OVe(t,r)):Ap(e)?PVe(e,r):oD(IVe(Ud(t)))}function TVe(t){var e=a1(KO(t)),r=["absolute","fixed"].indexOf(Hl(t).position)>=0,n=r&&qs(t)?o_(t):t;return Ap(n)?e.filter(function(i){return Ap(i)&&Xce(i,n)&&Ru(i)!=="body"}):[]}function RVe(t,e,r,n){var i=e==="clippingParents"?TVe(t):[].concat(e),a=[].concat(i,[r]),o=a[0],s=a.reduce(function(c,u){var f=HQ(t,u,n);return c.top=fp(f.top,c.top),c.right=E2(f.right,c.right),c.bottom=E2(f.bottom,c.bottom),c.left=fp(f.left,c.left),c},HQ(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 nue(t){var e=t.reference,r=t.element,n=t.placement,i=n?Su(n):null,a=n?Qy(n):null,o=e.x+e.width/2-r.width/2,s=e.y+e.height/2-r.height/2,c;switch(i){case Lo:c={x:o,y:e.y-r.height};break;case Ws:c={x:o,y:e.y+e.height};break;case Ks:c={x:e.x+e.width,y:s};break;case Uo:c={x:e.x-r.width,y:s};break;default:c={x:e.x,y:e.y}}var u=i?FL(i):null;if(u!=null){var f=u==="y"?"height":"width";switch(a){case Wy:c[u]=c[u]-(e[f]/2-r[f]/2);break;case G1:c[u]=c[u]+(e[f]/2-r[f]/2);break}}return c}function W1(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?Qze:s,u=r.rootBoundary,f=u===void 0?Yce:u,d=r.elementContext,g=d===void 0?cb:d,m=r.altBoundary,w=m===void 0?!1:m,v=r.padding,y=v===void 0?0:v,_=eue(typeof y!="number"?y:tue(y,a_)),b=g===cb?Jze:cb,S=t.rects.popper,x=t.elements[w?b:g],O=RVe(Ap(x)?x:x.contextElement||Ud(t.elements.popper),c,f,o),E=Yy(t.elements.reference),p=nue({reference:E,element:S,strategy:"absolute",placement:i}),I=oD(Object.assign({},S,p)),C=g===cb?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===cb&&q){var le=q[i];Object.keys(L).forEach(function(pe){var B=[Ks,Ws].indexOf(pe)>=0?1:-1,U=[Lo,Ws].indexOf(pe)>=0?"y":"x";L[pe]+=le[U]*B})}return L}function CVe(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?Qce:c,f=Qy(n),d=f?s?BQ:BQ.filter(function(w){return Qy(w)===f}):a_,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]=W1(t,{placement:v,boundary:i,rootBoundary:a,padding:o})[Su(v)],w},{});return Object.keys(m).sort(function(w,v){return m[w]-m[v]})}function NVe(t){if(Su(t)===LL)return[];var e=Kx(t);return[qQ(t),e,qQ(e)]}function DVe(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,_=Su(y),b=_===y,S=c||(b||!w?[Kx(y)]:NVe(y)),x=[y].concat(S).reduce(function(M,G){return M.concat(Su(G)===LL?CVe(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=Su(q),pe=Qy(q)===Wy,B=[Lo,Ws].indexOf(le)>=0,U=B?"width":"height",Y=W1(e,{placement:q,boundary:f,rootBoundary:d,altBoundary:g,padding:u}),ne=B?pe?Ks:Uo:pe?Ws:Lo;O[U]>E[U]&&(ne=Kx(ne));var F=Kx(ne),j=[];if(a&&j.push(Y[le]<=0),s&&j.push(Y[ne]<=0,Y[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 $Ve={name:"flip",enabled:!0,phase:"main",fn:DVe,requiresIfExists:["offset"],data:{_skip:!1}};function zQ(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 VQ(t){return[Lo,Ks,Ws,Uo].some(function(e){return t[e]>=0})}function MVe(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,o=W1(e,{elementContext:"reference"}),s=W1(e,{altBoundary:!0}),c=zQ(o,n),u=zQ(s,i,a),f=VQ(c),d=VQ(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 kVe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:MVe};function LVe(t,e,r){var n=Su(t),i=[Uo,Lo].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,[Uo,Ks].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function UVe(t){var e=t.state,r=t.options,n=t.name,i=r.offset,a=i===void 0?[0,0]:i,o=Qce.reduce(function(f,d){return f[d]=LVe(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 BVe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:UVe};function FVe(t){var e=t.state,r=t.name;e.modifiersData[r]=nue({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const jVe={name:"popperOffsets",enabled:!0,phase:"read",fn:FVe,data:{}};function qVe(t){return t==="x"?"y":"x"}function HVe(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=W1(e,{boundary:c,rootBoundary:u,padding:d,altBoundary:f}),_=Su(e.placement),b=Qy(e.placement),S=!b,x=FL(_),O=qVe(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"?Lo:Uo,U=x==="y"?Ws:Ks,Y=x==="y"?"height":"width",ne=E[x],F=ne+y[B],j=ne-y[U],z=m?-I[Y]/2:0,$=b===Wy?p[Y]:I[Y],H=b===Wy?-I[Y]:-p[Y],k=e.elements.arrow,M=m&&k?BL(k):{width:0,height:0},G=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Zce(),ge=G[B],Q=G[U],te=i1(0,p[Y],M[Y]),ce=S?p[Y]/2-z-te-ge-L.mainAxis:$-te-ge-L.mainAxis,T=S?-p[Y]/2+z+te+Q+L.mainAxis:H+te+Q+L.mainAxis,fe=e.elements.arrow&&o_(e.elements.arrow),Ve=fe?x==="y"?fe.clientTop||0:fe.clientLeft||0:0,tt=(pe=q==null?void 0:q[x])!=null?pe:0,vt=ne+ce-tt-Ve,bt=ne+T-tt,yt=i1(m?E2(F,vt):F,ne,m?fp(j,bt):j);E[x]=yt,le[x]=yt-ne}if(s){var Lt,Yt=x==="x"?Lo:Uo,wr=x==="x"?Ws:Ks,Rt=E[O],Pt=O==="y"?"height":"width",kt=Rt+y[Yt],Nt=Rt-y[wr],Kt=[Lo,Uo].indexOf(_)!==-1,Ut=(Lt=q==null?void 0:q[O])!=null?Lt:0,Vt=Kt?kt:Rt-p[Pt]-I[Pt]-Ut+L.altAxis,$t=Kt?Rt+p[Pt]+I[Pt]-Ut-L.altAxis:Nt,Dt=m&&Kt?hVe(Vt,Rt,$t):i1(m?Vt:kt,Rt,m?$t:Nt);E[O]=Dt,le[O]=Dt-Rt}e.modifiersData[n]=le}}const zVe={name:"preventOverflow",enabled:!0,phase:"main",fn:HVe,requiresIfExists:["offset"]};function VVe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function GVe(t){return t===rs(t)||!qs(t)?jL(t):VVe(t)}function WVe(t){var e=t.getBoundingClientRect(),r=Ky(e.width)/t.offsetWidth||1,n=Ky(e.height)/t.offsetHeight||1;return r!==1||n!==1}function KVe(t,e,r){r===void 0&&(r=!1);var n=qs(e),i=qs(e)&&WVe(e),a=Ud(e),o=Yy(t,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Ru(e)!=="body"||HL(a))&&(s=GVe(e)),qs(e)?(c=Yy(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):a&&(c.x=qL(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function YVe(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 QVe(t){var e=YVe(t);return sVe.reduce(function(r,n){return r.concat(e.filter(function(i){return i.phase===n}))},[])}function JVe(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function XVe(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 GQ={placement:"bottom",modifiers:[],strategy:"absolute"};function WQ(){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 ZVe(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,i=e.defaultOptions,a=i===void 0?GQ:i;return function(s,c,u){u===void 0&&(u=a);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},GQ,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:Ap(s)?a1(s):s.contextElement?a1(s.contextElement):[],popper:a1(c)};var S=QVe(XVe([].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(WQ(b,S)){f.rects={reference:KVe(b,o_(S),f.options.strategy==="fixed"),popper:BL(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:JVe(function(){return new Promise(function(y){m.forceUpdate(),y(f)})}),destroy:function(){v(),g=!0}};if(!WQ(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 eGe=[xVe,jVe,_Ve,lVe,BVe,$Ve,zVe,mVe,kVe],tGe=ZVe({defaultModifiers:eGe}),rGe=typeof Element<"u",nGe=typeof Map=="function",iGe=typeof Set=="function",aGe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Yx(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(!Yx(t[n],e[n]))return!1;return!0}var a;if(nGe&&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(!Yx(n.value[1],e.get(n.value[0])))return!1;return!0}if(iGe&&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(aGe&&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(rGe&&t instanceof Element)return!1;for(n=r;n--!==0;)if(!((i[n]==="_owner"||i[n]==="__v"||i[n]==="__o")&&t.$$typeof)&&!Yx(t[i[n]],e[i[n]]))return!1;return!0}return t!==t&&e!==e}var oGe=function(e,r){try{return Yx(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 sGe=Bc(oGe);var cGe=[],iue=function(e,r,n){n===void 0&&(n={});var i=ze.useRef(null),a={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||cGe},o=ze.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=o[0],c=o[1],u=ze.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(m){var w=m.state,v=Object.keys(w.elements);E1.flushSync(function(){c({styles:LQ(v.map(function(y){return[y,w.styles[y]||{}]})),attributes:LQ(v.map(function(y){return[y,w.attributes[y]]}))})})},requires:["computeStyles"]}},[]),f=ze.useMemo(function(){var g={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[u,{name:"applyStyles",enabled:!1}])};return sGe(i.current,g)?i.current||g:(i.current=g,g)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,u]),d=ze.useRef();return UQ(function(){d.current&&d.current.setOptions(f)},[f]),UQ(function(){if(!(e==null||r==null)){var g=n.createPopper||tGe,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}},uGe=function(){},lGe=function(){return Promise.resolve(null)},fGe=[];function dGe(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?fGe:a,s=t.referenceElement,c=t.onFirstUpdate,u=t.innerRef,f=t.children,d=ze.useContext(Vce),g=ze.useState(null),m=g[0],w=g[1],v=ze.useState(null),y=v[0],_=v[1];ze.useEffect(function(){iD(u,m)},[u,m]);var b=ze.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=iue(s||d,m,b),x=S.state,O=S.styles,E=S.forceUpdate,p=S.update,I=ze.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||uGe,update:p||lGe}},[w,_,r,x,O,p,E]);return Wce(f)(I)}var hGe=function(){},pGe=hGe;const gGe=Bc(pGe);function yGe(t){var e=t.children,r=t.innerRef,n=ze.useContext(Gce),i=ze.useCallback(function(a){iD(r,a),Kce(n,a)},[r,n]);return ze.useEffect(function(){return function(){return iD(r,null)}},[]),ze.useEffect(function(){gGe(!!n,"`Reference` should not be used outside of a `Manager` component.")},[n]),Wce(e)({ref:i})}const mGe=Object.freeze(Object.defineProperty({__proto__:null,Manager:Yze,Popper:dGe,Reference:yGe,usePopper:iue},Symbol.toStringTag,{value:"Module"})),vGe=fo(mGe);var el={},h6,KQ;function bGe(){if(KQ)return h6;KQ=1;var t=W$();function e(r,n,i,a){return t(r,function(o,s,c){n(a,i(o),s,c)}),a}return h6=e,h6}var p6,YQ;function wGe(){if(YQ)return p6;YQ=1;var t=bGe();function e(r,n){return function(i,a){return t(i,r,n(a),{})}}return p6=e,p6}var g6,QQ;function _Ge(){if(QQ)return g6;QQ=1;var t=Jte(),e=wGe(),r=Od(),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 g6=a,g6}var JQ;function EGe(){if(JQ)return el;JQ=1;var t=br;el.__esModule=!0,el.placementMapping=el.positions=el.positionsMapping=void 0;var e=t(_Ge()),r=t(Ql()),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"};el.positionsMapping=n;var i=(0,r.default)(n);el.positions=i;var a=(0,e.default)(n);return el.placementMapping=a,el}var ub={},y6={exports:{}},m6={exports:{}},v6={exports:{}},XQ;function xGe(){return XQ||(XQ=1,function(t){var e=D$.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}(v6)),v6.exports}var ZQ;function AGe(){return ZQ||(ZQ=1,function(t){var e=D$.default,r=xGe();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}(m6)),m6.exports}var eJ;function SGe(){return eJ||(eJ=1,function(t){var e=AGe();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}(y6)),y6.exports}var tJ;function OGe(){if(tJ)return ub;tJ=1;var t=br;ub.__esModule=!0,ub.default=void 0;var e=t(SGe()),r=t(L$()),n=t(Js()),i=Id,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 ub.default=s,ub}var QE={},rJ;function IGe(){if(rJ)return QE;rJ=1;var t=br;QE.__esModule=!0,QE.default=a;var e=t(Fn()),r=t(ai);t(Un());var n=t(ze),i=Kn();function a(o){var s=o.children,c=o.className,u=o.content,f=(0,r.default)("content",c),d=(0,i.getUnhandledProps)(a,o),g=(0,i.getElementType)(a,o);return n.default.createElement(g,(0,e.default)({},d,{className:f}),i.childrenUtils.isNil(s)?u:s)}return a.handledProps=["as","children","className","content"],a.propTypes={},a.create=(0,i.createShorthandFactory)(a,function(o){return{children:o}}),QE}var JE={},nJ;function PGe(){if(nJ)return JE;nJ=1;var t=br;JE.__esModule=!0,JE.default=a;var e=t(Fn()),r=t(ai);t(Un());var n=t(ze),i=Kn();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}}),JE}var iJ;function TGe(){if(iJ)return sb;iJ=1;var t=Qs,e=br;sb.__esModule=!0,sb.default=void 0;var r=e(Fn()),n=e(jc());e(aM());var i=e(Yl()),a=e(z$()),o=e(Js()),s=e(Kze()),c=e($i()),u=e(rM()),f=e(iM()),d=e(_ce()),g=e(nM()),m=e(ai);e(Un());var w=t(ze),v=vGe,y=e(Ece()),_=Kn(),b=e(oM()),S=EGe(),x=e(OGe()),O=e(IGe()),E=e(PGe()),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={},Y=q.props,ne=Y.on,F=Y.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 Y=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,Ve=z.wide,tt=q.state.contentRestProps;q.positionUpdate=F;var vt=(0,m.default)("ui",S.placementMapping[Y],T,(0,_.useKeyOrValueAndKey)(Ve,"wide"),(0,_.useKeyOnly)($,"basic"),(0,_.useKeyOnly)(ge,"flowing"),(0,_.useKeyOnly)(te,"inverted"),"popup transition visible",k),bt=(0,_.getElementType)(C,q.props),yt=(0,r.default)({left:"auto",right:"auto",position:"initial"},fe),Lt=w.default.createElement(bt,(0,r.default)({},tt,{className:vt,style:yt,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},{}),Y=(0,u.default)(B,b.default.handledProps);return{contentRestProps:U,portalRestProps:Y}};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,Y=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:!!Y,resize:!!Y}},{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 Ve,tt=fe.state;if(!le.zIndexWasSynced){var vt=j==null||(Ve=j.style)==null?void 0:Ve.zIndex;(0,a.default)(vt)&&(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 sb.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,sb}var RGe=br,CGe=RGe(TGe()),NGe=CGe.default;const DGe="_icon_1dxv5_1",b6={icon:DGe,"icon-metamask-mobile":"_icon-metamask-mobile_1dxv5_9","icon-metamask":"_icon-metamask_1dxv5_9","icon-dapper":"_icon-dapper_1dxv5_14","icon-fortmatic":"_icon-fortmatic_1dxv5_18","icon-wallet-connect":"_icon-wallet-connect_1dxv5_22","icon-samsung-blockchain-wallet":"_icon-samsung-blockchain-wallet_1dxv5_26","icon-coinbase":"_icon-coinbase_1dxv5_30","icon-wallet-link":"_icon-wallet-link_1dxv5_31","icon-google":"_icon-google_1dxv5_35","icon-discord":"_icon-discord_1dxv5_39","icon-apple":"_icon-apple_1dxv5_43","icon-x":"_icon-x_1dxv5_47"},aue=t=>{const{className:e,children:r,type:n,testId:i,showTooltip:a,tooltipPosition:o,disabled:s,loading:c,onClick:u}=t;return We.jsx(NGe,{position:a&&o?o:"top center",disabled:!a,trigger:We.jsxs(Ls.Button,{primary:!0,size:"small","data-testid":`${i}-${n}-button`,className:e,onClick:()=>u(n),disabled:s,loading:c,children:[c?null:We.jsx("div",{role:"img","aria-label":n,className:Gy(b6.icon,b6[`icon-${n}`],b6.primaryImage)}),r]},n),content:n,on:"hover"})},$Ge="social-primary-test-id",MGe="social-secondary-test-id",kGe="web3-primary-test-id",LGe="web3-secondary-test-id",UGe="show-more-button-test-id",BGe="_connection_ge0tp_3",FGe="_dclLogo_ge0tp_9",jGe="_title_ge0tp_15",qGe="_subtitle_ge0tp_20",HGe="_primaryButton_ge0tp_29",zGe="_primaryImage_ge0tp_38",VGe="_primaryMessage_ge0tp_42",GGe="_primaryMagic_ge0tp_50",WGe="_primaryLearnMore_ge0tp_61",KGe="_primary_ge0tp_29",YGe="_showMore_ge0tp_76",QGe="_showMoreButton_ge0tp_80",JGe="_showMoreSecondaryOptions_ge0tp_89",XGe="_primaryOption_ge0tp_103",ZGe="_secondaryOptionButton_ge0tp_107",to={connection:BGe,dclLogo:FGe,title:jGe,subtitle:qGe,primaryButton:HGe,primaryImage:zGe,primaryMessage:VGe,primaryMagic:GGe,primaryLearnMore:WGe,primary:KGe,showMore:YGe,showMoreButton:QGe,showMoreSecondaryOptions:JGe,primaryOption:XGe,secondaryOptionButton:ZGe},aJ=({message:t,children:e,option:r,testId:n,loadingOption:i,onConnect:a})=>We.jsxs("div",{className:to.primary,"data-testid":n,children:[We.jsx("div",{className:to.primaryMessage,children:t}),We.jsx(aue,{disabled:!!i,loading:i===r,type:r,onClick:a,className:Gy(to.primaryButton,to.primaryOption),testId:n,children:e})]}),oJ=({options:t,tooltipDirection:e,testId:r,loadingOption:n,onConnect:i})=>We.jsx("div",{className:to.showMoreSecondaryOptions,"data-testid":r,children:t.map(a=>We.jsx(aue,{className:Gy(to.primaryButton,to.secondaryOptionButton),showTooltip:!0,tooltipPosition:e,type:a,onClick:i,testId:r,loading:n===a,disabled:!!n},a))}),eWe={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=>We.jsxs(We.Fragment,{children:["Access secured by ",t]}),web3Message:t=>We.jsxs(We.Fragment,{children:["Curious about wallets? ",t("Learn More")]})}},tWe=t=>{const{i18n:e=eWe.i18n,onConnect:r,onLearnMore:n,socialOptions:i,web3Options:a,className:o,loadingOption:s}=t,[c,u]=ze.useState(!1),f=ze.useCallback(()=>{u(!c)},[c]),d=i&&i.secondary&&i.secondary.length>0,g=a&&a.secondary&&a.secondary.length>0;return We.jsxs("div",{className:Gy(o,to.connection),children:[We.jsx("img",{className:to.dclLogo,src:Wze,alt:"Decentraland logo"}),We.jsxs("div",{children:[We.jsx("h1",{className:to.title,children:e.title}),We.jsx("h2",{className:to.subtitle,children:e.subtitle}),i?We.jsx(aJ,{onConnect:r,testId:$Ge,option:i==null?void 0:i.primary,loadingOption:s,message:We.jsx(We.Fragment,{children:e.socialMessage(We.jsx("div",{className:to.primaryMagic,role:"img","aria-label":"Magic"}))}),children:We.jsx(We.Fragment,{children:e.accessWith(i==null?void 0:i.primary)})}):null,a?We.jsx(aJ,{onConnect:r,testId:kGe,option:a==null?void 0:a.primary,loadingOption:s,message:e.web3Message(m=>We.jsx("span",{className:to.primaryLearnMore,role:"button",onClick:n,children:m})),children:We.jsx(We.Fragment,{children:e.connectWith(a==null?void 0:a.primary)})}):null]}),We.jsxs("div",{className:to.showMore,children:[(g||d)&&We.jsxs(Ls.Button,{"data-testid":UGe,basic:!0,size:"medium",fluid:!0,className:to.showMoreButton,onClick:f,children:[e.moreOptions,We.jsx(Gze,{name:c?"chevron up":"chevron down"})]}),c&&d&&We.jsx(oJ,{testId:MGe,options:i.secondary,onConnect:r,tooltipDirection:"top center",loadingOption:s}),c&&g&&We.jsx(oJ,{testId:LGe,options:a.secondary,onConnect:r,tooltipDirection:"bottom center",loadingOption:s})]})]})};var zn=(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))(zn||{});const rWe=60*24*30,nWe=Dc.getConfiguration().magic.apiKey;function oue(t){switch(t){case zn.DISCORD:case zn.X:case zn.GOOGLE:case zn.APPLE:return Rc.ProviderType.MAGIC;case zn.WALLET_CONNECT:case zn.METAMASK_MOBILE:return Rc.ProviderType.WALLET_CONNECT_V2;case zn.COINBASE:case zn.WALLET_LINK:return Rc.ProviderType.WALLET_LINK;case zn.FORTMATIC:return Rc.ProviderType.FORTMATIC;case zn.METAMASK:case zn.DAPPER:case zn.SAMSUNG:return Rc.ProviderType.INJECTED;default:throw new Error("Invalid provider")}}async function iWe(t,e){const r=new RA(e),n=J8.createRandom(),i={address:n.address.toString(),publicKey:xt(n.publicKey),privateKey:xt(n.privateKey)},a=await r.getSigner();return Pce.Authenticator.initializeAuthChain(t,i,rWe,o=>a.signMessage(o))}async function sJ(t){const e=oue(t);if(Rc.ProviderType.MAGIC===e){const{Magic:n}=await Fy(()=>Promise.resolve().then(()=>Kk),void 0),{OAuthExtension:i}=await Fy(()=>Promise.resolve().then(()=>Yk),void 0),a=new n(nWe,{extensions:[new i]}),o=new URL(window.location.href);o.pathname="/auth/callback",await a.oauth.loginWithRedirect({provider:t===zn.X?"twitter":t,redirectURI:o.href})}const r=await Dc.connection.connect(e);if(!r.account||!r.provider)throw new Error("Could not get provider");return r}function aWe(t){return[zn.APPLE,zn.GOOGLE,zn.X,zn.DISCORD].includes(t)}async function sue(t,e){let r;const n=X5.localStorageGetIdentity(t);return n?r=n:(r=await iWe(t,e),X5.localStorageStoreIdentity(t,r)),r}const oWe=Dc.getConfiguration().magic.apiKey,sWe=()=>{const t=wce(),e=Iw(),[r,n]=ze.useState(!0),i=ze.useCallback(async()=>{var s;const o=await Dc.connection.connect(ql.ProviderType.MAGIC);await sue(((s=o.account)==null?void 0:s.toLowerCase())??"",o.provider)},[]),a=ze.useCallback(async()=>{const{Magic:o}=await Fy(()=>Promise.resolve().then(()=>Kk),void 0),{OAuthExtension:s}=await Fy(()=>Promise.resolve().then(()=>Yk),void 0),c=new o(oWe,{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 ze.useEffect(()=>{a()},[]),We.jsx(Ice,{open:!0,state:r?Ci.VALIDATING_SIGN_IN:Ci.WAITING_FOR_SIGNATURE,onTryAgain:i,providerType:ql.ProviderType.MAGIC})},cWe="_main_1c8le_1",uWe="_infoModal_1c8le_11",lWe="_infoContent_1c8le_15",fWe="_info_1c8le_11",dWe="_infoImage_1c8le_26",hWe="_assets_1c8le_34",pWe="_login_1c8le_38",gWe="_goBackButton_1c8le_42",fc={main:cWe,infoModal:uWe,infoContent:lWe,info:fWe,infoImage:dWe,assets:hWe,login:pWe,goBackButton:gWe},yWe={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"}},mWe=t=>{const{i18n:e=yWe.i18n,onClose:r,open:n}=t;return We.jsxs(AL.Modal,{size:"tiny",open:n,className:fc.infoModal,children:[We.jsx(OL,{title:"",onClose:r}),We.jsx(xL,{className:fc.infoContent,children:We.jsxs("div",{className:fc.main,children:[We.jsx("h1",{className:fc.title,children:e==null?void 0:e.title}),We.jsxs("article",{className:fc.info,children:[We.jsx("div",{className:Gy(fc.infoImage,fc.assets)}),We.jsx("h3",{children:e==null?void 0:e.assets.title}),We.jsx("p",{children:e==null?void 0:e.assets.text})]}),We.jsxs("article",{className:fc.info,children:[We.jsx("div",{className:Gy(fc.infoImage,fc.login)}),We.jsx("h3",{children:e==null?void 0:e.logIn.title}),We.jsx("p",{children:e==null?void 0:e.logIn.text})]}),We.jsx(Ls.Button,{className:fc.goBackButton,secondary:!0,inverted:!0,onClick:r,children:e==null?void 0:e.goBack})]})})]})},vWe="_main_1vyd9_1",bWe="_left_1vyd9_22",wWe="_leftInfo_1vyd9_32",_We="_right_1vyd9_41",EWe="_footer_1vyd9_50",xWe="_guestInfo_1vyd9_69",XE={main:vWe,left:bWe,leftInfo:wWe,right:_We,footer:EWe,guestInfo:xWe},AWe=()=>{const[t]=Sme(),[e,r]=ze.useState(Ci.CONNECTING_WALLET),[n,i]=ze.useState(!1),[a,o]=ze.useState(!1),[s,c]=ze.useState(),u=wce(),f=Iw(),d=u&&new URL(u).pathname==="/play",g=ze.useCallback(()=>{i(!n)},[i,n]),m=ze.useMemo(()=>{if(u){const _=new URL(u);return _.searchParams.append("guest","true"),_.toString()}return""},[u]),w=ze.useCallback(async _=>{var b;if(c(_),aWe(_))r(Ci.LOADING_MAGIC),await sJ(_);else try{o(!0),r(Ci.CONNECTING_WALLET);const S=await sJ(_);t.get("fromRequests")!=="true"&&(r(Ci.WAITING_FOR_SIGNATURE),await sue(((b=S.account)==null?void 0:b.toLowerCase())??"",S.provider)),u?window.location.href=decodeURIComponent(u):f("/user"),o(!1)}catch{r(Ci.ERROR)}},[r,o,c,u,t]),v=ze.useCallback(()=>{o(!1),c(void 0),r(Ci.CONNECTING_WALLET)},[o]),y=ze.useCallback(()=>{s&&w(s)},[s]);return We.jsxs("main",{className:XE.main,children:[We.jsx(mWe,{open:n,onClose:g}),We.jsx(Ice,{open:a,state:e,onClose:v,onTryAgain:y,providerType:s?oue(s):null}),We.jsx("div",{className:XE.left,children:We.jsxs("div",{className:XE.leftInfo,children:[We.jsx(tWe,{onLearnMore:g,onConnect:w,loadingOption:s,socialOptions:{primary:zn.GOOGLE,secondary:[zn.DISCORD,zn.APPLE,zn.X]},web3Options:{primary:zn.METAMASK,secondary:[zn.FORTMATIC,zn.COINBASE,zn.WALLET_CONNECT]}}),d&&We.jsxs("div",{className:XE.guestInfo,children:["Quick dive? ",We.jsx("a",{href:m,children:"Explore as a guest"})]})]})})]})};Cye.render(We.jsx(AJ.StrictMode,{children:We.jsx(Ame,{basename:"/auth",children:We.jsxs(_me,{children:[We.jsx(N0,{path:"/login",element:We.jsx(AWe,{})}),We.jsx(N0,{path:"/callback",element:We.jsx(sWe,{})}),We.jsx(N0,{path:"/user",element:We.jsx(u9e,{})}),We.jsx(N0,{path:"/requests/:requestId",element:We.jsx(sHe,{})}),We.jsx(N0,{path:"*",element:We.jsx(cHe,{})})]})})}),document.getElementById("root"));export{lt as B,kTe as R,Gie as T,xNe as _,ai as a,za as b,Ne as c,Bc as d,po as e,fN as f,fo as g,Ma as h,PG as n,NWe as o,Nc as p,wk as r,Gse as s,CWe as t,jy as y};
187
+ //# sourceMappingURL=index-ae5690b8.js.map