diff --git a/kinode/src/register-ui/build/assets/index-CqsVFnwl.js b/kinode/src/register-ui/build/assets/index-CqsVFnwl.js new file mode 100644 index 000000000..f52698012 --- /dev/null +++ b/kinode/src/register-ui/build/assets/index-CqsVFnwl.js @@ -0,0 +1,130 @@ +var Em=Object.defineProperty;var Cm=(t,e,r)=>e in t?Em(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var it=(t,e,r)=>(Cm(t,typeof e!="symbol"?e+"":e,r),r);function Fm(t,e){for(var r=0;rn[u]})}}}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 u of document.querySelectorAll('link[rel="modulepreload"]'))n(u);new MutationObserver(u=>{for(const i of u)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(u){const i={};return u.integrity&&(i.integrity=u.integrity),u.referrerPolicy&&(i.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?i.credentials="include":u.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(u){if(u.ep)return;u.ep=!0;const i=r(u);fetch(u.href,i)}})();var f0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function P0(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 u=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,u.get?u:{enumerable:!0,get:function(){return t[n]}})}),r}var Uc={exports:{}},da={},Oc={exports:{}},p0={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Vi=Symbol.for("react.element"),Bm=Symbol.for("react.portal"),Dm=Symbol.for("react.fragment"),_m=Symbol.for("react.strict_mode"),km=Symbol.for("react.profiler"),Sm=Symbol.for("react.provider"),Tm=Symbol.for("react.context"),Pm=Symbol.for("react.forward_ref"),Nm=Symbol.for("react.suspense"),Mm=Symbol.for("react.memo"),Um=Symbol.for("react.lazy"),Cl=Symbol.iterator;function Om(t){return t===null||typeof t!="object"?null:(t=Cl&&t[Cl]||t["@@iterator"],typeof t=="function"?t:null)}var Ic={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Rc=Object.assign,Lc={};function eu(t,e,r){this.props=t,this.context=e,this.refs=Lc,this.updater=r||Ic}eu.prototype.isReactComponent={};eu.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};eu.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function jc(){}jc.prototype=eu.prototype;function ws(t,e,r){this.props=t,this.context=e,this.refs=Lc,this.updater=r||Ic}var Es=ws.prototype=new jc;Es.constructor=ws;Rc(Es,eu.prototype);Es.isPureReactComponent=!0;var Fl=Array.isArray,zc=Object.prototype.hasOwnProperty,Cs={current:null},$c={key:!0,ref:!0,__self:!0,__source:!0};function qc(t,e,r){var n,u={},i=null,a=null;if(e!=null)for(n in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(i=""+e.key),e)zc.call(e,n)&&!$c.hasOwnProperty(n)&&(u[n]=e[n]);var o=arguments.length-2;if(o===1)u.children=r;else if(1>>1,f=D[b];if(0>>1;bu(p,q))Iu(L,p)?(D[b]=L,D[I]=q,b=I):(D[b]=p,D[B]=q,b=B);else if(Iu(L,q))D[b]=L,D[I]=q,b=I;else break e}}return R}function u(D,R){var q=D.sortIndex-R.sortIndex;return q!==0?q:D.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var s=[],l=[],c=1,y=null,v=3,w=!1,_=!1,M=!1,N=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(D){for(var R=r(l);R!==null;){if(R.callback===null)n(l);else if(R.startTime<=D)n(l),R.sortIndex=R.expirationTime,e(s,R);else break;R=r(l)}}function z(D){if(M=!1,T(D),!_)if(r(s)!==null)_=!0,P($);else{var R=r(l);R!==null&&F(z,R.startTime-D)}}function $(D,R){_=!1,M&&(M=!1,k(e1),e1=-1),w=!0;var q=v;try{for(T(R),y=r(s);y!==null&&(!(y.expirationTime>R)||D&&!S());){var b=y.callback;if(typeof b=="function"){y.callback=null,v=y.priorityLevel;var f=b(y.expirationTime<=R);R=t.unstable_now(),typeof f=="function"?y.callback=f:y===r(s)&&n(s),T(R)}else n(s);y=r(s)}if(y!==null)var m=!0;else{var B=r(l);B!==null&&F(z,B.startTime-R),m=!1}return m}finally{y=null,v=q,w=!1}}var Y=!1,J=null,e1=-1,i1=5,o1=-1;function S(){return!(t.unstable_now()-o1D||125b?(D.sortIndex=q,e(l,D),r(s)===null&&D===r(l)&&(M?(k(e1),e1=-1):M=!0,F(z,q-b))):(D.sortIndex=f,e(s,D),_||w||(_=!0,P($))),D},t.unstable_shouldYield=S,t.unstable_wrapCallback=function(D){var R=v;return function(){var q=v;v=R;try{return D.apply(this,arguments)}finally{v=q}}}})(Vc);Gc.exports=Vc;var Wm=Gc.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Wc=n1,ht=Wm;function E1(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n3=Object.prototype.hasOwnProperty,Qm=/^[: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]*$/,Dl={},_l={};function Jm(t){return n3.call(_l,t)?!0:n3.call(Dl,t)?!1:Qm.test(t)?_l[t]=!0:(Dl[t]=!0,!1)}function Ym(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 Xm(t,e,r,n){if(e===null||typeof e>"u"||Ym(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 Ve(t,e,r,n,u,i,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=u,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=a}var Be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Be[t]=new Ve(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Be[e]=new Ve(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Be[t]=new Ve(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Be[t]=new Ve(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){Be[t]=new Ve(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Be[t]=new Ve(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Be[t]=new Ve(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Be[t]=new Ve(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Be[t]=new Ve(t,5,!1,t.toLowerCase(),null,!1,!1)});var Bs=/[\-:]([a-z])/g;function Ds(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(Bs,Ds);Be[e]=new Ve(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(Bs,Ds);Be[e]=new Ve(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(Bs,Ds);Be[e]=new Ve(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Be[t]=new Ve(t,1,!1,t.toLowerCase(),null,!1,!1)});Be.xlinkHref=new Ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Be[t]=new Ve(t,1,!1,t.toLowerCase(),null,!0,!0)});function _s(t,e,r,n){var u=Be.hasOwnProperty(e)?Be[e]:null;(u!==null?u.type!==0:n||!(2o||u[a]!==i[o]){var s=` +`+u[a].replace(" at new "," at ");return t.displayName&&s.includes("")&&(s=s.replace("",t.displayName)),s}while(1<=a&&0<=o);break}}}finally{Xa=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Uu(t):""}function Zm(t){switch(t.tag){case 5:return Uu(t.type);case 16:return Uu("Lazy");case 13:return Uu("Suspense");case 19:return Uu("SuspenseList");case 0:case 2:case 15:return t=Za(t.type,!1),t;case 11:return t=Za(t.type.render,!1),t;case 1:return t=Za(t.type,!0),t;default:return""}}function o3(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 ln:return"Fragment";case sn:return"Portal";case u3:return"Profiler";case ks:return"StrictMode";case i3:return"Suspense";case a3:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Yc:return(t.displayName||"Context")+".Consumer";case Jc:return(t._context.displayName||"Context")+".Provider";case Ss:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Ts:return e=t.displayName||null,e!==null?e:o3(t.type)||"Memo";case br:e=t._payload,t=t._init;try{return o3(t(e))}catch{}}return null}function ey(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return o3(e);case 8:return e===ks?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function jr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Zc(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function ty(t){var e=Zc(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 u=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return u.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function h5(t){t._valueTracker||(t._valueTracker=ty(t))}function e7(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Zc(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function v8(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 s3(t,e){var r=e.checked;return J0({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Sl(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=jr(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 t7(t,e){e=e.checked,e!=null&&_s(t,"checked",e,!1)}function l3(t,e){t7(t,e);var r=jr(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")?f3(t,e.type,r):e.hasOwnProperty("defaultValue")&&f3(t,e.type,jr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Tl(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 f3(t,e,r){(e!=="number"||v8(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Ou=Array.isArray;function Fn(t,e,r,n){if(t=t.options,e){e={};for(var u=0;u"+e.valueOf().toString()+"",e=p5.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function hi(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var $u={animationIterationCount:!0,aspectRatio:!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},ry=["Webkit","ms","Moz","O"];Object.keys($u).forEach(function(t){ry.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),$u[e]=$u[t]})});function i7(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||$u.hasOwnProperty(t)&&$u[t]?(""+e).trim():e+"px"}function a7(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,u=i7(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,u):t[r]=u}}var ny=J0({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 h3(t,e){if(e){if(ny[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(E1(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(E1(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(E1(61))}if(e.style!=null&&typeof e.style!="object")throw Error(E1(62))}}function p3(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}}var b3=null;function Ps(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var m3=null,Bn=null,Dn=null;function Ml(t){if(t=Ji(t)){if(typeof m3!="function")throw Error(E1(280));var e=t.stateNode;e&&(e=ya(e),m3(t.stateNode,t.type,e))}}function o7(t){Bn?Dn?Dn.push(t):Dn=[t]:Bn=t}function s7(){if(Bn){var t=Bn,e=Dn;if(Dn=Bn=null,Ml(t),e)for(t=0;t>>=0,t===0?32:31-(py(t)/by|0)|0}var b5=64,m5=4194304;function Iu(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function C8(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,u=t.suspendedLanes,i=t.pingedLanes,a=r&268435455;if(a!==0){var o=a&~u;o!==0?n=Iu(o):(i&=a,i!==0&&(n=Iu(i)))}else a=r&~u,a!==0?n=Iu(a):i!==0&&(n=Iu(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&u)&&(u=n&-n,i=e&-e,u>=i||u===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function Wi(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Wt(e),t[e]=r}function xy(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=Hu),ql=" ",Hl=!1;function _7(t,e){switch(t){case"keyup":return Vy.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function k7(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var fn=!1;function Qy(t,e){switch(t){case"compositionend":return k7(e);case"keypress":return e.which!==32?null:(Hl=!0,ql);case"textInput":return t=e.data,t===ql&&Hl?null:t;default:return null}}function Jy(t,e){if(fn)return t==="compositionend"||!js&&_7(t,e)?(t=B7(),r8=Is=wr=null,fn=!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)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=Wl(r)}}function N7(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?N7(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function M7(){for(var t=window,e=v8();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=v8(t.document)}return e}function zs(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")}function ig(t){var e=M7(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&N7(r.ownerDocument.documentElement,r)){if(n!==null&&zs(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var u=r.textContent.length,i=Math.min(n.start,u);n=n.end===void 0?i:Math.min(n.end,u),!t.extend&&i>n&&(u=n,n=i,i=u),u=Ql(r,i);var a=Ql(r,n);u&&a&&(t.rangeCount!==1||t.anchorNode!==u.node||t.anchorOffset!==u.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(u.node,u.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,cn=null,w3=null,Gu=null,E3=!1;function Jl(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;E3||cn==null||cn!==v8(n)||(n=cn,"selectionStart"in n&&zs(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}),Gu&&xi(Gu,n)||(Gu=n,n=D8(w3,"onSelect"),0pn||(t.current=k3[pn],k3[pn]=null,pn--)}function L0(t,e){pn++,k3[pn]=t.current,t.current=e}var zr={},Oe=Gr(zr),tt=Gr(!1),F2=zr;function Ln(t,e){var r=t.type.contextTypes;if(!r)return zr;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var u={},i;for(i in r)u[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=u),u}function rt(t){return t=t.childContextTypes,t!=null}function k8(){H0(tt),H0(Oe)}function n9(t,e,r){if(Oe.current!==zr)throw Error(E1(168));L0(Oe,e),L0(tt,r)}function q7(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var u in n)if(!(u in e))throw Error(E1(108,ey(t)||"Unknown",u));return J0({},r,n)}function S8(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||zr,F2=Oe.current,L0(Oe,t),L0(tt,tt.current),!0}function u9(t,e,r){var n=t.stateNode;if(!n)throw Error(E1(169));r?(t=q7(t,e,F2),n.__reactInternalMemoizedMergedChildContext=t,H0(tt),H0(Oe),L0(Oe,t)):H0(tt),L0(tt,r)}var j6=null,ga=!1,po=!1;function H7(t){j6===null?j6=[t]:j6.push(t)}function yg(t){ga=!0,H7(t)}function Vr(){if(!po&&j6!==null){po=!0;var t=0,e=F0;try{var r=j6;for(F0=1;t>=a,u-=a,H6=1<<32-Wt(e)+u|r<e1?(i1=J,J=null):i1=J.sibling;var o1=v(k,J,T[e1],z);if(o1===null){J===null&&(J=i1);break}t&&J&&o1.alternate===null&&e(k,J),C=i(o1,C,e1),Y===null?$=o1:Y.sibling=o1,Y=o1,J=i1}if(e1===T.length)return r(k,J),K0&&o2(k,e1),$;if(J===null){for(;e1e1?(i1=J,J=null):i1=J.sibling;var S=v(k,J,o1.value,z);if(S===null){J===null&&(J=i1);break}t&&J&&S.alternate===null&&e(k,J),C=i(S,C,e1),Y===null?$=S:Y.sibling=S,Y=S,J=i1}if(o1.done)return r(k,J),K0&&o2(k,e1),$;if(J===null){for(;!o1.done;e1++,o1=T.next())o1=y(k,o1.value,z),o1!==null&&(C=i(o1,C,e1),Y===null?$=o1:Y.sibling=o1,Y=o1);return K0&&o2(k,e1),$}for(J=n(k,J);!o1.done;e1++,o1=T.next())o1=w(J,k,e1,o1.value,z),o1!==null&&(t&&o1.alternate!==null&&J.delete(o1.key===null?e1:o1.key),C=i(o1,C,e1),Y===null?$=o1:Y.sibling=o1,Y=o1);return t&&J.forEach(function(X){return e(k,X)}),K0&&o2(k,e1),$}function N(k,C,T,z){if(typeof T=="object"&&T!==null&&T.type===ln&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case d5:e:{for(var $=T.key,Y=C;Y!==null;){if(Y.key===$){if($=T.type,$===ln){if(Y.tag===7){r(k,Y.sibling),C=u(Y,T.props.children),C.return=k,k=C;break e}}else if(Y.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===br&&c9($)===Y.type){r(k,Y.sibling),C=u(Y,T.props),C.ref=Fu(k,Y,T),C.return=k,k=C;break e}r(k,Y);break}else e(k,Y);Y=Y.sibling}T.type===ln?(C=x2(T.props.children,k.mode,z,T.key),C.return=k,k=C):(z=f8(T.type,T.key,T.props,null,k.mode,z),z.ref=Fu(k,C,T),z.return=k,k=z)}return a(k);case sn:e:{for(Y=T.key;C!==null;){if(C.key===Y)if(C.tag===4&&C.stateNode.containerInfo===T.containerInfo&&C.stateNode.implementation===T.implementation){r(k,C.sibling),C=u(C,T.children||[]),C.return=k,k=C;break e}else{r(k,C);break}else e(k,C);C=C.sibling}C=wo(T,k.mode,z),C.return=k,k=C}return a(k);case br:return Y=T._init,N(k,C,Y(T._payload),z)}if(Ou(T))return _(k,C,T,z);if(vu(T))return M(k,C,T,z);E5(k,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,C!==null&&C.tag===6?(r(k,C.sibling),C=u(C,T),C.return=k,k=C):(r(k,C),C=Ao(T,k.mode,z),C.return=k,k=C),a(k)):r(k,C)}return N}var zn=X7(!0),Z7=X7(!1),Yi={},w6=Gr(Yi),Ei=Gr(Yi),Ci=Gr(Yi);function b2(t){if(t===Yi)throw Error(E1(174));return t}function Js(t,e){switch(L0(Ci,e),L0(Ei,t),L0(w6,Yi),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:d3(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=d3(e,t)}H0(w6),L0(w6,e)}function $n(){H0(w6),H0(Ei),H0(Ci)}function ed(t){b2(Ci.current);var e=b2(w6.current),r=d3(e,t.type);e!==r&&(L0(Ei,t),L0(w6,r))}function Ys(t){Ei.current===t&&(H0(w6),H0(Ei))}var W0=Gr(0);function O8(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&128)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 bo=[];function Xs(){for(var t=0;tr?r:4,t(!0);var n=mo.transition;mo.transition={};try{t(!1),e()}finally{F0=r,mo.transition=n}}function md(){return St().memoizedState}function Ag(t,e,r){var n=Mr(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},yd(t))gd(e,r);else if(r=W7(t,e,r,n),r!==null){var u=He();Qt(r,t,n,u),xd(r,e,n)}}function wg(t,e,r){var n=Mr(t),u={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(yd(t))gd(e,u);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var a=e.lastRenderedState,o=i(a,r);if(u.hasEagerState=!0,u.eagerState=o,Yt(o,a)){var s=e.interleaved;s===null?(u.next=u,Ws(e)):(u.next=s.next,s.next=u),e.interleaved=u;return}}catch{}finally{}r=W7(t,e,u,n),r!==null&&(u=He(),Qt(r,t,n,u),xd(r,e,n))}}function yd(t){var e=t.alternate;return t===Q0||e!==null&&e===Q0}function gd(t,e){Vu=I8=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function xd(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Ms(t,r)}}var R8={readContext:kt,useCallback:ke,useContext:ke,useEffect:ke,useImperativeHandle:ke,useInsertionEffect:ke,useLayoutEffect:ke,useMemo:ke,useReducer:ke,useRef:ke,useState:ke,useDebugValue:ke,useDeferredValue:ke,useTransition:ke,useMutableSource:ke,useSyncExternalStore:ke,useId:ke,unstable_isNewReconciler:!1},Eg={readContext:kt,useCallback:function(t,e){return s6().memoizedState=[t,e===void 0?null:e],t},useContext:kt,useEffect:h9,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,a8(4194308,4,cd.bind(null,e,t),r)},useLayoutEffect:function(t,e){return a8(4194308,4,t,e)},useInsertionEffect:function(t,e){return a8(4,2,t,e)},useMemo:function(t,e){var r=s6();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=s6();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=Ag.bind(null,Q0,t),[n.memoizedState,t]},useRef:function(t){var e=s6();return t={current:t},e.memoizedState=t},useState:d9,useDebugValue:n4,useDeferredValue:function(t){return s6().memoizedState=t},useTransition:function(){var t=d9(!1),e=t[0];return t=vg.bind(null,t[1]),s6().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Q0,u=s6();if(K0){if(r===void 0)throw Error(E1(407));r=r()}else{if(r=e(),me===null)throw Error(E1(349));D2&30||nd(n,e,r)}u.memoizedState=r;var i={value:r,getSnapshot:e};return u.queue=i,h9(id.bind(null,n,i,t),[t]),n.flags|=2048,Di(9,ud.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=s6(),e=me.identifierPrefix;if(K0){var r=K6,n=H6;r=(n&~(1<<32-Wt(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Fi++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=a.createElement(r,{is:n.is}):(t=a.createElement(r),r==="select"&&(a=t,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):t=a.createElementNS(t,r),t[c6]=e,t[wi]=n,_d(t,e,!1,!1),e.stateNode=t;e:{switch(a=p3(r,n),r){case"dialog":q0("cancel",t),q0("close",t),u=n;break;case"iframe":case"object":case"embed":q0("load",t),u=n;break;case"video":case"audio":for(u=0;uHn&&(e.flags|=128,n=!0,Bu(i,!1),e.lanes=4194304)}else{if(!n)if(t=O8(a),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Bu(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!K0)return Se(e),null}else 2*ue()-i.renderingStartTime>Hn&&r!==1073741824&&(e.flags|=128,n=!0,Bu(i,!1),e.lanes=4194304);i.isBackwards?(a.sibling=e.child,e.child=a):(r=i.last,r!==null?r.sibling=a:e.child=a,i.last=a)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=ue(),e.sibling=null,r=W0.current,L0(W0,n?r&1|2:r&1),e):(Se(e),null);case 22:case 23:return l4(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?at&1073741824&&(Se(e),e.subtreeFlags&6&&(e.flags|=8192)):Se(e),null;case 24:return null;case 25:return null}throw Error(E1(156,e.tag))}function Tg(t,e){switch(qs(e),e.tag){case 1:return rt(e.type)&&k8(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return $n(),H0(tt),H0(Oe),Xs(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Ys(e),null;case 13:if(H0(W0),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(E1(340));jn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return H0(W0),null;case 4:return $n(),null;case 10:return Vs(e.type._context),null;case 22:case 23:return l4(),null;case 24:return null;default:return null}}var F5=!1,Pe=!1,Pg=typeof WeakSet=="function"?WeakSet:Set,T1=null;function gn(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Z0(t,e,n)}else r.current=null}function z3(t,e,r){try{r()}catch(n){Z0(t,e,n)}}var w9=!1;function Ng(t,e){if(C3=F8,t=M7(),zs(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var u=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,o=-1,s=-1,l=0,c=0,y=t,v=null;t:for(;;){for(var w;y!==r||u!==0&&y.nodeType!==3||(o=a+u),y!==i||n!==0&&y.nodeType!==3||(s=a+n),y.nodeType===3&&(a+=y.nodeValue.length),(w=y.firstChild)!==null;)v=y,y=w;for(;;){if(y===t)break t;if(v===r&&++l===u&&(o=a),v===i&&++c===n&&(s=a),(w=y.nextSibling)!==null)break;y=v,v=y.parentNode}y=w}r=o===-1||s===-1?null:{start:o,end:s}}else r=null}r=r||{start:0,end:0}}else r=null;for(F3={focusedElem:t,selectionRange:r},F8=!1,T1=e;T1!==null;)if(e=T1,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,T1=t;else for(;T1!==null;){e=T1;try{var _=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var M=_.memoizedProps,N=_.memoizedState,k=e.stateNode,C=k.getSnapshotBeforeUpdate(e.elementType===e.type?M:jt(e.type,M),N);k.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var T=e.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E1(163))}}catch(z){Z0(e,e.return,z)}if(t=e.sibling,t!==null){t.return=e.return,T1=t;break}T1=e.return}return _=w9,w9=!1,_}function Wu(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var u=n=n.next;do{if((u.tag&t)===t){var i=u.destroy;u.destroy=void 0,i!==void 0&&z3(e,r,i)}u=u.next}while(u!==n)}}function Aa(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function $3(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function Td(t){var e=t.alternate;e!==null&&(t.alternate=null,Td(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[c6],delete e[wi],delete e[_3],delete e[bg],delete e[mg])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Pd(t){return t.tag===5||t.tag===3||t.tag===4}function E9(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Pd(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function q3(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,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=_8));else if(n!==4&&(t=t.child,t!==null))for(q3(t,e,r),t=t.sibling;t!==null;)q3(t,e,r),t=t.sibling}function H3(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(H3(t,e,r),t=t.sibling;t!==null;)H3(t,e,r),t=t.sibling}var we=null,qt=!1;function dr(t,e,r){for(r=r.child;r!==null;)Nd(t,e,r),r=r.sibling}function Nd(t,e,r){if(A6&&typeof A6.onCommitFiberUnmount=="function")try{A6.onCommitFiberUnmount(ha,r)}catch{}switch(r.tag){case 5:Pe||gn(r,e);case 6:var n=we,u=qt;we=null,dr(t,e,r),we=n,qt=u,we!==null&&(qt?(t=we,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):we.removeChild(r.stateNode));break;case 18:we!==null&&(qt?(t=we,r=r.stateNode,t.nodeType===8?ho(t.parentNode,r):t.nodeType===1&&ho(t,r),yi(t)):ho(we,r.stateNode));break;case 4:n=we,u=qt,we=r.stateNode.containerInfo,qt=!0,dr(t,e,r),we=n,qt=u;break;case 0:case 11:case 14:case 15:if(!Pe&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){u=n=n.next;do{var i=u,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&z3(r,e,a),u=u.next}while(u!==n)}dr(t,e,r);break;case 1:if(!Pe&&(gn(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){Z0(r,e,o)}dr(t,e,r);break;case 21:dr(t,e,r);break;case 22:r.mode&1?(Pe=(n=Pe)||r.memoizedState!==null,dr(t,e,r),Pe=n):dr(t,e,r);break;default:dr(t,e,r)}}function C9(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new Pg),e.forEach(function(n){var u=$g.bind(null,t,n);r.has(n)||(r.add(n),n.then(u,u))})}}function Ot(t,e){var r=e.deletions;if(r!==null)for(var n=0;nu&&(u=a),n&=~i}if(n=u,n=ue()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ug(n/1960))-n,10t?16:t,Er===null)var n=!1;else{if(t=Er,Er=null,z8=0,w0&6)throw Error(E1(331));var u=w0;for(w0|=4,T1=t.current;T1!==null;){var i=T1,a=i.child;if(T1.flags&16){var o=i.deletions;if(o!==null){for(var s=0;sue()-o4?g2(t,0):a4|=r),nt(t,e)}function zd(t,e){e===0&&(t.mode&1?(e=m5,m5<<=1,!(m5&130023424)&&(m5=4194304)):e=1);var r=He();t=X6(t,e),t!==null&&(Wi(t,e,r),nt(t,r))}function zg(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),zd(t,r)}function $g(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,u=t.memoizedState;u!==null&&(r=u.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(E1(314))}n!==null&&n.delete(e),zd(t,r)}var $d;$d=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||tt.current)et=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return et=!1,kg(t,e,r);et=!!(t.flags&131072)}else et=!1,K0&&e.flags&1048576&&K7(e,P8,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;o8(t,e),t=e.pendingProps;var u=Ln(e,Oe.current);kn(e,r),u=e4(null,e,n,t,u,r);var i=t4();return e.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,rt(n)?(i=!0,S8(e)):i=!1,e.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Qs(e),u.updater=xa,e.stateNode=u,u._reactInternals=e,M3(e,n,t,r),e=I3(null,e,n,!0,i,r)):(e.tag=0,K0&&i&&$s(e),Le(null,e,u,r),e=e.child),e;case 16:n=e.elementType;e:{switch(o8(t,e),t=e.pendingProps,u=n._init,n=u(n._payload),e.type=n,u=e.tag=Hg(n),t=jt(n,t),u){case 0:e=O3(null,e,n,t,r);break e;case 1:e=x9(null,e,n,t,r);break e;case 11:e=y9(null,e,n,t,r);break e;case 14:e=g9(null,e,n,jt(n.type,t),r);break e}throw Error(E1(306,n,""))}return e;case 0:return n=e.type,u=e.pendingProps,u=e.elementType===n?u:jt(n,u),O3(t,e,n,u,r);case 1:return n=e.type,u=e.pendingProps,u=e.elementType===n?u:jt(n,u),x9(t,e,n,u,r);case 3:e:{if(Fd(e),t===null)throw Error(E1(387));n=e.pendingProps,i=e.memoizedState,u=i.element,Q7(t,e),U8(e,n,null,r);var a=e.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){u=qn(Error(E1(423)),e),e=v9(t,e,n,r,u);break e}else if(n!==u){u=qn(Error(E1(424)),e),e=v9(t,e,n,r,u);break e}else for(lt=Tr(e.stateNode.containerInfo.firstChild),dt=e,K0=!0,Ht=null,r=Z7(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(jn(),n===u){e=Z6(t,e,r);break e}Le(t,e,n,r)}e=e.child}return e;case 5:return ed(e),t===null&&T3(e),n=e.type,u=e.pendingProps,i=t!==null?t.memoizedProps:null,a=u.children,B3(n,u)?a=null:i!==null&&B3(n,i)&&(e.flags|=32),Cd(t,e),Le(t,e,a,r),e.child;case 6:return t===null&&T3(e),null;case 13:return Bd(t,e,r);case 4:return Js(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=zn(e,null,n,r):Le(t,e,n,r),e.child;case 11:return n=e.type,u=e.pendingProps,u=e.elementType===n?u:jt(n,u),y9(t,e,n,u,r);case 7:return Le(t,e,e.pendingProps,r),e.child;case 8:return Le(t,e,e.pendingProps.children,r),e.child;case 12:return Le(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,u=e.pendingProps,i=e.memoizedProps,a=u.value,L0(N8,n._currentValue),n._currentValue=a,i!==null)if(Yt(i.value,a)){if(i.children===u.children&&!tt.current){e=Z6(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){a=i.child;for(var s=o.firstContext;s!==null;){if(s.context===n){if(i.tag===1){s=V6(-1,r&-r),s.tag=2;var l=i.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?s.next=s:(s.next=c.next,c.next=s),l.pending=s}}i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),P3(i.return,r,e),o.lanes|=r;break}s=s.next}}else if(i.tag===10)a=i.type===e.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(E1(341));a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),P3(a,r,e),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Le(t,e,u.children,r),e=e.child}return e;case 9:return u=e.type,n=e.pendingProps.children,kn(e,r),u=kt(u),n=n(u),e.flags|=1,Le(t,e,n,r),e.child;case 14:return n=e.type,u=jt(n,e.pendingProps),u=jt(n.type,u),g9(t,e,n,u,r);case 15:return wd(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,u=e.pendingProps,u=e.elementType===n?u:jt(n,u),o8(t,e),e.tag=1,rt(n)?(t=!0,S8(e)):t=!1,kn(e,r),Y7(e,n,u),M3(e,n,u,r),I3(null,e,n,!0,t,r);case 19:return Dd(t,e,r);case 22:return Ed(t,e,r)}throw Error(E1(156,e.tag))};function qd(t,e){return b7(t,e)}function qg(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.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(t,e,r,n){return new qg(t,e,r,n)}function c4(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Hg(t){if(typeof t=="function")return c4(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Ss)return 11;if(t===Ts)return 14}return 2}function Ur(t,e){var r=t.alternate;return r===null?(r=Dt(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.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,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 f8(t,e,r,n,u,i){var a=2;if(n=t,typeof t=="function")c4(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case ln:return x2(r.children,u,i,e);case ks:a=8,u|=8;break;case u3:return t=Dt(12,r,e,u|2),t.elementType=u3,t.lanes=i,t;case i3:return t=Dt(13,r,e,u),t.elementType=i3,t.lanes=i,t;case a3:return t=Dt(19,r,e,u),t.elementType=a3,t.lanes=i,t;case Xc:return Ea(r,u,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Jc:a=10;break e;case Yc:a=9;break e;case Ss:a=11;break e;case Ts:a=14;break e;case br:a=16,n=null;break e}throw Error(E1(130,t==null?t:typeof t,""))}return e=Dt(a,r,e,u),e.elementType=t,e.type=n,e.lanes=i,e}function x2(t,e,r,n){return t=Dt(7,t,n,e),t.lanes=r,t}function Ea(t,e,r,n){return t=Dt(22,t,n,e),t.elementType=Xc,t.lanes=r,t.stateNode={isHidden:!1},t}function Ao(t,e,r){return t=Dt(6,t,null,e),t.lanes=r,t}function wo(t,e,r){return e=Dt(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Kg(t,e,r,n,u){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=to(0),this.expirationTimes=to(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=to(0),this.identifierPrefix=n,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function d4(t,e,r,n,u,i,a,o,s){return t=new Kg(t,e,r,o,s),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Dt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qs(i),t}function Gg(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Vd)}catch(t){console.error(t)}}Vd(),Kc.exports=bt;var Wd=Kc.exports,P9=Wd;r3.createRoot=P9.createRoot,r3.hydrateRoot=P9.hydrateRoot;/** + * @remix-run/router v1.15.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ki(){return ki=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function Qd(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Xg(){return Math.random().toString(36).substr(2,8)}function M9(t,e){return{usr:t.state,key:t.key,idx:e}}function Q3(t,e,r,n){return r===void 0&&(r=null),ki({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?nu(e):e,{state:r,key:e&&e.key||n||Xg()})}function H8(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 nu(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 Zg(t,e,r,n){n===void 0&&(n={});let{window:u=document.defaultView,v5Compat:i=!1}=n,a=u.history,o=Cr.Pop,s=null,l=c();l==null&&(l=0,a.replaceState(ki({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function y(){o=Cr.Pop;let N=c(),k=N==null?null:N-l;l=N,s&&s({action:o,location:M.location,delta:k})}function v(N,k){o=Cr.Push;let C=Q3(M.location,N,k);l=c()+1;let T=M9(C,l),z=M.createHref(C);try{a.pushState(T,"",z)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;u.location.assign(z)}i&&s&&s({action:o,location:M.location,delta:1})}function w(N,k){o=Cr.Replace;let C=Q3(M.location,N,k);l=c();let T=M9(C,l),z=M.createHref(C);a.replaceState(T,"",z),i&&s&&s({action:o,location:M.location,delta:0})}function _(N){let k=u.location.origin!=="null"?u.location.origin:u.location.href,C=typeof N=="string"?N:H8(N);return C=C.replace(/ $/,"%20"),ie(k,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,k)}let M={get action(){return o},get location(){return t(u,a)},listen(N){if(s)throw new Error("A history only accepts one active listener");return u.addEventListener(N9,y),s=N,()=>{u.removeEventListener(N9,y),s=null}},createHref(N){return e(u,N)},createURL:_,encodeLocation(N){let k=_(N);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:v,replace:w,go(N){return a.go(N)}};return M}var U9;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(U9||(U9={}));function ex(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?nu(e):e,u=m4(n.pathname||"/",r);if(u==null)return null;let i=Jd(t);tx(i);let a=null;for(let o=0;a==null&&o{let s={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};s.relativePath.startsWith("/")&&(ie(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(n.length));let l=Or([n,s.relativePath]),c=r.concat(s);i.children&&i.children.length>0&&(ie(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),Jd(i.children,e,c,l)),!(i.path==null&&!i.index)&&e.push({path:l,score:sx(l,i.index),routesMeta:c})};return t.forEach((i,a)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))u(i,a);else for(let s of Yd(i.path))u(i,a,s)}),e}function Yd(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,u=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return u?[i,""]:[i];let a=Yd(n.join("/")),o=[];return o.push(...a.map(s=>s===""?i:[i,s].join("/"))),u&&o.push(...a),o.map(s=>t.startsWith("/")&&s===""?"/":s)}function tx(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:lx(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const rx=/^:[\w-]+$/,nx=3,ux=2,ix=1,ax=10,ox=-2,O9=t=>t==="*";function sx(t,e){let r=t.split("/"),n=r.length;return r.some(O9)&&(n+=ox),e&&(n+=ux),r.filter(u=>!O9(u)).reduce((u,i)=>u+(rx.test(i)?nx:i===""?ix:ax),n)}function lx(t,e){return t.length===e.length&&t.slice(0,-1).every((n,u)=>n===e[u])?t[t.length-1]-e[e.length-1]:0}function fx(t,e){let{routesMeta:r}=t,n={},u="/",i=[];for(let a=0;a{let{paramName:v,isOptional:w}=c;if(v==="*"){let M=o[y]||"";a=i.slice(0,i.length-M.length).replace(/(.)\/+$/,"$1")}const _=o[y];return w&&!_?l[v]=void 0:l[v]=(_||"").replace(/%2F/g,"/"),l},{}),pathname:i,pathnameBase:a,pattern:t}}function dx(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),Qd(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=[],u="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,s)=>(n.push({paramName:o,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),u+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?u+="\\/*$":t!==""&&t!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,e?void 0:"i"),n]}function hx(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Qd(!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 m4(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 px(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:u=""}=typeof t=="string"?nu(t):t;return{pathname:r?r.startsWith("/")?r:bx(r,e):e,search:gx(n),hash:xx(u)}}function bx(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(u=>{u===".."?r.length>1&&r.pop():u!=="."&&r.push(u)}),r.length>1?r.join("/"):"/"}function Eo(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 and the router will parse it for you.'}function mx(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function y4(t,e){let r=mx(t);return e?r.map((n,u)=>u===t.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function g4(t,e,r,n){n===void 0&&(n=!1);let u;typeof t=="string"?u=nu(t):(u=ki({},t),ie(!u.pathname||!u.pathname.includes("?"),Eo("?","pathname","search",u)),ie(!u.pathname||!u.pathname.includes("#"),Eo("#","pathname","hash",u)),ie(!u.search||!u.search.includes("#"),Eo("#","search","hash",u)));let i=t===""||u.pathname==="",a=i?"/":u.pathname,o;if(a==null)o=r;else{let y=e.length-1;if(!n&&a.startsWith("..")){let v=a.split("/");for(;v[0]==="..";)v.shift(),y-=1;u.pathname=v.join("/")}o=y>=0?e[y]:"/"}let s=px(u,o),l=a&&a!=="/"&&a.endsWith("/"),c=(i||a===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(l||c)&&(s.pathname+="/"),s}const Or=t=>t.join("/").replace(/\/\/+/g,"/"),yx=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),gx=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,xx=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function vx(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Xd=["post","put","patch","delete"];new Set(Xd);const Ax=["get",...Xd];new Set(Ax);/** + * React Router v6.22.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Si(){return Si=Object.assign?Object.assign.bind():function(t){for(var e=1;e{o.current=!0}),n1.useCallback(function(l,c){if(c===void 0&&(c={}),!o.current)return;if(typeof l=="number"){n.go(l);return}let y=g4(l,JSON.parse(a),i,c.relative==="path");t==null&&e!=="/"&&(y.pathname=y.pathname==="/"?e:Or([e,y.pathname])),(c.replace?n.replace:n.push)(y,c.state,c)},[e,n,a,i,t])}function Fx(){let{matches:t}=n1.useContext(ur),e=t[t.length-1];return e?e.params:{}}function th(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=n1.useContext(Wr),{matches:u}=n1.useContext(ur),{pathname:i}=Xi(),a=JSON.stringify(y4(u,n.v7_relativeSplatPath));return n1.useMemo(()=>g4(t,JSON.parse(a),i,r==="path"),[t,a,i,r])}function Bx(t,e){return Dx(t,e)}function Dx(t,e,r,n){uu()||ie(!1);let{navigator:u}=n1.useContext(Wr),{matches:i}=n1.useContext(ur),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let l=Xi(),c;if(e){var y;let N=typeof e=="string"?nu(e):e;s==="/"||(y=N.pathname)!=null&&y.startsWith(s)||ie(!1),c=N}else c=l;let v=c.pathname||"/",w=v;if(s!=="/"){let N=s.replace(/^\//,"").split("/");w="/"+v.replace(/^\//,"").split("/").slice(N.length).join("/")}let _=ex(t,{pathname:w}),M=Px(_&&_.map(N=>Object.assign({},N,{params:Object.assign({},o,N.params),pathname:Or([s,u.encodeLocation?u.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?s:Or([s,u.encodeLocation?u.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),i,r,n);return e&&M?n1.createElement(_a.Provider,{value:{location:Si({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Cr.Pop}},M):M}function _x(){let t=Ox(),e=vx(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,u={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return n1.createElement(n1.Fragment,null,n1.createElement("h2",null,"Unexpected Application Error!"),n1.createElement("h3",{style:{fontStyle:"italic"}},e),r?n1.createElement("pre",{style:u},r):null,null)}const kx=n1.createElement(_x,null);class Sx extends n1.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!==void 0?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!==void 0?n1.createElement(ur.Provider,{value:this.props.routeContext},n1.createElement(Zd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Tx(t){let{routeContext:e,match:r,children:n}=t,u=n1.useContext(x4);return u&&u.static&&u.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=r.route.id),n1.createElement(ur.Provider,{value:e},n)}function Px(t,e,r,n){var u;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var i;if((i=r)!=null&&i.errors)t=r.matches;else return null}let a=t,o=(u=r)==null?void 0:u.errors;if(o!=null){let c=a.findIndex(y=>y.route.id&&(o==null?void 0:o[y.route.id]));c>=0||ie(!1),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,l=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,y,v)=>{let w,_=!1,M=null,N=null;r&&(w=o&&y.route.id?o[y.route.id]:void 0,M=y.route.errorElement||kx,s&&(l<0&&v===0?(_=!0,N=null):l===v&&(_=!0,N=y.route.hydrateFallbackElement||null)));let k=e.concat(a.slice(0,v+1)),C=()=>{let T;return w?T=M:_?T=N:y.route.Component?T=n1.createElement(y.route.Component,null):y.route.element?T=y.route.element:T=c,n1.createElement(Tx,{match:y,routeContext:{outlet:c,matches:k,isDataRoute:r!=null},children:T})};return r&&(y.route.ErrorBoundary||y.route.errorElement||v===0)?n1.createElement(Sx,{location:r.location,revalidation:r.revalidation,component:M,error:w,children:C(),routeContext:{outlet:null,matches:k,isDataRoute:!0}}):C()},null)}var rh=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(rh||{}),K8=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}(K8||{});function Nx(t){let e=n1.useContext(x4);return e||ie(!1),e}function Mx(t){let e=n1.useContext(wx);return e||ie(!1),e}function Ux(t){let e=n1.useContext(ur);return e||ie(!1),e}function nh(t){let e=Ux(),r=e.matches[e.matches.length-1];return r.route.id||ie(!1),r.route.id}function Ox(){var t;let e=n1.useContext(Zd),r=Mx(K8.UseRouteError),n=nh(K8.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function Ix(){let{router:t}=Nx(rh.UseNavigateStable),e=nh(K8.UseNavigateStable),r=n1.useRef(!1);return eh(()=>{r.current=!0}),n1.useCallback(function(u,i){i===void 0&&(i={}),r.current&&(typeof u=="number"?t.navigate(u):t.navigate(u,Si({fromRouteId:e},i)))},[t,e])}function Rx(t){let{to:e,replace:r,state:n,relative:u}=t;uu()||ie(!1);let{future:i,static:a}=n1.useContext(Wr),{matches:o}=n1.useContext(ur),{pathname:s}=Xi(),l=ir(),c=g4(e,y4(o,i.v7_relativeSplatPath),s,u==="path"),y=JSON.stringify(c);return n1.useEffect(()=>l(JSON.parse(y),{replace:r,state:n,relative:u}),[l,y,u,r,n]),null}function a6(t){ie(!1)}function Lx(t){let{basename:e="/",children:r=null,location:n,navigationType:u=Cr.Pop,navigator:i,static:a=!1,future:o}=t;uu()&&ie(!1);let s=e.replace(/^\/*/,"/"),l=n1.useMemo(()=>({basename:s,navigator:i,static:a,future:Si({v7_relativeSplatPath:!1},o)}),[s,o,i,a]);typeof n=="string"&&(n=nu(n));let{pathname:c="/",search:y="",hash:v="",state:w=null,key:_="default"}=n,M=n1.useMemo(()=>{let N=m4(c,s);return N==null?null:{location:{pathname:N,search:y,hash:v,state:w,key:_},navigationType:u}},[s,c,y,v,w,_,u]);return M==null?null:n1.createElement(Wr.Provider,{value:l},n1.createElement(_a.Provider,{children:r,value:M}))}function jx(t){let{children:e,location:r}=t;return Bx(J3(e),r)}new Promise(()=>{});function J3(t,e){e===void 0&&(e=[]);let r=[];return n1.Children.forEach(t,(n,u)=>{if(!n1.isValidElement(n))return;let i=[...e,u];if(n.type===n1.Fragment){r.push.apply(r,J3(n.props.children,i));return}n.type!==a6&&ie(!1),!n.props.index||!n.props.children||ie(!1);let a={id:n.props.id||i.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&&(a.children=J3(n.props.children,i)),r.push(a)}),r}/** + * React Router DOM v6.22.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Y3(){return Y3=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[u]=t[u]);return r}function $x(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function qx(t,e){return t.button===0&&(!e||e==="_self")&&!$x(t)}const Hx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Kx="6";try{window.__reactRouterVersion=Kx}catch{}const Gx="startTransition",I9=zm[Gx];function Vx(t){let{basename:e,children:r,future:n,window:u}=t,i=n1.useRef();i.current==null&&(i.current=Yg({window:u,v5Compat:!0}));let a=i.current,[o,s]=n1.useState({action:a.action,location:a.location}),{v7_startTransition:l}=n||{},c=n1.useCallback(y=>{l&&I9?I9(()=>s(y)):s(y)},[s,l]);return n1.useLayoutEffect(()=>a.listen(c),[a,c]),n1.createElement(Lx,{basename:e,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}const Wx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Qx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,v4=n1.forwardRef(function(e,r){let{onClick:n,relative:u,reloadDocument:i,replace:a,state:o,target:s,to:l,preventScrollReset:c,unstable_viewTransition:y}=e,v=zx(e,Hx),{basename:w}=n1.useContext(Wr),_,M=!1;if(typeof l=="string"&&Qx.test(l)&&(_=l,Wx))try{let T=new URL(window.location.href),z=l.startsWith("//")?new URL(T.protocol+l):new URL(l),$=m4(z.pathname,w);z.origin===T.origin&&$!=null?l=$+z.search+z.hash:M=!0}catch{}let N=Ex(l,{relative:u}),k=Jx(l,{replace:a,state:o,target:s,preventScrollReset:c,relative:u,unstable_viewTransition:y});function C(T){n&&n(T),T.defaultPrevented||k(T)}return n1.createElement("a",Y3({},v,{href:_||N,onClick:M||i?n:C,ref:r,target:s}))});var R9;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(R9||(R9={}));var L9;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(L9||(L9={}));function Jx(t,e){let{target:r,replace:n,state:u,preventScrollReset:i,relative:a,unstable_viewTransition:o}=e===void 0?{}:e,s=ir(),l=Xi(),c=th(t,{relative:a});return n1.useCallback(y=>{if(qx(y,r)){y.preventDefault();let v=n!==void 0?n:H8(l)===H8(c);s(t,{replace:v,state:u,preventScrollReset:i,relative:a,unstable_viewTransition:o})}},[l,s,c,n,u,r,t,i,a,o])}var ka={},W6={},uh={};const Yx="logger/5.7.0";let j9=!1,z9=!1;const c8={debug:1,default:2,info:2,warning:3,error:4,off:5};let $9=c8.default,Co=null;function Xx(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const q9=Xx();var G8;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(G8||(G8={}));var Et;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(Et||(Et={}));const H9="0123456789abcdef";class Z{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();c8[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!($9>c8[n])&&console.log.apply(console,r)}debug(...e){this._log(Z.levels.DEBUG,e)}info(...e){this._log(Z.levels.INFO,e)}warn(...e){this._log(Z.levels.WARNING,e)}makeError(e,r,n){if(z9)return this.makeError("censored error",r,{});r||(r=Z.errors.UNKNOWN_ERROR),n||(n={});const u=[];Object.keys(n).forEach(s=>{const l=n[s];try{if(l instanceof Uint8Array){let c="";for(let y=0;y>4],c+=H9[l[y]&15];u.push(s+"=Uint8Array(0x"+c+")")}else u.push(s+"="+JSON.stringify(l))}catch{u.push(s+"="+JSON.stringify(n[s].toString()))}}),u.push(`code=${r}`),u.push(`version=${this.version}`);const i=e;let a="";switch(r){case Et.NUMERIC_FAULT:{a="NUMERIC_FAULT";const s=e;switch(s){case"overflow":case"underflow":case"division-by-zero":a+="-"+s;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result";break}break}case Et.CALL_EXCEPTION:case Et.INSUFFICIENT_FUNDS:case Et.MISSING_NEW:case Et.NONCE_EXPIRED:case Et.REPLACEMENT_UNDERPRICED:case Et.TRANSACTION_REPLACED:case Et.UNPREDICTABLE_GAS_LIMIT:a=r;break}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),u.length&&(e+=" ("+u.join(", ")+")");const o=new Error(e);return o.reason=i,o.code=r,Object.keys(n).forEach(function(s){o[s]=n[s]}),o}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,Z.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,u){e||this.throwError(r,n,u)}assertArgument(e,r,n,u){e||this.throwArgumentError(r,n,u)}checkNormalize(e){q9&&this.throwError("platform missing String.prototype.normalize",Z.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:q9})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Z.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Z.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,Z.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Z.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",Z.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Z.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return Co||(Co=new Z(Yx)),Co}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Z.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),j9){if(!e)return;this.globalLogger().throwError("error censorship permanent",Z.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}z9=!!e,j9=!!r}static setLogLevel(e){const r=c8[e.toLowerCase()];if(r==null){Z.globalLogger().warn("invalid log level - "+e);return}$9=r}static from(e){return new Z(e)}}Z.errors=Et;Z.levels=G8;const Zx=Object.freeze(Object.defineProperty({__proto__:null,get ErrorCode(){return Et},get LogLevel(){return G8},Logger:Z},Symbol.toStringTag,{value:"Module"})),ev="bytes/5.7.0",Y0=new Z(ev);function ih(t){return!!t.toHexString}function Tn(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Tn(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Zi(t){return W1(t)&&!(t.length%2)||Qr(t)}function K9(t){return typeof t=="number"&&t==t&&t%1===0}function Qr(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!K9(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function v1(t,e){if(e||(e={}),typeof t=="number"){Y0.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),Tn(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),ih(t)&&(t=t.toHexString()),W1(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":Y0.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let u=0;uv1(u)),r=e.reduce((u,i)=>u+i.length,0),n=new Uint8Array(r);return e.reduce((u,i)=>(n.set(i,u),u+i.length),0),Tn(n)}function E6(t){let e=v1(t);if(e.length===0)return e;let r=0;for(;re&&Y0.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),Tn(r)}function W1(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const Fo="0123456789abcdef";function F1(t,e){if(e||(e={}),typeof t=="number"){Y0.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Fo[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),ih(t))return t.toHexString();if(W1(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":Y0.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Qr(t)){let r="0x";for(let n=0;n>4]+Fo[u&15]}return r}return Y0.throwArgumentError("invalid hexlify value","value",t)}function _6(t){if(typeof t!="string")t=F1(t);else if(!W1(t)||t.length%2)return null;return(t.length-2)/2}function ne(t,e,r){return typeof t!="string"?t=F1(t):(!W1(t)||t.length%2)&&Y0.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function $e(t){let e="0x";return t.forEach(r=>{e+=F1(r).substring(2)}),e}function e5(t){const e=ah(F1(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function ah(t){typeof t!="string"&&(t=F1(t)),W1(t)||Y0.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Y0.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function I2(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Zi(t)){let r=v1(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=F1(r.slice(0,32)),e.s=F1(r.slice(32,64))):r.length===65?(e.r=F1(r.slice(0,32)),e.s=F1(r.slice(32,64)),e.v=r[64]):Y0.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:Y0.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=F1(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const u=Yu(v1(e._vs),32);e._vs=F1(u);const i=u[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=i:e.recoveryParam!==i&&Y0.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),u[0]&=127;const a=F1(u);e.s==null?e.s=a:e.s!==a&&Y0.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?Y0.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const u=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==u&&Y0.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!W1(e.r)?Y0.throwArgumentError("signature missing or invalid r","signature",t):e.r=R0(e.r,32),e.s==null||!W1(e.s)?Y0.throwArgumentError("signature missing or invalid s","signature",t):e.s=R0(e.s,32);const r=v1(e.s);r[0]>=128&&Y0.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=F1(r);e._vs&&(W1(e._vs)||Y0.throwArgumentError("signature invalid _vs","signature",t),e._vs=R0(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Y0.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function X3(t){return t=I2(t),F1(I0([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const tv=Object.freeze(Object.defineProperty({__proto__:null,arrayify:v1,concat:I0,hexConcat:$e,hexDataLength:_6,hexDataSlice:ne,hexStripZeros:ah,hexValue:e5,hexZeroPad:R0,hexlify:F1,isBytes:Qr,isBytesLike:Zi,isHexString:W1,joinSignature:X3,splitSignature:I2,stripZeros:E6,zeroPad:Yu},Symbol.toStringTag,{value:"Module"}));var A4={exports:{}};const rv={},nv=Object.freeze(Object.defineProperty({__proto__:null,default:rv},Symbol.toStringTag,{value:"Module"})),uv=P0(nv);A4.exports;(function(t){(function(e,r){function n(U,d){if(!U)throw new Error(d||"Assertion failed")}function u(U,d){U.super_=d;var x=function(){};x.prototype=d.prototype,U.prototype=new x,U.prototype.constructor=U}function i(U,d,x){if(i.isBN(U))return U;this.negative=0,this.words=null,this.length=0,this.red=null,U!==null&&((d==="le"||d==="be")&&(x=d,d=10),this._init(U||0,d||10,x||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=uv.Buffer}catch{}i.isBN=function(d){return d instanceof i?!0:d!==null&&typeof d=="object"&&d.constructor.wordSize===i.wordSize&&Array.isArray(d.words)},i.max=function(d,x){return d.cmp(x)>0?d:x},i.min=function(d,x){return d.cmp(x)<0?d:x},i.prototype._init=function(d,x,P){if(typeof d=="number")return this._initNumber(d,x,P);if(typeof d=="object")return this._initArray(d,x,P);x==="hex"&&(x=16),n(x===(x|0)&&x>=2&&x<=36),d=d.toString().replace(/\s+/g,"");var F=0;d[0]==="-"&&(F++,this.negative=1),F=0;F-=3)R=d[F]|d[F-1]<<8|d[F-2]<<16,this.words[D]|=R<>>26-q&67108863,q+=24,q>=26&&(q-=26,D++);else if(P==="le")for(F=0,D=0;F>>26-q&67108863,q+=24,q>=26&&(q-=26,D++);return this._strip()};function o(U,d){var x=U.charCodeAt(d);if(x>=48&&x<=57)return x-48;if(x>=65&&x<=70)return x-55;if(x>=97&&x<=102)return x-87;n(!1,"Invalid character in "+U)}function s(U,d,x){var P=o(U,x);return x-1>=d&&(P|=o(U,x-1)<<4),P}i.prototype._parseHex=function(d,x,P){this.length=Math.ceil((d.length-x)/6),this.words=new Array(this.length);for(var F=0;F=x;F-=2)q=s(d,x,F)<=18?(D-=18,R+=1,this.words[R]|=q>>>26):D+=8;else{var b=d.length-x;for(F=b%2===0?x+1:x;F=18?(D-=18,R+=1,this.words[R]|=q>>>26):D+=8}this._strip()};function l(U,d,x,P){for(var F=0,D=0,R=Math.min(U.length,x),q=d;q=49?D=b-49+10:b>=17?D=b-17+10:D=b,n(b>=0&&D1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=y}catch{i.prototype.inspect=y}else i.prototype.inspect=y;function y(){return(this.red?""}var v=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(d,x){d=d||10,x=x|0||1;var P;if(d===16||d==="hex"){P="";for(var F=0,D=0,R=0;R>>24-F&16777215,F+=2,F>=26&&(F-=26,R--),D!==0||R!==this.length-1?P=v[6-b.length]+b+P:P=b+P}for(D!==0&&(P=D.toString(16)+P);P.length%x!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}if(d===(d|0)&&d>=2&&d<=36){var f=w[d],m=_[d];P="";var B=this.clone();for(B.negative=0;!B.isZero();){var p=B.modrn(m).toString(d);B=B.idivn(m),B.isZero()?P=p+P:P=v[f-p.length]+p+P}for(this.isZero()&&(P="0"+P);P.length%x!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var d=this.words[0];return this.length===2?d+=this.words[1]*67108864:this.length===3&&this.words[2]===1?d+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(d,x){return this.toArrayLike(a,d,x)}),i.prototype.toArray=function(d,x){return this.toArrayLike(Array,d,x)};var M=function(d,x){return d.allocUnsafe?d.allocUnsafe(x):new d(x)};i.prototype.toArrayLike=function(d,x,P){this._strip();var F=this.byteLength(),D=P||Math.max(1,F);n(F<=D,"byte array longer than desired length"),n(D>0,"Requested array length <= 0");var R=M(d,D),q=x==="le"?"LE":"BE";return this["_toArrayLike"+q](R,F),R},i.prototype._toArrayLikeLE=function(d,x){for(var P=0,F=0,D=0,R=0;D>8&255),P>16&255),R===6?(P>24&255),F=0,R=0):(F=q>>>24,R+=2)}if(P=0&&(d[P--]=q>>8&255),P>=0&&(d[P--]=q>>16&255),R===6?(P>=0&&(d[P--]=q>>24&255),F=0,R=0):(F=q>>>24,R+=2)}if(P>=0)for(d[P--]=F;P>=0;)d[P--]=0},Math.clz32?i.prototype._countBits=function(d){return 32-Math.clz32(d)}:i.prototype._countBits=function(d){var x=d,P=0;return x>=4096&&(P+=13,x>>>=13),x>=64&&(P+=7,x>>>=7),x>=8&&(P+=4,x>>>=4),x>=2&&(P+=2,x>>>=2),P+x},i.prototype._zeroBits=function(d){if(d===0)return 26;var x=d,P=0;return x&8191||(P+=13,x>>>=13),x&127||(P+=7,x>>>=7),x&15||(P+=4,x>>>=4),x&3||(P+=2,x>>>=2),x&1||P++,P},i.prototype.bitLength=function(){var d=this.words[this.length-1],x=this._countBits(d);return(this.length-1)*26+x};function N(U){for(var d=new Array(U.bitLength()),x=0;x>>F&1}return d}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var d=0,x=0;xd.length?this.clone().ior(d):d.clone().ior(this)},i.prototype.uor=function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},i.prototype.iuand=function(d){var x;this.length>d.length?x=d:x=this;for(var P=0;Pd.length?this.clone().iand(d):d.clone().iand(this)},i.prototype.uand=function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},i.prototype.iuxor=function(d){var x,P;this.length>d.length?(x=this,P=d):(x=d,P=this);for(var F=0;Fd.length?this.clone().ixor(d):d.clone().ixor(this)},i.prototype.uxor=function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},i.prototype.inotn=function(d){n(typeof d=="number"&&d>=0);var x=Math.ceil(d/26)|0,P=d%26;this._expand(x),P>0&&x--;for(var F=0;F0&&(this.words[F]=~this.words[F]&67108863>>26-P),this._strip()},i.prototype.notn=function(d){return this.clone().inotn(d)},i.prototype.setn=function(d,x){n(typeof d=="number"&&d>=0);var P=d/26|0,F=d%26;return this._expand(P+1),x?this.words[P]=this.words[P]|1<d.length?(P=this,F=d):(P=d,F=this);for(var D=0,R=0;R>>26;for(;D!==0&&R>>26;if(this.length=P.length,D!==0)this.words[this.length]=D,this.length++;else if(P!==this)for(;Rd.length?this.clone().iadd(d):d.clone().iadd(this)},i.prototype.isub=function(d){if(d.negative!==0){d.negative=0;var x=this.iadd(d);return d.negative=1,x._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var P=this.cmp(d);if(P===0)return this.negative=0,this.length=1,this.words[0]=0,this;var F,D;P>0?(F=this,D=d):(F=d,D=this);for(var R=0,q=0;q>26,this.words[q]=x&67108863;for(;R!==0&&q>26,this.words[q]=x&67108863;if(R===0&&q>>26,B=b&67108863,p=Math.min(f,d.length-1),I=Math.max(0,f-U.length+1);I<=p;I++){var L=f-I|0;F=U.words[L]|0,D=d.words[I]|0,R=F*D+B,m+=R/67108864|0,B=R&67108863}x.words[f]=B|0,b=m|0}return b!==0?x.words[f]=b|0:x.length--,x._strip()}var C=function(d,x,P){var F=d.words,D=x.words,R=P.words,q=0,b,f,m,B=F[0]|0,p=B&8191,I=B>>>13,L=F[1]|0,V=L&8191,G=L>>>13,r1=F[2]|0,u1=r1&8191,a1=r1>>>13,B1=F[3]|0,b1=B1&8191,w1=B1>>>13,L1=F[4]|0,N1=L1&8191,_1=L1>>>13,k1=F[5]|0,O1=k1&8191,S1=k1>>>13,e0=F[6]|0,U1=e0&8191,q1=e0>>>13,D0=F[7]|0,J1=D0&8191,c0=D0>>>13,ee=F[8]|0,n0=ee&8191,u0=ee>>>13,de=F[9]|0,i0=de&8191,m0=de>>>13,C0=D[0]|0,Y1=C0&8191,a0=C0>>>13,$0=D[1]|0,o0=$0&8191,V1=$0>>>13,he=D[2]|0,s0=he&8191,d0=he>>>13,te=D[3]|0,j1=te&8191,v0=te>>>13,se=D[4]|0,l0=se&8191,X1=se>>>13,ge=D[5]|0,t0=ge&8191,y0=ge>>>13,pe=D[6]|0,g0=pe&8191,E0=pe>>>13,t6=D[7]|0,_0=t6&8191,N0=t6>>>13,Re=D[8]|0,M0=Re&8191,U0=Re>>>13,M6=D[9]|0,O0=M6&8191,k0=M6>>>13;P.negative=d.negative^x.negative,P.length=19,b=Math.imul(p,Y1),f=Math.imul(p,a0),f=f+Math.imul(I,Y1)|0,m=Math.imul(I,a0);var r6=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(r6>>>26)|0,r6&=67108863,b=Math.imul(V,Y1),f=Math.imul(V,a0),f=f+Math.imul(G,Y1)|0,m=Math.imul(G,a0),b=b+Math.imul(p,o0)|0,f=f+Math.imul(p,V1)|0,f=f+Math.imul(I,o0)|0,m=m+Math.imul(I,V1)|0;var xe=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,b=Math.imul(u1,Y1),f=Math.imul(u1,a0),f=f+Math.imul(a1,Y1)|0,m=Math.imul(a1,a0),b=b+Math.imul(V,o0)|0,f=f+Math.imul(V,V1)|0,f=f+Math.imul(G,o0)|0,m=m+Math.imul(G,V1)|0,b=b+Math.imul(p,s0)|0,f=f+Math.imul(p,d0)|0,f=f+Math.imul(I,s0)|0,m=m+Math.imul(I,d0)|0;var gt=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(gt>>>26)|0,gt&=67108863,b=Math.imul(b1,Y1),f=Math.imul(b1,a0),f=f+Math.imul(w1,Y1)|0,m=Math.imul(w1,a0),b=b+Math.imul(u1,o0)|0,f=f+Math.imul(u1,V1)|0,f=f+Math.imul(a1,o0)|0,m=m+Math.imul(a1,V1)|0,b=b+Math.imul(V,s0)|0,f=f+Math.imul(V,d0)|0,f=f+Math.imul(G,s0)|0,m=m+Math.imul(G,d0)|0,b=b+Math.imul(p,j1)|0,f=f+Math.imul(p,v0)|0,f=f+Math.imul(I,j1)|0,m=m+Math.imul(I,v0)|0;var xt=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(xt>>>26)|0,xt&=67108863,b=Math.imul(N1,Y1),f=Math.imul(N1,a0),f=f+Math.imul(_1,Y1)|0,m=Math.imul(_1,a0),b=b+Math.imul(b1,o0)|0,f=f+Math.imul(b1,V1)|0,f=f+Math.imul(w1,o0)|0,m=m+Math.imul(w1,V1)|0,b=b+Math.imul(u1,s0)|0,f=f+Math.imul(u1,d0)|0,f=f+Math.imul(a1,s0)|0,m=m+Math.imul(a1,d0)|0,b=b+Math.imul(V,j1)|0,f=f+Math.imul(V,v0)|0,f=f+Math.imul(G,j1)|0,m=m+Math.imul(G,v0)|0,b=b+Math.imul(p,l0)|0,f=f+Math.imul(p,X1)|0,f=f+Math.imul(I,l0)|0,m=m+Math.imul(I,X1)|0;var Q1=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(Q1>>>26)|0,Q1&=67108863,b=Math.imul(O1,Y1),f=Math.imul(O1,a0),f=f+Math.imul(S1,Y1)|0,m=Math.imul(S1,a0),b=b+Math.imul(N1,o0)|0,f=f+Math.imul(N1,V1)|0,f=f+Math.imul(_1,o0)|0,m=m+Math.imul(_1,V1)|0,b=b+Math.imul(b1,s0)|0,f=f+Math.imul(b1,d0)|0,f=f+Math.imul(w1,s0)|0,m=m+Math.imul(w1,d0)|0,b=b+Math.imul(u1,j1)|0,f=f+Math.imul(u1,v0)|0,f=f+Math.imul(a1,j1)|0,m=m+Math.imul(a1,v0)|0,b=b+Math.imul(V,l0)|0,f=f+Math.imul(V,X1)|0,f=f+Math.imul(G,l0)|0,m=m+Math.imul(G,X1)|0,b=b+Math.imul(p,t0)|0,f=f+Math.imul(p,y0)|0,f=f+Math.imul(I,t0)|0,m=m+Math.imul(I,y0)|0;var $2=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+($2>>>26)|0,$2&=67108863,b=Math.imul(U1,Y1),f=Math.imul(U1,a0),f=f+Math.imul(q1,Y1)|0,m=Math.imul(q1,a0),b=b+Math.imul(O1,o0)|0,f=f+Math.imul(O1,V1)|0,f=f+Math.imul(S1,o0)|0,m=m+Math.imul(S1,V1)|0,b=b+Math.imul(N1,s0)|0,f=f+Math.imul(N1,d0)|0,f=f+Math.imul(_1,s0)|0,m=m+Math.imul(_1,d0)|0,b=b+Math.imul(b1,j1)|0,f=f+Math.imul(b1,v0)|0,f=f+Math.imul(w1,j1)|0,m=m+Math.imul(w1,v0)|0,b=b+Math.imul(u1,l0)|0,f=f+Math.imul(u1,X1)|0,f=f+Math.imul(a1,l0)|0,m=m+Math.imul(a1,X1)|0,b=b+Math.imul(V,t0)|0,f=f+Math.imul(V,y0)|0,f=f+Math.imul(G,t0)|0,m=m+Math.imul(G,y0)|0,b=b+Math.imul(p,g0)|0,f=f+Math.imul(p,E0)|0,f=f+Math.imul(I,g0)|0,m=m+Math.imul(I,E0)|0;var n6=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(n6>>>26)|0,n6&=67108863,b=Math.imul(J1,Y1),f=Math.imul(J1,a0),f=f+Math.imul(c0,Y1)|0,m=Math.imul(c0,a0),b=b+Math.imul(U1,o0)|0,f=f+Math.imul(U1,V1)|0,f=f+Math.imul(q1,o0)|0,m=m+Math.imul(q1,V1)|0,b=b+Math.imul(O1,s0)|0,f=f+Math.imul(O1,d0)|0,f=f+Math.imul(S1,s0)|0,m=m+Math.imul(S1,d0)|0,b=b+Math.imul(N1,j1)|0,f=f+Math.imul(N1,v0)|0,f=f+Math.imul(_1,j1)|0,m=m+Math.imul(_1,v0)|0,b=b+Math.imul(b1,l0)|0,f=f+Math.imul(b1,X1)|0,f=f+Math.imul(w1,l0)|0,m=m+Math.imul(w1,X1)|0,b=b+Math.imul(u1,t0)|0,f=f+Math.imul(u1,y0)|0,f=f+Math.imul(a1,t0)|0,m=m+Math.imul(a1,y0)|0,b=b+Math.imul(V,g0)|0,f=f+Math.imul(V,E0)|0,f=f+Math.imul(G,g0)|0,m=m+Math.imul(G,E0)|0,b=b+Math.imul(p,_0)|0,f=f+Math.imul(p,N0)|0,f=f+Math.imul(I,_0)|0,m=m+Math.imul(I,N0)|0;var q2=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(q2>>>26)|0,q2&=67108863,b=Math.imul(n0,Y1),f=Math.imul(n0,a0),f=f+Math.imul(u0,Y1)|0,m=Math.imul(u0,a0),b=b+Math.imul(J1,o0)|0,f=f+Math.imul(J1,V1)|0,f=f+Math.imul(c0,o0)|0,m=m+Math.imul(c0,V1)|0,b=b+Math.imul(U1,s0)|0,f=f+Math.imul(U1,d0)|0,f=f+Math.imul(q1,s0)|0,m=m+Math.imul(q1,d0)|0,b=b+Math.imul(O1,j1)|0,f=f+Math.imul(O1,v0)|0,f=f+Math.imul(S1,j1)|0,m=m+Math.imul(S1,v0)|0,b=b+Math.imul(N1,l0)|0,f=f+Math.imul(N1,X1)|0,f=f+Math.imul(_1,l0)|0,m=m+Math.imul(_1,X1)|0,b=b+Math.imul(b1,t0)|0,f=f+Math.imul(b1,y0)|0,f=f+Math.imul(w1,t0)|0,m=m+Math.imul(w1,y0)|0,b=b+Math.imul(u1,g0)|0,f=f+Math.imul(u1,E0)|0,f=f+Math.imul(a1,g0)|0,m=m+Math.imul(a1,E0)|0,b=b+Math.imul(V,_0)|0,f=f+Math.imul(V,N0)|0,f=f+Math.imul(G,_0)|0,m=m+Math.imul(G,N0)|0,b=b+Math.imul(p,M0)|0,f=f+Math.imul(p,U0)|0,f=f+Math.imul(I,M0)|0,m=m+Math.imul(I,U0)|0;var e2=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(e2>>>26)|0,e2&=67108863,b=Math.imul(i0,Y1),f=Math.imul(i0,a0),f=f+Math.imul(m0,Y1)|0,m=Math.imul(m0,a0),b=b+Math.imul(n0,o0)|0,f=f+Math.imul(n0,V1)|0,f=f+Math.imul(u0,o0)|0,m=m+Math.imul(u0,V1)|0,b=b+Math.imul(J1,s0)|0,f=f+Math.imul(J1,d0)|0,f=f+Math.imul(c0,s0)|0,m=m+Math.imul(c0,d0)|0,b=b+Math.imul(U1,j1)|0,f=f+Math.imul(U1,v0)|0,f=f+Math.imul(q1,j1)|0,m=m+Math.imul(q1,v0)|0,b=b+Math.imul(O1,l0)|0,f=f+Math.imul(O1,X1)|0,f=f+Math.imul(S1,l0)|0,m=m+Math.imul(S1,X1)|0,b=b+Math.imul(N1,t0)|0,f=f+Math.imul(N1,y0)|0,f=f+Math.imul(_1,t0)|0,m=m+Math.imul(_1,y0)|0,b=b+Math.imul(b1,g0)|0,f=f+Math.imul(b1,E0)|0,f=f+Math.imul(w1,g0)|0,m=m+Math.imul(w1,E0)|0,b=b+Math.imul(u1,_0)|0,f=f+Math.imul(u1,N0)|0,f=f+Math.imul(a1,_0)|0,m=m+Math.imul(a1,N0)|0,b=b+Math.imul(V,M0)|0,f=f+Math.imul(V,U0)|0,f=f+Math.imul(G,M0)|0,m=m+Math.imul(G,U0)|0,b=b+Math.imul(p,O0)|0,f=f+Math.imul(p,k0)|0,f=f+Math.imul(I,O0)|0,m=m+Math.imul(I,k0)|0;var t2=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(t2>>>26)|0,t2&=67108863,b=Math.imul(i0,o0),f=Math.imul(i0,V1),f=f+Math.imul(m0,o0)|0,m=Math.imul(m0,V1),b=b+Math.imul(n0,s0)|0,f=f+Math.imul(n0,d0)|0,f=f+Math.imul(u0,s0)|0,m=m+Math.imul(u0,d0)|0,b=b+Math.imul(J1,j1)|0,f=f+Math.imul(J1,v0)|0,f=f+Math.imul(c0,j1)|0,m=m+Math.imul(c0,v0)|0,b=b+Math.imul(U1,l0)|0,f=f+Math.imul(U1,X1)|0,f=f+Math.imul(q1,l0)|0,m=m+Math.imul(q1,X1)|0,b=b+Math.imul(O1,t0)|0,f=f+Math.imul(O1,y0)|0,f=f+Math.imul(S1,t0)|0,m=m+Math.imul(S1,y0)|0,b=b+Math.imul(N1,g0)|0,f=f+Math.imul(N1,E0)|0,f=f+Math.imul(_1,g0)|0,m=m+Math.imul(_1,E0)|0,b=b+Math.imul(b1,_0)|0,f=f+Math.imul(b1,N0)|0,f=f+Math.imul(w1,_0)|0,m=m+Math.imul(w1,N0)|0,b=b+Math.imul(u1,M0)|0,f=f+Math.imul(u1,U0)|0,f=f+Math.imul(a1,M0)|0,m=m+Math.imul(a1,U0)|0,b=b+Math.imul(V,O0)|0,f=f+Math.imul(V,k0)|0,f=f+Math.imul(G,O0)|0,m=m+Math.imul(G,k0)|0;var H2=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(H2>>>26)|0,H2&=67108863,b=Math.imul(i0,s0),f=Math.imul(i0,d0),f=f+Math.imul(m0,s0)|0,m=Math.imul(m0,d0),b=b+Math.imul(n0,j1)|0,f=f+Math.imul(n0,v0)|0,f=f+Math.imul(u0,j1)|0,m=m+Math.imul(u0,v0)|0,b=b+Math.imul(J1,l0)|0,f=f+Math.imul(J1,X1)|0,f=f+Math.imul(c0,l0)|0,m=m+Math.imul(c0,X1)|0,b=b+Math.imul(U1,t0)|0,f=f+Math.imul(U1,y0)|0,f=f+Math.imul(q1,t0)|0,m=m+Math.imul(q1,y0)|0,b=b+Math.imul(O1,g0)|0,f=f+Math.imul(O1,E0)|0,f=f+Math.imul(S1,g0)|0,m=m+Math.imul(S1,E0)|0,b=b+Math.imul(N1,_0)|0,f=f+Math.imul(N1,N0)|0,f=f+Math.imul(_1,_0)|0,m=m+Math.imul(_1,N0)|0,b=b+Math.imul(b1,M0)|0,f=f+Math.imul(b1,U0)|0,f=f+Math.imul(w1,M0)|0,m=m+Math.imul(w1,U0)|0,b=b+Math.imul(u1,O0)|0,f=f+Math.imul(u1,k0)|0,f=f+Math.imul(a1,O0)|0,m=m+Math.imul(a1,k0)|0;var K2=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(K2>>>26)|0,K2&=67108863,b=Math.imul(i0,j1),f=Math.imul(i0,v0),f=f+Math.imul(m0,j1)|0,m=Math.imul(m0,v0),b=b+Math.imul(n0,l0)|0,f=f+Math.imul(n0,X1)|0,f=f+Math.imul(u0,l0)|0,m=m+Math.imul(u0,X1)|0,b=b+Math.imul(J1,t0)|0,f=f+Math.imul(J1,y0)|0,f=f+Math.imul(c0,t0)|0,m=m+Math.imul(c0,y0)|0,b=b+Math.imul(U1,g0)|0,f=f+Math.imul(U1,E0)|0,f=f+Math.imul(q1,g0)|0,m=m+Math.imul(q1,E0)|0,b=b+Math.imul(O1,_0)|0,f=f+Math.imul(O1,N0)|0,f=f+Math.imul(S1,_0)|0,m=m+Math.imul(S1,N0)|0,b=b+Math.imul(N1,M0)|0,f=f+Math.imul(N1,U0)|0,f=f+Math.imul(_1,M0)|0,m=m+Math.imul(_1,U0)|0,b=b+Math.imul(b1,O0)|0,f=f+Math.imul(b1,k0)|0,f=f+Math.imul(w1,O0)|0,m=m+Math.imul(w1,k0)|0;var r2=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(r2>>>26)|0,r2&=67108863,b=Math.imul(i0,l0),f=Math.imul(i0,X1),f=f+Math.imul(m0,l0)|0,m=Math.imul(m0,X1),b=b+Math.imul(n0,t0)|0,f=f+Math.imul(n0,y0)|0,f=f+Math.imul(u0,t0)|0,m=m+Math.imul(u0,y0)|0,b=b+Math.imul(J1,g0)|0,f=f+Math.imul(J1,E0)|0,f=f+Math.imul(c0,g0)|0,m=m+Math.imul(c0,E0)|0,b=b+Math.imul(U1,_0)|0,f=f+Math.imul(U1,N0)|0,f=f+Math.imul(q1,_0)|0,m=m+Math.imul(q1,N0)|0,b=b+Math.imul(O1,M0)|0,f=f+Math.imul(O1,U0)|0,f=f+Math.imul(S1,M0)|0,m=m+Math.imul(S1,U0)|0,b=b+Math.imul(N1,O0)|0,f=f+Math.imul(N1,k0)|0,f=f+Math.imul(_1,O0)|0,m=m+Math.imul(_1,k0)|0;var ve=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,b=Math.imul(i0,t0),f=Math.imul(i0,y0),f=f+Math.imul(m0,t0)|0,m=Math.imul(m0,y0),b=b+Math.imul(n0,g0)|0,f=f+Math.imul(n0,E0)|0,f=f+Math.imul(u0,g0)|0,m=m+Math.imul(u0,E0)|0,b=b+Math.imul(J1,_0)|0,f=f+Math.imul(J1,N0)|0,f=f+Math.imul(c0,_0)|0,m=m+Math.imul(c0,N0)|0,b=b+Math.imul(U1,M0)|0,f=f+Math.imul(U1,U0)|0,f=f+Math.imul(q1,M0)|0,m=m+Math.imul(q1,U0)|0,b=b+Math.imul(O1,O0)|0,f=f+Math.imul(O1,k0)|0,f=f+Math.imul(S1,O0)|0,m=m+Math.imul(S1,k0)|0;var Z1=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(Z1>>>26)|0,Z1&=67108863,b=Math.imul(i0,g0),f=Math.imul(i0,E0),f=f+Math.imul(m0,g0)|0,m=Math.imul(m0,E0),b=b+Math.imul(n0,_0)|0,f=f+Math.imul(n0,N0)|0,f=f+Math.imul(u0,_0)|0,m=m+Math.imul(u0,N0)|0,b=b+Math.imul(J1,M0)|0,f=f+Math.imul(J1,U0)|0,f=f+Math.imul(c0,M0)|0,m=m+Math.imul(c0,U0)|0,b=b+Math.imul(U1,O0)|0,f=f+Math.imul(U1,k0)|0,f=f+Math.imul(q1,O0)|0,m=m+Math.imul(q1,k0)|0;var G2=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(G2>>>26)|0,G2&=67108863,b=Math.imul(i0,_0),f=Math.imul(i0,N0),f=f+Math.imul(m0,_0)|0,m=Math.imul(m0,N0),b=b+Math.imul(n0,M0)|0,f=f+Math.imul(n0,U0)|0,f=f+Math.imul(u0,M0)|0,m=m+Math.imul(u0,U0)|0,b=b+Math.imul(J1,O0)|0,f=f+Math.imul(J1,k0)|0,f=f+Math.imul(c0,O0)|0,m=m+Math.imul(c0,k0)|0;var n2=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(n2>>>26)|0,n2&=67108863,b=Math.imul(i0,M0),f=Math.imul(i0,U0),f=f+Math.imul(m0,M0)|0,m=Math.imul(m0,U0),b=b+Math.imul(n0,O0)|0,f=f+Math.imul(n0,k0)|0,f=f+Math.imul(u0,O0)|0,m=m+Math.imul(u0,k0)|0;var u2=(q+b|0)+((f&8191)<<13)|0;q=(m+(f>>>13)|0)+(u2>>>26)|0,u2&=67108863,b=Math.imul(i0,O0),f=Math.imul(i0,k0),f=f+Math.imul(m0,O0)|0,m=Math.imul(m0,k0);var mu=(q+b|0)+((f&8191)<<13)|0;return q=(m+(f>>>13)|0)+(mu>>>26)|0,mu&=67108863,R[0]=r6,R[1]=xe,R[2]=gt,R[3]=xt,R[4]=Q1,R[5]=$2,R[6]=n6,R[7]=q2,R[8]=e2,R[9]=t2,R[10]=H2,R[11]=K2,R[12]=r2,R[13]=ve,R[14]=Z1,R[15]=G2,R[16]=n2,R[17]=u2,R[18]=mu,q!==0&&(R[19]=q,P.length++),P};Math.imul||(C=k);function T(U,d,x){x.negative=d.negative^U.negative,x.length=U.length+d.length;for(var P=0,F=0,D=0;D>>26)|0,F+=R>>>26,R&=67108863}x.words[D]=q,P=R,R=F}return P!==0?x.words[D]=P:x.length--,x._strip()}function z(U,d,x){return T(U,d,x)}i.prototype.mulTo=function(d,x){var P,F=this.length+d.length;return this.length===10&&d.length===10?P=C(this,d,x):F<63?P=k(this,d,x):F<1024?P=T(this,d,x):P=z(this,d,x),P},i.prototype.mul=function(d){var x=new i(null);return x.words=new Array(this.length+d.length),this.mulTo(d,x)},i.prototype.mulf=function(d){var x=new i(null);return x.words=new Array(this.length+d.length),z(this,d,x)},i.prototype.imul=function(d){return this.clone().mulTo(d,this)},i.prototype.imuln=function(d){var x=d<0;x&&(d=-d),n(typeof d=="number"),n(d<67108864);for(var P=0,F=0;F>=26,P+=D/67108864|0,P+=R>>>26,this.words[F]=R&67108863}return P!==0&&(this.words[F]=P,this.length++),x?this.ineg():this},i.prototype.muln=function(d){return this.clone().imuln(d)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(d){var x=N(d);if(x.length===0)return new i(1);for(var P=this,F=0;F=0);var x=d%26,P=(d-x)/26,F=67108863>>>26-x<<26-x,D;if(x!==0){var R=0;for(D=0;D>>26-x}R&&(this.words[D]=R,this.length++)}if(P!==0){for(D=this.length-1;D>=0;D--)this.words[D+P]=this.words[D];for(D=0;D=0);var F;x?F=(x-x%26)/26:F=0;var D=d%26,R=Math.min((d-D)/26,this.length),q=67108863^67108863>>>D<R)for(this.length-=R,f=0;f=0&&(m!==0||f>=F);f--){var B=this.words[f]|0;this.words[f]=m<<26-D|B>>>D,m=B&q}return b&&m!==0&&(b.words[b.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(d,x,P){return n(this.negative===0),this.iushrn(d,x,P)},i.prototype.shln=function(d){return this.clone().ishln(d)},i.prototype.ushln=function(d){return this.clone().iushln(d)},i.prototype.shrn=function(d){return this.clone().ishrn(d)},i.prototype.ushrn=function(d){return this.clone().iushrn(d)},i.prototype.testn=function(d){n(typeof d=="number"&&d>=0);var x=d%26,P=(d-x)/26,F=1<=0);var x=d%26,P=(d-x)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=P)return this;if(x!==0&&P++,this.length=Math.min(P,this.length),x!==0){var F=67108863^67108863>>>x<=67108864;x++)this.words[x]-=67108864,x===this.length-1?this.words[x+1]=1:this.words[x+1]++;return this.length=Math.max(this.length,x+1),this},i.prototype.isubn=function(d){if(n(typeof d=="number"),n(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var x=0;x>26)-(b/67108864|0),this.words[D+P]=R&67108863}for(;D>26,this.words[D+P]=R&67108863;if(q===0)return this._strip();for(n(q===-1),q=0,D=0;D>26,this.words[D]=R&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(d,x){var P=this.length-d.length,F=this.clone(),D=d,R=D.words[D.length-1]|0,q=this._countBits(R);P=26-q,P!==0&&(D=D.ushln(P),F.iushln(P),R=D.words[D.length-1]|0);var b=F.length-D.length,f;if(x!=="mod"){f=new i(null),f.length=b+1,f.words=new Array(f.length);for(var m=0;m=0;p--){var I=(F.words[D.length+p]|0)*67108864+(F.words[D.length+p-1]|0);for(I=Math.min(I/R|0,67108863),F._ishlnsubmul(D,I,p);F.negative!==0;)I--,F.negative=0,F._ishlnsubmul(D,1,p),F.isZero()||(F.negative^=1);f&&(f.words[p]=I)}return f&&f._strip(),F._strip(),x!=="div"&&P!==0&&F.iushrn(P),{div:f||null,mod:F}},i.prototype.divmod=function(d,x,P){if(n(!d.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var F,D,R;return this.negative!==0&&d.negative===0?(R=this.neg().divmod(d,x),x!=="mod"&&(F=R.div.neg()),x!=="div"&&(D=R.mod.neg(),P&&D.negative!==0&&D.iadd(d)),{div:F,mod:D}):this.negative===0&&d.negative!==0?(R=this.divmod(d.neg(),x),x!=="mod"&&(F=R.div.neg()),{div:F,mod:R.mod}):this.negative&d.negative?(R=this.neg().divmod(d.neg(),x),x!=="div"&&(D=R.mod.neg(),P&&D.negative!==0&&D.isub(d)),{div:R.div,mod:D}):d.length>this.length||this.cmp(d)<0?{div:new i(0),mod:this}:d.length===1?x==="div"?{div:this.divn(d.words[0]),mod:null}:x==="mod"?{div:null,mod:new i(this.modrn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new i(this.modrn(d.words[0]))}:this._wordDiv(d,x)},i.prototype.div=function(d){return this.divmod(d,"div",!1).div},i.prototype.mod=function(d){return this.divmod(d,"mod",!1).mod},i.prototype.umod=function(d){return this.divmod(d,"mod",!0).mod},i.prototype.divRound=function(d){var x=this.divmod(d);if(x.mod.isZero())return x.div;var P=x.div.negative!==0?x.mod.isub(d):x.mod,F=d.ushrn(1),D=d.andln(1),R=P.cmp(F);return R<0||D===1&&R===0?x.div:x.div.negative!==0?x.div.isubn(1):x.div.iaddn(1)},i.prototype.modrn=function(d){var x=d<0;x&&(d=-d),n(d<=67108863);for(var P=(1<<26)%d,F=0,D=this.length-1;D>=0;D--)F=(P*F+(this.words[D]|0))%d;return x?-F:F},i.prototype.modn=function(d){return this.modrn(d)},i.prototype.idivn=function(d){var x=d<0;x&&(d=-d),n(d<=67108863);for(var P=0,F=this.length-1;F>=0;F--){var D=(this.words[F]|0)+P*67108864;this.words[F]=D/d|0,P=D%d}return this._strip(),x?this.ineg():this},i.prototype.divn=function(d){return this.clone().idivn(d)},i.prototype.egcd=function(d){n(d.negative===0),n(!d.isZero());var x=this,P=d.clone();x.negative!==0?x=x.umod(d):x=x.clone();for(var F=new i(1),D=new i(0),R=new i(0),q=new i(1),b=0;x.isEven()&&P.isEven();)x.iushrn(1),P.iushrn(1),++b;for(var f=P.clone(),m=x.clone();!x.isZero();){for(var B=0,p=1;!(x.words[0]&p)&&B<26;++B,p<<=1);if(B>0)for(x.iushrn(B);B-- >0;)(F.isOdd()||D.isOdd())&&(F.iadd(f),D.isub(m)),F.iushrn(1),D.iushrn(1);for(var I=0,L=1;!(P.words[0]&L)&&I<26;++I,L<<=1);if(I>0)for(P.iushrn(I);I-- >0;)(R.isOdd()||q.isOdd())&&(R.iadd(f),q.isub(m)),R.iushrn(1),q.iushrn(1);x.cmp(P)>=0?(x.isub(P),F.isub(R),D.isub(q)):(P.isub(x),R.isub(F),q.isub(D))}return{a:R,b:q,gcd:P.iushln(b)}},i.prototype._invmp=function(d){n(d.negative===0),n(!d.isZero());var x=this,P=d.clone();x.negative!==0?x=x.umod(d):x=x.clone();for(var F=new i(1),D=new i(0),R=P.clone();x.cmpn(1)>0&&P.cmpn(1)>0;){for(var q=0,b=1;!(x.words[0]&b)&&q<26;++q,b<<=1);if(q>0)for(x.iushrn(q);q-- >0;)F.isOdd()&&F.iadd(R),F.iushrn(1);for(var f=0,m=1;!(P.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(P.iushrn(f);f-- >0;)D.isOdd()&&D.iadd(R),D.iushrn(1);x.cmp(P)>=0?(x.isub(P),F.isub(D)):(P.isub(x),D.isub(F))}var B;return x.cmpn(1)===0?B=F:B=D,B.cmpn(0)<0&&B.iadd(d),B},i.prototype.gcd=function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var x=this.clone(),P=d.clone();x.negative=0,P.negative=0;for(var F=0;x.isEven()&&P.isEven();F++)x.iushrn(1),P.iushrn(1);do{for(;x.isEven();)x.iushrn(1);for(;P.isEven();)P.iushrn(1);var D=x.cmp(P);if(D<0){var R=x;x=P,P=R}else if(D===0||P.cmpn(1)===0)break;x.isub(P)}while(!0);return P.iushln(F)},i.prototype.invm=function(d){return this.egcd(d).a.umod(d)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(d){return this.words[0]&d},i.prototype.bincn=function(d){n(typeof d=="number");var x=d%26,P=(d-x)/26,F=1<>>26,q&=67108863,this.words[R]=q}return D!==0&&(this.words[R]=D,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(d){var x=d<0;if(this.negative!==0&&!x)return-1;if(this.negative===0&&x)return 1;this._strip();var P;if(this.length>1)P=1;else{x&&(d=-d),n(d<=67108863,"Number is too big");var F=this.words[0]|0;P=F===d?0:Fd.length)return 1;if(this.length=0;P--){var F=this.words[P]|0,D=d.words[P]|0;if(F!==D){FD&&(x=1);break}}return x},i.prototype.gtn=function(d){return this.cmpn(d)===1},i.prototype.gt=function(d){return this.cmp(d)===1},i.prototype.gten=function(d){return this.cmpn(d)>=0},i.prototype.gte=function(d){return this.cmp(d)>=0},i.prototype.ltn=function(d){return this.cmpn(d)===-1},i.prototype.lt=function(d){return this.cmp(d)===-1},i.prototype.lten=function(d){return this.cmpn(d)<=0},i.prototype.lte=function(d){return this.cmp(d)<=0},i.prototype.eqn=function(d){return this.cmpn(d)===0},i.prototype.eq=function(d){return this.cmp(d)===0},i.red=function(d){return new S(d)},i.prototype.toRed=function(d){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(d){return this.red=d,this},i.prototype.forceRed=function(d){return n(!this.red,"Already a number in reduction context"),this._forceRed(d)},i.prototype.redAdd=function(d){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},i.prototype.redIAdd=function(d){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},i.prototype.redSub=function(d){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},i.prototype.redISub=function(d){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},i.prototype.redShl=function(d){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},i.prototype.redMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},i.prototype.redIMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(d){return n(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)};var $={k256:null,p224:null,p192:null,p25519:null};function Y(U,d){this.name=U,this.p=new i(d,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Y.prototype._tmp=function(){var d=new i(null);return d.words=new Array(Math.ceil(this.n/13)),d},Y.prototype.ireduce=function(d){var x=d,P;do this.split(x,this.tmp),x=this.imulK(x),x=x.iadd(this.tmp),P=x.bitLength();while(P>this.n);var F=P0?x.isub(this.p):x.strip!==void 0?x.strip():x._strip(),x},Y.prototype.split=function(d,x){d.iushrn(this.n,0,x)},Y.prototype.imulK=function(d){return d.imul(this.k)};function J(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}u(J,Y),J.prototype.split=function(d,x){for(var P=4194303,F=Math.min(d.length,9),D=0;D>>22,R=q}R>>>=22,d.words[D-10]=R,R===0&&d.length>10?d.length-=10:d.length-=9},J.prototype.imulK=function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var x=0,P=0;P>>=26,d.words[P]=D,x=F}return x!==0&&(d.words[d.length++]=x),d},i._prime=function(d){if($[d])return $[d];var x;if(d==="k256")x=new J;else if(d==="p224")x=new e1;else if(d==="p192")x=new i1;else if(d==="p25519")x=new o1;else throw new Error("Unknown prime "+d);return $[d]=x,x};function S(U){if(typeof U=="string"){var d=i._prime(U);this.m=d.p,this.prime=d}else n(U.gtn(1),"modulus must be greater than 1"),this.m=U,this.prime=null}S.prototype._verify1=function(d){n(d.negative===0,"red works only with positives"),n(d.red,"red works only with red numbers")},S.prototype._verify2=function(d,x){n((d.negative|x.negative)===0,"red works only with positives"),n(d.red&&d.red===x.red,"red works only with red numbers")},S.prototype.imod=function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):(c(d,d.umod(this.m)._forceRed(this)),d)},S.prototype.neg=function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},S.prototype.add=function(d,x){this._verify2(d,x);var P=d.add(x);return P.cmp(this.m)>=0&&P.isub(this.m),P._forceRed(this)},S.prototype.iadd=function(d,x){this._verify2(d,x);var P=d.iadd(x);return P.cmp(this.m)>=0&&P.isub(this.m),P},S.prototype.sub=function(d,x){this._verify2(d,x);var P=d.sub(x);return P.cmpn(0)<0&&P.iadd(this.m),P._forceRed(this)},S.prototype.isub=function(d,x){this._verify2(d,x);var P=d.isub(x);return P.cmpn(0)<0&&P.iadd(this.m),P},S.prototype.shl=function(d,x){return this._verify1(d),this.imod(d.ushln(x))},S.prototype.imul=function(d,x){return this._verify2(d,x),this.imod(d.imul(x))},S.prototype.mul=function(d,x){return this._verify2(d,x),this.imod(d.mul(x))},S.prototype.isqr=function(d){return this.imul(d,d.clone())},S.prototype.sqr=function(d){return this.mul(d,d)},S.prototype.sqrt=function(d){if(d.isZero())return d.clone();var x=this.m.andln(3);if(n(x%2===1),x===3){var P=this.m.add(new i(1)).iushrn(2);return this.pow(d,P)}for(var F=this.m.subn(1),D=0;!F.isZero()&&F.andln(1)===0;)D++,F.iushrn(1);n(!F.isZero());var R=new i(1).toRed(this),q=R.redNeg(),b=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);this.pow(f,b).cmp(q)!==0;)f.redIAdd(q);for(var m=this.pow(f,F),B=this.pow(d,F.addn(1).iushrn(1)),p=this.pow(d,F),I=D;p.cmp(R)!==0;){for(var L=p,V=0;L.cmp(R)!==0;V++)L=L.redSqr();n(V=0;D--){for(var m=x.words[D],B=f-1;B>=0;B--){var p=m>>B&1;if(R!==F[0]&&(R=this.sqr(R)),p===0&&q===0){b=0;continue}q<<=1,q|=p,b++,!(b!==P&&(D!==0||B!==0))&&(R=this.mul(R,F[q]),b=0,q=0)}f=26}return R},S.prototype.convertTo=function(d){var x=d.umod(this.m);return x===d?x.clone():x},S.prototype.convertFrom=function(d){var x=d.clone();return x.red=null,x},i.mont=function(d){return new X(d)};function X(U){S.call(this,U),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}u(X,S),X.prototype.convertTo=function(d){return this.imod(d.ushln(this.shift))},X.prototype.convertFrom=function(d){var x=this.imod(d.mul(this.rinv));return x.red=null,x},X.prototype.imul=function(d,x){if(d.isZero()||x.isZero())return d.words[0]=0,d.length=1,d;var P=d.imul(x),F=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=P.isub(F).iushrn(this.shift),R=D;return D.cmp(this.m)>=0?R=D.isub(this.m):D.cmpn(0)<0&&(R=D.iadd(this.m)),R._forceRed(this)},X.prototype.mul=function(d,x){if(d.isZero()||x.isZero())return new i(0)._forceRed(this);var P=d.mul(x),F=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=P.isub(F).iushrn(this.shift),R=D;return D.cmp(this.m)>=0?R=D.isub(this.m):D.cmpn(0)<0&&(R=D.iadd(this.m)),R._forceRed(this)},X.prototype.invm=function(d){var x=this.imod(d._invmp(this.m).mul(this.r2));return x._forceRed(this)}})(t,f0)})(A4);var iv=A4.exports;const G1=Pt(iv),oh="bignumber/5.7.0";var Ti=G1.BN;const R6=new Z(oh),Bo={},G9=9007199254740991;function av(t){return t!=null&&(C1.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||W1(t)||typeof t=="bigint"||Qr(t))}let V9=!1;class C1{constructor(e,r){e!==Bo&&R6.throwError("cannot call constructor directly; use BigNumber.from",Z.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Qe(h0(this).fromTwos(e))}toTwos(e){return Qe(h0(this).toTwos(e))}abs(){return this._hex[0]==="-"?C1.from(this._hex.substring(1)):this}add(e){return Qe(h0(this).add(h0(e)))}sub(e){return Qe(h0(this).sub(h0(e)))}div(e){return C1.from(e).isZero()&&vt("division-by-zero","div"),Qe(h0(this).div(h0(e)))}mul(e){return Qe(h0(this).mul(h0(e)))}mod(e){const r=h0(e);return r.isNeg()&&vt("division-by-zero","mod"),Qe(h0(this).umod(r))}pow(e){const r=h0(e);return r.isNeg()&&vt("negative-power","pow"),Qe(h0(this).pow(r))}and(e){const r=h0(e);return(this.isNegative()||r.isNeg())&&vt("unbound-bitwise-result","and"),Qe(h0(this).and(r))}or(e){const r=h0(e);return(this.isNegative()||r.isNeg())&&vt("unbound-bitwise-result","or"),Qe(h0(this).or(r))}xor(e){const r=h0(e);return(this.isNegative()||r.isNeg())&&vt("unbound-bitwise-result","xor"),Qe(h0(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&vt("negative-width","mask"),Qe(h0(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&vt("negative-width","shl"),Qe(h0(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&vt("negative-width","shr"),Qe(h0(this).shrn(e))}eq(e){return h0(this).eq(h0(e))}lt(e){return h0(this).lt(h0(e))}lte(e){return h0(this).lte(h0(e))}gt(e){return h0(this).gt(h0(e))}gte(e){return h0(this).gte(h0(e))}isNegative(){return this._hex[0]==="-"}isZero(){return h0(this).isZero()}toNumber(){try{return h0(this).toNumber()}catch{vt("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return R6.throwError("this platform does not support BigInt",Z.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?V9||(V9=!0,R6.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?R6.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Z.errors.UNEXPECTED_ARGUMENT,{}):R6.throwError("BigNumber.toString does not accept parameters",Z.errors.UNEXPECTED_ARGUMENT,{})),h0(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof C1)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new C1(Bo,Pi(e)):e.match(/^-?[0-9]+$/)?new C1(Bo,Pi(new Ti(e))):R6.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&vt("underflow","BigNumber.from",e),(e>=G9||e<=-G9)&&vt("overflow","BigNumber.from",e),C1.from(String(e));const r=e;if(typeof r=="bigint")return C1.from(r.toString());if(Qr(r))return C1.from(F1(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return C1.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(W1(n)||n[0]==="-"&&W1(n.substring(1))))return C1.from(n)}return R6.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Pi(t){if(typeof t!="string")return Pi(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&R6.throwArgumentError("invalid hex","value",t),t=Pi(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Qe(t){return C1.from(Pi(t))}function h0(t){const e=C1.from(t).toHexString();return e[0]==="-"?new Ti("-"+e.substring(3),16):new Ti(e.substring(2),16)}function vt(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),R6.throwError(t,Z.errors.NUMERIC_FAULT,n)}function ov(t){return new Ti(t,36).toString(16)}function sv(t){return new Ti(t,16).toString(36)}const qe=new Z(oh),Xu={},sh=C1.from(0),lh=C1.from(-1);function fh(t,e,r,n){const u={fault:e,operation:r};return n!==void 0&&(u.value=n),qe.throwError(t,Z.errors.NUMERIC_FAULT,u)}let Zu="0";for(;Zu.length<256;)Zu+=Zu;function w4(t){if(typeof t!="number")try{t=C1.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Zu.substring(0,t):qe.throwArgumentError("invalid decimal size","decimals",t)}function d8(t,e){e==null&&(e=0);const r=w4(e);t=C1.from(t);const n=t.lt(sh);n&&(t=t.mul(lh));let u=t.mod(r).toString();for(;u.length2&&qe.throwArgumentError("too many decimal points","value",t);let i=u[0],a=u[1];for(i||(i="0"),a||(a="0");a[a.length-1]==="0";)a=a.substring(0,a.length-1);for(a.length>r.length-1&&fh("fractional component exceeds decimals","underflow","parseFixed"),a===""&&(a="0");a.lengthe[a]==null?s:(typeof e[a]!==o&&qe.throwArgumentError("invalid fixed format ("+a+" not "+o+")","format."+a,e[a]),e[a]);r=i("signed","boolean",r),n=i("width","number",n),u=i("decimals","number",u)}return n%8&&qe.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),u>80&&qe.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",u),new Pn(Xu,r,n,u)}}class Ae{constructor(e,r,n,u){e!==Xu&&qe.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Z.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=u,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&qe.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=o6(this._value,this.format.decimals),n=o6(e._value,e.format.decimals);return Ae.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=o6(this._value,this.format.decimals),n=o6(e._value,e.format.decimals);return Ae.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=o6(this._value,this.format.decimals),n=o6(e._value,e.format.decimals);return Ae.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=o6(this._value,this.format.decimals),n=o6(e._value,e.format.decimals);return Ae.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Ae.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(W9.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Ae.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(W9.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&qe.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=Ae.from("1"+Zu.substring(0,e),this.format),u=lv.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(u).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&qe.throwArgumentError("invalid byte width","width",e);const r=C1.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return R0(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Ae.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!av(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),Ae.fromString(d8(e,r),Pn.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=Pn.from(r),u=o6(e,n.decimals);!n.signed&&u.lt(sh)&&fh("unsigned value cannot be negative","overflow","value",e);let i=null;n.signed?i=u.toTwos(n.width).toHexString():(i=u.toHexString(),i=R0(i,n.width/8));const a=d8(u,n.decimals);return new Ae(Xu,i,a,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=Pn.from(r);if(v1(e).length>n.width/8)throw new Error("overflow");let u=C1.from(e);n.signed&&(u=u.fromTwos(n.width));const i=u.toTwos((n.signed?0:1)+n.width).toHexString(),a=d8(u,n.decimals);return new Ae(Xu,i,a,n)}static from(e,r){if(typeof e=="string")return Ae.fromString(e,r);if(Qr(e))return Ae.fromBytes(e,r);try{return Ae.fromValue(e,0,r)}catch(n){if(n.code!==Z.errors.INVALID_ARGUMENT)throw n}return qe.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const W9=Ae.from(1),lv=Ae.from("0.5");var ch={exports:{}};/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",u=n?window:{};u.JS_SHA3_NO_WINDOW&&(n=!1);var i=!n&&typeof self=="object",a=!u.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?u=f0:i&&(u=self);var o=!u.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,s=!u.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],y=[4,1024,262144,67108864],v=[1,256,65536,16777216],w=[6,1536,393216,100663296],_=[0,8,16,24],M=[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],N=[224,256,384,512],k=[128,256],C=["hex","buffer","arrayBuffer","array","digest"],T={128:168,256:136};(u.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(p){return Object.prototype.toString.call(p)==="[object Array]"}),s&&(u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(p){return typeof p=="object"&&p.buffer&&p.buffer.constructor===ArrayBuffer});for(var z=function(p,I,L){return function(V){return new f(p,I,p).update(V)[L]()}},$=function(p,I,L){return function(V,G){return new f(p,I,G).update(V)[L]()}},Y=function(p,I,L){return function(V,G,r1,u1){return d["cshake"+p].update(V,G,r1,u1)[L]()}},J=function(p,I,L){return function(V,G,r1,u1){return d["kmac"+p].update(V,G,r1,u1)[L]()}},e1=function(p,I,L,V){for(var G=0;G>5,this.byteCount=this.blockCount<<2,this.outputBlocks=L>>5,this.extraBytes=(L&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}f.prototype.update=function(p){if(this.finalized)throw new Error(r);var I,L=typeof p;if(L!=="string"){if(L==="object"){if(p===null)throw new Error(e);if(s&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!Array.isArray(p)&&(!s||!ArrayBuffer.isView(p)))throw new Error(e)}else throw new Error(e);I=!0}for(var V=this.blocks,G=this.byteCount,r1=p.length,u1=this.blockCount,a1=0,B1=this.s,b1,w1;a1>2]|=p[a1]<<_[b1++&3];else for(b1=this.start;a1>2]|=w1<<_[b1++&3]:w1<2048?(V[b1>>2]|=(192|w1>>6)<<_[b1++&3],V[b1>>2]|=(128|w1&63)<<_[b1++&3]):w1<55296||w1>=57344?(V[b1>>2]|=(224|w1>>12)<<_[b1++&3],V[b1>>2]|=(128|w1>>6&63)<<_[b1++&3],V[b1>>2]|=(128|w1&63)<<_[b1++&3]):(w1=65536+((w1&1023)<<10|p.charCodeAt(++a1)&1023),V[b1>>2]|=(240|w1>>18)<<_[b1++&3],V[b1>>2]|=(128|w1>>12&63)<<_[b1++&3],V[b1>>2]|=(128|w1>>6&63)<<_[b1++&3],V[b1>>2]|=(128|w1&63)<<_[b1++&3]);if(this.lastByteIndex=b1,b1>=G){for(this.start=b1-G,this.block=V[u1],b1=0;b1>8,L=p&255;L>0;)G.unshift(L),p=p>>8,L=p&255,++V;return I?G.push(V):G.unshift(V),this.update(G),G.length},f.prototype.encodeString=function(p){var I,L=typeof p;if(L!=="string"){if(L==="object"){if(p===null)throw new Error(e);if(s&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!Array.isArray(p)&&(!s||!ArrayBuffer.isView(p)))throw new Error(e)}else throw new Error(e);I=!0}var V=0,G=p.length;if(I)V=G;else for(var r1=0;r1=57344?V+=3:(u1=65536+((u1&1023)<<10|p.charCodeAt(++r1)&1023),V+=4)}return V+=this.encode(V*8),this.update(p),V},f.prototype.bytepad=function(p,I){for(var L=this.encode(I),V=0;V>2]|=this.padding[I&3],this.lastByteIndex===this.byteCount)for(p[0]=p[L],I=1;I>4&15]+l[a1&15]+l[a1>>12&15]+l[a1>>8&15]+l[a1>>20&15]+l[a1>>16&15]+l[a1>>28&15]+l[a1>>24&15];r1%p===0&&(B(I),G=0)}return V&&(a1=I[G],u1+=l[a1>>4&15]+l[a1&15],V>1&&(u1+=l[a1>>12&15]+l[a1>>8&15]),V>2&&(u1+=l[a1>>20&15]+l[a1>>16&15])),u1},f.prototype.arrayBuffer=function(){this.finalize();var p=this.blockCount,I=this.s,L=this.outputBlocks,V=this.extraBytes,G=0,r1=0,u1=this.outputBits>>3,a1;V?a1=new ArrayBuffer(L+1<<2):a1=new ArrayBuffer(u1);for(var B1=new Uint32Array(a1);r1>8&255,u1[a1+2]=B1>>16&255,u1[a1+3]=B1>>24&255;r1%p===0&&B(I)}return V&&(a1=r1<<2,B1=I[G],u1[a1]=B1&255,V>1&&(u1[a1+1]=B1>>8&255),V>2&&(u1[a1+2]=B1>>16&255)),u1};function m(p,I,L){f.call(this,p,I,L)}m.prototype=new f,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),f.prototype.finalize.call(this)};var B=function(p){var I,L,V,G,r1,u1,a1,B1,b1,w1,L1,N1,_1,k1,O1,S1,e0,U1,q1,D0,J1,c0,ee,n0,u0,de,i0,m0,C0,Y1,a0,$0,o0,V1,he,s0,d0,te,j1,v0,se,l0,X1,ge,t0,y0,pe,g0,E0,t6,_0,N0,Re,M0,U0,M6,O0,k0,r6,xe,gt,xt,Q1;for(V=0;V<48;V+=2)G=p[0]^p[10]^p[20]^p[30]^p[40],r1=p[1]^p[11]^p[21]^p[31]^p[41],u1=p[2]^p[12]^p[22]^p[32]^p[42],a1=p[3]^p[13]^p[23]^p[33]^p[43],B1=p[4]^p[14]^p[24]^p[34]^p[44],b1=p[5]^p[15]^p[25]^p[35]^p[45],w1=p[6]^p[16]^p[26]^p[36]^p[46],L1=p[7]^p[17]^p[27]^p[37]^p[47],N1=p[8]^p[18]^p[28]^p[38]^p[48],_1=p[9]^p[19]^p[29]^p[39]^p[49],I=N1^(u1<<1|a1>>>31),L=_1^(a1<<1|u1>>>31),p[0]^=I,p[1]^=L,p[10]^=I,p[11]^=L,p[20]^=I,p[21]^=L,p[30]^=I,p[31]^=L,p[40]^=I,p[41]^=L,I=G^(B1<<1|b1>>>31),L=r1^(b1<<1|B1>>>31),p[2]^=I,p[3]^=L,p[12]^=I,p[13]^=L,p[22]^=I,p[23]^=L,p[32]^=I,p[33]^=L,p[42]^=I,p[43]^=L,I=u1^(w1<<1|L1>>>31),L=a1^(L1<<1|w1>>>31),p[4]^=I,p[5]^=L,p[14]^=I,p[15]^=L,p[24]^=I,p[25]^=L,p[34]^=I,p[35]^=L,p[44]^=I,p[45]^=L,I=B1^(N1<<1|_1>>>31),L=b1^(_1<<1|N1>>>31),p[6]^=I,p[7]^=L,p[16]^=I,p[17]^=L,p[26]^=I,p[27]^=L,p[36]^=I,p[37]^=L,p[46]^=I,p[47]^=L,I=w1^(G<<1|r1>>>31),L=L1^(r1<<1|G>>>31),p[8]^=I,p[9]^=L,p[18]^=I,p[19]^=L,p[28]^=I,p[29]^=L,p[38]^=I,p[39]^=L,p[48]^=I,p[49]^=L,k1=p[0],O1=p[1],y0=p[11]<<4|p[10]>>>28,pe=p[10]<<4|p[11]>>>28,m0=p[20]<<3|p[21]>>>29,C0=p[21]<<3|p[20]>>>29,xe=p[31]<<9|p[30]>>>23,gt=p[30]<<9|p[31]>>>23,l0=p[40]<<18|p[41]>>>14,X1=p[41]<<18|p[40]>>>14,V1=p[2]<<1|p[3]>>>31,he=p[3]<<1|p[2]>>>31,S1=p[13]<<12|p[12]>>>20,e0=p[12]<<12|p[13]>>>20,g0=p[22]<<10|p[23]>>>22,E0=p[23]<<10|p[22]>>>22,Y1=p[33]<<13|p[32]>>>19,a0=p[32]<<13|p[33]>>>19,xt=p[42]<<2|p[43]>>>30,Q1=p[43]<<2|p[42]>>>30,M0=p[5]<<30|p[4]>>>2,U0=p[4]<<30|p[5]>>>2,s0=p[14]<<6|p[15]>>>26,d0=p[15]<<6|p[14]>>>26,U1=p[25]<<11|p[24]>>>21,q1=p[24]<<11|p[25]>>>21,t6=p[34]<<15|p[35]>>>17,_0=p[35]<<15|p[34]>>>17,$0=p[45]<<29|p[44]>>>3,o0=p[44]<<29|p[45]>>>3,n0=p[6]<<28|p[7]>>>4,u0=p[7]<<28|p[6]>>>4,M6=p[17]<<23|p[16]>>>9,O0=p[16]<<23|p[17]>>>9,te=p[26]<<25|p[27]>>>7,j1=p[27]<<25|p[26]>>>7,D0=p[36]<<21|p[37]>>>11,J1=p[37]<<21|p[36]>>>11,N0=p[47]<<24|p[46]>>>8,Re=p[46]<<24|p[47]>>>8,ge=p[8]<<27|p[9]>>>5,t0=p[9]<<27|p[8]>>>5,de=p[18]<<20|p[19]>>>12,i0=p[19]<<20|p[18]>>>12,k0=p[29]<<7|p[28]>>>25,r6=p[28]<<7|p[29]>>>25,v0=p[38]<<8|p[39]>>>24,se=p[39]<<8|p[38]>>>24,c0=p[48]<<14|p[49]>>>18,ee=p[49]<<14|p[48]>>>18,p[0]=k1^~S1&U1,p[1]=O1^~e0&q1,p[10]=n0^~de&m0,p[11]=u0^~i0&C0,p[20]=V1^~s0&te,p[21]=he^~d0&j1,p[30]=ge^~y0&g0,p[31]=t0^~pe&E0,p[40]=M0^~M6&k0,p[41]=U0^~O0&r6,p[2]=S1^~U1&D0,p[3]=e0^~q1&J1,p[12]=de^~m0&Y1,p[13]=i0^~C0&a0,p[22]=s0^~te&v0,p[23]=d0^~j1&se,p[32]=y0^~g0&t6,p[33]=pe^~E0&_0,p[42]=M6^~k0&xe,p[43]=O0^~r6>,p[4]=U1^~D0&c0,p[5]=q1^~J1&ee,p[14]=m0^~Y1&$0,p[15]=C0^~a0&o0,p[24]=te^~v0&l0,p[25]=j1^~se&X1,p[34]=g0^~t6&N0,p[35]=E0^~_0&Re,p[44]=k0^~xe&xt,p[45]=r6^~gt&Q1,p[6]=D0^~c0&k1,p[7]=J1^~ee&O1,p[16]=Y1^~$0&n0,p[17]=a0^~o0&u0,p[26]=v0^~l0&V1,p[27]=se^~X1&he,p[36]=t6^~N0&ge,p[37]=_0^~Re&t0,p[46]=xe^~xt&M0,p[47]=gt^~Q1&U0,p[8]=c0^~k1&S1,p[9]=ee^~O1&e0,p[18]=$0^~n0&de,p[19]=o0^~u0&i0,p[28]=l0^~V1&s0,p[29]=X1^~he&d0,p[38]=N0^~ge&y0,p[39]=Re^~t0&pe,p[48]=xt^~M0&M6,p[49]=Q1^~U0&O0,p[0]^=M[V],p[1]^=M[V+1]};if(o)t.exports=d;else for(P=0;P>=8;return e}function J9(t,e,r){let n=0;for(let u=0;ue+1+n&&l6.throwError("child data too short",Z.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:u}}function hh(t,e){if(t.length===0&&l6.throwError("data too short",Z.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&l6.throwError("data short segment too short",Z.errors.BUFFER_OVERRUN,{});const n=J9(t,e+1,r);return e+1+r+n>t.length&&l6.throwError("data long segment too short",Z.errors.BUFFER_OVERRUN,{}),Y9(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&l6.throwError("data array too short",Z.errors.BUFFER_OVERRUN,{}),Y9(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&l6.throwError("data array too short",Z.errors.BUFFER_OVERRUN,{});const n=J9(t,e+1,r);e+1+r+n>t.length&&l6.throwError("data array too short",Z.errors.BUFFER_OVERRUN,{});const u=F1(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:u}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&l6.throwError("data too short",Z.errors.BUFFER_OVERRUN,{});const n=F1(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:F1(t[e])}}function Sa(t){const e=v1(t),r=hh(e,0);return r.consumed!==e.length&&l6.throwArgumentError("invalid rlp data","data",t),r.result}const pv=Object.freeze(Object.defineProperty({__proto__:null,decode:Sa,encode:S2},Symbol.toStringTag,{value:"Module"})),bv="address/5.7.0",Fr=new Z(bv);function X9(t){W1(t,20)||Fr.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let u=0;u<40;u++)r[u]=e[u].charCodeAt(0);const n=v1(T0(r));for(let u=0;u<40;u+=2)n[u>>1]>>4>=8&&(e[u]=e[u].toUpperCase()),(n[u>>1]&15)>=8&&(e[u+1]=e[u+1].toUpperCase());return"0x"+e.join("")}const mv=9007199254740991;function yv(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const E4={};for(let t=0;t<10;t++)E4[String(t)]=String(t);for(let t=0;t<26;t++)E4[String.fromCharCode(65+t)]=String(10+t);const Z9=Math.floor(yv(mv));function ph(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>E4[n]).join("");for(;e.length>=Z9;){let n=e.substring(0,Z9);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}function B0(t){let e=null;if(typeof t!="string"&&Fr.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=X9(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Fr.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==ph(t)&&Fr.throwArgumentError("bad icap checksum","address",t),e=ov(t.substring(4));e.length<40;)e="0"+e;e=X9("0x"+e)}else Fr.throwArgumentError("invalid address","address",t);return e}function gv(t){try{return B0(t),!0}catch{}return!1}function xv(t){let e=sv(B0(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+ph("XE00"+e)+e}function Ta(t){let e=null;try{e=B0(t.from)}catch{Fr.throwArgumentError("missing from address","transaction",t)}const r=E6(v1(C1.from(t.nonce).toHexString()));return B0(ne(T0(S2([e,r])),12))}function vv(t,e,r){return _6(e)!==32&&Fr.throwArgumentError("salt must be 32 bytes","salt",e),_6(r)!==32&&Fr.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),B0(ne(T0(I0(["0xff",B0(t),e,r])),12))}const Av=Object.freeze(Object.defineProperty({__proto__:null,getAddress:B0,getContractAddress:Ta,getCreate2Address:vv,getIcapAddress:xv,isAddress:gv},Symbol.toStringTag,{value:"Module"})),bh=P0(Av);var wv={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const ef=t=>{let e;const r=new Set,n=(s,l)=>{const c=typeof s=="function"?s(e):s;if(!Object.is(c,e)){const y=e;e=l??typeof c!="object"?c:Object.assign({},e,c),r.forEach(v=>v(e,y))}},u=()=>e,o={setState:n,getState:u,subscribe:s=>(r.add(s),()=>r.delete(s)),destroy:()=>{(wv?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,u,o),o},C4=t=>t?ef(t):ef;var mh={exports:{}},yh={},gh={exports:{}},xh={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Kn=n1;function Ev(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Cv=typeof Object.is=="function"?Object.is:Ev,Fv=Kn.useState,Bv=Kn.useEffect,Dv=Kn.useLayoutEffect,_v=Kn.useDebugValue;function kv(t,e){var r=e(),n=Fv({inst:{value:r,getSnapshot:e}}),u=n[0].inst,i=n[1];return Dv(function(){u.value=r,u.getSnapshot=e,Do(u)&&i({inst:u})},[t,r,e]),Bv(function(){return Do(u)&&i({inst:u}),t(function(){Do(u)&&i({inst:u})})},[t]),_v(r),r}function Do(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Cv(t,r)}catch{return!0}}function Sv(t,e){return e()}var Tv=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Sv:kv;xh.useSyncExternalStore=Kn.useSyncExternalStore!==void 0?Kn.useSyncExternalStore:Tv;gh.exports=xh;var Pv=gh.exports;/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Pa=n1,Nv=Pv;function Mv(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Uv=typeof Object.is=="function"?Object.is:Mv,Ov=Nv.useSyncExternalStore,Iv=Pa.useRef,Rv=Pa.useEffect,Lv=Pa.useMemo,jv=Pa.useDebugValue;yh.useSyncExternalStoreWithSelector=function(t,e,r,n,u){var i=Iv(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=Lv(function(){function s(w){if(!l){if(l=!0,c=w,w=n(w),u!==void 0&&a.hasValue){var _=a.value;if(u(_,w))return y=_}return y=w}if(_=y,Uv(c,w))return _;var M=n(w);return u!==void 0&&u(_,M)?_:(c=w,y=M)}var l=!1,c,y,v=r===void 0?null:r;return[function(){return s(e())},v===null?void 0:function(){return s(v())}]},[e,r,n,u]);var o=Ov(t,i[0],i[1]);return Rv(function(){a.hasValue=!0,a.value=o},[o]),jv(o),o};mh.exports=yh;var zv=mh.exports;const vh=Pt(zv),{useSyncExternalStoreWithSelector:$v}=vh;function Ah(t,e=t.getState,r){const n=$v(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return n1.useDebugValue(n),n}const tf=t=>{const e=typeof t=="function"?C4(t):t,r=(n,u)=>Ah(e,n,u);return Object.assign(r,e),r},wh=t=>t?tf(t):tf;var qv=t=>wh(t);const Hv=Object.freeze(Object.defineProperty({__proto__:null,create:wh,createStore:C4,default:qv,useStore:Ah},Symbol.toStringTag,{value:"Module"})),Eh=P0(Hv);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createWeb3ReactStoreAndActions=t.MAX_SAFE_CHAIN_ID=void 0;const e=bh,r=Eh;t.MAX_SAFE_CHAIN_ID=0xfffffffffffec;function n(o){if(!Number.isInteger(o)||o<=0||o>t.MAX_SAFE_CHAIN_ID)throw new Error(`Invalid chainId ${o}`)}function u(o){return(0,e.getAddress)(o)}const i={chainId:void 0,accounts:void 0,activating:!1};function a(){const o=(0,r.createStore)()(()=>i);let s=0;function l(){const v=++s;return o.setState(Object.assign(Object.assign({},i),{activating:!0})),()=>{s===v&&o.setState({activating:!1})}}function c(v){if(v.chainId!==void 0&&n(v.chainId),v.accounts!==void 0)for(let w=0;w{var _,M;const N=(_=v.chainId)!==null&&_!==void 0?_:w.chainId,k=(M=v.accounts)!==null&&M!==void 0?M:w.accounts;let C=w.activating;return C&&N&&k&&(C=!1),{chainId:N,accounts:k,activating:C}})}function y(){s++,o.setState(i)}return[o,{startActivation:l,update:c,resetState:y}]}t.createWeb3ReactStoreAndActions=a})(uh);const{useSyncExternalStoreWithSelector:Kv}=vh;function Ch(t,e=t.getState,r){const n=Kv(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return n1.useDebugValue(n),n}const rf=(t,e)=>{const r=C4(t),n=(u,i=e)=>Ch(r,u,i);return Object.assign(n,r),n},Gv=(t,e)=>t?rf(t,e):rf,Vv=Object.freeze(Object.defineProperty({__proto__:null,createWithEqualityFn:Gv,useStoreWithEqualityFn:Ch},Symbol.toStringTag,{value:"Module"})),Wv=P0(Vv),Qv="properties/5.7.0";var Jv=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const V8=new Z(Qv);function s1(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Ce(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function X0(t){return Jv(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const u=t[n];return Promise.resolve(u).then(i=>({key:n,value:i}))});return(yield Promise.all(e)).reduce((n,u)=>(n[u.key]=u.value,n),{})})}function F4(t,e){(!t||typeof t!="object")&&V8.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||V8.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function j0(t){const e={};for(const r in t)e[r]=t[r];return e}const Yv={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Fh(t){if(t==null||Yv[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rKe(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&s1(e,r,Ke(n))}return e}return V8.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Ke(t){return Xv(t)}class Jr{constructor(e){for(const r in e)this[r]=Ke(e[r])}}const Zv=Object.freeze(Object.defineProperty({__proto__:null,Description:Jr,checkProperties:F4,deepCopy:Ke,defineReadOnly:s1,getStatic:Ce,resolveProperties:X0,shallowCopy:j0},Symbol.toStringTag,{value:"Module"})),eA="abstract-provider/5.7.0";var tA=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const rA=new Z(eA);class nA extends Jr{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class R2{constructor(){rA.checkAbstract(new.target,R2),s1(this,"_isProvider",!0)}getFeeData(){return tA(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield X0({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(a=>null)});let n=null,u=null,i=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,i=C1.from("1500000000"),u=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:n,maxFeePerGas:u,maxPriorityFeePerGas:i,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const uA="networks/5.7.1",nf=new Z(uA);function iA(t){return t&&typeof t.renetwork=="function"}function z6(t){const e=function(r,n){n==null&&(n={});const u=[];if(r.InfuraProvider&&n.infura!=="-")try{u.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{u.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{u.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const i=["goerli","ropsten","rinkeby","sepolia"];try{const a=new r.PocketProvider(t,n.pocket);a.network&&i.indexOf(a.network.name)===-1&&u.push(a)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{u.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const i=["ropsten"],a=new r.AnkrProvider(t,n.ankr);a.network&&i.indexOf(a.network.name)===-1&&u.push(a)}catch{}if(u.length===0)return null;if(r.FallbackProvider){let i=1;return n.quorum!=null?i=n.quorum:t==="homestead"&&(i=2),new r.FallbackProvider(u,i)}return u[0]};return e.renetwork=function(r){return z6(r)},e}function W8(t,e){const r=function(n,u){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return W8(t,n)},r}const uf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:z6("homestead")},af={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:z6("ropsten")},of={chainId:63,name:"classicMordor",_defaultProvider:W8("https://www.ethercluster.com/mordor","classicMordor")},_5={unspecified:{chainId:0,name:"unspecified"},homestead:uf,mainnet:uf,morden:{chainId:2,name:"morden"},ropsten:af,testnet:af,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:z6("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:z6("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:z6("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:z6("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:W8("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:of,classicTestnet:of,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:W8("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:z6("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:z6("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function B4(t){if(t==null)return null;if(typeof t=="number"){for(const n in _5){const u=_5[n];if(u.chainId===t)return{name:u.name,chainId:u.chainId,ensAddress:u.ensAddress||null,_defaultProvider:u._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=_5[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=_5[t.name];if(!e)return typeof t.chainId!="number"&&nf.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&nf.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(iA(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}function D4(t){t=atob(t);const e=[];for(let r=0;r0;)n.push(a%this.base),a=a/this.base|0}let u="";for(let i=0;r[i]===0&&i=0;--i)u+=this.alphabet[n[i]];return u}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;i>0;)r.push(i&255),i>>=8}for(let n=0;e[n]===this._leader&&n>6===2;a++)i++;return i}return t===Xe.OVERRUN?r.length-e-1:0}function bA(t,e,r,n,u){return t===Xe.OVERLONG?(n.push(u),0):(n.push(65533),kh(t,e,r))}const Sh=Object.freeze({error:pA,ignore:kh,replace:bA});function S4(t,e){e==null&&(e=Sh.error),t=v1(t);const r=[];let n=0;for(;n>7)){r.push(u);continue}let i=null,a=null;if((u&224)===192)i=1,a=127;else if((u&240)===224)i=2,a=2047;else if((u&248)===240)i=3,a=65535;else{(u&192)===128?n+=e(Xe.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Xe.BAD_PREFIX,n-1,t,r);continue}if(n-1+i>=t.length){n+=e(Xe.OVERRUN,n-1,t,r);continue}let o=u&(1<<8-i-1)-1;for(let s=0;s1114111){n+=e(Xe.OUT_OF_RANGE,n-1-i,t,r,o);continue}if(o>=55296&&o<=57343){n+=e(Xe.UTF16_SURROGATE,n-1-i,t,r,o);continue}if(o<=a){n+=e(Xe.OVERLONG,n-1-i,t,r,o);continue}r.push(o)}}return r}function z0(t,e=k6.current){e!=k6.current&&(_h.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(u&63|128);else if((u&64512)==55296){n++;const i=t.charCodeAt(n);if(n>=t.length||(i&64512)!==56320)throw new Error("invalid utf-8 string");const a=65536+((u&1023)<<10)+(i&1023);r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(a&63|128)}else r.push(u>>12|224),r.push(u>>6&63|128),r.push(u&63|128)}return v1(r)}function _o(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function mA(t,e){return'"'+S4(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?_o(r):(r-=65536,_o((r>>10&1023)+55296)+_o((r&1023)+56320))}).join("")+'"'}function Z3(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Yr(t,e){return Z3(S4(t,e))}function Q8(t,e=k6.current){return S4(z0(t,e))}function yA(t){const e=z0(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return F1(I0([e,Dh]).slice(0,32))}function gA(t){const e=v1(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return Yr(e.slice(0,r))}function xA(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let i=u.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])}),n}function Th(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let u=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:u,h:e}})}function P4(t,e){let r=0;for(let n=0;n=r&&t<=r+u.h&&(t-r)%(u.d||1)===0){if(u.e&&u.e.indexOf(t-r)!==-1)continue;return u}}return null}const vA=Th("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),AA="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),wA=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],EA=T4("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),CA=T4("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),FA=T4("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",xA),BA=Th("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function DA(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function _A(t){return!!P4(t,vA)}function kA(t){let e=P4(t,wA);if(e)return[t+e.s];let r=EA[t];if(r)return r;let n=CA[t];if(n)return[t+n[0]];let u=FA[t];return u||null}function SA(t){return!!P4(t,BA)}function TA(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=Q8(t);e=DA(e.map(n=>{if(AA.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let u=kA(n);return u||[n]})),e=Q8(Z3(e),k6.NFKC),e.forEach(n=>{if(SA(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(_A(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=Z3(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}const PA=Object.freeze(Object.defineProperty({__proto__:null,get UnicodeNormalizationForm(){return k6},Utf8ErrorFuncs:Sh,get Utf8ErrorReason(){return Xe},_toEscapedUtf8String:mA,formatBytes32String:yA,nameprep:TA,parseBytes32String:gA,toUtf8Bytes:z0,toUtf8CodePoints:Q8,toUtf8String:Yr},Symbol.toStringTag,{value:"Module"}));function Br(t){return T0(z0(t))}const Ph="hash/5.7.0";function Nh(t,e){e==null&&(e=1);const r=[],n=r.forEach,u=function(i,a){n.call(i,function(o){a>0&&Array.isArray(o)?u(o,a-1):r.push(o)})};return u(t,e),r}function NA(t){const e={};for(let r=0;r>--s&1}const y=31,v=Math.pow(2,y),w=v>>>1,_=w>>1,M=v-1;let N=0;for(let $=0;$1;){let o1=Y+J>>>1;$>>1|c(),e1=e1<<1^w,i1=(i1^w)<<1|w|1;C=e1,T=1+i1-e1}let z=n-4;return k.map($=>{switch($-z){case 3:return z+65792+(t[o++]<<16|t[o++]<<8|t[o++]);case 2:return z+256+(t[o++]<<8|t[o++]);case 1:return z+t[o++];default:return $-1}})}function UA(t){let e=0;return()=>t[e++]}function OA(t){return UA(MA(t))}function IA(t){return t&1?~t>>1:t>>1}function RA(t,e){let r=Array(t);for(let n=0;ne[a]):r}function jA(t){let e=[];for(;;){let r=t();if(r==0)break;e.push($A(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(qA(r,t))}return NA(Nh(e))}function zA(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function Mh(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let u=0;un[a].push(i));return n}function $A(t,e){let r=1+e(),n=e(),u=zA(e),i=Mh(u.length,1+t,e);return Nh(i.map((a,o)=>{const s=a[0],l=a.slice(1);return Array(u[o]).fill(void 0).map((c,y)=>{let v=y*n;return[s+y*r,l.map(w=>w+v)]})}))}function qA(t,e){let r=1+e();return Mh(r,1+t,e).map(u=>[u[0],u.slice(1)])}function HA(t){let e=J8(t).sort((n,u)=>n-u);return r();function r(){let n=[];for(;;){let l=J8(t,e);if(l.length==0)break;n.push({set:new Set(l),node:r()})}n.sort((l,c)=>c.set.size-l.set.size);let u=t(),i=u%3;u=u/3|0;let a=!!(u&1);u>>=1;let o=u==1,s=u==2;return{branches:n,valid:i,fe0f:a,save:o,check:s}}}function KA(){return OA(D4("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const Na=KA(),GA=new Set(J8(Na)),VA=new Set(J8(Na)),WA=jA(Na),QA=HA(Na),lf=45,ff=95;function Uh(t){return Q8(t)}function JA(t){return t.filter(e=>e!=65039)}function Oh(t){for(let e of t.split(".")){let r=Uh(e);try{for(let n=r.lastIndexOf(ff)-1;n>=0;n--)if(r[n]!==ff)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===lf&&r[3]===lf)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function YA(t){return Oh(XA(t,JA))}function XA(t,e){let r=Uh(t).reverse(),n=[];for(;r.length;){let u=ew(r);if(u){n.push(...e(u));continue}let i=r.pop();if(GA.has(i)){n.push(i);continue}if(VA.has(i))continue;let a=WA[i];if(a){n.push(...a);continue}throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`)}return Oh(ZA(String.fromCodePoint(...n)))}function ZA(t){return t.normalize("NFC")}function ew(t,e){var r;let n=QA,u,i,a=[],o=t.length;for(;o;){let s=t[--o];if(n=(r=n.branches.find(l=>l.set.has(s)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)i=s;else if(n.check&&s===i)break;a.push(s),n.fe0f&&(a.push(65039),o>0&&t[o-1]==65039&&o--),n.valid&&(u=a.slice(),n.valid==2&&u.splice(1,1),t.length=o)}return u}const tw=new Z(Ph),Ih=new Uint8Array(32);Ih.fill(0);function cf(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function Ma(t){const e=z0(YA(t)),r=[];if(t.length===0)return r;let n=0;for(let u=0;u=e.length)throw new Error("invalid ENS name; empty component");return r.push(cf(e.slice(n))),r}function rw(t){return Ma(t).map(e=>Yr(e)).join(".")}function nw(t){try{return Ma(t).length!==0}catch{}return!1}function ft(t){typeof t!="string"&&tw.throwArgumentError("invalid ENS name; not a string","name",t);let e=Ih;const r=Ma(t);for(;r.length;)e=T0(I0([e,T0(r.pop())]));return F1(e)}function Rh(t){return F1(I0(Ma(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"}const Lh=`Ethereum Signed Message: +`;function N4(t){return typeof t=="string"&&(t=z0(t)),T0(I0([z0(Lh),z0(String(t.length)),t]))}var uw=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const V0=new Z(Ph),jh=new Uint8Array(32);jh.fill(0);const iw=C1.from(-1),zh=C1.from(0),$h=C1.from(1),aw=C1.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function ow(t){const e=v1(t),r=e.length%32;return r?$e([e,jh.slice(r)]):F1(e)}const sw=R0($h.toHexString(),32),lw=R0(zh.toHexString(),32),df={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},ko=["name","version","chainId","verifyingContract","salt"];function hf(t){return function(e){return typeof e!="string"&&V0.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const fw={name:hf("name"),version:hf("version"),chainId:function(t){try{return C1.from(t).toString()}catch{}return V0.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return B0(t).toLowerCase()}catch{}return V0.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=v1(t);if(e.length!==32)throw new Error("bad length");return F1(e)}catch{}return V0.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function So(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&V0.throwArgumentError("invalid numeric width","type",t);const u=aw.mask(r?n-1:n),i=r?u.add($h).mul(iw):zh;return function(a){const o=C1.from(a);return(o.lt(i)||o.gt(u))&&V0.throwArgumentError(`value out-of-bounds for ${t}`,"value",a),R0(o.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&V0.throwArgumentError("invalid bytes width","type",t),function(n){return v1(n).length!==r&&V0.throwArgumentError(`invalid length for ${t}`,"value",n),ow(n)}}}switch(t){case"address":return function(e){return R0(B0(e),32)};case"bool":return function(e){return e?sw:lw};case"bytes":return function(e){return T0(e)};case"string":return function(e){return Br(e)}}return null}function pf(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Ee{constructor(e){s1(this,"types",Object.freeze(Ke(e))),s1(this,"_encoderCache",{}),s1(this,"_types",{});const r={},n={},u={};Object.keys(e).forEach(o=>{r[o]={},n[o]=[],u[o]={}});for(const o in e){const s={};e[o].forEach(l=>{s[l.name]&&V0.throwArgumentError(`duplicate variable name ${JSON.stringify(l.name)} in ${JSON.stringify(o)}`,"types",e),s[l.name]=!0;const c=l.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===o&&V0.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!So(c)&&(n[c]||V0.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(o),r[o][c]=!0)})}const i=Object.keys(n).filter(o=>n[o].length===0);i.length===0?V0.throwArgumentError("missing primary type","types",e):i.length>1&&V0.throwArgumentError(`ambiguous primary types or unused types: ${i.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),s1(this,"primaryType",i[0]);function a(o,s){s[o]&&V0.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),s[o]=!0,Object.keys(r[o]).forEach(l=>{n[l]&&(a(l,s),Object.keys(s).forEach(c=>{u[c][l]=!0}))}),delete s[o]}a(this.primaryType,{});for(const o in u){const s=Object.keys(u[o]);s.sort(),this._types[o]=pf(o,e[o])+s.map(l=>pf(l,e[l])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const u=So(e);if(u)return u}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const u=r[1],i=this.getEncoder(u),a=parseInt(r[3]);return o=>{a>=0&&o.length!==a&&V0.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let s=o.map(i);return this._types[u]&&(s=s.map(T0)),T0($e(s))}}const n=this.types[e];if(n){const u=Br(this._types[e]);return i=>{const a=n.map(({name:o,type:s})=>{const l=this.getEncoder(s)(i[o]);return this._types[s]?T0(l):l});return a.unshift(u),$e(a)}}return V0.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||V0.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return T0(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(So(e))return n(e,r);const u=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(u){const a=u[1],o=parseInt(u[3]);return o>=0&&r.length!==o&&V0.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(s=>this._visit(a,s,n))}const i=this.types[e];return i?i.reduce((a,{name:o,type:s})=>(a[o]=this._visit(s,r[o],n),a),{}):V0.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Ee(e)}static getPrimaryType(e){return Ee.from(e).primaryType}static hashStruct(e,r,n){return Ee.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const u=df[n];u||V0.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:u})}return r.sort((n,u)=>ko.indexOf(n.name)-ko.indexOf(u.name)),Ee.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return $e(["0x1901",Ee.hashDomain(e),Ee.from(r).hash(n)])}static hash(e,r,n){return T0(Ee.encode(e,r,n))}static resolveNames(e,r,n,u){return uw(this,void 0,void 0,function*(){e=j0(e);const i={};e.verifyingContract&&!W1(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const a=Ee.from(r);a.visit(n,(o,s)=>(o==="address"&&!W1(s,20)&&(i[s]="0x"),s));for(const o in i)i[o]=yield u(o);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=a.visit(n,(o,s)=>o==="address"&&i[s]?i[s]:s),{domain:e,value:n}})}static getPayload(e,r,n){Ee.hashDomain(e);const u={},i=[];ko.forEach(s=>{const l=e[s];l!=null&&(u[s]=fw[s](l),i.push({name:s,type:df[s]}))});const a=Ee.from(r),o=j0(r);return o.EIP712Domain?V0.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):o.EIP712Domain=i,a.encode(n),{types:o,domain:u,primaryType:a.primaryType,message:a.visit(n,(s,l)=>{if(s.match(/^bytes(\d*)/))return F1(v1(l));if(s.match(/^u?int/))return C1.from(l).toString();switch(s){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return typeof l!="string"&&V0.throwArgumentError("invalid string","value",l),l}return V0.throwArgumentError("unsupported type","type",s)})}}}const cw=Object.freeze(Object.defineProperty({__proto__:null,_TypedDataEncoder:Ee,dnsEncode:Rh,ensNormalize:rw,hashMessage:N4,id:Br,isValidName:nw,messagePrefix:Lh,namehash:ft},Symbol.toStringTag,{value:"Module"}));var qh={},b0={},t5=Hh;function Hh(t,e){if(!t)throw new Error(e||"Assertion failed")}Hh.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var es={exports:{}};typeof Object.create=="function"?es.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:es.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var dw=es.exports,hw=t5,pw=dw;b0.inherits=pw;function bw(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function mw(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),u=0;u>6|192,r[n++]=i&63|128):bw(t,u)?(i=65536+((i&1023)<<10)+(t.charCodeAt(++u)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(u=0;u>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}b0.htonl=Kh;function gw(t,e){for(var r="",n=0;n>>0}return i}b0.join32=xw;function vw(t,e){for(var r=new Array(t.length*4),n=0,u=0;n>>24,r[u+1]=i>>>16&255,r[u+2]=i>>>8&255,r[u+3]=i&255):(r[u+3]=i>>>24,r[u+2]=i>>>16&255,r[u+1]=i>>>8&255,r[u]=i&255)}return r}b0.split32=vw;function Aw(t,e){return t>>>e|t<<32-e}b0.rotr32=Aw;function ww(t,e){return t<>>32-e}b0.rotl32=ww;function Ew(t,e){return t+e>>>0}b0.sum32=Ew;function Cw(t,e,r){return t+e+r>>>0}b0.sum32_3=Cw;function Fw(t,e,r,n){return t+e+r+n>>>0}b0.sum32_4=Fw;function Bw(t,e,r,n,u){return t+e+r+n+u>>>0}b0.sum32_5=Bw;function Dw(t,e,r,n){var u=t[e],i=t[e+1],a=n+i>>>0,o=(a>>0,t[e+1]=a}b0.sum64=Dw;function _w(t,e,r,n){var u=e+n>>>0,i=(u>>0}b0.sum64_hi=_w;function kw(t,e,r,n){var u=e+n;return u>>>0}b0.sum64_lo=kw;function Sw(t,e,r,n,u,i,a,o){var s=0,l=e;l=l+n>>>0,s+=l>>0,s+=l>>0,s+=l>>0}b0.sum64_4_hi=Sw;function Tw(t,e,r,n,u,i,a,o){var s=e+n+i+o;return s>>>0}b0.sum64_4_lo=Tw;function Pw(t,e,r,n,u,i,a,o,s,l){var c=0,y=e;y=y+n>>>0,c+=y>>0,c+=y>>0,c+=y>>0,c+=y>>0}b0.sum64_5_hi=Pw;function Nw(t,e,r,n,u,i,a,o,s,l){var c=e+n+i+o+l;return c>>>0}b0.sum64_5_lo=Nw;function Mw(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}b0.rotr64_hi=Mw;function Uw(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}b0.rotr64_lo=Uw;function Ow(t,e,r){return t>>>r}b0.shr64_hi=Ow;function Iw(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}b0.shr64_lo=Iw;var iu={},bf=b0,Rw=t5;function Ua(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}iu.BlockHash=Ua;Ua.prototype.update=function(e,r){if(e=bf.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=bf.join32(e,0,e.length-n,this.endian);for(var u=0;u>>24&255,u[i++]=e>>>16&255,u[i++]=e>>>8&255,u[i++]=e&255}else for(u[i++]=e&255,u[i++]=e>>>8&255,u[i++]=e>>>16&255,u[i++]=e>>>24&255,u[i++]=0,u[i++]=0,u[i++]=0,u[i++]=0,a=8;a>>3}N6.g0_256=qw;function Hw(t){return C6(t,17)^C6(t,19)^t>>>10}N6.g1_256=Hw;var Vn=b0,Kw=iu,Gw=N6,To=Vn.rotl32,_u=Vn.sum32,Vw=Vn.sum32_5,Ww=Gw.ft_1,Yh=Kw.BlockHash,Qw=[1518500249,1859775393,2400959708,3395469782];function S6(){if(!(this instanceof S6))return new S6;Yh.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Vn.inherits(S6,Yh);var Jw=S6;S6.blockSize=512;S6.outSize=160;S6.hmacStrength=80;S6.padLength=64;S6.prototype._update=function(e,r){for(var n=this.W,u=0;u<16;u++)n[u]=e[r+u];for(;uthis.blockSize&&(e=new this.Hash().update(e).digest()),IE(e.length<=this.blockSize);for(var r=e.length;r{i[o.toLowerCase()]=a}):n.headers.keys().forEach(a=>{i[a.toLowerCase()]=n.headers.get(a)}),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:v1(new Uint8Array(u))}})}var GE=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const Lt=new Z(qE);function xf(t){return new Promise(e=>{setTimeout(e,t)})}function pr(t,e){if(t==null)return null;if(typeof t=="string")return t;if(Zi(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Yr(t)}catch{}return F1(t)}return t}function VE(t){return z0(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function lp(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Lt.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const u=typeof t=="object"?t.throttleCallback:null,i=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Lt.assertArgument(i>0&&i%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const a=typeof t=="object"?!!t.errorPassThrough:!1,o={};let s=null;const l={method:"GET"};let c=!1,y=2*60*1e3;if(typeof t=="string")s=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Lt.throwArgumentError("missing URL","connection.url",t),s=t.url,typeof t.timeout=="number"&&t.timeout>0&&(y=t.timeout),t.headers)for(const k in t.headers)o[k.toLowerCase()]={key:k,value:String(t.headers[k])},["if-none-match","if-modified-since"].indexOf(k.toLowerCase())>=0&&(c=!0);if(l.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){s.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Lt.throwError("basic authentication requires a secure https url",Z.errors.INVALID_ARGUMENT,{argument:"url",url:s,user:t.user,password:"[REDACTED]"});const k=t.user+":"+t.password;o.authorization={key:"Authorization",value:"Basic "+_4(z0(k))}}t.skipFetchSetup!=null&&(l.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(l.fetchOptions=j0(t.fetchOptions))}const v=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),w=s?s.match(v):null;if(w)try{const k={statusCode:200,statusMessage:"OK",headers:{"content-type":w[1]||"text/plain"},body:w[2]?D4(w[3]):VE(w[3])};let C=k.body;return r&&(C=r(k.body,k)),Promise.resolve(C)}catch(k){Lt.throwError("processing response error",Z.errors.SERVER_ERROR,{body:pr(w[1],w[2]),error:k,requestBody:null,requestMethod:"GET",url:s})}e&&(l.method="POST",l.body=e,o["content-type"]==null&&(o["content-type"]={key:"Content-Type",value:"application/octet-stream"}),o["content-length"]==null&&(o["content-length"]={key:"Content-Length",value:String(e.length)}));const _={};Object.keys(o).forEach(k=>{const C=o[k];_[C.key]=C.value}),l.headers=_;const M=function(){let k=null;return{promise:new Promise(function(z,$){y&&(k=setTimeout(()=>{k!=null&&(k=null,$(Lt.makeError("timeout",Z.errors.TIMEOUT,{requestBody:pr(l.body,_["content-type"]),requestMethod:l.method,timeout:y,url:s})))},y))}),cancel:function(){k!=null&&(clearTimeout(k),k=null)}}}(),N=function(){return GE(this,void 0,void 0,function*(){for(let k=0;k=300)&&(M.cancel(),Lt.throwError("bad response",Z.errors.SERVER_ERROR,{status:C.statusCode,headers:C.headers,body:pr(T,C.headers?C.headers["content-type"]:null),requestBody:pr(l.body,_["content-type"]),requestMethod:l.method,url:s})),r)try{const z=yield r(T,C);return M.cancel(),z}catch(z){if(z.throttleRetry&&k{let o=null;if(i!=null)try{o=JSON.parse(Yr(i))}catch(s){Lt.throwError("invalid JSON",Z.errors.SERVER_ERROR,{body:i,error:s})}return r&&(o=r(o,a)),o},u=null;if(e!=null){u=z0(e);const i=typeof t=="string"?{url:t}:j0(t);i.headers?Object.keys(i.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(i.headers=j0(i.headers),i.headers["content-type"]="application/json"):i.headers={"content-type":"application/json"},t=i}return lp(t,u,n)}function m2(t,e){return e||(e={}),e=j0(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let u=null,i=!1;const a=()=>i?!1:(i=!0,u&&clearTimeout(u),!0);e.timeout&&(u=setTimeout(()=>{a()&&n(new Error("timeout"))},e.timeout));const o=e.retryLimit;let s=0;function l(){return t().then(function(c){if(c!==void 0)a()&&r(c);else if(e.oncePoll)e.oncePoll.once("poll",l);else if(e.onceBlock)e.onceBlock.once("block",l);else if(!i){if(s++,s>o){a()&&n(new Error("retry limit reached"));return}let y=e.interval*parseInt(String(Math.random()*Math.pow(2,s)));ye.ceiling&&(y=e.ceiling),setTimeout(l,y)}return null},function(c){a()&&n(c)})}l()})}const WE=Object.freeze(Object.defineProperty({__proto__:null,_fetchData:lp,fetchJson:su,poll:m2},Symbol.toStringTag,{value:"Module"}));var Y8="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ns={};for(var S5=0;S5>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function fp(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=Nn(e)^n>>5}for(e=Nn(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=fp(t);if(typeof n=="string")throw new Error(n);for(var u=t+"1",i=0;i>5)throw new Error("Non 5-bit word");n=Nn(n)^a,u+=Y8.charAt(a)}for(i=0;i<6;++i)n=Nn(n);for(n^=1,i=0;i<6;++i){var o=n>>(5-i)*5&31;u+=Y8.charAt(o)}return u}function cp(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var u=t.lastIndexOf("1");if(u===-1)return"No separator character for "+t;if(u===0)return"Missing prefix for "+t;var i=t.slice(0,u),a=t.slice(u+1);if(a.length<6)return"Data too short";var o=fp(i);if(typeof o=="string")return o;for(var s=[],l=0;l=a.length)&&s.push(y)}return o!==1?"Invalid checksum for "+t:{prefix:i,words:s}}function JE(){var t=cp.apply(null,arguments);if(typeof t=="object")return t}function YE(t){var e=cp.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Oa(t,e,r,n){for(var u=0,i=0,a=(1<=r;)i-=r,o.push(u>>i&a);if(n)i>0&&o.push(u<=e)return"Excess padding";if(u<>8,v=c&255;y?s.push(y,v):s.push(v)}return s}r.toArray=n;function u(a){return a.length===1?"0"+a:a}r.zero2=u;function i(a){for(var o="",s=0;s(v>>1)-1?M=(v>>1)-N:M=N,w.isubn(M)):M=0,y[_]=M,w.iushrn(1)}return y}r.getNAF=n;function u(s,l){var c=[[],[]];s=s.clone(),l=l.clone();for(var y=0,v=0,w;s.cmpn(-y)>0||l.cmpn(-v)>0;){var _=s.andln(3)+y&3,M=l.andln(3)+v&3;_===3&&(_=-1),M===3&&(M=-1);var N;_&1?(w=s.andln(7)+y&7,(w===3||w===5)&&M===2?N=-_:N=_):N=0,c[0].push(N);var k;M&1?(w=l.andln(7)+v&7,(w===3||w===5)&&_===2?k=-M:k=M):k=0,c[1].push(k),2*y===N+1&&(y=1-y),2*v===k+1&&(v=1-v),s.iushrn(1),l.iushrn(1)}return c}r.getJSF=u;function i(s,l,c){var y="_"+l;s.prototype[l]=function(){return this[y]!==void 0?this[y]:this[y]=c.call(this)}}r.cachedProperty=i;function a(s){return typeof s=="string"?r.toArray(s,"hex"):s}r.parseBytes=a;function o(s){return new G1(s,"hex","le")}r.intFromLE=o}),X8=yt.getNAF,uC=yt.getJSF,Z8=yt.assert;function Xr(t,e){this.type=t,this.p=new G1(e.p,16),this.red=e.prime?G1.red(e.prime):G1.mont(this.p),this.zero=new G1(0).toRed(this.red),this.one=new G1(1).toRed(this.red),this.two=new G1(2).toRed(this.red),this.n=e.n&&new G1(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var L2=Xr;Xr.prototype.point=function(){throw new Error("Not implemented")};Xr.prototype.validate=function(){throw new Error("Not implemented")};Xr.prototype._fixedNafMul=function(e,r){Z8(e.precomputed);var n=e._getDoubles(),u=X8(r,1,this._bitLength),i=(1<=o;l--)s=(s<<1)+u[l];a.push(s)}for(var c=this.jpoint(null,null,null),y=this.jpoint(null,null,null),v=i;v>0;v--){for(o=0;o=0;s--){for(var l=0;s>=0&&a[s]===0;s--)l++;if(s>=0&&l++,o=o.dblp(l),s<0)break;var c=a[s];Z8(c!==0),e.type==="affine"?c>0?o=o.mixedAdd(i[c-1>>1]):o=o.mixedAdd(i[-c-1>>1].neg()):c>0?o=o.add(i[c-1>>1]):o=o.add(i[-c-1>>1].neg())}return e.type==="affine"?o.toP():o};Xr.prototype._wnafMulAdd=function(e,r,n,u,i){var a=this._wnafT1,o=this._wnafT2,s=this._wnafT3,l=0,c,y,v;for(c=0;c=1;c-=2){var _=c-1,M=c;if(a[_]!==1||a[M]!==1){s[_]=X8(n[_],a[_],this._bitLength),s[M]=X8(n[M],a[M],this._bitLength),l=Math.max(s[_].length,l),l=Math.max(s[M].length,l);continue}var N=[r[_],null,null,r[M]];r[_].y.cmp(r[M].y)===0?(N[1]=r[_].add(r[M]),N[2]=r[_].toJ().mixedAdd(r[M].neg())):r[_].y.cmp(r[M].y.redNeg())===0?(N[1]=r[_].toJ().mixedAdd(r[M]),N[2]=r[_].add(r[M].neg())):(N[1]=r[_].toJ().mixedAdd(r[M]),N[2]=r[_].toJ().mixedAdd(r[M].neg()));var k=[-3,-1,-5,-7,0,7,5,1,3],C=uC(n[_],n[M]);for(l=Math.max(C[0].length,l),s[_]=new Array(l),s[M]=new Array(l),y=0;y=0;c--){for(var J=0;c>=0;){var e1=!0;for(y=0;y=0&&J++,$=$.dblp(J),c<0)break;for(y=0;y0?v=o[y][i1-1>>1]:i1<0&&(v=o[y][-i1-1>>1].neg()),v.type==="affine"?$=$.mixedAdd(v):$=$.add(v))}}for(c=0;c=Math.ceil((e.bitLength()+1)/r.step):!1};Nt.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],u=this,i=0;i=0&&(w=l,_=c),y.negative&&(y=y.neg(),v=v.neg()),w.negative&&(w=w.neg(),_=_.neg()),[{a:y,b:v},{a:w,b:_}]};Mt.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],u=r[1],i=u.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),o=i.mul(n.a),s=a.mul(u.a),l=i.mul(n.b),c=a.mul(u.b),y=e.sub(o).sub(s),v=l.add(c).neg();return{k1:y,k2:v}};Mt.prototype.pointFromX=function(e,r){e=new G1(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),u=n.redSqrt();if(u.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=u.fromRed().isOdd();return(r&&!i||!r&&i)&&(u=u.redNeg()),this.point(e,u)};Mt.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,u=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(u).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};Mt.prototype._endoWnafMulAdd=function(e,r,n){for(var u=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""};ye.prototype.isInfinity=function(){return this.inf};ye.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),u=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,u)};ye.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),u=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(u),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)};ye.prototype.getX=function(){return this.x.fromRed()};ye.prototype.getY=function(){return this.y.fromRed()};ye.prototype.mul=function(e){return e=new G1(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};ye.prototype.mulAdd=function(e,r,n){var u=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(u,i):this.curve._wnafMulAdd(1,u,i,2)};ye.prototype.jmulAdd=function(e,r,n){var u=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(u,i,!0):this.curve._wnafMulAdd(1,u,i,2,!0)};ye.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};ye.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,u=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(u)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(u)}}}return r};ye.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function De(t,e,r,n){L2.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new G1(0)):(this.x=new G1(e,16),this.y=new G1(r,16),this.z=new G1(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}U4(De,L2.BasePoint);Mt.prototype.jpoint=function(e,r,n){return new De(this,e,r,n)};De.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),u=this.y.redMul(r).redMul(e);return this.curve.point(n,u)};De.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};De.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),u=this.x.redMul(r),i=e.x.redMul(n),a=this.y.redMul(r.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),s=u.redSub(i),l=a.redSub(o);if(s.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),y=c.redMul(s),v=u.redMul(c),w=l.redSqr().redIAdd(y).redISub(v).redISub(v),_=l.redMul(v.redISub(w)).redISub(a.redMul(y)),M=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(w,_,M)};De.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,u=e.x.redMul(r),i=this.y,a=e.y.redMul(r).redMul(this.z),o=n.redSub(u),s=i.redSub(a);if(o.cmpn(0)===0)return s.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=o.redSqr(),c=l.redMul(o),y=n.redMul(l),v=s.redSqr().redIAdd(c).redISub(y).redISub(y),w=s.redMul(y.redISub(v)).redISub(i.redMul(c)),_=this.z.redMul(o);return this.curve.jpoint(v,w,_)};De.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}};De.prototype.inspect=function(){return this.isInfinity()?"":""};De.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var h8=lu(function(t,e){var r=e;r.base=L2,r.short=aC,r.mont=null,r.edwards=null}),p8=lu(function(t,e){var r=e,n=yt.assert;function u(o){o.type==="short"?this.curve=new h8.short(o):o.type==="edwards"?this.curve=new h8.edwards(o):this.curve=new h8.mont(o),this.g=this.curve.g,this.n=this.curve.n,this.hash=o.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=u;function i(o,s){Object.defineProperty(r,o,{configurable:!0,enumerable:!0,get:function(){var l=new u(s);return Object.defineProperty(r,o,{configurable:!0,enumerable:!0,value:l}),l}})}i("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Ye.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Ye.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Ye.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Ye.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),i("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Ye.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ye.sha256,gRed:!1,g:["9"]}),i("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ye.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var a;try{a=null.crash()}catch{a=void 0}i("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Ye.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",a]})});function $r(t){if(!(this instanceof $r))return new $r(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Vt.toArray(t.entropy,t.entropyEnc||"hex"),r=Vt.toArray(t.nonce,t.nonceEnc||"hex"),n=Vt.toArray(t.pers,t.persEnc||"hex");M4(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var hp=$r;$r.prototype._init=function(e,r,n){var u=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};$r.prototype.generate=function(e,r,n,u){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(u=n,n=r,r=null),n&&(n=Vt.toArray(n,u||"hex"),this._update(n));for(var i=[];i.length"};var oC=yt.assert;function Ia(t,e){if(t instanceof Ia)return t;this._importDER(t,e)||(oC(t.r&&t.s,"Signature without r or s"),this.r=new G1(t.r,16),this.s=new G1(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Ra=Ia;function sC(){this.place=0}function Uo(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var u=0,i=0,a=e.place;i>>=0;return u<=127?!1:(e.place=a,u)}function Af(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Ia.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=Af(r),n=Af(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var u=[2];Oo(u,r.length),u=u.concat(r),u.push(2),Oo(u,n.length);var i=u.concat(n),a=[48];return Oo(a,i.length),a=a.concat(i),yt.encode(a,e)};var lC=function(){throw new Error("unsupported")},pp=yt.assert;function Tt(t){if(!(this instanceof Tt))return new Tt(t);typeof t=="string"&&(pp(Object.prototype.hasOwnProperty.call(p8,t),"Unknown curve "+t),t=p8[t]),t instanceof p8.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var fC=Tt;Tt.prototype.keyPair=function(e){return new O4(this,e)};Tt.prototype.keyFromPrivate=function(e,r){return O4.fromPrivate(this,e,r)};Tt.prototype.keyFromPublic=function(e,r){return O4.fromPublic(this,e,r)};Tt.prototype.genKeyPair=function(e){e||(e={});for(var r=new hp({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||lC(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),u=this.n.sub(new G1(2));;){var i=new G1(r.generate(n));if(!(i.cmp(u)>0))return i.iaddn(1),this.keyFromPrivate(i)}};Tt.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Tt.prototype.sign=function(e,r,n,u){typeof n=="object"&&(u=n,n=null),u||(u={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new G1(e,16));for(var i=this.n.byteLength(),a=r.getPrivate().toArray("be",i),o=e.toArray("be",i),s=new hp({hash:this.hash,entropy:a,nonce:o,pers:u.pers,persEnc:u.persEnc||"utf8"}),l=this.n.sub(new G1(1)),c=0;;c++){var y=u.k?u.k(c):new G1(s.generate(this.n.byteLength()));if(y=this._truncateToN(y,!0),!(y.cmpn(1)<=0||y.cmp(l)>=0)){var v=this.g.mul(y);if(!v.isInfinity()){var w=v.getX(),_=w.umod(this.n);if(_.cmpn(0)!==0){var M=y.invm(this.n).mul(_.mul(r.getPrivate()).iadd(e));if(M=M.umod(this.n),M.cmpn(0)!==0){var N=(v.getY().isOdd()?1:0)|(w.cmp(_)!==0?2:0);return u.canonical&&M.cmp(this.nh)>0&&(M=this.n.sub(M),N^=1),new Ra({r:_,s:M,recoveryParam:N})}}}}}};Tt.prototype.verify=function(e,r,n,u){e=this._truncateToN(new G1(e,16)),n=this.keyFromPublic(n,u),r=new Ra(r,"hex");var i=r.r,a=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var o=a.invm(this.n),s=o.mul(e).umod(this.n),l=o.mul(i).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(s,n.getPublic(),l),c.isInfinity()?!1:c.eqXToP(i)):(c=this.g.mulAdd(s,n.getPublic(),l),c.isInfinity()?!1:c.getX().umod(this.n).cmp(i)===0)};Tt.prototype.recoverPubKey=function(t,e,r,n){pp((3&r)===r,"The recovery param is more than two bits"),e=new Ra(e,n);var u=this.n,i=new G1(t),a=e.r,o=e.s,s=r&1,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?a=this.curve.pointFromX(a.add(this.curve.n),s):a=this.curve.pointFromX(a,s);var c=e.r.invm(u),y=u.sub(i).mul(c).umod(u),v=o.mul(c).umod(u);return this.g.mulAdd(y,a,v)};Tt.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Ra(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var u=0;u<4;u++){var i;try{i=this.recoverPubKey(t,e,u)}catch{continue}if(i.eq(r))return u}throw new Error("Unable to find valid recovery factor")};var cC=lu(function(t,e){var r=e;r.version="6.5.4",r.utils=yt,r.rand=function(){throw new Error("unsupported")},r.curve=h8,r.curves=p8,r.ec=fC,r.eddsa=null}),dC=cC.ec;const hC="signing-key/5.7.0",is=new Z(hC);let Io=null;function f6(){return Io||(Io=new dC("secp256k1")),Io}class v2{constructor(e){s1(this,"curve","secp256k1"),s1(this,"privateKey",F1(e)),_6(this.privateKey)!==32&&is.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=f6().keyFromPrivate(v1(this.privateKey));s1(this,"publicKey","0x"+r.getPublic(!1,"hex")),s1(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),s1(this,"_isSigningKey",!0)}_addPoint(e){const r=f6().keyFromPublic(v1(this.publicKey)),n=f6().keyFromPublic(v1(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=f6().keyFromPrivate(v1(this.privateKey)),n=v1(e);n.length!==32&&is.throwArgumentError("bad digest length","digest",e);const u=r.sign(n,{canonical:!0});return I2({recoveryParam:u.recoveryParam,r:R0("0x"+u.r.toString(16),32),s:R0("0x"+u.s.toString(16),32)})}computeSharedSecret(e){const r=f6().keyFromPrivate(v1(this.privateKey)),n=f6().keyFromPublic(v1(I4(e)));return R0("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function bp(t,e){const r=I2(e),n={r:v1(r.r),s:v1(r.s)};return"0x"+f6().recoverPubKey(v1(t),n,r.recoveryParam).encode("hex",!1)}function I4(t,e){const r=v1(t);if(r.length===32){const n=new v2(r);return e?"0x"+f6().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?F1(r):"0x"+f6().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+f6().keyFromPublic(r).getPublic(!0,"hex"):F1(r)}return is.throwArgumentError("invalid public or private key","key","[REDACTED]")}const pC=Object.freeze(Object.defineProperty({__proto__:null,SigningKey:v2,computePublicKey:I4,recoverPublicKey:bp},Symbol.toStringTag,{value:"Module"})),bC="transactions/5.7.0",Me=new Z(bC);var as;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(as||(as={}));function R4(t){return t==="0x"?null:B0(t)}function Ne(t){return t==="0x"?Bh:C1.from(t)}const mC=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],yC={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Ir(t){const e=I4(t);return B0(ne(T0(ne(e,1)),12))}function r5(t,e){return Ir(bp(v1(t),e))}function ot(t,e){const r=E6(C1.from(t).toHexString());return r.length>32&&Me.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function Ro(t,e){return{address:B0(t),storageKeys:(e||[]).map((r,n)=>(_6(r)!==32&&Me.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Zr(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Me.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),Ro(r[0],r[1])):Ro(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((u,i)=>(u[i]=!0,u),{});return Ro(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function mp(t){return Zr(t).map(e=>[e.address,e.storageKeys])}function yp(t,e){if(t.gasPrice!=null){const n=C1.from(t.gasPrice),u=C1.from(t.maxFeePerGas||0);n.eq(u)||Me.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:u})}const r=[ot(t.chainId||0,"chainId"),ot(t.nonce||0,"nonce"),ot(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),ot(t.maxFeePerGas||0,"maxFeePerGas"),ot(t.gasLimit||0,"gasLimit"),t.to!=null?B0(t.to):"0x",ot(t.value||0,"value"),t.data||"0x",mp(t.accessList||[])];if(e){const n=I2(e);r.push(ot(n.recoveryParam,"recoveryParam")),r.push(E6(n.r)),r.push(E6(n.s))}return $e(["0x02",S2(r)])}function gp(t,e){const r=[ot(t.chainId||0,"chainId"),ot(t.nonce||0,"nonce"),ot(t.gasPrice||0,"gasPrice"),ot(t.gasLimit||0,"gasLimit"),t.to!=null?B0(t.to):"0x",ot(t.value||0,"value"),t.data||"0x",mp(t.accessList||[])];if(e){const n=I2(e);r.push(ot(n.recoveryParam,"recoveryParam")),r.push(E6(n.r)),r.push(E6(n.s))}return $e(["0x01",S2(r)])}function gC(t,e){F4(t,yC);const r=[];mC.forEach(function(a){let o=t[a.name]||[];const s={};a.numeric&&(s.hexPad="left"),o=v1(F1(o,s)),a.length&&o.length!==a.length&&o.length>0&&Me.throwArgumentError("invalid length for "+a.name,"transaction:"+a.name,o),a.maxLength&&(o=E6(o),o.length>a.maxLength&&Me.throwArgumentError("invalid length for "+a.name,"transaction:"+a.name,o)),r.push(F1(o))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Me.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!Zi(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(F1(n)),r.push("0x"),r.push("0x")),!e)return S2(r);const u=I2(e);let i=27+u.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),i+=n*2+8,u.v>28&&u.v!==i&&Me.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):u.v!==i&&Me.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(F1(i)),r.push(E6(v1(u.r))),r.push(E6(v1(u.s))),S2(r)}function os(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Me.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),gC(t,e);switch(t.type){case 1:return gp(t,e);case 2:return yp(t,e)}return Me.throwError(`unsupported transaction type: ${t.type}`,Z.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function xp(t,e,r){try{const n=Ne(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Me.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=R0(e[1],32),t.s=R0(e[2],32);try{const n=T0(r(t));t.from=r5(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function xC(t){const e=Sa(t.slice(1));e.length!==9&&e.length!==12&&Me.throwArgumentError("invalid component count for transaction type: 2","payload",F1(t));const r=Ne(e[2]),n=Ne(e[3]),u={type:2,chainId:Ne(e[0]).toNumber(),nonce:Ne(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Ne(e[4]),to:R4(e[5]),value:Ne(e[6]),data:e[7],accessList:Zr(e[8])};return e.length===9||(u.hash=T0(t),xp(u,e.slice(9),yp)),u}function vC(t){const e=Sa(t.slice(1));e.length!==8&&e.length!==11&&Me.throwArgumentError("invalid component count for transaction type: 1","payload",F1(t));const r={type:1,chainId:Ne(e[0]).toNumber(),nonce:Ne(e[1]).toNumber(),gasPrice:Ne(e[2]),gasLimit:Ne(e[3]),to:R4(e[4]),value:Ne(e[5]),data:e[6],accessList:Zr(e[7])};return e.length===8||(r.hash=T0(t),xp(r,e.slice(8),gp)),r}function AC(t){const e=Sa(t);e.length!==9&&e.length!==6&&Me.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Ne(e[0]).toNumber(),gasPrice:Ne(e[1]),gasLimit:Ne(e[2]),to:R4(e[3]),value:Ne(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=C1.from(e[6]).toNumber()}catch{return r}if(r.r=R0(e[7],32),r.s=R0(e[8],32),C1.from(r.r).isZero()&&C1.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const u=e.slice(0,6);r.chainId!==0&&(u.push(F1(r.chainId)),u.push("0x"),u.push("0x"),n-=r.chainId*2+8);const i=T0(S2(u));try{r.from=r5(i,{r:F1(r.r),s:F1(r.s),recoveryParam:n})}catch{}r.hash=T0(t)}return r.type=null,r}function vp(t){const e=v1(t);if(e[0]>127)return AC(e);switch(e[0]){case 1:return vC(e);case 2:return xC(e)}return Me.throwError(`unsupported transaction type: ${e[0]}`,Z.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const wC=Object.freeze(Object.defineProperty({__proto__:null,get TransactionTypes(){return as},accessListify:Zr,computeAddress:Ir,parse:vp,recoverAddress:r5,serialize:os},Symbol.toStringTag,{value:"Module"})),Su=new Z(Ie);class P1{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},r=this.address.bind(this),n=this.bigNumber.bind(this),u=this.blockTag.bind(this),i=this.data.bind(this),a=this.hash.bind(this),o=this.hex.bind(this),s=this.number.bind(this),l=this.type.bind(this),c=y=>this.data(y,!0);return e.transaction={hash:a,type:l,accessList:P1.allowNull(this.accessList.bind(this),null),blockHash:P1.allowNull(a,null),blockNumber:P1.allowNull(s,null),transactionIndex:P1.allowNull(s,null),confirmations:P1.allowNull(s,null),from:r,gasPrice:P1.allowNull(n),maxPriorityFeePerGas:P1.allowNull(n),maxFeePerGas:P1.allowNull(n),gasLimit:n,to:P1.allowNull(r,null),value:n,nonce:s,data:i,r:P1.allowNull(this.uint256),s:P1.allowNull(this.uint256),v:P1.allowNull(s),creates:P1.allowNull(r,null),raw:P1.allowNull(i)},e.transactionRequest={from:P1.allowNull(r),nonce:P1.allowNull(s),gasLimit:P1.allowNull(n),gasPrice:P1.allowNull(n),maxPriorityFeePerGas:P1.allowNull(n),maxFeePerGas:P1.allowNull(n),to:P1.allowNull(r),value:P1.allowNull(n),data:P1.allowNull(c),type:P1.allowNull(s),accessList:P1.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:s,blockNumber:s,transactionHash:a,address:r,topics:P1.arrayOf(a),data:i,logIndex:s,blockHash:a},e.receipt={to:P1.allowNull(this.address,null),from:P1.allowNull(this.address,null),contractAddress:P1.allowNull(r,null),transactionIndex:s,root:P1.allowNull(o),gasUsed:n,logsBloom:P1.allowNull(i),blockHash:a,transactionHash:a,logs:P1.arrayOf(this.receiptLog.bind(this)),blockNumber:s,confirmations:P1.allowNull(s,null),cumulativeGasUsed:n,effectiveGasPrice:P1.allowNull(n),status:P1.allowNull(s),type:l},e.block={hash:P1.allowNull(a),parentHash:a,number:s,timestamp:s,nonce:P1.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:P1.allowNull(r),extraData:i,transactions:P1.allowNull(P1.arrayOf(a)),baseFeePerGas:P1.allowNull(n)},e.blockWithTransactions=j0(e.block),e.blockWithTransactions.transactions=P1.allowNull(P1.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:P1.allowNull(u,void 0),toBlock:P1.allowNull(u,void 0),blockHash:P1.allowNull(a,void 0),address:P1.allowNull(r,void 0),topics:P1.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:P1.allowNull(s),blockHash:P1.allowNull(a),transactionIndex:s,removed:P1.allowNull(this.boolean.bind(this)),address:r,data:P1.allowFalsish(i,"0x"),topics:P1.arrayOf(a),transactionHash:a,logIndex:s},e}accessList(e){return Zr(e||[])}number(e){return e==="0x"?0:C1.from(e).toNumber()}type(e){return e==="0x"||e==null?0:C1.from(e).toNumber()}bigNumber(e){return C1.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),W1(e))?e.toLowerCase():Su.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return B0(e)}callAddress(e){if(!W1(e,32))return null;const r=B0(ne(e,12));return r===lA?null:r}contractAddress(e){return Ta(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||W1(e))return e5(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return _6(n)!==32?Su.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=C1.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!W1(e))throw new Error("invalid uint256");return R0(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,u=P1.check(r,e);return u._difficulty=n==null?null:C1.from(n),u}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return P1.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&C1.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=P1.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;W1(n)&&(n=C1.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),W1(n)&&(n=C1.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return vp(e)}receiptLog(e){return P1.check(this.formats.receiptLog,e)}receipt(e){const r=P1.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=C1.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&Su.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Su.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&Su.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return P1.check(this.formats.filter,e)}filterLog(e){return P1.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const u in e)try{const i=e[u](r[u]);i!==void 0&&(n[u]=i)}catch(i){throw i.checkKey=u,i.checkValue=r[u],i}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(u){n.push(e(u))}),n}}}function Ap(t){return t&&typeof t.isCommunityResource=="function"}function ss(t){return Ap(t)&&t.isCommunityResource()}let wf=!1;function n5(){wf||(wf=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var K1=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const r0=new Z(Ie),EC=10;function Ef(t){return t==null?"null":(_6(t)!==32&&r0.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function Cf(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(u=>{r[Ef(u)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return Ef(e)}).join("&")}function CC(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function X2(t){if(typeof t=="string"){if(t=t.toLowerCase(),_6(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+Cf(t);if(nA.isForkEvent(t))throw r0.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+Cf(t.topics||[])}throw new Error("invalid event - "+t)}function Tu(){return new Date().getTime()}function Ff(t){return new Promise(e=>{setTimeout(e,t)})}const FC=["block","network","pending","poll"];class BC{constructor(e,r,n){s1(this,"tag",e),s1(this,"listener",r),s1(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=CC(e[2]),u={};return n.length>0&&(u.topics=n),r&&r!=="*"&&(u.address=r),u}pollable(){return this.tag.indexOf(":")>=0||FC.indexOf(this.tag)>=0}}const DC={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Lo(t){return R0(C1.from(t).toHexString(),32)}function Bf(t){return Gn.encode(I0([t,ne(pt(pt(t)),0,4)]))}const wp=new RegExp("^(ipfs)://(.*)$","i"),Df=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),wp,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function b8(t,e){try{return Yr(Mi(t,e))}catch{}return null}function Mi(t,e){if(t==="0x")return null;const r=C1.from(ne(t,e,e+32)).toNumber(),n=C1.from(ne(t,r,r+32)).toNumber();return ne(t,r+32,r+32+n)}function jo(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):r0.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function _f(t){const e=v1(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 _C(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function Ep(t){const e=[];let r=0;for(let n=0;nC1.from(e).eq(1)).catch(e=>{if(e.code===Z.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return K1(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:$e([e,ft(this.name),r||"0x"])};let u=!1;(yield this.supportsWildcard())&&(u=!0,n.data=$e(["0x9061b923",Ep([Rh(this.name),n.data])]));try{let i=yield this.provider.call(n);return v1(i).length%32===4&&r0.throwError("resolver threw error",Z.errors.CALL_EXCEPTION,{transaction:n,data:i}),u&&(i=Mi(i,0)),i}catch(i){if(i.code===Z.errors.CALL_EXCEPTION)return null;throw i}})}_fetchBytes(e,r){return K1(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?Mi(n,0):null})}_getAddress(e,r){const n=DC[String(e)];if(n==null&&r0.throwError(`unsupported coin type: ${e}`,Z.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const u=v1(r);if(n.p2pkh!=null){const i=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){const a=parseInt(i[1],16);if(i[2].length===a*2&&a>=1&&a<=75)return Bf(I0([[n.p2pkh],"0x"+i[2]]))}}if(n.p2sh!=null){const i=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(i){const a=parseInt(i[1],16);if(i[2].length===a*2&&a>=1&&a<=75)return Bf(I0([[n.p2sh],"0x"+i[2]]))}}if(n.prefix!=null){const i=u[1];let a=u[0];if(a===0?i!==20&&i!==32&&(a=-1):a=-1,a>=0&&u.length===2+i&&i>=1&&i<=75){const o=vf.toWords(u.slice(2));return o.unshift(a),vf.encode(n.prefix,o)}}return null}getAddress(e){return K1(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const u=yield this._fetch("0x3b3b57de");return u==="0x"||u===Dh?null:this.provider.formatter.callAddress(u)}catch(u){if(u.code===Z.errors.CALL_EXCEPTION)return null;throw u}const r=yield this._fetchBytes("0xf1cb7e06",Lo(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&r0.throwError("invalid or unsupported coin data",Z.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return K1(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;na[s])}return r0.throwError("invalid or unsupported content hash data",Z.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return K1(this,void 0,void 0,function*(){let r=z0(e);r=I0([Lo(64),Lo(r.length),r]),r.length%32!==0&&(r=I0([r,R0("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",F1(r));return n==null||n==="0x"?null:Yr(n)})}}let zo=null,kC=1;class La extends R2{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),s1(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=Ce(new.target,"getNetwork")(e);r?(s1(this,"_network",r),this.emit("network",r,null)):r0.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return K1(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||r0.throwError("no network detected",Z.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:s1(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return m2(()=>this._ready().then(e=>e,e=>{if(!(e.code===Z.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return zo==null&&(zo=new P1),zo}static getNetwork(e){return B4(e??"homestead")}ccipReadFetch(e,r,n){return K1(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const u=e.to.toLowerCase(),i=r.toLowerCase(),a=[];for(let o=0;o=0?null:JSON.stringify({data:i,sender:u}),y=yield su({url:l,errorPassThrough:!0},c,(w,_)=>(w.status=_.statusCode,w));if(y.data)return y.data;const v=y.message||"unknown error";if(y.status>=400&&y.status<500)return r0.throwError(`response not found during CCIP fetch: ${v}`,Z.errors.SERVER_ERROR,{url:s,errorMessage:v});a.push(v)}return r0.throwError(`error encountered during CCIP fetch: ${a.map(o=>JSON.stringify(o)).join(", ")}`,Z.errors.SERVER_ERROR,{urls:n,errorMessages:a})})}_getInternalBlockNumber(e){return K1(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const u=this._internalBlockNumber;try{const i=yield u;if(Tu()-i.respTime<=e)return i.blockNumber;break}catch{if(this._internalBlockNumber===u)break}}const r=Tu(),n=X0({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(u=>null,u=>u)}).then(({blockNumber:u,networkError:i})=>{if(i)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),i;const a=Tu();return u=C1.from(u).toNumber(),u{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return K1(this,void 0,void 0,function*(){const e=kC++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(u){this.emit("error",u);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)r0.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",r0.makeError("network block skew detected",Z.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let u=this._emitted.block+1;u<=n;u++)this.emit("block",u);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(u=>{if(u==="block")return;const i=this._emitted[u];i!=="pending"&&n-i>12&&delete this._emitted[u]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(u=>{switch(u.type){case"tx":{const i=u.hash;let a=this.getTransactionReceipt(i).then(o=>(!o||o.blockNumber==null||(this._emitted["t:"+i]=o.blockNumber,this.emit(i,o)),null)).catch(o=>{this.emit("error",o)});r.push(a);break}case"filter":{if(!u._inflight){u._inflight=!0,u._lastBlockNumber===-2&&(u._lastBlockNumber=n-1);const i=u.filter;i.fromBlock=u._lastBlockNumber+1,i.toBlock=n;const a=i.toBlock-this._maxFilterBlockRange;a>i.fromBlock&&(i.fromBlock=a),i.fromBlock<0&&(i.fromBlock=0);const o=this.getLogs(i).then(s=>{u._inflight=!1,s.length!==0&&s.forEach(l=>{l.blockNumber>u._lastBlockNumber&&(u._lastBlockNumber=l.blockNumber),this._emitted["b:"+l.blockHash]=l.blockNumber,this._emitted["t:"+l.transactionHash]=l.blockNumber,this.emit(i,l)})}).catch(s=>{this.emit("error",s),u._inflight=!1});r.push(o)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(u=>{this.emit("error",u)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return K1(this,void 0,void 0,function*(){return r0.throwError("provider does not support network detection",Z.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return K1(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield Ff(0),this._network;const n=r0.makeError("underlying network changed",Z.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=Tu();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return K1(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,u){return K1(this,void 0,void 0,function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=r?i:new Promise((a,o)=>{const s=[];let l=!1;const c=function(){return l?!0:(l=!0,s.forEach(v=>{v()}),!1)},y=v=>{v.confirmations{this.removeListener(e,y)}),u){let v=u.startBlock,w=null;const _=M=>K1(this,void 0,void 0,function*(){l||(yield Ff(1e3),this.getTransactionCount(u.from).then(N=>K1(this,void 0,void 0,function*(){if(!l){if(N<=u.nonce)v=M;else{{const k=yield this.getTransaction(e);if(k&&k.blockNumber!=null)return}for(w==null&&(w=v-3,w{l||this.once("block",_)}))});if(l)return;this.once("block",_),s.push(()=>{this.removeListener("block",_)})}if(typeof n=="number"&&n>0){const v=setTimeout(()=>{c()||o(r0.makeError("timeout exceeded",Z.errors.TIMEOUT,{timeout:n}))},n);v.unref&&v.unref(),s.push(()=>{clearTimeout(v)})}})})}getBlockNumber(){return K1(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return K1(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return C1.from(e)}catch(r){return r0.throwError("bad result from backend",Z.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return K1(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield X0({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),u=yield this.perform("getBalance",n);try{return C1.from(u)}catch(i){return r0.throwError("bad result from backend",Z.errors.SERVER_ERROR,{method:"getBalance",params:n,result:u,error:i})}})}getTransactionCount(e,r){return K1(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield X0({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),u=yield this.perform("getTransactionCount",n);try{return C1.from(u).toNumber()}catch(i){return r0.throwError("bad result from backend",Z.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:u,error:i})}})}getCode(e,r){return K1(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield X0({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),u=yield this.perform("getCode",n);try{return F1(u)}catch(i){return r0.throwError("bad result from backend",Z.errors.SERVER_ERROR,{method:"getCode",params:n,result:u,error:i})}})}getStorageAt(e,r,n){return K1(this,void 0,void 0,function*(){yield this.getNetwork();const u=yield X0({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(a=>e5(a))}),i=yield this.perform("getStorageAt",u);try{return F1(i)}catch(a){return r0.throwError("bad result from backend",Z.errors.SERVER_ERROR,{method:"getStorageAt",params:u,result:i,error:a})}})}_wrapTransaction(e,r,n){if(r!=null&&_6(r)!==32)throw new Error("invalid response - sendTransaction");const u=e;return r!=null&&e.hash!==r&&r0.throwError("Transaction hash mismatch from Provider.sendTransaction.",Z.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),u.wait=(i,a)=>K1(this,void 0,void 0,function*(){i==null&&(i=1),a==null&&(a=0);let o;i!==0&&n!=null&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const s=yield this._waitForTransaction(e.hash,i,a,o);return s==null&&i===0?null:(this._emitted["t:"+e.hash]=s.blockNumber,s.status===0&&r0.throwError("transaction failed",Z.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:s}),s)}),u}sendTransaction(e){return K1(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(i=>F1(i)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const u=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const i=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,i,u)}catch(i){throw i.transaction=n,i.transactionHash=n.hash,i}})}_getTransactionRequest(e){return K1(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(u=>{r[u]!=null&&(n[u]=Promise.resolve(r[u]).then(i=>i?this._getAddress(i):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(u=>{r[u]!=null&&(n[u]=Promise.resolve(r[u]).then(i=>i?C1.from(i):null))}),["type"].forEach(u=>{r[u]!=null&&(n[u]=Promise.resolve(r[u]).then(i=>i??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(u=>{r[u]!=null&&(n[u]=Promise.resolve(r[u]).then(i=>i?F1(i):null))}),this.formatter.transactionRequest(yield X0(n))})}_getFilter(e){return K1(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield X0(r))})}_call(e,r,n){return K1(this,void 0,void 0,function*(){n>=EC&&r0.throwError("CCIP read exceeded maximum redirections",Z.errors.SERVER_ERROR,{redirects:n,transaction:e});const u=e.to,i=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&u!=null&&i.substring(0,10)==="0x556f1830"&&_6(i)%32===4)try{const a=ne(i,4),o=ne(a,0,32);C1.from(o).eq(u)||r0.throwError("CCIP Read sender did not match",Z.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const s=[],l=C1.from(ne(a,32,64)).toNumber(),c=C1.from(ne(a,l,l+32)).toNumber(),y=ne(a,l+32);for(let k=0;kK1(this,void 0,void 0,function*(){const i=yield this.perform("getBlock",u);if(i==null)return u.blockHash!=null&&this._emitted["b:"+u.blockHash]==null||u.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let a=null;for(let s=0;sthis._wrapTransaction(s)),o}return this.formatter.block(i)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return K1(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return m2(()=>K1(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const u=this.formatter.transactionResponse(n);if(u.blockNumber==null)u.confirmations=0;else if(u.confirmations==null){let a=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-u.blockNumber+1;a<=0&&(a=1),u.confirmations=a}return this._wrapTransaction(u)}),{oncePoll:this})})}getTransactionReceipt(e){return K1(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return m2(()=>K1(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const u=this.formatter.receipt(n);if(u.blockNumber==null)u.confirmations=0;else if(u.confirmations==null){let a=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-u.blockNumber+1;a<=0&&(a=1),u.confirmations=a}return u}),{oncePoll:this})})}getLogs(e){return K1(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield X0({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(u=>{u.removed==null&&(u.removed=!1)}),P1.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return K1(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return K1(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&r0.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return K1(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const u=new ls(this,n,e);return r!==e&&!(yield u.supportsWildcard())?null:u}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return K1(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||r0.throwError("network does not support ENS",Z.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const u=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+ft(e).substring(2)});return this.formatter.callAddress(u)}catch{}return null})}resolveName(e){return K1(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(W1(e))throw n}typeof e!="string"&&r0.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return K1(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const u=b8(yield this.call({to:n,data:"0x691f3431"+ft(r).substring(2)}),0);return(yield this.resolveName(u))!=e?null:u})}getAvatar(e){return K1(this,void 0,void 0,function*(){let r=null;if(W1(e)){const i=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(i,"getAvatar");if(!a)return null;r=new ls(this,a,i);try{const o=yield r.getAvatar();if(o)return o.url}catch(o){if(o.code!==Z.errors.CALL_EXCEPTION)throw o}try{const o=b8(yield this.call({to:a,data:"0x691f3431"+ft(i).substring(2)}),0);r=yield this.getResolver(o)}catch(o){if(o.code!==Z.errors.CALL_EXCEPTION)throw o;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return r0.throwError(e+" not implemented",Z.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const u=new BC(X2(e),r,n);return this._events.push(u),this._startEvent(u),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,u=[],i=X2(e);return this._events=this._events.filter(a=>a.tag!==i?!0:(setTimeout(()=>{a.listener.apply(this,r)},0),n=!0,a.once?(u.push(a),!1):!0)),u.forEach(a=>{this._stopEvent(a)}),n}listenerCount(e){if(!e)return this._events.length;let r=X2(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=X2(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let u=!1,i=X2(e);return this._events=this._events.filter(a=>a.tag!==i||a.listener!=r||u?!0:(u=!0,n.push(a),!1)),n.forEach(a=>{this._stopEvent(a)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=X2(e);this._events=this._events.filter(u=>u.tag!==n?!0:(r.push(u),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}const SC="abstract-signer/5.7.0";var Rt=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const At=new Z(SC),TC=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],PC=[Z.errors.INSUFFICIENT_FUNDS,Z.errors.NONCE_EXPIRED,Z.errors.REPLACEMENT_UNDERPRICED];class j2{constructor(){At.checkAbstract(new.target,j2),s1(this,"_isSigner",!0)}getBalance(e){return Rt(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Rt(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Rt(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield X0(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Rt(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield X0(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Rt(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return Rt(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Rt(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Rt(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Rt(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)TC.indexOf(n)===-1&&At.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=j0(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&At.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Rt(this,void 0,void 0,function*(){const r=yield X0(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(u=>Rt(this,void 0,void 0,function*(){if(u==null)return null;const i=yield this.resolveName(u);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",u),i})),r.to.catch(u=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?At.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&At.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const u=yield this.getFeeData();if(r.type==null)if(u.maxFeePerGas!=null&&u.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const i=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=i,r.maxPriorityFeePerGas=i}else r.maxFeePerGas==null&&(r.maxFeePerGas=u.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=u.maxPriorityFeePerGas);else u.gasPrice!=null?(n&&At.throwError("network does not support EIP-1559",Z.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=u.gasPrice),r.type=0):At.throwError("failed to get consistent fee data",Z.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=u.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=u.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(u=>{if(PC.indexOf(u.code)>=0)throw u;return At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Z.errors.UNPREDICTABLE_GAS_LIMIT,{error:u,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(u=>(u[1]!==0&&u[0]!==u[1]&&At.throwArgumentError("chainId address mismatch","transaction",e),u[0])),yield X0(r)})}_checkProvider(e){this.provider||At.throwError("missing provider",Z.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class L4 extends j2{constructor(e,r){super(),s1(this,"address",e),s1(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{At.throwError(e,Z.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new L4(this.address,e)}}var L6=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const ae=new Z(Ie),NC=["call","estimateGas"];function ei(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=W1(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=ei(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return ei(JSON.parse(t),e)}catch{}return null}function Cp(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const i=ei(e,!0);if(i)return i.data;ae.throwError("missing revert data in call exception; Transaction reverted without a reason string",Z.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let i=ei(e.body,!1);i==null&&(i=ei(e,!1)),i&&ae.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Z.errors.UNPREDICTABLE_GAS_LIMIT,{reason:i.message,method:t,transaction:n,error:e})}let u=e.message;throw e.code===Z.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?u=e.error.message:typeof e.body=="string"?u=e.body:typeof e.responseText=="string"&&(u=e.responseText),u=(u||"").toLowerCase(),u.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&ae.throwError("insufficient funds for intrinsic transaction cost",Z.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),u.match(/nonce (is )?too low/i)&&ae.throwError("nonce has already been used",Z.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),u.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&ae.throwError("replacement fee too low",Z.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),u.match(/only replay-protected/i)&&ae.throwError("legacy pre-eip-155 transactions not supported",Z.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),NC.indexOf(t)>=0&&u.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&ae.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Z.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function kf(t){return new Promise(function(e){setTimeout(e,t)})}function MC(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function Pu(t){return t&&t.toLowerCase()}const fs={};class j4 extends j2{constructor(e,r,n){if(super(),e!==fs)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");s1(this,"provider",r),n==null&&(n=0),typeof n=="string"?(s1(this,"_address",this.provider.formatter.address(n)),s1(this,"_index",null)):typeof n=="number"?(s1(this,"_index",n),s1(this,"_address",null)):ae.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return ae.throwError("cannot alter JSON-RPC Signer connection",Z.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new UC(fs,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&ae.throwError("unknown account #"+this._index,Z.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=j0(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=j0(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>L6(this,void 0,void 0,function*(){if(n==null)return null;const u=yield this.provider.resolveName(n);return u==null&&ae.throwArgumentError("provided ENS name resolves to null","tx.to",n),u}))),X0({tx:X0(e),sender:r}).then(({tx:n,sender:u})=>{n.from!=null?n.from.toLowerCase()!==u&&ae.throwArgumentError("from address mismatch","transaction",e):n.from=u;const i=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then(a=>a,a=>(typeof a.message=="string"&&a.message.match(/user denied/i)&&ae.throwError("user rejected transaction",Z.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Cp("sendTransaction",a,i)))})}signTransaction(e){return ae.throwError("signing transactions is unsupported",Z.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return L6(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield m2(()=>L6(this,void 0,void 0,function*(){const u=yield this.provider.getTransaction(n);if(u!==null)return this.provider._wrapTransaction(u,n,r)}),{oncePoll:this.provider})}catch(u){throw u.transactionHash=n,u}})}signMessage(e){return L6(this,void 0,void 0,function*(){const r=typeof e=="string"?z0(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[F1(r),n.toLowerCase()])}catch(u){throw typeof u.message=="string"&&u.message.match(/user denied/i)&&ae.throwError("user rejected signing",Z.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),u}})}_legacySignMessage(e){return L6(this,void 0,void 0,function*(){const r=typeof e=="string"?z0(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),F1(r)])}catch(u){throw typeof u.message=="string"&&u.message.match(/user denied/i)&&ae.throwError("user rejected signing",Z.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),u}})}_signTypedData(e,r,n){return L6(this,void 0,void 0,function*(){const u=yield Ee.resolveNames(e,r,n,a=>this.provider.resolveName(a)),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(Ee.getPayload(u.domain,r,u.value))])}catch(a){throw typeof a.message=="string"&&a.message.match(/user denied/i)&&ae.throwError("user rejected signing",Z.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:u.domain,types:r,value:u.value}}),a}})}unlock(e){return L6(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class UC extends j4{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const OC={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class je extends La{constructor(e,r){let n=r;n==null&&(n=new Promise((u,i)=>{setTimeout(()=>{this.detectNetwork().then(a=>{u(a)},a=>{i(a)})},0)})),super(n),e||(e=Ce(this.constructor,"defaultUrl")()),typeof e=="string"?s1(this,"connection",Object.freeze({url:e})):s1(this,"connection",Object.freeze(j0(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return L6(this,void 0,void 0,function*(){yield kf(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=Ce(this.constructor,"getNetwork");try{return r(C1.from(e).toNumber())}catch(n){return ae.throwError("could not detect network",Z.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return ae.throwError("could not detect network",Z.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new j4(fs,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Ke(n),provider:this});const u=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(u&&this._cache[e])return this._cache[e];const i=su(this.connection,JSON.stringify(n),MC).then(a=>(this.emit("debug",{action:"response",request:n,response:a,provider:this}),a),a=>{throw this.emit("debug",{action:"response",error:a,request:n,provider:this}),a});return u&&(this._cache[e]=i,setTimeout(()=>{this._cache[e]=null},0)),i}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Pu(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Pu(r.address),r.blockTag]];case"getCode":return["eth_getCode",[Pu(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Pu(r.address),R0(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[Ce(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[Ce(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=Pu(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return L6(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const u=r.transaction;if(u&&u.type!=null&&C1.from(u.type).isZero()&&u.maxFeePerGas==null&&u.maxPriorityFeePerGas==null){const i=yield this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=j0(r),r.transaction=j0(u),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&ae.throwError(e+" not implemented",Z.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(u){return Cp(e,u,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function u(){e.send("eth_getFilterChanges",[n]).then(function(i){if(e._pendingFilter!=r)return null;let a=Promise.resolve();return i.forEach(function(o){e._emitted["t:"+o.toLowerCase()]="pending",a=a.then(function(){return e.getTransaction(o).then(function(s){return e.emit("pending",s),null})})}),a.then(function(){return kf(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){u()},0),null}).catch(i=>{})}return u(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=j0(OC);if(r)for(const i in r)r[i]&&(n[i]=!0);F4(e,n);const u={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(i){if(e[i]==null)return;const a=e5(C1.from(e[i]));i==="gasLimit"&&(i="gas"),u[i]=a}),["from","to","data"].forEach(function(i){e[i]!=null&&(u[i]=F1(e[i]))}),e.accessList&&(u.accessList=Zr(e.accessList)),u}}let ti=null;try{if(ti=WebSocket,ti==null)throw new Error("inject please")}catch{const e=new Z(Ie);ti=function(){e.throwError("WebSockets not supported in this environment",Z.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var $o=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const T5=new Z(Ie);let IC=1;class ja extends je{constructor(e,r){r==="any"&&T5.throwError("WebSocketProvider does not support 'any' network yet",Z.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,r):super("_websocket",r),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?s1(this,"_websocket",new ti(this.connection.url)):s1(this,"_websocket",e),s1(this,"_requests",{}),s1(this,"_subs",{}),s1(this,"_subIds",{}),s1(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(u=>{this.websocket.send(this._requests[u].payload)})},this.websocket.onmessage=u=>{const i=u.data,a=JSON.parse(i);if(a.id!=null){const o=String(a.id),s=this._requests[o];if(delete this._requests[o],a.result!==void 0)s.callback(null,a.result),this.emit("debug",{action:"response",request:JSON.parse(s.payload),response:a.result,provider:this});else{let l=null;a.error?(l=new Error(a.error.message||"unknown error"),s1(l,"code",a.error.code||null),s1(l,"response",i)):l=new Error("unknown error"),s.callback(l,void 0),this.emit("debug",{action:"response",error:l,request:JSON.parse(s.payload),provider:this})}}else if(a.method==="eth_subscription"){const o=this._subs[a.params.subscription];o&&o.processFunc(a.params.result)}else console.warn("this should not happen")};const n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){T5.throwError("cannot reset events block on WebSocketProvider",Z.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){T5.throwError("cannot set polling interval on WebSocketProvider",Z.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return $o(this,void 0,void 0,function*(){return null})}set polling(e){e&&T5.throwError("cannot set polling on WebSocketProvider",Z.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,r){const n=IC++;return new Promise((u,i)=>{function a(s,l){return s?i(s):u(l)}const o=JSON.stringify({method:e,params:r,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:a,payload:o},this._wsReady&&this.websocket.send(o)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,r,n){return $o(this,void 0,void 0,function*(){let u=this._subIds[e];u==null&&(u=Promise.all(r).then(a=>this.send("eth_subscribe",a)),this._subIds[e]=u);const i=yield u;this._subs[i]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],r=>{const n=C1.from(r.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],r=>{this.emit("pending",r)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],r=>{r.removed==null&&(r.removed=!1),this.emit(e.filter,this.formatter.filterLog(r))});break;case"tx":{const r=n=>{const u=n.hash;this.getTransactionReceipt(u).then(i=>{i&&this.emit(u,i)})};r(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(u=>u.type==="tx").forEach(r)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let r=e.tag;if(e.type==="tx"){if(this._events.filter(u=>u.type==="tx").length)return;r="tx"}else if(this.listenerCount(e.event))return;const n=this._subIds[r];n&&(delete this._subIds[r],n.then(u=>{this._subs[u]&&(delete this._subs[u],this.send("eth_unsubscribe",[u]))}))}destroy(){return $o(this,void 0,void 0,function*(){this.websocket.readyState===ti.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}}var RC=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const Lu=new Z(Ie);class Fp extends je{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return RC(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||Lu.throwError("no network detected",Z.errors.UNKNOWN_ERROR,{}),this._network==null&&(s1(this,"_network",r),this.emit("network",r,null))),r})}}class ar extends Fp{constructor(e,r){Lu.checkAbstract(new.target,ar),e=Ce(new.target,"getNetwork")(e),r=Ce(new.target,"getApiKey")(r);const n=Ce(new.target,"getUrl")(e,r);super(n,e),typeof r=="string"?s1(this,"apiKey",r):r!=null&&Object.keys(r).forEach(u=>{s1(this,u,r[u])})}_startPending(){Lu.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return Lu.throwError("API provider does not support signing",Z.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,r){return Lu.throwError("not implemented; sub-classes must override getUrl",Z.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const Sf=new Z(Ie),m8="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class Bp extends ja{constructor(e,r){const n=new z4(e,r),u=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(u,n.network),s1(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===m8}}class z4 extends ar{static getWebSocketProvider(e,r){return new Bp(e,r)}static getApiKey(e){return e==null?m8:(e&&typeof e!="string"&&Sf.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,r){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:Sf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+r,throttleCallback:(u,i)=>(r===m8&&n5(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===m8}}const LC=new Z(Ie),P5="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function jC(t){switch(t){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return LC.throwArgumentError("unsupported network","name",t)}class Dp extends ar{isCommunityResource(){return this.apiKey===P5}static getApiKey(e){return e??P5}static getUrl(e,r){r==null&&(r=P5);const n={allowGzip:!0,url:"https://"+jC(e.name)+r,throttleCallback:(u,i)=>(r.apiKey===P5&&n5(),Promise.resolve(!0))};return r.projectSecret!=null&&(n.user="",n.password=r.projectSecret),n}}var zC=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const Tf=new Z(Ie);class _p extends ar{static getApiKey(e){return e!=null&&Tf.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,r){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:Tf.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,r){const n=Object.create(null,{perform:{get:()=>super.perform}});return zC(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,r)})}}var N5=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const Ar=new Z(Ie);function Pf(t){const e={};for(let r in t){if(t[r]==null)continue;let n=t[r];r==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?n=e5(F1(n)):r==="accessList"?n="["+Zr(n).map(u=>`{address:"${u.address}",storageKeys:["${u.storageKeys.join('","')}"]}`).join(",")+"]":n=F1(n),e[r]=n)}return e}function $C(t){if(t.status==0&&(t.message==="No records found"||t.message==="No transactions found"))return t.result;if(t.status!=1||typeof t.message!="string"||!t.message.match(/^OK/)){const e=new Error("invalid response");throw e.result=JSON.stringify(t),(t.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return t.result}function Nf(t){if(t&&t.status==0&&t.message=="NOTOK"&&(t.result||"").toLowerCase().indexOf("rate limit")>=0){const e=new Error("throttled response");throw e.result=JSON.stringify(t),e.throttleRetry=!0,e}if(t.jsonrpc!="2.0"){const e=new Error("invalid response");throw e.result=JSON.stringify(t),e}if(t.error){const e=new Error(t.error.message||"unknown error");throw t.error.code&&(e.code=t.error.code),t.error.data&&(e.data=t.error.data),e}return t.result}function Mf(t){if(t==="pending")throw new Error("pending not supported");return t==="latest"?t:parseInt(t.substring(2),16)}function qo(t,e,r){if(t==="call"&&e.code===Z.errors.SERVER_ERROR){const u=e.error;if(u&&(u.message.match(/reverted/i)||u.message.match(/VM execution error/i))){let i=u.data;if(i&&(i="0x"+i.replace(/^.*0x/i,"")),W1(i))return i;Ar.throwError("missing revert data in call exception",Z.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===Z.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Ar.throwError("insufficient funds for intrinsic transaction cost",Z.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Ar.throwError("nonce has already been used",Z.errors.NONCE_EXPIRED,{error:e,method:t,transaction:r}),n.match(/another transaction with same nonce/)&&Ar.throwError("replacement fee too low",Z.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&Ar.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Z.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:r}),e}class kp extends La{constructor(e,r){super(e),s1(this,"baseUrl",this.getBaseUrl()),s1(this,"apiKey",r||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return Ar.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,r){const n=Object.keys(r).reduce((i,a)=>{const o=r[a];return o!=null&&(i+=`&${a}=${o}`),i},""),u=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${u}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,r){return r.module=e,r.apikey=this.apiKey,r}fetch(e,r,n){return N5(this,void 0,void 0,function*(){const u=n?this.getPostUrl():this.getUrl(e,r),i=n?this.getPostData(e,r):null,a=e==="proxy"?Nf:$C;this.emit("debug",{action:"request",request:u,provider:this});const o={url:u,throttleSlotInterval:1e3,throttleCallback:(c,y)=>(this.isCommunityResource()&&n5(),Promise.resolve(!0))};let s=null;i&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},s=Object.keys(i).map(c=>`${c}=${i[c]}`).join("&"));const l=yield su(o,s,a||Nf);return this.emit("debug",{action:"response",request:u,response:Ke(l),provider:this}),l})}detectNetwork(){return N5(this,void 0,void 0,function*(){return this.network})}perform(e,r){const n=Object.create(null,{perform:{get:()=>super.perform}});return N5(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:r.address,tag:r.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:r.address,tag:r.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:r.address,tag:r.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:r.address,position:r.position,tag:r.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:r.signedTransaction},!0).catch(u=>qo("sendTransaction",u,r.signedTransaction));case"getBlock":if(r.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:r.blockTag,boolean:r.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:r.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:r.transactionHash});case"call":{if(r.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const u=Pf(r.transaction);u.module="proxy",u.action="eth_call";try{return yield this.fetch("proxy",u,!0)}catch(i){return qo("call",i,r.transaction)}}case"estimateGas":{const u=Pf(r.transaction);u.module="proxy",u.action="eth_estimateGas";try{return yield this.fetch("proxy",u,!0)}catch(i){return qo("estimateGas",i,r.transaction)}}case"getLogs":{const u={action:"getLogs"};if(r.filter.fromBlock&&(u.fromBlock=Mf(r.filter.fromBlock)),r.filter.toBlock&&(u.toBlock=Mf(r.filter.toBlock)),r.filter.address&&(u.address=r.filter.address),r.filter.topics&&r.filter.topics.length>0&&(r.filter.topics.length>1&&Ar.throwError("unsupported topic count",Z.errors.UNSUPPORTED_OPERATION,{topics:r.filter.topics}),r.filter.topics.length===1)){const o=r.filter.topics[0];(typeof o!="string"||o.length!==66)&&Ar.throwError("unsupported topic format",Z.errors.UNSUPPORTED_OPERATION,{topic0:o}),u.topic0=o}const i=yield this.fetch("logs",u);let a={};for(let o=0;o{["contractAddress","to"].forEach(function(s){a[s]==""&&delete a[s]}),a.creates==null&&a.contractAddress!=null&&(a.creates=a.contractAddress);const o=this.formatter.transactionResponse(a);return a.timeStamp&&(o.timestamp=parseInt(a.timeStamp)),o})})}isCommunityResource(){return this.apiKey==null}}const qC="random/5.7.0",cs=new Z(qC);function HC(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const Uf=HC();let y8=Uf.crypto||Uf.msCrypto;(!y8||!y8.getRandomValues)&&(cs.warn("WARNING: Missing strong random number source"),y8={getRandomValues:function(t){return cs.throwError("no secure random source avaialble",Z.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function vn(t){(t<=0||t>1024||t%1||t!=t)&&cs.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return y8.getRandomValues(e),v1(e)}function Sp(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}const KC=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:vn,shuffled:Sp},Symbol.toStringTag,{value:"Module"}));var ea=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const f2=new Z(Ie);function M5(){return new Date().getTime()}function Of(t){let e=null;for(let r=0;re?null:(n+u)/2}function An(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(C1.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>An(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=An(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let GC=1;function Rf(t){let e=null,r=null,n=new Promise(a=>{e=function(){r&&(clearTimeout(r),r=null),a()},r=setTimeout(e,t)});const u=a=>(n=n.then(a),n);function i(){return n}return{cancel:e,getPromise:i,wait:u}}const VC=[Z.errors.CALL_EXCEPTION,Z.errors.INSUFFICIENT_FUNDS,Z.errors.NONCE_EXPIRED,Z.errors.REPLACEMENT_UNDERPRICED,Z.errors.UNPREDICTABLE_GAS_LIMIT],WC=["address","args","errorArgs","errorSignature","method","transaction"];function U5(t,e){const r={weight:t.weight};return Object.defineProperty(r,"provider",{get:()=>t.provider}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function QC(t,e){return function(r){const n={};r.forEach(i=>{const a=t(i.result);n[a]||(n[a]={count:0,result:i.result}),n[a].count++});const u=Object.keys(n);for(let i=0;i=e)return a.result}}}function JC(t,e,r){let n=An;switch(e){case"getBlockNumber":return function(u){const i=u.map(o=>o.result);let a=If(u.map(o=>o.result),2);if(a!=null)return a=Math.ceil(a),i.indexOf(a+1)>=0&&a++,a>=t._highestBlockNumber&&(t._highestBlockNumber=a),t._highestBlockNumber};case"getGasPrice":return function(u){const i=u.map(a=>a.result);return i.sort(),i[Math.floor(i.length/2)]};case"getEtherPrice":return function(u){return If(u.map(i=>i.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(u){return u==null?null:(u=j0(u),u.confirmations=-1,An(u))};break;case"getBlock":r.includeTransactions?n=function(u){return u==null?null:(u=j0(u),u.transactions=u.transactions.map(i=>(i=j0(i),i.confirmations=-1,i)),An(u))}:n=function(u){return u==null?null:An(u)};break;default:throw new Error("unknown method: "+e)}return QC(n,t.quorum)}function Nu(t,e){return ea(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:m2(()=>new Promise((n,u)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function YC(t,e,r,n){return ea(this,void 0,void 0,function*(){let u=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return u[r]();case"getEtherPrice":if(u.getEtherPrice)return u.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&W1(n.blockTag)&&(u=yield Nu(t,e)),u[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&W1(n.blockTag)&&(u=yield Nu(t,e)),u.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&W1(n.blockTag)&&(u=yield Nu(t,e)),u[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&W1(n.blockTag)&&(u=yield Nu(t,e)),r==="call"&&n.blockTag?u[r](n.transaction,n.blockTag):u[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return u[r](n.transactionHash);case"getLogs":{let i=n.filter;return(i.fromBlock&&W1(i.fromBlock)||i.toBlock&&W1(i.toBlock))&&(u=yield Nu(t,e)),u.getLogs(i)}}return f2.throwError("unknown method error",Z.errors.UNKNOWN_ERROR,{method:r,params:n})})}class Tp extends La{constructor(e,r){e.length===0&&f2.throwArgumentError("missing providers","providers",e);const n=e.map((a,o)=>{if(R2.isProvider(a)){const c=ss(a)?2e3:750;return Object.freeze({provider:a,weight:1,stallTimeout:c,priority:1})}const s=j0(a);s.priority==null&&(s.priority=1),s.stallTimeout==null&&(s.stallTimeout=ss(a)?2e3:750),s.weight==null&&(s.weight=1);const l=s.weight;return(l%1||l>512||l<1)&&f2.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${o}].weight`,l),Object.freeze(s)}),u=n.reduce((a,o)=>a+o.weight,0);r==null?r=u/2:r>u&&f2.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let i=Of(n.map(a=>a.provider.network));i==null&&(i=new Promise((a,o)=>{setTimeout(()=>{this.detectNetwork().then(a,o)},0)})),super(i),s1(this,"providerConfigs",Object.freeze(n)),s1(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return ea(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return Of(e)})}perform(e,r){return ea(this,void 0,void 0,function*(){if(e==="sendTransaction"){const s=yield Promise.all(this.providerConfigs.map(l=>l.provider.sendTransaction(r.signedTransaction).then(c=>c.hash,c=>c)));for(let l=0;ls.priority-l.priority);const i=this._highestBlockNumber;let a=0,o=!0;for(;;){const s=M5();let l=u.filter(w=>w.runner&&s-w.startw+_.weight,0);for(;l{w.staller=null}),w.runner=YC(w,i,e,r).then(M=>{w.done=!0,w.result=M,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:_,backend:U5(w,M5()),request:{method:e,params:Ke(r)},provider:this})},M=>{w.done=!0,w.error=M,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:_,backend:U5(w,M5()),request:{method:e,params:Ke(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:_,backend:U5(w,null),request:{method:e,params:Ke(r)},provider:this}),l+=w.weight}const c=[];u.forEach(w=>{w.done||!w.runner||(c.push(w.runner),w.staller&&c.push(w.staller.getPromise()))}),c.length&&(yield Promise.race(c));const y=u.filter(w=>w.done&&w.error==null);if(y.length>=this.quorum){const w=n(y);if(w!==void 0)return u.forEach(_=>{_.staller&&_.staller.cancel(),_.cancelled=!0}),w;o||(yield Rf(100).getPromise()),o=!1}const v=u.reduce((w,_)=>{if(!_.done||_.error==null)return w;const M=_.error.code;return VC.indexOf(M)>=0&&(w[M]||(w[M]={error:_.error,weight:0}),w[M].weight+=_.weight),w},{});if(Object.keys(v).forEach(w=>{const _=v[w];if(_.weight{k.staller&&k.staller.cancel(),k.cancelled=!0});const M=_.error,N={};WC.forEach(k=>{M[k]!=null&&(N[k]=M[k])}),f2.throwError(M.reason||M.message,w,N)}),u.filter(w=>!w.done).length===0)break}return u.forEach(s=>{s.staller&&s.staller.cancel(),s.cancelled=!0}),f2.throwError("failed to meet quorum",Z.errors.SERVER_ERROR,{method:e,params:r,results:u.map(s=>U5(s)),provider:this})})}}const Pp=null,g8=new Z(Ie),ju="84842078b09946638c03157f83405213";class Np extends ja{constructor(e,r){const n=new $4(e,r),u=n.connection;u.password&&g8.throwError("INFURA WebSocket project secrets unsupported",Z.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});const i=u.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(i,e),s1(this,"apiKey",n.projectId),s1(this,"projectId",n.projectId),s1(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===ju}}class $4 extends ar{static getWebSocketProvider(e,r){return new Np(e,r)}static getApiKey(e){const r={apiKey:ju,projectId:ju,projectSecret:null};return e==null||(typeof e=="string"?r.projectId=e:e.projectSecret!=null?(g8.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),g8.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),r.projectId=e.projectId,r.projectSecret=e.projectSecret):e.projectId&&(r.projectId=e.projectId),r.apiKey=r.projectId),r}static getUrl(e,r){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:g8.throwError("unsupported network",Z.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const u={allowGzip:!0,url:"https://"+n+"/v3/"+r.projectId,throttleCallback:(i,a)=>(r.projectId===ju&&n5(),Promise.resolve(!0))};return r.projectSecret!=null&&(u.user="",u.password=r.projectSecret),u}isCommunityResource(){return this.projectId===ju}}class XC extends je{send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);const u={request:n,resolve:null,reject:null},i=new Promise((a,o)=>{u.resolve=a,u.reject=o});return this._pendingBatch.push(u),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{const a=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const o=a.map(s=>s.request);return this.emit("debug",{action:"requestBatch",request:Ke(o),provider:this}),su(this.connection,JSON.stringify(o)).then(s=>{this.emit("debug",{action:"response",request:o,response:s,provider:this}),a.forEach((l,c)=>{const y=s[c];if(y.error){const v=new Error(y.error.message);v.code=y.error.code,v.data=y.error.data,l.reject(v)}else l.resolve(y.result)})},s=>{this.emit("debug",{action:"response",error:s,request:o,provider:this}),a.forEach(l=>{l.reject(s)})})},10)),i}}const Ho=new Z(Ie),ZC="ETHERS_JS_SHARED";class Mp extends ar{static getApiKey(e){return e&&typeof e!="string"&&Ho.throwArgumentError("invalid apiKey","apiKey",e),e||ZC}static getUrl(e,r){Ho.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Ho.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+r}}const Lf=new Z(Ie),jf="62e1ad51b37b8e00394bda3b";class Up extends ar{static getApiKey(e){const r={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?r.applicationId=jf:typeof e=="string"?r.applicationId=e:e.applicationSecretKey!=null?(r.applicationId=e.applicationId,r.applicationSecretKey=e.applicationSecretKey):e.applicationId?r.applicationId=e.applicationId:Lf.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),r}static getUrl(e,r){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:Lf.throwError("unsupported network",Z.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const u=`https://${n}/v1/lb/${r.applicationId}`,i={headers:{},url:u};return r.applicationSecretKey!=null&&(i.user="",i.password=r.applicationSecretKey),i}isCommunityResource(){return this.applicationId===jf}}const zf=new Z(Ie);let eF=1;function $f(t,e){const r="Web3LegacyFetcher";return function(n,u){const i={method:n,params:u,id:eF++,jsonrpc:"2.0"};return new Promise((a,o)=>{this.emit("debug",{action:"request",fetcher:r,request:Ke(i),provider:this}),e(i,(s,l)=>{if(s)return this.emit("debug",{action:"response",fetcher:r,error:s,request:i,provider:this}),o(s);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:l,provider:this}),l.error){const c=new Error(l.error.message);return c.code=l.error.code,c.data=l.error.data,o(c)}a(l.result)})})}}function tF(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Ke(n),provider:this}),t.request(n).then(u=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:u,provider:this}),u),u=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:u,provider:this}),u})}}class Op extends je{constructor(e,r){e==null&&zf.throwArgumentError("missing provider","provider",e);let n=null,u=null,i=null;typeof e=="function"?(n="unknown:",u=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),i=e,e.request?(n===""&&(n="eip-1193:"),u=tF(e)):e.sendAsync?u=$f(e,e.sendAsync.bind(e)):e.send?u=$f(e,e.send.bind(e)):zf.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),s1(this,"jsonRpcFetchFunc",u),s1(this,"provider",i)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const qf=new Z(Ie);function rF(t,e){if(t==null&&(t="homestead"),typeof t=="string"){const n=t.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new je(t);case"ws":case"wss":return new ja(t);default:qf.throwArgumentError("unsupported URL scheme","network",t)}}const r=B4(t);return(!r||!r._defaultProvider)&&qf.throwError("unsupported getDefaultProvider network",Z.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:t}),r._defaultProvider({FallbackProvider:Tp,AlchemyProvider:z4,AnkrProvider:Dp,CloudflareProvider:_p,EtherscanProvider:kp,InfuraProvider:$4,JsonRpcProvider:je,NodesmithProvider:Mp,PocketProvider:Up,Web3Provider:Op,IpcProvider:Pp},e)}const nF=Object.freeze(Object.defineProperty({__proto__:null,AlchemyProvider:z4,AlchemyWebSocketProvider:Bp,AnkrProvider:Dp,BaseProvider:La,CloudflareProvider:_p,EtherscanProvider:kp,FallbackProvider:Tp,Formatter:P1,InfuraProvider:$4,InfuraWebSocketProvider:Np,IpcProvider:Pp,JsonRpcBatchProvider:XC,JsonRpcProvider:je,JsonRpcSigner:j4,NodesmithProvider:Mp,PocketProvider:Up,Provider:R2,Resolver:ls,StaticJsonRpcProvider:Fp,UrlJsonRpcProvider:ar,Web3Provider:Op,WebSocketProvider:ja,getDefaultProvider:rF,getNetwork:B4,isCommunityResourcable:Ap,isCommunityResource:ss,showThrottleMessage:n5},Symbol.toStringTag,{value:"Module"})),uF=P0(nF);var iF=f0&&f0.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var u=Object.getOwnPropertyDescriptor(e,r);(!u||("get"in u?!e.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,u)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),aF=f0&&f0.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),oF=f0&&f0.__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)&&iF(e,t,r);return aF(e,t),e},sF=f0&&f0.__awaiter||function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(W6,"__esModule",{value:!0});W6.getPriorityConnector=W6.getSelectedConnector=W6.initializeConnector=void 0;const lF=uh,wn=n1,Hf=Eh,fF=Wv;let Mn;function cF(){return sF(this,void 0,void 0,function*(){if(Mn===void 0)try{const{Web3Provider:t}=yield Promise.resolve().then(()=>oF(uF));Mn=t}catch{console.debug("@ethersproject/providers not available"),Mn=null}})}function dF(t){const[e,r]=(0,lF.createWeb3ReactStoreAndActions)(),n=t(r),u=xF(e),i=vF(u),a=AF(n,u,i);return[n,Object.assign(Object.assign(Object.assign({},u),i),a),e]}W6.initializeConnector=dF;function hF({chainId:t,accounts:e,activating:r}){return!!(t&&e&&!r)}function Ip(...t){function e(y){const v=t.findIndex(([w])=>y===w);if(v===-1)throw new Error("Connector not found");return v}function r(y){const v=t[e(y)][2];if(!v)throw new Error("Stores not passed");return v}function n(y){return t.map(([,{useChainId:w}])=>w())[e(y)]}function u(y){return t.map(([,{useAccounts:w}])=>w())[e(y)]}function i(y){return t.map(([,{useIsActivating:w}])=>w())[e(y)]}function a(y){return t.map(([,{useAccount:w}])=>w())[e(y)]}function o(y){return t.map(([,{useIsActive:w}])=>w())[e(y)]}function s(y,v){const w=e(y);return t.map(([,{useProvider:M}],N)=>M(v,N===w))[w]}function l(y,v){const w=e(y);return t.map(([,{useENSNames:M}],N)=>M(N===w?v:void 0))[w]}function c(y,v){const w=e(y);return t.map(([,{useENSName:M}],N)=>M(N===w?v:void 0))[w]}return{useSelectedStore:r,useSelectedChainId:n,useSelectedAccounts:u,useSelectedIsActivating:i,useSelectedAccount:a,useSelectedIsActive:o,useSelectedProvider:s,useSelectedENSNames:l,useSelectedENSName:c}}W6.getSelectedConnector=Ip;function pF(...t){const{useSelectedStore:e,useSelectedChainId:r,useSelectedAccounts:n,useSelectedIsActivating:u,useSelectedAccount:i,useSelectedIsActive:a,useSelectedProvider:o,useSelectedENSNames:s,useSelectedENSName:l}=Ip(...t);function c(){const $=t.map(([,{useIsActive:Y}])=>Y()).findIndex(Y=>Y);return t[$===-1?0:$][0]}function y(){return e(c())}function v(){return r(c())}function w(){return n(c())}function _(){return u(c())}function M(){return i(c())}function N(){return a(c())}function k(z){return o(c(),z)}function C(z){return s(c(),z)}function T(z){return l(c(),z)}return{useSelectedStore:e,useSelectedChainId:r,useSelectedAccounts:n,useSelectedIsActivating:u,useSelectedAccount:i,useSelectedIsActive:a,useSelectedProvider:o,useSelectedENSNames:s,useSelectedENSName:l,usePriorityConnector:c,usePriorityStore:y,usePriorityChainId:v,usePriorityAccounts:w,usePriorityIsActivating:_,usePriorityAccount:M,usePriorityIsActive:N,usePriorityProvider:k,usePriorityENSNames:C,usePriorityENSName:T}}W6.getPriorityConnector=pF;const bF=({chainId:t})=>t,mF=({accounts:t})=>t,yF=({activating:t})=>t,gF=(t,e)=>t===void 0&&e===void 0||t!==void 0&&t.length===(e==null?void 0:e.length)&&t.every((r,n)=>r===e[n]);function xF(t){function e(){return(0,Hf.useStore)(t,bF)}function r(){return(0,fF.useStoreWithEqualityFn)(t,mF,gF)}function n(){return(0,Hf.useStore)(t,yF)}return{useChainId:e,useAccounts:r,useIsActivating:n}}function vF({useChainId:t,useAccounts:e,useIsActivating:r}){function n(){var i;return(i=e())===null||i===void 0?void 0:i[0]}function u(){const i=t(),a=e(),o=r();return hF({chainId:i,accounts:a,activating:o})}return{useAccount:n,useIsActive:u}}function Kf(t,e=[]){const[r,n]=(0,wn.useState)();return(0,wn.useEffect)(()=>{if(t&&e.length){let u=!1;return Promise.all(e.map(i=>t.lookupAddress(i))).then(i=>{u||n(i)}).catch(i=>{u||(console.debug("Could not fetch ENS names",i),n(new Array(e.length).fill(null)))}),()=>{u=!0,n(void 0)}}},[t,e]),r??new Array(e.length).fill(void 0)}function AF(t,{useAccounts:e,useChainId:r},{useAccount:n,useIsActive:u}){function i(s,l=!0){const c=u(),y=r(),[v,w]=(0,wn.useState)(Mn!==void 0);return(0,wn.useEffect)(()=>{if(v)return;let _=!1;return cF().then(()=>{_||w(!0)}),()=>{_=!0}},[v]),(0,wn.useMemo)(()=>{if(l){if(t.customProvider)return t.customProvider;if(Mn&&t.provider)return new Mn(t.provider,s)}},[v,l,c,y,s])}function a(s){const l=e();return Kf(s,l)}function o(s){var l;const c=n(),y=(0,wn.useMemo)(()=>c===void 0?void 0:[c],[c]);return(l=Kf(s,y))===null||l===void 0?void 0:l[0]}return{useProvider:i,useENSNames:a,useENSName:o}}var za={},Rp={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function u(s,l,c){this.fn=s,this.context=l,this.once=c||!1}function i(s,l,c,y,v){if(typeof c!="function")throw new TypeError("The listener must be a function");var w=new u(c,y||s,v),_=r?r+l:l;return s._events[_]?s._events[_].fn?s._events[_]=[s._events[_],w]:s._events[_].push(w):(s._events[_]=w,s._eventsCount++),s}function a(s,l){--s._eventsCount===0?s._events=new n:delete s._events[l]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var l=[],c,y;if(this._eventsCount===0)return l;for(y in c=this._events)e.call(c,y)&&l.push(r?y.slice(1):y);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},o.prototype.listeners=function(l){var c=r?r+l:l,y=this._events[c];if(!y)return[];if(y.fn)return[y.fn];for(var v=0,w=y.length,_=new Array(w);ve),this.eth_accounts=jest.fn(e=>e),this.eth_requestAccounts=jest.fn(e=>e)}request(e){if(!this.chainId)return Promise.reject(new Error);switch(e.method){case"eth_chainId":return Promise.resolve(this.eth_chainId(this.chainId));case"eth_accounts":return Promise.resolve(this.eth_accounts(this.accounts));case"eth_requestAccounts":return Promise.resolve(this.eth_requestAccounts(this.accounts));default:throw new Error(`Method not supported on mock: ${JSON.stringify(e)}`)}}emitConnect(e){this.emit("connect",{chainId:e})}emitDisconnect(e){this.emit("disconnect",e)}emitChainChanged(e){this.emit("chainChanged",e)}emitAccountsChanged(e){this.emit("accountsChanged",e)}}za.MockEIP1193Provider=CF;var Yn={},FF=f0&&f0.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var u=Object.getOwnPropertyDescriptor(e,r);(!u||("get"in u?!e.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,u)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),BF=f0&&f0.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),DF=f0&&f0.__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)&&FF(e,t,r);return BF(e,t),e};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.useWeb3React=Yn.Web3ReactProvider=void 0;const ta=DF(n1),_F=W6,Lp=(0,ta.createContext)(void 0);function kF({children:t,connectors:e,connectorOverride:r,network:n,lookupENS:u=!0}){const i=(0,ta.useRef)(e);if(e.length!=i.current.length||e.some((o1,S)=>{const X=i.current[S];return o1[0]!==X[0]}))throw new Error("The connectors prop passed to Web3ReactProvider must be referentially static. If connectors is changing, try providing a key prop to Web3ReactProvider that changes every time connectors changes.");const a=(0,_F.getPriorityConnector)(...e),{usePriorityConnector:o,useSelectedChainId:s,useSelectedAccounts:l,useSelectedIsActivating:c,useSelectedAccount:y,useSelectedIsActive:v,useSelectedProvider:w,useSelectedENSNames:_,useSelectedENSName:M}=a,N=o(),k=r??N,C=s(k),T=l(k),z=c(k),$=y(k),Y=v(k),J=w(k,n),e1=_(k,u?J:void 0),i1=M(k,u?J:void 0);return ta.default.createElement(Lp.Provider,{value:{connector:k,chainId:C,accounts:T,isActivating:z,account:$,isActive:Y,provider:J,ENSNames:e1,ENSName:i1,hooks:a}},t)}Yn.Web3ReactProvider=kF;function SF(){const t=(0,ta.useContext)(Lp);if(!t)throw Error("useWeb3React can only be used within the Web3ReactProvider component");return t}Yn.useWeb3React=SF;(function(t){var e=f0&&f0.__createBinding||(Object.create?function(n,u,i,a){a===void 0&&(a=i);var o=Object.getOwnPropertyDescriptor(u,i);(!o||("get"in o?!u.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return u[i]}}),Object.defineProperty(n,a,o)}:function(n,u,i,a){a===void 0&&(a=i),n[a]=u[i]}),r=f0&&f0.__exportStar||function(n,u){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(u,i)&&e(u,n,i)};Object.defineProperty(t,"__esModule",{value:!0}),r(W6,t),r(za,t),r(Yn,t)})(ka);var Ui={},$a={};Object.defineProperty($a,"__esModule",{value:!0});$a.Connector=void 0;class TF{constructor(e,r){this.actions=e,this.onError=r}resetState(){this.actions.resetState()}}$a.Connector=TF;var Ko,Gf;function PF(){if(Gf)return Ko;Gf=1;function t({mustBeMetaMask:e=!1,silent:r=!1,timeout:n=3e3}={}){i();let u=!1;return new Promise(a=>{window.ethereum?o():(window.addEventListener("ethereum#initialized",o,{once:!0}),setTimeout(()=>{o()},n));function o(){if(u)return;u=!0,window.removeEventListener("ethereum#initialized",o);const{ethereum:s}=window;s&&(!e||s.isMetaMask)?a(s):(!r&&console.error("@metamask/detect-provider:",e&&s?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum."),a(null))}});function i(){if(typeof e!="boolean")throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if(typeof r!="boolean")throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if(typeof n!="number")throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}}return Ko=t,Ko}var NF=f0&&f0.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var u=Object.getOwnPropertyDescriptor(e,r);(!u||("get"in u?!e.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,u)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),MF=f0&&f0.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),UF=f0&&f0.__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)&&NF(e,t,r);return MF(e,t),e},Z2=f0&&f0.__awaiter||function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ui,"__esModule",{value:!0});var jp=Ui.MetaMask=Ui.NoMetaMaskError=void 0;const OF=$a;class Oi extends Error{constructor(){super("MetaMask not installed"),this.name=Oi.name,Object.setPrototypeOf(this,Oi.prototype)}}Ui.NoMetaMaskError=Oi;function O5(t){return Number.parseInt(t,16)}class IF extends OF.Connector{constructor({actions:e,options:r,onError:n}){super(e,n),this.options=r}isomorphicInitialize(){return Z2(this,void 0,void 0,function*(){if(!this.eagerConnection)return this.eagerConnection=Promise.resolve().then(()=>UF(PF())).then(e=>Z2(this,void 0,void 0,function*(){var r,n;const u=yield e.default(this.options);u&&(this.provider=u,!((r=this.provider.providers)===null||r===void 0)&&r.length&&(this.provider=(n=this.provider.providers.find(i=>i.isMetaMask))!==null&&n!==void 0?n:this.provider.providers[0]),this.provider.on("connect",({chainId:i})=>{this.actions.update({chainId:O5(i)})}),this.provider.on("disconnect",i=>{var a;if(i.code===1013){console.debug('MetaMask logged connection error 1013: "Try again later"');return}this.actions.resetState(),(a=this.onError)===null||a===void 0||a.call(this,i)}),this.provider.on("chainChanged",i=>{this.actions.update({chainId:O5(i)})}),this.provider.on("accountsChanged",i=>{i.length===0?this.actions.resetState():this.actions.update({accounts:i})}))}))})}connectEagerly(){return Z2(this,void 0,void 0,function*(){const e=this.actions.startActivation();try{if(yield this.isomorphicInitialize(),!this.provider)return e();const r=yield this.provider.request({method:"eth_accounts"});if(!r.length)throw new Error("No accounts returned");const n=yield this.provider.request({method:"eth_chainId"});this.actions.update({chainId:O5(n),accounts:r})}catch(r){console.debug("Could not connect eagerly",r),this.actions.resetState()}})}activate(e){var r,n;return Z2(this,void 0,void 0,function*(){let u;return!((n=(r=this.provider)===null||r===void 0?void 0:r.isConnected)===null||n===void 0)&&n.call(r)||(u=this.actions.startActivation()),this.isomorphicInitialize().then(()=>Z2(this,void 0,void 0,function*(){if(!this.provider)throw new Oi;const i=yield this.provider.request({method:"eth_requestAccounts"}),a=yield this.provider.request({method:"eth_chainId"}),o=O5(a),s=typeof e=="number"?e:e==null?void 0:e.chainId;if(!s||o===s)return this.actions.update({chainId:o,accounts:i});const l=`0x${s.toString(16)}`;return this.provider.request({method:"wallet_switchEthereumChain",params:[{chainId:l}]}).catch(c=>{var y,v;if((((v=(y=c.data)===null||y===void 0?void 0:y.originalError)===null||v===void 0?void 0:v.code)||c.code)===4902&&typeof e!="number"){if(!this.provider)throw new Error("No provider");return this.provider.request({method:"wallet_addEthereumChain",params:[Object.assign(Object.assign({},e),{chainId:l})]})}throw c}).then(()=>this.activate(s))})).catch(i=>{throw u==null||u(),i})})}watchAsset({address:e,symbol:r,decimals:n,image:u}){return Z2(this,void 0,void 0,function*(){if(!this.provider)throw new Error("No provider");return this.provider.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,symbol:r,decimals:n,image:u}}}).then(i=>{if(!i)throw new Error("Rejected");return!0})})}}jp=Ui.MetaMask=IF;const[q4,Ut]=ka.initializeConnector(t=>new jp({actions:t}));var R1=(t=>(t[t.LOCAL=1337]="LOCAL",t[t.MAINNET=1]="MAINNET",t[t.SEPOLIA=11155111]="SEPOLIA",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",t[t.GOERLI=5]="GOERLI",t))(R1||{});const y2="0xaa36a7",Rr="0xa",ra="0x1",RF="11155111",zu={[R1.SEPOLIA]:"0x3807fBD692Aa5c96F1D8D7c59a1346a885F40B1C",[R1.OPTIMISM]:"0xca5b5811c0C40aAB3295f932b1B5112Eb7bb4bD6"},I5={[R1.SEPOLIA]:"0xC5a939923E0B336642024b479502E039338bEd00",[R1.OPTIMISM]:"0x66929F55Ea1E38591f9430E5013C92cdC01F6cAd"},R5={[R1.SEPOLIA]:"0x0635513f179D50A207757E05759CbD106d7dFcE8",[R1.MAINNET]:"0xD4416b13d2b3a9aBae7AcD5D6C2BbDBE25686401"},L5={[R1.SEPOLIA]:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",[R1.MAINNET]:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},j5={[R1.SEPOLIA]:"0xD4583DFd73B382B7e3230aa29Be774C1843FB7d2",[R1.GOERLI]:"0xD4583DFd73B382B7e3230aa29Be774C1843FB7d2",[R1.MAINNET]:"0xa1F47fBBa93574DB4a049C1c5bA03471A21EE01D"},z5={[R1.SEPOLIA]:"0x528bA1BA3186d8CABD2c4E8758a98fAf64eD8Af0",[R1.OPTIMISM]:"0x0b35664aB5950cE92bce7222be165BB575D9b7c5"},u5="abi/5.7.0",x0=new Z(u5),P2={};let Vf={calldata:!0,memory:!0,storage:!0},LF={calldata:!0,memory:!0};function $5(t,e){if(t==="bytes"||t==="string"){if(Vf[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&LF[e])return!0;return(Vf[e]||e==="payable")&&x0.throwArgumentError("invalid modifier","name",e),!1}function jF(t,e){let r=t;function n(o){x0.throwArgumentError(`unexpected character at position ${o}`,"param",t)}t=t.replace(/\s/g," ");function u(o){let s={type:"",name:"",parent:o,state:{allowType:!0}};return e&&(s.indexed=!1),s}let i={type:"",name:"",state:{allowType:!0}},a=i;for(let o=0;oJSON.parse(u.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==A0.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===A0.full?", ":",")+")"):r+=this.type,e!==A0.sighash&&(this.indexed===!0&&(r+=" indexed"),e===A0.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?fe.fromString(e,r):fe.fromObject(e)}static fromObject(e){return fe.isParamType(e)?e:new fe(P2,{name:e.name||null,type:nn(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(fe.fromObject):null})}static fromString(e,r){function n(u){return fe.fromObject({name:u.name,type:u.type,indexed:u.indexed,components:u.components})}return n(jF(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function Ii(t,e){return qF(t).map(r=>fe.fromString(r,e))}class h6{constructor(e,r){e!==P2&&x0.throwError("use a static from method",Z.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),x8(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return h6.isFragment(e)?e:typeof e=="string"?h6.fromString(e):h6.fromObject(e)}static fromObject(e){if(h6.isFragment(e))return e;switch(e.type){case"function":return Gt.fromObject(e);case"event":return d6.fromObject(e);case"constructor":return Kt.fromObject(e);case"error":return $6.fromObject(e);case"fallback":case"receive":return null}return x0.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?d6.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Gt.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Kt.fromString(e.trim()):e.split(" ")[0]==="error"?$6.fromString(e.substring(5).trim()):x0.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class d6 extends h6{format(e){if(e||(e=A0.sighash),A0[e]||x0.throwArgumentError("invalid format type","format",e),e===A0.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==A0.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===A0.full?", ":",")+") ",e!==A0.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?d6.fromString(e):d6.fromObject(e)}static fromObject(e){if(d6.isEventFragment(e))return e;e.type!=="event"&&x0.throwArgumentError("invalid event object","value",e);const r={name:Ri(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(fe.fromObject):[],type:"event"};return new d6(P2,r)}static fromString(e){let r=e.match(Li);r||x0.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(u=>{switch(u.trim()){case"anonymous":n=!0;break;case"":break;default:x0.warn("unknown modifier: "+u)}}),d6.fromObject({name:r[1].trim(),anonymous:n,inputs:Ii(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function zp(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&x0.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||x0.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=C1.from(r[1]),r[0]):t}function $p(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function qp(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&x0.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&x0.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&x0.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&x0.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&x0.throwArgumentError("unable to determine stateMutability","value",t),e}class Kt extends h6{format(e){if(e||(e=A0.sighash),A0[e]||x0.throwArgumentError("invalid format type","format",e),e===A0.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===A0.sighash&&x0.throwError("cannot format a constructor for sighash",Z.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===A0.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Kt.fromString(e):Kt.fromObject(e)}static fromObject(e){if(Kt.isConstructorFragment(e))return e;e.type!=="constructor"&&x0.throwArgumentError("invalid constructor object","value",e);let r=qp(e);r.constant&&x0.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(fe.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?C1.from(e.gas):null};return new Kt(P2,n)}static fromString(e){let r={type:"constructor"};e=zp(e,r);let n=e.match(Li);return(!n||n[1].trim()!=="constructor")&&x0.throwArgumentError("invalid constructor string","value",e),r.inputs=Ii(n[2].trim(),!1),$p(n[3].trim(),r),Kt.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Gt extends Kt{format(e){if(e||(e=A0.sighash),A0[e]||x0.throwArgumentError("invalid format type","format",e),e===A0.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?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==A0.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===A0.full?", ":",")+") ",e!==A0.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?Gt.fromString(e):Gt.fromObject(e)}static fromObject(e){if(Gt.isFunctionFragment(e))return e;e.type!=="function"&&x0.throwArgumentError("invalid function object","value",e);let r=qp(e);const n={type:e.type,name:Ri(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(fe.fromObject):[],outputs:e.outputs?e.outputs.map(fe.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?C1.from(e.gas):null};return new Gt(P2,n)}static fromString(e){let r={type:"function"};e=zp(e,r);let n=e.split(" returns ");n.length>2&&x0.throwArgumentError("invalid function string","value",e);let u=n[0].match(Li);if(u||x0.throwArgumentError("invalid function signature","value",e),r.name=u[1].trim(),r.name&&Ri(r.name),r.inputs=Ii(u[2],!1),$p(u[3].trim(),r),n.length>1){let i=n[1].match(Li);(i[1].trim()!=""||i[3].trim()!="")&&x0.throwArgumentError("unexpected tokens","value",e),r.outputs=Ii(i[2],!1)}else r.outputs=[];return Gt.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function Wf(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&x0.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class $6 extends h6{format(e){if(e||(e=A0.sighash),A0[e]||x0.throwArgumentError("invalid format type","format",e),e===A0.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==A0.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===A0.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?$6.fromString(e):$6.fromObject(e)}static fromObject(e){if($6.isErrorFragment(e))return e;e.type!=="error"&&x0.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:Ri(e.name),inputs:e.inputs?e.inputs.map(fe.fromObject):[]};return Wf(new $6(P2,r))}static fromString(e){let r={type:"error"},n=e.match(Li);return n||x0.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&Ri(r.name),r.inputs=Ii(n[2],!1),Wf($6.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function nn(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const $F=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Ri(t){return(!t||!t.match($F))&&x0.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Li=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function qF(t){t=t.trim();let e=[],r="",n=0;for(let u=0;uthis.wordSize&&H4.throwError("value out-of-bounds",Z.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=I0([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class na{constructor(e,r,n,u){s1(this,"_data",v1(e)),s1(this,"wordSize",r||32),s1(this,"_coerceFunc",n),s1(this,"allowLoose",u),this._offset=0}get data(){return F1(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):na.coerce(e,r)}_peekBytes(e,r,n){let u=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+u>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?u=r:H4.throwError("data out-of-bounds",Z.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+u})),this._data.slice(this._offset,this._offset+u)}subReader(e){return new na(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return C1.from(this.readBytes(this.wordSize))}}class HF extends or{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=B0(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return B0(R0(e.readValue().toHexString(),20))}}class KF extends or{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const En=new Z(u5);function Kp(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let s={};n=e.map(l=>{const c=l.localName;return c||En.throwError("cannot encode object for signature with missing names",Z.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),s[c]&&En.throwError("cannot encode object for signature with duplicate names",Z.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),s[c]=!0,r[c]})}else En.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&En.throwArgumentError("types/value length mismatch","tuple",r);let u=new ds(t.wordSize),i=new ds(t.wordSize),a=[];e.forEach((s,l)=>{let c=n[l];if(s.dynamic){let y=i.length;s.encode(i,c);let v=u.writeUpdatableValue();a.push(w=>{v(w+y)})}else s.encode(u,c)}),a.forEach(s=>{s(u.length)});let o=t.appendWriter(u);return o+=t.appendWriter(i),o}function Gp(t,e){let r=[],n=t.subReader(0);e.forEach(i=>{let a=null;if(i.dynamic){let o=t.readValue(),s=n.subReader(o.toNumber());try{a=i.decode(s)}catch(l){if(l.code===Z.errors.BUFFER_OVERRUN)throw l;a=l,a.baseType=i.name,a.name=i.localName,a.type=i.type}}else try{a=i.decode(t)}catch(o){if(o.code===Z.errors.BUFFER_OVERRUN)throw o;a=o,a.baseType=i.name,a.name=i.localName,a.type=i.type}a!=null&&r.push(a)});const u=e.reduce((i,a)=>{const o=a.localName;return o&&(i[o]||(i[o]=0),i[o]++),i},{});e.forEach((i,a)=>{let o=i.localName;if(!o||u[o]!==1||(o==="length"&&(o="_length"),r[o]!=null))return;const s=r[a];s instanceof Error?Object.defineProperty(r,o,{enumerable:!0,get:()=>{throw s}}):r[o]=s});for(let i=0;i{throw a}})}return Object.freeze(r)}class GF extends or{constructor(e,r,n){const u=e.type+"["+(r>=0?r:"")+"]",i=r===-1||e.dynamic;super("array",u,n,i),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&En.throwError("insufficient data length",Z.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let u=0;u{a.dynamic&&(n=!0),u.push(a.type)});const i="tuple("+u.join(",")+")";super("tuple",i,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,u)=>{const i=u.localName;return i&&(n[i]||(n[i]=0),n[i]++),n},{});return this.coders.forEach((n,u)=>{let i=n.localName;!i||r[i]!==1||(i==="length"&&(i="_length"),e[i]==null&&(e[i]=e[u]))}),Object.freeze(e)}encode(e,r){return Kp(e,this.coders,r)}decode(e){return e.coerce(this.name,Gp(e,this.coders))}}const H5=new Z(u5),ZF=new RegExp(/^bytes([0-9]*)$/),eB=new RegExp(/^(u?int)([0-9]*)$/);class Wp{constructor(e){s1(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new HF(e.name);case"bool":return new VF(e.name);case"string":return new XF(e.name);case"bytes":return new WF(e.name);case"array":return new GF(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new q5((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new JF(e.name)}let r=e.type.match(eB);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&H5.throwArgumentError("invalid "+r[1]+" bit length","param",e),new YF(n/8,r[1]==="int",e.name)}if(r=e.type.match(ZF),r){let n=parseInt(r[1]);return(n===0||n>32)&&H5.throwArgumentError("invalid bytes length","param",e),new QF(n,e.name)}return H5.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new na(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new ds(this._getWordSize())}getDefaultValue(e){const r=e.map(u=>this._getCoder(fe.from(u)));return new q5(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&H5.throwError("types/values length mismatch",Z.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(a=>this._getCoder(fe.from(a))),u=new q5(n,"_"),i=this._getWriter();return u.encode(i,r),i.data}decode(e,r,n){const u=e.map(a=>this._getCoder(fe.from(a)));return new q5(u,"_").decode(this._getReader(v1(r),n))}}const Qp=new Wp,G0=new Z(u5);class Jp extends Jr{}class Yp extends Jr{}class tB extends Jr{}class ua extends Jr{static isIndexed(e){return!!(e&&e._isIndexed)}}const rB={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Qf(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class rr{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,s1(this,"fragments",r.map(n=>h6.from(n)).filter(n=>n!=null)),s1(this,"_abiCoder",Ce(new.target,"getAbiCoder")()),s1(this,"functions",{}),s1(this,"errors",{}),s1(this,"events",{}),s1(this,"structs",{}),this.fragments.forEach(n=>{let u=null;switch(n.type){case"constructor":if(this.deploy){G0.warn("duplicate definition - constructor");return}s1(this,"deploy",n);return;case"function":u=this.functions;break;case"event":u=this.events;break;case"error":u=this.errors;break;default:return}let i=n.format();if(u[i]){G0.warn("duplicate definition - "+i);return}u[i]=n}),this.deploy||s1(this,"deploy",Kt.from({payable:!1,type:"constructor"})),s1(this,"_isInterface",!0)}format(e){e||(e=A0.full),e===A0.sighash&&G0.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===A0.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Qp}static getAddress(e){return B0(e)}static getSighash(e){return ne(Br(e.format()),0,4)}static getEventTopic(e){return Br(e.format())}getFunction(e){if(W1(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];G0.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),u=Object.keys(this.functions).filter(i=>i.split("(")[0]===n);return u.length===0?G0.throwArgumentError("no matching function","name",n):u.length>1&&G0.throwArgumentError("multiple matching functions","name",n),this.functions[u[0]]}const r=this.functions[Gt.fromString(e).format()];return r||G0.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(W1(e)){const n=e.toLowerCase();for(const u in this.events)if(n===this.getEventTopic(u))return this.events[u];G0.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),u=Object.keys(this.events).filter(i=>i.split("(")[0]===n);return u.length===0?G0.throwArgumentError("no matching event","name",n):u.length>1&&G0.throwArgumentError("multiple matching events","name",n),this.events[u[0]]}const r=this.events[d6.fromString(e).format()];return r||G0.throwArgumentError("no matching event","signature",e),r}getError(e){if(W1(e)){const n=Ce(this.constructor,"getSighash");for(const u in this.errors){const i=this.errors[u];if(e===n(i))return this.errors[u]}G0.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),u=Object.keys(this.errors).filter(i=>i.split("(")[0]===n);return u.length===0?G0.throwArgumentError("no matching error","name",n):u.length>1&&G0.throwArgumentError("multiple matching errors","name",n),this.errors[u[0]]}const r=this.errors[Gt.fromString(e).format()];return r||G0.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return Ce(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),Ce(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=v1(r);return F1(n.slice(0,4))!==this.getSighash(e)&&G0.throwArgumentError(`data signature does not match error ${e.name}.`,"data",F1(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),F1(I0([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=v1(r);return F1(n.slice(0,4))!==this.getSighash(e)&&G0.throwArgumentError(`data signature does not match function ${e.name}.`,"data",F1(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),F1(I0([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=v1(r),u=null,i="",a=null,o=null,s=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=F1(n.slice(0,4)),c=rB[l];if(c)a=this._abiCoder.decode(c.inputs,n.slice(4)),o=c.name,s=c.signature,c.reason&&(u=a[0]),o==="Error"?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(a[0])}`:o==="Panic"&&(i=`; VM Exception while processing transaction: reverted with panic code ${a[0]}`);else try{const y=this.getError(l);a=this._abiCoder.decode(y.inputs,n.slice(4)),o=y.name,s=y.format()}catch{}break}}return G0.throwError("call revert exception"+i,Z.errors.CALL_EXCEPTION,{method:e.format(),data:F1(r),errorArgs:a,errorName:o,errorSignature:s,reason:u})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),F1(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&G0.throwError("too many arguments for "+e.format(),Z.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const u=(i,a)=>i.type==="string"?Br(a):i.type==="bytes"?T0(F1(a)):(i.type==="bool"&&typeof a=="boolean"&&(a=a?"0x01":"0x00"),i.type.match(/^u?int/)&&(a=C1.from(a).toHexString()),i.type==="address"&&this._abiCoder.encode(["address"],[a]),R0(F1(a),32));for(r.forEach((i,a)=>{let o=e.inputs[a];if(!o.indexed){i!=null&&G0.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,i);return}i==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?G0.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,i):Array.isArray(i)?n.push(i.map(s=>u(o,s))):n.push(u(o,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],u=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&G0.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((a,o)=>{const s=r[o];if(a.indexed)if(a.type==="string")n.push(Br(s));else if(a.type==="bytes")n.push(T0(s));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([a.type],[s]))}else u.push(a),i.push(s)}),{data:this._abiCoder.encode(u,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let v=this.getEventTopic(e);(!W1(n[0],32)||n[0].toLowerCase()!==v)&&G0.throwError("fragment/topic mismatch",Z.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:v,value:n[0]}),n=n.slice(1)}let u=[],i=[],a=[];e.inputs.forEach((v,w)=>{v.indexed?v.type==="string"||v.type==="bytes"||v.baseType==="tuple"||v.baseType==="array"?(u.push(fe.fromObject({type:"bytes32",name:v.name})),a.push(!0)):(u.push(v),a.push(!1)):(i.push(v),a.push(!1))});let o=n!=null?this._abiCoder.decode(u,I0(n)):null,s=this._abiCoder.decode(i,r,!0),l=[],c=0,y=0;e.inputs.forEach((v,w)=>{if(v.indexed)if(o==null)l[w]=new ua({_isIndexed:!0,hash:null});else if(a[w])l[w]=new ua({_isIndexed:!0,hash:o[y++]});else try{l[w]=o[y++]}catch(_){l[w]=_}else try{l[w]=s[c++]}catch(_){l[w]=_}if(v.name&&l[v.name]==null){const _=l[w];_ instanceof Error?Object.defineProperty(l,v.name,{enumerable:!0,get:()=>{throw Qf(`property ${JSON.stringify(v.name)}`,_)}}):l[v.name]=_}});for(let v=0;v{throw Qf(`index ${v}`,w)}})}return Object.freeze(l)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new Yp({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:C1.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new Jp({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=F1(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new tB({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const nB=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Wp,ConstructorFragment:Kt,ErrorFragment:$6,EventFragment:d6,FormatTypes:A0,Fragment:h6,FunctionFragment:Gt,Indexed:ua,Interface:rr,LogDescription:Jp,ParamType:fe,TransactionDescription:Yp,checkResultErrors:Hp,defaultAbiCoder:Qp},Symbol.toStringTag,{value:"Module"})),uB="contracts/5.7.0";var qr=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const S0=new Z(uB),iB={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function ia(t,e){return qr(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&S0.throwArgumentError("invalid address or ENS name","name",r);try{return B0(r)}catch{}t||S0.throwError("a provider or signer is needed to resolve ENS names",Z.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&S0.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function ri(t,e,r){return qr(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,u)=>ri(t,Array.isArray(e)?e[u]:e[n.name],n))):r.type==="address"?yield ia(t,e):r.type==="tuple"?yield ri(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>ri(t,n,r.arrayChildren))):Promise.reject(S0.makeError("invalid value for array",Z.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function qa(t,e,r){return qr(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=j0(r.pop())),S0.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=X0({override:ia(t.signer,n.from),signer:t.signer.getAddress()}).then(l=>qr(this,void 0,void 0,function*(){return B0(l.signer)!==l.override&&S0.throwError("Contract with a Signer cannot override from",Z.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),l.override})):n.from=t.signer.getAddress():n.from&&(n.from=ia(t.provider,n.from));const u=yield X0({args:ri(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:X0(n)||{}}),i=t.interface.encodeFunctionData(e,u.args),a={data:i,to:u.address},o=u.overrides;if(o.nonce!=null&&(a.nonce=C1.from(o.nonce).toNumber()),o.gasLimit!=null&&(a.gasLimit=C1.from(o.gasLimit)),o.gasPrice!=null&&(a.gasPrice=C1.from(o.gasPrice)),o.maxFeePerGas!=null&&(a.maxFeePerGas=C1.from(o.maxFeePerGas)),o.maxPriorityFeePerGas!=null&&(a.maxPriorityFeePerGas=C1.from(o.maxPriorityFeePerGas)),o.from!=null&&(a.from=o.from),o.type!=null&&(a.type=o.type),o.accessList!=null&&(a.accessList=Zr(o.accessList)),a.gasLimit==null&&e.gas!=null){let l=21e3;const c=v1(i);for(let y=0;yn[l]!=null);return s.length&&S0.throwError(`cannot override ${s.map(l=>JSON.stringify(l)).join(",")}`,Z.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:s}),a})}function aB(t,e){return function(...r){return qa(t,e,r)}}function oB(t,e){const r=t.signer||t.provider;return function(...n){return qr(this,void 0,void 0,function*(){r||S0.throwError("estimate require a provider or signer",Z.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const u=yield qa(t,e,n);return yield r.estimateGas(u)})}}function Xp(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(u=>(u.events=u.logs.map(i=>{let a=Ke(i),o=null;try{o=t.interface.parseLog(i)}catch{}return o&&(a.args=o.args,a.decode=(s,l)=>t.interface.decodeEventLog(o.eventFragment,s,l),a.event=o.name,a.eventSignature=o.signature),a.removeListener=()=>t.provider,a.getBlock=()=>t.provider.getBlock(u.blockHash),a.getTransaction=()=>t.provider.getTransaction(u.transactionHash),a.getTransactionReceipt=()=>Promise.resolve(u),a}),u))}function Zp(t,e,r){const n=t.signer||t.provider;return function(...u){return qr(this,void 0,void 0,function*(){let i;if(u.length===e.inputs.length+1&&typeof u[u.length-1]=="object"){const s=j0(u.pop());s.blockTag!=null&&(i=yield s.blockTag),delete s.blockTag,u.push(s)}t.deployTransaction!=null&&(yield t._deployed(i));const a=yield qa(t,e,u),o=yield n.call(a,i);try{let s=t.interface.decodeFunctionResult(e,o);return r&&e.outputs.length===1&&(s=s[0]),s}catch(s){throw s.code===Z.errors.CALL_EXCEPTION&&(s.address=t.address,s.args=u,s.transaction=a),s}})}}function sB(t,e){return function(...r){return qr(this,void 0,void 0,function*(){t.signer||S0.throwError("sending a transaction requires a signer",Z.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield qa(t,e,r),u=yield t.signer.sendTransaction(n);return Xp(t,u),u})}}function Jf(t,e,r){return e.constant?Zp(t,e,r):sB(t,e)}function eb(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class ji{constructor(e,r){s1(this,"tag",e),s1(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const u=e.slice();return setTimeout(()=>{n.listener.apply(this,u)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class lB extends ji{constructor(){super("error",null)}}class Yf extends ji{constructor(e,r,n,u){const i={address:e};let a=r.getEventTopic(n);u?(a!==u[0]&&S0.throwArgumentError("topic mismatch","topics",u),i.topics=u.slice()):i.topics=[a],super(eb(i),i),s1(this,"address",e),s1(this,"interface",r),s1(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=Hp(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class Xf extends ji{constructor(e,r){super("*",{address:e}),s1(this,"address",e),s1(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,u)=>this.interface.decodeEventLog(r.eventFragment,n,u),e.args=r.args}catch{}}}class fB{constructor(e,r,n){s1(this,"interface",Ce(new.target,"getInterface")(r)),n==null?(s1(this,"provider",null),s1(this,"signer",null)):j2.isSigner(n)?(s1(this,"provider",n.provider||null),s1(this,"signer",n)):R2.isProvider(n)?(s1(this,"provider",n),s1(this,"signer",null)):S0.throwArgumentError("invalid signer or provider","signerOrProvider",n),s1(this,"callStatic",{}),s1(this,"estimateGas",{}),s1(this,"functions",{}),s1(this,"populateTransaction",{}),s1(this,"filters",{});{const a={};Object.keys(this.interface.events).forEach(o=>{const s=this.interface.events[o];s1(this.filters,o,(...l)=>({address:this.address,topics:this.interface.encodeFilterTopics(s,l)})),a[s.name]||(a[s.name]=[]),a[s.name].push(o)}),Object.keys(a).forEach(o=>{const s=a[o];s.length===1?s1(this.filters,o,this.filters[s[0]]):S0.warn(`Duplicate definition of ${o} (${s.join(", ")})`)})}if(s1(this,"_runningEvents",{}),s1(this,"_wrappedEmits",{}),e==null&&S0.throwArgumentError("invalid contract address or ENS name","addressOrName",e),s1(this,"address",e),this.provider)s1(this,"resolvedAddress",ia(this.provider,e));else try{s1(this,"resolvedAddress",Promise.resolve(B0(e)))}catch{S0.throwError("provider is required to use ENS name as contract address",Z.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(a=>{});const u={},i={};Object.keys(this.interface.functions).forEach(a=>{const o=this.interface.functions[a];if(i[a]){S0.warn(`Duplicate ABI entry for ${JSON.stringify(a)}`);return}i[a]=!0;{const s=o.name;u[`%${s}`]||(u[`%${s}`]=[]),u[`%${s}`].push(a)}this[a]==null&&s1(this,a,Jf(this,o,!0)),this.functions[a]==null&&s1(this.functions,a,Jf(this,o,!1)),this.callStatic[a]==null&&s1(this.callStatic,a,Zp(this,o,!0)),this.populateTransaction[a]==null&&s1(this.populateTransaction,a,aB(this,o)),this.estimateGas[a]==null&&s1(this.estimateGas,a,oB(this,o))}),Object.keys(u).forEach(a=>{const o=u[a];if(o.length>1)return;a=a.substring(1);const s=o[0];try{this[a]==null&&s1(this,a,this[s])}catch{}this.functions[a]==null&&s1(this.functions,a,this.functions[s]),this.callStatic[a]==null&&s1(this.callStatic,a,this.callStatic[s]),this.populateTransaction[a]==null&&s1(this.populateTransaction,a,this.populateTransaction[s]),this.estimateGas[a]==null&&s1(this.estimateGas,a,this.estimateGas[s])})}static getContractAddress(e){return Ta(e)}static getInterface(e){return rr.isInterface(e)?e:new rr(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&S0.throwError("contract not deployed",Z.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||S0.throwError("sending a transactions require a signer",Z.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=j0(e||{});return["from","to"].forEach(function(n){r[n]!=null&&S0.throwError("cannot override "+n,Z.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new L4(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&s1(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return ua.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new lB);if(e==="event")return this._normalizeRunningEvent(new ji("event",null));if(e==="*")return this._normalizeRunningEvent(new Xf(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new Yf(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const u=this.interface.getEvent(n);return this._normalizeRunningEvent(new Yf(this.address,this.interface,u,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new ji(eb(r),r))}return this._normalizeRunningEvent(new Xf(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const u=Ke(r);return u.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},u.getBlock=()=>this.provider.getBlock(r.blockHash),u.getTransaction=()=>this.provider.getTransaction(r.transactionHash),u.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(u),u}_addEventListener(e,r,n){if(this.provider||S0.throwError("events require a provider or a signer with a provider",Z.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const u=i=>{let a=this._wrapEvent(e,i,r);if(a.decodeError==null)try{const o=e.getEmit(a);this.emit(e.filter,...o)}catch(o){a.decodeError=o.error}e.filter!=null&&this.emit("event",a),a.decodeError!=null&&this.emit("error",a.decodeError,a)};this._wrappedEmits[e.tag]=u,e.filter!=null&&this.provider.on(e.filter,u)}}queryFilter(e,r,n){const u=this._getRunningEvent(e),i=j0(u.filter);return typeof r=="string"&&W1(r,32)?(n!=null&&S0.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),i.blockHash=r):(i.fromBlock=r??0,i.toBlock=n??"latest"),this.provider.getLogs(i).then(a=>a.map(o=>this._wrapEvent(u,o,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),u=n.run(r)>0;return this._checkRunningEvents(n),u}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(u=>{r.push(u)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const u=this._runningEvents[n];u.removeAllListeners(),this._checkRunningEvents(u)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class Hr extends fB{}class fu{constructor(e,r,n){let u=null;typeof r=="string"?u=r:Qr(r)?u=F1(r):r&&typeof r.object=="string"?u=r.object:u="!",u.substring(0,2)!=="0x"&&(u="0x"+u),(!W1(u)||u.length%2)&&S0.throwArgumentError("invalid bytecode","bytecode",r),n&&!j2.isSigner(n)&&S0.throwArgumentError("invalid signer","signer",n),s1(this,"bytecode",u),s1(this,"interface",Ce(new.target,"getInterface")(e)),s1(this,"signer",n||null)}getDeployTransaction(...e){let r={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){r=j0(e.pop());for(const n in r)if(!iB[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{r[n]!=null&&S0.throwError("cannot override "+n,Z.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.value&&!C1.from(r.value).isZero()&&!this.interface.deploy.payable&&S0.throwError("non-payable constructor cannot override value",Z.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:r.value}),S0.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),r.data=F1(I0([this.bytecode,this.interface.encodeDeploy(e)])),r}deploy(...e){return qr(this,void 0,void 0,function*(){let r={};e.length===this.interface.deploy.inputs.length+1&&(r=e.pop()),S0.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const n=yield ri(this.signer,e,this.interface.deploy.inputs);n.push(r);const u=this.getDeployTransaction(...n),i=yield this.signer.sendTransaction(u),a=Ce(this.constructor,"getContractAddress")(i),o=Ce(this.constructor,"getContract")(a,this.interface,this.signer);return Xp(o,i),s1(o,"deployTransaction",i),o})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,r){e==null&&S0.throwError("missing compiler output",Z.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));const n=e.abi;let u=null;return e.bytecode?u=e.bytecode:e.evm&&e.evm.bytecode&&(u=e.evm.bytecode),new this(n,u,r)}static getInterface(e){return Hr.getInterface(e)}static getContractAddress(e){return Ta(e)}static getContract(e,r,n){return new Hr(e,r,n)}}function K4(t,e,r,n,u){t=v1(t),e=v1(e);let i,a=1;const o=new Uint8Array(n),s=new Uint8Array(e.length+4);s.set(e);let l,c;for(let y=1;y<=a;y++){s[e.length]=y>>24&255,s[e.length+1]=y>>16&255,s[e.length+2]=y>>8&255,s[e.length+3]=y&255;let v=v1(Ni(u,t,s));i||(i=v.length,c=new Uint8Array(i),a=Math.ceil(n/i),l=n-(a-1)*i),c.set(v);for(let M=1;M=256)throw new Error("Depth too large!");return tc(I0([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",F1(this.depth),this.parentFingerprint,R0(F1(this.index),4),this.chainCode,this.privateKey!=null?I0(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new st(en,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~un));const n=new Uint8Array(37);if(e&un){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(v1(this.privateKey),1),r&&(r+="'")}else n.set(v1(this.publicKey));for(let y=24;y>=0;y-=8)n[33+(y>>3)]=e>>24-y&255;const u=v1(Ni(Jn.sha512,this.chainCode,n)),i=u.slice(0,32),a=u.slice(32);let o=null,s=null;this.privateKey?o=K5(C1.from(i).add(this.privateKey).mod(mB)):s=new v2(F1(i))._addPoint(this.publicKey);let l=r;const c=this.mnemonic;return c&&(l=Object.freeze({phrase:c.phrase,path:r,locale:c.locale||"en"})),new st(en,o,s,this.fingerprint,K5(a),e,this.depth+1,l)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let u=0;u=un)throw new Error("invalid path index - "+i);n=n._derive(un+a)}else if(i.match(/^[0-9]+$/)){const a=parseInt(i);if(a>=un)throw new Error("invalid path index - "+i);n=n._derive(a)}else throw new Error("invalid path component - "+i)}return n}static _fromSeed(e,r){const n=v1(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const u=v1(Ni(Jn.sha512,yB,n));return new st(en,K5(u.slice(0,32)),null,"0x00000000",K5(u.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=G4(n),e=Ka(Ha(e,n),n),st._fromSeed(nb(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return st._fromSeed(e,null)}static fromExtendedKey(e){const r=Gn.decode(e);(r.length!==82||tc(r.slice(0,78))!==e)&&zi.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],u=F1(r.slice(5,9)),i=parseInt(F1(r.slice(9,13)).substring(2),16),a=F1(r.slice(13,45)),o=r.slice(45,78);switch(F1(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new st(en,null,F1(o),u,a,i,n,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new st(en,F1(o.slice(1)),null,u,a,i,n,null)}return zi.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function nb(t,e){e||(e="");const r=z0("mnemonic"+e,k6.NFKD);return K4(z0(t,k6.NFKD),r,2048,64,"sha512")}function Ha(t,e){e=G4(e),zi.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=v1(new Uint8Array(Math.ceil(11*r.length/8)));let u=0;for(let l=0;l>3]|=1<<7-u%8),u++}const i=32*r.length/3,a=r.length/3,o=rb(a);if((v1(pt(n.slice(0,i/8)))[0]&o)!==(n[n.length-1]&o))throw new Error("invalid checksum");return F1(n.slice(0,i/8))}function Ka(t,e){if(e=G4(e),t=v1(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let a=0;a8?(r[r.length-1]<<=8,r[r.length-1]|=t[a],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[a]>>8-n,r.push(t[a]&gB(8-n)),n+=3);const u=t.length/4,i=v1(pt(t))[0]&rb(u);return r[r.length-1]<<=u,r[r.length-1]|=i>>8-u,e.join(r.map(a=>e.getWord(a)))}function xB(t,e){try{return Ha(t,e),!0}catch{}return!1}function vB(t){return(typeof t!="number"||t<0||t>=un||t%1)&&zi.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const AB=Object.freeze(Object.defineProperty({__proto__:null,HDNode:st,defaultPath:Xn,entropyToMnemonic:Ka,getAccountPath:vB,isValidMnemonic:xB,mnemonicToEntropy:Ha,mnemonicToSeed:nb},Symbol.toStringTag,{value:"Module"}));var ub={exports:{}};(function(t,e){(function(r){function n(b){return parseInt(b)===b}function u(b){if(!n(b.length))return!1;for(var f=0;f255)return!1;return!0}function i(b,f){if(b.buffer&&ArrayBuffer.isView(b)&&b.name==="Uint8Array")return f&&(b.slice?b=b.slice():b=Array.prototype.slice.call(b)),b;if(Array.isArray(b)){if(!u(b))throw new Error("Array contains invalid value: "+b);return new Uint8Array(b)}if(n(b.length)&&u(b))return new Uint8Array(b);throw new Error("unsupported array-like object")}function a(b){return new Uint8Array(b)}function o(b,f,m,B,p){(B!=null||p!=null)&&(b.slice?b=b.slice(B,p):b=Array.prototype.slice.call(b,B,p)),f.set(b,m)}var s=function(){function b(m){var B=[],p=0;for(m=encodeURI(m);p191&&I<224?(B.push(String.fromCharCode((I&31)<<6|m[p+1]&63)),p+=2):(B.push(String.fromCharCode((I&15)<<12|(m[p+1]&63)<<6|m[p+2]&63)),p+=3)}return B.join("")}return{toBytes:b,fromBytes:f}}(),l=function(){function b(B){for(var p=[],I=0;I>4]+f[L&15])}return p.join("")}return{toBytes:b,fromBytes:m}}(),c={16:10,24:12,32:14},y=[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],v=[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],w=[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],_=[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],M=[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],N=[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],k=[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=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],T=[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],z=[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],$=[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],Y=[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],J=[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],e1=[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],i1=[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 o1(b){for(var f=[],m=0;m>2,this._Ke[I][f%4]=p[f],this._Kd[b-I][f%4]=p[f];for(var L=0,V=B,G;V>16&255]<<24^v[G>>8&255]<<16^v[G&255]<<8^v[G>>24&255]^y[L]<<24,L+=1,B!=8)for(var f=1;f>8&255]<<8^v[G>>16&255]<<16^v[G>>24&255]<<24;for(var f=B/2+1;f>2,u1=V%4,this._Ke[r1][u1]=p[f],this._Kd[b-r1][u1]=p[f++],V++}for(var r1=1;r1>24&255]^J[G>>16&255]^e1[G>>8&255]^i1[G&255]},S.prototype.encrypt=function(b){if(b.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var f=this._Ke.length-1,m=[0,0,0,0],B=o1(b),p=0;p<4;p++)B[p]^=this._Ke[0][p];for(var I=1;I>24&255]^M[B[(p+1)%4]>>16&255]^N[B[(p+2)%4]>>8&255]^k[B[(p+3)%4]&255]^this._Ke[I][p];B=m.slice()}for(var L=a(16),V,p=0;p<4;p++)V=this._Ke[f][p],L[4*p]=(v[B[p]>>24&255]^V>>24)&255,L[4*p+1]=(v[B[(p+1)%4]>>16&255]^V>>16)&255,L[4*p+2]=(v[B[(p+2)%4]>>8&255]^V>>8)&255,L[4*p+3]=(v[B[(p+3)%4]&255]^V)&255;return L},S.prototype.decrypt=function(b){if(b.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var f=this._Kd.length-1,m=[0,0,0,0],B=o1(b),p=0;p<4;p++)B[p]^=this._Kd[0][p];for(var I=1;I>24&255]^T[B[(p+3)%4]>>16&255]^z[B[(p+2)%4]>>8&255]^$[B[(p+1)%4]&255]^this._Kd[I][p];B=m.slice()}for(var L=a(16),V,p=0;p<4;p++)V=this._Kd[f][p],L[4*p]=(w[B[p]>>24&255]^V>>24)&255,L[4*p+1]=(w[B[(p+3)%4]>>16&255]^V>>16)&255,L[4*p+2]=(w[B[(p+2)%4]>>8&255]^V>>8)&255,L[4*p+3]=(w[B[(p+1)%4]&255]^V)&255;return L};var X=function(b){if(!(this instanceof X))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new S(b)};X.prototype.encrypt=function(b){if(b=i(b),b.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var f=a(b.length),m=a(16),B=0;B=0;--f)this._counter[f]=b%256,b=b>>8},P.prototype.setBytes=function(b){if(b=i(b,!0),b.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=b},P.prototype.increment=function(){for(var b=15;b>=0;b--)if(this._counter[b]===255)this._counter[b]=0;else{this._counter[b]++;break}};var F=function(b,f){if(!(this instanceof F))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",f instanceof P||(f=new P(f)),this._counter=f,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new S(b)};F.prototype.encrypt=function(b){for(var f=i(b,!0),m=0;m16)throw new Error("PKCS#7 padding byte out of range");for(var m=b.length-f,B=0;B=64;){let q=k,b=C,f=T,m=z,B=$,p=Y,I=J,L=e1,V,G,r1,u1,a1;for(G=0;G<16;G++)r1=D+G*4,i1[G]=(F[r1]&255)<<24|(F[r1+1]&255)<<16|(F[r1+2]&255)<<8|F[r1+3]&255;for(G=16;G<64;G++)V=i1[G-2],u1=(V>>>17|V<<15)^(V>>>19|V<<13)^V>>>10,V=i1[G-15],a1=(V>>>7|V<<25)^(V>>>18|V<<14)^V>>>3,i1[G]=(u1+i1[G-7]|0)+(a1+i1[G-16]|0)|0;for(G=0;G<64;G++)u1=(((B>>>6|B<<26)^(B>>>11|B<<21)^(B>>>25|B<<7))+(B&p^~B&I)|0)+(L+(N[G]+i1[G]|0)|0)|0,a1=((q>>>2|q<<30)^(q>>>13|q<<19)^(q>>>22|q<<10))+(q&b^q&f^b&f)|0,L=I,I=p,p=B,B=m+u1|0,m=f,f=b,b=q,q=u1+a1|0;k=k+q|0,C=C+b|0,T=T+f|0,z=z+m|0,$=$+B|0,Y=Y+p|0,J=J+I|0,e1=e1+L|0,D+=64,R-=64}}o1(M);let S,X=M.length%64,U=M.length/536870912|0,d=M.length<<3,x=X<56?56:120,P=M.slice(M.length-X,M.length);for(P.push(128),S=X+1;S>>24&255),P.push(U>>>16&255),P.push(U>>>8&255),P.push(U>>>0&255),P.push(d>>>24&255),P.push(d>>>16&255),P.push(d>>>8&255),P.push(d>>>0&255),o1(P),[k>>>24&255,k>>>16&255,k>>>8&255,k>>>0&255,C>>>24&255,C>>>16&255,C>>>8&255,C>>>0&255,T>>>24&255,T>>>16&255,T>>>8&255,T>>>0&255,z>>>24&255,z>>>16&255,z>>>8&255,z>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,e1>>>24&255,e1>>>16&255,e1>>>8&255,e1>>>0&255]}function i(M,N,k){M=M.length<=64?M:u(M);const C=64+N.length+4,T=new Array(C),z=new Array(64);let $,Y=[];for($=0;$<64;$++)T[$]=54;for($=0;$=C-4;e1--){if(T[e1]++,T[e1]<=255)return;T[e1]=0}}for(;k>=32;)J(),Y=Y.concat(u(z.concat(u(T)))),k-=32;return k>0&&(J(),Y=Y.concat(u(z.concat(u(T))).slice(0,k))),Y}function a(M,N,k,C,T){let z;for(c(M,(2*k-1)*16,T,0,16),z=0;z<2*k;z++)l(M,z*16,T,16),s(T,C),c(T,0,M,N+z*16,16);for(z=0;z>>32-N}function s(M,N){c(M,0,N,0,16);for(let k=8;k>0;k-=2)N[4]^=o(N[0]+N[12],7),N[8]^=o(N[4]+N[0],9),N[12]^=o(N[8]+N[4],13),N[0]^=o(N[12]+N[8],18),N[9]^=o(N[5]+N[1],7),N[13]^=o(N[9]+N[5],9),N[1]^=o(N[13]+N[9],13),N[5]^=o(N[1]+N[13],18),N[14]^=o(N[10]+N[6],7),N[2]^=o(N[14]+N[10],9),N[6]^=o(N[2]+N[14],13),N[10]^=o(N[6]+N[2],18),N[3]^=o(N[15]+N[11],7),N[7]^=o(N[3]+N[15],9),N[11]^=o(N[7]+N[3],13),N[15]^=o(N[11]+N[7],18),N[1]^=o(N[0]+N[3],7),N[2]^=o(N[1]+N[0],9),N[3]^=o(N[2]+N[1],13),N[0]^=o(N[3]+N[2],18),N[6]^=o(N[5]+N[4],7),N[7]^=o(N[6]+N[5],9),N[4]^=o(N[7]+N[6],13),N[5]^=o(N[4]+N[7],18),N[11]^=o(N[10]+N[9],7),N[8]^=o(N[11]+N[10],9),N[9]^=o(N[8]+N[11],13),N[10]^=o(N[9]+N[8],18),N[12]^=o(N[15]+N[14],7),N[13]^=o(N[12]+N[15],9),N[14]^=o(N[13]+N[12],13),N[15]^=o(N[14]+N[13],18);for(let k=0;k<16;++k)M[k]+=N[k]}function l(M,N,k,C){for(let T=0;T=256)return!1}return!0}function v(M,N){if(typeof M!="number"||M%1)throw new Error("invalid "+N);return M}function w(M,N,k,C,T,z,$){if(k=v(k,"N"),C=v(C,"r"),T=v(T,"p"),z=v(z,"dkLen"),k===0||k&k-1)throw new Error("N must be power of 2");if(k>2147483647/128/C)throw new Error("N too large");if(C>2147483647/128/T)throw new Error("r too large");if(!y(M))throw new Error("password must be an array or buffer");if(M=Array.prototype.slice.call(M),!y(N))throw new Error("salt must be an array or buffer");N=Array.prototype.slice.call(N);let Y=i(M,N,T*128*C);const J=new Uint32Array(T*32*C);for(let B=0;Bb&&(B=b);for(let I=0;Ib&&(B=b);for(let I=0;I>0&255),Y.push(J[I]>>8&255),Y.push(J[I]>>16&255),Y.push(J[I]>>24&255);const p=i(M,Y,z);return $&&$(null,1,p),p}$&&f(m)};if(!$)for(;;){const B=m();if(B!=null)return B}m()}const _={scrypt:function(M,N,k,C,T,z,$){return new Promise(function(Y,J){let e1=0;$&&$(0),w(M,N,k,C,T,z,function(i1,o1,S){if(i1)J(i1);else if(S)$&&e1!==1&&$(1),Y(new Uint8Array(S));else if($&&o1!==e1)return e1=o1,$(o1)})})},syncScrypt:function(M,N,k,C,T,z){return new Uint8Array(w(M,N,k,C,T,z))}};t.exports=_})()})(ab);var DB=ab.exports;const Q4=Pt(DB);var _B=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const hs=new Z(ib);function rc(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class kB extends Jr{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function SB(t,e,r){if(re(t,"crypto/cipher")==="aes-128-ctr"){const u=A2(re(t,"crypto/cipherparams/iv")),i=new p6.Counter(u),a=new p6.ModeOfOperation.ctr(e,i);return v1(a.decrypt(r))}return null}function ob(t,e){const r=A2(re(t,"crypto/ciphertext"));if(F1(T0(I0([e.slice(16,32),r]))).substring(2)!==re(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const u=SB(t,e.slice(0,16),r);u||hs.throwError("unsupported cipher",Z.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const i=e.slice(32,64),a=Ir(u);if(t.address){let s=t.address.toLowerCase();if(s.substring(0,2)!=="0x"&&(s="0x"+s),B0(s)!==a)throw new Error("address mismatch")}const o={_isKeystoreAccount:!0,address:a,privateKey:F1(u)};if(re(t,"x-ethers/version")==="0.1"){const s=A2(re(t,"x-ethers/mnemonicCiphertext")),l=A2(re(t,"x-ethers/mnemonicCounter")),c=new p6.Counter(l),y=new p6.ModeOfOperation.ctr(i,c),v=re(t,"x-ethers/path")||Xn,w=re(t,"x-ethers/locale")||"en",_=v1(y.decrypt(s));try{const M=Ka(_,w),N=st.fromMnemonic(M,null,w).derivePath(v);if(N.privateKey!=o.privateKey)throw new Error("mnemonic mismatch");o.mnemonic=N.mnemonic}catch(M){if(M.code!==Z.errors.INVALID_ARGUMENT||M.argument!=="wordlist")throw M}}return new kB(o)}function sb(t,e,r,n,u){return v1(K4(t,e,r,n,u))}function TB(t,e,r,n,u){return Promise.resolve(sb(t,e,r,n,u))}function lb(t,e,r,n,u){const i=V4(e),a=re(t,"crypto/kdf");if(a&&typeof a=="string"){const o=function(s,l){return hs.throwArgumentError("invalid key-derivation function parameters",s,l)};if(a.toLowerCase()==="scrypt"){const s=A2(re(t,"crypto/kdfparams/salt")),l=parseInt(re(t,"crypto/kdfparams/n")),c=parseInt(re(t,"crypto/kdfparams/r")),y=parseInt(re(t,"crypto/kdfparams/p"));(!l||!c||!y)&&o("kdf",a),l&l-1&&o("N",l);const v=parseInt(re(t,"crypto/kdfparams/dklen"));return v!==32&&o("dklen",v),n(i,s,l,c,y,64,u)}else if(a.toLowerCase()==="pbkdf2"){const s=A2(re(t,"crypto/kdfparams/salt"));let l=null;const c=re(t,"crypto/kdfparams/prf");c==="hmac-sha256"?l="sha256":c==="hmac-sha512"?l="sha512":o("prf",c);const y=parseInt(re(t,"crypto/kdfparams/c")),v=parseInt(re(t,"crypto/kdfparams/dklen"));return v!==32&&o("dklen",v),r(i,s,y,v,l)}}return hs.throwArgumentError("unsupported key-derivation function","kdf",a)}function fb(t,e){const r=JSON.parse(t),n=lb(r,e,sb,Q4.syncScrypt);return ob(r,n)}function cb(t,e,r){return _B(this,void 0,void 0,function*(){const n=JSON.parse(t),u=yield lb(n,e,TB,Q4.scrypt,r);return ob(n,u)})}function db(t,e,r,n){try{if(B0(t.address)!==Ir(t.privateKey))throw new Error("address/privateKey mismatch");if(rc(t)){const N=t.mnemonic;if(st.fromMnemonic(N.phrase,null,N.locale).derivePath(N.path||Xn).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(N){return Promise.reject(N)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const u=v1(t.privateKey),i=V4(e);let a=null,o=null,s=null;if(rc(t)){const N=t.mnemonic;a=v1(Ha(N.phrase,N.locale||"en")),o=N.path||Xn,s=N.locale||"en"}let l=r.client;l||(l="ethers.js");let c=null;r.salt?c=v1(r.salt):c=vn(32);let y=null;if(r.iv){if(y=v1(r.iv),y.length!==16)throw new Error("invalid iv")}else y=vn(16);let v=null;if(r.uuid){if(v=v1(r.uuid),v.length!==16)throw new Error("invalid uuid")}else v=vn(16);let w=1<<17,_=8,M=1;return r.scrypt&&(r.scrypt.N&&(w=r.scrypt.N),r.scrypt.r&&(_=r.scrypt.r),r.scrypt.p&&(M=r.scrypt.p)),Q4.scrypt(i,c,w,_,M,64,n).then(N=>{N=v1(N);const k=N.slice(0,16),C=N.slice(16,32),T=N.slice(32,64),z=new p6.Counter(y),$=new p6.ModeOfOperation.ctr(k,z),Y=v1($.encrypt(u)),J=T0(I0([C,Y])),e1={address:t.address.substring(2).toLowerCase(),id:EB(v),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:F1(y).substring(2)},ciphertext:F1(Y).substring(2),kdf:"scrypt",kdfparams:{salt:F1(c).substring(2),n:w,dklen:32,p:M,r:_},mac:J.substring(2)}};if(a){const i1=vn(16),o1=new p6.Counter(i1),S=new p6.ModeOfOperation.ctr(T,o1),X=v1(S.encrypt(a)),U=new Date,d=U.getUTCFullYear()+"-"+Mu(U.getUTCMonth()+1,2)+"-"+Mu(U.getUTCDate(),2)+"T"+Mu(U.getUTCHours(),2)+"-"+Mu(U.getUTCMinutes(),2)+"-"+Mu(U.getUTCSeconds(),2)+".0Z";e1["x-ethers"]={client:l,gethFilename:"UTC--"+d+"--"+e1.address,mnemonicCounter:F1(i1).substring(2),mnemonicCiphertext:F1(X).substring(2),path:o,locale:s,version:"0.1"}}return JSON.stringify(e1)})}function hb(t,e,r){if(Ga(t)){r&&r(0);const n=W4(t,e);return r&&r(1),Promise.resolve(n)}return Va(t)?cb(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function pb(t,e){if(Ga(t))return W4(t,e);if(Va(t))return fb(t,e);throw new Error("invalid JSON wallet")}const PB=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:W4,decryptJsonWallet:hb,decryptJsonWalletSync:pb,decryptKeystore:cb,decryptKeystoreSync:fb,encryptKeystore:db,getJsonWalletAddress:BB,isCrowdsaleWallet:Ga,isKeystoreWallet:Va},Symbol.toStringTag,{value:"Module"})),NB="wallet/5.7.0";var nc=function(t,e,r,n){function u(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function o(c){try{l(n.next(c))}catch(y){a(y)}}function s(c){try{l(n.throw(c))}catch(y){a(y)}}function l(c){c.done?i(c.value):u(c.value).then(o,s)}l((n=n.apply(t,e||[])).next())})};const tn=new Z(NB);function MB(t){return t!=null&&W1(t.privateKey,32)&&t.address!=null}function UB(t){const e=t.mnemonic;return e&&e.phrase}class c2 extends j2{constructor(e,r){if(super(),MB(e)){const n=new v2(e.privateKey);if(s1(this,"_signingKey",()=>n),s1(this,"address",Ir(this.publicKey)),this.address!==B0(e.address)&&tn.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),UB(e)){const u=e.mnemonic;s1(this,"_mnemonic",()=>({phrase:u.phrase,path:u.path||Xn,locale:u.locale||"en"}));const i=this.mnemonic,a=st.fromMnemonic(i.phrase,null,i.locale).derivePath(i.path);Ir(a.privateKey)!==this.address&&tn.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else s1(this,"_mnemonic",()=>null)}else{if(v2.isSigningKey(e))e.curve!=="secp256k1"&&tn.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),s1(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new v2(e);s1(this,"_signingKey",()=>n)}s1(this,"_mnemonic",()=>null),s1(this,"address",Ir(this.publicKey))}r&&!R2.isProvider(r)&&tn.throwArgumentError("invalid provider","provider",r),s1(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new c2(this,e)}signTransaction(e){return X0(e).then(r=>{r.from!=null&&(B0(r.from)!==this.address&&tn.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(T0(os(r)));return os(r,n)})}signMessage(e){return nc(this,void 0,void 0,function*(){return X3(this._signingKey().signDigest(N4(e)))})}_signTypedData(e,r,n){return nc(this,void 0,void 0,function*(){const u=yield Ee.resolveNames(e,r,n,i=>(this.provider==null&&tn.throwError("cannot resolve ENS names without a provider",Z.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:i}),this.provider.resolveName(i)));return X3(this._signingKey().signDigest(Ee.hash(u.domain,r,u.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),db(this,e,r,n)}static createRandom(e){let r=vn(16);e||(e={}),e.extraEntropy&&(r=v1(ne(T0(I0([r,e.extraEntropy])),0,16)));const n=Ka(r,e.locale);return c2.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return hb(e,r,n).then(u=>new c2(u))}static fromEncryptedJsonSync(e,r){return new c2(pb(e,r))}static fromMnemonic(e,r,n){return r||(r=Xn),new c2(st.fromMnemonic(e,null,n).derivePath(r))}}function OB(t,e){return r5(N4(t),e)}function IB(t,e,r,n){return r5(Ee.hash(t,e,r),n)}const RB=Object.freeze(Object.defineProperty({__proto__:null,Wallet:c2,verifyMessage:OB,verifyTypedData:IB},Symbol.toStringTag,{value:"Module"})),LB="solidity/5.7.0",jB=new RegExp("^bytes([0-9]+)$"),zB=new RegExp("^(u?int)([0-9]*)$"),$B=new RegExp("^(.*)\\[([0-9]*)\\]$"),qB="0000000000000000000000000000000000000000000000000000000000000000",an=new Z(LB);function bb(t,e,r){switch(t){case"address":return r?Yu(e,32):v1(e);case"string":return z0(e);case"bytes":return v1(e);case"bool":return e=e?"0x01":"0x00",r?Yu(e,32):v1(e)}let n=t.match(zB);if(n){let u=parseInt(n[2]||"256");return(n[2]&&String(u)!==n[2]||u%8!==0||u===0||u>256)&&an.throwArgumentError("invalid number type","type",t),r&&(u=256),e=C1.from(e).toTwos(u),Yu(e,u/8)}if(n=t.match(jB),n){const u=parseInt(n[1]);return(String(u)!==n[1]||u===0||u>32)&&an.throwArgumentError("invalid bytes type","type",t),v1(e).byteLength!==u&&an.throwArgumentError(`invalid value for ${t}`,"value",e),r?v1((e+qB).substring(0,66)):e}if(n=t.match($B),n&&Array.isArray(e)){const u=n[1];parseInt(n[2]||String(e.length))!=e.length&&an.throwArgumentError(`invalid array length for ${t}`,"value",e);const a=[];return e.forEach(function(o){a.push(bb(u,o,!0))}),I0(a)}return an.throwArgumentError("invalid type","type",t)}function J4(t,e){t.length!=e.length&&an.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,u){r.push(bb(n,e[u]))}),F1(I0(r))}function HB(t,e){return T0(J4(t,e))}function KB(t,e){return pt(J4(t,e))}const GB=Object.freeze(Object.defineProperty({__proto__:null,keccak256:HB,pack:J4,sha256:KB},Symbol.toStringTag,{value:"Module"})),VB="units/5.7.0",mb=new Z(VB),yb=["wei","kwei","mwei","gwei","szabo","finney","ether"];function WB(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&mb.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let u="";for(e.length===2&&(u="."+(e[1]||"0"));u.length>2&&u[u.length-1]==="0";)u=u.substring(0,u.length-1);const i=[];for(;r.length;)if(r.length<=3){i.unshift(r);break}else{const a=r.length-3;i.unshift(r.substring(a)),r=r.substring(0,a)}return n+i.join(",")+u}function gb(t,e){if(typeof e=="string"){const r=yb.indexOf(e);r!==-1&&(e=3*r)}return d8(t,e??18)}function xb(t,e){if(typeof t!="string"&&mb.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=yb.indexOf(e);r!==-1&&(e=3*r)}return o6(t,e??18)}function QB(t){return gb(t,18)}function JB(t){return xb(t,18)}const YB=Object.freeze(Object.defineProperty({__proto__:null,commify:WB,formatEther:QB,formatUnits:gb,parseEther:JB,parseUnits:xb},Symbol.toStringTag,{value:"Module"})),G5=[{inputs:[],name:"AlreadyRegistered",type:"error"},{inputs:[],name:"CannotRevokeControlFromTLD",type:"error"},{inputs:[],name:"ERC721AlreadyMinted",type:"error"},{inputs:[],name:"ERC721ApproveToOwner",type:"error"},{inputs:[],name:"ERC721InvalidOwnerAddress0",type:"error"},{inputs:[],name:"ERC721InvalidTokenId",type:"error"},{inputs:[],name:"ERC721MintToAddress0",type:"error"},{inputs:[],name:"ERC721NotOwnerOrApproved",type:"error"},{inputs:[],name:"ERC721TransferFromIncorrectOwner",type:"error"},{inputs:[],name:"ERC721TransferToAddress0",type:"error"},{inputs:[],name:"ERC721TransferToNonReceiver",type:"error"},{inputs:[],name:"NotAuthorized",type:"error"},{inputs:[],name:"NotAuthorizedToMintName",type:"error"},{inputs:[],name:"NotDotUqTLD",type:"error"},{inputs:[],name:"KNSRegistryOnly",type:"error"},{inputs:[],name:"SecondLevelDomainNot9CharactersOrMore",type:"error"},{inputs:[],name:"TLDWebmasterApproveToCaller",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"child",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parent",type:"uint256"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"ControlRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"webmaster",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"Webmaster",type:"event"},{inputs:[],name:"TLD_DNS_WIRE",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"TLD_HASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"TLD_LABEL",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_fqdn",type:"bytes"},{internalType:"bytes32",name:"_tldHash",type:"bytes32"}],name:"__initTLDRegistration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_operator",type:"address"},{internalType:"bool",name:"_approved",type:"bool"}],name:"_setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"node",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_nodeId",type:"uint256"},{internalType:"address",name:"_sender",type:"address"}],name:"auth",outputs:[{internalType:"bool",name:"authed_",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_nodeId",type:"bytes32"},{internalType:"address",name:"_sender",type:"address"}],name:"auth",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_node",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInitializedVersion",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_kns",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_webmaster",type:"address"},{internalType:"uint256",name:"_node",type:"uint256"}],name:"isWebmaster",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_webmaster",type:"address"}],name:"isWebmaster",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"node",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"parents",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"kns",outputs:[{internalType:"contract IKNSRegistryResolver",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_name",type:"bytes"},{internalType:"address",name:"_to",type:"address"},{internalType:"bytes[]",name:"_data",type:"bytes[]"}],name:"register",outputs:[{internalType:"uint256",name:"nodeId_",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"_name",type:"bytes"}],name:"revokeControlOverSubdomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"node",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"node",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_operator",type:"address"},{internalType:"bool",name:"_approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_webmaster",type:"address"},{internalType:"bool",name:"_approved",type:"bool"}],name:"setWebmaster",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"node",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"}],uc="0x60a06040523060805234801561001457600080fd5b50608051612b6361004c6000396000818161095e015281816109a701528181610a6101528181610aa10152610b470152612b636000f3fe6080604052600436106101f95760003560e01c8063715018a61161010d578063b88d4fde116100a0578063d123f99a1161006f578063d123f99a146105c3578063d314c607146105d6578063d5c457141461061f578063e985e9c514610635578063f2fde38b1461065557600080fd5b8063b88d4fde1461054d578063c1ea25f11461056d578063c4d66de81461058d578063d1131c72146105ad57600080fd5b80638da5cb5b116100dc5780638da5cb5b146104d357806395d89b41146104f1578063a22cb46514610506578063b3c650151461052657600080fd5b8063715018a614610451578063819eb62514610466578063898572a6146104865780638c4e3f32146104b357600080fd5b8063303bc8ac11610190578063516a166a1161015f578063516a166a146103ae57806352d1902d146103ce5780635864c817146103f15780636352211e1461041157806370a082311461043157600080fd5b8063303bc8ac146103465780633659cfe61461035b57806342842e0e1461037b5780634f1ef2861461039b57600080fd5b806312403916116101cc57806312403916146102c65780631492017b146102e6578063169e0dde1461030657806323b872dd1461032657600080fd5b806301ffc9a7146101fe57806306fdde0314610234578063081812fc14610256578063095ea7b3146102a4575b600080fd5b34801561020a57600080fd5b5061021f61021936600461210e565b50600090565b60405190151581526020015b60405180910390f35b34801561024057600080fd5b50610249610675565b60405161022b919061217b565b34801561026257600080fd5b5061028c61027136600461218e565b6000908152600860205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200161022b565b3480156102b057600080fd5b506102c46102bf3660046121c3565b610707565b005b3480156102d257600080fd5b506102c46102e136600461222f565b610791565b3480156102f257600080fd5b5061021f61030136600461227b565b61083d565b34801561031257600080fd5b5060005461028c906001600160a01b031681565b34801561033257600080fd5b506102c46103413660046122a7565b610894565b34801561035257600080fd5b506102496108c6565b34801561036757600080fd5b506102c46103763660046122e3565b610954565b34801561038757600080fd5b506102c46103963660046122a7565b610a3c565b6102c46103a93660046123c3565b610a57565b3480156103ba57600080fd5b5061021f6103c936600461227b565b610b27565b3480156103da57600080fd5b506103e3610b3a565b60405190815260200161022b565b3480156103fd57600080fd5b506102c461040c366004612407565b610bed565b34801561041d57600080fd5b5061028c61042c36600461218e565b610cbe565b34801561043d57600080fd5b506103e361044c3660046122e3565b610cf3565b34801561045d57600080fd5b506102c4610d38565b34801561047257600080fd5b506102c461048136600461244c565b610d4c565b34801561049257600080fd5b506103e36104a136600461218e565b60d46020526000908152604090205481565b3480156104bf57600080fd5b506102c46104ce366004612476565b610d57565b3480156104df57600080fd5b50603e546001600160a01b031661028c565b3480156104fd57600080fd5b50610249610df7565b34801561051257600080fd5b506102c461052136600461244c565b610e06565b34801561053257600080fd5b5061053b610e11565b60405160ff909116815260200161022b565b34801561055957600080fd5b506102c46105683660046124b9565b610e24565b34801561057957600080fd5b5061021f6105883660046121c3565b610e57565b34801561059957600080fd5b506102c46105a83660046122e3565b610e63565b3480156105b957600080fd5b506103e360015481565b6103e36105d1366004612521565b610fd7565b3480156105e257600080fd5b5061021f6105f13660046125d2565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b34801561062b57600080fd5b506103e360025481565b34801561064157600080fd5b5061021f6106503660046125d2565b611003565b34801561066157600080fd5b506102c46106703660046122e3565b611031565b606060048054610684906125fc565b80601f01602080910402602001604051908101604052809291908181526020018280546106b0906125fc565b80156106fd5780601f106106d2576101008083540402835291602001916106fd565b820191906000526020600020905b8154815290600101906020018083116106e057829003601f168201915b5050505050905090565b600061071282610cbe565b9050806001600160a01b0316836001600160a01b0316036107465760405163091fbd5360e01b815260040160405180910390fd5b336001600160a01b0382161480159061076457506107648133611003565b15610782576040516307e8a24360e21b815260040160405180910390fd5b61078c83836110a7565b505050565b600254156107b257604051630ea075bf60e21b815260040160405180910390fd5b6000546001600160a01b031633146107dd5760405163367ae3b760e11b815260040160405180910390fd5b600281905560036107ef838583612686565b50610834600084848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506111159050565b50600155505050565b60005b8015801561085057506002548314155b1561088e5761085f838361121c565b90508061088e5761086f8361124a565b1561088a57600092835260d460205260409092205491610840565b5060005b92915050565b61089e3382611262565b6108bb576040516307e8a24360e21b815260040160405180910390fd5b61078c8383836112c1565b600380546108d3906125fc565b80601f01602080910402602001604051908101604052809291908181526020018280546108ff906125fc565b801561094c5780601f106109215761010080835404028352916020019161094c565b820191906000526020600020905b81548152906001019060200180831161092f57829003601f168201915b505050505081565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036109a55760405162461bcd60e51b815260040161099c90612747565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166109ee600080516020612ae7833981519152546001600160a01b031690565b6001600160a01b031614610a145760405162461bcd60e51b815260040161099c90612793565b610a1d816113ff565b60408051600080825260208201909252610a3991839190611407565b50565b61078c83838360405180602001604052806000815250610e24565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610a9f5760405162461bcd60e51b815260040161099c90612747565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610ae8600080516020612ae7833981519152546001600160a01b031690565b6001600160a01b031614610b0e5760405162461bcd60e51b815260040161099c90612793565b610b17826113ff565b610b2382826001611407565b5050565b6000610b33838361083d565b9392505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bda5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000606482015260840161099c565b50600080516020612ae783398151915290565b6000806000610bfb84611572565b925092509250808203610c215760405163abddc77160e01b815260040160405180910390fd5b610c2b8233610b27565b15610c9f5760006001610c3d856115d2565b179050610c598185600090815260066020526040902081905590565b506040805185815260208101859052338183015290517f7de9cdc5b55386112f86114d6e841bde7e78203bea81a912271231dffde1be769181900360600190a150610cb8565b60405163ea8e4eb560e01b815260040160405180910390fd5b50505050565b600080610cca836115e6565b90506001600160a01b03811661088e5760405163089ba7e160e41b815260040160405180910390fd5b60006001600160a01b038216610d1c57604051633d6932c760e21b815260040160405180910390fd5b506001600160a01b031660009081526007602052604090205490565b610d406115fd565b610d4a6000611657565b565b610b233383836116a9565b816001600160a01b0316836001600160a01b031603610d895760405163091fbd5360e01b815260040160405180910390fd5b6001600160a01b03838116600081815260096020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a3505050565b606060058054610684906125fc565b610b23338383610d57565b6000610e1f600b5460ff1690565b905090565b610e2e3383611262565b610e4b576040516307e8a24360e21b815260040160405180910390fd5b610cb884848484611740565b6000610b338383611774565b600b54610100900460ff1615808015610e835750600b54600160ff909116105b80610e9d5750303b158015610e9d5750600b5460ff166001145b610f005760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161099c565b600b805460ff191660011790558015610f2357600b805461ff0019166101001790555b60408051808201825260128152715571626172204e616d65205365727669636560701b6020918201528151808301909252600482526355514e5360e01b910152600080546001600160a01b0319166001600160a01b038416179055610f866117b8565b610f8e6117df565b8015610b2357600b805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600080610fe7878760003361180e565b509050610ff88787878488886119b9565b979650505050505050565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b6110396115fd565b6001600160a01b03811661109e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161099c565b610a3981611657565b600081815260086020526040902080546001600160a01b0319166001600160a01b03841690811790915581906110dc826115e6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080835183106111685760405162461bcd60e51b815260206004820152601e60248201527f726561644c6162656c3a20496e646578206f7574206f6620626f756e64730000604482015260640161099c565b600084848151811061117c5761117c6127df565b016020015160f81c9050604081106111d65760405162461bcd60e51b815260206004820152601960248201527f726561644c6162656c3a204c6162656c20746f6f206c6f6e6700000000000000604482015260640161099c565b80156111f8576111f1856111eb86600161280b565b83611b1a565b92506111fd565b600092505b611207818561280b565b61121290600161280b565b9150509250929050565b60006001600160a01b03821630148061123a575061123a8284611774565b80610b335750610b338284611262565b60008181526006602052604081205461088e90611b3e565b60008061126e836115e6565b9050806001600160a01b0316846001600160a01b0316148061129557506112958185611003565b806112b957506000838152600860205260409020546001600160a01b038581169116145b949350505050565b6001600160a01b0382166000036112eb576040516328aad33f60e21b815260040160405180910390fd5b826001600160a01b03166112fe826115e6565b6001600160a01b0316146113255760405163e146af6f60e01b815260040160405180910390fd5b826001600160a01b0316611338826115e6565b6001600160a01b03161461135f5760405163e146af6f60e01b815260040160405180910390fd5b600081815260086020908152604080832080546001600160a01b03191690556001600160a01b0386811680855260078452828520805460001901905590861680855282852080546001019055858552600690935281842080546001600160601b0316606088901b6001600160601b031916179055905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610a396115fd565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561143a5761078c83611b53565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611494575060408051601f3d908101601f191682019092526114919181019061281e565b60015b6114f75760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b606482015260840161099c565b600080516020612ae783398151915281146115665760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b606482015260840161099c565b5061078c838383611bef565b600080600080600061158386611c14565b915091506000806115948884611c2b565b6040805160208101849052908101879052919350915060600160408051808303601f1901815291905280516020909101209891975095509350505050565b60008181526006602052604081205461088e565b60008181526006602052604081205460601c61088e565b603e546001600160a01b03163314610d4a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161099c565b603e80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036116db57604051637417c83160e11b815260040160405180910390fd5b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fadc620d6f66bc2f5355112336dd7957aecdc5480a6d6e771c356503869756c449101610dea565b61174b8484846112c1565b61175784848484611d2f565b610cb857604051633a3614b760e01b815260040160405180910390fd5b6000600a6000611783846115e6565b6001600160a01b039081168252602080830193909352604091820160009081209187168152925290205460ff16905092915050565b600b54610100900460ff16610d4a5760405162461bcd60e51b815260040161099c90612837565b600b54610100900460ff166118065760405162461bcd60e51b815260040161099c90612837565b610d4a611e31565b6000806000806118578689898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506111159050565b9092509050611867600188612882565b810361189f57600154821461188f57604051631b431a5160e11b815260040160405180910390fd5b60025460019350935050506119b0565b6000806118ae8a8a858a61180e565b91509150600254821480156118cd575060096118ca8985612882565b11155b156118eb5760405163cecd40e560e01b815260040160405180910390fd5b60408051602080820185905281830187905282518083038401815260609092018352815191810191909120600081815260d490925291812054900361193c57600081815260d4602052604090208390555b88156119735761194b8161124a565b61195457600091505b8161196657611963818961121c565b91505b955093506119b092505050565b8161199157604051632b8839a960e01b815260040160405180910390fd5b60025483146119a15760006119a4565b60015b60019650965050505050505b94509492505050565b60008054604051633255528360e21b815282916001600160a01b03169063c9554a0c906119ec908b908b906004016128be565b6020604051808303816000875af1158015611a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2f919061281e565b9150819050611a3e8682611e61565b611a8b611a7786611a5b8560009081526006602052604090205490565b6001600160601b031981166001600160601b0383161792915050565b600084815260066020526040902081905590565b508215611b0f5760005460405163e32954eb60e01b81526001600160a01b039091169063e32954eb90611ac6908490889088906004016128d2565b6000604051808303816000875af1158015611ae5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b0d919081019061297b565b505b509695505050505050565b8251600090611b29838561280b565b1115611b3457600080fd5b5091016020012090565b600081158061088e5750506001908116141590565b6001600160a01b0381163b611bc05760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161099c565b600080516020612ae783398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611bf883611e7b565b600082511180611c055750805b1561078c57610cb88383611ebb565b600080611c22836000611115565b91509150915091565b600080600080611c3b8686611115565b909250905081611cb05760018651611c539190612882565b8514611ca15760405162461bcd60e51b815260206004820152601d60248201527f6e616d65686173683a204a756e6b20617420656e64206f66206e616d65000000604482015260640161099c565b5060009250829150611d289050565b600080611cbd8884611c2b565b909250905080611cf45760408051600060208201529081018590526060016040516020818303038152906040528051906020012090505b6040805160208101849052908101859052606001604051602081830303815290604052805190602001208195509550505050505b9250929050565b60006001600160a01b0384163b15611e2657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611d73903390899088908890600401612a7a565b6020604051808303816000875af1925050508015611dae575060408051601f3d908101601f19168201909252611dab91810190612aad565b60015b611e0c573d808015611ddc576040519150601f19603f3d011682016040523d82523d6000602084013e611de1565b606091505b508051600003611e0457604051633a3614b760e01b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506112b9565b506001949350505050565b600b54610100900460ff16611e585760405162461bcd60e51b815260040161099c90612837565b610d4a33611657565b610b23828260405180602001604052806000815250611ee0565b611e8481611b53565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610b338383604051806060016040528060278152602001612b0760279139611f14565b611eea8383611f8c565b611ef76000848484611d2f565b61078c57604051633a3614b760e01b815260040160405180910390fd5b6060600080856001600160a01b031685604051611f319190612aca565b600060405180830381855af49150503d8060008114611f6c576040519150601f19603f3d011682016040523d82523d6000602084013e611f71565b606091505b5091509150611f828683838761205a565b9695505050505050565b6001600160a01b038216611fb35760405163507508af60e11b815260040160405180910390fd5b60008181526006602052604090205415611fe0576040516324a255d960e11b815260040160405180910390fd5b6000818152600660205260409020541561200d576040516324a255d960e11b815260040160405180910390fd5b6001600160a01b038216600090815260076020908152604080832080546001019055928252600690522080546001600160601b031660609290921b6001600160601b031916919091179055565b606083156120c95782516000036120c2576001600160a01b0385163b6120c25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161099c565b50816112b9565b6112b983838151156120de5781518083602001fd5b8060405162461bcd60e51b815260040161099c919061217b565b6001600160e01b031981168114610a3957600080fd5b60006020828403121561212057600080fd5b8135610b33816120f8565b60005b8381101561214657818101518382015260200161212e565b50506000910152565b6000815180845261216781602086016020860161212b565b601f01601f19169290920160200192915050565b602081526000610b33602083018461214f565b6000602082840312156121a057600080fd5b5035919050565b80356001600160a01b03811681146121be57600080fd5b919050565b600080604083850312156121d657600080fd5b6121df836121a7565b946020939093013593505050565b60008083601f8401126121ff57600080fd5b50813567ffffffffffffffff81111561221757600080fd5b602083019150836020828501011115611d2857600080fd5b60008060006040848603121561224457600080fd5b833567ffffffffffffffff81111561225b57600080fd5b612267868287016121ed565b909790965060209590950135949350505050565b6000806040838503121561228e57600080fd5b8235915061229e602084016121a7565b90509250929050565b6000806000606084860312156122bc57600080fd5b6122c5846121a7565b92506122d3602085016121a7565b9150604084013590509250925092565b6000602082840312156122f557600080fd5b610b33826121a7565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561233d5761233d6122fe565b604052919050565b600067ffffffffffffffff82111561235f5761235f6122fe565b50601f01601f191660200190565b600082601f83011261237e57600080fd5b813561239161238c82612345565b612314565b8181528460208386010111156123a657600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156123d657600080fd5b6123df836121a7565b9150602083013567ffffffffffffffff8111156123fb57600080fd5b6112128582860161236d565b60006020828403121561241957600080fd5b813567ffffffffffffffff81111561243057600080fd5b6112b98482850161236d565b803580151581146121be57600080fd5b6000806040838503121561245f57600080fd5b612468836121a7565b915061229e6020840161243c565b60008060006060848603121561248b57600080fd5b612494846121a7565b92506124a2602085016121a7565b91506124b06040850161243c565b90509250925092565b600080600080608085870312156124cf57600080fd5b6124d8856121a7565b93506124e6602086016121a7565b925060408501359150606085013567ffffffffffffffff81111561250957600080fd5b6125158782880161236d565b91505092959194509250565b60008060008060006060868803121561253957600080fd5b853567ffffffffffffffff8082111561255157600080fd5b61255d89838a016121ed565b9097509550859150612571602089016121a7565b9450604088013591508082111561258757600080fd5b818801915088601f83011261259b57600080fd5b8135818111156125aa57600080fd5b8960208260051b85010111156125bf57600080fd5b9699959850939650602001949392505050565b600080604083850312156125e557600080fd5b6125ee836121a7565b915061229e602084016121a7565b600181811c9082168061261057607f821691505b60208210810361263057634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561078c576000816000526020600020601f850160051c8101602086101561265f5750805b601f850160051c820191505b8181101561267e5782815560010161266b565b505050505050565b67ffffffffffffffff83111561269e5761269e6122fe565b6126b2836126ac83546125fc565b83612636565b6000601f8411600181146126e657600085156126ce5750838201355b600019600387901b1c1916600186901b178355612740565b600083815260209020601f19861690835b8281101561271757868501358255602094850194600190920191016126f7565b50868210156127345760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561088e5761088e6127f5565b60006020828403121561283057600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b8181038181111561088e5761088e6127f5565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260006112b9602083018486612895565b6000604082018583526020604060208501528185835260608501905060608660051b86010192508660005b8781101561296d57868503605f190183528135368a9003601e1901811261292357600080fd5b8901848101903567ffffffffffffffff81111561293f57600080fd5b80360382131561294e57600080fd5b612959878284612895565b9650505091830191908301906001016128fd565b509298975050505050505050565b6000602080838503121561298e57600080fd5b825167ffffffffffffffff808211156129a657600080fd5b818501915085601f8301126129ba57600080fd5b8151818111156129cc576129cc6122fe565b8060051b6129db858201612314565b91825283810185019185810190898411156129f557600080fd5b86860192505b83831015612a6d57825185811115612a135760008081fd5b8601603f81018b13612a255760008081fd5b878101516040612a3761238c83612345565b8281528d82848601011115612a4c5760008081fd5b612a5b838c830184870161212b565b855250505091860191908601906129fb565b9998505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611f829083018461214f565b600060208284031215612abf57600080fd5b8151610b33816120f8565b60008251612adc81846020870161212b565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212209fefab139234fb45128c7107850c6927f664693838f0b11e849e298fc1eb1b8d64736f6c63430008160033",XB=t=>t.length>1;class ui extends fu{constructor(...e){XB(e)?super(...e):super(G5,uc,e[0])}deploy(e){return super.deploy(e||{})}getDeployTransaction(e){return super.getDeployTransaction(e||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new rr(G5)}static connect(e,r){return new Hr(e,G5,r)}}it(ui,"bytecode",uc),it(ui,"abi",G5);const V5=[{type:"constructor",inputs:[],stateMutability:"nonpayable"},{type:"function",name:"isApprovedForAll",inputs:[{name:"owner",type:"address",internalType:"address"},{name:"operator",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"owner",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"recordExists",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"resolver",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"setApprovalForAll",inputs:[{name:"operator",type:"address",internalType:"address"},{name:"approved",type:"bool",internalType:"bool"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setOwner",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"owner",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setRecord",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"owner",type:"address",internalType:"address"},{name:"resolver",type:"address",internalType:"address"},{name:"ttl",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setResolver",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"resolver",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setSubnodeOwner",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"label",type:"bytes32",internalType:"bytes32"},{name:"owner",type:"address",internalType:"address"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"nonpayable"},{type:"function",name:"setSubnodeRecord",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"label",type:"bytes32",internalType:"bytes32"},{name:"owner",type:"address",internalType:"address"},{name:"resolver",type:"address",internalType:"address"},{name:"ttl",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setTTL",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"ttl",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"ttl",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint64",internalType:"uint64"}],stateMutability:"view"},{type:"event",name:"ApprovalForAll",inputs:[{name:"owner",type:"address",indexed:!0,internalType:"address"},{name:"operator",type:"address",indexed:!0,internalType:"address"},{name:"approved",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"NewOwner",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"label",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"owner",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"NewResolver",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"resolver",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"NewTTL",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"ttl",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"Transfer",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"owner",type:"address",indexed:!1,internalType:"address"}],anonymous:!1}],ic="0x608060405234801561001057600080fd5b5060008080526020527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb580546001600160a01b031916331790556109b5806100596000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80635b0fc9c3116100715780635b0fc9c3146101ab5780635ef2c7f0146101be578063a22cb465146101d1578063cf408823146101e4578063e985e9c5146101f7578063f79fe5381461024357600080fd5b80630178b8bf146100b957806302571be31461010257806306ab59231461011557806314ab90381461013657806316a25cbd1461014b5780631896f70a14610198575b600080fd5b6100e56100c73660046107a4565b6000908152602081905260409020600101546001600160a01b031690565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e56101103660046107a4565b61026e565b6101286101233660046107d9565b61029c565b6040519081526020016100f9565b610149610144366004610826565b61036c565b005b61017f6101593660046107a4565b600090815260208190526040902060010154600160a01b900467ffffffffffffffff1690565b60405167ffffffffffffffff90911681526020016100f9565b6101496101a6366004610852565b61043f565b6101496101b9366004610852565b610504565b6101496101cc366004610875565b6105a6565b6101496101df3660046108cc565b6105c8565b6101496101f2366004610908565b610634565b610233610205366004610955565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b60405190151581526020016100f9565b6102336102513660046107a4565b6000908152602081905260409020546001600160a01b0316151590565b6000818152602081905260408120546001600160a01b03163081036102965750600092915050565b92915050565b60008381526020819052604081205484906001600160a01b0316338114806102e757506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b6102f057600080fd5b60408051602080820189905281830188905282518083038401815260609092019092528051910120610322818661064f565b6040516001600160a01b0386168152869088907fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e829060200160405180910390a39695505050505050565b60008281526020819052604090205482906001600160a01b0316338114806103b757506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b6103c057600080fd5b60405167ffffffffffffffff8416815284907f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa689060200160405180910390a25050600091825260208290526040909120600101805467ffffffffffffffff909216600160a01b0267ffffffffffffffff60a01b19909216919091179055565b60008281526020819052604090205482906001600160a01b03163381148061048a57506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b61049357600080fd5b6040516001600160a01b038416815284907f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a09060200160405180910390a2505060009182526020829052604090912060010180546001600160a01b0319166001600160a01b03909216919091179055565b60008281526020819052604090205482906001600160a01b03163381148061054f57506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b61055857600080fd5b610562848461064f565b6040516001600160a01b038416815284907fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d2669060200160405180910390a250505050565b60006105b386868661029c565b90506105c081848461067d565b505050505050565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61063e8484610504565b61064984838361067d565b50505050565b60009182526020829052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b6000838152602081905260409020600101546001600160a01b03838116911614610703576000838152602081815260409182902060010180546001600160a01b0319166001600160a01b038616908117909155915191825284917f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0910160405180910390a25b60008381526020819052604090206001015467ffffffffffffffff828116600160a01b909204161461079f5760008381526020818152604091829020600101805467ffffffffffffffff60a01b1916600160a01b67ffffffffffffffff861690810291909117909155915191825284917f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68910160405180910390a25b505050565b6000602082840312156107b657600080fd5b5035919050565b80356001600160a01b03811681146107d457600080fd5b919050565b6000806000606084860312156107ee57600080fd5b8335925060208401359150610805604085016107bd565b90509250925092565b803567ffffffffffffffff811681146107d457600080fd5b6000806040838503121561083957600080fd5b823591506108496020840161080e565b90509250929050565b6000806040838503121561086557600080fd5b82359150610849602084016107bd565b600080600080600060a0868803121561088d57600080fd5b85359450602086013593506108a4604087016107bd565b92506108b2606087016107bd565b91506108c06080870161080e565b90509295509295909350565b600080604083850312156108df57600080fd5b6108e8836107bd565b9150602083013580151581146108fd57600080fd5b809150509250929050565b6000806000806080858703121561091e57600080fd5b8435935061092e602086016107bd565b925061093c604086016107bd565b915061094a6060860161080e565b905092959194509250565b6000806040838503121561096857600080fd5b610971836107bd565b9150610849602084016107bd56fea2646970667358221220b6c3be93ffec5e5a47b9f372710d65c59860b6986beedbb852960b07092f2f0a64736f6c63430008170033",ZB=t=>t.length>1;class ii extends fu{constructor(...e){ZB(e)?super(...e):super(V5,ic,e[0])}deploy(e){return super.deploy(e||{})}getDeployTransaction(e){return super.getDeployTransaction(e||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new rr(V5)}static connect(e,r){return new Hr(e,V5,r)}}it(ii,"bytecode",ic),it(ii,"abi",V5);const W5=[{type:"constructor",inputs:[{name:"_ensregistry",type:"address",internalType:"address"},{name:"_ensnamewrapper",type:"address",internalType:"address"},{name:"_lz",type:"address",internalType:"address"},{name:"_lzc",type:"uint16",internalType:"uint16"},{name:"_exit",type:"address",internalType:"address"},{name:"_exitlzc",type:"uint16",internalType:"uint16"}],stateMutability:"nonpayable"},{type:"fallback",stateMutability:"payable"},{type:"receive",stateMutability:"payable"},{type:"function",name:"cash",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"ensnamewrapper",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"ensregistry",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"exitlzc",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"exitpath",inputs:[],outputs:[{name:"",type:"bytes",internalType:"bytes"}],stateMutability:"view"},{type:"function",name:"lz",inputs:[],outputs:[{name:"",type:"address",internalType:"contract ILayerZeroEndpoint"}],stateMutability:"view"},{type:"function",name:"lzc",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"ping",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setKNSRecords",inputs:[{name:"fqdn",type:"bytes",internalType:"bytes"},{name:"data",type:"bytes[]",internalType:"bytes[]"}],outputs:[],stateMutability:"nonpayable"},{type:"error",name:"NotEnsOwner",inputs:[]}],ac="0x6101406040523480156200001257600080fd5b5060405162000fd538038062000fd58339810160408190526200003591620000e3565b6001600160a01b03868116610100528581166101205233608052841660a05261ffff831660c0526040516001600160601b0319606084811b8216602084015230901b166034820152604801604051602081830303815290604052600090816200009f91906200020b565b5061ffff1660e05250620002d79350505050565b80516001600160a01b0381168114620000cb57600080fd5b919050565b805161ffff81168114620000cb57600080fd5b60008060008060008060c08789031215620000fd57600080fd5b6200010887620000b3565b95506200011860208801620000b3565b94506200012860408801620000b3565b93506200013860608801620000d0565b92506200014860808801620000b3565b91506200015860a08801620000d0565b90509295509295509295565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200018f57607f821691505b602082108103620001b057634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000206576000816000526020600020601f850160051c81016020861015620001e15750805b601f850160051c820191505b818110156200020257828155600101620001ed565b5050505b505050565b81516001600160401b0381111562000227576200022762000164565b6200023f816200023884546200017a565b84620001b6565b602080601f8311600181146200027757600084156200025e5750858301515b600019600386901b1c1916600185901b17855562000202565b600085815260208120601f198616915b82811015620002a85788860151825594840194600190910190840162000287565b5085821015620002c75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516101005161012051610c866200034f6000396000818160aa01528181610340015261038d01526000818161024a01526102d101526000818160fb01526106f50152600061016201526000818161019601526106c6015260008181610201015261057c0152610c866000f3fe60806040526004361061008f5760003560e01c80635c36b186116100565780635c36b186146101b85780637fee035f146101cd5780638da5cb5b146101ef578063961be39114610223578063ba503bee1461023857005b8063065aeebc146100985780630d448b78146100e95780631105d7cb1461013057806330ff44b61461015057806333f97b591461018457005b3661009657005b005b3480156100a457600080fd5b506100cc7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100f557600080fd5b5061011d7f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff90911681526020016100e0565b34801561013c57600080fd5b5061009661014b366004610880565b61026c565b34801561015c57600080fd5b5061011d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561019057600080fd5b506100cc7f000000000000000000000000000000000000000000000000000000000000000081565b3480156101c457600080fd5b506100966104a3565b3480156101d957600080fd5b506101e26104e3565b6040516100e0919061098b565b3480156101fb57600080fd5b506100cc7f000000000000000000000000000000000000000000000000000000000000000081565b34801561022f57600080fd5b50610096610571565b34801561024457600080fd5b506100cc7f000000000000000000000000000000000000000000000000000000000000000081565b60006102ad85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525092506105eb915050565b6040516302571be360e01b8152600481018290529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906302571be390602401602060405180830381865afa158015610318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033c91906109a5565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031603610403576040516331a9108f60e11b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa1580156103dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040091906109a5565b90505b6001600160a01b038116331461042c576040516384760f9960e01b815260040160405180910390fd5b6000636a0d1c3460e01b338888888860405160240161044f9594939291906109f7565b60408051601f19818403018152918152602080830180516001600160e01b03166001600160e01b0319909516949094179093528051928301905260008252915061049a9082906106b0565b50505050505050565b6040805160048152602481018252602080820180516001600160e01b0316632e1b58c360e11b1790528251908101909252600082526104e1916106b0565b565b600080546104f090610ab9565b80601f016020809104026020016040519081016040528092919081815260200182805461051c90610ab9565b80156105695780601f1061053e57610100808354040283529160200191610569565b820191906000526020600020905b81548152906001019060200180831161054c57829003601f168201915b505050505081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105a657600080fd5b60405133904790600081818185875af1925050503d80600081146105e6576040519150601f19603f3d011682016040523d82523d6000602084013e505050565b505050565b60008060006105fa8585610755565b90925090508161067157600185516106129190610b09565b84146106655760405162461bcd60e51b815260206004820152601d60248201527f6e616d65686173683a204a756e6b20617420656e64206f66206e616d6500000060448201526064015b60405180910390fd5b50600091506106aa9050565b61067b85826105eb565b604080516020810192909252810183905260600160405160208183030381529060405280519060200120925050505b92915050565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100904790610728907f0000000000000000000000000000000000000000000000000000000000000000906000908890309083908a90600401610b1c565b6000604051808303818588803b15801561074157600080fd5b505af115801561049a573d6000803e3d6000fd5b600080835183106107a85760405162461bcd60e51b815260206004820152601e60248201527f726561644c6162656c3a20496e646578206f7574206f6620626f756e64730000604482015260640161065c565b60008484815181106107bc576107bc610c27565b016020015160f81c9050604081106108165760405162461bcd60e51b815260206004820152601960248201527f726561644c6162656c3a204c6162656c20746f6f206c6f6e6700000000000000604482015260640161065c565b8015610838576108318561082b866001610c3d565b8361085c565b925061083d565b600092505b6108478185610c3d565b610852906001610c3d565b9150509250929050565b825160009061086b8385610c3d565b111561087657600080fd5b5091016020012090565b6000806000806040858703121561089657600080fd5b843567ffffffffffffffff808211156108ae57600080fd5b818701915087601f8301126108c257600080fd5b8135818111156108d157600080fd5b8860208285010111156108e357600080fd5b6020928301965094509086013590808211156108fe57600080fd5b818701915087601f83011261091257600080fd5b81358181111561092157600080fd5b8860208260051b850101111561093657600080fd5b95989497505060200194505050565b6000815180845260005b8181101561096b5760208185018101518683018201520161094f565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061099e6020830184610945565b9392505050565b6000602082840312156109b757600080fd5b81516001600160a01b038116811461099e57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b038616815260606020808301829052600091610a1d90840187896109ce565b8381036040850152848152818101600586901b820183018760005b88811015610aa857848303601f190184528135368b9003601e19018112610a5e57600080fd5b8a01868101903567ffffffffffffffff811115610a7a57600080fd5b803603821315610a8957600080fd5b610a948582846109ce565b958801959450505090850190600101610a38565b50909b9a5050505050505050505050565b600181811c90821680610acd57607f821691505b602082108103610aed57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156106aa576106aa610af3565b61ffff871681526000602060c06020840152600088548160018260011c91506001831680610b4b57607f831692505b602083108103610b6957634e487b7160e01b85526022600452602485fd5b60c0880183905260e08801818015610b885760018114610b9e57610bc9565b60ff198616825284151560051b82019650610bc9565b60008f81526020902060005b86811015610bc357815484820152908501908901610baa565b83019750505b5050505050508381036040850152610be18189610945565b915050610bf960608401876001600160a01b03169052565b6001600160a01b038516608084015282810360a0840152610c1a8185610945565b9998505050505050505050565b634e487b7160e01b600052603260045260246000fd5b808201808211156106aa576106aa610af356fea2646970667358221220e3ac694477aa6f714010898307fc04e89a5db768141cf94df85e978acab5985764736f6c63430008170033",eD=t=>t.length>1;class ai extends fu{constructor(...e){eD(e)?super(...e):super(W5,ac,e[0])}deploy(e,r,n,u,i,a,o){return super.deploy(e,r,n,u,i,a,o||{})}getDeployTransaction(e,r,n,u,i,a,o){return super.getDeployTransaction(e,r,n,u,i,a,o||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new rr(W5)}static connect(e,r){return new Hr(e,W5,r)}}it(ai,"bytecode",ac),it(ai,"abi",W5);const Q5=[{type:"constructor",inputs:[{name:"_kns",type:"address",internalType:"address"},{name:"_lz",type:"address",internalType:"address"},{name:"_lzc",type:"uint16",internalType:"uint16"}],stateMutability:"nonpayable"},{type:"function",name:"__initTLDRegistration",inputs:[{name:"fqdn",type:"bytes",internalType:"bytes"},{name:"tld",type:"bytes32",internalType:"bytes32"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"auth",inputs:[{name:"_nodeId",type:"bytes32",internalType:"bytes32"},{name:"_sender",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"ensowners",inputs:[{name:"",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"kns",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"lz",inputs:[],outputs:[{name:"",type:"address",internalType:"contract ILayerZeroEndpoint"}],stateMutability:"view"},{type:"function",name:"lzReceive",inputs:[{name:"_chain",type:"uint16",internalType:"uint16"},{name:"_path",type:"bytes",internalType:"bytes"},{name:"",type:"uint64",internalType:"uint64"},{name:"_payload",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"lzc",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"ownerOf",inputs:[{name:"node",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"nonpayable"},{type:"function",name:"ping",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setBaseNode",inputs:[{name:"node",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setEntry",inputs:[{name:"_entry",type:"address",internalType:"address"},{name:"_entrychain",type:"uint16",internalType:"uint16"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setKNSRecords",inputs:[{name:"owner",type:"address",internalType:"address"},{name:"fqdn",type:"bytes",internalType:"bytes"},{name:"data",type:"bytes[]",internalType:"bytes[]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"simulate",inputs:[{name:"_payload",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"trustedentries",inputs:[{name:"",type:"uint16",internalType:"uint16"}],outputs:[{name:"",type:"bytes",internalType:"bytes"}],stateMutability:"view"},{type:"event",name:"Error",inputs:[{name:"error",type:"bytes4",indexed:!1,internalType:"bytes4"}],anonymous:!1},{type:"event",name:"Pinged",inputs:[{name:"",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"error",name:"EthNameTooShort",inputs:[]},{type:"error",name:"NotEthName",inputs:[]},{type:"error",name:"ParentNotRegistered",inputs:[]}],oc="0x61010060405234801561001157600080fd5b506040516200155138038062001551833981016040819052610032916100cb565b3360e0526001600160a01b0392831660c052911660805261ffff1660a0527f93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae60009081526020527f859ecef2e168dc10231b000bd53493b42bc9d944cac29d94582c1e1d4359213180546001600160a01b03191630179055610119565b80516001600160a01b03811681146100c657600080fd5b919050565b6000806000606084860312156100e057600080fd5b6100e9846100af565b92506100f7602085016100af565b9150604084015161ffff8116811461010e57600080fd5b809150509250925092565b60805160a05160c05160e0516113e26200016f60003960008181610245015261085d0152600081816101da0152818161072d01526107c70152600061013901526000818161017801526102df01526113e26000f3fe608060405234801561001057600080fd5b50600436106100f45760003560e01c80635c36b18611610097578063a5cc9b8c11610066578063a5cc9b8c14610267578063aff820041461027a578063b7a9d55d146102a3578063c4a6ed1c146102b457600080fd5b80635c36b186146101fc5780636352211e146102045780636a0d1c341461022d5780638da5cb5b1461024057600080fd5b806330ff44b6116100d357806330ff44b61461013457806333f97b5914610173578063516a166a146101b257806355bf3ec7146101d557600080fd5b80621d3567146100f9578063124039161461010e5780632421706214610121575b600080fd5b61010c610107366004610ca3565b6102d4565b005b61010c61011c366004610d3d565b505050565b61010c61012f366004610d89565b6104e6565b61015b7f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff90911681526020015b60405180910390f35b61019a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161016a565b6101c56101c0366004610de2565b61052f565b604051901515815260200161016a565b61019a7f000000000000000000000000000000000000000000000000000000000000000081565b61010c61056a565b61019a610212366004610e0e565b6000908152602081905260409020546001600160a01b031690565b61010c61023b366004610e27565b6105ab565b61019a7f000000000000000000000000000000000000000000000000000000000000000081565b61010c610275366004610ed5565b610852565b61019a610288366004610e0e565b6000602081905290815260409020546001600160a01b031681565b61010c6102b1366004610e0e565b50565b6102c76102c2366004610eff565b6108db565b60405161016a9190610f3e565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103375760405162461bcd60e51b815260206004820152600360248201526210b63d60e91b60448201526064015b60405180910390fd5b61ffff86166000908152600160205260408120805461035590610f71565b80601f016020809104026020016040519081016040528092919081815260200182805461038190610f71565b80156103ce5780601f106103a3576101008083540402835291602001916103ce565b820191906000526020600020905b8154815290600101906020018083116103b157829003601f168201915b5050505050905080516000141580156103e75750805185145b8015610410575085856040516103fe929190610fab565b60405180910390208180519060200120145b6104475760405162461bcd60e51b8152602060048201526008602482015267085d1c9d5cdd195960c21b604482015260640161032e565b60008061048d305a609688888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061097592505050565b91509150816104db576020818101516040516001600160e01b03198216815290917f366d96da3b5ec9f4aeb519f286b40eccd096a5d8f2321095eb415fb56d32f0cc910160405180910390a1505b505050505050505050565b610529305a609685858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061097592505050565b50505050565b60006001600160a01b03821630148061056157506000838152602081905260409020546001600160a01b038381169116145b90505b92915050565b33301461057657600080fd5b6040513081527fcd1f5876a7d71dd23dec305977c08069d94c421d8eccf041570b143e2312045d9060200160405180910390a1565b3330146105b757600080fd5b60058310156105d95760405163a0b3278960e01b815260040160405180910390fd5b83836105e6600582610fd1565b6105f292869290610fe4565b604051610600929190610fab565b6040519081900390207fc65934a88d283a635602ca15e14e8b9a9a3d150eacacca3b07f4a85f5fdbface1461064757604051624945f960e61b815260040160405180910390fd5b60008061068986868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a0092505050565b90925090507f93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae82148015906106d357506000828152602081905260409020546001600160a01b0316155b156106f1576040516336e8c0db60e21b815260040160405180910390fd5b6000818152602081905260409081902080546001600160a01b0319166001600160a01b038a8116919091179091559051633255528360e21b81527f00000000000000000000000000000000000000000000000000000000000000009091169063c9554a0c906107669089908990600401611037565b6020604051808303816000875af1158015610785573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a99190611053565b5082156108495760405163e32954eb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e32954eb906108009084908890889060040161106c565b6000604051808303816000875af115801561081f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610847919081019061115c565b505b50505050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461088757600080fd5b6040516bffffffffffffffffffffffff19606084811b8216602084015230901b16603482015260480160408051601f1981840301815291815261ffff831660009081526001602052209061011c90826112c3565b600160205260009081526040902080546108f490610f71565b80601f016020809104026020016040519081016040528092919081815260200182805461092090610f71565b801561096d5780601f106109425761010080835404028352916020019161096d565b820191906000526020600020905b81548152906001019060200180831161095057829003601f168201915b505050505081565b6000606060008060008661ffff1667ffffffffffffffff81111561099b5761099b611115565b6040519080825280601f01601f1916602001820160405280156109c5576020820181803683370190505b50905060008087516020890160008d8df191503d9250868311156109e7578692505b828152826000602083013e909890975095505050505050565b6000808080610a0f8582610a59565b90925090506000610a208683610b60565b60408051602080820184905281830187905282518083038401815260609092019092528051910120909150819094509450505050915091565b60008083518310610aac5760405162461bcd60e51b815260206004820152601e60248201527f726561644c6162656c3a20496e646578206f7574206f6620626f756e64730000604482015260640161032e565b6000848481518110610ac057610ac0611383565b016020015160f81c905060408110610b1a5760405162461bcd60e51b815260206004820152601960248201527f726561644c6162656c3a204c6162656c20746f6f206c6f6e6700000000000000604482015260640161032e565b8015610b3c57610b3585610b2f866001611399565b83610c1f565b9250610b41565b600092505b610b4b8185611399565b610b56906001611399565b9150509250929050565b6000806000610b6f8585610a59565b909250905081610be15760018551610b879190610fd1565b8414610bd55760405162461bcd60e51b815260206004820152601d60248201527f6e616d65686173683a204a756e6b20617420656e64206f66206e616d65000000604482015260640161032e565b50600091506105649050565b610beb8582610b60565b6040805160208101929092528101839052606001604051602081830303815290604052805190602001209250505092915050565b8251600090610c2e8385611399565b1115610c3957600080fd5b5091016020012090565b803561ffff81168114610c5557600080fd5b919050565b60008083601f840112610c6c57600080fd5b50813567ffffffffffffffff811115610c8457600080fd5b602083019150836020828501011115610c9c57600080fd5b9250929050565b60008060008060008060808789031215610cbc57600080fd5b610cc587610c43565b9550602087013567ffffffffffffffff80821115610ce257600080fd5b610cee8a838b01610c5a565b9097509550604089013591508082168214610d0857600080fd5b90935060608801359080821115610d1e57600080fd5b50610d2b89828a01610c5a565b979a9699509497509295939492505050565b600080600060408486031215610d5257600080fd5b833567ffffffffffffffff811115610d6957600080fd5b610d7586828701610c5a565b909790965060209590950135949350505050565b60008060208385031215610d9c57600080fd5b823567ffffffffffffffff811115610db357600080fd5b610dbf85828601610c5a565b90969095509350505050565b80356001600160a01b0381168114610c5557600080fd5b60008060408385031215610df557600080fd5b82359150610e0560208401610dcb565b90509250929050565b600060208284031215610e2057600080fd5b5035919050565b600080600080600060608688031215610e3f57600080fd5b610e4886610dcb565b9450602086013567ffffffffffffffff80821115610e6557600080fd5b610e7189838a01610c5a565b90965094506040880135915080821115610e8a57600080fd5b818801915088601f830112610e9e57600080fd5b813581811115610ead57600080fd5b8960208260051b8501011115610ec257600080fd5b9699959850939650602001949392505050565b60008060408385031215610ee857600080fd5b610ef183610dcb565b9150610e0560208401610c43565b600060208284031215610f1157600080fd5b61056182610c43565b60005b83811015610f35578181015183820152602001610f1d565b50506000910152565b6020815260008251806020840152610f5d816040850160208701610f1a565b601f01601f19169190910160400192915050565b600181811c90821680610f8557607f821691505b602082108103610fa557634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561056457610564610fbb565b60008085851115610ff457600080fd5b8386111561100157600080fd5b5050820193919092039150565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600061104b60208301848661100e565b949350505050565b60006020828403121561106557600080fd5b5051919050565b6000604082018583526020604060208501528185835260608501905060608660051b86010192508660005b8781101561110757868503605f190183528135368a9003601e190181126110bd57600080fd5b8901848101903567ffffffffffffffff8111156110d957600080fd5b8036038213156110e857600080fd5b6110f387828461100e565b965050509183019190830190600101611097565b509298975050505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561115457611154611115565b604052919050565b6000602080838503121561116f57600080fd5b825167ffffffffffffffff8082111561118757600080fd5b8185019150601f86601f84011261119d57600080fd5b8251828111156111af576111af611115565b8060051b6111be86820161112b565b918252848101860191868101908a8411156111d857600080fd5b87870192505b83831015611265578251868111156111f65760008081fd5b8701603f81018c136112085760008081fd5b8881015160408882111561121e5761121e611115565b61122f828901601f19168c0161112b565b8281528e828486010111156112445760008081fd5b611253838d8301848701610f1a565b855250505091870191908701906111de565b9a9950505050505050505050565b601f82111561011c576000816000526020600020601f850160051c8101602086101561129c5750805b601f850160051c820191505b818110156112bb578281556001016112a8565b505050505050565b815167ffffffffffffffff8111156112dd576112dd611115565b6112f1816112eb8454610f71565b84611273565b602080601f831160018114611326576000841561130e5750858301515b600019600386901b1c1916600185901b1785556112bb565b600085815260208120601f198616915b8281101561135557888601518255948401946001909101908401611336565b50858210156113735787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b8082018082111561056457610564610fbb56fea26469706673582212208197e0f5b459d95709cef50ad0fe845f867790febbf6af1b6d9bd7ff0a9b876064736f6c63430008170033",tD=t=>t.length>1;class oi extends fu{constructor(...e){tD(e)?super(...e):super(Q5,oc,e[0])}deploy(e,r,n,u){return super.deploy(e,r,n,u||{})}getDeployTransaction(e,r,n,u){return super.getDeployTransaction(e,r,n,u||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new rr(Q5)}static connect(e,r){return new Hr(e,Q5,r)}}it(oi,"bytecode",oc),it(oi,"abi",Q5);const J5=[{inputs:[],name:"NotTLD",type:"error"},{inputs:[],name:"TLD401",type:"error"},{inputs:[],name:"TLDRegistrarOnly",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint128",name:"ip",type:"uint128"}],name:"IpUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"key",type:"bytes32"}],name:"KeyUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"address",name:"tld",type:"address"}],name:"NewTLD",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"}],name:"NodeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"}],name:"RecordsCleared",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32[]",name:"routers",type:"bytes32[]"}],name:"RoutingUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint16",name:"port",type:"uint16"}],name:"TcpUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint16",name:"port",type:"uint16"}],name:"UdpUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint16",name:"port",type:"uint16"}],name:"WsUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint16",name:"port",type:"uint16"}],name:"WtUpdate",type:"event"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"TLDs",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint96",name:"_records",type:"uint96"}],name:"clearRecords",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getInitializedVersion",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"ip",outputs:[{internalType:"uint128",name:"ip",type:"uint128"},{internalType:"uint16",name:"ws",type:"uint16"},{internalType:"uint16",name:"wt",type:"uint16"},{internalType:"uint16",name:"tcp",type:"uint16"},{internalType:"uint16",name:"udp",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"key",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicallWithNodeCheck",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"nodes",outputs:[{internalType:"contract ITLDRegistrar",name:"tld",type:"address"},{internalType:"uint96",name:"records",type:"uint96"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"fqdn",type:"bytes"}],name:"registerNode",outputs:[{internalType:"bytes32",name:"nodeHash",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"fqdn",type:"bytes"},{internalType:"address",name:"registrar",type:"address"}],name:"registerTLD",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"routers",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint128",name:"_ip",type:"uint128"},{internalType:"uint16",name:"_ws",type:"uint16"},{internalType:"uint16",name:"_wt",type:"uint16"},{internalType:"uint16",name:"_tcp",type:"uint16"},{internalType:"uint16",name:"_udp",type:"uint16"}],name:"setAllIp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint128",name:"_ip",type:"uint128"},{internalType:"uint16",name:"_ws",type:"uint16"},{internalType:"uint16",name:"_wt",type:"uint16"},{internalType:"uint16",name:"_tcp",type:"uint16"},{internalType:"uint16",name:"_udp",type:"uint16"}],name:"setDirectInfo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint128",name:"_ip",type:"uint128"}],name:"setIp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"bytes32",name:"_key",type:"bytes32"}],name:"setKey",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"bytes32[]",name:"_newRouters",type:"bytes32[]"}],name:"setRouters",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint16",name:"_tcp",type:"uint16"}],name:"setTcp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint16",name:"_udp",type:"uint16"}],name:"setUdp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint16",name:"_ws",type:"uint16"}],name:"setWs",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint16",name:"_wt",type:"uint16"}],name:"setWt",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"}],sc="0x60a06040523060805234801561001457600080fd5b50608051612e6961004c60003960008181610e9e01528181610ee7015281816111e80152818161122801526112bb0152612e696000f3fe6080604052600436106101b75760003560e01c806374191440116100ec578063c9554a0c1161008a578063decd6bd511610064578063decd6bd5146105c9578063e32954eb146105e9578063f2fde38b14610609578063fbda8c3f1461062957600080fd5b8063c9554a0c1461051a578063cf506b4a1461053a578063d86e697d1461055a57600080fd5b8063aa1fce69116100c6578063aa1fce691461047e578063ac9650d8146104ab578063b3c65015146104d8578063c7988b37146104fa57600080fd5b8063741914401461042b5780638129fc1c1461044b5780638da5cb5b1461046057600080fd5b80633940afcd116101595780634f1ef286116101335780634f1ef2861461039257806352d1902d146103a557806365184956146103c8578063715018a61461041657600080fd5b80633940afcd1461032f5780634a2a6add1461034f5780634f0575491461036f57600080fd5b80632363b1a6116101955780632363b1a6146102af578063300777af146102cf57806332946692146102ef5780633659cfe61461030f57600080fd5b806301ffc9a7146101bc57806305f93b5f146101f157806307a003301461028d575b600080fd5b3480156101c857600080fd5b506101dc6101d73660046125bc565b610656565b60405190151581526020015b60405180910390f35b3480156101fd57600080fd5b5061025261020c3660046125e6565b60ff602052600090815260409020546001600160801b0381169061ffff600160801b8204811691600160901b8104821691600160a01b8204811691600160b01b90041685565b604080516001600160801b03909616865261ffff9485166020870152928416928501929092528216606084015216608082015260a0016101e8565b34801561029957600080fd5b506102ad6102a83660046125ff565b61068d565b005b3480156102bb57600080fd5b506102ad6102ca366004612638565b6107ea565b3480156102db57600080fd5b506102ad6102ea36600461267b565b610958565b3480156102fb57600080fd5b506102ad61030a36600461269e565b610ad2565b34801561031b57600080fd5b506102ad61032a366004612722565b610e94565b34801561033b57600080fd5b506102ad61034a366004612782565b610f7c565b34801561035b57600080fd5b506102ad61036a3660046127ce565b6110e2565b34801561037b57600080fd5b506102ad61038a36600461269e565b505050505050565b6102ad6103a0366004612820565b6111de565b3480156103b157600080fd5b506103ba6112ae565b6040519081526020016101e8565b3480156103d457600080fd5b506103fe6103e33660046125e6565b60fb602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101e8565b34801561042257600080fd5b506102ad611361565b34801561043757600080fd5b506102ad610446366004612638565b611375565b34801561045757600080fd5b506102ad6114e8565b34801561046c57600080fd5b5060c9546001600160a01b03166103fe565b34801561048a57600080fd5b5061049e6104993660046125e6565b611600565b6040516101e891906128e2565b3480156104b757600080fd5b506104cb6104c6366004612926565b611662565b6040516101e891906129b8565b3480156104e457600080fd5b5060005460405160ff90911681526020016101e8565b34801561050657600080fd5b506102ad610515366004612638565b611677565b34801561052657600080fd5b506103ba610535366004612a5e565b6117ec565b34801561054657600080fd5b506102ad610555366004612a94565b6118f2565b34801561056657600080fd5b506105a26105753660046125e6565b60fc602052600090815260409020546001600160a01b03811690600160a01b90046001600160601b031682565b604080516001600160a01b0390931683526001600160601b039091166020830152016101e8565b3480156105d557600080fd5b506102ad6105e4366004612638565b611a71565b3480156105f557600080fd5b506104cb610604366004612782565b611bdf565b34801561061557600080fd5b506102ad610624366004612722565b611bf4565b34801561063557600080fd5b506103ba6106443660046125e6565b60fd6020526000908152604090205481565b60006001600160e01b03198216632065a08b60e01b148061068757506301ffc9a760e01b6001600160e01b03198316145b92915050565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa1580156106e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070d9190612ae8565b61072a57604051634745a29b60e01b815260040160405180910390fd5b600083815260fd60205260409020829055811561077c57600083815260fc6020526040902080546001600160a01b0381166001600160a01b928390046001600160601b031617918202179091556107aa565b600083815260fc6020526040902080546001600160a01b0381166001600160a01b9283900416918202179091555b50827f8ad9db565fe90ae9d4d50c51a4bf38505bfc2013675dbfd3510e0d6a4d050ba5836040516107dd91815260200190565b60405180910390a2505050565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190612ae8565b61088757604051634745a29b60e01b815260040160405180910390fd5b600083815260ff60205260409020805461ffff60801b1916600160801b61ffff851690810291909117909155156108f357600083815260fc6020526040902080546001600160a01b0381166008600160a01b928390046001600160601b03161791820217909155610921565b600083815260fc6020526040902080546001600160a01b0381166008600160a01b9283900416918202179091555b5060405161ffff8316815283907f11424874391782446f3957eb6ca27caa9af2d78d87980762c13090bd2845f71f906020016107dd565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa1580156109b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d89190612ae8565b6109f557604051634745a29b60e01b815260040160405180910390fd5b600083815260ff6020526040902080546fffffffffffffffffffffffffffffffff19166001600160801b03841690811790915515610a6857600083815260fc6020526040902080546001600160a01b0381166004600160a01b928390046001600160601b03161791820217909155610a96565b600083815260fc6020526040902080546001600160a01b0381166004600160a01b9283900416918202179091555b506040516001600160801b038316815283907f27831fc2ef572cce1298d5d9fc3cc1304eb5dfcea21d2190e5ad5943e4fa14fc906020016107dd565b600086815260fc6020526040908190205490516328b50b3560e11b81526004810188905233602482015287916001600160a01b03169063516a166a90604401602060405180830381865afa158015610b2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b529190612ae8565b610b6f57604051634745a29b60e01b815260040160405180910390fd5b600087815260fc6020526040902054600160a01b90046001600160601b03166001600160801b03871615610ba65760048117610bab565b600481165b905061ffff861615610bc05760088117610bc5565b600881165b905061ffff851615610bda5760108117610bdf565b601081165b905061ffff841615610bf45760208117610bf9565b602081165b905061ffff831615610c0e5760408117610c13565b604081165b90508060fc60008a815260200190815260200160002060000160146101000a8154816001600160601b0302191690836001600160601b031602179055506040518060a00160405280886001600160801b031681526020018761ffff1681526020018661ffff1681526020018561ffff1681526020018461ffff1681525060ff60008a815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548161ffff021916908361ffff16021790555060408201518160000160126101000a81548161ffff021916908361ffff16021790555060608201518160000160146101000a81548161ffff021916908361ffff16021790555060808201518160000160166101000a81548161ffff021916908361ffff160217905550905050877f27831fc2ef572cce1298d5d9fc3cc1304eb5dfcea21d2190e5ad5943e4fa14fc88604051610d9e91906001600160801b0391909116815260200190565b60405180910390a260405161ffff8716815288907f11424874391782446f3957eb6ca27caa9af2d78d87980762c13090bd2845f71f9060200160405180910390a260405161ffff8616815288907f4554b2837a782a075cb46bd0c681b73ef5e49cbcbeb3323e6f1fd9d3ec93a4c39060200160405180910390a260405161ffff8516815288907fc9b39ee25167b4c4f1ba319c61772350b508db76f73d0b25575173210386d9f39060200160405180910390a260405161ffff8416815288907f3d36ae2226b041dc65d74c772bae84c40b4ac6d1da927d7b633940d819c09c1a9060200160405180910390a25050505050505050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610ee55760405162461bcd60e51b8152600401610edc90612b0a565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610f2e600080516020612ded833981519152546001600160a01b031690565b6001600160a01b031614610f545760405162461bcd60e51b8152600401610edc90612b56565b610f5d81611c6a565b60408051600080825260208201909252610f7991839190611c72565b50565b600083815260fc6020526040908190205490516328b50b3560e11b81526004810185905233602482015284916001600160a01b03169063516a166a90604401602060405180830381865afa158015610fd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffc9190612ae8565b61101957604051634745a29b60e01b815260040160405180910390fd5b600084815260fe6020526040902061103290848461255c565b541561107357600084815260fc6020526040902080546001600160a01b0381166002600160a01b928390046001600160601b031617918202179091556110a1565b600084815260fc6020526040902080546001600160a01b0381166002600160a01b9283900416918202179091555b50837fd5a074e1c505de1aae7c94787f2e46faf07aceba6fc0c6a5f82f223ca1de2c5784846040516110d4929190612ba2565b60405180910390a250505050565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa15801561113e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111629190612ae8565b61117f57604051634745a29b60e01b815260040160405180910390fd5b600083815260fc60205260408082208054600160a01b8082048719166001600160601b0316026001600160a01b039091161790555184917f43a5deaf1b43fdbf7f75cf9745d253c5d17328910ab7c757e664869316fe973391a2505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036112265760405162461bcd60e51b8152600401610edc90612b0a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661126f600080516020612ded833981519152546001600160a01b031690565b6001600160a01b0316146112955760405162461bcd60e51b8152600401610edc90612b56565b61129e82611c6a565b6112aa82826001611c72565b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461134e5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610edc565b50600080516020612ded83398151915290565b611369611de2565b6113736000611e3c565b565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa1580156113d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f59190612ae8565b61141257604051634745a29b60e01b815260040160405180910390fd5b600083815260ff60205260409020805461ffff60b01b1916600160b01b61ffff8516908102919091179091551561148257600083815260fc60205260409081902080546001600160601b03600160a01b808304919091169093179283026001600160a01b039091161790556114b1565b600083815260fc6020526040908190208054600160a01b8082049093169283026001600160a01b039091161790555b5060405161ffff8316815283907f3d36ae2226b041dc65d74c772bae84c40b4ac6d1da927d7b633940d819c09c1a906020016107dd565b600054610100900460ff16158080156115085750600054600160ff909116105b806115225750303b158015611522575060005460ff166001145b6115855760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610edc565b6000805460ff1916600117905580156115a8576000805461ff0019166101001790555b6115b0611e8e565b6115b8611eb5565b8015610f79576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600081815260fe602090815260409182902080548351818402810184019094528084526060939283018282801561165657602002820191906000526020600020905b815481526020019060010190808311611642575b50505050509050919050565b606061167060008484611ee4565b9392505050565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa1580156116d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f79190612ae8565b61171457604051634745a29b60e01b815260040160405180910390fd5b600083815260ff60205260409020805461ffff60a01b1916600160a01b61ffff8516908102919091179091551561178557600083815260fc6020908152604090912080546001600160601b03600160a01b808304919091169093179283026001600160a01b039091161790556117b5565b600083815260fc602090815260409091208054600160a01b8082049093169283026001600160a01b039091161790555b5060405161ffff8316815283907fc9b39ee25167b4c4f1ba319c61772350b508db76f73d0b25575173210386d9f3906020016107dd565b600080600061183085858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120a992505050565b600081815260fb602052604090205491935091506001600160a01b0316331461186c5760405163ae7fd2eb60e01b815260040160405180910390fd5b6040805180820182523381526000602080830182815286835260fc90915290839020915190516001600160601b0316600160a01b026001600160a01b03919091161790555182907f76a77f5ff7e4ca0adac1c931a7ad2ea83bfb7e6b8603e81917dd2dca7e90625c906118e29088908890612c04565b60405180910390a2509392505050565b6118fa611de2565b600080611941600086868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506120c09050565b9092509050611951600185612c2e565b81146119705760405163b444c4ed60e01b815260040160405180910390fd5b60408051600060208083018290528284018690528351808403850181526060840180865281519183019190912080845260fb835285842080546001600160a01b038b166001600160a01b0319918216811790925560fc90945295909320805490921685179091556309201c8b60e11b905291906312403916906119fb90899089908690606401612c41565b600060405180830381600087803b158015611a1557600080fd5b505af1158015611a29573d6000803e3d6000fd5b50505050807f7db14709557f4e6eec0d0c5f0c1855b31e9667a13ef65c90c284987c677d4004878787604051611a6193929190612c65565b60405180910390a2505050505050565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa158015611acd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af19190612ae8565b611b0e57604051634745a29b60e01b815260040160405180910390fd5b600083815260ff60205260409020805461ffff60901b1916600160901b61ffff85169081029190911790915515611b7a57600083815260fc6020526040902080546001600160a01b0381166010600160a01b928390046001600160601b03161791820217909155611ba8565b600083815260fc6020526040902080546001600160a01b0381166010600160a01b9283900416918202179091555b5060405161ffff8316815283907f4554b2837a782a075cb46bd0c681b73ef5e49cbcbeb3323e6f1fd9d3ec93a4c3906020016107dd565b6060611bec848484611ee4565b949350505050565b611bfc611de2565b6001600160a01b038116611c615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610edc565b610f7981611e3c565b610f79611de2565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611caa57611ca5836121c7565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611d04575060408051601f3d908101601f19168201909252611d0191810190612c91565b60015b611d675760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610edc565b600080516020612ded8339815191528114611dd65760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610edc565b50611ca5838383612263565b60c9546001600160a01b031633146113735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610edc565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166113735760405162461bcd60e51b8152600401610edc90612caa565b600054610100900460ff16611edc5760405162461bcd60e51b8152600401610edc90612caa565b61137361228e565b60608167ffffffffffffffff811115611eff57611eff61280a565b604051908082528060200260200182016040528015611f3257816020015b6060815260200190600190039081611f1d5790505b50905060005b828110156120a1578415611ff4576000848483818110611f5a57611f5a612cf5565b9050602002810190611f6c9190612d0b565b611f7b91602491600491612d52565b611f8491612d7c565b9050858114611ff25760405162461bcd60e51b815260206004820152603460248201527f6d756c746963616c6c3a20416c6c207265636f726473206d7573742068617665604482015273040c240dac2e8c6d0d2dcce40dcc2dacad0c2e6d60631b6064820152608401610edc565b505b6000803086868581811061200a5761200a612cf5565b905060200281019061201c9190612d0b565b60405161202a929190612d9a565b600060405180830381855af49150503d8060008114612065576040519150601f19603f3d011682016040523d82523d6000602084013e61206a565b606091505b50915091508161207957600080fd5b8084848151811061208c5761208c612cf5565b60209081029190910101525050600101611f38565b509392505050565b6000806120b78360006122be565b91509150915091565b600080835183106121135760405162461bcd60e51b815260206004820152601e60248201527f726561644c6162656c3a20496e646578206f7574206f6620626f756e647300006044820152606401610edc565b600084848151811061212757612127612cf5565b016020015160f81c9050604081106121815760405162461bcd60e51b815260206004820152601960248201527f726561644c6162656c3a204c6162656c20746f6f206c6f6e67000000000000006044820152606401610edc565b80156121a35761219c85612196866001612daa565b836123c2565b92506121a8565b600092505b6121b28185612daa565b6121bd906001612daa565b9150509250929050565b6001600160a01b0381163b6122345760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610edc565b600080516020612ded83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61226c836123e6565b6000825111806122795750805b15611ca5576122888383612426565b50505050565b600054610100900460ff166122b55760405162461bcd60e51b8152600401610edc90612caa565b61137333611e3c565b6000806000806122ce86866120c0565b90925090508161234357600186516122e69190612c2e565b85146123345760405162461bcd60e51b815260206004820152601d60248201527f6e616d65686173683a204a756e6b20617420656e64206f66206e616d650000006044820152606401610edc565b50600092508291506123bb9050565b60008061235088846122be565b9092509050806123875760408051600060208201529081018590526060016040516020818303038152906040528051906020012090505b6040805160208101849052908101859052606001604051602081830303815290604052805190602001208195509550505050505b9250929050565b82516000906123d18385612daa565b11156123dc57600080fd5b5091016020012090565b6123ef816121c7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606116708383604051806060016040528060278152602001612e0d602791396060600080856001600160a01b0316856040516124639190612dbd565b600060405180830381855af49150503d806000811461249e576040519150601f19603f3d011682016040523d82523d6000602084013e6124a3565b606091505b50915091506124b4868383876124be565b9695505050505050565b6060831561252d578251600003612526576001600160a01b0385163b6125265760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610edc565b5081611bec565b611bec83838151156125425781518083602001fd5b8060405162461bcd60e51b8152600401610edc9190612dd9565b828054828255906000526020600020908101928215612597579160200282015b8281111561259757823582559160200191906001019061257c565b506125a39291506125a7565b5090565b5b808211156125a357600081556001016125a8565b6000602082840312156125ce57600080fd5b81356001600160e01b03198116811461167057600080fd5b6000602082840312156125f857600080fd5b5035919050565b6000806040838503121561261257600080fd5b50508035926020909101359150565b803561ffff8116811461263357600080fd5b919050565b6000806040838503121561264b57600080fd5b8235915061265b60208401612621565b90509250929050565b80356001600160801b038116811461263357600080fd5b6000806040838503121561268e57600080fd5b8235915061265b60208401612664565b60008060008060008060c087890312156126b757600080fd5b863595506126c760208801612664565b94506126d560408801612621565b93506126e360608801612621565b92506126f160808801612621565b91506126ff60a08801612621565b90509295509295509295565b80356001600160a01b038116811461263357600080fd5b60006020828403121561273457600080fd5b6116708261270b565b60008083601f84011261274f57600080fd5b50813567ffffffffffffffff81111561276757600080fd5b6020830191508360208260051b85010111156123bb57600080fd5b60008060006040848603121561279757600080fd5b83359250602084013567ffffffffffffffff8111156127b557600080fd5b6127c18682870161273d565b9497909650939450505050565b600080604083850312156127e157600080fd5b8235915060208301356001600160601b03811681146127ff57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561283357600080fd5b61283c8361270b565b9150602083013567ffffffffffffffff8082111561285957600080fd5b818501915085601f83011261286d57600080fd5b81358181111561287f5761287f61280a565b604051601f8201601f19908116603f011681019083821181831017156128a7576128a761280a565b816040528281528860208487010111156128c057600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561291a578351835292840192918401916001016128fe565b50909695505050505050565b6000806020838503121561293957600080fd5b823567ffffffffffffffff81111561295057600080fd5b61295c8582860161273d565b90969095509350505050565b60005b8381101561298357818101518382015260200161296b565b50506000910152565b600081518084526129a4816020860160208601612968565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015612a0f57603f198886030184526129fd85835161298c565b945092850192908501906001016129e1565b5092979650505050505050565b60008083601f840112612a2e57600080fd5b50813567ffffffffffffffff811115612a4657600080fd5b6020830191508360208285010111156123bb57600080fd5b60008060208385031215612a7157600080fd5b823567ffffffffffffffff811115612a8857600080fd5b61295c85828601612a1c565b600080600060408486031215612aa957600080fd5b833567ffffffffffffffff811115612ac057600080fd5b612acc86828701612a1c565b9094509250612adf90506020850161270b565b90509250925092565b600060208284031215612afa57600080fd5b8151801515811461167057600080fd5b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252810182905260006001600160fb1b03831115612bc257600080fd5b8260051b80856040850137919091016040019392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000611bec602083018486612bdb565b634e487b7160e01b600052601160045260246000fd5b8181038181111561068757610687612c18565b604081526000612c55604083018587612bdb565b9050826020830152949350505050565b604081526000612c79604083018587612bdb565b905060018060a01b0383166020830152949350505050565b600060208284031215612ca357600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112612d2257600080fd5b83018035915067ffffffffffffffff821115612d3d57600080fd5b6020019150368190038213156123bb57600080fd5b60008085851115612d6257600080fd5b83861115612d6f57600080fd5b5050820193919092039150565b8035602083101561068757600019602084900360031b1b1692915050565b8183823760009101908152919050565b8082018082111561068757610687612c18565b60008251612dcf818460208701612968565b9190910192915050565b602081526000611670602083018461298c56fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122070a9f0e73254f89b10dbef9ecf7bdfc92f749197f3cc327e9f575c6c38e3afa264736f6c63430008160033",rD=t=>t.length>1;class si extends fu{constructor(...e){rD(e)?super(...e):super(J5,sc,e[0])}deploy(e){return super.deploy(e||{})}getDeployTransaction(e){return super.getDeployTransaction(e||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new rr(J5)}static connect(e,r){return new Hr(e,J5,r)}}it(si,"bytecode",sc),it(si,"abi",J5);const Y5=[{type:"constructor",inputs:[{name:"_ens",type:"address",internalType:"contract ENS"},{name:"_registrar",type:"address",internalType:"contract IBaseRegistrar"},{name:"_metadataService",type:"address",internalType:"contract IMetadataService"}],stateMutability:"nonpayable"},{type:"function",name:"_tokens",inputs:[{name:"",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"allFusesBurned",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"fuseMask",type:"uint32",internalType:"uint32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"approve",inputs:[{name:"to",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"balanceOf",inputs:[{name:"account",type:"address",internalType:"address"},{name:"id",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"balanceOfBatch",inputs:[{name:"accounts",type:"address[]",internalType:"address[]"},{name:"ids",type:"uint256[]",internalType:"uint256[]"}],outputs:[{name:"",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"view"},{type:"function",name:"canExtendSubnames",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"addr",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"canModifyName",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"addr",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"controllers",inputs:[{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"ens",inputs:[],outputs:[{name:"",type:"address",internalType:"contract ENS"}],stateMutability:"view"},{type:"function",name:"extendExpiry",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"labelhash",type:"bytes32",internalType:"bytes32"},{name:"expiry",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"uint64",internalType:"uint64"}],stateMutability:"nonpayable"},{type:"function",name:"getApproved",inputs:[{name:"id",type:"uint256",internalType:"uint256"}],outputs:[{name:"operator",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getData",inputs:[{name:"id",type:"uint256",internalType:"uint256"}],outputs:[{name:"owner",type:"address",internalType:"address"},{name:"fuses",type:"uint32",internalType:"uint32"},{name:"expiry",type:"uint64",internalType:"uint64"}],stateMutability:"view"},{type:"function",name:"isApprovedForAll",inputs:[{name:"account",type:"address",internalType:"address"},{name:"operator",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isWrapped",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"labelhash",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isWrapped",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"metadataService",inputs:[],outputs:[{name:"",type:"address",internalType:"contract IMetadataService"}],stateMutability:"view"},{type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"names",inputs:[{name:"",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes",internalType:"bytes"}],stateMutability:"view"},{type:"function",name:"onERC721Received",inputs:[{name:"to",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"ownerOf",inputs:[{name:"id",type:"uint256",internalType:"uint256"}],outputs:[{name:"owner",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"recoverFunds",inputs:[{name:"_token",type:"address",internalType:"address"},{name:"_to",type:"address",internalType:"address"},{name:"_amount",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"registerAndWrapETH2LD",inputs:[{name:"label",type:"string",internalType:"string"},{name:"wrappedOwner",type:"address",internalType:"address"},{name:"duration",type:"uint256",internalType:"uint256"},{name:"resolver",type:"address",internalType:"address"},{name:"ownerControlledFuses",type:"uint16",internalType:"uint16"}],outputs:[{name:"registrarExpiry",type:"uint256",internalType:"uint256"}],stateMutability:"nonpayable"},{type:"function",name:"registrar",inputs:[],outputs:[{name:"",type:"address",internalType:"contract IBaseRegistrar"}],stateMutability:"view"},{type:"function",name:"renew",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"},{name:"duration",type:"uint256",internalType:"uint256"}],outputs:[{name:"expires",type:"uint256",internalType:"uint256"}],stateMutability:"nonpayable"},{type:"function",name:"renounceOwnership",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"safeBatchTransferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"ids",type:"uint256[]",internalType:"uint256[]"},{name:"amounts",type:"uint256[]",internalType:"uint256[]"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"safeTransferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"id",type:"uint256",internalType:"uint256"},{name:"amount",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setApprovalForAll",inputs:[{name:"operator",type:"address",internalType:"address"},{name:"approved",type:"bool",internalType:"bool"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setChildFuses",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"labelhash",type:"bytes32",internalType:"bytes32"},{name:"fuses",type:"uint32",internalType:"uint32"},{name:"expiry",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setController",inputs:[{name:"controller",type:"address",internalType:"address"},{name:"active",type:"bool",internalType:"bool"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setFuses",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"ownerControlledFuses",type:"uint16",internalType:"uint16"}],outputs:[{name:"",type:"uint32",internalType:"uint32"}],stateMutability:"nonpayable"},{type:"function",name:"setMetadataService",inputs:[{name:"_metadataService",type:"address",internalType:"contract IMetadataService"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setRecord",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"owner",type:"address",internalType:"address"},{name:"resolver",type:"address",internalType:"address"},{name:"ttl",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setResolver",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"resolver",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setSubnodeOwner",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"label",type:"string",internalType:"string"},{name:"owner",type:"address",internalType:"address"},{name:"fuses",type:"uint32",internalType:"uint32"},{name:"expiry",type:"uint64",internalType:"uint64"}],outputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],stateMutability:"nonpayable"},{type:"function",name:"setSubnodeRecord",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"label",type:"string",internalType:"string"},{name:"owner",type:"address",internalType:"address"},{name:"resolver",type:"address",internalType:"address"},{name:"ttl",type:"uint64",internalType:"uint64"},{name:"fuses",type:"uint32",internalType:"uint32"},{name:"expiry",type:"uint64",internalType:"uint64"}],outputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],stateMutability:"nonpayable"},{type:"function",name:"setTTL",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"ttl",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setUpgradeContract",inputs:[{name:"_upgradeAddress",type:"address",internalType:"contract INameWrapperUpgrade"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"transferOwnership",inputs:[{name:"newOwner",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"unwrap",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"labelhash",type:"bytes32",internalType:"bytes32"},{name:"controller",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"unwrapETH2LD",inputs:[{name:"labelhash",type:"bytes32",internalType:"bytes32"},{name:"registrant",type:"address",internalType:"address"},{name:"controller",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"upgrade",inputs:[{name:"name",type:"bytes",internalType:"bytes"},{name:"extraData",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"upgradeContract",inputs:[],outputs:[{name:"",type:"address",internalType:"contract INameWrapperUpgrade"}],stateMutability:"view"},{type:"function",name:"uri",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"wrap",inputs:[{name:"name",type:"bytes",internalType:"bytes"},{name:"wrappedOwner",type:"address",internalType:"address"},{name:"resolver",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"wrapETH2LD",inputs:[{name:"label",type:"string",internalType:"string"},{name:"wrappedOwner",type:"address",internalType:"address"},{name:"ownerControlledFuses",type:"uint16",internalType:"uint16"},{name:"resolver",type:"address",internalType:"address"}],outputs:[{name:"expiry",type:"uint64",internalType:"uint64"}],stateMutability:"nonpayable"},{type:"event",name:"Approval",inputs:[{name:"owner",type:"address",indexed:!0,internalType:"address"},{name:"approved",type:"address",indexed:!0,internalType:"address"},{name:"tokenId",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ApprovalForAll",inputs:[{name:"account",type:"address",indexed:!0,internalType:"address"},{name:"operator",type:"address",indexed:!0,internalType:"address"},{name:"approved",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"ControllerChanged",inputs:[{name:"controller",type:"address",indexed:!0,internalType:"address"},{name:"active",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"ExpiryExtended",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"expiry",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"FusesSet",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"fuses",type:"uint32",indexed:!1,internalType:"uint32"}],anonymous:!1},{type:"event",name:"NameUnwrapped",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"owner",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"NameWrapped",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"name",type:"bytes",indexed:!1,internalType:"bytes"},{name:"owner",type:"address",indexed:!1,internalType:"address"},{name:"fuses",type:"uint32",indexed:!1,internalType:"uint32"},{name:"expiry",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"OwnershipTransferred",inputs:[{name:"previousOwner",type:"address",indexed:!0,internalType:"address"},{name:"newOwner",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"TransferBatch",inputs:[{name:"operator",type:"address",indexed:!0,internalType:"address"},{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"ids",type:"uint256[]",indexed:!1,internalType:"uint256[]"},{name:"values",type:"uint256[]",indexed:!1,internalType:"uint256[]"}],anonymous:!1},{type:"event",name:"TransferSingle",inputs:[{name:"operator",type:"address",indexed:!0,internalType:"address"},{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"id",type:"uint256",indexed:!1,internalType:"uint256"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"URI",inputs:[{name:"value",type:"string",indexed:!1,internalType:"string"},{name:"id",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"error",name:"CannotUpgrade",inputs:[]},{type:"error",name:"IncompatibleParent",inputs:[]},{type:"error",name:"IncorrectTargetOwner",inputs:[{name:"owner",type:"address",internalType:"address"}]},{type:"error",name:"IncorrectTokenType",inputs:[]},{type:"error",name:"LabelMismatch",inputs:[{name:"labelHash",type:"bytes32",internalType:"bytes32"},{name:"expectedLabelhash",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"LabelTooLong",inputs:[{name:"label",type:"string",internalType:"string"}]},{type:"error",name:"LabelTooShort",inputs:[]},{type:"error",name:"NameIsNotWrapped",inputs:[]},{type:"error",name:"OperationProhibited",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"Unauthorised",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"addr",type:"address",internalType:"address"}]}],lc="0x60c06040523480156200001157600080fd5b5060405162005d2f38038062005d2f8339810160408190526200003491620002f8565b823362000041816200028f565b6040516302571be360e01b81527f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260048201526000906001600160a01b038416906302571be390602401602060405180830381865afa158015620000a9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000cf91906200034c565b604051630f41a04d60e11b81526001600160a01b03848116600483015291925090821690631e83409a906024016020604051808303816000875af11580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000373565b505050506001600160a01b0383811660805282811660a052600580546001600160a01b031916918316919091179055600163fffeffff60a01b03197fafa26c20e8b3d9a2853d642cfe1021dae26242ffedfac91c97aab212c1a4b93b8190557fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb4955604080518082019091526001815260006020808301829052908052600690527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f89062000210908262000434565b506040805180820190915260058152626cae8d60e31b6020808301919091527f93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae600052600690527ffb9e8e321b8a5ec48f12a7b41f22c6e595d761285c9eb19d8dda7c99edf1b54f9062000285908262000434565b5050505062000500565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620002f557600080fd5b50565b6000806000606084860312156200030e57600080fd5b83516200031b81620002df565b60208501519093506200032e81620002df565b60408501519092506200034181620002df565b809150509250925092565b6000602082840312156200035f57600080fd5b81516200036c81620002df565b9392505050565b6000602082840312156200038657600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620003b857607f821691505b602082108103620003d957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200042f576000816000526020600020601f850160051c810160208610156200040a5750805b601f850160051c820191505b818110156200042b5782815560010162000416565b5050505b505050565b81516001600160401b038111156200045057620004506200038d565b6200046881620004618454620003a3565b84620003df565b602080601f831160018114620004a05760008415620004875750858301515b600019600386901b1c1916600185901b1785556200042b565b600085815260208120601f198616915b82811015620004d157888601518255948401946001909101908401620004b0565b5085821015620004f05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a0516157226200060d6000396000818161047301528181610aee01528181610b9101528181610c20015281816118b80152818161194e015281816119fc01528181611ace01528181611b3f01528181611bc401528181611dd801528181611f14015281816120460152818161219e0152818161222401526129620152600081816104c001528181610a7401528181610d6a01528181610ef901528181610faa015281816112b601528181611f99015281816120cb015281816122cf015281816124810152818161275201528181612b9b01528181612c4901528181612cfe01528181612d7f0152818161328a015281816133dd015281816136450152613bf101526157226000f3fe608060405234801561001057600080fd5b506004361061029f5760003560e01c80636352211e11610167578063c93ab3fd116100ce578063e985e9c511610087578063e985e9c5146106d4578063eb8ae530146106e7578063ed70554d146106fa578063f242432a1461071a578063f2fde38b1461072d578063fd0cd0d91461074057600080fd5b8063c93ab3fd14610652578063cf40882314610665578063d8c9921a14610678578063d9a50c121461068b578063da8c229e1461069e578063e0dba60f146106c157600080fd5b8063a22cb46511610120578063a22cb465146105e0578063a4014982146105f3578063adf4960a14610606578063b6bcad2614610619578063c475abff1461062c578063c658e0861461063f57600080fd5b80636352211e146105635780636e5d6ad214610576578063715018a6146105a15780638b4dfa75146105a95780638cf8b41e146105bc5780638da5cb5b146105cf57600080fd5b80631f4e15041161020b5780633f15457f116101c45780633f15457f146104bb578063402906fc146104e257806341415eab1461050a5780634e1273f41461051d578063530954671461053d5780635d3590d51461055057600080fd5b80631f4e15041461043557806320c38e2b1461044857806324c1af441461045b5780632b20e3971461046e5780632eb2c2d61461049557806333c69ea9146104a857600080fd5b80630e4cd7251161025d5780630e4cd725146103aa5780630e89341c146103bd57806314ab9038146103d0578063150b7a02146103e35780631534e1771461040f5780631896f70a1461042257600080fd5b8062fdd58e146102a45780630178fe3f146102ca57806301ffc9a71461031057806306fdde0314610333578063081812fc1461036a578063095ea7b314610395575b600080fd5b6102b76102b236600461443e565b610753565b6040519081526020015b60405180910390f35b6102dd6102d836600461446a565b610800565b604080516001600160a01b03909416845263ffffffff90921660208401526001600160401b0316908201526060016102c1565b61032361031e366004614499565b610830565b60405190151581526020016102c1565b61035d6040518060400160405280600b81526020016a2730b6b2abb930b83832b960a91b81525081565b6040516102c19190614506565b61037d61037836600461446a565b610870565b6040516001600160a01b0390911681526020016102c1565b6103a86103a336600461443e565b6108b5565b005b6103236103b8366004614519565b6108fb565b61035d6103cb36600461446a565b610975565b6103a86103de366004614565565b6109e7565b6103f66103f13660046145d9565b610ae1565b6040516001600160e01b031990911681526020016102c1565b6103a861041d36600461464b565b610cc1565b6103a8610430366004614519565b610ceb565b60075461037d906001600160a01b031681565b61035d61045636600461446a565b610da1565b6102b7610469366004614741565b610e3b565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b6103a86104a336600461486c565b611021565b6103a86104b6366004614919565b611259565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b6104f56104f0366004614971565b61142a565b60405163ffffffff90911681526020016102c1565b610323610518366004614519565b6114c7565b61053061052b366004614994565b611500565b6040516102c19190614a92565b60055461037d906001600160a01b031681565b6103a861055e366004614aa5565b611621565b61037d61057136600461446a565b6116a2565b610589610584366004614ae6565b6116ad565b6040516001600160401b0390911681526020016102c1565b6103a86117e0565b6103a86105b7366004614b1b565b6117f4565b6105896105ca366004614b5d565b61191a565b6000546001600160a01b031661037d565b6103a86105ee366004614be5565b611c96565b6102b7610601366004614c13565b611d6c565b610323610614366004614c93565b611ead565b6103a861062736600461464b565b611ed2565b6102b761063a366004614cb6565b61212a565b6102b761064d366004614cd8565b612394565b6103a8610660366004614d4a565b61255c565b6103a8610673366004614db5565b6126af565b6103a8610686366004614ded565b612849565b610323610699366004614cb6565b612912565b6103236106ac36600461464b565b60046020526000908152604090205460ff1681565b6103a86106cf366004614be5565b6129f1565b6103236106e2366004614e1b565b612a59565b6103a86106f5366004614e49565b612a87565b6102b761070836600461446a565b60016020526000908152604090205481565b6103a8610728366004614eb0565b612e2b565b6103a861073b36600461464b565b612ed8565b61032361074e36600461446a565b612f4e565b60006001600160a01b0383166107c45760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b60006107cf836116a2565b9050836001600160a01b0316816001600160a01b0316036107f45760019150506107fa565b60009150505b92915050565b60008181526001602052604090205460a081901c60c082901c610824838383613026565b90959094509092509050565b60006001600160e01b03198216631b05885b60e31b148061086157506001600160e01b03198216630a85bd0160e11b145b806107fa57506107fa8261305c565b60008061087c836116a2565b90506001600160a01b0381166108955750600092915050565b6000838152600360205260409020546001600160a01b03165b9392505050565b60006108c082610800565b50915050603f1960408216016108ec5760405163a2a7201360e01b8152600481018390526024016107bb565b6108f683836130ac565b505050565b600080808061090986610800565b925092509250846001600160a01b0316836001600160a01b0316148061093457506109348386612a59565b8061095857506001600160a01b03851661094d87610870565b6001600160a01b0316145b801561096b575061096982826131bc565b155b9695505050505050565b6005546040516303a24d0760e21b8152600481018390526060916001600160a01b031690630e89341c90602401600060405180830381865afa1580156109bf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107fa9190810190614f18565b816109f281336114c7565b610a1357803360405163168ab55d60e31b81526004016107bb929190614f8f565b8260106000610a2183610800565b5091505063ffffffff8282161615610a4f5760405163a2a7201360e01b8152600481018490526024016107bb565b604051630295720760e31b8152600481018790526001600160401b03861660248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906314ab9038906044015b600060405180830381600087803b158015610ac157600080fd5b505af1158015610ad5573d6000803e3d6000fd5b50505050505050505050565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b2c5760405163032634a760e31b815260040160405180910390fd5b6000808080610b3d86880188614fa6565b83516020850120939750919550935091508890808214610b7a576040516331970f3360e21b815260048101829052602481018390526044016107bb565b604051630a3b53db60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906328ed4f6c90610bc89085903090600401614f8f565b600060405180830381600087803b158015610be257600080fd5b505af1158015610bf6573d6000803e3d6000fd5b5050604051636b727d4360e11b8152600481018d9052600092506276a70091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d6e4fa8690602401602060405180830381865afa158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b919061500d565b610c95919061503c565b9050610ca887878761ffff1684886131ec565b50630a85bd0160e11b9c9b505050505050505050505050565b610cc96132fd565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b81610cf681336114c7565b610d1757803360405163168ab55d60e31b81526004016107bb929190614f8f565b8260086000610d2583610800565b5091505063ffffffff8282161615610d535760405163a2a7201360e01b8152600481018490526024016107bb565b604051630c4b7b8560e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631896f70a90610aa79089908990600401614f8f565b60066020526000908152604090208054610dba90615063565b80601f0160208091040260200160405190810160405280929190818152602001828054610de690615063565b8015610e335780601f10610e0857610100808354040283529160200191610e33565b820191906000526020600020905b815481529060010190602001808311610e1657829003601f168201915b505050505081565b600087610e4881336114c7565b610e6957803360405163168ab55d60e31b81526004016107bb929190614f8f565b87516020890120610e7a8a82613357565b9250610e868a84613383565b610e9083866134c1565b610e9b8a848b6134f4565b50610ea88a8487876135c1565b9350610eb383613607565b610f68576040516305ef2c7f60e41b8152600481018b9052602481018290523060448201526001600160a01b0388811660648301526001600160401b03881660848301527f00000000000000000000000000000000000000000000000000000000000000001690635ef2c7f09060a401600060405180830381600087803b158015610f3d57600080fd5b505af1158015610f51573d6000803e3d6000fd5b50505050610f638a848b8b89896136c0565b611014565b6040516305ef2c7f60e41b8152600481018b9052602481018290523060448201526001600160a01b0388811660648301526001600160401b03881660848301527f00000000000000000000000000000000000000000000000000000000000000001690635ef2c7f09060a401600060405180830381600087803b158015610fee57600080fd5b505af1158015611002573d6000803e3d6000fd5b505050506110148a848b8b89896136f7565b5050979650505050505050565b81518351146110835760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016107bb565b6001600160a01b0384166110a95760405162461bcd60e51b81526004016107bb9061509d565b6001600160a01b0385163314806110c557506110c58533612a59565b61112c5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016107bb565b60005b83518110156111ec57600084828151811061114c5761114c6150e2565b60200260200101519050600084838151811061116a5761116a6150e2565b60200260200101519050600080600061118285610800565b9250925092506111938583836137bb565b8360011480156111b457508a6001600160a01b0316836001600160a01b0316145b6111d05760405162461bcd60e51b81526004016107bb906150f8565b6111dc858b8484613864565b505050505080600101905061112f565b50836001600160a01b0316856001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161123c929190615142565b60405180910390a46112523386868686866138a6565b5050505050565b60006112658585613357565b905061127181846134c1565b6000808061127e84610800565b919450925090506001600160a01b038316158061132d57506040516302571be360e01b81526004810185905230906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906302571be390602401602060405180830381865afa1580156112fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113219190615170565b6001600160a01b031614155b1561134b57604051635374b59960e01b815260040160405180910390fd5b6000806113578a610800565b90935091508a90506113935761136d86336114c7565b61138e57853360405163168ab55d60e31b81526004016107bb929190614f8f565b6113be565b61139d8a336114c7565b6113be57893360405163168ab55d60e31b81526004016107bb929190614f8f565b6113c9868984613a01565b6113d4878483613a3c565b9650620100008416158015906113f857508363ffffffff1688851763ffffffff1614155b156114195760405163a2a7201360e01b8152600481018790526024016107bb565b96831796610ad586868a868b613a82565b60008261143781336114c7565b61145857803360405163168ab55d60e31b81526004016107bb929190614f8f565b836002600061146683610800565b5091505063ffffffff82821616156114945760405163a2a7201360e01b8152600481018490526024016107bb565b600080806114a18a610800565b9250925092506114ba8a84848c61ffff16178485613a82565b5098975050505050505050565b60008080806114d586610800565b925092509250846001600160a01b0316836001600160a01b0316148061095857506109588386612a59565b606081518351146115655760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016107bb565b600083516001600160401b0381111561158057611580614668565b6040519080825280602002602001820160405280156115a9578160200160208202803683370190505b50905060005b8451811015611619576115f48582815181106115cd576115cd6150e2565b60200260200101518583815181106115e7576115e76150e2565b6020026020010151610753565b828281518110611606576116066150e2565b60209081029190910101526001016115af565b509392505050565b6116296132fd565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af1158015611678573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169c919061518d565b50505050565b60006107fa82613b29565b6000806116ba8585613357565b90506116c581613607565b6116e257604051635374b59960e01b815260040160405180910390fd5b60006116ee86336108fb565b905080158015611705575061170382336114c7565b155b1561172757813360405163168ab55d60e31b81526004016107bb929190614f8f565b6000808061173485610800565b9250925092508315801561174b5750620400008216155b1561176c5760405163a2a7201360e01b8152600481018690526024016107bb565b60006117778a610800565b92505050611786888383613a3c565b97506117948685858b613b3f565b6040516001600160401b038916815286907ff675815a0817338f93a7da433f6bd5f5542f1029b11b455191ac96c7f6a9b1329060200160405180910390a2509598975050505050505050565b6117e86132fd565b6117f26000613b55565b565b61180c6000805160206156cd83398151915284613357565b61181681336114c7565b61183757803360405163168ab55d60e31b81526004016107bb929190614f8f565b306001600160a01b0384160361186b57604051632ca49b0d60e11b81526001600160a01b03841660048201526024016107bb565b61188c6118866000805160206156cd83398151915286613357565b83613ba5565b604051632142170760e11b81523060048201526001600160a01b038481166024830152604482018690527f000000000000000000000000000000000000000000000000000000000000000016906342842e0e90606401600060405180830381600087803b1580156118fc57600080fd5b505af1158015611910573d6000803e3d6000fd5b5050505050505050565b600080868660405161192d9291906151aa565b6040519081900381206331a9108f60e11b82526004820181905291506000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa15801561199d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c19190615170565b90506001600160a01b0381163314801590611a69575060405163e985e9c560e01b81526001600160a01b0382811660048301523360248301527f0000000000000000000000000000000000000000000000000000000000000000169063e985e9c590604401602060405180830381865afa158015611a43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a67919061518d565b155b15611aa257611a866000805160206156cd83398151915283613357565b3360405163168ab55d60e31b81526004016107bb929190614f8f565b6040516323b872dd60e01b81526001600160a01b038281166004830152306024830152604482018490527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90606401600060405180830381600087803b158015611b1257600080fd5b505af1158015611b26573d6000803e3d6000fd5b5050604051630a3b53db60e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692506328ed4f6c9150611b789085903090600401614f8f565b600060405180830381600087803b158015611b9257600080fd5b505af1158015611ba6573d6000803e3d6000fd5b5050604051636b727d4360e11b8152600481018590526276a70092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316915063d6e4fa8690602401602060405180830381865afa158015611c14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c38919061500d565b611c42919061503c565b9250611c8b88888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250505061ffff881686886131ec565b505095945050505050565b6001600160a01b0382163303611d005760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016107bb565b3360008181526002602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3360009081526004602052604081205460ff16611d9b5760405162461bcd60e51b81526004016107bb906151ba565b60008787604051611dad9291906151aa565b604051908190038120633f2891eb60e21b8252600482018190523060248301526044820187905291507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063fca247ac906064016020604051808303816000875af1158015611e29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4d919061500d565b9150611ea288888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250505061ffff8616611e9c6276a7008761503c565b886131ec565b509695505050505050565b600080611eb984610800565b50841663ffffffff908116908516149250505092915050565b611eda6132fd565b6007546001600160a01b031615611ffa5760075460405163a22cb46560e01b81526001600160a01b039182166004820152600060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a22cb46590604401600060405180830381600087803b158015611f5a57600080fd5b505af1158015611f6e573d6000803e3d6000fd5b505060075460405163a22cb46560e01b81526001600160a01b039182166004820152600060248201527f0000000000000000000000000000000000000000000000000000000000000000909116925063a22cb4659150604401600060405180830381600087803b158015611fe157600080fd5b505af1158015611ff5573d6000803e3d6000fd5b505050505b600780546001600160a01b0319166001600160a01b038316908117909155156121275760075460405163a22cb46560e01b81526001600160a01b039182166004820152600160248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a22cb46590604401600060405180830381600087803b15801561208c57600080fd5b505af11580156120a0573d6000803e3d6000fd5b505060075460405163a22cb46560e01b81526001600160a01b039182166004820152600160248201527f0000000000000000000000000000000000000000000000000000000000000000909116925063a22cb4659150604401600060405180830381600087803b15801561211357600080fd5b505af1158015611252573d6000803e3d6000fd5b50565b3360009081526004602052604081205460ff166121595760405162461bcd60e51b81526004016107bb906151ba565b60006121736000805160206156cd83398151915285613357565b60405163c475abff60e01b815260048101869052602481018590529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c475abff906044016020604051808303816000875af11580156121e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061220b919061500d565b6040516331a9108f60e11b8152600481018790529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa92505050801561228f575060408051601f3d908101601f1916820190925261228c91810190615170565b60015b61229c5791506107fa9050565b6001600160a01b0381163014158061234657506040516302571be360e01b81526004810184905230906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906302571be390602401602060405180830381865afa158015612316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061233a9190615170565b6001600160a01b031614155b15612355575091506107fa9050565b5060006123656276a7008361503c565b60008481526001602052604090205490915060a081901c61238885838386613b3f565b50919695505050505050565b6000866123a181336114c7565b6123c257803360405163168ab55d60e31b81526004016107bb929190614f8f565b600087876040516123d49291906151aa565b604051809103902090506123e88982613357565b92506123f48984613383565b6123fe83866134c1565b60006124418a858b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506134f492505050565b905061244f8a8588886135c1565b945061245a84613607565b612509576040516306ab592360e01b8152600481018b9052602481018390523060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906306ab5923906064016020604051808303816000875af11580156124d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f6919061500d565b506125048482898989613c95565b61254f565b61254f8a858b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d92508c91508b90506136f7565b5050509695505050505050565b60006125a2600086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293925050613cd79050565b6007549091506001600160a01b03166125ce5760405163093075b560e21b815260040160405180910390fd5b6125d881336114c7565b6125f957803360405163168ab55d60e31b81526004016107bb929190614f8f565b6000808061260684610800565b91945092509050600061261885610870565b905061262385613d96565b600760009054906101000a90046001600160a01b03166001600160a01b0316639198c2768a8a878787878e8e6040518963ffffffff1660e01b815260040161267298979695949392919061522b565b600060405180830381600087803b15801561268c57600080fd5b505af11580156126a0573d6000803e3d6000fd5b50505050505050505050505050565b836126ba81336114c7565b6126db57803360405163168ab55d60e31b81526004016107bb929190614f8f565b84601c60006126e983610800565b5091505063ffffffff82821616156127175760405163a2a7201360e01b8152600481018490526024016107bb565b60405163cf40882360e01b8152600481018990523060248201526001600160a01b0387811660448301526001600160401b03871660648301527f0000000000000000000000000000000000000000000000000000000000000000169063cf40882390608401600060405180830381600087803b15801561279657600080fd5b505af11580156127aa573d6000803e3d6000fd5b5050506001600160a01b03881690506128115760006127c889610800565b509150506201ffff196202000082160161280057604051632ca49b0d60e11b81526001600160a01b03891660048201526024016107bb565b61280b896000613ba5565b50611910565b600061281c896116a2565b905061283e81898b60001c600160405180602001604052806000815250613e36565b505050505050505050565b6128538383613357565b61285d81336114c7565b61287e57803360405163168ab55d60e31b81526004016107bb929190614f8f565b7f6c32148f748aba23997146d7fe89e962e3cc30271290fb96f5f4337756c03b5284016128be5760405163615a470360e01b815260040160405180910390fd5b6001600160a01b03821615806128dc57506001600160a01b03821630145b1561290557604051632ca49b0d60e11b81526001600160a01b03831660048201526024016107bb565b61169c6118868585613357565b60008061291f8484613357565b9050600061292c82613607565b90506000805160206156cd833981519152851461294c5791506107fa9050565b6040516331a9108f60e11b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa9250505080156129cd575060408051601f3d908101601f191682019092526129ca91810190615170565b60015b6129dc576000925050506107fa565b6001600160a01b0316301492506107fa915050565b6129f96132fd565b6001600160a01b038216600081815260046020908152604091829020805460ff191685151590811790915591519182527f4c97694570a07277810af7e5669ffd5f6a2d6b74b6e9a274b8b870fd5114cf8791015b60405180910390a25050565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b600080612ace600087878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293925050613f189050565b915091506000612b178288888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293925050613cd79050565b90506000612b258285613357565b6000818152600660205260409020909150612b41888a836152db565b507f6c32148f748aba23997146d7fe89e962e3cc30271290fb96f5f4337756c03b528201612b825760405163615a470360e01b815260040160405180910390fd5b6040516302571be360e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906302571be390602401602060405180830381865afa158015612bea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c0e9190615170565b90506001600160a01b0381163314801590612cb6575060405163e985e9c560e01b81526001600160a01b0382811660048301523360248301527f0000000000000000000000000000000000000000000000000000000000000000169063e985e9c590604401602060405180830381865afa158015612c90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cb4919061518d565b155b15612cd857813360405163168ab55d60e31b81526004016107bb929190614f8f565b6001600160a01b03861615612d6857604051630c4b7b8560e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631896f70a90612d359085908a90600401614f8f565b600060405180830381600087803b158015612d4f57600080fd5b505af1158015612d63573d6000803e3d6000fd5b505050505b604051635b0fc9c360e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635b0fc9c390612db69085903090600401614f8f565b600060405180830381600087803b158015612dd057600080fd5b505af1158015612de4573d6000803e3d6000fd5b5050505061283e828a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052508d93509150819050613c95565b6001600160a01b038416612e515760405162461bcd60e51b81526004016107bb9061509d565b6001600160a01b038516331480612e6d5750612e6d8533612a59565b612ecb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107bb565b6112528585858585613e36565b612ee06132fd565b6001600160a01b038116612f455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107bb565b61212781613b55565b60008181526006602052604081208054829190612f6a90615063565b80601f0160208091040260200160405190810160405280929190818152602001828054612f9690615063565b8015612fe35780601f10612fb857610100808354040283529160200191612fe3565b820191906000526020600020905b815481529060010190602001808311612fc657829003601f168201915b505050505090508051600003612ffc5750600092915050565b6000806130098382613f18565b9092509050600061301a8483613cd7565b905061096b8184612912565b60008042836001600160401b031610156130535761ffff196201000085160161304e57600094505b600093505b50929391925050565b60006001600160e01b03198216636cdb3d1360e11b148061308d57506001600160e01b031982166303a24d0760e21b145b806107fa57506301ffc9a760e01b6001600160e01b03198316146107fa565b60006130b7826116a2565b9050806001600160a01b0316836001600160a01b0316036131245760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107bb565b336001600160a01b038216148061314057506131408133612a59565b6131b25760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016107bb565b6108f68383613fcf565b6000620200008381161480156108ae5750426131db6276a7008461539a565b6001600160401b0316109392505050565b84516020860120600061320d6000805160206156cd83398151915283613357565b9050600061323688604051806040016040528060058152602001626cae8d60e31b81525061403d565b600083815260066020526040902090915061325182826153ba565b50613264828289620300008a1789613c95565b6001600160a01b0384161561191057604051630c4b7b8560e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631896f70a906132c19085908890600401614f8f565b600060405180830381600087803b1580156132db57600080fd5b505af11580156132ef573d6000803e3d6000fd5b505050505050505050505050565b6000546001600160a01b031633146117f25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bb565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6000808061339084610800565b91945092509050426001600160401b0382161080801561345357506001600160a01b038416158061345357506040516302571be360e01b8152600481018690526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906302571be390602401602060405180830381865afa158015613424573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134489190615170565b6001600160a01b0316145b1561349257600061346387610800565b50915050602081161561348c5760405163a2a7201360e01b8152600481018790526024016107bb565b506134b9565b620100008316156134b95760405163a2a7201360e01b8152600481018690526024016107bb565b505050505050565b63fffdffff81811763ffffffff16146134f05760405163a2a7201360e01b8152600481018390526024016107bb565b5050565b6060600061359d8360066000888152602001908152602001600020805461351a90615063565b80601f016020809104026020016040519081016040528092919081815260200182805461354690615063565b80156135935780601f1061356857610100808354040283529160200191613593565b820191906000526020600020905b81548152906001019060200180831161357657829003601f168201915b505050505061403d565b60008581526006602052604090209091506135b882826153ba565b50949350505050565b6000806135cd85610800565b925050506000806135e08860001c610800565b92509250506135f0878784613a01565b6135fb858483613a3c565b98975050505050505050565b600080613613836116a2565b6001600160a01b0316141580156107fa57506040516302571be360e01b81526004810183905230906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906302571be390602401602060405180830381865afa15801561368c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136b09190615170565b6001600160a01b03161492915050565b600086815260066020526040812080546136df91879161351a90615063565b90506136ee8682868686613c95565b50505050505050565b6000808061370488610800565b925092509250600061372e88600660008d8152602001908152602001600020805461351a90615063565b60008a815260066020526040902080549192509061374b90615063565b905060000361376e57600089815260066020526040902061376c82826153ba565b505b61377d89858886178589613a82565b6001600160a01b03871661379b57613796896000613ba5565b610ad5565b610ad584888b60001c600160405180602001604052806000815250613e36565b6201ffff19620200008316016137db576137d86276a7008261539a565b90505b42816001600160401b03161015613814576201000082161561380f5760405162461bcd60e51b81526004016107bb906150f8565b613839565b60048216156138395760405163a2a7201360e01b8152600481018490526024016107bb565b604082166000036108f6575050600090815260036020526040902080546001600160a01b0319169055565b60c0816001600160401b0316901b60a08363ffffffff16901b846001600160a01b03161717600160008681526020019081526020016000208190555050505050565b6001600160a01b0384163b156134b95760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906138ea9089908990889088908890600401615479565b6020604051808303816000875af1925050508015613925575060408051601f3d908101601f19168201909252613922918101906154cb565b60015b6139d1576139316154e8565b806308c379a00361396a5750613945615504565b80613950575061396c565b8060405162461bcd60e51b81526004016107bb9190614506565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016107bb565b6001600160e01b0319811663bc197c8160e01b146136ee5760405162461bcd60e51b81526004016107bb9061558d565b63ffff00008216158015906001831615908290613a1b5750805b156112525760405163a2a7201360e01b8152600481018690526024016107bb565b6000816001600160401b0316846001600160401b03161115613a5c578193505b826001600160401b0316846001600160401b03161015613a7a578293505b509192915050565b613a8e85858584613b3f565b60405163ffffffff8416815285907f39873f00c80f4f94b7bd1594aebcf650f003545b74824d57ddf4939e3ff3a34b9060200160405180910390a2816001600160401b0316816001600160401b03161115611252576040516001600160401b038216815285907ff675815a0817338f93a7da433f6bd5f5542f1029b11b455191ac96c7f6a9b132906020015b60405180910390a25050505050565b600080613b3583610800565b5090949350505050565b613b4984836140b4565b61169c84848484613864565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b613bb0826001611ead565b15613bd15760405163a2a7201360e01b8152600481018390526024016107bb565b613bda82613d96565b604051635b0fc9c360e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635b0fc9c390613c289085908590600401614f8f565b600060405180830381600087803b158015613c4257600080fd5b505af1158015613c56573d6000803e3d6000fd5b50506040516001600160a01b03841681528492507fee2ba1195c65bcf218a83d874335c6bf9d9067b4c672f3c3bf16cf40de7586c49150602001612a4d565b613ca1858484846140ed565b847f8ce7013e8abebc55c3890a68f5a27c67c3f7efa64e584de5fb22363c606fd34085858585604051613b1a94939291906155d5565b6000806000613ce68585613f18565b909250905081613d585760018551613cfe919061561c565b8414613d4c5760405162461bcd60e51b815260206004820152601d60248201527f6e616d65686173683a204a756e6b20617420656e64206f66206e616d6500000060448201526064016107bb565b50600091506107fa9050565b613d628582613cd7565b6040805160208101929092528101839052606001604051602081830303815290604052805190602001209250505092915050565b60008181526001602052604090205460a081901c60c082901c613dba838383613026565b600086815260036020526040812080546001600160a01b0319169055909350613de7915085908484613864565b60408051858152600160208201526000916001600160a01b0386169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a450505050565b6000806000613e4486610800565b925092509250613e558683836137bb565b846001148015613e765750876001600160a01b0316836001600160a01b0316145b613e925760405162461bcd60e51b81526004016107bb906150f8565b866001600160a01b0316836001600160a01b031603613eb357505050611252565b613ebf86888484613864565b60408051878152602081018790526001600160a01b03808a1692908b169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611910338989898989614161565b60008083518310613f6b5760405162461bcd60e51b815260206004820152601e60248201527f726561644c6162656c3a20496e646578206f7574206f6620626f756e6473000060448201526064016107bb565b6000848481518110613f7f57613f7f6150e2565b016020015160f81c90508015613fab57613fa485613f9e86600161562f565b8361421c565b9250613fb0565b600092505b613fba818561562f565b613fc590600161562f565b9150509250929050565b600081815260036020526040902080546001600160a01b0319166001600160a01b0384169081179091558190614004826116a2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b606060018351101561406257604051631406d65b60e11b815260040160405180910390fd5b60ff83511115614087578260405163e3ba295f60e01b81526004016107bb9190614506565b8251838360405160200161409d93929190615642565b604051602081830303815290604052905092915050565b61ffff8116158015906140cc57506201000181811614155b156134f05760405163a2a7201360e01b8152600481018390526024016107bb565b6140f784836140b4565b6000848152600160205260409020546001600160a01b038116156141555761411e85613d96565b6040516000815285907fee2ba1195c65bcf218a83d874335c6bf9d9067b4c672f3c3bf16cf40de7586c49060200160405180910390a25b61125285858585614240565b6001600160a01b0384163b156134b95760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906141a59089908990889088908890600401615687565b6020604051808303816000875af19250505080156141e0575060408051601f3d908101601f191682019092526141dd918101906154cb565b60015b6141ec576139316154e8565b6001600160e01b0319811663f23a6e6160e01b146136ee5760405162461bcd60e51b81526004016107bb9061558d565b825160009061422b838561562f565b111561423657600080fd5b5091016020012090565b836000808061424e84610800565b9194509250905063ffff000082166001600160401b038087169083161115614274578195505b42826001600160401b03161061428957958617955b6001600160a01b038416156142e05760405162461bcd60e51b815260206004820152601f60248201527f455243313135353a206d696e74206f66206578697374696e6720746f6b656e0060448201526064016107bb565b6001600160a01b0388166143405760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016107bb565b306001600160a01b038916036143b55760405162461bcd60e51b815260206004820152603460248201527f455243313135353a206e65774f776e65722063616e6e6f74206265207468652060448201527313985b5955dc985c1c195c8818dbdb9d1c9858dd60621b60648201526084016107bb565b6143c185898989613864565b60408051868152600160208201526001600160a01b038a169160009133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461283e3360008a88600160405180602001604052806000815250614161565b6001600160a01b038116811461212757600080fd5b6000806040838503121561445157600080fd5b823561445c81614429565b946020939093013593505050565b60006020828403121561447c57600080fd5b5035919050565b6001600160e01b03198116811461212757600080fd5b6000602082840312156144ab57600080fd5b81356108ae81614483565b60005b838110156144d15781810151838201526020016144b9565b50506000910152565b600081518084526144f28160208601602086016144b6565b601f01601f19169290920160200192915050565b6020815260006108ae60208301846144da565b6000806040838503121561452c57600080fd5b82359150602083013561453e81614429565b809150509250929050565b80356001600160401b038116811461456057600080fd5b919050565b6000806040838503121561457857600080fd5b8235915061458860208401614549565b90509250929050565b60008083601f8401126145a357600080fd5b5081356001600160401b038111156145ba57600080fd5b6020830191508360208285010111156145d257600080fd5b9250929050565b6000806000806000608086880312156145f157600080fd5b85356145fc81614429565b9450602086013561460c81614429565b93506040860135925060608601356001600160401b0381111561462e57600080fd5b61463a88828901614591565b969995985093965092949392505050565b60006020828403121561465d57600080fd5b81356108ae81614429565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156146a3576146a3614668565b6040525050565b60006001600160401b038211156146c3576146c3614668565b50601f01601f191660200190565b600082601f8301126146e257600080fd5b81356146ed816146aa565b6040516146fa828261467e565b82815285602084870101111561470f57600080fd5b82602086016020830137600092810160200192909252509392505050565b803563ffffffff8116811461456057600080fd5b600080600080600080600060e0888a03121561475c57600080fd5b8735965060208801356001600160401b0381111561477957600080fd5b6147858a828b016146d1565b965050604088013561479681614429565b945060608801356147a681614429565b93506147b460808901614549565b92506147c260a0890161472d565b91506147d060c08901614549565b905092959891949750929550565b60006001600160401b038211156147f7576147f7614668565b5060051b60200190565b600082601f83011261481257600080fd5b8135602061481f826147de565b60405161482c828261467e565b80915083815260208101915060208460051b87010193508684111561485057600080fd5b602086015b84811015611ea25780358352918301918301614855565b600080600080600060a0868803121561488457600080fd5b853561488f81614429565b9450602086013561489f81614429565b935060408601356001600160401b03808211156148bb57600080fd5b6148c789838a01614801565b945060608801359150808211156148dd57600080fd5b6148e989838a01614801565b935060808801359150808211156148ff57600080fd5b5061490c888289016146d1565b9150509295509295909350565b6000806000806080858703121561492f57600080fd5b84359350602085013592506149466040860161472d565b915061495460608601614549565b905092959194509250565b803561ffff8116811461456057600080fd5b6000806040838503121561498457600080fd5b823591506145886020840161495f565b600080604083850312156149a757600080fd5b82356001600160401b03808211156149be57600080fd5b818501915085601f8301126149d257600080fd5b813560206149df826147de565b6040516149ec828261467e565b83815260059390931b8501820192828101915089841115614a0c57600080fd5b948201945b83861015614a33578535614a2481614429565b82529482019490820190614a11565b96505086013592505080821115614a4957600080fd5b50613fc585828601614801565b60008151808452602080850194506020840160005b83811015614a8757815187529582019590820190600101614a6b565b509495945050505050565b6020815260006108ae6020830184614a56565b600080600060608486031215614aba57600080fd5b8335614ac581614429565b92506020840135614ad581614429565b929592945050506040919091013590565b600080600060608486031215614afb57600080fd5b8335925060208401359150614b1260408501614549565b90509250925092565b600080600060608486031215614b3057600080fd5b833592506020840135614b4281614429565b91506040840135614b5281614429565b809150509250925092565b600080600080600060808688031215614b7557600080fd5b85356001600160401b03811115614b8b57600080fd5b614b9788828901614591565b9096509450506020860135614bab81614429565b9250614bb96040870161495f565b91506060860135614bc981614429565b809150509295509295909350565b801515811461212757600080fd5b60008060408385031215614bf857600080fd5b8235614c0381614429565b9150602083013561453e81614bd7565b60008060008060008060a08789031215614c2c57600080fd5b86356001600160401b03811115614c4257600080fd5b614c4e89828a01614591565b9097509550506020870135614c6281614429565b9350604087013592506060870135614c7981614429565b9150614c876080880161495f565b90509295509295509295565b60008060408385031215614ca657600080fd5b823591506145886020840161472d565b60008060408385031215614cc957600080fd5b50508035926020909101359150565b60008060008060008060a08789031215614cf157600080fd5b8635955060208701356001600160401b03811115614d0e57600080fd5b614d1a89828a01614591565b9096509450506040870135614d2e81614429565b9250614d3c6060880161472d565b9150614c8760808801614549565b60008060008060408587031215614d6057600080fd5b84356001600160401b0380821115614d7757600080fd5b614d8388838901614591565b90965094506020870135915080821115614d9c57600080fd5b50614da987828801614591565b95989497509550505050565b60008060008060808587031215614dcb57600080fd5b843593506020850135614ddd81614429565b9250604085013561494681614429565b600080600060608486031215614e0257600080fd5b83359250602084013591506040840135614b5281614429565b60008060408385031215614e2e57600080fd5b8235614e3981614429565b9150602083013561453e81614429565b60008060008060608587031215614e5f57600080fd5b84356001600160401b03811115614e7557600080fd5b614e8187828801614591565b9095509350506020850135614e9581614429565b91506040850135614ea581614429565b939692955090935050565b600080600080600060a08688031215614ec857600080fd5b8535614ed381614429565b94506020860135614ee381614429565b9350604086013592506060860135915060808601356001600160401b03811115614f0c57600080fd5b61490c888289016146d1565b600060208284031215614f2a57600080fd5b81516001600160401b03811115614f4057600080fd5b8201601f81018413614f5157600080fd5b8051614f5c816146aa565b604051614f69828261467e565b828152866020848601011115614f7e57600080fd5b61096b8360208301602087016144b6565b9182526001600160a01b0316602082015260400190565b60008060008060808587031215614fbc57600080fd5b84356001600160401b03811115614fd257600080fd5b614fde878288016146d1565b9450506020850135614fef81614429565b9250614ffd6040860161495f565b91506060850135614ea581614429565b60006020828403121561501f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6001600160401b0381811683821601908082111561505c5761505c615026565b5092915050565b600181811c9082168061507757607f821691505b60208210810361509757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006151556040830185614a56565b82810360208401526151678185614a56565b95945050505050565b60006020828403121561518257600080fd5b81516108ae81614429565b60006020828403121561519f57600080fd5b81516108ae81614bd7565b8183823760009101908152919050565b60208082526028908201527f436f6e74726f6c6c61626c653a2043616c6c6572206973206e6f74206120636f604082015267373a3937b63632b960c11b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60c08152600061523f60c083018a8c615202565b6001600160a01b03898116602085015263ffffffff891660408501526001600160401b03881660608501528616608084015282810360a0840152615284818587615202565b9b9a5050505050505050505050565b601f8211156108f6576000816000526020600020601f850160051c810160208610156152bc5750805b601f850160051c820191505b818110156134b9578281556001016152c8565b6001600160401b038311156152f2576152f2614668565b615306836153008354615063565b83615293565b6000601f84116001811461533a57600085156153225750838201355b600019600387901b1c1916600186901b178355611252565b600083815260209020601f19861690835b8281101561536b578685013582556020948501946001909201910161534b565b50868210156153885760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6001600160401b0382811682821603908082111561505c5761505c615026565b81516001600160401b038111156153d3576153d3614668565b6153e7816153e18454615063565b84615293565b602080601f83116001811461541c57600084156154045750858301515b600019600386901b1c1916600185901b1785556134b9565b600085815260208120601f198616915b8281101561544b5788860151825594840194600190910190840161542c565b50858210156154695787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0386811682528516602082015260a0604082018190526000906154a590830186614a56565b82810360608401526154b78186614a56565b905082810360808401526135fb81856144da565b6000602082840312156154dd57600080fd5b81516108ae81614483565b600060033d11156155015760046000803e5060005160e01c5b90565b600060443d10156155125790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561554157505050505090565b82850191508151818111156155595750505050505090565b843d87010160208285010111156155735750505050505090565b6155826020828601018761467e565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6080815260006155e860808301876144da565b6001600160a01b039590951660208301525063ffffffff9290921660408301526001600160401b0316606090910152919050565b818103818111156107fa576107fa615026565b808201808211156107fa576107fa615026565b60ff60f81b8460f81b168152600083516156638160018501602088016144b6565b83519083019061567a8160018401602088016144b6565b0160010195945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906156c1908301846144da565b97965050505050505056fe93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4aea26469706673582212209b25a259ef8986d46a1bfe17671970399728db343863f016912d8beb240746b064736f6c63430008170033",nD=t=>t.length>1;class li extends fu{constructor(...e){nD(e)?super(...e):super(Y5,lc,e[0])}deploy(e,r,n,u){return super.deploy(e,r,n,u||{})}getDeployTransaction(e,r,n,u){return super.getDeployTransaction(e,r,n,u||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new rr(Y5)}static connect(e,r){return new Hr(e,Y5,r)}}it(li,"bytecode",lc),it(li,"abi",Y5);var ps={exports:{}},N2={},vb={exports:{}},uD="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",iD=uD,aD=iD;function Ab(){}function wb(){}wb.resetWarningCache=Ab;var oD=function(){function t(n,u,i,a,o,s){if(s!==aD){var l=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 l.name="Invariant Violation",l}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:wb,resetWarningCache:Ab};return r.PropTypes=r,r};vb.exports=oD();var Eb=vb.exports,bs={exports:{}},Zt={},ms={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;/*! + * Adapted from jQuery UI core + * + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/ui-core/ + */var r="none",n="contents",u=/input|select|textarea|button|object|iframe/;function i(y,v){return v.getPropertyValue("overflow")!=="visible"||y.scrollWidth<=0&&y.scrollHeight<=0}function a(y){var v=y.offsetWidth<=0&&y.offsetHeight<=0;if(v&&!y.innerHTML)return!0;try{var w=window.getComputedStyle(y),_=w.getPropertyValue("display");return v?_!==n&&i(y,w):_===r}catch{return console.warn("Failed to inspect element style"),!1}}function o(y){for(var v=y,w=y.getRootNode&&y.getRootNode();v&&v!==document.body;){if(w&&v===w&&(v=w.host.parentNode),a(v))return!1;v=v.parentNode}return!0}function s(y,v){var w=y.nodeName.toLowerCase(),_=u.test(w)&&!y.disabled||w==="a"&&y.href||v;return _&&o(y)}function l(y){var v=y.getAttribute("tabindex");v===null&&(v=void 0);var w=isNaN(v);return(w||v>=0)&&s(y,!w)}function c(y){var v=[].slice.call(y.querySelectorAll("*"),0).reduce(function(w,_){return w.concat(_.shadowRoot?c(_.shadowRoot):[_])},[]);return v.filter(l)}t.exports=e.default})(ms,ms.exports);var Cb=ms.exports;Object.defineProperty(Zt,"__esModule",{value:!0});Zt.resetState=cD;Zt.log=dD;Zt.handleBlur=$i;Zt.handleFocus=qi;Zt.markForFocusLater=hD;Zt.returnFocus=pD;Zt.popWithoutFocus=bD;Zt.setupScopedFocus=mD;Zt.teardownScopedFocus=yD;var sD=Cb,lD=fD(sD);function fD(t){return t&&t.__esModule?t:{default:t}}var Zn=[],Cn=null,ys=!1;function cD(){Zn=[]}function dD(){}function $i(){ys=!0}function qi(){if(ys){if(ys=!1,!Cn)return;setTimeout(function(){if(!Cn.contains(document.activeElement)){var t=(0,lD.default)(Cn)[0]||Cn;t.focus()}},0)}}function hD(){Zn.push(document.activeElement)}function pD(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=null;try{Zn.length!==0&&(e=Zn.pop(),e.focus({preventScroll:t}));return}catch{console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}}function bD(){Zn.length>0&&Zn.pop()}function mD(t){Cn=t,window.addEventListener?(window.addEventListener("blur",$i,!1),document.addEventListener("focus",qi,!0)):(window.attachEvent("onBlur",$i),document.attachEvent("onFocus",qi))}function yD(){Cn=null,window.addEventListener?(window.removeEventListener("blur",$i),document.removeEventListener("focus",qi)):(window.detachEvent("onBlur",$i),document.detachEvent("onFocus",qi))}var gs={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var r=Cb,n=u(r);function u(o){return o&&o.__esModule?o:{default:o}}function i(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;return o.activeElement.shadowRoot?i(o.activeElement.shadowRoot):o.activeElement}function a(o,s){var l=(0,n.default)(o);if(!l.length){s.preventDefault();return}var c=void 0,y=s.shiftKey,v=l[0],w=l[l.length-1],_=i();if(o===_){if(!y)return;c=w}if(w===_&&!y&&(c=v),v===_&&y&&(c=w),c){s.preventDefault(),c.focus();return}var M=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),N=M!=null&&M[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(N){var k=l.indexOf(_);if(k>-1&&(k+=y?-1:1),c=l[k],typeof c>"u"){s.preventDefault(),c=y?w:v,c.focus();return}s.preventDefault(),c.focus()}}t.exports=e.default})(gs,gs.exports);var gD=gs.exports,e6={},xD=function(){},vD=xD,Jt={},Fb={exports:{}};/*! + Copyright (c) 2015 Jed Watson. + Based on code that is Copyright 2013-2015, Facebook, Inc. + All rights reserved. +*/(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})()})(Fb);var AD=Fb.exports;Object.defineProperty(Jt,"__esModule",{value:!0});Jt.canUseDOM=Jt.SafeNodeList=Jt.SafeHTMLCollection=void 0;var wD=AD,ED=CD(wD);function CD(t){return t&&t.__esModule?t:{default:t}}var Wa=ED.default,FD=Wa.canUseDOM?window.HTMLElement:{};Jt.SafeHTMLCollection=Wa.canUseDOM?window.HTMLCollection:{};Jt.SafeNodeList=Wa.canUseDOM?window.NodeList:{};Jt.canUseDOM=Wa.canUseDOM;Jt.default=FD;Object.defineProperty(e6,"__esModule",{value:!0});e6.resetState=SD;e6.log=TD;e6.assertNodeList=Bb;e6.setElement=PD;e6.validateElement=Y4;e6.hide=ND;e6.show=MD;e6.documentNotReadyOrSSRTesting=UD;var BD=vD,DD=kD(BD),_D=Jt;function kD(t){return t&&t.__esModule?t:{default:t}}var Ct=null;function SD(){Ct&&(Ct.removeAttribute?Ct.removeAttribute("aria-hidden"):Ct.length!=null?Ct.forEach(function(t){return t.removeAttribute("aria-hidden")}):document.querySelectorAll(Ct).forEach(function(t){return t.removeAttribute("aria-hidden")})),Ct=null}function TD(){}function Bb(t,e){if(!t||!t.length)throw new Error("react-modal: No elements were found for selector "+e+".")}function PD(t){var e=t;if(typeof e=="string"&&_D.canUseDOM){var r=document.querySelectorAll(e);Bb(r,e),e=r}return Ct=e||Ct,Ct}function Y4(t){var e=t||Ct;return e?Array.isArray(e)||e instanceof HTMLCollection||e instanceof NodeList?e:[e]:((0,DD.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function ND(t){var e=!0,r=!1,n=void 0;try{for(var u=Y4(t)[Symbol.iterator](),i;!(e=(i=u.next()).done);e=!0){var a=i.value;a.setAttribute("aria-hidden","true")}}catch(o){r=!0,n=o}finally{try{!e&&u.return&&u.return()}finally{if(r)throw n}}}function MD(t){var e=!0,r=!1,n=void 0;try{for(var u=Y4(t)[Symbol.iterator](),i;!(e=(i=u.next()).done);e=!0){var a=i.value;a.removeAttribute("aria-hidden")}}catch(o){r=!0,n=o}finally{try{!e&&u.return&&u.return()}finally{if(r)throw n}}}function UD(){Ct=null}var cu={};Object.defineProperty(cu,"__esModule",{value:!0});cu.resetState=OD;cu.log=ID;var fi={},ci={};function fc(t,e){t.classList.remove(e)}function OD(){var t=document.getElementsByTagName("html")[0];for(var e in fi)fc(t,fi[e]);var r=document.body;for(var n in ci)fc(r,ci[n]);fi={},ci={}}function ID(){}var RD=function(e,r){return e[r]||(e[r]=0),e[r]+=1,r},LD=function(e,r){return e[r]&&(e[r]-=1),r},jD=function(e,r,n){n.forEach(function(u){RD(r,u),e.add(u)})},zD=function(e,r,n){n.forEach(function(u){LD(r,u),r[u]===0&&e.remove(u)})};cu.add=function(e,r){return jD(e.classList,e.nodeName.toLowerCase()=="html"?fi:ci,r.split(" "))};cu.remove=function(e,r){return zD(e.classList,e.nodeName.toLowerCase()=="html"?fi:ci,r.split(" "))};var du={};Object.defineProperty(du,"__esModule",{value:!0});du.log=qD;du.resetState=HD;function $D(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Db=function t(){var e=this;$D(this,t),this.register=function(r){e.openInstances.indexOf(r)===-1&&(e.openInstances.push(r),e.emit("register"))},this.deregister=function(r){var n=e.openInstances.indexOf(r);n!==-1&&(e.openInstances.splice(n,1),e.emit("deregister"))},this.subscribe=function(r){e.subscribers.push(r)},this.emit=function(r){e.subscribers.forEach(function(n){return n(r,e.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},aa=new Db;function qD(){console.log("portalOpenInstances ----------"),console.log(aa.openInstances.length),aa.openInstances.forEach(function(t){return console.log(t)}),console.log("end portalOpenInstances ----------")}function HD(){aa=new Db}du.default=aa;var X4={};Object.defineProperty(X4,"__esModule",{value:!0});X4.resetState=WD;X4.log=QD;var KD=du,GD=VD(KD);function VD(t){return t&&t.__esModule?t:{default:t}}var Te=void 0,zt=void 0,w2=[];function WD(){for(var t=[Te,zt],e=0;e0?(document.body.firstChild!==Te&&document.body.insertBefore(Te,document.body.firstChild),document.body.lastChild!==zt&&document.body.appendChild(zt)):(Te.parentElement&&Te.parentElement.removeChild(Te),zt.parentElement&&zt.parentElement.removeChild(zt))}GD.default.subscribe(JD);(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(d){for(var x=1;x0&&(X-=1,X===0&&w.show(R)),F.props.shouldFocusAfterRender&&(F.props.shouldReturnFocusAfterClose?(l.returnFocus(F.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),F.props.onAfterClose&&F.props.onAfterClose(),T.default.deregister(F)},F.open=function(){F.beforeOpen(),F.state.afterOpen&&F.state.beforeClose?(clearTimeout(F.closeTimer),F.setState({beforeClose:!1})):(F.props.shouldFocusAfterRender&&(l.setupScopedFocus(F.node),l.markForFocusLater()),F.setState({isOpen:!0},function(){F.openAnimationFrame=requestAnimationFrame(function(){F.setState({afterOpen:!0}),F.props.isOpen&&F.props.onAfterOpen&&F.props.onAfterOpen({overlayEl:F.overlay,contentEl:F.content})})}))},F.close=function(){F.props.closeTimeoutMS>0?F.closeWithTimeout():F.closeWithoutTimeout()},F.focusContent=function(){return F.content&&!F.contentHasFocus()&&F.content.focus({preventScroll:!0})},F.closeWithTimeout=function(){var D=Date.now()+F.props.closeTimeoutMS;F.setState({beforeClose:!0,closesAt:D},function(){F.closeTimer=setTimeout(F.closeWithoutTimeout,F.state.closesAt-Date.now())})},F.closeWithoutTimeout=function(){F.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},F.afterClose)},F.handleKeyDown=function(D){o1(D)&&(0,y.default)(F.content,D),F.props.shouldCloseOnEsc&&S(D)&&(D.stopPropagation(),F.requestClose(D))},F.handleOverlayOnClick=function(D){F.shouldClose===null&&(F.shouldClose=!0),F.shouldClose&&F.props.shouldCloseOnOverlayClick&&(F.ownerHandlesClose()?F.requestClose(D):F.focusContent()),F.shouldClose=null},F.handleContentOnMouseUp=function(){F.shouldClose=!1},F.handleOverlayOnMouseDown=function(D){!F.props.shouldCloseOnOverlayClick&&D.target==F.overlay&&D.preventDefault()},F.handleContentOnClick=function(){F.shouldClose=!1},F.handleContentOnMouseDown=function(){F.shouldClose=!1},F.requestClose=function(D){return F.ownerHandlesClose()&&F.props.onRequestClose(D)},F.ownerHandlesClose=function(){return F.props.onRequestClose},F.shouldBeClosed=function(){return!F.state.isOpen&&!F.state.beforeClose},F.contentHasFocus=function(){return document.activeElement===F.content||F.content.contains(document.activeElement)},F.buildClassName=function(D,R){var q=(typeof R>"u"?"undefined":n(R))==="object"?R:{base:i1[D],afterOpen:i1[D]+"--after-open",beforeClose:i1[D]+"--before-close"},b=q.base;return F.state.afterOpen&&(b=b+" "+q.afterOpen),F.state.beforeClose&&(b=b+" "+q.beforeClose),typeof R=="string"&&R?b+" "+R:b},F.attributesFromObject=function(D,R){return Object.keys(R).reduce(function(q,b){return q[D+"-"+b]=R[b],q},{})},F.state={afterOpen:!1,beforeClose:!1},F.shouldClose=null,F.moveFromContentToOverlay=null,F}return u(x,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(F,D){this.props.isOpen&&!F.isOpen?this.open():!this.props.isOpen&&F.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!D.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var F=this.props,D=F.appElement,R=F.ariaHideApp,q=F.htmlOpenClassName,b=F.bodyOpenClassName,f=F.parentSelector,m=f&&f().ownerDocument||document;b&&M.add(m.body,b),q&&M.add(m.getElementsByTagName("html")[0],q),R&&(X+=1,w.hide(D)),T.default.register(this)}},{key:"render",value:function(){var F=this.props,D=F.id,R=F.className,q=F.overlayClassName,b=F.defaultStyles,f=F.children,m=R?{}:b.content,B=q?{}:b.overlay;if(this.shouldBeClosed())return null;var p={ref:this.setOverlayRef,className:this.buildClassName("overlay",q),style:r({},B,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},I=r({id:D,ref:this.setContentRef,style:r({},m,this.props.style.content),className:this.buildClassName("content",R),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),L=this.props.contentElement(I,f);return this.props.overlayElement(p,L)}}]),x}(i.Component);U.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},U.propTypes={isOpen:o.default.bool.isRequired,defaultStyles:o.default.shape({content:o.default.object,overlay:o.default.object}),style:o.default.shape({content:o.default.object,overlay:o.default.object}),className:o.default.oneOfType([o.default.string,o.default.object]),overlayClassName:o.default.oneOfType([o.default.string,o.default.object]),parentSelector:o.default.func,bodyOpenClassName:o.default.string,htmlOpenClassName:o.default.string,ariaHideApp:o.default.bool,appElement:o.default.oneOfType([o.default.instanceOf(k.default),o.default.instanceOf(N.SafeHTMLCollection),o.default.instanceOf(N.SafeNodeList),o.default.arrayOf(o.default.instanceOf(k.default))]),onAfterOpen:o.default.func,onAfterClose:o.default.func,onRequestClose:o.default.func,closeTimeoutMS:o.default.number,shouldFocusAfterRender:o.default.bool,shouldCloseOnOverlayClick:o.default.bool,shouldReturnFocusAfterClose:o.default.bool,preventScroll:o.default.bool,role:o.default.string,contentLabel:o.default.string,aria:o.default.object,data:o.default.object,children:o.default.node,shouldCloseOnEsc:o.default.bool,overlayRef:o.default.func,contentRef:o.default.func,id:o.default.string,overlayElement:o.default.func,contentElement:o.default.func,testId:o.default.string},e.default=U,t.exports=e.default})(bs,bs.exports);var YD=bs.exports;function _b(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function kb(t){function e(r){var n=this.constructor.getDerivedStateFromProps(t,r);return n??null}this.setState(e.bind(this))}function Sb(t,e){try{var r=this.props,n=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}_b.__suppressDeprecationWarning=!0;kb.__suppressDeprecationWarning=!0;Sb.__suppressDeprecationWarning=!0;function XD(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function")return t;var r=null,n=null,u=null;if(typeof e.componentWillMount=="function"?r="componentWillMount":typeof e.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof e.componentWillReceiveProps=="function"?n="componentWillReceiveProps":typeof e.UNSAFE_componentWillReceiveProps=="function"&&(n="UNSAFE_componentWillReceiveProps"),typeof e.componentWillUpdate=="function"?u="componentWillUpdate":typeof e.UNSAFE_componentWillUpdate=="function"&&(u="UNSAFE_componentWillUpdate"),r!==null||n!==null||u!==null){var i=t.displayName||t.name,a=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. + +`+i+" uses "+a+" but also contains the following legacy lifecycles:"+(r!==null?` + `+r:"")+(n!==null?` + `+n:"")+(u!==null?` + `+u:"")+` + +The above lifecycles should be removed. Learn more about this warning here: +https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof t.getDerivedStateFromProps=="function"&&(e.componentWillMount=_b,e.componentWillReceiveProps=kb),typeof e.getSnapshotBeforeUpdate=="function"){if(typeof e.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=Sb;var o=e.componentDidUpdate;e.componentDidUpdate=function(l,c,y){var v=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:y;o.call(this,l,c,v)}}return t}const ZD=Object.freeze(Object.defineProperty({__proto__:null,polyfill:XD},Symbol.toStringTag,{value:"Module"})),e_=P0(ZD);Object.defineProperty(N2,"__esModule",{value:!0});N2.bodyOpenClassName=N2.portalClassName=void 0;var dc=Object.assign||function(t){for(var e=1;e{var u,i;e(),await q4.activate().catch(()=>{});try{const a=String(await((u=window.ethereum)==null?void 0:u.request({method:"net_version"}).catch(()=>"0x1")));if(a!==y2&&a!==RF){const o={chainId:"0xaa36a7",chainName:"Sepolia Test Network",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia-infura.brave.com/"],blockExplorerUrls:["https://sepolia.etherscan.io"]};await((i=window.ethereum)==null?void 0:i.request({method:"wallet_addEthereumChain",params:[o]}))}}catch(a){console.error("FAILED TO ADD SEPOLIA:",a)}},[e]);return Q.jsx(p_,{isOpen:t,onRequestClose:e,className:"connect-modal",overlayClassName:"overlay-modal",children:Q.jsx("div",{className:"connect-modal-content",children:Q.jsx("button",{onClick:n,disabled:r,children:"Connect to Wallet"})})})}function Pb(t){let e=t.split("."),r=new Uint8Array(t.length+e.length),n=0;for(let u of e){let i=u.length;r[n]=i,n++;for(let a=0;au.toString(16).padStart(2,"0")).join("")}`}const Un=2147483647,b6=36,Z4=1,Hi=26,y_=38,g_=700,Nb=72,Mb=128,Ub="-",x_=/^xn--/,v_=/[^\0-\x7F]/,A_=/[\x2E\u3002\uFF0E\uFF61]/g,w_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Go=b6-Z4,m6=Math.floor,Vo=String.fromCharCode;function yr(t){throw new RangeError(w_[t])}function E_(t,e){const r=[];let n=t.length;for(;n--;)r[n]=e(t[n]);return r}function Ob(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(A_,".");const u=t.split("."),i=E_(u,e).join(".");return n+i}function el(t){const e=[];let r=0;const n=t.length;for(;r=55296&&u<=56319&&rString.fromCodePoint(...t),C_=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:b6},gc=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Rb=function(t,e,r){let n=0;for(t=r?m6(t/g_):t>>1,t+=m6(t/e);t>Go*Hi>>1;n+=b6)t=m6(t/Go);return m6(n+(Go+1)*t/(t+y_))},tl=function(t){const e=[],r=t.length;let n=0,u=Mb,i=Nb,a=t.lastIndexOf(Ub);a<0&&(a=0);for(let o=0;o=128&&yr("not-basic"),e.push(t.charCodeAt(o));for(let o=a>0?a+1:0;o=r&&yr("invalid-input");const v=C_(t.charCodeAt(o++));v>=b6&&yr("invalid-input"),v>m6((Un-n)/c)&&yr("overflow"),n+=v*c;const w=y<=i?Z4:y>=i+Hi?Hi:y-i;if(vm6(Un/_)&&yr("overflow"),c*=_}const l=e.length+1;i=Rb(n-s,l,s==0),m6(n/l)>Un-u&&yr("overflow"),u+=m6(n/l),n%=l,e.splice(n++,0,u)}return String.fromCodePoint(...e)},rl=function(t){const e=[];t=el(t);const r=t.length;let n=Mb,u=0,i=Nb;for(const s of t)s<128&&e.push(Vo(s));const a=e.length;let o=a;for(a&&e.push(Ub);o=n&&cm6((Un-u)/l)&&yr("overflow"),u+=(s-n)*l,n=s;for(const c of t)if(cUn&&yr("overflow"),c===n){let y=u;for(let v=b6;;v+=b6){const w=v<=i?Z4:v>=i+Hi?Hi:v-i;if(y253)||!/^([\u0E00-\u0E7Fa-z0-9-._*]+)$/g.test(e))return!1;if(r.topLevel&&hN[e.replace(/\.$/,"")])return!0;const u=/(.*)\.(([\u0E00-\u0E7Fa-z0-9]+)(\.[a-z0-9]+))/,i=e.match(u);let a=null,o=null;return i&&i.length>2&&dN[i[2]]&&(a=i[2],o=i[1].split(".")),!o&&(o=e.split("."),o.length<=1||(a=o.pop(),!/^(?:xn--)?(?!^\d+$)[\u0E00-\u0E7Fa-z0-9]+$/gi.test(a)))||r.subdomain===!1&&o.length>1?!1:o.every(function(l,c){if(r.wildcard&&c===0&&l==="*"&&o.length>1)return!0;let y=/^([\u0E00-\u0E7Fa-zA-Z0-9-_]+)$/g;c===o.length-1&&(y=/^([\u0E00-\u0E7Fa-zA-Z0-9-]+)$/g);const v=(l.match(/--(--)?/g)||[]).length,w=(l.match(/xn--/g)||[]).length;return c===o.length-1&&v!==w?!1:y.test(l)&&l.length<64&&!l.startsWith("-")&&!l.endsWith("-")})};const nl=Pt(pN);var zb={exports:{}};/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.5.7 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2016 + * @license MIT + */(function(t){(function(){var e=typeof window=="object"?window:{},r=!e.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r&&(e=f0);for(var n=!e.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,u="0123456789abcdef".split(""),i=[31,7936,2031616,520093696],a=[1,256,65536,16777216],o=[6,1536,393216,100663296],s=[0,8,16,24],l=[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],c=[224,256,384,512],y=[128,256],v=["hex","buffer","arrayBuffer","array"],w=function(S,X,U){return function(d){return new i1(S,X,S).update(d)[U]()}},_=function(S,X,U){return function(d,x){return new i1(S,X,x).update(d)[U]()}},M=function(S,X){var U=w(S,X,"hex");U.create=function(){return new i1(S,X,S)},U.update=function(P){return U.create().update(P)};for(var d=0;d>5,this.byteCount=this.blockCount<<2,this.outputBlocks=U>>5,this.extraBytes=(U&31)>>3;for(var d=0;d<50;++d)this.s[d]=0}i1.prototype.update=function(S){var X=typeof S!="string";X&&S.constructor===ArrayBuffer&&(S=new Uint8Array(S));for(var U=S.length,d=this.blocks,x=this.byteCount,P=this.blockCount,F=0,D=this.s,R,q;F>2]|=S[F]<>2]|=q<>2]|=(192|q>>6)<>2]|=(128|q&63)<=57344?(d[R>>2]|=(224|q>>12)<>2]|=(128|q>>6&63)<>2]|=(128|q&63)<>2]|=(240|q>>18)<>2]|=(128|q>>12&63)<>2]|=(128|q>>6&63)<>2]|=(128|q&63)<=x){for(this.start=R-x,this.block=d[P],R=0;R>2]|=this.padding[X&3],this.lastByteIndex===this.byteCount)for(S[0]=S[U],X=1;X>4&15]+u[D&15]+u[D>>12&15]+u[D>>8&15]+u[D>>20&15]+u[D>>16&15]+u[D>>28&15]+u[D>>24&15];P%S===0&&(o1(X),x=0)}return d&&(D=X[x],d>0&&(F+=u[D>>4&15]+u[D&15]),d>1&&(F+=u[D>>12&15]+u[D>>8&15]),d>2&&(F+=u[D>>20&15]+u[D>>16&15])),F},i1.prototype.arrayBuffer=function(){this.finalize();var S=this.blockCount,X=this.s,U=this.outputBlocks,d=this.extraBytes,x=0,P=0,F=this.outputBits>>3,D;d?D=new ArrayBuffer(U+1<<2):D=new ArrayBuffer(F);for(var R=new Uint32Array(D);P>8&255,F[D+2]=R>>16&255,F[D+3]=R>>24&255;P%S===0&&o1(X)}return d&&(D=P<<2,R=X[x],d>0&&(F[D]=R&255),d>1&&(F[D+1]=R>>8&255),d>2&&(F[D+2]=R>>16&255)),F};var o1=function(S){var X,U,d,x,P,F,D,R,q,b,f,m,B,p,I,L,V,G,r1,u1,a1,B1,b1,w1,L1,N1,_1,k1,O1,S1,e0,U1,q1,D0,J1,c0,ee,n0,u0,de,i0,m0,C0,Y1,a0,$0,o0,V1,he,s0,d0,te,j1,v0,se,l0,X1,ge,t0,y0,pe,g0,E0;for(d=0;d<48;d+=2)x=S[0]^S[10]^S[20]^S[30]^S[40],P=S[1]^S[11]^S[21]^S[31]^S[41],F=S[2]^S[12]^S[22]^S[32]^S[42],D=S[3]^S[13]^S[23]^S[33]^S[43],R=S[4]^S[14]^S[24]^S[34]^S[44],q=S[5]^S[15]^S[25]^S[35]^S[45],b=S[6]^S[16]^S[26]^S[36]^S[46],f=S[7]^S[17]^S[27]^S[37]^S[47],m=S[8]^S[18]^S[28]^S[38]^S[48],B=S[9]^S[19]^S[29]^S[39]^S[49],X=m^(F<<1|D>>>31),U=B^(D<<1|F>>>31),S[0]^=X,S[1]^=U,S[10]^=X,S[11]^=U,S[20]^=X,S[21]^=U,S[30]^=X,S[31]^=U,S[40]^=X,S[41]^=U,X=x^(R<<1|q>>>31),U=P^(q<<1|R>>>31),S[2]^=X,S[3]^=U,S[12]^=X,S[13]^=U,S[22]^=X,S[23]^=U,S[32]^=X,S[33]^=U,S[42]^=X,S[43]^=U,X=F^(b<<1|f>>>31),U=D^(f<<1|b>>>31),S[4]^=X,S[5]^=U,S[14]^=X,S[15]^=U,S[24]^=X,S[25]^=U,S[34]^=X,S[35]^=U,S[44]^=X,S[45]^=U,X=R^(m<<1|B>>>31),U=q^(B<<1|m>>>31),S[6]^=X,S[7]^=U,S[16]^=X,S[17]^=U,S[26]^=X,S[27]^=U,S[36]^=X,S[37]^=U,S[46]^=X,S[47]^=U,X=b^(x<<1|P>>>31),U=f^(P<<1|x>>>31),S[8]^=X,S[9]^=U,S[18]^=X,S[19]^=U,S[28]^=X,S[29]^=U,S[38]^=X,S[39]^=U,S[48]^=X,S[49]^=U,p=S[0],I=S[1],$0=S[11]<<4|S[10]>>>28,o0=S[10]<<4|S[11]>>>28,k1=S[20]<<3|S[21]>>>29,O1=S[21]<<3|S[20]>>>29,y0=S[31]<<9|S[30]>>>23,pe=S[30]<<9|S[31]>>>23,m0=S[40]<<18|S[41]>>>14,C0=S[41]<<18|S[40]>>>14,D0=S[2]<<1|S[3]>>>31,J1=S[3]<<1|S[2]>>>31,L=S[13]<<12|S[12]>>>20,V=S[12]<<12|S[13]>>>20,V1=S[22]<<10|S[23]>>>22,he=S[23]<<10|S[22]>>>22,S1=S[33]<<13|S[32]>>>19,e0=S[32]<<13|S[33]>>>19,g0=S[42]<<2|S[43]>>>30,E0=S[43]<<2|S[42]>>>30,v0=S[5]<<30|S[4]>>>2,se=S[4]<<30|S[5]>>>2,c0=S[14]<<6|S[15]>>>26,ee=S[15]<<6|S[14]>>>26,G=S[25]<<11|S[24]>>>21,r1=S[24]<<11|S[25]>>>21,s0=S[34]<<15|S[35]>>>17,d0=S[35]<<15|S[34]>>>17,U1=S[45]<<29|S[44]>>>3,q1=S[44]<<29|S[45]>>>3,w1=S[6]<<28|S[7]>>>4,L1=S[7]<<28|S[6]>>>4,l0=S[17]<<23|S[16]>>>9,X1=S[16]<<23|S[17]>>>9,n0=S[26]<<25|S[27]>>>7,u0=S[27]<<25|S[26]>>>7,u1=S[36]<<21|S[37]>>>11,a1=S[37]<<21|S[36]>>>11,te=S[47]<<24|S[46]>>>8,j1=S[46]<<24|S[47]>>>8,Y1=S[8]<<27|S[9]>>>5,a0=S[9]<<27|S[8]>>>5,N1=S[18]<<20|S[19]>>>12,_1=S[19]<<20|S[18]>>>12,ge=S[29]<<7|S[28]>>>25,t0=S[28]<<7|S[29]>>>25,de=S[38]<<8|S[39]>>>24,i0=S[39]<<8|S[38]>>>24,B1=S[48]<<14|S[49]>>>18,b1=S[49]<<14|S[48]>>>18,S[0]=p^~L&G,S[1]=I^~V&r1,S[10]=w1^~N1&k1,S[11]=L1^~_1&O1,S[20]=D0^~c0&n0,S[21]=J1^~ee&u0,S[30]=Y1^~$0&V1,S[31]=a0^~o0&he,S[40]=v0^~l0&ge,S[41]=se^~X1&t0,S[2]=L^~G&u1,S[3]=V^~r1&a1,S[12]=N1^~k1&S1,S[13]=_1^~O1&e0,S[22]=c0^~n0&de,S[23]=ee^~u0&i0,S[32]=$0^~V1&s0,S[33]=o0^~he&d0,S[42]=l0^~ge&y0,S[43]=X1^~t0&pe,S[4]=G^~u1&B1,S[5]=r1^~a1&b1,S[14]=k1^~S1&U1,S[15]=O1^~e0&q1,S[24]=n0^~de&m0,S[25]=u0^~i0&C0,S[34]=V1^~s0&te,S[35]=he^~d0&j1,S[44]=ge^~y0&g0,S[45]=t0^~pe&E0,S[6]=u1^~B1&p,S[7]=a1^~b1&I,S[16]=S1^~U1&w1,S[17]=e0^~q1&L1,S[26]=de^~m0&D0,S[27]=i0^~C0&J1,S[36]=s0^~te&Y1,S[37]=d0^~j1&a0,S[46]=y0^~g0&v0,S[47]=pe^~E0&se,S[8]=B1^~p&L,S[9]=b1^~I&V,S[18]=U1^~w1&N1,S[19]=q1^~L1&_1,S[28]=m0^~D0&c0,S[29]=C0^~J1&ee,S[38]=te^~Y1&$0,S[39]=j1^~a0&o0,S[48]=g0^~v0&l0,S[49]=E0^~se&X1,S[0]^=l[d],S[1]^=l[d+1]};if(n)t.exports=C;else for(var z=0;z= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Wo=y6-ul,g6=Math.floor,Qo=String.fromCharCode;function d2(t){throw new RangeError(AN[t])}function wN(t,e){const r=[];let n=t.length;for(;n--;)r[n]=e(t[n]);return r}function Gb(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(vN,".");const u=t.split("."),i=wN(u,e).join(".");return n+i}function Vb(t){const e=[];let r=0;const n=t.length;for(;r=55296&&u<=56319&&rString.fromCodePoint(...t),CN=function(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:y6},xc=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Wb=function(t,e,r){let n=0;for(t=r?g6(t/yN):t>>1,t+=g6(t/e);t>Wo*Ki>>1;n+=y6)t=g6(t/Wo);return g6(n+(Wo+1)*t/(t+mN))},Qb=function(t){const e=[],r=t.length;let n=0,u=Hb,i=qb,a=t.lastIndexOf(Kb);a<0&&(a=0);for(let o=0;o=128&&d2("not-basic"),e.push(t.charCodeAt(o));for(let o=a>0?a+1:0;o=r&&d2("invalid-input");const v=CN(t.charCodeAt(o++));(v>=y6||v>g6((On-n)/c))&&d2("overflow"),n+=v*c;const w=y<=i?ul:y>=i+Ki?Ki:y-i;if(vg6(On/_)&&d2("overflow"),c*=_}const l=e.length+1;i=Wb(n-s,l,s==0),g6(n/l)>On-u&&d2("overflow"),u+=g6(n/l),n%=l,e.splice(n++,0,u)}return String.fromCodePoint(...e)},Jb=function(t){const e=[];t=Vb(t);let r=t.length,n=Hb,u=0,i=qb;for(const s of t)s<128&&e.push(Qo(s));let a=e.length,o=a;for(a&&e.push(Kb);o=n&&cg6((On-u)/l)&&d2("overflow"),u+=(s-n)*l,n=s;for(const c of t)if(cOn&&d2("overflow"),c==n){let y=u;for(let v=y6;;v+=y6){const w=v<=i?ul:v>=i+Ki?Ki:v-i;if(y=196608?a>=917760&&a<=917999?18874368:0:r[n[a>>4]][a&15]}return{mapStr:u,mapChar:i}})}(Jo)),Jo.exports}(function(t,e){(function(r,n){t.exports=n(kN,SN())})(f0,function(r,n){function u(l,c,y){for(var v=[],w=r.ucs2.decode(l),_=0;_>23,T=k>>21&3,z=k>>5&65535,$=k&31,Y=n.mapStr.substr(z,$);if(T===0||c&&C&1)throw new Error("Illegal char "+N);T===1?v.push(Y):T===2?v.push(y?Y:N):T===3&&v.push(N)}var J=v.join("").normalize("NFC");return J}function i(l,c,y){y===void 0&&(y=!1);var v=u(l,y,c),w=v.split(".");return w=w.map(function(_){return _.startsWith("xn--")?(_=r.decode(_.substring(4)),a(_,y,!1)):a(_,y,c),_}),w.join(".")}function a(l,c,y){if(l[2]==="-"&&l[3]==="-")throw new Error("Failed to validate "+l);if(l.startsWith("-")||l.endsWith("-"))throw new Error("Failed to validate "+l);if(l.includes("."))throw new Error("Failed to validate "+l);if(u(l,c,y)!==l)throw new Error("Failed to validate "+l);var v=l.codePointAt(0);if(n.mapChar(v)&2<<23)throw new Error("Label contains illegal character: "+v)}function o(l,c){c===void 0&&(c={});var y="transitional"in c?c.transitional:!0,v="useStd3ASCII"in c?c.useStd3ASCII:!1,w="verifyDnsLength"in c?c.verifyDnsLength:!1,_=i(l,y,v).split("."),M=_.map(r.toASCII),N=M.join("."),k;if(w){if(N.length<1||N.length>253)throw new Error("DNS name has wrong length: "+N);for(k=0;k63)throw new Error("DNS label has wrong length: "+C)}}return N}function s(l,c){c===void 0&&(c={});var y="useStd3ASCII"in c?c.useStd3ASCII:!1;return i(l,!1,y)}return{toUnicode:s,toAscii:o}})})($b);var TN=$b.exports,Ac=bN.keccak_256,PN=TN;function NN(t){for(var e="",r=0;r<32;r++)e+="00";if(name=MN(t),name)for(var n=name.split("."),r=n.length-1;r>=0;r--){var u=Ac(n[r]);e=Ac(new Buffer(e+u,"hex"))}return"0x"+e}function MN(t){return t&&PN.toUnicode(t,{useStd3ASCII:!0,transitional:!1})}var Gi=NN;function UN(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ON(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 u=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,u.get?u:{enumerable:!0,get:function(){return t[n]}})}),r}const In=2147483647,q6=36,IN=/^xn--/,RN=/[^\0-\x7F]/,LN=/[\x2E\u3002\uFF0E\uFF61]/g,jN={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x6=Math.floor,Yo=String.fromCharCode;function gr(t){throw new RangeError(jN[t])}function Yb(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]);const u=function(i,a){const o=[];let s=i.length;for(;s--;)o[s]=a(i[s]);return o}((t=t.replace(LN,".")).split("."),e).join(".");return n+u}function il(t){const e=[];let r=0;const n=t.length;for(;r=55296&&u<=56319&&rString.fromCodePoint(...t),wc=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Zb=function(t,e,r){let n=0;for(t=r?x6(t/700):t>>1,t+=x6(t/e);t>455;n+=q6)t=x6(t/35);return x6(n+36*t/(t+38))},al=function(t){const e=[],r=t.length;let n=0,u=128,i=72,a=t.lastIndexOf("-");a<0&&(a=0);for(let s=0;s=128&&gr("not-basic"),e.push(t.charCodeAt(s));for(let s=a>0?a+1:0;s=r&&gr("invalid-input");const w=(o=t.charCodeAt(s++))>=48&&o<58?o-48+26:o>=65&&o<91?o-65:o>=97&&o<123?o-97:q6;w>=q6&&gr("invalid-input"),w>x6((In-n)/y)&&gr("overflow"),n+=w*y;const _=v<=i?1:v>=i+26?26:v-i;if(w<_)break;const M=q6-_;y>x6(In/M)&&gr("overflow"),y*=M}const c=e.length+1;i=Zb(n-l,c,l==0),x6(n/c)>In-u&&gr("overflow"),u+=x6(n/c),n%=c,e.splice(n++,0,u)}var o;return String.fromCodePoint(...e)},ol=function(t){const e=[],r=(t=il(t)).length;let n=128,u=0,i=72;for(const s of t)s<128&&e.push(Yo(s));const a=e.length;let o=a;for(a&&e.push("-");o=n&&cx6((In-u)/l)&&gr("overflow"),u+=(s-n)*l,n=s;for(const c of t)if(cIn&&gr("overflow"),c===n){let y=u;for(let v=q6;;v+=q6){const w=v<=i?1:v>=i+26?26:v-i;if(y"],[65126,5,"="],[65127,3],[65128,5,"\\"],[65129,5,"$"],[65130,5,"%"],[65131,5,"@"],[[65132,65135],3],[65136,5," ً"],[65137,1,"ـً"],[65138,5," ٌ"],[65139,2],[65140,5," ٍ"],[65141,3],[65142,5," َ"],[65143,1,"ـَ"],[65144,5," ُ"],[65145,1,"ـُ"],[65146,5," ِ"],[65147,1,"ـِ"],[65148,5," ّ"],[65149,1,"ـّ"],[65150,5," ْ"],[65151,1,"ـْ"],[65152,1,"ء"],[[65153,65154],1,"آ"],[[65155,65156],1,"أ"],[[65157,65158],1,"ؤ"],[[65159,65160],1,"إ"],[[65161,65164],1,"ئ"],[[65165,65166],1,"ا"],[[65167,65170],1,"ب"],[[65171,65172],1,"ة"],[[65173,65176],1,"ت"],[[65177,65180],1,"ث"],[[65181,65184],1,"ج"],[[65185,65188],1,"ح"],[[65189,65192],1,"خ"],[[65193,65194],1,"د"],[[65195,65196],1,"ذ"],[[65197,65198],1,"ر"],[[65199,65200],1,"ز"],[[65201,65204],1,"س"],[[65205,65208],1,"ش"],[[65209,65212],1,"ص"],[[65213,65216],1,"ض"],[[65217,65220],1,"ط"],[[65221,65224],1,"ظ"],[[65225,65228],1,"ع"],[[65229,65232],1,"غ"],[[65233,65236],1,"ف"],[[65237,65240],1,"ق"],[[65241,65244],1,"ك"],[[65245,65248],1,"ل"],[[65249,65252],1,"م"],[[65253,65256],1,"ن"],[[65257,65260],1,"ه"],[[65261,65262],1,"و"],[[65263,65264],1,"ى"],[[65265,65268],1,"ي"],[[65269,65270],1,"لآ"],[[65271,65272],1,"لأ"],[[65273,65274],1,"لإ"],[[65275,65276],1,"لا"],[[65277,65278],3],[65279,7],[65280,3],[65281,5,"!"],[65282,5,'"'],[65283,5,"#"],[65284,5,"$"],[65285,5,"%"],[65286,5,"&"],[65287,5,"'"],[65288,5,"("],[65289,5,")"],[65290,5,"*"],[65291,5,"+"],[65292,5,","],[65293,1,"-"],[65294,1,"."],[65295,5,"/"],[65296,1,"0"],[65297,1,"1"],[65298,1,"2"],[65299,1,"3"],[65300,1,"4"],[65301,1,"5"],[65302,1,"6"],[65303,1,"7"],[65304,1,"8"],[65305,1,"9"],[65306,5,":"],[65307,5,";"],[65308,5,"<"],[65309,5,"="],[65310,5,">"],[65311,5,"?"],[65312,5,"@"],[65313,1,"a"],[65314,1,"b"],[65315,1,"c"],[65316,1,"d"],[65317,1,"e"],[65318,1,"f"],[65319,1,"g"],[65320,1,"h"],[65321,1,"i"],[65322,1,"j"],[65323,1,"k"],[65324,1,"l"],[65325,1,"m"],[65326,1,"n"],[65327,1,"o"],[65328,1,"p"],[65329,1,"q"],[65330,1,"r"],[65331,1,"s"],[65332,1,"t"],[65333,1,"u"],[65334,1,"v"],[65335,1,"w"],[65336,1,"x"],[65337,1,"y"],[65338,1,"z"],[65339,5,"["],[65340,5,"\\"],[65341,5,"]"],[65342,5,"^"],[65343,5,"_"],[65344,5,"`"],[65345,1,"a"],[65346,1,"b"],[65347,1,"c"],[65348,1,"d"],[65349,1,"e"],[65350,1,"f"],[65351,1,"g"],[65352,1,"h"],[65353,1,"i"],[65354,1,"j"],[65355,1,"k"],[65356,1,"l"],[65357,1,"m"],[65358,1,"n"],[65359,1,"o"],[65360,1,"p"],[65361,1,"q"],[65362,1,"r"],[65363,1,"s"],[65364,1,"t"],[65365,1,"u"],[65366,1,"v"],[65367,1,"w"],[65368,1,"x"],[65369,1,"y"],[65370,1,"z"],[65371,5,"{"],[65372,5,"|"],[65373,5,"}"],[65374,5,"~"],[65375,1,"⦅"],[65376,1,"⦆"],[65377,1,"."],[65378,1,"「"],[65379,1,"」"],[65380,1,"、"],[65381,1,"・"],[65382,1,"ヲ"],[65383,1,"ァ"],[65384,1,"ィ"],[65385,1,"ゥ"],[65386,1,"ェ"],[65387,1,"ォ"],[65388,1,"ャ"],[65389,1,"ュ"],[65390,1,"ョ"],[65391,1,"ッ"],[65392,1,"ー"],[65393,1,"ア"],[65394,1,"イ"],[65395,1,"ウ"],[65396,1,"エ"],[65397,1,"オ"],[65398,1,"カ"],[65399,1,"キ"],[65400,1,"ク"],[65401,1,"ケ"],[65402,1,"コ"],[65403,1,"サ"],[65404,1,"シ"],[65405,1,"ス"],[65406,1,"セ"],[65407,1,"ソ"],[65408,1,"タ"],[65409,1,"チ"],[65410,1,"ツ"],[65411,1,"テ"],[65412,1,"ト"],[65413,1,"ナ"],[65414,1,"ニ"],[65415,1,"ヌ"],[65416,1,"ネ"],[65417,1,"ノ"],[65418,1,"ハ"],[65419,1,"ヒ"],[65420,1,"フ"],[65421,1,"ヘ"],[65422,1,"ホ"],[65423,1,"マ"],[65424,1,"ミ"],[65425,1,"ム"],[65426,1,"メ"],[65427,1,"モ"],[65428,1,"ヤ"],[65429,1,"ユ"],[65430,1,"ヨ"],[65431,1,"ラ"],[65432,1,"リ"],[65433,1,"ル"],[65434,1,"レ"],[65435,1,"ロ"],[65436,1,"ワ"],[65437,1,"ン"],[65438,1,"゙"],[65439,1,"゚"],[65440,3],[65441,1,"ᄀ"],[65442,1,"ᄁ"],[65443,1,"ᆪ"],[65444,1,"ᄂ"],[65445,1,"ᆬ"],[65446,1,"ᆭ"],[65447,1,"ᄃ"],[65448,1,"ᄄ"],[65449,1,"ᄅ"],[65450,1,"ᆰ"],[65451,1,"ᆱ"],[65452,1,"ᆲ"],[65453,1,"ᆳ"],[65454,1,"ᆴ"],[65455,1,"ᆵ"],[65456,1,"ᄚ"],[65457,1,"ᄆ"],[65458,1,"ᄇ"],[65459,1,"ᄈ"],[65460,1,"ᄡ"],[65461,1,"ᄉ"],[65462,1,"ᄊ"],[65463,1,"ᄋ"],[65464,1,"ᄌ"],[65465,1,"ᄍ"],[65466,1,"ᄎ"],[65467,1,"ᄏ"],[65468,1,"ᄐ"],[65469,1,"ᄑ"],[65470,1,"ᄒ"],[[65471,65473],3],[65474,1,"ᅡ"],[65475,1,"ᅢ"],[65476,1,"ᅣ"],[65477,1,"ᅤ"],[65478,1,"ᅥ"],[65479,1,"ᅦ"],[[65480,65481],3],[65482,1,"ᅧ"],[65483,1,"ᅨ"],[65484,1,"ᅩ"],[65485,1,"ᅪ"],[65486,1,"ᅫ"],[65487,1,"ᅬ"],[[65488,65489],3],[65490,1,"ᅭ"],[65491,1,"ᅮ"],[65492,1,"ᅯ"],[65493,1,"ᅰ"],[65494,1,"ᅱ"],[65495,1,"ᅲ"],[[65496,65497],3],[65498,1,"ᅳ"],[65499,1,"ᅴ"],[65500,1,"ᅵ"],[[65501,65503],3],[65504,1,"¢"],[65505,1,"£"],[65506,1,"¬"],[65507,5," ̄"],[65508,1,"¦"],[65509,1,"¥"],[65510,1,"₩"],[65511,3],[65512,1,"│"],[65513,1,"←"],[65514,1,"↑"],[65515,1,"→"],[65516,1,"↓"],[65517,1,"■"],[65518,1,"○"],[[65519,65528],3],[[65529,65531],3],[65532,3],[65533,3],[[65534,65535],3],[[65536,65547],2],[65548,3],[[65549,65574],2],[65575,3],[[65576,65594],2],[65595,3],[[65596,65597],2],[65598,3],[[65599,65613],2],[[65614,65615],3],[[65616,65629],2],[[65630,65663],3],[[65664,65786],2],[[65787,65791],3],[[65792,65794],2],[[65795,65798],3],[[65799,65843],2],[[65844,65846],3],[[65847,65855],2],[[65856,65930],2],[[65931,65932],2],[[65933,65934],2],[65935,3],[[65936,65947],2],[65948,2],[[65949,65951],3],[65952,2],[[65953,65999],3],[[66e3,66044],2],[66045,2],[[66046,66175],3],[[66176,66204],2],[[66205,66207],3],[[66208,66256],2],[[66257,66271],3],[66272,2],[[66273,66299],2],[[66300,66303],3],[[66304,66334],2],[66335,2],[[66336,66339],2],[[66340,66348],3],[[66349,66351],2],[[66352,66368],2],[66369,2],[[66370,66377],2],[66378,2],[[66379,66383],3],[[66384,66426],2],[[66427,66431],3],[[66432,66461],2],[66462,3],[66463,2],[[66464,66499],2],[[66500,66503],3],[[66504,66511],2],[[66512,66517],2],[[66518,66559],3],[66560,1,"𐐨"],[66561,1,"𐐩"],[66562,1,"𐐪"],[66563,1,"𐐫"],[66564,1,"𐐬"],[66565,1,"𐐭"],[66566,1,"𐐮"],[66567,1,"𐐯"],[66568,1,"𐐰"],[66569,1,"𐐱"],[66570,1,"𐐲"],[66571,1,"𐐳"],[66572,1,"𐐴"],[66573,1,"𐐵"],[66574,1,"𐐶"],[66575,1,"𐐷"],[66576,1,"𐐸"],[66577,1,"𐐹"],[66578,1,"𐐺"],[66579,1,"𐐻"],[66580,1,"𐐼"],[66581,1,"𐐽"],[66582,1,"𐐾"],[66583,1,"𐐿"],[66584,1,"𐑀"],[66585,1,"𐑁"],[66586,1,"𐑂"],[66587,1,"𐑃"],[66588,1,"𐑄"],[66589,1,"𐑅"],[66590,1,"𐑆"],[66591,1,"𐑇"],[66592,1,"𐑈"],[66593,1,"𐑉"],[66594,1,"𐑊"],[66595,1,"𐑋"],[66596,1,"𐑌"],[66597,1,"𐑍"],[66598,1,"𐑎"],[66599,1,"𐑏"],[[66600,66637],2],[[66638,66717],2],[[66718,66719],3],[[66720,66729],2],[[66730,66735],3],[66736,1,"𐓘"],[66737,1,"𐓙"],[66738,1,"𐓚"],[66739,1,"𐓛"],[66740,1,"𐓜"],[66741,1,"𐓝"],[66742,1,"𐓞"],[66743,1,"𐓟"],[66744,1,"𐓠"],[66745,1,"𐓡"],[66746,1,"𐓢"],[66747,1,"𐓣"],[66748,1,"𐓤"],[66749,1,"𐓥"],[66750,1,"𐓦"],[66751,1,"𐓧"],[66752,1,"𐓨"],[66753,1,"𐓩"],[66754,1,"𐓪"],[66755,1,"𐓫"],[66756,1,"𐓬"],[66757,1,"𐓭"],[66758,1,"𐓮"],[66759,1,"𐓯"],[66760,1,"𐓰"],[66761,1,"𐓱"],[66762,1,"𐓲"],[66763,1,"𐓳"],[66764,1,"𐓴"],[66765,1,"𐓵"],[66766,1,"𐓶"],[66767,1,"𐓷"],[66768,1,"𐓸"],[66769,1,"𐓹"],[66770,1,"𐓺"],[66771,1,"𐓻"],[[66772,66775],3],[[66776,66811],2],[[66812,66815],3],[[66816,66855],2],[[66856,66863],3],[[66864,66915],2],[[66916,66926],3],[66927,2],[66928,1,"𐖗"],[66929,1,"𐖘"],[66930,1,"𐖙"],[66931,1,"𐖚"],[66932,1,"𐖛"],[66933,1,"𐖜"],[66934,1,"𐖝"],[66935,1,"𐖞"],[66936,1,"𐖟"],[66937,1,"𐖠"],[66938,1,"𐖡"],[66939,3],[66940,1,"𐖣"],[66941,1,"𐖤"],[66942,1,"𐖥"],[66943,1,"𐖦"],[66944,1,"𐖧"],[66945,1,"𐖨"],[66946,1,"𐖩"],[66947,1,"𐖪"],[66948,1,"𐖫"],[66949,1,"𐖬"],[66950,1,"𐖭"],[66951,1,"𐖮"],[66952,1,"𐖯"],[66953,1,"𐖰"],[66954,1,"𐖱"],[66955,3],[66956,1,"𐖳"],[66957,1,"𐖴"],[66958,1,"𐖵"],[66959,1,"𐖶"],[66960,1,"𐖷"],[66961,1,"𐖸"],[66962,1,"𐖹"],[66963,3],[66964,1,"𐖻"],[66965,1,"𐖼"],[66966,3],[[66967,66977],2],[66978,3],[[66979,66993],2],[66994,3],[[66995,67001],2],[67002,3],[[67003,67004],2],[[67005,67071],3],[[67072,67382],2],[[67383,67391],3],[[67392,67413],2],[[67414,67423],3],[[67424,67431],2],[[67432,67455],3],[67456,2],[67457,1,"ː"],[67458,1,"ˑ"],[67459,1,"æ"],[67460,1,"ʙ"],[67461,1,"ɓ"],[67462,3],[67463,1,"ʣ"],[67464,1,"ꭦ"],[67465,1,"ʥ"],[67466,1,"ʤ"],[67467,1,"ɖ"],[67468,1,"ɗ"],[67469,1,"ᶑ"],[67470,1,"ɘ"],[67471,1,"ɞ"],[67472,1,"ʩ"],[67473,1,"ɤ"],[67474,1,"ɢ"],[67475,1,"ɠ"],[67476,1,"ʛ"],[67477,1,"ħ"],[67478,1,"ʜ"],[67479,1,"ɧ"],[67480,1,"ʄ"],[67481,1,"ʪ"],[67482,1,"ʫ"],[67483,1,"ɬ"],[67484,1,"𝼄"],[67485,1,"ꞎ"],[67486,1,"ɮ"],[67487,1,"𝼅"],[67488,1,"ʎ"],[67489,1,"𝼆"],[67490,1,"ø"],[67491,1,"ɶ"],[67492,1,"ɷ"],[67493,1,"q"],[67494,1,"ɺ"],[67495,1,"𝼈"],[67496,1,"ɽ"],[67497,1,"ɾ"],[67498,1,"ʀ"],[67499,1,"ʨ"],[67500,1,"ʦ"],[67501,1,"ꭧ"],[67502,1,"ʧ"],[67503,1,"ʈ"],[67504,1,"ⱱ"],[67505,3],[67506,1,"ʏ"],[67507,1,"ʡ"],[67508,1,"ʢ"],[67509,1,"ʘ"],[67510,1,"ǀ"],[67511,1,"ǁ"],[67512,1,"ǂ"],[67513,1,"𝼊"],[67514,1,"𝼞"],[[67515,67583],3],[[67584,67589],2],[[67590,67591],3],[67592,2],[67593,3],[[67594,67637],2],[67638,3],[[67639,67640],2],[[67641,67643],3],[67644,2],[[67645,67646],3],[67647,2],[[67648,67669],2],[67670,3],[[67671,67679],2],[[67680,67702],2],[[67703,67711],2],[[67712,67742],2],[[67743,67750],3],[[67751,67759],2],[[67760,67807],3],[[67808,67826],2],[67827,3],[[67828,67829],2],[[67830,67834],3],[[67835,67839],2],[[67840,67861],2],[[67862,67865],2],[[67866,67867],2],[[67868,67870],3],[67871,2],[[67872,67897],2],[[67898,67902],3],[67903,2],[[67904,67967],3],[[67968,68023],2],[[68024,68027],3],[[68028,68029],2],[[68030,68031],2],[[68032,68047],2],[[68048,68049],3],[[68050,68095],2],[[68096,68099],2],[68100,3],[[68101,68102],2],[[68103,68107],3],[[68108,68115],2],[68116,3],[[68117,68119],2],[68120,3],[[68121,68147],2],[[68148,68149],2],[[68150,68151],3],[[68152,68154],2],[[68155,68158],3],[68159,2],[[68160,68167],2],[68168,2],[[68169,68175],3],[[68176,68184],2],[[68185,68191],3],[[68192,68220],2],[[68221,68223],2],[[68224,68252],2],[[68253,68255],2],[[68256,68287],3],[[68288,68295],2],[68296,2],[[68297,68326],2],[[68327,68330],3],[[68331,68342],2],[[68343,68351],3],[[68352,68405],2],[[68406,68408],3],[[68409,68415],2],[[68416,68437],2],[[68438,68439],3],[[68440,68447],2],[[68448,68466],2],[[68467,68471],3],[[68472,68479],2],[[68480,68497],2],[[68498,68504],3],[[68505,68508],2],[[68509,68520],3],[[68521,68527],2],[[68528,68607],3],[[68608,68680],2],[[68681,68735],3],[68736,1,"𐳀"],[68737,1,"𐳁"],[68738,1,"𐳂"],[68739,1,"𐳃"],[68740,1,"𐳄"],[68741,1,"𐳅"],[68742,1,"𐳆"],[68743,1,"𐳇"],[68744,1,"𐳈"],[68745,1,"𐳉"],[68746,1,"𐳊"],[68747,1,"𐳋"],[68748,1,"𐳌"],[68749,1,"𐳍"],[68750,1,"𐳎"],[68751,1,"𐳏"],[68752,1,"𐳐"],[68753,1,"𐳑"],[68754,1,"𐳒"],[68755,1,"𐳓"],[68756,1,"𐳔"],[68757,1,"𐳕"],[68758,1,"𐳖"],[68759,1,"𐳗"],[68760,1,"𐳘"],[68761,1,"𐳙"],[68762,1,"𐳚"],[68763,1,"𐳛"],[68764,1,"𐳜"],[68765,1,"𐳝"],[68766,1,"𐳞"],[68767,1,"𐳟"],[68768,1,"𐳠"],[68769,1,"𐳡"],[68770,1,"𐳢"],[68771,1,"𐳣"],[68772,1,"𐳤"],[68773,1,"𐳥"],[68774,1,"𐳦"],[68775,1,"𐳧"],[68776,1,"𐳨"],[68777,1,"𐳩"],[68778,1,"𐳪"],[68779,1,"𐳫"],[68780,1,"𐳬"],[68781,1,"𐳭"],[68782,1,"𐳮"],[68783,1,"𐳯"],[68784,1,"𐳰"],[68785,1,"𐳱"],[68786,1,"𐳲"],[[68787,68799],3],[[68800,68850],2],[[68851,68857],3],[[68858,68863],2],[[68864,68903],2],[[68904,68911],3],[[68912,68921],2],[[68922,69215],3],[[69216,69246],2],[69247,3],[[69248,69289],2],[69290,3],[[69291,69292],2],[69293,2],[[69294,69295],3],[[69296,69297],2],[[69298,69372],3],[[69373,69375],2],[[69376,69404],2],[[69405,69414],2],[69415,2],[[69416,69423],3],[[69424,69456],2],[[69457,69465],2],[[69466,69487],3],[[69488,69509],2],[[69510,69513],2],[[69514,69551],3],[[69552,69572],2],[[69573,69579],2],[[69580,69599],3],[[69600,69622],2],[[69623,69631],3],[[69632,69702],2],[[69703,69709],2],[[69710,69713],3],[[69714,69733],2],[[69734,69743],2],[[69744,69749],2],[[69750,69758],3],[69759,2],[[69760,69818],2],[[69819,69820],2],[69821,3],[[69822,69825],2],[69826,2],[[69827,69836],3],[69837,3],[[69838,69839],3],[[69840,69864],2],[[69865,69871],3],[[69872,69881],2],[[69882,69887],3],[[69888,69940],2],[69941,3],[[69942,69951],2],[[69952,69955],2],[[69956,69958],2],[69959,2],[[69960,69967],3],[[69968,70003],2],[[70004,70005],2],[70006,2],[[70007,70015],3],[[70016,70084],2],[[70085,70088],2],[[70089,70092],2],[70093,2],[[70094,70095],2],[[70096,70105],2],[70106,2],[70107,2],[70108,2],[[70109,70111],2],[70112,3],[[70113,70132],2],[[70133,70143],3],[[70144,70161],2],[70162,3],[[70163,70199],2],[[70200,70205],2],[70206,2],[[70207,70209],2],[[70210,70271],3],[[70272,70278],2],[70279,3],[70280,2],[70281,3],[[70282,70285],2],[70286,3],[[70287,70301],2],[70302,3],[[70303,70312],2],[70313,2],[[70314,70319],3],[[70320,70378],2],[[70379,70383],3],[[70384,70393],2],[[70394,70399],3],[70400,2],[[70401,70403],2],[70404,3],[[70405,70412],2],[[70413,70414],3],[[70415,70416],2],[[70417,70418],3],[[70419,70440],2],[70441,3],[[70442,70448],2],[70449,3],[[70450,70451],2],[70452,3],[[70453,70457],2],[70458,3],[70459,2],[[70460,70468],2],[[70469,70470],3],[[70471,70472],2],[[70473,70474],3],[[70475,70477],2],[[70478,70479],3],[70480,2],[[70481,70486],3],[70487,2],[[70488,70492],3],[[70493,70499],2],[[70500,70501],3],[[70502,70508],2],[[70509,70511],3],[[70512,70516],2],[[70517,70655],3],[[70656,70730],2],[[70731,70735],2],[[70736,70745],2],[70746,2],[70747,2],[70748,3],[70749,2],[70750,2],[70751,2],[[70752,70753],2],[[70754,70783],3],[[70784,70853],2],[70854,2],[70855,2],[[70856,70863],3],[[70864,70873],2],[[70874,71039],3],[[71040,71093],2],[[71094,71095],3],[[71096,71104],2],[[71105,71113],2],[[71114,71127],2],[[71128,71133],2],[[71134,71167],3],[[71168,71232],2],[[71233,71235],2],[71236,2],[[71237,71247],3],[[71248,71257],2],[[71258,71263],3],[[71264,71276],2],[[71277,71295],3],[[71296,71351],2],[71352,2],[71353,2],[[71354,71359],3],[[71360,71369],2],[[71370,71423],3],[[71424,71449],2],[71450,2],[[71451,71452],3],[[71453,71467],2],[[71468,71471],3],[[71472,71481],2],[[71482,71487],2],[[71488,71494],2],[[71495,71679],3],[[71680,71738],2],[71739,2],[[71740,71839],3],[71840,1,"𑣀"],[71841,1,"𑣁"],[71842,1,"𑣂"],[71843,1,"𑣃"],[71844,1,"𑣄"],[71845,1,"𑣅"],[71846,1,"𑣆"],[71847,1,"𑣇"],[71848,1,"𑣈"],[71849,1,"𑣉"],[71850,1,"𑣊"],[71851,1,"𑣋"],[71852,1,"𑣌"],[71853,1,"𑣍"],[71854,1,"𑣎"],[71855,1,"𑣏"],[71856,1,"𑣐"],[71857,1,"𑣑"],[71858,1,"𑣒"],[71859,1,"𑣓"],[71860,1,"𑣔"],[71861,1,"𑣕"],[71862,1,"𑣖"],[71863,1,"𑣗"],[71864,1,"𑣘"],[71865,1,"𑣙"],[71866,1,"𑣚"],[71867,1,"𑣛"],[71868,1,"𑣜"],[71869,1,"𑣝"],[71870,1,"𑣞"],[71871,1,"𑣟"],[[71872,71913],2],[[71914,71922],2],[[71923,71934],3],[71935,2],[[71936,71942],2],[[71943,71944],3],[71945,2],[[71946,71947],3],[[71948,71955],2],[71956,3],[[71957,71958],2],[71959,3],[[71960,71989],2],[71990,3],[[71991,71992],2],[[71993,71994],3],[[71995,72003],2],[[72004,72006],2],[[72007,72015],3],[[72016,72025],2],[[72026,72095],3],[[72096,72103],2],[[72104,72105],3],[[72106,72151],2],[[72152,72153],3],[[72154,72161],2],[72162,2],[[72163,72164],2],[[72165,72191],3],[[72192,72254],2],[[72255,72262],2],[72263,2],[[72264,72271],3],[[72272,72323],2],[[72324,72325],2],[[72326,72345],2],[[72346,72348],2],[72349,2],[[72350,72354],2],[[72355,72367],3],[[72368,72383],2],[[72384,72440],2],[[72441,72447],3],[[72448,72457],2],[[72458,72703],3],[[72704,72712],2],[72713,3],[[72714,72758],2],[72759,3],[[72760,72768],2],[[72769,72773],2],[[72774,72783],3],[[72784,72793],2],[[72794,72812],2],[[72813,72815],3],[[72816,72817],2],[[72818,72847],2],[[72848,72849],3],[[72850,72871],2],[72872,3],[[72873,72886],2],[[72887,72959],3],[[72960,72966],2],[72967,3],[[72968,72969],2],[72970,3],[[72971,73014],2],[[73015,73017],3],[73018,2],[73019,3],[[73020,73021],2],[73022,3],[[73023,73031],2],[[73032,73039],3],[[73040,73049],2],[[73050,73055],3],[[73056,73061],2],[73062,3],[[73063,73064],2],[73065,3],[[73066,73102],2],[73103,3],[[73104,73105],2],[73106,3],[[73107,73112],2],[[73113,73119],3],[[73120,73129],2],[[73130,73439],3],[[73440,73462],2],[[73463,73464],2],[[73465,73471],3],[[73472,73488],2],[73489,3],[[73490,73530],2],[[73531,73533],3],[[73534,73538],2],[[73539,73551],2],[[73552,73561],2],[[73562,73647],3],[73648,2],[[73649,73663],3],[[73664,73713],2],[[73714,73726],3],[73727,2],[[73728,74606],2],[[74607,74648],2],[74649,2],[[74650,74751],3],[[74752,74850],2],[[74851,74862],2],[74863,3],[[74864,74867],2],[74868,2],[[74869,74879],3],[[74880,75075],2],[[75076,77711],3],[[77712,77808],2],[[77809,77810],2],[[77811,77823],3],[[77824,78894],2],[78895,2],[[78896,78904],3],[[78905,78911],3],[[78912,78933],2],[[78934,82943],3],[[82944,83526],2],[[83527,92159],3],[[92160,92728],2],[[92729,92735],3],[[92736,92766],2],[92767,3],[[92768,92777],2],[[92778,92781],3],[[92782,92783],2],[[92784,92862],2],[92863,3],[[92864,92873],2],[[92874,92879],3],[[92880,92909],2],[[92910,92911],3],[[92912,92916],2],[92917,2],[[92918,92927],3],[[92928,92982],2],[[92983,92991],2],[[92992,92995],2],[[92996,92997],2],[[92998,93007],3],[[93008,93017],2],[93018,3],[[93019,93025],2],[93026,3],[[93027,93047],2],[[93048,93052],3],[[93053,93071],2],[[93072,93759],3],[93760,1,"𖹠"],[93761,1,"𖹡"],[93762,1,"𖹢"],[93763,1,"𖹣"],[93764,1,"𖹤"],[93765,1,"𖹥"],[93766,1,"𖹦"],[93767,1,"𖹧"],[93768,1,"𖹨"],[93769,1,"𖹩"],[93770,1,"𖹪"],[93771,1,"𖹫"],[93772,1,"𖹬"],[93773,1,"𖹭"],[93774,1,"𖹮"],[93775,1,"𖹯"],[93776,1,"𖹰"],[93777,1,"𖹱"],[93778,1,"𖹲"],[93779,1,"𖹳"],[93780,1,"𖹴"],[93781,1,"𖹵"],[93782,1,"𖹶"],[93783,1,"𖹷"],[93784,1,"𖹸"],[93785,1,"𖹹"],[93786,1,"𖹺"],[93787,1,"𖹻"],[93788,1,"𖹼"],[93789,1,"𖹽"],[93790,1,"𖹾"],[93791,1,"𖹿"],[[93792,93823],2],[[93824,93850],2],[[93851,93951],3],[[93952,94020],2],[[94021,94026],2],[[94027,94030],3],[94031,2],[[94032,94078],2],[[94079,94087],2],[[94088,94094],3],[[94095,94111],2],[[94112,94175],3],[94176,2],[94177,2],[94178,2],[94179,2],[94180,2],[[94181,94191],3],[[94192,94193],2],[[94194,94207],3],[[94208,100332],2],[[100333,100337],2],[[100338,100343],2],[[100344,100351],3],[[100352,101106],2],[[101107,101589],2],[[101590,101631],3],[[101632,101640],2],[[101641,110575],3],[[110576,110579],2],[110580,3],[[110581,110587],2],[110588,3],[[110589,110590],2],[110591,3],[[110592,110593],2],[[110594,110878],2],[[110879,110882],2],[[110883,110897],3],[110898,2],[[110899,110927],3],[[110928,110930],2],[[110931,110932],3],[110933,2],[[110934,110947],3],[[110948,110951],2],[[110952,110959],3],[[110960,111355],2],[[111356,113663],3],[[113664,113770],2],[[113771,113775],3],[[113776,113788],2],[[113789,113791],3],[[113792,113800],2],[[113801,113807],3],[[113808,113817],2],[[113818,113819],3],[113820,2],[[113821,113822],2],[113823,2],[[113824,113827],7],[[113828,118527],3],[[118528,118573],2],[[118574,118575],3],[[118576,118598],2],[[118599,118607],3],[[118608,118723],2],[[118724,118783],3],[[118784,119029],2],[[119030,119039],3],[[119040,119078],2],[[119079,119080],3],[119081,2],[[119082,119133],2],[119134,1,"𝅗𝅥"],[119135,1,"𝅘𝅥"],[119136,1,"𝅘𝅥𝅮"],[119137,1,"𝅘𝅥𝅯"],[119138,1,"𝅘𝅥𝅰"],[119139,1,"𝅘𝅥𝅱"],[119140,1,"𝅘𝅥𝅲"],[[119141,119154],2],[[119155,119162],3],[[119163,119226],2],[119227,1,"𝆹𝅥"],[119228,1,"𝆺𝅥"],[119229,1,"𝆹𝅥𝅮"],[119230,1,"𝆺𝅥𝅮"],[119231,1,"𝆹𝅥𝅯"],[119232,1,"𝆺𝅥𝅯"],[[119233,119261],2],[[119262,119272],2],[[119273,119274],2],[[119275,119295],3],[[119296,119365],2],[[119366,119487],3],[[119488,119507],2],[[119508,119519],3],[[119520,119539],2],[[119540,119551],3],[[119552,119638],2],[[119639,119647],3],[[119648,119665],2],[[119666,119672],2],[[119673,119807],3],[119808,1,"a"],[119809,1,"b"],[119810,1,"c"],[119811,1,"d"],[119812,1,"e"],[119813,1,"f"],[119814,1,"g"],[119815,1,"h"],[119816,1,"i"],[119817,1,"j"],[119818,1,"k"],[119819,1,"l"],[119820,1,"m"],[119821,1,"n"],[119822,1,"o"],[119823,1,"p"],[119824,1,"q"],[119825,1,"r"],[119826,1,"s"],[119827,1,"t"],[119828,1,"u"],[119829,1,"v"],[119830,1,"w"],[119831,1,"x"],[119832,1,"y"],[119833,1,"z"],[119834,1,"a"],[119835,1,"b"],[119836,1,"c"],[119837,1,"d"],[119838,1,"e"],[119839,1,"f"],[119840,1,"g"],[119841,1,"h"],[119842,1,"i"],[119843,1,"j"],[119844,1,"k"],[119845,1,"l"],[119846,1,"m"],[119847,1,"n"],[119848,1,"o"],[119849,1,"p"],[119850,1,"q"],[119851,1,"r"],[119852,1,"s"],[119853,1,"t"],[119854,1,"u"],[119855,1,"v"],[119856,1,"w"],[119857,1,"x"],[119858,1,"y"],[119859,1,"z"],[119860,1,"a"],[119861,1,"b"],[119862,1,"c"],[119863,1,"d"],[119864,1,"e"],[119865,1,"f"],[119866,1,"g"],[119867,1,"h"],[119868,1,"i"],[119869,1,"j"],[119870,1,"k"],[119871,1,"l"],[119872,1,"m"],[119873,1,"n"],[119874,1,"o"],[119875,1,"p"],[119876,1,"q"],[119877,1,"r"],[119878,1,"s"],[119879,1,"t"],[119880,1,"u"],[119881,1,"v"],[119882,1,"w"],[119883,1,"x"],[119884,1,"y"],[119885,1,"z"],[119886,1,"a"],[119887,1,"b"],[119888,1,"c"],[119889,1,"d"],[119890,1,"e"],[119891,1,"f"],[119892,1,"g"],[119893,3],[119894,1,"i"],[119895,1,"j"],[119896,1,"k"],[119897,1,"l"],[119898,1,"m"],[119899,1,"n"],[119900,1,"o"],[119901,1,"p"],[119902,1,"q"],[119903,1,"r"],[119904,1,"s"],[119905,1,"t"],[119906,1,"u"],[119907,1,"v"],[119908,1,"w"],[119909,1,"x"],[119910,1,"y"],[119911,1,"z"],[119912,1,"a"],[119913,1,"b"],[119914,1,"c"],[119915,1,"d"],[119916,1,"e"],[119917,1,"f"],[119918,1,"g"],[119919,1,"h"],[119920,1,"i"],[119921,1,"j"],[119922,1,"k"],[119923,1,"l"],[119924,1,"m"],[119925,1,"n"],[119926,1,"o"],[119927,1,"p"],[119928,1,"q"],[119929,1,"r"],[119930,1,"s"],[119931,1,"t"],[119932,1,"u"],[119933,1,"v"],[119934,1,"w"],[119935,1,"x"],[119936,1,"y"],[119937,1,"z"],[119938,1,"a"],[119939,1,"b"],[119940,1,"c"],[119941,1,"d"],[119942,1,"e"],[119943,1,"f"],[119944,1,"g"],[119945,1,"h"],[119946,1,"i"],[119947,1,"j"],[119948,1,"k"],[119949,1,"l"],[119950,1,"m"],[119951,1,"n"],[119952,1,"o"],[119953,1,"p"],[119954,1,"q"],[119955,1,"r"],[119956,1,"s"],[119957,1,"t"],[119958,1,"u"],[119959,1,"v"],[119960,1,"w"],[119961,1,"x"],[119962,1,"y"],[119963,1,"z"],[119964,1,"a"],[119965,3],[119966,1,"c"],[119967,1,"d"],[[119968,119969],3],[119970,1,"g"],[[119971,119972],3],[119973,1,"j"],[119974,1,"k"],[[119975,119976],3],[119977,1,"n"],[119978,1,"o"],[119979,1,"p"],[119980,1,"q"],[119981,3],[119982,1,"s"],[119983,1,"t"],[119984,1,"u"],[119985,1,"v"],[119986,1,"w"],[119987,1,"x"],[119988,1,"y"],[119989,1,"z"],[119990,1,"a"],[119991,1,"b"],[119992,1,"c"],[119993,1,"d"],[119994,3],[119995,1,"f"],[119996,3],[119997,1,"h"],[119998,1,"i"],[119999,1,"j"],[12e4,1,"k"],[120001,1,"l"],[120002,1,"m"],[120003,1,"n"],[120004,3],[120005,1,"p"],[120006,1,"q"],[120007,1,"r"],[120008,1,"s"],[120009,1,"t"],[120010,1,"u"],[120011,1,"v"],[120012,1,"w"],[120013,1,"x"],[120014,1,"y"],[120015,1,"z"],[120016,1,"a"],[120017,1,"b"],[120018,1,"c"],[120019,1,"d"],[120020,1,"e"],[120021,1,"f"],[120022,1,"g"],[120023,1,"h"],[120024,1,"i"],[120025,1,"j"],[120026,1,"k"],[120027,1,"l"],[120028,1,"m"],[120029,1,"n"],[120030,1,"o"],[120031,1,"p"],[120032,1,"q"],[120033,1,"r"],[120034,1,"s"],[120035,1,"t"],[120036,1,"u"],[120037,1,"v"],[120038,1,"w"],[120039,1,"x"],[120040,1,"y"],[120041,1,"z"],[120042,1,"a"],[120043,1,"b"],[120044,1,"c"],[120045,1,"d"],[120046,1,"e"],[120047,1,"f"],[120048,1,"g"],[120049,1,"h"],[120050,1,"i"],[120051,1,"j"],[120052,1,"k"],[120053,1,"l"],[120054,1,"m"],[120055,1,"n"],[120056,1,"o"],[120057,1,"p"],[120058,1,"q"],[120059,1,"r"],[120060,1,"s"],[120061,1,"t"],[120062,1,"u"],[120063,1,"v"],[120064,1,"w"],[120065,1,"x"],[120066,1,"y"],[120067,1,"z"],[120068,1,"a"],[120069,1,"b"],[120070,3],[120071,1,"d"],[120072,1,"e"],[120073,1,"f"],[120074,1,"g"],[[120075,120076],3],[120077,1,"j"],[120078,1,"k"],[120079,1,"l"],[120080,1,"m"],[120081,1,"n"],[120082,1,"o"],[120083,1,"p"],[120084,1,"q"],[120085,3],[120086,1,"s"],[120087,1,"t"],[120088,1,"u"],[120089,1,"v"],[120090,1,"w"],[120091,1,"x"],[120092,1,"y"],[120093,3],[120094,1,"a"],[120095,1,"b"],[120096,1,"c"],[120097,1,"d"],[120098,1,"e"],[120099,1,"f"],[120100,1,"g"],[120101,1,"h"],[120102,1,"i"],[120103,1,"j"],[120104,1,"k"],[120105,1,"l"],[120106,1,"m"],[120107,1,"n"],[120108,1,"o"],[120109,1,"p"],[120110,1,"q"],[120111,1,"r"],[120112,1,"s"],[120113,1,"t"],[120114,1,"u"],[120115,1,"v"],[120116,1,"w"],[120117,1,"x"],[120118,1,"y"],[120119,1,"z"],[120120,1,"a"],[120121,1,"b"],[120122,3],[120123,1,"d"],[120124,1,"e"],[120125,1,"f"],[120126,1,"g"],[120127,3],[120128,1,"i"],[120129,1,"j"],[120130,1,"k"],[120131,1,"l"],[120132,1,"m"],[120133,3],[120134,1,"o"],[[120135,120137],3],[120138,1,"s"],[120139,1,"t"],[120140,1,"u"],[120141,1,"v"],[120142,1,"w"],[120143,1,"x"],[120144,1,"y"],[120145,3],[120146,1,"a"],[120147,1,"b"],[120148,1,"c"],[120149,1,"d"],[120150,1,"e"],[120151,1,"f"],[120152,1,"g"],[120153,1,"h"],[120154,1,"i"],[120155,1,"j"],[120156,1,"k"],[120157,1,"l"],[120158,1,"m"],[120159,1,"n"],[120160,1,"o"],[120161,1,"p"],[120162,1,"q"],[120163,1,"r"],[120164,1,"s"],[120165,1,"t"],[120166,1,"u"],[120167,1,"v"],[120168,1,"w"],[120169,1,"x"],[120170,1,"y"],[120171,1,"z"],[120172,1,"a"],[120173,1,"b"],[120174,1,"c"],[120175,1,"d"],[120176,1,"e"],[120177,1,"f"],[120178,1,"g"],[120179,1,"h"],[120180,1,"i"],[120181,1,"j"],[120182,1,"k"],[120183,1,"l"],[120184,1,"m"],[120185,1,"n"],[120186,1,"o"],[120187,1,"p"],[120188,1,"q"],[120189,1,"r"],[120190,1,"s"],[120191,1,"t"],[120192,1,"u"],[120193,1,"v"],[120194,1,"w"],[120195,1,"x"],[120196,1,"y"],[120197,1,"z"],[120198,1,"a"],[120199,1,"b"],[120200,1,"c"],[120201,1,"d"],[120202,1,"e"],[120203,1,"f"],[120204,1,"g"],[120205,1,"h"],[120206,1,"i"],[120207,1,"j"],[120208,1,"k"],[120209,1,"l"],[120210,1,"m"],[120211,1,"n"],[120212,1,"o"],[120213,1,"p"],[120214,1,"q"],[120215,1,"r"],[120216,1,"s"],[120217,1,"t"],[120218,1,"u"],[120219,1,"v"],[120220,1,"w"],[120221,1,"x"],[120222,1,"y"],[120223,1,"z"],[120224,1,"a"],[120225,1,"b"],[120226,1,"c"],[120227,1,"d"],[120228,1,"e"],[120229,1,"f"],[120230,1,"g"],[120231,1,"h"],[120232,1,"i"],[120233,1,"j"],[120234,1,"k"],[120235,1,"l"],[120236,1,"m"],[120237,1,"n"],[120238,1,"o"],[120239,1,"p"],[120240,1,"q"],[120241,1,"r"],[120242,1,"s"],[120243,1,"t"],[120244,1,"u"],[120245,1,"v"],[120246,1,"w"],[120247,1,"x"],[120248,1,"y"],[120249,1,"z"],[120250,1,"a"],[120251,1,"b"],[120252,1,"c"],[120253,1,"d"],[120254,1,"e"],[120255,1,"f"],[120256,1,"g"],[120257,1,"h"],[120258,1,"i"],[120259,1,"j"],[120260,1,"k"],[120261,1,"l"],[120262,1,"m"],[120263,1,"n"],[120264,1,"o"],[120265,1,"p"],[120266,1,"q"],[120267,1,"r"],[120268,1,"s"],[120269,1,"t"],[120270,1,"u"],[120271,1,"v"],[120272,1,"w"],[120273,1,"x"],[120274,1,"y"],[120275,1,"z"],[120276,1,"a"],[120277,1,"b"],[120278,1,"c"],[120279,1,"d"],[120280,1,"e"],[120281,1,"f"],[120282,1,"g"],[120283,1,"h"],[120284,1,"i"],[120285,1,"j"],[120286,1,"k"],[120287,1,"l"],[120288,1,"m"],[120289,1,"n"],[120290,1,"o"],[120291,1,"p"],[120292,1,"q"],[120293,1,"r"],[120294,1,"s"],[120295,1,"t"],[120296,1,"u"],[120297,1,"v"],[120298,1,"w"],[120299,1,"x"],[120300,1,"y"],[120301,1,"z"],[120302,1,"a"],[120303,1,"b"],[120304,1,"c"],[120305,1,"d"],[120306,1,"e"],[120307,1,"f"],[120308,1,"g"],[120309,1,"h"],[120310,1,"i"],[120311,1,"j"],[120312,1,"k"],[120313,1,"l"],[120314,1,"m"],[120315,1,"n"],[120316,1,"o"],[120317,1,"p"],[120318,1,"q"],[120319,1,"r"],[120320,1,"s"],[120321,1,"t"],[120322,1,"u"],[120323,1,"v"],[120324,1,"w"],[120325,1,"x"],[120326,1,"y"],[120327,1,"z"],[120328,1,"a"],[120329,1,"b"],[120330,1,"c"],[120331,1,"d"],[120332,1,"e"],[120333,1,"f"],[120334,1,"g"],[120335,1,"h"],[120336,1,"i"],[120337,1,"j"],[120338,1,"k"],[120339,1,"l"],[120340,1,"m"],[120341,1,"n"],[120342,1,"o"],[120343,1,"p"],[120344,1,"q"],[120345,1,"r"],[120346,1,"s"],[120347,1,"t"],[120348,1,"u"],[120349,1,"v"],[120350,1,"w"],[120351,1,"x"],[120352,1,"y"],[120353,1,"z"],[120354,1,"a"],[120355,1,"b"],[120356,1,"c"],[120357,1,"d"],[120358,1,"e"],[120359,1,"f"],[120360,1,"g"],[120361,1,"h"],[120362,1,"i"],[120363,1,"j"],[120364,1,"k"],[120365,1,"l"],[120366,1,"m"],[120367,1,"n"],[120368,1,"o"],[120369,1,"p"],[120370,1,"q"],[120371,1,"r"],[120372,1,"s"],[120373,1,"t"],[120374,1,"u"],[120375,1,"v"],[120376,1,"w"],[120377,1,"x"],[120378,1,"y"],[120379,1,"z"],[120380,1,"a"],[120381,1,"b"],[120382,1,"c"],[120383,1,"d"],[120384,1,"e"],[120385,1,"f"],[120386,1,"g"],[120387,1,"h"],[120388,1,"i"],[120389,1,"j"],[120390,1,"k"],[120391,1,"l"],[120392,1,"m"],[120393,1,"n"],[120394,1,"o"],[120395,1,"p"],[120396,1,"q"],[120397,1,"r"],[120398,1,"s"],[120399,1,"t"],[120400,1,"u"],[120401,1,"v"],[120402,1,"w"],[120403,1,"x"],[120404,1,"y"],[120405,1,"z"],[120406,1,"a"],[120407,1,"b"],[120408,1,"c"],[120409,1,"d"],[120410,1,"e"],[120411,1,"f"],[120412,1,"g"],[120413,1,"h"],[120414,1,"i"],[120415,1,"j"],[120416,1,"k"],[120417,1,"l"],[120418,1,"m"],[120419,1,"n"],[120420,1,"o"],[120421,1,"p"],[120422,1,"q"],[120423,1,"r"],[120424,1,"s"],[120425,1,"t"],[120426,1,"u"],[120427,1,"v"],[120428,1,"w"],[120429,1,"x"],[120430,1,"y"],[120431,1,"z"],[120432,1,"a"],[120433,1,"b"],[120434,1,"c"],[120435,1,"d"],[120436,1,"e"],[120437,1,"f"],[120438,1,"g"],[120439,1,"h"],[120440,1,"i"],[120441,1,"j"],[120442,1,"k"],[120443,1,"l"],[120444,1,"m"],[120445,1,"n"],[120446,1,"o"],[120447,1,"p"],[120448,1,"q"],[120449,1,"r"],[120450,1,"s"],[120451,1,"t"],[120452,1,"u"],[120453,1,"v"],[120454,1,"w"],[120455,1,"x"],[120456,1,"y"],[120457,1,"z"],[120458,1,"a"],[120459,1,"b"],[120460,1,"c"],[120461,1,"d"],[120462,1,"e"],[120463,1,"f"],[120464,1,"g"],[120465,1,"h"],[120466,1,"i"],[120467,1,"j"],[120468,1,"k"],[120469,1,"l"],[120470,1,"m"],[120471,1,"n"],[120472,1,"o"],[120473,1,"p"],[120474,1,"q"],[120475,1,"r"],[120476,1,"s"],[120477,1,"t"],[120478,1,"u"],[120479,1,"v"],[120480,1,"w"],[120481,1,"x"],[120482,1,"y"],[120483,1,"z"],[120484,1,"ı"],[120485,1,"ȷ"],[[120486,120487],3],[120488,1,"α"],[120489,1,"β"],[120490,1,"γ"],[120491,1,"δ"],[120492,1,"ε"],[120493,1,"ζ"],[120494,1,"η"],[120495,1,"θ"],[120496,1,"ι"],[120497,1,"κ"],[120498,1,"λ"],[120499,1,"μ"],[120500,1,"ν"],[120501,1,"ξ"],[120502,1,"ο"],[120503,1,"π"],[120504,1,"ρ"],[120505,1,"θ"],[120506,1,"σ"],[120507,1,"τ"],[120508,1,"υ"],[120509,1,"φ"],[120510,1,"χ"],[120511,1,"ψ"],[120512,1,"ω"],[120513,1,"∇"],[120514,1,"α"],[120515,1,"β"],[120516,1,"γ"],[120517,1,"δ"],[120518,1,"ε"],[120519,1,"ζ"],[120520,1,"η"],[120521,1,"θ"],[120522,1,"ι"],[120523,1,"κ"],[120524,1,"λ"],[120525,1,"μ"],[120526,1,"ν"],[120527,1,"ξ"],[120528,1,"ο"],[120529,1,"π"],[120530,1,"ρ"],[[120531,120532],1,"σ"],[120533,1,"τ"],[120534,1,"υ"],[120535,1,"φ"],[120536,1,"χ"],[120537,1,"ψ"],[120538,1,"ω"],[120539,1,"∂"],[120540,1,"ε"],[120541,1,"θ"],[120542,1,"κ"],[120543,1,"φ"],[120544,1,"ρ"],[120545,1,"π"],[120546,1,"α"],[120547,1,"β"],[120548,1,"γ"],[120549,1,"δ"],[120550,1,"ε"],[120551,1,"ζ"],[120552,1,"η"],[120553,1,"θ"],[120554,1,"ι"],[120555,1,"κ"],[120556,1,"λ"],[120557,1,"μ"],[120558,1,"ν"],[120559,1,"ξ"],[120560,1,"ο"],[120561,1,"π"],[120562,1,"ρ"],[120563,1,"θ"],[120564,1,"σ"],[120565,1,"τ"],[120566,1,"υ"],[120567,1,"φ"],[120568,1,"χ"],[120569,1,"ψ"],[120570,1,"ω"],[120571,1,"∇"],[120572,1,"α"],[120573,1,"β"],[120574,1,"γ"],[120575,1,"δ"],[120576,1,"ε"],[120577,1,"ζ"],[120578,1,"η"],[120579,1,"θ"],[120580,1,"ι"],[120581,1,"κ"],[120582,1,"λ"],[120583,1,"μ"],[120584,1,"ν"],[120585,1,"ξ"],[120586,1,"ο"],[120587,1,"π"],[120588,1,"ρ"],[[120589,120590],1,"σ"],[120591,1,"τ"],[120592,1,"υ"],[120593,1,"φ"],[120594,1,"χ"],[120595,1,"ψ"],[120596,1,"ω"],[120597,1,"∂"],[120598,1,"ε"],[120599,1,"θ"],[120600,1,"κ"],[120601,1,"φ"],[120602,1,"ρ"],[120603,1,"π"],[120604,1,"α"],[120605,1,"β"],[120606,1,"γ"],[120607,1,"δ"],[120608,1,"ε"],[120609,1,"ζ"],[120610,1,"η"],[120611,1,"θ"],[120612,1,"ι"],[120613,1,"κ"],[120614,1,"λ"],[120615,1,"μ"],[120616,1,"ν"],[120617,1,"ξ"],[120618,1,"ο"],[120619,1,"π"],[120620,1,"ρ"],[120621,1,"θ"],[120622,1,"σ"],[120623,1,"τ"],[120624,1,"υ"],[120625,1,"φ"],[120626,1,"χ"],[120627,1,"ψ"],[120628,1,"ω"],[120629,1,"∇"],[120630,1,"α"],[120631,1,"β"],[120632,1,"γ"],[120633,1,"δ"],[120634,1,"ε"],[120635,1,"ζ"],[120636,1,"η"],[120637,1,"θ"],[120638,1,"ι"],[120639,1,"κ"],[120640,1,"λ"],[120641,1,"μ"],[120642,1,"ν"],[120643,1,"ξ"],[120644,1,"ο"],[120645,1,"π"],[120646,1,"ρ"],[[120647,120648],1,"σ"],[120649,1,"τ"],[120650,1,"υ"],[120651,1,"φ"],[120652,1,"χ"],[120653,1,"ψ"],[120654,1,"ω"],[120655,1,"∂"],[120656,1,"ε"],[120657,1,"θ"],[120658,1,"κ"],[120659,1,"φ"],[120660,1,"ρ"],[120661,1,"π"],[120662,1,"α"],[120663,1,"β"],[120664,1,"γ"],[120665,1,"δ"],[120666,1,"ε"],[120667,1,"ζ"],[120668,1,"η"],[120669,1,"θ"],[120670,1,"ι"],[120671,1,"κ"],[120672,1,"λ"],[120673,1,"μ"],[120674,1,"ν"],[120675,1,"ξ"],[120676,1,"ο"],[120677,1,"π"],[120678,1,"ρ"],[120679,1,"θ"],[120680,1,"σ"],[120681,1,"τ"],[120682,1,"υ"],[120683,1,"φ"],[120684,1,"χ"],[120685,1,"ψ"],[120686,1,"ω"],[120687,1,"∇"],[120688,1,"α"],[120689,1,"β"],[120690,1,"γ"],[120691,1,"δ"],[120692,1,"ε"],[120693,1,"ζ"],[120694,1,"η"],[120695,1,"θ"],[120696,1,"ι"],[120697,1,"κ"],[120698,1,"λ"],[120699,1,"μ"],[120700,1,"ν"],[120701,1,"ξ"],[120702,1,"ο"],[120703,1,"π"],[120704,1,"ρ"],[[120705,120706],1,"σ"],[120707,1,"τ"],[120708,1,"υ"],[120709,1,"φ"],[120710,1,"χ"],[120711,1,"ψ"],[120712,1,"ω"],[120713,1,"∂"],[120714,1,"ε"],[120715,1,"θ"],[120716,1,"κ"],[120717,1,"φ"],[120718,1,"ρ"],[120719,1,"π"],[120720,1,"α"],[120721,1,"β"],[120722,1,"γ"],[120723,1,"δ"],[120724,1,"ε"],[120725,1,"ζ"],[120726,1,"η"],[120727,1,"θ"],[120728,1,"ι"],[120729,1,"κ"],[120730,1,"λ"],[120731,1,"μ"],[120732,1,"ν"],[120733,1,"ξ"],[120734,1,"ο"],[120735,1,"π"],[120736,1,"ρ"],[120737,1,"θ"],[120738,1,"σ"],[120739,1,"τ"],[120740,1,"υ"],[120741,1,"φ"],[120742,1,"χ"],[120743,1,"ψ"],[120744,1,"ω"],[120745,1,"∇"],[120746,1,"α"],[120747,1,"β"],[120748,1,"γ"],[120749,1,"δ"],[120750,1,"ε"],[120751,1,"ζ"],[120752,1,"η"],[120753,1,"θ"],[120754,1,"ι"],[120755,1,"κ"],[120756,1,"λ"],[120757,1,"μ"],[120758,1,"ν"],[120759,1,"ξ"],[120760,1,"ο"],[120761,1,"π"],[120762,1,"ρ"],[[120763,120764],1,"σ"],[120765,1,"τ"],[120766,1,"υ"],[120767,1,"φ"],[120768,1,"χ"],[120769,1,"ψ"],[120770,1,"ω"],[120771,1,"∂"],[120772,1,"ε"],[120773,1,"θ"],[120774,1,"κ"],[120775,1,"φ"],[120776,1,"ρ"],[120777,1,"π"],[[120778,120779],1,"ϝ"],[[120780,120781],3],[120782,1,"0"],[120783,1,"1"],[120784,1,"2"],[120785,1,"3"],[120786,1,"4"],[120787,1,"5"],[120788,1,"6"],[120789,1,"7"],[120790,1,"8"],[120791,1,"9"],[120792,1,"0"],[120793,1,"1"],[120794,1,"2"],[120795,1,"3"],[120796,1,"4"],[120797,1,"5"],[120798,1,"6"],[120799,1,"7"],[120800,1,"8"],[120801,1,"9"],[120802,1,"0"],[120803,1,"1"],[120804,1,"2"],[120805,1,"3"],[120806,1,"4"],[120807,1,"5"],[120808,1,"6"],[120809,1,"7"],[120810,1,"8"],[120811,1,"9"],[120812,1,"0"],[120813,1,"1"],[120814,1,"2"],[120815,1,"3"],[120816,1,"4"],[120817,1,"5"],[120818,1,"6"],[120819,1,"7"],[120820,1,"8"],[120821,1,"9"],[120822,1,"0"],[120823,1,"1"],[120824,1,"2"],[120825,1,"3"],[120826,1,"4"],[120827,1,"5"],[120828,1,"6"],[120829,1,"7"],[120830,1,"8"],[120831,1,"9"],[[120832,121343],2],[[121344,121398],2],[[121399,121402],2],[[121403,121452],2],[[121453,121460],2],[121461,2],[[121462,121475],2],[121476,2],[[121477,121483],2],[[121484,121498],3],[[121499,121503],2],[121504,3],[[121505,121519],2],[[121520,122623],3],[[122624,122654],2],[[122655,122660],3],[[122661,122666],2],[[122667,122879],3],[[122880,122886],2],[122887,3],[[122888,122904],2],[[122905,122906],3],[[122907,122913],2],[122914,3],[[122915,122916],2],[122917,3],[[122918,122922],2],[[122923,122927],3],[122928,1,"а"],[122929,1,"б"],[122930,1,"в"],[122931,1,"г"],[122932,1,"д"],[122933,1,"е"],[122934,1,"ж"],[122935,1,"з"],[122936,1,"и"],[122937,1,"к"],[122938,1,"л"],[122939,1,"м"],[122940,1,"о"],[122941,1,"п"],[122942,1,"р"],[122943,1,"с"],[122944,1,"т"],[122945,1,"у"],[122946,1,"ф"],[122947,1,"х"],[122948,1,"ц"],[122949,1,"ч"],[122950,1,"ш"],[122951,1,"ы"],[122952,1,"э"],[122953,1,"ю"],[122954,1,"ꚉ"],[122955,1,"ә"],[122956,1,"і"],[122957,1,"ј"],[122958,1,"ө"],[122959,1,"ү"],[122960,1,"ӏ"],[122961,1,"а"],[122962,1,"б"],[122963,1,"в"],[122964,1,"г"],[122965,1,"д"],[122966,1,"е"],[122967,1,"ж"],[122968,1,"з"],[122969,1,"и"],[122970,1,"к"],[122971,1,"л"],[122972,1,"о"],[122973,1,"п"],[122974,1,"с"],[122975,1,"у"],[122976,1,"ф"],[122977,1,"х"],[122978,1,"ц"],[122979,1,"ч"],[122980,1,"ш"],[122981,1,"ъ"],[122982,1,"ы"],[122983,1,"ґ"],[122984,1,"і"],[122985,1,"ѕ"],[122986,1,"џ"],[122987,1,"ҫ"],[122988,1,"ꙑ"],[122989,1,"ұ"],[[122990,123022],3],[123023,2],[[123024,123135],3],[[123136,123180],2],[[123181,123183],3],[[123184,123197],2],[[123198,123199],3],[[123200,123209],2],[[123210,123213],3],[123214,2],[123215,2],[[123216,123535],3],[[123536,123566],2],[[123567,123583],3],[[123584,123641],2],[[123642,123646],3],[123647,2],[[123648,124111],3],[[124112,124153],2],[[124154,124895],3],[[124896,124902],2],[124903,3],[[124904,124907],2],[124908,3],[[124909,124910],2],[124911,3],[[124912,124926],2],[124927,3],[[124928,125124],2],[[125125,125126],3],[[125127,125135],2],[[125136,125142],2],[[125143,125183],3],[125184,1,"𞤢"],[125185,1,"𞤣"],[125186,1,"𞤤"],[125187,1,"𞤥"],[125188,1,"𞤦"],[125189,1,"𞤧"],[125190,1,"𞤨"],[125191,1,"𞤩"],[125192,1,"𞤪"],[125193,1,"𞤫"],[125194,1,"𞤬"],[125195,1,"𞤭"],[125196,1,"𞤮"],[125197,1,"𞤯"],[125198,1,"𞤰"],[125199,1,"𞤱"],[125200,1,"𞤲"],[125201,1,"𞤳"],[125202,1,"𞤴"],[125203,1,"𞤵"],[125204,1,"𞤶"],[125205,1,"𞤷"],[125206,1,"𞤸"],[125207,1,"𞤹"],[125208,1,"𞤺"],[125209,1,"𞤻"],[125210,1,"𞤼"],[125211,1,"𞤽"],[125212,1,"𞤾"],[125213,1,"𞤿"],[125214,1,"𞥀"],[125215,1,"𞥁"],[125216,1,"𞥂"],[125217,1,"𞥃"],[[125218,125258],2],[125259,2],[[125260,125263],3],[[125264,125273],2],[[125274,125277],3],[[125278,125279],2],[[125280,126064],3],[[126065,126132],2],[[126133,126208],3],[[126209,126269],2],[[126270,126463],3],[126464,1,"ا"],[126465,1,"ب"],[126466,1,"ج"],[126467,1,"د"],[126468,3],[126469,1,"و"],[126470,1,"ز"],[126471,1,"ح"],[126472,1,"ط"],[126473,1,"ي"],[126474,1,"ك"],[126475,1,"ل"],[126476,1,"م"],[126477,1,"ن"],[126478,1,"س"],[126479,1,"ع"],[126480,1,"ف"],[126481,1,"ص"],[126482,1,"ق"],[126483,1,"ر"],[126484,1,"ش"],[126485,1,"ت"],[126486,1,"ث"],[126487,1,"خ"],[126488,1,"ذ"],[126489,1,"ض"],[126490,1,"ظ"],[126491,1,"غ"],[126492,1,"ٮ"],[126493,1,"ں"],[126494,1,"ڡ"],[126495,1,"ٯ"],[126496,3],[126497,1,"ب"],[126498,1,"ج"],[126499,3],[126500,1,"ه"],[[126501,126502],3],[126503,1,"ح"],[126504,3],[126505,1,"ي"],[126506,1,"ك"],[126507,1,"ل"],[126508,1,"م"],[126509,1,"ن"],[126510,1,"س"],[126511,1,"ع"],[126512,1,"ف"],[126513,1,"ص"],[126514,1,"ق"],[126515,3],[126516,1,"ش"],[126517,1,"ت"],[126518,1,"ث"],[126519,1,"خ"],[126520,3],[126521,1,"ض"],[126522,3],[126523,1,"غ"],[[126524,126529],3],[126530,1,"ج"],[[126531,126534],3],[126535,1,"ح"],[126536,3],[126537,1,"ي"],[126538,3],[126539,1,"ل"],[126540,3],[126541,1,"ن"],[126542,1,"س"],[126543,1,"ع"],[126544,3],[126545,1,"ص"],[126546,1,"ق"],[126547,3],[126548,1,"ش"],[[126549,126550],3],[126551,1,"خ"],[126552,3],[126553,1,"ض"],[126554,3],[126555,1,"غ"],[126556,3],[126557,1,"ں"],[126558,3],[126559,1,"ٯ"],[126560,3],[126561,1,"ب"],[126562,1,"ج"],[126563,3],[126564,1,"ه"],[[126565,126566],3],[126567,1,"ح"],[126568,1,"ط"],[126569,1,"ي"],[126570,1,"ك"],[126571,3],[126572,1,"م"],[126573,1,"ن"],[126574,1,"س"],[126575,1,"ع"],[126576,1,"ف"],[126577,1,"ص"],[126578,1,"ق"],[126579,3],[126580,1,"ش"],[126581,1,"ت"],[126582,1,"ث"],[126583,1,"خ"],[126584,3],[126585,1,"ض"],[126586,1,"ظ"],[126587,1,"غ"],[126588,1,"ٮ"],[126589,3],[126590,1,"ڡ"],[126591,3],[126592,1,"ا"],[126593,1,"ب"],[126594,1,"ج"],[126595,1,"د"],[126596,1,"ه"],[126597,1,"و"],[126598,1,"ز"],[126599,1,"ح"],[126600,1,"ط"],[126601,1,"ي"],[126602,3],[126603,1,"ل"],[126604,1,"م"],[126605,1,"ن"],[126606,1,"س"],[126607,1,"ع"],[126608,1,"ف"],[126609,1,"ص"],[126610,1,"ق"],[126611,1,"ر"],[126612,1,"ش"],[126613,1,"ت"],[126614,1,"ث"],[126615,1,"خ"],[126616,1,"ذ"],[126617,1,"ض"],[126618,1,"ظ"],[126619,1,"غ"],[[126620,126624],3],[126625,1,"ب"],[126626,1,"ج"],[126627,1,"د"],[126628,3],[126629,1,"و"],[126630,1,"ز"],[126631,1,"ح"],[126632,1,"ط"],[126633,1,"ي"],[126634,3],[126635,1,"ل"],[126636,1,"م"],[126637,1,"ن"],[126638,1,"س"],[126639,1,"ع"],[126640,1,"ف"],[126641,1,"ص"],[126642,1,"ق"],[126643,1,"ر"],[126644,1,"ش"],[126645,1,"ت"],[126646,1,"ث"],[126647,1,"خ"],[126648,1,"ذ"],[126649,1,"ض"],[126650,1,"ظ"],[126651,1,"غ"],[[126652,126703],3],[[126704,126705],2],[[126706,126975],3],[[126976,127019],2],[[127020,127023],3],[[127024,127123],2],[[127124,127135],3],[[127136,127150],2],[[127151,127152],3],[[127153,127166],2],[127167,2],[127168,3],[[127169,127183],2],[127184,3],[[127185,127199],2],[[127200,127221],2],[[127222,127231],3],[127232,3],[127233,5,"0,"],[127234,5,"1,"],[127235,5,"2,"],[127236,5,"3,"],[127237,5,"4,"],[127238,5,"5,"],[127239,5,"6,"],[127240,5,"7,"],[127241,5,"8,"],[127242,5,"9,"],[[127243,127244],2],[[127245,127247],2],[127248,5,"(a)"],[127249,5,"(b)"],[127250,5,"(c)"],[127251,5,"(d)"],[127252,5,"(e)"],[127253,5,"(f)"],[127254,5,"(g)"],[127255,5,"(h)"],[127256,5,"(i)"],[127257,5,"(j)"],[127258,5,"(k)"],[127259,5,"(l)"],[127260,5,"(m)"],[127261,5,"(n)"],[127262,5,"(o)"],[127263,5,"(p)"],[127264,5,"(q)"],[127265,5,"(r)"],[127266,5,"(s)"],[127267,5,"(t)"],[127268,5,"(u)"],[127269,5,"(v)"],[127270,5,"(w)"],[127271,5,"(x)"],[127272,5,"(y)"],[127273,5,"(z)"],[127274,1,"〔s〕"],[127275,1,"c"],[127276,1,"r"],[127277,1,"cd"],[127278,1,"wz"],[127279,2],[127280,1,"a"],[127281,1,"b"],[127282,1,"c"],[127283,1,"d"],[127284,1,"e"],[127285,1,"f"],[127286,1,"g"],[127287,1,"h"],[127288,1,"i"],[127289,1,"j"],[127290,1,"k"],[127291,1,"l"],[127292,1,"m"],[127293,1,"n"],[127294,1,"o"],[127295,1,"p"],[127296,1,"q"],[127297,1,"r"],[127298,1,"s"],[127299,1,"t"],[127300,1,"u"],[127301,1,"v"],[127302,1,"w"],[127303,1,"x"],[127304,1,"y"],[127305,1,"z"],[127306,1,"hv"],[127307,1,"mv"],[127308,1,"sd"],[127309,1,"ss"],[127310,1,"ppv"],[127311,1,"wc"],[[127312,127318],2],[127319,2],[[127320,127326],2],[127327,2],[[127328,127337],2],[127338,1,"mc"],[127339,1,"md"],[127340,1,"mr"],[[127341,127343],2],[[127344,127352],2],[127353,2],[127354,2],[[127355,127356],2],[[127357,127358],2],[127359,2],[[127360,127369],2],[[127370,127373],2],[[127374,127375],2],[127376,1,"dj"],[[127377,127386],2],[[127387,127404],2],[127405,2],[[127406,127461],3],[[127462,127487],2],[127488,1,"ほか"],[127489,1,"ココ"],[127490,1,"サ"],[[127491,127503],3],[127504,1,"手"],[127505,1,"字"],[127506,1,"双"],[127507,1,"デ"],[127508,1,"二"],[127509,1,"多"],[127510,1,"解"],[127511,1,"天"],[127512,1,"交"],[127513,1,"映"],[127514,1,"無"],[127515,1,"料"],[127516,1,"前"],[127517,1,"後"],[127518,1,"再"],[127519,1,"新"],[127520,1,"初"],[127521,1,"終"],[127522,1,"生"],[127523,1,"販"],[127524,1,"声"],[127525,1,"吹"],[127526,1,"演"],[127527,1,"投"],[127528,1,"捕"],[127529,1,"一"],[127530,1,"三"],[127531,1,"遊"],[127532,1,"左"],[127533,1,"中"],[127534,1,"右"],[127535,1,"指"],[127536,1,"走"],[127537,1,"打"],[127538,1,"禁"],[127539,1,"空"],[127540,1,"合"],[127541,1,"満"],[127542,1,"有"],[127543,1,"月"],[127544,1,"申"],[127545,1,"割"],[127546,1,"営"],[127547,1,"配"],[[127548,127551],3],[127552,1,"〔本〕"],[127553,1,"〔三〕"],[127554,1,"〔二〕"],[127555,1,"〔安〕"],[127556,1,"〔点〕"],[127557,1,"〔打〕"],[127558,1,"〔盗〕"],[127559,1,"〔勝〕"],[127560,1,"〔敗〕"],[[127561,127567],3],[127568,1,"得"],[127569,1,"可"],[[127570,127583],3],[[127584,127589],2],[[127590,127743],3],[[127744,127776],2],[[127777,127788],2],[[127789,127791],2],[[127792,127797],2],[127798,2],[[127799,127868],2],[127869,2],[[127870,127871],2],[[127872,127891],2],[[127892,127903],2],[[127904,127940],2],[127941,2],[[127942,127946],2],[[127947,127950],2],[[127951,127955],2],[[127956,127967],2],[[127968,127984],2],[[127985,127991],2],[[127992,127999],2],[[128e3,128062],2],[128063,2],[128064,2],[128065,2],[[128066,128247],2],[128248,2],[[128249,128252],2],[[128253,128254],2],[128255,2],[[128256,128317],2],[[128318,128319],2],[[128320,128323],2],[[128324,128330],2],[[128331,128335],2],[[128336,128359],2],[[128360,128377],2],[128378,2],[[128379,128419],2],[128420,2],[[128421,128506],2],[[128507,128511],2],[128512,2],[[128513,128528],2],[128529,2],[[128530,128532],2],[128533,2],[128534,2],[128535,2],[128536,2],[128537,2],[128538,2],[128539,2],[[128540,128542],2],[128543,2],[[128544,128549],2],[[128550,128551],2],[[128552,128555],2],[128556,2],[128557,2],[[128558,128559],2],[[128560,128563],2],[128564,2],[[128565,128576],2],[[128577,128578],2],[[128579,128580],2],[[128581,128591],2],[[128592,128639],2],[[128640,128709],2],[[128710,128719],2],[128720,2],[[128721,128722],2],[[128723,128724],2],[128725,2],[[128726,128727],2],[[128728,128731],3],[128732,2],[[128733,128735],2],[[128736,128748],2],[[128749,128751],3],[[128752,128755],2],[[128756,128758],2],[[128759,128760],2],[128761,2],[128762,2],[[128763,128764],2],[[128765,128767],3],[[128768,128883],2],[[128884,128886],2],[[128887,128890],3],[[128891,128895],2],[[128896,128980],2],[[128981,128984],2],[128985,2],[[128986,128991],3],[[128992,129003],2],[[129004,129007],3],[129008,2],[[129009,129023],3],[[129024,129035],2],[[129036,129039],3],[[129040,129095],2],[[129096,129103],3],[[129104,129113],2],[[129114,129119],3],[[129120,129159],2],[[129160,129167],3],[[129168,129197],2],[[129198,129199],3],[[129200,129201],2],[[129202,129279],3],[[129280,129291],2],[129292,2],[[129293,129295],2],[[129296,129304],2],[[129305,129310],2],[129311,2],[[129312,129319],2],[[129320,129327],2],[129328,2],[[129329,129330],2],[[129331,129342],2],[129343,2],[[129344,129355],2],[129356,2],[[129357,129359],2],[[129360,129374],2],[[129375,129387],2],[[129388,129392],2],[129393,2],[129394,2],[[129395,129398],2],[[129399,129400],2],[129401,2],[129402,2],[129403,2],[[129404,129407],2],[[129408,129412],2],[[129413,129425],2],[[129426,129431],2],[[129432,129442],2],[[129443,129444],2],[[129445,129450],2],[[129451,129453],2],[[129454,129455],2],[[129456,129465],2],[[129466,129471],2],[129472,2],[[129473,129474],2],[[129475,129482],2],[129483,2],[129484,2],[[129485,129487],2],[[129488,129510],2],[[129511,129535],2],[[129536,129619],2],[[129620,129631],3],[[129632,129645],2],[[129646,129647],3],[[129648,129651],2],[129652,2],[[129653,129655],2],[[129656,129658],2],[[129659,129660],2],[[129661,129663],3],[[129664,129666],2],[[129667,129670],2],[[129671,129672],2],[[129673,129679],3],[[129680,129685],2],[[129686,129704],2],[[129705,129708],2],[[129709,129711],2],[[129712,129718],2],[[129719,129722],2],[[129723,129725],2],[129726,3],[129727,2],[[129728,129730],2],[[129731,129733],2],[[129734,129741],3],[[129742,129743],2],[[129744,129750],2],[[129751,129753],2],[[129754,129755],2],[[129756,129759],3],[[129760,129767],2],[129768,2],[[129769,129775],3],[[129776,129782],2],[[129783,129784],2],[[129785,129791],3],[[129792,129938],2],[129939,3],[[129940,129994],2],[[129995,130031],3],[130032,1,"0"],[130033,1,"1"],[130034,1,"2"],[130035,1,"3"],[130036,1,"4"],[130037,1,"5"],[130038,1,"6"],[130039,1,"7"],[130040,1,"8"],[130041,1,"9"],[[130042,131069],3],[[131070,131071],3],[[131072,173782],2],[[173783,173789],2],[[173790,173791],2],[[173792,173823],3],[[173824,177972],2],[[177973,177976],2],[177977,2],[[177978,177983],3],[[177984,178205],2],[[178206,178207],3],[[178208,183969],2],[[183970,183983],3],[[183984,191456],2],[[191457,191471],3],[[191472,192093],2],[[192094,194559],3],[194560,1,"丽"],[194561,1,"丸"],[194562,1,"乁"],[194563,1,"𠄢"],[194564,1,"你"],[194565,1,"侮"],[194566,1,"侻"],[194567,1,"倂"],[194568,1,"偺"],[194569,1,"備"],[194570,1,"僧"],[194571,1,"像"],[194572,1,"㒞"],[194573,1,"𠘺"],[194574,1,"免"],[194575,1,"兔"],[194576,1,"兤"],[194577,1,"具"],[194578,1,"𠔜"],[194579,1,"㒹"],[194580,1,"內"],[194581,1,"再"],[194582,1,"𠕋"],[194583,1,"冗"],[194584,1,"冤"],[194585,1,"仌"],[194586,1,"冬"],[194587,1,"况"],[194588,1,"𩇟"],[194589,1,"凵"],[194590,1,"刃"],[194591,1,"㓟"],[194592,1,"刻"],[194593,1,"剆"],[194594,1,"割"],[194595,1,"剷"],[194596,1,"㔕"],[194597,1,"勇"],[194598,1,"勉"],[194599,1,"勤"],[194600,1,"勺"],[194601,1,"包"],[194602,1,"匆"],[194603,1,"北"],[194604,1,"卉"],[194605,1,"卑"],[194606,1,"博"],[194607,1,"即"],[194608,1,"卽"],[[194609,194611],1,"卿"],[194612,1,"𠨬"],[194613,1,"灰"],[194614,1,"及"],[194615,1,"叟"],[194616,1,"𠭣"],[194617,1,"叫"],[194618,1,"叱"],[194619,1,"吆"],[194620,1,"咞"],[194621,1,"吸"],[194622,1,"呈"],[194623,1,"周"],[194624,1,"咢"],[194625,1,"哶"],[194626,1,"唐"],[194627,1,"啓"],[194628,1,"啣"],[[194629,194630],1,"善"],[194631,1,"喙"],[194632,1,"喫"],[194633,1,"喳"],[194634,1,"嗂"],[194635,1,"圖"],[194636,1,"嘆"],[194637,1,"圗"],[194638,1,"噑"],[194639,1,"噴"],[194640,1,"切"],[194641,1,"壮"],[194642,1,"城"],[194643,1,"埴"],[194644,1,"堍"],[194645,1,"型"],[194646,1,"堲"],[194647,1,"報"],[194648,1,"墬"],[194649,1,"𡓤"],[194650,1,"売"],[194651,1,"壷"],[194652,1,"夆"],[194653,1,"多"],[194654,1,"夢"],[194655,1,"奢"],[194656,1,"𡚨"],[194657,1,"𡛪"],[194658,1,"姬"],[194659,1,"娛"],[194660,1,"娧"],[194661,1,"姘"],[194662,1,"婦"],[194663,1,"㛮"],[194664,3],[194665,1,"嬈"],[[194666,194667],1,"嬾"],[194668,1,"𡧈"],[194669,1,"寃"],[194670,1,"寘"],[194671,1,"寧"],[194672,1,"寳"],[194673,1,"𡬘"],[194674,1,"寿"],[194675,1,"将"],[194676,3],[194677,1,"尢"],[194678,1,"㞁"],[194679,1,"屠"],[194680,1,"屮"],[194681,1,"峀"],[194682,1,"岍"],[194683,1,"𡷤"],[194684,1,"嵃"],[194685,1,"𡷦"],[194686,1,"嵮"],[194687,1,"嵫"],[194688,1,"嵼"],[194689,1,"巡"],[194690,1,"巢"],[194691,1,"㠯"],[194692,1,"巽"],[194693,1,"帨"],[194694,1,"帽"],[194695,1,"幩"],[194696,1,"㡢"],[194697,1,"𢆃"],[194698,1,"㡼"],[194699,1,"庰"],[194700,1,"庳"],[194701,1,"庶"],[194702,1,"廊"],[194703,1,"𪎒"],[194704,1,"廾"],[[194705,194706],1,"𢌱"],[194707,1,"舁"],[[194708,194709],1,"弢"],[194710,1,"㣇"],[194711,1,"𣊸"],[194712,1,"𦇚"],[194713,1,"形"],[194714,1,"彫"],[194715,1,"㣣"],[194716,1,"徚"],[194717,1,"忍"],[194718,1,"志"],[194719,1,"忹"],[194720,1,"悁"],[194721,1,"㤺"],[194722,1,"㤜"],[194723,1,"悔"],[194724,1,"𢛔"],[194725,1,"惇"],[194726,1,"慈"],[194727,1,"慌"],[194728,1,"慎"],[194729,1,"慌"],[194730,1,"慺"],[194731,1,"憎"],[194732,1,"憲"],[194733,1,"憤"],[194734,1,"憯"],[194735,1,"懞"],[194736,1,"懲"],[194737,1,"懶"],[194738,1,"成"],[194739,1,"戛"],[194740,1,"扝"],[194741,1,"抱"],[194742,1,"拔"],[194743,1,"捐"],[194744,1,"𢬌"],[194745,1,"挽"],[194746,1,"拼"],[194747,1,"捨"],[194748,1,"掃"],[194749,1,"揤"],[194750,1,"𢯱"],[194751,1,"搢"],[194752,1,"揅"],[194753,1,"掩"],[194754,1,"㨮"],[194755,1,"摩"],[194756,1,"摾"],[194757,1,"撝"],[194758,1,"摷"],[194759,1,"㩬"],[194760,1,"敏"],[194761,1,"敬"],[194762,1,"𣀊"],[194763,1,"旣"],[194764,1,"書"],[194765,1,"晉"],[194766,1,"㬙"],[194767,1,"暑"],[194768,1,"㬈"],[194769,1,"㫤"],[194770,1,"冒"],[194771,1,"冕"],[194772,1,"最"],[194773,1,"暜"],[194774,1,"肭"],[194775,1,"䏙"],[194776,1,"朗"],[194777,1,"望"],[194778,1,"朡"],[194779,1,"杞"],[194780,1,"杓"],[194781,1,"𣏃"],[194782,1,"㭉"],[194783,1,"柺"],[194784,1,"枅"],[194785,1,"桒"],[194786,1,"梅"],[194787,1,"𣑭"],[194788,1,"梎"],[194789,1,"栟"],[194790,1,"椔"],[194791,1,"㮝"],[194792,1,"楂"],[194793,1,"榣"],[194794,1,"槪"],[194795,1,"檨"],[194796,1,"𣚣"],[194797,1,"櫛"],[194798,1,"㰘"],[194799,1,"次"],[194800,1,"𣢧"],[194801,1,"歔"],[194802,1,"㱎"],[194803,1,"歲"],[194804,1,"殟"],[194805,1,"殺"],[194806,1,"殻"],[194807,1,"𣪍"],[194808,1,"𡴋"],[194809,1,"𣫺"],[194810,1,"汎"],[194811,1,"𣲼"],[194812,1,"沿"],[194813,1,"泍"],[194814,1,"汧"],[194815,1,"洖"],[194816,1,"派"],[194817,1,"海"],[194818,1,"流"],[194819,1,"浩"],[194820,1,"浸"],[194821,1,"涅"],[194822,1,"𣴞"],[194823,1,"洴"],[194824,1,"港"],[194825,1,"湮"],[194826,1,"㴳"],[194827,1,"滋"],[194828,1,"滇"],[194829,1,"𣻑"],[194830,1,"淹"],[194831,1,"潮"],[194832,1,"𣽞"],[194833,1,"𣾎"],[194834,1,"濆"],[194835,1,"瀹"],[194836,1,"瀞"],[194837,1,"瀛"],[194838,1,"㶖"],[194839,1,"灊"],[194840,1,"災"],[194841,1,"灷"],[194842,1,"炭"],[194843,1,"𠔥"],[194844,1,"煅"],[194845,1,"𤉣"],[194846,1,"熜"],[194847,3],[194848,1,"爨"],[194849,1,"爵"],[194850,1,"牐"],[194851,1,"𤘈"],[194852,1,"犀"],[194853,1,"犕"],[194854,1,"𤜵"],[194855,1,"𤠔"],[194856,1,"獺"],[194857,1,"王"],[194858,1,"㺬"],[194859,1,"玥"],[[194860,194861],1,"㺸"],[194862,1,"瑇"],[194863,1,"瑜"],[194864,1,"瑱"],[194865,1,"璅"],[194866,1,"瓊"],[194867,1,"㼛"],[194868,1,"甤"],[194869,1,"𤰶"],[194870,1,"甾"],[194871,1,"𤲒"],[194872,1,"異"],[194873,1,"𢆟"],[194874,1,"瘐"],[194875,1,"𤾡"],[194876,1,"𤾸"],[194877,1,"𥁄"],[194878,1,"㿼"],[194879,1,"䀈"],[194880,1,"直"],[194881,1,"𥃳"],[194882,1,"𥃲"],[194883,1,"𥄙"],[194884,1,"𥄳"],[194885,1,"眞"],[[194886,194887],1,"真"],[194888,1,"睊"],[194889,1,"䀹"],[194890,1,"瞋"],[194891,1,"䁆"],[194892,1,"䂖"],[194893,1,"𥐝"],[194894,1,"硎"],[194895,1,"碌"],[194896,1,"磌"],[194897,1,"䃣"],[194898,1,"𥘦"],[194899,1,"祖"],[194900,1,"𥚚"],[194901,1,"𥛅"],[194902,1,"福"],[194903,1,"秫"],[194904,1,"䄯"],[194905,1,"穀"],[194906,1,"穊"],[194907,1,"穏"],[194908,1,"𥥼"],[[194909,194910],1,"𥪧"],[194911,3],[194912,1,"䈂"],[194913,1,"𥮫"],[194914,1,"篆"],[194915,1,"築"],[194916,1,"䈧"],[194917,1,"𥲀"],[194918,1,"糒"],[194919,1,"䊠"],[194920,1,"糨"],[194921,1,"糣"],[194922,1,"紀"],[194923,1,"𥾆"],[194924,1,"絣"],[194925,1,"䌁"],[194926,1,"緇"],[194927,1,"縂"],[194928,1,"繅"],[194929,1,"䌴"],[194930,1,"𦈨"],[194931,1,"𦉇"],[194932,1,"䍙"],[194933,1,"𦋙"],[194934,1,"罺"],[194935,1,"𦌾"],[194936,1,"羕"],[194937,1,"翺"],[194938,1,"者"],[194939,1,"𦓚"],[194940,1,"𦔣"],[194941,1,"聠"],[194942,1,"𦖨"],[194943,1,"聰"],[194944,1,"𣍟"],[194945,1,"䏕"],[194946,1,"育"],[194947,1,"脃"],[194948,1,"䐋"],[194949,1,"脾"],[194950,1,"媵"],[194951,1,"𦞧"],[194952,1,"𦞵"],[194953,1,"𣎓"],[194954,1,"𣎜"],[194955,1,"舁"],[194956,1,"舄"],[194957,1,"辞"],[194958,1,"䑫"],[194959,1,"芑"],[194960,1,"芋"],[194961,1,"芝"],[194962,1,"劳"],[194963,1,"花"],[194964,1,"芳"],[194965,1,"芽"],[194966,1,"苦"],[194967,1,"𦬼"],[194968,1,"若"],[194969,1,"茝"],[194970,1,"荣"],[194971,1,"莭"],[194972,1,"茣"],[194973,1,"莽"],[194974,1,"菧"],[194975,1,"著"],[194976,1,"荓"],[194977,1,"菊"],[194978,1,"菌"],[194979,1,"菜"],[194980,1,"𦰶"],[194981,1,"𦵫"],[194982,1,"𦳕"],[194983,1,"䔫"],[194984,1,"蓱"],[194985,1,"蓳"],[194986,1,"蔖"],[194987,1,"𧏊"],[194988,1,"蕤"],[194989,1,"𦼬"],[194990,1,"䕝"],[194991,1,"䕡"],[194992,1,"𦾱"],[194993,1,"𧃒"],[194994,1,"䕫"],[194995,1,"虐"],[194996,1,"虜"],[194997,1,"虧"],[194998,1,"虩"],[194999,1,"蚩"],[195e3,1,"蚈"],[195001,1,"蜎"],[195002,1,"蛢"],[195003,1,"蝹"],[195004,1,"蜨"],[195005,1,"蝫"],[195006,1,"螆"],[195007,3],[195008,1,"蟡"],[195009,1,"蠁"],[195010,1,"䗹"],[195011,1,"衠"],[195012,1,"衣"],[195013,1,"𧙧"],[195014,1,"裗"],[195015,1,"裞"],[195016,1,"䘵"],[195017,1,"裺"],[195018,1,"㒻"],[195019,1,"𧢮"],[195020,1,"𧥦"],[195021,1,"䚾"],[195022,1,"䛇"],[195023,1,"誠"],[195024,1,"諭"],[195025,1,"變"],[195026,1,"豕"],[195027,1,"𧲨"],[195028,1,"貫"],[195029,1,"賁"],[195030,1,"贛"],[195031,1,"起"],[195032,1,"𧼯"],[195033,1,"𠠄"],[195034,1,"跋"],[195035,1,"趼"],[195036,1,"跰"],[195037,1,"𠣞"],[195038,1,"軔"],[195039,1,"輸"],[195040,1,"𨗒"],[195041,1,"𨗭"],[195042,1,"邔"],[195043,1,"郱"],[195044,1,"鄑"],[195045,1,"𨜮"],[195046,1,"鄛"],[195047,1,"鈸"],[195048,1,"鋗"],[195049,1,"鋘"],[195050,1,"鉼"],[195051,1,"鏹"],[195052,1,"鐕"],[195053,1,"𨯺"],[195054,1,"開"],[195055,1,"䦕"],[195056,1,"閷"],[195057,1,"𨵷"],[195058,1,"䧦"],[195059,1,"雃"],[195060,1,"嶲"],[195061,1,"霣"],[195062,1,"𩅅"],[195063,1,"𩈚"],[195064,1,"䩮"],[195065,1,"䩶"],[195066,1,"韠"],[195067,1,"𩐊"],[195068,1,"䪲"],[195069,1,"𩒖"],[[195070,195071],1,"頋"],[195072,1,"頩"],[195073,1,"𩖶"],[195074,1,"飢"],[195075,1,"䬳"],[195076,1,"餩"],[195077,1,"馧"],[195078,1,"駂"],[195079,1,"駾"],[195080,1,"䯎"],[195081,1,"𩬰"],[195082,1,"鬒"],[195083,1,"鱀"],[195084,1,"鳽"],[195085,1,"䳎"],[195086,1,"䳭"],[195087,1,"鵧"],[195088,1,"𪃎"],[195089,1,"䳸"],[195090,1,"𪄅"],[195091,1,"𪈎"],[195092,1,"𪊑"],[195093,1,"麻"],[195094,1,"䵖"],[195095,1,"黹"],[195096,1,"黾"],[195097,1,"鼅"],[195098,1,"鼏"],[195099,1,"鼖"],[195100,1,"鼻"],[195101,1,"𪘀"],[[195102,196605],3],[[196606,196607],3],[[196608,201546],2],[[201547,201551],3],[[201552,205743],2],[[205744,262141],3],[[262142,262143],3],[[262144,327677],3],[[327678,327679],3],[[327680,393213],3],[[393214,393215],3],[[393216,458749],3],[[458750,458751],3],[[458752,524285],3],[[524286,524287],3],[[524288,589821],3],[[589822,589823],3],[[589824,655357],3],[[655358,655359],3],[[655360,720893],3],[[720894,720895],3],[[720896,786429],3],[[786430,786431],3],[[786432,851965],3],[[851966,851967],3],[[851968,917501],3],[[917502,917503],3],[917504,3],[917505,3],[[917506,917535],3],[[917536,917631],3],[[917632,917759],3],[[917760,917999],7],[[918e3,983037],3],[[983038,983039],3],[[983040,1048573],3],[[1048574,1048575],3],[[1048576,1114109],3],[[1114110,1114111],3]],{STATUS_MAPPING:ze}=$N;function rm(t){return/[^\x00-\x7F]/u.test(t)}function nm(t,{useSTD3ASCIIRules:e}){let r=0,n=Ec.length-1;for(;r<=n;){const u=Math.floor((r+n)/2),i=Ec[u],a=Array.isArray(i[0])?i[0][0]:i[0],o=Array.isArray(i[0])?i[0][1]:i[0];if(a<=t&&o>=t)return!e||i[1]!==ze.disallowed_STD3_valid&&i[1]!==ze.disallowed_STD3_mapped?i[1]===ze.disallowed_STD3_valid?[ze.valid,...i.slice(2)]:i[1]===ze.disallowed_STD3_mapped?[ze.mapped,...i.slice(2)]:i.slice(1):[ze.disallowed,...i.slice(2)];a>t?n=u-1:r=u+1}return null}function qN(t,{checkHyphens:e,checkBidi:r,checkJoiners:n,transitionalProcessing:u,useSTD3ASCIIRules:i,isBidi:a}){if(t.length===0)return!0;if(t.normalize("NFC")!==t)return!1;const o=Array.from(t);if(e&&(o[2]==="-"&&o[3]==="-"||t.startsWith("-")||t.endsWith("-"))||t.includes(".")||wt.combiningMarks.test(o[0]))return!1;for(const s of o){const[l]=nm(s.codePointAt(0),{useSTD3ASCIIRules:i});if(u){if(l!==ze.valid)return!1}else if(l!==ze.valid&&l!==ze.deviation)return!1}if(n){let s=0;for(const[l,c]of o.entries())if(c==="‌"||c==="‍"){if(l>0){if(wt.combiningClassVirama.test(o[l-1]))continue;if(c==="‌"){const y=o.indexOf("‌",l+1),v=y<0?o.slice(s):o.slice(s,y);if(wt.validZWNJ.test(v.join(""))){s=l+1;continue}}}return!1}}if(r&&a){let s;if(wt.bidiS1LTR.test(o[0]))s=!1;else{if(!wt.bidiS1RTL.test(o[0]))return!1;s=!0}if(s){if(!wt.bidiS2.test(t)||!wt.bidiS3.test(t)||wt.bidiS4EN.test(t)&&wt.bidiS4AN.test(t))return!1}else if(!wt.bidiS5.test(t)||!wt.bidiS6.test(t))return!1}return!0}function Cc(t,e){let r=function(a,{useSTD3ASCIIRules:o,transitionalProcessing:s}){let l="";for(const c of a){const[y,v]=nm(c.codePointAt(0),{useSTD3ASCIIRules:o});switch(y){case ze.disallowed:l+=c;break;case ze.ignored:break;case ze.mapped:l+=s&&c==="ẞ"?"ss":v;break;case ze.deviation:l+=s?v:c;break;case ze.valid:l+=c}}return l}(t,e);r=r.normalize("NFC");const n=r.split("."),u=function(a){const o=a.map(s=>{if(s.startsWith("xn--"))try{return xs.decode(s.substring(4))}catch{return""}return s}).join(".");return wt.bidiDomain.test(o)}(n);let i=!1;for(const[a,o]of n.entries()){let s=o,l=e.transitionalProcessing;if(s.startsWith("xn--")){if(rm(s)){i=!0;continue}try{s=xs.decode(s.substring(4))}catch{if(!e.ignoreInvalidPunycode){i=!0;continue}}n[a]=s,l=!1}i||qN(s,{...e,transitionalProcessing:l,isBidi:u})||(i=!0)}return{string:n.join("."),error:i}}var HN=UN({toASCII:function(t,{checkHyphens:e=!1,checkBidi:r=!1,checkJoiners:n=!1,useSTD3ASCIIRules:u=!1,verifyDNSLength:i=!1,transitionalProcessing:a=!1,ignoreInvalidPunycode:o=!1}={}){const s=Cc(t,{checkHyphens:e,checkBidi:r,checkJoiners:n,useSTD3ASCIIRules:u,transitionalProcessing:a,ignoreInvalidPunycode:o});let l=s.string.split(".");if(l=l.map(c=>{if(rm(c))try{return`xn--${xs.encode(c)}`}catch{s.error=!0}return c}),i){const c=l.join(".").length;(c>253||c===0)&&(s.error=!0);for(let y=0;y63||l[y].length===0){s.error=!0;break}}return s.error?null:l.join(".")},toUnicode:function(t,{checkHyphens:e=!1,checkBidi:r=!1,checkJoiners:n=!1,useSTD3ASCIIRules:u=!1,transitionalProcessing:i=!1,ignoreInvalidPunycode:a=!1}={}){const o=Cc(t,{checkHyphens:e,checkBidi:r,checkJoiners:n,useSTD3ASCIIRules:u,transitionalProcessing:i,ignoreInvalidPunycode:a});return{domain:o.string,error:o.error}}});function KN(t){return{transitionalProcessing:!t.match(/\.(?:be|ca|de|swiss|fr|pm|re|tf|wf|yt)\.?$/)}}function sl(t,e={}){const r=HN.toASCII(t,{...KN(t),...e});if(r!==null)return r;throw new Error(`Unable to translate ${t} to ASCII.`)}const{useAccount:GN}=Ut;function VN({name:t,setName:e,nameValidities:r,setNameValidities:n,nameWrapper:u,ensRegistry:i,triggerNameCheck:a}){const o=GN();console.log("userAddress",o);const s="Name must be a valid URL without subdomains (A-Z, a-z, 0-9, and punycode)",l="Name is not owned by your wallet",c="Unsupported punycode character",y=n1.useRef(null);n1.useEffect(()=>{y.current&&clearTimeout(y.current),y.current=setTimeout(async()=>{if(t.length==0)return;let w,_=[...r],M;w=_.indexOf(c);try{M=sl(t+".eth"),w!=-1&&_.splice(w,1)}catch{w==-1&&_.push(c)}if(M!==void 0&&(w=_.indexOf(s),t!=""&&!nl(M)?w==-1&&_.push(s):w!=-1&&_.splice(w,1),w=_.indexOf(l),_.length==0||w!=-1)){let N=await i.owner(Gi(M));N==u.address&&(N=await u.ownerOf(Gi(M))),N!=o?w==-1&&_.push(l):_.splice(w,1)}n(_)},500)},[t,a]);const v=w=>w.target.value.indexOf(".")==-1&&e(w.target.value);return Q.jsxs("div",{className:"flex flex-col w-full place-items-center place-content-center",children:[Q.jsxs("div",{className:"flex w-full place-items-center",children:[Q.jsx("input",{value:t,onChange:v,type:"text",required:!0,name:"dot-os-name",placeholder:"e.g. myname",className:"grow"}),Q.jsx("div",{className:"ml-2 text-lg",children:".eth"})]}),r.map((w,_)=>Q.jsxs("div",{children:[Q.jsx("br",{}),Q.jsx("span",{className:"text-red-500",children:w})]},_))]})}function sr({msg:t}){return Q.jsxs("div",{id:"loading",className:"flex flex-col text-center",children:[Q.jsx("h3",{children:t}),Q.jsxs("div",{id:"loader",children:[" ",Q.jsx("div",{})," ",Q.jsx("div",{})," ",Q.jsx("div",{})," ",Q.jsx("div",{})," "]})]})}const WN="4902",Fc={[y2]:{chainId:y2,chainName:"Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.sepolia.org"],blockExplorerUrls:["https://sepolia.etherscan.io"]},[Rr]:{chainId:Rr,chainName:"Optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.optimism.io"],blockExplorerUrls:["https://optimistic.etherscan.io"]},[ra]:{chainId:ra,chainName:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://ethereum-rpc.publicnode.com"],blockExplorerUrls:["https://etherscan.io"]}},Q6=t=>{switch(t){case"1":case"0x1":return"Ethereum";case"10":case"a":case"0xa":return"Optimism";case"42161":return"Arbitrum";case"11155111":case"aa36a7":case"0xaa36a7":return"Sepolia";default:return"Unknown"}},M2=async t=>{var r,n,u;let e=await((r=window.ethereum)==null?void 0:r.request({method:"net_version"}).catch(()=>"1"));if(e="0x"+(typeof e=="string"?e.replace(/^0x/,""):e.toString(16)),!Fc[t]){console.error(`Invalid chain ID: ${t}`);return}if(t!==e)try{await((n=window.ethereum)==null?void 0:n.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]}))}catch(i){if(String(i).includes(WN))await((u=window.ethereum)==null?void 0:u.request({method:"wallet_addEthereumChain",params:[Fc[t]]}));else throw window.alert(`You must enable the ${Q6(t)} network in your wallet.`),new Error(`User cancelled connection to ${t}`)}},QN="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAG1BMVEVHcExhfelhfephfelifurBzPf///+Dme7i5/sS0DLNAAAABHRSTlMAgMg36TiFUwAABmNJREFUeNq9nO154joQhQlsASRxASxQAMmmgAXs6xRgRxXAQwEGp4GwW/bFLB+2LDTnjIj1O8kbnfnwSBqp18PH4OVxPI7jeLEYPz7Pet8wfj1Wf782Fo+/7ksYvDzFjvHznvN5Gcc3xs/nOyEenmLP+HmXybxMY+9YhE9m8BSLI3Qyg2kMjEUQ5QFiHCjDAHPE8HjugKGmvEzjb6c8cAyVXQYkQ0PhGQpPjmLFmHOM11g1JpTRY+UYfq9BaLM8xeox/3axCMH0YhGCvcZBY/LtYqGCRaGQ+V0mUgZPBbD6l2R7idGXGcmqEH5iFO6+nysT5sbAROKPVR7kxshE0vUqL0Kmgkzk/QCR9PJaBUkoHwhkERbs6foAEfXyxAoS7MkRkqnDHspauyPEqDPYGwLZHyGyXsuA78hBrSMkU35X+qBaR4is10if4/cnSK7L+JDZK7X+QQqV6SGzf14gsl4TZbQfwv0MkfVaKNVK11eIRi9IrfcaRHRiR6jgap0ghteLUOsEUej1BjvwBcLrNUXD/Qqh9cLKxn0DQuvVJ9QiICM+b+0siOHy14Bw4CsECPqZKjk2IJxRXvFwr0O4JBkxal0h1EdlQIR7AyLrNeNM8u6AZIRRflBq1SDMlz6i1KpBZL3mVOJKnJAMTl8DJtybEANbvk8kRwsi6zUiviU1tTjIkrD77gbEoJafUg7chOSg5QecA1uQArM8Eu+fNyEGi/k+qVYTkmPuFZFqWZACcq+ISY5tSAa515RzYBtiEPcCnCvdeyCiXjPMuZK1D5IB7vXAqmVDDAB5pZKjAyI58QRKj5ZaLUgm+3DEqtWCGNmHIy7cHZBchMgVarqWIIUUKAMy3A/jK+f0mgEQW60vU3J6zeQwsdTafOWmLCm9hjIksRkVpGSceCh/TRoOvDmaoLQpRvii9Jnk+De/QMotrNdIrIOTtlv9gzQoXr1+i1ll13bdE6ROMf688gYnx0t4nCF1ih8SoWpdQ/ACqZm/8OaVCFNrUwvzGqRE9BIhH21GA1ICes2FMiKthYcbUsp6LQTIu4NhQU7mz/SQD1fWtSAnig8iq9XO7KWLUmhnkrgYbciR4tGrJzlwm+GAVOY3Ski63zgYTkjp08sLSZwMN6T06OWFfOY5DimNDrKlIKXS8FsG4jG814VTAqIORjfFcAxpJm6KC1LE+tzlNIvhGADEQTEc4wCRi/qtCCmksl6GpFsJEodASrfxjZuR3ob4SqIkc1KMm5Hp6q50Xbgoxsm4nYWX/jJ1tzn9ZnITcv43tsZTpv7wfxnP7SPbG5Di4oKZuqrfuyjGxch9Vf2D+P1thYtxMYx+pVWVK3/scDG20Ut/cTeUFqZV4WUsFzMtx/KXqeLqtyohN1a4GMuxpIJ71kOKYcuRTdMgcincg8r6posZ2+hSUS9CTgfXdYppMzIB8gatfuuObGpG38oLrSWwqXZaa9Uc2ViOJaxLJ8D24HnVeHVkYzP8K2xoD/K8/r04srEZubgHKW4TXdam57gwDecVdz1myObzZZV9phR2Nsvksw3xK389Ki3cBQawjS5up17PNVZOhgEOBMTNqNq22p9rkYFuqY3AQ5raBqFxlK/IIQ211bkxLUaGHDfJlWp9G/KY91NqwxY8palvEVaOvOX2t3v8bv2q2JI79djJWfOUhjrTGuEHzDv1EeAMPypPbkKyGLI7dD63Vx7Lzpkmn/+UB8y/mUaMVHlUPqRaSj7ckBi1O3toumKPS+E2H123x4RsWFL1rQzJ1qtE0YHTbLUFjHJNLXgv0Zxuh9vxrVcjurGv3USWEQ6Mdnzs2Xa4haLZkm7sW+pa6rkWxaHuckADwqqF6fXOtY0utVcQmC7bofYyRQ3Cq8U0YIGdzxPtlY090cM91Dbv7/CW97n6GsK1eT/j8hbVagtfQ7h1LQhNLStdkHCpeJWH3NeJsFBZAWrNgy4efWLXdYZBV6iw202L0FttFUTnv/hUqhtnWcBEwCpvRdV0uqnsQq8aYpcmsxCLYFNJv4oQi3R2kbWTK7ndXC7u5Jp0Nxe+O7m63s0l/G6eE+jkYYRunnjo5rGKbp7d6OQBkW6eQmEfddG+HNTF8zTUXAJeQOriyaBuHj/CkuUd3qTq4EEq8U2q+zytVU3mJuZuj4R19NxZhWk93Da+98NttSfoKjcYk0/Q/Q/GcNFkXl2LdgAAAABJRU5ErkJggg==",um="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAG1BMVEVHcExhfelhfephfelifurBzPf///+Dme7i5/sS0DLNAAAABHRSTlMAgMg36TiFUwAABmNJREFUeNq9nO154joQhQlsASRxASxQAMmmgAXs6xRgRxXAQwEGp4GwW/bFLB+2LDTnjIj1O8kbnfnwSBqp18PH4OVxPI7jeLEYPz7Pet8wfj1Wf782Fo+/7ksYvDzFjvHznvN5Gcc3xs/nOyEenmLP+HmXybxMY+9YhE9m8BSLI3Qyg2kMjEUQ5QFiHCjDAHPE8HjugKGmvEzjb6c8cAyVXQYkQ0PhGQpPjmLFmHOM11g1JpTRY+UYfq9BaLM8xeox/3axCMH0YhGCvcZBY/LtYqGCRaGQ+V0mUgZPBbD6l2R7idGXGcmqEH5iFO6+nysT5sbAROKPVR7kxshE0vUqL0Kmgkzk/QCR9PJaBUkoHwhkERbs6foAEfXyxAoS7MkRkqnDHspauyPEqDPYGwLZHyGyXsuA78hBrSMkU35X+qBaR4is10if4/cnSK7L+JDZK7X+QQqV6SGzf14gsl4TZbQfwv0MkfVaKNVK11eIRi9IrfcaRHRiR6jgap0ghteLUOsEUej1BjvwBcLrNUXD/Qqh9cLKxn0DQuvVJ9QiICM+b+0siOHy14Bw4CsECPqZKjk2IJxRXvFwr0O4JBkxal0h1EdlQIR7AyLrNeNM8u6AZIRRflBq1SDMlz6i1KpBZL3mVOJKnJAMTl8DJtybEANbvk8kRwsi6zUiviU1tTjIkrD77gbEoJafUg7chOSg5QecA1uQArM8Eu+fNyEGi/k+qVYTkmPuFZFqWZACcq+ISY5tSAa515RzYBtiEPcCnCvdeyCiXjPMuZK1D5IB7vXAqmVDDAB5pZKjAyI58QRKj5ZaLUgm+3DEqtWCGNmHIy7cHZBchMgVarqWIIUUKAMy3A/jK+f0mgEQW60vU3J6zeQwsdTafOWmLCm9hjIksRkVpGSceCh/TRoOvDmaoLQpRvii9Jnk+De/QMotrNdIrIOTtlv9gzQoXr1+i1ll13bdE6ROMf688gYnx0t4nCF1ih8SoWpdQ/ACqZm/8OaVCFNrUwvzGqRE9BIhH21GA1ICes2FMiKthYcbUsp6LQTIu4NhQU7mz/SQD1fWtSAnig8iq9XO7KWLUmhnkrgYbciR4tGrJzlwm+GAVOY3Ski63zgYTkjp08sLSZwMN6T06OWFfOY5DimNDrKlIKXS8FsG4jG814VTAqIORjfFcAxpJm6KC1LE+tzlNIvhGADEQTEc4wCRi/qtCCmksl6GpFsJEodASrfxjZuR3ob4SqIkc1KMm5Hp6q50Xbgoxsm4nYWX/jJ1tzn9ZnITcv43tsZTpv7wfxnP7SPbG5Di4oKZuqrfuyjGxch9Vf2D+P1thYtxMYx+pVWVK3/scDG20Ut/cTeUFqZV4WUsFzMtx/KXqeLqtyohN1a4GMuxpIJ71kOKYcuRTdMgcincg8r6posZ2+hSUS9CTgfXdYppMzIB8gatfuuObGpG38oLrSWwqXZaa9Uc2ViOJaxLJ8D24HnVeHVkYzP8K2xoD/K8/r04srEZubgHKW4TXdam57gwDecVdz1myObzZZV9phR2Nsvksw3xK389Ki3cBQawjS5up17PNVZOhgEOBMTNqNq22p9rkYFuqY3AQ5raBqFxlK/IIQ211bkxLUaGHDfJlWp9G/KY91NqwxY8palvEVaOvOX2t3v8bv2q2JI79djJWfOUhjrTGuEHzDv1EeAMPypPbkKyGLI7dD63Vx7Lzpkmn/+UB8y/mUaMVHlUPqRaSj7ckBi1O3toumKPS+E2H123x4RsWFL1rQzJ1qtE0YHTbLUFjHJNLXgv0Zxuh9vxrVcjurGv3USWEQ6Mdnzs2Xa4haLZkm7sW+pa6rkWxaHuckADwqqF6fXOtY0utVcQmC7bofYyRQ3Cq8U0YIGdzxPtlY090cM91Dbv7/CW97n6GsK1eT/j8hbVagtfQ7h1LQhNLStdkHCpeJWH3NeJsFBZAWrNgy4efWLXdYZBV6iw202L0FttFUTnv/hUqhtnWcBEwCpvRdV0uqnsQq8aYpcmsxCLYFNJv4oQi3R2kbWTK7ndXC7u5Jp0Nxe+O7m63s0l/G6eE+jkYYRunnjo5rGKbp7d6OQBkW6eQmEfddG+HNTF8zTUXAJeQOriyaBuHj/CkuUd3qTq4EEq8U2q+zytVU3mJuZuj4R19NxZhWk93Da+98NttSfoKjcYk0/Q/Q/GcNFkXl2LdgAAAABJRU5ErkJggg==",im="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAACXBIWXMAAAXnAAAF5wGk6LX5AAAAGFBMVEVHcEz/BCD/AyD/BCD/BCD/////aHn/w8p/uFjAAAAABHRSTlMAf8g2IKeBKAAABN1JREFUeNrFnO15mzAQgHHwAHbCAK7LAE4fBggg8AIGFgBngeCsX5qaWAhJdwLd5X41dh+9vk99KwjwEr7uj0cxyPG4fzkFBBLuYzGRbO+b8/osNJK9+ETEwiDeMOGzsMgvL0Z7FYD8JlbDjzJhLBCSraJsUIyBsiN0x0MWUzZCkFOcGAspjoxFlDB2hbjHmDtjASUSCyR1Y/wRi+Q3qdMXOH+JQ5zdEonFkpIby8Fgy43lYLBErJKc3FhYg0VrIQjfP4nVcgAh8XpIxqAIrErsA5IxKAKpEvuBZAyK2FWJfUEyBkVsqkT+IClZ1cJUsMQnxFCMQ+FVTtRuN7s+8gtJyd1ucn3iG5JTZrsl671bS2evxD8kp7eWxl4E1prbK6GA5PTWmtkrFCRyoqxb+voV0UCm9UsQCXkAq0G8pYK80btk4pRQCHqnbOggO3qXyE6J6CApbeFSyheh3x/l64kScqDsS9Q+JaKEpPR+//Y8qd9Hz29oITvqfH/kfEILyemDawyvmBaSYYOrvA6yJrzg4Cr76ktuk08/JblC4QVWrvdqlKZ9fFpUE7nZqxcUwb3c1oPSTSFVY41hIII7Q1N9haXkYASflabq8YtqJrUlhq0RXM6aao0QyZZukGLW0sVE//5KNyyyWmveUmOGNEZI6KbIaJRzhbfXyZ6LvaalDyP+/pUmGzcYtze367WfBNEd8pXvPeCUnTXhCznTywmk09nuYkr5LSIRWxnZyIacmrU2pfwWjq16ajwNpAAgCewSJf+kfzdTyMVUVxKwpDRKrEn8evo/jZAIdMlFgbRziF2TFAH50Gii/PTCmidWSK/ksQRRWu0ASAwGl+5vBdJby0pmgZRq2ZP+nuTiNLjdIGcl+EsjpLNX4SwQrpB6losl0DXaIGpcylD5p48jJpPfhw4FH8Fy2I6Vs/9seqg7wUBaMU8GXb9oGRQF+DSRNNP2i5clEDUuJc1cOl8MpNFpput8a7EAYsjFSjdGtSsCQ2pLwiMGEUDGI3IRZ6xBk3hJLs4gN/tcCw0p5rmom7e4QdSE72a52Fz/SwvOGiPHfrHVxQQ0/0VDqlnn6x8iD10KqI6okAQ5VumkX1+AqYEdd3Xa4eMFHjdoIFtotK0ZFndgIcGOhQs5l7/LrmYgjIA8gfPeYW7yPq0elRvkYJ4Elea5FNQTOsy0dHM5fX0GISFyLUKKZ8dc/LdMhF6MUGdv2Fy0z+N7Q6fhmPCZdUXirPWIcy5m9gWcTt/DOuZial+KKntt79e7QXJgUU2m3IRmMoRdGLYvD76P64+t/NkwAv78wCc8vNB5XbOSOi50Eu8H3HcEOBafeZbRWTYEtrSQN75NGpbtJpaNM54twITe70zbsiwbzCxb5Tyb/lt6vzMdxAjoIMyHY+ic8sZ9YInl6BXPITKW43AsB/tYjijyHLZkOTbKcgCW5ygvy6FkluPVPAfFN8SZyHd4n+caguf69YNXQ3guubBc1/GpyuFnr1DxXAZjudbGc0GP5aohz6VJluufPnIFvsjKciWX53IxyzXplb7H3pDnuLq+yvd5gJaY2lhcDyPwPPHA81gFz7MbLA+I8DyFwvOoC8/zNE6UFc/5cDwZxPP40SCYZ5wo39W6i5fXtTie1uJ5JOwLc9Qhjj4RTA+3rXuC7i9fKsPnoYG4swAAAABJRU5ErkJggg==",JN="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAJ1BMVEVHcEwwSGMsN0osN0orN0v9/v6YvNsqn+1igqEYHy9DZoeMoLXU2d+tI0ZHAAAABHRSTlMA/LJVwr+FbwAAChlJREFUeNq9XM1uG0cSlkU9gLQaR7SkAyPxAWjJD6ChGwZH8mWBjGHEvASwB7KZi4CFKPgmgBYdJBcCA8OSfBEgW3GUi4FI2Bh7MRAG2WAfaod/01Xd1b+kWIckdOj52F99VV3dU90zM/ZW2NxYC1hm1bX1zZmbsAyAIZs80OZgCNiqa5OEKZSZwqqVSUFsMI2tTwRmo8y0Vl0ffxhfM6P9o3JT3picZzatMDKUMWQ2a4kxjmNmmb2FJU+uAuZilZvzORhL5eYxfFDcMTLvu4LcZR523zGXMC9zEnKBeVrpZh3inGDuMm9bvIlI9yWsYIr0cALRssHGsvXxB5Iuv359Nn4S0yvrxySzz+mYga/3+oekb59ZMI7v9SFymQzt01jBovX6SpLb4Ti+1w3kbQLso79XdB7ZvoYgjXNfr+g8gjGSZPeOp1c0HgmPEsF2Az+vaAYiYfSE7OOVWQvx7p4tX1uglNwHEl1Cf3PvHKbOQykos24tx+grN/+YtJwz2F2zsA4H+aRoFvKio345xifJRY3ATcW3FF/vUI7mKKpwmXdxOw+Q3WP+s1P+py6uLxjFC5kJOkYhV+zdvqJif9uEsmjNVhGLl4+EBSeGvF+1jfZtXUTURmNptCyj/p4pQLRUntvV3xRbJybaLxVkKvgqaDPvC2NuJvO+qK85IkDy3/lv5fwU/qgb65aZLXPq6HntSINSNbK1o+WbSmypga9b6gBJWh1tvVfThMu8XsAG8dLxeqYXcWDO7hY1nxQuVa1LuDtTZtyYiD7kKJHGKXN0Xa3O41St3xd7oBZx2Sa7M5ui7PMdFV8Fy+xuI2QhXFQgeeZt/GC/iONprqXIxLg65eLt2IMEXMiKevUeSdYhc7IaKfr7tN8/mGtQeiwrVMquki4JR2J0X1yPhBxQkTJLjHo3cAcZCblFeR6F4leO4iU08x3lFOiSaPBrPoZeIINw2U0NIIMf84l52o4sYpXfG/47K9cKz+OKSxrvEPz4uP/v3j+PuYlfDI4kkJIMEtLFSRRd/ifOrP6/7AFH1z3r++6p+D0VyD0zSLTSjQdWz3776L8z+52ciAJZXmaQ6DJ/7pfMuRzjUWoLUjaCnPLH/sbYO/7pW2YGGSQWZgR5lj+1HrCIf4qfWoAweTKhQB7ypz5OWY1/igMbkIqkYAoEOPo5Y6v805OUiWUGAVKSiggCBPz0TFvRFf/43+z7e0aQLamuI0AwWyEYVzY9Fw8CE8h9CxDo6D8YewMEnP3fi+a5DUjZAAL0G39k0Ssk4LDdPDSBVC1AbmNH43DfbjZfBmYQYa9ZBsFsgXCvZzXpUrOJ+SJAMg0LhZ0EAsMim1d/RSoI2hnI3vgg7xBbURcJOGNL4IsGmdWDQG1lyfEEsHXOwmIPBPFFgZRIkF0lWzDc+wLu2aEXCBjJKg53MK5/Dl2S8WUEmdODXKGnbseigPsW6EG2DCAnOCweoHEN2UJ8USD3xSWpAAK0VWdEuDdFvjxAYMp9zNgdOK6ALTdHFgTuILm6oA+eouSYCZgVc5Bzw0jKupE8QGyx90jA4UUO8lILUiVB8pG8QkmEEeE+sINgDBD8VBiY2XxV4yCcL3cQwQeruOACI+F8USDhDFODQMU+wVL7wpBPmgc6EKYDgdN5NpW8BWz91ntOEfIVeILsYB/AwOw/BvK15zmS6D2eeK+w1EDEA305g3SRD0IsNcZ47gL6cgV5E6M6+xSXpwsMi3jPD+QVTo4CeT8HAl+qRZAeBNDzLQ73HnntFsmXG0h4iieoHXG+yuJvoSjFoxtIdFuZHHsfl/p6CpsiXzSIKq1Abf2VohpvOF+dU3y55a5TPJXAcH8+iMOXQtAfuoPcRnW2GO7FYfxJSdIN5BmKb5gc84LrHCfJPl80iGL6hXNHb0EVo1y5MIq/EPEVOM7x73B8P6TmqwMm8+UCAkvFJ1jAj3jBdYaDvqkcyRwJAsX0hcnhPnjov9hghQL0RVeQt0iQVUzPKc6V2yC/C3zRIGRVD8XUq7OF6C8CfgS+HJYOJ1hMkK3efNWG8XeB+HIAEcUUKwouMehfKkCo5dx3Vyi+Q4iJfX2Ok2QzsF8zJjHKhijcU0SQNKkoQIgl9vd47uhgPS+0kZ5CNAlT6/gKuVnQxWudh3jduN3E8Qc/H9jvSMQ4OcLJPghRupL42qdB5A0cga1QmOzhM/uLeIia2O4SdbG2hMkePbN5sID52qdB5E21GG9CvMcewj7pTyJt7Ui2qO3B73G4w8n+sVQ49uNxSTuSErXRCdn6iGf3we7pEuIre+KydiQVasu2i0MPJuRWyii+QJLcp7dsxc1nka0reUMb8bXHQvAHiWLzWdhG7wqh10UbHwRfaGz7Nnv1DGqrjvck8u1/DV+JAgS/2oBsfSOEe/6ldlNYNFyoQYj3J3B+6hfWMbX9L+mrqKarRLxuEpLjm5ja/pf42m4rR1KR2wpgFfc3roVivoOC+QKTcH8gjZR4ZVpWgDzH+0LwjcySGPRFMJBdCmROARLgWugP+EJR4otj4JeZW8Rr2Q5O60L9xX9LU+SrnWPQr2UL9Eie4+T4CIlQSpIXOQb9ghk5pQujohYr3l+hiX04Ce9rX5WjmK91QZ39MFa97cP6asFeDMVLf9i+EO3QybEuLDZFvoztCyjmowe5n+X5itsy5os3lqoaMfCUEv00iop3sbSdotDXL6rWI2VzTPrTkK1XZLhTfCWgLUjVTCQsUjpX/YfCPPZEboYSaxSqe2Ne07B0/KwOJADnKzLocwzpHXtF12Bb+1sI99/l9/sXEobUWRFqm8giYeOjnjIlX/u2TWRUP+fbWPe6mvOVO13ShtAOR7VBruKsr+JL16FaMbYo/qoTcM5Xoumbq5obeQdBmRd5si2jACG+MG/TNppvS/xFt/W0gXgZ0ZtXsWqAHemLPjsTLl1r++aqVq280TDv1xU9OZeurbxkU3I0mOP/pPuOa4bu+ople3X01RCEiALQZkfqomrdKH7ckxj5c42NpYv2Le9Z3q+PMlNIdIy5tbwr2tHD46s/RxKKRhoKQ968/yKiG86qnscQXhDCUvbNzbudZwvlds0V3wMVdkdDBlmLizdl9m7XH/rEp1rA2YCW8q9U3I/rFCd2XMfq4FHjbOHIoiu65HWE6oN8hOqFukG26ncYrCMfBrsTKL+97nmsrSMca2v4HmvTeCWc2AE9ncACdNSw8YPm0KzpAKj20GRxQocm9cc/i4lNx7L5rLT+IOulTVe0xSHmshlF3xVtcxZff7g4XH79+hctht056THOlNt4XXGEw8lsr0eYxtH16RzCn851Av6EOd1XMY0rHjzdsjjjaB5ucb52w8P5PpfUbJZvHmM6l7o4Ctnzehqni3a8MaZzZdB0Lj/KzOIap7Xx76TaMAxmAhdSTelqrelcEqa87oytTfxWNeHitvAGb4j72gfg/10bKABRXI7XAAAAAElFTkSuQmCC",YN="/assets/unknown-C4Y5qjv5.png";var lr=function(t){t==null&&(t=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};lr.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(((t&4294901760)>>>16)*1812433253<<16)+(t&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};lr.prototype.init_by_array=function(t,e){var r,n,u;for(this.init_seed(19650218),r=1,n=0,u=this.N>e?this.N:e;u;u--){var i=this.mt[r-1]^this.mt[r-1]>>>30;this.mt[r]=(this.mt[r]^(((i&4294901760)>>>16)*1664525<<16)+(i&65535)*1664525)+t[n]+n,this.mt[r]>>>=0,r++,n++,r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1),n>=e&&(n=0)}for(u=this.N-1;u;u--){var i=this.mt[r-1]^this.mt[r-1]>>>30;this.mt[r]=(this.mt[r]^(((i&4294901760)>>>16)*1566083941<<16)+(i&65535)*1566083941)-r,this.mt[r]>>>=0,r++,r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1)}this.mt[0]=2147483648};lr.prototype.random_int=function(){var t,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var r;for(this.mti==this.N+1&&this.init_seed(5489),r=0;r>>1^e[t&1];for(;r>>1^e[t&1];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^e[t&1],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0};lr.prototype.random_int31=function(){return this.random_int()>>>1};lr.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};lr.prototype.random=function(){return this.random_int()*(1/4294967296)};lr.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};lr.prototype.random_long=function(){var t=this.random_int()>>>5,e=this.random_int()>>>6;return(t*67108864+e)*(1/9007199254740992)};var XN=lr,am={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(window,function(){return function(r){var n={};function u(i){if(n[i])return n[i].exports;var a=n[i]={i,l:!1,exports:{}};return r[i].call(a.exports,a,a.exports,u),a.l=!0,a.exports}return u.m=r,u.c=n,u.d=function(i,a,o){u.o(i,a)||Object.defineProperty(i,a,{enumerable:!0,get:o})},u.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},u.t=function(i,a){if(1&a&&(i=u(i)),8&a||4&a&&typeof i=="object"&&i&&i.__esModule)return i;var o=Object.create(null);if(u.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:i}),2&a&&typeof i!="string")for(var s in i)u.d(o,s,(function(l){return i[l]}).bind(null,s));return o},u.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return u.d(a,"a",a),a},u.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},u.p="",u(u.s=1)}([function(r,n,u){var i,a;i=[u(2)],(a=(function(o){function s(h){if(s.is(h,"function"))return l?h():o.on("raphael.DOMload",h);if(s.is(h,R))return s._engine.create[C](s,h.splice(0,3+s.is(h[0],D))).add(h);var g=Array.prototype.slice.call(arguments,0);if(s.is(g[g.length-1],"function")){var A=g.pop();return l?A.call(s._engine.create[C](s,g)):o.on("raphael.DOMload",function(){A.call(s._engine.create[C](s,g))})}return s._engine.create[C](s,arguments)}s.version="2.3.0",s.eve=o;var l,c,y=/[, ]+/,v={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},w=/\{(\d+)\}/g,_="hasOwnProperty",M={doc:document,win:window},N={was:Object.prototype[_].call(M.win,"Raphael"),is:M.win.Raphael},k=function(){this.ca=this.customAttributes={}},C="apply",T="concat",z="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,$="",Y=" ",J=String,e1="split",i1="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[e1](Y),o1={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},S=J.prototype.toLowerCase,X=Math,U=X.max,d=X.min,x=X.abs,P=X.pow,F=X.PI,D="number",R="array",q=Object.prototype.toString,b=(s._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),f={NaN:1,Infinity:1,"-Infinity":1},m=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,B=X.round,p=parseFloat,I=parseInt,L=J.prototype.toUpperCase,V=s._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},G=s._availableAnimAttrs={blur:D,"clip-rect":"csv",cx:D,cy:D,fill:"colour","fill-opacity":D,"font-size":D,height:D,opacity:D,path:"path",r:D,rx:D,ry:D,stroke:"colour","stroke-opacity":D,"stroke-width":D,transform:"transform",width:D,x:D,y:D},r1=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,u1={hs:1,rg:1},a1=/,?([achlmqrstvxz]),?/gi,B1=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,b1=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,w1=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,L1=(s._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),N1=function(h,g){return p(h)-p(g)},_1=function(h){return h},k1=s._rectPath=function(h,g,A,E,O){return O?[["M",h+O,g],["l",A-2*O,0],["a",O,O,0,0,1,O,O],["l",0,E-2*O],["a",O,O,0,0,1,-O,O],["l",2*O-A,0],["a",O,O,0,0,1,-O,-O],["l",0,2*O-E],["a",O,O,0,0,1,O,-O],["z"]]:[["M",h,g],["l",A,0],["l",0,E],["l",-A,0],["z"]]},O1=function(h,g,A,E){return E==null&&(E=A),[["M",h,g],["m",0,-E],["a",A,E,0,1,1,0,2*E],["a",A,E,0,1,1,0,-2*E],["z"]]},S1=s._getPath={path:function(h){return h.attr("path")},circle:function(h){var g=h.attrs;return O1(g.cx,g.cy,g.r)},ellipse:function(h){var g=h.attrs;return O1(g.cx,g.cy,g.rx,g.ry)},rect:function(h){var g=h.attrs;return k1(g.x,g.y,g.width,g.height,g.r)},image:function(h){var g=h.attrs;return k1(g.x,g.y,g.width,g.height)},text:function(h){var g=h._getBBox();return k1(g.x,g.y,g.width,g.height)},set:function(h){var g=h._getBBox();return k1(g.x,g.y,g.width,g.height)}},e0=s.mapPath=function(h,g){if(!g)return h;var A,E,O,j,K,H,W;for(O=0,K=(h=pe(h)).length;O',(U1=q1.firstChild).style.behavior="url(#default#VML)",!U1||typeof U1.adj!="object")return s.type=$;q1=null}function D0(h){if(typeof h=="function"||Object(h)!==h)return h;var g=new h.constructor;for(var A in h)h[_](A)&&(g[A]=D0(h[A]));return g}s.svg=!(s.vml=s.type=="VML"),s._Paper=k,s.fn=c=k.prototype=s.prototype,s._id=0,s.is=function(h,g){return(g=S.call(g))=="finite"?!f[_](+h):g=="array"?h instanceof Array:g=="null"&&h===null||g==typeof h&&h!==null||g=="object"&&h===Object(h)||g=="array"&&Array.isArray&&Array.isArray(h)||q.call(h).slice(8,-1).toLowerCase()==g},s.angle=function(h,g,A,E,O,j){if(O==null){var K=h-A,H=g-E;return K||H?(180+180*X.atan2(-H,-K)/F+360)%360:0}return s.angle(h,g,O,j)-s.angle(A,E,O,j)},s.rad=function(h){return h%360*F/180},s.deg=function(h){return Math.round(180*h/F%360*1e3)/1e3},s.snapTo=function(h,g,A){if(A=s.is(A,"finite")?A:10,s.is(h,R)){for(var E=h.length;E--;)if(x(h[E]-g)<=A)return h[E]}else{var O=g%(h=+h);if(Oh-A)return g-O+h}return g};var J1,c0;s.createUUID=(J1=/[xy]/g,c0=function(h){var g=16*X.random()|0;return(h=="x"?g:3&g|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(J1,c0).toUpperCase()}),s.setWindow=function(h){o("raphael.setWindow",s,M.win,h),M.win=h,M.doc=M.win.document,s._engine.initWin&&s._engine.initWin(M.win)};var ee=function(h){if(s.vml){var g,A=/^\s+|\s+$/g;try{var E=new ActiveXObject("htmlfile");E.write(""),E.close(),g=E.body}catch{g=createPopup().document.body}var O=g.createTextRange();ee=C0(function(K){try{g.style.color=J(K).replace(A,$);var H=O.queryCommandValue("ForeColor");return"#"+("000000"+(H=(255&H)<<16|65280&H|(16711680&H)>>>16).toString(16)).slice(-6)}catch{return"none"}})}else{var j=M.doc.createElement("i");j.title="Raphaël Colour Picker",j.style.display="none",M.doc.body.appendChild(j),ee=C0(function(K){return j.style.color=K,M.doc.defaultView.getComputedStyle(j,$).getPropertyValue("color")})}return ee(h)},n0=function(){return"hsb("+[this.h,this.s,this.b]+")"},u0=function(){return"hsl("+[this.h,this.s,this.l]+")"},de=function(){return this.hex},i0=function(h,g,A){if(g==null&&s.is(h,"object")&&"r"in h&&"g"in h&&"b"in h&&(A=h.b,g=h.g,h=h.r),g==null&&s.is(h,"string")){var E=s.getRGB(h);h=E.r,g=E.g,A=E.b}return(h>1||g>1||A>1)&&(h/=255,g/=255,A/=255),[h,g,A]},m0=function(h,g,A,E){var O={r:h*=255,g:g*=255,b:A*=255,hex:s.rgb(h,g,A),toString:de};return s.is(E,"finite")&&(O.opacity=E),O};function C0(h,g,A){return function E(){var O=Array.prototype.slice.call(arguments,0),j=O.join("␀"),K=E.cache=E.cache||{},H=E.count=E.count||[];return K[_](j)?(function(W,t1){for(var f1=0,m1=W.length;f1=1e3&&delete K[H.shift()],H.push(j),K[j]=h[C](g,O),A?A(K[j]):K[j])}}s.color=function(h){var g;return s.is(h,"object")&&"h"in h&&"s"in h&&"b"in h?(g=s.hsb2rgb(h),h.r=g.r,h.g=g.g,h.b=g.b,h.hex=g.hex):s.is(h,"object")&&"h"in h&&"s"in h&&"l"in h?(g=s.hsl2rgb(h),h.r=g.r,h.g=g.g,h.b=g.b,h.hex=g.hex):(s.is(h,"string")&&(h=s.getRGB(h)),s.is(h,"object")&&"r"in h&&"g"in h&&"b"in h?(g=s.rgb2hsl(h),h.h=g.h,h.s=g.s,h.l=g.l,g=s.rgb2hsb(h),h.v=g.b):(h={hex:"none"}).r=h.g=h.b=h.h=h.s=h.v=h.l=-1),h.toString=de,h},s.hsb2rgb=function(h,g,A,E){var O,j,K,H,W;return this.is(h,"object")&&"h"in h&&"s"in h&&"b"in h&&(A=h.b,g=h.s,E=h.o,h=h.h),H=(W=A*g)*(1-x((h=(h*=360)%360/60)%2-1)),O=j=K=A-W,m0(O+=[W,H,0,0,H,W][h=~~h],j+=[H,W,W,H,0,0][h],K+=[0,0,H,W,W,H][h],E)},s.hsl2rgb=function(h,g,A,E){var O,j,K,H,W;return this.is(h,"object")&&"h"in h&&"s"in h&&"l"in h&&(A=h.l,g=h.s,h=h.h),(h>1||g>1||A>1)&&(h/=360,g/=100,A/=100),H=(W=2*g*(A<.5?A:1-A))*(1-x((h=(h*=360)%360/60)%2-1)),O=j=K=A-W/2,m0(O+=[W,H,0,0,H,W][h=~~h],j+=[H,W,W,H,0,0][h],K+=[0,0,H,W,W,H][h],E)},s.rgb2hsb=function(h,g,A){var E,O;return h=(A=i0(h,g,A))[0],g=A[1],A=A[2],{h:(((O=(E=U(h,g,A))-d(h,g,A))==0?null:E==h?(g-A)/O:E==g?(A-h)/O+2:(h-g)/O+4)+360)%6*60/360,s:O==0?0:O/E,b:E,toString:n0}},s.rgb2hsl=function(h,g,A){var E,O,j,K;return h=(A=i0(h,g,A))[0],g=A[1],A=A[2],E=((O=U(h,g,A))+(j=d(h,g,A)))/2,{h:(((K=O-j)==0?null:O==h?(g-A)/K:O==g?(A-h)/K+2:(h-g)/K+4)+360)%6*60/360,s:K==0?0:E<.5?K/(2*E):K/(2-2*E),l:E,toString:u0}},s._path2string=function(){return this.join(",").replace(a1,"$1")},s._preload=function(h,g){var A=M.doc.createElement("img");A.style.cssText="position:absolute;left:-9999em;top:-9999em",A.onload=function(){g.call(this),this.onload=null,M.doc.body.removeChild(this)},A.onerror=function(){M.doc.body.removeChild(this)},M.doc.body.appendChild(A),A.src=h};function Y1(){return this.hex}function a0(h,g){for(var A=[],E=0,O=h.length;O-2*!g>E;E+=2){var j=[{x:+h[E-2],y:+h[E-1]},{x:+h[E],y:+h[E+1]},{x:+h[E+2],y:+h[E+3]},{x:+h[E+4],y:+h[E+5]}];g?E?O-4==E?j[3]={x:+h[0],y:+h[1]}:O-2==E&&(j[2]={x:+h[0],y:+h[1]},j[3]={x:+h[2],y:+h[3]}):j[0]={x:+h[O-2],y:+h[O-1]}:O-4==E?j[3]=j[2]:E||(j[0]={x:+h[E],y:+h[E+1]}),A.push(["C",(-j[0].x+6*j[1].x+j[2].x)/6,(-j[0].y+6*j[1].y+j[2].y)/6,(j[1].x+6*j[2].x-j[3].x)/6,(j[1].y+6*j[2].y-j[3].y)/6,j[2].x,j[2].y])}return A}s.getRGB=C0(function(h){if(!h||(h=J(h)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Y1};if(h=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:Y1};!u1[_](h.toLowerCase().substring(0,2))&&h.charAt()!="#"&&(h=ee(h));var g,A,E,O,j,K,H=h.match(b);return H?(H[2]&&(E=I(H[2].substring(5),16),A=I(H[2].substring(3,5),16),g=I(H[2].substring(1,3),16)),H[3]&&(E=I((j=H[3].charAt(3))+j,16),A=I((j=H[3].charAt(2))+j,16),g=I((j=H[3].charAt(1))+j,16)),H[4]&&(K=H[4][e1](r1),g=p(K[0]),K[0].slice(-1)=="%"&&(g*=2.55),A=p(K[1]),K[1].slice(-1)=="%"&&(A*=2.55),E=p(K[2]),K[2].slice(-1)=="%"&&(E*=2.55),H[1].toLowerCase().slice(0,4)=="rgba"&&(O=p(K[3])),K[3]&&K[3].slice(-1)=="%"&&(O/=100)),H[5]?(K=H[5][e1](r1),g=p(K[0]),K[0].slice(-1)=="%"&&(g*=2.55),A=p(K[1]),K[1].slice(-1)=="%"&&(A*=2.55),E=p(K[2]),K[2].slice(-1)=="%"&&(E*=2.55),(K[0].slice(-3)=="deg"||K[0].slice(-1)=="°")&&(g/=360),H[1].toLowerCase().slice(0,4)=="hsba"&&(O=p(K[3])),K[3]&&K[3].slice(-1)=="%"&&(O/=100),s.hsb2rgb(g,A,E,O)):H[6]?(K=H[6][e1](r1),g=p(K[0]),K[0].slice(-1)=="%"&&(g*=2.55),A=p(K[1]),K[1].slice(-1)=="%"&&(A*=2.55),E=p(K[2]),K[2].slice(-1)=="%"&&(E*=2.55),(K[0].slice(-3)=="deg"||K[0].slice(-1)=="°")&&(g/=360),H[1].toLowerCase().slice(0,4)=="hsla"&&(O=p(K[3])),K[3]&&K[3].slice(-1)=="%"&&(O/=100),s.hsl2rgb(g,A,E,O)):((H={r:g,g:A,b:E,toString:Y1}).hex="#"+(16777216|E|A<<8|g<<16).toString(16).slice(1),s.is(O,"finite")&&(H.opacity=O),H)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Y1}},s),s.hsb=C0(function(h,g,A){return s.hsb2rgb(h,g,A).hex}),s.hsl=C0(function(h,g,A){return s.hsl2rgb(h,g,A).hex}),s.rgb=C0(function(h,g,A){function E(O){return O+.5|0}return"#"+(16777216|E(A)|E(g)<<8|E(h)<<16).toString(16).slice(1)}),s.getColor=function(h){var g=this.getColor.start=this.getColor.start||{h:0,s:1,b:h||.75},A=this.hsb2rgb(g.h,g.s,g.b);return g.h+=.075,g.h>1&&(g.h=0,g.s-=.2,g.s<=0&&(this.getColor.start={h:0,s:1,b:g.b})),A.hex},s.getColor.reset=function(){delete this.start},s.parsePathString=function(h){if(!h)return null;var g=$0(h);if(g.arr)return j1(g.arr);var A={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},E=[];return s.is(h,R)&&s.is(h[0],R)&&(E=j1(h)),E.length||J(h).replace(B1,function(O,j,K){var H=[],W=j.toLowerCase();if(K.replace(w1,function(t1,f1){f1&&H.push(+f1)}),W=="m"&&H.length>2&&(E.push([j][T](H.splice(0,2))),W="l",j=j=="m"?"l":"L"),W=="r")E.push([j][T](H));else for(;H.length>=A[W]&&(E.push([j][T](H.splice(0,A[W]))),A[W]););}),E.toString=s._path2string,g.arr=j1(E),E},s.parseTransformString=C0(function(h){if(!h)return null;var g=[];return s.is(h,R)&&s.is(h[0],R)&&(g=j1(h)),g.length||J(h).replace(b1,function(A,E,O){var j=[];S.call(E),O.replace(w1,function(K,H){H&&j.push(+H)}),g.push([E][T](j))}),g.toString=s._path2string,g},this,function(h){if(!h)return h;for(var g=[],A=0;A1?1:W<0?0:W)/2,f1=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],m1=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d1=0,l1=0;l1<12;l1++){var h1=t1*f1[l1]+t1,y1=o0(h1,h,A,O,K),p1=o0(h1,g,E,j,H),c1=y1*y1+p1*p1;d1+=m1[l1]*X.sqrt(c1)}return t1*d1}function he(h,g,A,E,O,j,K,H){if(!(U(h,A)U(O,K)||U(g,E)U(j,H))){var W=(h-A)*(j-H)-(g-E)*(O-K);if(W){var t1=((h*E-g*A)*(O-K)-(h-A)*(O*H-j*K))/W,f1=((h*E-g*A)*(j-H)-(g-E)*(O*H-j*K))/W,m1=+t1.toFixed(2),d1=+f1.toFixed(2);if(!(m1<+d(h,A).toFixed(2)||m1>+U(h,A).toFixed(2)||m1<+d(O,K).toFixed(2)||m1>+U(O,K).toFixed(2)||d1<+d(g,E).toFixed(2)||d1>+U(g,E).toFixed(2)||d1<+d(j,H).toFixed(2)||d1>+U(j,H).toFixed(2)))return{x:t1,y:f1}}}}function s0(h,g,A){var E=s.bezierBBox(h),O=s.bezierBBox(g);if(!s.isBBoxIntersect(E,O))return A?0:[];for(var j=V1.apply(0,h),K=V1.apply(0,g),H=U(~~(j/5),1),W=U(~~(K/5),1),t1=[],f1=[],m1={},d1=A?0:[],l1=0;l1=0&&I1<=1.001&&$1>=0&&$1<=1.001&&(A?d1++:d1.push({x:z1.x,y:z1.y,t1:d(I1,1),t2:d($1,1)}))}}return d1}function d0(h,g,A){h=s._path2curve(h),g=s._path2curve(g);for(var E,O,j,K,H,W,t1,f1,m1,d1,l1=A?0:[],h1=0,y1=h.length;h1D1||c1=h.x&&g<=h.x2&&A>=h.y&&A<=h.y2},s.isBBoxIntersect=function(h,g){var A=s.isPointInsideBBox;return A(g,h.x,h.y)||A(g,h.x2,h.y)||A(g,h.x,h.y2)||A(g,h.x2,h.y2)||A(h,g.x,g.y)||A(h,g.x2,g.y)||A(h,g.x,g.y2)||A(h,g.x2,g.y2)||(h.xg.x||g.xh.x)&&(h.yg.y||g.yh.y)},s.pathIntersection=function(h,g){return d0(h,g)},s.pathIntersectionNumber=function(h,g){return d0(h,g,1)},s.isPointInsidePath=function(h,g,A){var E=s.pathBBox(h);return s.isPointInsideBBox(E,g,A)&&d0(h,[["M",g,A],["H",E.x2+10]],1)%2==1},s._removedFactory=function(h){return function(){o("raphael.log",null,"Raphaël: you are calling to method “"+h+"” of removed object",h)}};var te=s.pathBBox=function(h){var g=$0(h);if(g.bbox)return D0(g.bbox);if(!h)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var A,E=0,O=0,j=[],K=[],H=0,W=(h=pe(h)).length;H1&&(A*=c1=X.sqrt(c1),E*=c1);var D1=A*A,g1=E*E,A1=(j==K?-1:1)*X.sqrt(x((D1*g1-D1*p1*p1-g1*y1*y1)/(D1*p1*p1+g1*y1*y1))),x1=A1*A*p1/E+(h+H)/2,z1=A1*-E*y1/A+(g+W)/2,I1=X.asin(((g-z1)/E).toFixed(9)),$1=X.asin(((W-z1)/E).toFixed(9));(I1=h$1&&(I1-=2*F),!K&&$1>I1&&($1-=2*F)}var V2=$1-I1;if(x(V2)>m1){var xu=$1,We=H,u6=W;$1=I1+m1*(K&&$1>I1?1:-1),H=x1+A*X.cos($1),W=z1+E*X.sin($1),l1=ge(H,W,A,E,O,0,K,We,u6,[$1,xu,x1,z1])}V2=$1-I1;var W2=X.cos(I1),Q2=X.sin(I1),s5=X.cos($1),O6=X.sin($1),a2=X.tan(V2/4),l5=4/3*A*a2,yl=4/3*E*a2,gl=[h,g],J2=[h+l5*Q2,g-yl*W2],xl=[H+l5*O6,W-yl*s5],vl=[H,W];if(J2[0]=2*gl[0]-J2[0],J2[1]=2*gl[1]-J2[1],t1)return[J2,xl,vl][T](l1);for(var Al=[],cr=0,wm=(l1=[J2,xl,vl][T](l1).join()[e1](",")).length;cr"1e12"&&(d1=.5),x(l1)>"1e12"&&(l1=.5),d1>0&&d1<1&&(W=t0(h,g,A,E,O,j,K,H,d1),y1.push(W.x),h1.push(W.y)),l1>0&&l1<1&&(W=t0(h,g,A,E,O,j,K,H,l1),y1.push(W.x),h1.push(W.y)),t1=j-2*E+g-(H-2*j+E),m1=g-E,d1=(-(f1=2*(E-g)-2*(j-E))+X.sqrt(f1*f1-4*t1*m1))/2/t1,l1=(-f1-X.sqrt(f1*f1-4*t1*m1))/2/t1,x(d1)>"1e12"&&(d1=.5),x(l1)>"1e12"&&(l1=.5),d1>0&&d1<1&&(W=t0(h,g,A,E,O,j,K,H,d1),y1.push(W.x),h1.push(W.y)),l1>0&&l1<1&&(W=t0(h,g,A,E,O,j,K,H,l1),y1.push(W.x),h1.push(W.y)),{min:{x:d[C](0,y1),y:d[C](0,h1)},max:{x:U[C](0,y1),y:U[C](0,h1)}}}),pe=s._path2curve=C0(function(h,g){var A=!g&&$0(h);if(!g&&A.curve)return j1(A.curve);for(var E=se(h),O=g&&se(g),j={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},K={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},H=function(A1,x1,z1){var I1,$1;if(!A1)return["C",x1.x,x1.y,x1.x,x1.y,x1.x,x1.y];switch(!(A1[0]in{T:1,Q:1})&&(x1.qx=x1.qy=null),A1[0]){case"M":x1.X=A1[1],x1.Y=A1[2];break;case"A":A1=["C"][T](ge[C](0,[x1.x,x1.y][T](A1.slice(1))));break;case"S":z1=="C"||z1=="S"?(I1=2*x1.x-x1.bx,$1=2*x1.y-x1.by):(I1=x1.x,$1=x1.y),A1=["C",I1,$1][T](A1.slice(1));break;case"T":z1=="Q"||z1=="T"?(x1.qx=2*x1.x-x1.qx,x1.qy=2*x1.y-x1.qy):(x1.qx=x1.x,x1.qy=x1.y),A1=["C"][T](X1(x1.x,x1.y,x1.qx,x1.qy,A1[1],A1[2]));break;case"Q":x1.qx=A1[1],x1.qy=A1[2],A1=["C"][T](X1(x1.x,x1.y,A1[1],A1[2],A1[3],A1[4]));break;case"L":A1=["C"][T](l0(x1.x,x1.y,A1[1],A1[2]));break;case"H":A1=["C"][T](l0(x1.x,x1.y,A1[1],x1.y));break;case"V":A1=["C"][T](l0(x1.x,x1.y,x1.x,A1[1]));break;case"Z":A1=["C"][T](l0(x1.x,x1.y,x1.X,x1.Y))}return A1},W=function(A1,x1){if(A1[x1].length>7){A1[x1].shift();for(var z1=A1[x1];z1.length;)f1[x1]="A",O&&(m1[x1]="A"),A1.splice(x1++,0,["C"][T](z1.splice(0,6)));A1.splice(x1,1),y1=U(E.length,O&&O.length||0)}},t1=function(A1,x1,z1,I1,$1){A1&&x1&&A1[$1][0]=="M"&&x1[$1][0]!="M"&&(x1.splice($1,0,["M",I1.x,I1.y]),z1.bx=0,z1.by=0,z1.x=A1[$1][1],z1.y=A1[$1][2],y1=U(E.length,O&&O.length||0))},f1=[],m1=[],d1="",l1="",h1=0,y1=U(E.length,O&&O.length||0);h1.01;)D1=V1(t1,f1,m1,d1,l1,h1,y1,p1,A1+=(D1E){if(g&&!m1.start){if(f1+=["C"+(t1=e2(j,K,H[1],H[2],H[3],H[4],H[5],H[6],E-d1)).start.x,t1.start.y,t1.m.x,t1.m.y,t1.x,t1.y],O)return f1;m1.start=f1,f1=["M"+t1.x,t1.y+"C"+t1.n.x,t1.n.y,t1.end.x,t1.end.y,H[5],H[6]].join(),d1+=W,j=+H[5],K=+H[6];continue}if(!h&&!g)return{x:(t1=e2(j,K,H[1],H[2],H[3],H[4],H[5],H[6],E-d1)).x,y:t1.y,alpha:t1.alpha}}d1+=W,j=+H[5],K=+H[6]}f1+=H.shift()+H}return m1.end=f1,(t1=h?d1:g?m1:s.findDotsAtSegment(j,K,H[0],H[1],H[2],H[3],H[4],H[5],1)).alpha&&(t1={x:t1.x,y:t1.y,alpha:t1.alpha}),t1}},H2=t2(1),K2=t2(),r2=t2(0,1);s.getTotalLength=H2,s.getPointAtLength=K2,s.getSubpath=function(h,g,A){if(this.getTotalLength(h)-A<1e-6)return r2(h,g).end;var E=r2(h,A,1);return g?r2(E,g).end:E},Q1.getTotalLength=function(){var h=this.getPath();if(h)return this.node.getTotalLength?this.node.getTotalLength():H2(h)},Q1.getPointAtLength=function(h){var g=this.getPath();if(g)return K2(g,h)},Q1.getPath=function(){var h,g=s._getPath[this.type];if(this.type!="text"&&this.type!="set")return g&&(h=g(this)),h},Q1.getSubpath=function(h,g){var A=this.getPath();if(A)return s.getSubpath(A,h,g)};var ve=s.easing_formulas={linear:function(h){return h},"<":function(h){return P(h,1.7)},">":function(h){return P(h,.48)},"<>":function(h){var g=.48-h/1.04,A=X.sqrt(.1734+g*g),E=A-g,O=-A-g,j=P(x(E),1/3)*(E<0?-1:1)+P(x(O),1/3)*(O<0?-1:1)+.5;return 3*(1-j)*j*j+j*j*j},backIn:function(h){var g=1.70158;return h*h*((g+1)*h-g)},backOut:function(h){var g=1.70158;return(h-=1)*h*((g+1)*h+g)+1},elastic:function(h){return h==!!h?h:P(2,-10*h)*X.sin(2*F*(h-.075)/.3)+1},bounce:function(h){var g=7.5625,A=2.75;return h<1/A?g*h*h:h<2/A?g*(h-=1.5/A)*h+.75:h<2.5/A?g*(h-=2.25/A)*h+.9375:g*(h-=2.625/A)*h+.984375}};ve.easeIn=ve["ease-in"]=ve["<"],ve.easeOut=ve["ease-out"]=ve[">"],ve.easeInOut=ve["ease-in-out"]=ve["<>"],ve["back-in"]=ve.backIn,ve["back-out"]=ve.backOut;var Z1=[],G2=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(h){setTimeout(h,16)},n2=function(){for(var h=+new Date,g=0;g1&&!A.next){for(O in f1)f1[_](O)&&(l1[O]=A.totalOrigin[O]);A.el.attr(l1),yu(A.anim,A.el,A.anim.percents[0],null,A.totalOrigin,A.repeat-1)}A.next&&!A.stop&&yu(A.anim,A.el,A.next,null,A.totalOrigin,A.repeat)}}}Z1.length&&G2(n2)},u2=function(h){return h>255?255:h<0?0:h};function mu(h,g,A,E,O,j){var K=3*g,H=3*(E-g)-K,W=1-K-H,t1=3*A,f1=3*(O-A)-t1,m1=1-t1-f1;function d1(l1){return((W*l1+H)*l1+K)*l1}return function(l1,h1){var y1=function(p1,c1){var D1,g1,A1,x1,z1,I1;for(A1=p1,I1=0;I1<8;I1++){if(x1=d1(A1)-p1,x(x1)g1)return g1;for(;D1x1?D1=A1:g1=A1,A1=(g1-D1)/2+D1}return A1}(l1,h1);return((m1*y1+f1)*y1+t1)*y1}(h,1/(200*j))}function U6(h,g){var A=[],E={};if(this.ms=g,this.times=1,h){for(var O in h)h[_](O)&&(E[p(O)]=h[O],A.push(p(O)));A.sort(N1)}this.anim=E,this.top=A[A.length-1],this.percents=A}function yu(h,g,A,E,O,j){A=p(A);var K,H,W,t1,f1,m1,d1=h.ms,l1={},h1={},y1={};if(E)for(c1=0,D1=Z1.length;c1E*h.top){A=h.percents[c1],f1=h.percents[c1-1]||0,d1=d1/h.top*(A-f1),t1=h.percents[c1+1],K=h.anim[A];break}E&&g.attr(h.anim[h.percents[c1]])}if(K){if(H)H.initstatus=E,H.start=new Date-H.ms*E;else{for(var g1 in K)if(K[_](g1)&&(G[_](g1)||g.paper.customAttributes[_](g1)))switch(l1[g1]=g.attr(g1),l1[g1]==null&&(l1[g1]=V[g1]),h1[g1]=K[g1],G[g1]){case D:y1[g1]=(h1[g1]-l1[g1])/d1;break;case"colour":l1[g1]=s.getRGB(l1[g1]);var A1=s.getRGB(h1[g1]);y1[g1]={r:(A1.r-l1[g1].r)/d1,g:(A1.g-l1[g1].g)/d1,b:(A1.b-l1[g1].b)/d1};break;case"path":var x1=pe(l1[g1],h1[g1]),z1=x1[1];for(l1[g1]=x1[0],y1[g1]=[],c1=0,D1=l1[g1].length;c1H&&(H=t1)}!h[H+="%"].callback&&(h[H].callback=E)}return new U6(h,g)},Q1.animate=function(h,g,A,E){if(this.removed)return E&&E.call(this),this;var O=h instanceof U6?h:s.animation(h,g,A,E);return yu(O,this,O.percents[0],null,this.attr()),this},Q1.setTime=function(h,g){return h&&g!=null&&this.status(h,d(g,h.ms)/h.ms),this},Q1.status=function(h,g){var A,E,O=[],j=0;if(g!=null)return yu(h,this,-1,d(g,1)),this;for(A=Z1.length;j1)for(var Y=0,J=$.length;Y.5)-1;M(p-.5,2)+M(I-.5,2)>.25&&(I=v.sqrt(.25-M(p-.5,2))*O1+.5)&&I!=.5&&(I=I.toFixed(5)-1e-5*O1)}return C})).split(/\s*\-\s*/),m=="linear"){var u1=f.shift();if(u1=-c(u1),isNaN(u1))return null;var a1=[0,0,v.cos(o.rad(u1)),v.sin(o.rad(u1))],B1=1/(w(_(a1[2]),_(a1[3]))||1);a1[2]*=B1,a1[3]*=B1,a1[2]<0&&(a1[0]=-a1[2],a1[2]=0),a1[3]<0&&(a1[1]=-a1[3],a1[3]=0)}var b1=o._parseDots(f);if(!b1)return null;if(B=B.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&B!=b.gradient.id&&(V.defs.removeChild(b.gradient),delete b.gradient),!b.gradient){r1=J(m+"Gradient",{id:B}),b.gradient=r1,J(r1,m=="radial"?{fx:p,fy:I}:{x1:a1[0],y1:a1[1],x2:a1[2],y2:a1[3],gradientTransform:b.matrix.invert()}),V.defs.appendChild(r1);for(var w1=0,L1=b1.length;w11?k1.opacity/100:k1.opacity});case"stroke":k1=o.getRGB(L),m.setAttribute(I,k1.hex),I=="stroke"&&k1[s]("opacity")&&J(m,{"stroke-opacity":k1.opacity>1?k1.opacity/100:k1.opacity}),I=="stroke"&&b._.arrows&&("startString"in b._.arrows&&S(b,b._.arrows.startString),"endString"in b._.arrows&&S(b,b._.arrows.endString,1));break;case"gradient":(b.type=="circle"||b.type=="ellipse"||l(L).charAt()!="r")&&e1(b,L);break;case"opacity":B.gradient&&!B[s]("stroke-opacity")&&J(m,{"stroke-opacity":L>1?L/100:L});case"fill-opacity":if(B.gradient){(O1=o._g.doc.getElementById(m.getAttribute("fill").replace(/^url\(#|\)$/g,C)))&&(S1=O1.getElementsByTagName("stop"),J(S1[S1.length-1],{"stop-opacity":L}));break}default:I=="font-size"&&(L=y(L,10)+"px");var e0=I.replace(/(\-.)/g,function(U1){return U1.substring(1).toUpperCase()});m.style[e0]=L,b._.dirty=1,m.setAttribute(I,L)}}x(b,f),m.style.visibility=p},x=function(b,f){if(b.type=="text"&&(f[s]("text")||f[s]("font")||f[s]("font-size")||f[s]("x")||f[s]("y"))){var m=b.attrs,B=b.node,p=B.firstChild?y(o._g.doc.defaultView.getComputedStyle(B.firstChild,C).getPropertyValue("font-size"),10):10;if(f[s]("text")){for(m.text=f.text;B.firstChild;)B.removeChild(B.firstChild);for(var I,L=l(f.text).split(` +`),V=[],G=0,r1=L.length;G"));var u0=ee.getBoundingClientRect();G.W=p.w=(u0.right-u0.left)/100,G.H=p.h=(u0.bottom-u0.top)/100,G.X=p.x,G.Y=p.y+G.H/2,("x"in m||"y"in m)&&(G.path.v=o.format("m{0},{1}l{2},{1}",v(p.x*i1),v(p.y*i1),v(p.x*i1)+1));for(var de=["x","y","text","font","font-family","font-weight","font-style","font-size"],i0=0,m0=de.length;i0.25&&(w1=y.sqrt(.25-p(b1-.5,2))*(2*(w1>.5)-1)+.5),L=b1+C+w1),T})).split(/\s*\-\s*/),I=="linear"){var V=m.shift();if(V=-c(V),isNaN(V))return null}var G=o._parseDots(m);if(!G)return null;if(f=f.shape||f.node,G.length){f.removeChild(B),B.on=!0,B.method="none",B.color=G[0].color,B.color2=G[G.length-1].color;for(var r1=[],u1=0,a1=G.length;u1')}}catch{d=function(p){return m.createElement("<"+p+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},o._engine.initWin(o._g.win),o._engine.create=function(){var f=o._getContainer.apply(0,arguments),m=f.container,B=f.height,p=f.width,I=f.x,L=f.y;if(!m)throw new Error("VML container not found.");var V=new o._Paper,G=V.canvas=o._g.doc.createElement("div"),r1=G.style;return I=I||0,L=L||0,p=p||512,B=B||342,V.width=p,V.height=B,p==+p&&(p+="px"),B==+B&&(B+="px"),V.coordsize=216e5+C+216e5,V.coordorigin="0 0",V.span=o._g.doc.createElement("span"),V.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",G.appendChild(V.span),r1.cssText=o.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",p,B),m==1?(o._g.doc.body.appendChild(G),r1.left=I+"px",r1.top=L+"px",r1.position="absolute"):m.firstChild?m.insertBefore(G,m.firstChild):m.appendChild(G),V.renderfix=function(){},V},o.prototype.clear=function(){o.eve("raphael.clear",this),this.canvas.innerHTML=T,this.span=o._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},o.prototype.remove=function(){for(var f in o.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[f]=typeof this[f]=="function"?o._removedFactory(f):null;return!0};var q=o.st;for(var b in R)R[s](b)&&!q[s](b)&&(q[b]=function(f){return function(){var m=arguments;return this.forEach(function(B){B[f].apply(B,m)})}}(b))}}).apply(n,i))===void 0||(r.exports=a)}])})})(am);var ZN=am.exports,eM=ZN;function tM(t){var e=document.createElement("div");e.style.borderRadius="50px",e.style.overflow="hidden",e.style.padding="0px",e.style.margin="0px",e.style.width=""+t+"px",e.style.height=""+t+"px",e.style.display="inline-block";var r=eM(e,100,100);return{paper:r,container:e}}var rM=tM,om={exports:{}};(function(t){var e=function(){function r(s,l,c,y){typeof l=="object"&&(c=l.depth,y=l.prototype,l.filter,l=l.circular);var v=[],w=[],_=typeof Buffer<"u";typeof l>"u"&&(l=!0),typeof c>"u"&&(c=1/0);function M(N,k){if(N===null)return null;if(k==0)return N;var C,T;if(typeof N!="object")return N;if(r.__isArray(N))C=[];else if(r.__isRegExp(N))C=new RegExp(N.source,o(N)),N.lastIndex&&(C.lastIndex=N.lastIndex);else if(r.__isDate(N))C=new Date(N.getTime());else{if(_&&Buffer.isBuffer(N))return Buffer.allocUnsafe?C=Buffer.allocUnsafe(N.length):C=new Buffer(N.length),N.copy(C),C;typeof y>"u"?(T=Object.getPrototypeOf(N),C=Object.create(T)):(C=Object.create(y),T=y)}if(l){var z=v.indexOf(N);if(z!=-1)return w[z];v.push(N),w.push(C)}for(var $ in N){var Y;T&&(Y=Object.getOwnPropertyDescriptor(T,$)),!(Y&&Y.set==null)&&(C[$]=M(N[$],k-1))}return C}return M(s,c)}r.clonePrototype=function(l){if(l===null)return null;var c=function(){};return c.prototype=l,new c};function n(s){return Object.prototype.toString.call(s)}r.__objToStr=n;function u(s){return typeof s=="object"&&n(s)==="[object Date]"}r.__isDate=u;function i(s){return typeof s=="object"&&n(s)==="[object Array]"}r.__isArray=i;function a(s){return typeof s=="object"&&n(s)==="[object RegExp]"}r.__isRegExp=a;function o(s){var l="";return s.global&&(l+="g"),s.ignoreCase&&(l+="i"),s.multiline&&(l+="m"),l}return r.__getRegExpFlags=o,r}();t.exports&&(t.exports=e)})(om);var nM=om.exports,sm={exports:{}},uM={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},E2=uM,lm={};for(var Xo in E2)E2.hasOwnProperty(Xo)&&(lm[E2[Xo]]=Xo);var M1=sm.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var Je in M1)if(M1.hasOwnProperty(Je)){if(!("channels"in M1[Je]))throw new Error("missing channels property: "+Je);if(!("labels"in M1[Je]))throw new Error("missing channel labels property: "+Je);if(M1[Je].labels.length!==M1[Je].channels)throw new Error("channel and label counts mismatch: "+Je);var iM=M1[Je].channels,aM=M1[Je].labels;delete M1[Je].channels,delete M1[Je].labels,Object.defineProperty(M1[Je],"channels",{value:iM}),Object.defineProperty(M1[Je],"labels",{value:aM})}M1.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,u=Math.min(e,r,n),i=Math.max(e,r,n),a=i-u,o,s,l;return i===u?o=0:e===i?o=(r-n)/a:r===i?o=2+(n-e)/a:n===i&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360),l=(u+i)/2,i===u?s=0:l<=.5?s=a/(i+u):s=a/(2-i-u),[o,s*100,l*100]};M1.rgb.hsv=function(t){var e,r,n,u,i,a=t[0]/255,o=t[1]/255,s=t[2]/255,l=Math.max(a,o,s),c=l-Math.min(a,o,s),y=function(v){return(l-v)/6/c+1/2};return c===0?u=i=0:(i=c/l,e=y(a),r=y(o),n=y(s),a===l?u=n-r:o===l?u=1/3+e-n:s===l&&(u=2/3+r-e),u<0?u+=1:u>1&&(u-=1)),[u*360,i*100,l*100]};M1.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],u=M1.rgb.hsl(t)[0],i=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[u,i*100,n*100]};M1.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,u,i,a,o;return o=Math.min(1-e,1-r,1-n),u=(1-e-o)/(1-o)||0,i=(1-r-o)/(1-o)||0,a=(1-n-o)/(1-o)||0,[u*100,i*100,a*100,o*100]};function oM(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}M1.rgb.keyword=function(t){var e=lm[t];if(e)return e;var r=1/0,n;for(var u in E2)if(E2.hasOwnProperty(u)){var i=E2[u],a=oM(t,i);a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var u=e*.4124+r*.3576+n*.1805,i=e*.2126+r*.7152+n*.0722,a=e*.0193+r*.1192+n*.9505;return[u*100,i*100,a*100]};M1.rgb.lab=function(t){var e=M1.rgb.xyz(t),r=e[0],n=e[1],u=e[2],i,a,o;return r/=95.047,n/=100,u/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,i=116*n-16,a=500*(r-n),o=200*(n-u),[i,a,o]};M1.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,u,i,a,o,s;if(r===0)return s=n*255,[s,s,s];n<.5?i=n*(1+r):i=n+r-n*r,u=2*n-i,o=[0,0,0];for(var l=0;l<3;l++)a=e+1/3*-(l-1),a<0&&a++,a>1&&a--,6*a<1?s=u+(i-u)*6*a:2*a<1?s=i:3*a<2?s=u+(i-u)*(2/3-a)*6:s=u,o[l]=s*255;return o};M1.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,u=r,i=Math.max(n,.01),a,o;return n*=2,r*=n<=1?n:2-n,u*=i<=1?i:2-i,o=(n+r)/2,a=n===0?2*u/(i+u):2*r/(n+r),[e,a*100,o*100]};M1.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,u=Math.floor(e)%6,i=e-Math.floor(e),a=255*n*(1-r),o=255*n*(1-r*i),s=255*n*(1-r*(1-i));switch(n*=255,u){case 0:return[n,s,a];case 1:return[o,n,a];case 2:return[a,n,s];case 3:return[a,o,n];case 4:return[s,a,n];case 5:return[n,a,o]}};M1.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,u=Math.max(n,.01),i,a,o;return o=(2-r)*n,i=(2-r)*u,a=r*u,a/=i<=1?i:2-i,a=a||0,o/=2,[e,a*100,o*100]};M1.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,u=r+n,i,a,o,s;u>1&&(r/=u,n/=u),i=Math.floor(6*e),a=1-n,o=6*e-i,i&1&&(o=1-o),s=r+o*(a-r);var l,c,y;switch(i){default:case 6:case 0:l=a,c=s,y=r;break;case 1:l=s,c=a,y=r;break;case 2:l=r,c=a,y=s;break;case 3:l=r,c=s,y=a;break;case 4:l=s,c=r,y=a;break;case 5:l=a,c=r,y=s;break}return[l*255,c*255,y*255]};M1.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,u=t[3]/100,i,a,o;return i=1-Math.min(1,e*(1-u)+u),a=1-Math.min(1,r*(1-u)+u),o=1-Math.min(1,n*(1-u)+u),[i*255,a*255,o*255]};M1.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,u,i,a;return u=e*3.2406+r*-1.5372+n*-.4986,i=e*-.9689+r*1.8758+n*.0415,a=e*.0557+r*-.204+n*1.057,u=u>.0031308?1.055*Math.pow(u,1/2.4)-.055:u*12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,u=Math.min(Math.max(0,u),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[u*255,i*255,a*255]};M1.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],u,i,a;return e/=95.047,r/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,u=116*r-16,i=500*(e-r),a=200*(r-n),[u,i,a]};M1.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],u,i,a;i=(e+16)/116,u=r/500+i,a=i-n/200;var o=Math.pow(i,3),s=Math.pow(u,3),l=Math.pow(a,3);return i=o>.008856?o:(i-16/116)/7.787,u=s>.008856?s:(u-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,u*=95.047,i*=100,a*=108.883,[u,i,a]};M1.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],u,i,a;return u=Math.atan2(n,r),i=u*360/2/Math.PI,i<0&&(i+=360),a=Math.sqrt(r*r+n*n),[e,a,i]};M1.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],u,i,a;return a=n/360*2*Math.PI,u=r*Math.cos(a),i=r*Math.sin(a),[e,u,i]};M1.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],u=1 in arguments?arguments[1]:M1.rgb.hsv(t)[2];if(u=Math.round(u/50),u===0)return 30;var i=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return u===2&&(i+=60),i};M1.hsv.ansi16=function(t){return M1.rgb.ansi16(M1.hsv.rgb(t),t[2])};M1.rgb.ansi256=function(t){var e=t[0],r=t[1],n=t[2];if(e===r&&r===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var u=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5);return u};M1.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,n=(e&1)*r*255,u=(e>>1&1)*r*255,i=(e>>2&1)*r*255;return[n,u,i]};M1.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,n=Math.floor(t/36)/5*255,u=Math.floor((r=t%36)/6)/5*255,i=r%6/5*255;return[n,u,i]};M1.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};M1.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(o){return o+o}).join(""));var n=parseInt(r,16),u=n>>16&255,i=n>>8&255,a=n&255;return[u,i,a]};M1.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,u=Math.max(Math.max(e,r),n),i=Math.min(Math.min(e,r),n),a=u-i,o,s;return a<1?o=i/(1-a):o=0,a<=0?s=0:u===e?s=(r-n)/a%6:u===r?s=2+(n-e)/a:s=4+(e-r)/a+4,s/=6,s%=1,[s*360,a*100,o*100]};M1.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1,u=0;return r<.5?n=2*e*r:n=2*e*(1-r),n<1&&(u=(r-.5*n)/(1-n)),[t[0],n*100,u*100]};M1.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=e*r,u=0;return n<1&&(u=(r-n)/(1-n)),[t[0],n*100,u*100]};M1.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];var u=[0,0,0],i=e%1*6,a=i%1,o=1-a,s=0;switch(Math.floor(i)){case 0:u[0]=1,u[1]=a,u[2]=0;break;case 1:u[0]=o,u[1]=1,u[2]=0;break;case 2:u[0]=0,u[1]=1,u[2]=a;break;case 3:u[0]=0,u[1]=o,u[2]=1;break;case 4:u[0]=a,u[1]=0,u[2]=1;break;default:u[0]=1,u[1]=0,u[2]=o}return s=(1-r)*n,[(r*u[0]+s)*255,(r*u[1]+s)*255,(r*u[2]+s)*255]};M1.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e),u=0;return n>0&&(u=e/n),[t[0],u*100,n*100]};M1.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,n=r*(1-e)+.5*e,u=0;return n>0&&n<.5?u=e/(2*n):n>=.5&&n<1&&(u=e/(2*(1-n))),[t[0],u*100,n*100]};M1.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};M1.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1-r,u=n-e,i=0;return u<1&&(i=(n-u)/(1-u)),[t[0],u*100,i*100]};M1.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};M1.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};M1.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};M1.gray.hsl=M1.gray.hsv=function(t){return[0,0,t[0]]};M1.gray.hwb=function(t){return[0,100,t[0]]};M1.gray.cmyk=function(t){return[0,0,0,t[0]]};M1.gray.lab=function(t){return[t[0],0,0]};M1.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,n=r.toString(16).toUpperCase();return"000000".substring(n.length)+n};M1.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]};var fm=sm.exports,la=fm;function sM(){for(var t={},e=Object.keys(la),r=e.length,n=0;n1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function mM(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var n=t(r);if(typeof n=="object")for(var u=n.length,i=0;ir?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){return this.values.hsl[2]+=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},darken:function(t){return this.values.hsl[2]-=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},saturate:function(t){return this.values.hsl[1]+=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},desaturate:function(t){return this.values.hsl[1]-=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},whiten:function(t){return this.values.hwb[1]+=this.values.hwb[1]*t,this.setValues("hwb",this.values.hwb),this},blacken:function(t){return this.values.hwb[2]+=this.values.hwb[2]*t,this.setValues("hwb",this.values.hwb),this},greyscale:function(){var t=this.values.rgb,e=t[0]*.3+t[1]*.59+t[2]*.11;return this.setValues("rgb",[e,e,e]),this},clearer:function(t){return this.setValues("alpha",this.values.alpha-this.values.alpha*t),this},opaquer:function(t){return this.setValues("alpha",this.values.alpha+this.values.alpha*t),this},rotate:function(t){var e=this.values.hsl[0];return e=(e+t)%360,e=e<0?360+e:e,this.values.hsl[0]=e,this.setValues("hsl",this.values.hsl),this},mix:function(t,e){var r=this,n=t,u=e===void 0?.5:e,i=2*u-1,a=r.alpha()-n.alpha(),o=((i*a===-1?i:(i+a)/(1+i*a))+1)/2,s=1-o;return this.rgb(o*r.red()+s*n.red(),o*r.green()+s*n.green(),o*r.blue()+s*n.blue()).alpha(r.alpha()*u+n.alpha()*(1-u))},toJSON:function(){return this.rgb()},clone:function(){var t=new D6;return t.values=kM(this.values),t}};D6.prototype.getValues=function(t){for(var e={},r=0;r{const n=n1.useRef(null);return n1.useEffect(()=>{if(t&&n.current){const u=parseInt(t.slice(2,10),16),i=$M(e,u);n.current.innerHTML="",n.current.appendChild(i)}},[t,e]),Q.jsx("div",{...r,ref:n})},{useChainId:HM}=Ut;function KM({account:t,networkName:e,changeConnectedAccount:r,changeToNodeChain:n}){const u=HM(),i=s=>`${s.substring(0,6)}...${s.substring(s.length-4)}`,a=s=>{switch(s){case"Ethereum":return Q.jsx("img",{className:"network-icon",src:QN,alt:s});case"Optimism":return Q.jsx("img",{className:"network-icon",src:im,alt:s});case"Arbitrum":return Q.jsx("img",{className:"network-icon",src:JN,alt:s});case"Sepolia":return Q.jsx("img",{className:"network-icon",src:um,alt:s});default:return Q.jsx("img",{className:"network-icon",src:YN,alt:s})}},o=n1.useCallback(()=>{window.alert(`The KNS Contract Address is: ${zu[u||""]||"unavailable on "+e}`)},[u,e]);return Q.jsxs("div",{className:"flex gap-4",children:[Q.jsxs("button",{onClick:r,className:"font-mono clear flex place-items-center max-w-1/3",children:[Q.jsx(qM,{address:t||"",diameter:24,className:"mr-4"})," ",i(t||"")]}),Q.jsxs("button",{onClick:n,className:"clear max-w-1/3 z-10",children:[a(e),Q.jsx("div",{className:"ml-2",children:e})]}),Q.jsx("button",{onClick:o,className:"clear max-w-1/3",children:"KNS Contract"})]})}var ym={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var i="",a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function QM(t,e){if(t==null)return{};var r={},n=Object.keys(t),u,i;for(i=0;i=0)&&(r[u]=t[u]);return r}function fa(){return fa=Object.assign?Object.assign.bind():function(t){for(var e=1;eG6.createElement(e.tag,ca({key:r},e.attr),xm(e.child)))}function vm(t){return e=>G6.createElement(ZM,fa({attr:ca({},t.attr)},e),xm(t.child))}function ZM(t){var e=r=>{var{attr:n,size:u,title:i}=t,a=WM(t,VM),o=u||r.size||"1em",s;return r.className&&(s=r.className),t.className&&(s=(s?s+" ":"")+t.className),G6.createElement("svg",fa({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:s,style:ca(ca({color:t.color||r.color},r.style),t.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),i&&G6.createElement("title",null,i),t.children)};return _c!==void 0?G6.createElement(_c.Consumer,null,r=>e(r)):e(gm)}function eU(t){return vm({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M80 160c0-35.3 28.7-64 64-64h32c35.3 0 64 28.7 64 64v3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74V320c0 17.7 14.3 32 32 32s32-14.3 32-32v-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7V160c0-70.7-57.3-128-128-128H144C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"},child:[]}]})(t)}function tU(t){return vm({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"},child:[]}]})(t)}const z2=({text:t,button:e,className:r,position:n})=>{const[u,i]=n1.useState(!1);return Q.jsxs("div",{className:Lr("flex place-items-center place-content-center text-sm relative cursor-pointer shrink",r),children:[Q.jsx("div",{onClick:()=>i(!u),children:e||Q.jsx("button",{className:"icon ml-4",type:"button",children:Q.jsx(eU,{})})}),Q.jsx("div",{className:Lr("absolute rounded bg-black p-2 min-w-[200px] z-10",{"!hidden":!u,"top-8":n==="top"||!n,"bottom-8":n==="bottom","right-8":n==="left","left-8":n==="right"}),children:t}),Q.jsx("button",{type:"button",className:Lr("absolute bg-black icon right-0 top-0",{"!hidden":!u}),onClick:()=>i(!1),children:Q.jsx(tU,{})})]})},cl=()=>window.innerWidth<=600,{useIsActivating:rU,useChainId:nU}=Ut;function fr({header:t,closeConnect:e,nodeChainId:r,hideConnect:n=!1}){const{account:u,isActive:i}=ka.useWeb3React(),a=rU(),o=nU(),[s,l]=n1.useState("");n1.useEffect(()=>{l(Q6((o||1).toString()))},[o]);const c=n1.useCallback(async()=>{e(),await q4.activate().catch(()=>{});try{M2(r)}catch(_){console.error(_)}},[e,r]),y=n1.useCallback(async()=>{if(o){if("0x"+o.toString(16)===r)return alert(`You are already connected to ${Q6(o.toString())}`);try{M2(r)}catch(M){console.error(M)}}},[o,r]),v=n1.useCallback(async()=>{alert("You can change your connected account in your wallet.")},[]),w=cl();return Q.jsx(Q.Fragment,{children:Q.jsxs("div",{id:"signup-form-header",className:"flex flex-col",children:[(r===y2||r===Rr)&&Q.jsx(z2,{position:"left",className:Lr("!absolute z-10",{"top-8 right-8":!w,"top-2 right-2":w}),button:r===y2?Q.jsx("img",{alt:"sepolia",className:"network-icon",src:um}):r===Rr?Q.jsx("img",{alt:"optimism",className:"network-icon",src:im}):null,text:r===y2?'Your Kinode is currently pointed at Sepolia. To point at Optimism, boot without the "--testnet" flag.':r===Rr?'Your Kinode is currently pointed at Optimism. To point at Sepolia, boot with the "--testnet" flag.':""}),Q.jsx("div",{className:"flex flex-col gap-4 c",children:t}),!n&&Q.jsx("div",{className:"flex c w-[99vw] mb-8 absolute top-2 left-2",children:i&&u?Q.jsx(KM,{account:u,networkName:s,changeToNodeChain:y,changeConnectedAccount:v}):Q.jsxs("div",{className:"flex flex-col gap-8 my-4",children:[Q.jsxs("h5",{className:Lr("flex c",{"flex-wrap text-center max-w-3/4 gap-2":w}),children:[!a&&"You must connect to a browser wallet to continue.",a?Q.jsx(sr,{msg:"Approve connection in your wallet"}):Q.jsx("button",{onClick:c,className:"ml-2",children:" Connect Wallet "})]}),r===y2&&Q.jsxs("h5",{className:"text-center max-w-[450px] leading-6 flex c",children:["Kinode is currently on the Sepolia Testnet.",Q.jsx("a",{href:"https://sepoliafaucet.com/",target:"_blank",rel:"noreferrer",className:"button alt ml-2",children:"Get Testnet ETH"})]})]})})]})})}function hu(t){const e=t.split(".");if(e.length!==4)throw new Error("Invalid IP address");let r=0;for(let n=0;n<4;n++)r<<=8,r+=parseInt(e[n],10);return r>>>0}const uU=()=>Q.jsx(z2,{text:"A direct node publishes its own networking information on-chain: IP, port, so on. An indirect node relies on the service of routers, which are themselves direct nodes. Only register a direct node if you know what you’re doing and have a public, static IP address."});function pu({direct:t,setDirect:e}){return Q.jsxs("div",{className:"flex place-items-center",children:[Q.jsxs("div",{className:"relative flex place-items-center mr-2",children:[Q.jsx("input",{type:"checkbox",id:"direct",name:"direct",checked:t,onChange:r=>e(r.target.checked),autoFocus:!0}),t&&Q.jsx("span",{onClick:()=>e(!1),className:"checkmark",children:"✓"})]}),Q.jsx("label",{htmlFor:"direct",className:"flex place-items-center cursor-pointer",children:"Register as a direct node. If you are unsure leave unchecked."}),Q.jsx(uU,{})]})}const iU="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20width='779'%20height='514'%20viewBox='0%200%20779%20514'%20fill='none'%20version='1.1'%20id='svg2'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%20id='defs2'%20/%3e%3cpath%20d='M753.092%205.91932C756.557%205.09976%20755.962%20-0.00012207%20752.401%20-0.00012207H426.001C424.755%20-0.00012207%20423.639%200.77027%20423.197%201.93535L236.968%20492.6C235.729%20495.865%20240.123%20498.255%20242.191%20495.441L569.357%2050.1132C569.778%2049.5392%20570.391%2049.1339%20571.084%2048.97L753.092%205.91932Z'%20fill='%23FFF5D9'%20id='path1'%20/%3e%3cpath%20d='M%2012.054907,40.2288%20C%209.0444768,38.777%2010.207772,34.4583%2013.582982,34.5557%20l%20411.845088,11.881%20c%202.17167,0.0626%203.63105,2.1382%202.85869,4.0656%20l%20-62.7457,156.4787%20c%20-0.66805,1.666%20-2.71117,2.415%20-4.38655,1.607%20z'%20fill='%23fff5d9'%20id='path2'%20style='stroke-width:1.0265'%20/%3e%3c/svg%3e",bu=({prefix:t,showLogo:e})=>{const r=cl();return Q.jsxs("div",{className:"mb-4 flex flex-col c",children:[Q.jsx("h1",{children:t}),e&&Q.jsxs(Q.Fragment,{children:[Q.jsxs("h1",{className:Lr("display",{"text-5xl mt-10 mb-8 ml-4":!r,"text-3xl mt-5 mb-4 ml-2":r}),children:["Kinode",Q.jsx("span",{className:"text-xs",children:"®"})]}),Q.jsx("img",{src:iU,className:Lr({"w-32 h-32":!r,"w-16 h-16":r})})]})]})},{useAccounts:aU}=Ut;function oU({direct:t,setDirect:e,setOsName:r,nameWrapper:n,ensRegistry:u,knsEnsEntry:i,kns:a,openConnect:o,provider:s,closeConnect:l,setNetworkingKey:c,setIpAddress:y,setPort:v,setRouters:w,nodeChainId:_}){let M=aU(),N=ir();const k=Q6(_),[C,T]=n1.useState(""),[z,$]=n1.useState(""),[Y,J]=n1.useState([]),[e1,i1]=n1.useState(!1);n1.useEffect(()=>{document.title="Register"},[]),n1.useEffect(()=>i1(!e1),[s]);const o1={name:z,setName:$,nameValidities:Y,setNameValidities:J,nameWrapper:n,ensRegistry:u,triggerNameCheck:e1};let S=n1.useCallback(async X=>{if(X.preventDefault(),X.stopPropagation(),!s)return o();try{T("Please confirm the transaction in your wallet");const{networking_key:U,ws_routing:[d,x],allowed_routers:P}=await fetch("/generate-networking-info",{method:"POST"}).then(p=>p.json()),F=hu(d);c(U),y(F),v(x),w(P);const D=z.trim().replace(".eth",""),R=_===Rr?ra:_;try{await M2(R)}catch{throw window.alert(`You must connect to the ${Q6(R)} network to continue. Please connect and try again.`),new Error(`${Q6(R)} not connected`)}const q=[t?(await a.populateTransaction.setAllIp(ft(`${D}.eth`),F,x,0,0,0)).data:(await a.populateTransaction.setRouters(ft(`${D}.eth`),P.map(p=>ft(p)))).data,(await a.populateTransaction.setKey(ft(`${D}.eth`),U)).data];T("Please confirm the transaction in your wallet");const b=Pb(`${D}.eth`),f=Gi(`${D}.eth`),m=await i.setKNSRecords(b,q,{gasLimit:3e5}),B=(p,I)=>{p===f&&(a.off("NodeRegistered",B),T(""),r(`${D}.eth`),N("/set-password"))};await M2(_),T(`Registering ${D}.eth on Kinode... this may take a few minutes.`),a.on("NodeRegistered",B),await m.wait()}catch(U){console.error("Registration Error:",U),T(""),alert("There was an error linking your ENS name, please try again.")}},[z,t,M,a,N,r,s,o,c,y,v,w,_,k]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(fr,{header:Q.jsx(bu,{prefix:"Register via ENS"}),openConnect:o,closeConnect:l,nodeChainId:_===Rr?ra:_}),!!s&&Q.jsx("form",{id:"signup-form",className:"flex flex-col",onSubmit:S,children:C?Q.jsx(sr,{msg:C}):Q.jsxs(Q.Fragment,{children:[Q.jsxs("h3",{className:"w-full flex flex-col c mb-2",children:[Q.jsx("label",{className:"flex leading-6 mb-2",children:"Set up your Kinode with a .eth name"}),Q.jsx(VN,{...o1})]}),Q.jsx(pu,{direct:t,setDirect:e}),Q.jsx("button",{disabled:Y.length!==0,type:"submit",className:"mt-2",children:"Register .eth name"})]})})]})}function dl({name:t,setName:e,nameValidities:r,setNameValidities:n,dotOs:u,triggerNameCheck:i,isReset:a=!1}){const o="Name must be a valid URL without subdomains (A-Z, a-z, 0-9, and punycode)",s="Name must be 9 characters or more",l="Name is already claimed",c="Unsupported punycode character",y=n1.useRef(null);n1.useEffect(()=>{a||(y.current&&clearTimeout(y.current),y.current=setTimeout(async()=>{let w,_=[...r];const M=[...t].length;w=_.indexOf(s),M<9&&M!==0?w===-1&&_.push(s):w!==-1&&_.splice(w,1);let N;w=_.indexOf(c);try{N=sl(t+".os"),w!==-1&&_.splice(w,1)}catch{w===-1&&_.push(c)}if(N!==void 0&&(w=_.indexOf(o),t!==""&&!nl(N)?w===-1&&_.push(o):w!==-1&&_.splice(w,1),w=_.indexOf(l),_.length===0||w!==-1))try{await u.ownerOf(Gi(N)),w===-1&&_.push(l)}catch{w!==-1&&_.splice(w,1)}n(_)},500))},[t,i,a]);const v=w=>w.target.value.indexOf(".")===-1&&e(w.target.value);return Q.jsxs("div",{className:"flex flex-col w-full place-items-center place-content-center",children:[Q.jsxs("div",{className:"flex w-full place-items-center",children:[Q.jsx("input",{value:t,onChange:v,type:"text",required:!0,name:"dot-os-name",placeholder:"e.g. myname",className:"grow"}),Q.jsx("div",{className:"ml-2 text-lg",children:".os"})]}),r.map((w,_)=>Q.jsxs("div",{children:[Q.jsx("br",{}),Q.jsx("span",{className:"text-red-500",children:w})]},_))]})}const{useAccounts:sU}=Ut;function lU({direct:t,setDirect:e,setOsName:r,dotOs:n,kns:u,openConnect:i,provider:a,closeConnect:o,setNetworkingKey:s,setIpAddress:l,setPort:c,setRouters:y,nodeChainId:v}){let w=sU(),_=ir();const M=Q6(v),[N,k]=n1.useState(""),[C,T]=n1.useState(""),[z,$]=n1.useState([]),[Y,J]=n1.useState(!1);n1.useEffect(()=>{document.title="Register"},[]),n1.useEffect(()=>J(!Y),[a]);const e1={name:C,setName:T,nameValidities:z,setNameValidities:$,dotOs:n,triggerNameCheck:Y};let i1=n1.useCallback(async o1=>{if(o1.preventDefault(),o1.stopPropagation(),!a)return i();try{k("Please confirm the transaction in your wallet");const{networking_key:S,ws_routing:[X,U],allowed_routers:d}=await fetch("/generate-networking-info",{method:"POST"}).then(R=>R.json()),x=hu(X);s(S),l(x),c(U),y(d);const P=[t?(await u.populateTransaction.setAllIp(ft(`${C}.os`),x,U,0,0,0)).data:(await u.populateTransaction.setRouters(ft(`${C}.os`),d.map(R=>ft(R)))).data,(await u.populateTransaction.setKey(ft(`${C}.os`),S)).data];k("Please confirm the transaction in your wallet");try{await M2(v)}catch{throw window.alert(`You must connect to the ${M} network to continue. Please connect and try again.`),new Error(`${M} not set`)}const F=Pb(`${C}.os`),D=await n.register(F,w[0],P);k("Registering KNS ID..."),await D.wait(),k(""),r(`${C}.os`),_("/set-password")}catch(S){console.error("Registration Error:",S),k(""),alert("There was an error registering your dot-os-name, please try again.")}},[C,t,w,n,u,_,r,a,i,s,l,c,y,v,M]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(fr,{header:Q.jsx("h1",{className:"flex place-content-center place-items-center mb-4",children:"Register Kinode Name (KNS)"}),openConnect:i,closeConnect:o,nodeChainId:v}),!!a&&Q.jsx("form",{id:"signup-form",className:"flex flex-col w-full max-w-[450px]",onSubmit:i1,children:N?Q.jsx(sr,{msg:N}):Q.jsxs(Q.Fragment,{children:[Q.jsxs("h3",{className:"flex flex-col w-full place-items-center my-8",children:[Q.jsxs("label",{className:"flex leading-6 place-items-center mt-2 cursor-pointer mb-2",children:["Choose a name for your kinode",Q.jsx(z2,{text:"Kinodes use a .os name in order to identify themselves to other nodes in the network."})]}),Q.jsx(dl,{...e1})]}),Q.jsx(pu,{direct:t,setDirect:e}),Q.jsx("button",{disabled:z.length!==0,type:"submit",className:"mt-2",children:"Register .os name"}),Q.jsx(v4,{to:"/reset",className:"flex self-stretch mt-2",children:Q.jsx("button",{className:"clear grow",children:"already have a dot-os-name?"})})]})})]})}var e3={};const{useAccounts:fU,useProvider:cU}=Ut;function dU({direct:t,setDirect:e,setOsName:r,dotOs:n,openConnect:u,setNetworkingKey:i,setIpAddress:a,setPort:o,setRouters:s,closeConnect:l,nodeChainId:c}){const y=fU(),v=cU(),w=ir(),[_,M]=n1.useState(!1),[N,k]=n1.useState(""),[C,T]=n1.useState(!1),[z,$]=n1.useState(""),[Y,J]=n1.useState(""),[e1,i1]=n1.useState(""),[o1,S]=n1.useState([]);n1.useEffect(()=>{document.title="Claim Invite"},[]),n1.useEffect(()=>T(!C),[v]),n1.useEffect(()=>{(async()=>{if(z!==""){const d=e3.REACT_APP_INVITE_GET+z,x=await fetch(d,{method:"GET"});x.status===200?J(""):J(await x.text())}})()},[z]);let X=async d=>{if(d.preventDefault(),d.stopPropagation(),!v)return u();const{networking_key:x,ws_routing:[P,F],allowed_routers:D}=await fetch("/generate-networking-info",{method:"POST"}).then(p=>p.json()),R=hu(P);if(i(x),a(R),o(F),s(D),o1.length!==0||Y!=="")return;if(!e1||!z)return window.alert("Please enter a name and invite code"),!1;let q;k("...Building EIP-4337 User Operation"),M(!0),console.log("BUILDING",x,R,F,D);try{q=await fetch(e3.REACT_APP_BUILD_USER_OP_POST,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e1+".os",address:y[0],networkingKey:x,wsIp:R,wsPort:F,routers:D,direct:t})})}catch(p){k(""),M(!1),alert(p),console.error("error from fetching userOp:",p);return}k("...Signing EIP-4337 User Operation");const b=await q.json(),f=new Uint8Array(Object.values(b.message)),m=await(v==null?void 0:v.getSigner()),B=await(m==null?void 0:m.signMessage(f));b.userOperation.signature=B;try{q=await fetch(e3.REACT_APP_BROADCAST_USER_OP_POST,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userOp:b.userOperation,code:z,name:e1+".os",eoa:y[0]})})}catch(p){alert(p),console.error("error from broadcasting userOp:",p);return}finally{k(""),M(!1)}r(`${e1}.os`),w("/set-password")};const U={name:e1,setName:i1,nameValidities:o1,setNameValidities:S,dotOs:n,triggerNameCheck:C};return Q.jsxs(Q.Fragment,{children:[Q.jsx(fr,{header:Q.jsx(bu,{prefix:"Claim Invite"}),openConnect:u,closeConnect:l,nodeChainId:c}),!!v&&Q.jsx("form",{id:"signup-form",className:"flex flex-col",onSubmit:X,children:_?Q.jsx(sr,{msg:N}):Q.jsxs(Q.Fragment,{children:[Q.jsxs("div",{className:"flex c mb-2",children:[Q.jsx("h5",{children:"Set up your Kinode with a .os name"}),Q.jsx(z2,{text:"Kinodes use a .os name in order to identify themselves to other nodes in the network."})]}),Q.jsxs("div",{className:"flex flex-col mb-2",children:[Q.jsx("input",{value:z,onChange:d=>$(d.target.value),type:"text",required:!0,name:"nec-invite",placeholder:"invite code",className:"self-stretch"}),Y!==""&&Q.jsx("div",{className:"invite-validity",children:Y})]}),Q.jsx("h3",{className:"mb-2",children:Q.jsx(dl,{...U})}),Q.jsx(pu,{direct:t,setDirect:e}),Q.jsx("button",{disabled:o1.length!==0||Y!=="",type:"submit",className:"self-stretch mt-2",children:"Register .os name"}),Q.jsx(v4,{to:"/reset",className:"button clear",children:"already have a .os?"})]})})]})}const Am=(t,e)=>{let r=new Blob([e],{type:"text/plain;charset=utf-8"});const n=window.URL.createObjectURL(r),u=document.createElement("a");u.href=n,u.setAttribute("download",`${t}.keyfile`),document.body.appendChild(u),u.click()};function hU({knsName:t,direct:e,pw:r,reset:n,provider:u,setPw:i,appSizeOnLoad:a,closeConnect:o,nodeChainId:s}){const[l,c]=n1.useState(""),[y,v]=n1.useState(""),[w,_]=n1.useState(!1);n1.useEffect(()=>{document.title="Set Password"},[]),n1.useEffect(()=>{v("")},[r,l]);const M=n1.useCallback(async N=>{if(N.preventDefault(),r!==l)return v("Passwords do not match"),!1;setTimeout(async()=>{_(!0);let k=pt(z0(r)),C=await(u==null?void 0:u.getSigner()),T=await(C==null?void 0:C.getAddress()),z=await(C==null?void 0:C.getChainId()),$=Date.now(),Y=JSON.stringify({username:t,password_hash:k,timestamp:$,direct:e,reset:n,chain_id:z}),J=await(C==null?void 0:C.signMessage(z0(Y)));try{const i1=await(await fetch("/boot",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({password_hash:k,reset:n,username:t,direct:e,owner:T,timestamp:$,signature:J,chain_id:z})})).json();Am(t,i1);const o1=setInterval(async()=>{const S=await fetch("/");S.status<300&&Number(S.headers.get("content-length"))!==a&&(console.log("WE GOOD, ROUTING"),clearInterval(o1),window.location.replace("/"))},2e3)}catch{alert("There was an error setting your password, please try again."),_(!1)}},500)},[a,e,r,l,n,t]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(fr,{header:Q.jsx(bu,{prefix:"Set Password",showLogo:!0}),openConnect:()=>{},closeConnect:o,nodeChainId:s}),w?Q.jsx(sr,{msg:"Setting up node..."}):Q.jsxs("form",{id:"signup-form",className:"flex flex-col w-full max-w-[450px] gap-4",onSubmit:M,children:[Q.jsxs("div",{className:"flex flex-col w-full place-items-center place-content-center",children:[Q.jsxs("div",{className:"flex w-full place-items-center mb-2",children:[Q.jsx("label",{className:"flex leading-6 place-items-center mt-2 cursor-pointer mb-2",style:{fontSize:20},htmlFor:"password",children:"New Password"}),Q.jsx(z2,{text:"This password will be used to log in if you restart your node or switch browsers."})]}),Q.jsx("div",{className:"flex w-full place-items-center",children:Q.jsx("input",{className:"grow",type:"password",id:"password",required:!0,minLength:6,name:"password",placeholder:"Min 6 characters",value:r,onChange:N=>i(N.target.value),autoFocus:!0})})]}),Q.jsxs("div",{className:"flex flex-col w-full place-items-center place-content-center",children:[Q.jsx("div",{className:"flex w-full place-items-center",children:Q.jsx("label",{className:"flex leading-6 place-items-center mt-2 cursor-pointer mb-4",style:{fontSize:20},htmlFor:"confirm-password",children:"Confirm Password"})}),Q.jsx("div",{className:"flex w-full place-items-center",children:Q.jsx("input",{className:"grow",type:"password",id:"confirm-password",required:!0,minLength:6,name:"confirm-password",placeholder:"Min 6 characters",value:l,onChange:N=>c(N.target.value)})}),!!y&&Q.jsx("p",{style:{color:"red"},children:y})]}),Q.jsx("button",{type:"submit",children:"Submit"})]})]})}var ct={};const pU=P0(nB),bU=P0(aA),mU=P0(sA),yU=P0(tv),gU=P0(cw),xU=P0(AB),vU=P0(PB),AU=P0(dv),wU=P0(Zx),Sc=P0($E),EU=P0(GB),CU=P0(KC),FU=P0(Zv),BU=P0(pv),DU=P0(pC),Tc=P0(PA),_U=P0(wC),kU=P0(YB),SU=P0(RB),TU=P0(WE);(function(t){var e=f0&&f0.__createBinding||(Object.create?function(S,X,U,d){d===void 0&&(d=U),Object.defineProperty(S,d,{enumerable:!0,get:function(){return X[U]}})}:function(S,X,U,d){d===void 0&&(d=U),S[d]=X[U]}),r=f0&&f0.__setModuleDefault||(Object.create?function(S,X){Object.defineProperty(S,"default",{enumerable:!0,value:X})}:function(S,X){S.default=X}),n=f0&&f0.__importStar||function(S){if(S&&S.__esModule)return S;var X={};if(S!=null)for(var U in S)U!=="default"&&Object.prototype.hasOwnProperty.call(S,U)&&e(X,S,U);return r(X,S),X};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var u=pU;Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return u.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return u.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return u.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return u.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return u.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return u.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return u.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return u.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return u.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return u.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return u.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return u.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return u.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return u.TransactionDescription}});var i=bh;Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return i.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return i.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return i.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return i.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return i.isAddress}});var a=n(bU);t.base64=a;var o=mU;Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return o.Base58}});var s=yU;Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return s.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return s.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return s.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return s.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return s.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return s.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return s.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return s.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return s.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return s.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return s.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return s.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return s.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return s.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return s.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return s.stripZeros}});var l=gU;Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return l._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return l.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return l.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return l.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return l.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return l.namehash}});var c=xU;Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return c.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return c.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return c.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return c.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return c.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return c.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return c.mnemonicToSeed}});var y=vU;Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return y.getJsonWalletAddress}});var v=AU;Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return v.keccak256}});var w=wU;Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return w.Logger}});var _=Sc;Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return _.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return _.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return _.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return _.sha512}});var M=EU;Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return M.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return M.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return M.sha256}});var N=CU;Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return N.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return N.shuffled}});var k=FU;Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return k.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return k.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return k.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return k.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return k.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return k.shallowCopy}});var C=n(BU);t.RLP=C;var T=DU;Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return T.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return T.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return T.SigningKey}});var z=Tc;Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return z.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return z.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return z.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return z._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return z.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return z.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return z.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return z.Utf8ErrorFuncs}});var $=_U;Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return $.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return $.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return $.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return $.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return $.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return $.TransactionTypes}});var Y=kU;Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return Y.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return Y.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return Y.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return Y.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return Y.parseUnits}});var J=SU;Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return J.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return J.verifyTypedData}});var e1=TU;Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return e1._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return e1.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return e1.poll}});var i1=Sc;Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return i1.SupportedAlgorithm}});var o1=Tc;Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return o1.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return o1.Utf8ErrorReason}})})(ct);const{useProvider:PU}=Ut;function NU({direct:t,setDirect:e,pw:r,setPw:n,kns:u,openConnect:i,appSizeOnLoad:a,closeConnect:o,routers:s,setRouters:l,knsName:c,setOsName:y,nodeChainId:v}){const w=PU(),_=ir(),[M,N]=n1.useState([]),[k,C]=n1.useState(""),[T,z]=n1.useState(!1),[$,Y]=n1.useState(!1),[J,e1]=n1.useState(!1);n1.useEffect(()=>{document.title="Login",(async()=>{try{const X=await fetch("/info",{method:"GET"}).then(U=>U.json());l(X.allowed_routers),y(X.name)}catch{}})()},[]);const i1=n1.useCallback(async X=>{X==null||X.preventDefault(),X==null||X.stopPropagation();try{if($){if(!w)return N(["Please connect your wallet and try again"]),e1(!0),i();C("Checking password...");let P=pt(z0(r));if((await fetch("/vet-keyfile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password_hash:P,keyfile:""})})).status>399)throw new Error("Incorrect password");const{networking_key:D,ws_routing:[R,q],allowed_routers:b}=await fetch("/generate-networking-info",{method:"POST"}).then(p=>p.json());C("Please confirm the transaction in your wallet");const f=hu(R),m=[t?(await u.populateTransaction.setAllIp(ct.namehash(c),f,q,0,0,0)).data:(await u.populateTransaction.setRouters(ct.namehash(c),b.map(p=>ct.namehash(p)))).data,(await u.populateTransaction.setKey(ct.namehash(c),D)).data];C("Please confirm the transaction");const B=await u.multicall(m);C("Resetting Networking Information..."),await B.wait()}C("Logging in...");let U=pt(z0(r));const d=await fetch($?"/confirm-change-network-keys":"login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($?{password_hash:U,direct:t}:{password_hash:U})});if(d.status>399)throw new Error(await d.text());if($){const P=await d.json();Am(c,P)}const x=setInterval(async()=>{const P=await fetch("/");P.status<300&&Number(P.headers.get("content-length"))!==a&&(clearInterval(x),window.location.replace("/"))},2e3)}catch(U){const d=String(U);d.includes("Object")?N(["There was an error with the transaction, or it was cancelled."]):N([d]),C("")}},[r,a,$,t,c,w,i,u]),o1=(s==null?void 0:s.length)===0,S=cl();return Q.jsxs(Q.Fragment,{children:[Q.jsx(fr,{header:Q.jsx(bu,{prefix:"Login to",showLogo:!0}),openConnect:i,closeConnect:o,hideConnect:!T,nodeChainId:v}),k?Q.jsx(sr,{msg:k}):Q.jsxs("form",{id:"signup-form",className:Lr("flex flex-col w-full max-w-[450px]",{"p-2":S}),onSubmit:i1,children:[Q.jsxs("div",{className:"self-stretch mb-2 flex flex-col",children:[Q.jsxs("div",{className:"flex text-lg mb-2 place-items-center place-content-center",children:[Q.jsx("h3",{className:"font-bold",children:c}),Q.jsxs("span",{className:"ml-2 mt-1 text-sm",children:["(",o1?"direct":"indirect"," node)"]})]}),Q.jsx("input",{type:"password",id:"password",required:!0,minLength:6,name:"password",placeholder:"Password",value:r,onChange:X=>n(X.target.value),autoFocus:!0,className:"self-stretch"})]}),M.length>0&&Q.jsx("div",{className:"flex flex-col w-full leading-6 mb-2",children:M.map((X,U)=>Q.jsx("div",{className:"text-red-500",children:X},U))}),Q.jsxs("button",{type:"submit",className:"w-full mb-2",children:[" ",$?"Reset & ":""," Login "]}),Q.jsxs("div",{className:"flex flex-col w-full self-stretch place-content-center place-items-center",children:[Q.jsx("button",{className:"clear self-stretch mb-1",onClick:()=>{z(!T),Y(!T)},children:T?"Cancel":"Reset Networking Info"}),Q.jsx("button",{className:"clear self-stretch",onClick:()=>{_("/reset-node")},children:"Reset Node & Password"}),T&&Q.jsxs("div",{className:"flex flex-col w-full gap-2 mt-4",children:[Q.jsxs("div",{className:"flex w-full place-items-center",children:[Q.jsxs("div",{className:"relative flex",children:[Q.jsx("input",{type:"checkbox",id:"reset",name:"reset",checked:$,onChange:X=>Y(X.target.checked),autoFocus:!0,className:"mr-2"}),$&&Q.jsx("span",{onClick:()=>Y(!1),className:"checkmark",children:"✓"})]}),Q.jsx("label",{htmlFor:"reset",className:"direct-node-message",children:"Reset networking keys and publish on-chain"}),Q.jsx(z2,{text:"This will update your networking keys and publish the new info on-chain"})]}),Q.jsx(pu,{direct:t,setDirect:e})]})]})]})]})}const Pc="Unsupported punycode character",Nc="Name does not belong to this wallet",t3="Name is not registered",Mc="Name must be a valid URL without subdomains (A-Z, a-z, 0-9, and punycode)",{useAccounts:MU,useProvider:UU}=Ut;function OU({direct:t,setDirect:e,setReset:r,knsName:n,setOsName:u,dotOs:i,kns:a,openConnect:o,closeConnect:s,setNetworkingKey:l,setIpAddress:c,setPort:y,setRouters:v,nodeChainId:w}){const _=MU(),M=UU(),N=ir(),k=Q6(w),[C,T]=n1.useState(n.slice(0,-3)),[z,$]=n1.useState([]),[Y,J]=n1.useState([]),[e1,i1]=n1.useState(""),[o1,S]=n1.useState(!1);n1.useEffect(()=>{document.title="Reset"},[]),n1.useEffect(()=>S(!o1),[M]);const X=n1.useRef(null);n1.useEffect(()=>{X.current&&clearTimeout(X.current),X.current=setTimeout(async()=>{if($([]),!M||C==="")return;let d,x=[...z],P;d=x.indexOf(Pc);try{P=sl(C+".os"),d!==-1&&x.splice(d,1)}catch{d===-1&&x.push(Pc)}if(P!==void 0){d=x.indexOf(Mc),C!==""&&!nl(P)?d===-1&&x.push(Mc):d!==-1&&x.splice(d,1);try{const F=await i.ownerOf(Gi(P));d=x.indexOf(Nc),F===_[0]&&d!==-1?x.splice(d,1):d===-1&&F!==_[0]&&x.push(Nc),d=x.indexOf(t3),d!==-1&&x.splice(d,1)}catch{d=x.indexOf(t3),d===-1&&x.push(t3)}z.length===0&&u(P)}$(x)},500)},[C,o1]);const U=n1.useCallback(async d=>{if(d.preventDefault(),d.stopPropagation(),!M)return o();try{i1("Please confirm the transaction in your wallet");const{networking_key:x,ws_routing:[P,F],allowed_routers:D}=await fetch("/generate-networking-info",{method:"POST"}).then(f=>f.json()),R=hu(P);l(x),c(R),y(F),v(D);const q=[t?(await a.populateTransaction.setAllIp(ct.namehash(n),R,F,0,0,0)).data:(await a.populateTransaction.setRouters(ct.namehash(n),D.map(f=>ct.namehash(f)))).data,(await a.populateTransaction.setKey(ct.namehash(n),x)).data];try{await M2(w)}catch{throw window.alert(`You must connect to the ${k} network to continue. Please connect and try again.`),new Error(`${k} not set`)}const b=await a.multicall(q);i1("Resetting Networking Information..."),await b.wait(),r(!0),i1(""),e(t),N("/set-password")}catch{i1(""),alert("An error occurred, please try again.")}},[M,n,r,e,N,o,a,t,l,c,y,v,w,k]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(fr,{header:Q.jsx(bu,{prefix:"Reset KNS Name"}),openConnect:o,closeConnect:s,nodeChainId:w}),!!M&&Q.jsx("form",{id:"signup-form",className:"flex flex-col",onSubmit:U,children:e1?Q.jsx(sr,{msg:e1}):Q.jsxs(Q.Fragment,{children:[Q.jsxs("h3",{className:"flex flex-col w-full place-items-center mb-2",children:[Q.jsxs("label",{className:"flex leading-6 place-items-center mt-2 cursor-pointer mb-2",children:["Choose a name for your kinode",Q.jsx(z2,{text:"Kinodes use a .os name in order to identify themselves to other nodes in the network."})]}),Q.jsx(dl,{name:C,setName:T,nameVets:z,dotOs:i,triggerNameCheck:o1,nameValidities:Y,setNameValidities:J,isReset:!0})]}),Q.jsx(pu,{direct:t,setDirect:e}),Q.jsx("button",{type:"submit",className:"mt-2",children:" Reset Node "})]})})]})}function IU({openConnect:t,knsName:e,closeConnect:r,nodeChainId:n}){const u=ir(),i=()=>u("/claim-invite"),a=()=>u("/register-eth-name"),o=()=>u("/register-name"),s=()=>u("/reset"),l=()=>u("/import-keyfile"),c=()=>u("/login"),y=!!e,v=!!window.ethereum;return n1.useEffect(()=>{document.title="Welcome | Kinode"},[]),Q.jsxs(Q.Fragment,{children:[Q.jsx(fr,{header:Q.jsx(bu,{prefix:"Welcome to",showLogo:!0}),openConnect:t,closeConnect:r,hideConnect:!0,nodeChainId:n,nameLogo:!0}),Q.jsx("div",{className:"flex flex-col max-w-[460px] w-full gap-4 mt-8",children:y?Q.jsx("button",{onClick:c,children:" Login "}):Q.jsxs(Q.Fragment,{children:[!v&&Q.jsx("h4",{className:"self-start mx-auto",children:"You must install a Web3 wallet extension like Metamask in order to register or reset a username."}),v&&Q.jsx("h4",{className:"self-start mx-auto",children:"New here? Register a username to get started"}),Q.jsx("button",{disabled:!v,onClick:o,children:"Register Kinode Name"}),Q.jsx("h4",{className:"self-start mx-auto",children:"Other options"}),n!==Rr&&Q.jsx("button",{disabled:!v,onClick:a,className:"alt",children:"Register ENS Name"}),Q.jsx("button",{disabled:!v,onClick:i,className:"alt",children:"Claim Kinode Invite"}),Q.jsx("button",{disabled:!v,onClick:s,className:"alt",children:"Reset Kinode Name"}),Q.jsx("button",{onClick:l,className:"alt",children:"Import Keyfile"})]})})]})}const{useProvider:RU}=Ut;function LU({direct:t,setDirect:e,setReset:r,knsName:n,kns:u,openConnect:i,closeConnect:a,setNetworkingKey:o,setIpAddress:s,setPort:l,setRouters:c,nodeChainId:y}){const v=RU(),w=ir(),_=Q6(y),[M,N]=n1.useState("");n1.useEffect(()=>{document.title="Reset"},[]);const k=n1.useCallback(async C=>{if(C.preventDefault(),C.stopPropagation(),!v)return i();try{N("Please confirm the transaction in your wallet");const{networking_key:T,ws_routing:[z,$],allowed_routers:Y}=await fetch("/generate-networking-info",{method:"POST"}).then(o1=>o1.json()),J=hu(z);o(T),s(J),l($),c(Y);const e1=[t?(await u.populateTransaction.setAllIp(ct.namehash(n),J,$,0,0,0)).data:(await u.populateTransaction.setRouters(ct.namehash(n),Y.map(o1=>ct.namehash(o1)))).data,(await u.populateTransaction.setKey(ct.namehash(n),T)).data];try{await M2(y)}catch{throw window.alert(`You must connect to the ${_} network to continue. Please connect and try again.`),new Error(`${_} not set`)}const i1=await u.multicall(e1);N("Resetting Networking Information..."),await i1.wait(),r(!0),N(""),e(t),w("/set-password")}catch{N(""),alert("An error occurred, please try again.")}},[v,n,r,e,w,i,u,t,o,s,l,c,y,_]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(fr,{header:Q.jsx("h1",{className:"flex c mb-8",children:"Reset Kinode Name"}),openConnect:i,closeConnect:a,nodeChainId:y}),v?Q.jsx("form",{id:"signup-form",className:"flex flex-col",onSubmit:k,children:M?Q.jsx(sr,{msg:M}):Q.jsxs(Q.Fragment,{children:[Q.jsx(pu,{direct:t,setDirect:e}),Q.jsxs("button",{type:"submit",className:"self-stretch mt-2 text-2xl",children:["Reset ",n]}),Q.jsx(v4,{to:"/",className:"button alt mt-2",children:"Back"})]})}):Q.jsx("div",{children:"Please connect a wallet to continue."})]})}function jU({pw:t,setPw:e,openConnect:r,appSizeOnLoad:n,closeConnect:u,nodeChainId:i}){const[a,o]=n1.useState(""),[s,l]=n1.useState(""),[c,y]=n1.useState([]),[v,w]=n1.useState(""),[_,M]=n1.useState(!1),[N,k]=n1.useState(!1),[C,T]=n1.useState(!1);n1.useEffect(()=>{document.title="Import Keyfile"},[]);const z=n1.useCallback(e1=>{e1.preventDefault();const i1=e1.target.files[0];if(!i1)return;const o1=new FileReader;o1.onloadend=()=>{o(o1.result),l(i1.name)},o1.readAsText(i1)},[]),$=n1.useRef(null),Y=n1.useCallback(async e1=>{var i1;e1.preventDefault(),e1.stopPropagation(),(i1=$.current)==null||i1.click()},[]),J=n1.useCallback(async e1=>{e1.preventDefault(),e1.stopPropagation(),T(!0);try{if(c.length===0&&a!==""){let i1=pt(z0(t));if((await fetch("/vet-keyfile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keyfile:a,password:i1})})).status>399)throw new Error("Incorrect password");if((await fetch("/import-keyfile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keyfile:a,password:i1})})).status>399)throw new Error("Incorrect password");const X=setInterval(async()=>{const U=await fetch("/");U.status<300&&Number(U.headers.get("content-length"))!==n&&(clearInterval(X),window.location.replace("/"))},2e3)}}catch{window.alert("An error occurred, please try again."),T(!1)}},[a,t,c,n]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(fr,{header:Q.jsx("h1",{children:"Import Keyfile"}),openConnect:r,closeConnect:u,hideConnect:!0,nodeChainId:i}),C?Q.jsx(sr,{msg:"Setting up node..."}):Q.jsxs("form",{id:"signup-form",className:"flex flex-col max-w-[450px]",onSubmit:J,children:[Q.jsxs("div",{className:"flex flex-col self-start place-content-center w-full",children:[Q.jsxs("h4",{className:"my-2 flex",children:[" ","1. Upload Keyfile"," "]}),!!s&&Q.jsxs("h5",{className:"underline mb-2",children:[" ",s||".keyfile"," "]}),Q.jsxs("button",{type:"button",onClick:Y,children:[s?"Change":"Select"," Keyfile"]}),Q.jsx("input",{ref:$,className:"hidden",type:"file",onChange:z})]}),Q.jsxs("div",{className:"flex flex-col w-full",children:[Q.jsxs("h4",{className:"my-2 flex",children:[" ","2. Enter Password"," "]}),Q.jsx("input",{type:"password",id:"password",required:!0,minLength:6,name:"password",placeholder:"Min 6 characters",value:t,onChange:e1=>e(e1.target.value),className:"mb-2"}),v&&Q.jsxs("div",{className:"flex",children:[" ",Q.jsxs("p",{className:"text-red-500",children:[" ",v," "]})," "]}),N&&!_&&6<=t.length&&Q.jsxs("div",{className:"flex",children:[" ",Q.jsx("p",{className:"text-red-500",children:" Password is incorrect "})," "]})]}),Q.jsxs("div",{className:"flex flex-col w-full mb-2",children:[c.map((e1,i1)=>Q.jsx("span",{className:"key-err",children:e1},i1)),Q.jsx("button",{type:"submit",children:" Import Keyfile "})]}),Q.jsx("p",{className:"text-sm",children:'Please note: if the original node was booted as a direct node (static IP), then you must run this node from the same IP. If not, you will have networking issues. If you need to change the network options, please go back and select "Reset OsName".'})]})]})}var rn={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useProvider:zU}=Ut;function $U(){var b1,w1,L1,N1,_1,k1,O1;const t=zU(),e=Fx(),[r,n]=n1.useState(""),[u,i]=n1.useState(""),[a,o]=n1.useState(""),[s,l]=n1.useState(!1),[c,y]=n1.useState(!1),[v,w]=n1.useState(""),[_,M]=n1.useState(0),[N,k]=n1.useState(""),[C,T]=n1.useState(0),[z,$]=n1.useState(0),[Y,J]=n1.useState([]),[e1,i1]=n1.useState(""),[o1,S]=n1.useState(!1),[X,U]=n1.useState(!(e!=null&&e.initial)),[d,x]=n1.useState(!1),P=()=>x(!0),F=()=>x(!1),D=n1.useMemo(()=>{var S1;return((S1=t==null?void 0:t.network)==null?void 0:S1.chainId)===R1.SEPOLIA?rn.REACT_APP_SEPOLIA_RPC_URL:rn.REACT_APP_OPTIMISM_RPC_URL},[t]),[R,q]=n1.useState(ui.connect(((b1=t==null?void 0:t.network)==null?void 0:b1.chainId)===R1.SEPOLIA?I5[R1.SEPOLIA]:I5[R1.OPTIMISM],new je(D))),[b,f]=n1.useState(si.connect(((w1=t==null?void 0:t.network)==null?void 0:w1.chainId)===R1.SEPOLIA?zu[R1.SEPOLIA]:zu[R1.OPTIMISM],new je(D))),[m,B]=n1.useState(ai.connect(((L1=t==null?void 0:t.network)==null?void 0:L1.chainId)===R1.SEPOLIA?j5[R1.SEPOLIA]:j5[R1.MAINNET],new je(((N1=t==null?void 0:t.network)==null?void 0:N1.chainId)===R1.SEPOLIA?rn.REACT_APP_SEPOLIA_RPC_URL:rn.REACT_APP_MAINNET_RPC_URL))),[p,I]=n1.useState(oi.connect(((_1=t==null?void 0:t.network)==null?void 0:_1.chainId)===R1.SEPOLIA?z5[R1.SEPOLIA]:z5[R1.OPTIMISM],new je(D))),[L,V]=n1.useState(li.connect(((k1=t==null?void 0:t.network)==null?void 0:k1.chainId)===R1.SEPOLIA?R5[R1.SEPOLIA]:R5[R1.MAINNET],new je(D))),[G,r1]=n1.useState(ii.connect(((O1=t==null?void 0:t.network)==null?void 0:O1.chainId)===R1.SEPOLIA?L5[R1.SEPOLIA]:L5[R1.MAINNET],new je(D)));n1.useEffect(()=>M(window.performance.getEntriesByType("navigation")[0].transferSize),[]),n1.useEffect(()=>{(async()=>{try{const S1=await fetch("/info",{method:"GET"});if(S1.status>399)console.log("no info, unbooted");else{const e0=await S1.json();X&&(w(e0.name),J(e0.allowed_routers),S(!0),U(!1))}}catch{console.log("no info, unbooted")}try{const S1=await fetch("/current-chain",{method:"GET"});if(S1.status<400){const e0=await S1.json();i1(e0.toLowerCase()),console.log("Node Chain ID:",e0)}}catch{console.log("error getting current chain")}})()},[]),n1.useEffect(()=>S(!1),[X]),n1.useEffect(()=>{t==null||t.getNetwork().then(S1=>{S1.chainId===R1.SEPOLIA?(q(ui.connect(I5[R1.SEPOLIA],t.getSigner())),f(si.connect(zu[R1.SEPOLIA],t.getSigner())),B(ai.connect(j5[R1.SEPOLIA],t.getSigner())),I(oi.connect(z5[R1.SEPOLIA],t.getSigner())),V(li.connect(R5[R1.SEPOLIA],t.getSigner())),r1(ii.connect(L5[R1.SEPOLIA],t.getSigner()))):(S1.chainId===R1.OPTIMISM||S1.chainId===R1.MAINNET)&&(q(ui.connect(I5[R1.OPTIMISM],t.getSigner())),f(si.connect(zu[R1.OPTIMISM],t.getSigner())),I(oi.connect(z5[R1.OPTIMISM],t.getSigner())),B(ai.connect(j5[R1.MAINNET],t.getSigner())),V(li.connect(R5[R1.MAINNET],new je(rn.REACT_APP_MAINNET_RPC_URL))),r1(ii.connect(L5[R1.MAINNET],new je(rn.REACT_APP_MAINNET_RPC_URL))))})},[t]);const u1=R1.SEPOLIA,a1=R1.SEPOLIA,B1={direct:c,setDirect:y,key:u,keyFileName:a,setKeyFileName:o,reset:s,setReset:l,pw:r,setPw:n,knsName:v,setOsName:w,dotOs:R,kns:b,knsEnsEntryNetwork:u1,knsEnsExitNetwork:a1,knsEnsEntry:m,knsEnsExit:p,nameWrapper:L,ensRegistry:G,connectOpen:d,openConnect:P,closeConnect:F,provider:t,appSizeOnLoad:_,networkingKey:N,setNetworkingKey:k,ipAddress:C,setIpAddress:T,port:z,setPort:$,routers:Y,setRouters:J,nodeChainId:e1};return Q.jsxs(Q.Fragment,{children:[Q.jsx(m_,{...B1}),Q.jsx(Vx,{children:Q.jsxs(jx,{children:[Q.jsx(a6,{path:"/",element:o1?Q.jsx(Rx,{to:"/login",replace:!0}):Q.jsx(IU,{...B1})}),Q.jsx(a6,{path:"/claim-invite",element:Q.jsx(dU,{...B1})}),Q.jsx(a6,{path:"/register-name",element:Q.jsx(lU,{...B1})}),Q.jsx(a6,{path:"/register-eth-name",element:Q.jsx(oU,{...B1})}),Q.jsx(a6,{path:"/set-password",element:Q.jsx(hU,{...B1})}),Q.jsx(a6,{path:"/reset",element:Q.jsx(OU,{...B1})}),Q.jsx(a6,{path:"/reset-node",element:Q.jsx(LU,{...B1})}),Q.jsx(a6,{path:"/import-keyfile",element:Q.jsx(jU,{...B1})}),Q.jsx(a6,{path:"/login",element:Q.jsx(NU,{...B1})})]})})]})}const qU=[[q4,Ut]],HU=r3.createRoot(document.getElementById("root"));HU.render(Q.jsx(G6.StrictMode,{children:Q.jsx(ka.Web3ReactProvider,{connectors:qU,children:Q.jsx("div",{id:"signup-page",className:"flex flex-col place-items-center place-content-center h-screen w-screen",children:Q.jsx($U,{})})})})); diff --git a/kinode/src/register-ui/build/assets/index-DzEOiZ-5.js b/kinode/src/register-ui/build/assets/index-DzEOiZ-5.js deleted file mode 100644 index 20d390eb8..000000000 --- a/kinode/src/register-ui/build/assets/index-DzEOiZ-5.js +++ /dev/null @@ -1,130 +0,0 @@ -var rm=Object.defineProperty;var nm=(t,e,r)=>e in t?rm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var i1=(t,e,r)=>(nm(t,typeof e!="symbol"?e+"":e,r),r);function im(t,e){for(var r=0;rn[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 f0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function N1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function U0(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 w4={exports:{}},s5={},A4={exports:{}},p0={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var za=Symbol.for("react.element"),am=Symbol.for("react.portal"),om=Symbol.for("react.fragment"),sm=Symbol.for("react.strict_mode"),um=Symbol.for("react.profiler"),lm=Symbol.for("react.provider"),fm=Symbol.for("react.context"),cm=Symbol.for("react.forward_ref"),dm=Symbol.for("react.suspense"),hm=Symbol.for("react.memo"),pm=Symbol.for("react.lazy"),pc=Symbol.iterator;function bm(t){return t===null||typeof t!="object"?null:(t=pc&&t[pc]||t["@@iterator"],typeof t=="function"?t:null)}var E4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_4=Object.assign,k4={};function Wi(t,e,r){this.props=t,this.context=e,this.refs=k4,this.updater=r||E4}Wi.prototype.isReactComponent={};Wi.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Wi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function S4(){}S4.prototype=Wi.prototype;function bl(t,e,r){this.props=t,this.context=e,this.refs=k4,this.updater=r||E4}var ml=bl.prototype=new S4;ml.constructor=bl;_4(ml,Wi.prototype);ml.isPureReactComponent=!0;var bc=Array.isArray,T4=Object.prototype.hasOwnProperty,yl={current:null},C4={key:!0,ref:!0,__self:!0,__source:!0};function P4(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)T4.call(e,n)&&!C4.hasOwnProperty(n)&&(i[n]=e[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,l=T[b];if(0>>1;bi(p,q))Li(j,p)?(T[b]=j,T[L]=q,b=L):(T[b]=p,T[S]=q,b=S);else if(Li(j,q))T[b]=j,T[L]=q,b=L;else break e}}return F}function i(T,F){var q=T.sortIndex-F.sortIndex;return q!==0?q:T.id-F.id}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}}var u=[],f=[],d=1,y=null,v=3,E=!1,P=!1,R=!1,O=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(T){for(var F=r(f);F!==null;){if(F.callback===null)n(f);else if(F.startTime<=T)n(f),F.sortIndex=F.expirationTime,e(u,F);else break;F=r(f)}}function z(T){if(R=!1,M(T),!P)if(r(u)!==null)P=!0,U($);else{var F=r(f);F!==null&&k(z,F.startTime-T)}}function $(T,F){P=!1,R&&(R=!1,C(ee),ee=-1),E=!0;var q=v;try{for(M(F),y=r(u);y!==null&&(!(y.expirationTime>F)||T&&!N());){var b=y.callback;if(typeof b=="function"){y.callback=null,v=y.priorityLevel;var l=b(y.expirationTime<=F);F=t.unstable_now(),typeof l=="function"?y.callback=l:y===r(u)&&n(u),M(F)}else n(u);y=r(u)}if(y!==null)var m=!0;else{var S=r(f);S!==null&&k(z,S.startTime-F),m=!1}return m}finally{y=null,v=q,E=!1}}var Y=!1,J=null,ee=-1,ae=5,se=-1;function N(){return!(t.unstable_now()-seT||125b?(T.sortIndex=q,e(f,T),r(u)===null&&T===r(f)&&(R?(C(ee),ee=-1):R=!0,k(z,q-b))):(T.sortIndex=l,e(u,T),P||E||(P=!0,U($))),T},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(T){var F=v;return function(){var q=v;v=F;try{return T.apply(this,arguments)}finally{v=q}}}})(O4);U4.exports=O4;var Tm=U4.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var R4=ne,d1=Tm;function Ee(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Y8=Object.prototype.hasOwnProperty,Cm=/^[: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]*$/,yc={},gc={};function Pm(t){return Y8.call(gc,t)?!0:Y8.call(yc,t)?!1:Cm.test(t)?gc[t]=!0:(yc[t]=!0,!1)}function Nm(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 Mm(t,e,r,n){if(e===null||typeof e>"u"||Nm(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 Gt(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 St={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){St[t]=new Gt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];St[e]=new Gt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){St[t]=new Gt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){St[t]=new Gt(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){St[t]=new Gt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){St[t]=new Gt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){St[t]=new Gt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){St[t]=new Gt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){St[t]=new Gt(t,5,!1,t.toLowerCase(),null,!1,!1)});var xl=/[\-:]([a-z])/g;function vl(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(xl,vl);St[e]=new Gt(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(xl,vl);St[e]=new Gt(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(xl,vl);St[e]=new Gt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){St[t]=new Gt(t,1,!1,t.toLowerCase(),null,!1,!1)});St.xlinkHref=new Gt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){St[t]=new Gt(t,1,!1,t.toLowerCase(),null,!0,!0)});function wl(t,e,r,n){var i=St.hasOwnProperty(e)?St[e]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var u=` -`+i[o].replace(" at new "," at ");return t.displayName&&u.includes("")&&(u=u.replace("",t.displayName)),u}while(1<=o&&0<=s);break}}}finally{W5=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?P2(t):""}function Um(t){switch(t.tag){case 5:return P2(t.type);case 16:return P2("Lazy");case 13:return P2("Suspense");case 19:return P2("SuspenseList");case 0:case 2:case 15:return t=Q5(t.type,!1),t;case 11:return t=Q5(t.type.render,!1),t;case 1:return t=Q5(t.type,!0),t;default:return""}}function tu(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 ii:return"Fragment";case ni:return"Portal";case X8:return"Profiler";case Al:return"StrictMode";case Z8:return"Suspense";case eu:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case L4:return(t.displayName||"Context")+".Consumer";case B4:return(t._context.displayName||"Context")+".Provider";case El:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case _l:return e=t.displayName||null,e!==null?e:tu(t.type)||"Memo";case dn:e=t._payload,t=t._init;try{return tu(t(e))}catch{}}return null}function Om(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tu(e);case 8:return e===Al?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Bn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function j4(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Rm(t){var e=j4(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 so(t){t._valueTracker||(t._valueTracker=Rm(t))}function D4(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=j4(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function bs(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 ru(t,e){var r=e.checked;return J0({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function vc(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Bn(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 z4(t,e){e=e.checked,e!=null&&wl(t,"checked",e,!1)}function nu(t,e){z4(t,e);var r=Bn(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")?iu(t,e.type,r):e.hasOwnProperty("defaultValue")&&iu(t,e.type,Bn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function wc(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 iu(t,e,r){(e!=="number"||bs(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var N2=Array.isArray;function vi(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=uo.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function sa(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var B2={animationIterationCount:!0,aspectRatio:!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},Im=["Webkit","ms","Moz","O"];Object.keys(B2).forEach(function(t){Im.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),B2[e]=B2[t]})});function K4(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||B2.hasOwnProperty(t)&&B2[t]?(""+e).trim():e+"px"}function G4(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=K4(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var Bm=J0({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 su(t,e){if(e){if(Bm[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ee(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ee(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ee(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ee(62))}}function uu(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}}var lu=null;function kl(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var fu=null,wi=null,Ai=null;function _c(t){if(t=Ha(t)){if(typeof fu!="function")throw Error(Ee(280));var e=t.stateNode;e&&(e=d5(e),fu(t.stateNode,t.type,e))}}function V4(t){wi?Ai?Ai.push(t):Ai=[t]:wi=t}function W4(){if(wi){var t=wi,e=Ai;if(Ai=wi=null,_c(t),e)for(t=0;t>>=0,t===0?32:31-(Vm(t)/Wm|0)|0}var lo=64,fo=4194304;function M2(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function xs(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,a=t.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=M2(s):(a&=o,a!==0&&(n=M2(a)))}else o=r&~i,o!==0?n=M2(o):a!==0&&(n=M2(a));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function $a(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-G1(e),t[e]=r}function Xm(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=F2),Oc=" ",Rc=!1;function p9(t,e){switch(t){case"keyup":return Sy.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function b9(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ai=!1;function Cy(t,e){switch(t){case"compositionend":return b9(e);case"keypress":return e.which!==32?null:(Rc=!0,Oc);case"textInput":return t=e.data,t===Oc&&Rc?null:t;default:return null}}function Py(t,e){if(ai)return t==="compositionend"||!Ol&&p9(t,e)?(t=d9(),Yo=Nl=gn=null,ai=!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)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=Fc(r)}}function x9(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?x9(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function v9(){for(var t=window,e=bs();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=bs(t.document)}return e}function Rl(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")}function Fy(t){var e=v9(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&x9(r.ownerDocument.documentElement,r)){if(n!==null&&Rl(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!t.extend&&a>n&&(i=n,n=a,a=i),i=jc(r,a);var o=jc(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,oi=null,mu=null,D2=null,yu=!1;function Dc(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;yu||oi==null||oi!==bs(n)||(n=oi,"selectionStart"in n&&Rl(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}),D2&&ha(D2,n)||(D2=n,n=As(mu,"onSelect"),0li||(t.current=Eu[li],Eu[li]=null,li--)}function j0(t,e){li++,Eu[li]=t.current,t.current=e}var Ln={},Bt=$n(Ln),e1=$n(!1),w6=Ln;function Oi(t,e){var r=t.type.contextTypes;if(!r)return Ln;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 t1(t){return t=t.childContextTypes,t!=null}function _s(){H0(e1),H0(Bt)}function Vc(t,e,r){if(Bt.current!==Ln)throw Error(Ee(168));j0(Bt,e),j0(e1,r)}function P9(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(Ee(108,Om(t)||"Unknown",i));return J0({},r,n)}function ks(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ln,w6=Bt.current,j0(Bt,t),j0(e1,e1.current),!0}function Wc(t,e,r){var n=t.stateNode;if(!n)throw Error(Ee(169));r?(t=P9(t,e,w6),n.__reactInternalMemoizedMergedChildContext=t,H0(e1),H0(Bt),j0(Bt,t)):H0(e1),j0(e1,r)}var Lr=null,h5=!1,l8=!1;function N9(t){Lr===null?Lr=[t]:Lr.push(t)}function Jy(t){h5=!0,N9(t)}function qn(){if(!l8&&Lr!==null){l8=!0;var t=0,e=k0;try{var r=Lr;for(k0=1;t>=o,i-=o,Dr=1<<32-G1(e)+i|r<ee?(ae=J,J=null):ae=J.sibling;var se=v(C,J,M[ee],z);if(se===null){J===null&&(J=ae);break}t&&J&&se.alternate===null&&e(C,J),_=a(se,_,ee),Y===null?$=se:Y.sibling=se,Y=se,J=ae}if(ee===M.length)return r(C,J),K0&&n6(C,ee),$;if(J===null){for(;eeee?(ae=J,J=null):ae=J.sibling;var N=v(C,J,se.value,z);if(N===null){J===null&&(J=ae);break}t&&J&&N.alternate===null&&e(C,J),_=a(N,_,ee),Y===null?$=N:Y.sibling=N,Y=N,J=ae}if(se.done)return r(C,J),K0&&n6(C,ee),$;if(J===null){for(;!se.done;ee++,se=M.next())se=y(C,se.value,z),se!==null&&(_=a(se,_,ee),Y===null?$=se:Y.sibling=se,Y=se);return K0&&n6(C,ee),$}for(J=n(C,J);!se.done;ee++,se=M.next())se=E(J,C,ee,se.value,z),se!==null&&(t&&se.alternate!==null&&J.delete(se.key===null?ee:se.key),_=a(se,_,ee),Y===null?$=se:Y.sibling=se,Y=se);return t&&J.forEach(function(X){return e(C,X)}),K0&&n6(C,ee),$}function O(C,_,M,z){if(typeof M=="object"&&M!==null&&M.type===ii&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case oo:e:{for(var $=M.key,Y=_;Y!==null;){if(Y.key===$){if($=M.type,$===ii){if(Y.tag===7){r(C,Y.sibling),_=i(Y,M.props.children),_.return=C,C=_;break e}}else if(Y.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===dn&&t3($)===Y.type){r(C,Y.sibling),_=i(Y,M.props),_.ref=x2(C,Y,M),_.return=C,C=_;break e}r(C,Y);break}else e(C,Y);Y=Y.sibling}M.type===ii?(_=b6(M.props.children,C.mode,z,M.key),_.return=C,C=_):(z=as(M.type,M.key,M.props,null,C.mode,z),z.ref=x2(C,_,M),z.return=C,C=z)}return o(C);case ni:e:{for(Y=M.key;_!==null;){if(_.key===Y)if(_.tag===4&&_.stateNode.containerInfo===M.containerInfo&&_.stateNode.implementation===M.implementation){r(C,_.sibling),_=i(_,M.children||[]),_.return=C,C=_;break e}else{r(C,_);break}else e(C,_);_=_.sibling}_=y8(M,C.mode,z),_.return=C,C=_}return o(C);case dn:return Y=M._init,O(C,_,Y(M._payload),z)}if(N2(M))return P(C,_,M,z);if(p2(M))return R(C,_,M,z);go(C,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,_!==null&&_.tag===6?(r(C,_.sibling),_=i(_,M),_.return=C,C=_):(r(C,_),_=m8(M,C.mode,z),_.return=C,C=_),o(C)):r(C,_)}return O}var Ii=F9(!0),j9=F9(!1),Ka={},xr=$n(Ka),ya=$n(Ka),ga=$n(Ka);function c6(t){if(t===Ka)throw Error(Ee(174));return t}function ql(t,e){switch(j0(ga,e),j0(ya,t),j0(xr,Ka),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:ou(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=ou(e,t)}H0(xr),j0(xr,e)}function Bi(){H0(xr),H0(ya),H0(ga)}function D9(t){c6(ga.current);var e=c6(xr.current),r=ou(e,t.type);e!==r&&(j0(ya,t),j0(xr,r))}function Hl(t){ya.current===t&&(H0(xr),H0(ya))}var W0=$n(0);function Ms(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&128)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 f8=[];function Kl(){for(var t=0;tr?r:4,t(!0);var n=c8.transition;c8.transition={};try{t(!1),e()}finally{k0=r,c8.transition=n}}function rh(){return C1().memoizedState}function eg(t,e,r){var n=Nn(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},nh(t))ih(e,r);else if(r=R9(t,e,r,n),r!==null){var i=qt();V1(r,t,n,i),ah(r,e,n)}}function tg(t,e,r){var n=Nn(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(nh(t))ih(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var o=e.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,Q1(s,o)){var u=e.interleaved;u===null?(i.next=i,zl(e)):(i.next=u.next,u.next=i),e.interleaved=i;return}}catch{}finally{}r=R9(t,e,i,n),r!==null&&(i=qt(),V1(r,t,n,i),ah(r,e,n))}}function nh(t){var e=t.alternate;return t===Q0||e!==null&&e===Q0}function ih(t,e){z2=Us=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function ah(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Tl(t,r)}}var Os={readContext:T1,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},rg={readContext:T1,useCallback:function(t,e){return or().memoizedState=[t,e===void 0?null:e],t},useContext:T1,useEffect:n3,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,ts(4194308,4,Y9.bind(null,e,t),r)},useLayoutEffect:function(t,e){return ts(4194308,4,t,e)},useInsertionEffect:function(t,e){return ts(4,2,t,e)},useMemo:function(t,e){var r=or();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=or();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=eg.bind(null,Q0,t),[n.memoizedState,t]},useRef:function(t){var e=or();return t={current:t},e.memoizedState=t},useState:r3,useDebugValue:Jl,useDeferredValue:function(t){return or().memoizedState=t},useTransition:function(){var t=r3(!1),e=t[0];return t=Zy.bind(null,t[1]),or().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Q0,i=or();if(K0){if(r===void 0)throw Error(Ee(407));r=r()}else{if(r=e(),mt===null)throw Error(Ee(349));E6&30||q9(n,e,r)}i.memoizedState=r;var a={value:r,getSnapshot:e};return i.queue=a,n3(K9.bind(null,n,a,t),[t]),n.flags|=2048,wa(9,H9.bind(null,n,a,r,e),void 0,null),r},useId:function(){var t=or(),e=mt.identifierPrefix;if(K0){var r=zr,n=Dr;r=(n&~(1<<32-G1(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=xa++,0<\/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[lr]=e,t[ma]=n,ph(t,e,!1,!1),e.stateNode=t;e:{switch(o=uu(r,n),r){case"dialog":q0("cancel",t),q0("close",t),i=n;break;case"iframe":case"object":case"embed":q0("load",t),i=n;break;case"video":case"audio":for(i=0;iFi&&(e.flags|=128,n=!0,v2(a,!1),e.lanes=4194304)}else{if(!n)if(t=Ms(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),v2(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!K0)return Nt(e),null}else 2*it()-a.renderingStartTime>Fi&&r!==1073741824&&(e.flags|=128,n=!0,v2(a,!1),e.lanes=4194304);a.isBackwards?(o.sibling=e.child,e.child=o):(r=a.last,r!==null?r.sibling=o:e.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=it(),e.sibling=null,r=W0.current,j0(W0,n?r&1|2:r&1),e):(Nt(e),null);case 22:case 23:return rf(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?a1&1073741824&&(Nt(e),e.subtreeFlags&6&&(e.flags|=8192)):Nt(e),null;case 24:return null;case 25:return null}throw Error(Ee(156,e.tag))}function fg(t,e){switch(Bl(e),e.tag){case 1:return t1(e.type)&&_s(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Bi(),H0(e1),H0(Bt),Kl(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Hl(e),null;case 13:if(H0(W0),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Ee(340));Ri()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return H0(W0),null;case 4:return Bi(),null;case 10:return Dl(e.type._context),null;case 22:case 23:return rf(),null;case 24:return null;default:return null}}var vo=!1,Ut=!1,cg=typeof WeakSet=="function"?WeakSet:Set,Me=null;function hi(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Z0(t,e,n)}else r.current=null}function Iu(t,e,r){try{r()}catch(n){Z0(t,e,n)}}var d3=!1;function dg(t,e){if(gu=vs,t=v9(),Rl(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,u=-1,f=0,d=0,y=t,v=null;t:for(;;){for(var E;y!==r||i!==0&&y.nodeType!==3||(s=o+i),y!==a||n!==0&&y.nodeType!==3||(u=o+n),y.nodeType===3&&(o+=y.nodeValue.length),(E=y.firstChild)!==null;)v=y,y=E;for(;;){if(y===t)break t;if(v===r&&++f===i&&(s=o),v===a&&++d===n&&(u=o),(E=y.nextSibling)!==null)break;y=v,v=y.parentNode}y=E}r=s===-1||u===-1?null:{start:s,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(xu={focusedElem:t,selectionRange:r},vs=!1,Me=e;Me!==null;)if(e=Me,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Me=t;else for(;Me!==null;){e=Me;try{var P=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(P!==null){var R=P.memoizedProps,O=P.memoizedState,C=e.stateNode,_=C.getSnapshotBeforeUpdate(e.elementType===e.type?R:F1(e.type,R),O);C.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var M=e.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ee(163))}}catch(z){Z0(e,e.return,z)}if(t=e.sibling,t!==null){t.return=e.return,Me=t;break}Me=e.return}return P=d3,d3=!1,P}function $2(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&Iu(e,r,a)}i=i.next}while(i!==n)}}function m5(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Bu(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function yh(t){var e=t.alternate;e!==null&&(t.alternate=null,yh(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[lr],delete e[ma],delete e[Au],delete e[Wy],delete e[Qy])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function gh(t){return t.tag===5||t.tag===3||t.tag===4}function h3(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||gh(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Lu(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,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=Es));else if(n!==4&&(t=t.child,t!==null))for(Lu(t,e,r),t=t.sibling;t!==null;)Lu(t,e,r),t=t.sibling}function Fu(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Fu(t,e,r),t=t.sibling;t!==null;)Fu(t,e,r),t=t.sibling}var At=null,z1=!1;function ln(t,e,r){for(r=r.child;r!==null;)xh(t,e,r),r=r.sibling}function xh(t,e,r){if(gr&&typeof gr.onCommitFiberUnmount=="function")try{gr.onCommitFiberUnmount(u5,r)}catch{}switch(r.tag){case 5:Ut||hi(r,e);case 6:var n=At,i=z1;At=null,ln(t,e,r),At=n,z1=i,At!==null&&(z1?(t=At,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):At.removeChild(r.stateNode));break;case 18:At!==null&&(z1?(t=At,r=r.stateNode,t.nodeType===8?u8(t.parentNode,r):t.nodeType===1&&u8(t,r),ca(t)):u8(At,r.stateNode));break;case 4:n=At,i=z1,At=r.stateNode.containerInfo,z1=!0,ln(t,e,r),At=n,z1=i;break;case 0:case 11:case 14:case 15:if(!Ut&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Iu(r,e,o),i=i.next}while(i!==n)}ln(t,e,r);break;case 1:if(!Ut&&(hi(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Z0(r,e,s)}ln(t,e,r);break;case 21:ln(t,e,r);break;case 22:r.mode&1?(Ut=(n=Ut)||r.memoizedState!==null,ln(t,e,r),Ut=n):ln(t,e,r);break;default:ln(t,e,r)}}function p3(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new cg),e.forEach(function(n){var i=wg.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function R1(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=it()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*pg(n/1960))-n,10t?16:t,xn===null)var n=!1;else{if(t=xn,xn=null,Bs=0,A0&6)throw Error(Ee(331));var i=A0;for(A0|=4,Me=t.current;Me!==null;){var a=Me,o=a.child;if(Me.flags&16){var s=a.deletions;if(s!==null){for(var u=0;uit()-ef?p6(t,0):Zl|=r),r1(t,e)}function Th(t,e){e===0&&(t.mode&1?(e=fo,fo<<=1,!(fo&130023424)&&(fo=4194304)):e=1);var r=qt();t=Wr(t,e),t!==null&&($a(t,e,r),r1(t,r))}function vg(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),Th(t,r)}function wg(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(Ee(314))}n!==null&&n.delete(e),Th(t,r)}var Ch;Ch=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||e1.current)Zt=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Zt=!1,ug(t,e,r);Zt=!!(t.flags&131072)}else Zt=!1,K0&&e.flags&1048576&&M9(e,Ts,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;rs(t,e),t=e.pendingProps;var i=Oi(e,Bt.current);_i(e,r),i=Vl(null,e,n,t,i,r);var a=Wl();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,t1(n)?(a=!0,ks(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,$l(e),i.updater=p5,e.stateNode=i,i._reactInternals=e,Cu(e,n,t,r),e=Mu(null,e,n,!0,a,r)):(e.tag=0,K0&&a&&Il(e),jt(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(rs(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=Eg(n),t=F1(n,t),i){case 0:e=Nu(null,e,n,t,r);break e;case 1:e=l3(null,e,n,t,r);break e;case 11:e=s3(null,e,n,t,r);break e;case 14:e=u3(null,e,n,F1(n.type,t),r);break e}throw Error(Ee(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:F1(n,i),Nu(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:F1(n,i),l3(t,e,n,i,r);case 3:e:{if(ch(e),t===null)throw Error(Ee(387));n=e.pendingProps,a=e.memoizedState,i=a.element,I9(t,e),Ns(e,n,null,r);var o=e.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=Li(Error(Ee(423)),e),e=f3(t,e,n,r,i);break e}else if(n!==i){i=Li(Error(Ee(424)),e),e=f3(t,e,n,r,i);break e}else for(u1=Tn(e.stateNode.containerInfo.firstChild),c1=e,K0=!0,$1=null,r=j9(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ri(),n===i){e=Qr(t,e,r);break e}jt(t,e,n,r)}e=e.child}return e;case 5:return D9(e),t===null&&ku(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,vu(n,i)?o=null:a!==null&&vu(n,a)&&(e.flags|=32),fh(t,e),jt(t,e,o,r),e.child;case 6:return t===null&&ku(e),null;case 13:return dh(t,e,r);case 4:return ql(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Ii(e,null,n,r):jt(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:F1(n,i),s3(t,e,n,i,r);case 7:return jt(t,e,e.pendingProps,r),e.child;case 8:return jt(t,e,e.pendingProps.children,r),e.child;case 12:return jt(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value,j0(Cs,n._currentValue),n._currentValue=o,a!==null)if(Q1(a.value,o)){if(a.children===i.children&&!e1.current){e=Qr(t,e,r);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var u=s.firstContext;u!==null;){if(u.context===n){if(a.tag===1){u=qr(-1,r&-r),u.tag=2;var f=a.updateQueue;if(f!==null){f=f.shared;var d=f.pending;d===null?u.next=u:(u.next=d.next,d.next=u),f.pending=u}}a.lanes|=r,u=a.alternate,u!==null&&(u.lanes|=r),Su(a.return,r,e),s.lanes|=r;break}u=u.next}}else if(a.tag===10)o=a.type===e.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Ee(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Su(o,r,e),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}jt(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,_i(e,r),i=T1(i),n=n(i),e.flags|=1,jt(t,e,n,r),e.child;case 14:return n=e.type,i=F1(n,e.pendingProps),i=F1(n.type,i),u3(t,e,n,i,r);case 15:return uh(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:F1(n,i),rs(t,e),e.tag=1,t1(n)?(t=!0,ks(e)):t=!1,_i(e,r),L9(e,n,i),Cu(e,n,i,r),Mu(null,e,n,!0,t,r);case 19:return hh(t,e,r);case 22:return lh(t,e,r)}throw Error(Ee(156,e.tag))};function Ph(t,e){return t9(t,e)}function Ag(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.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function k1(t,e,r,n){return new Ag(t,e,r,n)}function af(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Eg(t){if(typeof t=="function")return af(t)?1:0;if(t!=null){if(t=t.$$typeof,t===El)return 11;if(t===_l)return 14}return 2}function Mn(t,e){var r=t.alternate;return r===null?(r=k1(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.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,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 as(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")af(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case ii:return b6(r.children,i,a,e);case Al:o=8,i|=8;break;case X8:return t=k1(12,r,e,i|2),t.elementType=X8,t.lanes=a,t;case Z8:return t=k1(13,r,e,i),t.elementType=Z8,t.lanes=a,t;case eu:return t=k1(19,r,e,i),t.elementType=eu,t.lanes=a,t;case F4:return g5(r,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case B4:o=10;break e;case L4:o=9;break e;case El:o=11;break e;case _l:o=14;break e;case dn:o=16,n=null;break e}throw Error(Ee(130,t==null?t:typeof t,""))}return e=k1(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function b6(t,e,r,n){return t=k1(7,t,n,e),t.lanes=r,t}function g5(t,e,r,n){return t=k1(22,t,n,e),t.elementType=F4,t.lanes=r,t.stateNode={isHidden:!1},t}function m8(t,e,r){return t=k1(6,t,null,e),t.lanes=r,t}function y8(t,e,r){return e=k1(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function _g(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Y5(0),this.expirationTimes=Y5(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Y5(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function of(t,e,r,n,i,a,o,s,u){return t=new _g(t,e,r,s,u),e===1?(e=1,a===!0&&(e|=8)):e=0,a=k1(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},$l(a),t}function kg(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Oh)}catch(t){console.error(t)}}Oh(),M4.exports=p1;var Rh=M4.exports,A3=Rh;J8.createRoot=A3.createRoot,J8.hydrateRoot=A3.hydrateRoot;/** - * @remix-run/router v1.15.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Ea(){return Ea=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function Ih(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Mg(){return Math.random().toString(36).substr(2,8)}function _3(t,e){return{usr:t.state,key:t.key,idx:e}}function qu(t,e,r,n){return r===void 0&&(r=null),Ea({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Yi(e):e,{state:r,key:e&&e.key||n||Mg()})}function js(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 Yi(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 Ug(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=vn.Pop,u=null,f=d();f==null&&(f=0,o.replaceState(Ea({},o.state,{idx:f}),""));function d(){return(o.state||{idx:null}).idx}function y(){s=vn.Pop;let O=d(),C=O==null?null:O-f;f=O,u&&u({action:s,location:R.location,delta:C})}function v(O,C){s=vn.Push;let _=qu(R.location,O,C);f=d()+1;let M=_3(_,f),z=R.createHref(_);try{o.pushState(M,"",z)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;i.location.assign(z)}a&&u&&u({action:s,location:R.location,delta:1})}function E(O,C){s=vn.Replace;let _=qu(R.location,O,C);f=d();let M=_3(_,f),z=R.createHref(_);o.replaceState(M,"",z),a&&u&&u({action:s,location:R.location,delta:0})}function P(O){let C=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof O=="string"?O:js(O);return _=_.replace(/ $/,"%20"),at(C,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,C)}let R={get action(){return s},get location(){return t(i,o)},listen(O){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(E3,y),u=O,()=>{i.removeEventListener(E3,y),u=null}},createHref(O){return e(i,O)},createURL:P,encodeLocation(O){let C=P(O);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:v,replace:E,go(O){return o.go(O)}};return R}var k3;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(k3||(k3={}));function Og(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?Yi(e):e,i=ff(n.pathname||"/",r);if(i==null)return null;let a=Bh(t);Rg(a);let o=null;for(let s=0;o==null&&s{let u={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};u.relativePath.startsWith("/")&&(at(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let f=Un([n,u.relativePath]),d=r.concat(u);a.children&&a.children.length>0&&(at(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),Bh(a.children,e,d,f)),!(a.path==null&&!a.index)&&e.push({path:f,score:zg(f,a.index),routesMeta:d})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let u of Lh(a.path))i(a,o,u)}),e}function Lh(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=Lh(n.join("/")),s=[];return s.push(...o.map(u=>u===""?a:[a,u].join("/"))),i&&s.push(...o),s.map(u=>t.startsWith("/")&&u===""?"/":u)}function Rg(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:$g(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Ig=/^:[\w-]+$/,Bg=3,Lg=2,Fg=1,jg=10,Dg=-2,S3=t=>t==="*";function zg(t,e){let r=t.split("/"),n=r.length;return r.some(S3)&&(n+=Dg),e&&(n+=Lg),r.filter(i=>!S3(i)).reduce((i,a)=>i+(Ig.test(a)?Bg:a===""?Fg:jg),n)}function $g(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 qg(t,e){let{routesMeta:r}=t,n={},i="/",a=[];for(let o=0;o{let{paramName:v,isOptional:E}=d;if(v==="*"){let R=s[y]||"";o=a.slice(0,a.length-R.length).replace(/(.)\/+$/,"$1")}const P=s[y];return E&&!P?f[v]=void 0:f[v]=(P||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:o,pattern:t}}function Kg(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),Ih(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,u)=>(n.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function Gg(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ih(!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 ff(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 Vg(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Yi(t):t;return{pathname:r?r.startsWith("/")?r:Wg(r,e):e,search:Yg(n),hash:Xg(i)}}function Wg(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 g8(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 and the router will parse it for you.'}function Qg(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function cf(t,e){let r=Qg(t);return e?r.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function df(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Yi(t):(i=Ea({},t),at(!i.pathname||!i.pathname.includes("?"),g8("?","pathname","search",i)),at(!i.pathname||!i.pathname.includes("#"),g8("#","pathname","hash",i)),at(!i.search||!i.search.includes("#"),g8("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let y=e.length-1;if(!n&&o.startsWith("..")){let v=o.split("/");for(;v[0]==="..";)v.shift(),y-=1;i.pathname=v.join("/")}s=y>=0?e[y]:"/"}let u=Vg(i,s),f=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(f||d)&&(u.pathname+="/"),u}const Un=t=>t.join("/").replace(/\/\/+/g,"/"),Jg=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Yg=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Xg=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Zg(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Fh=["post","put","patch","delete"];new Set(Fh);const ex=["get",...Fh];new Set(ex);/** - * React Router v6.22.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function _a(){return _a=Object.assign?Object.assign.bind():function(t){for(var e=1;e{s.current=!0}),ne.useCallback(function(f,d){if(d===void 0&&(d={}),!s.current)return;if(typeof f=="number"){n.go(f);return}let y=df(f,JSON.parse(o),a,d.relative==="path");t==null&&e!=="/"&&(y.pathname=y.pathname==="/"?e:Un([e,y.pathname])),(d.replace?n.replace:n.push)(y,d.state,d)},[e,n,o,a,t])}function ix(){let{matches:t}=ne.useContext(en),e=t[t.length-1];return e?e.params:{}}function zh(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=ne.useContext(Hn),{matches:i}=ne.useContext(en),{pathname:a}=Ga(),o=JSON.stringify(cf(i,n.v7_relativeSplatPath));return ne.useMemo(()=>df(t,JSON.parse(o),a,r==="path"),[t,o,a,r])}function ax(t,e){return ox(t,e)}function ox(t,e,r,n){Xi()||at(!1);let{navigator:i}=ne.useContext(Hn),{matches:a}=ne.useContext(en),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let f=Ga(),d;if(e){var y;let O=typeof e=="string"?Yi(e):e;u==="/"||(y=O.pathname)!=null&&y.startsWith(u)||at(!1),d=O}else d=f;let v=d.pathname||"/",E=v;if(u!=="/"){let O=u.replace(/^\//,"").split("/");E="/"+v.replace(/^\//,"").split("/").slice(O.length).join("/")}let P=Og(t,{pathname:E}),R=cx(P&&P.map(O=>Object.assign({},O,{params:Object.assign({},s,O.params),pathname:Un([u,i.encodeLocation?i.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?u:Un([u,i.encodeLocation?i.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),a,r,n);return e&&R?ne.createElement(E5.Provider,{value:{location:_a({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:vn.Pop}},R):R}function sx(){let t=bx(),e=Zg(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)"};return ne.createElement(ne.Fragment,null,ne.createElement("h2",null,"Unexpected Application Error!"),ne.createElement("h3",{style:{fontStyle:"italic"}},e),r?ne.createElement("pre",{style:i},r):null,null)}const ux=ne.createElement(sx,null);class lx extends ne.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!==void 0?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!==void 0?ne.createElement(en.Provider,{value:this.props.routeContext},ne.createElement(jh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fx(t){let{routeContext:e,match:r,children:n}=t,i=ne.useContext(hf);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),ne.createElement(en.Provider,{value:e},n)}function cx(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var a;if((a=r)!=null&&a.errors)t=r.matches;else return null}let o=t,s=(i=r)==null?void 0:i.errors;if(s!=null){let d=o.findIndex(y=>y.route.id&&(s==null?void 0:s[y.route.id]));d>=0||at(!1),o=o.slice(0,Math.min(o.length,d+1))}let u=!1,f=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d=0?o=o.slice(0,f+1):o=[o[0]];break}}}return o.reduceRight((d,y,v)=>{let E,P=!1,R=null,O=null;r&&(E=s&&y.route.id?s[y.route.id]:void 0,R=y.route.errorElement||ux,u&&(f<0&&v===0?(P=!0,O=null):f===v&&(P=!0,O=y.route.hydrateFallbackElement||null)));let C=e.concat(o.slice(0,v+1)),_=()=>{let M;return E?M=R:P?M=O:y.route.Component?M=ne.createElement(y.route.Component,null):y.route.element?M=y.route.element:M=d,ne.createElement(fx,{match:y,routeContext:{outlet:d,matches:C,isDataRoute:r!=null},children:M})};return r&&(y.route.ErrorBoundary||y.route.errorElement||v===0)?ne.createElement(lx,{location:r.location,revalidation:r.revalidation,component:R,error:E,children:_(),routeContext:{outlet:null,matches:C,isDataRoute:!0}}):_()},null)}var $h=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}($h||{}),Ds=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}(Ds||{});function dx(t){let e=ne.useContext(hf);return e||at(!1),e}function hx(t){let e=ne.useContext(tx);return e||at(!1),e}function px(t){let e=ne.useContext(en);return e||at(!1),e}function qh(t){let e=px(),r=e.matches[e.matches.length-1];return r.route.id||at(!1),r.route.id}function bx(){var t;let e=ne.useContext(jh),r=hx(Ds.UseRouteError),n=qh(Ds.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function mx(){let{router:t}=dx($h.UseNavigateStable),e=qh(Ds.UseNavigateStable),r=ne.useRef(!1);return Dh(()=>{r.current=!0}),ne.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,_a({fromRouteId:e},a)))},[t,e])}function yx(t){let{to:e,replace:r,state:n,relative:i}=t;Xi()||at(!1);let{future:a,static:o}=ne.useContext(Hn),{matches:s}=ne.useContext(en),{pathname:u}=Ga(),f=tn(),d=df(e,cf(s,a.v7_relativeSplatPath),u,i==="path"),y=JSON.stringify(d);return ne.useEffect(()=>f(JSON.parse(y),{replace:r,state:n,relative:i}),[f,y,i,r,n]),null}function ir(t){at(!1)}function gx(t){let{basename:e="/",children:r=null,location:n,navigationType:i=vn.Pop,navigator:a,static:o=!1,future:s}=t;Xi()&&at(!1);let u=e.replace(/^\/*/,"/"),f=ne.useMemo(()=>({basename:u,navigator:a,static:o,future:_a({v7_relativeSplatPath:!1},s)}),[u,s,a,o]);typeof n=="string"&&(n=Yi(n));let{pathname:d="/",search:y="",hash:v="",state:E=null,key:P="default"}=n,R=ne.useMemo(()=>{let O=ff(d,u);return O==null?null:{location:{pathname:O,search:y,hash:v,state:E,key:P},navigationType:i}},[u,d,y,v,E,P,i]);return R==null?null:ne.createElement(Hn.Provider,{value:f},ne.createElement(E5.Provider,{children:r,value:R}))}function xx(t){let{children:e,location:r}=t;return ax(Hu(e),r)}new Promise(()=>{});function Hu(t,e){e===void 0&&(e=[]);let r=[];return ne.Children.forEach(t,(n,i)=>{if(!ne.isValidElement(n))return;let a=[...e,i];if(n.type===ne.Fragment){r.push.apply(r,Hu(n.props.children,a));return}n.type!==ir&&at(!1),!n.props.index||!n.props.children||at(!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=Hu(n.props.children,a)),r.push(o)}),r}/** - * React Router DOM v6.22.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Ku(){return Ku=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function wx(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Ax(t,e){return t.button===0&&(!e||e==="_self")&&!wx(t)}const Ex=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],_x="6";try{window.__reactRouterVersion=_x}catch{}const kx="startTransition",T3=vm[kx];function Sx(t){let{basename:e,children:r,future:n,window:i}=t,a=ne.useRef();a.current==null&&(a.current=Ng({window:i,v5Compat:!0}));let o=a.current,[s,u]=ne.useState({action:o.action,location:o.location}),{v7_startTransition:f}=n||{},d=ne.useCallback(y=>{f&&T3?T3(()=>u(y)):u(y)},[u,f]);return ne.useLayoutEffect(()=>o.listen(d),[o,d]),ne.createElement(gx,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const Tx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Cx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pf=ne.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:u,to:f,preventScrollReset:d,unstable_viewTransition:y}=e,v=vx(e,Ex),{basename:E}=ne.useContext(Hn),P,R=!1;if(typeof f=="string"&&Cx.test(f)&&(P=f,Tx))try{let M=new URL(window.location.href),z=f.startsWith("//")?new URL(M.protocol+f):new URL(f),$=ff(z.pathname,E);z.origin===M.origin&&$!=null?f=$+z.search+z.hash:R=!0}catch{}let O=rx(f,{relative:i}),C=Px(f,{replace:o,state:s,target:u,preventScrollReset:d,relative:i,unstable_viewTransition:y});function _(M){n&&n(M),M.defaultPrevented||C(M)}return ne.createElement("a",Ku({},v,{href:P||O,onClick:R||a?n:_,ref:r,target:u}))});var C3;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(C3||(C3={}));var P3;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(P3||(P3={}));function Px(t,e){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,unstable_viewTransition:s}=e===void 0?{}:e,u=tn(),f=Ga(),d=zh(t,{relative:o});return ne.useCallback(y=>{if(Ax(y,r)){y.preventDefault();let v=n!==void 0?n:js(f)===js(d);u(t,{replace:v,state:i,preventScrollReset:a,relative:o,unstable_viewTransition:s})}},[f,u,d,n,i,r,t,a,o,s])}var _5={},Hr={},Hh={};const Nx="logger/5.7.0";let N3=!1,M3=!1;const os={debug:1,default:2,info:2,warning:3,error:4,off:5};let U3=os.default,x8=null;function Mx(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const O3=Mx();var zs;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(zs||(zs={}));var w1;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(w1||(w1={}));const R3="0123456789abcdef";class Z{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();os[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(U3>os[n])&&console.log.apply(console,r)}debug(...e){this._log(Z.levels.DEBUG,e)}info(...e){this._log(Z.levels.INFO,e)}warn(...e){this._log(Z.levels.WARNING,e)}makeError(e,r,n){if(M3)return this.makeError("censored error",r,{});r||(r=Z.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(u=>{const f=n[u];try{if(f instanceof Uint8Array){let d="";for(let y=0;y>4],d+=R3[f[y]&15];i.push(u+"=Uint8Array(0x"+d+")")}else i.push(u+"="+JSON.stringify(f))}catch{i.push(u+"="+JSON.stringify(n[u].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const a=e;let o="";switch(r){case w1.NUMERIC_FAULT:{o="NUMERIC_FAULT";const u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":o+="-"+u;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case w1.CALL_EXCEPTION:case w1.INSUFFICIENT_FUNDS:case w1.MISSING_NEW:case w1.NONCE_EXPIRED:case w1.REPLACEMENT_UNDERPRICED:case w1.TRANSACTION_REPLACED:case w1.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const s=new Error(e);return s.reason=a,s.code=r,Object.keys(n).forEach(function(u){s[u]=n[u]}),s}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,Z.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){O3&&this.throwError("platform missing String.prototype.normalize",Z.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:O3})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Z.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Z.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,Z.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Z.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",Z.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Z.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return x8||(x8=new Z(Nx)),x8}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Z.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),N3){if(!e)return;this.globalLogger().throwError("error censorship permanent",Z.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}M3=!!e,N3=!!r}static setLogLevel(e){const r=os[e.toLowerCase()];if(r==null){Z.globalLogger().warn("invalid log level - "+e);return}U3=r}static from(e){return new Z(e)}}Z.errors=w1;Z.levels=zs;const Ux=Object.freeze(Object.defineProperty({__proto__:null,get ErrorCode(){return w1},get LogLevel(){return zs},Logger:Z},Symbol.toStringTag,{value:"Module"})),Ox="bytes/5.7.0",Y0=new Z(Ox);function Kh(t){return!!t.toHexString}function Si(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Si(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Va(t){return We(t)&&!(t.length%2)||Kn(t)}function I3(t){return typeof t=="number"&&t==t&&t%1===0}function Kn(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!I3(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function ve(t,e){if(e||(e={}),typeof t=="number"){Y0.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),Si(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),Kh(t)&&(t=t.toHexString()),We(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":Y0.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;ive(i)),r=e.reduce((i,a)=>i+a.length,0),n=new Uint8Array(r);return e.reduce((i,a)=>(n.set(a,i),i+a.length),0),Si(n)}function vr(t){let e=ve(t);if(e.length===0)return e;let r=0;for(;re&&Y0.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),Si(r)}function We(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const v8="0123456789abcdef";function ke(t,e){if(e||(e={}),typeof t=="number"){Y0.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=v8[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),Kh(t))return t.toHexString();if(We(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":Y0.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Kn(t)){let r="0x";for(let n=0;n>4]+v8[i&15]}return r}return Y0.throwArgumentError("invalid hexlify value","value",t)}function kr(t){if(typeof t!="string")t=ke(t);else if(!We(t)||t.length%2)return null;return(t.length-2)/2}function nt(t,e,r){return typeof t!="string"?t=ke(t):(!We(t)||t.length%2)&&Y0.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function zt(t){let e="0x";return t.forEach(r=>{e+=ke(r).substring(2)}),e}function Wa(t){const e=Gh(ke(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function Gh(t){typeof t!="string"&&(t=ke(t)),We(t)||Y0.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Y0.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function O6(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Va(t)){let r=ve(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=ke(r.slice(0,32)),e.s=ke(r.slice(32,64))):r.length===65?(e.r=ke(r.slice(0,32)),e.s=ke(r.slice(32,64)),e.v=r[64]):Y0.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:Y0.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=ke(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=K2(ve(e._vs),32);e._vs=ke(i);const a=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=a:e.recoveryParam!==a&&Y0.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=ke(i);e.s==null?e.s=o:e.s!==o&&Y0.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?Y0.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&Y0.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!We(e.r)?Y0.throwArgumentError("signature missing or invalid r","signature",t):e.r=F0(e.r,32),e.s==null||!We(e.s)?Y0.throwArgumentError("signature missing or invalid s","signature",t):e.s=F0(e.s,32);const r=ve(e.s);r[0]>=128&&Y0.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=ke(r);e._vs&&(We(e._vs)||Y0.throwArgumentError("signature invalid _vs","signature",t),e._vs=F0(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Y0.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Gu(t){return t=O6(t),ke(L0([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const Rx=Object.freeze(Object.defineProperty({__proto__:null,arrayify:ve,concat:L0,hexConcat:zt,hexDataLength:kr,hexDataSlice:nt,hexStripZeros:Gh,hexValue:Wa,hexZeroPad:F0,hexlify:ke,isBytes:Kn,isBytesLike:Va,isHexString:We,joinSignature:Gu,splitSignature:O6,stripZeros:vr,zeroPad:K2},Symbol.toStringTag,{value:"Module"}));var bf={exports:{}};const Ix={},Bx=Object.freeze(Object.defineProperty({__proto__:null,default:Ix},Symbol.toStringTag,{value:"Module"})),Lx=U0(Bx);bf.exports;(function(t){(function(e,r){function n(I,c){if(!I)throw new Error(c||"Assertion failed")}function i(I,c){I.super_=c;var x=function(){};x.prototype=c.prototype,I.prototype=new x,I.prototype.constructor=I}function a(I,c,x){if(a.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((c==="le"||c==="be")&&(x=c,c=10),this._init(I||0,c||10,x||"be"))}typeof e=="object"?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Lx.Buffer}catch{}a.isBN=function(c){return c instanceof a?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===a.wordSize&&Array.isArray(c.words)},a.max=function(c,x){return c.cmp(x)>0?c:x},a.min=function(c,x){return c.cmp(x)<0?c:x},a.prototype._init=function(c,x,U){if(typeof c=="number")return this._initNumber(c,x,U);if(typeof c=="object")return this._initArray(c,x,U);x==="hex"&&(x=16),n(x===(x|0)&&x>=2&&x<=36),c=c.toString().replace(/\s+/g,"");var k=0;c[0]==="-"&&(k++,this.negative=1),k=0;k-=3)F=c[k]|c[k-1]<<8|c[k-2]<<16,this.words[T]|=F<>>26-q&67108863,q+=24,q>=26&&(q-=26,T++);else if(U==="le")for(k=0,T=0;k>>26-q&67108863,q+=24,q>=26&&(q-=26,T++);return this._strip()};function s(I,c){var x=I.charCodeAt(c);if(x>=48&&x<=57)return x-48;if(x>=65&&x<=70)return x-55;if(x>=97&&x<=102)return x-87;n(!1,"Invalid character in "+I)}function u(I,c,x){var U=s(I,x);return x-1>=c&&(U|=s(I,x-1)<<4),U}a.prototype._parseHex=function(c,x,U){this.length=Math.ceil((c.length-x)/6),this.words=new Array(this.length);for(var k=0;k=x;k-=2)q=u(c,x,k)<=18?(T-=18,F+=1,this.words[F]|=q>>>26):T+=8;else{var b=c.length-x;for(k=b%2===0?x+1:x;k=18?(T-=18,F+=1,this.words[F]|=q>>>26):T+=8}this._strip()};function f(I,c,x,U){for(var k=0,T=0,F=Math.min(I.length,x),q=c;q=49?T=b-49+10:b>=17?T=b-17+10:T=b,n(b>=0&&T1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=y}catch{a.prototype.inspect=y}else a.prototype.inspect=y;function y(){return(this.red?""}var v=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(c,x){c=c||10,x=x|0||1;var U;if(c===16||c==="hex"){U="";for(var k=0,T=0,F=0;F>>24-k&16777215,k+=2,k>=26&&(k-=26,F--),T!==0||F!==this.length-1?U=v[6-b.length]+b+U:U=b+U}for(T!==0&&(U=T.toString(16)+U);U.length%x!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}if(c===(c|0)&&c>=2&&c<=36){var l=E[c],m=P[c];U="";var S=this.clone();for(S.negative=0;!S.isZero();){var p=S.modrn(m).toString(c);S=S.idivn(m),S.isZero()?U=p+U:U=v[l-p.length]+p+U}for(this.isZero()&&(U="0"+U);U.length%x!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},a.prototype.toJSON=function(){return this.toString(16,2)},o&&(a.prototype.toBuffer=function(c,x){return this.toArrayLike(o,c,x)}),a.prototype.toArray=function(c,x){return this.toArrayLike(Array,c,x)};var R=function(c,x){return c.allocUnsafe?c.allocUnsafe(x):new c(x)};a.prototype.toArrayLike=function(c,x,U){this._strip();var k=this.byteLength(),T=U||Math.max(1,k);n(k<=T,"byte array longer than desired length"),n(T>0,"Requested array length <= 0");var F=R(c,T),q=x==="le"?"LE":"BE";return this["_toArrayLike"+q](F,k),F},a.prototype._toArrayLikeLE=function(c,x){for(var U=0,k=0,T=0,F=0;T>8&255),U>16&255),F===6?(U>24&255),k=0,F=0):(k=q>>>24,F+=2)}if(U=0&&(c[U--]=q>>8&255),U>=0&&(c[U--]=q>>16&255),F===6?(U>=0&&(c[U--]=q>>24&255),k=0,F=0):(k=q>>>24,F+=2)}if(U>=0)for(c[U--]=k;U>=0;)c[U--]=0},Math.clz32?a.prototype._countBits=function(c){return 32-Math.clz32(c)}:a.prototype._countBits=function(c){var x=c,U=0;return x>=4096&&(U+=13,x>>>=13),x>=64&&(U+=7,x>>>=7),x>=8&&(U+=4,x>>>=4),x>=2&&(U+=2,x>>>=2),U+x},a.prototype._zeroBits=function(c){if(c===0)return 26;var x=c,U=0;return x&8191||(U+=13,x>>>=13),x&127||(U+=7,x>>>=7),x&15||(U+=4,x>>>=4),x&3||(U+=2,x>>>=2),x&1||U++,U},a.prototype.bitLength=function(){var c=this.words[this.length-1],x=this._countBits(c);return(this.length-1)*26+x};function O(I){for(var c=new Array(I.bitLength()),x=0;x>>k&1}return c}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,x=0;xc.length?this.clone().ior(c):c.clone().ior(this)},a.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},a.prototype.iuand=function(c){var x;this.length>c.length?x=c:x=this;for(var U=0;Uc.length?this.clone().iand(c):c.clone().iand(this)},a.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},a.prototype.iuxor=function(c){var x,U;this.length>c.length?(x=this,U=c):(x=c,U=this);for(var k=0;kc.length?this.clone().ixor(c):c.clone().ixor(this)},a.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},a.prototype.inotn=function(c){n(typeof c=="number"&&c>=0);var x=Math.ceil(c/26)|0,U=c%26;this._expand(x),U>0&&x--;for(var k=0;k0&&(this.words[k]=~this.words[k]&67108863>>26-U),this._strip()},a.prototype.notn=function(c){return this.clone().inotn(c)},a.prototype.setn=function(c,x){n(typeof c=="number"&&c>=0);var U=c/26|0,k=c%26;return this._expand(U+1),x?this.words[U]=this.words[U]|1<c.length?(U=this,k=c):(U=c,k=this);for(var T=0,F=0;F>>26;for(;T!==0&&F>>26;if(this.length=U.length,T!==0)this.words[this.length]=T,this.length++;else if(U!==this)for(;Fc.length?this.clone().iadd(c):c.clone().iadd(this)},a.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var x=this.iadd(c);return c.negative=1,x._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var U=this.cmp(c);if(U===0)return this.negative=0,this.length=1,this.words[0]=0,this;var k,T;U>0?(k=this,T=c):(k=c,T=this);for(var F=0,q=0;q>26,this.words[q]=x&67108863;for(;F!==0&&q>26,this.words[q]=x&67108863;if(F===0&&q>>26,S=b&67108863,p=Math.min(l,c.length-1),L=Math.max(0,l-I.length+1);L<=p;L++){var j=l-L|0;k=I.words[j]|0,T=c.words[L]|0,F=k*T+S,m+=F/67108864|0,S=F&67108863}x.words[l]=S|0,b=m|0}return b!==0?x.words[l]=b|0:x.length--,x._strip()}var _=function(c,x,U){var k=c.words,T=x.words,F=U.words,q=0,b,l,m,S=k[0]|0,p=S&8191,L=S>>>13,j=k[1]|0,V=j&8191,G=j>>>13,re=k[2]|0,ie=re&8191,oe=re>>>13,Se=k[3]|0,be=Se&8191,Ae=Se>>>13,je=k[4]|0,Oe=je&8191,Ce=je>>>13,Pe=k[5]|0,Be=Pe&8191,Ne=Pe>>>13,e0=k[6]|0,Ie=e0&8191,qe=e0>>>13,T0=k[7]|0,Je=T0&8191,c0=T0>>>13,et=k[8]|0,n0=et&8191,i0=et>>>13,dt=k[9]|0,a0=dt&8191,m0=dt>>>13,_0=T[0]|0,Ye=_0&8191,o0=_0>>>13,$0=T[1]|0,s0=$0&8191,Ve=$0>>>13,ht=T[2]|0,u0=ht&8191,d0=ht>>>13,tt=T[3]|0,De=tt&8191,v0=tt>>>13,ut=T[4]|0,l0=ut&8191,Xe=ut>>>13,gt=T[5]|0,t0=gt&8191,y0=gt>>>13,pt=T[6]|0,g0=pt&8191,E0=pt>>>13,Z1=T[7]|0,C0=Z1&8191,O0=Z1>>>13,Ft=T[8]|0,R0=Ft&8191,I0=Ft>>>13,Mr=T[9]|0,B0=Mr&8191,P0=Mr>>>13;U.negative=c.negative^x.negative,U.length=19,b=Math.imul(p,Ye),l=Math.imul(p,o0),l=l+Math.imul(L,Ye)|0,m=Math.imul(L,o0);var er=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(er>>>26)|0,er&=67108863,b=Math.imul(V,Ye),l=Math.imul(V,o0),l=l+Math.imul(G,Ye)|0,m=Math.imul(G,o0),b=b+Math.imul(p,s0)|0,l=l+Math.imul(p,Ve)|0,l=l+Math.imul(L,s0)|0,m=m+Math.imul(L,Ve)|0;var xt=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(xt>>>26)|0,xt&=67108863,b=Math.imul(ie,Ye),l=Math.imul(ie,o0),l=l+Math.imul(oe,Ye)|0,m=Math.imul(oe,o0),b=b+Math.imul(V,s0)|0,l=l+Math.imul(V,Ve)|0,l=l+Math.imul(G,s0)|0,m=m+Math.imul(G,Ve)|0,b=b+Math.imul(p,u0)|0,l=l+Math.imul(p,d0)|0,l=l+Math.imul(L,u0)|0,m=m+Math.imul(L,d0)|0;var y1=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(y1>>>26)|0,y1&=67108863,b=Math.imul(be,Ye),l=Math.imul(be,o0),l=l+Math.imul(Ae,Ye)|0,m=Math.imul(Ae,o0),b=b+Math.imul(ie,s0)|0,l=l+Math.imul(ie,Ve)|0,l=l+Math.imul(oe,s0)|0,m=m+Math.imul(oe,Ve)|0,b=b+Math.imul(V,u0)|0,l=l+Math.imul(V,d0)|0,l=l+Math.imul(G,u0)|0,m=m+Math.imul(G,d0)|0,b=b+Math.imul(p,De)|0,l=l+Math.imul(p,v0)|0,l=l+Math.imul(L,De)|0,m=m+Math.imul(L,v0)|0;var g1=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(g1>>>26)|0,g1&=67108863,b=Math.imul(Oe,Ye),l=Math.imul(Oe,o0),l=l+Math.imul(Ce,Ye)|0,m=Math.imul(Ce,o0),b=b+Math.imul(be,s0)|0,l=l+Math.imul(be,Ve)|0,l=l+Math.imul(Ae,s0)|0,m=m+Math.imul(Ae,Ve)|0,b=b+Math.imul(ie,u0)|0,l=l+Math.imul(ie,d0)|0,l=l+Math.imul(oe,u0)|0,m=m+Math.imul(oe,d0)|0,b=b+Math.imul(V,De)|0,l=l+Math.imul(V,v0)|0,l=l+Math.imul(G,De)|0,m=m+Math.imul(G,v0)|0,b=b+Math.imul(p,l0)|0,l=l+Math.imul(p,Xe)|0,l=l+Math.imul(L,l0)|0,m=m+Math.imul(L,Xe)|0;var Qe=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,b=Math.imul(Be,Ye),l=Math.imul(Be,o0),l=l+Math.imul(Ne,Ye)|0,m=Math.imul(Ne,o0),b=b+Math.imul(Oe,s0)|0,l=l+Math.imul(Oe,Ve)|0,l=l+Math.imul(Ce,s0)|0,m=m+Math.imul(Ce,Ve)|0,b=b+Math.imul(be,u0)|0,l=l+Math.imul(be,d0)|0,l=l+Math.imul(Ae,u0)|0,m=m+Math.imul(Ae,d0)|0,b=b+Math.imul(ie,De)|0,l=l+Math.imul(ie,v0)|0,l=l+Math.imul(oe,De)|0,m=m+Math.imul(oe,v0)|0,b=b+Math.imul(V,l0)|0,l=l+Math.imul(V,Xe)|0,l=l+Math.imul(G,l0)|0,m=m+Math.imul(G,Xe)|0,b=b+Math.imul(p,t0)|0,l=l+Math.imul(p,y0)|0,l=l+Math.imul(L,t0)|0,m=m+Math.imul(L,y0)|0;var F6=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(F6>>>26)|0,F6&=67108863,b=Math.imul(Ie,Ye),l=Math.imul(Ie,o0),l=l+Math.imul(qe,Ye)|0,m=Math.imul(qe,o0),b=b+Math.imul(Be,s0)|0,l=l+Math.imul(Be,Ve)|0,l=l+Math.imul(Ne,s0)|0,m=m+Math.imul(Ne,Ve)|0,b=b+Math.imul(Oe,u0)|0,l=l+Math.imul(Oe,d0)|0,l=l+Math.imul(Ce,u0)|0,m=m+Math.imul(Ce,d0)|0,b=b+Math.imul(be,De)|0,l=l+Math.imul(be,v0)|0,l=l+Math.imul(Ae,De)|0,m=m+Math.imul(Ae,v0)|0,b=b+Math.imul(ie,l0)|0,l=l+Math.imul(ie,Xe)|0,l=l+Math.imul(oe,l0)|0,m=m+Math.imul(oe,Xe)|0,b=b+Math.imul(V,t0)|0,l=l+Math.imul(V,y0)|0,l=l+Math.imul(G,t0)|0,m=m+Math.imul(G,y0)|0,b=b+Math.imul(p,g0)|0,l=l+Math.imul(p,E0)|0,l=l+Math.imul(L,g0)|0,m=m+Math.imul(L,E0)|0;var tr=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(tr>>>26)|0,tr&=67108863,b=Math.imul(Je,Ye),l=Math.imul(Je,o0),l=l+Math.imul(c0,Ye)|0,m=Math.imul(c0,o0),b=b+Math.imul(Ie,s0)|0,l=l+Math.imul(Ie,Ve)|0,l=l+Math.imul(qe,s0)|0,m=m+Math.imul(qe,Ve)|0,b=b+Math.imul(Be,u0)|0,l=l+Math.imul(Be,d0)|0,l=l+Math.imul(Ne,u0)|0,m=m+Math.imul(Ne,d0)|0,b=b+Math.imul(Oe,De)|0,l=l+Math.imul(Oe,v0)|0,l=l+Math.imul(Ce,De)|0,m=m+Math.imul(Ce,v0)|0,b=b+Math.imul(be,l0)|0,l=l+Math.imul(be,Xe)|0,l=l+Math.imul(Ae,l0)|0,m=m+Math.imul(Ae,Xe)|0,b=b+Math.imul(ie,t0)|0,l=l+Math.imul(ie,y0)|0,l=l+Math.imul(oe,t0)|0,m=m+Math.imul(oe,y0)|0,b=b+Math.imul(V,g0)|0,l=l+Math.imul(V,E0)|0,l=l+Math.imul(G,g0)|0,m=m+Math.imul(G,E0)|0,b=b+Math.imul(p,C0)|0,l=l+Math.imul(p,O0)|0,l=l+Math.imul(L,C0)|0,m=m+Math.imul(L,O0)|0;var j6=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(j6>>>26)|0,j6&=67108863,b=Math.imul(n0,Ye),l=Math.imul(n0,o0),l=l+Math.imul(i0,Ye)|0,m=Math.imul(i0,o0),b=b+Math.imul(Je,s0)|0,l=l+Math.imul(Je,Ve)|0,l=l+Math.imul(c0,s0)|0,m=m+Math.imul(c0,Ve)|0,b=b+Math.imul(Ie,u0)|0,l=l+Math.imul(Ie,d0)|0,l=l+Math.imul(qe,u0)|0,m=m+Math.imul(qe,d0)|0,b=b+Math.imul(Be,De)|0,l=l+Math.imul(Be,v0)|0,l=l+Math.imul(Ne,De)|0,m=m+Math.imul(Ne,v0)|0,b=b+Math.imul(Oe,l0)|0,l=l+Math.imul(Oe,Xe)|0,l=l+Math.imul(Ce,l0)|0,m=m+Math.imul(Ce,Xe)|0,b=b+Math.imul(be,t0)|0,l=l+Math.imul(be,y0)|0,l=l+Math.imul(Ae,t0)|0,m=m+Math.imul(Ae,y0)|0,b=b+Math.imul(ie,g0)|0,l=l+Math.imul(ie,E0)|0,l=l+Math.imul(oe,g0)|0,m=m+Math.imul(oe,E0)|0,b=b+Math.imul(V,C0)|0,l=l+Math.imul(V,O0)|0,l=l+Math.imul(G,C0)|0,m=m+Math.imul(G,O0)|0,b=b+Math.imul(p,R0)|0,l=l+Math.imul(p,I0)|0,l=l+Math.imul(L,R0)|0,m=m+Math.imul(L,I0)|0;var Jn=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,b=Math.imul(a0,Ye),l=Math.imul(a0,o0),l=l+Math.imul(m0,Ye)|0,m=Math.imul(m0,o0),b=b+Math.imul(n0,s0)|0,l=l+Math.imul(n0,Ve)|0,l=l+Math.imul(i0,s0)|0,m=m+Math.imul(i0,Ve)|0,b=b+Math.imul(Je,u0)|0,l=l+Math.imul(Je,d0)|0,l=l+Math.imul(c0,u0)|0,m=m+Math.imul(c0,d0)|0,b=b+Math.imul(Ie,De)|0,l=l+Math.imul(Ie,v0)|0,l=l+Math.imul(qe,De)|0,m=m+Math.imul(qe,v0)|0,b=b+Math.imul(Be,l0)|0,l=l+Math.imul(Be,Xe)|0,l=l+Math.imul(Ne,l0)|0,m=m+Math.imul(Ne,Xe)|0,b=b+Math.imul(Oe,t0)|0,l=l+Math.imul(Oe,y0)|0,l=l+Math.imul(Ce,t0)|0,m=m+Math.imul(Ce,y0)|0,b=b+Math.imul(be,g0)|0,l=l+Math.imul(be,E0)|0,l=l+Math.imul(Ae,g0)|0,m=m+Math.imul(Ae,E0)|0,b=b+Math.imul(ie,C0)|0,l=l+Math.imul(ie,O0)|0,l=l+Math.imul(oe,C0)|0,m=m+Math.imul(oe,O0)|0,b=b+Math.imul(V,R0)|0,l=l+Math.imul(V,I0)|0,l=l+Math.imul(G,R0)|0,m=m+Math.imul(G,I0)|0,b=b+Math.imul(p,B0)|0,l=l+Math.imul(p,P0)|0,l=l+Math.imul(L,B0)|0,m=m+Math.imul(L,P0)|0;var Yn=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,b=Math.imul(a0,s0),l=Math.imul(a0,Ve),l=l+Math.imul(m0,s0)|0,m=Math.imul(m0,Ve),b=b+Math.imul(n0,u0)|0,l=l+Math.imul(n0,d0)|0,l=l+Math.imul(i0,u0)|0,m=m+Math.imul(i0,d0)|0,b=b+Math.imul(Je,De)|0,l=l+Math.imul(Je,v0)|0,l=l+Math.imul(c0,De)|0,m=m+Math.imul(c0,v0)|0,b=b+Math.imul(Ie,l0)|0,l=l+Math.imul(Ie,Xe)|0,l=l+Math.imul(qe,l0)|0,m=m+Math.imul(qe,Xe)|0,b=b+Math.imul(Be,t0)|0,l=l+Math.imul(Be,y0)|0,l=l+Math.imul(Ne,t0)|0,m=m+Math.imul(Ne,y0)|0,b=b+Math.imul(Oe,g0)|0,l=l+Math.imul(Oe,E0)|0,l=l+Math.imul(Ce,g0)|0,m=m+Math.imul(Ce,E0)|0,b=b+Math.imul(be,C0)|0,l=l+Math.imul(be,O0)|0,l=l+Math.imul(Ae,C0)|0,m=m+Math.imul(Ae,O0)|0,b=b+Math.imul(ie,R0)|0,l=l+Math.imul(ie,I0)|0,l=l+Math.imul(oe,R0)|0,m=m+Math.imul(oe,I0)|0,b=b+Math.imul(V,B0)|0,l=l+Math.imul(V,P0)|0,l=l+Math.imul(G,B0)|0,m=m+Math.imul(G,P0)|0;var D6=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(D6>>>26)|0,D6&=67108863,b=Math.imul(a0,u0),l=Math.imul(a0,d0),l=l+Math.imul(m0,u0)|0,m=Math.imul(m0,d0),b=b+Math.imul(n0,De)|0,l=l+Math.imul(n0,v0)|0,l=l+Math.imul(i0,De)|0,m=m+Math.imul(i0,v0)|0,b=b+Math.imul(Je,l0)|0,l=l+Math.imul(Je,Xe)|0,l=l+Math.imul(c0,l0)|0,m=m+Math.imul(c0,Xe)|0,b=b+Math.imul(Ie,t0)|0,l=l+Math.imul(Ie,y0)|0,l=l+Math.imul(qe,t0)|0,m=m+Math.imul(qe,y0)|0,b=b+Math.imul(Be,g0)|0,l=l+Math.imul(Be,E0)|0,l=l+Math.imul(Ne,g0)|0,m=m+Math.imul(Ne,E0)|0,b=b+Math.imul(Oe,C0)|0,l=l+Math.imul(Oe,O0)|0,l=l+Math.imul(Ce,C0)|0,m=m+Math.imul(Ce,O0)|0,b=b+Math.imul(be,R0)|0,l=l+Math.imul(be,I0)|0,l=l+Math.imul(Ae,R0)|0,m=m+Math.imul(Ae,I0)|0,b=b+Math.imul(ie,B0)|0,l=l+Math.imul(ie,P0)|0,l=l+Math.imul(oe,B0)|0,m=m+Math.imul(oe,P0)|0;var z6=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(z6>>>26)|0,z6&=67108863,b=Math.imul(a0,De),l=Math.imul(a0,v0),l=l+Math.imul(m0,De)|0,m=Math.imul(m0,v0),b=b+Math.imul(n0,l0)|0,l=l+Math.imul(n0,Xe)|0,l=l+Math.imul(i0,l0)|0,m=m+Math.imul(i0,Xe)|0,b=b+Math.imul(Je,t0)|0,l=l+Math.imul(Je,y0)|0,l=l+Math.imul(c0,t0)|0,m=m+Math.imul(c0,y0)|0,b=b+Math.imul(Ie,g0)|0,l=l+Math.imul(Ie,E0)|0,l=l+Math.imul(qe,g0)|0,m=m+Math.imul(qe,E0)|0,b=b+Math.imul(Be,C0)|0,l=l+Math.imul(Be,O0)|0,l=l+Math.imul(Ne,C0)|0,m=m+Math.imul(Ne,O0)|0,b=b+Math.imul(Oe,R0)|0,l=l+Math.imul(Oe,I0)|0,l=l+Math.imul(Ce,R0)|0,m=m+Math.imul(Ce,I0)|0,b=b+Math.imul(be,B0)|0,l=l+Math.imul(be,P0)|0,l=l+Math.imul(Ae,B0)|0,m=m+Math.imul(Ae,P0)|0;var Xn=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,b=Math.imul(a0,l0),l=Math.imul(a0,Xe),l=l+Math.imul(m0,l0)|0,m=Math.imul(m0,Xe),b=b+Math.imul(n0,t0)|0,l=l+Math.imul(n0,y0)|0,l=l+Math.imul(i0,t0)|0,m=m+Math.imul(i0,y0)|0,b=b+Math.imul(Je,g0)|0,l=l+Math.imul(Je,E0)|0,l=l+Math.imul(c0,g0)|0,m=m+Math.imul(c0,E0)|0,b=b+Math.imul(Ie,C0)|0,l=l+Math.imul(Ie,O0)|0,l=l+Math.imul(qe,C0)|0,m=m+Math.imul(qe,O0)|0,b=b+Math.imul(Be,R0)|0,l=l+Math.imul(Be,I0)|0,l=l+Math.imul(Ne,R0)|0,m=m+Math.imul(Ne,I0)|0,b=b+Math.imul(Oe,B0)|0,l=l+Math.imul(Oe,P0)|0,l=l+Math.imul(Ce,B0)|0,m=m+Math.imul(Ce,P0)|0;var vt=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(vt>>>26)|0,vt&=67108863,b=Math.imul(a0,t0),l=Math.imul(a0,y0),l=l+Math.imul(m0,t0)|0,m=Math.imul(m0,y0),b=b+Math.imul(n0,g0)|0,l=l+Math.imul(n0,E0)|0,l=l+Math.imul(i0,g0)|0,m=m+Math.imul(i0,E0)|0,b=b+Math.imul(Je,C0)|0,l=l+Math.imul(Je,O0)|0,l=l+Math.imul(c0,C0)|0,m=m+Math.imul(c0,O0)|0,b=b+Math.imul(Ie,R0)|0,l=l+Math.imul(Ie,I0)|0,l=l+Math.imul(qe,R0)|0,m=m+Math.imul(qe,I0)|0,b=b+Math.imul(Be,B0)|0,l=l+Math.imul(Be,P0)|0,l=l+Math.imul(Ne,B0)|0,m=m+Math.imul(Ne,P0)|0;var Ze=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,b=Math.imul(a0,g0),l=Math.imul(a0,E0),l=l+Math.imul(m0,g0)|0,m=Math.imul(m0,E0),b=b+Math.imul(n0,C0)|0,l=l+Math.imul(n0,O0)|0,l=l+Math.imul(i0,C0)|0,m=m+Math.imul(i0,O0)|0,b=b+Math.imul(Je,R0)|0,l=l+Math.imul(Je,I0)|0,l=l+Math.imul(c0,R0)|0,m=m+Math.imul(c0,I0)|0,b=b+Math.imul(Ie,B0)|0,l=l+Math.imul(Ie,P0)|0,l=l+Math.imul(qe,B0)|0,m=m+Math.imul(qe,P0)|0;var $6=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+($6>>>26)|0,$6&=67108863,b=Math.imul(a0,C0),l=Math.imul(a0,O0),l=l+Math.imul(m0,C0)|0,m=Math.imul(m0,O0),b=b+Math.imul(n0,R0)|0,l=l+Math.imul(n0,I0)|0,l=l+Math.imul(i0,R0)|0,m=m+Math.imul(i0,I0)|0,b=b+Math.imul(Je,B0)|0,l=l+Math.imul(Je,P0)|0,l=l+Math.imul(c0,B0)|0,m=m+Math.imul(c0,P0)|0;var Zn=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(Zn>>>26)|0,Zn&=67108863,b=Math.imul(a0,R0),l=Math.imul(a0,I0),l=l+Math.imul(m0,R0)|0,m=Math.imul(m0,I0),b=b+Math.imul(n0,B0)|0,l=l+Math.imul(n0,P0)|0,l=l+Math.imul(i0,B0)|0,m=m+Math.imul(i0,P0)|0;var e6=(q+b|0)+((l&8191)<<13)|0;q=(m+(l>>>13)|0)+(e6>>>26)|0,e6&=67108863,b=Math.imul(a0,B0),l=Math.imul(a0,P0),l=l+Math.imul(m0,B0)|0,m=Math.imul(m0,P0);var f2=(q+b|0)+((l&8191)<<13)|0;return q=(m+(l>>>13)|0)+(f2>>>26)|0,f2&=67108863,F[0]=er,F[1]=xt,F[2]=y1,F[3]=g1,F[4]=Qe,F[5]=F6,F[6]=tr,F[7]=j6,F[8]=Jn,F[9]=Yn,F[10]=D6,F[11]=z6,F[12]=Xn,F[13]=vt,F[14]=Ze,F[15]=$6,F[16]=Zn,F[17]=e6,F[18]=f2,q!==0&&(F[19]=q,U.length++),U};Math.imul||(_=C);function M(I,c,x){x.negative=c.negative^I.negative,x.length=I.length+c.length;for(var U=0,k=0,T=0;T>>26)|0,k+=F>>>26,F&=67108863}x.words[T]=q,U=F,F=k}return U!==0?x.words[T]=U:x.length--,x._strip()}function z(I,c,x){return M(I,c,x)}a.prototype.mulTo=function(c,x){var U,k=this.length+c.length;return this.length===10&&c.length===10?U=_(this,c,x):k<63?U=C(this,c,x):k<1024?U=M(this,c,x):U=z(this,c,x),U},a.prototype.mul=function(c){var x=new a(null);return x.words=new Array(this.length+c.length),this.mulTo(c,x)},a.prototype.mulf=function(c){var x=new a(null);return x.words=new Array(this.length+c.length),z(this,c,x)},a.prototype.imul=function(c){return this.clone().mulTo(c,this)},a.prototype.imuln=function(c){var x=c<0;x&&(c=-c),n(typeof c=="number"),n(c<67108864);for(var U=0,k=0;k>=26,U+=T/67108864|0,U+=F>>>26,this.words[k]=F&67108863}return U!==0&&(this.words[k]=U,this.length++),x?this.ineg():this},a.prototype.muln=function(c){return this.clone().imuln(c)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(c){var x=O(c);if(x.length===0)return new a(1);for(var U=this,k=0;k=0);var x=c%26,U=(c-x)/26,k=67108863>>>26-x<<26-x,T;if(x!==0){var F=0;for(T=0;T>>26-x}F&&(this.words[T]=F,this.length++)}if(U!==0){for(T=this.length-1;T>=0;T--)this.words[T+U]=this.words[T];for(T=0;T=0);var k;x?k=(x-x%26)/26:k=0;var T=c%26,F=Math.min((c-T)/26,this.length),q=67108863^67108863>>>T<F)for(this.length-=F,l=0;l=0&&(m!==0||l>=k);l--){var S=this.words[l]|0;this.words[l]=m<<26-T|S>>>T,m=S&q}return b&&m!==0&&(b.words[b.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(c,x,U){return n(this.negative===0),this.iushrn(c,x,U)},a.prototype.shln=function(c){return this.clone().ishln(c)},a.prototype.ushln=function(c){return this.clone().iushln(c)},a.prototype.shrn=function(c){return this.clone().ishrn(c)},a.prototype.ushrn=function(c){return this.clone().iushrn(c)},a.prototype.testn=function(c){n(typeof c=="number"&&c>=0);var x=c%26,U=(c-x)/26,k=1<=0);var x=c%26,U=(c-x)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=U)return this;if(x!==0&&U++,this.length=Math.min(U,this.length),x!==0){var k=67108863^67108863>>>x<=67108864;x++)this.words[x]-=67108864,x===this.length-1?this.words[x+1]=1:this.words[x+1]++;return this.length=Math.max(this.length,x+1),this},a.prototype.isubn=function(c){if(n(typeof c=="number"),n(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var x=0;x>26)-(b/67108864|0),this.words[T+U]=F&67108863}for(;T>26,this.words[T+U]=F&67108863;if(q===0)return this._strip();for(n(q===-1),q=0,T=0;T>26,this.words[T]=F&67108863;return this.negative=1,this._strip()},a.prototype._wordDiv=function(c,x){var U=this.length-c.length,k=this.clone(),T=c,F=T.words[T.length-1]|0,q=this._countBits(F);U=26-q,U!==0&&(T=T.ushln(U),k.iushln(U),F=T.words[T.length-1]|0);var b=k.length-T.length,l;if(x!=="mod"){l=new a(null),l.length=b+1,l.words=new Array(l.length);for(var m=0;m=0;p--){var L=(k.words[T.length+p]|0)*67108864+(k.words[T.length+p-1]|0);for(L=Math.min(L/F|0,67108863),k._ishlnsubmul(T,L,p);k.negative!==0;)L--,k.negative=0,k._ishlnsubmul(T,1,p),k.isZero()||(k.negative^=1);l&&(l.words[p]=L)}return l&&l._strip(),k._strip(),x!=="div"&&U!==0&&k.iushrn(U),{div:l||null,mod:k}},a.prototype.divmod=function(c,x,U){if(n(!c.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var k,T,F;return this.negative!==0&&c.negative===0?(F=this.neg().divmod(c,x),x!=="mod"&&(k=F.div.neg()),x!=="div"&&(T=F.mod.neg(),U&&T.negative!==0&&T.iadd(c)),{div:k,mod:T}):this.negative===0&&c.negative!==0?(F=this.divmod(c.neg(),x),x!=="mod"&&(k=F.div.neg()),{div:k,mod:F.mod}):this.negative&c.negative?(F=this.neg().divmod(c.neg(),x),x!=="div"&&(T=F.mod.neg(),U&&T.negative!==0&&T.isub(c)),{div:F.div,mod:T}):c.length>this.length||this.cmp(c)<0?{div:new a(0),mod:this}:c.length===1?x==="div"?{div:this.divn(c.words[0]),mod:null}:x==="mod"?{div:null,mod:new a(this.modrn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new a(this.modrn(c.words[0]))}:this._wordDiv(c,x)},a.prototype.div=function(c){return this.divmod(c,"div",!1).div},a.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},a.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},a.prototype.divRound=function(c){var x=this.divmod(c);if(x.mod.isZero())return x.div;var U=x.div.negative!==0?x.mod.isub(c):x.mod,k=c.ushrn(1),T=c.andln(1),F=U.cmp(k);return F<0||T===1&&F===0?x.div:x.div.negative!==0?x.div.isubn(1):x.div.iaddn(1)},a.prototype.modrn=function(c){var x=c<0;x&&(c=-c),n(c<=67108863);for(var U=(1<<26)%c,k=0,T=this.length-1;T>=0;T--)k=(U*k+(this.words[T]|0))%c;return x?-k:k},a.prototype.modn=function(c){return this.modrn(c)},a.prototype.idivn=function(c){var x=c<0;x&&(c=-c),n(c<=67108863);for(var U=0,k=this.length-1;k>=0;k--){var T=(this.words[k]|0)+U*67108864;this.words[k]=T/c|0,U=T%c}return this._strip(),x?this.ineg():this},a.prototype.divn=function(c){return this.clone().idivn(c)},a.prototype.egcd=function(c){n(c.negative===0),n(!c.isZero());var x=this,U=c.clone();x.negative!==0?x=x.umod(c):x=x.clone();for(var k=new a(1),T=new a(0),F=new a(0),q=new a(1),b=0;x.isEven()&&U.isEven();)x.iushrn(1),U.iushrn(1),++b;for(var l=U.clone(),m=x.clone();!x.isZero();){for(var S=0,p=1;!(x.words[0]&p)&&S<26;++S,p<<=1);if(S>0)for(x.iushrn(S);S-- >0;)(k.isOdd()||T.isOdd())&&(k.iadd(l),T.isub(m)),k.iushrn(1),T.iushrn(1);for(var L=0,j=1;!(U.words[0]&j)&&L<26;++L,j<<=1);if(L>0)for(U.iushrn(L);L-- >0;)(F.isOdd()||q.isOdd())&&(F.iadd(l),q.isub(m)),F.iushrn(1),q.iushrn(1);x.cmp(U)>=0?(x.isub(U),k.isub(F),T.isub(q)):(U.isub(x),F.isub(k),q.isub(T))}return{a:F,b:q,gcd:U.iushln(b)}},a.prototype._invmp=function(c){n(c.negative===0),n(!c.isZero());var x=this,U=c.clone();x.negative!==0?x=x.umod(c):x=x.clone();for(var k=new a(1),T=new a(0),F=U.clone();x.cmpn(1)>0&&U.cmpn(1)>0;){for(var q=0,b=1;!(x.words[0]&b)&&q<26;++q,b<<=1);if(q>0)for(x.iushrn(q);q-- >0;)k.isOdd()&&k.iadd(F),k.iushrn(1);for(var l=0,m=1;!(U.words[0]&m)&&l<26;++l,m<<=1);if(l>0)for(U.iushrn(l);l-- >0;)T.isOdd()&&T.iadd(F),T.iushrn(1);x.cmp(U)>=0?(x.isub(U),k.isub(T)):(U.isub(x),T.isub(k))}var S;return x.cmpn(1)===0?S=k:S=T,S.cmpn(0)<0&&S.iadd(c),S},a.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var x=this.clone(),U=c.clone();x.negative=0,U.negative=0;for(var k=0;x.isEven()&&U.isEven();k++)x.iushrn(1),U.iushrn(1);do{for(;x.isEven();)x.iushrn(1);for(;U.isEven();)U.iushrn(1);var T=x.cmp(U);if(T<0){var F=x;x=U,U=F}else if(T===0||U.cmpn(1)===0)break;x.isub(U)}while(!0);return U.iushln(k)},a.prototype.invm=function(c){return this.egcd(c).a.umod(c)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(c){return this.words[0]&c},a.prototype.bincn=function(c){n(typeof c=="number");var x=c%26,U=(c-x)/26,k=1<>>26,q&=67108863,this.words[F]=q}return T!==0&&(this.words[F]=T,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(c){var x=c<0;if(this.negative!==0&&!x)return-1;if(this.negative===0&&x)return 1;this._strip();var U;if(this.length>1)U=1;else{x&&(c=-c),n(c<=67108863,"Number is too big");var k=this.words[0]|0;U=k===c?0:kc.length)return 1;if(this.length=0;U--){var k=this.words[U]|0,T=c.words[U]|0;if(k!==T){kT&&(x=1);break}}return x},a.prototype.gtn=function(c){return this.cmpn(c)===1},a.prototype.gt=function(c){return this.cmp(c)===1},a.prototype.gten=function(c){return this.cmpn(c)>=0},a.prototype.gte=function(c){return this.cmp(c)>=0},a.prototype.ltn=function(c){return this.cmpn(c)===-1},a.prototype.lt=function(c){return this.cmp(c)===-1},a.prototype.lten=function(c){return this.cmpn(c)<=0},a.prototype.lte=function(c){return this.cmp(c)<=0},a.prototype.eqn=function(c){return this.cmpn(c)===0},a.prototype.eq=function(c){return this.cmp(c)===0},a.red=function(c){return new N(c)},a.prototype.toRed=function(c){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(c){return this.red=c,this},a.prototype.forceRed=function(c){return n(!this.red,"Already a number in reduction context"),this._forceRed(c)},a.prototype.redAdd=function(c){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},a.prototype.redIAdd=function(c){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},a.prototype.redSub=function(c){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},a.prototype.redISub=function(c){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},a.prototype.redShl=function(c){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},a.prototype.redMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},a.prototype.redIMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(c){return n(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var $={k256:null,p224:null,p192:null,p25519:null};function Y(I,c){this.name=I,this.p=new a(c,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Y.prototype._tmp=function(){var c=new a(null);return c.words=new Array(Math.ceil(this.n/13)),c},Y.prototype.ireduce=function(c){var x=c,U;do this.split(x,this.tmp),x=this.imulK(x),x=x.iadd(this.tmp),U=x.bitLength();while(U>this.n);var k=U0?x.isub(this.p):x.strip!==void 0?x.strip():x._strip(),x},Y.prototype.split=function(c,x){c.iushrn(this.n,0,x)},Y.prototype.imulK=function(c){return c.imul(this.k)};function J(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(J,Y),J.prototype.split=function(c,x){for(var U=4194303,k=Math.min(c.length,9),T=0;T>>22,F=q}F>>>=22,c.words[T-10]=F,F===0&&c.length>10?c.length-=10:c.length-=9},J.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var x=0,U=0;U>>=26,c.words[U]=T,x=k}return x!==0&&(c.words[c.length++]=x),c},a._prime=function(c){if($[c])return $[c];var x;if(c==="k256")x=new J;else if(c==="p224")x=new ee;else if(c==="p192")x=new ae;else if(c==="p25519")x=new se;else throw new Error("Unknown prime "+c);return $[c]=x,x};function N(I){if(typeof I=="string"){var c=a._prime(I);this.m=c.p,this.prime=c}else n(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}N.prototype._verify1=function(c){n(c.negative===0,"red works only with positives"),n(c.red,"red works only with red numbers")},N.prototype._verify2=function(c,x){n((c.negative|x.negative)===0,"red works only with positives"),n(c.red&&c.red===x.red,"red works only with red numbers")},N.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):(d(c,c.umod(this.m)._forceRed(this)),c)},N.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},N.prototype.add=function(c,x){this._verify2(c,x);var U=c.add(x);return U.cmp(this.m)>=0&&U.isub(this.m),U._forceRed(this)},N.prototype.iadd=function(c,x){this._verify2(c,x);var U=c.iadd(x);return U.cmp(this.m)>=0&&U.isub(this.m),U},N.prototype.sub=function(c,x){this._verify2(c,x);var U=c.sub(x);return U.cmpn(0)<0&&U.iadd(this.m),U._forceRed(this)},N.prototype.isub=function(c,x){this._verify2(c,x);var U=c.isub(x);return U.cmpn(0)<0&&U.iadd(this.m),U},N.prototype.shl=function(c,x){return this._verify1(c),this.imod(c.ushln(x))},N.prototype.imul=function(c,x){return this._verify2(c,x),this.imod(c.imul(x))},N.prototype.mul=function(c,x){return this._verify2(c,x),this.imod(c.mul(x))},N.prototype.isqr=function(c){return this.imul(c,c.clone())},N.prototype.sqr=function(c){return this.mul(c,c)},N.prototype.sqrt=function(c){if(c.isZero())return c.clone();var x=this.m.andln(3);if(n(x%2===1),x===3){var U=this.m.add(new a(1)).iushrn(2);return this.pow(c,U)}for(var k=this.m.subn(1),T=0;!k.isZero()&&k.andln(1)===0;)T++,k.iushrn(1);n(!k.isZero());var F=new a(1).toRed(this),q=F.redNeg(),b=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);this.pow(l,b).cmp(q)!==0;)l.redIAdd(q);for(var m=this.pow(l,k),S=this.pow(c,k.addn(1).iushrn(1)),p=this.pow(c,k),L=T;p.cmp(F)!==0;){for(var j=p,V=0;j.cmp(F)!==0;V++)j=j.redSqr();n(V=0;T--){for(var m=x.words[T],S=l-1;S>=0;S--){var p=m>>S&1;if(F!==k[0]&&(F=this.sqr(F)),p===0&&q===0){b=0;continue}q<<=1,q|=p,b++,!(b!==U&&(T!==0||S!==0))&&(F=this.mul(F,k[q]),b=0,q=0)}l=26}return F},N.prototype.convertTo=function(c){var x=c.umod(this.m);return x===c?x.clone():x},N.prototype.convertFrom=function(c){var x=c.clone();return x.red=null,x},a.mont=function(c){return new X(c)};function X(I){N.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(X,N),X.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},X.prototype.convertFrom=function(c){var x=this.imod(c.mul(this.rinv));return x.red=null,x},X.prototype.imul=function(c,x){if(c.isZero()||x.isZero())return c.words[0]=0,c.length=1,c;var U=c.imul(x),k=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=U.isub(k).iushrn(this.shift),F=T;return T.cmp(this.m)>=0?F=T.isub(this.m):T.cmpn(0)<0&&(F=T.iadd(this.m)),F._forceRed(this)},X.prototype.mul=function(c,x){if(c.isZero()||x.isZero())return new a(0)._forceRed(this);var U=c.mul(x),k=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=U.isub(k).iushrn(this.shift),F=T;return T.cmp(this.m)>=0?F=T.isub(this.m):T.cmpn(0)<0&&(F=T.iadd(this.m)),F._forceRed(this)},X.prototype.invm=function(c){var x=this.imod(c._invmp(this.m).mul(this.r2));return x._forceRed(this)}})(t,f0)})(bf);var Fx=bf.exports;const Ge=N1(Fx),Vh="bignumber/5.7.0";var ka=Ge.BN;const Ir=new Z(Vh),w8={},B3=9007199254740991;function jx(t){return t!=null&&(_e.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||We(t)||typeof t=="bigint"||Kn(t))}let L3=!1;class _e{constructor(e,r){e!==w8&&Ir.throwError("cannot call constructor directly; use BigNumber.from",Z.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Wt(h0(this).fromTwos(e))}toTwos(e){return Wt(h0(this).toTwos(e))}abs(){return this._hex[0]==="-"?_e.from(this._hex.substring(1)):this}add(e){return Wt(h0(this).add(h0(e)))}sub(e){return Wt(h0(this).sub(h0(e)))}div(e){return _e.from(e).isZero()&&x1("division-by-zero","div"),Wt(h0(this).div(h0(e)))}mul(e){return Wt(h0(this).mul(h0(e)))}mod(e){const r=h0(e);return r.isNeg()&&x1("division-by-zero","mod"),Wt(h0(this).umod(r))}pow(e){const r=h0(e);return r.isNeg()&&x1("negative-power","pow"),Wt(h0(this).pow(r))}and(e){const r=h0(e);return(this.isNegative()||r.isNeg())&&x1("unbound-bitwise-result","and"),Wt(h0(this).and(r))}or(e){const r=h0(e);return(this.isNegative()||r.isNeg())&&x1("unbound-bitwise-result","or"),Wt(h0(this).or(r))}xor(e){const r=h0(e);return(this.isNegative()||r.isNeg())&&x1("unbound-bitwise-result","xor"),Wt(h0(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&x1("negative-width","mask"),Wt(h0(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&x1("negative-width","shl"),Wt(h0(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&x1("negative-width","shr"),Wt(h0(this).shrn(e))}eq(e){return h0(this).eq(h0(e))}lt(e){return h0(this).lt(h0(e))}lte(e){return h0(this).lte(h0(e))}gt(e){return h0(this).gt(h0(e))}gte(e){return h0(this).gte(h0(e))}isNegative(){return this._hex[0]==="-"}isZero(){return h0(this).isZero()}toNumber(){try{return h0(this).toNumber()}catch{x1("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Ir.throwError("this platform does not support BigInt",Z.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?L3||(L3=!0,Ir.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Ir.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Z.errors.UNEXPECTED_ARGUMENT,{}):Ir.throwError("BigNumber.toString does not accept parameters",Z.errors.UNEXPECTED_ARGUMENT,{})),h0(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof _e)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new _e(w8,Sa(e)):e.match(/^-?[0-9]+$/)?new _e(w8,Sa(new ka(e))):Ir.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&x1("underflow","BigNumber.from",e),(e>=B3||e<=-B3)&&x1("overflow","BigNumber.from",e),_e.from(String(e));const r=e;if(typeof r=="bigint")return _e.from(r.toString());if(Kn(r))return _e.from(ke(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return _e.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(We(n)||n[0]==="-"&&We(n.substring(1))))return _e.from(n)}return Ir.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Sa(t){if(typeof t!="string")return Sa(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Ir.throwArgumentError("invalid hex","value",t),t=Sa(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Wt(t){return _e.from(Sa(t))}function h0(t){const e=_e.from(t).toHexString();return e[0]==="-"?new ka("-"+e.substring(3),16):new ka(e.substring(2),16)}function x1(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Ir.throwError(t,Z.errors.NUMERIC_FAULT,n)}function Dx(t){return new ka(t,36).toString(16)}function zx(t){return new ka(t,16).toString(36)}const $t=new Z(Vh),G2={},Wh=_e.from(0),Qh=_e.from(-1);function Jh(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),$t.throwError(t,Z.errors.NUMERIC_FAULT,i)}let V2="0";for(;V2.length<256;)V2+=V2;function mf(t){if(typeof t!="number")try{t=_e.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+V2.substring(0,t):$t.throwArgumentError("invalid decimal size","decimals",t)}function ss(t,e){e==null&&(e=0);const r=mf(e);t=_e.from(t);const n=t.lt(Wh);n&&(t=t.mul(Qh));let i=t.mod(r).toString();for(;i.length2&&$t.throwArgumentError("too many decimal points","value",t);let a=i[0],o=i[1];for(a||(a="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&Jh("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?u:(typeof e[o]!==s&&$t.throwArgumentError("invalid fixed format ("+o+" not "+s+")","format."+o,e[o]),e[o]);r=a("signed","boolean",r),n=a("width","number",n),i=a("decimals","number",i)}return n%8&&$t.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&$t.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new Ti(G2,r,n,i)}}class wt{constructor(e,r,n,i){e!==G2&&$t.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Z.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&$t.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=ar(this._value,this.format.decimals),n=ar(e._value,e.format.decimals);return wt.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=ar(this._value,this.format.decimals),n=ar(e._value,e.format.decimals);return wt.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=ar(this._value,this.format.decimals),n=ar(e._value,e.format.decimals);return wt.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=ar(this._value,this.format.decimals),n=ar(e._value,e.format.decimals);return wt.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=wt.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(F3.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=wt.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(F3.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&$t.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=wt.from("1"+V2.substring(0,e),this.format),i=$x.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&$t.throwArgumentError("invalid byte width","width",e);const r=_e.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return F0(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return wt.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!jx(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),wt.fromString(ss(e,r),Ti.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=Ti.from(r),i=ar(e,n.decimals);!n.signed&&i.lt(Wh)&&Jh("unsigned value cannot be negative","overflow","value",e);let a=null;n.signed?a=i.toTwos(n.width).toHexString():(a=i.toHexString(),a=F0(a,n.width/8));const o=ss(i,n.decimals);return new wt(G2,a,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=Ti.from(r);if(ve(e).length>n.width/8)throw new Error("overflow");let i=_e.from(e);n.signed&&(i=i.fromTwos(n.width));const a=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=ss(i,n.decimals);return new wt(G2,a,o,n)}static from(e,r){if(typeof e=="string")return wt.fromString(e,r);if(Kn(e))return wt.fromBytes(e,r);try{return wt.fromValue(e,0,r)}catch(n){if(n.code!==Z.errors.INVALID_ARGUMENT)throw n}return $t.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const F3=wt.from(1),$x=wt.from("0.5");var Yh={exports:{}};/** - * [js-sha3]{@link https://github.com/emn178/js-sha3} - * - * @version 0.8.0 - * @author Chen, Yi-Cyuan [emn178@gmail.com] - * @copyright Chen, Yi-Cyuan 2015-2018 - * @license MIT - */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var a=!n&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=f0:a&&(i=self);var s=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,u=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",f="0123456789abcdef".split(""),d=[31,7936,2031616,520093696],y=[4,1024,262144,67108864],v=[1,256,65536,16777216],E=[6,1536,393216,100663296],P=[0,8,16,24],R=[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],O=[224,256,384,512],C=[128,256],_=["hex","buffer","arrayBuffer","array","digest"],M={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(p){return Object.prototype.toString.call(p)==="[object Array]"}),u&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(p){return typeof p=="object"&&p.buffer&&p.buffer.constructor===ArrayBuffer});for(var z=function(p,L,j){return function(V){return new l(p,L,p).update(V)[j]()}},$=function(p,L,j){return function(V,G){return new l(p,L,G).update(V)[j]()}},Y=function(p,L,j){return function(V,G,re,ie){return c["cshake"+p].update(V,G,re,ie)[j]()}},J=function(p,L,j){return function(V,G,re,ie){return c["kmac"+p].update(V,G,re,ie)[j]()}},ee=function(p,L,j,V){for(var G=0;G<_.length;++G){var re=_[G];p[re]=L(j,V,re)}return p},ae=function(p,L){var j=z(p,L,"hex");return j.create=function(){return new l(p,L,p)},j.update=function(V){return j.create().update(V)},ee(j,z,p,L)},se=function(p,L){var j=$(p,L,"hex");return j.create=function(V){return new l(p,L,V)},j.update=function(V,G){return j.create(G).update(V)},ee(j,$,p,L)},N=function(p,L){var j=M[p],V=Y(p,L,"hex");return V.create=function(G,re,ie){return!re&&!ie?c["shake"+p].create(G):new l(p,L,G).bytepad([re,ie],j)},V.update=function(G,re,ie,oe){return V.create(re,ie,oe).update(G)},ee(V,Y,p,L)},X=function(p,L){var j=M[p],V=J(p,L,"hex");return V.create=function(G,re,ie){return new m(p,L,re).bytepad(["KMAC",ie],j).bytepad([G],j)},V.update=function(G,re,ie,oe){return V.create(G,ie,oe).update(re)},ee(V,J,p,L)},I=[{name:"keccak",padding:v,bits:O,createMethod:ae},{name:"sha3",padding:E,bits:O,createMethod:ae},{name:"shake",padding:d,bits:C,createMethod:se},{name:"cshake",padding:y,bits:C,createMethod:N},{name:"kmac",padding:y,bits:C,createMethod:X}],c={},x=[],U=0;U>5,this.byteCount=this.blockCount<<2,this.outputBlocks=j>>5,this.extraBytes=(j&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}l.prototype.update=function(p){if(this.finalized)throw new Error(r);var L,j=typeof p;if(j!=="string"){if(j==="object"){if(p===null)throw new Error(e);if(u&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!Array.isArray(p)&&(!u||!ArrayBuffer.isView(p)))throw new Error(e)}else throw new Error(e);L=!0}for(var V=this.blocks,G=this.byteCount,re=p.length,ie=this.blockCount,oe=0,Se=this.s,be,Ae;oe>2]|=p[oe]<>2]|=Ae<>2]|=(192|Ae>>6)<>2]|=(128|Ae&63)<=57344?(V[be>>2]|=(224|Ae>>12)<>2]|=(128|Ae>>6&63)<>2]|=(128|Ae&63)<>2]|=(240|Ae>>18)<>2]|=(128|Ae>>12&63)<>2]|=(128|Ae>>6&63)<>2]|=(128|Ae&63)<=G){for(this.start=be-G,this.block=V[ie],be=0;be>8,j=p&255;j>0;)G.unshift(j),p=p>>8,j=p&255,++V;return L?G.push(V):G.unshift(V),this.update(G),G.length},l.prototype.encodeString=function(p){var L,j=typeof p;if(j!=="string"){if(j==="object"){if(p===null)throw new Error(e);if(u&&p.constructor===ArrayBuffer)p=new Uint8Array(p);else if(!Array.isArray(p)&&(!u||!ArrayBuffer.isView(p)))throw new Error(e)}else throw new Error(e);L=!0}var V=0,G=p.length;if(L)V=G;else for(var re=0;re=57344?V+=3:(ie=65536+((ie&1023)<<10|p.charCodeAt(++re)&1023),V+=4)}return V+=this.encode(V*8),this.update(p),V},l.prototype.bytepad=function(p,L){for(var j=this.encode(L),V=0;V>2]|=this.padding[L&3],this.lastByteIndex===this.byteCount)for(p[0]=p[j],L=1;L>4&15]+f[oe&15]+f[oe>>12&15]+f[oe>>8&15]+f[oe>>20&15]+f[oe>>16&15]+f[oe>>28&15]+f[oe>>24&15];re%p===0&&(S(L),G=0)}return V&&(oe=L[G],ie+=f[oe>>4&15]+f[oe&15],V>1&&(ie+=f[oe>>12&15]+f[oe>>8&15]),V>2&&(ie+=f[oe>>20&15]+f[oe>>16&15])),ie},l.prototype.arrayBuffer=function(){this.finalize();var p=this.blockCount,L=this.s,j=this.outputBlocks,V=this.extraBytes,G=0,re=0,ie=this.outputBits>>3,oe;V?oe=new ArrayBuffer(j+1<<2):oe=new ArrayBuffer(ie);for(var Se=new Uint32Array(oe);re>8&255,ie[oe+2]=Se>>16&255,ie[oe+3]=Se>>24&255;re%p===0&&S(L)}return V&&(oe=re<<2,Se=L[G],ie[oe]=Se&255,V>1&&(ie[oe+1]=Se>>8&255),V>2&&(ie[oe+2]=Se>>16&255)),ie};function m(p,L,j){l.call(this,p,L,j)}m.prototype=new l,m.prototype.finalize=function(){return this.encode(this.outputBits,!0),l.prototype.finalize.call(this)};var S=function(p){var L,j,V,G,re,ie,oe,Se,be,Ae,je,Oe,Ce,Pe,Be,Ne,e0,Ie,qe,T0,Je,c0,et,n0,i0,dt,a0,m0,_0,Ye,o0,$0,s0,Ve,ht,u0,d0,tt,De,v0,ut,l0,Xe,gt,t0,y0,pt,g0,E0,Z1,C0,O0,Ft,R0,I0,Mr,B0,P0,er,xt,y1,g1,Qe;for(V=0;V<48;V+=2)G=p[0]^p[10]^p[20]^p[30]^p[40],re=p[1]^p[11]^p[21]^p[31]^p[41],ie=p[2]^p[12]^p[22]^p[32]^p[42],oe=p[3]^p[13]^p[23]^p[33]^p[43],Se=p[4]^p[14]^p[24]^p[34]^p[44],be=p[5]^p[15]^p[25]^p[35]^p[45],Ae=p[6]^p[16]^p[26]^p[36]^p[46],je=p[7]^p[17]^p[27]^p[37]^p[47],Oe=p[8]^p[18]^p[28]^p[38]^p[48],Ce=p[9]^p[19]^p[29]^p[39]^p[49],L=Oe^(ie<<1|oe>>>31),j=Ce^(oe<<1|ie>>>31),p[0]^=L,p[1]^=j,p[10]^=L,p[11]^=j,p[20]^=L,p[21]^=j,p[30]^=L,p[31]^=j,p[40]^=L,p[41]^=j,L=G^(Se<<1|be>>>31),j=re^(be<<1|Se>>>31),p[2]^=L,p[3]^=j,p[12]^=L,p[13]^=j,p[22]^=L,p[23]^=j,p[32]^=L,p[33]^=j,p[42]^=L,p[43]^=j,L=ie^(Ae<<1|je>>>31),j=oe^(je<<1|Ae>>>31),p[4]^=L,p[5]^=j,p[14]^=L,p[15]^=j,p[24]^=L,p[25]^=j,p[34]^=L,p[35]^=j,p[44]^=L,p[45]^=j,L=Se^(Oe<<1|Ce>>>31),j=be^(Ce<<1|Oe>>>31),p[6]^=L,p[7]^=j,p[16]^=L,p[17]^=j,p[26]^=L,p[27]^=j,p[36]^=L,p[37]^=j,p[46]^=L,p[47]^=j,L=Ae^(G<<1|re>>>31),j=je^(re<<1|G>>>31),p[8]^=L,p[9]^=j,p[18]^=L,p[19]^=j,p[28]^=L,p[29]^=j,p[38]^=L,p[39]^=j,p[48]^=L,p[49]^=j,Pe=p[0],Be=p[1],y0=p[11]<<4|p[10]>>>28,pt=p[10]<<4|p[11]>>>28,m0=p[20]<<3|p[21]>>>29,_0=p[21]<<3|p[20]>>>29,xt=p[31]<<9|p[30]>>>23,y1=p[30]<<9|p[31]>>>23,l0=p[40]<<18|p[41]>>>14,Xe=p[41]<<18|p[40]>>>14,Ve=p[2]<<1|p[3]>>>31,ht=p[3]<<1|p[2]>>>31,Ne=p[13]<<12|p[12]>>>20,e0=p[12]<<12|p[13]>>>20,g0=p[22]<<10|p[23]>>>22,E0=p[23]<<10|p[22]>>>22,Ye=p[33]<<13|p[32]>>>19,o0=p[32]<<13|p[33]>>>19,g1=p[42]<<2|p[43]>>>30,Qe=p[43]<<2|p[42]>>>30,R0=p[5]<<30|p[4]>>>2,I0=p[4]<<30|p[5]>>>2,u0=p[14]<<6|p[15]>>>26,d0=p[15]<<6|p[14]>>>26,Ie=p[25]<<11|p[24]>>>21,qe=p[24]<<11|p[25]>>>21,Z1=p[34]<<15|p[35]>>>17,C0=p[35]<<15|p[34]>>>17,$0=p[45]<<29|p[44]>>>3,s0=p[44]<<29|p[45]>>>3,n0=p[6]<<28|p[7]>>>4,i0=p[7]<<28|p[6]>>>4,Mr=p[17]<<23|p[16]>>>9,B0=p[16]<<23|p[17]>>>9,tt=p[26]<<25|p[27]>>>7,De=p[27]<<25|p[26]>>>7,T0=p[36]<<21|p[37]>>>11,Je=p[37]<<21|p[36]>>>11,O0=p[47]<<24|p[46]>>>8,Ft=p[46]<<24|p[47]>>>8,gt=p[8]<<27|p[9]>>>5,t0=p[9]<<27|p[8]>>>5,dt=p[18]<<20|p[19]>>>12,a0=p[19]<<20|p[18]>>>12,P0=p[29]<<7|p[28]>>>25,er=p[28]<<7|p[29]>>>25,v0=p[38]<<8|p[39]>>>24,ut=p[39]<<8|p[38]>>>24,c0=p[48]<<14|p[49]>>>18,et=p[49]<<14|p[48]>>>18,p[0]=Pe^~Ne&Ie,p[1]=Be^~e0&qe,p[10]=n0^~dt&m0,p[11]=i0^~a0&_0,p[20]=Ve^~u0&tt,p[21]=ht^~d0&De,p[30]=gt^~y0&g0,p[31]=t0^~pt&E0,p[40]=R0^~Mr&P0,p[41]=I0^~B0&er,p[2]=Ne^~Ie&T0,p[3]=e0^~qe&Je,p[12]=dt^~m0&Ye,p[13]=a0^~_0&o0,p[22]=u0^~tt&v0,p[23]=d0^~De&ut,p[32]=y0^~g0&Z1,p[33]=pt^~E0&C0,p[42]=Mr^~P0&xt,p[43]=B0^~er&y1,p[4]=Ie^~T0&c0,p[5]=qe^~Je&et,p[14]=m0^~Ye&$0,p[15]=_0^~o0&s0,p[24]=tt^~v0&l0,p[25]=De^~ut&Xe,p[34]=g0^~Z1&O0,p[35]=E0^~C0&Ft,p[44]=P0^~xt&g1,p[45]=er^~y1&Qe,p[6]=T0^~c0&Pe,p[7]=Je^~et&Be,p[16]=Ye^~$0&n0,p[17]=o0^~s0&i0,p[26]=v0^~l0&Ve,p[27]=ut^~Xe&ht,p[36]=Z1^~O0>,p[37]=C0^~Ft&t0,p[46]=xt^~g1&R0,p[47]=y1^~Qe&I0,p[8]=c0^~Pe&Ne,p[9]=et^~Be&e0,p[18]=$0^~n0&dt,p[19]=s0^~i0&a0,p[28]=l0^~Ve&u0,p[29]=Xe^~ht&d0,p[38]=O0^~gt&y0,p[39]=Ft^~t0&pt,p[48]=g1^~R0&Mr,p[49]=Qe^~I0&B0,p[0]^=R[V],p[1]^=R[V+1]};if(s)t.exports=c;else for(U=0;U>=8;return e}function D3(t,e,r){let n=0;for(let i=0;ie+1+n&&sr.throwError("child data too short",Z.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function Zh(t,e){if(t.length===0&&sr.throwError("data too short",Z.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&sr.throwError("data short segment too short",Z.errors.BUFFER_OVERRUN,{});const n=D3(t,e+1,r);return e+1+r+n>t.length&&sr.throwError("data long segment too short",Z.errors.BUFFER_OVERRUN,{}),z3(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&sr.throwError("data array too short",Z.errors.BUFFER_OVERRUN,{}),z3(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&sr.throwError("data array too short",Z.errors.BUFFER_OVERRUN,{});const n=D3(t,e+1,r);e+1+r+n>t.length&&sr.throwError("data array too short",Z.errors.BUFFER_OVERRUN,{});const i=ke(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&sr.throwError("data too short",Z.errors.BUFFER_OVERRUN,{});const n=ke(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:ke(t[e])}}function k5(t){const e=ve(t),r=Zh(e,0);return r.consumed!==e.length&&sr.throwArgumentError("invalid rlp data","data",t),r.result}const Vx=Object.freeze(Object.defineProperty({__proto__:null,decode:k5,encode:S6},Symbol.toStringTag,{value:"Module"})),Wx="address/5.7.0",wn=new Z(Wx);function $3(t){We(t,20)||wn.throwArgumentError("invalid address","address",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=ve(M0(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 Qx=9007199254740991;function Jx(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const yf={};for(let t=0;t<10;t++)yf[String(t)]=String(t);for(let t=0;t<26;t++)yf[String.fromCharCode(65+t)]=String(10+t);const q3=Math.floor(Jx(Qx));function ep(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>yf[n]).join("");for(;e.length>=q3;){let n=e.substring(0,q3);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}function S0(t){let e=null;if(typeof t!="string"&&wn.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=$3(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&wn.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==ep(t)&&wn.throwArgumentError("bad icap checksum","address",t),e=Dx(t.substring(4));e.length<40;)e="0"+e;e=$3("0x"+e)}else wn.throwArgumentError("invalid address","address",t);return e}function Yx(t){try{return S0(t),!0}catch{}return!1}function Xx(t){let e=zx(S0(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+ep("XE00"+e)+e}function S5(t){let e=null;try{e=S0(t.from)}catch{wn.throwArgumentError("missing from address","transaction",t)}const r=vr(ve(_e.from(t.nonce).toHexString()));return S0(nt(M0(S6([e,r])),12))}function Zx(t,e,r){return kr(e)!==32&&wn.throwArgumentError("salt must be 32 bytes","salt",e),kr(r)!==32&&wn.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),S0(nt(M0(L0(["0xff",S0(t),e,r])),12))}const ev=Object.freeze(Object.defineProperty({__proto__:null,getAddress:S0,getContractAddress:S5,getCreate2Address:Zx,getIcapAddress:Xx,isAddress:Yx},Symbol.toStringTag,{value:"Module"})),tp=U0(ev);var tv={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const H3=t=>{let e;const r=new Set,n=(u,f)=>{const d=typeof u=="function"?u(e):u;if(!Object.is(d,e)){const y=e;e=f??typeof d!="object"?d:Object.assign({},e,d),r.forEach(v=>v(e,y))}},i=()=>e,s={setState:n,getState:i,subscribe:u=>(r.add(u),()=>r.delete(u)),destroy:()=>{(tv?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,i,s),s},gf=t=>t?H3(t):H3;var rp={exports:{}},np={},ip={exports:{}},ap={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var ji=ne;function rv(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var nv=typeof Object.is=="function"?Object.is:rv,iv=ji.useState,av=ji.useEffect,ov=ji.useLayoutEffect,sv=ji.useDebugValue;function uv(t,e){var r=e(),n=iv({inst:{value:r,getSnapshot:e}}),i=n[0].inst,a=n[1];return ov(function(){i.value=r,i.getSnapshot=e,A8(i)&&a({inst:i})},[t,r,e]),av(function(){return A8(i)&&a({inst:i}),t(function(){A8(i)&&a({inst:i})})},[t]),sv(r),r}function A8(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!nv(t,r)}catch{return!0}}function lv(t,e){return e()}var fv=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?lv:uv;ap.useSyncExternalStore=ji.useSyncExternalStore!==void 0?ji.useSyncExternalStore:fv;ip.exports=ap;var cv=ip.exports;/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var T5=ne,dv=cv;function hv(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var pv=typeof Object.is=="function"?Object.is:hv,bv=dv.useSyncExternalStore,mv=T5.useRef,yv=T5.useEffect,gv=T5.useMemo,xv=T5.useDebugValue;np.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var a=mv(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=gv(function(){function u(E){if(!f){if(f=!0,d=E,E=n(E),i!==void 0&&o.hasValue){var P=o.value;if(i(P,E))return y=P}return y=E}if(P=y,pv(d,E))return P;var R=n(E);return i!==void 0&&i(P,R)?P:(d=E,y=R)}var f=!1,d,y,v=r===void 0?null:r;return[function(){return u(e())},v===null?void 0:function(){return u(v())}]},[e,r,n,i]);var s=bv(t,a[0],a[1]);return yv(function(){o.hasValue=!0,o.value=s},[s]),xv(s),s};rp.exports=np;var vv=rp.exports;const op=N1(vv),{useSyncExternalStoreWithSelector:wv}=op;function sp(t,e=t.getState,r){const n=wv(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return ne.useDebugValue(n),n}const K3=t=>{const e=typeof t=="function"?gf(t):t,r=(n,i)=>sp(e,n,i);return Object.assign(r,e),r},up=t=>t?K3(t):K3;var Av=t=>up(t);const Ev=Object.freeze(Object.defineProperty({__proto__:null,create:up,createStore:gf,default:Av,useStore:sp},Symbol.toStringTag,{value:"Module"})),lp=U0(Ev);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createWeb3ReactStoreAndActions=t.MAX_SAFE_CHAIN_ID=void 0;const e=tp,r=lp;t.MAX_SAFE_CHAIN_ID=0xfffffffffffec;function n(s){if(!Number.isInteger(s)||s<=0||s>t.MAX_SAFE_CHAIN_ID)throw new Error(`Invalid chainId ${s}`)}function i(s){return(0,e.getAddress)(s)}const a={chainId:void 0,accounts:void 0,activating:!1};function o(){const s=(0,r.createStore)()(()=>a);let u=0;function f(){const v=++u;return s.setState(Object.assign(Object.assign({},a),{activating:!0})),()=>{u===v&&s.setState({activating:!1})}}function d(v){if(v.chainId!==void 0&&n(v.chainId),v.accounts!==void 0)for(let E=0;E{var P,R;const O=(P=v.chainId)!==null&&P!==void 0?P:E.chainId,C=(R=v.accounts)!==null&&R!==void 0?R:E.accounts;let _=E.activating;return _&&O&&C&&(_=!1),{chainId:O,accounts:C,activating:_}})}function y(){u++,s.setState(a)}return[s,{startActivation:f,update:d,resetState:y}]}t.createWeb3ReactStoreAndActions=o})(Hh);const{useSyncExternalStoreWithSelector:_v}=op;function fp(t,e=t.getState,r){const n=_v(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return ne.useDebugValue(n),n}const G3=(t,e)=>{const r=gf(t),n=(i,a=e)=>fp(r,i,a);return Object.assign(n,r),n},kv=(t,e)=>t?G3(t,e):G3,Sv=Object.freeze(Object.defineProperty({__proto__:null,createWithEqualityFn:kv,useStoreWithEqualityFn:fp},Symbol.toStringTag,{value:"Module"})),Tv=U0(Sv),Cv="properties/5.7.0";var Pv=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const $s=new Z(Cv);function ue(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function _t(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function X0(t){return Pv(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(a=>({key:n,value:a}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function xf(t,e){(!t||typeof t!="object")&&$s.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||$s.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function D0(t){const e={};for(const r in t)e[r]=t[r];return e}const Nv={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function cp(t){if(t==null||Nv[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rHt(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&ue(e,r,Ht(n))}return e}return $s.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Ht(t){return Mv(t)}class Gn{constructor(e){for(const r in e)this[r]=Ht(e[r])}}const Uv=Object.freeze(Object.defineProperty({__proto__:null,Description:Gn,checkProperties:xf,deepCopy:Ht,defineReadOnly:ue,getStatic:_t,resolveProperties:X0,shallowCopy:D0},Symbol.toStringTag,{value:"Module"})),Ov="abstract-provider/5.7.0";var Rv=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const Iv=new Z(Ov);class Bv extends Gn{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class R6{constructor(){Iv.checkAbstract(new.target,R6),ue(this,"_isProvider",!0)}getFeeData(){return Rv(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield X0({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,i=null,a=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,a=_e.from("1500000000"),i=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:a,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const Lv="networks/5.7.1",V3=new Z(Lv);function Fv(t){return t&&typeof t.renetwork=="function"}function Fr(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const a=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&a.indexOf(o.network.name)===-1&&i.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const a=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&a.indexOf(o.network.name)===-1&&i.push(o)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let a=1;return n.quorum!=null?a=n.quorum:t==="homestead"&&(a=2),new r.FallbackProvider(i,a)}return i[0]};return e.renetwork=function(r){return Fr(r)},e}function qs(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return qs(t,n)},r}const W3={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Fr("homestead")},Q3={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Fr("ropsten")},J3={chainId:63,name:"classicMordor",_defaultProvider:qs("https://www.ethercluster.com/mordor","classicMordor")},Eo={unspecified:{chainId:0,name:"unspecified"},homestead:W3,mainnet:W3,morden:{chainId:2,name:"morden"},ropsten:Q3,testnet:Q3,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Fr("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Fr("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Fr("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Fr("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:qs("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:J3,classicTestnet:J3,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:qs("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Fr("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Fr("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function vf(t){if(t==null)return null;if(typeof t=="number"){for(const n in Eo){const i=Eo[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Eo[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Eo[t.name];if(!e)return typeof t.chainId!="number"&&V3.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&V3.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(Fv(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}function wf(t){t=atob(t);const e=[];for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let i="";for(let a=0;r[a]===0&&a=0;--a)i+=this.alphabet[n[a]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;a>0;)r.push(a&255),a>>=8}for(let n=0;e[n]===this._leader&&n>6===2;o++)a++;return a}return t===Yt.OVERRUN?r.length-e-1:0}function Wv(t,e,r,n,i){return t===Yt.OVERLONG?(n.push(i),0):(n.push(65533),bp(t,e,r))}const mp=Object.freeze({error:Vv,ignore:bp,replace:Wv});function _f(t,e){e==null&&(e=mp.error),t=ve(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let a=null,o=null;if((i&224)===192)a=1,o=127;else if((i&240)===224)a=2,o=2047;else if((i&248)===240)a=3,o=65535;else{(i&192)===128?n+=e(Yt.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Yt.BAD_PREFIX,n-1,t,r);continue}if(n-1+a>=t.length){n+=e(Yt.OVERRUN,n-1,t,r);continue}let s=i&(1<<8-a-1)-1;for(let u=0;u1114111){n+=e(Yt.OUT_OF_RANGE,n-1-a,t,r,s);continue}if(s>=55296&&s<=57343){n+=e(Yt.UTF16_SURROGATE,n-1-a,t,r,s);continue}if(s<=o){n+=e(Yt.OVERLONG,n-1-a,t,r,s);continue}r.push(s)}}return r}function z0(t,e=Sr.current){e!=Sr.current&&(pp.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const a=t.charCodeAt(n);if(n>=t.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");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 ve(r)}function E8(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function Qv(t,e){return'"'+_f(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?E8(r):(r-=65536,E8((r>>10&1023)+55296)+E8((r&1023)+56320))}).join("")+'"'}function Vu(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Vn(t,e){return Vu(_f(t,e))}function Hs(t,e=Sr.current){return _f(z0(t,e))}function Jv(t){const e=z0(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return ke(L0([e,hp]).slice(0,32))}function Yv(t){const e=ve(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return Vn(e.slice(0,r))}function Xv(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let a=i.split(":");r+=parseInt(a[0],16),n[r]=e(a[1])}),n}function yp(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function Sf(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}const Zv=yp("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),ew="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),tw=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],rw=kf("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),nw=kf("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),iw=kf("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",Xv),aw=yp("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function ow(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function sw(t){return!!Sf(t,Zv)}function uw(t){let e=Sf(t,tw);if(e)return[t+e.s];let r=rw[t];if(r)return r;let n=nw[t];if(n)return[t+n[0]];let i=iw[t];return i||null}function lw(t){return!!Sf(t,aw)}function fw(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=Hs(t);e=ow(e.map(n=>{if(ew.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=uw(n);return i||[n]})),e=Hs(Vu(e),Sr.NFKC),e.forEach(n=>{if(lw(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(sw(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=Vu(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}const cw=Object.freeze(Object.defineProperty({__proto__:null,get UnicodeNormalizationForm(){return Sr},Utf8ErrorFuncs:mp,get Utf8ErrorReason(){return Yt},_toEscapedUtf8String:Qv,formatBytes32String:Jv,nameprep:fw,parseBytes32String:Yv,toUtf8Bytes:z0,toUtf8CodePoints:Hs,toUtf8String:Vn},Symbol.toStringTag,{value:"Module"}));function An(t){return M0(z0(t))}const gp="hash/5.7.0";function xp(t,e){e==null&&(e=1);const r=[],n=r.forEach,i=function(a,o){n.call(a,function(s){o>0&&Array.isArray(s)?i(s,o-1):r.push(s)})};return i(t,e),r}function dw(t){const e={};for(let r=0;r>--u&1}const y=31,v=Math.pow(2,y),E=v>>>1,P=E>>1,R=v-1;let O=0;for(let $=0;$1;){let se=Y+J>>>1;$>>1|d(),ee=ee<<1^E,ae=(ae^E)<<1|E|1;_=ee,M=1+ae-ee}let z=n-4;return C.map($=>{switch($-z){case 3:return z+65792+(t[s++]<<16|t[s++]<<8|t[s++]);case 2:return z+256+(t[s++]<<8|t[s++]);case 1:return z+t[s++];default:return $-1}})}function pw(t){let e=0;return()=>t[e++]}function bw(t){return pw(hw(t))}function mw(t){return t&1?~t>>1:t>>1}function yw(t,e){let r=Array(t);for(let n=0;ne[o]):r}function xw(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(ww(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Aw(r,t))}return dw(xp(e))}function vw(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function vp(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(a));return n}function ww(t,e){let r=1+e(),n=e(),i=vw(e),a=vp(i.length,1+t,e);return xp(a.map((o,s)=>{const u=o[0],f=o.slice(1);return Array(i[s]).fill(void 0).map((d,y)=>{let v=y*n;return[u+y*r,f.map(E=>E+v)]})}))}function Aw(t,e){let r=1+e();return vp(r,1+t,e).map(i=>[i[0],i.slice(1)])}function Ew(t){let e=Ks(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let f=Ks(t,e);if(f.length==0)break;n.push({set:new Set(f),node:r()})}n.sort((f,d)=>d.set.size-f.set.size);let i=t(),a=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let s=i==1,u=i==2;return{branches:n,valid:a,fe0f:o,save:s,check:u}}}function _w(){return bw(wf("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const C5=_w(),kw=new Set(Ks(C5)),Sw=new Set(Ks(C5)),Tw=xw(C5),Cw=Ew(C5),X3=45,Z3=95;function wp(t){return Hs(t)}function Pw(t){return t.filter(e=>e!=65039)}function Ap(t){for(let e of t.split(".")){let r=wp(e);try{for(let n=r.lastIndexOf(Z3)-1;n>=0;n--)if(r[n]!==Z3)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===X3&&r[3]===X3)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function Nw(t){return Ap(Mw(t,Pw))}function Mw(t,e){let r=wp(t).reverse(),n=[];for(;r.length;){let i=Ow(r);if(i){n.push(...e(i));continue}let a=r.pop();if(kw.has(a)){n.push(a);continue}if(Sw.has(a))continue;let o=Tw[a];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${a.toString(16).toUpperCase()}`)}return Ap(Uw(String.fromCodePoint(...n)))}function Uw(t){return t.normalize("NFC")}function Ow(t,e){var r;let n=Cw,i,a,o=[],s=t.length;for(;s;){let u=t[--s];if(n=(r=n.branches.find(f=>f.set.has(u)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)a=u;else if(n.check&&u===a)break;o.push(u),n.fe0f&&(o.push(65039),s>0&&t[s-1]==65039&&s--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),t.length=s)}return i}const Rw=new Z(gp),Ep=new Uint8Array(32);Ep.fill(0);function ed(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function P5(t){const e=z0(Nw(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(ed(e.slice(n))),r}function Iw(t){return P5(t).map(e=>Vn(e)).join(".")}function Bw(t){try{return P5(t).length!==0}catch{}return!1}function l1(t){typeof t!="string"&&Rw.throwArgumentError("invalid ENS name; not a string","name",t);let e=Ep;const r=P5(t);for(;r.length;)e=M0(L0([e,M0(r.pop())]));return ke(e)}function _p(t){return ke(L0(P5(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"}const kp=`Ethereum Signed Message: -`;function Tf(t){return typeof t=="string"&&(t=z0(t)),M0(L0([z0(kp),z0(String(t.length)),t]))}var Lw=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const V0=new Z(gp),Sp=new Uint8Array(32);Sp.fill(0);const Fw=_e.from(-1),Tp=_e.from(0),Cp=_e.from(1),jw=_e.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Dw(t){const e=ve(t),r=e.length%32;return r?zt([e,Sp.slice(r)]):ke(e)}const zw=F0(Cp.toHexString(),32),$w=F0(Tp.toHexString(),32),td={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},_8=["name","version","chainId","verifyingContract","salt"];function rd(t){return function(e){return typeof e!="string"&&V0.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const qw={name:rd("name"),version:rd("version"),chainId:function(t){try{return _e.from(t).toString()}catch{}return V0.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return S0(t).toLowerCase()}catch{}return V0.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=ve(t);if(e.length!==32)throw new Error("bad length");return ke(e)}catch{}return V0.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function k8(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&V0.throwArgumentError("invalid numeric width","type",t);const i=jw.mask(r?n-1:n),a=r?i.add(Cp).mul(Fw):Tp;return function(o){const s=_e.from(o);return(s.lt(a)||s.gt(i))&&V0.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),F0(s.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&V0.throwArgumentError("invalid bytes width","type",t),function(n){return ve(n).length!==r&&V0.throwArgumentError(`invalid length for ${t}`,"value",n),Dw(n)}}}switch(t){case"address":return function(e){return F0(S0(e),32)};case"bool":return function(e){return e?zw:$w};case"bytes":return function(e){return M0(e)};case"string":return function(e){return An(e)}}return null}function nd(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Et{constructor(e){ue(this,"types",Object.freeze(Ht(e))),ue(this,"_encoderCache",{}),ue(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(s=>{r[s]={},n[s]=[],i[s]={}});for(const s in e){const u={};e[s].forEach(f=>{u[f.name]&&V0.throwArgumentError(`duplicate variable name ${JSON.stringify(f.name)} in ${JSON.stringify(s)}`,"types",e),u[f.name]=!0;const d=f.type.match(/^([^\x5b]*)(\x5b|$)/)[1];d===s&&V0.throwArgumentError(`circular type reference to ${JSON.stringify(d)}`,"types",e),!k8(d)&&(n[d]||V0.throwArgumentError(`unknown type ${JSON.stringify(d)}`,"types",e),n[d].push(s),r[s][d]=!0)})}const a=Object.keys(n).filter(s=>n[s].length===0);a.length===0?V0.throwArgumentError("missing primary type","types",e):a.length>1&&V0.throwArgumentError(`ambiguous primary types or unused types: ${a.map(s=>JSON.stringify(s)).join(", ")}`,"types",e),ue(this,"primaryType",a[0]);function o(s,u){u[s]&&V0.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",e),u[s]=!0,Object.keys(r[s]).forEach(f=>{n[f]&&(o(f,u),Object.keys(u).forEach(d=>{i[d][f]=!0}))}),delete u[s]}o(this.primaryType,{});for(const s in i){const u=Object.keys(i[s]);u.sort(),this._types[s]=nd(s,e[s])+u.map(f=>nd(f,e[f])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=k8(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],a=this.getEncoder(i),o=parseInt(r[3]);return s=>{o>=0&&s.length!==o&&V0.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",s);let u=s.map(a);return this._types[i]&&(u=u.map(M0)),M0(zt(u))}}const n=this.types[e];if(n){const i=An(this._types[e]);return a=>{const o=n.map(({name:s,type:u})=>{const f=this.getEncoder(u)(a[s]);return this._types[u]?M0(f):f});return o.unshift(i),zt(o)}}return V0.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||V0.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return M0(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(k8(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const o=i[1],s=parseInt(i[3]);return s>=0&&r.length!==s&&V0.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(u=>this._visit(o,u,n))}const a=this.types[e];return a?a.reduce((o,{name:s,type:u})=>(o[s]=this._visit(u,r[s],n),o),{}):V0.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Et(e)}static getPrimaryType(e){return Et.from(e).primaryType}static hashStruct(e,r,n){return Et.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=td[n];i||V0.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>_8.indexOf(n.name)-_8.indexOf(i.name)),Et.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return zt(["0x1901",Et.hashDomain(e),Et.from(r).hash(n)])}static hash(e,r,n){return M0(Et.encode(e,r,n))}static resolveNames(e,r,n,i){return Lw(this,void 0,void 0,function*(){e=D0(e);const a={};e.verifyingContract&&!We(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");const o=Et.from(r);o.visit(n,(s,u)=>(s==="address"&&!We(u,20)&&(a[u]="0x"),u));for(const s in a)a[s]=yield i(s);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=o.visit(n,(s,u)=>s==="address"&&a[u]?a[u]:u),{domain:e,value:n}})}static getPayload(e,r,n){Et.hashDomain(e);const i={},a=[];_8.forEach(u=>{const f=e[u];f!=null&&(i[u]=qw[u](f),a.push({name:u,type:td[u]}))});const o=Et.from(r),s=D0(r);return s.EIP712Domain?V0.throwArgumentError("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,(u,f)=>{if(u.match(/^bytes(\d*)/))return ke(ve(f));if(u.match(/^u?int/))return _e.from(f).toString();switch(u){case"address":return f.toLowerCase();case"bool":return!!f;case"string":return typeof f!="string"&&V0.throwArgumentError("invalid string","value",f),f}return V0.throwArgumentError("unsupported type","type",u)})}}}const Hw=Object.freeze(Object.defineProperty({__proto__:null,_TypedDataEncoder:Et,dnsEncode:_p,ensNormalize:Iw,hashMessage:Tf,id:An,isValidName:Bw,messagePrefix:kp,namehash:l1},Symbol.toStringTag,{value:"Module"}));var Pp={},b0={},Qa=Np;function Np(t,e){if(!t)throw new Error(e||"Assertion failed")}Np.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var Wu={exports:{}};typeof Object.create=="function"?Wu.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Wu.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var Kw=Wu.exports,Gw=Qa,Vw=Kw;b0.inherits=Vw;function Ww(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function Qw(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=a&63|128):Ww(t,i)?(a=65536+((a&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=a&63|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=a&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}b0.htonl=Mp;function Yw(t,e){for(var r="",n=0;n>>0}return a}b0.join32=Xw;function Zw(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=a&255):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=a&255)}return r}b0.split32=Zw;function eA(t,e){return t>>>e|t<<32-e}b0.rotr32=eA;function tA(t,e){return t<>>32-e}b0.rotl32=tA;function rA(t,e){return t+e>>>0}b0.sum32=rA;function nA(t,e,r){return t+e+r>>>0}b0.sum32_3=nA;function iA(t,e,r,n){return t+e+r+n>>>0}b0.sum32_4=iA;function aA(t,e,r,n,i){return t+e+r+n+i>>>0}b0.sum32_5=aA;function oA(t,e,r,n){var i=t[e],a=t[e+1],o=n+a>>>0,s=(o>>0,t[e+1]=o}b0.sum64=oA;function sA(t,e,r,n){var i=e+n>>>0,a=(i>>0}b0.sum64_hi=sA;function uA(t,e,r,n){var i=e+n;return i>>>0}b0.sum64_lo=uA;function lA(t,e,r,n,i,a,o,s){var u=0,f=e;f=f+n>>>0,u+=f>>0,u+=f>>0,u+=f>>0}b0.sum64_4_hi=lA;function fA(t,e,r,n,i,a,o,s){var u=e+n+a+s;return u>>>0}b0.sum64_4_lo=fA;function cA(t,e,r,n,i,a,o,s,u,f){var d=0,y=e;y=y+n>>>0,d+=y>>0,d+=y>>0,d+=y>>0,d+=y>>0}b0.sum64_5_hi=cA;function dA(t,e,r,n,i,a,o,s,u,f){var d=e+n+a+s+f;return d>>>0}b0.sum64_5_lo=dA;function hA(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}b0.rotr64_hi=hA;function pA(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}b0.rotr64_lo=pA;function bA(t,e,r){return t>>>r}b0.shr64_hi=bA;function mA(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}b0.shr64_lo=mA;var Zi={},id=b0,yA=Qa;function N5(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Zi.BlockHash=N5;N5.prototype.update=function(e,r){if(e=id.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=id.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[a++]=e>>>16&255,i[a++]=e>>>8&255,i[a++]=e&255}else for(i[a++]=e&255,i[a++]=e>>>8&255,i[a++]=e>>>16&255,i[a++]=e>>>24&255,i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=0,o=8;o>>3}Nr.g0_256=AA;function EA(t){return wr(t,17)^wr(t,19)^t>>>10}Nr.g1_256=EA;var zi=b0,_A=Zi,kA=Nr,S8=zi.rotl32,A2=zi.sum32,SA=zi.sum32_5,TA=kA.ft_1,Lp=_A.BlockHash,CA=[1518500249,1859775393,2400959708,3395469782];function Tr(){if(!(this instanceof Tr))return new Tr;Lp.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}zi.inherits(Tr,Lp);var PA=Tr;Tr.blockSize=512;Tr.outSize=160;Tr.hmacStrength=80;Tr.padLength=64;Tr.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),mE(e.length<=this.blockSize);for(var r=e.length;r{a[s.toLowerCase()]=o}):n.headers.keys().forEach(o=>{a[o.toLowerCase()]=n.headers.get(o)}),{headers:a,statusCode:n.status,statusMessage:n.statusText,body:ve(new Uint8Array(i))}})}var kE=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const L1=new Z(AE);function ud(t){return new Promise(e=>{setTimeout(e,t)})}function cn(t,e){if(t==null)return null;if(typeof t=="string")return t;if(Va(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Vn(t)}catch{}return ke(t)}return t}function SE(t){return z0(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function Qp(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;L1.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,a=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;L1.assertArgument(a>0&&a%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",a);const o=typeof t=="object"?!!t.errorPassThrough:!1,s={};let u=null;const f={method:"GET"};let d=!1,y=2*60*1e3;if(typeof t=="string")u=t;else if(typeof t=="object"){if((t==null||t.url==null)&&L1.throwArgumentError("missing URL","connection.url",t),u=t.url,typeof t.timeout=="number"&&t.timeout>0&&(y=t.timeout),t.headers)for(const C in t.headers)s[C.toLowerCase()]={key:C,value:String(t.headers[C])},["if-none-match","if-modified-since"].indexOf(C.toLowerCase())>=0&&(d=!0);if(f.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){u.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&L1.throwError("basic authentication requires a secure https url",Z.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:t.user,password:"[REDACTED]"});const C=t.user+":"+t.password;s.authorization={key:"Authorization",value:"Basic "+Af(z0(C))}}t.skipFetchSetup!=null&&(f.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(f.fetchOptions=D0(t.fetchOptions))}const v=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),E=u?u.match(v):null;if(E)try{const C={statusCode:200,statusMessage:"OK",headers:{"content-type":E[1]||"text/plain"},body:E[2]?wf(E[3]):SE(E[3])};let _=C.body;return r&&(_=r(C.body,C)),Promise.resolve(_)}catch(C){L1.throwError("processing response error",Z.errors.SERVER_ERROR,{body:cn(E[1],E[2]),error:C,requestBody:null,requestMethod:"GET",url:u})}e&&(f.method="POST",f.body=e,s["content-type"]==null&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),s["content-length"]==null&&(s["content-length"]={key:"Content-Length",value:String(e.length)}));const P={};Object.keys(s).forEach(C=>{const _=s[C];P[_.key]=_.value}),f.headers=P;const R=function(){let C=null;return{promise:new Promise(function(z,$){y&&(C=setTimeout(()=>{C!=null&&(C=null,$(L1.makeError("timeout",Z.errors.TIMEOUT,{requestBody:cn(f.body,P["content-type"]),requestMethod:f.method,timeout:y,url:u})))},y))}),cancel:function(){C!=null&&(clearTimeout(C),C=null)}}}(),O=function(){return kE(this,void 0,void 0,function*(){for(let C=0;C=300)&&(R.cancel(),L1.throwError("bad response",Z.errors.SERVER_ERROR,{status:_.statusCode,headers:_.headers,body:cn(M,_.headers?_.headers["content-type"]:null),requestBody:cn(f.body,P["content-type"]),requestMethod:f.method,url:u})),r)try{const z=yield r(M,_);return R.cancel(),z}catch(z){if(z.throttleRetry&&C{let s=null;if(a!=null)try{s=JSON.parse(Vn(a))}catch(u){L1.throwError("invalid JSON",Z.errors.SERVER_ERROR,{body:a,error:u})}return r&&(s=r(s,o)),s},i=null;if(e!=null){i=z0(e);const a=typeof t=="string"?{url:t}:D0(t);a.headers?Object.keys(a.headers).filter(s=>s.toLowerCase()==="content-type").length!==0||(a.headers=D0(a.headers),a.headers["content-type"]="application/json"):a.headers={"content-type":"application/json"},t=a}return Qp(t,i,n)}function d6(t,e){return e||(e={}),e=D0(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,a=!1;const o=()=>a?!1:(a=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const s=e.retryLimit;let u=0;function f(){return t().then(function(d){if(d!==void 0)o()&&r(d);else if(e.oncePoll)e.oncePoll.once("poll",f);else if(e.onceBlock)e.onceBlock.once("block",f);else if(!a){if(u++,u>s){o()&&n(new Error("retry limit reached"));return}let y=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));ye.ceiling&&(y=e.ceiling),setTimeout(f,y)}return null},function(d){o()&&n(d)})}f()})}const TE=Object.freeze(Object.defineProperty({__proto__:null,_fetchData:Qp,fetchJson:r2,poll:d6},Symbol.toStringTag,{value:"Module"}));var Gs="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Yu={};for(var ko=0;ko>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Jp(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=Ci(e)^n>>5}for(e=Ci(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=Jp(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",a=0;a>5)throw new Error("Non 5-bit word");n=Ci(n)^o,i+=Gs.charAt(o)}for(a=0;a<6;++a)n=Ci(n);for(n^=1,a=0;a<6;++a){var s=n>>(5-a)*5&31;i+=Gs.charAt(s)}return i}function Yp(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var a=t.slice(0,i),o=t.slice(i+1);if(o.length<6)return"Data too short";var s=Jp(a);if(typeof s=="string")return s;for(var u=[],f=0;f=o.length)&&u.push(y)}return s!==1?"Invalid checksum for "+t:{prefix:a,words:u}}function PE(){var t=Yp.apply(null,arguments);if(typeof t=="object")return t}function NE(t){var e=Yp.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function M5(t,e,r,n){for(var i=0,a=0,o=(1<=r;)a-=r,s.push(i>>a&o);if(n)a>0&&s.push(i<=e)return"Excess padding";if(i<>8,v=d&255;y?u.push(y,v):u.push(v)}return u}r.toArray=n;function i(o){return o.length===1?"0"+o:o}r.zero2=i;function a(o){for(var s="",u=0;u(v>>1)-1?R=(v>>1)-O:R=O,E.isubn(R)):R=0,y[P]=R,E.iushrn(1)}return y}r.getNAF=n;function i(u,f){var d=[[],[]];u=u.clone(),f=f.clone();for(var y=0,v=0,E;u.cmpn(-y)>0||f.cmpn(-v)>0;){var P=u.andln(3)+y&3,R=f.andln(3)+v&3;P===3&&(P=-1),R===3&&(R=-1);var O;P&1?(E=u.andln(7)+y&7,(E===3||E===5)&&R===2?O=-P:O=P):O=0,d[0].push(O);var C;R&1?(E=f.andln(7)+v&7,(E===3||E===5)&&P===2?C=-R:C=R):C=0,d[1].push(C),2*y===O+1&&(y=1-y),2*v===C+1&&(v=1-v),u.iushrn(1),f.iushrn(1)}return d}r.getJSF=i;function a(u,f,d){var y="_"+f;u.prototype[f]=function(){return this[y]!==void 0?this[y]:this[y]=d.call(this)}}r.cachedProperty=a;function o(u){return typeof u=="string"?r.toArray(u,"hex"):u}r.parseBytes=o;function s(u){return new Ge(u,"hex","le")}r.intFromLE=s}),Vs=m1.getNAF,LE=m1.getJSF,Ws=m1.assert;function Wn(t,e){this.type=t,this.p=new Ge(e.p,16),this.red=e.prime?Ge.red(e.prime):Ge.mont(this.p),this.zero=new Ge(0).toRed(this.red),this.one=new Ge(1).toRed(this.red),this.two=new Ge(2).toRed(this.red),this.n=e.n&&new Ge(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var I6=Wn;Wn.prototype.point=function(){throw new Error("Not implemented")};Wn.prototype.validate=function(){throw new Error("Not implemented")};Wn.prototype._fixedNafMul=function(e,r){Ws(e.precomputed);var n=e._getDoubles(),i=Vs(r,1,this._bitLength),a=(1<=s;f--)u=(u<<1)+i[f];o.push(u)}for(var d=this.jpoint(null,null,null),y=this.jpoint(null,null,null),v=a;v>0;v--){for(s=0;s=0;u--){for(var f=0;u>=0&&o[u]===0;u--)f++;if(u>=0&&f++,s=s.dblp(f),u<0)break;var d=o[u];Ws(d!==0),e.type==="affine"?d>0?s=s.mixedAdd(a[d-1>>1]):s=s.mixedAdd(a[-d-1>>1].neg()):d>0?s=s.add(a[d-1>>1]):s=s.add(a[-d-1>>1].neg())}return e.type==="affine"?s.toP():s};Wn.prototype._wnafMulAdd=function(e,r,n,i,a){var o=this._wnafT1,s=this._wnafT2,u=this._wnafT3,f=0,d,y,v;for(d=0;d=1;d-=2){var P=d-1,R=d;if(o[P]!==1||o[R]!==1){u[P]=Vs(n[P],o[P],this._bitLength),u[R]=Vs(n[R],o[R],this._bitLength),f=Math.max(u[P].length,f),f=Math.max(u[R].length,f);continue}var O=[r[P],null,null,r[R]];r[P].y.cmp(r[R].y)===0?(O[1]=r[P].add(r[R]),O[2]=r[P].toJ().mixedAdd(r[R].neg())):r[P].y.cmp(r[R].y.redNeg())===0?(O[1]=r[P].toJ().mixedAdd(r[R]),O[2]=r[P].add(r[R].neg())):(O[1]=r[P].toJ().mixedAdd(r[R]),O[2]=r[P].toJ().mixedAdd(r[R].neg()));var C=[-3,-1,-5,-7,0,7,5,1,3],_=LE(n[P],n[R]);for(f=Math.max(_[0].length,f),u[P]=new Array(f),u[R]=new Array(f),y=0;y=0;d--){for(var J=0;d>=0;){var ee=!0;for(y=0;y=0&&J++,$=$.dblp(J),d<0)break;for(y=0;y0?v=s[y][ae-1>>1]:ae<0&&(v=s[y][-ae-1>>1].neg()),v.type==="affine"?$=$.mixedAdd(v):$=$.add(v))}}for(d=0;d=Math.ceil((e.bitLength()+1)/r.step):!1};M1.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,a=0;a=0&&(E=f,P=d),y.negative&&(y=y.neg(),v=v.neg()),E.negative&&(E=E.neg(),P=P.neg()),[{a:y,b:v},{a:E,b:P}]};U1.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],a=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),s=a.mul(n.a),u=o.mul(i.a),f=a.mul(n.b),d=o.mul(i.b),y=e.sub(s).sub(u),v=f.add(d).neg();return{k1:y,k2:v}};U1.prototype.pointFromX=function(e,r){e=new Ge(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=i.fromRed().isOdd();return(r&&!a||!r&&a)&&(i=i.redNeg()),this.point(e,i)};U1.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),a=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0};U1.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,a=this._endoWnafT2,o=0;o":""};yt.prototype.isInfinity=function(){return this.inf};yt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};yt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),o=a.redSqr().redISub(this.x.redAdd(this.x)),s=a.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)};yt.prototype.getX=function(){return this.x.fromRed()};yt.prototype.getY=function(){return this.y.fromRed()};yt.prototype.mul=function(e){return e=new Ge(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};yt.prototype.mulAdd=function(e,r,n){var i=[this,r],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,a):this.curve._wnafMulAdd(1,i,a,2)};yt.prototype.jmulAdd=function(e,r,n){var i=[this,r],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,a,!0):this.curve._wnafMulAdd(1,i,a,2,!0)};yt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};yt.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(a){return a.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};yt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function Tt(t,e,r,n){I6.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Ge(0)):(this.x=new Ge(e,16),this.y=new Ge(r,16),this.z=new Ge(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Pf(Tt,I6.BasePoint);U1.prototype.jpoint=function(e,r,n){return new Tt(this,e,r,n)};Tt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};Tt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Tt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),a=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),u=i.redSub(a),f=o.redSub(s);if(u.cmpn(0)===0)return f.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var d=u.redSqr(),y=d.redMul(u),v=i.redMul(d),E=f.redSqr().redIAdd(y).redISub(v).redISub(v),P=f.redMul(v.redISub(E)).redISub(o.redMul(y)),R=this.z.redMul(e.z).redMul(u);return this.curve.jpoint(E,P,R)};Tt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),a=this.y,o=e.y.redMul(r).redMul(this.z),s=n.redSub(i),u=a.redSub(o);if(s.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=s.redSqr(),d=f.redMul(s),y=n.redMul(f),v=u.redSqr().redIAdd(d).redISub(y).redISub(y),E=u.redMul(y.redISub(v)).redISub(a.redMul(d)),P=this.z.redMul(s);return this.curve.jpoint(v,E,P)};Tt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(a),this.x.cmp(n)===0)return!0}};Tt.prototype.inspect=function(){return this.isInfinity()?"":""};Tt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var us=n2(function(t,e){var r=e;r.base=I6,r.short=jE,r.mont=null,r.edwards=null}),ls=n2(function(t,e){var r=e,n=m1.assert;function i(s){s.type==="short"?this.curve=new us.short(s):s.type==="edwards"?this.curve=new us.edwards(s):this.curve=new us.mont(s),this.g=this.curve.g,this.n=this.curve.n,this.hash=s.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function a(s,u){Object.defineProperty(r,s,{configurable:!0,enumerable:!0,get:function(){var f=new i(u);return Object.defineProperty(r,s,{configurable:!0,enumerable:!0,value:f}),f}})}a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Jt.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Jt.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Jt.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Jt.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Jt.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jt.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Jt.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Jt.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function Fn(t){if(!(this instanceof Fn))return new Fn(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=K1.toArray(t.entropy,t.entropyEnc||"hex"),r=K1.toArray(t.nonce,t.nonceEnc||"hex"),n=K1.toArray(t.pers,t.persEnc||"hex");Cf(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var Zp=Fn;Fn.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Fn.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=K1.toArray(n,i||"hex"),this._update(n));for(var a=[];a.length"};var DE=m1.assert;function U5(t,e){if(t instanceof U5)return t;this._importDER(t,e)||(DE(t.r&&t.s,"Signature without r or s"),this.r=new Ge(t.r,16),this.s=new Ge(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var O5=U5;function zE(){this.place=0}function N8(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,a=0,o=e.place;a>>=0;return i<=127?!1:(e.place=o,i)}function fd(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}U5.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=fd(r),n=fd(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];M8(i,r.length),i=i.concat(r),i.push(2),M8(i,n.length);var a=i.concat(n),o=[48];return M8(o,a.length),o=o.concat(a),m1.encode(o,e)};var $E=function(){throw new Error("unsupported")},e7=m1.assert;function P1(t){if(!(this instanceof P1))return new P1(t);typeof t=="string"&&(e7(Object.prototype.hasOwnProperty.call(ls,t),"Unknown curve "+t),t=ls[t]),t instanceof ls.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var qE=P1;P1.prototype.keyPair=function(e){return new Nf(this,e)};P1.prototype.keyFromPrivate=function(e,r){return Nf.fromPrivate(this,e,r)};P1.prototype.keyFromPublic=function(e,r){return Nf.fromPublic(this,e,r)};P1.prototype.genKeyPair=function(e){e||(e={});for(var r=new Zp({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||$E(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Ge(2));;){var a=new Ge(r.generate(n));if(!(a.cmp(i)>0))return a.iaddn(1),this.keyFromPrivate(a)}};P1.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};P1.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new Ge(e,16));for(var a=this.n.byteLength(),o=r.getPrivate().toArray("be",a),s=e.toArray("be",a),u=new Zp({hash:this.hash,entropy:o,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),f=this.n.sub(new Ge(1)),d=0;;d++){var y=i.k?i.k(d):new Ge(u.generate(this.n.byteLength()));if(y=this._truncateToN(y,!0),!(y.cmpn(1)<=0||y.cmp(f)>=0)){var v=this.g.mul(y);if(!v.isInfinity()){var E=v.getX(),P=E.umod(this.n);if(P.cmpn(0)!==0){var R=y.invm(this.n).mul(P.mul(r.getPrivate()).iadd(e));if(R=R.umod(this.n),R.cmpn(0)!==0){var O=(v.getY().isOdd()?1:0)|(E.cmp(P)!==0?2:0);return i.canonical&&R.cmp(this.nh)>0&&(R=this.n.sub(R),O^=1),new O5({r:P,s:R,recoveryParam:O})}}}}}};P1.prototype.verify=function(e,r,n,i){e=this._truncateToN(new Ge(e,16)),n=this.keyFromPublic(n,i),r=new O5(r,"hex");var a=r.r,o=r.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s=o.invm(this.n),u=s.mul(e).umod(this.n),f=s.mul(a).umod(this.n),d;return this.curve._maxwellTrick?(d=this.g.jmulAdd(u,n.getPublic(),f),d.isInfinity()?!1:d.eqXToP(a)):(d=this.g.mulAdd(u,n.getPublic(),f),d.isInfinity()?!1:d.getX().umod(this.n).cmp(a)===0)};P1.prototype.recoverPubKey=function(t,e,r,n){e7((3&r)===r,"The recovery param is more than two bits"),e=new O5(e,n);var i=this.n,a=new Ge(t),o=e.r,s=e.s,u=r&1,f=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");f?o=this.curve.pointFromX(o.add(this.curve.n),u):o=this.curve.pointFromX(o,u);var d=e.r.invm(i),y=i.sub(a).mul(d).umod(i),v=s.mul(d).umod(i);return this.g.mulAdd(y,o,v)};P1.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new O5(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(t,e,i)}catch{continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var HE=n2(function(t,e){var r=e;r.version="6.5.4",r.utils=m1,r.rand=function(){throw new Error("unsupported")},r.curve=us,r.curves=ls,r.ec=qE,r.eddsa=null}),KE=HE.ec;const GE="signing-key/5.7.0",Zu=new Z(GE);let U8=null;function ur(){return U8||(U8=new KE("secp256k1")),U8}class m6{constructor(e){ue(this,"curve","secp256k1"),ue(this,"privateKey",ke(e)),kr(this.privateKey)!==32&&Zu.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=ur().keyFromPrivate(ve(this.privateKey));ue(this,"publicKey","0x"+r.getPublic(!1,"hex")),ue(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),ue(this,"_isSigningKey",!0)}_addPoint(e){const r=ur().keyFromPublic(ve(this.publicKey)),n=ur().keyFromPublic(ve(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=ur().keyFromPrivate(ve(this.privateKey)),n=ve(e);n.length!==32&&Zu.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return O6({recoveryParam:i.recoveryParam,r:F0("0x"+i.r.toString(16),32),s:F0("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=ur().keyFromPrivate(ve(this.privateKey)),n=ur().keyFromPublic(ve(Mf(e)));return F0("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function t7(t,e){const r=O6(e),n={r:ve(r.r),s:ve(r.s)};return"0x"+ur().recoverPubKey(ve(t),n,r.recoveryParam).encode("hex",!1)}function Mf(t,e){const r=ve(t);if(r.length===32){const n=new m6(r);return e?"0x"+ur().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?ke(r):"0x"+ur().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+ur().keyFromPublic(r).getPublic(!0,"hex"):ke(r)}return Zu.throwArgumentError("invalid public or private key","key","[REDACTED]")}const VE=Object.freeze(Object.defineProperty({__proto__:null,SigningKey:m6,computePublicKey:Mf,recoverPublicKey:t7},Symbol.toStringTag,{value:"Module"})),WE="transactions/5.7.0",Rt=new Z(WE);var el;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(el||(el={}));function Uf(t){return t==="0x"?null:S0(t)}function Ot(t){return t==="0x"?dp:_e.from(t)}const QE=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],JE={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function On(t){const e=Mf(t);return S0(nt(M0(nt(e,1)),12))}function Ja(t,e){return On(t7(ve(t),e))}function o1(t,e){const r=vr(_e.from(t).toHexString());return r.length>32&&Rt.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function O8(t,e){return{address:S0(t),storageKeys:(e||[]).map((r,n)=>(kr(r)!==32&&Rt.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Qn(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Rt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),O8(r[0],r[1])):O8(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,a)=>(i[a]=!0,i),{});return O8(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function r7(t){return Qn(t).map(e=>[e.address,e.storageKeys])}function n7(t,e){if(t.gasPrice!=null){const n=_e.from(t.gasPrice),i=_e.from(t.maxFeePerGas||0);n.eq(i)||Rt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[o1(t.chainId||0,"chainId"),o1(t.nonce||0,"nonce"),o1(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),o1(t.maxFeePerGas||0,"maxFeePerGas"),o1(t.gasLimit||0,"gasLimit"),t.to!=null?S0(t.to):"0x",o1(t.value||0,"value"),t.data||"0x",r7(t.accessList||[])];if(e){const n=O6(e);r.push(o1(n.recoveryParam,"recoveryParam")),r.push(vr(n.r)),r.push(vr(n.s))}return zt(["0x02",S6(r)])}function i7(t,e){const r=[o1(t.chainId||0,"chainId"),o1(t.nonce||0,"nonce"),o1(t.gasPrice||0,"gasPrice"),o1(t.gasLimit||0,"gasLimit"),t.to!=null?S0(t.to):"0x",o1(t.value||0,"value"),t.data||"0x",r7(t.accessList||[])];if(e){const n=O6(e);r.push(o1(n.recoveryParam,"recoveryParam")),r.push(vr(n.r)),r.push(vr(n.s))}return zt(["0x01",S6(r)])}function YE(t,e){xf(t,JE);const r=[];QE.forEach(function(o){let s=t[o.name]||[];const u={};o.numeric&&(u.hexPad="left"),s=ve(ke(s,u)),o.length&&s.length!==o.length&&s.length>0&&Rt.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,s),o.maxLength&&(s=vr(s),s.length>o.maxLength&&Rt.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,s)),r.push(ke(s))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Rt.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!Va(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(ke(n)),r.push("0x"),r.push("0x")),!e)return S6(r);const i=O6(e);let a=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),a+=n*2+8,i.v>28&&i.v!==a&&Rt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==a&&Rt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(ke(a)),r.push(vr(ve(i.r))),r.push(vr(ve(i.s))),S6(r)}function tl(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Rt.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),YE(t,e);switch(t.type){case 1:return i7(t,e);case 2:return n7(t,e)}return Rt.throwError(`unsupported transaction type: ${t.type}`,Z.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function a7(t,e,r){try{const n=Ot(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Rt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=F0(e[1],32),t.s=F0(e[2],32);try{const n=M0(r(t));t.from=Ja(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function XE(t){const e=k5(t.slice(1));e.length!==9&&e.length!==12&&Rt.throwArgumentError("invalid component count for transaction type: 2","payload",ke(t));const r=Ot(e[2]),n=Ot(e[3]),i={type:2,chainId:Ot(e[0]).toNumber(),nonce:Ot(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Ot(e[4]),to:Uf(e[5]),value:Ot(e[6]),data:e[7],accessList:Qn(e[8])};return e.length===9||(i.hash=M0(t),a7(i,e.slice(9),n7)),i}function ZE(t){const e=k5(t.slice(1));e.length!==8&&e.length!==11&&Rt.throwArgumentError("invalid component count for transaction type: 1","payload",ke(t));const r={type:1,chainId:Ot(e[0]).toNumber(),nonce:Ot(e[1]).toNumber(),gasPrice:Ot(e[2]),gasLimit:Ot(e[3]),to:Uf(e[4]),value:Ot(e[5]),data:e[6],accessList:Qn(e[7])};return e.length===8||(r.hash=M0(t),a7(r,e.slice(8),i7)),r}function e_(t){const e=k5(t);e.length!==9&&e.length!==6&&Rt.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Ot(e[0]).toNumber(),gasPrice:Ot(e[1]),gasLimit:Ot(e[2]),to:Uf(e[3]),value:Ot(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=_e.from(e[6]).toNumber()}catch{return r}if(r.r=F0(e[7],32),r.s=F0(e[8],32),_e.from(r.r).isZero()&&_e.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(ke(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const a=M0(S6(i));try{r.from=Ja(a,{r:ke(r.r),s:ke(r.s),recoveryParam:n})}catch{}r.hash=M0(t)}return r.type=null,r}function o7(t){const e=ve(t);if(e[0]>127)return e_(e);switch(e[0]){case 1:return ZE(e);case 2:return XE(e)}return Rt.throwError(`unsupported transaction type: ${e[0]}`,Z.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const t_=Object.freeze(Object.defineProperty({__proto__:null,get TransactionTypes(){return el},accessListify:Qn,computeAddress:On,parse:o7,recoverAddress:Ja,serialize:tl},Symbol.toStringTag,{value:"Module"})),_2=new Z(Lt);class Ue{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},r=this.address.bind(this),n=this.bigNumber.bind(this),i=this.blockTag.bind(this),a=this.data.bind(this),o=this.hash.bind(this),s=this.hex.bind(this),u=this.number.bind(this),f=this.type.bind(this),d=y=>this.data(y,!0);return e.transaction={hash:o,type:f,accessList:Ue.allowNull(this.accessList.bind(this),null),blockHash:Ue.allowNull(o,null),blockNumber:Ue.allowNull(u,null),transactionIndex:Ue.allowNull(u,null),confirmations:Ue.allowNull(u,null),from:r,gasPrice:Ue.allowNull(n),maxPriorityFeePerGas:Ue.allowNull(n),maxFeePerGas:Ue.allowNull(n),gasLimit:n,to:Ue.allowNull(r,null),value:n,nonce:u,data:a,r:Ue.allowNull(this.uint256),s:Ue.allowNull(this.uint256),v:Ue.allowNull(u),creates:Ue.allowNull(r,null),raw:Ue.allowNull(a)},e.transactionRequest={from:Ue.allowNull(r),nonce:Ue.allowNull(u),gasLimit:Ue.allowNull(n),gasPrice:Ue.allowNull(n),maxPriorityFeePerGas:Ue.allowNull(n),maxFeePerGas:Ue.allowNull(n),to:Ue.allowNull(r),value:Ue.allowNull(n),data:Ue.allowNull(d),type:Ue.allowNull(u),accessList:Ue.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:o,address:r,topics:Ue.arrayOf(o),data:a,logIndex:u,blockHash:o},e.receipt={to:Ue.allowNull(this.address,null),from:Ue.allowNull(this.address,null),contractAddress:Ue.allowNull(r,null),transactionIndex:u,root:Ue.allowNull(s),gasUsed:n,logsBloom:Ue.allowNull(a),blockHash:o,transactionHash:o,logs:Ue.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:Ue.allowNull(u,null),cumulativeGasUsed:n,effectiveGasPrice:Ue.allowNull(n),status:Ue.allowNull(u),type:f},e.block={hash:Ue.allowNull(o),parentHash:o,number:u,timestamp:u,nonce:Ue.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Ue.allowNull(r),extraData:a,transactions:Ue.allowNull(Ue.arrayOf(o)),baseFeePerGas:Ue.allowNull(n)},e.blockWithTransactions=D0(e.block),e.blockWithTransactions.transactions=Ue.allowNull(Ue.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Ue.allowNull(i,void 0),toBlock:Ue.allowNull(i,void 0),blockHash:Ue.allowNull(o,void 0),address:Ue.allowNull(r,void 0),topics:Ue.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Ue.allowNull(u),blockHash:Ue.allowNull(o),transactionIndex:u,removed:Ue.allowNull(this.boolean.bind(this)),address:r,data:Ue.allowFalsish(a,"0x"),topics:Ue.arrayOf(o),transactionHash:o,logIndex:u},e}accessList(e){return Qn(e||[])}number(e){return e==="0x"?0:_e.from(e).toNumber()}type(e){return e==="0x"||e==null?0:_e.from(e).toNumber()}bigNumber(e){return _e.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),We(e))?e.toLowerCase():_2.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return S0(e)}callAddress(e){if(!We(e,32))return null;const r=S0(nt(e,12));return r===$v?null:r}contractAddress(e){return S5(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||We(e))return Wa(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return kr(n)!==32?_2.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=_e.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!We(e))throw new Error("invalid uint256");return F0(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=Ue.check(r,e);return i._difficulty=n==null?null:_e.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Ue.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&_e.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=Ue.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;We(n)&&(n=_e.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),We(n)&&(n=_e.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return o7(e)}receiptLog(e){return Ue.check(this.formats.receiptLog,e)}receipt(e){const r=Ue.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=_e.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&_2.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):_2.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&_2.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return Ue.check(this.formats.filter,e)}filterLog(e){return Ue.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const a=e[i](r[i]);a!==void 0&&(n[i]=a)}catch(a){throw a.checkKey=i,a.checkValue=r[i],a}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}function s7(t){return t&&typeof t.isCommunityResource=="function"}function rl(t){return s7(t)&&t.isCommunityResource()}let cd=!1;function Ya(){cd||(cd=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var Ke=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const r0=new Z(Lt),r_=10;function dd(t){return t==null?"null":(kr(t)!==32&&r0.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function hd(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[dd(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return dd(e)}).join("&")}function n_(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function W6(t){if(typeof t=="string"){if(t=t.toLowerCase(),kr(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+hd(t);if(Bv.isForkEvent(t))throw r0.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+hd(t.topics||[])}throw new Error("invalid event - "+t)}function k2(){return new Date().getTime()}function pd(t){return new Promise(e=>{setTimeout(e,t)})}const i_=["block","network","pending","poll"];class a_{constructor(e,r,n){ue(this,"tag",e),ue(this,"listener",r),ue(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=n_(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||i_.indexOf(this.tag)>=0}}const o_={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function R8(t){return F0(_e.from(t).toHexString(),32)}function bd(t){return Di.encode(L0([t,nt(h1(h1(t)),0,4)]))}const u7=new RegExp("^(ipfs)://(.*)$","i"),md=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),u7,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function fs(t,e){try{return Vn(Ca(t,e))}catch{}return null}function Ca(t,e){if(t==="0x")return null;const r=_e.from(nt(t,e,e+32)).toNumber(),n=_e.from(nt(t,r,r+32)).toNumber();return nt(t,r+32,r+32+n)}function I8(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):r0.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function yd(t){const e=ve(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 s_(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function l7(t){const e=[];let r=0;for(let n=0;n_e.from(e).eq(1)).catch(e=>{if(e.code===Z.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return Ke(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:zt([e,l1(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=zt(["0x9061b923",l7([_p(this.name),n.data])]));try{let a=yield this.provider.call(n);return ve(a).length%32===4&&r0.throwError("resolver threw error",Z.errors.CALL_EXCEPTION,{transaction:n,data:a}),i&&(a=Ca(a,0)),a}catch(a){if(a.code===Z.errors.CALL_EXCEPTION)return null;throw a}})}_fetchBytes(e,r){return Ke(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?Ca(n,0):null})}_getAddress(e,r){const n=o_[String(e)];if(n==null&&r0.throwError(`unsupported coin type: ${e}`,Z.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=ve(r);if(n.p2pkh!=null){const a=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(a){const o=parseInt(a[1],16);if(a[2].length===o*2&&o>=1&&o<=75)return bd(L0([[n.p2pkh],"0x"+a[2]]))}}if(n.p2sh!=null){const a=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){const o=parseInt(a[1],16);if(a[2].length===o*2&&o>=1&&o<=75)return bd(L0([[n.p2sh],"0x"+a[2]]))}}if(n.prefix!=null){const a=i[1];let o=i[0];if(o===0?a!==20&&a!==32&&(o=-1):o=-1,o>=0&&i.length===2+a&&a>=1&&a<=75){const s=ld.toWords(i.slice(2));return s.unshift(o),ld.encode(n.prefix,s)}}return null}getAddress(e){return Ke(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===hp?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===Z.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",R8(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&r0.throwError("invalid or unsupported coin data",Z.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return Ke(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[u])}return r0.throwError("invalid or unsupported content hash data",Z.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Ke(this,void 0,void 0,function*(){let r=z0(e);r=L0([R8(64),R8(r.length),r]),r.length%32!==0&&(r=L0([r,F0("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",ke(r));return n==null||n==="0x"?null:Vn(n)})}}let B8=null,u_=1;class R5 extends R6{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),ue(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=_t(new.target,"getNetwork")(e);r?(ue(this,"_network",r),this.emit("network",r,null)):r0.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Ke(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||r0.throwError("no network detected",Z.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:ue(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return d6(()=>this._ready().then(e=>e,e=>{if(!(e.code===Z.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return B8==null&&(B8=new Ue),B8}static getNetwork(e){return vf(e??"homestead")}ccipReadFetch(e,r,n){return Ke(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),a=r.toLowerCase(),o=[];for(let s=0;s=0?null:JSON.stringify({data:a,sender:i}),y=yield r2({url:f,errorPassThrough:!0},d,(E,P)=>(E.status=P.statusCode,E));if(y.data)return y.data;const v=y.message||"unknown error";if(y.status>=400&&y.status<500)return r0.throwError(`response not found during CCIP fetch: ${v}`,Z.errors.SERVER_ERROR,{url:u,errorMessage:v});o.push(v)}return r0.throwError(`error encountered during CCIP fetch: ${o.map(s=>JSON.stringify(s)).join(", ")}`,Z.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return Ke(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const a=yield i;if(k2()-a.respTime<=e)return a.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=k2(),n=X0({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:a})=>{if(a)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),a;const o=k2();return i=_e.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Ke(this,void 0,void 0,function*(){const e=u_++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)r0.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",r0.makeError("network block skew detected",Z.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const a=this._emitted[i];a!=="pending"&&n-a>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const a=i.hash;let o=this.getTransactionReceipt(a).then(s=>(!s||s.blockNumber==null||(this._emitted["t:"+a]=s.blockNumber,this.emit(a,s)),null)).catch(s=>{this.emit("error",s)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const a=i.filter;a.fromBlock=i._lastBlockNumber+1,a.toBlock=n;const o=a.toBlock-this._maxFilterBlockRange;o>a.fromBlock&&(a.fromBlock=o),a.fromBlock<0&&(a.fromBlock=0);const s=this.getLogs(a).then(u=>{i._inflight=!1,u.length!==0&&u.forEach(f=>{f.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=f.blockNumber),this._emitted["b:"+f.blockHash]=f.blockNumber,this._emitted["t:"+f.transactionHash]=f.blockNumber,this.emit(a,f)})}).catch(u=>{this.emit("error",u),i._inflight=!1});r.push(s)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Ke(this,void 0,void 0,function*(){return r0.throwError("provider does not support network detection",Z.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Ke(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield pd(0),this._network;const n=r0.makeError("underlying network changed",Z.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=k2();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return Ke(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return Ke(this,void 0,void 0,function*(){const a=yield this.getTransactionReceipt(e);return(a?a.confirmations:0)>=r?a:new Promise((o,s)=>{const u=[];let f=!1;const d=function(){return f?!0:(f=!0,u.forEach(v=>{v()}),!1)},y=v=>{v.confirmations{this.removeListener(e,y)}),i){let v=i.startBlock,E=null;const P=R=>Ke(this,void 0,void 0,function*(){f||(yield pd(1e3),this.getTransactionCount(i.from).then(O=>Ke(this,void 0,void 0,function*(){if(!f){if(O<=i.nonce)v=R;else{{const C=yield this.getTransaction(e);if(C&&C.blockNumber!=null)return}for(E==null&&(E=v-3,E{f||this.once("block",P)}))});if(f)return;this.once("block",P),u.push(()=>{this.removeListener("block",P)})}if(typeof n=="number"&&n>0){const v=setTimeout(()=>{d()||s(r0.makeError("timeout exceeded",Z.errors.TIMEOUT,{timeout:n}))},n);v.unref&&v.unref(),u.push(()=>{clearTimeout(v)})}})})}getBlockNumber(){return Ke(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Ke(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return _e.from(e)}catch(r){return r0.throwError("bad result from backend",Z.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Ke(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield X0({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return _e.from(i)}catch(a){return r0.throwError("bad result from backend",Z.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:a})}})}getTransactionCount(e,r){return Ke(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield X0({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return _e.from(i).toNumber()}catch(a){return r0.throwError("bad result from backend",Z.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:a})}})}getCode(e,r){return Ke(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield X0({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return ke(i)}catch(a){return r0.throwError("bad result from backend",Z.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:a})}})}getStorageAt(e,r,n){return Ke(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield X0({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>Wa(o))}),a=yield this.perform("getStorageAt",i);try{return ke(a)}catch(o){return r0.throwError("bad result from backend",Z.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:a,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&kr(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&r0.throwError("Transaction hash mismatch from Provider.sendTransaction.",Z.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(a,o)=>Ke(this,void 0,void 0,function*(){a==null&&(a=1),o==null&&(o=0);let s;a!==0&&n!=null&&(s={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const u=yield this._waitForTransaction(e.hash,a,o,s);return u==null&&a===0?null:(this._emitted["t:"+e.hash]=u.blockNumber,u.status===0&&r0.throwError("transaction failed",Z.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:u}),u)}),i}sendTransaction(e){return Ke(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(a=>ke(a)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const a=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,a,i)}catch(a){throw a.transaction=n,a.transactionHash=n.hash,a}})}_getTransactionRequest(e){return Ke(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(a=>a?this._getAddress(a):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(a=>a?_e.from(a):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(a=>a??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(a=>a?ke(a):null))}),this.formatter.transactionRequest(yield X0(n))})}_getFilter(e){return Ke(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield X0(r))})}_call(e,r,n){return Ke(this,void 0,void 0,function*(){n>=r_&&r0.throwError("CCIP read exceeded maximum redirections",Z.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,a=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&a.substring(0,10)==="0x556f1830"&&kr(a)%32===4)try{const o=nt(a,4),s=nt(o,0,32);_e.from(s).eq(i)||r0.throwError("CCIP Read sender did not match",Z.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:a});const u=[],f=_e.from(nt(o,32,64)).toNumber(),d=_e.from(nt(o,f,f+32)).toNumber(),y=nt(o,f+32);for(let C=0;CKe(this,void 0,void 0,function*(){const a=yield this.perform("getBlock",i);if(a==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let u=0;uthis._wrapTransaction(u)),s}return this.formatter.block(a)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Ke(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return d6(()=>Ke(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return Ke(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return d6(()=>Ke(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return Ke(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield X0({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),Ue.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Ke(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Ke(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&r0.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return Ke(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new nl(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Ke(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||r0.throwError("network does not support ENS",Z.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+l1(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return Ke(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(We(e))throw n}typeof e!="string"&&r0.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Ke(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=fs(yield this.call({to:n,data:"0x691f3431"+l1(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return Ke(this,void 0,void 0,function*(){let r=null;if(We(e)){const a=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(a,"getAvatar");if(!o)return null;r=new nl(this,o,a);try{const s=yield r.getAvatar();if(s)return s.url}catch(s){if(s.code!==Z.errors.CALL_EXCEPTION)throw s}try{const s=fs(yield this.call({to:o,data:"0x691f3431"+l1(a).substring(2)}),0);r=yield this.getResolver(s)}catch(s){if(s.code!==Z.errors.CALL_EXCEPTION)throw s;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return r0.throwError(e+" not implemented",Z.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new a_(W6(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],a=W6(e);return this._events=this._events.filter(o=>o.tag!==a?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(i.push(o),!1):!0)),i.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=W6(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=W6(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,a=W6(e);return this._events=this._events.filter(o=>o.tag!==a||o.listener!=r||i?!0:(i=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=W6(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}const l_="abstract-signer/5.7.0";var B1=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const v1=new Z(l_),f_=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],c_=[Z.errors.INSUFFICIENT_FUNDS,Z.errors.NONCE_EXPIRED,Z.errors.REPLACEMENT_UNDERPRICED];class B6{constructor(){v1.checkAbstract(new.target,B6),ue(this,"_isSigner",!0)}getBalance(e){return B1(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return B1(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return B1(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield X0(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return B1(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield X0(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return B1(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return B1(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return B1(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return B1(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return B1(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)f_.indexOf(n)===-1&&v1.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=D0(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&v1.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return B1(this,void 0,void 0,function*(){const r=yield X0(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>B1(this,void 0,void 0,function*(){if(i==null)return null;const a=yield this.resolveName(i);return a==null&&v1.throwArgumentError("provided ENS name resolves to null","tx.to",i),a})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?v1.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&v1.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const a=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=a,r.maxPriorityFeePerGas=a}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&v1.throwError("network does not support EIP-1559",Z.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):v1.throwError("failed to get consistent fee data",Z.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(c_.indexOf(i.code)>=0)throw i;return v1.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Z.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&v1.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield X0(r)})}_checkProvider(e){this.provider||v1.throwError("missing provider",Z.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class Of extends B6{constructor(e,r){super(),ue(this,"address",e),ue(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{v1.throwError(e,Z.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new Of(this.address,e)}}var Br=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const ot=new Z(Lt),d_=["call","estimateGas"];function W2(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=We(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=W2(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return W2(JSON.parse(t),e)}catch{}return null}function f7(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const a=W2(e,!0);if(a)return a.data;ot.throwError("missing revert data in call exception; Transaction reverted without a reason string",Z.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let a=W2(e.body,!1);a==null&&(a=W2(e,!1)),a&&ot.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Z.errors.UNPREDICTABLE_GAS_LIMIT,{reason:a.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===Z.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&ot.throwError("insufficient funds for intrinsic transaction cost",Z.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&ot.throwError("nonce has already been used",Z.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&ot.throwError("replacement fee too low",Z.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&ot.throwError("legacy pre-eip-155 transactions not supported",Z.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),d_.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&ot.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Z.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function gd(t){return new Promise(function(e){setTimeout(e,t)})}function h_(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function S2(t){return t&&t.toLowerCase()}const il={};class Rf extends B6{constructor(e,r,n){if(super(),e!==il)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");ue(this,"provider",r),n==null&&(n=0),typeof n=="string"?(ue(this,"_address",this.provider.formatter.address(n)),ue(this,"_index",null)):typeof n=="number"?(ue(this,"_index",n),ue(this,"_address",null)):ot.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return ot.throwError("cannot alter JSON-RPC Signer connection",Z.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new p_(il,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&ot.throwError("unknown account #"+this._index,Z.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=D0(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=D0(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Br(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&ot.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),X0({tx:X0(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&ot.throwArgumentError("from address mismatch","transaction",e):n.from=i;const a=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[a]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&ot.throwError("user rejected transaction",Z.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),f7("sendTransaction",o,a)))})}signTransaction(e){return ot.throwError("signing transactions is unsupported",Z.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Br(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield d6(()=>Br(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return Br(this,void 0,void 0,function*(){const r=typeof e=="string"?z0(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[ke(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&ot.throwError("user rejected signing",Z.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return Br(this,void 0,void 0,function*(){const r=typeof e=="string"?z0(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),ke(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&ot.throwError("user rejected signing",Z.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return Br(this,void 0,void 0,function*(){const i=yield Et.resolveNames(e,r,n,o=>this.provider.resolveName(o)),a=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[a.toLowerCase(),JSON.stringify(Et.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&ot.throwError("user rejected signing",Z.errors.ACTION_REJECTED,{action:"_signTypedData",from:a,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return Br(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class p_ extends Rf{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const b_={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class Dt extends R5{constructor(e,r){let n=r;n==null&&(n=new Promise((i,a)=>{setTimeout(()=>{this.detectNetwork().then(o=>{i(o)},o=>{a(o)})},0)})),super(n),e||(e=_t(this.constructor,"defaultUrl")()),typeof e=="string"?ue(this,"connection",Object.freeze({url:e})):ue(this,"connection",Object.freeze(D0(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Br(this,void 0,void 0,function*(){yield gd(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=_t(this.constructor,"getNetwork");try{return r(_e.from(e).toNumber())}catch(n){return ot.throwError("could not detect network",Z.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return ot.throwError("could not detect network",Z.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Rf(il,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Ht(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const a=r2(this.connection,JSON.stringify(n),h_).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return i&&(this._cache[e]=a,setTimeout(()=>{this._cache[e]=null},0)),a}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[S2(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[S2(r.address),r.blockTag]];case"getCode":return["eth_getCode",[S2(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[S2(r.address),F0(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[_t(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[_t(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=S2(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Br(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&_e.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const a=yield this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(r=D0(r),r.transaction=D0(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&ot.throwError(e+" not implemented",Z.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return f7(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(a){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return a.forEach(function(s){e._emitted["t:"+s.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(s).then(function(u){return e.emit("pending",u),null})})}),o.then(function(){return gd(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(a=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=D0(b_);if(r)for(const a in r)r[a]&&(n[a]=!0);xf(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(a){if(e[a]==null)return;const o=Wa(_e.from(e[a]));a==="gasLimit"&&(a="gas"),i[a]=o}),["from","to","data"].forEach(function(a){e[a]!=null&&(i[a]=ke(e[a]))}),e.accessList&&(i.accessList=Qn(e.accessList)),i}}let Q2=null;try{if(Q2=WebSocket,Q2==null)throw new Error("inject please")}catch{const e=new Z(Lt);Q2=function(){e.throwError("WebSockets not supported in this environment",Z.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var L8=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const So=new Z(Lt);let m_=1;class I5 extends Dt{constructor(e,r){r==="any"&&So.throwError("WebSocketProvider does not support 'any' network yet",Z.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),typeof e=="string"?super(e,r):super("_websocket",r),this._pollingInterval=-1,this._wsReady=!1,typeof e=="string"?ue(this,"_websocket",new Q2(this.connection.url)):ue(this,"_websocket",e),ue(this,"_requests",{}),ue(this,"_subs",{}),ue(this,"_subIds",{}),ue(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(i=>{this.websocket.send(this._requests[i].payload)})},this.websocket.onmessage=i=>{const a=i.data,o=JSON.parse(a);if(o.id!=null){const s=String(o.id),u=this._requests[s];if(delete this._requests[s],o.result!==void 0)u.callback(null,o.result),this.emit("debug",{action:"response",request:JSON.parse(u.payload),response:o.result,provider:this});else{let f=null;o.error?(f=new Error(o.error.message||"unknown error"),ue(f,"code",o.error.code||null),ue(f,"response",a)):f=new Error("unknown error"),u.callback(f,void 0),this.emit("debug",{action:"response",error:f,request:JSON.parse(u.payload),provider:this})}}else if(o.method==="eth_subscription"){const s=this._subs[o.params.subscription];s&&s.processFunc(o.params.result)}else console.warn("this should not happen")};const n=setInterval(()=>{this.emit("poll")},1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){So.throwError("cannot reset events block on WebSocketProvider",Z.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){So.throwError("cannot set polling interval on WebSocketProvider",Z.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return L8(this,void 0,void 0,function*(){return null})}set polling(e){e&&So.throwError("cannot set polling on WebSocketProvider",Z.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,r){const n=m_++;return new Promise((i,a)=>{function o(u,f){return u?a(u):i(f)}const s=JSON.stringify({method:e,params:r,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(s),provider:this}),this._requests[String(n)]={callback:o,payload:s},this._wsReady&&this.websocket.send(s)})}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,r,n){return L8(this,void 0,void 0,function*(){let i=this._subIds[e];i==null&&(i=Promise.all(r).then(o=>this.send("eth_subscribe",o)),this._subIds[e]=i);const a=yield i;this._subs[a]={tag:e,processFunc:n}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],r=>{const n=_e.from(r.number).toNumber();this._emitted.block=n,this.emit("block",n)});break;case"pending":this._subscribe("pending",["newPendingTransactions"],r=>{this.emit("pending",r)});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],r=>{r.removed==null&&(r.removed=!1),this.emit(e.filter,this.formatter.filterLog(r))});break;case"tx":{const r=n=>{const i=n.hash;this.getTransactionReceipt(i).then(a=>{a&&this.emit(i,a)})};r(e),this._subscribe("tx",["newHeads"],n=>{this._events.filter(i=>i.type==="tx").forEach(r)});break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);break}}_stopEvent(e){let r=e.tag;if(e.type==="tx"){if(this._events.filter(i=>i.type==="tx").length)return;r="tx"}else if(this.listenerCount(e.event))return;const n=this._subIds[r];n&&(delete this._subIds[r],n.then(i=>{this._subs[i]&&(delete this._subs[i],this.send("eth_unsubscribe",[i]))}))}destroy(){return L8(this,void 0,void 0,function*(){this.websocket.readyState===Q2.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}}var y_=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const O2=new Z(Lt);class c7 extends Dt{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return y_(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||O2.throwError("no network detected",Z.errors.UNKNOWN_ERROR,{}),this._network==null&&(ue(this,"_network",r),this.emit("network",r,null))),r})}}class rn extends c7{constructor(e,r){O2.checkAbstract(new.target,rn),e=_t(new.target,"getNetwork")(e),r=_t(new.target,"getApiKey")(r);const n=_t(new.target,"getUrl")(e,r);super(n,e),typeof r=="string"?ue(this,"apiKey",r):r!=null&&Object.keys(r).forEach(i=>{ue(this,i,r[i])})}_startPending(){O2.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return O2.throwError("API provider does not support signing",Z.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,r){return O2.throwError("not implemented; sub-classes must override getUrl",Z.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const xd=new Z(Lt),cs="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class d7 extends I5{constructor(e,r){const n=new If(e,r),i=n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,n.network),ue(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===cs}}class If extends rn{static getWebSocketProvider(e,r){return new d7(e,r)}static getApiKey(e){return e==null?cs:(e&&typeof e!="string"&&xd.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,r){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:xd.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+r,throttleCallback:(i,a)=>(r===cs&&Ya(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===cs}}const g_=new Z(Lt),To="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function x_(t){switch(t){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return g_.throwArgumentError("unsupported network","name",t)}class h7 extends rn{isCommunityResource(){return this.apiKey===To}static getApiKey(e){return e??To}static getUrl(e,r){r==null&&(r=To);const n={allowGzip:!0,url:"https://"+x_(e.name)+r,throttleCallback:(i,a)=>(r.apiKey===To&&Ya(),Promise.resolve(!0))};return r.projectSecret!=null&&(n.user="",n.password=r.projectSecret),n}}var v_=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const vd=new Z(Lt);class p7 extends rn{static getApiKey(e){return e!=null&&vd.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,r){let n=null;switch(e.name){case"homestead":n="https://cloudflare-eth.com/";break;default:vd.throwArgumentError("unsupported network","network",arguments[0])}return n}perform(e,r){const n=Object.create(null,{perform:{get:()=>super.perform}});return v_(this,void 0,void 0,function*(){return e==="getBlockNumber"?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,r)})}}var Co=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const yn=new Z(Lt);function wd(t){const e={};for(let r in t){if(t[r]==null)continue;let n=t[r];r==="type"&&n===0||({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?n=Wa(ke(n)):r==="accessList"?n="["+Qn(n).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":n=ke(n),e[r]=n)}return e}function w_(t){if(t.status==0&&(t.message==="No records found"||t.message==="No transactions found"))return t.result;if(t.status!=1||typeof t.message!="string"||!t.message.match(/^OK/)){const e=new Error("invalid response");throw e.result=JSON.stringify(t),(t.result||"").toLowerCase().indexOf("rate limit")>=0&&(e.throttleRetry=!0),e}return t.result}function Ad(t){if(t&&t.status==0&&t.message=="NOTOK"&&(t.result||"").toLowerCase().indexOf("rate limit")>=0){const e=new Error("throttled response");throw e.result=JSON.stringify(t),e.throttleRetry=!0,e}if(t.jsonrpc!="2.0"){const e=new Error("invalid response");throw e.result=JSON.stringify(t),e}if(t.error){const e=new Error(t.error.message||"unknown error");throw t.error.code&&(e.code=t.error.code),t.error.data&&(e.data=t.error.data),e}return t.result}function Ed(t){if(t==="pending")throw new Error("pending not supported");return t==="latest"?t:parseInt(t.substring(2),16)}function F8(t,e,r){if(t==="call"&&e.code===Z.errors.SERVER_ERROR){const i=e.error;if(i&&(i.message.match(/reverted/i)||i.message.match(/VM execution error/i))){let a=i.data;if(a&&(a="0x"+a.replace(/^.*0x/i,"")),We(a))return a;yn.throwError("missing revert data in call exception",Z.errors.CALL_EXCEPTION,{error:e,data:"0x"})}}let n=e.message;throw e.code===Z.errors.SERVER_ERROR&&(e.error&&typeof e.error.message=="string"?n=e.error.message:typeof e.body=="string"?n=e.body:typeof e.responseText=="string"&&(n=e.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&yn.throwError("insufficient funds for intrinsic transaction cost",Z.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&yn.throwError("nonce has already been used",Z.errors.NONCE_EXPIRED,{error:e,method:t,transaction:r}),n.match(/another transaction with same nonce/)&&yn.throwError("replacement fee too low",Z.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&yn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Z.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:r}),e}class b7 extends R5{constructor(e,r){super(e),ue(this,"baseUrl",this.getBaseUrl()),ue(this,"apiKey",r||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return yn.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,r){const n=Object.keys(r).reduce((a,o)=>{const s=r[o];return s!=null&&(a+=`&${o}=${s}`),a},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,r){return r.module=e,r.apikey=this.apiKey,r}fetch(e,r,n){return Co(this,void 0,void 0,function*(){const i=n?this.getPostUrl():this.getUrl(e,r),a=n?this.getPostData(e,r):null,o=e==="proxy"?Ad:w_;this.emit("debug",{action:"request",request:i,provider:this});const s={url:i,throttleSlotInterval:1e3,throttleCallback:(d,y)=>(this.isCommunityResource()&&Ya(),Promise.resolve(!0))};let u=null;a&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},u=Object.keys(a).map(d=>`${d}=${a[d]}`).join("&"));const f=yield r2(s,u,o||Ad);return this.emit("debug",{action:"response",request:i,response:Ht(f),provider:this}),f})}detectNetwork(){return Co(this,void 0,void 0,function*(){return this.network})}perform(e,r){const n=Object.create(null,{perform:{get:()=>super.perform}});return Co(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:r.address,tag:r.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:r.address,tag:r.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:r.address,tag:r.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:r.address,position:r.position,tag:r.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:r.signedTransaction},!0).catch(i=>F8("sendTransaction",i,r.signedTransaction));case"getBlock":if(r.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:r.blockTag,boolean:r.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:r.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:r.transactionHash});case"call":{if(r.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const i=wd(r.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(a){return F8("call",a,r.transaction)}}case"estimateGas":{const i=wd(r.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(a){return F8("estimateGas",a,r.transaction)}}case"getLogs":{const i={action:"getLogs"};if(r.filter.fromBlock&&(i.fromBlock=Ed(r.filter.fromBlock)),r.filter.toBlock&&(i.toBlock=Ed(r.filter.toBlock)),r.filter.address&&(i.address=r.filter.address),r.filter.topics&&r.filter.topics.length>0&&(r.filter.topics.length>1&&yn.throwError("unsupported topic count",Z.errors.UNSUPPORTED_OPERATION,{topics:r.filter.topics}),r.filter.topics.length===1)){const s=r.filter.topics[0];(typeof s!="string"||s.length!==66)&&yn.throwError("unsupported topic format",Z.errors.UNSUPPORTED_OPERATION,{topic0:s}),i.topic0=s}const a=yield this.fetch("logs",i);let o={};for(let s=0;s{["contractAddress","to"].forEach(function(u){o[u]==""&&delete o[u]}),o.creates==null&&o.contractAddress!=null&&(o.creates=o.contractAddress);const s=this.formatter.transactionResponse(o);return o.timeStamp&&(s.timestamp=parseInt(o.timeStamp)),s})})}isCommunityResource(){return this.apiKey==null}}const A_="random/5.7.0",al=new Z(A_);function E_(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const _d=E_();let ds=_d.crypto||_d.msCrypto;(!ds||!ds.getRandomValues)&&(al.warn("WARNING: Missing strong random number source"),ds={getRandomValues:function(t){return al.throwError("no secure random source avaialble",Z.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function bi(t){(t<=0||t>1024||t%1||t!=t)&&al.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return ds.getRandomValues(e),ve(e)}function m7(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}const __=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:bi,shuffled:m7},Symbol.toStringTag,{value:"Module"}));var Qs=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const o6=new Z(Lt);function Po(){return new Date().getTime()}function kd(t){let e=null;for(let r=0;re?null:(n+i)/2}function mi(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(_e.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>mi(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=mi(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let k_=1;function Td(t){let e=null,r=null,n=new Promise(o=>{e=function(){r&&(clearTimeout(r),r=null),o()},r=setTimeout(e,t)});const i=o=>(n=n.then(o),n);function a(){return n}return{cancel:e,getPromise:a,wait:i}}const S_=[Z.errors.CALL_EXCEPTION,Z.errors.INSUFFICIENT_FUNDS,Z.errors.NONCE_EXPIRED,Z.errors.REPLACEMENT_UNDERPRICED,Z.errors.UNPREDICTABLE_GAS_LIMIT],T_=["address","args","errorArgs","errorSignature","method","transaction"];function No(t,e){const r={weight:t.weight};return Object.defineProperty(r,"provider",{get:()=>t.provider}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function C_(t,e){return function(r){const n={};r.forEach(a=>{const o=t(a.result);n[o]||(n[o]={count:0,result:a.result}),n[o].count++});const i=Object.keys(n);for(let a=0;a=e)return o.result}}}function P_(t,e,r){let n=mi;switch(e){case"getBlockNumber":return function(i){const a=i.map(s=>s.result);let o=Sd(i.map(s=>s.result),2);if(o!=null)return o=Math.ceil(o),a.indexOf(o+1)>=0&&o++,o>=t._highestBlockNumber&&(t._highestBlockNumber=o),t._highestBlockNumber};case"getGasPrice":return function(i){const a=i.map(o=>o.result);return a.sort(),a[Math.floor(a.length/2)]};case"getEtherPrice":return function(i){return Sd(i.map(a=>a.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=D0(i),i.confirmations=-1,mi(i))};break;case"getBlock":r.includeTransactions?n=function(i){return i==null?null:(i=D0(i),i.transactions=i.transactions.map(a=>(a=D0(a),a.confirmations=-1,a)),mi(i))}:n=function(i){return i==null?null:mi(i)};break;default:throw new Error("unknown method: "+e)}return C_(n,t.quorum)}function T2(t,e){return Qs(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:d6(()=>new Promise((n,i)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function N_(t,e,r,n){return Qs(this,void 0,void 0,function*(){let i=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&We(n.blockTag)&&(i=yield T2(t,e)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&We(n.blockTag)&&(i=yield T2(t,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&We(n.blockTag)&&(i=yield T2(t,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&We(n.blockTag)&&(i=yield T2(t,e)),r==="call"&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let a=n.filter;return(a.fromBlock&&We(a.fromBlock)||a.toBlock&&We(a.toBlock))&&(i=yield T2(t,e)),i.getLogs(a)}}return o6.throwError("unknown method error",Z.errors.UNKNOWN_ERROR,{method:r,params:n})})}class y7 extends R5{constructor(e,r){e.length===0&&o6.throwArgumentError("missing providers","providers",e);const n=e.map((o,s)=>{if(R6.isProvider(o)){const d=rl(o)?2e3:750;return Object.freeze({provider:o,weight:1,stallTimeout:d,priority:1})}const u=D0(o);u.priority==null&&(u.priority=1),u.stallTimeout==null&&(u.stallTimeout=rl(o)?2e3:750),u.weight==null&&(u.weight=1);const f=u.weight;return(f%1||f>512||f<1)&&o6.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${s}].weight`,f),Object.freeze(u)}),i=n.reduce((o,s)=>o+s.weight,0);r==null?r=i/2:r>i&&o6.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let a=kd(n.map(o=>o.provider.network));a==null&&(a=new Promise((o,s)=>{setTimeout(()=>{this.detectNetwork().then(o,s)},0)})),super(a),ue(this,"providerConfigs",Object.freeze(n)),ue(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return Qs(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return kd(e)})}perform(e,r){return Qs(this,void 0,void 0,function*(){if(e==="sendTransaction"){const u=yield Promise.all(this.providerConfigs.map(f=>f.provider.sendTransaction(r.signedTransaction).then(d=>d.hash,d=>d)));for(let f=0;fu.priority-f.priority);const a=this._highestBlockNumber;let o=0,s=!0;for(;;){const u=Po();let f=i.filter(E=>E.runner&&u-E.startE+P.weight,0);for(;f{E.staller=null}),E.runner=N_(E,a,e,r).then(R=>{E.done=!0,E.result=R,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:P,backend:No(E,Po()),request:{method:e,params:Ht(r)},provider:this})},R=>{E.done=!0,E.error=R,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:P,backend:No(E,Po()),request:{method:e,params:Ht(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:P,backend:No(E,null),request:{method:e,params:Ht(r)},provider:this}),f+=E.weight}const d=[];i.forEach(E=>{E.done||!E.runner||(d.push(E.runner),E.staller&&d.push(E.staller.getPromise()))}),d.length&&(yield Promise.race(d));const y=i.filter(E=>E.done&&E.error==null);if(y.length>=this.quorum){const E=n(y);if(E!==void 0)return i.forEach(P=>{P.staller&&P.staller.cancel(),P.cancelled=!0}),E;s||(yield Td(100).getPromise()),s=!1}const v=i.reduce((E,P)=>{if(!P.done||P.error==null)return E;const R=P.error.code;return S_.indexOf(R)>=0&&(E[R]||(E[R]={error:P.error,weight:0}),E[R].weight+=P.weight),E},{});if(Object.keys(v).forEach(E=>{const P=v[E];if(P.weight{C.staller&&C.staller.cancel(),C.cancelled=!0});const R=P.error,O={};T_.forEach(C=>{R[C]!=null&&(O[C]=R[C])}),o6.throwError(R.reason||R.message,E,O)}),i.filter(E=>!E.done).length===0)break}return i.forEach(u=>{u.staller&&u.staller.cancel(),u.cancelled=!0}),o6.throwError("failed to meet quorum",Z.errors.SERVER_ERROR,{method:e,params:r,results:i.map(u=>No(u)),provider:this})})}}const g7=null,hs=new Z(Lt),R2="84842078b09946638c03157f83405213";class x7 extends I5{constructor(e,r){const n=new Bf(e,r),i=n.connection;i.password&&hs.throwError("INFURA WebSocket project secrets unsupported",Z.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});const a=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(a,e),ue(this,"apiKey",n.projectId),ue(this,"projectId",n.projectId),ue(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===R2}}class Bf extends rn{static getWebSocketProvider(e,r){return new x7(e,r)}static getApiKey(e){const r={apiKey:R2,projectId:R2,projectSecret:null};return e==null||(typeof e=="string"?r.projectId=e:e.projectSecret!=null?(hs.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),hs.assertArgument(typeof e.projectSecret=="string","invalid projectSecret","projectSecret","[REDACTED]"),r.projectId=e.projectId,r.projectSecret=e.projectSecret):e.projectId&&(r.projectId=e.projectId),r.apiKey=r.projectId),r}static getUrl(e,r){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:hs.throwError("unsupported network",Z.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const i={allowGzip:!0,url:"https://"+n+"/v3/"+r.projectId,throttleCallback:(a,o)=>(r.projectId===R2&&Ya(),Promise.resolve(!0))};return r.projectSecret!=null&&(i.user="",i.password=r.projectSecret),i}isCommunityResource(){return this.projectId===R2}}class M_ extends Dt{send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this._pendingBatch==null&&(this._pendingBatch=[]);const i={request:n,resolve:null,reject:null},a=new Promise((o,s)=>{i.resolve=o,i.reject=s});return this._pendingBatch.push(i),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{const o=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const s=o.map(u=>u.request);return this.emit("debug",{action:"requestBatch",request:Ht(s),provider:this}),r2(this.connection,JSON.stringify(s)).then(u=>{this.emit("debug",{action:"response",request:s,response:u,provider:this}),o.forEach((f,d)=>{const y=u[d];if(y.error){const v=new Error(y.error.message);v.code=y.error.code,v.data=y.error.data,f.reject(v)}else f.resolve(y.result)})},u=>{this.emit("debug",{action:"response",error:u,request:s,provider:this}),o.forEach(f=>{f.reject(u)})})},10)),a}}const j8=new Z(Lt),U_="ETHERS_JS_SHARED";class v7 extends rn{static getApiKey(e){return e&&typeof e!="string"&&j8.throwArgumentError("invalid apiKey","apiKey",e),e||U_}static getUrl(e,r){j8.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:j8.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+r}}const Cd=new Z(Lt),Pd="62e1ad51b37b8e00394bda3b";class w7 extends rn{static getApiKey(e){const r={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?r.applicationId=Pd:typeof e=="string"?r.applicationId=e:e.applicationSecretKey!=null?(r.applicationId=e.applicationId,r.applicationSecretKey=e.applicationSecretKey):e.applicationId?r.applicationId=e.applicationId:Cd.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),r}static getUrl(e,r){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:Cd.throwError("unsupported network",Z.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const i=`https://${n}/v1/lb/${r.applicationId}`,a={headers:{},url:i};return r.applicationSecretKey!=null&&(a.user="",a.password=r.applicationSecretKey),a}isCommunityResource(){return this.applicationId===Pd}}const Nd=new Z(Lt);let O_=1;function Md(t,e){const r="Web3LegacyFetcher";return function(n,i){const a={method:n,params:i,id:O_++,jsonrpc:"2.0"};return new Promise((o,s)=>{this.emit("debug",{action:"request",fetcher:r,request:Ht(a),provider:this}),e(a,(u,f)=>{if(u)return this.emit("debug",{action:"response",fetcher:r,error:u,request:a,provider:this}),s(u);if(this.emit("debug",{action:"response",fetcher:r,request:a,response:f,provider:this}),f.error){const d=new Error(f.error.message);return d.code=f.error.code,d.data=f.error.data,s(d)}o(f.result)})})}}function R_(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Ht(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class A7 extends Dt{constructor(e,r){e==null&&Nd.throwArgumentError("missing provider","provider",e);let n=null,i=null,a=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),a=e,e.request?(n===""&&(n="eip-1193:"),i=R_(e)):e.sendAsync?i=Md(e,e.sendAsync.bind(e)):e.send?i=Md(e,e.send.bind(e)):Nd.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),ue(this,"jsonRpcFetchFunc",i),ue(this,"provider",a)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const Ud=new Z(Lt);function I_(t,e){if(t==null&&(t="homestead"),typeof t=="string"){const n=t.match(/^(ws|http)s?:/i);if(n)switch(n[1].toLowerCase()){case"http":case"https":return new Dt(t);case"ws":case"wss":return new I5(t);default:Ud.throwArgumentError("unsupported URL scheme","network",t)}}const r=vf(t);return(!r||!r._defaultProvider)&&Ud.throwError("unsupported getDefaultProvider network",Z.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:t}),r._defaultProvider({FallbackProvider:y7,AlchemyProvider:If,AnkrProvider:h7,CloudflareProvider:p7,EtherscanProvider:b7,InfuraProvider:Bf,JsonRpcProvider:Dt,NodesmithProvider:v7,PocketProvider:w7,Web3Provider:A7,IpcProvider:g7},e)}const B_=Object.freeze(Object.defineProperty({__proto__:null,AlchemyProvider:If,AlchemyWebSocketProvider:d7,AnkrProvider:h7,BaseProvider:R5,CloudflareProvider:p7,EtherscanProvider:b7,FallbackProvider:y7,Formatter:Ue,InfuraProvider:Bf,InfuraWebSocketProvider:x7,IpcProvider:g7,JsonRpcBatchProvider:M_,JsonRpcProvider:Dt,JsonRpcSigner:Rf,NodesmithProvider:v7,PocketProvider:w7,Provider:R6,Resolver:nl,StaticJsonRpcProvider:c7,UrlJsonRpcProvider:rn,Web3Provider:A7,WebSocketProvider:I5,getDefaultProvider:I_,getNetwork:vf,isCommunityResourcable:s7,isCommunityResource:rl,showThrottleMessage:Ya},Symbol.toStringTag,{value:"Module"})),L_=U0(B_);var F_=f0&&f0.__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]}),j_=f0&&f0.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),D_=f0&&f0.__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)&&F_(e,t,r);return j_(e,t),e},z_=f0&&f0.__awaiter||function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.getPriorityConnector=Hr.getSelectedConnector=Hr.initializeConnector=void 0;const $_=Hh,yi=ne,Od=lp,q_=Tv;let Pi;function H_(){return z_(this,void 0,void 0,function*(){if(Pi===void 0)try{const{Web3Provider:t}=yield Promise.resolve().then(()=>D_(L_));Pi=t}catch{console.debug("@ethersproject/providers not available"),Pi=null}})}function K_(t){const[e,r]=(0,$_.createWeb3ReactStoreAndActions)(),n=t(r),i=X_(e),a=Z_(i),o=ek(n,i,a);return[n,Object.assign(Object.assign(Object.assign({},i),a),o),e]}Hr.initializeConnector=K_;function G_({chainId:t,accounts:e,activating:r}){return!!(t&&e&&!r)}function E7(...t){function e(y){const v=t.findIndex(([E])=>y===E);if(v===-1)throw new Error("Connector not found");return v}function r(y){const v=t[e(y)][2];if(!v)throw new Error("Stores not passed");return v}function n(y){return t.map(([,{useChainId:E}])=>E())[e(y)]}function i(y){return t.map(([,{useAccounts:E}])=>E())[e(y)]}function a(y){return t.map(([,{useIsActivating:E}])=>E())[e(y)]}function o(y){return t.map(([,{useAccount:E}])=>E())[e(y)]}function s(y){return t.map(([,{useIsActive:E}])=>E())[e(y)]}function u(y,v){const E=e(y);return t.map(([,{useProvider:R}],O)=>R(v,O===E))[E]}function f(y,v){const E=e(y);return t.map(([,{useENSNames:R}],O)=>R(O===E?v:void 0))[E]}function d(y,v){const E=e(y);return t.map(([,{useENSName:R}],O)=>R(O===E?v:void 0))[E]}return{useSelectedStore:r,useSelectedChainId:n,useSelectedAccounts:i,useSelectedIsActivating:a,useSelectedAccount:o,useSelectedIsActive:s,useSelectedProvider:u,useSelectedENSNames:f,useSelectedENSName:d}}Hr.getSelectedConnector=E7;function V_(...t){const{useSelectedStore:e,useSelectedChainId:r,useSelectedAccounts:n,useSelectedIsActivating:i,useSelectedAccount:a,useSelectedIsActive:o,useSelectedProvider:s,useSelectedENSNames:u,useSelectedENSName:f}=E7(...t);function d(){const $=t.map(([,{useIsActive:Y}])=>Y()).findIndex(Y=>Y);return t[$===-1?0:$][0]}function y(){return e(d())}function v(){return r(d())}function E(){return n(d())}function P(){return i(d())}function R(){return a(d())}function O(){return o(d())}function C(z){return s(d(),z)}function _(z){return u(d(),z)}function M(z){return f(d(),z)}return{useSelectedStore:e,useSelectedChainId:r,useSelectedAccounts:n,useSelectedIsActivating:i,useSelectedAccount:a,useSelectedIsActive:o,useSelectedProvider:s,useSelectedENSNames:u,useSelectedENSName:f,usePriorityConnector:d,usePriorityStore:y,usePriorityChainId:v,usePriorityAccounts:E,usePriorityIsActivating:P,usePriorityAccount:R,usePriorityIsActive:O,usePriorityProvider:C,usePriorityENSNames:_,usePriorityENSName:M}}Hr.getPriorityConnector=V_;const W_=({chainId:t})=>t,Q_=({accounts:t})=>t,J_=({activating:t})=>t,Y_=(t,e)=>t===void 0&&e===void 0||t!==void 0&&t.length===(e==null?void 0:e.length)&&t.every((r,n)=>r===e[n]);function X_(t){function e(){return(0,Od.useStore)(t,W_)}function r(){return(0,q_.useStoreWithEqualityFn)(t,Q_,Y_)}function n(){return(0,Od.useStore)(t,J_)}return{useChainId:e,useAccounts:r,useIsActivating:n}}function Z_({useChainId:t,useAccounts:e,useIsActivating:r}){function n(){var a;return(a=e())===null||a===void 0?void 0:a[0]}function i(){const a=t(),o=e(),s=r();return G_({chainId:a,accounts:o,activating:s})}return{useAccount:n,useIsActive:i}}function Rd(t,e=[]){const[r,n]=(0,yi.useState)();return(0,yi.useEffect)(()=>{if(t&&e.length){let i=!1;return Promise.all(e.map(a=>t.lookupAddress(a))).then(a=>{i||n(a)}).catch(a=>{i||(console.debug("Could not fetch ENS names",a),n(new Array(e.length).fill(null)))}),()=>{i=!0,n(void 0)}}},[t,e]),r??new Array(e.length).fill(void 0)}function ek(t,{useAccounts:e,useChainId:r},{useAccount:n,useIsActive:i}){function a(u,f=!0){const d=i(),y=r(),[v,E]=(0,yi.useState)(Pi!==void 0);return(0,yi.useEffect)(()=>{if(v)return;let P=!1;return H_().then(()=>{P||E(!0)}),()=>{P=!0}},[v]),(0,yi.useMemo)(()=>{if(f){if(t.customProvider)return t.customProvider;if(Pi&&t.provider)return new Pi(t.provider,u)}},[v,f,d,y,u])}function o(u){const f=e();return Rd(u,f)}function s(u){var f;const d=n(),y=(0,yi.useMemo)(()=>d===void 0?void 0:[d],[d]);return(f=Rd(u,y))===null||f===void 0?void 0:f[0]}return{useProvider:a,useENSNames:o,useENSName:s}}var B5={},_7={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(u,f,d){this.fn=u,this.context=f,this.once=d||!1}function a(u,f,d,y,v){if(typeof d!="function")throw new TypeError("The listener must be a function");var E=new i(d,y||u,v),P=r?r+f:f;return u._events[P]?u._events[P].fn?u._events[P]=[u._events[P],E]:u._events[P].push(E):(u._events[P]=E,u._eventsCount++),u}function o(u,f){--u._eventsCount===0?u._events=new n:delete u._events[f]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var f=[],d,y;if(this._eventsCount===0)return f;for(y in d=this._events)e.call(d,y)&&f.push(r?y.slice(1):y);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(d)):f},s.prototype.listeners=function(f){var d=r?r+f:f,y=this._events[d];if(!y)return[];if(y.fn)return[y.fn];for(var v=0,E=y.length,P=new Array(E);ve),this.eth_accounts=jest.fn(e=>e),this.eth_requestAccounts=jest.fn(e=>e)}request(e){if(!this.chainId)return Promise.reject(new Error);switch(e.method){case"eth_chainId":return Promise.resolve(this.eth_chainId(this.chainId));case"eth_accounts":return Promise.resolve(this.eth_accounts(this.accounts));case"eth_requestAccounts":return Promise.resolve(this.eth_requestAccounts(this.accounts));default:throw new Error(`Method not supported on mock: ${JSON.stringify(e)}`)}}emitConnect(e){this.emit("connect",{chainId:e})}emitDisconnect(e){this.emit("disconnect",e)}emitChainChanged(e){this.emit("chainChanged",e)}emitAccountsChanged(e){this.emit("accountsChanged",e)}}B5.MockEIP1193Provider=nk;var Ki={},ik=f0&&f0.__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]}),ak=f0&&f0.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ok=f0&&f0.__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)&&ik(e,t,r);return ak(e,t),e};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.useWeb3React=Ki.Web3ReactProvider=void 0;const Js=ok(ne),sk=Hr,k7=(0,Js.createContext)(void 0);function uk({children:t,connectors:e,connectorOverride:r,network:n,lookupENS:i=!0}){const a=(0,Js.useRef)(e);if(e.length!=a.current.length||e.some((se,N)=>{const X=a.current[N];return se[0]!==X[0]}))throw new Error("The connectors prop passed to Web3ReactProvider must be referentially static. If connectors is changing, try providing a key prop to Web3ReactProvider that changes every time connectors changes.");const o=(0,sk.getPriorityConnector)(...e),{usePriorityConnector:s,useSelectedChainId:u,useSelectedAccounts:f,useSelectedIsActivating:d,useSelectedAccount:y,useSelectedIsActive:v,useSelectedProvider:E,useSelectedENSNames:P,useSelectedENSName:R}=o,O=s(),C=r??O,_=u(C),M=f(C),z=d(C),$=y(C),Y=v(C),J=E(C,n),ee=P(C,i?J:void 0),ae=R(C,i?J:void 0);return Js.default.createElement(k7.Provider,{value:{connector:C,chainId:_,accounts:M,isActivating:z,account:$,isActive:Y,provider:J,ENSNames:ee,ENSName:ae,hooks:o}},t)}Ki.Web3ReactProvider=uk;function lk(){const t=(0,Js.useContext)(k7);if(!t)throw Error("useWeb3React can only be used within the Web3ReactProvider component");return t}Ki.useWeb3React=lk;(function(t){var e=f0&&f0.__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=f0&&f0.__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(Hr,t),r(B5,t),r(Ki,t)})(_5);var Pa={},L5={};Object.defineProperty(L5,"__esModule",{value:!0});L5.Connector=void 0;class fk{constructor(e,r){this.actions=e,this.onError=r}resetState(){this.actions.resetState()}}L5.Connector=fk;var D8,Id;function ck(){if(Id)return D8;Id=1;function t({mustBeMetaMask:e=!1,silent:r=!1,timeout:n=3e3}={}){a();let i=!1;return new Promise(o=>{window.ethereum?s():(window.addEventListener("ethereum#initialized",s,{once:!0}),setTimeout(()=>{s()},n));function s(){if(i)return;i=!0,window.removeEventListener("ethereum#initialized",s);const{ethereum:u}=window;u&&(!e||u.isMetaMask)?o(u):(!r&&console.error("@metamask/detect-provider:",e&&u?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum."),o(null))}});function a(){if(typeof e!="boolean")throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if(typeof r!="boolean")throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if(typeof n!="number")throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}}return D8=t,D8}var dk=f0&&f0.__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]}),hk=f0&&f0.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),pk=f0&&f0.__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)&&dk(e,t,r);return hk(e,t),e},Q6=f0&&f0.__awaiter||function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};Object.defineProperty(Pa,"__esModule",{value:!0});var S7=Pa.MetaMask=Pa.NoMetaMaskError=void 0;const bk=L5;class Na extends Error{constructor(){super("MetaMask not installed"),this.name=Na.name,Object.setPrototypeOf(this,Na.prototype)}}Pa.NoMetaMaskError=Na;function Mo(t){return Number.parseInt(t,16)}class mk extends bk.Connector{constructor({actions:e,options:r,onError:n}){super(e,n),this.options=r}isomorphicInitialize(){return Q6(this,void 0,void 0,function*(){if(!this.eagerConnection)return this.eagerConnection=Promise.resolve().then(()=>pk(ck())).then(e=>Q6(this,void 0,void 0,function*(){var r,n;const i=yield e.default(this.options);i&&(this.provider=i,!((r=this.provider.providers)===null||r===void 0)&&r.length&&(this.provider=(n=this.provider.providers.find(a=>a.isMetaMask))!==null&&n!==void 0?n:this.provider.providers[0]),this.provider.on("connect",({chainId:a})=>{this.actions.update({chainId:Mo(a)})}),this.provider.on("disconnect",a=>{var o;if(a.code===1013){console.debug('MetaMask logged connection error 1013: "Try again later"');return}this.actions.resetState(),(o=this.onError)===null||o===void 0||o.call(this,a)}),this.provider.on("chainChanged",a=>{this.actions.update({chainId:Mo(a)})}),this.provider.on("accountsChanged",a=>{a.length===0?this.actions.resetState():this.actions.update({accounts:a})}))}))})}connectEagerly(){return Q6(this,void 0,void 0,function*(){const e=this.actions.startActivation();try{if(yield this.isomorphicInitialize(),!this.provider)return e();const r=yield this.provider.request({method:"eth_accounts"});if(!r.length)throw new Error("No accounts returned");const n=yield this.provider.request({method:"eth_chainId"});this.actions.update({chainId:Mo(n),accounts:r})}catch(r){console.debug("Could not connect eagerly",r),this.actions.resetState()}})}activate(e){var r,n;return Q6(this,void 0,void 0,function*(){let i;return!((n=(r=this.provider)===null||r===void 0?void 0:r.isConnected)===null||n===void 0)&&n.call(r)||(i=this.actions.startActivation()),this.isomorphicInitialize().then(()=>Q6(this,void 0,void 0,function*(){if(!this.provider)throw new Na;const a=yield this.provider.request({method:"eth_requestAccounts"}),o=yield this.provider.request({method:"eth_chainId"}),s=Mo(o),u=typeof e=="number"?e:e==null?void 0:e.chainId;if(!u||s===u)return this.actions.update({chainId:s,accounts:a});const f=`0x${u.toString(16)}`;return this.provider.request({method:"wallet_switchEthereumChain",params:[{chainId:f}]}).catch(d=>{var y,v;if((((v=(y=d.data)===null||y===void 0?void 0:y.originalError)===null||v===void 0?void 0:v.code)||d.code)===4902&&typeof e!="number"){if(!this.provider)throw new Error("No provider");return this.provider.request({method:"wallet_addEthereumChain",params:[Object.assign(Object.assign({},e),{chainId:f})]})}throw d}).then(()=>this.activate(u))})).catch(a=>{throw i==null||i(),a})})}watchAsset({address:e,symbol:r,decimals:n,image:i}){return Q6(this,void 0,void 0,function*(){if(!this.provider)throw new Error("No provider");return this.provider.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,symbol:r,decimals:n,image:i}}}).then(a=>{if(!a)throw new Error("Rejected");return!0})})}}S7=Pa.MetaMask=mk;const[Lf,O1]=_5.initializeConnector(t=>new S7({actions:t}));var Fe=(t=>(t[t.LOCAL=1337]="LOCAL",t[t.MAINNET=1]="MAINNET",t[t.SEPOLIA=11155111]="SEPOLIA",t[t.OPTIMISM=10]="OPTIMISM",t[t.OPTIMISM_GOERLI=420]="OPTIMISM_GOERLI",t[t.GOERLI=5]="GOERLI",t))(Fe||{});const h6="0xaa36a7",Rn="0xa",Ys="0x1",yk="11155111",I2={[Fe.SEPOLIA]:"0x3807fBD692Aa5c96F1D8D7c59a1346a885F40B1C",[Fe.OPTIMISM]:"0xca5b5811c0C40aAB3295f932b1B5112Eb7bb4bD6"},Uo={[Fe.SEPOLIA]:"0xC5a939923E0B336642024b479502E039338bEd00",[Fe.OPTIMISM]:"0x66929F55Ea1E38591f9430E5013C92cdC01F6cAd"},Oo={[Fe.SEPOLIA]:"0x0635513f179D50A207757E05759CbD106d7dFcE8",[Fe.MAINNET]:"0xD4416b13d2b3a9aBae7AcD5D6C2BbDBE25686401"},Ro={[Fe.SEPOLIA]:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",[Fe.MAINNET]:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},Io={[Fe.SEPOLIA]:"0xD4583DFd73B382B7e3230aa29Be774C1843FB7d2",[Fe.GOERLI]:"0xD4583DFd73B382B7e3230aa29Be774C1843FB7d2",[Fe.MAINNET]:"0xa1F47fBBa93574DB4a049C1c5bA03471A21EE01D"},Bo={[Fe.SEPOLIA]:"0x528bA1BA3186d8CABD2c4E8758a98fAf64eD8Af0",[Fe.OPTIMISM]:"0x0b35664aB5950cE92bce7222be165BB575D9b7c5"},Xa="abi/5.7.0",x0=new Z(Xa),C6={};let Bd={calldata:!0,memory:!0,storage:!0},gk={calldata:!0,memory:!0};function Lo(t,e){if(t==="bytes"||t==="string"){if(Bd[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&gk[e])return!0;return(Bd[e]||e==="payable")&&x0.throwArgumentError("invalid modifier","name",e),!1}function xk(t,e){let r=t;function n(s){x0.throwArgumentError(`unexpected character at position ${s}`,"param",t)}t=t.replace(/\s/g," ");function i(s){let u={type:"",name:"",parent:s,state:{allowType:!0}};return e&&(u.indexed=!1),u}let a={type:"",name:"",state:{allowType:!0}},o=a;for(let s=0;sJSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==w0.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===w0.full?", ":",")+")"):r+=this.type,e!==w0.sighash&&(this.indexed===!0&&(r+=" indexed"),e===w0.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?ft.fromString(e,r):ft.fromObject(e)}static fromObject(e){return ft.isParamType(e)?e:new ft(C6,{name:e.name||null,type:Z6(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(ft.fromObject):null})}static fromString(e,r){function n(i){return ft.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(xk(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function Ma(t,e){return Ak(t).map(r=>ft.fromString(r,e))}class cr{constructor(e,r){e!==C6&&x0.throwError("use a static from method",Z.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),ps(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return cr.isFragment(e)?e:typeof e=="string"?cr.fromString(e):cr.fromObject(e)}static fromObject(e){if(cr.isFragment(e))return e;switch(e.type){case"function":return H1.fromObject(e);case"event":return fr.fromObject(e);case"constructor":return q1.fromObject(e);case"error":return jr.fromObject(e);case"fallback":case"receive":return null}return x0.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?fr.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?H1.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?q1.fromString(e.trim()):e.split(" ")[0]==="error"?jr.fromString(e.substring(5).trim()):x0.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class fr extends cr{format(e){if(e||(e=w0.sighash),w0[e]||x0.throwArgumentError("invalid format type","format",e),e===w0.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==w0.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===w0.full?", ":",")+") ",e!==w0.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?fr.fromString(e):fr.fromObject(e)}static fromObject(e){if(fr.isEventFragment(e))return e;e.type!=="event"&&x0.throwArgumentError("invalid event object","value",e);const r={name:Ua(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(ft.fromObject):[],type:"event"};return new fr(C6,r)}static fromString(e){let r=e.match(Oa);r||x0.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:x0.warn("unknown modifier: "+i)}}),fr.fromObject({name:r[1].trim(),anonymous:n,inputs:Ma(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function T7(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&x0.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||x0.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=_e.from(r[1]),r[0]):t}function C7(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function P7(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&x0.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&x0.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&x0.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&x0.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&x0.throwArgumentError("unable to determine stateMutability","value",t),e}class q1 extends cr{format(e){if(e||(e=w0.sighash),w0[e]||x0.throwArgumentError("invalid format type","format",e),e===w0.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===w0.sighash&&x0.throwError("cannot format a constructor for sighash",Z.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===w0.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?q1.fromString(e):q1.fromObject(e)}static fromObject(e){if(q1.isConstructorFragment(e))return e;e.type!=="constructor"&&x0.throwArgumentError("invalid constructor object","value",e);let r=P7(e);r.constant&&x0.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(ft.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?_e.from(e.gas):null};return new q1(C6,n)}static fromString(e){let r={type:"constructor"};e=T7(e,r);let n=e.match(Oa);return(!n||n[1].trim()!=="constructor")&&x0.throwArgumentError("invalid constructor string","value",e),r.inputs=Ma(n[2].trim(),!1),C7(n[3].trim(),r),q1.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class H1 extends q1{format(e){if(e||(e=w0.sighash),w0[e]||x0.throwArgumentError("invalid format type","format",e),e===w0.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?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==w0.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===w0.full?", ":",")+") ",e!==w0.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?H1.fromString(e):H1.fromObject(e)}static fromObject(e){if(H1.isFunctionFragment(e))return e;e.type!=="function"&&x0.throwArgumentError("invalid function object","value",e);let r=P7(e);const n={type:e.type,name:Ua(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(ft.fromObject):[],outputs:e.outputs?e.outputs.map(ft.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?_e.from(e.gas):null};return new H1(C6,n)}static fromString(e){let r={type:"function"};e=T7(e,r);let n=e.split(" returns ");n.length>2&&x0.throwArgumentError("invalid function string","value",e);let i=n[0].match(Oa);if(i||x0.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&Ua(r.name),r.inputs=Ma(i[2],!1),C7(i[3].trim(),r),n.length>1){let a=n[1].match(Oa);(a[1].trim()!=""||a[3].trim()!="")&&x0.throwArgumentError("unexpected tokens","value",e),r.outputs=Ma(a[2],!1)}else r.outputs=[];return H1.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function Ld(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&x0.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class jr extends cr{format(e){if(e||(e=w0.sighash),w0[e]||x0.throwArgumentError("invalid format type","format",e),e===w0.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==w0.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===w0.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?jr.fromString(e):jr.fromObject(e)}static fromObject(e){if(jr.isErrorFragment(e))return e;e.type!=="error"&&x0.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:Ua(e.name),inputs:e.inputs?e.inputs.map(ft.fromObject):[]};return Ld(new jr(C6,r))}static fromString(e){let r={type:"error"},n=e.match(Oa);return n||x0.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&Ua(r.name),r.inputs=Ma(n[2],!1),Ld(jr.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Z6(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const wk=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Ua(t){return(!t||!t.match(wk))&&x0.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Oa=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Ak(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&Ff.throwError("value out-of-bounds",Z.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=L0([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class Xs{constructor(e,r,n,i){ue(this,"_data",ve(e)),ue(this,"wordSize",r||32),ue(this,"_coerceFunc",n),ue(this,"allowLoose",i),this._offset=0}get data(){return ke(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):Xs.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:Ff.throwError("data out-of-bounds",Z.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new Xs(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return _e.from(this.readBytes(this.wordSize))}}class Ek extends nn{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=S0(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return S0(F0(e.readValue().toHexString(),20))}}class _k extends nn{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const gi=new Z(Xa);function M7(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let u={};n=e.map(f=>{const d=f.localName;return d||gi.throwError("cannot encode object for signature with missing names",Z.errors.INVALID_ARGUMENT,{argument:"values",coder:f,value:r}),u[d]&&gi.throwError("cannot encode object for signature with duplicate names",Z.errors.INVALID_ARGUMENT,{argument:"values",coder:f,value:r}),u[d]=!0,r[d]})}else gi.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&gi.throwArgumentError("types/value length mismatch","tuple",r);let i=new ol(t.wordSize),a=new ol(t.wordSize),o=[];e.forEach((u,f)=>{let d=n[f];if(u.dynamic){let y=a.length;u.encode(a,d);let v=i.writeUpdatableValue();o.push(E=>{v(E+y)})}else u.encode(i,d)}),o.forEach(u=>{u(i.length)});let s=t.appendWriter(i);return s+=t.appendWriter(a),s}function U7(t,e){let r=[],n=t.subReader(0);e.forEach(a=>{let o=null;if(a.dynamic){let s=t.readValue(),u=n.subReader(s.toNumber());try{o=a.decode(u)}catch(f){if(f.code===Z.errors.BUFFER_OVERRUN)throw f;o=f,o.baseType=a.name,o.name=a.localName,o.type=a.type}}else try{o=a.decode(t)}catch(s){if(s.code===Z.errors.BUFFER_OVERRUN)throw s;o=s,o.baseType=a.name,o.name=a.localName,o.type=a.type}o!=null&&r.push(o)});const i=e.reduce((a,o)=>{const s=o.localName;return s&&(a[s]||(a[s]=0),a[s]++),a},{});e.forEach((a,o)=>{let s=a.localName;if(!s||i[s]!==1||(s==="length"&&(s="_length"),r[s]!=null))return;const u=r[o];u instanceof Error?Object.defineProperty(r,s,{enumerable:!0,get:()=>{throw u}}):r[s]=u});for(let a=0;a{throw o}})}return Object.freeze(r)}class kk extends nn{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",a=r===-1||e.dynamic;super("array",i,n,a),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&gi.throwError("insufficient data length",Z.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i{o.dynamic&&(n=!0),i.push(o.type)});const a="tuple("+i.join(",")+")";super("tuple",a,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const a=i.localName;return a&&(n[a]||(n[a]=0),n[a]++),n},{});return this.coders.forEach((n,i)=>{let a=n.localName;!a||r[a]!==1||(a==="length"&&(a="_length"),e[a]==null&&(e[a]=e[i]))}),Object.freeze(e)}encode(e,r){return M7(e,this.coders,r)}decode(e){return e.coerce(this.name,U7(e,this.coders))}}const jo=new Z(Xa),Uk=new RegExp(/^bytes([0-9]*)$/),Ok=new RegExp(/^(u?int)([0-9]*)$/);class R7{constructor(e){ue(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Ek(e.name);case"bool":return new Sk(e.name);case"string":return new Mk(e.name);case"bytes":return new Tk(e.name);case"array":return new kk(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Fo((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new Pk(e.name)}let r=e.type.match(Ok);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&jo.throwArgumentError("invalid "+r[1]+" bit length","param",e),new Nk(n/8,r[1]==="int",e.name)}if(r=e.type.match(Uk),r){let n=parseInt(r[1]);return(n===0||n>32)&&jo.throwArgumentError("invalid bytes length","param",e),new Ck(n,e.name)}return jo.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new Xs(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new ol(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(ft.from(i)));return new Fo(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&jo.throwError("types/values length mismatch",Z.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(ft.from(o))),i=new Fo(n,"_"),a=this._getWriter();return i.encode(a,r),a.data}decode(e,r,n){const i=e.map(o=>this._getCoder(ft.from(o)));return new Fo(i,"_").decode(this._getReader(ve(r),n))}}const I7=new R7,G0=new Z(Xa);class B7 extends Gn{}class L7 extends Gn{}class Rk extends Gn{}class Zs extends Gn{static isIndexed(e){return!!(e&&e._isIndexed)}}const Ik={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Fd(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class Xr{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,ue(this,"fragments",r.map(n=>cr.from(n)).filter(n=>n!=null)),ue(this,"_abiCoder",_t(new.target,"getAbiCoder")()),ue(this,"functions",{}),ue(this,"errors",{}),ue(this,"events",{}),ue(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){G0.warn("duplicate definition - constructor");return}ue(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let a=n.format();if(i[a]){G0.warn("duplicate definition - "+a);return}i[a]=n}),this.deploy||ue(this,"deploy",q1.from({payable:!1,type:"constructor"})),ue(this,"_isInterface",!0)}format(e){e||(e=w0.full),e===w0.sighash&&G0.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===w0.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return I7}static getAddress(e){return S0(e)}static getSighash(e){return nt(An(e.format()),0,4)}static getEventTopic(e){return An(e.format())}getFunction(e){if(We(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];G0.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(a=>a.split("(")[0]===n);return i.length===0?G0.throwArgumentError("no matching function","name",n):i.length>1&&G0.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[H1.fromString(e).format()];return r||G0.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(We(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];G0.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(a=>a.split("(")[0]===n);return i.length===0?G0.throwArgumentError("no matching event","name",n):i.length>1&&G0.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[fr.fromString(e).format()];return r||G0.throwArgumentError("no matching event","signature",e),r}getError(e){if(We(e)){const n=_t(this.constructor,"getSighash");for(const i in this.errors){const a=this.errors[i];if(e===n(a))return this.errors[i]}G0.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(a=>a.split("(")[0]===n);return i.length===0?G0.throwArgumentError("no matching error","name",n):i.length>1&&G0.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[H1.fromString(e).format()];return r||G0.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return _t(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),_t(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=ve(r);return ke(n.slice(0,4))!==this.getSighash(e)&&G0.throwArgumentError(`data signature does not match error ${e.name}.`,"data",ke(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),ke(L0([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=ve(r);return ke(n.slice(0,4))!==this.getSighash(e)&&G0.throwArgumentError(`data signature does not match function ${e.name}.`,"data",ke(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),ke(L0([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=ve(r),i=null,a="",o=null,s=null,u=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const f=ke(n.slice(0,4)),d=Ik[f];if(d)o=this._abiCoder.decode(d.inputs,n.slice(4)),s=d.name,u=d.signature,d.reason&&(i=o[0]),s==="Error"?a=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:s==="Panic"&&(a=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const y=this.getError(f);o=this._abiCoder.decode(y.inputs,n.slice(4)),s=y.name,u=y.format()}catch{}break}}return G0.throwError("call revert exception"+a,Z.errors.CALL_EXCEPTION,{method:e.format(),data:ke(r),errorArgs:o,errorName:s,errorSignature:u,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),ke(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&G0.throwError("too many arguments for "+e.format(),Z.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(a,o)=>a.type==="string"?An(o):a.type==="bytes"?M0(ke(o)):(a.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),a.type.match(/^u?int/)&&(o=_e.from(o).toHexString()),a.type==="address"&&this._abiCoder.encode(["address"],[o]),F0(ke(o),32));for(r.forEach((a,o)=>{let s=e.inputs[o];if(!s.indexed){a!=null&&G0.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+s.name,a);return}a==null?n.push(null):s.baseType==="array"||s.baseType==="tuple"?G0.throwArgumentError("filtering with tuples or arrays not supported","contract."+s.name,a):Array.isArray(a)?n.push(a.map(u=>i(s,u))):n.push(i(s,a))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],a=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&G0.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,s)=>{const u=r[s];if(o.indexed)if(o.type==="string")n.push(An(u));else if(o.type==="bytes")n.push(M0(u));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[u]))}else i.push(o),a.push(u)}),{data:this._abiCoder.encode(i,a),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let v=this.getEventTopic(e);(!We(n[0],32)||n[0].toLowerCase()!==v)&&G0.throwError("fragment/topic mismatch",Z.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:v,value:n[0]}),n=n.slice(1)}let i=[],a=[],o=[];e.inputs.forEach((v,E)=>{v.indexed?v.type==="string"||v.type==="bytes"||v.baseType==="tuple"||v.baseType==="array"?(i.push(ft.fromObject({type:"bytes32",name:v.name})),o.push(!0)):(i.push(v),o.push(!1)):(a.push(v),o.push(!1))});let s=n!=null?this._abiCoder.decode(i,L0(n)):null,u=this._abiCoder.decode(a,r,!0),f=[],d=0,y=0;e.inputs.forEach((v,E)=>{if(v.indexed)if(s==null)f[E]=new Zs({_isIndexed:!0,hash:null});else if(o[E])f[E]=new Zs({_isIndexed:!0,hash:s[y++]});else try{f[E]=s[y++]}catch(P){f[E]=P}else try{f[E]=u[d++]}catch(P){f[E]=P}if(v.name&&f[v.name]==null){const P=f[E];P instanceof Error?Object.defineProperty(f,v.name,{enumerable:!0,get:()=>{throw Fd(`property ${JSON.stringify(v.name)}`,P)}}):f[v.name]=P}});for(let v=0;v{throw Fd(`index ${v}`,E)}})}return Object.freeze(f)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new L7({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:_e.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new B7({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=ke(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new Rk({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const Bk=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:R7,ConstructorFragment:q1,ErrorFragment:jr,EventFragment:fr,FormatTypes:w0,Fragment:cr,FunctionFragment:H1,Indexed:Zs,Interface:Xr,LogDescription:B7,ParamType:ft,TransactionDescription:L7,checkResultErrors:N7,defaultAbiCoder:I7},Symbol.toStringTag,{value:"Module"})),Lk="contracts/5.7.0";var jn=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const N0=new Z(Lk),Fk={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function e5(t,e){return jn(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&N0.throwArgumentError("invalid address or ENS name","name",r);try{return S0(r)}catch{}t||N0.throwError("a provider or signer is needed to resolve ENS names",Z.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&N0.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function J2(t,e,r){return jn(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>J2(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield e5(t,e):r.type==="tuple"?yield J2(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>J2(t,n,r.arrayChildren))):Promise.reject(N0.makeError("invalid value for array",Z.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function F5(t,e,r){return jn(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=D0(r.pop())),N0.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=X0({override:e5(t.signer,n.from),signer:t.signer.getAddress()}).then(f=>jn(this,void 0,void 0,function*(){return S0(f.signer)!==f.override&&N0.throwError("Contract with a Signer cannot override from",Z.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),f.override})):n.from=t.signer.getAddress():n.from&&(n.from=e5(t.provider,n.from));const i=yield X0({args:J2(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:X0(n)||{}}),a=t.interface.encodeFunctionData(e,i.args),o={data:a,to:i.address},s=i.overrides;if(s.nonce!=null&&(o.nonce=_e.from(s.nonce).toNumber()),s.gasLimit!=null&&(o.gasLimit=_e.from(s.gasLimit)),s.gasPrice!=null&&(o.gasPrice=_e.from(s.gasPrice)),s.maxFeePerGas!=null&&(o.maxFeePerGas=_e.from(s.maxFeePerGas)),s.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=_e.from(s.maxPriorityFeePerGas)),s.from!=null&&(o.from=s.from),s.type!=null&&(o.type=s.type),s.accessList!=null&&(o.accessList=Qn(s.accessList)),o.gasLimit==null&&e.gas!=null){let f=21e3;const d=ve(a);for(let y=0;yn[f]!=null);return u.length&&N0.throwError(`cannot override ${u.map(f=>JSON.stringify(f)).join(",")}`,Z.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:u}),o})}function jk(t,e){return function(...r){return F5(t,e,r)}}function Dk(t,e){const r=t.signer||t.provider;return function(...n){return jn(this,void 0,void 0,function*(){r||N0.throwError("estimate require a provider or signer",Z.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield F5(t,e,n);return yield r.estimateGas(i)})}}function F7(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(a=>{let o=Ht(a),s=null;try{s=t.interface.parseLog(a)}catch{}return s&&(o.args=s.args,o.decode=(u,f)=>t.interface.decodeEventLog(s.eventFragment,u,f),o.event=s.name,o.eventSignature=s.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function j7(t,e,r){const n=t.signer||t.provider;return function(...i){return jn(this,void 0,void 0,function*(){let a;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const u=D0(i.pop());u.blockTag!=null&&(a=yield u.blockTag),delete u.blockTag,i.push(u)}t.deployTransaction!=null&&(yield t._deployed(a));const o=yield F5(t,e,i),s=yield n.call(o,a);try{let u=t.interface.decodeFunctionResult(e,s);return r&&e.outputs.length===1&&(u=u[0]),u}catch(u){throw u.code===Z.errors.CALL_EXCEPTION&&(u.address=t.address,u.args=i,u.transaction=o),u}})}}function zk(t,e){return function(...r){return jn(this,void 0,void 0,function*(){t.signer||N0.throwError("sending a transaction requires a signer",Z.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield F5(t,e,r),i=yield t.signer.sendTransaction(n);return F7(t,i),i})}}function jd(t,e,r){return e.constant?j7(t,e,r):zk(t,e)}function D7(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class Ra{constructor(e,r){ue(this,"tag",e),ue(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class $k extends Ra{constructor(){super("error",null)}}class Dd extends Ra{constructor(e,r,n,i){const a={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&N0.throwArgumentError("topic mismatch","topics",i),a.topics=i.slice()):a.topics=[o],super(D7(a),a),ue(this,"address",e),ue(this,"interface",r),ue(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=N7(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class zd extends Ra{constructor(e,r){super("*",{address:e}),ue(this,"address",e),ue(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class qk{constructor(e,r,n){ue(this,"interface",_t(new.target,"getInterface")(r)),n==null?(ue(this,"provider",null),ue(this,"signer",null)):B6.isSigner(n)?(ue(this,"provider",n.provider||null),ue(this,"signer",n)):R6.isProvider(n)?(ue(this,"provider",n),ue(this,"signer",null)):N0.throwArgumentError("invalid signer or provider","signerOrProvider",n),ue(this,"callStatic",{}),ue(this,"estimateGas",{}),ue(this,"functions",{}),ue(this,"populateTransaction",{}),ue(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(s=>{const u=this.interface.events[s];ue(this.filters,s,(...f)=>({address:this.address,topics:this.interface.encodeFilterTopics(u,f)})),o[u.name]||(o[u.name]=[]),o[u.name].push(s)}),Object.keys(o).forEach(s=>{const u=o[s];u.length===1?ue(this.filters,s,this.filters[u[0]]):N0.warn(`Duplicate definition of ${s} (${u.join(", ")})`)})}if(ue(this,"_runningEvents",{}),ue(this,"_wrappedEmits",{}),e==null&&N0.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ue(this,"address",e),this.provider)ue(this,"resolvedAddress",e5(this.provider,e));else try{ue(this,"resolvedAddress",Promise.resolve(S0(e)))}catch{N0.throwError("provider is required to use ENS name as contract address",Z.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},a={};Object.keys(this.interface.functions).forEach(o=>{const s=this.interface.functions[o];if(a[o]){N0.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}a[o]=!0;{const u=s.name;i[`%${u}`]||(i[`%${u}`]=[]),i[`%${u}`].push(o)}this[o]==null&&ue(this,o,jd(this,s,!0)),this.functions[o]==null&&ue(this.functions,o,jd(this,s,!1)),this.callStatic[o]==null&&ue(this.callStatic,o,j7(this,s,!0)),this.populateTransaction[o]==null&&ue(this.populateTransaction,o,jk(this,s)),this.estimateGas[o]==null&&ue(this.estimateGas,o,Dk(this,s))}),Object.keys(i).forEach(o=>{const s=i[o];if(s.length>1)return;o=o.substring(1);const u=s[0];try{this[o]==null&&ue(this,o,this[u])}catch{}this.functions[o]==null&&ue(this.functions,o,this.functions[u]),this.callStatic[o]==null&&ue(this.callStatic,o,this.callStatic[u]),this.populateTransaction[o]==null&&ue(this.populateTransaction,o,this.populateTransaction[u]),this.estimateGas[o]==null&&ue(this.estimateGas,o,this.estimateGas[u])})}static getContractAddress(e){return S5(e)}static getInterface(e){return Xr.isInterface(e)?e:new Xr(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&N0.throwError("contract not deployed",Z.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||N0.throwError("sending a transactions require a signer",Z.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=D0(e||{});return["from","to"].forEach(function(n){r[n]!=null&&N0.throwError("cannot override "+n,Z.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new Of(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&ue(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return Zs.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new $k);if(e==="event")return this._normalizeRunningEvent(new Ra("event",null));if(e==="*")return this._normalizeRunningEvent(new zd(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new Dd(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Dd(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Ra(D7(r),r))}return this._normalizeRunningEvent(new zd(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=Ht(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||N0.throwError("events require a provider or a signer with a provider",Z.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=a=>{let o=this._wrapEvent(e,a,r);if(o.decodeError==null)try{const s=e.getEmit(o);this.emit(e.filter,...s)}catch(s){o.decodeError=s.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),a=D0(i.filter);return typeof r=="string"&&We(r,32)?(n!=null&&N0.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),a.blockHash=r):(a.fromBlock=r??0,a.toBlock=n??"latest"),this.provider.getLogs(a).then(o=>o.map(s=>this._wrapEvent(i,s,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class Dn extends qk{}class i2{constructor(e,r,n){let i=null;typeof r=="string"?i=r:Kn(r)?i=ke(r):r&&typeof r.object=="string"?i=r.object:i="!",i.substring(0,2)!=="0x"&&(i="0x"+i),(!We(i)||i.length%2)&&N0.throwArgumentError("invalid bytecode","bytecode",r),n&&!B6.isSigner(n)&&N0.throwArgumentError("invalid signer","signer",n),ue(this,"bytecode",i),ue(this,"interface",_t(new.target,"getInterface")(e)),ue(this,"signer",n||null)}getDeployTransaction(...e){let r={};if(e.length===this.interface.deploy.inputs.length+1&&typeof e[e.length-1]=="object"){r=D0(e.pop());for(const n in r)if(!Fk[n])throw new Error("unknown transaction override "+n)}return["data","from","to"].forEach(n=>{r[n]!=null&&N0.throwError("cannot override "+n,Z.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.value&&!_e.from(r.value).isZero()&&!this.interface.deploy.payable&&N0.throwError("non-payable constructor cannot override value",Z.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:r.value}),N0.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),r.data=ke(L0([this.bytecode,this.interface.encodeDeploy(e)])),r}deploy(...e){return jn(this,void 0,void 0,function*(){let r={};e.length===this.interface.deploy.inputs.length+1&&(r=e.pop()),N0.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const n=yield J2(this.signer,e,this.interface.deploy.inputs);n.push(r);const i=this.getDeployTransaction(...n),a=yield this.signer.sendTransaction(i),o=_t(this.constructor,"getContractAddress")(a),s=_t(this.constructor,"getContract")(o,this.interface,this.signer);return F7(s,a),ue(s,"deployTransaction",a),s})}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,r){e==null&&N0.throwError("missing compiler output",Z.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),typeof e=="string"&&(e=JSON.parse(e));const n=e.abi;let i=null;return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,r)}static getInterface(e){return Dn.getInterface(e)}static getContractAddress(e){return S5(e)}static getContract(e,r,n){return new Dn(e,r,n)}}function jf(t,e,r,n,i){t=ve(t),e=ve(e);let a,o=1;const s=new Uint8Array(n),u=new Uint8Array(e.length+4);u.set(e);let f,d;for(let y=1;y<=o;y++){u[e.length]=y>>24&255,u[e.length+1]=y>>16&255,u[e.length+2]=y>>8&255,u[e.length+3]=y&255;let v=ve(Ta(i,t,u));a||(a=v.length,d=new Uint8Array(a),o=Math.ceil(n/a),f=n-(o-1)*a),d.set(v);for(let R=1;R=256)throw new Error("Depth too large!");return Hd(L0([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",ke(this.depth),this.parentFingerprint,F0(ke(this.index),4),this.chainCode,this.privateKey!=null?L0(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new s1(J6,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~ei));const n=new Uint8Array(37);if(e&ei){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(ve(this.privateKey),1),r&&(r+="'")}else n.set(ve(this.publicKey));for(let y=24;y>=0;y-=8)n[33+(y>>3)]=e>>24-y&255;const i=ve(Ta(Hi.sha512,this.chainCode,n)),a=i.slice(0,32),o=i.slice(32);let s=null,u=null;this.privateKey?s=Do(_e.from(a).add(this.privateKey).mod(Qk)):u=new m6(ke(a))._addPoint(this.publicKey);let f=r;const d=this.mnemonic;return d&&(f=Object.freeze({phrase:d.phrase,path:r,locale:d.locale||"en"})),new s1(J6,s,u,this.fingerprint,Do(o),e,this.depth+1,f)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=ei)throw new Error("invalid path index - "+a);n=n._derive(ei+o)}else if(a.match(/^[0-9]+$/)){const o=parseInt(a);if(o>=ei)throw new Error("invalid path index - "+a);n=n._derive(o)}else throw new Error("invalid path component - "+a)}return n}static _fromSeed(e,r){const n=ve(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=ve(Ta(Hi.sha512,Jk,n));return new s1(J6,Do(i.slice(0,32)),null,"0x00000000",Do(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=Df(n),e=D5(j5(e,n),n),s1._fromSeed(q7(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return s1._fromSeed(e,null)}static fromExtendedKey(e){const r=Di.decode(e);(r.length!==82||Hd(r.slice(0,78))!==e)&&Ia.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=ke(r.slice(5,9)),a=parseInt(ke(r.slice(9,13)).substring(2),16),o=ke(r.slice(13,45)),s=r.slice(45,78);switch(ke(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new s1(J6,null,ke(s),i,o,a,n,null);case"0x0488ade4":case"0x04358394 ":if(s[0]!==0)break;return new s1(J6,ke(s.slice(1)),null,i,o,a,n,null)}return Ia.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function q7(t,e){e||(e="");const r=z0("mnemonic"+e,Sr.NFKD);return jf(z0(t,Sr.NFKD),r,2048,64,"sha512")}function j5(t,e){e=Df(e),Ia.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=ve(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let f=0;f>3]|=1<<7-i%8),i++}const a=32*r.length/3,o=r.length/3,s=$7(o);if((ve(h1(n.slice(0,a/8)))[0]&s)!==(n[n.length-1]&s))throw new Error("invalid checksum");return ke(n.slice(0,a/8))}function D5(t,e){if(e=Df(e),t=ve(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let o=0;o8?(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]&Yk(8-n)),n+=3);const i=t.length/4,a=ve(h1(t))[0]&$7(i);return r[r.length-1]<<=i,r[r.length-1]|=a>>8-i,e.join(r.map(o=>e.getWord(o)))}function Xk(t,e){try{return j5(t,e),!0}catch{}return!1}function Zk(t){return(typeof t!="number"||t<0||t>=ei||t%1)&&Ia.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const eS=Object.freeze(Object.defineProperty({__proto__:null,HDNode:s1,defaultPath:Gi,entropyToMnemonic:D5,getAccountPath:Zk,isValidMnemonic:Xk,mnemonicToEntropy:j5,mnemonicToSeed:q7},Symbol.toStringTag,{value:"Module"}));var H7={exports:{}};(function(t,e){(function(r){function n(b){return parseInt(b)===b}function i(b){if(!n(b.length))return!1;for(var l=0;l255)return!1;return!0}function a(b,l){if(b.buffer&&ArrayBuffer.isView(b)&&b.name==="Uint8Array")return l&&(b.slice?b=b.slice():b=Array.prototype.slice.call(b)),b;if(Array.isArray(b)){if(!i(b))throw new Error("Array contains invalid value: "+b);return new Uint8Array(b)}if(n(b.length)&&i(b))return new Uint8Array(b);throw new Error("unsupported array-like object")}function o(b){return new Uint8Array(b)}function s(b,l,m,S,p){(S!=null||p!=null)&&(b.slice?b=b.slice(S,p):b=Array.prototype.slice.call(b,S,p)),l.set(b,m)}var u=function(){function b(m){var S=[],p=0;for(m=encodeURI(m);p191&&L<224?(S.push(String.fromCharCode((L&31)<<6|m[p+1]&63)),p+=2):(S.push(String.fromCharCode((L&15)<<12|(m[p+1]&63)<<6|m[p+2]&63)),p+=3)}return S.join("")}return{toBytes:b,fromBytes:l}}(),f=function(){function b(S){for(var p=[],L=0;L>4]+l[j&15])}return p.join("")}return{toBytes:b,fromBytes:m}}(),d={16:10,24:12,32:14},y=[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],v=[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],E=[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],P=[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],R=[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],O=[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],C=[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],_=[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],M=[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],z=[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],$=[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],Y=[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],J=[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],ee=[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],ae=[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 se(b){for(var l=[],m=0;m>2,this._Ke[L][l%4]=p[l],this._Kd[b-L][l%4]=p[l];for(var j=0,V=S,G;V>16&255]<<24^v[G>>8&255]<<16^v[G&255]<<8^v[G>>24&255]^y[j]<<24,j+=1,S!=8)for(var l=1;l>8&255]<<8^v[G>>16&255]<<16^v[G>>24&255]<<24;for(var l=S/2+1;l>2,ie=V%4,this._Ke[re][ie]=p[l],this._Kd[b-re][ie]=p[l++],V++}for(var re=1;re>24&255]^J[G>>16&255]^ee[G>>8&255]^ae[G&255]},N.prototype.encrypt=function(b){if(b.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var l=this._Ke.length-1,m=[0,0,0,0],S=se(b),p=0;p<4;p++)S[p]^=this._Ke[0][p];for(var L=1;L>24&255]^R[S[(p+1)%4]>>16&255]^O[S[(p+2)%4]>>8&255]^C[S[(p+3)%4]&255]^this._Ke[L][p];S=m.slice()}for(var j=o(16),V,p=0;p<4;p++)V=this._Ke[l][p],j[4*p]=(v[S[p]>>24&255]^V>>24)&255,j[4*p+1]=(v[S[(p+1)%4]>>16&255]^V>>16)&255,j[4*p+2]=(v[S[(p+2)%4]>>8&255]^V>>8)&255,j[4*p+3]=(v[S[(p+3)%4]&255]^V)&255;return j},N.prototype.decrypt=function(b){if(b.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var l=this._Kd.length-1,m=[0,0,0,0],S=se(b),p=0;p<4;p++)S[p]^=this._Kd[0][p];for(var L=1;L>24&255]^M[S[(p+3)%4]>>16&255]^z[S[(p+2)%4]>>8&255]^$[S[(p+1)%4]&255]^this._Kd[L][p];S=m.slice()}for(var j=o(16),V,p=0;p<4;p++)V=this._Kd[l][p],j[4*p]=(E[S[p]>>24&255]^V>>24)&255,j[4*p+1]=(E[S[(p+3)%4]>>16&255]^V>>16)&255,j[4*p+2]=(E[S[(p+2)%4]>>8&255]^V>>8)&255,j[4*p+3]=(E[S[(p+1)%4]&255]^V)&255;return j};var X=function(b){if(!(this instanceof X))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new N(b)};X.prototype.encrypt=function(b){if(b=a(b),b.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var l=o(b.length),m=o(16),S=0;S=0;--l)this._counter[l]=b%256,b=b>>8},U.prototype.setBytes=function(b){if(b=a(b,!0),b.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=b},U.prototype.increment=function(){for(var b=15;b>=0;b--)if(this._counter[b]===255)this._counter[b]=0;else{this._counter[b]++;break}};var k=function(b,l){if(!(this instanceof k))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",l instanceof U||(l=new U(l)),this._counter=l,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new N(b)};k.prototype.encrypt=function(b){for(var l=a(b,!0),m=0;m16)throw new Error("PKCS#7 padding byte out of range");for(var m=b.length-l,S=0;S=64;){let q=C,b=_,l=M,m=z,S=$,p=Y,L=J,j=ee,V,G,re,ie,oe;for(G=0;G<16;G++)re=T+G*4,ae[G]=(k[re]&255)<<24|(k[re+1]&255)<<16|(k[re+2]&255)<<8|k[re+3]&255;for(G=16;G<64;G++)V=ae[G-2],ie=(V>>>17|V<<15)^(V>>>19|V<<13)^V>>>10,V=ae[G-15],oe=(V>>>7|V<<25)^(V>>>18|V<<14)^V>>>3,ae[G]=(ie+ae[G-7]|0)+(oe+ae[G-16]|0)|0;for(G=0;G<64;G++)ie=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&p^~S&L)|0)+(j+(O[G]+ae[G]|0)|0)|0,oe=((q>>>2|q<<30)^(q>>>13|q<<19)^(q>>>22|q<<10))+(q&b^q&l^b&l)|0,j=L,L=p,p=S,S=m+ie|0,m=l,l=b,b=q,q=ie+oe|0;C=C+q|0,_=_+b|0,M=M+l|0,z=z+m|0,$=$+S|0,Y=Y+p|0,J=J+L|0,ee=ee+j|0,T+=64,F-=64}}se(R);let N,X=R.length%64,I=R.length/536870912|0,c=R.length<<3,x=X<56?56:120,U=R.slice(R.length-X,R.length);for(U.push(128),N=X+1;N>>24&255),U.push(I>>>16&255),U.push(I>>>8&255),U.push(I>>>0&255),U.push(c>>>24&255),U.push(c>>>16&255),U.push(c>>>8&255),U.push(c>>>0&255),se(U),[C>>>24&255,C>>>16&255,C>>>8&255,C>>>0&255,_>>>24&255,_>>>16&255,_>>>8&255,_>>>0&255,M>>>24&255,M>>>16&255,M>>>8&255,M>>>0&255,z>>>24&255,z>>>16&255,z>>>8&255,z>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y>>>0&255,J>>>24&255,J>>>16&255,J>>>8&255,J>>>0&255,ee>>>24&255,ee>>>16&255,ee>>>8&255,ee>>>0&255]}function a(R,O,C){R=R.length<=64?R:i(R);const _=64+O.length+4,M=new Array(_),z=new Array(64);let $,Y=[];for($=0;$<64;$++)M[$]=54;for($=0;$=_-4;ee--){if(M[ee]++,M[ee]<=255)return;M[ee]=0}}for(;C>=32;)J(),Y=Y.concat(i(z.concat(i(M)))),C-=32;return C>0&&(J(),Y=Y.concat(i(z.concat(i(M))).slice(0,C))),Y}function o(R,O,C,_,M){let z;for(d(R,(2*C-1)*16,M,0,16),z=0;z<2*C;z++)f(R,z*16,M,16),u(M,_),d(M,0,R,O+z*16,16);for(z=0;z>>32-O}function u(R,O){d(R,0,O,0,16);for(let C=8;C>0;C-=2)O[4]^=s(O[0]+O[12],7),O[8]^=s(O[4]+O[0],9),O[12]^=s(O[8]+O[4],13),O[0]^=s(O[12]+O[8],18),O[9]^=s(O[5]+O[1],7),O[13]^=s(O[9]+O[5],9),O[1]^=s(O[13]+O[9],13),O[5]^=s(O[1]+O[13],18),O[14]^=s(O[10]+O[6],7),O[2]^=s(O[14]+O[10],9),O[6]^=s(O[2]+O[14],13),O[10]^=s(O[6]+O[2],18),O[3]^=s(O[15]+O[11],7),O[7]^=s(O[3]+O[15],9),O[11]^=s(O[7]+O[3],13),O[15]^=s(O[11]+O[7],18),O[1]^=s(O[0]+O[3],7),O[2]^=s(O[1]+O[0],9),O[3]^=s(O[2]+O[1],13),O[0]^=s(O[3]+O[2],18),O[6]^=s(O[5]+O[4],7),O[7]^=s(O[6]+O[5],9),O[4]^=s(O[7]+O[6],13),O[5]^=s(O[4]+O[7],18),O[11]^=s(O[10]+O[9],7),O[8]^=s(O[11]+O[10],9),O[9]^=s(O[8]+O[11],13),O[10]^=s(O[9]+O[8],18),O[12]^=s(O[15]+O[14],7),O[13]^=s(O[12]+O[15],9),O[14]^=s(O[13]+O[12],13),O[15]^=s(O[14]+O[13],18);for(let C=0;C<16;++C)R[C]+=O[C]}function f(R,O,C,_){for(let M=0;M<_;M++)C[M]^=R[O+M]}function d(R,O,C,_,M){for(;M--;)C[_++]=R[O++]}function y(R){if(!R||typeof R.length!="number")return!1;for(let O=0;O=256)return!1}return!0}function v(R,O){if(typeof R!="number"||R%1)throw new Error("invalid "+O);return R}function E(R,O,C,_,M,z,$){if(C=v(C,"N"),_=v(_,"r"),M=v(M,"p"),z=v(z,"dkLen"),C===0||C&C-1)throw new Error("N must be power of 2");if(C>2147483647/128/_)throw new Error("N too large");if(_>2147483647/128/M)throw new Error("r too large");if(!y(R))throw new Error("password must be an array or buffer");if(R=Array.prototype.slice.call(R),!y(O))throw new Error("salt must be an array or buffer");O=Array.prototype.slice.call(O);let Y=a(R,O,M*128*_);const J=new Uint32Array(M*32*_);for(let S=0;Sb&&(S=b);for(let L=0;Lb&&(S=b);for(let L=0;L>0&255),Y.push(J[L]>>8&255),Y.push(J[L]>>16&255),Y.push(J[L]>>24&255);const p=a(R,Y,z);return $&&$(null,1,p),p}$&&l(m)};if(!$)for(;;){const S=m();if(S!=null)return S}m()}const P={scrypt:function(R,O,C,_,M,z,$){return new Promise(function(Y,J){let ee=0;$&&$(0),E(R,O,C,_,M,z,function(ae,se,N){if(ae)J(ae);else if(N)$&&ee!==1&&$(1),Y(new Uint8Array(N));else if($&&se!==ee)return ee=se,$(se)})})},syncScrypt:function(R,O,C,_,M,z){return new Uint8Array(E(R,O,C,_,M,z))}};t.exports=P})()})(G7);var oS=G7.exports;const qf=N1(oS);var sS=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const sl=new Z(K7);function Kd(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class uS extends Gn{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function lS(t,e,r){if(rt(t,"crypto/cipher")==="aes-128-ctr"){const i=y6(rt(t,"crypto/cipherparams/iv")),a=new dr.Counter(i),o=new dr.ModeOfOperation.ctr(e,a);return ve(o.decrypt(r))}return null}function V7(t,e){const r=y6(rt(t,"crypto/ciphertext"));if(ke(M0(L0([e.slice(16,32),r]))).substring(2)!==rt(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=lS(t,e.slice(0,16),r);i||sl.throwError("unsupported cipher",Z.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const a=e.slice(32,64),o=On(i);if(t.address){let u=t.address.toLowerCase();if(u.substring(0,2)!=="0x"&&(u="0x"+u),S0(u)!==o)throw new Error("address mismatch")}const s={_isKeystoreAccount:!0,address:o,privateKey:ke(i)};if(rt(t,"x-ethers/version")==="0.1"){const u=y6(rt(t,"x-ethers/mnemonicCiphertext")),f=y6(rt(t,"x-ethers/mnemonicCounter")),d=new dr.Counter(f),y=new dr.ModeOfOperation.ctr(a,d),v=rt(t,"x-ethers/path")||Gi,E=rt(t,"x-ethers/locale")||"en",P=ve(y.decrypt(u));try{const R=D5(P,E),O=s1.fromMnemonic(R,null,E).derivePath(v);if(O.privateKey!=s.privateKey)throw new Error("mnemonic mismatch");s.mnemonic=O.mnemonic}catch(R){if(R.code!==Z.errors.INVALID_ARGUMENT||R.argument!=="wordlist")throw R}}return new uS(s)}function W7(t,e,r,n,i){return ve(jf(t,e,r,n,i))}function fS(t,e,r,n,i){return Promise.resolve(W7(t,e,r,n,i))}function Q7(t,e,r,n,i){const a=zf(e),o=rt(t,"crypto/kdf");if(o&&typeof o=="string"){const s=function(u,f){return sl.throwArgumentError("invalid key-derivation function parameters",u,f)};if(o.toLowerCase()==="scrypt"){const u=y6(rt(t,"crypto/kdfparams/salt")),f=parseInt(rt(t,"crypto/kdfparams/n")),d=parseInt(rt(t,"crypto/kdfparams/r")),y=parseInt(rt(t,"crypto/kdfparams/p"));(!f||!d||!y)&&s("kdf",o),f&f-1&&s("N",f);const v=parseInt(rt(t,"crypto/kdfparams/dklen"));return v!==32&&s("dklen",v),n(a,u,f,d,y,64,i)}else if(o.toLowerCase()==="pbkdf2"){const u=y6(rt(t,"crypto/kdfparams/salt"));let f=null;const d=rt(t,"crypto/kdfparams/prf");d==="hmac-sha256"?f="sha256":d==="hmac-sha512"?f="sha512":s("prf",d);const y=parseInt(rt(t,"crypto/kdfparams/c")),v=parseInt(rt(t,"crypto/kdfparams/dklen"));return v!==32&&s("dklen",v),r(a,u,y,v,f)}}return sl.throwArgumentError("unsupported key-derivation function","kdf",o)}function J7(t,e){const r=JSON.parse(t),n=Q7(r,e,W7,qf.syncScrypt);return V7(r,n)}function Y7(t,e,r){return sS(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield Q7(n,e,fS,qf.scrypt,r);return V7(n,i)})}function X7(t,e,r,n){try{if(S0(t.address)!==On(t.privateKey))throw new Error("address/privateKey mismatch");if(Kd(t)){const O=t.mnemonic;if(s1.fromMnemonic(O.phrase,null,O.locale).derivePath(O.path||Gi).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(O){return Promise.reject(O)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=ve(t.privateKey),a=zf(e);let o=null,s=null,u=null;if(Kd(t)){const O=t.mnemonic;o=ve(j5(O.phrase,O.locale||"en")),s=O.path||Gi,u=O.locale||"en"}let f=r.client;f||(f="ethers.js");let d=null;r.salt?d=ve(r.salt):d=bi(32);let y=null;if(r.iv){if(y=ve(r.iv),y.length!==16)throw new Error("invalid iv")}else y=bi(16);let v=null;if(r.uuid){if(v=ve(r.uuid),v.length!==16)throw new Error("invalid uuid")}else v=bi(16);let E=1<<17,P=8,R=1;return r.scrypt&&(r.scrypt.N&&(E=r.scrypt.N),r.scrypt.r&&(P=r.scrypt.r),r.scrypt.p&&(R=r.scrypt.p)),qf.scrypt(a,d,E,P,R,64,n).then(O=>{O=ve(O);const C=O.slice(0,16),_=O.slice(16,32),M=O.slice(32,64),z=new dr.Counter(y),$=new dr.ModeOfOperation.ctr(C,z),Y=ve($.encrypt(i)),J=M0(L0([_,Y])),ee={address:t.address.substring(2).toLowerCase(),id:rS(v),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:ke(y).substring(2)},ciphertext:ke(Y).substring(2),kdf:"scrypt",kdfparams:{salt:ke(d).substring(2),n:E,dklen:32,p:R,r:P},mac:J.substring(2)}};if(o){const ae=bi(16),se=new dr.Counter(ae),N=new dr.ModeOfOperation.ctr(M,se),X=ve(N.encrypt(o)),I=new Date,c=I.getUTCFullYear()+"-"+C2(I.getUTCMonth()+1,2)+"-"+C2(I.getUTCDate(),2)+"T"+C2(I.getUTCHours(),2)+"-"+C2(I.getUTCMinutes(),2)+"-"+C2(I.getUTCSeconds(),2)+".0Z";ee["x-ethers"]={client:f,gethFilename:"UTC--"+c+"--"+ee.address,mnemonicCounter:ke(ae).substring(2),mnemonicCiphertext:ke(X).substring(2),path:s,locale:u,version:"0.1"}}return JSON.stringify(ee)})}function Z7(t,e,r){if(z5(t)){r&&r(0);const n=$f(t,e);return r&&r(1),Promise.resolve(n)}return $5(t)?Y7(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function eb(t,e){if(z5(t))return $f(t,e);if($5(t))return J7(t,e);throw new Error("invalid JSON wallet")}const cS=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:$f,decryptJsonWallet:Z7,decryptJsonWalletSync:eb,decryptKeystore:Y7,decryptKeystoreSync:J7,encryptKeystore:X7,getJsonWalletAddress:aS,isCrowdsaleWallet:z5,isKeystoreWallet:$5},Symbol.toStringTag,{value:"Module"})),dS="wallet/5.7.0";var Gd=function(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(d){try{f(n.next(d))}catch(y){o(y)}}function u(d){try{f(n.throw(d))}catch(y){o(y)}}function f(d){d.done?a(d.value):i(d.value).then(s,u)}f((n=n.apply(t,e||[])).next())})};const Y6=new Z(dS);function hS(t){return t!=null&&We(t.privateKey,32)&&t.address!=null}function pS(t){const e=t.mnemonic;return e&&e.phrase}class s6 extends B6{constructor(e,r){if(super(),hS(e)){const n=new m6(e.privateKey);if(ue(this,"_signingKey",()=>n),ue(this,"address",On(this.publicKey)),this.address!==S0(e.address)&&Y6.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),pS(e)){const i=e.mnemonic;ue(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||Gi,locale:i.locale||"en"}));const a=this.mnemonic,o=s1.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path);On(o.privateKey)!==this.address&&Y6.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else ue(this,"_mnemonic",()=>null)}else{if(m6.isSigningKey(e))e.curve!=="secp256k1"&&Y6.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),ue(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new m6(e);ue(this,"_signingKey",()=>n)}ue(this,"_mnemonic",()=>null),ue(this,"address",On(this.publicKey))}r&&!R6.isProvider(r)&&Y6.throwArgumentError("invalid provider","provider",r),ue(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new s6(this,e)}signTransaction(e){return X0(e).then(r=>{r.from!=null&&(S0(r.from)!==this.address&&Y6.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(M0(tl(r)));return tl(r,n)})}signMessage(e){return Gd(this,void 0,void 0,function*(){return Gu(this._signingKey().signDigest(Tf(e)))})}_signTypedData(e,r,n){return Gd(this,void 0,void 0,function*(){const i=yield Et.resolveNames(e,r,n,a=>(this.provider==null&&Y6.throwError("cannot resolve ENS names without a provider",Z.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:a}),this.provider.resolveName(a)));return Gu(this._signingKey().signDigest(Et.hash(i.domain,r,i.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),X7(this,e,r,n)}static createRandom(e){let r=bi(16);e||(e={}),e.extraEntropy&&(r=ve(nt(M0(L0([r,e.extraEntropy])),0,16)));const n=D5(r,e.locale);return s6.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return Z7(e,r,n).then(i=>new s6(i))}static fromEncryptedJsonSync(e,r){return new s6(eb(e,r))}static fromMnemonic(e,r,n){return r||(r=Gi),new s6(s1.fromMnemonic(e,null,n).derivePath(r))}}function bS(t,e){return Ja(Tf(t),e)}function mS(t,e,r,n){return Ja(Et.hash(t,e,r),n)}const yS=Object.freeze(Object.defineProperty({__proto__:null,Wallet:s6,verifyMessage:bS,verifyTypedData:mS},Symbol.toStringTag,{value:"Module"})),gS="solidity/5.7.0",xS=new RegExp("^bytes([0-9]+)$"),vS=new RegExp("^(u?int)([0-9]*)$"),wS=new RegExp("^(.*)\\[([0-9]*)\\]$"),AS="0000000000000000000000000000000000000000000000000000000000000000",ti=new Z(gS);function tb(t,e,r){switch(t){case"address":return r?K2(e,32):ve(e);case"string":return z0(e);case"bytes":return ve(e);case"bool":return e=e?"0x01":"0x00",r?K2(e,32):ve(e)}let n=t.match(vS);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&ti.throwArgumentError("invalid number type","type",t),r&&(i=256),e=_e.from(e).toTwos(i),K2(e,i/8)}if(n=t.match(xS),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&ti.throwArgumentError("invalid bytes type","type",t),ve(e).byteLength!==i&&ti.throwArgumentError(`invalid value for ${t}`,"value",e),r?ve((e+AS).substring(0,66)):e}if(n=t.match(wS),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&ti.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(s){o.push(tb(i,s,!0))}),L0(o)}return ti.throwArgumentError("invalid type","type",t)}function Hf(t,e){t.length!=e.length&&ti.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(tb(n,e[i]))}),ke(L0(r))}function ES(t,e){return M0(Hf(t,e))}function _S(t,e){return h1(Hf(t,e))}const kS=Object.freeze(Object.defineProperty({__proto__:null,keccak256:ES,pack:Hf,sha256:_S},Symbol.toStringTag,{value:"Module"})),SS="units/5.7.0",rb=new Z(SS),nb=["wei","kwei","mwei","gwei","szabo","finney","ether"];function TS(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&rb.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const a=[];for(;r.length;)if(r.length<=3){a.unshift(r);break}else{const o=r.length-3;a.unshift(r.substring(o)),r=r.substring(0,o)}return n+a.join(",")+i}function ib(t,e){if(typeof e=="string"){const r=nb.indexOf(e);r!==-1&&(e=3*r)}return ss(t,e??18)}function ab(t,e){if(typeof t!="string"&&rb.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=nb.indexOf(e);r!==-1&&(e=3*r)}return ar(t,e??18)}function CS(t){return ib(t,18)}function PS(t){return ab(t,18)}const NS=Object.freeze(Object.defineProperty({__proto__:null,commify:TS,formatEther:CS,formatUnits:ib,parseEther:PS,parseUnits:ab},Symbol.toStringTag,{value:"Module"})),zo=[{inputs:[],name:"AlreadyRegistered",type:"error"},{inputs:[],name:"CannotRevokeControlFromTLD",type:"error"},{inputs:[],name:"ERC721AlreadyMinted",type:"error"},{inputs:[],name:"ERC721ApproveToOwner",type:"error"},{inputs:[],name:"ERC721InvalidOwnerAddress0",type:"error"},{inputs:[],name:"ERC721InvalidTokenId",type:"error"},{inputs:[],name:"ERC721MintToAddress0",type:"error"},{inputs:[],name:"ERC721NotOwnerOrApproved",type:"error"},{inputs:[],name:"ERC721TransferFromIncorrectOwner",type:"error"},{inputs:[],name:"ERC721TransferToAddress0",type:"error"},{inputs:[],name:"ERC721TransferToNonReceiver",type:"error"},{inputs:[],name:"NotAuthorized",type:"error"},{inputs:[],name:"NotAuthorizedToMintName",type:"error"},{inputs:[],name:"NotDotUqTLD",type:"error"},{inputs:[],name:"KNSRegistryOnly",type:"error"},{inputs:[],name:"SecondLevelDomainNot9CharactersOrMore",type:"error"},{inputs:[],name:"TLDWebmasterApproveToCaller",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"child",type:"uint256"},{indexed:!1,internalType:"uint256",name:"parent",type:"uint256"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"ControlRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"webmaster",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"Webmaster",type:"event"},{inputs:[],name:"TLD_DNS_WIRE",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"TLD_HASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"TLD_LABEL",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_fqdn",type:"bytes"},{internalType:"bytes32",name:"_tldHash",type:"bytes32"}],name:"__initTLDRegistration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_operator",type:"address"},{internalType:"bool",name:"_approved",type:"bool"}],name:"_setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"node",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_nodeId",type:"uint256"},{internalType:"address",name:"_sender",type:"address"}],name:"auth",outputs:[{internalType:"bool",name:"authed_",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_nodeId",type:"bytes32"},{internalType:"address",name:"_sender",type:"address"}],name:"auth",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_node",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInitializedVersion",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_kns",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_webmaster",type:"address"},{internalType:"uint256",name:"_node",type:"uint256"}],name:"isWebmaster",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"},{internalType:"address",name:"_webmaster",type:"address"}],name:"isWebmaster",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"node",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"parents",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"kns",outputs:[{internalType:"contract IKNSRegistryResolver",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_name",type:"bytes"},{internalType:"address",name:"_to",type:"address"},{internalType:"bytes[]",name:"_data",type:"bytes[]"}],name:"register",outputs:[{internalType:"uint256",name:"nodeId_",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"_name",type:"bytes"}],name:"revokeControlOverSubdomain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"node",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"node",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_operator",type:"address"},{internalType:"bool",name:"_approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_webmaster",type:"address"},{internalType:"bool",name:"_approved",type:"bool"}],name:"setWebmaster",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"node",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"}],Vd="0x60a06040523060805234801561001457600080fd5b50608051612b6361004c6000396000818161095e015281816109a701528181610a6101528181610aa10152610b470152612b636000f3fe6080604052600436106101f95760003560e01c8063715018a61161010d578063b88d4fde116100a0578063d123f99a1161006f578063d123f99a146105c3578063d314c607146105d6578063d5c457141461061f578063e985e9c514610635578063f2fde38b1461065557600080fd5b8063b88d4fde1461054d578063c1ea25f11461056d578063c4d66de81461058d578063d1131c72146105ad57600080fd5b80638da5cb5b116100dc5780638da5cb5b146104d357806395d89b41146104f1578063a22cb46514610506578063b3c650151461052657600080fd5b8063715018a614610451578063819eb62514610466578063898572a6146104865780638c4e3f32146104b357600080fd5b8063303bc8ac11610190578063516a166a1161015f578063516a166a146103ae57806352d1902d146103ce5780635864c817146103f15780636352211e1461041157806370a082311461043157600080fd5b8063303bc8ac146103465780633659cfe61461035b57806342842e0e1461037b5780634f1ef2861461039b57600080fd5b806312403916116101cc57806312403916146102c65780631492017b146102e6578063169e0dde1461030657806323b872dd1461032657600080fd5b806301ffc9a7146101fe57806306fdde0314610234578063081812fc14610256578063095ea7b3146102a4575b600080fd5b34801561020a57600080fd5b5061021f61021936600461210e565b50600090565b60405190151581526020015b60405180910390f35b34801561024057600080fd5b50610249610675565b60405161022b919061217b565b34801561026257600080fd5b5061028c61027136600461218e565b6000908152600860205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200161022b565b3480156102b057600080fd5b506102c46102bf3660046121c3565b610707565b005b3480156102d257600080fd5b506102c46102e136600461222f565b610791565b3480156102f257600080fd5b5061021f61030136600461227b565b61083d565b34801561031257600080fd5b5060005461028c906001600160a01b031681565b34801561033257600080fd5b506102c46103413660046122a7565b610894565b34801561035257600080fd5b506102496108c6565b34801561036757600080fd5b506102c46103763660046122e3565b610954565b34801561038757600080fd5b506102c46103963660046122a7565b610a3c565b6102c46103a93660046123c3565b610a57565b3480156103ba57600080fd5b5061021f6103c936600461227b565b610b27565b3480156103da57600080fd5b506103e3610b3a565b60405190815260200161022b565b3480156103fd57600080fd5b506102c461040c366004612407565b610bed565b34801561041d57600080fd5b5061028c61042c36600461218e565b610cbe565b34801561043d57600080fd5b506103e361044c3660046122e3565b610cf3565b34801561045d57600080fd5b506102c4610d38565b34801561047257600080fd5b506102c461048136600461244c565b610d4c565b34801561049257600080fd5b506103e36104a136600461218e565b60d46020526000908152604090205481565b3480156104bf57600080fd5b506102c46104ce366004612476565b610d57565b3480156104df57600080fd5b50603e546001600160a01b031661028c565b3480156104fd57600080fd5b50610249610df7565b34801561051257600080fd5b506102c461052136600461244c565b610e06565b34801561053257600080fd5b5061053b610e11565b60405160ff909116815260200161022b565b34801561055957600080fd5b506102c46105683660046124b9565b610e24565b34801561057957600080fd5b5061021f6105883660046121c3565b610e57565b34801561059957600080fd5b506102c46105a83660046122e3565b610e63565b3480156105b957600080fd5b506103e360015481565b6103e36105d1366004612521565b610fd7565b3480156105e257600080fd5b5061021f6105f13660046125d2565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b34801561062b57600080fd5b506103e360025481565b34801561064157600080fd5b5061021f6106503660046125d2565b611003565b34801561066157600080fd5b506102c46106703660046122e3565b611031565b606060048054610684906125fc565b80601f01602080910402602001604051908101604052809291908181526020018280546106b0906125fc565b80156106fd5780601f106106d2576101008083540402835291602001916106fd565b820191906000526020600020905b8154815290600101906020018083116106e057829003601f168201915b5050505050905090565b600061071282610cbe565b9050806001600160a01b0316836001600160a01b0316036107465760405163091fbd5360e01b815260040160405180910390fd5b336001600160a01b0382161480159061076457506107648133611003565b15610782576040516307e8a24360e21b815260040160405180910390fd5b61078c83836110a7565b505050565b600254156107b257604051630ea075bf60e21b815260040160405180910390fd5b6000546001600160a01b031633146107dd5760405163367ae3b760e11b815260040160405180910390fd5b600281905560036107ef838583612686565b50610834600084848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506111159050565b50600155505050565b60005b8015801561085057506002548314155b1561088e5761085f838361121c565b90508061088e5761086f8361124a565b1561088a57600092835260d460205260409092205491610840565b5060005b92915050565b61089e3382611262565b6108bb576040516307e8a24360e21b815260040160405180910390fd5b61078c8383836112c1565b600380546108d3906125fc565b80601f01602080910402602001604051908101604052809291908181526020018280546108ff906125fc565b801561094c5780601f106109215761010080835404028352916020019161094c565b820191906000526020600020905b81548152906001019060200180831161092f57829003601f168201915b505050505081565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036109a55760405162461bcd60e51b815260040161099c90612747565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166109ee600080516020612ae7833981519152546001600160a01b031690565b6001600160a01b031614610a145760405162461bcd60e51b815260040161099c90612793565b610a1d816113ff565b60408051600080825260208201909252610a3991839190611407565b50565b61078c83838360405180602001604052806000815250610e24565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610a9f5760405162461bcd60e51b815260040161099c90612747565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610ae8600080516020612ae7833981519152546001600160a01b031690565b6001600160a01b031614610b0e5760405162461bcd60e51b815260040161099c90612793565b610b17826113ff565b610b2382826001611407565b5050565b6000610b33838361083d565b9392505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bda5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000606482015260840161099c565b50600080516020612ae783398151915290565b6000806000610bfb84611572565b925092509250808203610c215760405163abddc77160e01b815260040160405180910390fd5b610c2b8233610b27565b15610c9f5760006001610c3d856115d2565b179050610c598185600090815260066020526040902081905590565b506040805185815260208101859052338183015290517f7de9cdc5b55386112f86114d6e841bde7e78203bea81a912271231dffde1be769181900360600190a150610cb8565b60405163ea8e4eb560e01b815260040160405180910390fd5b50505050565b600080610cca836115e6565b90506001600160a01b03811661088e5760405163089ba7e160e41b815260040160405180910390fd5b60006001600160a01b038216610d1c57604051633d6932c760e21b815260040160405180910390fd5b506001600160a01b031660009081526007602052604090205490565b610d406115fd565b610d4a6000611657565b565b610b233383836116a9565b816001600160a01b0316836001600160a01b031603610d895760405163091fbd5360e01b815260040160405180910390fd5b6001600160a01b03838116600081815260096020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a3505050565b606060058054610684906125fc565b610b23338383610d57565b6000610e1f600b5460ff1690565b905090565b610e2e3383611262565b610e4b576040516307e8a24360e21b815260040160405180910390fd5b610cb884848484611740565b6000610b338383611774565b600b54610100900460ff1615808015610e835750600b54600160ff909116105b80610e9d5750303b158015610e9d5750600b5460ff166001145b610f005760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161099c565b600b805460ff191660011790558015610f2357600b805461ff0019166101001790555b60408051808201825260128152715571626172204e616d65205365727669636560701b6020918201528151808301909252600482526355514e5360e01b910152600080546001600160a01b0319166001600160a01b038416179055610f866117b8565b610f8e6117df565b8015610b2357600b805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600080610fe7878760003361180e565b509050610ff88787878488886119b9565b979650505050505050565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b6110396115fd565b6001600160a01b03811661109e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161099c565b610a3981611657565b600081815260086020526040902080546001600160a01b0319166001600160a01b03841690811790915581906110dc826115e6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080835183106111685760405162461bcd60e51b815260206004820152601e60248201527f726561644c6162656c3a20496e646578206f7574206f6620626f756e64730000604482015260640161099c565b600084848151811061117c5761117c6127df565b016020015160f81c9050604081106111d65760405162461bcd60e51b815260206004820152601960248201527f726561644c6162656c3a204c6162656c20746f6f206c6f6e6700000000000000604482015260640161099c565b80156111f8576111f1856111eb86600161280b565b83611b1a565b92506111fd565b600092505b611207818561280b565b61121290600161280b565b9150509250929050565b60006001600160a01b03821630148061123a575061123a8284611774565b80610b335750610b338284611262565b60008181526006602052604081205461088e90611b3e565b60008061126e836115e6565b9050806001600160a01b0316846001600160a01b0316148061129557506112958185611003565b806112b957506000838152600860205260409020546001600160a01b038581169116145b949350505050565b6001600160a01b0382166000036112eb576040516328aad33f60e21b815260040160405180910390fd5b826001600160a01b03166112fe826115e6565b6001600160a01b0316146113255760405163e146af6f60e01b815260040160405180910390fd5b826001600160a01b0316611338826115e6565b6001600160a01b03161461135f5760405163e146af6f60e01b815260040160405180910390fd5b600081815260086020908152604080832080546001600160a01b03191690556001600160a01b0386811680855260078452828520805460001901905590861680855282852080546001019055858552600690935281842080546001600160601b0316606088901b6001600160601b031916179055905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610a396115fd565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561143a5761078c83611b53565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611494575060408051601f3d908101601f191682019092526114919181019061281e565b60015b6114f75760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b606482015260840161099c565b600080516020612ae783398151915281146115665760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b606482015260840161099c565b5061078c838383611bef565b600080600080600061158386611c14565b915091506000806115948884611c2b565b6040805160208101849052908101879052919350915060600160408051808303601f1901815291905280516020909101209891975095509350505050565b60008181526006602052604081205461088e565b60008181526006602052604081205460601c61088e565b603e546001600160a01b03163314610d4a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161099c565b603e80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036116db57604051637417c83160e11b815260040160405180910390fd5b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fadc620d6f66bc2f5355112336dd7957aecdc5480a6d6e771c356503869756c449101610dea565b61174b8484846112c1565b61175784848484611d2f565b610cb857604051633a3614b760e01b815260040160405180910390fd5b6000600a6000611783846115e6565b6001600160a01b039081168252602080830193909352604091820160009081209187168152925290205460ff16905092915050565b600b54610100900460ff16610d4a5760405162461bcd60e51b815260040161099c90612837565b600b54610100900460ff166118065760405162461bcd60e51b815260040161099c90612837565b610d4a611e31565b6000806000806118578689898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506111159050565b9092509050611867600188612882565b810361189f57600154821461188f57604051631b431a5160e11b815260040160405180910390fd5b60025460019350935050506119b0565b6000806118ae8a8a858a61180e565b91509150600254821480156118cd575060096118ca8985612882565b11155b156118eb5760405163cecd40e560e01b815260040160405180910390fd5b60408051602080820185905281830187905282518083038401815260609092018352815191810191909120600081815260d490925291812054900361193c57600081815260d4602052604090208390555b88156119735761194b8161124a565b61195457600091505b8161196657611963818961121c565b91505b955093506119b092505050565b8161199157604051632b8839a960e01b815260040160405180910390fd5b60025483146119a15760006119a4565b60015b60019650965050505050505b94509492505050565b60008054604051633255528360e21b815282916001600160a01b03169063c9554a0c906119ec908b908b906004016128be565b6020604051808303816000875af1158015611a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2f919061281e565b9150819050611a3e8682611e61565b611a8b611a7786611a5b8560009081526006602052604090205490565b6001600160601b031981166001600160601b0383161792915050565b600084815260066020526040902081905590565b508215611b0f5760005460405163e32954eb60e01b81526001600160a01b039091169063e32954eb90611ac6908490889088906004016128d2565b6000604051808303816000875af1158015611ae5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b0d919081019061297b565b505b509695505050505050565b8251600090611b29838561280b565b1115611b3457600080fd5b5091016020012090565b600081158061088e5750506001908116141590565b6001600160a01b0381163b611bc05760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161099c565b600080516020612ae783398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611bf883611e7b565b600082511180611c055750805b1561078c57610cb88383611ebb565b600080611c22836000611115565b91509150915091565b600080600080611c3b8686611115565b909250905081611cb05760018651611c539190612882565b8514611ca15760405162461bcd60e51b815260206004820152601d60248201527f6e616d65686173683a204a756e6b20617420656e64206f66206e616d65000000604482015260640161099c565b5060009250829150611d289050565b600080611cbd8884611c2b565b909250905080611cf45760408051600060208201529081018590526060016040516020818303038152906040528051906020012090505b6040805160208101849052908101859052606001604051602081830303815290604052805190602001208195509550505050505b9250929050565b60006001600160a01b0384163b15611e2657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611d73903390899088908890600401612a7a565b6020604051808303816000875af1925050508015611dae575060408051601f3d908101601f19168201909252611dab91810190612aad565b60015b611e0c573d808015611ddc576040519150601f19603f3d011682016040523d82523d6000602084013e611de1565b606091505b508051600003611e0457604051633a3614b760e01b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506112b9565b506001949350505050565b600b54610100900460ff16611e585760405162461bcd60e51b815260040161099c90612837565b610d4a33611657565b610b23828260405180602001604052806000815250611ee0565b611e8481611b53565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610b338383604051806060016040528060278152602001612b0760279139611f14565b611eea8383611f8c565b611ef76000848484611d2f565b61078c57604051633a3614b760e01b815260040160405180910390fd5b6060600080856001600160a01b031685604051611f319190612aca565b600060405180830381855af49150503d8060008114611f6c576040519150601f19603f3d011682016040523d82523d6000602084013e611f71565b606091505b5091509150611f828683838761205a565b9695505050505050565b6001600160a01b038216611fb35760405163507508af60e11b815260040160405180910390fd5b60008181526006602052604090205415611fe0576040516324a255d960e11b815260040160405180910390fd5b6000818152600660205260409020541561200d576040516324a255d960e11b815260040160405180910390fd5b6001600160a01b038216600090815260076020908152604080832080546001019055928252600690522080546001600160601b031660609290921b6001600160601b031916919091179055565b606083156120c95782516000036120c2576001600160a01b0385163b6120c25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161099c565b50816112b9565b6112b983838151156120de5781518083602001fd5b8060405162461bcd60e51b815260040161099c919061217b565b6001600160e01b031981168114610a3957600080fd5b60006020828403121561212057600080fd5b8135610b33816120f8565b60005b8381101561214657818101518382015260200161212e565b50506000910152565b6000815180845261216781602086016020860161212b565b601f01601f19169290920160200192915050565b602081526000610b33602083018461214f565b6000602082840312156121a057600080fd5b5035919050565b80356001600160a01b03811681146121be57600080fd5b919050565b600080604083850312156121d657600080fd5b6121df836121a7565b946020939093013593505050565b60008083601f8401126121ff57600080fd5b50813567ffffffffffffffff81111561221757600080fd5b602083019150836020828501011115611d2857600080fd5b60008060006040848603121561224457600080fd5b833567ffffffffffffffff81111561225b57600080fd5b612267868287016121ed565b909790965060209590950135949350505050565b6000806040838503121561228e57600080fd5b8235915061229e602084016121a7565b90509250929050565b6000806000606084860312156122bc57600080fd5b6122c5846121a7565b92506122d3602085016121a7565b9150604084013590509250925092565b6000602082840312156122f557600080fd5b610b33826121a7565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561233d5761233d6122fe565b604052919050565b600067ffffffffffffffff82111561235f5761235f6122fe565b50601f01601f191660200190565b600082601f83011261237e57600080fd5b813561239161238c82612345565b612314565b8181528460208386010111156123a657600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156123d657600080fd5b6123df836121a7565b9150602083013567ffffffffffffffff8111156123fb57600080fd5b6112128582860161236d565b60006020828403121561241957600080fd5b813567ffffffffffffffff81111561243057600080fd5b6112b98482850161236d565b803580151581146121be57600080fd5b6000806040838503121561245f57600080fd5b612468836121a7565b915061229e6020840161243c565b60008060006060848603121561248b57600080fd5b612494846121a7565b92506124a2602085016121a7565b91506124b06040850161243c565b90509250925092565b600080600080608085870312156124cf57600080fd5b6124d8856121a7565b93506124e6602086016121a7565b925060408501359150606085013567ffffffffffffffff81111561250957600080fd5b6125158782880161236d565b91505092959194509250565b60008060008060006060868803121561253957600080fd5b853567ffffffffffffffff8082111561255157600080fd5b61255d89838a016121ed565b9097509550859150612571602089016121a7565b9450604088013591508082111561258757600080fd5b818801915088601f83011261259b57600080fd5b8135818111156125aa57600080fd5b8960208260051b85010111156125bf57600080fd5b9699959850939650602001949392505050565b600080604083850312156125e557600080fd5b6125ee836121a7565b915061229e602084016121a7565b600181811c9082168061261057607f821691505b60208210810361263057634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561078c576000816000526020600020601f850160051c8101602086101561265f5750805b601f850160051c820191505b8181101561267e5782815560010161266b565b505050505050565b67ffffffffffffffff83111561269e5761269e6122fe565b6126b2836126ac83546125fc565b83612636565b6000601f8411600181146126e657600085156126ce5750838201355b600019600387901b1c1916600186901b178355612740565b600083815260209020601f19861690835b8281101561271757868501358255602094850194600190920191016126f7565b50868210156127345760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561088e5761088e6127f5565b60006020828403121561283057600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b8181038181111561088e5761088e6127f5565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260006112b9602083018486612895565b6000604082018583526020604060208501528185835260608501905060608660051b86010192508660005b8781101561296d57868503605f190183528135368a9003601e1901811261292357600080fd5b8901848101903567ffffffffffffffff81111561293f57600080fd5b80360382131561294e57600080fd5b612959878284612895565b9650505091830191908301906001016128fd565b509298975050505050505050565b6000602080838503121561298e57600080fd5b825167ffffffffffffffff808211156129a657600080fd5b818501915085601f8301126129ba57600080fd5b8151818111156129cc576129cc6122fe565b8060051b6129db858201612314565b91825283810185019185810190898411156129f557600080fd5b86860192505b83831015612a6d57825185811115612a135760008081fd5b8601603f81018b13612a255760008081fd5b878101516040612a3761238c83612345565b8281528d82848601011115612a4c5760008081fd5b612a5b838c830184870161212b565b855250505091860191908601906129fb565b9998505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611f829083018461214f565b600060208284031215612abf57600080fd5b8151610b33816120f8565b60008251612adc81846020870161212b565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212209fefab139234fb45128c7107850c6927f664693838f0b11e849e298fc1eb1b8d64736f6c63430008160033",MS=t=>t.length>1;class X2 extends i2{constructor(...e){MS(e)?super(...e):super(zo,Vd,e[0])}deploy(e){return super.deploy(e||{})}getDeployTransaction(e){return super.getDeployTransaction(e||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new Xr(zo)}static connect(e,r){return new Dn(e,zo,r)}}i1(X2,"bytecode",Vd),i1(X2,"abi",zo);const $o=[{type:"constructor",inputs:[],stateMutability:"nonpayable"},{type:"function",name:"isApprovedForAll",inputs:[{name:"owner",type:"address",internalType:"address"},{name:"operator",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"owner",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"recordExists",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"resolver",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"setApprovalForAll",inputs:[{name:"operator",type:"address",internalType:"address"},{name:"approved",type:"bool",internalType:"bool"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setOwner",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"owner",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setRecord",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"owner",type:"address",internalType:"address"},{name:"resolver",type:"address",internalType:"address"},{name:"ttl",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setResolver",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"resolver",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setSubnodeOwner",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"label",type:"bytes32",internalType:"bytes32"},{name:"owner",type:"address",internalType:"address"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"nonpayable"},{type:"function",name:"setSubnodeRecord",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"label",type:"bytes32",internalType:"bytes32"},{name:"owner",type:"address",internalType:"address"},{name:"resolver",type:"address",internalType:"address"},{name:"ttl",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setTTL",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"ttl",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"ttl",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint64",internalType:"uint64"}],stateMutability:"view"},{type:"event",name:"ApprovalForAll",inputs:[{name:"owner",type:"address",indexed:!0,internalType:"address"},{name:"operator",type:"address",indexed:!0,internalType:"address"},{name:"approved",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"NewOwner",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"label",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"owner",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"NewResolver",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"resolver",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"NewTTL",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"ttl",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"Transfer",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"owner",type:"address",indexed:!1,internalType:"address"}],anonymous:!1}],Wd="0x608060405234801561001057600080fd5b5060008080526020527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb580546001600160a01b031916331790556109b5806100596000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80635b0fc9c3116100715780635b0fc9c3146101ab5780635ef2c7f0146101be578063a22cb465146101d1578063cf408823146101e4578063e985e9c5146101f7578063f79fe5381461024357600080fd5b80630178b8bf146100b957806302571be31461010257806306ab59231461011557806314ab90381461013657806316a25cbd1461014b5780631896f70a14610198575b600080fd5b6100e56100c73660046107a4565b6000908152602081905260409020600101546001600160a01b031690565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e56101103660046107a4565b61026e565b6101286101233660046107d9565b61029c565b6040519081526020016100f9565b610149610144366004610826565b61036c565b005b61017f6101593660046107a4565b600090815260208190526040902060010154600160a01b900467ffffffffffffffff1690565b60405167ffffffffffffffff90911681526020016100f9565b6101496101a6366004610852565b61043f565b6101496101b9366004610852565b610504565b6101496101cc366004610875565b6105a6565b6101496101df3660046108cc565b6105c8565b6101496101f2366004610908565b610634565b610233610205366004610955565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b60405190151581526020016100f9565b6102336102513660046107a4565b6000908152602081905260409020546001600160a01b0316151590565b6000818152602081905260408120546001600160a01b03163081036102965750600092915050565b92915050565b60008381526020819052604081205484906001600160a01b0316338114806102e757506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b6102f057600080fd5b60408051602080820189905281830188905282518083038401815260609092019092528051910120610322818661064f565b6040516001600160a01b0386168152869088907fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e829060200160405180910390a39695505050505050565b60008281526020819052604090205482906001600160a01b0316338114806103b757506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b6103c057600080fd5b60405167ffffffffffffffff8416815284907f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa689060200160405180910390a25050600091825260208290526040909120600101805467ffffffffffffffff909216600160a01b0267ffffffffffffffff60a01b19909216919091179055565b60008281526020819052604090205482906001600160a01b03163381148061048a57506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b61049357600080fd5b6040516001600160a01b038416815284907f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a09060200160405180910390a2505060009182526020829052604090912060010180546001600160a01b0319166001600160a01b03909216919091179055565b60008281526020819052604090205482906001600160a01b03163381148061054f57506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b61055857600080fd5b610562848461064f565b6040516001600160a01b038416815284907fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d2669060200160405180910390a250505050565b60006105b386868661029c565b90506105c081848461067d565b505050505050565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61063e8484610504565b61064984838361067d565b50505050565b60009182526020829052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b6000838152602081905260409020600101546001600160a01b03838116911614610703576000838152602081815260409182902060010180546001600160a01b0319166001600160a01b038616908117909155915191825284917f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0910160405180910390a25b60008381526020819052604090206001015467ffffffffffffffff828116600160a01b909204161461079f5760008381526020818152604091829020600101805467ffffffffffffffff60a01b1916600160a01b67ffffffffffffffff861690810291909117909155915191825284917f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68910160405180910390a25b505050565b6000602082840312156107b657600080fd5b5035919050565b80356001600160a01b03811681146107d457600080fd5b919050565b6000806000606084860312156107ee57600080fd5b8335925060208401359150610805604085016107bd565b90509250925092565b803567ffffffffffffffff811681146107d457600080fd5b6000806040838503121561083957600080fd5b823591506108496020840161080e565b90509250929050565b6000806040838503121561086557600080fd5b82359150610849602084016107bd565b600080600080600060a0868803121561088d57600080fd5b85359450602086013593506108a4604087016107bd565b92506108b2606087016107bd565b91506108c06080870161080e565b90509295509295909350565b600080604083850312156108df57600080fd5b6108e8836107bd565b9150602083013580151581146108fd57600080fd5b809150509250929050565b6000806000806080858703121561091e57600080fd5b8435935061092e602086016107bd565b925061093c604086016107bd565b915061094a6060860161080e565b905092959194509250565b6000806040838503121561096857600080fd5b610971836107bd565b9150610849602084016107bd56fea2646970667358221220b6c3be93ffec5e5a47b9f372710d65c59860b6986beedbb852960b07092f2f0a64736f6c63430008170033",US=t=>t.length>1;class Z2 extends i2{constructor(...e){US(e)?super(...e):super($o,Wd,e[0])}deploy(e){return super.deploy(e||{})}getDeployTransaction(e){return super.getDeployTransaction(e||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new Xr($o)}static connect(e,r){return new Dn(e,$o,r)}}i1(Z2,"bytecode",Wd),i1(Z2,"abi",$o);const qo=[{type:"constructor",inputs:[{name:"_ensregistry",type:"address",internalType:"address"},{name:"_ensnamewrapper",type:"address",internalType:"address"},{name:"_lz",type:"address",internalType:"address"},{name:"_lzc",type:"uint16",internalType:"uint16"},{name:"_exit",type:"address",internalType:"address"},{name:"_exitlzc",type:"uint16",internalType:"uint16"}],stateMutability:"nonpayable"},{type:"fallback",stateMutability:"payable"},{type:"receive",stateMutability:"payable"},{type:"function",name:"cash",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"ensnamewrapper",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"ensregistry",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"exitlzc",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"exitpath",inputs:[],outputs:[{name:"",type:"bytes",internalType:"bytes"}],stateMutability:"view"},{type:"function",name:"lz",inputs:[],outputs:[{name:"",type:"address",internalType:"contract ILayerZeroEndpoint"}],stateMutability:"view"},{type:"function",name:"lzc",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"ping",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setKNSRecords",inputs:[{name:"fqdn",type:"bytes",internalType:"bytes"},{name:"data",type:"bytes[]",internalType:"bytes[]"}],outputs:[],stateMutability:"nonpayable"},{type:"error",name:"NotEnsOwner",inputs:[]}],Qd="0x6101406040523480156200001257600080fd5b5060405162000fd538038062000fd58339810160408190526200003591620000e3565b6001600160a01b03868116610100528581166101205233608052841660a05261ffff831660c0526040516001600160601b0319606084811b8216602084015230901b166034820152604801604051602081830303815290604052600090816200009f91906200020b565b5061ffff1660e05250620002d79350505050565b80516001600160a01b0381168114620000cb57600080fd5b919050565b805161ffff81168114620000cb57600080fd5b60008060008060008060c08789031215620000fd57600080fd5b6200010887620000b3565b95506200011860208801620000b3565b94506200012860408801620000b3565b93506200013860608801620000d0565b92506200014860808801620000b3565b91506200015860a08801620000d0565b90509295509295509295565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200018f57607f821691505b602082108103620001b057634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000206576000816000526020600020601f850160051c81016020861015620001e15750805b601f850160051c820191505b818110156200020257828155600101620001ed565b5050505b505050565b81516001600160401b0381111562000227576200022762000164565b6200023f816200023884546200017a565b84620001b6565b602080601f8311600181146200027757600084156200025e5750858301515b600019600386901b1c1916600185901b17855562000202565b600085815260208120601f198616915b82811015620002a85788860151825594840194600190910190840162000287565b5085821015620002c75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516101005161012051610c866200034f6000396000818160aa01528181610340015261038d01526000818161024a01526102d101526000818160fb01526106f50152600061016201526000818161019601526106c6015260008181610201015261057c0152610c866000f3fe60806040526004361061008f5760003560e01c80635c36b186116100565780635c36b186146101b85780637fee035f146101cd5780638da5cb5b146101ef578063961be39114610223578063ba503bee1461023857005b8063065aeebc146100985780630d448b78146100e95780631105d7cb1461013057806330ff44b61461015057806333f97b591461018457005b3661009657005b005b3480156100a457600080fd5b506100cc7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100f557600080fd5b5061011d7f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff90911681526020016100e0565b34801561013c57600080fd5b5061009661014b366004610880565b61026c565b34801561015c57600080fd5b5061011d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561019057600080fd5b506100cc7f000000000000000000000000000000000000000000000000000000000000000081565b3480156101c457600080fd5b506100966104a3565b3480156101d957600080fd5b506101e26104e3565b6040516100e0919061098b565b3480156101fb57600080fd5b506100cc7f000000000000000000000000000000000000000000000000000000000000000081565b34801561022f57600080fd5b50610096610571565b34801561024457600080fd5b506100cc7f000000000000000000000000000000000000000000000000000000000000000081565b60006102ad85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525092506105eb915050565b6040516302571be360e01b8152600481018290529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906302571be390602401602060405180830381865afa158015610318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033c91906109a5565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031603610403576040516331a9108f60e11b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa1580156103dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040091906109a5565b90505b6001600160a01b038116331461042c576040516384760f9960e01b815260040160405180910390fd5b6000636a0d1c3460e01b338888888860405160240161044f9594939291906109f7565b60408051601f19818403018152918152602080830180516001600160e01b03166001600160e01b0319909516949094179093528051928301905260008252915061049a9082906106b0565b50505050505050565b6040805160048152602481018252602080820180516001600160e01b0316632e1b58c360e11b1790528251908101909252600082526104e1916106b0565b565b600080546104f090610ab9565b80601f016020809104026020016040519081016040528092919081815260200182805461051c90610ab9565b80156105695780601f1061053e57610100808354040283529160200191610569565b820191906000526020600020905b81548152906001019060200180831161054c57829003601f168201915b505050505081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105a657600080fd5b60405133904790600081818185875af1925050503d80600081146105e6576040519150601f19603f3d011682016040523d82523d6000602084013e505050565b505050565b60008060006105fa8585610755565b90925090508161067157600185516106129190610b09565b84146106655760405162461bcd60e51b815260206004820152601d60248201527f6e616d65686173683a204a756e6b20617420656e64206f66206e616d6500000060448201526064015b60405180910390fd5b50600091506106aa9050565b61067b85826105eb565b604080516020810192909252810183905260600160405160208183030381529060405280519060200120925050505b92915050565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100904790610728907f0000000000000000000000000000000000000000000000000000000000000000906000908890309083908a90600401610b1c565b6000604051808303818588803b15801561074157600080fd5b505af115801561049a573d6000803e3d6000fd5b600080835183106107a85760405162461bcd60e51b815260206004820152601e60248201527f726561644c6162656c3a20496e646578206f7574206f6620626f756e64730000604482015260640161065c565b60008484815181106107bc576107bc610c27565b016020015160f81c9050604081106108165760405162461bcd60e51b815260206004820152601960248201527f726561644c6162656c3a204c6162656c20746f6f206c6f6e6700000000000000604482015260640161065c565b8015610838576108318561082b866001610c3d565b8361085c565b925061083d565b600092505b6108478185610c3d565b610852906001610c3d565b9150509250929050565b825160009061086b8385610c3d565b111561087657600080fd5b5091016020012090565b6000806000806040858703121561089657600080fd5b843567ffffffffffffffff808211156108ae57600080fd5b818701915087601f8301126108c257600080fd5b8135818111156108d157600080fd5b8860208285010111156108e357600080fd5b6020928301965094509086013590808211156108fe57600080fd5b818701915087601f83011261091257600080fd5b81358181111561092157600080fd5b8860208260051b850101111561093657600080fd5b95989497505060200194505050565b6000815180845260005b8181101561096b5760208185018101518683018201520161094f565b506000602082860101526020601f19601f83011685010191505092915050565b60208152600061099e6020830184610945565b9392505050565b6000602082840312156109b757600080fd5b81516001600160a01b038116811461099e57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b038616815260606020808301829052600091610a1d90840187896109ce565b8381036040850152848152818101600586901b820183018760005b88811015610aa857848303601f190184528135368b9003601e19018112610a5e57600080fd5b8a01868101903567ffffffffffffffff811115610a7a57600080fd5b803603821315610a8957600080fd5b610a948582846109ce565b958801959450505090850190600101610a38565b50909b9a5050505050505050505050565b600181811c90821680610acd57607f821691505b602082108103610aed57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156106aa576106aa610af3565b61ffff871681526000602060c06020840152600088548160018260011c91506001831680610b4b57607f831692505b602083108103610b6957634e487b7160e01b85526022600452602485fd5b60c0880183905260e08801818015610b885760018114610b9e57610bc9565b60ff198616825284151560051b82019650610bc9565b60008f81526020902060005b86811015610bc357815484820152908501908901610baa565b83019750505b5050505050508381036040850152610be18189610945565b915050610bf960608401876001600160a01b03169052565b6001600160a01b038516608084015282810360a0840152610c1a8185610945565b9998505050505050505050565b634e487b7160e01b600052603260045260246000fd5b808201808211156106aa576106aa610af356fea2646970667358221220e3ac694477aa6f714010898307fc04e89a5db768141cf94df85e978acab5985764736f6c63430008170033",OS=t=>t.length>1;class ea extends i2{constructor(...e){OS(e)?super(...e):super(qo,Qd,e[0])}deploy(e,r,n,i,a,o,s){return super.deploy(e,r,n,i,a,o,s||{})}getDeployTransaction(e,r,n,i,a,o,s){return super.getDeployTransaction(e,r,n,i,a,o,s||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new Xr(qo)}static connect(e,r){return new Dn(e,qo,r)}}i1(ea,"bytecode",Qd),i1(ea,"abi",qo);const Ho=[{type:"constructor",inputs:[{name:"_kns",type:"address",internalType:"address"},{name:"_lz",type:"address",internalType:"address"},{name:"_lzc",type:"uint16",internalType:"uint16"}],stateMutability:"nonpayable"},{type:"function",name:"__initTLDRegistration",inputs:[{name:"fqdn",type:"bytes",internalType:"bytes"},{name:"tld",type:"bytes32",internalType:"bytes32"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"auth",inputs:[{name:"_nodeId",type:"bytes32",internalType:"bytes32"},{name:"_sender",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"ensowners",inputs:[{name:"",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"kns",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"lz",inputs:[],outputs:[{name:"",type:"address",internalType:"contract ILayerZeroEndpoint"}],stateMutability:"view"},{type:"function",name:"lzReceive",inputs:[{name:"_chain",type:"uint16",internalType:"uint16"},{name:"_path",type:"bytes",internalType:"bytes"},{name:"",type:"uint64",internalType:"uint64"},{name:"_payload",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"lzc",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"ownerOf",inputs:[{name:"node",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"nonpayable"},{type:"function",name:"ping",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setBaseNode",inputs:[{name:"node",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setEntry",inputs:[{name:"_entry",type:"address",internalType:"address"},{name:"_entrychain",type:"uint16",internalType:"uint16"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setKNSRecords",inputs:[{name:"owner",type:"address",internalType:"address"},{name:"fqdn",type:"bytes",internalType:"bytes"},{name:"data",type:"bytes[]",internalType:"bytes[]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"simulate",inputs:[{name:"_payload",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"trustedentries",inputs:[{name:"",type:"uint16",internalType:"uint16"}],outputs:[{name:"",type:"bytes",internalType:"bytes"}],stateMutability:"view"},{type:"event",name:"Error",inputs:[{name:"error",type:"bytes4",indexed:!1,internalType:"bytes4"}],anonymous:!1},{type:"event",name:"Pinged",inputs:[{name:"",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"error",name:"EthNameTooShort",inputs:[]},{type:"error",name:"NotEthName",inputs:[]},{type:"error",name:"ParentNotRegistered",inputs:[]}],Jd="0x61010060405234801561001157600080fd5b506040516200155138038062001551833981016040819052610032916100cb565b3360e0526001600160a01b0392831660c052911660805261ffff1660a0527f93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae60009081526020527f859ecef2e168dc10231b000bd53493b42bc9d944cac29d94582c1e1d4359213180546001600160a01b03191630179055610119565b80516001600160a01b03811681146100c657600080fd5b919050565b6000806000606084860312156100e057600080fd5b6100e9846100af565b92506100f7602085016100af565b9150604084015161ffff8116811461010e57600080fd5b809150509250925092565b60805160a05160c05160e0516113e26200016f60003960008181610245015261085d0152600081816101da0152818161072d01526107c70152600061013901526000818161017801526102df01526113e26000f3fe608060405234801561001057600080fd5b50600436106100f45760003560e01c80635c36b18611610097578063a5cc9b8c11610066578063a5cc9b8c14610267578063aff820041461027a578063b7a9d55d146102a3578063c4a6ed1c146102b457600080fd5b80635c36b186146101fc5780636352211e146102045780636a0d1c341461022d5780638da5cb5b1461024057600080fd5b806330ff44b6116100d357806330ff44b61461013457806333f97b5914610173578063516a166a146101b257806355bf3ec7146101d557600080fd5b80621d3567146100f9578063124039161461010e5780632421706214610121575b600080fd5b61010c610107366004610ca3565b6102d4565b005b61010c61011c366004610d3d565b505050565b61010c61012f366004610d89565b6104e6565b61015b7f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff90911681526020015b60405180910390f35b61019a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161016a565b6101c56101c0366004610de2565b61052f565b604051901515815260200161016a565b61019a7f000000000000000000000000000000000000000000000000000000000000000081565b61010c61056a565b61019a610212366004610e0e565b6000908152602081905260409020546001600160a01b031690565b61010c61023b366004610e27565b6105ab565b61019a7f000000000000000000000000000000000000000000000000000000000000000081565b61010c610275366004610ed5565b610852565b61019a610288366004610e0e565b6000602081905290815260409020546001600160a01b031681565b61010c6102b1366004610e0e565b50565b6102c76102c2366004610eff565b6108db565b60405161016a9190610f3e565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103375760405162461bcd60e51b815260206004820152600360248201526210b63d60e91b60448201526064015b60405180910390fd5b61ffff86166000908152600160205260408120805461035590610f71565b80601f016020809104026020016040519081016040528092919081815260200182805461038190610f71565b80156103ce5780601f106103a3576101008083540402835291602001916103ce565b820191906000526020600020905b8154815290600101906020018083116103b157829003601f168201915b5050505050905080516000141580156103e75750805185145b8015610410575085856040516103fe929190610fab565b60405180910390208180519060200120145b6104475760405162461bcd60e51b8152602060048201526008602482015267085d1c9d5cdd195960c21b604482015260640161032e565b60008061048d305a609688888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061097592505050565b91509150816104db576020818101516040516001600160e01b03198216815290917f366d96da3b5ec9f4aeb519f286b40eccd096a5d8f2321095eb415fb56d32f0cc910160405180910390a1505b505050505050505050565b610529305a609685858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061097592505050565b50505050565b60006001600160a01b03821630148061056157506000838152602081905260409020546001600160a01b038381169116145b90505b92915050565b33301461057657600080fd5b6040513081527fcd1f5876a7d71dd23dec305977c08069d94c421d8eccf041570b143e2312045d9060200160405180910390a1565b3330146105b757600080fd5b60058310156105d95760405163a0b3278960e01b815260040160405180910390fd5b83836105e6600582610fd1565b6105f292869290610fe4565b604051610600929190610fab565b6040519081900390207fc65934a88d283a635602ca15e14e8b9a9a3d150eacacca3b07f4a85f5fdbface1461064757604051624945f960e61b815260040160405180910390fd5b60008061068986868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a0092505050565b90925090507f93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae82148015906106d357506000828152602081905260409020546001600160a01b0316155b156106f1576040516336e8c0db60e21b815260040160405180910390fd5b6000818152602081905260409081902080546001600160a01b0319166001600160a01b038a8116919091179091559051633255528360e21b81527f00000000000000000000000000000000000000000000000000000000000000009091169063c9554a0c906107669089908990600401611037565b6020604051808303816000875af1158015610785573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a99190611053565b5082156108495760405163e32954eb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e32954eb906108009084908890889060040161106c565b6000604051808303816000875af115801561081f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610847919081019061115c565b505b50505050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461088757600080fd5b6040516bffffffffffffffffffffffff19606084811b8216602084015230901b16603482015260480160408051601f1981840301815291815261ffff831660009081526001602052209061011c90826112c3565b600160205260009081526040902080546108f490610f71565b80601f016020809104026020016040519081016040528092919081815260200182805461092090610f71565b801561096d5780601f106109425761010080835404028352916020019161096d565b820191906000526020600020905b81548152906001019060200180831161095057829003601f168201915b505050505081565b6000606060008060008661ffff1667ffffffffffffffff81111561099b5761099b611115565b6040519080825280601f01601f1916602001820160405280156109c5576020820181803683370190505b50905060008087516020890160008d8df191503d9250868311156109e7578692505b828152826000602083013e909890975095505050505050565b6000808080610a0f8582610a59565b90925090506000610a208683610b60565b60408051602080820184905281830187905282518083038401815260609092019092528051910120909150819094509450505050915091565b60008083518310610aac5760405162461bcd60e51b815260206004820152601e60248201527f726561644c6162656c3a20496e646578206f7574206f6620626f756e64730000604482015260640161032e565b6000848481518110610ac057610ac0611383565b016020015160f81c905060408110610b1a5760405162461bcd60e51b815260206004820152601960248201527f726561644c6162656c3a204c6162656c20746f6f206c6f6e6700000000000000604482015260640161032e565b8015610b3c57610b3585610b2f866001611399565b83610c1f565b9250610b41565b600092505b610b4b8185611399565b610b56906001611399565b9150509250929050565b6000806000610b6f8585610a59565b909250905081610be15760018551610b879190610fd1565b8414610bd55760405162461bcd60e51b815260206004820152601d60248201527f6e616d65686173683a204a756e6b20617420656e64206f66206e616d65000000604482015260640161032e565b50600091506105649050565b610beb8582610b60565b6040805160208101929092528101839052606001604051602081830303815290604052805190602001209250505092915050565b8251600090610c2e8385611399565b1115610c3957600080fd5b5091016020012090565b803561ffff81168114610c5557600080fd5b919050565b60008083601f840112610c6c57600080fd5b50813567ffffffffffffffff811115610c8457600080fd5b602083019150836020828501011115610c9c57600080fd5b9250929050565b60008060008060008060808789031215610cbc57600080fd5b610cc587610c43565b9550602087013567ffffffffffffffff80821115610ce257600080fd5b610cee8a838b01610c5a565b9097509550604089013591508082168214610d0857600080fd5b90935060608801359080821115610d1e57600080fd5b50610d2b89828a01610c5a565b979a9699509497509295939492505050565b600080600060408486031215610d5257600080fd5b833567ffffffffffffffff811115610d6957600080fd5b610d7586828701610c5a565b909790965060209590950135949350505050565b60008060208385031215610d9c57600080fd5b823567ffffffffffffffff811115610db357600080fd5b610dbf85828601610c5a565b90969095509350505050565b80356001600160a01b0381168114610c5557600080fd5b60008060408385031215610df557600080fd5b82359150610e0560208401610dcb565b90509250929050565b600060208284031215610e2057600080fd5b5035919050565b600080600080600060608688031215610e3f57600080fd5b610e4886610dcb565b9450602086013567ffffffffffffffff80821115610e6557600080fd5b610e7189838a01610c5a565b90965094506040880135915080821115610e8a57600080fd5b818801915088601f830112610e9e57600080fd5b813581811115610ead57600080fd5b8960208260051b8501011115610ec257600080fd5b9699959850939650602001949392505050565b60008060408385031215610ee857600080fd5b610ef183610dcb565b9150610e0560208401610c43565b600060208284031215610f1157600080fd5b61056182610c43565b60005b83811015610f35578181015183820152602001610f1d565b50506000910152565b6020815260008251806020840152610f5d816040850160208701610f1a565b601f01601f19169190910160400192915050565b600181811c90821680610f8557607f821691505b602082108103610fa557634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561056457610564610fbb565b60008085851115610ff457600080fd5b8386111561100157600080fd5b5050820193919092039150565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600061104b60208301848661100e565b949350505050565b60006020828403121561106557600080fd5b5051919050565b6000604082018583526020604060208501528185835260608501905060608660051b86010192508660005b8781101561110757868503605f190183528135368a9003601e190181126110bd57600080fd5b8901848101903567ffffffffffffffff8111156110d957600080fd5b8036038213156110e857600080fd5b6110f387828461100e565b965050509183019190830190600101611097565b509298975050505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561115457611154611115565b604052919050565b6000602080838503121561116f57600080fd5b825167ffffffffffffffff8082111561118757600080fd5b8185019150601f86601f84011261119d57600080fd5b8251828111156111af576111af611115565b8060051b6111be86820161112b565b918252848101860191868101908a8411156111d857600080fd5b87870192505b83831015611265578251868111156111f65760008081fd5b8701603f81018c136112085760008081fd5b8881015160408882111561121e5761121e611115565b61122f828901601f19168c0161112b565b8281528e828486010111156112445760008081fd5b611253838d8301848701610f1a565b855250505091870191908701906111de565b9a9950505050505050505050565b601f82111561011c576000816000526020600020601f850160051c8101602086101561129c5750805b601f850160051c820191505b818110156112bb578281556001016112a8565b505050505050565b815167ffffffffffffffff8111156112dd576112dd611115565b6112f1816112eb8454610f71565b84611273565b602080601f831160018114611326576000841561130e5750858301515b600019600386901b1c1916600185901b1785556112bb565b600085815260208120601f198616915b8281101561135557888601518255948401946001909101908401611336565b50858210156113735787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b8082018082111561056457610564610fbb56fea26469706673582212208197e0f5b459d95709cef50ad0fe845f867790febbf6af1b6d9bd7ff0a9b876064736f6c63430008170033",RS=t=>t.length>1;class ta extends i2{constructor(...e){RS(e)?super(...e):super(Ho,Jd,e[0])}deploy(e,r,n,i){return super.deploy(e,r,n,i||{})}getDeployTransaction(e,r,n,i){return super.getDeployTransaction(e,r,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new Xr(Ho)}static connect(e,r){return new Dn(e,Ho,r)}}i1(ta,"bytecode",Jd),i1(ta,"abi",Ho);const Ko=[{inputs:[],name:"NotTLD",type:"error"},{inputs:[],name:"TLD401",type:"error"},{inputs:[],name:"TLDRegistrarOnly",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint128",name:"ip",type:"uint128"}],name:"IpUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"key",type:"bytes32"}],name:"KeyUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"address",name:"tld",type:"address"}],name:"NewTLD",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"}],name:"NodeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"}],name:"RecordsCleared",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32[]",name:"routers",type:"bytes32[]"}],name:"RoutingUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint16",name:"port",type:"uint16"}],name:"TcpUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint16",name:"port",type:"uint16"}],name:"UdpUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint16",name:"port",type:"uint16"}],name:"WsUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint16",name:"port",type:"uint16"}],name:"WtUpdate",type:"event"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"TLDs",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint96",name:"_records",type:"uint96"}],name:"clearRecords",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getInitializedVersion",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"ip",outputs:[{internalType:"uint128",name:"ip",type:"uint128"},{internalType:"uint16",name:"ws",type:"uint16"},{internalType:"uint16",name:"wt",type:"uint16"},{internalType:"uint16",name:"tcp",type:"uint16"},{internalType:"uint16",name:"udp",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"key",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicallWithNodeCheck",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"nodes",outputs:[{internalType:"contract ITLDRegistrar",name:"tld",type:"address"},{internalType:"uint96",name:"records",type:"uint96"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"fqdn",type:"bytes"}],name:"registerNode",outputs:[{internalType:"bytes32",name:"nodeHash",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"fqdn",type:"bytes"},{internalType:"address",name:"registrar",type:"address"}],name:"registerTLD",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"routers",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint128",name:"_ip",type:"uint128"},{internalType:"uint16",name:"_ws",type:"uint16"},{internalType:"uint16",name:"_wt",type:"uint16"},{internalType:"uint16",name:"_tcp",type:"uint16"},{internalType:"uint16",name:"_udp",type:"uint16"}],name:"setAllIp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint128",name:"_ip",type:"uint128"},{internalType:"uint16",name:"_ws",type:"uint16"},{internalType:"uint16",name:"_wt",type:"uint16"},{internalType:"uint16",name:"_tcp",type:"uint16"},{internalType:"uint16",name:"_udp",type:"uint16"}],name:"setDirectInfo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint128",name:"_ip",type:"uint128"}],name:"setIp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"bytes32",name:"_key",type:"bytes32"}],name:"setKey",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"bytes32[]",name:"_newRouters",type:"bytes32[]"}],name:"setRouters",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint16",name:"_tcp",type:"uint16"}],name:"setTcp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint16",name:"_udp",type:"uint16"}],name:"setUdp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint16",name:"_ws",type:"uint16"}],name:"setWs",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"},{internalType:"uint16",name:"_wt",type:"uint16"}],name:"setWt",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"}],Yd="0x60a06040523060805234801561001457600080fd5b50608051612e6961004c60003960008181610e9e01528181610ee7015281816111e80152818161122801526112bb0152612e696000f3fe6080604052600436106101b75760003560e01c806374191440116100ec578063c9554a0c1161008a578063decd6bd511610064578063decd6bd5146105c9578063e32954eb146105e9578063f2fde38b14610609578063fbda8c3f1461062957600080fd5b8063c9554a0c1461051a578063cf506b4a1461053a578063d86e697d1461055a57600080fd5b8063aa1fce69116100c6578063aa1fce691461047e578063ac9650d8146104ab578063b3c65015146104d8578063c7988b37146104fa57600080fd5b8063741914401461042b5780638129fc1c1461044b5780638da5cb5b1461046057600080fd5b80633940afcd116101595780634f1ef286116101335780634f1ef2861461039257806352d1902d146103a557806365184956146103c8578063715018a61461041657600080fd5b80633940afcd1461032f5780634a2a6add1461034f5780634f0575491461036f57600080fd5b80632363b1a6116101955780632363b1a6146102af578063300777af146102cf57806332946692146102ef5780633659cfe61461030f57600080fd5b806301ffc9a7146101bc57806305f93b5f146101f157806307a003301461028d575b600080fd5b3480156101c857600080fd5b506101dc6101d73660046125bc565b610656565b60405190151581526020015b60405180910390f35b3480156101fd57600080fd5b5061025261020c3660046125e6565b60ff602052600090815260409020546001600160801b0381169061ffff600160801b8204811691600160901b8104821691600160a01b8204811691600160b01b90041685565b604080516001600160801b03909616865261ffff9485166020870152928416928501929092528216606084015216608082015260a0016101e8565b34801561029957600080fd5b506102ad6102a83660046125ff565b61068d565b005b3480156102bb57600080fd5b506102ad6102ca366004612638565b6107ea565b3480156102db57600080fd5b506102ad6102ea36600461267b565b610958565b3480156102fb57600080fd5b506102ad61030a36600461269e565b610ad2565b34801561031b57600080fd5b506102ad61032a366004612722565b610e94565b34801561033b57600080fd5b506102ad61034a366004612782565b610f7c565b34801561035b57600080fd5b506102ad61036a3660046127ce565b6110e2565b34801561037b57600080fd5b506102ad61038a36600461269e565b505050505050565b6102ad6103a0366004612820565b6111de565b3480156103b157600080fd5b506103ba6112ae565b6040519081526020016101e8565b3480156103d457600080fd5b506103fe6103e33660046125e6565b60fb602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101e8565b34801561042257600080fd5b506102ad611361565b34801561043757600080fd5b506102ad610446366004612638565b611375565b34801561045757600080fd5b506102ad6114e8565b34801561046c57600080fd5b5060c9546001600160a01b03166103fe565b34801561048a57600080fd5b5061049e6104993660046125e6565b611600565b6040516101e891906128e2565b3480156104b757600080fd5b506104cb6104c6366004612926565b611662565b6040516101e891906129b8565b3480156104e457600080fd5b5060005460405160ff90911681526020016101e8565b34801561050657600080fd5b506102ad610515366004612638565b611677565b34801561052657600080fd5b506103ba610535366004612a5e565b6117ec565b34801561054657600080fd5b506102ad610555366004612a94565b6118f2565b34801561056657600080fd5b506105a26105753660046125e6565b60fc602052600090815260409020546001600160a01b03811690600160a01b90046001600160601b031682565b604080516001600160a01b0390931683526001600160601b039091166020830152016101e8565b3480156105d557600080fd5b506102ad6105e4366004612638565b611a71565b3480156105f557600080fd5b506104cb610604366004612782565b611bdf565b34801561061557600080fd5b506102ad610624366004612722565b611bf4565b34801561063557600080fd5b506103ba6106443660046125e6565b60fd6020526000908152604090205481565b60006001600160e01b03198216632065a08b60e01b148061068757506301ffc9a760e01b6001600160e01b03198316145b92915050565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa1580156106e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070d9190612ae8565b61072a57604051634745a29b60e01b815260040160405180910390fd5b600083815260fd60205260409020829055811561077c57600083815260fc6020526040902080546001600160a01b0381166001600160a01b928390046001600160601b031617918202179091556107aa565b600083815260fc6020526040902080546001600160a01b0381166001600160a01b9283900416918202179091555b50827f8ad9db565fe90ae9d4d50c51a4bf38505bfc2013675dbfd3510e0d6a4d050ba5836040516107dd91815260200190565b60405180910390a2505050565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190612ae8565b61088757604051634745a29b60e01b815260040160405180910390fd5b600083815260ff60205260409020805461ffff60801b1916600160801b61ffff851690810291909117909155156108f357600083815260fc6020526040902080546001600160a01b0381166008600160a01b928390046001600160601b03161791820217909155610921565b600083815260fc6020526040902080546001600160a01b0381166008600160a01b9283900416918202179091555b5060405161ffff8316815283907f11424874391782446f3957eb6ca27caa9af2d78d87980762c13090bd2845f71f906020016107dd565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa1580156109b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d89190612ae8565b6109f557604051634745a29b60e01b815260040160405180910390fd5b600083815260ff6020526040902080546fffffffffffffffffffffffffffffffff19166001600160801b03841690811790915515610a6857600083815260fc6020526040902080546001600160a01b0381166004600160a01b928390046001600160601b03161791820217909155610a96565b600083815260fc6020526040902080546001600160a01b0381166004600160a01b9283900416918202179091555b506040516001600160801b038316815283907f27831fc2ef572cce1298d5d9fc3cc1304eb5dfcea21d2190e5ad5943e4fa14fc906020016107dd565b600086815260fc6020526040908190205490516328b50b3560e11b81526004810188905233602482015287916001600160a01b03169063516a166a90604401602060405180830381865afa158015610b2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b529190612ae8565b610b6f57604051634745a29b60e01b815260040160405180910390fd5b600087815260fc6020526040902054600160a01b90046001600160601b03166001600160801b03871615610ba65760048117610bab565b600481165b905061ffff861615610bc05760088117610bc5565b600881165b905061ffff851615610bda5760108117610bdf565b601081165b905061ffff841615610bf45760208117610bf9565b602081165b905061ffff831615610c0e5760408117610c13565b604081165b90508060fc60008a815260200190815260200160002060000160146101000a8154816001600160601b0302191690836001600160601b031602179055506040518060a00160405280886001600160801b031681526020018761ffff1681526020018661ffff1681526020018561ffff1681526020018461ffff1681525060ff60008a815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548161ffff021916908361ffff16021790555060408201518160000160126101000a81548161ffff021916908361ffff16021790555060608201518160000160146101000a81548161ffff021916908361ffff16021790555060808201518160000160166101000a81548161ffff021916908361ffff160217905550905050877f27831fc2ef572cce1298d5d9fc3cc1304eb5dfcea21d2190e5ad5943e4fa14fc88604051610d9e91906001600160801b0391909116815260200190565b60405180910390a260405161ffff8716815288907f11424874391782446f3957eb6ca27caa9af2d78d87980762c13090bd2845f71f9060200160405180910390a260405161ffff8616815288907f4554b2837a782a075cb46bd0c681b73ef5e49cbcbeb3323e6f1fd9d3ec93a4c39060200160405180910390a260405161ffff8516815288907fc9b39ee25167b4c4f1ba319c61772350b508db76f73d0b25575173210386d9f39060200160405180910390a260405161ffff8416815288907f3d36ae2226b041dc65d74c772bae84c40b4ac6d1da927d7b633940d819c09c1a9060200160405180910390a25050505050505050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610ee55760405162461bcd60e51b8152600401610edc90612b0a565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610f2e600080516020612ded833981519152546001600160a01b031690565b6001600160a01b031614610f545760405162461bcd60e51b8152600401610edc90612b56565b610f5d81611c6a565b60408051600080825260208201909252610f7991839190611c72565b50565b600083815260fc6020526040908190205490516328b50b3560e11b81526004810185905233602482015284916001600160a01b03169063516a166a90604401602060405180830381865afa158015610fd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffc9190612ae8565b61101957604051634745a29b60e01b815260040160405180910390fd5b600084815260fe6020526040902061103290848461255c565b541561107357600084815260fc6020526040902080546001600160a01b0381166002600160a01b928390046001600160601b031617918202179091556110a1565b600084815260fc6020526040902080546001600160a01b0381166002600160a01b9283900416918202179091555b50837fd5a074e1c505de1aae7c94787f2e46faf07aceba6fc0c6a5f82f223ca1de2c5784846040516110d4929190612ba2565b60405180910390a250505050565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa15801561113e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111629190612ae8565b61117f57604051634745a29b60e01b815260040160405180910390fd5b600083815260fc60205260408082208054600160a01b8082048719166001600160601b0316026001600160a01b039091161790555184917f43a5deaf1b43fdbf7f75cf9745d253c5d17328910ab7c757e664869316fe973391a2505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036112265760405162461bcd60e51b8152600401610edc90612b0a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661126f600080516020612ded833981519152546001600160a01b031690565b6001600160a01b0316146112955760405162461bcd60e51b8152600401610edc90612b56565b61129e82611c6a565b6112aa82826001611c72565b5050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461134e5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610edc565b50600080516020612ded83398151915290565b611369611de2565b6113736000611e3c565b565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa1580156113d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f59190612ae8565b61141257604051634745a29b60e01b815260040160405180910390fd5b600083815260ff60205260409020805461ffff60b01b1916600160b01b61ffff8516908102919091179091551561148257600083815260fc60205260409081902080546001600160601b03600160a01b808304919091169093179283026001600160a01b039091161790556114b1565b600083815260fc6020526040908190208054600160a01b8082049093169283026001600160a01b039091161790555b5060405161ffff8316815283907f3d36ae2226b041dc65d74c772bae84c40b4ac6d1da927d7b633940d819c09c1a906020016107dd565b600054610100900460ff16158080156115085750600054600160ff909116105b806115225750303b158015611522575060005460ff166001145b6115855760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610edc565b6000805460ff1916600117905580156115a8576000805461ff0019166101001790555b6115b0611e8e565b6115b8611eb5565b8015610f79576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600081815260fe602090815260409182902080548351818402810184019094528084526060939283018282801561165657602002820191906000526020600020905b815481526020019060010190808311611642575b50505050509050919050565b606061167060008484611ee4565b9392505050565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa1580156116d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f79190612ae8565b61171457604051634745a29b60e01b815260040160405180910390fd5b600083815260ff60205260409020805461ffff60a01b1916600160a01b61ffff8516908102919091179091551561178557600083815260fc6020908152604090912080546001600160601b03600160a01b808304919091169093179283026001600160a01b039091161790556117b5565b600083815260fc602090815260409091208054600160a01b8082049093169283026001600160a01b039091161790555b5060405161ffff8316815283907fc9b39ee25167b4c4f1ba319c61772350b508db76f73d0b25575173210386d9f3906020016107dd565b600080600061183085858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506120a992505050565b600081815260fb602052604090205491935091506001600160a01b0316331461186c5760405163ae7fd2eb60e01b815260040160405180910390fd5b6040805180820182523381526000602080830182815286835260fc90915290839020915190516001600160601b0316600160a01b026001600160a01b03919091161790555182907f76a77f5ff7e4ca0adac1c931a7ad2ea83bfb7e6b8603e81917dd2dca7e90625c906118e29088908890612c04565b60405180910390a2509392505050565b6118fa611de2565b600080611941600086868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506120c09050565b9092509050611951600185612c2e565b81146119705760405163b444c4ed60e01b815260040160405180910390fd5b60408051600060208083018290528284018690528351808403850181526060840180865281519183019190912080845260fb835285842080546001600160a01b038b166001600160a01b0319918216811790925560fc90945295909320805490921685179091556309201c8b60e11b905291906312403916906119fb90899089908690606401612c41565b600060405180830381600087803b158015611a1557600080fd5b505af1158015611a29573d6000803e3d6000fd5b50505050807f7db14709557f4e6eec0d0c5f0c1855b31e9667a13ef65c90c284987c677d4004878787604051611a6193929190612c65565b60405180910390a2505050505050565b600082815260fc6020526040908190205490516328b50b3560e11b81526004810184905233602482015283916001600160a01b03169063516a166a90604401602060405180830381865afa158015611acd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af19190612ae8565b611b0e57604051634745a29b60e01b815260040160405180910390fd5b600083815260ff60205260409020805461ffff60901b1916600160901b61ffff85169081029190911790915515611b7a57600083815260fc6020526040902080546001600160a01b0381166010600160a01b928390046001600160601b03161791820217909155611ba8565b600083815260fc6020526040902080546001600160a01b0381166010600160a01b9283900416918202179091555b5060405161ffff8316815283907f4554b2837a782a075cb46bd0c681b73ef5e49cbcbeb3323e6f1fd9d3ec93a4c3906020016107dd565b6060611bec848484611ee4565b949350505050565b611bfc611de2565b6001600160a01b038116611c615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610edc565b610f7981611e3c565b610f79611de2565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611caa57611ca5836121c7565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611d04575060408051601f3d908101601f19168201909252611d0191810190612c91565b60015b611d675760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610edc565b600080516020612ded8339815191528114611dd65760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610edc565b50611ca5838383612263565b60c9546001600160a01b031633146113735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610edc565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166113735760405162461bcd60e51b8152600401610edc90612caa565b600054610100900460ff16611edc5760405162461bcd60e51b8152600401610edc90612caa565b61137361228e565b60608167ffffffffffffffff811115611eff57611eff61280a565b604051908082528060200260200182016040528015611f3257816020015b6060815260200190600190039081611f1d5790505b50905060005b828110156120a1578415611ff4576000848483818110611f5a57611f5a612cf5565b9050602002810190611f6c9190612d0b565b611f7b91602491600491612d52565b611f8491612d7c565b9050858114611ff25760405162461bcd60e51b815260206004820152603460248201527f6d756c746963616c6c3a20416c6c207265636f726473206d7573742068617665604482015273040c240dac2e8c6d0d2dcce40dcc2dacad0c2e6d60631b6064820152608401610edc565b505b6000803086868581811061200a5761200a612cf5565b905060200281019061201c9190612d0b565b60405161202a929190612d9a565b600060405180830381855af49150503d8060008114612065576040519150601f19603f3d011682016040523d82523d6000602084013e61206a565b606091505b50915091508161207957600080fd5b8084848151811061208c5761208c612cf5565b60209081029190910101525050600101611f38565b509392505050565b6000806120b78360006122be565b91509150915091565b600080835183106121135760405162461bcd60e51b815260206004820152601e60248201527f726561644c6162656c3a20496e646578206f7574206f6620626f756e647300006044820152606401610edc565b600084848151811061212757612127612cf5565b016020015160f81c9050604081106121815760405162461bcd60e51b815260206004820152601960248201527f726561644c6162656c3a204c6162656c20746f6f206c6f6e67000000000000006044820152606401610edc565b80156121a35761219c85612196866001612daa565b836123c2565b92506121a8565b600092505b6121b28185612daa565b6121bd906001612daa565b9150509250929050565b6001600160a01b0381163b6122345760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610edc565b600080516020612ded83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61226c836123e6565b6000825111806122795750805b15611ca5576122888383612426565b50505050565b600054610100900460ff166122b55760405162461bcd60e51b8152600401610edc90612caa565b61137333611e3c565b6000806000806122ce86866120c0565b90925090508161234357600186516122e69190612c2e565b85146123345760405162461bcd60e51b815260206004820152601d60248201527f6e616d65686173683a204a756e6b20617420656e64206f66206e616d650000006044820152606401610edc565b50600092508291506123bb9050565b60008061235088846122be565b9092509050806123875760408051600060208201529081018590526060016040516020818303038152906040528051906020012090505b6040805160208101849052908101859052606001604051602081830303815290604052805190602001208195509550505050505b9250929050565b82516000906123d18385612daa565b11156123dc57600080fd5b5091016020012090565b6123ef816121c7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606116708383604051806060016040528060278152602001612e0d602791396060600080856001600160a01b0316856040516124639190612dbd565b600060405180830381855af49150503d806000811461249e576040519150601f19603f3d011682016040523d82523d6000602084013e6124a3565b606091505b50915091506124b4868383876124be565b9695505050505050565b6060831561252d578251600003612526576001600160a01b0385163b6125265760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610edc565b5081611bec565b611bec83838151156125425781518083602001fd5b8060405162461bcd60e51b8152600401610edc9190612dd9565b828054828255906000526020600020908101928215612597579160200282015b8281111561259757823582559160200191906001019061257c565b506125a39291506125a7565b5090565b5b808211156125a357600081556001016125a8565b6000602082840312156125ce57600080fd5b81356001600160e01b03198116811461167057600080fd5b6000602082840312156125f857600080fd5b5035919050565b6000806040838503121561261257600080fd5b50508035926020909101359150565b803561ffff8116811461263357600080fd5b919050565b6000806040838503121561264b57600080fd5b8235915061265b60208401612621565b90509250929050565b80356001600160801b038116811461263357600080fd5b6000806040838503121561268e57600080fd5b8235915061265b60208401612664565b60008060008060008060c087890312156126b757600080fd5b863595506126c760208801612664565b94506126d560408801612621565b93506126e360608801612621565b92506126f160808801612621565b91506126ff60a08801612621565b90509295509295509295565b80356001600160a01b038116811461263357600080fd5b60006020828403121561273457600080fd5b6116708261270b565b60008083601f84011261274f57600080fd5b50813567ffffffffffffffff81111561276757600080fd5b6020830191508360208260051b85010111156123bb57600080fd5b60008060006040848603121561279757600080fd5b83359250602084013567ffffffffffffffff8111156127b557600080fd5b6127c18682870161273d565b9497909650939450505050565b600080604083850312156127e157600080fd5b8235915060208301356001600160601b03811681146127ff57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561283357600080fd5b61283c8361270b565b9150602083013567ffffffffffffffff8082111561285957600080fd5b818501915085601f83011261286d57600080fd5b81358181111561287f5761287f61280a565b604051601f8201601f19908116603f011681019083821181831017156128a7576128a761280a565b816040528281528860208487010111156128c057600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561291a578351835292840192918401916001016128fe565b50909695505050505050565b6000806020838503121561293957600080fd5b823567ffffffffffffffff81111561295057600080fd5b61295c8582860161273d565b90969095509350505050565b60005b8381101561298357818101518382015260200161296b565b50506000910152565b600081518084526129a4816020860160208601612968565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015612a0f57603f198886030184526129fd85835161298c565b945092850192908501906001016129e1565b5092979650505050505050565b60008083601f840112612a2e57600080fd5b50813567ffffffffffffffff811115612a4657600080fd5b6020830191508360208285010111156123bb57600080fd5b60008060208385031215612a7157600080fd5b823567ffffffffffffffff811115612a8857600080fd5b61295c85828601612a1c565b600080600060408486031215612aa957600080fd5b833567ffffffffffffffff811115612ac057600080fd5b612acc86828701612a1c565b9094509250612adf90506020850161270b565b90509250925092565b600060208284031215612afa57600080fd5b8151801515811461167057600080fd5b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252810182905260006001600160fb1b03831115612bc257600080fd5b8260051b80856040850137919091016040019392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000611bec602083018486612bdb565b634e487b7160e01b600052601160045260246000fd5b8181038181111561068757610687612c18565b604081526000612c55604083018587612bdb565b9050826020830152949350505050565b604081526000612c79604083018587612bdb565b905060018060a01b0383166020830152949350505050565b600060208284031215612ca357600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112612d2257600080fd5b83018035915067ffffffffffffffff821115612d3d57600080fd5b6020019150368190038213156123bb57600080fd5b60008085851115612d6257600080fd5b83861115612d6f57600080fd5b5050820193919092039150565b8035602083101561068757600019602084900360031b1b1692915050565b8183823760009101908152919050565b8082018082111561068757610687612c18565b60008251612dcf818460208701612968565b9190910192915050565b602081526000611670602083018461298c56fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122070a9f0e73254f89b10dbef9ecf7bdfc92f749197f3cc327e9f575c6c38e3afa264736f6c63430008160033",IS=t=>t.length>1;class ra extends i2{constructor(...e){IS(e)?super(...e):super(Ko,Yd,e[0])}deploy(e){return super.deploy(e||{})}getDeployTransaction(e){return super.getDeployTransaction(e||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new Xr(Ko)}static connect(e,r){return new Dn(e,Ko,r)}}i1(ra,"bytecode",Yd),i1(ra,"abi",Ko);const Go=[{type:"constructor",inputs:[{name:"_ens",type:"address",internalType:"contract ENS"},{name:"_registrar",type:"address",internalType:"contract IBaseRegistrar"},{name:"_metadataService",type:"address",internalType:"contract IMetadataService"}],stateMutability:"nonpayable"},{type:"function",name:"_tokens",inputs:[{name:"",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"allFusesBurned",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"fuseMask",type:"uint32",internalType:"uint32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"approve",inputs:[{name:"to",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"balanceOf",inputs:[{name:"account",type:"address",internalType:"address"},{name:"id",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"balanceOfBatch",inputs:[{name:"accounts",type:"address[]",internalType:"address[]"},{name:"ids",type:"uint256[]",internalType:"uint256[]"}],outputs:[{name:"",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"view"},{type:"function",name:"canExtendSubnames",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"addr",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"canModifyName",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"addr",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"controllers",inputs:[{name:"",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"ens",inputs:[],outputs:[{name:"",type:"address",internalType:"contract ENS"}],stateMutability:"view"},{type:"function",name:"extendExpiry",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"labelhash",type:"bytes32",internalType:"bytes32"},{name:"expiry",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"uint64",internalType:"uint64"}],stateMutability:"nonpayable"},{type:"function",name:"getApproved",inputs:[{name:"id",type:"uint256",internalType:"uint256"}],outputs:[{name:"operator",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getData",inputs:[{name:"id",type:"uint256",internalType:"uint256"}],outputs:[{name:"owner",type:"address",internalType:"address"},{name:"fuses",type:"uint32",internalType:"uint32"},{name:"expiry",type:"uint64",internalType:"uint64"}],stateMutability:"view"},{type:"function",name:"isApprovedForAll",inputs:[{name:"account",type:"address",internalType:"address"},{name:"operator",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isWrapped",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"labelhash",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isWrapped",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"metadataService",inputs:[],outputs:[{name:"",type:"address",internalType:"contract IMetadataService"}],stateMutability:"view"},{type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"names",inputs:[{name:"",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes",internalType:"bytes"}],stateMutability:"view"},{type:"function",name:"onERC721Received",inputs:[{name:"to",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"tokenId",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"ownerOf",inputs:[{name:"id",type:"uint256",internalType:"uint256"}],outputs:[{name:"owner",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"recoverFunds",inputs:[{name:"_token",type:"address",internalType:"address"},{name:"_to",type:"address",internalType:"address"},{name:"_amount",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"registerAndWrapETH2LD",inputs:[{name:"label",type:"string",internalType:"string"},{name:"wrappedOwner",type:"address",internalType:"address"},{name:"duration",type:"uint256",internalType:"uint256"},{name:"resolver",type:"address",internalType:"address"},{name:"ownerControlledFuses",type:"uint16",internalType:"uint16"}],outputs:[{name:"registrarExpiry",type:"uint256",internalType:"uint256"}],stateMutability:"nonpayable"},{type:"function",name:"registrar",inputs:[],outputs:[{name:"",type:"address",internalType:"contract IBaseRegistrar"}],stateMutability:"view"},{type:"function",name:"renew",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"},{name:"duration",type:"uint256",internalType:"uint256"}],outputs:[{name:"expires",type:"uint256",internalType:"uint256"}],stateMutability:"nonpayable"},{type:"function",name:"renounceOwnership",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"safeBatchTransferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"ids",type:"uint256[]",internalType:"uint256[]"},{name:"amounts",type:"uint256[]",internalType:"uint256[]"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"safeTransferFrom",inputs:[{name:"from",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"id",type:"uint256",internalType:"uint256"},{name:"amount",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setApprovalForAll",inputs:[{name:"operator",type:"address",internalType:"address"},{name:"approved",type:"bool",internalType:"bool"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setChildFuses",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"labelhash",type:"bytes32",internalType:"bytes32"},{name:"fuses",type:"uint32",internalType:"uint32"},{name:"expiry",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setController",inputs:[{name:"controller",type:"address",internalType:"address"},{name:"active",type:"bool",internalType:"bool"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setFuses",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"ownerControlledFuses",type:"uint16",internalType:"uint16"}],outputs:[{name:"",type:"uint32",internalType:"uint32"}],stateMutability:"nonpayable"},{type:"function",name:"setMetadataService",inputs:[{name:"_metadataService",type:"address",internalType:"contract IMetadataService"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setRecord",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"owner",type:"address",internalType:"address"},{name:"resolver",type:"address",internalType:"address"},{name:"ttl",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setResolver",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"resolver",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setSubnodeOwner",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"label",type:"string",internalType:"string"},{name:"owner",type:"address",internalType:"address"},{name:"fuses",type:"uint32",internalType:"uint32"},{name:"expiry",type:"uint64",internalType:"uint64"}],outputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],stateMutability:"nonpayable"},{type:"function",name:"setSubnodeRecord",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"label",type:"string",internalType:"string"},{name:"owner",type:"address",internalType:"address"},{name:"resolver",type:"address",internalType:"address"},{name:"ttl",type:"uint64",internalType:"uint64"},{name:"fuses",type:"uint32",internalType:"uint32"},{name:"expiry",type:"uint64",internalType:"uint64"}],outputs:[{name:"node",type:"bytes32",internalType:"bytes32"}],stateMutability:"nonpayable"},{type:"function",name:"setTTL",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"ttl",type:"uint64",internalType:"uint64"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setUpgradeContract",inputs:[{name:"_upgradeAddress",type:"address",internalType:"contract INameWrapperUpgrade"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"transferOwnership",inputs:[{name:"newOwner",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"unwrap",inputs:[{name:"parentNode",type:"bytes32",internalType:"bytes32"},{name:"labelhash",type:"bytes32",internalType:"bytes32"},{name:"controller",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"unwrapETH2LD",inputs:[{name:"labelhash",type:"bytes32",internalType:"bytes32"},{name:"registrant",type:"address",internalType:"address"},{name:"controller",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"upgrade",inputs:[{name:"name",type:"bytes",internalType:"bytes"},{name:"extraData",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"upgradeContract",inputs:[],outputs:[{name:"",type:"address",internalType:"contract INameWrapperUpgrade"}],stateMutability:"view"},{type:"function",name:"uri",inputs:[{name:"tokenId",type:"uint256",internalType:"uint256"}],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"wrap",inputs:[{name:"name",type:"bytes",internalType:"bytes"},{name:"wrappedOwner",type:"address",internalType:"address"},{name:"resolver",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"wrapETH2LD",inputs:[{name:"label",type:"string",internalType:"string"},{name:"wrappedOwner",type:"address",internalType:"address"},{name:"ownerControlledFuses",type:"uint16",internalType:"uint16"},{name:"resolver",type:"address",internalType:"address"}],outputs:[{name:"expiry",type:"uint64",internalType:"uint64"}],stateMutability:"nonpayable"},{type:"event",name:"Approval",inputs:[{name:"owner",type:"address",indexed:!0,internalType:"address"},{name:"approved",type:"address",indexed:!0,internalType:"address"},{name:"tokenId",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ApprovalForAll",inputs:[{name:"account",type:"address",indexed:!0,internalType:"address"},{name:"operator",type:"address",indexed:!0,internalType:"address"},{name:"approved",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"ControllerChanged",inputs:[{name:"controller",type:"address",indexed:!0,internalType:"address"},{name:"active",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"ExpiryExtended",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"expiry",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"FusesSet",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"fuses",type:"uint32",indexed:!1,internalType:"uint32"}],anonymous:!1},{type:"event",name:"NameUnwrapped",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"owner",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"NameWrapped",inputs:[{name:"node",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"name",type:"bytes",indexed:!1,internalType:"bytes"},{name:"owner",type:"address",indexed:!1,internalType:"address"},{name:"fuses",type:"uint32",indexed:!1,internalType:"uint32"},{name:"expiry",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"OwnershipTransferred",inputs:[{name:"previousOwner",type:"address",indexed:!0,internalType:"address"},{name:"newOwner",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"TransferBatch",inputs:[{name:"operator",type:"address",indexed:!0,internalType:"address"},{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"ids",type:"uint256[]",indexed:!1,internalType:"uint256[]"},{name:"values",type:"uint256[]",indexed:!1,internalType:"uint256[]"}],anonymous:!1},{type:"event",name:"TransferSingle",inputs:[{name:"operator",type:"address",indexed:!0,internalType:"address"},{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"id",type:"uint256",indexed:!1,internalType:"uint256"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"URI",inputs:[{name:"value",type:"string",indexed:!1,internalType:"string"},{name:"id",type:"uint256",indexed:!0,internalType:"uint256"}],anonymous:!1},{type:"error",name:"CannotUpgrade",inputs:[]},{type:"error",name:"IncompatibleParent",inputs:[]},{type:"error",name:"IncorrectTargetOwner",inputs:[{name:"owner",type:"address",internalType:"address"}]},{type:"error",name:"IncorrectTokenType",inputs:[]},{type:"error",name:"LabelMismatch",inputs:[{name:"labelHash",type:"bytes32",internalType:"bytes32"},{name:"expectedLabelhash",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"LabelTooLong",inputs:[{name:"label",type:"string",internalType:"string"}]},{type:"error",name:"LabelTooShort",inputs:[]},{type:"error",name:"NameIsNotWrapped",inputs:[]},{type:"error",name:"OperationProhibited",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"}]},{type:"error",name:"Unauthorised",inputs:[{name:"node",type:"bytes32",internalType:"bytes32"},{name:"addr",type:"address",internalType:"address"}]}],Xd="0x60c06040523480156200001157600080fd5b5060405162005d2f38038062005d2f8339810160408190526200003491620002f8565b823362000041816200028f565b6040516302571be360e01b81527f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260048201526000906001600160a01b038416906302571be390602401602060405180830381865afa158015620000a9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000cf91906200034c565b604051630f41a04d60e11b81526001600160a01b03848116600483015291925090821690631e83409a906024016020604051808303816000875af11580156200011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000142919062000373565b505050506001600160a01b0383811660805282811660a052600580546001600160a01b031916918316919091179055600163fffeffff60a01b03197fafa26c20e8b3d9a2853d642cfe1021dae26242ffedfac91c97aab212c1a4b93b8190557fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb4955604080518082019091526001815260006020808301829052908052600690527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f89062000210908262000434565b506040805180820190915260058152626cae8d60e31b6020808301919091527f93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae600052600690527ffb9e8e321b8a5ec48f12a7b41f22c6e595d761285c9eb19d8dda7c99edf1b54f9062000285908262000434565b5050505062000500565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620002f557600080fd5b50565b6000806000606084860312156200030e57600080fd5b83516200031b81620002df565b60208501519093506200032e81620002df565b60408501519092506200034181620002df565b809150509250925092565b6000602082840312156200035f57600080fd5b81516200036c81620002df565b9392505050565b6000602082840312156200038657600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620003b857607f821691505b602082108103620003d957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200042f576000816000526020600020601f850160051c810160208610156200040a5750805b601f850160051c820191505b818110156200042b5782815560010162000416565b5050505b505050565b81516001600160401b038111156200045057620004506200038d565b6200046881620004618454620003a3565b84620003df565b602080601f831160018114620004a05760008415620004875750858301515b600019600386901b1c1916600185901b1785556200042b565b600085815260208120601f198616915b82811015620004d157888601518255948401946001909101908401620004b0565b5085821015620004f05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a0516157226200060d6000396000818161047301528181610aee01528181610b9101528181610c20015281816118b80152818161194e015281816119fc01528181611ace01528181611b3f01528181611bc401528181611dd801528181611f14015281816120460152818161219e0152818161222401526129620152600081816104c001528181610a7401528181610d6a01528181610ef901528181610faa015281816112b601528181611f99015281816120cb015281816122cf015281816124810152818161275201528181612b9b01528181612c4901528181612cfe01528181612d7f0152818161328a015281816133dd015281816136450152613bf101526157226000f3fe608060405234801561001057600080fd5b506004361061029f5760003560e01c80636352211e11610167578063c93ab3fd116100ce578063e985e9c511610087578063e985e9c5146106d4578063eb8ae530146106e7578063ed70554d146106fa578063f242432a1461071a578063f2fde38b1461072d578063fd0cd0d91461074057600080fd5b8063c93ab3fd14610652578063cf40882314610665578063d8c9921a14610678578063d9a50c121461068b578063da8c229e1461069e578063e0dba60f146106c157600080fd5b8063a22cb46511610120578063a22cb465146105e0578063a4014982146105f3578063adf4960a14610606578063b6bcad2614610619578063c475abff1461062c578063c658e0861461063f57600080fd5b80636352211e146105635780636e5d6ad214610576578063715018a6146105a15780638b4dfa75146105a95780638cf8b41e146105bc5780638da5cb5b146105cf57600080fd5b80631f4e15041161020b5780633f15457f116101c45780633f15457f146104bb578063402906fc146104e257806341415eab1461050a5780634e1273f41461051d578063530954671461053d5780635d3590d51461055057600080fd5b80631f4e15041461043557806320c38e2b1461044857806324c1af441461045b5780632b20e3971461046e5780632eb2c2d61461049557806333c69ea9146104a857600080fd5b80630e4cd7251161025d5780630e4cd725146103aa5780630e89341c146103bd57806314ab9038146103d0578063150b7a02146103e35780631534e1771461040f5780631896f70a1461042257600080fd5b8062fdd58e146102a45780630178fe3f146102ca57806301ffc9a71461031057806306fdde0314610333578063081812fc1461036a578063095ea7b314610395575b600080fd5b6102b76102b236600461443e565b610753565b6040519081526020015b60405180910390f35b6102dd6102d836600461446a565b610800565b604080516001600160a01b03909416845263ffffffff90921660208401526001600160401b0316908201526060016102c1565b61032361031e366004614499565b610830565b60405190151581526020016102c1565b61035d6040518060400160405280600b81526020016a2730b6b2abb930b83832b960a91b81525081565b6040516102c19190614506565b61037d61037836600461446a565b610870565b6040516001600160a01b0390911681526020016102c1565b6103a86103a336600461443e565b6108b5565b005b6103236103b8366004614519565b6108fb565b61035d6103cb36600461446a565b610975565b6103a86103de366004614565565b6109e7565b6103f66103f13660046145d9565b610ae1565b6040516001600160e01b031990911681526020016102c1565b6103a861041d36600461464b565b610cc1565b6103a8610430366004614519565b610ceb565b60075461037d906001600160a01b031681565b61035d61045636600461446a565b610da1565b6102b7610469366004614741565b610e3b565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b6103a86104a336600461486c565b611021565b6103a86104b6366004614919565b611259565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b6104f56104f0366004614971565b61142a565b60405163ffffffff90911681526020016102c1565b610323610518366004614519565b6114c7565b61053061052b366004614994565b611500565b6040516102c19190614a92565b60055461037d906001600160a01b031681565b6103a861055e366004614aa5565b611621565b61037d61057136600461446a565b6116a2565b610589610584366004614ae6565b6116ad565b6040516001600160401b0390911681526020016102c1565b6103a86117e0565b6103a86105b7366004614b1b565b6117f4565b6105896105ca366004614b5d565b61191a565b6000546001600160a01b031661037d565b6103a86105ee366004614be5565b611c96565b6102b7610601366004614c13565b611d6c565b610323610614366004614c93565b611ead565b6103a861062736600461464b565b611ed2565b6102b761063a366004614cb6565b61212a565b6102b761064d366004614cd8565b612394565b6103a8610660366004614d4a565b61255c565b6103a8610673366004614db5565b6126af565b6103a8610686366004614ded565b612849565b610323610699366004614cb6565b612912565b6103236106ac36600461464b565b60046020526000908152604090205460ff1681565b6103a86106cf366004614be5565b6129f1565b6103236106e2366004614e1b565b612a59565b6103a86106f5366004614e49565b612a87565b6102b761070836600461446a565b60016020526000908152604090205481565b6103a8610728366004614eb0565b612e2b565b6103a861073b36600461464b565b612ed8565b61032361074e36600461446a565b612f4e565b60006001600160a01b0383166107c45760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b60006107cf836116a2565b9050836001600160a01b0316816001600160a01b0316036107f45760019150506107fa565b60009150505b92915050565b60008181526001602052604090205460a081901c60c082901c610824838383613026565b90959094509092509050565b60006001600160e01b03198216631b05885b60e31b148061086157506001600160e01b03198216630a85bd0160e11b145b806107fa57506107fa8261305c565b60008061087c836116a2565b90506001600160a01b0381166108955750600092915050565b6000838152600360205260409020546001600160a01b03165b9392505050565b60006108c082610800565b50915050603f1960408216016108ec5760405163a2a7201360e01b8152600481018390526024016107bb565b6108f683836130ac565b505050565b600080808061090986610800565b925092509250846001600160a01b0316836001600160a01b0316148061093457506109348386612a59565b8061095857506001600160a01b03851661094d87610870565b6001600160a01b0316145b801561096b575061096982826131bc565b155b9695505050505050565b6005546040516303a24d0760e21b8152600481018390526060916001600160a01b031690630e89341c90602401600060405180830381865afa1580156109bf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107fa9190810190614f18565b816109f281336114c7565b610a1357803360405163168ab55d60e31b81526004016107bb929190614f8f565b8260106000610a2183610800565b5091505063ffffffff8282161615610a4f5760405163a2a7201360e01b8152600481018490526024016107bb565b604051630295720760e31b8152600481018790526001600160401b03861660248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906314ab9038906044015b600060405180830381600087803b158015610ac157600080fd5b505af1158015610ad5573d6000803e3d6000fd5b50505050505050505050565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b2c5760405163032634a760e31b815260040160405180910390fd5b6000808080610b3d86880188614fa6565b83516020850120939750919550935091508890808214610b7a576040516331970f3360e21b815260048101829052602481018390526044016107bb565b604051630a3b53db60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906328ed4f6c90610bc89085903090600401614f8f565b600060405180830381600087803b158015610be257600080fd5b505af1158015610bf6573d6000803e3d6000fd5b5050604051636b727d4360e11b8152600481018d9052600092506276a70091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d6e4fa8690602401602060405180830381865afa158015610c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8b919061500d565b610c95919061503c565b9050610ca887878761ffff1684886131ec565b50630a85bd0160e11b9c9b505050505050505050505050565b610cc96132fd565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b81610cf681336114c7565b610d1757803360405163168ab55d60e31b81526004016107bb929190614f8f565b8260086000610d2583610800565b5091505063ffffffff8282161615610d535760405163a2a7201360e01b8152600481018490526024016107bb565b604051630c4b7b8560e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631896f70a90610aa79089908990600401614f8f565b60066020526000908152604090208054610dba90615063565b80601f0160208091040260200160405190810160405280929190818152602001828054610de690615063565b8015610e335780601f10610e0857610100808354040283529160200191610e33565b820191906000526020600020905b815481529060010190602001808311610e1657829003601f168201915b505050505081565b600087610e4881336114c7565b610e6957803360405163168ab55d60e31b81526004016107bb929190614f8f565b87516020890120610e7a8a82613357565b9250610e868a84613383565b610e9083866134c1565b610e9b8a848b6134f4565b50610ea88a8487876135c1565b9350610eb383613607565b610f68576040516305ef2c7f60e41b8152600481018b9052602481018290523060448201526001600160a01b0388811660648301526001600160401b03881660848301527f00000000000000000000000000000000000000000000000000000000000000001690635ef2c7f09060a401600060405180830381600087803b158015610f3d57600080fd5b505af1158015610f51573d6000803e3d6000fd5b50505050610f638a848b8b89896136c0565b611014565b6040516305ef2c7f60e41b8152600481018b9052602481018290523060448201526001600160a01b0388811660648301526001600160401b03881660848301527f00000000000000000000000000000000000000000000000000000000000000001690635ef2c7f09060a401600060405180830381600087803b158015610fee57600080fd5b505af1158015611002573d6000803e3d6000fd5b505050506110148a848b8b89896136f7565b5050979650505050505050565b81518351146110835760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016107bb565b6001600160a01b0384166110a95760405162461bcd60e51b81526004016107bb9061509d565b6001600160a01b0385163314806110c557506110c58533612a59565b61112c5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016107bb565b60005b83518110156111ec57600084828151811061114c5761114c6150e2565b60200260200101519050600084838151811061116a5761116a6150e2565b60200260200101519050600080600061118285610800565b9250925092506111938583836137bb565b8360011480156111b457508a6001600160a01b0316836001600160a01b0316145b6111d05760405162461bcd60e51b81526004016107bb906150f8565b6111dc858b8484613864565b505050505080600101905061112f565b50836001600160a01b0316856001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161123c929190615142565b60405180910390a46112523386868686866138a6565b5050505050565b60006112658585613357565b905061127181846134c1565b6000808061127e84610800565b919450925090506001600160a01b038316158061132d57506040516302571be360e01b81526004810185905230906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906302571be390602401602060405180830381865afa1580156112fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113219190615170565b6001600160a01b031614155b1561134b57604051635374b59960e01b815260040160405180910390fd5b6000806113578a610800565b90935091508a90506113935761136d86336114c7565b61138e57853360405163168ab55d60e31b81526004016107bb929190614f8f565b6113be565b61139d8a336114c7565b6113be57893360405163168ab55d60e31b81526004016107bb929190614f8f565b6113c9868984613a01565b6113d4878483613a3c565b9650620100008416158015906113f857508363ffffffff1688851763ffffffff1614155b156114195760405163a2a7201360e01b8152600481018790526024016107bb565b96831796610ad586868a868b613a82565b60008261143781336114c7565b61145857803360405163168ab55d60e31b81526004016107bb929190614f8f565b836002600061146683610800565b5091505063ffffffff82821616156114945760405163a2a7201360e01b8152600481018490526024016107bb565b600080806114a18a610800565b9250925092506114ba8a84848c61ffff16178485613a82565b5098975050505050505050565b60008080806114d586610800565b925092509250846001600160a01b0316836001600160a01b0316148061095857506109588386612a59565b606081518351146115655760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016107bb565b600083516001600160401b0381111561158057611580614668565b6040519080825280602002602001820160405280156115a9578160200160208202803683370190505b50905060005b8451811015611619576115f48582815181106115cd576115cd6150e2565b60200260200101518583815181106115e7576115e76150e2565b6020026020010151610753565b828281518110611606576116066150e2565b60209081029190910101526001016115af565b509392505050565b6116296132fd565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af1158015611678573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169c919061518d565b50505050565b60006107fa82613b29565b6000806116ba8585613357565b90506116c581613607565b6116e257604051635374b59960e01b815260040160405180910390fd5b60006116ee86336108fb565b905080158015611705575061170382336114c7565b155b1561172757813360405163168ab55d60e31b81526004016107bb929190614f8f565b6000808061173485610800565b9250925092508315801561174b5750620400008216155b1561176c5760405163a2a7201360e01b8152600481018690526024016107bb565b60006117778a610800565b92505050611786888383613a3c565b97506117948685858b613b3f565b6040516001600160401b038916815286907ff675815a0817338f93a7da433f6bd5f5542f1029b11b455191ac96c7f6a9b1329060200160405180910390a2509598975050505050505050565b6117e86132fd565b6117f26000613b55565b565b61180c6000805160206156cd83398151915284613357565b61181681336114c7565b61183757803360405163168ab55d60e31b81526004016107bb929190614f8f565b306001600160a01b0384160361186b57604051632ca49b0d60e11b81526001600160a01b03841660048201526024016107bb565b61188c6118866000805160206156cd83398151915286613357565b83613ba5565b604051632142170760e11b81523060048201526001600160a01b038481166024830152604482018690527f000000000000000000000000000000000000000000000000000000000000000016906342842e0e90606401600060405180830381600087803b1580156118fc57600080fd5b505af1158015611910573d6000803e3d6000fd5b5050505050505050565b600080868660405161192d9291906151aa565b6040519081900381206331a9108f60e11b82526004820181905291506000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa15801561199d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c19190615170565b90506001600160a01b0381163314801590611a69575060405163e985e9c560e01b81526001600160a01b0382811660048301523360248301527f0000000000000000000000000000000000000000000000000000000000000000169063e985e9c590604401602060405180830381865afa158015611a43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a67919061518d565b155b15611aa257611a866000805160206156cd83398151915283613357565b3360405163168ab55d60e31b81526004016107bb929190614f8f565b6040516323b872dd60e01b81526001600160a01b038281166004830152306024830152604482018490527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90606401600060405180830381600087803b158015611b1257600080fd5b505af1158015611b26573d6000803e3d6000fd5b5050604051630a3b53db60e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692506328ed4f6c9150611b789085903090600401614f8f565b600060405180830381600087803b158015611b9257600080fd5b505af1158015611ba6573d6000803e3d6000fd5b5050604051636b727d4360e11b8152600481018590526276a70092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316915063d6e4fa8690602401602060405180830381865afa158015611c14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c38919061500d565b611c42919061503c565b9250611c8b88888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250505061ffff881686886131ec565b505095945050505050565b6001600160a01b0382163303611d005760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016107bb565b3360008181526002602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3360009081526004602052604081205460ff16611d9b5760405162461bcd60e51b81526004016107bb906151ba565b60008787604051611dad9291906151aa565b604051908190038120633f2891eb60e21b8252600482018190523060248301526044820187905291507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063fca247ac906064016020604051808303816000875af1158015611e29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4d919061500d565b9150611ea288888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250505061ffff8616611e9c6276a7008761503c565b886131ec565b509695505050505050565b600080611eb984610800565b50841663ffffffff908116908516149250505092915050565b611eda6132fd565b6007546001600160a01b031615611ffa5760075460405163a22cb46560e01b81526001600160a01b039182166004820152600060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a22cb46590604401600060405180830381600087803b158015611f5a57600080fd5b505af1158015611f6e573d6000803e3d6000fd5b505060075460405163a22cb46560e01b81526001600160a01b039182166004820152600060248201527f0000000000000000000000000000000000000000000000000000000000000000909116925063a22cb4659150604401600060405180830381600087803b158015611fe157600080fd5b505af1158015611ff5573d6000803e3d6000fd5b505050505b600780546001600160a01b0319166001600160a01b038316908117909155156121275760075460405163a22cb46560e01b81526001600160a01b039182166004820152600160248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a22cb46590604401600060405180830381600087803b15801561208c57600080fd5b505af11580156120a0573d6000803e3d6000fd5b505060075460405163a22cb46560e01b81526001600160a01b039182166004820152600160248201527f0000000000000000000000000000000000000000000000000000000000000000909116925063a22cb4659150604401600060405180830381600087803b15801561211357600080fd5b505af1158015611252573d6000803e3d6000fd5b50565b3360009081526004602052604081205460ff166121595760405162461bcd60e51b81526004016107bb906151ba565b60006121736000805160206156cd83398151915285613357565b60405163c475abff60e01b815260048101869052602481018590529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c475abff906044016020604051808303816000875af11580156121e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061220b919061500d565b6040516331a9108f60e11b8152600481018790529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa92505050801561228f575060408051601f3d908101601f1916820190925261228c91810190615170565b60015b61229c5791506107fa9050565b6001600160a01b0381163014158061234657506040516302571be360e01b81526004810184905230906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906302571be390602401602060405180830381865afa158015612316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061233a9190615170565b6001600160a01b031614155b15612355575091506107fa9050565b5060006123656276a7008361503c565b60008481526001602052604090205490915060a081901c61238885838386613b3f565b50919695505050505050565b6000866123a181336114c7565b6123c257803360405163168ab55d60e31b81526004016107bb929190614f8f565b600087876040516123d49291906151aa565b604051809103902090506123e88982613357565b92506123f48984613383565b6123fe83866134c1565b60006124418a858b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506134f492505050565b905061244f8a8588886135c1565b945061245a84613607565b612509576040516306ab592360e01b8152600481018b9052602481018390523060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906306ab5923906064016020604051808303816000875af11580156124d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f6919061500d565b506125048482898989613c95565b61254f565b61254f8a858b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d92508c91508b90506136f7565b5050509695505050505050565b60006125a2600086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293925050613cd79050565b6007549091506001600160a01b03166125ce5760405163093075b560e21b815260040160405180910390fd5b6125d881336114c7565b6125f957803360405163168ab55d60e31b81526004016107bb929190614f8f565b6000808061260684610800565b91945092509050600061261885610870565b905061262385613d96565b600760009054906101000a90046001600160a01b03166001600160a01b0316639198c2768a8a878787878e8e6040518963ffffffff1660e01b815260040161267298979695949392919061522b565b600060405180830381600087803b15801561268c57600080fd5b505af11580156126a0573d6000803e3d6000fd5b50505050505050505050505050565b836126ba81336114c7565b6126db57803360405163168ab55d60e31b81526004016107bb929190614f8f565b84601c60006126e983610800565b5091505063ffffffff82821616156127175760405163a2a7201360e01b8152600481018490526024016107bb565b60405163cf40882360e01b8152600481018990523060248201526001600160a01b0387811660448301526001600160401b03871660648301527f0000000000000000000000000000000000000000000000000000000000000000169063cf40882390608401600060405180830381600087803b15801561279657600080fd5b505af11580156127aa573d6000803e3d6000fd5b5050506001600160a01b03881690506128115760006127c889610800565b509150506201ffff196202000082160161280057604051632ca49b0d60e11b81526001600160a01b03891660048201526024016107bb565b61280b896000613ba5565b50611910565b600061281c896116a2565b905061283e81898b60001c600160405180602001604052806000815250613e36565b505050505050505050565b6128538383613357565b61285d81336114c7565b61287e57803360405163168ab55d60e31b81526004016107bb929190614f8f565b7f6c32148f748aba23997146d7fe89e962e3cc30271290fb96f5f4337756c03b5284016128be5760405163615a470360e01b815260040160405180910390fd5b6001600160a01b03821615806128dc57506001600160a01b03821630145b1561290557604051632ca49b0d60e11b81526001600160a01b03831660048201526024016107bb565b61169c6118868585613357565b60008061291f8484613357565b9050600061292c82613607565b90506000805160206156cd833981519152851461294c5791506107fa9050565b6040516331a9108f60e11b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa9250505080156129cd575060408051601f3d908101601f191682019092526129ca91810190615170565b60015b6129dc576000925050506107fa565b6001600160a01b0316301492506107fa915050565b6129f96132fd565b6001600160a01b038216600081815260046020908152604091829020805460ff191685151590811790915591519182527f4c97694570a07277810af7e5669ffd5f6a2d6b74b6e9a274b8b870fd5114cf8791015b60405180910390a25050565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b600080612ace600087878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293925050613f189050565b915091506000612b178288888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293925050613cd79050565b90506000612b258285613357565b6000818152600660205260409020909150612b41888a836152db565b507f6c32148f748aba23997146d7fe89e962e3cc30271290fb96f5f4337756c03b528201612b825760405163615a470360e01b815260040160405180910390fd5b6040516302571be360e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906302571be390602401602060405180830381865afa158015612bea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c0e9190615170565b90506001600160a01b0381163314801590612cb6575060405163e985e9c560e01b81526001600160a01b0382811660048301523360248301527f0000000000000000000000000000000000000000000000000000000000000000169063e985e9c590604401602060405180830381865afa158015612c90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cb4919061518d565b155b15612cd857813360405163168ab55d60e31b81526004016107bb929190614f8f565b6001600160a01b03861615612d6857604051630c4b7b8560e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631896f70a90612d359085908a90600401614f8f565b600060405180830381600087803b158015612d4f57600080fd5b505af1158015612d63573d6000803e3d6000fd5b505050505b604051635b0fc9c360e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635b0fc9c390612db69085903090600401614f8f565b600060405180830381600087803b158015612dd057600080fd5b505af1158015612de4573d6000803e3d6000fd5b5050505061283e828a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052508d93509150819050613c95565b6001600160a01b038416612e515760405162461bcd60e51b81526004016107bb9061509d565b6001600160a01b038516331480612e6d5750612e6d8533612a59565b612ecb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107bb565b6112528585858585613e36565b612ee06132fd565b6001600160a01b038116612f455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107bb565b61212781613b55565b60008181526006602052604081208054829190612f6a90615063565b80601f0160208091040260200160405190810160405280929190818152602001828054612f9690615063565b8015612fe35780601f10612fb857610100808354040283529160200191612fe3565b820191906000526020600020905b815481529060010190602001808311612fc657829003601f168201915b505050505090508051600003612ffc5750600092915050565b6000806130098382613f18565b9092509050600061301a8483613cd7565b905061096b8184612912565b60008042836001600160401b031610156130535761ffff196201000085160161304e57600094505b600093505b50929391925050565b60006001600160e01b03198216636cdb3d1360e11b148061308d57506001600160e01b031982166303a24d0760e21b145b806107fa57506301ffc9a760e01b6001600160e01b03198316146107fa565b60006130b7826116a2565b9050806001600160a01b0316836001600160a01b0316036131245760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107bb565b336001600160a01b038216148061314057506131408133612a59565b6131b25760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016107bb565b6108f68383613fcf565b6000620200008381161480156108ae5750426131db6276a7008461539a565b6001600160401b0316109392505050565b84516020860120600061320d6000805160206156cd83398151915283613357565b9050600061323688604051806040016040528060058152602001626cae8d60e31b81525061403d565b600083815260066020526040902090915061325182826153ba565b50613264828289620300008a1789613c95565b6001600160a01b0384161561191057604051630c4b7b8560e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631896f70a906132c19085908890600401614f8f565b600060405180830381600087803b1580156132db57600080fd5b505af11580156132ef573d6000803e3d6000fd5b505050505050505050505050565b6000546001600160a01b031633146117f25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107bb565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6000808061339084610800565b91945092509050426001600160401b0382161080801561345357506001600160a01b038416158061345357506040516302571be360e01b8152600481018690526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906302571be390602401602060405180830381865afa158015613424573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134489190615170565b6001600160a01b0316145b1561349257600061346387610800565b50915050602081161561348c5760405163a2a7201360e01b8152600481018790526024016107bb565b506134b9565b620100008316156134b95760405163a2a7201360e01b8152600481018690526024016107bb565b505050505050565b63fffdffff81811763ffffffff16146134f05760405163a2a7201360e01b8152600481018390526024016107bb565b5050565b6060600061359d8360066000888152602001908152602001600020805461351a90615063565b80601f016020809104026020016040519081016040528092919081815260200182805461354690615063565b80156135935780601f1061356857610100808354040283529160200191613593565b820191906000526020600020905b81548152906001019060200180831161357657829003601f168201915b505050505061403d565b60008581526006602052604090209091506135b882826153ba565b50949350505050565b6000806135cd85610800565b925050506000806135e08860001c610800565b92509250506135f0878784613a01565b6135fb858483613a3c565b98975050505050505050565b600080613613836116a2565b6001600160a01b0316141580156107fa57506040516302571be360e01b81526004810183905230906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906302571be390602401602060405180830381865afa15801561368c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136b09190615170565b6001600160a01b03161492915050565b600086815260066020526040812080546136df91879161351a90615063565b90506136ee8682868686613c95565b50505050505050565b6000808061370488610800565b925092509250600061372e88600660008d8152602001908152602001600020805461351a90615063565b60008a815260066020526040902080549192509061374b90615063565b905060000361376e57600089815260066020526040902061376c82826153ba565b505b61377d89858886178589613a82565b6001600160a01b03871661379b57613796896000613ba5565b610ad5565b610ad584888b60001c600160405180602001604052806000815250613e36565b6201ffff19620200008316016137db576137d86276a7008261539a565b90505b42816001600160401b03161015613814576201000082161561380f5760405162461bcd60e51b81526004016107bb906150f8565b613839565b60048216156138395760405163a2a7201360e01b8152600481018490526024016107bb565b604082166000036108f6575050600090815260036020526040902080546001600160a01b0319169055565b60c0816001600160401b0316901b60a08363ffffffff16901b846001600160a01b03161717600160008681526020019081526020016000208190555050505050565b6001600160a01b0384163b156134b95760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906138ea9089908990889088908890600401615479565b6020604051808303816000875af1925050508015613925575060408051601f3d908101601f19168201909252613922918101906154cb565b60015b6139d1576139316154e8565b806308c379a00361396a5750613945615504565b80613950575061396c565b8060405162461bcd60e51b81526004016107bb9190614506565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016107bb565b6001600160e01b0319811663bc197c8160e01b146136ee5760405162461bcd60e51b81526004016107bb9061558d565b63ffff00008216158015906001831615908290613a1b5750805b156112525760405163a2a7201360e01b8152600481018690526024016107bb565b6000816001600160401b0316846001600160401b03161115613a5c578193505b826001600160401b0316846001600160401b03161015613a7a578293505b509192915050565b613a8e85858584613b3f565b60405163ffffffff8416815285907f39873f00c80f4f94b7bd1594aebcf650f003545b74824d57ddf4939e3ff3a34b9060200160405180910390a2816001600160401b0316816001600160401b03161115611252576040516001600160401b038216815285907ff675815a0817338f93a7da433f6bd5f5542f1029b11b455191ac96c7f6a9b132906020015b60405180910390a25050505050565b600080613b3583610800565b5090949350505050565b613b4984836140b4565b61169c84848484613864565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b613bb0826001611ead565b15613bd15760405163a2a7201360e01b8152600481018390526024016107bb565b613bda82613d96565b604051635b0fc9c360e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635b0fc9c390613c289085908590600401614f8f565b600060405180830381600087803b158015613c4257600080fd5b505af1158015613c56573d6000803e3d6000fd5b50506040516001600160a01b03841681528492507fee2ba1195c65bcf218a83d874335c6bf9d9067b4c672f3c3bf16cf40de7586c49150602001612a4d565b613ca1858484846140ed565b847f8ce7013e8abebc55c3890a68f5a27c67c3f7efa64e584de5fb22363c606fd34085858585604051613b1a94939291906155d5565b6000806000613ce68585613f18565b909250905081613d585760018551613cfe919061561c565b8414613d4c5760405162461bcd60e51b815260206004820152601d60248201527f6e616d65686173683a204a756e6b20617420656e64206f66206e616d6500000060448201526064016107bb565b50600091506107fa9050565b613d628582613cd7565b6040805160208101929092528101839052606001604051602081830303815290604052805190602001209250505092915050565b60008181526001602052604090205460a081901c60c082901c613dba838383613026565b600086815260036020526040812080546001600160a01b0319169055909350613de7915085908484613864565b60408051858152600160208201526000916001600160a01b0386169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a450505050565b6000806000613e4486610800565b925092509250613e558683836137bb565b846001148015613e765750876001600160a01b0316836001600160a01b0316145b613e925760405162461bcd60e51b81526004016107bb906150f8565b866001600160a01b0316836001600160a01b031603613eb357505050611252565b613ebf86888484613864565b60408051878152602081018790526001600160a01b03808a1692908b169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611910338989898989614161565b60008083518310613f6b5760405162461bcd60e51b815260206004820152601e60248201527f726561644c6162656c3a20496e646578206f7574206f6620626f756e6473000060448201526064016107bb565b6000848481518110613f7f57613f7f6150e2565b016020015160f81c90508015613fab57613fa485613f9e86600161562f565b8361421c565b9250613fb0565b600092505b613fba818561562f565b613fc590600161562f565b9150509250929050565b600081815260036020526040902080546001600160a01b0319166001600160a01b0384169081179091558190614004826116a2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b606060018351101561406257604051631406d65b60e11b815260040160405180910390fd5b60ff83511115614087578260405163e3ba295f60e01b81526004016107bb9190614506565b8251838360405160200161409d93929190615642565b604051602081830303815290604052905092915050565b61ffff8116158015906140cc57506201000181811614155b156134f05760405163a2a7201360e01b8152600481018390526024016107bb565b6140f784836140b4565b6000848152600160205260409020546001600160a01b038116156141555761411e85613d96565b6040516000815285907fee2ba1195c65bcf218a83d874335c6bf9d9067b4c672f3c3bf16cf40de7586c49060200160405180910390a25b61125285858585614240565b6001600160a01b0384163b156134b95760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906141a59089908990889088908890600401615687565b6020604051808303816000875af19250505080156141e0575060408051601f3d908101601f191682019092526141dd918101906154cb565b60015b6141ec576139316154e8565b6001600160e01b0319811663f23a6e6160e01b146136ee5760405162461bcd60e51b81526004016107bb9061558d565b825160009061422b838561562f565b111561423657600080fd5b5091016020012090565b836000808061424e84610800565b9194509250905063ffff000082166001600160401b038087169083161115614274578195505b42826001600160401b03161061428957958617955b6001600160a01b038416156142e05760405162461bcd60e51b815260206004820152601f60248201527f455243313135353a206d696e74206f66206578697374696e6720746f6b656e0060448201526064016107bb565b6001600160a01b0388166143405760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016107bb565b306001600160a01b038916036143b55760405162461bcd60e51b815260206004820152603460248201527f455243313135353a206e65774f776e65722063616e6e6f74206265207468652060448201527313985b5955dc985c1c195c8818dbdb9d1c9858dd60621b60648201526084016107bb565b6143c185898989613864565b60408051868152600160208201526001600160a01b038a169160009133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461283e3360008a88600160405180602001604052806000815250614161565b6001600160a01b038116811461212757600080fd5b6000806040838503121561445157600080fd5b823561445c81614429565b946020939093013593505050565b60006020828403121561447c57600080fd5b5035919050565b6001600160e01b03198116811461212757600080fd5b6000602082840312156144ab57600080fd5b81356108ae81614483565b60005b838110156144d15781810151838201526020016144b9565b50506000910152565b600081518084526144f28160208601602086016144b6565b601f01601f19169290920160200192915050565b6020815260006108ae60208301846144da565b6000806040838503121561452c57600080fd5b82359150602083013561453e81614429565b809150509250929050565b80356001600160401b038116811461456057600080fd5b919050565b6000806040838503121561457857600080fd5b8235915061458860208401614549565b90509250929050565b60008083601f8401126145a357600080fd5b5081356001600160401b038111156145ba57600080fd5b6020830191508360208285010111156145d257600080fd5b9250929050565b6000806000806000608086880312156145f157600080fd5b85356145fc81614429565b9450602086013561460c81614429565b93506040860135925060608601356001600160401b0381111561462e57600080fd5b61463a88828901614591565b969995985093965092949392505050565b60006020828403121561465d57600080fd5b81356108ae81614429565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156146a3576146a3614668565b6040525050565b60006001600160401b038211156146c3576146c3614668565b50601f01601f191660200190565b600082601f8301126146e257600080fd5b81356146ed816146aa565b6040516146fa828261467e565b82815285602084870101111561470f57600080fd5b82602086016020830137600092810160200192909252509392505050565b803563ffffffff8116811461456057600080fd5b600080600080600080600060e0888a03121561475c57600080fd5b8735965060208801356001600160401b0381111561477957600080fd5b6147858a828b016146d1565b965050604088013561479681614429565b945060608801356147a681614429565b93506147b460808901614549565b92506147c260a0890161472d565b91506147d060c08901614549565b905092959891949750929550565b60006001600160401b038211156147f7576147f7614668565b5060051b60200190565b600082601f83011261481257600080fd5b8135602061481f826147de565b60405161482c828261467e565b80915083815260208101915060208460051b87010193508684111561485057600080fd5b602086015b84811015611ea25780358352918301918301614855565b600080600080600060a0868803121561488457600080fd5b853561488f81614429565b9450602086013561489f81614429565b935060408601356001600160401b03808211156148bb57600080fd5b6148c789838a01614801565b945060608801359150808211156148dd57600080fd5b6148e989838a01614801565b935060808801359150808211156148ff57600080fd5b5061490c888289016146d1565b9150509295509295909350565b6000806000806080858703121561492f57600080fd5b84359350602085013592506149466040860161472d565b915061495460608601614549565b905092959194509250565b803561ffff8116811461456057600080fd5b6000806040838503121561498457600080fd5b823591506145886020840161495f565b600080604083850312156149a757600080fd5b82356001600160401b03808211156149be57600080fd5b818501915085601f8301126149d257600080fd5b813560206149df826147de565b6040516149ec828261467e565b83815260059390931b8501820192828101915089841115614a0c57600080fd5b948201945b83861015614a33578535614a2481614429565b82529482019490820190614a11565b96505086013592505080821115614a4957600080fd5b50613fc585828601614801565b60008151808452602080850194506020840160005b83811015614a8757815187529582019590820190600101614a6b565b509495945050505050565b6020815260006108ae6020830184614a56565b600080600060608486031215614aba57600080fd5b8335614ac581614429565b92506020840135614ad581614429565b929592945050506040919091013590565b600080600060608486031215614afb57600080fd5b8335925060208401359150614b1260408501614549565b90509250925092565b600080600060608486031215614b3057600080fd5b833592506020840135614b4281614429565b91506040840135614b5281614429565b809150509250925092565b600080600080600060808688031215614b7557600080fd5b85356001600160401b03811115614b8b57600080fd5b614b9788828901614591565b9096509450506020860135614bab81614429565b9250614bb96040870161495f565b91506060860135614bc981614429565b809150509295509295909350565b801515811461212757600080fd5b60008060408385031215614bf857600080fd5b8235614c0381614429565b9150602083013561453e81614bd7565b60008060008060008060a08789031215614c2c57600080fd5b86356001600160401b03811115614c4257600080fd5b614c4e89828a01614591565b9097509550506020870135614c6281614429565b9350604087013592506060870135614c7981614429565b9150614c876080880161495f565b90509295509295509295565b60008060408385031215614ca657600080fd5b823591506145886020840161472d565b60008060408385031215614cc957600080fd5b50508035926020909101359150565b60008060008060008060a08789031215614cf157600080fd5b8635955060208701356001600160401b03811115614d0e57600080fd5b614d1a89828a01614591565b9096509450506040870135614d2e81614429565b9250614d3c6060880161472d565b9150614c8760808801614549565b60008060008060408587031215614d6057600080fd5b84356001600160401b0380821115614d7757600080fd5b614d8388838901614591565b90965094506020870135915080821115614d9c57600080fd5b50614da987828801614591565b95989497509550505050565b60008060008060808587031215614dcb57600080fd5b843593506020850135614ddd81614429565b9250604085013561494681614429565b600080600060608486031215614e0257600080fd5b83359250602084013591506040840135614b5281614429565b60008060408385031215614e2e57600080fd5b8235614e3981614429565b9150602083013561453e81614429565b60008060008060608587031215614e5f57600080fd5b84356001600160401b03811115614e7557600080fd5b614e8187828801614591565b9095509350506020850135614e9581614429565b91506040850135614ea581614429565b939692955090935050565b600080600080600060a08688031215614ec857600080fd5b8535614ed381614429565b94506020860135614ee381614429565b9350604086013592506060860135915060808601356001600160401b03811115614f0c57600080fd5b61490c888289016146d1565b600060208284031215614f2a57600080fd5b81516001600160401b03811115614f4057600080fd5b8201601f81018413614f5157600080fd5b8051614f5c816146aa565b604051614f69828261467e565b828152866020848601011115614f7e57600080fd5b61096b8360208301602087016144b6565b9182526001600160a01b0316602082015260400190565b60008060008060808587031215614fbc57600080fd5b84356001600160401b03811115614fd257600080fd5b614fde878288016146d1565b9450506020850135614fef81614429565b9250614ffd6040860161495f565b91506060850135614ea581614429565b60006020828403121561501f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6001600160401b0381811683821601908082111561505c5761505c615026565b5092915050565b600181811c9082168061507757607f821691505b60208210810361509757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006151556040830185614a56565b82810360208401526151678185614a56565b95945050505050565b60006020828403121561518257600080fd5b81516108ae81614429565b60006020828403121561519f57600080fd5b81516108ae81614bd7565b8183823760009101908152919050565b60208082526028908201527f436f6e74726f6c6c61626c653a2043616c6c6572206973206e6f74206120636f604082015267373a3937b63632b960c11b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60c08152600061523f60c083018a8c615202565b6001600160a01b03898116602085015263ffffffff891660408501526001600160401b03881660608501528616608084015282810360a0840152615284818587615202565b9b9a5050505050505050505050565b601f8211156108f6576000816000526020600020601f850160051c810160208610156152bc5750805b601f850160051c820191505b818110156134b9578281556001016152c8565b6001600160401b038311156152f2576152f2614668565b615306836153008354615063565b83615293565b6000601f84116001811461533a57600085156153225750838201355b600019600387901b1c1916600186901b178355611252565b600083815260209020601f19861690835b8281101561536b578685013582556020948501946001909201910161534b565b50868210156153885760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6001600160401b0382811682821603908082111561505c5761505c615026565b81516001600160401b038111156153d3576153d3614668565b6153e7816153e18454615063565b84615293565b602080601f83116001811461541c57600084156154045750858301515b600019600386901b1c1916600185901b1785556134b9565b600085815260208120601f198616915b8281101561544b5788860151825594840194600190910190840161542c565b50858210156154695787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0386811682528516602082015260a0604082018190526000906154a590830186614a56565b82810360608401526154b78186614a56565b905082810360808401526135fb81856144da565b6000602082840312156154dd57600080fd5b81516108ae81614483565b600060033d11156155015760046000803e5060005160e01c5b90565b600060443d10156155125790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561554157505050505090565b82850191508151818111156155595750505050505090565b843d87010160208285010111156155735750505050505090565b6155826020828601018761467e565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6080815260006155e860808301876144da565b6001600160a01b039590951660208301525063ffffffff9290921660408301526001600160401b0316606090910152919050565b818103818111156107fa576107fa615026565b808201808211156107fa576107fa615026565b60ff60f81b8460f81b168152600083516156638160018501602088016144b6565b83519083019061567a8160018401602088016144b6565b0160010195945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906156c1908301846144da565b97965050505050505056fe93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4aea26469706673582212209b25a259ef8986d46a1bfe17671970399728db343863f016912d8beb240746b064736f6c63430008170033",BS=t=>t.length>1;class na extends i2{constructor(...e){BS(e)?super(...e):super(Go,Xd,e[0])}deploy(e,r,n,i){return super.deploy(e,r,n,i||{})}getDeployTransaction(e,r,n,i){return super.getDeployTransaction(e,r,n,i||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static createInterface(){return new Xr(Go)}static connect(e,r){return new Dn(e,Go,r)}}i1(na,"bytecode",Xd),i1(na,"abi",Go);var ul={exports:{}},P6={},ob={exports:{}},LS="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",FS=LS,jS=FS;function sb(){}function ub(){}ub.resetWarningCache=sb;var DS=function(){function t(n,i,a,o,s,u){if(u!==jS){var f=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 f.name="Invariant Violation",f}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:ub,resetWarningCache:sb};return r.PropTypes=r,r};ob.exports=DS();var lb=ob.exports,ll={exports:{}},Y1={},fl={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;/*! - * Adapted from jQuery UI core - * - * http://jqueryui.com - * - * Copyright 2014 jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/category/ui-core/ - */var r="none",n="contents",i=/input|select|textarea|button|object|iframe/;function a(y,v){return v.getPropertyValue("overflow")!=="visible"||y.scrollWidth<=0&&y.scrollHeight<=0}function o(y){var v=y.offsetWidth<=0&&y.offsetHeight<=0;if(v&&!y.innerHTML)return!0;try{var E=window.getComputedStyle(y),P=E.getPropertyValue("display");return v?P!==n&&a(y,E):P===r}catch{return console.warn("Failed to inspect element style"),!1}}function s(y){for(var v=y,E=y.getRootNode&&y.getRootNode();v&&v!==document.body;){if(E&&v===E&&(v=E.host.parentNode),o(v))return!1;v=v.parentNode}return!0}function u(y,v){var E=y.nodeName.toLowerCase(),P=i.test(E)&&!y.disabled||E==="a"&&y.href||v;return P&&s(y)}function f(y){var v=y.getAttribute("tabindex");v===null&&(v=void 0);var E=isNaN(v);return(E||v>=0)&&u(y,!E)}function d(y){var v=[].slice.call(y.querySelectorAll("*"),0).reduce(function(E,P){return E.concat(P.shadowRoot?d(P.shadowRoot):[P])},[]);return v.filter(f)}t.exports=e.default})(fl,fl.exports);var fb=fl.exports;Object.defineProperty(Y1,"__esModule",{value:!0});Y1.resetState=HS;Y1.log=KS;Y1.handleBlur=Ba;Y1.handleFocus=La;Y1.markForFocusLater=GS;Y1.returnFocus=VS;Y1.popWithoutFocus=WS;Y1.setupScopedFocus=QS;Y1.teardownScopedFocus=JS;var zS=fb,$S=qS(zS);function qS(t){return t&&t.__esModule?t:{default:t}}var Vi=[],xi=null,cl=!1;function HS(){Vi=[]}function KS(){}function Ba(){cl=!0}function La(){if(cl){if(cl=!1,!xi)return;setTimeout(function(){if(!xi.contains(document.activeElement)){var t=(0,$S.default)(xi)[0]||xi;t.focus()}},0)}}function GS(){Vi.push(document.activeElement)}function VS(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=null;try{Vi.length!==0&&(e=Vi.pop(),e.focus({preventScroll:t}));return}catch{console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}}function WS(){Vi.length>0&&Vi.pop()}function QS(t){xi=t,window.addEventListener?(window.addEventListener("blur",Ba,!1),document.addEventListener("focus",La,!0)):(window.attachEvent("onBlur",Ba),document.attachEvent("onFocus",La))}function JS(){xi=null,window.addEventListener?(window.removeEventListener("blur",Ba),document.removeEventListener("focus",La)):(window.detachEvent("onBlur",Ba),document.detachEvent("onFocus",La))}var dl={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=fb,n=i(r);function i(s){return s&&s.__esModule?s:{default:s}}function a(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;return s.activeElement.shadowRoot?a(s.activeElement.shadowRoot):s.activeElement}function o(s,u){var f=(0,n.default)(s);if(!f.length){u.preventDefault();return}var d=void 0,y=u.shiftKey,v=f[0],E=f[f.length-1],P=a();if(s===P){if(!y)return;d=E}if(E===P&&!y&&(d=v),v===P&&y&&(d=E),d){u.preventDefault(),d.focus();return}var R=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),O=R!=null&&R[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(O){var C=f.indexOf(P);if(C>-1&&(C+=y?-1:1),d=f[C],typeof d>"u"){u.preventDefault(),d=y?E:v,d.focus();return}u.preventDefault(),d.focus()}}t.exports=e.default})(dl,dl.exports);var YS=dl.exports,X1={},XS=function(){},ZS=XS,W1={},cb={exports:{}};/*! - Copyright (c) 2015 Jed Watson. - Based on code that is Copyright 2013-2015, Facebook, Inc. - All rights reserved. -*/(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})()})(cb);var eT=cb.exports;Object.defineProperty(W1,"__esModule",{value:!0});W1.canUseDOM=W1.SafeNodeList=W1.SafeHTMLCollection=void 0;var tT=eT,rT=nT(tT);function nT(t){return t&&t.__esModule?t:{default:t}}var q5=rT.default,iT=q5.canUseDOM?window.HTMLElement:{};W1.SafeHTMLCollection=q5.canUseDOM?window.HTMLCollection:{};W1.SafeNodeList=q5.canUseDOM?window.NodeList:{};W1.canUseDOM=q5.canUseDOM;W1.default=iT;Object.defineProperty(X1,"__esModule",{value:!0});X1.resetState=lT;X1.log=fT;X1.assertNodeList=db;X1.setElement=cT;X1.validateElement=Kf;X1.hide=dT;X1.show=hT;X1.documentNotReadyOrSSRTesting=pT;var aT=ZS,oT=uT(aT),sT=W1;function uT(t){return t&&t.__esModule?t:{default:t}}var A1=null;function lT(){A1&&(A1.removeAttribute?A1.removeAttribute("aria-hidden"):A1.length!=null?A1.forEach(function(t){return t.removeAttribute("aria-hidden")}):document.querySelectorAll(A1).forEach(function(t){return t.removeAttribute("aria-hidden")})),A1=null}function fT(){}function db(t,e){if(!t||!t.length)throw new Error("react-modal: No elements were found for selector "+e+".")}function cT(t){var e=t;if(typeof e=="string"&&sT.canUseDOM){var r=document.querySelectorAll(e);db(r,e),e=r}return A1=e||A1,A1}function Kf(t){var e=t||A1;return e?Array.isArray(e)||e instanceof HTMLCollection||e instanceof NodeList?e:[e]:((0,oT.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function dT(t){var e=!0,r=!1,n=void 0;try{for(var i=Kf(t)[Symbol.iterator](),a;!(e=(a=i.next()).done);e=!0){var o=a.value;o.setAttribute("aria-hidden","true")}}catch(s){r=!0,n=s}finally{try{!e&&i.return&&i.return()}finally{if(r)throw n}}}function hT(t){var e=!0,r=!1,n=void 0;try{for(var i=Kf(t)[Symbol.iterator](),a;!(e=(a=i.next()).done);e=!0){var o=a.value;o.removeAttribute("aria-hidden")}}catch(s){r=!0,n=s}finally{try{!e&&i.return&&i.return()}finally{if(r)throw n}}}function pT(){A1=null}var a2={};Object.defineProperty(a2,"__esModule",{value:!0});a2.resetState=bT;a2.log=mT;var ia={},aa={};function Zd(t,e){t.classList.remove(e)}function bT(){var t=document.getElementsByTagName("html")[0];for(var e in ia)Zd(t,ia[e]);var r=document.body;for(var n in aa)Zd(r,aa[n]);ia={},aa={}}function mT(){}var yT=function(e,r){return e[r]||(e[r]=0),e[r]+=1,r},gT=function(e,r){return e[r]&&(e[r]-=1),r},xT=function(e,r,n){n.forEach(function(i){yT(r,i),e.add(i)})},vT=function(e,r,n){n.forEach(function(i){gT(r,i),r[i]===0&&e.remove(i)})};a2.add=function(e,r){return xT(e.classList,e.nodeName.toLowerCase()=="html"?ia:aa,r.split(" "))};a2.remove=function(e,r){return vT(e.classList,e.nodeName.toLowerCase()=="html"?ia:aa,r.split(" "))};var o2={};Object.defineProperty(o2,"__esModule",{value:!0});o2.log=AT;o2.resetState=ET;function wT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var hb=function t(){var e=this;wT(this,t),this.register=function(r){e.openInstances.indexOf(r)===-1&&(e.openInstances.push(r),e.emit("register"))},this.deregister=function(r){var n=e.openInstances.indexOf(r);n!==-1&&(e.openInstances.splice(n,1),e.emit("deregister"))},this.subscribe=function(r){e.subscribers.push(r)},this.emit=function(r){e.subscribers.forEach(function(n){return n(r,e.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},t5=new hb;function AT(){console.log("portalOpenInstances ----------"),console.log(t5.openInstances.length),t5.openInstances.forEach(function(t){return console.log(t)}),console.log("end portalOpenInstances ----------")}function ET(){t5=new hb}o2.default=t5;var Gf={};Object.defineProperty(Gf,"__esModule",{value:!0});Gf.resetState=TT;Gf.log=CT;var _T=o2,kT=ST(_T);function ST(t){return t&&t.__esModule?t:{default:t}}var Mt=void 0,j1=void 0,g6=[];function TT(){for(var t=[Mt,j1],e=0;e0?(document.body.firstChild!==Mt&&document.body.insertBefore(Mt,document.body.firstChild),document.body.lastChild!==j1&&document.body.appendChild(j1)):(Mt.parentElement&&Mt.parentElement.removeChild(Mt),j1.parentElement&&j1.parentElement.removeChild(j1))}kT.default.subscribe(PT);(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(c){for(var x=1;x0&&(X-=1,X===0&&E.show(F)),k.props.shouldFocusAfterRender&&(k.props.shouldReturnFocusAfterClose?(f.returnFocus(k.props.preventScroll),f.teardownScopedFocus()):f.popWithoutFocus()),k.props.onAfterClose&&k.props.onAfterClose(),M.default.deregister(k)},k.open=function(){k.beforeOpen(),k.state.afterOpen&&k.state.beforeClose?(clearTimeout(k.closeTimer),k.setState({beforeClose:!1})):(k.props.shouldFocusAfterRender&&(f.setupScopedFocus(k.node),f.markForFocusLater()),k.setState({isOpen:!0},function(){k.openAnimationFrame=requestAnimationFrame(function(){k.setState({afterOpen:!0}),k.props.isOpen&&k.props.onAfterOpen&&k.props.onAfterOpen({overlayEl:k.overlay,contentEl:k.content})})}))},k.close=function(){k.props.closeTimeoutMS>0?k.closeWithTimeout():k.closeWithoutTimeout()},k.focusContent=function(){return k.content&&!k.contentHasFocus()&&k.content.focus({preventScroll:!0})},k.closeWithTimeout=function(){var T=Date.now()+k.props.closeTimeoutMS;k.setState({beforeClose:!0,closesAt:T},function(){k.closeTimer=setTimeout(k.closeWithoutTimeout,k.state.closesAt-Date.now())})},k.closeWithoutTimeout=function(){k.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},k.afterClose)},k.handleKeyDown=function(T){se(T)&&(0,y.default)(k.content,T),k.props.shouldCloseOnEsc&&N(T)&&(T.stopPropagation(),k.requestClose(T))},k.handleOverlayOnClick=function(T){k.shouldClose===null&&(k.shouldClose=!0),k.shouldClose&&k.props.shouldCloseOnOverlayClick&&(k.ownerHandlesClose()?k.requestClose(T):k.focusContent()),k.shouldClose=null},k.handleContentOnMouseUp=function(){k.shouldClose=!1},k.handleOverlayOnMouseDown=function(T){!k.props.shouldCloseOnOverlayClick&&T.target==k.overlay&&T.preventDefault()},k.handleContentOnClick=function(){k.shouldClose=!1},k.handleContentOnMouseDown=function(){k.shouldClose=!1},k.requestClose=function(T){return k.ownerHandlesClose()&&k.props.onRequestClose(T)},k.ownerHandlesClose=function(){return k.props.onRequestClose},k.shouldBeClosed=function(){return!k.state.isOpen&&!k.state.beforeClose},k.contentHasFocus=function(){return document.activeElement===k.content||k.content.contains(document.activeElement)},k.buildClassName=function(T,F){var q=(typeof F>"u"?"undefined":n(F))==="object"?F:{base:ae[T],afterOpen:ae[T]+"--after-open",beforeClose:ae[T]+"--before-close"},b=q.base;return k.state.afterOpen&&(b=b+" "+q.afterOpen),k.state.beforeClose&&(b=b+" "+q.beforeClose),typeof F=="string"&&F?b+" "+F:b},k.attributesFromObject=function(T,F){return Object.keys(F).reduce(function(q,b){return q[T+"-"+b]=F[b],q},{})},k.state={afterOpen:!1,beforeClose:!1},k.shouldClose=null,k.moveFromContentToOverlay=null,k}return i(x,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(k,T){this.props.isOpen&&!k.isOpen?this.open():!this.props.isOpen&&k.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!T.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var k=this.props,T=k.appElement,F=k.ariaHideApp,q=k.htmlOpenClassName,b=k.bodyOpenClassName,l=k.parentSelector,m=l&&l().ownerDocument||document;b&&R.add(m.body,b),q&&R.add(m.getElementsByTagName("html")[0],q),F&&(X+=1,E.hide(T)),M.default.register(this)}},{key:"render",value:function(){var k=this.props,T=k.id,F=k.className,q=k.overlayClassName,b=k.defaultStyles,l=k.children,m=F?{}:b.content,S=q?{}:b.overlay;if(this.shouldBeClosed())return null;var p={ref:this.setOverlayRef,className:this.buildClassName("overlay",q),style:r({},S,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},L=r({id:T,ref:this.setContentRef,style:r({},m,this.props.style.content),className:this.buildClassName("content",F),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),j=this.props.contentElement(L,l);return this.props.overlayElement(p,j)}}]),x}(a.Component);I.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},I.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(C.default),s.default.instanceOf(O.SafeHTMLCollection),s.default.instanceOf(O.SafeNodeList),s.default.arrayOf(s.default.instanceOf(C.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},e.default=I,t.exports=e.default})(ll,ll.exports);var NT=ll.exports;function pb(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function bb(t){function e(r){var n=this.constructor.getDerivedStateFromProps(t,r);return n??null}this.setState(e.bind(this))}function mb(t,e){try{var r=this.props,n=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}pb.__suppressDeprecationWarning=!0;bb.__suppressDeprecationWarning=!0;mb.__suppressDeprecationWarning=!0;function MT(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function")return t;var r=null,n=null,i=null;if(typeof e.componentWillMount=="function"?r="componentWillMount":typeof e.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof e.componentWillReceiveProps=="function"?n="componentWillReceiveProps":typeof e.UNSAFE_componentWillReceiveProps=="function"&&(n="UNSAFE_componentWillReceiveProps"),typeof e.componentWillUpdate=="function"?i="componentWillUpdate":typeof e.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),r!==null||n!==null||i!==null){var a=t.displayName||t.name,o=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. - -`+a+" uses "+o+" but also contains the following legacy lifecycles:"+(r!==null?` - `+r:"")+(n!==null?` - `+n:"")+(i!==null?` - `+i:"")+` - -The above lifecycles should be removed. Learn more about this warning here: -https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof t.getDerivedStateFromProps=="function"&&(e.componentWillMount=pb,e.componentWillReceiveProps=bb),typeof e.getSnapshotBeforeUpdate=="function"){if(typeof e.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=mb;var s=e.componentDidUpdate;e.componentDidUpdate=function(f,d,y){var v=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:y;s.call(this,f,d,v)}}return t}const UT=Object.freeze(Object.defineProperty({__proto__:null,polyfill:MT},Symbol.toStringTag,{value:"Module"})),OT=U0(UT);Object.defineProperty(P6,"__esModule",{value:!0});P6.bodyOpenClassName=P6.portalClassName=void 0;var t4=Object.assign||function(t){for(var e=1;e{var i,a;e(),await Lf.activate().catch(()=>{});try{const o=String(await((i=window.ethereum)==null?void 0:i.request({method:"net_version"}).catch(()=>"0x1")));if(o!==h6&&o!==yk){const s={chainId:"0xaa36a7",chainName:"Sepolia Test Network",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia-infura.brave.com/"],blockExplorerUrls:["https://sepolia.etherscan.io"]};await((a=window.ethereum)==null?void 0:a.request({method:"wallet_addEthereumChain",params:[s]}))}}catch(o){console.error("FAILED TO ADD SEPOLIA:",o)}},[e]);return Q.jsx(VT,{isOpen:t,onRequestClose:e,className:"connect-modal",overlayClassName:"overlay-modal",children:Q.jsx("div",{className:"connect-modal-content",children:Q.jsx("button",{onClick:n,disabled:r,children:"Connect to Wallet"})})})}function gb(t){let e=t.split("."),r=new Uint8Array(t.length+e.length),n=0;for(let i of e){let a=i.length;r[n]=a,n++;for(let o=0;oi.toString(16).padStart(2,"0")).join("")}`}const Ni=2147483647,hr=36,Vf=1,Fa=26,JT=38,YT=700,xb=72,vb=128,wb="-",XT=/^xn--/,ZT=/[^\0-\x7F]/,eC=/[\x2E\u3002\uFF0E\uFF61]/g,tC={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z8=hr-Vf,pr=Math.floor,$8=String.fromCharCode;function pn(t){throw new RangeError(tC[t])}function rC(t,e){const r=[];let n=t.length;for(;n--;)r[n]=e(t[n]);return r}function Ab(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(eC,".");const i=t.split("."),a=rC(i,e).join(".");return n+a}function Wf(t){const e=[];let r=0;const n=t.length;for(;r=55296&&i<=56319&&rString.fromCodePoint(...t),nC=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:hr},s4=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},_b=function(t,e,r){let n=0;for(t=r?pr(t/YT):t>>1,t+=pr(t/e);t>z8*Fa>>1;n+=hr)t=pr(t/z8);return pr(n+(z8+1)*t/(t+JT))},Qf=function(t){const e=[],r=t.length;let n=0,i=vb,a=xb,o=t.lastIndexOf(wb);o<0&&(o=0);for(let s=0;s=128&&pn("not-basic"),e.push(t.charCodeAt(s));for(let s=o>0?o+1:0;s=r&&pn("invalid-input");const v=nC(t.charCodeAt(s++));v>=hr&&pn("invalid-input"),v>pr((Ni-n)/d)&&pn("overflow"),n+=v*d;const E=y<=a?Vf:y>=a+Fa?Fa:y-a;if(vpr(Ni/P)&&pn("overflow"),d*=P}const f=e.length+1;a=_b(n-u,f,u==0),pr(n/f)>Ni-i&&pn("overflow"),i+=pr(n/f),n%=f,e.splice(n++,0,i)}return String.fromCodePoint(...e)},Jf=function(t){const e=[];t=Wf(t);const r=t.length;let n=vb,i=0,a=xb;for(const u of t)u<128&&e.push($8(u));const o=e.length;let s=o;for(o&&e.push(wb);s=n&&dpr((Ni-i)/f)&&pn("overflow"),i+=(u-n)*f,n=u;for(const d of t)if(dNi&&pn("overflow"),d===n){let y=i;for(let v=hr;;v+=hr){const E=v<=a?Vf:v>=a+Fa?Fa:v-a;if(y253)||!/^([\u0E00-\u0E7Fa-z0-9-._*]+)$/g.test(e))return!1;if(r.topLevel&&GU[e.replace(/\.$/,"")])return!0;const i=/(.*)\.(([\u0E00-\u0E7Fa-z0-9]+)(\.[a-z0-9]+))/,a=e.match(i);let o=null,s=null;return a&&a.length>2&&KU[a[2]]&&(o=a[2],s=a[1].split(".")),!s&&(s=e.split("."),s.length<=1||(o=s.pop(),!/^(?:xn--)?(?!^\d+$)[\u0E00-\u0E7Fa-z0-9]+$/gi.test(o)))||r.subdomain===!1&&s.length>1?!1:s.every(function(f,d){if(r.wildcard&&d===0&&f==="*"&&s.length>1)return!0;let y=/^([\u0E00-\u0E7Fa-zA-Z0-9-_]+)$/g;d===s.length-1&&(y=/^([\u0E00-\u0E7Fa-zA-Z0-9-]+)$/g);const v=(f.match(/--(--)?/g)||[]).length,E=(f.match(/xn--/g)||[]).length;return d===s.length-1&&v!==E?!1:y.test(f)&&f.length<64&&!f.startsWith("-")&&!f.endsWith("-")})};const Yf=N1(VU);var Tb={exports:{}};/** - * [js-sha3]{@link https://github.com/emn178/js-sha3} - * - * @version 0.5.7 - * @author Chen, Yi-Cyuan [emn178@gmail.com] - * @copyright Chen, Yi-Cyuan 2015-2016 - * @license MIT - */(function(t){(function(){var e=typeof window=="object"?window:{},r=!e.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;r&&(e=f0);for(var n=!e.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,i="0123456789abcdef".split(""),a=[31,7936,2031616,520093696],o=[1,256,65536,16777216],s=[6,1536,393216,100663296],u=[0,8,16,24],f=[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],d=[224,256,384,512],y=[128,256],v=["hex","buffer","arrayBuffer","array"],E=function(N,X,I){return function(c){return new ae(N,X,N).update(c)[I]()}},P=function(N,X,I){return function(c,x){return new ae(N,X,x).update(c)[I]()}},R=function(N,X){var I=E(N,X,"hex");I.create=function(){return new ae(N,X,N)},I.update=function(U){return I.create().update(U)};for(var c=0;c>5,this.byteCount=this.blockCount<<2,this.outputBlocks=I>>5,this.extraBytes=(I&31)>>3;for(var c=0;c<50;++c)this.s[c]=0}ae.prototype.update=function(N){var X=typeof N!="string";X&&N.constructor===ArrayBuffer&&(N=new Uint8Array(N));for(var I=N.length,c=this.blocks,x=this.byteCount,U=this.blockCount,k=0,T=this.s,F,q;k>2]|=N[k]<>2]|=q<>2]|=(192|q>>6)<>2]|=(128|q&63)<=57344?(c[F>>2]|=(224|q>>12)<>2]|=(128|q>>6&63)<>2]|=(128|q&63)<>2]|=(240|q>>18)<>2]|=(128|q>>12&63)<>2]|=(128|q>>6&63)<>2]|=(128|q&63)<=x){for(this.start=F-x,this.block=c[U],F=0;F>2]|=this.padding[X&3],this.lastByteIndex===this.byteCount)for(N[0]=N[I],X=1;X>4&15]+i[T&15]+i[T>>12&15]+i[T>>8&15]+i[T>>20&15]+i[T>>16&15]+i[T>>28&15]+i[T>>24&15];U%N===0&&(se(X),x=0)}return c&&(T=X[x],c>0&&(k+=i[T>>4&15]+i[T&15]),c>1&&(k+=i[T>>12&15]+i[T>>8&15]),c>2&&(k+=i[T>>20&15]+i[T>>16&15])),k},ae.prototype.arrayBuffer=function(){this.finalize();var N=this.blockCount,X=this.s,I=this.outputBlocks,c=this.extraBytes,x=0,U=0,k=this.outputBits>>3,T;c?T=new ArrayBuffer(I+1<<2):T=new ArrayBuffer(k);for(var F=new Uint32Array(T);U>8&255,k[T+2]=F>>16&255,k[T+3]=F>>24&255;U%N===0&&se(X)}return c&&(T=U<<2,F=X[x],c>0&&(k[T]=F&255),c>1&&(k[T+1]=F>>8&255),c>2&&(k[T+2]=F>>16&255)),k};var se=function(N){var X,I,c,x,U,k,T,F,q,b,l,m,S,p,L,j,V,G,re,ie,oe,Se,be,Ae,je,Oe,Ce,Pe,Be,Ne,e0,Ie,qe,T0,Je,c0,et,n0,i0,dt,a0,m0,_0,Ye,o0,$0,s0,Ve,ht,u0,d0,tt,De,v0,ut,l0,Xe,gt,t0,y0,pt,g0,E0;for(c=0;c<48;c+=2)x=N[0]^N[10]^N[20]^N[30]^N[40],U=N[1]^N[11]^N[21]^N[31]^N[41],k=N[2]^N[12]^N[22]^N[32]^N[42],T=N[3]^N[13]^N[23]^N[33]^N[43],F=N[4]^N[14]^N[24]^N[34]^N[44],q=N[5]^N[15]^N[25]^N[35]^N[45],b=N[6]^N[16]^N[26]^N[36]^N[46],l=N[7]^N[17]^N[27]^N[37]^N[47],m=N[8]^N[18]^N[28]^N[38]^N[48],S=N[9]^N[19]^N[29]^N[39]^N[49],X=m^(k<<1|T>>>31),I=S^(T<<1|k>>>31),N[0]^=X,N[1]^=I,N[10]^=X,N[11]^=I,N[20]^=X,N[21]^=I,N[30]^=X,N[31]^=I,N[40]^=X,N[41]^=I,X=x^(F<<1|q>>>31),I=U^(q<<1|F>>>31),N[2]^=X,N[3]^=I,N[12]^=X,N[13]^=I,N[22]^=X,N[23]^=I,N[32]^=X,N[33]^=I,N[42]^=X,N[43]^=I,X=k^(b<<1|l>>>31),I=T^(l<<1|b>>>31),N[4]^=X,N[5]^=I,N[14]^=X,N[15]^=I,N[24]^=X,N[25]^=I,N[34]^=X,N[35]^=I,N[44]^=X,N[45]^=I,X=F^(m<<1|S>>>31),I=q^(S<<1|m>>>31),N[6]^=X,N[7]^=I,N[16]^=X,N[17]^=I,N[26]^=X,N[27]^=I,N[36]^=X,N[37]^=I,N[46]^=X,N[47]^=I,X=b^(x<<1|U>>>31),I=l^(U<<1|x>>>31),N[8]^=X,N[9]^=I,N[18]^=X,N[19]^=I,N[28]^=X,N[29]^=I,N[38]^=X,N[39]^=I,N[48]^=X,N[49]^=I,p=N[0],L=N[1],$0=N[11]<<4|N[10]>>>28,s0=N[10]<<4|N[11]>>>28,Pe=N[20]<<3|N[21]>>>29,Be=N[21]<<3|N[20]>>>29,y0=N[31]<<9|N[30]>>>23,pt=N[30]<<9|N[31]>>>23,m0=N[40]<<18|N[41]>>>14,_0=N[41]<<18|N[40]>>>14,T0=N[2]<<1|N[3]>>>31,Je=N[3]<<1|N[2]>>>31,j=N[13]<<12|N[12]>>>20,V=N[12]<<12|N[13]>>>20,Ve=N[22]<<10|N[23]>>>22,ht=N[23]<<10|N[22]>>>22,Ne=N[33]<<13|N[32]>>>19,e0=N[32]<<13|N[33]>>>19,g0=N[42]<<2|N[43]>>>30,E0=N[43]<<2|N[42]>>>30,v0=N[5]<<30|N[4]>>>2,ut=N[4]<<30|N[5]>>>2,c0=N[14]<<6|N[15]>>>26,et=N[15]<<6|N[14]>>>26,G=N[25]<<11|N[24]>>>21,re=N[24]<<11|N[25]>>>21,u0=N[34]<<15|N[35]>>>17,d0=N[35]<<15|N[34]>>>17,Ie=N[45]<<29|N[44]>>>3,qe=N[44]<<29|N[45]>>>3,Ae=N[6]<<28|N[7]>>>4,je=N[7]<<28|N[6]>>>4,l0=N[17]<<23|N[16]>>>9,Xe=N[16]<<23|N[17]>>>9,n0=N[26]<<25|N[27]>>>7,i0=N[27]<<25|N[26]>>>7,ie=N[36]<<21|N[37]>>>11,oe=N[37]<<21|N[36]>>>11,tt=N[47]<<24|N[46]>>>8,De=N[46]<<24|N[47]>>>8,Ye=N[8]<<27|N[9]>>>5,o0=N[9]<<27|N[8]>>>5,Oe=N[18]<<20|N[19]>>>12,Ce=N[19]<<20|N[18]>>>12,gt=N[29]<<7|N[28]>>>25,t0=N[28]<<7|N[29]>>>25,dt=N[38]<<8|N[39]>>>24,a0=N[39]<<8|N[38]>>>24,Se=N[48]<<14|N[49]>>>18,be=N[49]<<14|N[48]>>>18,N[0]=p^~j&G,N[1]=L^~V&re,N[10]=Ae^~Oe&Pe,N[11]=je^~Ce&Be,N[20]=T0^~c0&n0,N[21]=Je^~et&i0,N[30]=Ye^~$0&Ve,N[31]=o0^~s0&ht,N[40]=v0^~l0>,N[41]=ut^~Xe&t0,N[2]=j^~G&ie,N[3]=V^~re&oe,N[12]=Oe^~Pe&Ne,N[13]=Ce^~Be&e0,N[22]=c0^~n0&dt,N[23]=et^~i0&a0,N[32]=$0^~Ve&u0,N[33]=s0^~ht&d0,N[42]=l0^~gt&y0,N[43]=Xe^~t0&pt,N[4]=G^~ie&Se,N[5]=re^~oe&be,N[14]=Pe^~Ne&Ie,N[15]=Be^~e0&qe,N[24]=n0^~dt&m0,N[25]=i0^~a0&_0,N[34]=Ve^~u0&tt,N[35]=ht^~d0&De,N[44]=gt^~y0&g0,N[45]=t0^~pt&E0,N[6]=ie^~Se&p,N[7]=oe^~be&L,N[16]=Ne^~Ie&Ae,N[17]=e0^~qe&je,N[26]=dt^~m0&T0,N[27]=a0^~_0&Je,N[36]=u0^~tt&Ye,N[37]=d0^~De&o0,N[46]=y0^~g0&v0,N[47]=pt^~E0&ut,N[8]=Se^~p&j,N[9]=be^~L&V,N[18]=Ie^~Ae&Oe,N[19]=qe^~je&Ce,N[28]=m0^~T0&c0,N[29]=_0^~Je&et,N[38]=tt^~Ye&$0,N[39]=De^~o0&s0,N[48]=g0^~v0&l0,N[49]=E0^~ut&Xe,N[0]^=f[c],N[1]^=f[c+1]};if(n)t.exports=_;else for(var z=0;z= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q8=br-Xf,mr=Math.floor,H8=String.fromCharCode;function u6(t){throw new RangeError(eO[t])}function tO(t,e){const r=[];let n=t.length;for(;n--;)r[n]=e(t[n]);return r}function Ub(t,e){const r=t.split("@");let n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(ZU,".");const i=t.split("."),a=tO(i,e).join(".");return n+a}function Ob(t){const e=[];let r=0;const n=t.length;for(;r=55296&&i<=56319&&rString.fromCodePoint(...t),nO=function(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:br},u4=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Rb=function(t,e,r){let n=0;for(t=r?mr(t/JU):t>>1,t+=mr(t/e);t>q8*ja>>1;n+=br)t=mr(t/q8);return mr(n+(q8+1)*t/(t+QU))},Ib=function(t){const e=[],r=t.length;let n=0,i=Nb,a=Pb,o=t.lastIndexOf(Mb);o<0&&(o=0);for(let s=0;s=128&&u6("not-basic"),e.push(t.charCodeAt(s));for(let s=o>0?o+1:0;s=r&&u6("invalid-input");const v=nO(t.charCodeAt(s++));(v>=br||v>mr((Mi-n)/d))&&u6("overflow"),n+=v*d;const E=y<=a?Xf:y>=a+ja?ja:y-a;if(vmr(Mi/P)&&u6("overflow"),d*=P}const f=e.length+1;a=Rb(n-u,f,u==0),mr(n/f)>Mi-i&&u6("overflow"),i+=mr(n/f),n%=f,e.splice(n++,0,i)}return String.fromCodePoint(...e)},Bb=function(t){const e=[];t=Ob(t);let r=t.length,n=Nb,i=0,a=Pb;for(const u of t)u<128&&e.push(H8(u));let o=e.length,s=o;for(o&&e.push(Mb);s=n&&dmr((Mi-i)/f)&&u6("overflow"),i+=(u-n)*f,n=u;for(const d of t)if(dMi&&u6("overflow"),d==n){let y=i;for(let v=br;;v+=br){const E=v<=a?Xf:v>=a+ja?ja:v-a;if(y=196608?o>=917760&&o<=917999?18874368:0:r[n[o>>4]][o&15]}return{mapStr:i,mapChar:a}})}(K8)),K8.exports}(function(t,e){(function(r,n){t.exports=n(uO,lO())})(f0,function(r,n){function i(f,d,y){for(var v=[],E=r.ucs2.decode(f),P=0;P>23,M=C>>21&3,z=C>>5&65535,$=C&31,Y=n.mapStr.substr(z,$);if(M===0||d&&_&1)throw new Error("Illegal char "+O);M===1?v.push(Y):M===2?v.push(y?Y:O):M===3&&v.push(O)}var J=v.join("").normalize("NFC");return J}function a(f,d,y){y===void 0&&(y=!1);var v=i(f,y,d),E=v.split(".");return E=E.map(function(P){return P.startsWith("xn--")?(P=r.decode(P.substring(4)),o(P,y,!1)):o(P,y,d),P}),E.join(".")}function o(f,d,y){if(f[2]==="-"&&f[3]==="-")throw new Error("Failed to validate "+f);if(f.startsWith("-")||f.endsWith("-"))throw new Error("Failed to validate "+f);if(f.includes("."))throw new Error("Failed to validate "+f);if(i(f,d,y)!==f)throw new Error("Failed to validate "+f);var v=f.codePointAt(0);if(n.mapChar(v)&2<<23)throw new Error("Label contains illegal character: "+v)}function s(f,d){d===void 0&&(d={});var y="transitional"in d?d.transitional:!0,v="useStd3ASCII"in d?d.useStd3ASCII:!1,E="verifyDnsLength"in d?d.verifyDnsLength:!1,P=a(f,y,v).split("."),R=P.map(r.toASCII),O=R.join("."),C;if(E){if(O.length<1||O.length>253)throw new Error("DNS name has wrong length: "+O);for(C=0;C63)throw new Error("DNS label has wrong length: "+_)}}return O}function u(f,d){d===void 0&&(d={});var y="useStd3ASCII"in d?d.useStd3ASCII:!1;return a(f,!1,y)}return{toUnicode:u,toAscii:s}})})(Cb);var H5=Cb.exports,f4=WU.keccak_256,fO=H5;function cO(t){for(var e="",r=0;r<32;r++)e+="00";if(name=dO(t),name)for(var n=name.split("."),r=n.length-1;r>=0;r--){var i=f4(n[r]);e=f4(new Buffer(e+i,"hex"))}return"0x"+e}function dO(t){return t&&fO.toUnicode(t,{useStd3ASCII:!0,transitional:!1})}var Da=cO;const{useAccount:hO}=O1;function pO({name:t,setName:e,nameValidities:r,setNameValidities:n,nameWrapper:i,ensRegistry:a,triggerNameCheck:o}){const s=hO();console.log("userAddress",s);const u="Name must be a valid URL without subdomains (A-Z, a-z, 0-9, and punycode)",f="Name is not owned by your wallet",d="Unsupported punycode character",y=ne.useRef(null);ne.useEffect(()=>{y.current&&clearTimeout(y.current),y.current=setTimeout(async()=>{if(t.length==0)return;let E,P=[...r],R;E=P.indexOf(d);try{R=H5.toAscii(t+".eth"),E!=-1&&P.splice(E,1)}catch{E==-1&&P.push(d)}if(R!==void 0&&(E=P.indexOf(u),t!=""&&!Yf(R)?E==-1&&P.push(u):E!=-1&&P.splice(E,1),E=P.indexOf(f),P.length==0||E!=-1)){let O=await a.owner(Da(R));O==i.address&&(O=await i.ownerOf(Da(R))),O!=s?E==-1&&P.push(f):P.splice(E,1)}n(P)},500)},[t,o]);const v=E=>E.target.value.indexOf(".")==-1&&e(E.target.value);return Q.jsxs("div",{className:"flex flex-col w-full place-items-center place-content-center",children:[Q.jsxs("div",{className:"flex w-full place-items-center",children:[Q.jsx("input",{value:t,onChange:v,type:"text",required:!0,name:"dot-os-name",placeholder:"e.g. myname",className:"grow"}),Q.jsx("div",{className:"ml-2 text-lg",children:".eth"})]}),r.map((E,P)=>Q.jsxs("div",{children:[Q.jsx("br",{}),Q.jsx("span",{className:"text-red-500",children:E})]},P))]})}function an({msg:t}){return Q.jsxs("div",{id:"loading",className:"flex flex-col text-center",children:[Q.jsx("h3",{children:t}),Q.jsxs("div",{id:"loader",children:[" ",Q.jsx("div",{})," ",Q.jsx("div",{})," ",Q.jsx("div",{})," ",Q.jsx("div",{})," "]})]})}const bO="4902",c4={[h6]:{chainId:h6,chainName:"Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://rpc.sepolia.org"],blockExplorerUrls:["https://sepolia.etherscan.io"]},[Rn]:{chainId:Rn,chainName:"Optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.optimism.io"],blockExplorerUrls:["https://optimistic.etherscan.io"]},[Ys]:{chainId:Ys,chainName:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://ethereum-rpc.publicnode.com"],blockExplorerUrls:["https://etherscan.io"]}},Kr=t=>{switch(t){case"1":case"0x1":return"Ethereum";case"10":case"a":case"0xa":return"Optimism";case"42161":return"Arbitrum";case"11155111":case"aa36a7":case"0xaa36a7":return"Sepolia";default:return"Unknown"}},N6=async t=>{var r,n,i;let e=await((r=window.ethereum)==null?void 0:r.request({method:"net_version"}).catch(()=>"1"));if(e="0x"+(typeof e=="string"?e.replace(/^0x/,""):e.toString(16)),!c4[t]){console.error(`Invalid chain ID: ${t}`);return}if(t!==e)try{await((n=window.ethereum)==null?void 0:n.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]}))}catch(a){if(String(a).includes(bO))await((i=window.ethereum)==null?void 0:i.request({method:"wallet_addEthereumChain",params:[c4[t]]}));else throw window.alert(`You must enable the ${Kr(t)} network in your wallet.`),new Error(`User cancelled connection to ${t}`)}},mO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAG1BMVEVHcExhfelhfephfelifurBzPf///+Dme7i5/sS0DLNAAAABHRSTlMAgMg36TiFUwAABmNJREFUeNq9nO154joQhQlsASRxASxQAMmmgAXs6xRgRxXAQwEGp4GwW/bFLB+2LDTnjIj1O8kbnfnwSBqp18PH4OVxPI7jeLEYPz7Pet8wfj1Wf782Fo+/7ksYvDzFjvHznvN5Gcc3xs/nOyEenmLP+HmXybxMY+9YhE9m8BSLI3Qyg2kMjEUQ5QFiHCjDAHPE8HjugKGmvEzjb6c8cAyVXQYkQ0PhGQpPjmLFmHOM11g1JpTRY+UYfq9BaLM8xeox/3axCMH0YhGCvcZBY/LtYqGCRaGQ+V0mUgZPBbD6l2R7idGXGcmqEH5iFO6+nysT5sbAROKPVR7kxshE0vUqL0Kmgkzk/QCR9PJaBUkoHwhkERbs6foAEfXyxAoS7MkRkqnDHspauyPEqDPYGwLZHyGyXsuA78hBrSMkU35X+qBaR4is10if4/cnSK7L+JDZK7X+QQqV6SGzf14gsl4TZbQfwv0MkfVaKNVK11eIRi9IrfcaRHRiR6jgap0ghteLUOsEUej1BjvwBcLrNUXD/Qqh9cLKxn0DQuvVJ9QiICM+b+0siOHy14Bw4CsECPqZKjk2IJxRXvFwr0O4JBkxal0h1EdlQIR7AyLrNeNM8u6AZIRRflBq1SDMlz6i1KpBZL3mVOJKnJAMTl8DJtybEANbvk8kRwsi6zUiviU1tTjIkrD77gbEoJafUg7chOSg5QecA1uQArM8Eu+fNyEGi/k+qVYTkmPuFZFqWZACcq+ISY5tSAa515RzYBtiEPcCnCvdeyCiXjPMuZK1D5IB7vXAqmVDDAB5pZKjAyI58QRKj5ZaLUgm+3DEqtWCGNmHIy7cHZBchMgVarqWIIUUKAMy3A/jK+f0mgEQW60vU3J6zeQwsdTafOWmLCm9hjIksRkVpGSceCh/TRoOvDmaoLQpRvii9Jnk+De/QMotrNdIrIOTtlv9gzQoXr1+i1ll13bdE6ROMf688gYnx0t4nCF1ih8SoWpdQ/ACqZm/8OaVCFNrUwvzGqRE9BIhH21GA1ICes2FMiKthYcbUsp6LQTIu4NhQU7mz/SQD1fWtSAnig8iq9XO7KWLUmhnkrgYbciR4tGrJzlwm+GAVOY3Ski63zgYTkjp08sLSZwMN6T06OWFfOY5DimNDrKlIKXS8FsG4jG814VTAqIORjfFcAxpJm6KC1LE+tzlNIvhGADEQTEc4wCRi/qtCCmksl6GpFsJEodASrfxjZuR3ob4SqIkc1KMm5Hp6q50Xbgoxsm4nYWX/jJ1tzn9ZnITcv43tsZTpv7wfxnP7SPbG5Di4oKZuqrfuyjGxch9Vf2D+P1thYtxMYx+pVWVK3/scDG20Ut/cTeUFqZV4WUsFzMtx/KXqeLqtyohN1a4GMuxpIJ71kOKYcuRTdMgcincg8r6posZ2+hSUS9CTgfXdYppMzIB8gatfuuObGpG38oLrSWwqXZaa9Uc2ViOJaxLJ8D24HnVeHVkYzP8K2xoD/K8/r04srEZubgHKW4TXdam57gwDecVdz1myObzZZV9phR2Nsvksw3xK389Ki3cBQawjS5up17PNVZOhgEOBMTNqNq22p9rkYFuqY3AQ5raBqFxlK/IIQ211bkxLUaGHDfJlWp9G/KY91NqwxY8palvEVaOvOX2t3v8bv2q2JI79djJWfOUhjrTGuEHzDv1EeAMPypPbkKyGLI7dD63Vx7Lzpkmn/+UB8y/mUaMVHlUPqRaSj7ckBi1O3toumKPS+E2H123x4RsWFL1rQzJ1qtE0YHTbLUFjHJNLXgv0Zxuh9vxrVcjurGv3USWEQ6Mdnzs2Xa4haLZkm7sW+pa6rkWxaHuckADwqqF6fXOtY0utVcQmC7bofYyRQ3Cq8U0YIGdzxPtlY090cM91Dbv7/CW97n6GsK1eT/j8hbVagtfQ7h1LQhNLStdkHCpeJWH3NeJsFBZAWrNgy4efWLXdYZBV6iw202L0FttFUTnv/hUqhtnWcBEwCpvRdV0uqnsQq8aYpcmsxCLYFNJv4oQi3R2kbWTK7ndXC7u5Jp0Nxe+O7m63s0l/G6eE+jkYYRunnjo5rGKbp7d6OQBkW6eQmEfddG+HNTF8zTUXAJeQOriyaBuHj/CkuUd3qTq4EEq8U2q+zytVU3mJuZuj4R19NxZhWk93Da+98NttSfoKjcYk0/Q/Q/GcNFkXl2LdgAAAABJRU5ErkJggg==",Lb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAG1BMVEVHcExhfelhfephfelifurBzPf///+Dme7i5/sS0DLNAAAABHRSTlMAgMg36TiFUwAABmNJREFUeNq9nO154joQhQlsASRxASxQAMmmgAXs6xRgRxXAQwEGp4GwW/bFLB+2LDTnjIj1O8kbnfnwSBqp18PH4OVxPI7jeLEYPz7Pet8wfj1Wf782Fo+/7ksYvDzFjvHznvN5Gcc3xs/nOyEenmLP+HmXybxMY+9YhE9m8BSLI3Qyg2kMjEUQ5QFiHCjDAHPE8HjugKGmvEzjb6c8cAyVXQYkQ0PhGQpPjmLFmHOM11g1JpTRY+UYfq9BaLM8xeox/3axCMH0YhGCvcZBY/LtYqGCRaGQ+V0mUgZPBbD6l2R7idGXGcmqEH5iFO6+nysT5sbAROKPVR7kxshE0vUqL0Kmgkzk/QCR9PJaBUkoHwhkERbs6foAEfXyxAoS7MkRkqnDHspauyPEqDPYGwLZHyGyXsuA78hBrSMkU35X+qBaR4is10if4/cnSK7L+JDZK7X+QQqV6SGzf14gsl4TZbQfwv0MkfVaKNVK11eIRi9IrfcaRHRiR6jgap0ghteLUOsEUej1BjvwBcLrNUXD/Qqh9cLKxn0DQuvVJ9QiICM+b+0siOHy14Bw4CsECPqZKjk2IJxRXvFwr0O4JBkxal0h1EdlQIR7AyLrNeNM8u6AZIRRflBq1SDMlz6i1KpBZL3mVOJKnJAMTl8DJtybEANbvk8kRwsi6zUiviU1tTjIkrD77gbEoJafUg7chOSg5QecA1uQArM8Eu+fNyEGi/k+qVYTkmPuFZFqWZACcq+ISY5tSAa515RzYBtiEPcCnCvdeyCiXjPMuZK1D5IB7vXAqmVDDAB5pZKjAyI58QRKj5ZaLUgm+3DEqtWCGNmHIy7cHZBchMgVarqWIIUUKAMy3A/jK+f0mgEQW60vU3J6zeQwsdTafOWmLCm9hjIksRkVpGSceCh/TRoOvDmaoLQpRvii9Jnk+De/QMotrNdIrIOTtlv9gzQoXr1+i1ll13bdE6ROMf688gYnx0t4nCF1ih8SoWpdQ/ACqZm/8OaVCFNrUwvzGqRE9BIhH21GA1ICes2FMiKthYcbUsp6LQTIu4NhQU7mz/SQD1fWtSAnig8iq9XO7KWLUmhnkrgYbciR4tGrJzlwm+GAVOY3Ski63zgYTkjp08sLSZwMN6T06OWFfOY5DimNDrKlIKXS8FsG4jG814VTAqIORjfFcAxpJm6KC1LE+tzlNIvhGADEQTEc4wCRi/qtCCmksl6GpFsJEodASrfxjZuR3ob4SqIkc1KMm5Hp6q50Xbgoxsm4nYWX/jJ1tzn9ZnITcv43tsZTpv7wfxnP7SPbG5Di4oKZuqrfuyjGxch9Vf2D+P1thYtxMYx+pVWVK3/scDG20Ut/cTeUFqZV4WUsFzMtx/KXqeLqtyohN1a4GMuxpIJ71kOKYcuRTdMgcincg8r6posZ2+hSUS9CTgfXdYppMzIB8gatfuuObGpG38oLrSWwqXZaa9Uc2ViOJaxLJ8D24HnVeHVkYzP8K2xoD/K8/r04srEZubgHKW4TXdam57gwDecVdz1myObzZZV9phR2Nsvksw3xK389Ki3cBQawjS5up17PNVZOhgEOBMTNqNq22p9rkYFuqY3AQ5raBqFxlK/IIQ211bkxLUaGHDfJlWp9G/KY91NqwxY8palvEVaOvOX2t3v8bv2q2JI79djJWfOUhjrTGuEHzDv1EeAMPypPbkKyGLI7dD63Vx7Lzpkmn/+UB8y/mUaMVHlUPqRaSj7ckBi1O3toumKPS+E2H123x4RsWFL1rQzJ1qtE0YHTbLUFjHJNLXgv0Zxuh9vxrVcjurGv3USWEQ6Mdnzs2Xa4haLZkm7sW+pa6rkWxaHuckADwqqF6fXOtY0utVcQmC7bofYyRQ3Cq8U0YIGdzxPtlY090cM91Dbv7/CW97n6GsK1eT/j8hbVagtfQ7h1LQhNLStdkHCpeJWH3NeJsFBZAWrNgy4efWLXdYZBV6iw202L0FttFUTnv/hUqhtnWcBEwCpvRdV0uqnsQq8aYpcmsxCLYFNJv4oQi3R2kbWTK7ndXC7u5Jp0Nxe+O7m63s0l/G6eE+jkYYRunnjo5rGKbp7d6OQBkW6eQmEfddG+HNTF8zTUXAJeQOriyaBuHj/CkuUd3qTq4EEq8U2q+zytVU3mJuZuj4R19NxZhWk93Da+98NttSfoKjcYk0/Q/Q/GcNFkXl2LdgAAAABJRU5ErkJggg==",Fb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAACXBIWXMAAAXnAAAF5wGk6LX5AAAAGFBMVEVHcEz/BCD/AyD/BCD/BCD/////aHn/w8p/uFjAAAAABHRSTlMAf8g2IKeBKAAABN1JREFUeNrFnO15mzAQgHHwAHbCAK7LAE4fBggg8AIGFgBngeCsX5qaWAhJdwLd5X41dh+9vk99KwjwEr7uj0cxyPG4fzkFBBLuYzGRbO+b8/osNJK9+ETEwiDeMOGzsMgvL0Z7FYD8JlbDjzJhLBCSraJsUIyBsiN0x0MWUzZCkFOcGAspjoxFlDB2hbjHmDtjASUSCyR1Y/wRi+Q3qdMXOH+JQ5zdEonFkpIby8Fgy43lYLBErJKc3FhYg0VrIQjfP4nVcgAh8XpIxqAIrErsA5IxKAKpEvuBZAyK2FWJfUEyBkVsqkT+IClZ1cJUsMQnxFCMQ+FVTtRuN7s+8gtJyd1ucn3iG5JTZrsl671bS2evxD8kp7eWxl4E1prbK6GA5PTWmtkrFCRyoqxb+voV0UCm9UsQCXkAq0G8pYK80btk4pRQCHqnbOggO3qXyE6J6CApbeFSyheh3x/l64kScqDsS9Q+JaKEpPR+//Y8qd9Hz29oITvqfH/kfEILyemDawyvmBaSYYOrvA6yJrzg4Cr76ktuk08/JblC4QVWrvdqlKZ9fFpUE7nZqxcUwb3c1oPSTSFVY41hIII7Q1N9haXkYASflabq8YtqJrUlhq0RXM6aao0QyZZukGLW0sVE//5KNyyyWmveUmOGNEZI6KbIaJRzhbfXyZ6LvaalDyP+/pUmGzcYtze367WfBNEd8pXvPeCUnTXhCznTywmk09nuYkr5LSIRWxnZyIacmrU2pfwWjq16ajwNpAAgCewSJf+kfzdTyMVUVxKwpDRKrEn8evo/jZAIdMlFgbRziF2TFAH50Gii/PTCmidWSK/ksQRRWu0ASAwGl+5vBdJby0pmgZRq2ZP+nuTiNLjdIGcl+EsjpLNX4SwQrpB6losl0DXaIGpcylD5p48jJpPfhw4FH8Fy2I6Vs/9seqg7wUBaMU8GXb9oGRQF+DSRNNP2i5clEDUuJc1cOl8MpNFpput8a7EAYsjFSjdGtSsCQ2pLwiMGEUDGI3IRZ6xBk3hJLs4gN/tcCw0p5rmom7e4QdSE72a52Fz/SwvOGiPHfrHVxQQ0/0VDqlnn6x8iD10KqI6okAQ5VumkX1+AqYEdd3Xa4eMFHjdoIFtotK0ZFndgIcGOhQs5l7/LrmYgjIA8gfPeYW7yPq0elRvkYJ4Elea5FNQTOsy0dHM5fX0GISFyLUKKZ8dc/LdMhF6MUGdv2Fy0z+N7Q6fhmPCZdUXirPWIcy5m9gWcTt/DOuZial+KKntt79e7QXJgUU2m3IRmMoRdGLYvD76P64+t/NkwAv78wCc8vNB5XbOSOi50Eu8H3HcEOBafeZbRWTYEtrSQN75NGpbtJpaNM54twITe70zbsiwbzCxb5Tyb/lt6vzMdxAjoIMyHY+ic8sZ9YInl6BXPITKW43AsB/tYjijyHLZkOTbKcgCW5ygvy6FkluPVPAfFN8SZyHd4n+caguf69YNXQ3guubBc1/GpyuFnr1DxXAZjudbGc0GP5aohz6VJluufPnIFvsjKciWX53IxyzXplb7H3pDnuLq+yvd5gJaY2lhcDyPwPPHA81gFz7MbLA+I8DyFwvOoC8/zNE6UFc/5cDwZxPP40SCYZ5wo39W6i5fXtTie1uJ5JOwLc9Qhjj4RTA+3rXuC7i9fKsPnoYG4swAAAABJRU5ErkJggg==",yO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAJ1BMVEVHcEwwSGMsN0osN0orN0v9/v6YvNsqn+1igqEYHy9DZoeMoLXU2d+tI0ZHAAAABHRSTlMA/LJVwr+FbwAAChlJREFUeNq9XM1uG0cSlkU9gLQaR7SkAyPxAWjJD6ChGwZH8mWBjGHEvASwB7KZi4CFKPgmgBYdJBcCA8OSfBEgW3GUi4FI2Bh7MRAG2WAfaod/01Xd1b+kWIckdOj52F99VV3dU90zM/ZW2NxYC1hm1bX1zZmbsAyAIZs80OZgCNiqa5OEKZSZwqqVSUFsMI2tTwRmo8y0Vl0ffxhfM6P9o3JT3picZzatMDKUMWQ2a4kxjmNmmb2FJU+uAuZilZvzORhL5eYxfFDcMTLvu4LcZR523zGXMC9zEnKBeVrpZh3inGDuMm9bvIlI9yWsYIr0cALRssHGsvXxB5Iuv359Nn4S0yvrxySzz+mYga/3+oekb59ZMI7v9SFymQzt01jBovX6SpLb4Ti+1w3kbQLso79XdB7ZvoYgjXNfr+g8gjGSZPeOp1c0HgmPEsF2Az+vaAYiYfSE7OOVWQvx7p4tX1uglNwHEl1Cf3PvHKbOQykos24tx+grN/+YtJwz2F2zsA4H+aRoFvKio345xifJRY3ATcW3FF/vUI7mKKpwmXdxOw+Q3WP+s1P+py6uLxjFC5kJOkYhV+zdvqJif9uEsmjNVhGLl4+EBSeGvF+1jfZtXUTURmNptCyj/p4pQLRUntvV3xRbJybaLxVkKvgqaDPvC2NuJvO+qK85IkDy3/lv5fwU/qgb65aZLXPq6HntSINSNbK1o+WbSmypga9b6gBJWh1tvVfThMu8XsAG8dLxeqYXcWDO7hY1nxQuVa1LuDtTZtyYiD7kKJHGKXN0Xa3O41St3xd7oBZx2Sa7M5ui7PMdFV8Fy+xuI2QhXFQgeeZt/GC/iONprqXIxLg65eLt2IMEXMiKevUeSdYhc7IaKfr7tN8/mGtQeiwrVMquki4JR2J0X1yPhBxQkTJLjHo3cAcZCblFeR6F4leO4iU08x3lFOiSaPBrPoZeIINw2U0NIIMf84l52o4sYpXfG/47K9cKz+OKSxrvEPz4uP/v3j+PuYlfDI4kkJIMEtLFSRRd/ifOrP6/7AFH1z3r++6p+D0VyD0zSLTSjQdWz3776L8z+52ciAJZXmaQ6DJ/7pfMuRzjUWoLUjaCnPLH/sbYO/7pW2YGGSQWZgR5lj+1HrCIf4qfWoAweTKhQB7ypz5OWY1/igMbkIqkYAoEOPo5Y6v805OUiWUGAVKSiggCBPz0TFvRFf/43+z7e0aQLamuI0AwWyEYVzY9Fw8CE8h9CxDo6D8YewMEnP3fi+a5DUjZAAL0G39k0Ssk4LDdPDSBVC1AbmNH43DfbjZfBmYQYa9ZBsFsgXCvZzXpUrOJ+SJAMg0LhZ0EAsMim1d/RSoI2hnI3vgg7xBbURcJOGNL4IsGmdWDQG1lyfEEsHXOwmIPBPFFgZRIkF0lWzDc+wLu2aEXCBjJKg53MK5/Dl2S8WUEmdODXKGnbseigPsW6EG2DCAnOCweoHEN2UJ8USD3xSWpAAK0VWdEuDdFvjxAYMp9zNgdOK6ALTdHFgTuILm6oA+eouSYCZgVc5Bzw0jKupE8QGyx90jA4UUO8lILUiVB8pG8QkmEEeE+sINgDBD8VBiY2XxV4yCcL3cQwQeruOACI+F8USDhDFODQMU+wVL7wpBPmgc6EKYDgdN5NpW8BWz91ntOEfIVeILsYB/AwOw/BvK15zmS6D2eeK+w1EDEA305g3SRD0IsNcZ47gL6cgV5E6M6+xSXpwsMi3jPD+QVTo4CeT8HAl+qRZAeBNDzLQ73HnntFsmXG0h4iieoHXG+yuJvoSjFoxtIdFuZHHsfl/p6CpsiXzSIKq1Abf2VohpvOF+dU3y55a5TPJXAcH8+iMOXQtAfuoPcRnW2GO7FYfxJSdIN5BmKb5gc84LrHCfJPl80iGL6hXNHb0EVo1y5MIq/EPEVOM7x73B8P6TmqwMm8+UCAkvFJ1jAj3jBdYaDvqkcyRwJAsX0hcnhPnjov9hghQL0RVeQt0iQVUzPKc6V2yC/C3zRIGRVD8XUq7OF6C8CfgS+HJYOJ1hMkK3efNWG8XeB+HIAEcUUKwouMehfKkCo5dx3Vyi+Q4iJfX2Ok2QzsF8zJjHKhijcU0SQNKkoQIgl9vd47uhgPS+0kZ5CNAlT6/gKuVnQxWudh3jduN3E8Qc/H9jvSMQ4OcLJPghRupL42qdB5A0cga1QmOzhM/uLeIia2O4SdbG2hMkePbN5sID52qdB5E21GG9CvMcewj7pTyJt7Ui2qO3B73G4w8n+sVQ49uNxSTuSErXRCdn6iGf3we7pEuIre+KydiQVasu2i0MPJuRWyii+QJLcp7dsxc1nka0reUMb8bXHQvAHiWLzWdhG7wqh10UbHwRfaGz7Nnv1DGqrjvck8u1/DV+JAgS/2oBsfSOEe/6ldlNYNFyoQYj3J3B+6hfWMbX9L+mrqKarRLxuEpLjm5ja/pf42m4rR1KR2wpgFfc3roVivoOC+QKTcH8gjZR4ZVpWgDzH+0LwjcySGPRFMJBdCmROARLgWugP+EJR4otj4JeZW8Rr2Q5O60L9xX9LU+SrnWPQr2UL9Eie4+T4CIlQSpIXOQb9ghk5pQujohYr3l+hiX04Ce9rX5WjmK91QZ39MFa97cP6asFeDMVLf9i+EO3QybEuLDZFvoztCyjmowe5n+X5itsy5os3lqoaMfCUEv00iop3sbSdotDXL6rWI2VzTPrTkK1XZLhTfCWgLUjVTCQsUjpX/YfCPPZEboYSaxSqe2Ne07B0/KwOJADnKzLocwzpHXtF12Bb+1sI99/l9/sXEobUWRFqm8giYeOjnjIlX/u2TWRUP+fbWPe6mvOVO13ShtAOR7VBruKsr+JL16FaMbYo/qoTcM5Xoumbq5obeQdBmRd5si2jACG+MG/TNppvS/xFt/W0gXgZ0ZtXsWqAHemLPjsTLl1r++aqVq280TDv1xU9OZeurbxkU3I0mOP/pPuOa4bu+ople3X01RCEiALQZkfqomrdKH7ckxj5c42NpYv2Le9Z3q+PMlNIdIy5tbwr2tHD46s/RxKKRhoKQ968/yKiG86qnscQXhDCUvbNzbudZwvlds0V3wMVdkdDBlmLizdl9m7XH/rEp1rA2YCW8q9U3I/rFCd2XMfq4FHjbOHIoiu65HWE6oN8hOqFukG26ncYrCMfBrsTKL+97nmsrSMca2v4HmvTeCWc2AE9ncACdNSw8YPm0KzpAKj20GRxQocm9cc/i4lNx7L5rLT+IOulTVe0xSHmshlF3xVtcxZff7g4XH79+hctht056THOlNt4XXGEw8lsr0eYxtH16RzCn851Av6EOd1XMY0rHjzdsjjjaB5ucb52w8P5PpfUbJZvHmM6l7o4Ctnzehqni3a8MaZzZdB0Lj/KzOIap7Xx76TaMAxmAhdSTelqrelcEqa87oytTfxWNeHitvAGb4j72gfg/10bKABRXI7XAAAAAElFTkSuQmCC",gO="/assets/unknown-C4Y5qjv5.png";var on=function(t){t==null&&(t=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};on.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(((t&4294901760)>>>16)*1812433253<<16)+(t&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};on.prototype.init_by_array=function(t,e){var r,n,i;for(this.init_seed(19650218),r=1,n=0,i=this.N>e?this.N:e;i;i--){var a=this.mt[r-1]^this.mt[r-1]>>>30;this.mt[r]=(this.mt[r]^(((a&4294901760)>>>16)*1664525<<16)+(a&65535)*1664525)+t[n]+n,this.mt[r]>>>=0,r++,n++,r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1),n>=e&&(n=0)}for(i=this.N-1;i;i--){var a=this.mt[r-1]^this.mt[r-1]>>>30;this.mt[r]=(this.mt[r]^(((a&4294901760)>>>16)*1566083941<<16)+(a&65535)*1566083941)-r,this.mt[r]>>>=0,r++,r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1)}this.mt[0]=2147483648};on.prototype.random_int=function(){var t,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var r;for(this.mti==this.N+1&&this.init_seed(5489),r=0;r>>1^e[t&1];for(;r>>1^e[t&1];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^e[t&1],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0};on.prototype.random_int31=function(){return this.random_int()>>>1};on.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};on.prototype.random=function(){return this.random_int()*(1/4294967296)};on.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};on.prototype.random_long=function(){var t=this.random_int()>>>5,e=this.random_int()>>>6;return(t*67108864+e)*(1/9007199254740992)};var xO=on,jb={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(window,function(){return function(r){var n={};function i(a){if(n[a])return n[a].exports;var o=n[a]={i:a,l:!1,exports:{}};return r[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=r,i.c=n,i.d=function(a,o,s){i.o(a,o)||Object.defineProperty(a,o,{enumerable:!0,get:s})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,o){if(1&o&&(a=i(a)),8&o||4&o&&typeof a=="object"&&a&&a.__esModule)return a;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:a}),2&o&&typeof a!="string")for(var u in a)i.d(s,u,(function(f){return a[f]}).bind(null,u));return s},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="",i(i.s=1)}([function(r,n,i){var a,o;a=[i(2)],(o=(function(s){function u(h){if(u.is(h,"function"))return f?h():s.on("raphael.DOMload",h);if(u.is(h,F))return u._engine.create[_](u,h.splice(0,3+u.is(h[0],T))).add(h);var g=Array.prototype.slice.call(arguments,0);if(u.is(g[g.length-1],"function")){var w=g.pop();return f?w.call(u._engine.create[_](u,g)):s.on("raphael.DOMload",function(){w.call(u._engine.create[_](u,g))})}return u._engine.create[_](u,arguments)}u.version="2.3.0",u.eve=s;var f,d,y=/[, ]+/,v={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},E=/\{(\d+)\}/g,P="hasOwnProperty",R={doc:document,win:window},O={was:Object.prototype[P].call(R.win,"Raphael"),is:R.win.Raphael},C=function(){this.ca=this.customAttributes={}},_="apply",M="concat",z="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,$="",Y=" ",J=String,ee="split",ae="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[ee](Y),se={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},N=J.prototype.toLowerCase,X=Math,I=X.max,c=X.min,x=X.abs,U=X.pow,k=X.PI,T="number",F="array",q=Object.prototype.toString,b=(u._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),l={NaN:1,Infinity:1,"-Infinity":1},m=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,S=X.round,p=parseFloat,L=parseInt,j=J.prototype.toUpperCase,V=u._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},G=u._availableAnimAttrs={blur:T,"clip-rect":"csv",cx:T,cy:T,fill:"colour","fill-opacity":T,"font-size":T,height:T,opacity:T,path:"path",r:T,rx:T,ry:T,stroke:"colour","stroke-opacity":T,"stroke-width":T,transform:"transform",width:T,x:T,y:T},re=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,ie={hs:1,rg:1},oe=/,?([achlmqrstvxz]),?/gi,Se=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,be=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,Ae=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,je=(u._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),Oe=function(h,g){return p(h)-p(g)},Ce=function(h){return h},Pe=u._rectPath=function(h,g,w,A,B){return B?[["M",h+B,g],["l",w-2*B,0],["a",B,B,0,0,1,B,B],["l",0,A-2*B],["a",B,B,0,0,1,-B,B],["l",2*B-w,0],["a",B,B,0,0,1,-B,-B],["l",0,2*B-A],["a",B,B,0,0,1,B,-B],["z"]]:[["M",h,g],["l",w,0],["l",0,A],["l",-w,0],["z"]]},Be=function(h,g,w,A){return A==null&&(A=w),[["M",h,g],["m",0,-A],["a",w,A,0,1,1,0,2*A],["a",w,A,0,1,1,0,-2*A],["z"]]},Ne=u._getPath={path:function(h){return h.attr("path")},circle:function(h){var g=h.attrs;return Be(g.cx,g.cy,g.r)},ellipse:function(h){var g=h.attrs;return Be(g.cx,g.cy,g.rx,g.ry)},rect:function(h){var g=h.attrs;return Pe(g.x,g.y,g.width,g.height,g.r)},image:function(h){var g=h.attrs;return Pe(g.x,g.y,g.width,g.height)},text:function(h){var g=h._getBBox();return Pe(g.x,g.y,g.width,g.height)},set:function(h){var g=h._getBBox();return Pe(g.x,g.y,g.width,g.height)}},e0=u.mapPath=function(h,g){if(!g)return h;var w,A,B,D,K,H,W;for(B=0,K=(h=pt(h)).length;B',(Ie=qe.firstChild).style.behavior="url(#default#VML)",!Ie||typeof Ie.adj!="object")return u.type=$;qe=null}function T0(h){if(typeof h=="function"||Object(h)!==h)return h;var g=new h.constructor;for(var w in h)h[P](w)&&(g[w]=T0(h[w]));return g}u.svg=!(u.vml=u.type=="VML"),u._Paper=C,u.fn=d=C.prototype=u.prototype,u._id=0,u.is=function(h,g){return(g=N.call(g))=="finite"?!l[P](+h):g=="array"?h instanceof Array:g=="null"&&h===null||g==typeof h&&h!==null||g=="object"&&h===Object(h)||g=="array"&&Array.isArray&&Array.isArray(h)||q.call(h).slice(8,-1).toLowerCase()==g},u.angle=function(h,g,w,A,B,D){if(B==null){var K=h-w,H=g-A;return K||H?(180+180*X.atan2(-H,-K)/k+360)%360:0}return u.angle(h,g,B,D)-u.angle(w,A,B,D)},u.rad=function(h){return h%360*k/180},u.deg=function(h){return Math.round(180*h/k%360*1e3)/1e3},u.snapTo=function(h,g,w){if(w=u.is(w,"finite")?w:10,u.is(h,F)){for(var A=h.length;A--;)if(x(h[A]-g)<=w)return h[A]}else{var B=g%(h=+h);if(Bh-w)return g-B+h}return g};var Je,c0;u.createUUID=(Je=/[xy]/g,c0=function(h){var g=16*X.random()|0;return(h=="x"?g:3&g|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Je,c0).toUpperCase()}),u.setWindow=function(h){s("raphael.setWindow",u,R.win,h),R.win=h,R.doc=R.win.document,u._engine.initWin&&u._engine.initWin(R.win)};var et=function(h){if(u.vml){var g,w=/^\s+|\s+$/g;try{var A=new ActiveXObject("htmlfile");A.write(""),A.close(),g=A.body}catch{g=createPopup().document.body}var B=g.createTextRange();et=_0(function(K){try{g.style.color=J(K).replace(w,$);var H=B.queryCommandValue("ForeColor");return"#"+("000000"+(H=(255&H)<<16|65280&H|(16711680&H)>>>16).toString(16)).slice(-6)}catch{return"none"}})}else{var D=R.doc.createElement("i");D.title="Raphaël Colour Picker",D.style.display="none",R.doc.body.appendChild(D),et=_0(function(K){return D.style.color=K,R.doc.defaultView.getComputedStyle(D,$).getPropertyValue("color")})}return et(h)},n0=function(){return"hsb("+[this.h,this.s,this.b]+")"},i0=function(){return"hsl("+[this.h,this.s,this.l]+")"},dt=function(){return this.hex},a0=function(h,g,w){if(g==null&&u.is(h,"object")&&"r"in h&&"g"in h&&"b"in h&&(w=h.b,g=h.g,h=h.r),g==null&&u.is(h,"string")){var A=u.getRGB(h);h=A.r,g=A.g,w=A.b}return(h>1||g>1||w>1)&&(h/=255,g/=255,w/=255),[h,g,w]},m0=function(h,g,w,A){var B={r:h*=255,g:g*=255,b:w*=255,hex:u.rgb(h,g,w),toString:dt};return u.is(A,"finite")&&(B.opacity=A),B};function _0(h,g,w){return function A(){var B=Array.prototype.slice.call(arguments,0),D=B.join("␀"),K=A.cache=A.cache||{},H=A.count=A.count||[];return K[P](D)?(function(W,te){for(var fe=0,me=W.length;fe=1e3&&delete K[H.shift()],H.push(D),K[D]=h[_](g,B),w?w(K[D]):K[D])}}u.color=function(h){var g;return u.is(h,"object")&&"h"in h&&"s"in h&&"b"in h?(g=u.hsb2rgb(h),h.r=g.r,h.g=g.g,h.b=g.b,h.hex=g.hex):u.is(h,"object")&&"h"in h&&"s"in h&&"l"in h?(g=u.hsl2rgb(h),h.r=g.r,h.g=g.g,h.b=g.b,h.hex=g.hex):(u.is(h,"string")&&(h=u.getRGB(h)),u.is(h,"object")&&"r"in h&&"g"in h&&"b"in h?(g=u.rgb2hsl(h),h.h=g.h,h.s=g.s,h.l=g.l,g=u.rgb2hsb(h),h.v=g.b):(h={hex:"none"}).r=h.g=h.b=h.h=h.s=h.v=h.l=-1),h.toString=dt,h},u.hsb2rgb=function(h,g,w,A){var B,D,K,H,W;return this.is(h,"object")&&"h"in h&&"s"in h&&"b"in h&&(w=h.b,g=h.s,A=h.o,h=h.h),H=(W=w*g)*(1-x((h=(h*=360)%360/60)%2-1)),B=D=K=w-W,m0(B+=[W,H,0,0,H,W][h=~~h],D+=[H,W,W,H,0,0][h],K+=[0,0,H,W,W,H][h],A)},u.hsl2rgb=function(h,g,w,A){var B,D,K,H,W;return this.is(h,"object")&&"h"in h&&"s"in h&&"l"in h&&(w=h.l,g=h.s,h=h.h),(h>1||g>1||w>1)&&(h/=360,g/=100,w/=100),H=(W=2*g*(w<.5?w:1-w))*(1-x((h=(h*=360)%360/60)%2-1)),B=D=K=w-W/2,m0(B+=[W,H,0,0,H,W][h=~~h],D+=[H,W,W,H,0,0][h],K+=[0,0,H,W,W,H][h],A)},u.rgb2hsb=function(h,g,w){var A,B;return h=(w=a0(h,g,w))[0],g=w[1],w=w[2],{h:(((B=(A=I(h,g,w))-c(h,g,w))==0?null:A==h?(g-w)/B:A==g?(w-h)/B+2:(h-g)/B+4)+360)%6*60/360,s:B==0?0:B/A,b:A,toString:n0}},u.rgb2hsl=function(h,g,w){var A,B,D,K;return h=(w=a0(h,g,w))[0],g=w[1],w=w[2],A=((B=I(h,g,w))+(D=c(h,g,w)))/2,{h:(((K=B-D)==0?null:B==h?(g-w)/K:B==g?(w-h)/K+2:(h-g)/K+4)+360)%6*60/360,s:K==0?0:A<.5?K/(2*A):K/(2-2*A),l:A,toString:i0}},u._path2string=function(){return this.join(",").replace(oe,"$1")},u._preload=function(h,g){var w=R.doc.createElement("img");w.style.cssText="position:absolute;left:-9999em;top:-9999em",w.onload=function(){g.call(this),this.onload=null,R.doc.body.removeChild(this)},w.onerror=function(){R.doc.body.removeChild(this)},R.doc.body.appendChild(w),w.src=h};function Ye(){return this.hex}function o0(h,g){for(var w=[],A=0,B=h.length;B-2*!g>A;A+=2){var D=[{x:+h[A-2],y:+h[A-1]},{x:+h[A],y:+h[A+1]},{x:+h[A+2],y:+h[A+3]},{x:+h[A+4],y:+h[A+5]}];g?A?B-4==A?D[3]={x:+h[0],y:+h[1]}:B-2==A&&(D[2]={x:+h[0],y:+h[1]},D[3]={x:+h[2],y:+h[3]}):D[0]={x:+h[B-2],y:+h[B-1]}:B-4==A?D[3]=D[2]:A||(D[0]={x:+h[A],y:+h[A+1]}),w.push(["C",(-D[0].x+6*D[1].x+D[2].x)/6,(-D[0].y+6*D[1].y+D[2].y)/6,(D[1].x+6*D[2].x-D[3].x)/6,(D[1].y+6*D[2].y-D[3].y)/6,D[2].x,D[2].y])}return w}u.getRGB=_0(function(h){if(!h||(h=J(h)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Ye};if(h=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:Ye};!ie[P](h.toLowerCase().substring(0,2))&&h.charAt()!="#"&&(h=et(h));var g,w,A,B,D,K,H=h.match(b);return H?(H[2]&&(A=L(H[2].substring(5),16),w=L(H[2].substring(3,5),16),g=L(H[2].substring(1,3),16)),H[3]&&(A=L((D=H[3].charAt(3))+D,16),w=L((D=H[3].charAt(2))+D,16),g=L((D=H[3].charAt(1))+D,16)),H[4]&&(K=H[4][ee](re),g=p(K[0]),K[0].slice(-1)=="%"&&(g*=2.55),w=p(K[1]),K[1].slice(-1)=="%"&&(w*=2.55),A=p(K[2]),K[2].slice(-1)=="%"&&(A*=2.55),H[1].toLowerCase().slice(0,4)=="rgba"&&(B=p(K[3])),K[3]&&K[3].slice(-1)=="%"&&(B/=100)),H[5]?(K=H[5][ee](re),g=p(K[0]),K[0].slice(-1)=="%"&&(g*=2.55),w=p(K[1]),K[1].slice(-1)=="%"&&(w*=2.55),A=p(K[2]),K[2].slice(-1)=="%"&&(A*=2.55),(K[0].slice(-3)=="deg"||K[0].slice(-1)=="°")&&(g/=360),H[1].toLowerCase().slice(0,4)=="hsba"&&(B=p(K[3])),K[3]&&K[3].slice(-1)=="%"&&(B/=100),u.hsb2rgb(g,w,A,B)):H[6]?(K=H[6][ee](re),g=p(K[0]),K[0].slice(-1)=="%"&&(g*=2.55),w=p(K[1]),K[1].slice(-1)=="%"&&(w*=2.55),A=p(K[2]),K[2].slice(-1)=="%"&&(A*=2.55),(K[0].slice(-3)=="deg"||K[0].slice(-1)=="°")&&(g/=360),H[1].toLowerCase().slice(0,4)=="hsla"&&(B=p(K[3])),K[3]&&K[3].slice(-1)=="%"&&(B/=100),u.hsl2rgb(g,w,A,B)):((H={r:g,g:w,b:A,toString:Ye}).hex="#"+(16777216|A|w<<8|g<<16).toString(16).slice(1),u.is(B,"finite")&&(H.opacity=B),H)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Ye}},u),u.hsb=_0(function(h,g,w){return u.hsb2rgb(h,g,w).hex}),u.hsl=_0(function(h,g,w){return u.hsl2rgb(h,g,w).hex}),u.rgb=_0(function(h,g,w){function A(B){return B+.5|0}return"#"+(16777216|A(w)|A(g)<<8|A(h)<<16).toString(16).slice(1)}),u.getColor=function(h){var g=this.getColor.start=this.getColor.start||{h:0,s:1,b:h||.75},w=this.hsb2rgb(g.h,g.s,g.b);return g.h+=.075,g.h>1&&(g.h=0,g.s-=.2,g.s<=0&&(this.getColor.start={h:0,s:1,b:g.b})),w.hex},u.getColor.reset=function(){delete this.start},u.parsePathString=function(h){if(!h)return null;var g=$0(h);if(g.arr)return De(g.arr);var w={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},A=[];return u.is(h,F)&&u.is(h[0],F)&&(A=De(h)),A.length||J(h).replace(Se,function(B,D,K){var H=[],W=D.toLowerCase();if(K.replace(Ae,function(te,fe){fe&&H.push(+fe)}),W=="m"&&H.length>2&&(A.push([D][M](H.splice(0,2))),W="l",D=D=="m"?"l":"L"),W=="r")A.push([D][M](H));else for(;H.length>=w[W]&&(A.push([D][M](H.splice(0,w[W]))),w[W]););}),A.toString=u._path2string,g.arr=De(A),A},u.parseTransformString=_0(function(h){if(!h)return null;var g=[];return u.is(h,F)&&u.is(h[0],F)&&(g=De(h)),g.length||J(h).replace(be,function(w,A,B){var D=[];N.call(A),B.replace(Ae,function(K,H){H&&D.push(+H)}),g.push([A][M](D))}),g.toString=u._path2string,g},this,function(h){if(!h)return h;for(var g=[],w=0;w1?1:W<0?0:W)/2,fe=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],me=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],de=0,le=0;le<12;le++){var he=te*fe[le]+te,ye=s0(he,h,w,B,K),pe=s0(he,g,A,D,H),ce=ye*ye+pe*pe;de+=me[le]*X.sqrt(ce)}return te*de}function ht(h,g,w,A,B,D,K,H){if(!(I(h,w)I(B,K)||I(g,A)I(D,H))){var W=(h-w)*(D-H)-(g-A)*(B-K);if(W){var te=((h*A-g*w)*(B-K)-(h-w)*(B*H-D*K))/W,fe=((h*A-g*w)*(D-H)-(g-A)*(B*H-D*K))/W,me=+te.toFixed(2),de=+fe.toFixed(2);if(!(me<+c(h,w).toFixed(2)||me>+I(h,w).toFixed(2)||me<+c(B,K).toFixed(2)||me>+I(B,K).toFixed(2)||de<+c(g,A).toFixed(2)||de>+I(g,A).toFixed(2)||de<+c(D,H).toFixed(2)||de>+I(D,H).toFixed(2)))return{x:te,y:fe}}}}function u0(h,g,w){var A=u.bezierBBox(h),B=u.bezierBBox(g);if(!u.isBBoxIntersect(A,B))return w?0:[];for(var D=Ve.apply(0,h),K=Ve.apply(0,g),H=I(~~(D/5),1),W=I(~~(K/5),1),te=[],fe=[],me={},de=w?0:[],le=0;le=0&&Le<=1.001&&$e>=0&&$e<=1.001&&(w?de++:de.push({x:ze.x,y:ze.y,t1:c(Le,1),t2:c($e,1)}))}}return de}function d0(h,g,w){h=u._path2curve(h),g=u._path2curve(g);for(var A,B,D,K,H,W,te,fe,me,de,le=w?0:[],he=0,ye=h.length;heTe||ce=h.x&&g<=h.x2&&w>=h.y&&w<=h.y2},u.isBBoxIntersect=function(h,g){var w=u.isPointInsideBBox;return w(g,h.x,h.y)||w(g,h.x2,h.y)||w(g,h.x,h.y2)||w(g,h.x2,h.y2)||w(h,g.x,g.y)||w(h,g.x2,g.y)||w(h,g.x,g.y2)||w(h,g.x2,g.y2)||(h.xg.x||g.xh.x)&&(h.yg.y||g.yh.y)},u.pathIntersection=function(h,g){return d0(h,g)},u.pathIntersectionNumber=function(h,g){return d0(h,g,1)},u.isPointInsidePath=function(h,g,w){var A=u.pathBBox(h);return u.isPointInsideBBox(A,g,w)&&d0(h,[["M",g,w],["H",A.x2+10]],1)%2==1},u._removedFactory=function(h){return function(){s("raphael.log",null,"Raphaël: you are calling to method “"+h+"” of removed object",h)}};var tt=u.pathBBox=function(h){var g=$0(h);if(g.bbox)return T0(g.bbox);if(!h)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var w,A=0,B=0,D=[],K=[],H=0,W=(h=pt(h)).length;H1&&(w*=ce=X.sqrt(ce),A*=ce);var Te=w*w,ge=A*A,we=(D==K?-1:1)*X.sqrt(x((Te*ge-Te*pe*pe-ge*ye*ye)/(Te*pe*pe+ge*ye*ye))),xe=we*w*pe/A+(h+H)/2,ze=we*-A*ye/w+(g+W)/2,Le=X.asin(((g-ze)/A).toFixed(9)),$e=X.asin(((W-ze)/A).toFixed(9));(Le=h$e&&(Le-=2*k),!K&&$e>Le&&($e-=2*k)}var q6=$e-Le;if(x(q6)>me){var h2=$e,Vt=H,rr=W;$e=Le+me*(K&&$e>Le?1:-1),H=xe+w*X.cos($e),W=ze+A*X.sin($e),le=gt(H,W,w,A,B,0,K,Vt,rr,[$e,h2,xe,ze])}q6=$e-Le;var H6=X.cos(Le),K6=X.sin(Le),ro=X.cos($e),Or=X.sin($e),r6=X.tan(q6/4),no=4/3*w*r6,sc=4/3*A*r6,uc=[h,g],G6=[h+no*K6,g-sc*H6],lc=[H+no*Or,W-sc*ro],fc=[H,W];if(G6[0]=2*uc[0]-G6[0],G6[1]=2*uc[1]-G6[1],te)return[G6,lc,fc][M](le);for(var cc=[],un=0,tm=(le=[G6,lc,fc][M](le).join()[ee](",")).length;un"1e12"&&(de=.5),x(le)>"1e12"&&(le=.5),de>0&&de<1&&(W=t0(h,g,w,A,B,D,K,H,de),ye.push(W.x),he.push(W.y)),le>0&&le<1&&(W=t0(h,g,w,A,B,D,K,H,le),ye.push(W.x),he.push(W.y)),te=D-2*A+g-(H-2*D+A),me=g-A,de=(-(fe=2*(A-g)-2*(D-A))+X.sqrt(fe*fe-4*te*me))/2/te,le=(-fe-X.sqrt(fe*fe-4*te*me))/2/te,x(de)>"1e12"&&(de=.5),x(le)>"1e12"&&(le=.5),de>0&&de<1&&(W=t0(h,g,w,A,B,D,K,H,de),ye.push(W.x),he.push(W.y)),le>0&&le<1&&(W=t0(h,g,w,A,B,D,K,H,le),ye.push(W.x),he.push(W.y)),{min:{x:c[_](0,ye),y:c[_](0,he)},max:{x:I[_](0,ye),y:I[_](0,he)}}}),pt=u._path2curve=_0(function(h,g){var w=!g&&$0(h);if(!g&&w.curve)return De(w.curve);for(var A=ut(h),B=g&&ut(g),D={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},K={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},H=function(we,xe,ze){var Le,$e;if(!we)return["C",xe.x,xe.y,xe.x,xe.y,xe.x,xe.y];switch(!(we[0]in{T:1,Q:1})&&(xe.qx=xe.qy=null),we[0]){case"M":xe.X=we[1],xe.Y=we[2];break;case"A":we=["C"][M](gt[_](0,[xe.x,xe.y][M](we.slice(1))));break;case"S":ze=="C"||ze=="S"?(Le=2*xe.x-xe.bx,$e=2*xe.y-xe.by):(Le=xe.x,$e=xe.y),we=["C",Le,$e][M](we.slice(1));break;case"T":ze=="Q"||ze=="T"?(xe.qx=2*xe.x-xe.qx,xe.qy=2*xe.y-xe.qy):(xe.qx=xe.x,xe.qy=xe.y),we=["C"][M](Xe(xe.x,xe.y,xe.qx,xe.qy,we[1],we[2]));break;case"Q":xe.qx=we[1],xe.qy=we[2],we=["C"][M](Xe(xe.x,xe.y,we[1],we[2],we[3],we[4]));break;case"L":we=["C"][M](l0(xe.x,xe.y,we[1],we[2]));break;case"H":we=["C"][M](l0(xe.x,xe.y,we[1],xe.y));break;case"V":we=["C"][M](l0(xe.x,xe.y,xe.x,we[1]));break;case"Z":we=["C"][M](l0(xe.x,xe.y,xe.X,xe.Y))}return we},W=function(we,xe){if(we[xe].length>7){we[xe].shift();for(var ze=we[xe];ze.length;)fe[xe]="A",B&&(me[xe]="A"),we.splice(xe++,0,["C"][M](ze.splice(0,6)));we.splice(xe,1),ye=I(A.length,B&&B.length||0)}},te=function(we,xe,ze,Le,$e){we&&xe&&we[$e][0]=="M"&&xe[$e][0]!="M"&&(xe.splice($e,0,["M",Le.x,Le.y]),ze.bx=0,ze.by=0,ze.x=we[$e][1],ze.y=we[$e][2],ye=I(A.length,B&&B.length||0))},fe=[],me=[],de="",le="",he=0,ye=I(A.length,B&&B.length||0);he.01;)Te=Ve(te,fe,me,de,le,he,ye,pe,we+=(TeA){if(g&&!me.start){if(fe+=["C"+(te=Jn(D,K,H[1],H[2],H[3],H[4],H[5],H[6],A-de)).start.x,te.start.y,te.m.x,te.m.y,te.x,te.y],B)return fe;me.start=fe,fe=["M"+te.x,te.y+"C"+te.n.x,te.n.y,te.end.x,te.end.y,H[5],H[6]].join(),de+=W,D=+H[5],K=+H[6];continue}if(!h&&!g)return{x:(te=Jn(D,K,H[1],H[2],H[3],H[4],H[5],H[6],A-de)).x,y:te.y,alpha:te.alpha}}de+=W,D=+H[5],K=+H[6]}fe+=H.shift()+H}return me.end=fe,(te=h?de:g?me:u.findDotsAtSegment(D,K,H[0],H[1],H[2],H[3],H[4],H[5],1)).alpha&&(te={x:te.x,y:te.y,alpha:te.alpha}),te}},D6=Yn(1),z6=Yn(),Xn=Yn(0,1);u.getTotalLength=D6,u.getPointAtLength=z6,u.getSubpath=function(h,g,w){if(this.getTotalLength(h)-w<1e-6)return Xn(h,g).end;var A=Xn(h,w,1);return g?Xn(A,g).end:A},Qe.getTotalLength=function(){var h=this.getPath();if(h)return this.node.getTotalLength?this.node.getTotalLength():D6(h)},Qe.getPointAtLength=function(h){var g=this.getPath();if(g)return z6(g,h)},Qe.getPath=function(){var h,g=u._getPath[this.type];if(this.type!="text"&&this.type!="set")return g&&(h=g(this)),h},Qe.getSubpath=function(h,g){var w=this.getPath();if(w)return u.getSubpath(w,h,g)};var vt=u.easing_formulas={linear:function(h){return h},"<":function(h){return U(h,1.7)},">":function(h){return U(h,.48)},"<>":function(h){var g=.48-h/1.04,w=X.sqrt(.1734+g*g),A=w-g,B=-w-g,D=U(x(A),1/3)*(A<0?-1:1)+U(x(B),1/3)*(B<0?-1:1)+.5;return 3*(1-D)*D*D+D*D*D},backIn:function(h){var g=1.70158;return h*h*((g+1)*h-g)},backOut:function(h){var g=1.70158;return(h-=1)*h*((g+1)*h+g)+1},elastic:function(h){return h==!!h?h:U(2,-10*h)*X.sin(2*k*(h-.075)/.3)+1},bounce:function(h){var g=7.5625,w=2.75;return h<1/w?g*h*h:h<2/w?g*(h-=1.5/w)*h+.75:h<2.5/w?g*(h-=2.25/w)*h+.9375:g*(h-=2.625/w)*h+.984375}};vt.easeIn=vt["ease-in"]=vt["<"],vt.easeOut=vt["ease-out"]=vt[">"],vt.easeInOut=vt["ease-in-out"]=vt["<>"],vt["back-in"]=vt.backIn,vt["back-out"]=vt.backOut;var Ze=[],$6=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(h){setTimeout(h,16)},Zn=function(){for(var h=+new Date,g=0;g1&&!w.next){for(B in fe)fe[P](B)&&(le[B]=w.totalOrigin[B]);w.el.attr(le),c2(w.anim,w.el,w.anim.percents[0],null,w.totalOrigin,w.repeat-1)}w.next&&!w.stop&&c2(w.anim,w.el,w.next,null,w.totalOrigin,w.repeat)}}}Ze.length&&$6(Zn)},e6=function(h){return h>255?255:h<0?0:h};function f2(h,g,w,A,B,D){var K=3*g,H=3*(A-g)-K,W=1-K-H,te=3*w,fe=3*(B-w)-te,me=1-te-fe;function de(le){return((W*le+H)*le+K)*le}return function(le,he){var ye=function(pe,ce){var Te,ge,we,xe,ze,Le;for(we=pe,Le=0;Le<8;Le++){if(xe=de(we)-pe,x(xe)ge)return ge;for(;Texe?Te=we:ge=we,we=(ge-Te)/2+Te}return we}(le,he);return((me*ye+fe)*ye+te)*ye}(h,1/(200*D))}function Ur(h,g){var w=[],A={};if(this.ms=g,this.times=1,h){for(var B in h)h[P](B)&&(A[p(B)]=h[B],w.push(p(B)));w.sort(Oe)}this.anim=A,this.top=w[w.length-1],this.percents=w}function c2(h,g,w,A,B,D){w=p(w);var K,H,W,te,fe,me,de=h.ms,le={},he={},ye={};if(A)for(ce=0,Te=Ze.length;ceA*h.top){w=h.percents[ce],fe=h.percents[ce-1]||0,de=de/h.top*(w-fe),te=h.percents[ce+1],K=h.anim[w];break}A&&g.attr(h.anim[h.percents[ce]])}if(K){if(H)H.initstatus=A,H.start=new Date-H.ms*A;else{for(var ge in K)if(K[P](ge)&&(G[P](ge)||g.paper.customAttributes[P](ge)))switch(le[ge]=g.attr(ge),le[ge]==null&&(le[ge]=V[ge]),he[ge]=K[ge],G[ge]){case T:ye[ge]=(he[ge]-le[ge])/de;break;case"colour":le[ge]=u.getRGB(le[ge]);var we=u.getRGB(he[ge]);ye[ge]={r:(we.r-le[ge].r)/de,g:(we.g-le[ge].g)/de,b:(we.b-le[ge].b)/de};break;case"path":var xe=pt(le[ge],he[ge]),ze=xe[1];for(le[ge]=xe[0],ye[ge]=[],ce=0,Te=le[ge].length;ceH&&(H=te)}!h[H+="%"].callback&&(h[H].callback=A)}return new Ur(h,g)},Qe.animate=function(h,g,w,A){if(this.removed)return A&&A.call(this),this;var B=h instanceof Ur?h:u.animation(h,g,w,A);return c2(B,this,B.percents[0],null,this.attr()),this},Qe.setTime=function(h,g){return h&&g!=null&&this.status(h,c(g,h.ms)/h.ms),this},Qe.status=function(h,g){var w,A,B=[],D=0;if(g!=null)return c2(h,this,-1,c(g,1)),this;for(w=Ze.length;D1)for(var Y=0,J=$.length;Y.5)-1;R(p-.5,2)+R(L-.5,2)>.25&&(L=v.sqrt(.25-R(p-.5,2))*Be+.5)&&L!=.5&&(L=L.toFixed(5)-1e-5*Be)}return _})).split(/\s*\-\s*/),m=="linear"){var ie=l.shift();if(ie=-d(ie),isNaN(ie))return null;var oe=[0,0,v.cos(s.rad(ie)),v.sin(s.rad(ie))],Se=1/(E(P(oe[2]),P(oe[3]))||1);oe[2]*=Se,oe[3]*=Se,oe[2]<0&&(oe[0]=-oe[2],oe[2]=0),oe[3]<0&&(oe[1]=-oe[3],oe[3]=0)}var be=s._parseDots(l);if(!be)return null;if(S=S.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&S!=b.gradient.id&&(V.defs.removeChild(b.gradient),delete b.gradient),!b.gradient){re=J(m+"Gradient",{id:S}),b.gradient=re,J(re,m=="radial"?{fx:p,fy:L}:{x1:oe[0],y1:oe[1],x2:oe[2],y2:oe[3],gradientTransform:b.matrix.invert()}),V.defs.appendChild(re);for(var Ae=0,je=be.length;Ae1?Pe.opacity/100:Pe.opacity});case"stroke":Pe=s.getRGB(j),m.setAttribute(L,Pe.hex),L=="stroke"&&Pe[u]("opacity")&&J(m,{"stroke-opacity":Pe.opacity>1?Pe.opacity/100:Pe.opacity}),L=="stroke"&&b._.arrows&&("startString"in b._.arrows&&N(b,b._.arrows.startString),"endString"in b._.arrows&&N(b,b._.arrows.endString,1));break;case"gradient":(b.type=="circle"||b.type=="ellipse"||f(j).charAt()!="r")&&ee(b,j);break;case"opacity":S.gradient&&!S[u]("stroke-opacity")&&J(m,{"stroke-opacity":j>1?j/100:j});case"fill-opacity":if(S.gradient){(Be=s._g.doc.getElementById(m.getAttribute("fill").replace(/^url\(#|\)$/g,_)))&&(Ne=Be.getElementsByTagName("stop"),J(Ne[Ne.length-1],{"stop-opacity":j}));break}default:L=="font-size"&&(j=y(j,10)+"px");var e0=L.replace(/(\-.)/g,function(Ie){return Ie.substring(1).toUpperCase()});m.style[e0]=j,b._.dirty=1,m.setAttribute(L,j)}}x(b,l),m.style.visibility=p},x=function(b,l){if(b.type=="text"&&(l[u]("text")||l[u]("font")||l[u]("font-size")||l[u]("x")||l[u]("y"))){var m=b.attrs,S=b.node,p=S.firstChild?y(s._g.doc.defaultView.getComputedStyle(S.firstChild,_).getPropertyValue("font-size"),10):10;if(l[u]("text")){for(m.text=l.text;S.firstChild;)S.removeChild(S.firstChild);for(var L,j=f(l.text).split(` -`),V=[],G=0,re=j.length;G"));var i0=et.getBoundingClientRect();G.W=p.w=(i0.right-i0.left)/100,G.H=p.h=(i0.bottom-i0.top)/100,G.X=p.x,G.Y=p.y+G.H/2,("x"in m||"y"in m)&&(G.path.v=s.format("m{0},{1}l{2},{1}",v(p.x*ae),v(p.y*ae),v(p.x*ae)+1));for(var dt=["x","y","text","font","font-family","font-weight","font-style","font-size"],a0=0,m0=dt.length;a0.25&&(Ae=y.sqrt(.25-p(be-.5,2))*(2*(Ae>.5)-1)+.5),j=be+_+Ae),M})).split(/\s*\-\s*/),L=="linear"){var V=m.shift();if(V=-d(V),isNaN(V))return null}var G=s._parseDots(m);if(!G)return null;if(l=l.shape||l.node,G.length){l.removeChild(S),S.on=!0,S.method="none",S.color=G[0].color,S.color2=G[G.length-1].color;for(var re=[],ie=0,oe=G.length;ie')}}catch{c=function(p){return m.createElement("<"+p+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},s._engine.initWin(s._g.win),s._engine.create=function(){var l=s._getContainer.apply(0,arguments),m=l.container,S=l.height,p=l.width,L=l.x,j=l.y;if(!m)throw new Error("VML container not found.");var V=new s._Paper,G=V.canvas=s._g.doc.createElement("div"),re=G.style;return L=L||0,j=j||0,p=p||512,S=S||342,V.width=p,V.height=S,p==+p&&(p+="px"),S==+S&&(S+="px"),V.coordsize=216e5+_+216e5,V.coordorigin="0 0",V.span=s._g.doc.createElement("span"),V.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",G.appendChild(V.span),re.cssText=s.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",p,S),m==1?(s._g.doc.body.appendChild(G),re.left=L+"px",re.top=j+"px",re.position="absolute"):m.firstChild?m.insertBefore(G,m.firstChild):m.appendChild(G),V.renderfix=function(){},V},s.prototype.clear=function(){s.eve("raphael.clear",this),this.canvas.innerHTML=M,this.span=s._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},s.prototype.remove=function(){for(var l in s.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[l]=typeof this[l]=="function"?s._removedFactory(l):null;return!0};var q=s.st;for(var b in F)F[u](b)&&!q[u](b)&&(q[b]=function(l){return function(){var m=arguments;return this.forEach(function(S){S[l].apply(S,m)})}}(b))}}).apply(n,a))===void 0||(r.exports=o)}])})})(jb);var vO=jb.exports,wO=vO;function AO(t){var e=document.createElement("div");e.style.borderRadius="50px",e.style.overflow="hidden",e.style.padding="0px",e.style.margin="0px",e.style.width=""+t+"px",e.style.height=""+t+"px",e.style.display="inline-block";var r=wO(e,100,100);return{paper:r,container:e}}var EO=AO,Db={exports:{}};(function(t){var e=function(){function r(u,f,d,y){typeof f=="object"&&(d=f.depth,y=f.prototype,f.filter,f=f.circular);var v=[],E=[],P=typeof Buffer<"u";typeof f>"u"&&(f=!0),typeof d>"u"&&(d=1/0);function R(O,C){if(O===null)return null;if(C==0)return O;var _,M;if(typeof O!="object")return O;if(r.__isArray(O))_=[];else if(r.__isRegExp(O))_=new RegExp(O.source,s(O)),O.lastIndex&&(_.lastIndex=O.lastIndex);else if(r.__isDate(O))_=new Date(O.getTime());else{if(P&&Buffer.isBuffer(O))return Buffer.allocUnsafe?_=Buffer.allocUnsafe(O.length):_=new Buffer(O.length),O.copy(_),_;typeof y>"u"?(M=Object.getPrototypeOf(O),_=Object.create(M)):(_=Object.create(y),M=y)}if(f){var z=v.indexOf(O);if(z!=-1)return E[z];v.push(O),E.push(_)}for(var $ in O){var Y;M&&(Y=Object.getOwnPropertyDescriptor(M,$)),!(Y&&Y.set==null)&&(_[$]=R(O[$],C-1))}return _}return R(u,d)}r.clonePrototype=function(f){if(f===null)return null;var d=function(){};return d.prototype=f,new d};function n(u){return Object.prototype.toString.call(u)}r.__objToStr=n;function i(u){return typeof u=="object"&&n(u)==="[object Date]"}r.__isDate=i;function a(u){return typeof u=="object"&&n(u)==="[object Array]"}r.__isArray=a;function o(u){return typeof u=="object"&&n(u)==="[object RegExp]"}r.__isRegExp=o;function s(u){var f="";return u.global&&(f+="g"),u.ignoreCase&&(f+="i"),u.multiline&&(f+="m"),f}return r.__getRegExpFlags=s,r}();t.exports&&(t.exports=e)})(Db);var _O=Db.exports,zb={exports:{}},kO={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},x6=kO,$b={};for(var G8 in x6)x6.hasOwnProperty(G8)&&($b[x6[G8]]=G8);var Re=zb.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var Qt in Re)if(Re.hasOwnProperty(Qt)){if(!("channels"in Re[Qt]))throw new Error("missing channels property: "+Qt);if(!("labels"in Re[Qt]))throw new Error("missing channel labels property: "+Qt);if(Re[Qt].labels.length!==Re[Qt].channels)throw new Error("channel and label counts mismatch: "+Qt);var SO=Re[Qt].channels,TO=Re[Qt].labels;delete Re[Qt].channels,delete Re[Qt].labels,Object.defineProperty(Re[Qt],"channels",{value:SO}),Object.defineProperty(Re[Qt],"labels",{value:TO})}Re.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i,s,u,f;return a===i?s=0:e===a?s=(r-n)/o:r===a?s=2+(n-e)/o:n===a&&(s=4+(e-r)/o),s=Math.min(s*60,360),s<0&&(s+=360),f=(i+a)/2,a===i?u=0:f<=.5?u=o/(a+i):u=o/(2-a-i),[s,u*100,f*100]};Re.rgb.hsv=function(t){var e,r,n,i,a,o=t[0]/255,s=t[1]/255,u=t[2]/255,f=Math.max(o,s,u),d=f-Math.min(o,s,u),y=function(v){return(f-v)/6/d+1/2};return d===0?i=a=0:(a=d/f,e=y(o),r=y(s),n=y(u),o===f?i=n-r:s===f?i=1/3+e-n:u===f&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,a*100,f*100]};Re.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=Re.rgb.hsl(t)[0],a=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,a*100,n*100]};Re.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i,a,o,s;return s=Math.min(1-e,1-r,1-n),i=(1-e-s)/(1-s)||0,a=(1-r-s)/(1-s)||0,o=(1-n-s)/(1-s)||0,[i*100,a*100,o*100,s*100]};function CO(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}Re.rgb.keyword=function(t){var e=$b[t];if(e)return e;var r=1/0,n;for(var i in x6)if(x6.hasOwnProperty(i)){var a=x6[i],o=CO(t,a);o.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+r*.3576+n*.1805,a=e*.2126+r*.7152+n*.0722,o=e*.0193+r*.1192+n*.9505;return[i*100,a*100,o*100]};Re.rgb.lab=function(t){var e=Re.rgb.xyz(t),r=e[0],n=e[1],i=e[2],a,o,s;return r/=95.047,n/=100,i/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,a=116*n-16,o=500*(r-n),s=200*(n-i),[a,o,s]};Re.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,a,o,s,u;if(r===0)return u=n*255,[u,u,u];n<.5?a=n*(1+r):a=n+r-n*r,i=2*n-a,s=[0,0,0];for(var f=0;f<3;f++)o=e+1/3*-(f-1),o<0&&o++,o>1&&o--,6*o<1?u=i+(a-i)*6*o:2*o<1?u=a:3*o<2?u=i+(a-i)*(2/3-o)*6:u=i,s[f]=u*255;return s};Re.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,a=Math.max(n,.01),o,s;return n*=2,r*=n<=1?n:2-n,i*=a<=1?a:2-a,s=(n+r)/2,o=n===0?2*i/(a+i):2*r/(n+r),[e,o*100,s*100]};Re.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,a=e-Math.floor(e),o=255*n*(1-r),s=255*n*(1-r*a),u=255*n*(1-r*(1-a));switch(n*=255,i){case 0:return[n,u,o];case 1:return[s,n,o];case 2:return[o,n,u];case 3:return[o,s,n];case 4:return[u,o,n];case 5:return[n,o,s]}};Re.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),a,o,s;return s=(2-r)*n,a=(2-r)*i,o=r*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};Re.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,a,o,s,u;i>1&&(r/=i,n/=i),a=Math.floor(6*e),o=1-n,s=6*e-a,a&1&&(s=1-s),u=r+s*(o-r);var f,d,y;switch(a){default:case 6:case 0:f=o,d=u,y=r;break;case 1:f=u,d=o,y=r;break;case 2:f=r,d=o,y=u;break;case 3:f=r,d=u,y=o;break;case 4:f=u,d=r,y=o;break;case 5:f=o,d=r,y=u;break}return[f*255,d*255,y*255]};Re.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,a,o,s;return a=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),s=1-Math.min(1,n*(1-i)+i),[a*255,o*255,s*255]};Re.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i,a,o;return i=e*3.2406+r*-1.5372+n*-.4986,a=e*-.9689+r*1.8758+n*.0415,o=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[i*255,a*255,o*255]};Re.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],i,a,o;return e/=95.047,r/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*r-16,a=500*(e-r),o=200*(r-n),[i,a,o]};Re.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],i,a,o;a=(e+16)/116,i=r/500+a,o=a-n/200;var s=Math.pow(a,3),u=Math.pow(i,3),f=Math.pow(o,3);return a=s>.008856?s:(a-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,o=f>.008856?f:(o-16/116)/7.787,i*=95.047,a*=100,o*=108.883,[i,a,o]};Re.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],i,a,o;return i=Math.atan2(n,r),a=i*360/2/Math.PI,a<0&&(a+=360),o=Math.sqrt(r*r+n*n),[e,o,a]};Re.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],i,a,o;return o=n/360*2*Math.PI,i=r*Math.cos(o),a=r*Math.sin(o),[e,i,a]};Re.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],i=1 in arguments?arguments[1]:Re.rgb.hsv(t)[2];if(i=Math.round(i/50),i===0)return 30;var a=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return i===2&&(a+=60),a};Re.hsv.ansi16=function(t){return Re.rgb.ansi16(Re.hsv.rgb(t),t[2])};Re.rgb.ansi256=function(t){var e=t[0],r=t[1],n=t[2];if(e===r&&r===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5);return i};Re.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,a=(e>>2&1)*r*255;return[n,i,a]};Re.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,n=Math.floor(t/36)/5*255,i=Math.floor((r=t%36)/6)/5*255,a=r%6/5*255;return[n,i,a]};Re.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};Re.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(s){return s+s}).join(""));var n=parseInt(r,16),i=n>>16&255,a=n>>8&255,o=n&255;return[i,a,o]};Re.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),a=Math.min(Math.min(e,r),n),o=i-a,s,u;return o<1?s=a/(1-o):s=0,o<=0?u=0:i===e?u=(r-n)/o%6:i===r?u=2+(n-e)/o:u=4+(e-r)/o+4,u/=6,u%=1,[u*360,o*100,s*100]};Re.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1,i=0;return r<.5?n=2*e*r:n=2*e*(1-r),n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};Re.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};Re.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];var i=[0,0,0],a=e%1*6,o=a%1,s=1-o,u=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};Re.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};Re.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,n=r*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};Re.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};Re.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1-r,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],i*100,a*100]};Re.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};Re.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};Re.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};Re.gray.hsl=Re.gray.hsv=function(t){return[0,0,t[0]]};Re.gray.hwb=function(t){return[0,100,t[0]]};Re.gray.cmyk=function(t){return[0,0,0,t[0]]};Re.gray.lab=function(t){return[t[0],0,0]};Re.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,n=r.toString(16).toUpperCase();return"000000".substring(n.length)+n};Re.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]};var qb=zb.exports,i5=qb;function PO(){for(var t={},e=Object.keys(i5),r=e.length,n=0;n1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function LO(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var n=t(r);if(typeof n=="object")for(var i=n.length,a=0;ar?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){return this.values.hsl[2]+=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},darken:function(t){return this.values.hsl[2]-=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},saturate:function(t){return this.values.hsl[1]+=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},desaturate:function(t){return this.values.hsl[1]-=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},whiten:function(t){return this.values.hwb[1]+=this.values.hwb[1]*t,this.setValues("hwb",this.values.hwb),this},blacken:function(t){return this.values.hwb[2]+=this.values.hwb[2]*t,this.setValues("hwb",this.values.hwb),this},greyscale:function(){var t=this.values.rgb,e=t[0]*.3+t[1]*.59+t[2]*.11;return this.setValues("rgb",[e,e,e]),this},clearer:function(t){return this.setValues("alpha",this.values.alpha-this.values.alpha*t),this},opaquer:function(t){return this.setValues("alpha",this.values.alpha+this.values.alpha*t),this},rotate:function(t){var e=this.values.hsl[0];return e=(e+t)%360,e=e<0?360+e:e,this.values.hsl[0]=e,this.setValues("hsl",this.values.hsl),this},mix:function(t,e){var r=this,n=t,i=e===void 0?.5:e,a=2*i-1,o=r.alpha()-n.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,u=1-s;return this.rgb(s*r.red()+u*n.red(),s*r.green()+u*n.green(),s*r.blue()+u*n.blue()).alpha(r.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t=new _r;return t.values=JO(this.values),t}};_r.prototype.getValues=function(t){for(var e={},r=0;r{const n=ne.useRef(null);return ne.useEffect(()=>{if(t&&n.current){const i=parseInt(t.slice(2,10),16),a=lR(e,i);n.current.innerHTML="",n.current.appendChild(a)}},[t,e]),Q.jsx("div",{...r,ref:n})},{useChainId:cR}=O1;function dR({account:t,networkName:e,changeConnectedAccount:r,changeToNodeChain:n}){const i=cR(),a=u=>`${u.substring(0,6)}...${u.substring(u.length-4)}`,o=u=>{switch(u){case"Ethereum":return Q.jsx("img",{className:"network-icon",src:mO,alt:u});case"Optimism":return Q.jsx("img",{className:"network-icon",src:Fb,alt:u});case"Arbitrum":return Q.jsx("img",{className:"network-icon",src:yO,alt:u});case"Sepolia":return Q.jsx("img",{className:"network-icon",src:Lb,alt:u});default:return Q.jsx("img",{className:"network-icon",src:gO,alt:u})}},s=ne.useCallback(()=>{window.alert(`The KNS Contract Address is: ${I2[i||""]||"unavailable on "+e}`)},[i,e]);return Q.jsxs("div",{className:"flex gap-4",children:[Q.jsxs("button",{onClick:r,className:"font-mono clear flex place-items-center max-w-1/3",children:[Q.jsx(fR,{address:t||"",diameter:24,className:"mr-4"})," ",a(t||"")]}),Q.jsxs("button",{onClick:n,className:"clear max-w-1/3 z-10",children:[o(e),Q.jsx("div",{className:"ml-2",children:e})]}),Q.jsx("button",{onClick:s,className:"clear max-w-1/3",children:"KNS Contract"})]})}var Jb={exports:{}};/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var a="",o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function mR(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a=0)&&(r[i]=t[i]);return r}function a5(){return a5=Object.assign?Object.assign.bind():function(t){for(var e=1;e$r.createElement(e.tag,o5({key:r},e.attr),Xb(e.child)))}function Zb(t){return e=>$r.createElement(vR,a5({attr:o5({},t.attr)},e),Xb(t.child))}function vR(t){var e=r=>{var{attr:n,size:i,title:a}=t,o=bR(t,pR),s=i||r.size||"1em",u;return r.className&&(u=r.className),t.className&&(u=(u?u+" ":"")+t.className),$r.createElement("svg",a5({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:u,style:o5(o5({color:t.color||r.color},r.style),t.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&$r.createElement("title",null,a),t.children)};return p4!==void 0?$r.createElement(p4.Consumer,null,r=>e(r)):e(Yb)}function wR(t){return Zb({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M80 160c0-35.3 28.7-64 64-64h32c35.3 0 64 28.7 64 64v3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74V320c0 17.7 14.3 32 32 32s32-14.3 32-32v-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7V160c0-70.7-57.3-128-128-128H144C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"},child:[]}]})(t)}function AR(t){return Zb({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"},child:[]}]})(t)}const L6=({text:t,button:e,className:r,position:n})=>{const[i,a]=ne.useState(!1);return Q.jsxs("div",{className:In("flex place-items-center place-content-center text-sm relative cursor-pointer shrink",r),children:[Q.jsx("div",{onClick:()=>a(!i),children:e||Q.jsx("button",{className:"icon ml-4",type:"button",children:Q.jsx(wR,{})})}),Q.jsx("div",{className:In("absolute rounded bg-black p-2 min-w-[200px] z-10",{"!hidden":!i,"top-8":n==="top"||!n,"bottom-8":n==="bottom","right-8":n==="left","left-8":n==="right"}),children:t}),Q.jsx("button",{type:"button",className:In("absolute bg-black icon right-0 top-0",{"!hidden":!i}),onClick:()=>a(!1),children:Q.jsx(AR,{})})]})},tc=()=>window.innerWidth<=600,{useIsActivating:ER,useChainId:_R}=O1;function sn({header:t,closeConnect:e,nodeChainId:r,hideConnect:n=!1}){const{account:i,isActive:a}=_5.useWeb3React(),o=ER(),s=_R(),[u,f]=ne.useState("");ne.useEffect(()=>{f(Kr((s||1).toString()))},[s]);const d=ne.useCallback(async()=>{e(),await Lf.activate().catch(()=>{});try{N6(r)}catch(P){console.error(P)}},[e,r]),y=ne.useCallback(async()=>{if(s){if("0x"+s.toString(16)===r)return alert(`You are already connected to ${Kr(s.toString())}`);try{N6(r)}catch(R){console.error(R)}}},[s,r]),v=ne.useCallback(async()=>{alert("You can change your connected account in your wallet.")},[]),E=tc();return Q.jsx(Q.Fragment,{children:Q.jsxs("div",{id:"signup-form-header",className:"flex flex-col",children:[(r===h6||r===Rn)&&Q.jsx(L6,{position:"left",className:In("!absolute z-10",{"top-8 right-8":!E,"top-2 right-2":E}),button:r===h6?Q.jsx("img",{alt:"sepolia",className:"network-icon",src:Lb}):r===Rn?Q.jsx("img",{alt:"optimism",className:"network-icon",src:Fb}):null,text:r===h6?'Your Kinode is currently pointed at Sepolia. To point at Optimism, boot without the "--testnet" flag.':r===Rn?'Your Kinode is currently pointed at Optimism. To point at Sepolia, boot with the "--testnet" flag.':""}),Q.jsx("div",{className:"flex flex-col gap-4 c",children:t}),!n&&Q.jsx("div",{className:"flex c w-[99vw] mb-8 absolute top-2 left-2",children:a&&i?Q.jsx(dR,{account:i,networkName:u,changeToNodeChain:y,changeConnectedAccount:v}):Q.jsxs("div",{className:"flex flex-col gap-8 my-4",children:[Q.jsxs("h5",{className:In("flex c",{"flex-wrap text-center max-w-3/4":E}),children:[!o&&"You must connect to a browser wallet to continue.",o?Q.jsx(an,{msg:"Approve connection in your wallet"}):Q.jsx("button",{onClick:d,className:"ml-2",children:" Connect Wallet "})]}),r===h6&&Q.jsxs("h5",{className:"text-center max-w-[450px] leading-6 flex c",children:["Kinode is currently on the Sepolia Testnet.",Q.jsx("a",{href:"https://sepoliafaucet.com/",target:"_blank",rel:"noreferrer",className:"button alt ml-2",children:"Get Testnet ETH"})]})]})})]})})}function s2(t){const e=t.split(".");if(e.length!==4)throw new Error("Invalid IP address");let r=0;for(let n=0;n<4;n++)r<<=8,r+=parseInt(e[n],10);return r>>>0}const kR=()=>Q.jsx(L6,{text:"A direct node publishes its own networking information on-chain: IP, port, so on. An indirect node relies on the service of routers, which are themselves direct nodes. Only register a direct node if you know what you’re doing and have a public, static IP address."});function u2({direct:t,setDirect:e}){return Q.jsxs("div",{className:"flex place-items-center",children:[Q.jsxs("div",{className:"relative flex place-items-center mr-2",children:[Q.jsx("input",{type:"checkbox",id:"direct",name:"direct",checked:t,onChange:r=>e(r.target.checked),autoFocus:!0}),t&&Q.jsx("span",{onClick:()=>e(!1),className:"checkmark",children:"✓"})]}),Q.jsx("label",{htmlFor:"direct",className:"flex place-items-center cursor-pointer",children:"Register as a direct node. If you are unsure leave unchecked."}),Q.jsx(kR,{})]})}const SR="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20width='779'%20height='514'%20viewBox='0%200%20779%20514'%20fill='none'%20version='1.1'%20id='svg2'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%20id='defs2'%20/%3e%3cpath%20d='M753.092%205.91932C756.557%205.09976%20755.962%20-0.00012207%20752.401%20-0.00012207H426.001C424.755%20-0.00012207%20423.639%200.77027%20423.197%201.93535L236.968%20492.6C235.729%20495.865%20240.123%20498.255%20242.191%20495.441L569.357%2050.1132C569.778%2049.5392%20570.391%2049.1339%20571.084%2048.97L753.092%205.91932Z'%20fill='%23FFF5D9'%20id='path1'%20/%3e%3cpath%20d='M%2012.054907,40.2288%20C%209.0444768,38.777%2010.207772,34.4583%2013.582982,34.5557%20l%20411.845088,11.881%20c%202.17167,0.0626%203.63105,2.1382%202.85869,4.0656%20l%20-62.7457,156.4787%20c%20-0.66805,1.666%20-2.71117,2.415%20-4.38655,1.607%20z'%20fill='%23fff5d9'%20id='path2'%20style='stroke-width:1.0265'%20/%3e%3c/svg%3e",l2=({prefix:t,showLogo:e})=>{const r=tc();return Q.jsxs("div",{className:"mb-4 flex flex-col c",children:[Q.jsx("h1",{children:t}),e&&Q.jsxs(Q.Fragment,{children:[Q.jsxs("h1",{className:In("display",{"text-5xl mt-10 mb-8 ml-4":!r,"text-3xl mt-5 mb-4 ml-2":r}),children:["Kinode",Q.jsx("span",{className:"text-xs",children:"®"})]}),Q.jsx("img",{src:SR,className:In({"w-32 h-32":!r,"w-16 h-16":r})})]})]})},{useAccounts:TR}=O1;function CR({direct:t,setDirect:e,setOsName:r,nameWrapper:n,ensRegistry:i,knsEnsEntry:a,kns:o,openConnect:s,provider:u,closeConnect:f,setNetworkingKey:d,setIpAddress:y,setPort:v,setRouters:E,nodeChainId:P}){let R=TR(),O=tn();const C=Kr(P),[_,M]=ne.useState(""),[z,$]=ne.useState(""),[Y,J]=ne.useState([]),[ee,ae]=ne.useState(!1);ne.useEffect(()=>{document.title="Register"},[]),ne.useEffect(()=>ae(!ee),[u]);const se={name:z,setName:$,nameValidities:Y,setNameValidities:J,nameWrapper:n,ensRegistry:i,triggerNameCheck:ee};let N=ne.useCallback(async X=>{if(X.preventDefault(),X.stopPropagation(),!u)return s();try{M("Please confirm the transaction in your wallet");const{networking_key:I,ws_routing:[c,x],allowed_routers:U}=await fetch("/generate-networking-info",{method:"POST"}).then(p=>p.json()),k=s2(c);d(I),y(k),v(x),E(U);const T=z.trim().replace(".eth",""),F=P===Rn?Ys:P;try{await N6(F)}catch{throw window.alert(`You must connect to the ${Kr(F)} network to continue. Please connect and try again.`),new Error(`${Kr(F)} not connected`)}const q=[t?(await o.populateTransaction.setAllIp(l1(`${T}.eth`),k,x,0,0,0)).data:(await o.populateTransaction.setRouters(l1(`${T}.eth`),U.map(p=>l1(p)))).data,(await o.populateTransaction.setKey(l1(`${T}.eth`),I)).data];M("Please confirm the transaction in your wallet");const b=gb(`${T}.eth`),l=Da(`${T}.eth`),m=await a.setKNSRecords(b,q,{gasLimit:3e5}),S=(p,L)=>{p===l&&(o.off("NodeRegistered",S),M(""),r(`${T}.eth`),O("/set-password"))};await N6(P),M(`Registering ${T}.eth on Kinode... this may take a few minutes.`),o.on("NodeRegistered",S),await m.wait()}catch(I){console.error("Registration Error:",I),M(""),alert("There was an error linking your ENS name, please try again.")}},[z,t,R,o,O,r,u,s,d,y,v,E,P,C]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(sn,{header:Q.jsx(l2,{prefix:"Register via ENS"}),openConnect:s,closeConnect:f,nodeChainId:P===Rn?Ys:P}),!!u&&Q.jsx("form",{id:"signup-form",className:"flex flex-col",onSubmit:N,children:_?Q.jsx(an,{msg:_}):Q.jsxs(Q.Fragment,{children:[Q.jsxs("h3",{className:"w-full flex flex-col c mb-2",children:[Q.jsx("label",{className:"flex leading-6 mb-2",children:"Set up your Kinode with a .eth name"}),Q.jsx(pO,{...se})]}),Q.jsx(u2,{direct:t,setDirect:e}),Q.jsx("button",{disabled:Y.length!==0,type:"submit",className:"mt-2",children:"Register .eth name"})]})})]})}function rc({name:t,setName:e,nameValidities:r,setNameValidities:n,dotOs:i,triggerNameCheck:a,isReset:o=!1}){const s="Name must be a valid URL without subdomains (A-Z, a-z, 0-9, and punycode)",u="Name must be 9 characters or more",f="Name is already claimed",d="Unsupported punycode character",y=ne.useRef(null);ne.useEffect(()=>{o||(y.current&&clearTimeout(y.current),y.current=setTimeout(async()=>{let E,P=[...r];const R=[...t].length;E=P.indexOf(u),R<9&&R!==0?E===-1&&P.push(u):E!==-1&&P.splice(E,1);let O;E=P.indexOf(d);try{O=H5.toAscii(t+".os"),E!==-1&&P.splice(E,1)}catch{E===-1&&P.push(d)}if(O!==void 0&&(E=P.indexOf(s),t!==""&&!Yf(O)?E===-1&&P.push(s):E!==-1&&P.splice(E,1),E=P.indexOf(f),P.length===0||E!==-1))try{await i.ownerOf(Da(O)),E===-1&&P.push(f)}catch{E!==-1&&P.splice(E,1)}n(P)},500))},[t,a,o]);const v=E=>E.target.value.indexOf(".")===-1&&e(E.target.value);return Q.jsxs("div",{className:"flex flex-col w-full place-items-center place-content-center",children:[Q.jsxs("div",{className:"flex w-full place-items-center",children:[Q.jsx("input",{value:t,onChange:v,type:"text",required:!0,name:"dot-os-name",placeholder:"e.g. myname",className:"grow"}),Q.jsx("div",{className:"ml-2 text-lg",children:".os"})]}),r.map((E,P)=>Q.jsxs("div",{children:[Q.jsx("br",{}),Q.jsx("span",{className:"text-red-500",children:E})]},P))]})}const{useAccounts:PR}=O1;function NR({direct:t,setDirect:e,setOsName:r,dotOs:n,kns:i,openConnect:a,provider:o,closeConnect:s,setNetworkingKey:u,setIpAddress:f,setPort:d,setRouters:y,nodeChainId:v}){let E=PR(),P=tn();const R=Kr(v),[O,C]=ne.useState(""),[_,M]=ne.useState(""),[z,$]=ne.useState([]),[Y,J]=ne.useState(!1);ne.useEffect(()=>{document.title="Register"},[]),ne.useEffect(()=>J(!Y),[o]);const ee={name:_,setName:M,nameValidities:z,setNameValidities:$,dotOs:n,triggerNameCheck:Y};let ae=ne.useCallback(async se=>{if(se.preventDefault(),se.stopPropagation(),!o)return a();try{C("Please confirm the transaction in your wallet");const{networking_key:N,ws_routing:[X,I],allowed_routers:c}=await fetch("/generate-networking-info",{method:"POST"}).then(F=>F.json()),x=s2(X);u(N),f(x),d(I),y(c);const U=[t?(await i.populateTransaction.setAllIp(l1(`${_}.os`),x,I,0,0,0)).data:(await i.populateTransaction.setRouters(l1(`${_}.os`),c.map(F=>l1(F)))).data,(await i.populateTransaction.setKey(l1(`${_}.os`),N)).data];C("Please confirm the transaction in your wallet");try{await N6(v)}catch{throw window.alert(`You must connect to the ${R} network to continue. Please connect and try again.`),new Error(`${R} not set`)}const k=gb(`${_}.os`),T=await n.register(k,E[0],U);C("Registering KNS ID..."),await T.wait(),C(""),r(`${_}.os`),P("/set-password")}catch(N){console.error("Registration Error:",N),C(""),alert("There was an error registering your dot-os-name, please try again.")}},[_,t,E,n,i,P,r,o,a,u,f,d,y,v,R]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(sn,{header:Q.jsx("h1",{className:"flex place-content-center place-items-center mb-4",children:"Register Kinode Name (KNS)"}),openConnect:a,closeConnect:s,nodeChainId:v}),!!o&&Q.jsx("form",{id:"signup-form",className:"flex flex-col w-full max-w-[450px]",onSubmit:ae,children:O?Q.jsx(an,{msg:O}):Q.jsxs(Q.Fragment,{children:[Q.jsxs("h3",{className:"flex flex-col w-full place-items-center my-8",children:[Q.jsxs("label",{className:"flex leading-6 place-items-center mt-2 cursor-pointer mb-2",children:["Choose a name for your kinode",Q.jsx(L6,{text:"Kinodes use a .os name in order to identify themselves to other nodes in the network."})]}),Q.jsx(rc,{...ee})]}),Q.jsx(u2,{direct:t,setDirect:e}),Q.jsx("button",{disabled:z.length!==0,type:"submit",className:"mt-2",children:"Register .os name"}),Q.jsx(pf,{to:"/reset",className:"flex self-stretch mt-2",children:Q.jsx("button",{className:"clear grow",children:"already have a dot-os-name?"})})]})})]})}var W8={};const{useAccounts:MR,useProvider:UR}=O1;function OR({direct:t,setDirect:e,setOsName:r,dotOs:n,openConnect:i,setNetworkingKey:a,setIpAddress:o,setPort:s,setRouters:u,closeConnect:f,nodeChainId:d}){const y=MR(),v=UR(),E=tn(),[P,R]=ne.useState(!1),[O,C]=ne.useState(""),[_,M]=ne.useState(!1),[z,$]=ne.useState(""),[Y,J]=ne.useState(""),[ee,ae]=ne.useState(""),[se,N]=ne.useState([]);ne.useEffect(()=>{document.title="Claim Invite"},[]),ne.useEffect(()=>M(!_),[v]),ne.useEffect(()=>{(async()=>{if(z!==""){const c=W8.REACT_APP_INVITE_GET+z,x=await fetch(c,{method:"GET"});x.status===200?J(""):J(await x.text())}})()},[z]);let X=async c=>{if(c.preventDefault(),c.stopPropagation(),!v)return i();const{networking_key:x,ws_routing:[U,k],allowed_routers:T}=await fetch("/generate-networking-info",{method:"POST"}).then(p=>p.json()),F=s2(U);if(a(x),o(F),s(k),u(T),se.length!==0||Y!=="")return;if(!ee||!z)return window.alert("Please enter a name and invite code"),!1;let q;C("...Building EIP-4337 User Operation"),R(!0),console.log("BUILDING",x,F,k,T);try{q=await fetch(W8.REACT_APP_BUILD_USER_OP_POST,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:ee+".os",address:y[0],networkingKey:x,wsIp:F,wsPort:k,routers:T,direct:t})})}catch(p){C(""),R(!1),alert(p),console.error("error from fetching userOp:",p);return}C("...Signing EIP-4337 User Operation");const b=await q.json(),l=new Uint8Array(Object.values(b.message)),m=await(v==null?void 0:v.getSigner()),S=await(m==null?void 0:m.signMessage(l));b.userOperation.signature=S;try{q=await fetch(W8.REACT_APP_BROADCAST_USER_OP_POST,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userOp:b.userOperation,code:z,name:ee+".os",eoa:y[0]})})}catch(p){alert(p),console.error("error from broadcasting userOp:",p);return}finally{C(""),R(!1)}r(`${ee}.os`),E("/set-password")};const I={name:ee,setName:ae,nameValidities:se,setNameValidities:N,dotOs:n,triggerNameCheck:_};return Q.jsxs(Q.Fragment,{children:[Q.jsx(sn,{header:Q.jsx(l2,{prefix:"Claim Invite"}),openConnect:i,closeConnect:f,nodeChainId:d}),!!v&&Q.jsx("form",{id:"signup-form",className:"flex flex-col",onSubmit:X,children:P?Q.jsx(an,{msg:O}):Q.jsxs(Q.Fragment,{children:[Q.jsxs("div",{className:"flex c mb-2",children:[Q.jsx("h5",{children:"Set up your Kinode with a .os name"}),Q.jsx(L6,{text:"Kinodes use a .os name in order to identify themselves to other nodes in the network."})]}),Q.jsxs("div",{className:"flex flex-col mb-2",children:[Q.jsx("input",{value:z,onChange:c=>$(c.target.value),type:"text",required:!0,name:"nec-invite",placeholder:"invite code",className:"self-stretch"}),Y!==""&&Q.jsx("div",{className:"invite-validity",children:Y})]}),Q.jsx("h3",{className:"mb-2",children:Q.jsx(rc,{...I})}),Q.jsx(u2,{direct:t,setDirect:e}),Q.jsx("button",{disabled:se.length!==0||Y!=="",type:"submit",className:"self-stretch mt-2",children:"Register .os name"}),Q.jsx(pf,{to:"/reset",className:"button clear",children:"already have a .os?"})]})})]})}const em=(t,e)=>{let r=new Blob([e],{type:"text/plain;charset=utf-8"});const n=window.URL.createObjectURL(r),i=document.createElement("a");i.href=n,i.setAttribute("download",`${t}.keyfile`),document.body.appendChild(i),i.click()};function RR({knsName:t,direct:e,pw:r,reset:n,provider:i,setPw:a,appSizeOnLoad:o,closeConnect:s,nodeChainId:u}){const[f,d]=ne.useState(""),[y,v]=ne.useState(""),[E,P]=ne.useState(!1);ne.useEffect(()=>{document.title="Set Password"},[]),ne.useEffect(()=>{v("")},[r,f]);const R=ne.useCallback(async O=>{if(O.preventDefault(),r!==f)return v("Passwords do not match"),!1;setTimeout(async()=>{P(!0);let C=h1(z0(r)),_=await(i==null?void 0:i.getSigner()),M=await(_==null?void 0:_.getAddress()),z=await(_==null?void 0:_.getChainId()),$=Date.now(),Y=JSON.stringify({username:t,password_hash:C,timestamp:$,direct:e,reset:n,chain_id:z}),J=await(_==null?void 0:_.signMessage(z0(Y)));try{const ae=await(await fetch("/boot",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({password_hash:C,reset:n,username:t,direct:e,owner:M,timestamp:$,signature:J,chain_id:z})})).json();em(t,ae);const se=setInterval(async()=>{const N=await fetch("/");N.status<300&&Number(N.headers.get("content-length"))!==o&&(console.log("WE GOOD, ROUTING"),clearInterval(se),window.location.replace("/"))},2e3)}catch{alert("There was an error setting your password, please try again."),P(!1)}},500)},[o,e,r,f,n,t]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(sn,{header:Q.jsx(l2,{prefix:"Set Password",showLogo:!0}),openConnect:()=>{},closeConnect:s,nodeChainId:u}),E?Q.jsx(an,{msg:"Setting up node..."}):Q.jsxs("form",{id:"signup-form",className:"flex flex-col w-full max-w-[450px] gap-4",onSubmit:R,children:[Q.jsxs("div",{className:"flex flex-col w-full place-items-center place-content-center",children:[Q.jsxs("div",{className:"flex w-full place-items-center mb-2",children:[Q.jsx("label",{className:"flex leading-6 place-items-center mt-2 cursor-pointer mb-2",style:{fontSize:20},htmlFor:"password",children:"New Password"}),Q.jsx(L6,{text:"This password will be used to log in if you restart your node or switch browsers."})]}),Q.jsx("div",{className:"flex w-full place-items-center",children:Q.jsx("input",{className:"grow",type:"password",id:"password",required:!0,minLength:6,name:"password",placeholder:"Min 6 characters",value:r,onChange:O=>a(O.target.value),autoFocus:!0})})]}),Q.jsxs("div",{className:"flex flex-col w-full place-items-center place-content-center",children:[Q.jsx("div",{className:"flex w-full place-items-center",children:Q.jsx("label",{className:"flex leading-6 place-items-center mt-2 cursor-pointer mb-4",style:{fontSize:20},htmlFor:"confirm-password",children:"Confirm Password"})}),Q.jsx("div",{className:"flex w-full place-items-center",children:Q.jsx("input",{className:"grow",type:"password",id:"confirm-password",required:!0,minLength:6,name:"confirm-password",placeholder:"Min 6 characters",value:f,onChange:O=>d(O.target.value)})}),!!y&&Q.jsx("p",{style:{color:"red"},children:y})]}),Q.jsx("button",{type:"submit",children:"Submit"})]})]})}var f1={};const IR=U0(Bk),BR=U0(jv),LR=U0(zv),FR=U0(Rx),jR=U0(Hw),DR=U0(eS),zR=U0(cS),$R=U0(Kx),qR=U0(Ux),m4=U0(wE),HR=U0(kS),KR=U0(__),GR=U0(Uv),VR=U0(Vx),WR=U0(VE),y4=U0(cw),QR=U0(t_),JR=U0(NS),YR=U0(yS),XR=U0(TE);(function(t){var e=f0&&f0.__createBinding||(Object.create?function(N,X,I,c){c===void 0&&(c=I),Object.defineProperty(N,c,{enumerable:!0,get:function(){return X[I]}})}:function(N,X,I,c){c===void 0&&(c=I),N[c]=X[I]}),r=f0&&f0.__setModuleDefault||(Object.create?function(N,X){Object.defineProperty(N,"default",{enumerable:!0,value:X})}:function(N,X){N.default=X}),n=f0&&f0.__importStar||function(N){if(N&&N.__esModule)return N;var X={};if(N!=null)for(var I in N)I!=="default"&&Object.prototype.hasOwnProperty.call(N,I)&&e(X,N,I);return r(X,N),X};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var i=IR;Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return i.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return i.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return i.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return i.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return i.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return i.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return i.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return i.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}});var a=tp;Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return a.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return a.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return a.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return a.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return a.isAddress}});var o=n(BR);t.base64=o;var s=LR;Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return s.Base58}});var u=FR;Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return u.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return u.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return u.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return u.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return u.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return u.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return u.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return u.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return u.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return u.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return u.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return u.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return u.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return u.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return u.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return u.stripZeros}});var f=jR;Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return f._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return f.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return f.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return f.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return f.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return f.namehash}});var d=DR;Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return d.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return d.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return d.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return d.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return d.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return d.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return d.mnemonicToSeed}});var y=zR;Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return y.getJsonWalletAddress}});var v=$R;Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return v.keccak256}});var E=qR;Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return E.Logger}});var P=m4;Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return P.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return P.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return P.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return P.sha512}});var R=HR;Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return R.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return R.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return R.sha256}});var O=KR;Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return O.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return O.shuffled}});var C=GR;Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return C.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return C.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return C.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return C.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return C.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return C.shallowCopy}});var _=n(VR);t.RLP=_;var M=WR;Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return M.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return M.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return M.SigningKey}});var z=y4;Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return z.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return z.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return z.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return z._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return z.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return z.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return z.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return z.Utf8ErrorFuncs}});var $=QR;Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return $.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return $.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return $.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return $.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return $.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return $.TransactionTypes}});var Y=JR;Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return Y.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return Y.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return Y.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return Y.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return Y.parseUnits}});var J=YR;Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return J.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return J.verifyTypedData}});var ee=XR;Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return ee._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return ee.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return ee.poll}});var ae=m4;Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return ae.SupportedAlgorithm}});var se=y4;Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return se.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return se.Utf8ErrorReason}})})(f1);const{useProvider:ZR}=O1;function eI({direct:t,setDirect:e,pw:r,setPw:n,kns:i,openConnect:a,appSizeOnLoad:o,closeConnect:s,routers:u,setRouters:f,knsName:d,setOsName:y,nodeChainId:v}){const E=ZR(),P=tn(),[R,O]=ne.useState([]),[C,_]=ne.useState(""),[M,z]=ne.useState(!1),[$,Y]=ne.useState(!1),[J,ee]=ne.useState(!1);ne.useEffect(()=>{document.title="Login",(async()=>{try{const X=await fetch("/info",{method:"GET"}).then(I=>I.json());f(X.allowed_routers),y(X.name)}catch{}})()},[]);const ae=ne.useCallback(async X=>{X==null||X.preventDefault(),X==null||X.stopPropagation();try{if($){if(!E)return O(["Please connect your wallet and try again"]),ee(!0),a();_("Checking password...");let U=h1(z0(r));if((await fetch("/vet-keyfile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password_hash:U,keyfile:""})})).status>399)throw new Error("Incorrect password");const{networking_key:T,ws_routing:[F,q],allowed_routers:b}=await fetch("/generate-networking-info",{method:"POST"}).then(p=>p.json());_("Please confirm the transaction in your wallet");const l=s2(F),m=[t?(await i.populateTransaction.setAllIp(f1.namehash(d),l,q,0,0,0)).data:(await i.populateTransaction.setRouters(f1.namehash(d),b.map(p=>f1.namehash(p)))).data,(await i.populateTransaction.setKey(f1.namehash(d),T)).data];_("Please confirm the transaction");const S=await i.multicall(m);_("Resetting Networking Information..."),await S.wait()}_("Logging in...");let I=h1(z0(r));const c=await fetch($?"/confirm-change-network-keys":"login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($?{password_hash:I,direct:t}:{password_hash:I})});if(c.status>399)throw new Error(await c.text());if($){const U=await c.json();em(d,U)}const x=setInterval(async()=>{const U=await fetch("/");U.status<300&&Number(U.headers.get("content-length"))!==o&&(clearInterval(x),window.location.replace("/"))},2e3)}catch(I){const c=String(I);c.includes("Object")?O(["There was an error with the transaction, or it was cancelled."]):O([c]),_("")}},[r,o,$,t,d,E,a,i]),se=(u==null?void 0:u.length)===0,N=tc();return Q.jsxs(Q.Fragment,{children:[Q.jsx(sn,{header:Q.jsx(l2,{prefix:"Login to",showLogo:!0}),openConnect:a,closeConnect:s,hideConnect:!M,nodeChainId:v}),C?Q.jsx(an,{msg:C}):Q.jsxs("form",{id:"signup-form",className:In("flex flex-col w-full max-w-[450px]",{"p-2":N}),onSubmit:ae,children:[Q.jsxs("div",{className:"self-stretch mb-2 flex flex-col",children:[Q.jsxs("div",{className:"flex text-lg mb-2 place-items-center place-content-center",children:[Q.jsx("h3",{className:"font-bold",children:d}),Q.jsxs("span",{className:"ml-2 mt-1 text-sm",children:["(",se?"direct":"indirect"," node)"]})]}),Q.jsx("input",{type:"password",id:"password",required:!0,minLength:6,name:"password",placeholder:"Password",value:r,onChange:X=>n(X.target.value),autoFocus:!0,className:"self-stretch"})]}),R.length>0&&Q.jsx("div",{className:"flex flex-col w-full leading-6 mb-2",children:R.map((X,I)=>Q.jsx("div",{className:"text-red-500",children:X},I))}),Q.jsxs("button",{type:"submit",className:"w-full mb-2",children:[" ",$?"Reset & ":""," Login "]}),Q.jsxs("div",{className:"flex flex-col w-full self-stretch place-content-center place-items-center",children:[Q.jsx("button",{className:"clear self-stretch mb-1",onClick:()=>{z(!M),Y(!M)},children:M?"Cancel":"Reset Networking Info"}),Q.jsx("button",{className:"clear self-stretch",onClick:()=>{P("/reset-node")},children:"Reset Node & Password"}),M&&Q.jsxs("div",{className:"flex flex-col w-full gap-2 mt-4",children:[Q.jsxs("div",{className:"flex w-full place-items-center",children:[Q.jsxs("div",{className:"relative flex",children:[Q.jsx("input",{type:"checkbox",id:"reset",name:"reset",checked:$,onChange:X=>Y(X.target.checked),autoFocus:!0,className:"mr-2"}),$&&Q.jsx("span",{onClick:()=>Y(!1),className:"checkmark",children:"✓"})]}),Q.jsx("label",{htmlFor:"reset",className:"direct-node-message",children:"Reset networking keys and publish on-chain"}),Q.jsx(L6,{text:"This will update your networking keys and publish the new info on-chain"})]}),Q.jsx(u2,{direct:t,setDirect:e})]})]})]})]})}const g4="Unsupported punycode character",x4="Name does not belong to this wallet",Q8="Name is not registered",v4="Name must be a valid URL without subdomains (A-Z, a-z, 0-9, and punycode)",{useAccounts:tI,useProvider:rI}=O1;function nI({direct:t,setDirect:e,setReset:r,knsName:n,setOsName:i,dotOs:a,kns:o,openConnect:s,closeConnect:u,setNetworkingKey:f,setIpAddress:d,setPort:y,setRouters:v,nodeChainId:E}){const P=tI(),R=rI(),O=tn(),C=Kr(E),[_,M]=ne.useState(n.slice(0,-3)),[z,$]=ne.useState([]),[Y,J]=ne.useState([]),[ee,ae]=ne.useState(""),[se,N]=ne.useState(!1);ne.useEffect(()=>{document.title="Reset"},[]),ne.useEffect(()=>N(!se),[R]);const X=ne.useRef(null);ne.useEffect(()=>{X.current&&clearTimeout(X.current),X.current=setTimeout(async()=>{if($([]),!R||_==="")return;let c,x=[...z],U;c=x.indexOf(g4);try{U=H5.toAscii(_+".os"),c!==-1&&x.splice(c,1)}catch{c===-1&&x.push(g4)}if(U!==void 0){c=x.indexOf(v4),_!==""&&!Yf(U)?c===-1&&x.push(v4):c!==-1&&x.splice(c,1);try{const k=await a.ownerOf(Da(U));c=x.indexOf(x4),k===P[0]&&c!==-1?x.splice(c,1):c===-1&&k!==P[0]&&x.push(x4),c=x.indexOf(Q8),c!==-1&&x.splice(c,1)}catch{c=x.indexOf(Q8),c===-1&&x.push(Q8)}z.length===0&&i(U)}$(x)},500)},[_,se]);const I=ne.useCallback(async c=>{if(c.preventDefault(),c.stopPropagation(),!R)return s();try{ae("Please confirm the transaction in your wallet");const{networking_key:x,ws_routing:[U,k],allowed_routers:T}=await fetch("/generate-networking-info",{method:"POST"}).then(l=>l.json()),F=s2(U);f(x),d(F),y(k),v(T);const q=[t?(await o.populateTransaction.setAllIp(f1.namehash(n),F,k,0,0,0)).data:(await o.populateTransaction.setRouters(f1.namehash(n),T.map(l=>f1.namehash(l)))).data,(await o.populateTransaction.setKey(f1.namehash(n),x)).data];try{await N6(E)}catch{throw window.alert(`You must connect to the ${C} network to continue. Please connect and try again.`),new Error(`${C} not set`)}const b=await o.multicall(q);ae("Resetting Networking Information..."),await b.wait(),r(!0),ae(""),e(t),O("/set-password")}catch{ae(""),alert("An error occurred, please try again.")}},[R,n,r,e,O,s,o,t,f,d,y,v,E,C]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(sn,{header:Q.jsx(l2,{prefix:"Reset KNS Name"}),openConnect:s,closeConnect:u,nodeChainId:E}),!!R&&Q.jsx("form",{id:"signup-form",className:"flex flex-col",onSubmit:I,children:ee?Q.jsx(an,{msg:ee}):Q.jsxs(Q.Fragment,{children:[Q.jsxs("h3",{className:"flex flex-col w-full place-items-center mb-2",children:[Q.jsxs("label",{className:"flex leading-6 place-items-center mt-2 cursor-pointer mb-2",children:["Choose a name for your kinode",Q.jsx(L6,{text:"Kinodes use a .os name in order to identify themselves to other nodes in the network."})]}),Q.jsx(rc,{name:_,setName:M,nameVets:z,dotOs:a,triggerNameCheck:se,nameValidities:Y,setNameValidities:J,isReset:!0})]}),Q.jsx(u2,{direct:t,setDirect:e}),Q.jsx("button",{type:"submit",className:"mt-2",children:" Reset Node "})]})})]})}function iI({openConnect:t,knsName:e,closeConnect:r,nodeChainId:n}){const i=tn(),a=()=>i("/claim-invite"),o=()=>i("/register-eth-name"),s=()=>i("/register-name"),u=()=>i("/reset"),f=()=>i("/import-keyfile"),d=()=>i("/login"),y=!!e,v=!!window.ethereum;return ne.useEffect(()=>{document.title="Welcome | Kinode"},[]),Q.jsxs(Q.Fragment,{children:[Q.jsx(sn,{header:Q.jsx(l2,{prefix:"Welcome to",showLogo:!0}),openConnect:t,closeConnect:r,hideConnect:!0,nodeChainId:n,nameLogo:!0}),Q.jsx("div",{className:"flex flex-col max-w-[460px] w-full gap-4 mt-8",children:y?Q.jsx("button",{onClick:d,children:" Login "}):Q.jsxs(Q.Fragment,{children:[!v&&Q.jsx("h4",{className:"self-start mx-auto",children:"You must install a Web3 wallet extension like Metamask in order to register or reset a username."}),v&&Q.jsx("h4",{className:"self-start mx-auto",children:"New here? Register a username to get started"}),Q.jsx("button",{disabled:!v,onClick:s,children:"Register Kinode Name"}),Q.jsx("h4",{className:"self-start mx-auto",children:"Other options"}),n!==Rn&&Q.jsx("button",{disabled:!v,onClick:o,className:"alt",children:"Register ENS Name"}),Q.jsx("button",{disabled:!v,onClick:a,className:"alt",children:"Claim Kinode Invite"}),Q.jsx("button",{disabled:!v,onClick:u,className:"alt",children:"Reset Kinode Name"}),Q.jsx("button",{onClick:f,className:"alt",children:"Import Keyfile"})]})})]})}const{useProvider:aI}=O1;function oI({direct:t,setDirect:e,setReset:r,knsName:n,kns:i,openConnect:a,closeConnect:o,setNetworkingKey:s,setIpAddress:u,setPort:f,setRouters:d,nodeChainId:y}){const v=aI(),E=tn(),P=Kr(y),[R,O]=ne.useState("");ne.useEffect(()=>{document.title="Reset"},[]);const C=ne.useCallback(async _=>{if(_.preventDefault(),_.stopPropagation(),!v)return a();try{O("Please confirm the transaction in your wallet");const{networking_key:M,ws_routing:[z,$],allowed_routers:Y}=await fetch("/generate-networking-info",{method:"POST"}).then(se=>se.json()),J=s2(z);s(M),u(J),f($),d(Y);const ee=[t?(await i.populateTransaction.setAllIp(f1.namehash(n),J,$,0,0,0)).data:(await i.populateTransaction.setRouters(f1.namehash(n),Y.map(se=>f1.namehash(se)))).data,(await i.populateTransaction.setKey(f1.namehash(n),M)).data];try{await N6(y)}catch{throw window.alert(`You must connect to the ${P} network to continue. Please connect and try again.`),new Error(`${P} not set`)}const ae=await i.multicall(ee);O("Resetting Networking Information..."),await ae.wait(),r(!0),O(""),e(t),E("/set-password")}catch{O(""),alert("An error occurred, please try again.")}},[v,n,r,e,E,a,i,t,s,u,f,d,y,P]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(sn,{header:Q.jsx("h1",{className:"flex c mb-8",children:"Reset Kinode Name"}),openConnect:a,closeConnect:o,nodeChainId:y}),v?Q.jsx("form",{id:"signup-form",className:"flex flex-col",onSubmit:C,children:R?Q.jsx(an,{msg:R}):Q.jsxs(Q.Fragment,{children:[Q.jsx(u2,{direct:t,setDirect:e}),Q.jsxs("button",{type:"submit",className:"self-stretch mt-2 text-2xl",children:["Reset ",n]}),Q.jsx(pf,{to:"/",className:"button alt mt-2",children:"Back"})]})}):Q.jsx("div",{children:"Please connect a wallet to continue."})]})}function sI({pw:t,setPw:e,openConnect:r,appSizeOnLoad:n,closeConnect:i,nodeChainId:a}){const[o,s]=ne.useState(""),[u,f]=ne.useState(""),[d,y]=ne.useState([]),[v,E]=ne.useState(""),[P,R]=ne.useState(!1),[O,C]=ne.useState(!1),[_,M]=ne.useState(!1);ne.useEffect(()=>{document.title="Import Keyfile"},[]);const z=ne.useCallback(ee=>{ee.preventDefault();const ae=ee.target.files[0];if(!ae)return;const se=new FileReader;se.onloadend=()=>{s(se.result),f(ae.name)},se.readAsText(ae)},[]),$=ne.useRef(null),Y=ne.useCallback(async ee=>{var ae;ee.preventDefault(),ee.stopPropagation(),(ae=$.current)==null||ae.click()},[]),J=ne.useCallback(async ee=>{ee.preventDefault(),ee.stopPropagation(),M(!0);try{if(d.length===0&&o!==""){let ae=h1(z0(t));if((await fetch("/vet-keyfile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keyfile:o,password:ae})})).status>399)throw new Error("Incorrect password");if((await fetch("/import-keyfile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keyfile:o,password:ae})})).status>399)throw new Error("Incorrect password");const X=setInterval(async()=>{const I=await fetch("/");I.status<300&&Number(I.headers.get("content-length"))!==n&&(clearInterval(X),window.location.replace("/"))},2e3)}}catch{window.alert("An error occurred, please try again."),M(!1)}},[o,t,d,n]);return Q.jsxs(Q.Fragment,{children:[Q.jsx(sn,{header:Q.jsx("h1",{children:"Import Keyfile"}),openConnect:r,closeConnect:i,hideConnect:!0,nodeChainId:a}),_?Q.jsx(an,{msg:"Setting up node..."}):Q.jsxs("form",{id:"signup-form",className:"flex flex-col max-w-[450px]",onSubmit:J,children:[Q.jsxs("div",{className:"flex flex-col self-start place-content-center w-full",children:[Q.jsxs("h4",{className:"my-2 flex",children:[" ","1. Upload Keyfile"," "]}),!!u&&Q.jsxs("h5",{className:"underline mb-2",children:[" ",u||".keyfile"," "]}),Q.jsxs("button",{type:"button",onClick:Y,children:[u?"Change":"Select"," Keyfile"]}),Q.jsx("input",{ref:$,className:"hidden",type:"file",onChange:z})]}),Q.jsxs("div",{className:"flex flex-col w-full",children:[Q.jsxs("h4",{className:"my-2 flex",children:[" ","2. Enter Password"," "]}),Q.jsx("input",{type:"password",id:"password",required:!0,minLength:6,name:"password",placeholder:"Min 6 characters",value:t,onChange:ee=>e(ee.target.value),className:"mb-2"}),v&&Q.jsxs("div",{className:"flex",children:[" ",Q.jsxs("p",{className:"text-red-500",children:[" ",v," "]})," "]}),O&&!P&&6<=t.length&&Q.jsxs("div",{className:"flex",children:[" ",Q.jsx("p",{className:"text-red-500",children:" Password is incorrect "})," "]})]}),Q.jsxs("div",{className:"flex flex-col w-full mb-2",children:[d.map((ee,ae)=>Q.jsx("span",{className:"key-err",children:ee},ae)),Q.jsx("button",{type:"submit",children:" Import Keyfile "})]}),Q.jsx("p",{className:"text-sm",children:'Please note: if the original node was booted as a direct node (static IP), then you must run this node from the same IP. If not, you will have networking issues. If you need to change the network options, please go back and select "Reset OsName".'})]})]})}var X6={};const{useProvider:uI}=O1;function lI(){var be,Ae,je,Oe,Ce,Pe,Be;const t=uI(),e=ix(),[r,n]=ne.useState(""),[i,a]=ne.useState(""),[o,s]=ne.useState(""),[u,f]=ne.useState(!1),[d,y]=ne.useState(!1),[v,E]=ne.useState(""),[P,R]=ne.useState(0),[O,C]=ne.useState(""),[_,M]=ne.useState(0),[z,$]=ne.useState(0),[Y,J]=ne.useState([]),[ee,ae]=ne.useState(""),[se,N]=ne.useState(!1),[X,I]=ne.useState(!(e!=null&&e.initial)),[c,x]=ne.useState(!1),U=()=>x(!0),k=()=>x(!1),T=ne.useMemo(()=>{var Ne;return((Ne=t==null?void 0:t.network)==null?void 0:Ne.chainId)===Fe.SEPOLIA?X6.REACT_APP_SEPOLIA_RPC_URL:X6.REACT_APP_OPTIMISM_RPC_URL},[t]),[F,q]=ne.useState(X2.connect(((be=t==null?void 0:t.network)==null?void 0:be.chainId)===Fe.SEPOLIA?Uo[Fe.SEPOLIA]:Uo[Fe.OPTIMISM],new Dt(T))),[b,l]=ne.useState(ra.connect(((Ae=t==null?void 0:t.network)==null?void 0:Ae.chainId)===Fe.SEPOLIA?I2[Fe.SEPOLIA]:I2[Fe.OPTIMISM],new Dt(T))),[m,S]=ne.useState(ea.connect(((je=t==null?void 0:t.network)==null?void 0:je.chainId)===Fe.SEPOLIA?Io[Fe.SEPOLIA]:Io[Fe.MAINNET],new Dt(((Oe=t==null?void 0:t.network)==null?void 0:Oe.chainId)===Fe.SEPOLIA?X6.REACT_APP_SEPOLIA_RPC_URL:X6.REACT_APP_MAINNET_RPC_URL))),[p,L]=ne.useState(ta.connect(((Ce=t==null?void 0:t.network)==null?void 0:Ce.chainId)===Fe.SEPOLIA?Bo[Fe.SEPOLIA]:Bo[Fe.OPTIMISM],new Dt(T))),[j,V]=ne.useState(na.connect(((Pe=t==null?void 0:t.network)==null?void 0:Pe.chainId)===Fe.SEPOLIA?Oo[Fe.SEPOLIA]:Oo[Fe.MAINNET],new Dt(T))),[G,re]=ne.useState(Z2.connect(((Be=t==null?void 0:t.network)==null?void 0:Be.chainId)===Fe.SEPOLIA?Ro[Fe.SEPOLIA]:Ro[Fe.MAINNET],new Dt(T)));ne.useEffect(()=>R(window.performance.getEntriesByType("navigation")[0].transferSize),[]),ne.useEffect(()=>{(async()=>{try{const Ne=await fetch("/info",{method:"GET"});if(Ne.status>399)console.log("no info, unbooted");else{const e0=await Ne.json();X&&(E(e0.name),J(e0.allowed_routers),N(!0),I(!1))}}catch{console.log("no info, unbooted")}try{const Ne=await fetch("/current-chain",{method:"GET"});if(Ne.status<400){const e0=await Ne.json();ae(e0.toLowerCase()),console.log("Node Chain ID:",e0)}}catch{console.log("error getting current chain")}})()},[]),ne.useEffect(()=>N(!1),[X]),ne.useEffect(()=>{t==null||t.getNetwork().then(Ne=>{Ne.chainId===Fe.SEPOLIA?(q(X2.connect(Uo[Fe.SEPOLIA],t.getSigner())),l(ra.connect(I2[Fe.SEPOLIA],t.getSigner())),S(ea.connect(Io[Fe.SEPOLIA],t.getSigner())),L(ta.connect(Bo[Fe.SEPOLIA],t.getSigner())),V(na.connect(Oo[Fe.SEPOLIA],t.getSigner())),re(Z2.connect(Ro[Fe.SEPOLIA],t.getSigner()))):(Ne.chainId===Fe.OPTIMISM||Ne.chainId===Fe.MAINNET)&&(q(X2.connect(Uo[Fe.OPTIMISM],t.getSigner())),l(ra.connect(I2[Fe.OPTIMISM],t.getSigner())),L(ta.connect(Bo[Fe.OPTIMISM],t.getSigner())),S(ea.connect(Io[Fe.MAINNET],t.getSigner())),V(na.connect(Oo[Fe.MAINNET],new Dt(X6.REACT_APP_MAINNET_RPC_URL))),re(Z2.connect(Ro[Fe.MAINNET],new Dt(X6.REACT_APP_MAINNET_RPC_URL))))})},[t]);const ie=Fe.SEPOLIA,oe=Fe.SEPOLIA,Se={direct:d,setDirect:y,key:i,keyFileName:o,setKeyFileName:s,reset:u,setReset:f,pw:r,setPw:n,knsName:v,setOsName:E,dotOs:F,kns:b,knsEnsEntryNetwork:ie,knsEnsExitNetwork:oe,knsEnsEntry:m,knsEnsExit:p,nameWrapper:j,ensRegistry:G,connectOpen:c,openConnect:U,closeConnect:k,provider:t,appSizeOnLoad:P,networkingKey:O,setNetworkingKey:C,ipAddress:_,setIpAddress:M,port:z,setPort:$,routers:Y,setRouters:J,nodeChainId:ee};return Q.jsxs(Q.Fragment,{children:[Q.jsx(QT,{...Se}),Q.jsx(Sx,{children:Q.jsxs(xx,{children:[Q.jsx(ir,{path:"/",element:se?Q.jsx(yx,{to:"/login",replace:!0}):Q.jsx(iI,{...Se})}),Q.jsx(ir,{path:"/claim-invite",element:Q.jsx(OR,{...Se})}),Q.jsx(ir,{path:"/register-name",element:Q.jsx(NR,{...Se})}),Q.jsx(ir,{path:"/register-eth-name",element:Q.jsx(CR,{...Se})}),Q.jsx(ir,{path:"/set-password",element:Q.jsx(RR,{...Se})}),Q.jsx(ir,{path:"/reset",element:Q.jsx(nI,{...Se})}),Q.jsx(ir,{path:"/reset-node",element:Q.jsx(oI,{...Se})}),Q.jsx(ir,{path:"/import-keyfile",element:Q.jsx(sI,{...Se})}),Q.jsx(ir,{path:"/login",element:Q.jsx(eI,{...Se})})]})})]})}const fI=[[Lf,O1]],cI=J8.createRoot(document.getElementById("root"));cI.render(Q.jsx($r.StrictMode,{children:Q.jsx(_5.Web3ReactProvider,{connectors:fI,children:Q.jsx("div",{id:"signup-page",className:"flex flex-col place-items-center place-content-center h-screen w-screen",children:Q.jsx(lI,{})})})})); diff --git a/kinode/src/register-ui/build/index.html b/kinode/src/register-ui/build/index.html index 6ce707517..eaeb258fd 100644 --- a/kinode/src/register-ui/build/index.html +++ b/kinode/src/register-ui/build/index.html @@ -11,7 +11,7 @@ - + diff --git a/kinode/src/register-ui/package.json b/kinode/src/register-ui/package.json index 427ef7933..04814f1f2 100644 --- a/kinode/src/register-ui/package.json +++ b/kinode/src/register-ui/package.json @@ -27,7 +27,7 @@ "eslint-config-react-app": "^7.0.1", "eth-ens-namehash": "^2.0.8", "ethers": "^5.7.2", - "idna-uts46-hx": "^2.3.1", + "idna-uts46-hx": "^6.0.4", "is-valid-domain": "^0.1.6", "jazzicon": "^1.5.0", "react": "^18.2.0", diff --git a/kinode/src/register-ui/src/App.tsx b/kinode/src/register-ui/src/App.tsx index cec466a5c..a65029086 100644 --- a/kinode/src/register-ui/src/App.tsx +++ b/kinode/src/register-ui/src/App.tsx @@ -65,7 +65,7 @@ function App() { const openConnect = () => setConnectOpen(true) const closeConnect = () => setConnectOpen(false) - const rpcUrl = useMemo(() => provider?.network?.chainId === ChainId.SEPOLIA ? process.env.REACT_APP_SEPOLIA_RPC_URL : process.env.REACT_APP_OPTIMISM_RPC_URL, [provider]) + const rpcUrl = useMemo(() => provider?.network?.chainId === ChainId.SEPOLIA ? import.meta.env.REACT_APP_SEPOLIA_RPC_URL : import.meta.env.REACT_APP_OPTIMISM_RPC_URL, [provider]) const [dotOs, setDotOs] = useState( DotOsRegistrar__factory.connect( @@ -83,7 +83,7 @@ function App() { KNSEnsEntry__factory.connect( provider?.network?.chainId === ChainId.SEPOLIA ? KNS_ENS_ENTRY_ADDRESSES[ChainId.SEPOLIA] : KNS_ENS_ENTRY_ADDRESSES[ChainId.MAINNET], // set rpc url based on chain id - new ethers.providers.JsonRpcProvider(provider?.network?.chainId === ChainId.SEPOLIA ? process.env.REACT_APP_SEPOLIA_RPC_URL : process.env.REACT_APP_MAINNET_RPC_URL)) + new ethers.providers.JsonRpcProvider(provider?.network?.chainId === ChainId.SEPOLIA ? import.meta.env.REACT_APP_SEPOLIA_RPC_URL : import.meta.env.REACT_APP_MAINNET_RPC_URL)) ); const [knsEnsExit, setKnsEnsExit] = useState( @@ -192,11 +192,11 @@ function App() { )) setNameWrapper(NameWrapper__factory.connect( NAMEWRAPPER_ADDRESSES[ChainId.MAINNET], - new ethers.providers.JsonRpcProvider(process.env.REACT_APP_MAINNET_RPC_URL) + new ethers.providers.JsonRpcProvider(import.meta.env.REACT_APP_MAINNET_RPC_URL) )) setEnsRegistry(ENSRegistry__factory.connect( ENS_REGISTRY_ADDRESSES[ChainId.MAINNET], - new ethers.providers.JsonRpcProvider(process.env.REACT_APP_MAINNET_RPC_URL) + new ethers.providers.JsonRpcProvider(import.meta.env.REACT_APP_MAINNET_RPC_URL) )) } }) diff --git a/kinode/src/register-ui/src/vite-env.d.ts b/kinode/src/register-ui/src/vite-env.d.ts new file mode 100644 index 000000000..8bde78a09 --- /dev/null +++ b/kinode/src/register-ui/src/vite-env.d.ts @@ -0,0 +1,12 @@ +/// + +interface ImportMetaEnv { + readonly VITE_APP_TITLE: string; + readonly REACT_APP_MAINNET_RPC_URL: string; + readonly REACT_APP_SEPOLIA_RPC_URL: string; + // Add other environment variables as needed +} + +interface ImportMeta { + readonly env: ImportMetaEnv; +} \ No newline at end of file diff --git a/kinode/src/register-ui/yarn.lock b/kinode/src/register-ui/yarn.lock index 04adea6f3..11e19363b 100644 --- a/kinode/src/register-ui/yarn.lock +++ b/kinode/src/register-ui/yarn.lock @@ -5318,6 +5318,13 @@ idna-uts46-hx@^2.3.1: dependencies: punycode "2.1.0" +idna-uts46-hx@^6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-6.0.4.tgz#25f9f8af628bd4150b36340e99a1f9532c815905" + integrity sha512-sI5p40O39Mev3pk7dmG4m2vaSBQcpn8ZETN72ftaIPaDvY3MwgOj2psh20lYA9aVgQ5eS/Wcmo6l+USXyepffg== + dependencies: + tr46 "^5.0.0" + ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" @@ -6601,9 +6608,9 @@ punycode@2.1.0: resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz" integrity sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA== -punycode@^2.1.1: +punycode@^2.1.1, punycode@^2.3.1: version "2.3.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== q@^1.1.2: @@ -7426,6 +7433,13 @@ totalist@^3.0.0: resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ== +tr46@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-5.0.0.tgz#3b46d583613ec7283020d79019f1335723801cec" + integrity sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g== + dependencies: + punycode "^2.3.1" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz"