var QA=Object.defineProperty;var eC=(e,t,r)=>t in e?QA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var tC=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var yf=(e,t,r)=>(eC(e,typeof t!="symbol"?t+"":t,r),r);var mne=tC((pn,vn)=>{function rC(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const d of a.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&n(d)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerpolicy&&(a.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?a.credentials="include":o.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();var Qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tg(e){var t=e.default;if(typeof t=="function"){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var le={exports:{}},Ct={};/** * @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 Wu=Symbol.for("react.element"),iC=Symbol.for("react.portal"),aC=Symbol.for("react.fragment"),oC=Symbol.for("react.strict_mode"),sC=Symbol.for("react.profiler"),fC=Symbol.for("react.provider"),uC=Symbol.for("react.context"),lC=Symbol.for("react.forward_ref"),hC=Symbol.for("react.suspense"),cC=Symbol.for("react.memo"),dC=Symbol.for("react.lazy"),w3=Symbol.iterator;function pC(e){return e===null||typeof e!="object"?null:(e=w3&&e[w3]||e["@@iterator"],typeof e=="function"?e:null)}var U8={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j8=Object.assign,q8={};function Zs(e,t,r){this.props=e,this.context=t,this.refs=q8,this.updater=r||U8}Zs.prototype.isReactComponent={};Zs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Zs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function V8(){}V8.prototype=Zs.prototype;function Rg(e,t,r){this.props=e,this.context=t,this.refs=q8,this.updater=r||U8}var Og=Rg.prototype=new V8;Og.constructor=Rg;j8(Og,Zs.prototype);Og.isPureReactComponent=!0;var M3=Array.isArray,K8=Object.prototype.hasOwnProperty,Pg={current:null},G8={key:!0,ref:!0,__self:!0,__source:!0};function W8(e,t,r){var n,o={},a=null,d=null;if(t!=null)for(n in t.ref!==void 0&&(d=t.ref),t.key!==void 0&&(a=""+t.key),t)K8.call(t,n)&&!G8.hasOwnProperty(n)&&(o[n]=t[n]);var m=arguments.length-2;if(m===1)o.children=r;else if(1>>1,x=g[v];if(0>>1;vo(k,s))Ro(D,k)?(g[v]=D,g[R]=s,v=R):(g[v]=k,g[B]=s,v=B);else if(Ro(D,s))g[v]=D,g[R]=s,v=R;else break e}}return l}function o(g,l){var s=g.sortIndex-l.sortIndex;return s!==0?s:g.id-l.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var d=Date,m=d.now();e.unstable_now=function(){return d.now()-m}}var y=[],w=[],M=1,_=null,E=3,S=!1,A=!1,T=!1,I=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(g){for(var l=r(w);l!==null;){if(l.callback===null)n(w);else if(l.startTime<=g)n(w),l.sortIndex=l.expirationTime,t(y,l);else break;l=r(w)}}function N(g){if(T=!1,L(g),!A)if(r(y)!==null)A=!0,p(q);else{var l=r(w);l!==null&&b(N,l.startTime-g)}}function q(g,l){A=!1,T&&(T=!1,O(Z),Z=-1),S=!0;var s=E;try{for(L(l),_=r(y);_!==null&&(!(_.expirationTime>l)||g&&!h());){var v=_.callback;if(typeof v=="function"){_.callback=null,E=_.priorityLevel;var x=v(_.expirationTime<=l);l=e.unstable_now(),typeof x=="function"?_.callback=x:_===r(y)&&n(y),L(l)}else n(y);_=r(y)}if(_!==null)var C=!0;else{var B=r(w);B!==null&&b(N,B.startTime-l),C=!1}return C}finally{_=null,E=s,S=!1}}var X=!1,J=null,Z=-1,W=5,$=-1;function h(){return!(e.unstable_now()-$g||125v?(g.sortIndex=s,t(w,g),r(y)===null&&g===r(w)&&(T?(O(Z),Z=-1):T=!0,b(N,s-v))):(g.sortIndex=x,t(y,g),A||S||(A=!0,p(q))),g},e.unstable_shouldYield=h,e.unstable_wrapCallback=function(g){var l=E;return function(){var s=E;E=l;try{return g.apply(this,arguments)}finally{E=s}}}})(Y8);(function(e){e.exports=Y8})(Z8);/** * @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 X8=le.exports,bn=Z8.exports;function qe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ov=Object.prototype.hasOwnProperty,bC=/^[: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]*$/,E3={},S3={};function wC(e){return Ov.call(S3,e)?!0:Ov.call(E3,e)?!1:bC.test(e)?S3[e]=!0:(E3[e]=!0,!1)}function MC(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function xC(e,t,r,n){if(t===null||typeof t>"u"||MC(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Gr(e,t,r,n,o,a,d){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=d}var Tr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tr[e]=new Gr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tr[t]=new Gr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tr[e]=new Gr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tr[e]=new Gr(e,2,!1,e,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(e){Tr[e]=new Gr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tr[e]=new Gr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tr[e]=new Gr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tr[e]=new Gr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tr[e]=new Gr(e,5,!1,e.toLowerCase(),null,!1,!1)});var $g=/[\-:]([a-z])/g;function Lg(e){return e[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(e){var t=e.replace($g,Lg);Tr[t]=new Gr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($g,Lg);Tr[t]=new Gr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($g,Lg);Tr[t]=new Gr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Tr[e]=new Gr(e,1,!1,e.toLowerCase(),null,!1,!1)});Tr.xlinkHref=new Gr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Tr[e]=new Gr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Dg(e,t,r,n){var o=Tr.hasOwnProperty(t)?Tr[t]:null;(o!==null?o.type!==0:n||!(2m||o[d]!==a[m]){var y=` `+o[d].replace(" at new "," at ");return e.displayName&&y.includes("")&&(y=y.replace("",e.displayName)),y}while(1<=d&&0<=m);break}}}finally{Gd=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Kf(e):""}function _C(e){switch(e.tag){case 5:return Kf(e.type);case 16:return Kf("Lazy");case 13:return Kf("Suspense");case 19:return Kf("SuspenseList");case 0:case 2:case 15:return e=Wd(e.type,!1),e;case 11:return e=Wd(e.type.render,!1),e;case 1:return e=Wd(e.type,!0),e;default:return""}}function $v(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xo:return"Fragment";case Yo:return"Portal";case Pv:return"Profiler";case Fg:return"StrictMode";case Bv:return"Suspense";case Iv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case eM:return(e.displayName||"Context")+".Consumer";case Q8:return(e._context.displayName||"Context")+".Provider";case Ng:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zg:return t=e.displayName||null,t!==null?t:$v(e.type)||"Memo";case la:t=e._payload,e=e._init;try{return $v(e(t))}catch{}}return null}function EC(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $v(t);case 8:return t===Fg?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ka(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function SC(e){var t=rM(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(d){n=""+d,a.call(this,d)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(d){n=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function El(e){e._valueTracker||(e._valueTracker=SC(e))}function nM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=rM(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function W0(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Lv(e,t){var r=t.checked;return or({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r!=null?r:e._wrapperState.initialChecked})}function C3(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ka(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function iM(e,t){t=t.checked,t!=null&&Dg(e,"checked",t,!1)}function Dv(e,t){iM(e,t);var r=ka(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fv(e,t.type,r):t.hasOwnProperty("defaultValue")&&Fv(e,t.type,ka(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function k3(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Fv(e,t,r){(t!=="number"||W0(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Gf=Array.isArray;function cs(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Sl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function cu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Jf={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},AC=["Webkit","ms","Moz","O"];Object.keys(Jf).forEach(function(e){AC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jf[t]=Jf[e]})});function fM(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Jf.hasOwnProperty(e)&&Jf[e]?(""+t).trim():t+"px"}function uM(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=fM(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var CC=or({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 Hv(e,t){if(t){if(CC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(qe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(qe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(qe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(qe(62))}}function Uv(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 jv=null;function Hg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qv=null,ds=null,ps=null;function O3(e){if(e=Xu(e)){if(typeof qv!="function")throw Error(qe(280));var t=e.stateNode;t&&(t=Xh(t),qv(e.stateNode,e.type,t))}}function lM(e){ds?ps?ps.push(e):ps=[e]:ds=e}function hM(){if(ds){var e=ds,t=ps;if(ps=ds=null,O3(e),t)for(e=0;e>>=0,e===0?32:31-(FC(e)/NC|0)|0}var Al=64,Cl=4194304;function Wf(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function J0(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,a=e.pingedLanes,d=r&268435455;if(d!==0){var m=d&~o;m!==0?n=Wf(m):(a&=d,a!==0&&(n=Wf(a)))}else d=r&~o,d!==0?n=Wf(d):a!==0&&(n=Wf(a));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,a=t&-t,o>=a||o===16&&(a&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Zu(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Jn(t),e[t]=r}function jC(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=eu),z3=String.fromCharCode(32),H3=!1;function OM(e,t){switch(e){case"keyup":return gk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jo=!1;function bk(e,t){switch(e){case"compositionend":return PM(t);case"keypress":return t.which!==32?null:(H3=!0,z3);case"textInput":return e=t.data,e===z3&&H3?null:e;default:return null}}function wk(e,t){if(Jo)return e==="compositionend"||!Zg&&OM(e,t)?(e=TM(),p0=Kg=ma=null,Jo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=V3(r)}}function LM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?LM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function DM(){for(var e=window,t=W0();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=W0(e.document)}return t}function Yg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Tk(e){var t=DM(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&LM(r.ownerDocument.documentElement,r)){if(n!==null&&Yg(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,a=Math.min(n.start,o);n=n.end===void 0?a:Math.min(n.end,o),!e.extend&&a>n&&(o=n,n=a,a=o),o=K3(r,a);var d=K3(r,n);o&&d&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==d.node||e.focusOffset!==d.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(d.node,d.offset)):(t.setEnd(d.node,d.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Qo=null,Yv=null,ru=null,Xv=!1;function G3(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Xv||Qo==null||Qo!==W0(n)||(n=Qo,"selectionStart"in n&&Yg(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}),ru&&yu(ru,n)||(ru=n,n=th(Yv,"onSelect"),0rs||(e.current=nm[rs],nm[rs]=null,rs--)}function Zt(e,t){rs++,nm[rs]=e.current,e.current=t}var Ta={},Hr=Da(Ta),Xr=Da(!1),co=Ta;function Ss(e,t){var r=e.type.contextTypes;if(!r)return Ta;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in r)o[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Jr(e){return e=e.childContextTypes,e!=null}function nh(){er(Xr),er(Hr)}function e4(e,t,r){if(Hr.current!==Ta)throw Error(qe(168));Zt(Hr,t),Zt(Xr,r)}function KM(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(qe(108,EC(e)||"Unknown",o));return or({},r,n)}function ih(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ta,co=Hr.current,Zt(Hr,e),Zt(Xr,Xr.current),!0}function t4(e,t,r){var n=e.stateNode;if(!n)throw Error(qe(169));r?(e=KM(e,t,co),n.__reactInternalMemoizedMergedChildContext=e,er(Xr),er(Hr),Zt(Hr,e)):er(Xr),Zt(Xr,r)}var Di=null,Jh=!1,f1=!1;function GM(e){Di===null?Di=[e]:Di.push(e)}function Hk(e){Jh=!0,GM(e)}function Fa(){if(!f1&&Di!==null){f1=!0;var e=0,t=Ht;try{var r=Di;for(Ht=1;e>=d,o-=d,Fi=1<<32-Jn(t)+o|r<Z?(W=J,J=null):W=J.sibling;var $=E(O,J,L[Z],N);if($===null){J===null&&(J=W);break}e&&J&&$.alternate===null&&t(O,J),P=a($,P,Z),X===null?q=$:X.sibling=$,X=$,J=W}if(Z===L.length)return r(O,J),tr&&Xa(O,Z),q;if(J===null){for(;ZZ?(W=J,J=null):W=J.sibling;var h=E(O,J,$.value,N);if(h===null){J===null&&(J=W);break}e&&J&&h.alternate===null&&t(O,J),P=a(h,P,Z),X===null?q=h:X.sibling=h,X=h,J=W}if($.done)return r(O,J),tr&&Xa(O,Z),q;if(J===null){for(;!$.done;Z++,$=L.next())$=_(O,$.value,N),$!==null&&(P=a($,P,Z),X===null?q=$:X.sibling=$,X=$);return tr&&Xa(O,Z),q}for(J=n(O,J);!$.done;Z++,$=L.next())$=S(J,O,Z,$.value,N),$!==null&&(e&&$.alternate!==null&&J.delete($.key===null?Z:$.key),P=a($,P,Z),X===null?q=$:X.sibling=$,X=$);return e&&J.forEach(function(i){return t(O,i)}),tr&&Xa(O,Z),q}function I(O,P,L,N){if(typeof L=="object"&&L!==null&&L.type===Xo&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case _l:e:{for(var q=L.key,X=P;X!==null;){if(X.key===q){if(q=L.type,q===Xo){if(X.tag===7){r(O,X.sibling),P=o(X,L.props.children),P.return=O,O=P;break e}}else if(X.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===la&&f4(q)===X.type){r(O,X.sibling),P=o(X,L.props),P.ref=Ef(O,X,L),P.return=O,O=P;break e}r(O,X);break}else t(O,X);X=X.sibling}L.type===Xo?(P=uo(L.props.children,O.mode,N,L.key),P.return=O,O=P):(N=x0(L.type,L.key,L.props,null,O.mode,N),N.ref=Ef(O,P,L),N.return=O,O=N)}return d(O);case Yo:e:{for(X=L.key;P!==null;){if(P.key===X)if(P.tag===4&&P.stateNode.containerInfo===L.containerInfo&&P.stateNode.implementation===L.implementation){r(O,P.sibling),P=o(P,L.children||[]),P.return=O,O=P;break e}else{r(O,P);break}else t(O,P);P=P.sibling}P=m1(L,O.mode,N),P.return=O,O=P}return d(O);case la:return X=L._init,I(O,P,X(L._payload),N)}if(Gf(L))return A(O,P,L,N);if(bf(L))return T(O,P,L,N);Il(O,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,P!==null&&P.tag===6?(r(O,P.sibling),P=o(P,L),P.return=O,O=P):(r(O,P),P=v1(L,O.mode,N),P.return=O,O=P),d(O)):r(O,P)}return I}var Cs=t7(!0),r7=t7(!1),Ju={},mi=Da(Ju),xu=Da(Ju),_u=Da(Ju);function io(e){if(e===Ju)throw Error(qe(174));return e}function a2(e,t){switch(Zt(_u,t),Zt(xu,e),Zt(mi,Ju),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zv(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zv(t,e)}er(mi),Zt(mi,t)}function ks(){er(mi),er(xu),er(_u)}function n7(e){io(_u.current);var t=io(mi.current),r=zv(t,e.type);t!==r&&(Zt(xu,e),Zt(mi,r))}function o2(e){xu.current===e&&(er(mi),er(xu))}var nr=Da(0);function lh(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var u1=[];function s2(){for(var e=0;er?r:4,e(!0);var n=l1.transition;l1.transition={};try{e(!1),t()}finally{Ht=r,l1.transition=n}}function b7(){return Fn().memoizedState}function Vk(e,t,r){var n=Ea(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},w7(e))M7(t,r);else if(r=XM(e,t,r,n),r!==null){var o=qr();Qn(r,e,n,o),x7(r,t,n)}}function Kk(e,t,r){var n=Ea(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(w7(e))M7(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var d=t.lastRenderedState,m=a(d,r);if(o.hasEagerState=!0,o.eagerState=m,ei(m,d)){var y=t.interleaved;y===null?(o.next=o,n2(t)):(o.next=y.next,y.next=o),t.interleaved=o;return}}catch{}finally{}r=XM(e,t,o,n),r!==null&&(o=qr(),Qn(r,e,n,o),x7(r,t,n))}}function w7(e){var t=e.alternate;return e===ar||t!==null&&t===ar}function M7(e,t){nu=hh=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function x7(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,jg(e,r)}}var ch={readContext:Dn,useCallback:Or,useContext:Or,useEffect:Or,useImperativeHandle:Or,useInsertionEffect:Or,useLayoutEffect:Or,useMemo:Or,useReducer:Or,useRef:Or,useState:Or,useDebugValue:Or,useDeferredValue:Or,useTransition:Or,useMutableSource:Or,useSyncExternalStore:Or,useId:Or,unstable_isNewReconciler:!1},Gk={readContext:Dn,useCallback:function(e,t){return ai().memoizedState=[e,t===void 0?null:t],e},useContext:Dn,useEffect:l4,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,y0(4194308,4,p7.bind(null,t,e),r)},useLayoutEffect:function(e,t){return y0(4194308,4,e,t)},useInsertionEffect:function(e,t){return y0(4,2,e,t)},useMemo:function(e,t){var r=ai();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ai();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Vk.bind(null,ar,e),[n.memoizedState,e]},useRef:function(e){var t=ai();return e={current:e},t.memoizedState=e},useState:u4,useDebugValue:c2,useDeferredValue:function(e){return ai().memoizedState=e},useTransition:function(){var e=u4(!1),t=e[0];return e=qk.bind(null,e[1]),ai().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ar,o=ai();if(tr){if(r===void 0)throw Error(qe(407));r=r()}else{if(r=t(),br===null)throw Error(qe(349));(vo&30)!==0||o7(n,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,l4(f7.bind(null,n,a,e),[e]),n.flags|=2048,Au(9,s7.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=ai(),t=br.identifierPrefix;if(tr){var r=Ni,n=Fi;r=(n&~(1<<32-Jn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Eu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=d.createElement(r,{is:n.is}):(e=d.createElement(r),r==="select"&&(d=e,n.multiple?d.multiple=!0:n.size&&(d.size=n.size))):e=d.createElementNS(e,r),e[li]=t,e[Mu]=n,O7(e,t,!1,!1),t.stateNode=e;e:{switch(d=Uv(r,n),r){case"dialog":Xt("cancel",e),Xt("close",e),o=n;break;case"iframe":case"object":case"embed":Xt("load",e),o=n;break;case"video":case"audio":for(o=0;oRs&&(t.flags|=128,n=!0,Sf(a,!1),t.lanes=4194304)}else{if(!n)if(e=lh(d),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Sf(a,!0),a.tail===null&&a.tailMode==="hidden"&&!d.alternate&&!tr)return Pr(t),null}else 2*lr()-a.renderingStartTime>Rs&&r!==1073741824&&(t.flags|=128,n=!0,Sf(a,!1),t.lanes=4194304);a.isBackwards?(d.sibling=t.child,t.child=d):(r=a.last,r!==null?r.sibling=d:t.child=d,a.last=d)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=lr(),t.sibling=null,r=nr.current,Zt(nr,n?r&1|2:r&1),t):(Pr(t),null);case 22:case 23:return y2(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(un&1073741824)!==0&&(Pr(t),t.subtreeFlags&6&&(t.flags|=8192)):Pr(t),null;case 24:return null;case 25:return null}throw Error(qe(156,t.tag))}function tT(e,t){switch(Jg(t),t.tag){case 1:return Jr(t.type)&&nh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ks(),er(Xr),er(Hr),s2(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return o2(t),null;case 13:if(er(nr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(qe(340));As()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return er(nr),null;case 4:return ks(),null;case 10:return r2(t.type._context),null;case 22:case 23:return y2(),null;case 24:return null;default:return null}}var Ll=!1,Nr=!1,rT=typeof WeakSet=="function"?WeakSet:Set,et=null;function os(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){sr(e,t,n)}else r.current=null}function vm(e,t,r){try{r()}catch(n){sr(e,t,n)}}var b4=!1;function nT(e,t){if(Jv=Q0,e=DM(),Yg(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var d=0,m=-1,y=-1,w=0,M=0,_=e,E=null;t:for(;;){for(var S;_!==r||o!==0&&_.nodeType!==3||(m=d+o),_!==a||n!==0&&_.nodeType!==3||(y=d+n),_.nodeType===3&&(d+=_.nodeValue.length),(S=_.firstChild)!==null;)E=_,_=S;for(;;){if(_===e)break t;if(E===r&&++w===o&&(m=d),E===a&&++M===n&&(y=d),(S=_.nextSibling)!==null)break;_=E,E=_.parentNode}_=S}r=m===-1||y===-1?null:{start:m,end:y}}else r=null}r=r||{start:0,end:0}}else r=null;for(Qv={focusedElem:e,selectionRange:r},Q0=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){t=et;try{var A=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(A!==null){var T=A.memoizedProps,I=A.memoizedState,O=t.stateNode,P=O.getSnapshotBeforeUpdate(t.elementType===t.type?T:Wn(t.type,T),I);O.__reactInternalSnapshotBeforeUpdate=P}break;case 3:var L=t.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(qe(163))}}catch(N){sr(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}return A=b4,b4=!1,A}function iu(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,a!==void 0&&vm(t,r,a)}o=o.next}while(o!==n)}}function tc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function mm(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function I7(e){var t=e.alternate;t!==null&&(e.alternate=null,I7(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[li],delete t[Mu],delete t[rm],delete t[Nk],delete t[zk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $7(e){return e.tag===5||e.tag===3||e.tag===4}function w4(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$7(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function gm(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=rh));else if(n!==4&&(e=e.child,e!==null))for(gm(e,t,r),e=e.sibling;e!==null;)gm(e,t,r),e=e.sibling}function ym(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(ym(e,t,r),e=e.sibling;e!==null;)ym(e,t,r),e=e.sibling}var Sr=null,Zn=!1;function aa(e,t,r){for(r=r.child;r!==null;)L7(e,t,r),r=r.sibling}function L7(e,t,r){if(vi&&typeof vi.onCommitFiberUnmount=="function")try{vi.onCommitFiberUnmount(Gh,r)}catch{}switch(r.tag){case 5:Nr||os(r,t);case 6:var n=Sr,o=Zn;Sr=null,aa(e,t,r),Sr=n,Zn=o,Sr!==null&&(Zn?(e=Sr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Sr.removeChild(r.stateNode));break;case 18:Sr!==null&&(Zn?(e=Sr,r=r.stateNode,e.nodeType===8?s1(e.parentNode,r):e.nodeType===1&&s1(e,r),mu(e)):s1(Sr,r.stateNode));break;case 4:n=Sr,o=Zn,Sr=r.stateNode.containerInfo,Zn=!0,aa(e,t,r),Sr=n,Zn=o;break;case 0:case 11:case 14:case 15:if(!Nr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var a=o,d=a.destroy;a=a.tag,d!==void 0&&((a&2)!==0||(a&4)!==0)&&vm(r,t,d),o=o.next}while(o!==n)}aa(e,t,r);break;case 1:if(!Nr&&(os(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(m){sr(r,t,m)}aa(e,t,r);break;case 21:aa(e,t,r);break;case 22:r.mode&1?(Nr=(n=Nr)||r.memoizedState!==null,aa(e,t,r),Nr=n):aa(e,t,r);break;default:aa(e,t,r)}}function M4(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new rT),t.forEach(function(n){var o=cT.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Vn(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=d),n&=~a}if(n=o,n=lr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*aT(n/1960))-n,10e?16:e,ga===null)var n=!1;else{if(e=ga,ga=null,vh=0,($t&6)!==0)throw Error(qe(331));var o=$t;for($t|=4,et=e.current;et!==null;){var a=et,d=a.child;if((et.flags&16)!==0){var m=a.deletions;if(m!==null){for(var y=0;ylr()-m2?fo(e,0):v2|=r),Qr(e,t)}function q7(e,t){t===0&&((e.mode&1)===0?t=1:(t=Cl,Cl<<=1,(Cl&130023424)===0&&(Cl=4194304)));var r=qr();e=Wi(e,t),e!==null&&(Zu(e,t,r),Qr(e,r))}function hT(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),q7(e,r)}function cT(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(qe(314))}n!==null&&n.delete(t),q7(e,r)}var V7;V7=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xr.current)Yr=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Yr=!1,Qk(e,t,r);Yr=(e.flags&131072)!==0}else Yr=!1,tr&&(t.flags&1048576)!==0&&WM(t,oh,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;b0(e,t),e=t.pendingProps;var o=Ss(t,Hr.current);ms(t,r),o=u2(null,t,n,e,o,r);var a=l2();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Jr(n)?(a=!0,ih(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,i2(t),o.updater=Qh,t.stateNode=o,o._reactInternals=t,fm(t,n,e,r),t=hm(null,t,n,!0,a,r)):(t.tag=0,tr&&a&&Xg(t),jr(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(b0(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=pT(n),e=Wn(n,e),o){case 0:t=lm(null,t,n,e,r);break e;case 1:t=m4(null,t,n,e,r);break e;case 11:t=p4(null,t,n,e,r);break e;case 14:t=v4(null,t,n,Wn(n.type,e),r);break e}throw Error(qe(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Wn(n,o),lm(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Wn(n,o),m4(e,t,n,o,r);case 3:e:{if(k7(t),e===null)throw Error(qe(387));n=t.pendingProps,a=t.memoizedState,o=a.element,JM(e,t),uh(t,n,null,r);var d=t.memoizedState;if(n=d.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:d.cache,pendingSuspenseBoundaries:d.pendingSuspenseBoundaries,transitions:d.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=Ts(Error(qe(423)),t),t=g4(e,t,n,r,o);break e}else if(n!==o){o=Ts(Error(qe(424)),t),t=g4(e,t,n,r,o);break e}else for(hn=Ma(t.stateNode.containerInfo.firstChild),mn=t,tr=!0,Yn=null,r=r7(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(As(),n===o){t=Zi(e,t,r);break e}jr(e,t,n,r)}t=t.child}return t;case 5:return n7(t),e===null&&am(t),n=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,d=o.children,em(n,o)?d=null:a!==null&&em(n,a)&&(t.flags|=32),C7(e,t),jr(e,t,d,r),t.child;case 6:return e===null&&am(t),null;case 13:return T7(e,t,r);case 4:return a2(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Cs(t,null,n,r):jr(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Wn(n,o),p4(e,t,n,o,r);case 7:return jr(e,t,t.pendingProps,r),t.child;case 8:return jr(e,t,t.pendingProps.children,r),t.child;case 12:return jr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,a=t.memoizedProps,d=o.value,Zt(sh,n._currentValue),n._currentValue=d,a!==null)if(ei(a.value,d)){if(a.children===o.children&&!Xr.current){t=Zi(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var m=a.dependencies;if(m!==null){d=a.child;for(var y=m.firstContext;y!==null;){if(y.context===n){if(a.tag===1){y=ji(-1,r&-r),y.tag=2;var w=a.updateQueue;if(w!==null){w=w.shared;var M=w.pending;M===null?y.next=y:(y.next=M.next,M.next=y),w.pending=y}}a.lanes|=r,y=a.alternate,y!==null&&(y.lanes|=r),om(a.return,r,t),m.lanes|=r;break}y=y.next}}else if(a.tag===10)d=a.type===t.type?null:a.child;else if(a.tag===18){if(d=a.return,d===null)throw Error(qe(341));d.lanes|=r,m=d.alternate,m!==null&&(m.lanes|=r),om(d,r,t),d=a.sibling}else d=a.child;if(d!==null)d.return=a;else for(d=a;d!==null;){if(d===t){d=null;break}if(a=d.sibling,a!==null){a.return=d.return,d=a;break}d=d.return}a=d}jr(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,ms(t,r),o=Dn(o),n=n(o),t.flags|=1,jr(e,t,n,r),t.child;case 14:return n=t.type,o=Wn(n,t.pendingProps),o=Wn(n.type,o),v4(e,t,n,o,r);case 15:return S7(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Wn(n,o),b0(e,t),t.tag=1,Jr(n)?(e=!0,ih(t)):e=!1,ms(t,r),e7(t,n,o),fm(t,n,o,r),hm(null,t,n,!0,e,r);case 19:return R7(e,t,r);case 22:return A7(e,t,r)}throw Error(qe(156,t.tag))};function K7(e,t){return yM(e,t)}function dT(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 Bn(e,t,r,n){return new dT(e,t,r,n)}function w2(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pT(e){if(typeof e=="function")return w2(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ng)return 11;if(e===zg)return 14}return 2}function Sa(e,t){var r=e.alternate;return r===null?(r=Bn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function x0(e,t,r,n,o,a){var d=2;if(n=e,typeof e=="function")w2(e)&&(d=1);else if(typeof e=="string")d=5;else e:switch(e){case Xo:return uo(r.children,o,a,t);case Fg:d=8,o|=8;break;case Pv:return e=Bn(12,r,t,o|2),e.elementType=Pv,e.lanes=a,e;case Bv:return e=Bn(13,r,t,o),e.elementType=Bv,e.lanes=a,e;case Iv:return e=Bn(19,r,t,o),e.elementType=Iv,e.lanes=a,e;case tM:return nc(r,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q8:d=10;break e;case eM:d=9;break e;case Ng:d=11;break e;case zg:d=14;break e;case la:d=16,n=null;break e}throw Error(qe(130,e==null?e:typeof e,""))}return t=Bn(d,r,t,o),t.elementType=e,t.type=n,t.lanes=a,t}function uo(e,t,r,n){return e=Bn(7,e,n,t),e.lanes=r,e}function nc(e,t,r,n){return e=Bn(22,e,n,t),e.elementType=tM,e.lanes=r,e.stateNode={isHidden:!1},e}function v1(e,t,r){return e=Bn(6,e,null,t),e.lanes=r,e}function m1(e,t,r){return t=Bn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vT(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yd(0),this.expirationTimes=Yd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yd(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function M2(e,t,r,n,o,a,d,m,y){return e=new vT(e,t,r,m,y),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Bn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},i2(a),e}function mT(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}t(),e.exports=wn})(Ig);var T4=Ig.exports;Rv.createRoot=T4.createRoot,Rv.hydrateRoot=T4.hydrateRoot;const nt="https://hashex.org",fn={auditsTitle:"Audits",servicesTitle:"Services",productsTitle:"Products",chainsTitle:"Chains",companyTitle:"Company",typesOfAuditsTitle:"Types of Audits",telegramChatTitle:"Let's Talk",copyrightText:"\xA9 All rights reserved",privacyPolicyTitle:"Privacy Policy",cookiePolicyTitle:"Cookie Policy",telegramChatLink:"https://t.me/hashex_manager",socialMediumLink:"https://blog.hashex.org/",socialTwitterLink:"https://twitter.com/hashexofficial",socialLinkedinLink:"https://www.linkedin.com/company/hashex/about/",socialGithubLink:"https://github.com/HashEx",socialEmailLink:"contact@hashex.org",socialTelegramLink:"https://t.me/HashExOfficial",privacyHref:`${nt}/privacy`,cookieHref:`${nt}/cookie`,chainsHref:`${nt}/chains`,typesOfAuditsHref:`${nt}/audit-types`,productsHref:`${nt}/products`,servicesHref:`${nt}/services`,socialAnalytexEmailLink:"contact@analytex.org",defiBadgeLink:"https://defisec.info/",auditsLinks:[{id:1,linkTitle:"Smart Contract Audit",linkHref:`${nt}/smart-contract-audit`},{id:51,linkTitle:"Audit Reports",linkHref:`${nt}/audits`}],chainsLinks:[{id:25,linkTitle:"BSC",linkHref:`${nt}/chains/bsc`},{id:26,linkTitle:"Fantom",linkHref:`${nt}/chains/fantom`},{id:27,linkTitle:"Solana",linkHref:`${nt}/chains/solana`},{id:28,linkTitle:"Avalanche",linkHref:`${nt}/chains/avalanche`},{id:29,linkTitle:"Aurora",linkHref:`${nt}/chains/aurora`},{id:30,linkTitle:"Polygon",linkHref:`${nt}/chains/polygon`},{id:31,linkTitle:"Gnosis Chain",linkHref:`${nt}/chains/gnosis`},{id:57,linkTitle:"Terra",linkHref:`${nt}/chains/terra`},{id:58,linkTitle:"TON",linkHref:`${nt}/chains/ton`},{id:59,linkTitle:"NEAR",linkHref:`${nt}/chains/near`},{id:60,linkTitle:"Hedera",linkHref:`${nt}/chains/hedera`},{id:61,linkTitle:"Ethereum",linkHref:`${nt}/chains/ethereum`},{id:62,linkTitle:"Neon",linkHref:`${nt}/chains/neon`},{id:63,linkTitle:"Shardeum",linkHref:`${nt}/chains/shardeum`}],companyLinks:[{id:17,linkTitle:"About us",linkHref:`${nt}/company/about-us`},{id:55,linkTitle:"Media",linkHref:`${nt}/company/media`},{id:19,linkTitle:"Careers",linkHref:`${nt}/company/careers`},{id:20,linkTitle:"Customers",linkHref:`${nt}/company/customers`},{id:21,linkTitle:"Partners",linkHref:`${nt}/company/partners`},{id:22,linkTitle:"Blog",linkHref:`${nt}/company/blog`},{id:23,linkTitle:"FAQ",linkHref:`${nt}/faq`},{id:24,linkTitle:"Contact us",linkHref:`${nt}/contacts`}],productsLinks:[{id:11,linkTitle:"AnalytEx",linkHref:`${nt}/products/analytex`},{id:12,linkTitle:"CryptEx",linkHref:`${nt}/products/cryptex`},{id:13,linkTitle:"Online ABI Encoder",linkHref:"https://abi.hashex.org/"},{id:14,linkTitle:"Paper Wallet",linkHref:"https://paper.hashex.org/"}],servicesLinks:[{id:4,linkTitle:"Security Audits",linkHref:`${nt}/smart-contract-audit`},{id:5,linkTitle:"Smart Contract Development",linkHref:`${nt}/services/smart-contract-development`},{id:6,linkTitle:"Blockchain consulting",linkHref:`${nt}/services/blockchain-consulting`},{id:8,linkTitle:"Blockchain risk analysis",linkHref:`${nt}/services/blockchain-risk-analysis`},{id:9,linkTitle:"Blockchain Integration",linkHref:`${nt}/services/blockchain-integration`},{id:10,linkTitle:"Blockchain developer",linkHref:`${nt}/services/blockchain-development`},{id:62,linkTitle:"NFT Marketplace Development",linkHref:`${nt}/services/nft-marketplace-development`},{id:63,linkTitle:"Penetration Testing",linkHref:`${nt}/services/penetration-testing`},{id:64,linkTitle:"Incident response",linkHref:`${nt}/services/incident-response`},{id:65,linkTitle:"HR services",linkHref:`${nt}/services/hr-service`},{id:67,linkTitle:"Marketing services",linkHref:`${nt}/services/marketing-service`}],typesOfAuditsLinks:[{id:32,linkTitle:"NFT audit",linkHref:`${nt}/audit-types/nft-audit`},{id:33,linkTitle:"Staking audit",linkHref:`${nt}/audit-types/staking-audit`},{id:34,linkTitle:"Stablecoin audit",linkHref:`${nt}/audit-types/stablecoin-audit`},{id:37,linkTitle:"RFI token audit",linkHref:`${nt}/audit-types/rfi-token-audit`},{id:38,linkTitle:"BabyToken audit",linkHref:`${nt}/audit-types/babytoken-audit`},{id:40,linkTitle:"DAO audit",linkHref:`${nt}/audit-types/dao-audit`},{id:35,linkTitle:"DApp audit",linkHref:`${nt}/audit-types/dapp-audit`},{id:36,linkTitle:"DEX audit",linkHref:`${nt}/audit-types/dex-audit`},{id:53,linkTitle:"Lending audit",linkHref:`${nt}/audit-types/lending-audit`},{id:41,linkTitle:"erc20, erc721, erc1155 audit",linkHref:`${nt}/audit-types/erc-tokens-audit`},{id:39,linkTitle:"Farm audit",linkHref:`${nt}/audit-types/farm-audit`},{id:54,linkTitle:"Bridge audit",linkHref:`${nt}/audit-types/bridge-audit`},{id:42,linkTitle:"Marketplace, auction, game audit",linkHref:`${nt}/audit-types/marketplace-audit`}],contacts:{id:1,title:"Let's Work Together! Write now.",requestButtonText:"Request a Quote",requestButtonHref:`${nt}/contacts`,email:"contact@hashex.org"}};var Xn=(e=>(e[e.NO_SIMILARITY=0]="NO_SIMILARITY",e[e.SIMILARITY=1]="SIMILARITY",e[e.EXACT_SIMILARITY=2]="EXACT_SIMILARITY",e[e.NO_RESULTS=3]="NO_RESULTS",e))(Xn||{}),zt=(e=>(e.ARBITRUM="ARBITRUM",e.AURORA="AURORA",e.AVALANCHE="AVALANCHE",e.BASE="BASE",e.BSC="BINANCE_SMART_CHAIN",e.CRONOS="CRONOS",e.ETHEREUM="ETHEREUM",e.FANTOM="FANTOM",e.HECO="HECO",e.METIS="METIS",e.OPTIMISM="OPTIMISM",e.POLYGON="POLYGON",e.PULSE="PULSE",e.XDAI="XDAI",e))(zt||{});const S2={[zt.ARBITRUM]:"/assets/images/icons/arbitrum-icon.svg",[zt.AURORA]:"/assets/images/icons/aurora-icon.svg",[zt.AVALANCHE]:"/assets/images/icons/avalanche-icon.svg",[zt.BASE]:"/assets/images/icons/base-logo.svg",[zt.BSC]:"/assets/images/icons/binance-logo.svg",[zt.CRONOS]:"/assets/images/icons/cronos-icon.svg",[zt.ETHEREUM]:"/assets/images/icons/ethereum-icon.svg",[zt.FANTOM]:"/assets/images/icons/fantom-logo.svg",[zt.HECO]:"/assets/images/icons/heco-icon.svg",[zt.METIS]:"/assets/images/icons/metis-icon.svg",[zt.OPTIMISM]:"/assets/images/icons/optimism-logo.svg",[zt.POLYGON]:"/assets/images/icons/polygon-logo-violet.svg",[zt.PULSE]:"/assets/images/icons/pulse-logo.svg",[zt.XDAI]:"/assets/images/icons/xDai-icon.svg"},MT={[zt.ARBITRUM]:"Arbitrum Network",[zt.AURORA]:"Aurora",[zt.AVALANCHE]:"Avalanche Network",[zt.BASE]:"Base Network",[zt.BSC]:"Binance Smart Chain",[zt.CRONOS]:"Cronos Network",[zt.ETHEREUM]:"Ethereum",[zt.FANTOM]:"Fantom Network",[zt.HECO]:"Heco Network",[zt.METIS]:"Metis",[zt.OPTIMISM]:"Optimism",[zt.POLYGON]:"Polygon Network",[zt.PULSE]:"Pulse Chain",[zt.XDAI]:"xDAI Network"},xT="#FFFFFF",_T="#000000",ET="#262626",ST="#1B1B1B",AT="#2C2C2C",CT="#414141",kT="#F1F1F1",TT="#C4C4C4",RT="#7C7C7C",OT="#7AF051",PT="#C2F051",BT="linear-gradient(91.83deg, #7AF051 16.38%, rgba(194, 240, 81, 0.8) 116.75%);",IT="linear-gradient(90deg, #7BF152 2.42%, rgba(189, 244, 133, 0.47) 100%);",$T="linear-gradient(90deg,#bc025f 31.88%,#c471ed 107.19%);",LT="rgba(0, 0, 0, 0.25)",DT="rgba(3, 3, 3, 0.8)",FT="#FF0000",NT="#FF4545",zT="#F3EA00",HT="#FF9029",UT="#70D4FF",jT="#bc025f",qT="#FF7676",VT="#404040",Fe={WHITE:xT,TOTAL_BLACK:_T,BLACK:ET,DEEP_BLACK:ST,MIDNIGHT_BLACK:AT,LIGHT_BLACK:CT,LIGHT_GREY:kT,GREY:TT,DARK_GREY:RT,GREEN_PRIMARY:OT,GREEN_SECONDARY:PT,GRADIENT:BT,BORDER_GRADIENT:IT,PURPLE_GRADIENT:$T,BORDER_SHADOW:LT,MODAL_BG:DT,ERROR:FT,RED:NT,ORANGE:HT,BLUE:UT,YELLOW:zT,PINK:jT,REQUIRED_ERROR:qT,BANNER_GREY:VT},oa={MOBILE_SMALL:"320px",MOBILE_LARGE:"480px",TABLET:"640px",TABLET_LARGE:"860px",LAPTOP:"1024px",LAPTOP_LARGE:"1320px",DESKTOP:"1440px",DESKTOP_LARGE:"1920px"},Ee={MOBILE_SMALL:`(min-width: ${oa.MOBILE_SMALL})`,MOBILE_LARGE:`(min-width: ${oa.MOBILE_LARGE})`,TABLET:`(min-width: ${oa.TABLET})`,TABLET_LARGE:`(min-width: ${oa.TABLET_LARGE})`,LAPTOP:`(min-width: ${oa.LAPTOP})`,LAPTOP_LARGE:`(min-width: ${oa.LAPTOP_LARGE})`,DESKTOP:`(min-width: ${oa.DESKTOP})`,DESKTOP_LARGE:`(min-width: ${oa.DESKTOP_LARGE})`},st={H1:"font-size: 70px",H2:"font-size: 50px",H3:"font-size: 45px",H4:"font-size: 30px",H5:"font-size: 28px",H6:"font-size: 24px",H7:"font-size: 22px",H8:"font-size: 18px",H9:"font-size: 16px",H10:"font-size: 14px",BODY1:"font-size: 24px",BODY2:"font-size: 22px",BODY3:"font-size: 20px",BODY4:"font-size: 18px",BODY5:"font-size: 16px",BODY6:"font-size: 14px",CAPTION1:"font-size: 12px",CAPTION2:"font-size: 10px"},Y7=` ${st.H4} line-height: 120%; font-family: 'Futura'; @media ${Ee.MOBILE_LARGE} { ${st.H3}; } @media ${Ee.TABLET} { ${st.H2}; } @media ${Ee.LAPTOP_LARGE} { ${st.H1}; } `,A2=` ${st.H6}; line-height: 120%; font-family: 'Futura'; @media ${Ee.MOBILE_LARGE} { ${st.H5}; } @media ${Ee.LAPTOP} { ${st.H4}; } @media ${Ee.LAPTOP_LARGE} { ${st.H3}; } `,ot={},KT=Object.freeze(Object.defineProperty({__proto__:null,default:ot},Symbol.toStringTag,{value:"Module"}));var C2={exports:{}},Ut={};/** * @license React * react-is.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 k2=Symbol.for("react.element"),T2=Symbol.for("react.portal"),fc=Symbol.for("react.fragment"),uc=Symbol.for("react.strict_mode"),lc=Symbol.for("react.profiler"),hc=Symbol.for("react.provider"),cc=Symbol.for("react.context"),GT=Symbol.for("react.server_context"),dc=Symbol.for("react.forward_ref"),pc=Symbol.for("react.suspense"),vc=Symbol.for("react.suspense_list"),mc=Symbol.for("react.memo"),gc=Symbol.for("react.lazy"),WT=Symbol.for("react.offscreen"),X7;X7=Symbol.for("react.module.reference");function zn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case k2:switch(e=e.type,e){case fc:case lc:case uc:case pc:case vc:return e;default:switch(e=e&&e.$$typeof,e){case GT:case cc:case dc:case gc:case mc:case hc:return e;default:return t}}case T2:return t}}}Ut.ContextConsumer=cc;Ut.ContextProvider=hc;Ut.Element=k2;Ut.ForwardRef=dc;Ut.Fragment=fc;Ut.Lazy=gc;Ut.Memo=mc;Ut.Portal=T2;Ut.Profiler=lc;Ut.StrictMode=uc;Ut.Suspense=pc;Ut.SuspenseList=vc;Ut.isAsyncMode=function(){return!1};Ut.isConcurrentMode=function(){return!1};Ut.isContextConsumer=function(e){return zn(e)===cc};Ut.isContextProvider=function(e){return zn(e)===hc};Ut.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===k2};Ut.isForwardRef=function(e){return zn(e)===dc};Ut.isFragment=function(e){return zn(e)===fc};Ut.isLazy=function(e){return zn(e)===gc};Ut.isMemo=function(e){return zn(e)===mc};Ut.isPortal=function(e){return zn(e)===T2};Ut.isProfiler=function(e){return zn(e)===lc};Ut.isStrictMode=function(e){return zn(e)===uc};Ut.isSuspense=function(e){return zn(e)===pc};Ut.isSuspenseList=function(e){return zn(e)===vc};Ut.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===fc||e===lc||e===uc||e===pc||e===vc||e===WT||typeof e=="object"&&e!==null&&(e.$$typeof===gc||e.$$typeof===mc||e.$$typeof===hc||e.$$typeof===cc||e.$$typeof===dc||e.$$typeof===X7||e.getModuleId!==void 0)};Ut.typeOf=zn;(function(e){e.exports=Ut})(C2);function ZT(e){function t(x,C,B,k,R){for(var D=0,z=0,H=0,V=0,U,F,G=0,ie=0,Y,oe=Y=U=0,xe=0,ne=0,Q=0,te=0,ee=B.length,se=ee-1,_e,K="",re="",Te="",ae="",Me;xeU)&&(te=(K=K.replace(" ",":")).length),0k&&(k=(C=C.trim()).charCodeAt(0)),k){case 38:return C.replace(O,"$1"+x.trim());case 58:return x.trim()+C.replace(O,"$1"+x.trim());default:if(0<1*B&&0z.charCodeAt(8))break;case 115:R=R.replace(z,"-webkit-"+z)+";"+R;break;case 207:case 102:R=R.replace(z,"-webkit-"+(102B.charCodeAt(0)&&(B=B.trim()),v=B,B=[v],01?t-1:0),n=1;n0?" Args: "+r.join(", "):""))}var cR=function(){function e(r){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=r}var t=e.prototype;return t.indexOfGroup=function(r){for(var n=0,o=0;o=this.groupSizes.length){for(var o=this.groupSizes,a=o.length,d=a;r>=d;)(d<<=1)<0&&Qu(16,""+r);this.groupSizes=new Uint32Array(d),this.groupSizes.set(o),this.length=d;for(var m=a;m=this.length||this.groupSizes[r]===0)return n;for(var o=this.groupSizes[r],a=this.indexOfGroup(r),d=a+o,m=a;m=su&&(su=t+1),_0.set(e,t),bh.set(t,e)},vR="style["+Os+'][data-styled-version="5.3.6"]',mR=new RegExp("^"+Os+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),gR=function(e,t,r){for(var n,o=r.split(","),a=0,d=o.length;a=0;w--){var M=y[w];if(M&&M.nodeType===1&&M.hasAttribute(Os))return M}}(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(Os,"active"),n.setAttribute("data-styled-version","5.3.6");var d=bR();return d&&n.setAttribute("nonce",d),r.insertBefore(n,a),n},wR=function(){function e(r){var n=this.element=nx(r);n.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var a=document.styleSheets,d=0,m=a.length;d=0){var o=document.createTextNode(n),a=this.nodes[r];return this.element.insertBefore(o,a||null),this.length++,!0}return!1},t.deleteRule=function(r){this.element.removeChild(this.nodes[r]),this.length--},t.getRule=function(r){return r0&&(_+=E+",")}),a+=""+w+M+'{content:"'+_+`"}/*!sc*/ `}}}return a}(this)},e}(),ER=/(a)(d)/gi,D4=function(e){return String.fromCharCode(e+(e>25?39:97))};function Em(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=D4(t%52)+r;return(D4(t%52)+r).replace(ER,"$1-$2")}var fs=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},ax=function(e){return fs(5381,e)};function SR(e){for(var t=0;t>>0);if(!r.hasNameForId(o,m)){var y=n(d,"."+m,void 0,o);r.insertRules(o,m,y)}a.push(m),this.staticRulesId=m}else{for(var w=this.rules.length,M=fs(this.baseHash,n.hash),_="",E=0;E>>0);if(!r.hasNameForId(o,I)){var O=n(_,"."+I,void 0,o);r.insertRules(o,I,O)}a.push(I)}}return a.join(" ")},e}(),kR=/^\s*\/\/.*$/gm,TR=[":","[",".","#"];function RR(e){var t,r,n,o,a=e===void 0?Aa:e,d=a.options,m=d===void 0?Aa:d,y=a.plugins,w=y===void 0?yh:y,M=new ZT(m),_=[],E=function(T){function I(O){if(O)try{T(O+"}")}catch{}}return function(O,P,L,N,q,X,J,Z,W,$){switch(O){case 1:if(W===0&&P.charCodeAt(0)===64)return T(P+";"),"";break;case 2:if(Z===0)return P+"/*|*/";break;case 3:switch(Z){case 102:case 112:return T(L[0]+P),"";default:return P+($===0?"/*|*/":"")}case-2:P.split("/*|*/}").forEach(I)}}}(function(T){_.push(T)}),S=function(T,I,O){return I===0&&TR.indexOf(O[r.length])!==-1||O.match(o)?T:"."+t};function A(T,I,O,P){P===void 0&&(P="&");var L=T.replace(kR,""),N=I&&O?O+" "+I+" { "+L+" }":L;return t=P,r=I,n=new RegExp("\\"+r+"\\b","g"),o=new RegExp("(\\"+r+"\\b){2,}"),M(O||!I?"":I,N)}return M.use([].concat(w,[function(T,I,O){T===2&&O.length&&O[0].lastIndexOf(r)>0&&(O[0]=O[0].replace(n,S))},E,function(T){if(T===-2){var I=_;return _=[],I}}])),A.hash=w.length?w.reduce(function(T,I){return I.name||Qu(15),fs(T,I.name)},5381).toString():"",A}var ox=j.createContext();ox.Consumer;var sx=j.createContext(),OR=(sx.Consumer,new ix),Sm=RR();function PR(){return le.exports.useContext(ox)||OR}function BR(){return le.exports.useContext(sx)||Sm}var fx=function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=Sm);var d=n.name+a.hash;o.hasNameForId(n.id,d)||o.insertRules(n.id,d,a(n.rules,d,"@keyframes"))},this.toString=function(){return Qu(12,String(n.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=r}return e.prototype.getName=function(t){return t===void 0&&(t=Sm),this.name+t.hash},e}(),IR=/([A-Z])/,$R=/([A-Z])/g,LR=/^ms-/,DR=function(e){return"-"+e.toLowerCase()};function F4(e){return IR.test(e)?e.replace($R,DR).replace(LR,"-ms-"):e}var N4=function(e){return e==null||e===!1||e===""};function Ps(e,t,r,n){if(Array.isArray(e)){for(var o,a=[],d=0,m=e.length;d1?t-1:0),n=1;n?@[\\\]^`{|}~-]+/g,zR=/(^-|-$)/g;function g1(e){return e.replace(NR,"-").replace(zR,"")}var ux=function(e){return Em(ax(e)>>>0)};function zl(e){return typeof e=="string"&&!0}var Am=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},HR=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function UR(e,t,r){var n=e[r];Am(t)&&Am(n)?lx(n,t):e[r]=t}function lx(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||($[Z]=X[Z]);return $}(t,["componentId"]),q=L&&L+"-"+(zl(P)?P:g1($4(P)));return cx(P,zi({},N,{attrs:E,componentId:q}),r)},Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(P){this._foldedDefaultProps=n?lx({},e.defaultProps,P):P}}),A.toString=function(){return"."+A.styledComponentId},o&&lR(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var Cm=function(e){return function t(r,n,o){if(o===void 0&&(o=Aa),!C2.exports.isValidElementType(n))return Qu(1,String(n));var a=function(){return r(n,o,D2.apply(void 0,arguments))};return a.withConfig=function(d){return t(r,n,zi({},o,{},d))},a.attrs=function(d){return t(r,n,zi({},o,{attrs:Array.prototype.concat(o.attrs,d).filter(Boolean)}))},a}(cx,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){Cm[e]=Cm(e)});function dx(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n` position: relative; &:before { content: ''; left: 0; width: 0%; bottom: -5px; height: 1px; position: absolute; background-color: ${e}; transition: width 0.5s; } &:hover:before { width: 100%; } `,px=()=>` position: relative; &:before { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: -2px; border-radius: inherit; padding: 2px; border: 2px solid ${Fe.WHITE}; transition: 0.3s; -webkit-transition: 0.3s; } &:hover { box-shadow: 2px 2px 4px 0px ${Fe.GREEN_PRIMARY}; &:before { border-color: ${Fe.GREEN_PRIMARY}; } } &:focus, &:active { color: ${Fe.BLACK}; background-color: ${Fe.GREEN_SECONDARY}; outline: none; &:before { background: transparent; border-color: ${Fe.GREEN_SECONDARY}; } & svg { fill: ${Fe.BLACK}; } } `,jR=dx` 0% { transform:rotate(0deg); } 100% { transform:rotate(360deg); } `,xi="10px",Ra="40px",_i="60px",Ao="1320px",qR=ke.div``,VR=ke.div` display: flex; align-items: center; justify-content: space-between; cursor: pointer; `,KR=ke.h4` width: calc(100% - 40px); font-family: 'Futura'; ${st.BODY4}; color: ${({theme:e})=>e==="dark"?Fe.LIGHT_GREY:Fe.BLACK}; `,km=ke.span` display: block; position: absolute; top: 50%; left: 50%; transform: ${({vertical:e,collapsed:t})=>t?e?"translate(-50%, -50%) rotate(90deg)":"translate(-50%, -50%)":"translate(-50%, -50%) rotate(180deg)"}; width: 12px; height: 1px; background: ${({theme:e})=>e==="dark"?Fe.LIGHT_GREY:Fe.LIGHT_BLACK}; transition: 0.3s; @media ${Ee.LAPTOP} { width: 15px; } `,GR=ke.div` position: relative; width: 24px; height: 24px; border-radius: 50%; border: ${({theme:e})=>`1.6px solid ${e==="dark"?Fe.LIGHT_GREY:Fe.LIGHT_BLACK}`}; transition: 0.3s; @media ${Ee.LAPTOP} { width: 32px; height: 32px; } &:hover { border-color: ${Fe.GREEN_SECONDARY}; box-shadow: 2px 2px 4px 0px ${Fe.GREEN_SECONDARY}; ${km} { background: ${Fe.GREEN_SECONDARY}; } } `,WR=ke.div` overflow: hidden; width: calc(100% - 75px); height: 0; margin-top: 5px; color: ${({theme:e})=>e==="dark"?Fe.LIGHT_GREY:Fe.BLACK}; transition: 0.3s; @media ${Ee.MOBILE_LARGE} { margin-top: 10px; } `,ZR=({title:e,text:t,theme:r="dark",collapsedDefault:n=!0})=>{const[o,a]=le.exports.useState(n),d=le.exports.useRef(null),m=()=>{a(!o),d.current&&(d.current.style.height=o?`${d.current.scrollHeight}px`:"0")};return le.exports.useEffect(()=>{!o&&d.current&&(d.current.style.height=`${d.current.scrollHeight}px`)},[]),j.createElement(qR,null,j.createElement(VR,{onClick:m},j.createElement(KR,{theme:r},e),j.createElement(GR,{theme:r},j.createElement(km,{collapsed:o,theme:r}),j.createElement(km,{vertical:!0,collapsed:o,theme:r}))),j.createElement(WR,{ref:d,collapsed:o,theme:r},t.map((y,w)=>j.createElement("span",{key:w},y,j.createElement("br",null)))))},YR=ke.section` display: flex; justify-content: center; margin: 70px 0; padding: 0 ${xi}; @media ${Ee.TABLET} { margin: 80px 0; } @media ${Ee.LAPTOP} { padding: 0 ${Ra}; margin: 90px 0; } @media ${Ee.LAPTOP_LARGE} { padding: 0 ${_i}; margin: 100px 0; } `,XR=ke.div` display: flex; flex-direction: column; align-items: center; max-width: ${Ao}; margin: 0 auto; `;ke.h1` align-self: flex-start; ${Y7}; color: ${({theme:e})=>e==="dark"?Fe.WHITE:Fe.BLACK}; margin-bottom: 20px; @media ${Ee.MOBILE_LARGE} { margin-bottom: 30px; } @media ${Ee.TABLET} { margin-bottom: 35px; } @media ${Ee.DESKTOP} { margin-bottom: 55px; } `;ke.h2` align-self: flex-start; ${A2}; color: ${({theme:e})=>e==="dark"?Fe.WHITE:Fe.BLACK}; margin-bottom: 20px; @media ${Ee.MOBILE_LARGE} { margin-bottom: 30px; } @media ${Ee.DESKTOP} { margin-bottom: 35px; } `;const JR=ke.ul` margin-bottom: 0; @media ${Ee.DESKTOP} { margin-left: ${({hasSideOffset:e})=>e?"calc((100% + 30px) / 12)":0}; margin-right: ${({hasSideOffset:e})=>e?"calc((100% + 30px) / 12)":0}; } `,QR=ke.li` padding: 20px 15px; border: ${Fe.WHITE}; border-radius: 20px; background: ${Fe.WHITE}; box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.12); box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.25); @media ${Ee.MOBILE_LARGE} { padding: 30px 20px; } @media ${Ee.TABLET} { padding: 30px; } @media ${Ee.LAPTOP} { padding: 45px 73px; } `,eO=ke.h3` margin-bottom: 20px; ${st.H9}; font-family: 'Futura'; color: ${({theme:e})=>e==="dark"?Fe.GREY:Fe.DARK_GREY}; @media ${Ee.LAPTOP} { ${st.H8}; margin-bottom: 35px; } @media ${Ee.DESKTOP} { ${st.H7}; margin-bottom: 45px; } `,tO=ke.ul` display: grid; grid-row-gap: 18px; `,rO=({faq:e,hasSideOffset:t=!1,theme:r="light"})=>j.createElement(YR,null,j.createElement(XR,null,j.createElement(JR,{hasSideOffset:t},j.createElement(QR,{theme:r},j.createElement(eO,{theme:r},"FAQ"),j.createElement(tO,null,e==null?void 0:e.map((n,o)=>j.createElement(ZR,{key:o,title:n==null?void 0:n.title,text:n==null?void 0:n.text,theme:r,collapsedDefault:o!==0}))))))),nO=({className:e})=>j.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.8463 10.5422H22.3143C22.9743 10.5422 23.5143 11.0822 23.5143 11.7422V18.0302C23.5143 22.3142 20.5263 24.7142 16.8303 24.7142H7.39829C3.70229 24.7142 0.714294 22.3142 0.714294 18.0302V7.39823C0.714294 3.11423 3.70229 0.714233 7.39829 0.714233H12.4863C13.1463 0.714233 13.6863 1.25423 13.6863 1.91423V5.38223C13.6863 8.22623 16.0023 10.5422 18.8463 10.5422ZM6.71429 19.6142H11.5143C12.0063 19.6142 12.4143 19.2062 12.4143 18.7142C12.4143 18.2222 12.0063 17.8142 11.5143 17.8142H6.71429C6.22229 17.8142 5.81429 18.2222 5.81429 18.7142C5.81429 19.2062 6.22229 19.6142 6.71429 19.6142ZM6.71429 14.8142H13.9143C14.4063 14.8142 14.8143 14.4062 14.8143 13.9142C14.8143 13.4222 14.4063 13.0142 13.9143 13.0142H6.71429C6.22229 13.0142 5.81429 13.4222 5.81429 13.9142C5.81429 14.4062 6.22229 14.8142 6.71429 14.8142ZM15.3298 1.49474C15.3298 0.810738 16.1818 0.474738 16.6738 0.966738C17.8728 2.16576 19.6735 3.98284 21.2486 5.57237C22.0066 6.33726 22.7124 7.04946 23.2738 7.61474C23.7538 8.09474 23.3938 8.89874 22.7098 8.89874H22.7094C21.3535 8.89874 19.7697 8.89874 18.6298 8.88674C16.8178 8.88674 15.3298 7.43474 15.3298 5.68274V1.49474Z",fill:"url(#paint0_linear_4140_369)"}),j.createElement("defs",null,j.createElement("linearGradient",{id:"paint0_linear_4140_369",x1:"0.714295",y1:"11.2339",x2:"27.839",y2:"12.0573",gradientUnits:"userSpaceOnUse"},j.createElement("stop",{offset:"0.130208",stopColor:"#7AF051"}),j.createElement("stop",{offset:"1",stopColor:"#C2F051",stopOpacity:"0.8"})))),iO="/assets/analytex-hero-bg.00cf77c9.png",aO=ke.section` position: relative; box-sizing: border-box; padding: 35px ${xi} 120px; background: linear-gradient( 180deg, rgba(19, 19, 19, 0.55) 0%, #131313 100% ); background-image: url(${iO}); background-repeat: no-repeat; background-size: cover; @media ${Ee.MOBILE_LARGE} { padding-top: 50px; padding-bottom: 130px; } @media ${Ee.TABLET} { padding-top: 75px; padding-bottom: 160px; } @media ${Ee.LAPTOP} { padding: 75px ${Ra} 180px; } @media ${Ee.LAPTOP_LARGE} { padding: 100px ${_i} 240px; } `,oO=ke.div` max-width: ${Ao}; margin: 0 auto; `,sO=ke.div` position: relative; color: ${Fe.WHITE}; overflow: hidden; `,fO=ke.div` display: flex; align-items: flex-end; `,uO=ke.h1` text-align: left; color: ${Fe.WHITE}; ${Y7}; line-height: 120%; font-family: 'Futura'; `,lO=ke.h2` margin-top: 20px; margin-bottom: 45px; ${st.BODY5}; line-height: 130%; text-align: left; font-weight: 500; @media ${Ee.MOBILE_LARGE} { margin-bottom: 25px; ${st.BODY4}; } @media ${Ee.TABLET} { margin-bottom: 30px; ${st.BODY3}; } @media ${Ee.LAPTOP} { max-width: 620px; ${st.BODY2}; } @media ${Ee.LAPTOP_LARGE} { margin-top: 25px; margin-bottom: 45px; ${st.BODY1}; } `,H4=ke.div` display: flex; align-items: flex-start; flex-direction: column; gap: 10px; @media ${Ee.MOBILE_LARGE} { flex-direction: row; } & + & { margin-top: 20px; } `,vx=ke.div` width: 30px; height: 30px; border-radius: 50%; border: 4px solid #000; padding: 4px; background: #fff; display: flex; align-items: center; justify-content: center; > svg, > img { max-width: 100%; max-height: 100%; } & + & { margin-left: -10px; } `,U4=ke.span` margin-left: 10px; font-weight: 500; `,j4=ke.div` display: flex; flex-direction: row; align-items: center `,hO=ke.div` display: flex; align-items: center; `,cO=({chains:e})=>j.createElement(hO,null,e.map(t=>j.createElement(vx,{key:t.value},j.createElement("img",{src:S2[t.value],alt:t.label})))),dO=({chains:e})=>j.createElement(aO,null,j.createElement(oO,null,j.createElement(sO,null,j.createElement(fO,null,j.createElement(uO,null,"Forkchecker")),j.createElement(lO,null,"Find out if the contract is a fork using its address or .file"),j.createElement(H4,null,j.createElement(j4,null,j.createElement(cO,{chains:e}),j.createElement(U4,null,e.length," chains support"))),j.createElement(H4,null,j.createElement(j4,null,j.createElement(vx,null,j.createElement(nO,null)),j.createElement(U4,null,"1000+ \u0421ontracts database")))))),pO=({className:e})=>j.createElement("svg",{width:"161",className:e,height:"6",viewBox:"0 0 161 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{d:"M1 2.5L0.5 2.5L0.5 3.5L1 3.5L1 2.5ZM161 2.99999L156 0.113235L156 5.88674L161 2.99999ZM1 3.5L156.5 3.49999L156.5 2.49999L1 2.5L1 3.5Z",fill:"#262626",fillOpacity:"0.5"})),vO=({className:e})=>j.createElement("svg",{width:"6",height:"41",viewBox:"0 0 6 41",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e},j.createElement("path",{d:"M3.5 1L3.5 0.5L2.5 0.5L2.5 1L3.5 1ZM3 41L5.88675 36L0.113247 36L3 41ZM2.5 1L2.5 36.5L3.5 36.5L3.5 1L2.5 1Z",fill:"#262626",fillOpacity:"0.5"})),mO=ke.section` display: flex; justify-content: center; padding: 0 ${xi}; margin-top: 80px; @media ${Ee.MOBILE_LARGE} { margin-top: 70px; } @media ${Ee.TABLET} { margin-top: 80px; } @media ${Ee.LAPTOP} { padding: 0 ${Ra}; margin-top: 90px; } @media ${Ee.LAPTOP_LARGE} { margin-top: 110px; padding: 0 ${_i}; } `,gO=ke.div` display: flex; flex-direction: column; align-items: center; max-width: ${Ao}; margin: 0 auto; width: 100%; `,yO=ke.h2` width: 100%; align-self: flex-start; margin-bottom: 28px; box-sizing: border-box; ${A2}; font-famiy: 'Futura'; @media ${Ee.MOBILE_LARGE} { margin-bottom: 44px; } @media ${Ee.LAPTOP} { padding-left: 0; margin-bottom: 38px; } @media ${Ee.LAPTOP_LARGE} { margin-bottom: 60px; } `,bO=ke.div` width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; justify-content: space-between; padding: 0; box-sizing: border-box; @media ${Ee.LAPTOP} { flex-direction: row; align-items: center; } @media ${Ee.LAPTOP_LARGE} { padding: 0 40px; } `,b1=ke.div` display: flex; flex-direction: column; gap: 20px; `,q4=ke(vO)` display: flex; margin-left: 20px; @media ${Ee.LAPTOP} { display: none; } `,V4=ke(pO)` display: none; @media ${Ee.LAPTOP} { display: flex; } `,w1=ke.span` font-family: 'Futura'; font-style: normal; font-weight: 400; font-size: 16px; @media ${Ee.MOBILE_LARGE} { font-size: 18px; } @media ${Ee.LAPTOP} { font-weight: 700; max-width: 200px; } `,wO=({className:e})=>j.createElement("svg",{width:"46",height:"60",viewBox:"0 0 46 60",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{d:"M43 0H3C2.33696 0 1.70107 0.263392 1.23223 0.732233C0.763392 1.20107 0.5 1.83696 0.5 2.5V57.5C0.5 58.163 0.763392 58.7989 1.23223 59.2678C1.70107 59.7366 2.33696 60 3 60H43C43.663 60 44.2989 59.7366 44.7678 59.2678C45.2366 58.7989 45.5 58.163 45.5 57.5V2.5C45.5 1.83696 45.2366 1.20107 44.7678 0.732233C44.2989 0.263392 43.663 0 43 0V0ZM40.5 55H5.5V5H40.5V55Z",fill:"url(#paint0_linear_4118_12416)"}),j.createElement("path",{d:"M13 17.5H33C33.663 17.5 34.2989 17.2366 34.7678 16.7678C35.2366 16.2989 35.5 15.663 35.5 15C35.5 14.337 35.2366 13.7011 34.7678 13.2322C34.2989 12.7634 33.663 12.5 33 12.5H13C12.337 12.5 11.7011 12.7634 11.2322 13.2322C10.7634 13.7011 10.5 14.337 10.5 15C10.5 15.663 10.7634 16.2989 11.2322 16.7678C11.7011 17.2366 12.337 17.5 13 17.5Z",fill:"url(#paint1_linear_4118_12416)"}),j.createElement("path",{d:"M13 25H33C33.663 25 34.2989 24.7366 34.7678 24.2678C35.2366 23.7989 35.5 23.163 35.5 22.5C35.5 21.837 35.2366 21.2011 34.7678 20.7322C34.2989 20.2634 33.663 20 33 20H13C12.337 20 11.7011 20.2634 11.2322 20.7322C10.7634 21.2011 10.5 21.837 10.5 22.5C10.5 23.163 10.7634 23.7989 11.2322 24.2678C11.7011 24.7366 12.337 25 13 25Z",fill:"url(#paint2_linear_4118_12416)"}),j.createElement("path",{d:"M13 32.5H33C33.663 32.5 34.2989 32.2366 34.7678 31.7678C35.2366 31.2989 35.5 30.663 35.5 30C35.5 29.337 35.2366 28.7011 34.7678 28.2322C34.2989 27.7634 33.663 27.5 33 27.5H13C12.337 27.5 11.7011 27.7634 11.2322 28.2322C10.7634 28.7011 10.5 29.337 10.5 30C10.5 30.663 10.7634 31.2989 11.2322 31.7678C11.7011 32.2366 12.337 32.5 13 32.5Z",fill:"url(#paint3_linear_4118_12416)"}),j.createElement("path",{d:"M33 45H29.025C27.15 43.1 25.8 41.175 23.4 43.575C19.725 38.1 19.675 37.5 17.85 37.5C16.025 37.5 16.025 38.375 10.775 48.875C10.5832 49.2556 10.4919 49.6789 10.5098 50.1046C10.5276 50.5304 10.654 50.9446 10.8769 51.3078C11.0998 51.671 11.4119 51.9712 11.7835 52.1798C12.1551 52.3885 12.5738 52.4987 13 52.5C14.975 52.5 15.125 51.35 18.3 45C20.8 48.7 21.2 49.85 22.75 50C23.1202 50.0375 23.4941 49.9918 23.8445 49.8664C24.1948 49.741 24.5127 49.5389 24.775 49.275L25.5 48.525C27.3 50.35 26.625 50 33 50C33.663 50 34.2989 49.7366 34.7678 49.2678C35.2366 48.7989 35.5 48.163 35.5 47.5C35.5 46.837 35.2366 46.2011 34.7678 45.7322C34.2989 45.2634 33.663 45 33 45Z",fill:"url(#paint4_linear_4118_12416)"}),j.createElement("defs",null,j.createElement("linearGradient",{id:"paint0_linear_4118_12416",x1:"0.500001",y1:"26.2992",x2:"54.0541",y2:"27.5827",gradientUnits:"userSpaceOnUse"},j.createElement("stop",{offset:"0.130208",stopColor:"#7AF051"}),j.createElement("stop",{offset:"1",stopColor:"#C2F051",stopOpacity:"0.8"})),j.createElement("linearGradient",{id:"paint1_linear_4118_12416",x1:"10.5",y1:"14.6916",x2:"39.5283",y2:"19.3296",gradientUnits:"userSpaceOnUse"},j.createElement("stop",{offset:"0.130208",stopColor:"#7AF051"}),j.createElement("stop",{offset:"1",stopColor:"#C2F051",stopOpacity:"0.8"})),j.createElement("linearGradient",{id:"paint2_linear_4118_12416",x1:"10.5",y1:"22.1916",x2:"39.5283",y2:"26.8296",gradientUnits:"userSpaceOnUse"},j.createElement("stop",{offset:"0.130208",stopColor:"#7AF051"}),j.createElement("stop",{offset:"1",stopColor:"#C2F051",stopOpacity:"0.8"})),j.createElement("linearGradient",{id:"paint3_linear_4118_12416",x1:"10.5",y1:"29.6916",x2:"39.5283",y2:"34.3296",gradientUnits:"userSpaceOnUse"},j.createElement("stop",{offset:"0.130208",stopColor:"#7AF051"}),j.createElement("stop",{offset:"1",stopColor:"#C2F051",stopOpacity:"0.8"})),j.createElement("linearGradient",{id:"paint4_linear_4118_12416",x1:"10.5076",y1:"44.0748",x2:"40.1838",y2:"45.6548",gradientUnits:"userSpaceOnUse"},j.createElement("stop",{offset:"0.130208",stopColor:"#7AF051"}),j.createElement("stop",{offset:"1",stopColor:"#C2F051",stopOpacity:"0.8"})))),MO=({className:e})=>j.createElement("svg",{width:"60",height:"53",viewBox:"0 0 60 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6471 11.8723L15.6474 11.872L15.6475 11.8723L15.6471 11.8723ZM15.6474 11.872C14.6 9.7609 12.7722 8.12453 10.5654 7.30609C10.8804 6.93347 11.2049 6.56818 11.5501 6.21982C14.9158 2.8543 19.3971 0.998047 24.1595 0.998047C28.9219 0.998047 33.3938 2.8543 36.7689 6.21982C40.2259 9.67732 41.9352 14.2669 41.9237 18.855L34.9479 16.1757C34.4774 14.2935 33.5101 12.5049 32.0251 11.0199C29.9345 8.92882 27.1595 7.78533 24.2156 7.78533C21.2625 7.78533 18.4876 8.92931 16.4061 11.0199C16.1357 11.2904 15.8867 11.5782 15.6474 11.872ZM45.9847 33.4568C44.5309 32.003 42.1706 31.9975 40.6966 33.4344L37.6785 30.4163C39.1951 28.6494 40.303 26.6443 41.0097 24.53L34.7626 22.1291C34.2668 23.6914 33.4218 25.175 32.2032 26.4535C32.147 26.5193 32.0817 26.5846 32.0256 26.6408L32.0254 26.6409L32.0251 26.6412C29.9345 28.7318 27.1595 29.8758 24.2156 29.8758C21.2626 29.8758 18.4876 28.7323 16.4061 26.6412C15.2461 25.4886 14.3718 24.102 13.8234 22.5735C12.1773 24.1807 9.94518 25.1727 7.51131 25.2107C8.40121 27.5434 9.76905 29.6675 11.5497 31.4413C14.9152 34.8069 19.3967 36.6631 24.1591 36.6631C28.7395 36.6631 33.0407 34.931 36.3912 31.7806L39.3708 34.7602C37.9343 36.2342 37.9398 38.594 39.3937 40.0478L50.9719 51.6261C51.7035 52.3576 52.6592 52.7229 53.6252 52.7229C54.5906 52.7229 55.5468 52.3572 56.2876 51.6261L57.5625 50.3512C58.2656 49.6385 58.6593 48.6918 58.6593 47.6888C58.6593 46.6859 58.2656 45.7387 57.5625 45.0356L45.9847 33.4568ZM20.6439 16.9063H14.6815L14.6813 16.9062C14.2125 20.534 11.1094 23.3374 7.36853 23.3374C3.30949 23.3374 -0.00012207 20.0374 -0.00012207 15.9687C-0.00012207 11.9092 3.30949 8.59961 7.36806 8.59961C11.1089 8.59961 14.2121 11.4121 14.6712 15.0308H20.4463C20.6522 12.5465 22.7525 10.5776 25.2931 10.5776C27.9838 10.5776 30.1683 12.7717 30.1683 15.4529C30.1683 15.7527 30.1404 16.0342 30.0841 16.3153L45.0466 22.0621C46.3214 19.4277 49.0218 17.6089 52.1342 17.6089C56.4747 17.6089 59.9999 21.1342 59.9999 25.4747C59.9999 29.8061 56.4747 33.3405 52.1346 33.3405C47.8032 33.3405 44.2689 29.8061 44.2689 25.4747C44.2689 24.9126 44.3252 24.3591 44.4378 23.8341L29.4096 18.0594C28.5472 19.4189 27.0284 20.328 25.2939 20.328C23.119 20.328 21.2628 18.8939 20.6439 16.9063Z",fill:"url(#paint0_linear_4118_12426)"}),j.createElement("defs",null,j.createElement("linearGradient",{id:"paint0_linear_4118_12426",x1:"-0.000121373",y1:"23.6701",x2:"71.3484",y2:"26.3148",gradientUnits:"userSpaceOnUse"},j.createElement("stop",{offset:"0.130208",stopColor:"#7AF051"}),j.createElement("stop",{offset:"1",stopColor:"#C2F051",stopOpacity:"0.8"})))),xO=({className:e})=>j.createElement("svg",{width:"59",height:"60",viewBox:"0 0 59 60",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.86415 46.3644C4.86415 48.07 6.25382 49.4597 7.95944 49.4597L7.95878 49.3965L23.4346 49.396C24.4454 51.2281 25.8351 52.8703 27.4142 54.26H7.95889C3.60073 54.26 0 50.7226 0 46.3011V7.95889C0 3.60073 3.53734 0 7.95889 0H38.4052C42.7634 0 46.3641 3.53734 46.3641 7.95889L46.365 23.5611C44.8489 22.9297 43.2067 22.4873 41.5011 22.2978V7.95901C41.5011 6.25339 40.1114 4.86372 38.4058 4.86372H7.95944C6.25382 4.86372 4.86415 6.25339 4.86415 7.95901V46.3644ZM13.7076 24.7616H30.0678H30.0681C27.9201 25.9619 26.0885 27.6675 24.6353 29.6886H13.7076C12.3179 29.6886 11.2441 28.5518 11.2441 27.2251C11.2441 25.8354 12.3809 24.7616 13.7076 24.7616ZM35.1211 15.6022C35.1211 14.2754 34.0473 13.1387 32.6576 13.1387H13.7076C12.3809 13.1387 11.2441 14.2125 11.2441 15.6022C11.2441 16.9918 12.3813 18.0026 13.7076 18.0026H32.6576C34.0473 18.0026 35.1211 16.9284 35.1211 15.6022ZM11.2441 38.7838C11.2441 37.4571 12.3809 36.3203 13.7076 36.3203L13.7076 36.3833H21.6035C21.2875 37.7101 21.0981 39.0997 21.0981 40.5525V41.2473H13.7076C12.3179 41.2473 11.2441 40.1105 11.2441 38.7838ZM57.4821 53.3132L50.9125 47.8178C52.3022 45.6703 53.06 43.2068 53.06 40.4904C53.06 32.9105 46.9329 26.7832 39.3529 26.7832C31.7729 26.7832 25.6457 32.9104 25.6457 40.4904C25.6457 48.0703 31.7729 54.1976 39.3529 54.1976C42.0688 54.1976 44.5957 53.3763 46.6803 52.05L52.1762 58.6191C52.3026 58.8086 52.4921 58.998 52.6815 59.1245C54.3238 60.4512 56.6612 60.2613 57.9874 58.6191C59.3771 57.0399 59.1242 54.6395 57.4821 53.3132ZM29.436 40.4904C29.436 34.995 33.8576 30.573 39.3534 30.573C44.8488 30.573 49.2708 34.9945 49.2708 40.4904C49.2708 45.9858 44.8493 50.4078 39.3534 50.4078C33.9211 50.4073 29.436 45.9858 29.436 40.4904ZM38.2164 40.5532L41.9431 36.3211C42.6379 35.5632 43.8382 35.4368 44.5335 36.0686C45.3548 36.7635 45.4178 37.9637 44.7229 38.7216L39.5431 44.5959C39.2272 44.9753 38.7218 45.2277 38.1534 45.2277C37.648 45.2277 37.1427 44.9748 36.7637 44.5959L33.9843 41.4375C33.2894 40.6797 33.4159 39.4794 34.1737 38.7845C34.9316 38.0897 36.1319 38.2161 36.8267 38.974L38.2164 40.5532Z",fill:"url(#paint0_linear_4118_12434)"}),j.createElement("defs",null,j.createElement("linearGradient",{id:"paint0_linear_4118_12434",x1:"6.84096e-07",y1:"26.2994",x2:"70.0551",y2:"28.4965",gradientUnits:"userSpaceOnUse"},j.createElement("stop",{offset:"0.130208",stopColor:"#7AF051"}),j.createElement("stop",{offset:"1",stopColor:"#C2F051",stopOpacity:"0.8"})))),_O=()=>j.createElement(mO,null,j.createElement(gO,null,j.createElement(yO,null,"How it works?"),j.createElement(bO,null,j.createElement(b1,null,j.createElement(wO,null),j.createElement(w1,null,"Paste contract adress or drag .sol file")),j.createElement(V4,null),j.createElement(q4,null),j.createElement(b1,null,j.createElement(MO,null),j.createElement(w1,null,"Contract is analyzed by our tool")),j.createElement(V4,null),j.createElement(q4,null),j.createElement(b1,null,j.createElement(xO,null),j.createElement(w1,null,"Matching contracts appear in results"))))),ci=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{};var Je={exports:{}},EO="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",SO=EO,AO=SO;function mx(){}function gx(){}gx.resetWarningCache=mx;var CO=function(){function e(n,o,a,d,m,y){if(y!==AO){var w=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 w.name="Invariant Violation",w}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:gx,resetWarningCache:mx};return r.PropTypes=r,r};Je.exports=CO();function K4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ir(e){for(var t=1;t=0||(M[y]=d[y]);return M}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Dt(e,t){return bx(e)||function(r,n){var o=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(o!=null){var a,d,m=[],y=!0,w=!1;try{for(o=o.call(r);!(y=(a=o.next()).done)&&(m.push(a.value),!n||m.length!==n);y=!0);}catch(M){w=!0,d=M}finally{try{y||o.return==null||o.return()}finally{if(w)throw d}}return m}}(e,t)||kc(e,t)||Mx()}function yx(e){return bx(e)||wx(e)||kc(e)||Mx()}function gn(e){return function(t){if(Array.isArray(t))return Rm(t)}(e)||wx(e)||kc(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function bx(e){if(Array.isArray(e))return e}function wx(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kc(e,t){if(e){if(typeof e=="string")return Rm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rm(e,t):void 0}}function Rm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(y){throw y},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,d=!0,m=!1;return{s:function(){r=r.call(e)},n:function(){var y=r.next();return d=y.done,y},e:function(y){m=!0,a=y},f:function(){try{d||r.return==null||r.return()}finally{if(m)throw a}}}}var Hl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof ci<"u"?ci:typeof self<"u"?self:{};function Js(e,t){return e(t={exports:{}},t.exports),t.exports}var cn=Js(function(e){/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(){var t={}.hasOwnProperty;function r(){for(var n=[],o=0;o=o&&n=a&&o-1},NO=function(e,t){var r=this.__data__,n=Tc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function qo(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tm))return!1;var w=a.get(e),M=a.get(t);if(w&&M)return w==t&&M==e;var _=-1,E=!0,S=2&r?new xP:void 0;for(a.set(e,t),a.set(t,e);++_-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Jt={};Jt["[object Float32Array]"]=Jt["[object Float64Array]"]=Jt["[object Int8Array]"]=Jt["[object Int16Array]"]=Jt["[object Int32Array]"]=Jt["[object Uint8Array]"]=Jt["[object Uint8ClampedArray]"]=Jt["[object Uint16Array]"]=Jt["[object Uint32Array]"]=!0,Jt["[object Arguments]"]=Jt["[object Array]"]=Jt["[object ArrayBuffer]"]=Jt["[object Boolean]"]=Jt["[object DataView]"]=Jt["[object Date]"]=Jt["[object Error]"]=Jt["[object Function]"]=Jt["[object Map]"]=Jt["[object Number]"]=Jt["[object Object]"]=Jt["[object RegExp]"]=Jt["[object Set]"]=Jt["[object String]"]=Jt["[object WeakMap]"]=!1;var $P=function(e){return Ei(e)&&j2(e.length)&&!!Jt[Co(e)]},q2=function(e){return function(t){return e(t)}},Bs=Js(function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r&&Sx.process,a=function(){try{var d=n&&n.require&&n.require("util").types;return d||o&&o.binding&&o.binding("util")}catch{}}();e.exports=a}),Q4=Bs&&Bs.isTypedArray,V2=Q4?q2(Q4):$P,LP=Object.prototype.hasOwnProperty,Bx=function(e,t){var r=Ur(e),n=!r&&Bc(e),o=!r&&!n&&Pu(e),a=!r&&!n&&!o&&V2(e),d=r||n||o||a,m=d?RP(e.length,String):[],y=m.length;for(var w in e)!t&&!LP.call(e,w)||d&&(w=="length"||o&&(w=="offset"||w=="parent")||a&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||Px(w,y))||m.push(w);return m},DP=Object.prototype,Ic=function(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||DP)},Ix=function(e,t){return function(r){return e(t(r))}},FP=Ix(Object.keys,Object),NP=Object.prototype.hasOwnProperty,$x=function(e){if(!Ic(e))return FP(e);var t=[];for(var r in Object(e))NP.call(e,r)&&r!="constructor"&&t.push(r);return t},tl=function(e){return e!=null&&j2(e.length)&&!Cx(e)},rl=function(e){return tl(e)?Bx(e):$x(e)},Pm=function(e){return Tx(e,rl,U2)},zP=Object.prototype.hasOwnProperty,HP=function(e,t,r,n,o,a){var d=1&r,m=Pm(e),y=m.length;if(y!=Pm(t).length&&!d)return!1;for(var w=y;w--;){var M=m[w];if(!(d?M in t:zP.call(t,M)))return!1}var _=a.get(e),E=a.get(t);if(_&&E)return _==t&&E==e;var S=!0;a.set(e,t),a.set(t,e);for(var A=d;++w-1?A.slice(0,I):O;switch(O){case"diff":E--;break e;case"deleted":case"new":var P=A.slice(I+1);P.indexOf("file mode")===0&&(o[O==="new"?"newMode":"oldMode"]=P.slice(10));break;case"similarity":o.similarity=parseInt(A.split(" ")[2],10);break;case"index":var L=A.slice(I+1).split(" "),N=L[0].split("..");o.oldRevision=N[0],o.newRevision=N[1],L[1]&&(o.oldMode=o.newMode=L[1]);break;case"copy":case"rename":var q=A.slice(I+1);q.indexOf("from")===0?o.oldPath=q.slice(5):o.newPath=q.slice(3),T=O;break;case"---":var X=A.slice(I+1),J=M[++E].slice(4);X==="/dev/null"?(J=J.slice(2),T="add"):J==="/dev/null"?(X=X.slice(2),T="delete"):(T="modify",X=X.slice(2),J=J.slice(2)),o.oldPath=X,o.newPath=J,w=5;break e}}o.type=T||"modify"}else if(S.indexOf("Binary")===0)o.isBinary=!0,o.type=S.indexOf("/dev/null and")>=0?"add":S.indexOf("and /dev/null")>=0?"delete":"modify",w=2,o=null;else if(w===5)if(S.indexOf("@@")===0){var Z=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(S);a={content:S,oldStart:Z[1]-0,newStart:Z[4]-0,oldLines:Z[3]-0||1,newLines:Z[6]-0||1,changes:[]},o.hunks.push(a),d=a.oldStart,m=a.newStart}else{var W=S.slice(0,1),$={content:S.slice(1)};switch(W){case"+":$.type="insert",$.isInsert=!0,$.lineNumber=m,m++;break;case"-":$.type="delete",$.isDelete=!0,$.lineNumber=d,d++;break;case" ":$.type="normal",$.isNormal=!0,$.oldLineNumber=d,$.newLineNumber=m,d++,m++;break;case"\\":var h=a.changes[a.changes.length-1];h.isDelete||(o.newEndingNewLine=!1),h.isInsert||(o.oldEndingNewLine=!1)}$.type&&a.changes.push($)}E++}return y}},e.exports=r}),SB=function(e,t){var r=t.nearbySequences==="zip"?function(n){var o=n.reduce(function(a,d,m){var y=Dt(a,3),w=y[0],M=y[1],_=y[2];return M?d.isInsert&&_>=0?(w.splice(_+1,0,d),[w,d,_+2]):(w.push(d),[w,d,d.isDelete&&M.isDelete?_:m]):(w.push(d),[w,d,d.isDelete?m:-1])},[[],null,-1]);return Dt(o,1)[0]}(e.changes):e.changes;return ir(ir({},e),{},{isPlain:!1,changes:r})},AB=function(e,t){var r=e.hunks.map(function(n){return SB(n,t)});return ir(ir({},e),{},{hunks:r})},CB=function(e){if(e.indexOf("diff --git")===0)return e;var t=e.indexOf(` `),r=e.indexOf(` `,t+1),n=e.slice(0,t),o=e.slice(t+1,r),a=n.split(" ").slice(1,-3).join(" "),d=o.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(a," b/").concat(d),"index 1111111..2222222 100644","--- a/".concat(a),"+++ b/".concat(d),e.slice(r+1)].join(` `)},kB=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=CB(e.trim()),n=EB.parse(r);return n.map(function(o){return AB(o,t)})},Mh=function(){try{var e=To(Object,"defineProperty");return e({},"",{}),e}catch{}}(),il=function(e,t,r){t=="__proto__"&&Mh?Mh(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},TB=function(e){return function(t,r,n){for(var o=-1,a=Object(t),d=n(t),m=d.length;m--;){var y=d[e?m:++o];if(r(a[y],y,a)===!1)break}return t}}(),Nx=function(e,t){return e&&TB(e,t,rl)},zx=function(e,t){var r={};return t=Dc(t),Nx(e,function(n,o,a){il(r,o,t(n,o,a))}),r},RB=["text","tokens","renderToken"],nb=function e(t,r){var n=t.type,o=t.value,a=t.markType,d=t.properties,m=t.className,y=t.children,w=function(_){return j.createElement("span",{key:r,className:_},o||y&&y.map(e))};switch(n){case"text":return o;case"mark":return w("diff-code-mark diff-code-mark-".concat(a));case"edit":return w("diff-code-edit");default:var M=d&&d.className;return w(cn(m||M))}},S0=function(e){var t=e.text,r=e.tokens,n=e.renderToken,o=Pa(e,RB),a=n?function(d,m){return n(d,nb,m)}:nb;return j.createElement("td",o,r?r.length?r.map(a):" ":t||" ")};S0.displayName="CodeCell",S0.propTypes={text:Je.exports.oneOfType([Je.exports.string,Je.exports.element]).isRequired,tokens:Je.exports.arrayOf(Je.exports.object)},S0.defaultProps={tokens:null};var Hx=le.exports.memo(S0),Ux=function(e,t){return function(){var r=t==="old"?Fc(e):Nc(e);return r===-1?void 0:r}},jx=function(e,t){return function(r){return e&&r?j.createElement("a",{href:"#"+t},r):r}},xh=function(e,t){return t?function(r){e(r),t()}:e},ib=function(e,t,r,n){return le.exports.useMemo(function(){var o=zx(e,function(a){return function(d){return a(t,d)}});return o.onMouseEnter=xh(r,o.onMouseEnter),o.onMouseLeave=xh(n,o.onMouseLeave),o},[e,r,n,t])},Lm=function(e,t,r,n,o,a,d,m){var y={change:t,side:r,inHoverState:d,renderDefault:Ux(t,r),wrapInAnchor:jx(n,o)};return j.createElement("td",Oa({className:e},a),m(y))};Lm.displayName="renderGutterCell";var A0=function(e){var t,r,n,o=e.change,a=e.selected,d=e.tokens,m=e.className,y=e.gutterClassName,w=e.codeClassName,M=e.gutterEvents,_=e.codeEvents,E=e.hideGutter,S=e.gutterAnchor,A=e.generateAnchorID,T=e.renderToken,I=e.renderGutter,O=o.type,P=o.content,L=(t=Dt(le.exports.useState(!1),2),r=t[0],n=t[1],[r,le.exports.useCallback(function(){return n(!0)},[]),le.exports.useCallback(function(){return n(!1)},[])]),N=Dt(L,3),q=N[0],X=N[1],J=N[2],Z=le.exports.useMemo(function(){return{change:o}},[o]),W=ib(M,Z,X,J),$=ib(_,Z,X,J),h=A(o),i=cn("diff-gutter","diff-gutter-".concat(O),y,{"diff-gutter-selected":a}),f=cn("diff-code","diff-code-".concat(O),w,{"diff-code-selected":a});return j.createElement("tr",{id:h,className:cn("diff-line",m)},!E&&Lm(i,o,"old",S,h,W,q,I),!E&&Lm(i,o,"new",S,h,W,q,I),j.createElement(Hx,Oa({className:f,text:P,tokens:d,renderToken:T},$)))};A0.displayName="UnifiedChange",A0.propTypes={selected:Je.exports.bool.isRequired,tokens:Je.exports.arrayOf(Je.exports.object)},A0.defaultProps={tokens:null};var OB=le.exports.memo(A0),qx=function(e){var t=e.hideGutter,r=e.element;return j.createElement("tr",{className:"diff-widget"},j.createElement("td",{colSpan:t?1:3,className:"diff-widget-content"},r))};qx.displayName="UnifiedWidget";var PB=["hideGutter","selectedChanges","tokens","lineClassName"],BB=["hunk","widgets","className"],Vx=function(e){var t=e.hunk,r=e.widgets,n=e.className,o=Pa(e,BB),a=function(d,m){return d.reduce(function(y,w){var M=ys(w);y.push(["change",M,w]);var _=m[M];return _&&y.push(["widget",M,_]),y},[])}(t.changes,r);return j.createElement("tbody",{className:cn("diff-hunk",n)},a.map(function(d){return function(m,y){var w=Dt(m,3),M=w[0],_=w[1],E=w[2],S=y.hideGutter,A=y.selectedChanges,T=y.tokens,I=y.lineClassName,O=Pa(y,PB);if(M==="change"){var P=E.isDelete?"old":"new",L=E.isDelete?Fc(E):Nc(E),N=T?T[P][L-1]:null;return j.createElement(OB,Oa({key:"change".concat(_),className:I,change:E,hideGutter:S,selected:A.includes(_),tokens:N},O))}return M==="widget"?j.createElement(qx,{key:"widget".concat(_),hideGutter:S,element:E}):null}(d,o)}))};Vx.displayName="UnifiedHunk";var Ul=function(e,t,r,n){var o=le.exports.useCallback(function(){return t(e)},[e,t]),a=le.exports.useCallback(function(){return t("")},[t]);return le.exports.useMemo(function(){var d=zx(n,function(m){return function(y){return m({side:e,change:r},y)}});return d.onMouseEnter=xh(o,d.onMouseEnter),d.onMouseLeave=xh(a,d.onMouseLeave),d},[r,n,o,e,a])},_1=function(e){var t=e.change,r=e.side,n=e.selected,o=e.tokens,a=e.gutterClassName,d=e.codeClassName,m=e.gutterEvents,y=e.codeEvents,w=e.anchorID,M=e.gutterAnchor,_=e.gutterAnchorTarget,E=e.hideGutter,S=e.hover,A=e.renderToken,T=e.renderGutter;if(!t){var I=cn("diff-gutter","diff-gutter-omit",a),O=cn("diff-code","diff-code-omit",d);return[!E&&j.createElement("td",{key:"gutter",className:I}),j.createElement("td",{key:"code",className:O})]}var P=t.type,L=t.content,N=r===0?"old":"new",q=ir({id:w,className:cn("diff-gutter","diff-gutter-".concat(P),Tm({"diff-gutter-selected":n},"diff-line-hover-"+N,S),a),children:T({change:t,side:N,inHoverState:S,renderDefault:Ux(t,N),wrapInAnchor:jx(M,_)})},m),X=cn("diff-code","diff-code-".concat(P),Tm({"diff-code-selected":n},"diff-line-hover-"+N,S),d);return[!E&&j.createElement("td",Oa({key:"gutter"},q)),j.createElement(Hx,Oa({key:"code",className:X,text:L,tokens:o,renderToken:A},y))]},C0=function(e){var t=e.className,r=e.gutterClassName,n=e.codeClassName,o=e.gutterEvents,a=e.codeEvents,d=e.oldChange,m=e.newChange,y=e.oldSelected,w=e.newSelected,M=e.oldTokens,_=e.newTokens,E=e.monotonous,S=e.hideGutter,A=e.generateAnchorID,T=e.gutterAnchor,I=e.renderToken,O=e.renderGutter,P=Dt(le.exports.useState(""),2),L=P[0],N=P[1],q=Ul("old",N,d,o),X=Ul("new",N,m,o),J=Ul("old",N,d,a),Z=Ul("new",N,m,a),W=d&&A(d),$=m&&A(m),h={monotonous:E,hideGutter:S,gutterClassName:r,codeClassName:n,gutterEvents:o,codeEvents:a,renderToken:I,renderGutter:O},i=ir(ir({},h),{},{change:d,side:0,selected:y,tokens:M,gutterEvents:q,codeEvents:J,anchorID:W,gutterAnchor:T,gutterAnchorTarget:W,hover:L==="old"}),f=ir(ir({},h),{},{change:m,side:1,selected:w,tokens:_,gutterEvents:X,codeEvents:Z,anchorID:d===m?void 0:$,gutterAnchor:T,gutterAnchorTarget:d===m?W:$,hover:L==="new"});if(E)return j.createElement("tr",{className:cn("diff-line",t)},_1(d?i:f));var u=function(c,p){return c&&!p?"diff-line-old-only":!c&&p?"diff-line-new-only":c===p?"diff-line-normal":"diff-line-compare"}(d,m);return j.createElement("tr",{className:cn("diff-line",u,t)},_1(i),_1(f))};C0.displayName="SplitChange",C0.propTypes={oldSelected:Je.exports.bool.isRequired,newSelected:Je.exports.bool.isRequired,oldTokens:Je.exports.arrayOf(Je.exports.object),newTokens:Je.exports.arrayOf(Je.exports.object)},C0.defaultProps={oldTokens:null,newTokens:null};var IB=le.exports.memo(C0),Kx=function(e){var t=e.oldElement,r=e.newElement,n=e.monotonous,o=e.hideGutter;return n?j.createElement("tr",{className:"diff-widget"},j.createElement("td",{colSpan:o?1:2,className:"diff-widget-content"},t||r)):t===r?j.createElement("tr",{className:"diff-widget"},j.createElement("td",{colSpan:o?2:4,className:"diff-widget-content"},t)):j.createElement("tr",{className:"diff-widget"},j.createElement("td",{colSpan:o?1:2,className:"diff-widget-content"},t),j.createElement("td",{colSpan:o?1:2,className:"diff-widget-content"},r))};Kx.displayName="SplitWidget";var $B=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],LB=["hunk","widgets","className"],jl=function(e,t){return(e?ys(e):"00")+(t?ys(t):"00")},Gx=function(e){var t=e.hunk,r=e.widgets,n=e.className,o=Pa(e,LB),a=function(d,m){for(var y=function(P){if(!P)return null;var L=ys(P);return m[L]||null},w=[],M=0;M0&&n(y)?r>1?e(y,r-1,n,o,a):H2(a,y):o||(a[a.length]=y)}return a},Dm=function(e){return e!=null&&e.length?Wx(e,1):[]},jB=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},lb=Math.max,qB=function(e,t,r){return t=lb(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=lb(n.length-t,0),d=Array(a);++o0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(KB),Zx=function(e){return WB(qB(e,void 0,Dm),e+"")},hb=Bu&&new Bu,Yx=hb?function(e){return hb.get(e)}:function(){},cb={},ZB=Object.prototype.hasOwnProperty,O0=function(e){for(var t=e.name+"",r=cb[t],n=ZB.call(cb,t)?r.length:0;n--;){var o=r[n],a=o.func;if(a==null||a==e)return o.name}return t};function P0(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}P0.prototype=X2(J2.prototype),P0.prototype.constructor=P0;var Q2=P0,Xx=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++ro?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n1),a}),al(e,r9(e),r),n&&(r=OI(r,7,zI));for(var o=t.length;o--;)II(r,t[o]);return r}),us=function(e){return e.map(function(t){return ir({},t)})},HI=function(e,t){return[].concat(gn(us(e.slice(0,-1))),[t])},UI=function(e,t,r,n){var o=e.slice(0,-1),a=Yi(e),d=[];if(r<=0||t>=a.value.length)return[e];var m=function(_,E){var S=a.value.slice(_,E);return[].concat(gn(o),[ir(ir({},a),{},{value:S})])};if(t>0){var y=m(0,t);d.push(us(y))}var w=m(Math.max(t,0),r);if(d.push(n?function(_,E){return[E].concat(gn(us(_)))}(w,n):us(w)),r1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],d=Fm(n,"children");if(n.children){a.push(d);var m,y=F2(n.children);try{for(y.s();!(m=y.n()).done;){var w=m.value;r(w,o,a)}}catch(M){y.e(M)}finally{y.f()}a.pop()}else o.push(us([].concat(gn(a.slice(1)),[d])));return o}(e);return jI(t)},VI=function(e,t){return K2(e,t)},KI=function(e,t){var r,n,o=Yi(e.children);return o&&function(a,d){if(a.type!==d.type)return!1;if(a.type==="text")return!0;if(!a.children||!d.children)return!1;var m="children"in a?Fm(a,"children"):a,y="children"in d?Fm(d,"children"):d;return VI(m,y)}(o,t)?e.children[e.children.length-1]=(n=t,"value"in(r=o)?ir(ir({},r),{},{value:r.value+n.value}):r):e.children.push(t),Yi(e.children)},GI=function(e){var t,r={type:"root",children:[]},n=F2(e);try{var o=function(){var a=t.value;a.reduce(function(d,m,y){var w=y===a.length-1?ir({},m):ir(ir({},m),{},{children:[]});return KI(d,w)},r)};for(n.s();!(t=n.n()).done;)o()}catch(a){n.e(a)}finally{n.f()}return r},WI=Object.prototype.hasOwnProperty,ZI=Qx(function(e,t,r){WI.call(e,r)?e[r].push(t):il(e,r,[t])}),YI=Object.prototype.hasOwnProperty,XI=function(e){if(e==null)return!0;if(tl(e)&&(Ur(e)||typeof e=="string"||typeof e.splice=="function"||Pu(e)||V2(e)||Bc(e)))return!e.length;var t=Is(e);if(t=="[object Map]"||t=="[object Set]")return!e.size;if(Ic(e))return!$x(e).length;for(var r in e)if(YI.call(e,r))return!1;return!0},JI=function(e,t){var r=t.start,n=t.length,o=t.properties,a=r+n,d=e.reduce(function(m,y){var w=Dt(m,2),M=w[0],_=w[1],E=_+Yi(y).value.length;if(_>a||En.length?r:n,y=r.length>n.length?n:r,w=m.indexOf(y);if(w!=-1)return d=[new t.Diff(1,m.substring(0,w)),new t.Diff(0,y),new t.Diff(1,m.substring(w+y.length))],r.length>n.length&&(d[0][0]=d[2][0]=-1),d;if(y.length==1)return[new t.Diff(-1,r),new t.Diff(1,n)];var M=this.diff_halfMatch_(r,n);if(M){var _=M[0],E=M[1],S=M[2],A=M[3],T=M[4],I=this.diff_main(_,S,o,a),O=this.diff_main(E,A,o,a);return I.concat([new t.Diff(0,T)],O)}return o&&r.length>100&&n.length>100?this.diff_lineMode_(r,n,a):this.diff_bisect_(r,n,a)},t.prototype.diff_lineMode_=function(r,n,o){var a=this.diff_linesToChars_(r,n);r=a.chars1,n=a.chars2;var d=a.lineArray,m=this.diff_main(r,n,!1,o);this.diff_charsToLines_(m,d),this.diff_cleanupSemantic(m),m.push(new t.Diff(0,""));for(var y=0,w=0,M=0,_="",E="";y=1&&M>=1){m.splice(y-w-M,w+M),y=y-w-M;for(var S=this.diff_main(_,E,!1,o),A=S.length-1;A>=0;A--)m.splice(y,0,S[A]);y+=S.length}M=0,w=0,_="",E=""}y++}return m.pop(),m},t.prototype.diff_bisect_=function(r,n,o){for(var a=r.length,d=n.length,m=Math.ceil((a+d)/2),y=m,w=2*m,M=new Array(w),_=new Array(w),E=0;Eo);L++){for(var N=-L+T;N<=L-I;N+=2){for(var q=y+N,X=(h=N==-L||N!=L&&M[q-1]a)I+=2;else if(X>d)T+=2;else if(A&&(W=y+S-N)>=0&&W=(Z=a-_[W]))return this.diff_bisectSplit_(r,n,h,X,o)}for(var J=-L+O;J<=L-P;J+=2){for(var Z,W=y+J,$=(Z=J==-L||J!=L&&_[W-1]<_[W+1]?_[W+1]:_[W-1]+1)-J;Za)P+=2;else if($>d)O+=2;else if(!A&&(q=y+S-J)>=0&&q=(Z=a-Z))return this.diff_bisectSplit_(r,n,h,X,o)}}}return[new t.Diff(-1,r),new t.Diff(1,n)]},t.prototype.diff_bisectSplit_=function(r,n,o,a,d){var m=r.substring(0,o),y=n.substring(0,a),w=r.substring(o),M=n.substring(a),_=this.diff_main(m,y,!1,d),E=this.diff_main(w,M,!1,d);return _.concat(E)},t.prototype.diff_linesToChars_=function(r,n){var o=[],a={};function d(w){for(var M="",_=0,E=-1,S=o.length;Ea?r=r.substring(o-a):on.length?r:n,a=r.length>n.length?n:r;if(o.length<4||2*a.length=T.length?[P,L,N,q,Z]:null}var y,w,M,_,E,S=m(o,a,Math.ceil(o.length/4)),A=m(o,a,Math.ceil(o.length/2));return S||A?(y=A?S&&S[4].length>A[4].length?S:A:S,r.length>n.length?(w=y[0],M=y[1],_=y[2],E=y[3]):(_=y[0],E=y[1],w=y[2],M=y[3]),[w,M,_,E,y[4]]):null},t.prototype.diff_cleanupSemantic=function(r){for(var n=!1,o=[],a=0,d=null,m=0,y=0,w=0,M=0,_=0;m0?o[a-1]:-1,y=0,w=0,M=0,_=0,d=null,n=!0)),m++;for(n&&this.diff_cleanupMerge(r),this.diff_cleanupSemanticLossless(r),m=1;m=T?(A>=E.length/2||A>=S.length/2)&&(r.splice(m,0,new t.Diff(0,S.substring(0,A))),r[m-1][1]=E.substring(0,E.length-A),r[m+1][1]=S.substring(A),m++):(T>=E.length/2||T>=S.length/2)&&(r.splice(m,0,new t.Diff(0,E.substring(0,T))),r[m-1][0]=1,r[m-1][1]=S.substring(0,S.length-T),r[m+1][0]=-1,r[m+1][1]=E.substring(T),m++),m++}m++}},t.prototype.diff_cleanupSemanticLossless=function(r){function n(T,I){if(!T||!I)return 6;var O=T.charAt(T.length-1),P=I.charAt(0),L=O.match(t.nonAlphaNumericRegex_),N=P.match(t.nonAlphaNumericRegex_),q=L&&O.match(t.whitespaceRegex_),X=N&&P.match(t.whitespaceRegex_),J=q&&O.match(t.linebreakRegex_),Z=X&&P.match(t.linebreakRegex_),W=J&&T.match(t.blanklineEndRegex_),$=Z&&I.match(t.blanklineStartRegex_);return W||$?5:J||Z?4:L&&!q&&X?3:q||X?2:L||N?1:0}for(var o=1;o=S&&(S=A,M=a,_=d,E=m)}r[o-1][1]!=M&&(M?r[o-1][1]=M:(r.splice(o-1,1),o--),r[o][1]=_,E?r[o+1][1]=E:(r.splice(o+1,1),o--))}o++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(r){for(var n=!1,o=[],a=0,d=null,m=0,y=!1,w=!1,M=!1,_=!1;m0?o[a-1]:-1,M=_=!1),n=!0)),m++;n&&this.diff_cleanupMerge(r)},t.prototype.diff_cleanupMerge=function(r){r.push(new t.Diff(0,""));for(var n,o=0,a=0,d=0,m="",y="";o1?(a!==0&&d!==0&&((n=this.diff_commonPrefix(y,m))!==0&&(o-a-d>0&&r[o-a-d-1][0]==0?r[o-a-d-1][1]+=y.substring(0,n):(r.splice(0,0,new t.Diff(0,y.substring(0,n))),o++),y=y.substring(n),m=m.substring(n)),(n=this.diff_commonSuffix(y,m))!==0&&(r[o][1]=y.substring(y.length-n)+r[o][1],y=y.substring(0,y.length-n),m=m.substring(0,m.length-n))),o-=a+d,r.splice(o,a+d),m.length&&(r.splice(o,0,new t.Diff(-1,m)),o++),y.length&&(r.splice(o,0,new t.Diff(1,y)),o++),o++):o!==0&&r[o-1][0]==0?(r[o-1][1]+=r[o][1],r.splice(o,1)):o++,d=0,a=0,m="",y=""}r[r.length-1][1]===""&&r.pop();var w=!1;for(o=1;on));o++)m=a,y=d;return r.length!=o&&r[o][0]===-1?y:y+(n-m)},t.prototype.diff_prettyHtml=function(r){for(var n=[],o=/&/g,a=//g,m=/\n/g,y=0;y");switch(w){case 1:n[y]=''+M+"";break;case-1:n[y]=''+M+"";break;case 0:n[y]=""+M+""}}return n.join("")},t.prototype.diff_text1=function(r){for(var n=[],o=0;othis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(n),d=this;function m(X,J){var Z=X/n.length,W=Math.abs(o-J);return d.Match_Distance?Z+W/d.Match_Distance:W?1:Z}var y=this.Match_Threshold,w=r.indexOf(n,o);w!=-1&&(y=Math.min(m(0,w),y),(w=r.lastIndexOf(n,o+n.length))!=-1&&(y=Math.min(m(0,w),y)));var M,_,E=1<=I;L--){var N=a[r.charAt(L-1)];if(P[L]=T===0?(P[L+1]<<1|1)&N:(P[L+1]<<1|1)&N|(S[L+1]|S[L])<<1|1|S[L+1],P[L]&E){var q=m(T,L-1);if(q<=y){if(y=q,!((w=L-1)>o))break;I=Math.max(1,2*o-w)}}}if(m(T+1,o)>y)break;S=P}return w},t.prototype.match_alphabet_=function(r){for(var n={},o=0;o2&&(this.diff_cleanupSemantic(d),this.diff_cleanupEfficiency(d));else if(r&&typeof r=="object"&&n===void 0&&o===void 0)d=r,a=this.diff_text1(d);else if(typeof r=="string"&&n&&typeof n=="object"&&o===void 0)a=r,d=n;else{if(typeof r!="string"||typeof n!="string"||!o||typeof o!="object")throw new Error("Unknown call format to patch_make.");a=r,d=o}if(d.length===0)return[];for(var m=[],y=new t.patch_obj,w=0,M=0,_=0,E=a,S=a,A=0;A=2*this.Patch_Margin&&w&&(this.patch_addContext_(y,E),m.push(y),y=new t.patch_obj,w=0,E=S,M=_)}T!==1&&(M+=I.length),T!==-1&&(_+=I.length)}return w&&(this.patch_addContext_(y,E),m.push(y)),m},t.prototype.patch_deepCopy=function(r){for(var n=[],o=0;othis.Match_MaxBits?(y=this.match_main(n,_.substring(0,this.Match_MaxBits),M))!=-1&&((E=this.match_main(n,_.substring(_.length-this.Match_MaxBits),M+_.length-this.Match_MaxBits))==-1||y>=E)&&(y=-1):y=this.match_main(n,_,M),y==-1)d[m]=!1,a-=r[m].length2-r[m].length1;else if(d[m]=!0,a=y-M,_==(w=E==-1?n.substring(y,y+_.length):n.substring(y,E+this.Match_MaxBits)))n=n.substring(0,y)+this.diff_text2(r[m].diffs)+n.substring(y+_.length);else{var S=this.diff_main(_,w,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(S)/_.length>this.Patch_DeleteThreshold)d[m]=!1;else{this.diff_cleanupSemanticLossless(S);for(var A,T=0,I=0;Im[0][1].length){var y=n-m[0][1].length;m[0][1]=o.substring(m[0][1].length)+m[0][1],d.start1-=y,d.start2-=y,d.length1+=y,d.length2+=y}return(m=(d=r[r.length-1]).diffs).length==0||m[m.length-1][0]!=0?(m.push(new t.Diff(0,o)),d.length1+=n,d.length2+=n):n>m[m.length-1][1].length&&(y=n-m[m.length-1][1].length,m[m.length-1][1]+=o.substring(0,y),d.length1+=y,d.length2+=y),o},t.prototype.patch_splitMax=function(r){for(var n=this.Match_MaxBits,o=0;o2*n?(w.length1+=E.length,d+=E.length,M=!1,w.diffs.push(new t.Diff(_,E)),a.diffs.shift()):(E=E.substring(0,n-w.length1-this.Patch_Margin),w.length1+=E.length,d+=E.length,_===0?(w.length2+=E.length,m+=E.length):M=!1,w.diffs.push(new t.Diff(_,E)),E==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(E.length))}y=(y=this.diff_text2(w.diffs)).substring(y.length-this.Patch_Margin);var S=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);S!==""&&(w.length1+=S.length,w.length2+=S.length,w.diffs.length!==0&&w.diffs[w.diffs.length-1][0]===0?w.diffs[w.diffs.length-1][1]+=S:w.diffs.push(new t.Diff(0,S))),M||r.splice(++o,0,w)}}},t.prototype.patch_toText=function(r){for(var n=[],o=0;o1&&arguments[1]!==void 0?arguments[1]:{},r=t.type,n=r===void 0?"block":r,o=ey(e.map(function(M){return M.changes}),i$),a=n==="block"?a$:o$,d=o.map(a).reduce(function(M,_){var E=Dt(M,2),S=E[0],A=E[1],T=Dt(_,2),I=T[0],O=T[1];return[S.concat(I),A.concat(O)]},[[],[]]),m=Dt(d,2),y=m[0],w=m[1];return QI(Dm(y),Dm(w))},f$=function(e,t){var r=t.highlight,n=r!==void 0&&r,o=t.refractor,a=t.oldSource,d=t.language,m=t.enhancers,y=m===void 0?[]:m,w=sI(e,{highlight:n,refractor:o,oldSource:a,language:d}).map(qI),M=Dt(QB(y)(w).map(function(S){return S.map(GI)}),2),_=M[0],E=M[1];return{old:_.map(function(S){return S.children}),new:E.map(function(S){return S.children})}};function u$(e,t,r,...n){let o;return function(){const d=this;function m(){o=null,r||e.apply(d,n)}const y=r&&!o;clearTimeout(o),o=setTimeout(m,t),y&&e.apply(d,n)}}const l$=()=>{const[e,t]=le.exports.useState([0,0]);return le.exports.useLayoutEffect(()=>{const r=u$(()=>t([window.innerWidth,window.innerHeight]),150,!1);return window.addEventListener("resize",r),r(),()=>window.removeEventListener("resize",r)},[]),e},a9=({className:e})=>j.createElement("svg",{width:"13",height:"7",viewBox:"0 0 13 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e},j.createElement("path",{d:"M1 6L6.5 1L12 6",stroke:"currentColor",strokeWidth:"1.4"})),h$=ke.div` border: 1px solid ${e=>e.collapsed?Fe.BLACK:Fe.GREY}; background: ${e=>e.collapsed?"transparent":Fe.LIGHT_GREY}; border-radius: 5px; `,c$=ke.div` position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; ${st.BODY6}; font-family: 'Avenir'; font-style: normal; font-weight: 400; cursor: pointer; color: rgba(0, 0, 0, 0.6); `,d$=ke.div` padding: 5px 10px; border-radius: 15px; background: ${Fe.ORANGE}; color: ${Fe.WHITE}; `,p$=ke(a9)` position: absolute; transform: rotate(180deg); right: 17px; & svg { width: 12px; } ${e=>e.collapsed&&"transform: rotate(0deg);"} transition: 0.3s; `,v$=ke.div` height: 0; overflow: hidden; ${e=>e.collapsed&&`height: auto !important; padding: 10px;`} `,m$=ke.ul` display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0; margin-bottom: 30px; padding: 0; `,kf=ke.li` padding: 5px 15px; background: #f1f3f5; border-radius: 30px; font-weight: 500; line-height: 28px; word-break: break-word; ${st.CAPTION1} @media ${Ee.MOBILE_LARGE} { ${st.BODY6} } `,Tf=ke.span` font-weight: 500; `,g$=ke.div` display: none; @media ${Ee.LAPTOP} { display: flex; margin-bottom: 15px; } `,_b=ke.div` width: 50%; ${st.BODY6}; font-family: 'Futura'; font-style: normal; font-weight: 900; line-height: 20px; `,y$=({item:e})=>{const[t]=l$(),[r,n]=le.exports.useState(!1),o=()=>n(!r);return j.createElement(h$,{collapsed:r},j.createElement(c$,{onClick:o,role:"presentation"},j.createElement(d$,null,(e.order*100).toFixed(0),"%"),e.entityName,j.createElement(p$,{collapsed:r})),j.createElement(v$,{collapsed:r},j.createElement(m$,null,j.createElement(kf,null,j.createElement(Tf,null,"Name:")," ",e.bestMatch.name),j.createElement(kf,null,j.createElement(Tf,null,"Repository:")," ",e.bestMatch.repository),j.createElement(kf,null,j.createElement(Tf,null,"Branch:")," ",e.bestMatch.branch),j.createElement(kf,null,j.createElement(Tf,null,"Commit:")," ",e.bestMatch.commit),j.createElement(kf,null,j.createElement(Tf,null,"Solidity version:")," ",e.bestMatch.solidityVersion)),j.createElement(g$,null,j.createElement(_b,null,"Verifiable contract"),j.createElement(_b,null,"Data from the database")),e.diff&&j.createElement("div",null,e.diff.type?j.createElement(HB,{viewType:t<1024?"unified":"split",diffType:e.diff.type,hunks:e.diff.hunks||[],tokens:e.diff.tokens,optimizeSelection:!0}):null)))},Eb=({className:e})=>j.createElement("svg",{width:"11",height:"10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{d:"M1 5h9m0 0L6.538 1.5M10 5 6.538 8.5",stroke:"#262626",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),_h=ke.span` display: inline-block; margin-left: 10px; transition: transform 0.3s; `,b$=ke.a` position: relative; z-index: 1; cursor: pointer; display: inline-block; padding: 12px 22px; border-radius: 30px; color: ${({variant:e})=>e==="pink"?`${Fe.WHITE}`:`${Fe.MIDNIGHT_BLACK};`}; background: ${({variant:e})=>e==="pink"?Fe.PURPLE_GRADIENT:e==="outlined"?Fe.WHITE:Fe.GRADIENT}; ${st.BODY6}; font-weight: 500; transition: 0.3s; pointer-events: ${({disabled:e})=>e?"none":"all"}; @media ${Ee.TABLET} { padding: 15px 30px; ${({variant:e})=>e==="pink"?`${st.BODY4}`:`${st.BODY5}`}; font-weight: 400; } &:before, &:after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; } &:before { margin: -2px; border-radius: inherit; background: ${({variant:e})=>e==="pink"?Fe.PURPLE_GRADIENT:Fe.GRADIENT}; padding: 2px; -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; } &:after { z-index: -1; background: ${({variant:e})=>e==="outlined"?Fe.GRADIENT:Fe.WHITE}; border-radius: 30px; opacity: 0; transition: 0.3s; } &:hover { box-shadow: ${({variant:e})=>e==="pink"?`2px 2px 4px 0px ${Fe.PURPLE_GRADIENT}`:`2px 2px 4px 0px ${Fe.GREEN_SECONDARY}`}; color: ${Fe.MIDNIGHT_BLACK}; ${_h} { transform: translateX(3px); } &:after { opacity: 1; } } ${({disabled:e})=>e?` opacity: .5; cursor: not-allowed;`:""}; `,w$=ke.button` border: none; font-family: 'Avenir', sans-serif; position: relative; justify-content: center; z-index: 1; cursor: pointer; display: inline-block; padding: 12px 22px; border-radius: 30px; color: ${({variant:e})=>e==="pink"?`${Fe.WHITE}`:`${Fe.MIDNIGHT_BLACK};`}; background: ${({variant:e})=>e==="pink"?Fe.PURPLE_GRADIENT:e==="outlined"?Fe.WHITE:Fe.GRADIENT}; ${st.BODY6}; font-weight: 500; transition: 0.3s; pointer-events: ${({disabled:e})=>e?"none":"all"}; @media ${Ee.TABLET} { padding: 15px 30px; ${({variant:e})=>e==="pink"?`${st.BODY4}`:`${st.BODY5}`}; font-weight: 400; } &:before, &:after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; } &:before { margin: -2px; border-radius: inherit; background: ${({variant:e})=>e==="pink"?Fe.PURPLE_GRADIENT:Fe.GRADIENT}; padding: 2px; -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; } &:after { z-index: -1; background: ${({variant:e})=>e==="outlined"?Fe.GRADIENT:Fe.WHITE}; border-radius: 30px; opacity: 0; transition: 0.3s; } &:hover { box-shadow: ${({variant:e})=>e==="pink"?`2px 2px 4px 0px ${Fe.PURPLE_GRADIENT}`:`2px 2px 4px 0px ${Fe.GREEN_SECONDARY}`}; color: ${Fe.MIDNIGHT_BLACK}; ${_h} { transform: translateX(3px); } &:after { opacity: 1; } } ${({disabled:e})=>e?` opacity: .5; cursor: not-allowed;`:""}; `,Hc=({type:e="link",buttonType:t="button",className:r,text:n,href:o,target:a,variant:d="primary",hasArrow:m=!1,onClick:y,disabled:w=!1})=>e==="link"?j.createElement(b$,{href:o,target:a,variant:d,onClick:y,disabled:w,className:r},n,m&&j.createElement(_h,null,j.createElement(Eb,null))):j.createElement(w$,{variant:d,onClick:y,className:r,disabled:w,type:t},n,m&&j.createElement(_h,null,j.createElement(Eb,null))),M$=ke.section` display: flex; flex-direction: column; justify-content: center; padding: 0 ${xi}; margin-top: 50px; @media ${Ee.MOBILE_LARGE} { margin-top: 70px; } @media ${Ee.TABLET} { margin-top: 50px; } @media ${Ee.LAPTOP} { padding: 0 ${Ra}; } @media ${Ee.LAPTOP_LARGE} { margin-top: 55px; padding: 0 ${_i}; } `,x$=ke.h2` width: 100%; font-weight: 900; align-self: flex-start; margin-bottom: 10px; box-sizing: border-box; font-famiy: 'Futura'; ${st.H7}; line-height: 20px; @media ${Ee.MOBILE_LARGE} { margin-bottom: 30px; ${st.H6}; line-height: 28px; } @media ${Ee.TABLET} { margin-bottom: 20px; } @media ${Ee.LAPTOP} { ${st.H5}; } @media ${Ee.LAPTOP_LARGE} { padding-left: 0; margin-bottom: 30px; ${st.H4}; line-height: 36px; } `,_$=ke(Hc)` background: transparent; color: ${Fe.BLACK}}; :before { background: ${Fe.DARK_GREY}; } :hover { box-shadow: 2px 2px 4px 0px ${Fe.DARK_GREY}; } `,E$=ke.div` display: flex; justify-content: flex-end; `,S$=ke.div` width: 100%; display: flex; flex-direction: column; box-sizing: border-box; padding: 20px 15px; border: ${Fe.WHITE}; border-radius: 20px; background: ${Fe.WHITE}; box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.12); box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.25); @media ${Ee.MOBILE_LARGE} { padding: 20px 16px; } @media ${Ee.TABLET} { padding: 20px; } @media ${Ee.LAPTOP_LARGE} { padding: 42px 25px; } @media ${Ee.LAPTOP_LARGE} { padding: 30px 56px; } `,A$=ke.div` display: flex; align-items: center; `,C$=ke.div` display: flex; flex-direction: column; `,k$=ke.ul` flex-wrap: wrap; liststyle: none; margin: 0; margin-top: 20px; padding: 0; display: flex; gap: 20px; @media (min-width: 1024px) : { flex-wrap: wrap; } `,T$=ke.li` padding: 10px 20px; background: #f1f3f5; border-radius: 30px; ${st.BODY5} font-weight: 500; line-height: 20px; `,R$=ke.div` display: flex; flex-direction: column; margin-bottom: 30px; @media ${Ee.LAPTOP} { margin-bottom: 40px; } @media ${Ee.LAPTOP_LARGE} { margin-bottom: 60px; } `,O$=ke.div` display: flex; align-items: center; gap: 8px; `,P$=ke.span` width: 20px; height: 20px; border-radius: 40px; background-color: ${e=>e.color}; `,B$=ke.span` ${st.BODY6}; font-weight: 700; font-family: 'Futura'; line-height: 28px; @media ${Ee.MOBILE_LARGE} { ${st.BODY5}; } `,I$=ke.div` display: flex; align-items: center; flex-direction: column; width: 100%; gap: 10px; margin-top: 15px; @media ${Ee.MOBILE_LARGE} { margin-top: 20px; } @media ${Ee.LAPTOP} { margin-top: 30px; } `,$$=e=>{switch(e){case Xn.NO_SIMILARITY:return"No similarity found";case Xn.SIMILARITY:return"Similarity found";case Xn.EXACT_SIMILARITY:return"Exact similarity";case Xn.NO_RESULTS:return"No results found in our database";default:return null}},L$=e=>{switch(e){case Xn.NO_SIMILARITY:return Fe.RED;case Xn.SIMILARITY:return Fe.ORANGE;case Xn.EXACT_SIMILARITY:return Fe.GREEN_PRIMARY;case Xn.NO_RESULTS:return Fe.GREY;default:return Fe.GREY}},Sb=({groupKey:e})=>j.createElement(O$,null,j.createElement(P$,{color:L$(e)}),j.createElement(B$,null,$$(e))),E1=(e,t,r)=>{e[r]?e[r].push(t):e[r]=[t]},D$=({contracts:e,setContracts:t})=>{const r=le.exports.useMemo(()=>e==null?void 0:e.reduce((o,a)=>(!a.bestMatch&&!a.exact&&E1(o,a,0),a.bestMatch&&E1(o,a,1),a.exact&&E1(o,a,2),o),{}),[e]),n=()=>t(null);return e?j.createElement(M$,null,j.createElement(x$,null,"Result"),j.createElement(S$,null,j.createElement(E$,null,j.createElement(_$,{onClick:n,text:"Clear",type:"button"})),e!=null&&e.length?j.createElement(C$,null,Object.keys(r).map(o=>{var a,d;return j.createElement(R$,{key:o},j.createElement(Sb,{groupKey:Number(o)}),o===String(Xn.SIMILARITY)?j.createElement(I$,null,(a=r[o])==null?void 0:a.map(m=>j.createElement(y$,{key:m.entityName,item:m}))):j.createElement(k$,null,(d=r[o])==null?void 0:d.map(m=>j.createElement(T$,{key:m.entityName},m.entityName))))})):j.createElement(A$,null,j.createElement(Sb,{groupKey:Xn.NO_RESULTS})))):null};function Qs(e,t,r,n){function o(a){return a instanceof r?a:new r(function(d){d(a)})}return new(r||(r=Promise))(function(a,d){function m(M){try{w(n.next(M))}catch(_){d(_)}}function y(M){try{w(n.throw(M))}catch(_){d(_)}}function w(M){M.done?a(M.value):o(M.value).then(m,y)}w((n=n.apply(e,t||[])).next())})}function ef(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,d;return d={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function m(w){return function(M){return y([w,M])}}function y(w){if(n)throw new TypeError("Generator is already executing.");for(;d&&(d=0,w[0]&&(r=0)),r;)try{if(n=1,o&&(a=w[0]&2?o.return:w[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,w[1])).done)return a;switch(o=0,a&&(w=[w[0]&2,a.value]),w[0]){case 0:case 1:a=w;break;case 4:return r.label++,{value:w[1],done:!1};case 5:r.label++,o=w[1],w=[0];continue;case 7:w=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(w[0]===6||w[0]===2)){r=0;continue}if(w[0]===3&&(!a||w[1]>a[0]&&w[1]0)&&!(o=n.next()).done;)a.push(o.value)}catch(m){d={error:m}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(d)throw d.error}}return a}function Cb(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function N$(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),o=F$.get(n);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var z$=[".DS_Store","Thumbs.db"];function H$(e){return Qs(this,void 0,void 0,function(){return ef(this,function(t){return Eh(e)&&U$(e.dataTransfer)?[2,K$(e.dataTransfer,e.type)]:j$(e)?[2,q$(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,V$(e)]:[2,[]]})})}function U$(e){return Eh(e)}function j$(e){return Eh(e)&&Eh(e.target)}function Eh(e){return typeof e=="object"&&e!==null}function q$(e){return zm(e.target.files).map(function(t){return ol(t)})}function V$(e){return Qs(this,void 0,void 0,function(){var t;return ef(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return ol(n)})]}})})}function K$(e,t){return Qs(this,void 0,void 0,function(){var r,n;return ef(this,function(o){switch(o.label){case 0:return e.items?(r=zm(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(G$))]):[3,2];case 1:return n=o.sent(),[2,kb(o9(n))];case 2:return[2,kb(zm(e.files).map(function(a){return ol(a)}))]}})})}function kb(e){return e.filter(function(t){return z$.indexOf(t.name)===-1})}function zm(e){if(e===null)return[];for(var t=[],r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);rr)return[!1,Bb(r)];if(e.sizer)return[!1,Bb(r)]}return[!0,null]}function to(e){return e!=null}function oL(e){var t=e.files,r=e.accept,n=e.minSize,o=e.maxSize,a=e.multiple,d=e.maxFiles,m=e.validator;return!a&&t.length>1||a&&d>=1&&t.length>d?!1:t.every(function(y){var w=p9(y,r),M=$u(w,1),_=M[0],E=v9(y,n,o),S=$u(E,1),A=S[0],T=m?m(y):null;return _&&A&&!T})}function Sh(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Vl(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function $b(e){e.preventDefault()}function sL(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function fL(e){return e.indexOf("Edge/")!==-1}function uL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return sL(e)||fL(e)}function ii(){for(var e=arguments.length,t=new Array(e),r=0;r1?o-1:0),d=1;de.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function AL(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a=0)&&(r[o]=e[o]);return r}var iy=le.exports.forwardRef(function(e,t){var r=e.children,n=Ah(e,vL),o=w9(n),a=o.open,d=Ah(o,mL);return le.exports.useImperativeHandle(t,function(){return{open:a}},[a]),j.createElement(le.exports.Fragment,null,r(rr(rr({},d),{},{open:a})))});iy.displayName="Dropzone";var b9={disabled:!1,getFilesFromEvent:H$,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};iy.defaultProps=b9;iy.propTypes={children:Je.exports.func,accept:Je.exports.objectOf(Je.exports.arrayOf(Je.exports.string)),multiple:Je.exports.bool,preventDropOnDocument:Je.exports.bool,noClick:Je.exports.bool,noKeyboard:Je.exports.bool,noDrag:Je.exports.bool,noDragEventsBubbling:Je.exports.bool,minSize:Je.exports.number,maxSize:Je.exports.number,maxFiles:Je.exports.number,disabled:Je.exports.bool,getFilesFromEvent:Je.exports.func,onFileDialogCancel:Je.exports.func,onFileDialogOpen:Je.exports.func,useFsAccessApi:Je.exports.bool,autoFocus:Je.exports.bool,onDragEnter:Je.exports.func,onDragLeave:Je.exports.func,onDragOver:Je.exports.func,onDrop:Je.exports.func,onDropAccepted:Je.exports.func,onDropRejected:Je.exports.func,onError:Je.exports.func,validator:Je.exports.func};var qm={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function w9(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=rr(rr({},b9),e),r=t.accept,n=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,d=t.minSize,m=t.multiple,y=t.maxFiles,w=t.onDragEnter,M=t.onDragLeave,_=t.onDragOver,E=t.onDrop,S=t.onDropAccepted,A=t.onDropRejected,T=t.onFileDialogCancel,I=t.onFileDialogOpen,O=t.useFsAccessApi,P=t.autoFocus,L=t.preventDropOnDocument,N=t.noClick,q=t.noKeyboard,X=t.noDrag,J=t.noDragEventsBubbling,Z=t.onError,W=t.validator,$=le.exports.useMemo(function(){return cL(r)},[r]),h=le.exports.useMemo(function(){return hL(r)},[r]),i=le.exports.useMemo(function(){return typeof I=="function"?I:Db},[I]),f=le.exports.useMemo(function(){return typeof T=="function"?T:Db},[T]),u=le.exports.useRef(null),c=le.exports.useRef(null),p=le.exports.useReducer(CL,qm),b=S1(p,2),g=b[0],l=b[1],s=g.isFocused,v=g.isFileDialogActive,x=le.exports.useRef(typeof window<"u"&&window.isSecureContext&&O&&lL()),C=function(){!x.current&&v&&setTimeout(function(){if(c.current){var re=c.current.files;re.length||(l({type:"closeDialog"}),f())}},300)};le.exports.useEffect(function(){return window.addEventListener("focus",C,!1),function(){window.removeEventListener("focus",C,!1)}},[c,v,f,x]);var B=le.exports.useRef([]),k=function(re){u.current&&u.current.contains(re.target)||(re.preventDefault(),B.current=[])};le.exports.useEffect(function(){return L&&(document.addEventListener("dragover",$b,!1),document.addEventListener("drop",k,!1)),function(){L&&(document.removeEventListener("dragover",$b),document.removeEventListener("drop",k))}},[u,L]),le.exports.useEffect(function(){return!n&&P&&u.current&&u.current.focus(),function(){}},[u,P,n]);var R=le.exports.useCallback(function(K){Z?Z(K):console.error(K)},[Z]),D=le.exports.useCallback(function(K){K.preventDefault(),K.persist(),te(K),B.current=[].concat(bL(B.current),[K.target]),Vl(K)&&Promise.resolve(o(K)).then(function(re){if(!(Sh(K)&&!J)){var Te=re.length,ae=Te>0&&oL({files:re,accept:$,minSize:d,maxSize:a,multiple:m,maxFiles:y,validator:W}),Me=Te>0&&!ae;l({isDragAccept:ae,isDragReject:Me,isDragActive:!0,type:"setDraggedFiles"}),w&&w(K)}}).catch(function(re){return R(re)})},[o,w,R,J,$,d,a,m,y,W]),z=le.exports.useCallback(function(K){K.preventDefault(),K.persist(),te(K);var re=Vl(K);if(re&&K.dataTransfer)try{K.dataTransfer.dropEffect="copy"}catch{}return re&&_&&_(K),!1},[_,J]),H=le.exports.useCallback(function(K){K.preventDefault(),K.persist(),te(K);var re=B.current.filter(function(ae){return u.current&&u.current.contains(ae)}),Te=re.indexOf(K.target);Te!==-1&&re.splice(Te,1),B.current=re,!(re.length>0)&&(l({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Vl(K)&&M&&M(K))},[u,M,J]),V=le.exports.useCallback(function(K,re){var Te=[],ae=[];K.forEach(function(Me){var ze=p9(Me,$),fe=S1(ze,2),Se=fe[0],He=fe[1],ue=v9(Me,d,a),Ae=S1(ue,2),Ue=Ae[0],he=Ae[1],Ce=W?W(Me):null;if(Se&&Ue&&!Ce)Te.push(Me);else{var je=[He,he];Ce&&(je=je.concat(Ce)),ae.push({file:Me,errors:je.filter(function(de){return de})})}}),(!m&&Te.length>1||m&&y>=1&&Te.length>y)&&(Te.forEach(function(Me){ae.push({file:Me,errors:[aL]})}),Te.splice(0)),l({acceptedFiles:Te,fileRejections:ae,type:"setFiles"}),E&&E(Te,ae,re),ae.length>0&&A&&A(ae,re),Te.length>0&&S&&S(Te,re)},[l,m,$,d,a,y,E,S,A,W]),U=le.exports.useCallback(function(K){K.preventDefault(),K.persist(),te(K),B.current=[],Vl(K)&&Promise.resolve(o(K)).then(function(re){Sh(K)&&!J||V(re,K)}).catch(function(re){return R(re)}),l({type:"reset"})},[o,V,R,J]),F=le.exports.useCallback(function(){if(x.current){l({type:"openDialog"}),i();var K={multiple:m,types:h};window.showOpenFilePicker(K).then(function(re){return o(re)}).then(function(re){V(re,null),l({type:"closeDialog"})}).catch(function(re){dL(re)?(f(re),l({type:"closeDialog"})):pL(re)?(x.current=!1,c.current?(c.current.value=null,c.current.click()):R(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):R(re)});return}c.current&&(l({type:"openDialog"}),i(),c.current.value=null,c.current.click())},[l,i,f,O,V,R,h,m]),G=le.exports.useCallback(function(K){!u.current||!u.current.isEqualNode(K.target)||(K.key===" "||K.key==="Enter"||K.keyCode===32||K.keyCode===13)&&(K.preventDefault(),F())},[u,F]),ie=le.exports.useCallback(function(){l({type:"focus"})},[]),Y=le.exports.useCallback(function(){l({type:"blur"})},[]),oe=le.exports.useCallback(function(){N||(uL()?setTimeout(F,0):F())},[N,F]),xe=function(re){return n?null:re},ne=function(re){return q?null:xe(re)},Q=function(re){return X?null:xe(re)},te=function(re){J&&re.stopPropagation()},ee=le.exports.useMemo(function(){return function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=K.refKey,Te=re===void 0?"ref":re,ae=K.role,Me=K.onKeyDown,ze=K.onFocus,fe=K.onBlur,Se=K.onClick,He=K.onDragEnter,ue=K.onDragOver,Ae=K.onDragLeave,Ue=K.onDrop,he=Ah(K,gL);return rr(rr(jm({onKeyDown:ne(ii(Me,G)),onFocus:ne(ii(ze,ie)),onBlur:ne(ii(fe,Y)),onClick:xe(ii(Se,oe)),onDragEnter:Q(ii(He,D)),onDragOver:Q(ii(ue,z)),onDragLeave:Q(ii(Ae,H)),onDrop:Q(ii(Ue,U)),role:typeof ae=="string"&&ae!==""?ae:"presentation"},Te,u),!n&&!q?{tabIndex:0}:{}),he)}},[u,G,ie,Y,oe,D,z,H,U,q,X,n]),se=le.exports.useCallback(function(K){K.stopPropagation()},[]),_e=le.exports.useMemo(function(){return function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=K.refKey,Te=re===void 0?"ref":re,ae=K.onChange,Me=K.onClick,ze=Ah(K,yL),fe=jm({accept:$,multiple:m,type:"file",style:{display:"none"},onChange:xe(ii(ae,U)),onClick:xe(ii(Me,se)),tabIndex:-1},Te,c);return rr(rr({},fe),ze)}},[c,r,m,U,n]);return rr(rr({},g),{},{isFocused:s&&!n,getRootProps:ee,getInputProps:_e,rootRef:u,inputRef:c,open:xe(F)})}function CL(e,t){switch(t.type){case"focus":return rr(rr({},e),{},{isFocused:!0});case"blur":return rr(rr({},e),{},{isFocused:!1});case"openDialog":return rr(rr({},qm),{},{isFileDialogActive:!0});case"closeDialog":return rr(rr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return rr(rr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return rr(rr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return rr({},qm);default:return e}}function Db(){}var Fb=Array.isArray,Nb=Object.keys,kL=Object.prototype.hasOwnProperty,TL=typeof Element<"u";function Vm(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var r=Fb(e),n=Fb(t),o,a,d;if(r&&n){if(a=e.length,a!=t.length)return!1;for(o=a;o--!==0;)if(!Vm(e[o],t[o]))return!1;return!0}if(r!=n)return!1;var m=e instanceof Date,y=t instanceof Date;if(m!=y)return!1;if(m&&y)return e.getTime()==t.getTime();var w=e instanceof RegExp,M=t instanceof RegExp;if(w!=M)return!1;if(w&&M)return e.toString()==t.toString();var _=Nb(e);if(a=_.length,a!==Nb(t).length)return!1;for(o=a;o--!==0;)if(!kL.call(t,_[o]))return!1;if(TL&&e instanceof Element&&t instanceof Element)return e===t;for(o=a;o--!==0;)if(d=_[o],!(d==="_owner"&&e.$$typeof)&&!Vm(e[d],t[d]))return!1;return!0}return e!==e&&t!==t}var ca=function(t,r){try{return Vm(t,r)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||n.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}},RL=function(t){return OL(t)&&!PL(t)};function OL(e){return!!e&&typeof e=="object"}function PL(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||$L(e)}var BL=typeof Symbol=="function"&&Symbol.for,IL=BL?Symbol.for("react.element"):60103;function $L(e){return e.$$typeof===IL}function LL(e){return Array.isArray(e)?[]:{}}function Ch(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Lu(LL(e),e,t):e}function DL(e,t,r){return e.concat(t).map(function(n){return Ch(n,r)})}function FL(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(o){n[o]=Ch(e[o],r)}),Object.keys(t).forEach(function(o){!r.isMergeableObject(t[o])||!e[o]?n[o]=Ch(t[o],r):n[o]=Lu(e[o],t[o],r)}),n}function Lu(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||DL,r.isMergeableObject=r.isMergeableObject||RL;var n=Array.isArray(t),o=Array.isArray(e),a=n===o;return a?n?r.arrayMerge(e,t,r):FL(e,t,r):Ch(t,r)}Lu.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,o){return Lu(n,o,r)},{})};var Km=Lu,NL=typeof ci=="object"&&ci&&ci.Object===Object&&ci;const M9=NL;var zL=typeof self=="object"&&self&&self.Object===Object&&self,HL=M9||zL||Function("return this")();const Oi=HL;var UL=Oi.Symbol;const Ia=UL;var x9=Object.prototype,jL=x9.hasOwnProperty,qL=x9.toString,Rf=Ia?Ia.toStringTag:void 0;function VL(e){var t=jL.call(e,Rf),r=e[Rf];try{e[Rf]=void 0;var n=!0}catch{}var o=qL.call(e);return n&&(t?e[Rf]=r:delete e[Rf]),o}var KL=Object.prototype,GL=KL.toString;function WL(e){return GL.call(e)}var ZL="[object Null]",YL="[object Undefined]",zb=Ia?Ia.toStringTag:void 0;function Ro(e){return e==null?e===void 0?YL:ZL:zb&&zb in Object(e)?VL(e):WL(e)}function _9(e,t){return function(r){return e(t(r))}}var XL=_9(Object.getPrototypeOf,Object);const ay=XL;function Oo(e){return e!=null&&typeof e=="object"}var JL="[object Object]",QL=Function.prototype,eD=Object.prototype,E9=QL.toString,tD=eD.hasOwnProperty,rD=E9.call(Object);function Hb(e){if(!Oo(e)||Ro(e)!=JL)return!1;var t=ay(e);if(t===null)return!0;var r=tD.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&E9.call(r)==rD}function nD(){this.__data__=[],this.size=0}function S9(e,t){return e===t||e!==e&&t!==t}function Uc(e,t){for(var r=e.length;r--;)if(S9(e[r][0],t))return r;return-1}var iD=Array.prototype,aD=iD.splice;function oD(e){var t=this.__data__,r=Uc(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():aD.call(t,r,1),--this.size,!0}function sD(e){var t=this.__data__,r=Uc(t,e);return r<0?void 0:t[r][1]}function fD(e){return Uc(this.__data__,e)>-1}function uD(e,t){var r=this.__data__,n=Uc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ta(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=mF}var gF="[object Arguments]",yF="[object Array]",bF="[object Boolean]",wF="[object Date]",MF="[object Error]",xF="[object Function]",_F="[object Map]",EF="[object Number]",SF="[object Object]",AF="[object RegExp]",CF="[object Set]",kF="[object String]",TF="[object WeakMap]",RF="[object ArrayBuffer]",OF="[object DataView]",PF="[object Float32Array]",BF="[object Float64Array]",IF="[object Int8Array]",$F="[object Int16Array]",LF="[object Int32Array]",DF="[object Uint8Array]",FF="[object Uint8ClampedArray]",NF="[object Uint16Array]",zF="[object Uint32Array]",Qt={};Qt[PF]=Qt[BF]=Qt[IF]=Qt[$F]=Qt[LF]=Qt[DF]=Qt[FF]=Qt[NF]=Qt[zF]=!0;Qt[gF]=Qt[yF]=Qt[RF]=Qt[bF]=Qt[OF]=Qt[wF]=Qt[MF]=Qt[xF]=Qt[_F]=Qt[EF]=Qt[SF]=Qt[AF]=Qt[CF]=Qt[kF]=Qt[TF]=!1;function HF(e){return Oo(e)&&P9(e.length)&&!!Qt[Ro(e)]}function oy(e){return function(t){return e(t)}}var B9=typeof pn=="object"&&pn&&!pn.nodeType&&pn,uu=B9&&typeof vn=="object"&&vn&&!vn.nodeType&&vn,UF=uu&&uu.exports===B9,C1=UF&&M9.process,jF=function(){try{var e=uu&&uu.require&&uu.require("util").types;return e||C1&&C1.binding&&C1.binding("util")}catch{}}();const $s=jF;var Gb=$s&&$s.isTypedArray,qF=Gb?oy(Gb):HF;const VF=qF;var KF=Object.prototype,GF=KF.hasOwnProperty;function I9(e,t){var r=fl(e),n=!r&&sF(e),o=!r&&!n&&O9(e),a=!r&&!n&&!o&&VF(e),d=r||n||o||a,m=d?rF(e.length,String):[],y=m.length;for(var w in e)(t||GF.call(e,w))&&!(d&&(w=="length"||o&&(w=="offset"||w=="parent")||a&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||vF(w,y)))&&m.push(w);return m}var WF=Object.prototype;function sy(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||WF;return e===r}var ZF=_9(Object.keys,Object);const YF=ZF;var XF=Object.prototype,JF=XF.hasOwnProperty;function QF(e){if(!sy(e))return YF(e);var t=[];for(var r in Object(e))JF.call(e,r)&&r!="constructor"&&t.push(r);return t}function $9(e){return e!=null&&P9(e.length)&&!A9(e)}function fy(e){return $9(e)?I9(e):QF(e)}function eN(e,t){return e&&qc(t,fy(t),e)}function tN(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var rN=Object.prototype,nN=rN.hasOwnProperty;function iN(e){if(!sl(e))return tN(e);var t=sy(e),r=[];for(var n in e)n=="constructor"&&(t||!nN.call(e,n))||r.push(n);return r}function uy(e){return $9(e)?I9(e,!0):iN(e)}function aN(e,t){return e&&qc(t,uy(t),e)}var L9=typeof pn=="object"&&pn&&!pn.nodeType&&pn,Wb=L9&&typeof vn=="object"&&vn&&!vn.nodeType&&vn,oN=Wb&&Wb.exports===L9,Zb=oN?Oi.Buffer:void 0,Yb=Zb?Zb.allocUnsafe:void 0;function sN(e,t){if(t)return e.slice();var r=e.length,n=Yb?Yb(r):new e.constructor(r);return e.copy(n),n}function D9(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r=0)&&(r[o]=e[o]);return r}function c6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d6=function(t){return Array.isArray(t)&&t.length===0},kn=function(t){return typeof t=="function"},Vc=function(t){return t!==null&&typeof t=="object"},aH=function(t){return String(Math.floor(Number(t)))===t},k1=function(t){return Object.prototype.toString.call(t)==="[object String]"},oH=function(t){return le.exports.Children.count(t)===0},T1=function(t){return Vc(t)&&kn(t.then)};function Ar(e,t,r,n){n===void 0&&(n=0);for(var o=G9(t);e&&n=0?[]:{}}}return(a===0?e:o)[d[a]]===r?e:(r===void 0?delete o[d[a]]:o[d[a]]=r,a===0&&r===void 0&&delete n[d[a]],n)}function W9(e,t,r,n){r===void 0&&(r=new WeakMap),n===void 0&&(n={});for(var o=0,a=Object.keys(e);o0?ee.map(function(_e){return Z(_e,Ar(te,_e))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(se).then(function(_e){return _e.reduce(function(K,re,Te){return re==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||re&&(K=gi(K,ee[Te],re)),K},{})})},[Z]),$=le.exports.useCallback(function(te){return Promise.all([W(te),E.validationSchema?J(te):{},E.validate?X(te):{}]).then(function(ee){var se=ee[0],_e=ee[1],K=ee[2],re=Km.all([se,_e,K],{arrayMerge:cH});return re})},[E.validate,E.validationSchema,W,X,J]),h=En(function(te){return te===void 0&&(te=N.values),q({type:"SET_ISVALIDATING",payload:!0}),$(te).then(function(ee){return O.current&&(q({type:"SET_ISVALIDATING",payload:!1}),q({type:"SET_ERRORS",payload:ee})),ee})});le.exports.useEffect(function(){d&&O.current===!0&&ca(S.current,E.initialValues)&&h(S.current)},[d,h]);var i=le.exports.useCallback(function(te){var ee=te&&te.values?te.values:S.current,se=te&&te.errors?te.errors:A.current?A.current:E.initialErrors||{},_e=te&&te.touched?te.touched:T.current?T.current:E.initialTouched||{},K=te&&te.status?te.status:I.current?I.current:E.initialStatus;S.current=ee,A.current=se,T.current=_e,I.current=K;var re=function(){q({type:"RESET_FORM",payload:{isSubmitting:!!te&&!!te.isSubmitting,errors:se,touched:_e,status:K,values:ee,isValidating:!!te&&!!te.isValidating,submitCount:!!te&&!!te.submitCount&&typeof te.submitCount=="number"?te.submitCount:0}})};if(E.onReset){var Te=E.onReset(N.values,U);T1(Te)?Te.then(re):re()}else re()},[E.initialErrors,E.initialStatus,E.initialTouched]);le.exports.useEffect(function(){O.current===!0&&!ca(S.current,E.initialValues)&&(w&&(S.current=E.initialValues,i()),d&&h(S.current))},[w,E.initialValues,i,d,h]),le.exports.useEffect(function(){w&&O.current===!0&&!ca(A.current,E.initialErrors)&&(A.current=E.initialErrors||qa,q({type:"SET_ERRORS",payload:E.initialErrors||qa}))},[w,E.initialErrors]),le.exports.useEffect(function(){w&&O.current===!0&&!ca(T.current,E.initialTouched)&&(T.current=E.initialTouched||Kl,q({type:"SET_TOUCHED",payload:E.initialTouched||Kl}))},[w,E.initialTouched]),le.exports.useEffect(function(){w&&O.current===!0&&!ca(I.current,E.initialStatus)&&(I.current=E.initialStatus,q({type:"SET_STATUS",payload:E.initialStatus}))},[w,E.initialStatus,E.initialTouched]);var f=En(function(te){if(P.current[te]&&kn(P.current[te].validate)){var ee=Ar(N.values,te),se=P.current[te].validate(ee);return T1(se)?(q({type:"SET_ISVALIDATING",payload:!0}),se.then(function(_e){return _e}).then(function(_e){q({type:"SET_FIELD_ERROR",payload:{field:te,value:_e}}),q({type:"SET_ISVALIDATING",payload:!1})})):(q({type:"SET_FIELD_ERROR",payload:{field:te,value:se}}),Promise.resolve(se))}else if(E.validationSchema)return q({type:"SET_ISVALIDATING",payload:!0}),J(N.values,te).then(function(_e){return _e}).then(function(_e){q({type:"SET_FIELD_ERROR",payload:{field:te,value:_e[te]}}),q({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),u=le.exports.useCallback(function(te,ee){var se=ee.validate;P.current[te]={validate:se}},[]),c=le.exports.useCallback(function(te){delete P.current[te]},[]),p=En(function(te,ee){q({type:"SET_TOUCHED",payload:te});var se=ee===void 0?o:ee;return se?h(N.values):Promise.resolve()}),b=le.exports.useCallback(function(te){q({type:"SET_ERRORS",payload:te})},[]),g=En(function(te,ee){var se=kn(te)?te(N.values):te;q({type:"SET_VALUES",payload:se});var _e=ee===void 0?r:ee;return _e?h(se):Promise.resolve()}),l=le.exports.useCallback(function(te,ee){q({type:"SET_FIELD_ERROR",payload:{field:te,value:ee}})},[]),s=En(function(te,ee,se){q({type:"SET_FIELD_VALUE",payload:{field:te,value:ee}});var _e=se===void 0?r:se;return _e?h(gi(N.values,te,ee)):Promise.resolve()}),v=le.exports.useCallback(function(te,ee){var se=ee,_e=te,K;if(!k1(te)){te.persist&&te.persist();var re=te.target?te.target:te.currentTarget,Te=re.type,ae=re.name,Me=re.id,ze=re.value,fe=re.checked,Se=re.outerHTML,He=re.options,ue=re.multiple;se=ee||ae||Me,_e=/number|range/.test(Te)?(K=parseFloat(ze),isNaN(K)?"":K):/checkbox/.test(Te)?pH(Ar(N.values,se),fe,ze):He&&ue?dH(He):ze}se&&s(se,_e)},[s,N.values]),x=En(function(te){if(k1(te))return function(ee){return v(ee,te)};v(te)}),C=En(function(te,ee,se){ee===void 0&&(ee=!0),q({type:"SET_FIELD_TOUCHED",payload:{field:te,value:ee}});var _e=se===void 0?o:se;return _e?h(N.values):Promise.resolve()}),B=le.exports.useCallback(function(te,ee){te.persist&&te.persist();var se=te.target,_e=se.name,K=se.id,re=se.outerHTML,Te=ee||_e||K;C(Te,!0)},[C]),k=En(function(te){if(k1(te))return function(ee){return B(ee,te)};B(te)}),R=le.exports.useCallback(function(te){kn(te)?q({type:"SET_FORMIK_STATE",payload:te}):q({type:"SET_FORMIK_STATE",payload:function(){return te}})},[]),D=le.exports.useCallback(function(te){q({type:"SET_STATUS",payload:te})},[]),z=le.exports.useCallback(function(te){q({type:"SET_ISSUBMITTING",payload:te})},[]),H=En(function(){return q({type:"SUBMIT_ATTEMPT"}),h().then(function(te){var ee=te instanceof Error,se=!ee&&Object.keys(te).length===0;if(se){var _e;try{if(_e=F(),_e===void 0)return}catch(K){throw K}return Promise.resolve(_e).then(function(K){return O.current&&q({type:"SUBMIT_SUCCESS"}),K}).catch(function(K){if(O.current)throw q({type:"SUBMIT_FAILURE"}),K})}else if(O.current&&(q({type:"SUBMIT_FAILURE"}),ee))throw te})}),V=En(function(te){te&&te.preventDefault&&kn(te.preventDefault)&&te.preventDefault(),te&&te.stopPropagation&&kn(te.stopPropagation)&&te.stopPropagation(),H().catch(function(ee){console.warn("Warning: An unhandled error was caught from submitForm()",ee)})}),U={resetForm:i,validateForm:h,validateField:f,setErrors:b,setFieldError:l,setFieldTouched:C,setFieldValue:s,setStatus:D,setSubmitting:z,setTouched:p,setValues:g,setFormikState:R,submitForm:H},F=En(function(){return M(N.values,U)}),G=En(function(te){te&&te.preventDefault&&kn(te.preventDefault)&&te.preventDefault(),te&&te.stopPropagation&&kn(te.stopPropagation)&&te.stopPropagation(),i()}),ie=le.exports.useCallback(function(te){return{value:Ar(N.values,te),error:Ar(N.errors,te),touched:!!Ar(N.touched,te),initialValue:Ar(S.current,te),initialTouched:!!Ar(T.current,te),initialError:Ar(A.current,te)}},[N.errors,N.touched,N.values]),Y=le.exports.useCallback(function(te){return{setValue:function(se,_e){return s(te,se,_e)},setTouched:function(se,_e){return C(te,se,_e)},setError:function(se){return l(te,se)}}},[s,C,l]),oe=le.exports.useCallback(function(te){var ee=Vc(te),se=ee?te.name:te,_e=Ar(N.values,se),K={name:se,value:_e,onChange:x,onBlur:k};if(ee){var re=te.type,Te=te.value,ae=te.as,Me=te.multiple;re==="checkbox"?Te===void 0?K.checked=!!_e:(K.checked=!!(Array.isArray(_e)&&~_e.indexOf(Te)),K.value=Te):re==="radio"?(K.checked=_e===Te,K.value=Te):ae==="select"&&Me&&(K.value=K.value||[],K.multiple=!0)}return K},[k,x,N.values]),xe=le.exports.useMemo(function(){return!ca(S.current,N.values)},[S.current,N.values]),ne=le.exports.useMemo(function(){return typeof m<"u"?xe?N.errors&&Object.keys(N.errors).length===0:m!==!1&&kn(m)?m(E):m:N.errors&&Object.keys(N.errors).length===0},[m,xe,N.errors,E]),Q=hr({},N,{initialValues:S.current,initialErrors:A.current,initialTouched:T.current,initialStatus:I.current,handleBlur:k,handleChange:x,handleReset:G,handleSubmit:V,resetForm:i,setErrors:b,setFormikState:R,setFieldTouched:C,setFieldValue:s,setFieldError:l,setStatus:D,setSubmitting:z,setTouched:p,setValues:g,submitForm:H,validateForm:h,validateField:f,isValid:ne,dirty:xe,unregisterField:c,registerField:u,getFieldProps:oe,getFieldMeta:ie,getFieldHelpers:Y,validateOnBlur:o,validateOnChange:r,validateOnMount:d});return Q}function lH(e){var t={};if(e.inner){if(e.inner.length===0)return gi(t,e.path,e.message);for(var o=e.inner,r=Array.isArray(o),n=0,o=r?o:o[Symbol.iterator]();;){var a;if(r){if(n>=o.length)break;a=o[n++]}else{if(n=o.next(),n.done)break;a=n.value}var d=a;Ar(t,d.path)||(t=gi(t,d.path,d.message))}}return t}function hH(e,t,r,n){r===void 0&&(r=!1),n===void 0&&(n={});var o=Xm(e);return t[r?"validateSync":"validate"](o,{abortEarly:!1,context:n})}function Xm(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=String(r);Array.isArray(e[n])===!0?t[n]=e[n].map(function(o){return Array.isArray(o)===!0||Hb(o)?Xm(o):o!==""?o:void 0}):Hb(e[n])?t[n]=Xm(e[n]):t[n]=e[n]!==""?e[n]:void 0}return t}function cH(e,t,r){var n=e.slice();return t.forEach(function(a,d){if(typeof n[d]>"u"){var m=r.clone!==!1,y=m&&r.isMergeableObject(a);n[d]=y?Km(Array.isArray(a)?[]:{},a,r):a}else r.isMergeableObject(a)?n[d]=Km(e[d],a,r):e.indexOf(a)===-1&&n.push(a)}),n}function dH(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function pH(e,t,r){if(typeof e=="boolean")return Boolean(t);var n=[],o=!1,a=-1;if(Array.isArray(e))n=e,a=e.indexOf(r),o=a>=0;else if(!r||r=="true"||r=="false")return Boolean(t);return t&&r&&!o?n.concat(r):o?n.slice(0,a).concat(n.slice(a+1)):n}var vH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?le.exports.useLayoutEffect:le.exports.useEffect;function En(e){var t=le.exports.useRef(e);return vH(function(){t.current=e}),le.exports.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;on?o:n},0);return Array.from(hr({},t,{length:r+1}))}else return[]},wH=function(e){iH(t,e);function t(n){var o;return o=e.call(this,n)||this,o.updateArrayField=function(a,d,m){var y=o.props,w=y.name,M=y.formik.setFormikState;M(function(_){var E=typeof m=="function"?m:a,S=typeof d=="function"?d:a,A=gi(_.values,w,a(Ar(_.values,w))),T=m?E(Ar(_.errors,w)):void 0,I=d?S(Ar(_.touched,w)):void 0;return d6(T)&&(T=void 0),d6(I)&&(I=void 0),hr({},_,{values:A,errors:m?gi(_.errors,w,T):_.errors,touched:d?gi(_.touched,w,I):_.touched})})},o.push=function(a){return o.updateArrayField(function(d){return[].concat(Ls(d),[nH(a)])},!1,!1)},o.handlePush=function(a){return function(){return o.push(a)}},o.swap=function(a,d){return o.updateArrayField(function(m){return yH(m,a,d)},!0,!0)},o.handleSwap=function(a,d){return function(){return o.swap(a,d)}},o.move=function(a,d){return o.updateArrayField(function(m){return gH(m,a,d)},!0,!0)},o.handleMove=function(a,d){return function(){return o.move(a,d)}},o.insert=function(a,d){return o.updateArrayField(function(m){return R1(m,a,d)},function(m){return R1(m,a,null)},function(m){return R1(m,a,null)})},o.handleInsert=function(a,d){return function(){return o.insert(a,d)}},o.replace=function(a,d){return o.updateArrayField(function(m){return bH(m,a,d)},!1,!1)},o.handleReplace=function(a,d){return function(){return o.replace(a,d)}},o.unshift=function(a){var d=-1;return o.updateArrayField(function(m){var y=m?[a].concat(m):[a];return d<0&&(d=y.length),y},function(m){var y=m?[null].concat(m):[null];return d<0&&(d=y.length),y},function(m){var y=m?[null].concat(m):[null];return d<0&&(d=y.length),y}),d},o.handleUnshift=function(a){return function(){return o.unshift(a)}},o.handleRemove=function(a){return function(){return o.remove(a)}},o.handlePop=function(){return function(){return o.pop()}},o.remove=o.remove.bind(c6(o)),o.pop=o.pop.bind(c6(o)),o}var r=t.prototype;return r.componentDidUpdate=function(o){this.props.validateOnChange&&this.props.formik.validateOnChange&&!ca(Ar(o.formik.values,o.name),Ar(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},r.remove=function(o){var a;return this.updateArrayField(function(d){var m=d?Ls(d):[];return a||(a=m[o]),kn(m.splice)&&m.splice(o,1),m},!0,!0),a},r.pop=function(){var o;return this.updateArrayField(function(a){var d=a;return o||(o=d&&d.pop&&d.pop()),d},!0,!0),o},r.render=function(){var o={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},a=this.props,d=a.component,m=a.render,y=a.children,w=a.name,M=a.formik,_=vy(M,["validate","validationSchema"]),E=hr({},o,{form:_,name:w});return d?le.exports.createElement(d,E):m?m(E):y?typeof y=="function"?y(E):oH(y)?null:le.exports.Children.only(y):null},t}(le.exports.Component);wH.defaultProps={validateOnChange:!0};var kh={exports:{}};(function(e,t){(function(r,n){n(t)})(Qe,function(r){function n(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function o(s,v){return s(v={exports:{}},v.exports),v.exports}var a=o(function(s,v){function x(){}function C(B,k,R,D,z){for(var H=0,V=k.length,U=0,F=0;Hxe.length?Q:xe}),G.value=Y.join("")}else G.value=R.slice(U,U+G.count).join("");U+=G.count,G.added||(F+=G.count)}}var oe=k[V-1];return V>1&&(oe.added||oe.removed)&&B.equals("",oe.value)&&(k[V-2].value+=oe.value,k.pop()),k}v.__esModule=!0,v.default=x,x.prototype={diff:function(B,k){var R=arguments.length<=2||arguments[2]===void 0?{}:arguments[2],D=R.callback;typeof R=="function"&&(D=R,R={}),this.options=R;var z=this;function H(ne){return D?(setTimeout(function(){D(void 0,ne)},0),!0):ne}B=this.castInput(B),k=this.castInput(k),B=this.removeEmpty(this.tokenize(B));var V=(k=this.removeEmpty(this.tokenize(k))).length,U=B.length,F=1,G=V+U,ie=[{newPos:-1,components:[]}],Y=this.extractCommon(ie[0],k,B,0);if(ie[0].newPos+1>=V&&Y+1>=U)return H([{value:k.join(""),count:k.length}]);function oe(){for(var ne=-1*F;ne<=F;ne+=2){var Q=void 0,te=ie[ne-1],ee=ie[ne+1],se=(ee?ee.newPos:0)-ne;te&&(ie[ne-1]=void 0);var _e=te&&te.newPos+1=V&&se+1>=U)return H(C(z,Q.components,k,B,z.useLongestToken));ie[ne]=Q}else ie[ne]=void 0}var re;F++}if(D)(function ne(){setTimeout(function(){if(F>G)return D();oe()||ne()},0)})();else for(;F<=G;){var xe=oe();if(xe)return xe}},pushComponent:function(B,k,R){var D=B[B.length-1];D&&D.added===k&&D.removed===R?B[B.length-1]={count:D.count+1,added:k,removed:R}:B.push({count:1,added:k,removed:R})},extractCommon:function(B,k,R,D){for(var z=k.length,H=R.length,V=B.newPos,U=V-D,F=0;V+11)throw new Error("applyPatch only works with a single input.");R=R[0]}var z=k.split(` `),H=R.hunks,V=D.compareLine||function(He,ue,Ae,Ue){return ue===Ue},U=0,F=D.fuzzFactor||0,G=0,ie=0,Y=void 0,oe=void 0;function xe(He,ue){for(var Ae=0;AeF)return!1;ue++}}return!0}for(var ne=0;ne0?G(Te.lines.slice(-U.context)):[],Y-=xe.length,oe-=xe.length)}(re=xe).push.apply(re,x(K.map(function(ue){return(_e.added?"+":"-")+ue}))),_e.added?Q+=K.length:ne+=K.length}else{if(Y)if(K.length<=2*U.context&&se=F.length-2&&K.length<=U.context){var Se=/\n$/.test(D),He=/\n$/.test(z);K.length!=0||Se?Se&&He||xe.push("\\ No newline at end of file"):xe.splice(fe.oldLines,0,"\\ No newline at end of file")}ie.push(fe),Y=0,oe=0,xe=[]}ne+=K.length,Q+=K.length}},ee=0;ee/g,">")).replace(/"/g,""")}v.__esModule=!0,v.convertChangesToXML=function(C){for(var B=[],k=0;k"):R.removed&&B.push(""),B.push(x(R.value)),R.added?B.push(""):R.removed&&B.push("")}return B.join("")}});n(P),P.convertChangesToXML;var L=o(function(s,v){v.__esModule=!0,v.canonicalize=v.convertChangesToXML=v.convertChangesToDMP=v.parsePatch=v.applyPatches=v.applyPatch=v.createPatch=v.createTwoFilesPatch=v.structuredPatch=v.diffJson=v.diffCss=v.diffSentences=v.diffTrimmedLines=v.diffLines=v.diffWordsWithSpace=v.diffWords=v.diffChars=v.Diff=void 0;var x,C=(x=a)&&x.__esModule?x:{default:x};v.Diff=C.default,v.diffChars=d.diffChars,v.diffWords=y.diffWords,v.diffWordsWithSpace=y.diffWordsWithSpace,v.diffLines=w.diffLines,v.diffTrimmedLines=w.diffTrimmedLines,v.diffSentences=M.diffSentences,v.diffCss=_.diffCss,v.diffJson=E.diffJson,v.structuredPatch=I.structuredPatch,v.createTwoFilesPatch=I.createTwoFilesPatch,v.createPatch=I.createPatch,v.applyPatch=T.applyPatch,v.applyPatches=T.applyPatches,v.parsePatch=S.parsePatch,v.convertChangesToDMP=O.convertChangesToDMP,v.convertChangesToXML=P.convertChangesToXML,v.canonicalize=E.canonicalize});n(L),L.canonicalize,L.convertChangesToXML,L.convertChangesToDMP,L.parsePatch,L.applyPatches,L.applyPatch,L.createPatch,L.createTwoFilesPatch,L.structuredPatch,L.diffJson,L.diffCss,L.diffSentences,L.diffTrimmedLines,L.diffLines,L.diffWordsWithSpace,L.diffWords,L.diffChars,L.Diff;function N(s,v){let x=0;for(let C=0;C0){let B=f(C,` `,0,v,!1);x=C.substring(0,B).split(` `)}else{let B=C[C.length-1]===` `?C.length-1:C.length,k=f(C,` `,B-1,-v,!0);x=C.substring(k+1,B).split(` `)}return x.map(function(B){return new $(s.type,B)})}function i(s,v){return Array.prototype.push.apply(v,s),v}function f(s,v,x,C,B){let k=B?-1:1;x-=k;for(let R=0;RC+1?"...":""))},changes2shorthand:function(s){return"{"+s.reduce(function(v,x){for(let C=0;C0?x:0,V=D0?(i(h(z,H),B),R(),i(h(z,-V),B),k=U):i(h(z),B)}else i(h(z),B)}return R(),C},ADDED:X,REMOVED:J,UNMODIFIED:Z},c=o(function(s,v){function x(R){return R.added?u.ADDED:R.removed?u.REMOVED:u.UNMODIFIED}function C(R,D){(function(V){V.length===0||(V[0].type=x(V[0]),V.reduce(function(U,F,G){if(F.type=x(F),U.type===F.type)throw Error("repeating change types are not handled: "+U.type+" (at "+(G-1)+" and "+G+")");return F}))})(R),(D=D||{}).aname=D.aname||"a",D.bname=D.bname||"b";let z=D.context||D.context===0?D.context:0;D.pre_context=D.pre_context||D.pre_context===0?D.pre_context:z,D.post_context=D.post_context||D.post_context===0?D.post_context:z;let H=u.makeHunks(R,D.pre_context,D.post_context);if(H.length){let V=[];return V.push("--- "+D.aname),V.push("+++ "+D.bname),H.forEach(function(U){V.push(U.unified())}),V.join(` `)}return""}function B(R,D,z){R=Array.isArray(R)?R.join(` `)+` `:R,D=Array.isArray(D)?D.join(` `)+` `:D;let H=L.diffLines(R,D,z);return H.length!==1||H[0].added||H[0].removed?H:[]}function k(R,D,z){return C(B(R,D),z)}v.assertEqual=function(R,D,z,H,V){V=V||console.log,z=z.ok||z;let U=k(R,D,{context:3,aname:H+" (actual)",bname:H+" (expected)"});z(!U,H),U&&U.split(` `).forEach(function(F){V(" "+F)})},v.diffAsText=k,v.formatLines=C,v.diffLines=B,Object.keys(L).forEach(function(R){v[R]||(v[R]=L[R])})}),p=c.assertEqual,b=c.diffAsText,g=c.formatLines,l=c.diffLines;r.default=c,r.assertEqual=p,r.diffAsText=b,r.formatLines=g,r.diffLines=l,Object.defineProperty(r,"__esModule",{value:!0})})})(kh,kh.exports);function Z9(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Y9={exports:{}};(function(e){(function(t,r){function n($,h){if(!$)throw new Error(h||"Assertion failed")}function o($,h){$.super_=h;var i=function(){};i.prototype=h.prototype,$.prototype=new i,$.prototype.constructor=$}function a($,h,i){if(a.isBN($))return $;this.negative=0,this.words=null,this.length=0,this.red=null,$!==null&&((h==="le"||h==="be")&&(i=h,h=10),this._init($||0,h||10,i||"be"))}typeof t=="object"?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var d;try{d=Z9("buffer").Buffer}catch{}a.isBN=function(h){return h instanceof a?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===a.wordSize&&Array.isArray(h.words)},a.max=function(h,i){return h.cmp(i)>0?h:i},a.min=function(h,i){return h.cmp(i)<0?h:i},a.prototype._init=function(h,i,f){if(typeof h=="number")return this._initNumber(h,i,f);if(typeof h=="object")return this._initArray(h,i,f);i==="hex"&&(i=16),n(i===(i|0)&&i>=2&&i<=36),h=h.toString().replace(/\s+/g,"");var u=0;h[0]==="-"&&u++,i===16?this._parseHex(h,u):this._parseBase(h,i,u),h[0]==="-"&&(this.negative=1),this.strip(),f==="le"&&this._initArray(this.toArray(),i,f)},a.prototype._initNumber=function(h,i,f){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(n(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),f==="le"&&this._initArray(this.toArray(),i,f)},a.prototype._initArray=function(h,i,f){if(n(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var u=0;u=0;u-=3)p=h[u]|h[u-1]<<8|h[u-2]<<16,this.words[c]|=p<>>26-b&67108863,b+=24,b>=26&&(b-=26,c++);else if(f==="le")for(u=0,c=0;u>>26-b&67108863,b+=24,b>=26&&(b-=26,c++);return this.strip()};function m($,h,i){for(var f=0,u=Math.min($.length,i),c=h;c=49&&p<=54?f|=p-49+10:p>=17&&p<=22?f|=p-17+10:f|=p&15}return f}a.prototype._parseHex=function(h,i){this.length=Math.ceil((h.length-i)/6),this.words=new Array(this.length);for(var f=0;f=i;f-=6)c=m(h,f,f+6),this.words[u]|=c<>>26-p&4194303,p+=24,p>=26&&(p-=26,u++);f+6!==i&&(c=m(h,i,f+6),this.words[u]|=c<>>26-p&4194303),this.strip()};function y($,h,i,f){for(var u=0,c=Math.min($.length,i),p=h;p=49?u+=b-49+10:b>=17?u+=b-17+10:u+=b}return u}a.prototype._parseBase=function(h,i,f){this.words=[0],this.length=1;for(var u=0,c=1;c<=67108863;c*=i)u++;u--,c=c/i|0;for(var p=h.length-f,b=p%u,g=Math.min(p,p-b)+f,l=0,s=f;s1&&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},a.prototype.inspect=function(){return(this.red?""};var w=["","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"],M=[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];a.prototype.toString=function(h,i){h=h||10,i=i|0||1;var f;if(h===16||h==="hex"){f="";for(var u=0,c=0,p=0;p>>24-u&16777215,c!==0||p!==this.length-1?f=w[6-g.length]+g+f:f=g+f,u+=2,u>=26&&(u-=26,p--)}for(c!==0&&(f=c.toString(16)+f);f.length%i!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}if(h===(h|0)&&h>=2&&h<=36){var l=M[h],s=_[h];f="";var v=this.clone();for(v.negative=0;!v.isZero();){var x=v.modn(s).toString(h);v=v.idivn(s),v.isZero()?f=x+f:f=w[l-x.length]+x+f}for(this.isZero()&&(f="0"+f);f.length%i!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(h,i){return n(typeof d<"u"),this.toArrayLike(d,h,i)},a.prototype.toArray=function(h,i){return this.toArrayLike(Array,h,i)},a.prototype.toArrayLike=function(h,i,f){var u=this.byteLength(),c=f||Math.max(1,u);n(u<=c,"byte array longer than desired length"),n(c>0,"Requested array length <= 0"),this.strip();var p=i==="le",b=new h(c),g,l,s=this.clone();if(p){for(l=0;!s.isZero();l++)g=s.andln(255),s.iushrn(8),b[l]=g;for(;l=4096&&(f+=13,i>>>=13),i>=64&&(f+=7,i>>>=7),i>=8&&(f+=4,i>>>=4),i>=2&&(f+=2,i>>>=2),f+i},a.prototype._zeroBits=function(h){if(h===0)return 26;var i=h,f=0;return(i&8191)===0&&(f+=13,i>>>=13),(i&127)===0&&(f+=7,i>>>=7),(i&15)===0&&(f+=4,i>>>=4),(i&3)===0&&(f+=2,i>>>=2),(i&1)===0&&f++,f},a.prototype.bitLength=function(){var h=this.words[this.length-1],i=this._countBits(h);return(this.length-1)*26+i};function E($){for(var h=new Array($.bitLength()),i=0;i>>u}return h}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,i=0;ih.length?this.clone().ior(h):h.clone().ior(this)},a.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},a.prototype.iuand=function(h){var i;this.length>h.length?i=h:i=this;for(var f=0;fh.length?this.clone().iand(h):h.clone().iand(this)},a.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},a.prototype.iuxor=function(h){var i,f;this.length>h.length?(i=this,f=h):(i=h,f=this);for(var u=0;uh.length?this.clone().ixor(h):h.clone().ixor(this)},a.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},a.prototype.inotn=function(h){n(typeof h=="number"&&h>=0);var i=Math.ceil(h/26)|0,f=h%26;this._expand(i),f>0&&i--;for(var u=0;u0&&(this.words[u]=~this.words[u]&67108863>>26-f),this.strip()},a.prototype.notn=function(h){return this.clone().inotn(h)},a.prototype.setn=function(h,i){n(typeof h=="number"&&h>=0);var f=h/26|0,u=h%26;return this._expand(f+1),i?this.words[f]=this.words[f]|1<h.length?(f=this,u=h):(f=h,u=this);for(var c=0,p=0;p>>26;for(;c!==0&&p>>26;if(this.length=f.length,c!==0)this.words[this.length]=c,this.length++;else if(f!==this)for(;ph.length?this.clone().iadd(h):h.clone().iadd(this)},a.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var i=this.iadd(h);return h.negative=1,i._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var f=this.cmp(h);if(f===0)return this.negative=0,this.length=1,this.words[0]=0,this;var u,c;f>0?(u=this,c=h):(u=h,c=this);for(var p=0,b=0;b>26,this.words[b]=i&67108863;for(;p!==0&&b>26,this.words[b]=i&67108863;if(p===0&&b>>26,v=g&67108863,x=Math.min(l,h.length-1),C=Math.max(0,l-$.length+1);C<=x;C++){var B=l-C|0;u=$.words[B]|0,c=h.words[C]|0,p=u*c+v,s+=p/67108864|0,v=p&67108863}i.words[l]=v|0,g=s|0}return g!==0?i.words[l]=g|0:i.length--,i.strip()}var A=function(h,i,f){var u=h.words,c=i.words,p=f.words,b=0,g,l,s,v=u[0]|0,x=v&8191,C=v>>>13,B=u[1]|0,k=B&8191,R=B>>>13,D=u[2]|0,z=D&8191,H=D>>>13,V=u[3]|0,U=V&8191,F=V>>>13,G=u[4]|0,ie=G&8191,Y=G>>>13,oe=u[5]|0,xe=oe&8191,ne=oe>>>13,Q=u[6]|0,te=Q&8191,ee=Q>>>13,se=u[7]|0,_e=se&8191,K=se>>>13,re=u[8]|0,Te=re&8191,ae=re>>>13,Me=u[9]|0,ze=Me&8191,fe=Me>>>13,Se=c[0]|0,He=Se&8191,ue=Se>>>13,Ae=c[1]|0,Ue=Ae&8191,he=Ae>>>13,Ce=c[2]|0,je=Ce&8191,de=Ce>>>13,Oe=c[3]|0,Ve=Oe&8191,pe=Oe>>>13,Pe=c[4]|0,Ke=Pe&8191,ve=Pe>>>13,Be=c[5]|0,Ge=Be&8191,me=Be>>>13,Ie=c[6]|0,We=Ie&8191,ge=Ie>>>13,$e=c[7]|0,Ze=$e&8191,ye=$e>>>13,Le=c[8]|0,Ye=Le&8191,be=Le>>>13,De=c[9]|0,Xe=De&8191,we=De>>>13;f.negative=h.negative^i.negative,f.length=19,g=Math.imul(x,He),l=Math.imul(x,ue),l=l+Math.imul(C,He)|0,s=Math.imul(C,ue);var Re=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(Re>>>26)|0,Re&=67108863,g=Math.imul(k,He),l=Math.imul(k,ue),l=l+Math.imul(R,He)|0,s=Math.imul(R,ue),g=g+Math.imul(x,Ue)|0,l=l+Math.imul(x,he)|0,l=l+Math.imul(C,Ue)|0,s=s+Math.imul(C,he)|0;var tt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(tt>>>26)|0,tt&=67108863,g=Math.imul(z,He),l=Math.imul(z,ue),l=l+Math.imul(H,He)|0,s=Math.imul(H,ue),g=g+Math.imul(k,Ue)|0,l=l+Math.imul(k,he)|0,l=l+Math.imul(R,Ue)|0,s=s+Math.imul(R,he)|0,g=g+Math.imul(x,je)|0,l=l+Math.imul(x,de)|0,l=l+Math.imul(C,je)|0,s=s+Math.imul(C,de)|0;var rt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(rt>>>26)|0,rt&=67108863,g=Math.imul(U,He),l=Math.imul(U,ue),l=l+Math.imul(F,He)|0,s=Math.imul(F,ue),g=g+Math.imul(z,Ue)|0,l=l+Math.imul(z,he)|0,l=l+Math.imul(H,Ue)|0,s=s+Math.imul(H,he)|0,g=g+Math.imul(k,je)|0,l=l+Math.imul(k,de)|0,l=l+Math.imul(R,je)|0,s=s+Math.imul(R,de)|0,g=g+Math.imul(x,Ve)|0,l=l+Math.imul(x,pe)|0,l=l+Math.imul(C,Ve)|0,s=s+Math.imul(C,pe)|0;var ut=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(ut>>>26)|0,ut&=67108863,g=Math.imul(ie,He),l=Math.imul(ie,ue),l=l+Math.imul(Y,He)|0,s=Math.imul(Y,ue),g=g+Math.imul(U,Ue)|0,l=l+Math.imul(U,he)|0,l=l+Math.imul(F,Ue)|0,s=s+Math.imul(F,he)|0,g=g+Math.imul(z,je)|0,l=l+Math.imul(z,de)|0,l=l+Math.imul(H,je)|0,s=s+Math.imul(H,de)|0,g=g+Math.imul(k,Ve)|0,l=l+Math.imul(k,pe)|0,l=l+Math.imul(R,Ve)|0,s=s+Math.imul(R,pe)|0,g=g+Math.imul(x,Ke)|0,l=l+Math.imul(x,ve)|0,l=l+Math.imul(C,Ke)|0,s=s+Math.imul(C,ve)|0;var lt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(lt>>>26)|0,lt&=67108863,g=Math.imul(xe,He),l=Math.imul(xe,ue),l=l+Math.imul(ne,He)|0,s=Math.imul(ne,ue),g=g+Math.imul(ie,Ue)|0,l=l+Math.imul(ie,he)|0,l=l+Math.imul(Y,Ue)|0,s=s+Math.imul(Y,he)|0,g=g+Math.imul(U,je)|0,l=l+Math.imul(U,de)|0,l=l+Math.imul(F,je)|0,s=s+Math.imul(F,de)|0,g=g+Math.imul(z,Ve)|0,l=l+Math.imul(z,pe)|0,l=l+Math.imul(H,Ve)|0,s=s+Math.imul(H,pe)|0,g=g+Math.imul(k,Ke)|0,l=l+Math.imul(k,ve)|0,l=l+Math.imul(R,Ke)|0,s=s+Math.imul(R,ve)|0,g=g+Math.imul(x,Ge)|0,l=l+Math.imul(x,me)|0,l=l+Math.imul(C,Ge)|0,s=s+Math.imul(C,me)|0;var ht=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(ht>>>26)|0,ht&=67108863,g=Math.imul(te,He),l=Math.imul(te,ue),l=l+Math.imul(ee,He)|0,s=Math.imul(ee,ue),g=g+Math.imul(xe,Ue)|0,l=l+Math.imul(xe,he)|0,l=l+Math.imul(ne,Ue)|0,s=s+Math.imul(ne,he)|0,g=g+Math.imul(ie,je)|0,l=l+Math.imul(ie,de)|0,l=l+Math.imul(Y,je)|0,s=s+Math.imul(Y,de)|0,g=g+Math.imul(U,Ve)|0,l=l+Math.imul(U,pe)|0,l=l+Math.imul(F,Ve)|0,s=s+Math.imul(F,pe)|0,g=g+Math.imul(z,Ke)|0,l=l+Math.imul(z,ve)|0,l=l+Math.imul(H,Ke)|0,s=s+Math.imul(H,ve)|0,g=g+Math.imul(k,Ge)|0,l=l+Math.imul(k,me)|0,l=l+Math.imul(R,Ge)|0,s=s+Math.imul(R,me)|0,g=g+Math.imul(x,We)|0,l=l+Math.imul(x,ge)|0,l=l+Math.imul(C,We)|0,s=s+Math.imul(C,ge)|0;var ct=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(ct>>>26)|0,ct&=67108863,g=Math.imul(_e,He),l=Math.imul(_e,ue),l=l+Math.imul(K,He)|0,s=Math.imul(K,ue),g=g+Math.imul(te,Ue)|0,l=l+Math.imul(te,he)|0,l=l+Math.imul(ee,Ue)|0,s=s+Math.imul(ee,he)|0,g=g+Math.imul(xe,je)|0,l=l+Math.imul(xe,de)|0,l=l+Math.imul(ne,je)|0,s=s+Math.imul(ne,de)|0,g=g+Math.imul(ie,Ve)|0,l=l+Math.imul(ie,pe)|0,l=l+Math.imul(Y,Ve)|0,s=s+Math.imul(Y,pe)|0,g=g+Math.imul(U,Ke)|0,l=l+Math.imul(U,ve)|0,l=l+Math.imul(F,Ke)|0,s=s+Math.imul(F,ve)|0,g=g+Math.imul(z,Ge)|0,l=l+Math.imul(z,me)|0,l=l+Math.imul(H,Ge)|0,s=s+Math.imul(H,me)|0,g=g+Math.imul(k,We)|0,l=l+Math.imul(k,ge)|0,l=l+Math.imul(R,We)|0,s=s+Math.imul(R,ge)|0,g=g+Math.imul(x,Ze)|0,l=l+Math.imul(x,ye)|0,l=l+Math.imul(C,Ze)|0,s=s+Math.imul(C,ye)|0;var dt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(dt>>>26)|0,dt&=67108863,g=Math.imul(Te,He),l=Math.imul(Te,ue),l=l+Math.imul(ae,He)|0,s=Math.imul(ae,ue),g=g+Math.imul(_e,Ue)|0,l=l+Math.imul(_e,he)|0,l=l+Math.imul(K,Ue)|0,s=s+Math.imul(K,he)|0,g=g+Math.imul(te,je)|0,l=l+Math.imul(te,de)|0,l=l+Math.imul(ee,je)|0,s=s+Math.imul(ee,de)|0,g=g+Math.imul(xe,Ve)|0,l=l+Math.imul(xe,pe)|0,l=l+Math.imul(ne,Ve)|0,s=s+Math.imul(ne,pe)|0,g=g+Math.imul(ie,Ke)|0,l=l+Math.imul(ie,ve)|0,l=l+Math.imul(Y,Ke)|0,s=s+Math.imul(Y,ve)|0,g=g+Math.imul(U,Ge)|0,l=l+Math.imul(U,me)|0,l=l+Math.imul(F,Ge)|0,s=s+Math.imul(F,me)|0,g=g+Math.imul(z,We)|0,l=l+Math.imul(z,ge)|0,l=l+Math.imul(H,We)|0,s=s+Math.imul(H,ge)|0,g=g+Math.imul(k,Ze)|0,l=l+Math.imul(k,ye)|0,l=l+Math.imul(R,Ze)|0,s=s+Math.imul(R,ye)|0,g=g+Math.imul(x,Ye)|0,l=l+Math.imul(x,be)|0,l=l+Math.imul(C,Ye)|0,s=s+Math.imul(C,be)|0;var yt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(yt>>>26)|0,yt&=67108863,g=Math.imul(ze,He),l=Math.imul(ze,ue),l=l+Math.imul(fe,He)|0,s=Math.imul(fe,ue),g=g+Math.imul(Te,Ue)|0,l=l+Math.imul(Te,he)|0,l=l+Math.imul(ae,Ue)|0,s=s+Math.imul(ae,he)|0,g=g+Math.imul(_e,je)|0,l=l+Math.imul(_e,de)|0,l=l+Math.imul(K,je)|0,s=s+Math.imul(K,de)|0,g=g+Math.imul(te,Ve)|0,l=l+Math.imul(te,pe)|0,l=l+Math.imul(ee,Ve)|0,s=s+Math.imul(ee,pe)|0,g=g+Math.imul(xe,Ke)|0,l=l+Math.imul(xe,ve)|0,l=l+Math.imul(ne,Ke)|0,s=s+Math.imul(ne,ve)|0,g=g+Math.imul(ie,Ge)|0,l=l+Math.imul(ie,me)|0,l=l+Math.imul(Y,Ge)|0,s=s+Math.imul(Y,me)|0,g=g+Math.imul(U,We)|0,l=l+Math.imul(U,ge)|0,l=l+Math.imul(F,We)|0,s=s+Math.imul(F,ge)|0,g=g+Math.imul(z,Ze)|0,l=l+Math.imul(z,ye)|0,l=l+Math.imul(H,Ze)|0,s=s+Math.imul(H,ye)|0,g=g+Math.imul(k,Ye)|0,l=l+Math.imul(k,be)|0,l=l+Math.imul(R,Ye)|0,s=s+Math.imul(R,be)|0,g=g+Math.imul(x,Xe)|0,l=l+Math.imul(x,we)|0,l=l+Math.imul(C,Xe)|0,s=s+Math.imul(C,we)|0;var bt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(bt>>>26)|0,bt&=67108863,g=Math.imul(ze,Ue),l=Math.imul(ze,he),l=l+Math.imul(fe,Ue)|0,s=Math.imul(fe,he),g=g+Math.imul(Te,je)|0,l=l+Math.imul(Te,de)|0,l=l+Math.imul(ae,je)|0,s=s+Math.imul(ae,de)|0,g=g+Math.imul(_e,Ve)|0,l=l+Math.imul(_e,pe)|0,l=l+Math.imul(K,Ve)|0,s=s+Math.imul(K,pe)|0,g=g+Math.imul(te,Ke)|0,l=l+Math.imul(te,ve)|0,l=l+Math.imul(ee,Ke)|0,s=s+Math.imul(ee,ve)|0,g=g+Math.imul(xe,Ge)|0,l=l+Math.imul(xe,me)|0,l=l+Math.imul(ne,Ge)|0,s=s+Math.imul(ne,me)|0,g=g+Math.imul(ie,We)|0,l=l+Math.imul(ie,ge)|0,l=l+Math.imul(Y,We)|0,s=s+Math.imul(Y,ge)|0,g=g+Math.imul(U,Ze)|0,l=l+Math.imul(U,ye)|0,l=l+Math.imul(F,Ze)|0,s=s+Math.imul(F,ye)|0,g=g+Math.imul(z,Ye)|0,l=l+Math.imul(z,be)|0,l=l+Math.imul(H,Ye)|0,s=s+Math.imul(H,be)|0,g=g+Math.imul(k,Xe)|0,l=l+Math.imul(k,we)|0,l=l+Math.imul(R,Xe)|0,s=s+Math.imul(R,we)|0;var wt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(wt>>>26)|0,wt&=67108863,g=Math.imul(ze,je),l=Math.imul(ze,de),l=l+Math.imul(fe,je)|0,s=Math.imul(fe,de),g=g+Math.imul(Te,Ve)|0,l=l+Math.imul(Te,pe)|0,l=l+Math.imul(ae,Ve)|0,s=s+Math.imul(ae,pe)|0,g=g+Math.imul(_e,Ke)|0,l=l+Math.imul(_e,ve)|0,l=l+Math.imul(K,Ke)|0,s=s+Math.imul(K,ve)|0,g=g+Math.imul(te,Ge)|0,l=l+Math.imul(te,me)|0,l=l+Math.imul(ee,Ge)|0,s=s+Math.imul(ee,me)|0,g=g+Math.imul(xe,We)|0,l=l+Math.imul(xe,ge)|0,l=l+Math.imul(ne,We)|0,s=s+Math.imul(ne,ge)|0,g=g+Math.imul(ie,Ze)|0,l=l+Math.imul(ie,ye)|0,l=l+Math.imul(Y,Ze)|0,s=s+Math.imul(Y,ye)|0,g=g+Math.imul(U,Ye)|0,l=l+Math.imul(U,be)|0,l=l+Math.imul(F,Ye)|0,s=s+Math.imul(F,be)|0,g=g+Math.imul(z,Xe)|0,l=l+Math.imul(z,we)|0,l=l+Math.imul(H,Xe)|0,s=s+Math.imul(H,we)|0;var Mt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,g=Math.imul(ze,Ve),l=Math.imul(ze,pe),l=l+Math.imul(fe,Ve)|0,s=Math.imul(fe,pe),g=g+Math.imul(Te,Ke)|0,l=l+Math.imul(Te,ve)|0,l=l+Math.imul(ae,Ke)|0,s=s+Math.imul(ae,ve)|0,g=g+Math.imul(_e,Ge)|0,l=l+Math.imul(_e,me)|0,l=l+Math.imul(K,Ge)|0,s=s+Math.imul(K,me)|0,g=g+Math.imul(te,We)|0,l=l+Math.imul(te,ge)|0,l=l+Math.imul(ee,We)|0,s=s+Math.imul(ee,ge)|0,g=g+Math.imul(xe,Ze)|0,l=l+Math.imul(xe,ye)|0,l=l+Math.imul(ne,Ze)|0,s=s+Math.imul(ne,ye)|0,g=g+Math.imul(ie,Ye)|0,l=l+Math.imul(ie,be)|0,l=l+Math.imul(Y,Ye)|0,s=s+Math.imul(Y,be)|0,g=g+Math.imul(U,Xe)|0,l=l+Math.imul(U,we)|0,l=l+Math.imul(F,Xe)|0,s=s+Math.imul(F,we)|0;var xt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(xt>>>26)|0,xt&=67108863,g=Math.imul(ze,Ke),l=Math.imul(ze,ve),l=l+Math.imul(fe,Ke)|0,s=Math.imul(fe,ve),g=g+Math.imul(Te,Ge)|0,l=l+Math.imul(Te,me)|0,l=l+Math.imul(ae,Ge)|0,s=s+Math.imul(ae,me)|0,g=g+Math.imul(_e,We)|0,l=l+Math.imul(_e,ge)|0,l=l+Math.imul(K,We)|0,s=s+Math.imul(K,ge)|0,g=g+Math.imul(te,Ze)|0,l=l+Math.imul(te,ye)|0,l=l+Math.imul(ee,Ze)|0,s=s+Math.imul(ee,ye)|0,g=g+Math.imul(xe,Ye)|0,l=l+Math.imul(xe,be)|0,l=l+Math.imul(ne,Ye)|0,s=s+Math.imul(ne,be)|0,g=g+Math.imul(ie,Xe)|0,l=l+Math.imul(ie,we)|0,l=l+Math.imul(Y,Xe)|0,s=s+Math.imul(Y,we)|0;var _t=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(_t>>>26)|0,_t&=67108863,g=Math.imul(ze,Ge),l=Math.imul(ze,me),l=l+Math.imul(fe,Ge)|0,s=Math.imul(fe,me),g=g+Math.imul(Te,We)|0,l=l+Math.imul(Te,ge)|0,l=l+Math.imul(ae,We)|0,s=s+Math.imul(ae,ge)|0,g=g+Math.imul(_e,Ze)|0,l=l+Math.imul(_e,ye)|0,l=l+Math.imul(K,Ze)|0,s=s+Math.imul(K,ye)|0,g=g+Math.imul(te,Ye)|0,l=l+Math.imul(te,be)|0,l=l+Math.imul(ee,Ye)|0,s=s+Math.imul(ee,be)|0,g=g+Math.imul(xe,Xe)|0,l=l+Math.imul(xe,we)|0,l=l+Math.imul(ne,Xe)|0,s=s+Math.imul(ne,we)|0;var Et=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(Et>>>26)|0,Et&=67108863,g=Math.imul(ze,We),l=Math.imul(ze,ge),l=l+Math.imul(fe,We)|0,s=Math.imul(fe,ge),g=g+Math.imul(Te,Ze)|0,l=l+Math.imul(Te,ye)|0,l=l+Math.imul(ae,Ze)|0,s=s+Math.imul(ae,ye)|0,g=g+Math.imul(_e,Ye)|0,l=l+Math.imul(_e,be)|0,l=l+Math.imul(K,Ye)|0,s=s+Math.imul(K,be)|0,g=g+Math.imul(te,Xe)|0,l=l+Math.imul(te,we)|0,l=l+Math.imul(ee,Xe)|0,s=s+Math.imul(ee,we)|0;var St=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(St>>>26)|0,St&=67108863,g=Math.imul(ze,Ze),l=Math.imul(ze,ye),l=l+Math.imul(fe,Ze)|0,s=Math.imul(fe,ye),g=g+Math.imul(Te,Ye)|0,l=l+Math.imul(Te,be)|0,l=l+Math.imul(ae,Ye)|0,s=s+Math.imul(ae,be)|0,g=g+Math.imul(_e,Xe)|0,l=l+Math.imul(_e,we)|0,l=l+Math.imul(K,Xe)|0,s=s+Math.imul(K,we)|0;var At=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(At>>>26)|0,At&=67108863,g=Math.imul(ze,Ye),l=Math.imul(ze,be),l=l+Math.imul(fe,Ye)|0,s=Math.imul(fe,be),g=g+Math.imul(Te,Xe)|0,l=l+Math.imul(Te,we)|0,l=l+Math.imul(ae,Xe)|0,s=s+Math.imul(ae,we)|0;var Tt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,g=Math.imul(ze,Xe),l=Math.imul(ze,we),l=l+Math.imul(fe,Xe)|0,s=Math.imul(fe,we);var Rt=(b+g|0)+((l&8191)<<13)|0;return b=(s+(l>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p[0]=Re,p[1]=tt,p[2]=rt,p[3]=ut,p[4]=lt,p[5]=ht,p[6]=ct,p[7]=dt,p[8]=yt,p[9]=bt,p[10]=wt,p[11]=Mt,p[12]=xt,p[13]=_t,p[14]=Et,p[15]=St,p[16]=At,p[17]=Tt,p[18]=Rt,b!==0&&(p[19]=b,f.length++),f};Math.imul||(A=S);function T($,h,i){i.negative=h.negative^$.negative,i.length=$.length+h.length;for(var f=0,u=0,c=0;c>>26)|0,u+=p>>>26,p&=67108863}i.words[c]=b,f=p,p=u}return f!==0?i.words[c]=f:i.length--,i.strip()}function I($,h,i){var f=new O;return f.mulp($,h,i)}a.prototype.mulTo=function(h,i){var f,u=this.length+h.length;return this.length===10&&h.length===10?f=A(this,h,i):u<63?f=S(this,h,i):u<1024?f=T(this,h,i):f=I(this,h,i),f};function O($,h){this.x=$,this.y=h}O.prototype.makeRBT=function(h){for(var i=new Array(h),f=a.prototype._countBits(h)-1,u=0;u>=1;return u},O.prototype.permute=function(h,i,f,u,c,p){for(var b=0;b>>1)c++;return 1<>>13,f[2*p+1]=c&8191,c=c>>>13;for(p=2*i;p>=26,i+=u/67108864|0,i+=c>>>26,this.words[f]=c&67108863}return i!==0&&(this.words[f]=i,this.length++),this},a.prototype.muln=function(h){return this.clone().imuln(h)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(h){var i=E(h);if(i.length===0)return new a(1);for(var f=this,u=0;u=0);var i=h%26,f=(h-i)/26,u=67108863>>>26-i<<26-i,c;if(i!==0){var p=0;for(c=0;c>>26-i}p&&(this.words[c]=p,this.length++)}if(f!==0){for(c=this.length-1;c>=0;c--)this.words[c+f]=this.words[c];for(c=0;c=0);var u;i?u=(i-i%26)/26:u=0;var c=h%26,p=Math.min((h-c)/26,this.length),b=67108863^67108863>>>c<p)for(this.length-=p,l=0;l=0&&(s!==0||l>=u);l--){var v=this.words[l]|0;this.words[l]=s<<26-c|v>>>c,s=v&b}return g&&s!==0&&(g.words[g.length++]=s),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(h,i,f){return n(this.negative===0),this.iushrn(h,i,f)},a.prototype.shln=function(h){return this.clone().ishln(h)},a.prototype.ushln=function(h){return this.clone().iushln(h)},a.prototype.shrn=function(h){return this.clone().ishrn(h)},a.prototype.ushrn=function(h){return this.clone().iushrn(h)},a.prototype.testn=function(h){n(typeof h=="number"&&h>=0);var i=h%26,f=(h-i)/26,u=1<=0);var i=h%26,f=(h-i)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=f)return this;if(i!==0&&f++,this.length=Math.min(f,this.length),i!==0){var u=67108863^67108863>>>i<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},a.prototype.isubn=function(h){if(n(typeof h=="number"),n(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i>26)-(g/67108864|0),this.words[c+f]=p&67108863}for(;c>26,this.words[c+f]=p&67108863;if(b===0)return this.strip();for(n(b===-1),b=0,c=0;c>26,this.words[c]=p&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(h,i){var f=this.length-h.length,u=this.clone(),c=h,p=c.words[c.length-1]|0,b=this._countBits(p);f=26-b,f!==0&&(c=c.ushln(f),u.iushln(f),p=c.words[c.length-1]|0);var g=u.length-c.length,l;if(i!=="mod"){l=new a(null),l.length=g+1,l.words=new Array(l.length);for(var s=0;s=0;x--){var C=(u.words[c.length+x]|0)*67108864+(u.words[c.length+x-1]|0);for(C=Math.min(C/p|0,67108863),u._ishlnsubmul(c,C,x);u.negative!==0;)C--,u.negative=0,u._ishlnsubmul(c,1,x),u.isZero()||(u.negative^=1);l&&(l.words[x]=C)}return l&&l.strip(),u.strip(),i!=="div"&&f!==0&&u.iushrn(f),{div:l||null,mod:u}},a.prototype.divmod=function(h,i,f){if(n(!h.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var u,c,p;return this.negative!==0&&h.negative===0?(p=this.neg().divmod(h,i),i!=="mod"&&(u=p.div.neg()),i!=="div"&&(c=p.mod.neg(),f&&c.negative!==0&&c.iadd(h)),{div:u,mod:c}):this.negative===0&&h.negative!==0?(p=this.divmod(h.neg(),i),i!=="mod"&&(u=p.div.neg()),{div:u,mod:p.mod}):(this.negative&h.negative)!==0?(p=this.neg().divmod(h.neg(),i),i!=="div"&&(c=p.mod.neg(),f&&c.negative!==0&&c.isub(h)),{div:p.div,mod:c}):h.length>this.length||this.cmp(h)<0?{div:new a(0),mod:this}:h.length===1?i==="div"?{div:this.divn(h.words[0]),mod:null}:i==="mod"?{div:null,mod:new a(this.modn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new a(this.modn(h.words[0]))}:this._wordDiv(h,i)},a.prototype.div=function(h){return this.divmod(h,"div",!1).div},a.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},a.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},a.prototype.divRound=function(h){var i=this.divmod(h);if(i.mod.isZero())return i.div;var f=i.div.negative!==0?i.mod.isub(h):i.mod,u=h.ushrn(1),c=h.andln(1),p=f.cmp(u);return p<0||c===1&&p===0?i.div:i.div.negative!==0?i.div.isubn(1):i.div.iaddn(1)},a.prototype.modn=function(h){n(h<=67108863);for(var i=(1<<26)%h,f=0,u=this.length-1;u>=0;u--)f=(i*f+(this.words[u]|0))%h;return f},a.prototype.idivn=function(h){n(h<=67108863);for(var i=0,f=this.length-1;f>=0;f--){var u=(this.words[f]|0)+i*67108864;this.words[f]=u/h|0,i=u%h}return this.strip()},a.prototype.divn=function(h){return this.clone().idivn(h)},a.prototype.egcd=function(h){n(h.negative===0),n(!h.isZero());var i=this,f=h.clone();i.negative!==0?i=i.umod(h):i=i.clone();for(var u=new a(1),c=new a(0),p=new a(0),b=new a(1),g=0;i.isEven()&&f.isEven();)i.iushrn(1),f.iushrn(1),++g;for(var l=f.clone(),s=i.clone();!i.isZero();){for(var v=0,x=1;(i.words[0]&x)===0&&v<26;++v,x<<=1);if(v>0)for(i.iushrn(v);v-- >0;)(u.isOdd()||c.isOdd())&&(u.iadd(l),c.isub(s)),u.iushrn(1),c.iushrn(1);for(var C=0,B=1;(f.words[0]&B)===0&&C<26;++C,B<<=1);if(C>0)for(f.iushrn(C);C-- >0;)(p.isOdd()||b.isOdd())&&(p.iadd(l),b.isub(s)),p.iushrn(1),b.iushrn(1);i.cmp(f)>=0?(i.isub(f),u.isub(p),c.isub(b)):(f.isub(i),p.isub(u),b.isub(c))}return{a:p,b,gcd:f.iushln(g)}},a.prototype._invmp=function(h){n(h.negative===0),n(!h.isZero());var i=this,f=h.clone();i.negative!==0?i=i.umod(h):i=i.clone();for(var u=new a(1),c=new a(0),p=f.clone();i.cmpn(1)>0&&f.cmpn(1)>0;){for(var b=0,g=1;(i.words[0]&g)===0&&b<26;++b,g<<=1);if(b>0)for(i.iushrn(b);b-- >0;)u.isOdd()&&u.iadd(p),u.iushrn(1);for(var l=0,s=1;(f.words[0]&s)===0&&l<26;++l,s<<=1);if(l>0)for(f.iushrn(l);l-- >0;)c.isOdd()&&c.iadd(p),c.iushrn(1);i.cmp(f)>=0?(i.isub(f),u.isub(c)):(f.isub(i),c.isub(u))}var v;return i.cmpn(1)===0?v=u:v=c,v.cmpn(0)<0&&v.iadd(h),v},a.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var i=this.clone(),f=h.clone();i.negative=0,f.negative=0;for(var u=0;i.isEven()&&f.isEven();u++)i.iushrn(1),f.iushrn(1);do{for(;i.isEven();)i.iushrn(1);for(;f.isEven();)f.iushrn(1);var c=i.cmp(f);if(c<0){var p=i;i=f,f=p}else if(c===0||f.cmpn(1)===0)break;i.isub(f)}while(!0);return f.iushln(u)},a.prototype.invm=function(h){return this.egcd(h).a.umod(h)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(h){return this.words[0]&h},a.prototype.bincn=function(h){n(typeof h=="number");var i=h%26,f=(h-i)/26,u=1<>>26,b&=67108863,this.words[p]=b}return c!==0&&(this.words[p]=c,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(h){var i=h<0;if(this.negative!==0&&!i)return-1;if(this.negative===0&&i)return 1;this.strip();var f;if(this.length>1)f=1;else{i&&(h=-h),n(h<=67108863,"Number is too big");var u=this.words[0]|0;f=u===h?0:uh.length)return 1;if(this.length=0;f--){var u=this.words[f]|0,c=h.words[f]|0;if(u!==c){uc&&(i=1);break}}return i},a.prototype.gtn=function(h){return this.cmpn(h)===1},a.prototype.gt=function(h){return this.cmp(h)===1},a.prototype.gten=function(h){return this.cmpn(h)>=0},a.prototype.gte=function(h){return this.cmp(h)>=0},a.prototype.ltn=function(h){return this.cmpn(h)===-1},a.prototype.lt=function(h){return this.cmp(h)===-1},a.prototype.lten=function(h){return this.cmpn(h)<=0},a.prototype.lte=function(h){return this.cmp(h)<=0},a.prototype.eqn=function(h){return this.cmpn(h)===0},a.prototype.eq=function(h){return this.cmp(h)===0},a.red=function(h){return new Z(h)},a.prototype.toRed=function(h){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(h){return this.red=h,this},a.prototype.forceRed=function(h){return n(!this.red,"Already a number in reduction context"),this._forceRed(h)},a.prototype.redAdd=function(h){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},a.prototype.redIAdd=function(h){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},a.prototype.redSub=function(h){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},a.prototype.redISub=function(h){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},a.prototype.redShl=function(h){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},a.prototype.redMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},a.prototype.redIMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},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(h){return n(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var P={k256:null,p224:null,p192:null,p25519:null};function L($,h){this.name=$,this.p=new a(h,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var h=new a(null);return h.words=new Array(Math.ceil(this.n/13)),h},L.prototype.ireduce=function(h){var i=h,f;do this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),f=i.bitLength();while(f>this.n);var u=f0?i.isub(this.p):i.strip(),i},L.prototype.split=function(h,i){h.iushrn(this.n,0,i)},L.prototype.imulK=function(h){return h.imul(this.k)};function N(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(N,L),N.prototype.split=function(h,i){for(var f=4194303,u=Math.min(h.length,9),c=0;c>>22,p=b}p>>>=22,h.words[c-10]=p,p===0&&h.length>10?h.length-=10:h.length-=9},N.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var i=0,f=0;f>>=26,h.words[f]=c,i=u}return i!==0&&(h.words[h.length++]=i),h},a._prime=function(h){if(P[h])return P[h];var i;if(h==="k256")i=new N;else if(h==="p224")i=new q;else if(h==="p192")i=new X;else if(h==="p25519")i=new J;else throw new Error("Unknown prime "+h);return P[h]=i,i};function Z($){if(typeof $=="string"){var h=a._prime($);this.m=h.p,this.prime=h}else n($.gtn(1),"modulus must be greater than 1"),this.m=$,this.prime=null}Z.prototype._verify1=function(h){n(h.negative===0,"red works only with positives"),n(h.red,"red works only with red numbers")},Z.prototype._verify2=function(h,i){n((h.negative|i.negative)===0,"red works only with positives"),n(h.red&&h.red===i.red,"red works only with red numbers")},Z.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},Z.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},Z.prototype.add=function(h,i){this._verify2(h,i);var f=h.add(i);return f.cmp(this.m)>=0&&f.isub(this.m),f._forceRed(this)},Z.prototype.iadd=function(h,i){this._verify2(h,i);var f=h.iadd(i);return f.cmp(this.m)>=0&&f.isub(this.m),f},Z.prototype.sub=function(h,i){this._verify2(h,i);var f=h.sub(i);return f.cmpn(0)<0&&f.iadd(this.m),f._forceRed(this)},Z.prototype.isub=function(h,i){this._verify2(h,i);var f=h.isub(i);return f.cmpn(0)<0&&f.iadd(this.m),f},Z.prototype.shl=function(h,i){return this._verify1(h),this.imod(h.ushln(i))},Z.prototype.imul=function(h,i){return this._verify2(h,i),this.imod(h.imul(i))},Z.prototype.mul=function(h,i){return this._verify2(h,i),this.imod(h.mul(i))},Z.prototype.isqr=function(h){return this.imul(h,h.clone())},Z.prototype.sqr=function(h){return this.mul(h,h)},Z.prototype.sqrt=function(h){if(h.isZero())return h.clone();var i=this.m.andln(3);if(n(i%2===1),i===3){var f=this.m.add(new a(1)).iushrn(2);return this.pow(h,f)}for(var u=this.m.subn(1),c=0;!u.isZero()&&u.andln(1)===0;)c++,u.iushrn(1);n(!u.isZero());var p=new a(1).toRed(this),b=p.redNeg(),g=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);this.pow(l,g).cmp(b)!==0;)l.redIAdd(b);for(var s=this.pow(l,u),v=this.pow(h,u.addn(1).iushrn(1)),x=this.pow(h,u),C=c;x.cmp(p)!==0;){for(var B=x,k=0;B.cmp(p)!==0;k++)B=B.redSqr();n(k=0;c--){for(var s=i.words[c],v=l-1;v>=0;v--){var x=s>>v&1;if(p!==u[0]&&(p=this.sqr(p)),x===0&&b===0){g=0;continue}b<<=1,b|=x,g++,!(g!==f&&(c!==0||v!==0))&&(p=this.mul(p,u[b]),g=0,b=0)}l=26}return p},Z.prototype.convertTo=function(h){var i=h.umod(this.m);return i===h?i.clone():i},Z.prototype.convertFrom=function(h){var i=h.clone();return i.red=null,i},a.mont=function(h){return new W(h)};function W($){Z.call(this,$),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)}o(W,Z),W.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},W.prototype.convertFrom=function(h){var i=this.imod(h.mul(this.rinv));return i.red=null,i},W.prototype.imul=function(h,i){if(h.isZero()||i.isZero())return h.words[0]=0,h.length=1,h;var f=h.imul(i),u=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=f.isub(u).iushrn(this.shift),p=c;return c.cmp(this.m)>=0?p=c.isub(this.m):c.cmpn(0)<0&&(p=c.iadd(this.m)),p._forceRed(this)},W.prototype.mul=function(h,i){if(h.isZero()||i.isZero())return new a(0)._forceRed(this);var f=h.mul(i),u=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=f.isub(u).iushrn(this.shift),p=c;return c.cmp(this.m)>=0?p=c.isub(this.m):c.cmpn(0)<0&&(p=c.iadd(this.m)),p._forceRed(this)},W.prototype.invm=function(h){var i=this.imod(h._invmp(this.m).mul(this.r2));return i._forceRed(this)}})(e,Qe)})(Y9);var X9={exports:{}};(function(e){(function(t,r){function n($,h){if(!$)throw new Error(h||"Assertion failed")}function o($,h){$.super_=h;var i=function(){};i.prototype=h.prototype,$.prototype=new i,$.prototype.constructor=$}function a($,h,i){if(a.isBN($))return $;this.negative=0,this.words=null,this.length=0,this.red=null,$!==null&&((h==="le"||h==="be")&&(i=h,h=10),this._init($||0,h||10,i||"be"))}typeof t=="object"?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var d;try{d=Z9("buffer").Buffer}catch{}a.isBN=function(h){return h instanceof a?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===a.wordSize&&Array.isArray(h.words)},a.max=function(h,i){return h.cmp(i)>0?h:i},a.min=function(h,i){return h.cmp(i)<0?h:i},a.prototype._init=function(h,i,f){if(typeof h=="number")return this._initNumber(h,i,f);if(typeof h=="object")return this._initArray(h,i,f);i==="hex"&&(i=16),n(i===(i|0)&&i>=2&&i<=36),h=h.toString().replace(/\s+/g,"");var u=0;h[0]==="-"&&u++,i===16?this._parseHex(h,u):this._parseBase(h,i,u),h[0]==="-"&&(this.negative=1),this.strip(),f==="le"&&this._initArray(this.toArray(),i,f)},a.prototype._initNumber=function(h,i,f){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(n(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),f==="le"&&this._initArray(this.toArray(),i,f)},a.prototype._initArray=function(h,i,f){if(n(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var u=0;u=0;u-=3)p=h[u]|h[u-1]<<8|h[u-2]<<16,this.words[c]|=p<>>26-b&67108863,b+=24,b>=26&&(b-=26,c++);else if(f==="le")for(u=0,c=0;u>>26-b&67108863,b+=24,b>=26&&(b-=26,c++);return this.strip()};function m($,h,i){for(var f=0,u=Math.min($.length,i),c=h;c=49&&p<=54?f|=p-49+10:p>=17&&p<=22?f|=p-17+10:f|=p&15}return f}a.prototype._parseHex=function(h,i){this.length=Math.ceil((h.length-i)/6),this.words=new Array(this.length);for(var f=0;f=i;f-=6)c=m(h,f,f+6),this.words[u]|=c<>>26-p&4194303,p+=24,p>=26&&(p-=26,u++);f+6!==i&&(c=m(h,i,f+6),this.words[u]|=c<>>26-p&4194303),this.strip()};function y($,h,i,f){for(var u=0,c=Math.min($.length,i),p=h;p=49?u+=b-49+10:b>=17?u+=b-17+10:u+=b}return u}a.prototype._parseBase=function(h,i,f){this.words=[0],this.length=1;for(var u=0,c=1;c<=67108863;c*=i)u++;u--,c=c/i|0;for(var p=h.length-f,b=p%u,g=Math.min(p,p-b)+f,l=0,s=f;s1&&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},a.prototype.inspect=function(){return(this.red?""};var w=["","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"],M=[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];a.prototype.toString=function(h,i){h=h||10,i=i|0||1;var f;if(h===16||h==="hex"){f="";for(var u=0,c=0,p=0;p>>24-u&16777215,c!==0||p!==this.length-1?f=w[6-g.length]+g+f:f=g+f,u+=2,u>=26&&(u-=26,p--)}for(c!==0&&(f=c.toString(16)+f);f.length%i!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}if(h===(h|0)&&h>=2&&h<=36){var l=M[h],s=_[h];f="";var v=this.clone();for(v.negative=0;!v.isZero();){var x=v.modn(s).toString(h);v=v.idivn(s),v.isZero()?f=x+f:f=w[l-x.length]+x+f}for(this.isZero()&&(f="0"+f);f.length%i!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(h,i){return n(typeof d<"u"),this.toArrayLike(d,h,i)},a.prototype.toArray=function(h,i){return this.toArrayLike(Array,h,i)},a.prototype.toArrayLike=function(h,i,f){var u=this.byteLength(),c=f||Math.max(1,u);n(u<=c,"byte array longer than desired length"),n(c>0,"Requested array length <= 0"),this.strip();var p=i==="le",b=new h(c),g,l,s=this.clone();if(p){for(l=0;!s.isZero();l++)g=s.andln(255),s.iushrn(8),b[l]=g;for(;l=4096&&(f+=13,i>>>=13),i>=64&&(f+=7,i>>>=7),i>=8&&(f+=4,i>>>=4),i>=2&&(f+=2,i>>>=2),f+i},a.prototype._zeroBits=function(h){if(h===0)return 26;var i=h,f=0;return(i&8191)===0&&(f+=13,i>>>=13),(i&127)===0&&(f+=7,i>>>=7),(i&15)===0&&(f+=4,i>>>=4),(i&3)===0&&(f+=2,i>>>=2),(i&1)===0&&f++,f},a.prototype.bitLength=function(){var h=this.words[this.length-1],i=this._countBits(h);return(this.length-1)*26+i};function E($){for(var h=new Array($.bitLength()),i=0;i>>u}return h}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,i=0;ih.length?this.clone().ior(h):h.clone().ior(this)},a.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},a.prototype.iuand=function(h){var i;this.length>h.length?i=h:i=this;for(var f=0;fh.length?this.clone().iand(h):h.clone().iand(this)},a.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},a.prototype.iuxor=function(h){var i,f;this.length>h.length?(i=this,f=h):(i=h,f=this);for(var u=0;uh.length?this.clone().ixor(h):h.clone().ixor(this)},a.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},a.prototype.inotn=function(h){n(typeof h=="number"&&h>=0);var i=Math.ceil(h/26)|0,f=h%26;this._expand(i),f>0&&i--;for(var u=0;u0&&(this.words[u]=~this.words[u]&67108863>>26-f),this.strip()},a.prototype.notn=function(h){return this.clone().inotn(h)},a.prototype.setn=function(h,i){n(typeof h=="number"&&h>=0);var f=h/26|0,u=h%26;return this._expand(f+1),i?this.words[f]=this.words[f]|1<h.length?(f=this,u=h):(f=h,u=this);for(var c=0,p=0;p>>26;for(;c!==0&&p>>26;if(this.length=f.length,c!==0)this.words[this.length]=c,this.length++;else if(f!==this)for(;ph.length?this.clone().iadd(h):h.clone().iadd(this)},a.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var i=this.iadd(h);return h.negative=1,i._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var f=this.cmp(h);if(f===0)return this.negative=0,this.length=1,this.words[0]=0,this;var u,c;f>0?(u=this,c=h):(u=h,c=this);for(var p=0,b=0;b>26,this.words[b]=i&67108863;for(;p!==0&&b>26,this.words[b]=i&67108863;if(p===0&&b>>26,v=g&67108863,x=Math.min(l,h.length-1),C=Math.max(0,l-$.length+1);C<=x;C++){var B=l-C|0;u=$.words[B]|0,c=h.words[C]|0,p=u*c+v,s+=p/67108864|0,v=p&67108863}i.words[l]=v|0,g=s|0}return g!==0?i.words[l]=g|0:i.length--,i.strip()}var A=function(h,i,f){var u=h.words,c=i.words,p=f.words,b=0,g,l,s,v=u[0]|0,x=v&8191,C=v>>>13,B=u[1]|0,k=B&8191,R=B>>>13,D=u[2]|0,z=D&8191,H=D>>>13,V=u[3]|0,U=V&8191,F=V>>>13,G=u[4]|0,ie=G&8191,Y=G>>>13,oe=u[5]|0,xe=oe&8191,ne=oe>>>13,Q=u[6]|0,te=Q&8191,ee=Q>>>13,se=u[7]|0,_e=se&8191,K=se>>>13,re=u[8]|0,Te=re&8191,ae=re>>>13,Me=u[9]|0,ze=Me&8191,fe=Me>>>13,Se=c[0]|0,He=Se&8191,ue=Se>>>13,Ae=c[1]|0,Ue=Ae&8191,he=Ae>>>13,Ce=c[2]|0,je=Ce&8191,de=Ce>>>13,Oe=c[3]|0,Ve=Oe&8191,pe=Oe>>>13,Pe=c[4]|0,Ke=Pe&8191,ve=Pe>>>13,Be=c[5]|0,Ge=Be&8191,me=Be>>>13,Ie=c[6]|0,We=Ie&8191,ge=Ie>>>13,$e=c[7]|0,Ze=$e&8191,ye=$e>>>13,Le=c[8]|0,Ye=Le&8191,be=Le>>>13,De=c[9]|0,Xe=De&8191,we=De>>>13;f.negative=h.negative^i.negative,f.length=19,g=Math.imul(x,He),l=Math.imul(x,ue),l=l+Math.imul(C,He)|0,s=Math.imul(C,ue);var Re=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(Re>>>26)|0,Re&=67108863,g=Math.imul(k,He),l=Math.imul(k,ue),l=l+Math.imul(R,He)|0,s=Math.imul(R,ue),g=g+Math.imul(x,Ue)|0,l=l+Math.imul(x,he)|0,l=l+Math.imul(C,Ue)|0,s=s+Math.imul(C,he)|0;var tt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(tt>>>26)|0,tt&=67108863,g=Math.imul(z,He),l=Math.imul(z,ue),l=l+Math.imul(H,He)|0,s=Math.imul(H,ue),g=g+Math.imul(k,Ue)|0,l=l+Math.imul(k,he)|0,l=l+Math.imul(R,Ue)|0,s=s+Math.imul(R,he)|0,g=g+Math.imul(x,je)|0,l=l+Math.imul(x,de)|0,l=l+Math.imul(C,je)|0,s=s+Math.imul(C,de)|0;var rt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(rt>>>26)|0,rt&=67108863,g=Math.imul(U,He),l=Math.imul(U,ue),l=l+Math.imul(F,He)|0,s=Math.imul(F,ue),g=g+Math.imul(z,Ue)|0,l=l+Math.imul(z,he)|0,l=l+Math.imul(H,Ue)|0,s=s+Math.imul(H,he)|0,g=g+Math.imul(k,je)|0,l=l+Math.imul(k,de)|0,l=l+Math.imul(R,je)|0,s=s+Math.imul(R,de)|0,g=g+Math.imul(x,Ve)|0,l=l+Math.imul(x,pe)|0,l=l+Math.imul(C,Ve)|0,s=s+Math.imul(C,pe)|0;var ut=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(ut>>>26)|0,ut&=67108863,g=Math.imul(ie,He),l=Math.imul(ie,ue),l=l+Math.imul(Y,He)|0,s=Math.imul(Y,ue),g=g+Math.imul(U,Ue)|0,l=l+Math.imul(U,he)|0,l=l+Math.imul(F,Ue)|0,s=s+Math.imul(F,he)|0,g=g+Math.imul(z,je)|0,l=l+Math.imul(z,de)|0,l=l+Math.imul(H,je)|0,s=s+Math.imul(H,de)|0,g=g+Math.imul(k,Ve)|0,l=l+Math.imul(k,pe)|0,l=l+Math.imul(R,Ve)|0,s=s+Math.imul(R,pe)|0,g=g+Math.imul(x,Ke)|0,l=l+Math.imul(x,ve)|0,l=l+Math.imul(C,Ke)|0,s=s+Math.imul(C,ve)|0;var lt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(lt>>>26)|0,lt&=67108863,g=Math.imul(xe,He),l=Math.imul(xe,ue),l=l+Math.imul(ne,He)|0,s=Math.imul(ne,ue),g=g+Math.imul(ie,Ue)|0,l=l+Math.imul(ie,he)|0,l=l+Math.imul(Y,Ue)|0,s=s+Math.imul(Y,he)|0,g=g+Math.imul(U,je)|0,l=l+Math.imul(U,de)|0,l=l+Math.imul(F,je)|0,s=s+Math.imul(F,de)|0,g=g+Math.imul(z,Ve)|0,l=l+Math.imul(z,pe)|0,l=l+Math.imul(H,Ve)|0,s=s+Math.imul(H,pe)|0,g=g+Math.imul(k,Ke)|0,l=l+Math.imul(k,ve)|0,l=l+Math.imul(R,Ke)|0,s=s+Math.imul(R,ve)|0,g=g+Math.imul(x,Ge)|0,l=l+Math.imul(x,me)|0,l=l+Math.imul(C,Ge)|0,s=s+Math.imul(C,me)|0;var ht=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(ht>>>26)|0,ht&=67108863,g=Math.imul(te,He),l=Math.imul(te,ue),l=l+Math.imul(ee,He)|0,s=Math.imul(ee,ue),g=g+Math.imul(xe,Ue)|0,l=l+Math.imul(xe,he)|0,l=l+Math.imul(ne,Ue)|0,s=s+Math.imul(ne,he)|0,g=g+Math.imul(ie,je)|0,l=l+Math.imul(ie,de)|0,l=l+Math.imul(Y,je)|0,s=s+Math.imul(Y,de)|0,g=g+Math.imul(U,Ve)|0,l=l+Math.imul(U,pe)|0,l=l+Math.imul(F,Ve)|0,s=s+Math.imul(F,pe)|0,g=g+Math.imul(z,Ke)|0,l=l+Math.imul(z,ve)|0,l=l+Math.imul(H,Ke)|0,s=s+Math.imul(H,ve)|0,g=g+Math.imul(k,Ge)|0,l=l+Math.imul(k,me)|0,l=l+Math.imul(R,Ge)|0,s=s+Math.imul(R,me)|0,g=g+Math.imul(x,We)|0,l=l+Math.imul(x,ge)|0,l=l+Math.imul(C,We)|0,s=s+Math.imul(C,ge)|0;var ct=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(ct>>>26)|0,ct&=67108863,g=Math.imul(_e,He),l=Math.imul(_e,ue),l=l+Math.imul(K,He)|0,s=Math.imul(K,ue),g=g+Math.imul(te,Ue)|0,l=l+Math.imul(te,he)|0,l=l+Math.imul(ee,Ue)|0,s=s+Math.imul(ee,he)|0,g=g+Math.imul(xe,je)|0,l=l+Math.imul(xe,de)|0,l=l+Math.imul(ne,je)|0,s=s+Math.imul(ne,de)|0,g=g+Math.imul(ie,Ve)|0,l=l+Math.imul(ie,pe)|0,l=l+Math.imul(Y,Ve)|0,s=s+Math.imul(Y,pe)|0,g=g+Math.imul(U,Ke)|0,l=l+Math.imul(U,ve)|0,l=l+Math.imul(F,Ke)|0,s=s+Math.imul(F,ve)|0,g=g+Math.imul(z,Ge)|0,l=l+Math.imul(z,me)|0,l=l+Math.imul(H,Ge)|0,s=s+Math.imul(H,me)|0,g=g+Math.imul(k,We)|0,l=l+Math.imul(k,ge)|0,l=l+Math.imul(R,We)|0,s=s+Math.imul(R,ge)|0,g=g+Math.imul(x,Ze)|0,l=l+Math.imul(x,ye)|0,l=l+Math.imul(C,Ze)|0,s=s+Math.imul(C,ye)|0;var dt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(dt>>>26)|0,dt&=67108863,g=Math.imul(Te,He),l=Math.imul(Te,ue),l=l+Math.imul(ae,He)|0,s=Math.imul(ae,ue),g=g+Math.imul(_e,Ue)|0,l=l+Math.imul(_e,he)|0,l=l+Math.imul(K,Ue)|0,s=s+Math.imul(K,he)|0,g=g+Math.imul(te,je)|0,l=l+Math.imul(te,de)|0,l=l+Math.imul(ee,je)|0,s=s+Math.imul(ee,de)|0,g=g+Math.imul(xe,Ve)|0,l=l+Math.imul(xe,pe)|0,l=l+Math.imul(ne,Ve)|0,s=s+Math.imul(ne,pe)|0,g=g+Math.imul(ie,Ke)|0,l=l+Math.imul(ie,ve)|0,l=l+Math.imul(Y,Ke)|0,s=s+Math.imul(Y,ve)|0,g=g+Math.imul(U,Ge)|0,l=l+Math.imul(U,me)|0,l=l+Math.imul(F,Ge)|0,s=s+Math.imul(F,me)|0,g=g+Math.imul(z,We)|0,l=l+Math.imul(z,ge)|0,l=l+Math.imul(H,We)|0,s=s+Math.imul(H,ge)|0,g=g+Math.imul(k,Ze)|0,l=l+Math.imul(k,ye)|0,l=l+Math.imul(R,Ze)|0,s=s+Math.imul(R,ye)|0,g=g+Math.imul(x,Ye)|0,l=l+Math.imul(x,be)|0,l=l+Math.imul(C,Ye)|0,s=s+Math.imul(C,be)|0;var yt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(yt>>>26)|0,yt&=67108863,g=Math.imul(ze,He),l=Math.imul(ze,ue),l=l+Math.imul(fe,He)|0,s=Math.imul(fe,ue),g=g+Math.imul(Te,Ue)|0,l=l+Math.imul(Te,he)|0,l=l+Math.imul(ae,Ue)|0,s=s+Math.imul(ae,he)|0,g=g+Math.imul(_e,je)|0,l=l+Math.imul(_e,de)|0,l=l+Math.imul(K,je)|0,s=s+Math.imul(K,de)|0,g=g+Math.imul(te,Ve)|0,l=l+Math.imul(te,pe)|0,l=l+Math.imul(ee,Ve)|0,s=s+Math.imul(ee,pe)|0,g=g+Math.imul(xe,Ke)|0,l=l+Math.imul(xe,ve)|0,l=l+Math.imul(ne,Ke)|0,s=s+Math.imul(ne,ve)|0,g=g+Math.imul(ie,Ge)|0,l=l+Math.imul(ie,me)|0,l=l+Math.imul(Y,Ge)|0,s=s+Math.imul(Y,me)|0,g=g+Math.imul(U,We)|0,l=l+Math.imul(U,ge)|0,l=l+Math.imul(F,We)|0,s=s+Math.imul(F,ge)|0,g=g+Math.imul(z,Ze)|0,l=l+Math.imul(z,ye)|0,l=l+Math.imul(H,Ze)|0,s=s+Math.imul(H,ye)|0,g=g+Math.imul(k,Ye)|0,l=l+Math.imul(k,be)|0,l=l+Math.imul(R,Ye)|0,s=s+Math.imul(R,be)|0,g=g+Math.imul(x,Xe)|0,l=l+Math.imul(x,we)|0,l=l+Math.imul(C,Xe)|0,s=s+Math.imul(C,we)|0;var bt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(bt>>>26)|0,bt&=67108863,g=Math.imul(ze,Ue),l=Math.imul(ze,he),l=l+Math.imul(fe,Ue)|0,s=Math.imul(fe,he),g=g+Math.imul(Te,je)|0,l=l+Math.imul(Te,de)|0,l=l+Math.imul(ae,je)|0,s=s+Math.imul(ae,de)|0,g=g+Math.imul(_e,Ve)|0,l=l+Math.imul(_e,pe)|0,l=l+Math.imul(K,Ve)|0,s=s+Math.imul(K,pe)|0,g=g+Math.imul(te,Ke)|0,l=l+Math.imul(te,ve)|0,l=l+Math.imul(ee,Ke)|0,s=s+Math.imul(ee,ve)|0,g=g+Math.imul(xe,Ge)|0,l=l+Math.imul(xe,me)|0,l=l+Math.imul(ne,Ge)|0,s=s+Math.imul(ne,me)|0,g=g+Math.imul(ie,We)|0,l=l+Math.imul(ie,ge)|0,l=l+Math.imul(Y,We)|0,s=s+Math.imul(Y,ge)|0,g=g+Math.imul(U,Ze)|0,l=l+Math.imul(U,ye)|0,l=l+Math.imul(F,Ze)|0,s=s+Math.imul(F,ye)|0,g=g+Math.imul(z,Ye)|0,l=l+Math.imul(z,be)|0,l=l+Math.imul(H,Ye)|0,s=s+Math.imul(H,be)|0,g=g+Math.imul(k,Xe)|0,l=l+Math.imul(k,we)|0,l=l+Math.imul(R,Xe)|0,s=s+Math.imul(R,we)|0;var wt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(wt>>>26)|0,wt&=67108863,g=Math.imul(ze,je),l=Math.imul(ze,de),l=l+Math.imul(fe,je)|0,s=Math.imul(fe,de),g=g+Math.imul(Te,Ve)|0,l=l+Math.imul(Te,pe)|0,l=l+Math.imul(ae,Ve)|0,s=s+Math.imul(ae,pe)|0,g=g+Math.imul(_e,Ke)|0,l=l+Math.imul(_e,ve)|0,l=l+Math.imul(K,Ke)|0,s=s+Math.imul(K,ve)|0,g=g+Math.imul(te,Ge)|0,l=l+Math.imul(te,me)|0,l=l+Math.imul(ee,Ge)|0,s=s+Math.imul(ee,me)|0,g=g+Math.imul(xe,We)|0,l=l+Math.imul(xe,ge)|0,l=l+Math.imul(ne,We)|0,s=s+Math.imul(ne,ge)|0,g=g+Math.imul(ie,Ze)|0,l=l+Math.imul(ie,ye)|0,l=l+Math.imul(Y,Ze)|0,s=s+Math.imul(Y,ye)|0,g=g+Math.imul(U,Ye)|0,l=l+Math.imul(U,be)|0,l=l+Math.imul(F,Ye)|0,s=s+Math.imul(F,be)|0,g=g+Math.imul(z,Xe)|0,l=l+Math.imul(z,we)|0,l=l+Math.imul(H,Xe)|0,s=s+Math.imul(H,we)|0;var Mt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,g=Math.imul(ze,Ve),l=Math.imul(ze,pe),l=l+Math.imul(fe,Ve)|0,s=Math.imul(fe,pe),g=g+Math.imul(Te,Ke)|0,l=l+Math.imul(Te,ve)|0,l=l+Math.imul(ae,Ke)|0,s=s+Math.imul(ae,ve)|0,g=g+Math.imul(_e,Ge)|0,l=l+Math.imul(_e,me)|0,l=l+Math.imul(K,Ge)|0,s=s+Math.imul(K,me)|0,g=g+Math.imul(te,We)|0,l=l+Math.imul(te,ge)|0,l=l+Math.imul(ee,We)|0,s=s+Math.imul(ee,ge)|0,g=g+Math.imul(xe,Ze)|0,l=l+Math.imul(xe,ye)|0,l=l+Math.imul(ne,Ze)|0,s=s+Math.imul(ne,ye)|0,g=g+Math.imul(ie,Ye)|0,l=l+Math.imul(ie,be)|0,l=l+Math.imul(Y,Ye)|0,s=s+Math.imul(Y,be)|0,g=g+Math.imul(U,Xe)|0,l=l+Math.imul(U,we)|0,l=l+Math.imul(F,Xe)|0,s=s+Math.imul(F,we)|0;var xt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(xt>>>26)|0,xt&=67108863,g=Math.imul(ze,Ke),l=Math.imul(ze,ve),l=l+Math.imul(fe,Ke)|0,s=Math.imul(fe,ve),g=g+Math.imul(Te,Ge)|0,l=l+Math.imul(Te,me)|0,l=l+Math.imul(ae,Ge)|0,s=s+Math.imul(ae,me)|0,g=g+Math.imul(_e,We)|0,l=l+Math.imul(_e,ge)|0,l=l+Math.imul(K,We)|0,s=s+Math.imul(K,ge)|0,g=g+Math.imul(te,Ze)|0,l=l+Math.imul(te,ye)|0,l=l+Math.imul(ee,Ze)|0,s=s+Math.imul(ee,ye)|0,g=g+Math.imul(xe,Ye)|0,l=l+Math.imul(xe,be)|0,l=l+Math.imul(ne,Ye)|0,s=s+Math.imul(ne,be)|0,g=g+Math.imul(ie,Xe)|0,l=l+Math.imul(ie,we)|0,l=l+Math.imul(Y,Xe)|0,s=s+Math.imul(Y,we)|0;var _t=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(_t>>>26)|0,_t&=67108863,g=Math.imul(ze,Ge),l=Math.imul(ze,me),l=l+Math.imul(fe,Ge)|0,s=Math.imul(fe,me),g=g+Math.imul(Te,We)|0,l=l+Math.imul(Te,ge)|0,l=l+Math.imul(ae,We)|0,s=s+Math.imul(ae,ge)|0,g=g+Math.imul(_e,Ze)|0,l=l+Math.imul(_e,ye)|0,l=l+Math.imul(K,Ze)|0,s=s+Math.imul(K,ye)|0,g=g+Math.imul(te,Ye)|0,l=l+Math.imul(te,be)|0,l=l+Math.imul(ee,Ye)|0,s=s+Math.imul(ee,be)|0,g=g+Math.imul(xe,Xe)|0,l=l+Math.imul(xe,we)|0,l=l+Math.imul(ne,Xe)|0,s=s+Math.imul(ne,we)|0;var Et=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(Et>>>26)|0,Et&=67108863,g=Math.imul(ze,We),l=Math.imul(ze,ge),l=l+Math.imul(fe,We)|0,s=Math.imul(fe,ge),g=g+Math.imul(Te,Ze)|0,l=l+Math.imul(Te,ye)|0,l=l+Math.imul(ae,Ze)|0,s=s+Math.imul(ae,ye)|0,g=g+Math.imul(_e,Ye)|0,l=l+Math.imul(_e,be)|0,l=l+Math.imul(K,Ye)|0,s=s+Math.imul(K,be)|0,g=g+Math.imul(te,Xe)|0,l=l+Math.imul(te,we)|0,l=l+Math.imul(ee,Xe)|0,s=s+Math.imul(ee,we)|0;var St=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(St>>>26)|0,St&=67108863,g=Math.imul(ze,Ze),l=Math.imul(ze,ye),l=l+Math.imul(fe,Ze)|0,s=Math.imul(fe,ye),g=g+Math.imul(Te,Ye)|0,l=l+Math.imul(Te,be)|0,l=l+Math.imul(ae,Ye)|0,s=s+Math.imul(ae,be)|0,g=g+Math.imul(_e,Xe)|0,l=l+Math.imul(_e,we)|0,l=l+Math.imul(K,Xe)|0,s=s+Math.imul(K,we)|0;var At=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(At>>>26)|0,At&=67108863,g=Math.imul(ze,Ye),l=Math.imul(ze,be),l=l+Math.imul(fe,Ye)|0,s=Math.imul(fe,be),g=g+Math.imul(Te,Xe)|0,l=l+Math.imul(Te,we)|0,l=l+Math.imul(ae,Xe)|0,s=s+Math.imul(ae,we)|0;var Tt=(b+g|0)+((l&8191)<<13)|0;b=(s+(l>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,g=Math.imul(ze,Xe),l=Math.imul(ze,we),l=l+Math.imul(fe,Xe)|0,s=Math.imul(fe,we);var Rt=(b+g|0)+((l&8191)<<13)|0;return b=(s+(l>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,p[0]=Re,p[1]=tt,p[2]=rt,p[3]=ut,p[4]=lt,p[5]=ht,p[6]=ct,p[7]=dt,p[8]=yt,p[9]=bt,p[10]=wt,p[11]=Mt,p[12]=xt,p[13]=_t,p[14]=Et,p[15]=St,p[16]=At,p[17]=Tt,p[18]=Rt,b!==0&&(p[19]=b,f.length++),f};Math.imul||(A=S);function T($,h,i){i.negative=h.negative^$.negative,i.length=$.length+h.length;for(var f=0,u=0,c=0;c>>26)|0,u+=p>>>26,p&=67108863}i.words[c]=b,f=p,p=u}return f!==0?i.words[c]=f:i.length--,i.strip()}function I($,h,i){var f=new O;return f.mulp($,h,i)}a.prototype.mulTo=function(h,i){var f,u=this.length+h.length;return this.length===10&&h.length===10?f=A(this,h,i):u<63?f=S(this,h,i):u<1024?f=T(this,h,i):f=I(this,h,i),f};function O($,h){this.x=$,this.y=h}O.prototype.makeRBT=function(h){for(var i=new Array(h),f=a.prototype._countBits(h)-1,u=0;u>=1;return u},O.prototype.permute=function(h,i,f,u,c,p){for(var b=0;b>>1)c++;return 1<>>13,f[2*p+1]=c&8191,c=c>>>13;for(p=2*i;p>=26,i+=u/67108864|0,i+=c>>>26,this.words[f]=c&67108863}return i!==0&&(this.words[f]=i,this.length++),this},a.prototype.muln=function(h){return this.clone().imuln(h)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(h){var i=E(h);if(i.length===0)return new a(1);for(var f=this,u=0;u=0);var i=h%26,f=(h-i)/26,u=67108863>>>26-i<<26-i,c;if(i!==0){var p=0;for(c=0;c>>26-i}p&&(this.words[c]=p,this.length++)}if(f!==0){for(c=this.length-1;c>=0;c--)this.words[c+f]=this.words[c];for(c=0;c=0);var u;i?u=(i-i%26)/26:u=0;var c=h%26,p=Math.min((h-c)/26,this.length),b=67108863^67108863>>>c<p)for(this.length-=p,l=0;l=0&&(s!==0||l>=u);l--){var v=this.words[l]|0;this.words[l]=s<<26-c|v>>>c,s=v&b}return g&&s!==0&&(g.words[g.length++]=s),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(h,i,f){return n(this.negative===0),this.iushrn(h,i,f)},a.prototype.shln=function(h){return this.clone().ishln(h)},a.prototype.ushln=function(h){return this.clone().iushln(h)},a.prototype.shrn=function(h){return this.clone().ishrn(h)},a.prototype.ushrn=function(h){return this.clone().iushrn(h)},a.prototype.testn=function(h){n(typeof h=="number"&&h>=0);var i=h%26,f=(h-i)/26,u=1<=0);var i=h%26,f=(h-i)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=f)return this;if(i!==0&&f++,this.length=Math.min(f,this.length),i!==0){var u=67108863^67108863>>>i<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},a.prototype.isubn=function(h){if(n(typeof h=="number"),n(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i>26)-(g/67108864|0),this.words[c+f]=p&67108863}for(;c>26,this.words[c+f]=p&67108863;if(b===0)return this.strip();for(n(b===-1),b=0,c=0;c>26,this.words[c]=p&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(h,i){var f=this.length-h.length,u=this.clone(),c=h,p=c.words[c.length-1]|0,b=this._countBits(p);f=26-b,f!==0&&(c=c.ushln(f),u.iushln(f),p=c.words[c.length-1]|0);var g=u.length-c.length,l;if(i!=="mod"){l=new a(null),l.length=g+1,l.words=new Array(l.length);for(var s=0;s=0;x--){var C=(u.words[c.length+x]|0)*67108864+(u.words[c.length+x-1]|0);for(C=Math.min(C/p|0,67108863),u._ishlnsubmul(c,C,x);u.negative!==0;)C--,u.negative=0,u._ishlnsubmul(c,1,x),u.isZero()||(u.negative^=1);l&&(l.words[x]=C)}return l&&l.strip(),u.strip(),i!=="div"&&f!==0&&u.iushrn(f),{div:l||null,mod:u}},a.prototype.divmod=function(h,i,f){if(n(!h.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var u,c,p;return this.negative!==0&&h.negative===0?(p=this.neg().divmod(h,i),i!=="mod"&&(u=p.div.neg()),i!=="div"&&(c=p.mod.neg(),f&&c.negative!==0&&c.iadd(h)),{div:u,mod:c}):this.negative===0&&h.negative!==0?(p=this.divmod(h.neg(),i),i!=="mod"&&(u=p.div.neg()),{div:u,mod:p.mod}):(this.negative&h.negative)!==0?(p=this.neg().divmod(h.neg(),i),i!=="div"&&(c=p.mod.neg(),f&&c.negative!==0&&c.isub(h)),{div:p.div,mod:c}):h.length>this.length||this.cmp(h)<0?{div:new a(0),mod:this}:h.length===1?i==="div"?{div:this.divn(h.words[0]),mod:null}:i==="mod"?{div:null,mod:new a(this.modn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new a(this.modn(h.words[0]))}:this._wordDiv(h,i)},a.prototype.div=function(h){return this.divmod(h,"div",!1).div},a.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},a.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},a.prototype.divRound=function(h){var i=this.divmod(h);if(i.mod.isZero())return i.div;var f=i.div.negative!==0?i.mod.isub(h):i.mod,u=h.ushrn(1),c=h.andln(1),p=f.cmp(u);return p<0||c===1&&p===0?i.div:i.div.negative!==0?i.div.isubn(1):i.div.iaddn(1)},a.prototype.modn=function(h){n(h<=67108863);for(var i=(1<<26)%h,f=0,u=this.length-1;u>=0;u--)f=(i*f+(this.words[u]|0))%h;return f},a.prototype.idivn=function(h){n(h<=67108863);for(var i=0,f=this.length-1;f>=0;f--){var u=(this.words[f]|0)+i*67108864;this.words[f]=u/h|0,i=u%h}return this.strip()},a.prototype.divn=function(h){return this.clone().idivn(h)},a.prototype.egcd=function(h){n(h.negative===0),n(!h.isZero());var i=this,f=h.clone();i.negative!==0?i=i.umod(h):i=i.clone();for(var u=new a(1),c=new a(0),p=new a(0),b=new a(1),g=0;i.isEven()&&f.isEven();)i.iushrn(1),f.iushrn(1),++g;for(var l=f.clone(),s=i.clone();!i.isZero();){for(var v=0,x=1;(i.words[0]&x)===0&&v<26;++v,x<<=1);if(v>0)for(i.iushrn(v);v-- >0;)(u.isOdd()||c.isOdd())&&(u.iadd(l),c.isub(s)),u.iushrn(1),c.iushrn(1);for(var C=0,B=1;(f.words[0]&B)===0&&C<26;++C,B<<=1);if(C>0)for(f.iushrn(C);C-- >0;)(p.isOdd()||b.isOdd())&&(p.iadd(l),b.isub(s)),p.iushrn(1),b.iushrn(1);i.cmp(f)>=0?(i.isub(f),u.isub(p),c.isub(b)):(f.isub(i),p.isub(u),b.isub(c))}return{a:p,b,gcd:f.iushln(g)}},a.prototype._invmp=function(h){n(h.negative===0),n(!h.isZero());var i=this,f=h.clone();i.negative!==0?i=i.umod(h):i=i.clone();for(var u=new a(1),c=new a(0),p=f.clone();i.cmpn(1)>0&&f.cmpn(1)>0;){for(var b=0,g=1;(i.words[0]&g)===0&&b<26;++b,g<<=1);if(b>0)for(i.iushrn(b);b-- >0;)u.isOdd()&&u.iadd(p),u.iushrn(1);for(var l=0,s=1;(f.words[0]&s)===0&&l<26;++l,s<<=1);if(l>0)for(f.iushrn(l);l-- >0;)c.isOdd()&&c.iadd(p),c.iushrn(1);i.cmp(f)>=0?(i.isub(f),u.isub(c)):(f.isub(i),c.isub(u))}var v;return i.cmpn(1)===0?v=u:v=c,v.cmpn(0)<0&&v.iadd(h),v},a.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var i=this.clone(),f=h.clone();i.negative=0,f.negative=0;for(var u=0;i.isEven()&&f.isEven();u++)i.iushrn(1),f.iushrn(1);do{for(;i.isEven();)i.iushrn(1);for(;f.isEven();)f.iushrn(1);var c=i.cmp(f);if(c<0){var p=i;i=f,f=p}else if(c===0||f.cmpn(1)===0)break;i.isub(f)}while(!0);return f.iushln(u)},a.prototype.invm=function(h){return this.egcd(h).a.umod(h)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(h){return this.words[0]&h},a.prototype.bincn=function(h){n(typeof h=="number");var i=h%26,f=(h-i)/26,u=1<>>26,b&=67108863,this.words[p]=b}return c!==0&&(this.words[p]=c,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(h){var i=h<0;if(this.negative!==0&&!i)return-1;if(this.negative===0&&i)return 1;this.strip();var f;if(this.length>1)f=1;else{i&&(h=-h),n(h<=67108863,"Number is too big");var u=this.words[0]|0;f=u===h?0:uh.length)return 1;if(this.length=0;f--){var u=this.words[f]|0,c=h.words[f]|0;if(u!==c){uc&&(i=1);break}}return i},a.prototype.gtn=function(h){return this.cmpn(h)===1},a.prototype.gt=function(h){return this.cmp(h)===1},a.prototype.gten=function(h){return this.cmpn(h)>=0},a.prototype.gte=function(h){return this.cmp(h)>=0},a.prototype.ltn=function(h){return this.cmpn(h)===-1},a.prototype.lt=function(h){return this.cmp(h)===-1},a.prototype.lten=function(h){return this.cmpn(h)<=0},a.prototype.lte=function(h){return this.cmp(h)<=0},a.prototype.eqn=function(h){return this.cmpn(h)===0},a.prototype.eq=function(h){return this.cmp(h)===0},a.red=function(h){return new Z(h)},a.prototype.toRed=function(h){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(h){return this.red=h,this},a.prototype.forceRed=function(h){return n(!this.red,"Already a number in reduction context"),this._forceRed(h)},a.prototype.redAdd=function(h){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},a.prototype.redIAdd=function(h){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},a.prototype.redSub=function(h){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},a.prototype.redISub=function(h){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},a.prototype.redShl=function(h){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},a.prototype.redMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},a.prototype.redIMul=function(h){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},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(h){return n(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var P={k256:null,p224:null,p192:null,p25519:null};function L($,h){this.name=$,this.p=new a(h,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var h=new a(null);return h.words=new Array(Math.ceil(this.n/13)),h},L.prototype.ireduce=function(h){var i=h,f;do this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),f=i.bitLength();while(f>this.n);var u=f0?i.isub(this.p):i.strip(),i},L.prototype.split=function(h,i){h.iushrn(this.n,0,i)},L.prototype.imulK=function(h){return h.imul(this.k)};function N(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(N,L),N.prototype.split=function(h,i){for(var f=4194303,u=Math.min(h.length,9),c=0;c>>22,p=b}p>>>=22,h.words[c-10]=p,p===0&&h.length>10?h.length-=10:h.length-=9},N.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var i=0,f=0;f>>=26,h.words[f]=c,i=u}return i!==0&&(h.words[h.length++]=i),h},a._prime=function(h){if(P[h])return P[h];var i;if(h==="k256")i=new N;else if(h==="p224")i=new q;else if(h==="p192")i=new X;else if(h==="p25519")i=new J;else throw new Error("Unknown prime "+h);return P[h]=i,i};function Z($){if(typeof $=="string"){var h=a._prime($);this.m=h.p,this.prime=h}else n($.gtn(1),"modulus must be greater than 1"),this.m=$,this.prime=null}Z.prototype._verify1=function(h){n(h.negative===0,"red works only with positives"),n(h.red,"red works only with red numbers")},Z.prototype._verify2=function(h,i){n((h.negative|i.negative)===0,"red works only with positives"),n(h.red&&h.red===i.red,"red works only with red numbers")},Z.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},Z.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},Z.prototype.add=function(h,i){this._verify2(h,i);var f=h.add(i);return f.cmp(this.m)>=0&&f.isub(this.m),f._forceRed(this)},Z.prototype.iadd=function(h,i){this._verify2(h,i);var f=h.iadd(i);return f.cmp(this.m)>=0&&f.isub(this.m),f},Z.prototype.sub=function(h,i){this._verify2(h,i);var f=h.sub(i);return f.cmpn(0)<0&&f.iadd(this.m),f._forceRed(this)},Z.prototype.isub=function(h,i){this._verify2(h,i);var f=h.isub(i);return f.cmpn(0)<0&&f.iadd(this.m),f},Z.prototype.shl=function(h,i){return this._verify1(h),this.imod(h.ushln(i))},Z.prototype.imul=function(h,i){return this._verify2(h,i),this.imod(h.imul(i))},Z.prototype.mul=function(h,i){return this._verify2(h,i),this.imod(h.mul(i))},Z.prototype.isqr=function(h){return this.imul(h,h.clone())},Z.prototype.sqr=function(h){return this.mul(h,h)},Z.prototype.sqrt=function(h){if(h.isZero())return h.clone();var i=this.m.andln(3);if(n(i%2===1),i===3){var f=this.m.add(new a(1)).iushrn(2);return this.pow(h,f)}for(var u=this.m.subn(1),c=0;!u.isZero()&&u.andln(1)===0;)c++,u.iushrn(1);n(!u.isZero());var p=new a(1).toRed(this),b=p.redNeg(),g=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);this.pow(l,g).cmp(b)!==0;)l.redIAdd(b);for(var s=this.pow(l,u),v=this.pow(h,u.addn(1).iushrn(1)),x=this.pow(h,u),C=c;x.cmp(p)!==0;){for(var B=x,k=0;B.cmp(p)!==0;k++)B=B.redSqr();n(k=0;c--){for(var s=i.words[c],v=l-1;v>=0;v--){var x=s>>v&1;if(p!==u[0]&&(p=this.sqr(p)),x===0&&b===0){g=0;continue}b<<=1,b|=x,g++,!(g!==f&&(c!==0||v!==0))&&(p=this.mul(p,u[b]),g=0,b=0)}l=26}return p},Z.prototype.convertTo=function(h){var i=h.umod(this.m);return i===h?i.clone():i},Z.prototype.convertFrom=function(h){var i=h.clone();return i.red=null,i},a.mont=function(h){return new W(h)};function W($){Z.call(this,$),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)}o(W,Z),W.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},W.prototype.convertFrom=function(h){var i=this.imod(h.mul(this.rinv));return i.red=null,i},W.prototype.imul=function(h,i){if(h.isZero()||i.isZero())return h.words[0]=0,h.length=1,h;var f=h.imul(i),u=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=f.isub(u).iushrn(this.shift),p=c;return c.cmp(this.m)>=0?p=c.isub(this.m):c.cmpn(0)<0&&(p=c.iadd(this.m)),p._forceRed(this)},W.prototype.mul=function(h,i){if(h.isZero()||i.isZero())return new a(0)._forceRed(this);var f=h.mul(i),u=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=f.isub(u).iushrn(this.shift),p=c;return c.cmp(this.m)>=0?p=c.isub(this.m):c.cmpn(0)<0&&(p=c.iadd(this.m)),p._forceRed(this)},W.prototype.invm=function(h){var i=this.imod(h._invmp(this.m).mul(this.r2));return i._forceRed(this)}})(e,Qe)})(X9);var MH=function(t){if(typeof t!="string")throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return t.slice(0,2)==="0x"},xH=MH,_H=function(t){return typeof t!="string"?t:xH(t)?t.slice(2):t},Of=X9.exports,p6=_H,J9=function(t){if(typeof t=="string"||typeof t=="number"){var r=new Of(1),n=String(t).toLowerCase().trim(),o=n.substr(0,2)==="0x"||n.substr(0,3)==="-0x",a=p6(n);if(a.substr(0,1)==="-"&&(a=p6(a.slice(1)),r=new Of(-1,10)),a=a===""?"0":a,!a.match(/^-?[0-9]+$/)&&a.match(/^[0-9A-Fa-f]+$/)||a.match(/^[a-fA-F]+$/)||o===!0&&a.match(/^[0-9A-Fa-f]+$/))return new Of(a,16).mul(r);if((a.match(/^-?[0-9]+$/)||a==="")&&o===!1)return new Of(a,10).mul(r)}else if(typeof t=="object"&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new Of(t.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(t)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")},bs=Y9.exports,EH=J9,SH=new bs(0),Q9=new bs(-1),Nu={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function my(e){var t=e?e.toLowerCase():"ether",r=Nu[t];if(typeof r!="string")throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(Nu,null,2));return new bs(r,10)}function e_(e){if(typeof e=="string"){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}else{if(typeof e=="number")return String(e);if(typeof e=="object"&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10)}throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+".")}function AH(e,t,r){var n=EH(e),o=n.lt(SH),a=my(t),d=Nu[t].length-1||1,m=r||{};o&&(n=n.mul(Q9));for(var y=n.mod(a).toString(10);y.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var m=d[0],y=d[1];if(m||(m="0"),y||(y="0"),y.length>o)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;y.length0)throw new Error("Invalid string. Length must be a multiple of 4");a=e[m-2]==="="?2:e[m-1]==="="?1:0,d=new TH(m*3/4-a),n=a>0?m-4:m;var y=0;for(t=0,r=0;t>16&255,d[y++]=o>>8&255,d[y++]=o&255;return a===2?(o=Tn[e.charCodeAt(t)]<<2|Tn[e.charCodeAt(t+1)]>>4,d[y++]=o&255):a===1&&(o=Tn[e.charCodeAt(t)]<<10|Tn[e.charCodeAt(t+1)]<<4|Tn[e.charCodeAt(t+2)]>>2,d[y++]=o>>8&255,d[y++]=o&255),d}function OH(e){return hi[e>>18&63]+hi[e>>12&63]+hi[e>>6&63]+hi[e&63]}function PH(e,t,r){for(var n,o=[],a=t;ay?y:m+d));return n===1?(t=e[r-1],o+=hi[t>>2],o+=hi[t<<4&63],o+="=="):n===2&&(t=(e[r-2]<<8)+e[r-1],o+=hi[t>>10],o+=hi[t>>4&63],o+=hi[t<<2&63],o+="="),a.push(o),a.join("")}function Gc(e,t,r,n,o){var a,d,m=o*8-n-1,y=(1<>1,M=-7,_=r?o-1:0,E=r?-1:1,S=e[t+_];for(_+=E,a=S&(1<<-M)-1,S>>=-M,M+=m;M>0;a=a*256+e[t+_],_+=E,M-=8);for(d=a&(1<<-M)-1,a>>=-M,M+=n;M>0;d=d*256+e[t+_],_+=E,M-=8);if(a===0)a=1-w;else{if(a===y)return d?NaN:(S?-1:1)*(1/0);d=d+Math.pow(2,n),a=a-w}return(S?-1:1)*d*Math.pow(2,a-n)}function r_(e,t,r,n,o,a){var d,m,y,w=a*8-o-1,M=(1<>1,E=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=n?0:a-1,A=n?1:-1,T=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(m=isNaN(t)?1:0,d=M):(d=Math.floor(Math.log(t)/Math.LN2),t*(y=Math.pow(2,-d))<1&&(d--,y*=2),d+_>=1?t+=E/y:t+=E*Math.pow(2,1-_),t*y>=2&&(d++,y/=2),d+_>=M?(m=0,d=M):d+_>=1?(m=(t*y-1)*Math.pow(2,o),d=d+_):(m=t*Math.pow(2,_-1)*Math.pow(2,o),d=0));o>=8;e[r+S]=m&255,S+=A,m/=256,o-=8);for(d=d<0;e[r+S]=d&255,S+=A,d/=256,w-=8);e[r+S-A]|=T*128}var BH={}.toString,n_=Array.isArray||function(e){return BH.call(e)=="[object Array]"};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */var i_=50;ce.TYPED_ARRAY_SUPPORT=ci.TYPED_ARRAY_SUPPORT!==void 0?ci.TYPED_ARRAY_SUPPORT:!0;var IH=Th();function Th(){return ce.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Hi(e,t){if(Th()=Th())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Th().toString(16)+" bytes");return e|0}function NH(e){return+e!=e&&(e=0),ce.alloc(+e)}ce.isBuffer=oo;function Si(e){return!!(e!=null&&e._isBuffer)}ce.compare=function(t,r){if(!Si(t)||!Si(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var n=t.length,o=r.length,a=0,d=Math.min(n,o);a>>1;case"base64":return p_(e).length;default:if(n)return Rh(e).length;t=(""+t).toLowerCase(),n=!0}}ce.byteLength=s_;function zH(e,t,r){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return YH(this,t,r);case"utf8":case"utf-8":return l_(this,t,r);case"ascii":return WH(this,t,r);case"latin1":case"binary":return ZH(this,t,r);case"base64":return KH(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return XH(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}ce.prototype._isBuffer=!0;function ao(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}ce.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""};ce.prototype.compare=function(t,r,n,o,a){if(!Si(t))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),o===void 0&&(o=0),a===void 0&&(a=this.length),r<0||n>t.length||o<0||a>this.length)throw new RangeError("out of range index");if(o>=a&&r>=n)return 0;if(o>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,a>>>=0,this===t)return 0;for(var d=a-o,m=n-r,y=Math.min(d,m),w=this.slice(o,a),M=t.slice(r,n),_=0;_2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof t=="string"&&(t=ce.from(t,n)),Si(t))return t.length===0?-1:m6(e,t,r,n,o);if(typeof t=="number")return t=t&255,ce.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m6(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function m6(e,t,r,n,o){var a=1,d=e.length,m=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,d/=2,m/=2,r/=2}function y(S,A){return a===1?S[A]:S.readUInt16BE(A*a)}var w;if(o){var M=-1;for(w=r;wd&&(r=d-m),w=r;w>=0;w--){for(var _=!0,E=0;Eo&&(n=o)):n=o;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var d=0;da)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var d=!1;;)switch(o){case"hex":return HH(this,t,r,n);case"utf8":case"utf-8":return UH(this,t,r,n);case"ascii":return u_(this,t,r,n);case"latin1":case"binary":return jH(this,t,r,n);case"base64":return qH(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return VH(this,t,r,n);default:if(d)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),d=!0}};ce.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function KH(e,t,r){return t===0&&r===e.length?v6(e):v6(e.slice(t,r))}function l_(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:a>223?3:a>191?2:1;if(o+m<=r){var y,w,M,_;switch(m){case 1:a<128&&(d=a);break;case 2:y=e[o+1],(y&192)===128&&(_=(a&31)<<6|y&63,_>127&&(d=_));break;case 3:y=e[o+1],w=e[o+2],(y&192)===128&&(w&192)===128&&(_=(a&15)<<12|(y&63)<<6|w&63,_>2047&&(_<55296||_>57343)&&(d=_));break;case 4:y=e[o+1],w=e[o+2],M=e[o+3],(y&192)===128&&(w&192)===128&&(M&192)===128&&(_=(a&15)<<18|(y&63)<<12|(w&63)<<6|M&63,_>65535&&_<1114112&&(d=_))}}d===null?(d=65533,m=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|d&1023),n.push(d),o+=m}return GH(n)}var g6=4096;function GH(e){var t=e.length;if(t<=g6)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var o="",a=t;an&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}ce.prototype.readUIntLE=function(t,r,n){t=t|0,r=r|0,n||_r(t,r,this.length);for(var o=this[t],a=1,d=0;++d0&&(a*=256);)o+=this[t+--r]*a;return o};ce.prototype.readUInt8=function(t,r){return r||_r(t,1,this.length),this[t]};ce.prototype.readUInt16LE=function(t,r){return r||_r(t,2,this.length),this[t]|this[t+1]<<8};ce.prototype.readUInt16BE=function(t,r){return r||_r(t,2,this.length),this[t]<<8|this[t+1]};ce.prototype.readUInt32LE=function(t,r){return r||_r(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};ce.prototype.readUInt32BE=function(t,r){return r||_r(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};ce.prototype.readIntLE=function(t,r,n){t=t|0,r=r|0,n||_r(t,r,this.length);for(var o=this[t],a=1,d=0;++d=a&&(o-=Math.pow(2,8*r)),o};ce.prototype.readIntBE=function(t,r,n){t=t|0,r=r|0,n||_r(t,r,this.length);for(var o=r,a=1,d=this[t+--o];o>0&&(a*=256);)d+=this[t+--o]*a;return a*=128,d>=a&&(d-=Math.pow(2,8*r)),d};ce.prototype.readInt8=function(t,r){return r||_r(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};ce.prototype.readInt16LE=function(t,r){r||_r(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};ce.prototype.readInt16BE=function(t,r){r||_r(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};ce.prototype.readInt32LE=function(t,r){return r||_r(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};ce.prototype.readInt32BE=function(t,r){return r||_r(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};ce.prototype.readFloatLE=function(t,r){return r||_r(t,4,this.length),Gc(this,t,!0,23,4)};ce.prototype.readFloatBE=function(t,r){return r||_r(t,4,this.length),Gc(this,t,!1,23,4)};ce.prototype.readDoubleLE=function(t,r){return r||_r(t,8,this.length),Gc(this,t,!0,52,8)};ce.prototype.readDoubleBE=function(t,r){return r||_r(t,8,this.length),Gc(this,t,!1,52,8)};function an(e,t,r,n,o,a){if(!Si(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}ce.prototype.writeUIntLE=function(t,r,n,o){if(t=+t,r=r|0,n=n|0,!o){var a=Math.pow(2,8*n)-1;an(this,t,r,n,a,0)}var d=1,m=0;for(this[r]=t&255;++m=0&&(m*=256);)this[r+d]=t/m&255;return r+n};ce.prototype.writeUInt8=function(t,r,n){return t=+t,r=r|0,n||an(this,t,r,1,255,0),ce.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t&255,r+1};function Wc(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-r,2);o>>(n?o:1-o)*8}ce.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r|0,n||an(this,t,r,2,65535,0),ce.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):Wc(this,t,r,!0),r+2};ce.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r|0,n||an(this,t,r,2,65535,0),ce.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):Wc(this,t,r,!1),r+2};function Zc(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-r,4);o>>(n?o:3-o)*8&255}ce.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r|0,n||an(this,t,r,4,4294967295,0),ce.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255):Zc(this,t,r,!0),r+4};ce.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r|0,n||an(this,t,r,4,4294967295,0),ce.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):Zc(this,t,r,!1),r+4};ce.prototype.writeIntLE=function(t,r,n,o){if(t=+t,r=r|0,!o){var a=Math.pow(2,8*n-1);an(this,t,r,n,a-1,-a)}var d=0,m=1,y=0;for(this[r]=t&255;++d>0)-y&255;return r+n};ce.prototype.writeIntBE=function(t,r,n,o){if(t=+t,r=r|0,!o){var a=Math.pow(2,8*n-1);an(this,t,r,n,a-1,-a)}var d=n-1,m=1,y=0;for(this[r+d]=t&255;--d>=0&&(m*=256);)t<0&&y===0&&this[r+d+1]!==0&&(y=1),this[r+d]=(t/m>>0)-y&255;return r+n};ce.prototype.writeInt8=function(t,r,n){return t=+t,r=r|0,n||an(this,t,r,1,127,-128),ce.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=t&255,r+1};ce.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r|0,n||an(this,t,r,2,32767,-32768),ce.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):Wc(this,t,r,!0),r+2};ce.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r|0,n||an(this,t,r,2,32767,-32768),ce.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):Wc(this,t,r,!1),r+2};ce.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r|0,n||an(this,t,r,4,2147483647,-2147483648),ce.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):Zc(this,t,r,!0),r+4};ce.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r|0,n||an(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),ce.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):Zc(this,t,r,!1),r+4};function h_(e,t,r,n,o,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function c_(e,t,r,n,o){return o||h_(e,t,r,4),r_(e,t,r,n,23,4),r+4}ce.prototype.writeFloatLE=function(t,r,n){return c_(this,t,r,!0,n)};ce.prototype.writeFloatBE=function(t,r,n){return c_(this,t,r,!1,n)};function d_(e,t,r,n,o){return o||h_(e,t,r,8),r_(e,t,r,n,52,8),r+8}ce.prototype.writeDoubleLE=function(t,r,n){return d_(this,t,r,!0,n)};ce.prototype.writeDoubleBE=function(t,r,n){return d_(this,t,r,!1,n)};ce.prototype.copy=function(t,r,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),r>=t.length&&(r=t.length),r||(r=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r=0;--d)t[d+r]=this[d+n];else if(a<1e3||!ce.TYPED_ARRAY_SUPPORT)for(d=0;d>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var d;if(typeof t=="number")for(d=r;d55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(d+1===n){(t-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function rU(e){for(var t=[],r=0;r>8,o=r%256,a.push(o),a.push(n);return a}function p_(e){return RH(QH(e))}function Yc(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function iU(e){return e!==e}function oo(e){return e!=null&&(!!e._isBuffer||v_(e)||aU(e))}function v_(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function aU(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&v_(e.slice(0,0))}const oU=Object.freeze(Object.defineProperty({__proto__:null,Buffer:ce,INSPECT_MAX_BYTES:i_,SlowBuffer:NH,isBuffer:oo,kMaxLength:IH},Symbol.toStringTag,{value:"Module"}));var ra={exports:{}};const on=Tg(oU);(function(e){(function(t,r){function n(f,u){if(!f)throw new Error(u||"Assertion failed")}function o(f,u){f.super_=u;var c=function(){};c.prototype=u.prototype,f.prototype=new c,f.prototype.constructor=f}function a(f,u,c){if(a.isBN(f))return f;this.negative=0,this.words=null,this.length=0,this.red=null,f!==null&&((u==="le"||u==="be")&&(c=u,u=10),this._init(f||0,u||10,c||"be"))}typeof t=="object"?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var d;try{typeof window<"u"&&typeof window.Buffer<"u"?d=window.Buffer:d=on.Buffer}catch{}a.isBN=function(u){return u instanceof a?!0:u!==null&&typeof u=="object"&&u.constructor.wordSize===a.wordSize&&Array.isArray(u.words)},a.max=function(u,c){return u.cmp(c)>0?u:c},a.min=function(u,c){return u.cmp(c)<0?u:c},a.prototype._init=function(u,c,p){if(typeof u=="number")return this._initNumber(u,c,p);if(typeof u=="object")return this._initArray(u,c,p);c==="hex"&&(c=16),n(c===(c|0)&&c>=2&&c<=36),u=u.toString().replace(/\s+/g,"");var b=0;u[0]==="-"&&(b++,this.negative=1),b=0;b-=3)l=u[b]|u[b-1]<<8|u[b-2]<<16,this.words[g]|=l<>>26-s&67108863,s+=24,s>=26&&(s-=26,g++);else if(p==="le")for(b=0,g=0;b>>26-s&67108863,s+=24,s>=26&&(s-=26,g++);return this._strip()};function m(f,u){var c=f.charCodeAt(u);if(c>=48&&c<=57)return c-48;if(c>=65&&c<=70)return c-55;if(c>=97&&c<=102)return c-87;n(!1,"Invalid character in "+f)}function y(f,u,c){var p=m(f,c);return c-1>=u&&(p|=m(f,c-1)<<4),p}a.prototype._parseHex=function(u,c,p){this.length=Math.ceil((u.length-c)/6),this.words=new Array(this.length);for(var b=0;b=c;b-=2)s=y(u,c,b)<=18?(g-=18,l+=1,this.words[l]|=s>>>26):g+=8;else{var v=u.length-c;for(b=v%2===0?c+1:c;b=18?(g-=18,l+=1,this.words[l]|=s>>>26):g+=8}this._strip()};function w(f,u,c,p){for(var b=0,g=0,l=Math.min(f.length,c),s=u;s=49?g=v-49+10:v>=17?g=v-17+10:g=v,n(v>=0&&g1&&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")]=_}catch{a.prototype.inspect=_}else a.prototype.inspect=_;function _(){return(this.red?""}var E=["","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"],S=[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],A=[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(u,c){u=u||10,c=c|0||1;var p;if(u===16||u==="hex"){p="";for(var b=0,g=0,l=0;l>>24-b&16777215,b+=2,b>=26&&(b-=26,l--),g!==0||l!==this.length-1?p=E[6-v.length]+v+p:p=v+p}for(g!==0&&(p=g.toString(16)+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(u===(u|0)&&u>=2&&u<=36){var x=S[u],C=A[u];p="";var B=this.clone();for(B.negative=0;!B.isZero();){var k=B.modrn(C).toString(u);B=B.idivn(C),B.isZero()?p=k+p:p=E[x-k.length]+k+p}for(this.isZero()&&(p="0"+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},a.prototype.toJSON=function(){return this.toString(16,2)},d&&(a.prototype.toBuffer=function(u,c){return this.toArrayLike(d,u,c)}),a.prototype.toArray=function(u,c){return this.toArrayLike(Array,u,c)};var T=function(u,c){return u.allocUnsafe?u.allocUnsafe(c):new u(c)};a.prototype.toArrayLike=function(u,c,p){this._strip();var b=this.byteLength(),g=p||Math.max(1,b);n(b<=g,"byte array longer than desired length"),n(g>0,"Requested array length <= 0");var l=T(u,g),s=c==="le"?"LE":"BE";return this["_toArrayLike"+s](l,b),l},a.prototype._toArrayLikeLE=function(u,c){for(var p=0,b=0,g=0,l=0;g>8&255),p>16&255),l===6?(p>24&255),b=0,l=0):(b=s>>>24,l+=2)}if(p=0&&(u[p--]=s>>8&255),p>=0&&(u[p--]=s>>16&255),l===6?(p>=0&&(u[p--]=s>>24&255),b=0,l=0):(b=s>>>24,l+=2)}if(p>=0)for(u[p--]=b;p>=0;)u[p--]=0},Math.clz32?a.prototype._countBits=function(u){return 32-Math.clz32(u)}:a.prototype._countBits=function(u){var c=u,p=0;return c>=4096&&(p+=13,c>>>=13),c>=64&&(p+=7,c>>>=7),c>=8&&(p+=4,c>>>=4),c>=2&&(p+=2,c>>>=2),p+c},a.prototype._zeroBits=function(u){if(u===0)return 26;var c=u,p=0;return(c&8191)===0&&(p+=13,c>>>=13),(c&127)===0&&(p+=7,c>>>=7),(c&15)===0&&(p+=4,c>>>=4),(c&3)===0&&(p+=2,c>>>=2),(c&1)===0&&p++,p},a.prototype.bitLength=function(){var u=this.words[this.length-1],c=this._countBits(u);return(this.length-1)*26+c};function I(f){for(var u=new Array(f.bitLength()),c=0;c>>b&1}return u}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,c=0;cu.length?this.clone().ior(u):u.clone().ior(this)},a.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},a.prototype.iuand=function(u){var c;this.length>u.length?c=u:c=this;for(var p=0;pu.length?this.clone().iand(u):u.clone().iand(this)},a.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},a.prototype.iuxor=function(u){var c,p;this.length>u.length?(c=this,p=u):(c=u,p=this);for(var b=0;bu.length?this.clone().ixor(u):u.clone().ixor(this)},a.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},a.prototype.inotn=function(u){n(typeof u=="number"&&u>=0);var c=Math.ceil(u/26)|0,p=u%26;this._expand(c),p>0&&c--;for(var b=0;b0&&(this.words[b]=~this.words[b]&67108863>>26-p),this._strip()},a.prototype.notn=function(u){return this.clone().inotn(u)},a.prototype.setn=function(u,c){n(typeof u=="number"&&u>=0);var p=u/26|0,b=u%26;return this._expand(p+1),c?this.words[p]=this.words[p]|1<u.length?(p=this,b=u):(p=u,b=this);for(var g=0,l=0;l>>26;for(;g!==0&&l>>26;if(this.length=p.length,g!==0)this.words[this.length]=g,this.length++;else if(p!==this)for(;lu.length?this.clone().iadd(u):u.clone().iadd(this)},a.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var c=this.iadd(u);return u.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var p=this.cmp(u);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,g;p>0?(b=this,g=u):(b=u,g=this);for(var l=0,s=0;s>26,this.words[s]=c&67108863;for(;l!==0&&s>26,this.words[s]=c&67108863;if(l===0&&s>>26,B=v&67108863,k=Math.min(x,u.length-1),R=Math.max(0,x-f.length+1);R<=k;R++){var D=x-R|0;b=f.words[D]|0,g=u.words[R]|0,l=b*g+B,C+=l/67108864|0,B=l&67108863}c.words[x]=B|0,v=C|0}return v!==0?c.words[x]=v|0:c.length--,c._strip()}var P=function(u,c,p){var b=u.words,g=c.words,l=p.words,s=0,v,x,C,B=b[0]|0,k=B&8191,R=B>>>13,D=b[1]|0,z=D&8191,H=D>>>13,V=b[2]|0,U=V&8191,F=V>>>13,G=b[3]|0,ie=G&8191,Y=G>>>13,oe=b[4]|0,xe=oe&8191,ne=oe>>>13,Q=b[5]|0,te=Q&8191,ee=Q>>>13,se=b[6]|0,_e=se&8191,K=se>>>13,re=b[7]|0,Te=re&8191,ae=re>>>13,Me=b[8]|0,ze=Me&8191,fe=Me>>>13,Se=b[9]|0,He=Se&8191,ue=Se>>>13,Ae=g[0]|0,Ue=Ae&8191,he=Ae>>>13,Ce=g[1]|0,je=Ce&8191,de=Ce>>>13,Oe=g[2]|0,Ve=Oe&8191,pe=Oe>>>13,Pe=g[3]|0,Ke=Pe&8191,ve=Pe>>>13,Be=g[4]|0,Ge=Be&8191,me=Be>>>13,Ie=g[5]|0,We=Ie&8191,ge=Ie>>>13,$e=g[6]|0,Ze=$e&8191,ye=$e>>>13,Le=g[7]|0,Ye=Le&8191,be=Le>>>13,De=g[8]|0,Xe=De&8191,we=De>>>13,Re=g[9]|0,tt=Re&8191,rt=Re>>>13;p.negative=u.negative^c.negative,p.length=19,v=Math.imul(k,Ue),x=Math.imul(k,he),x=x+Math.imul(R,Ue)|0,C=Math.imul(R,he);var ut=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(ut>>>26)|0,ut&=67108863,v=Math.imul(z,Ue),x=Math.imul(z,he),x=x+Math.imul(H,Ue)|0,C=Math.imul(H,he),v=v+Math.imul(k,je)|0,x=x+Math.imul(k,de)|0,x=x+Math.imul(R,je)|0,C=C+Math.imul(R,de)|0;var lt=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(lt>>>26)|0,lt&=67108863,v=Math.imul(U,Ue),x=Math.imul(U,he),x=x+Math.imul(F,Ue)|0,C=Math.imul(F,he),v=v+Math.imul(z,je)|0,x=x+Math.imul(z,de)|0,x=x+Math.imul(H,je)|0,C=C+Math.imul(H,de)|0,v=v+Math.imul(k,Ve)|0,x=x+Math.imul(k,pe)|0,x=x+Math.imul(R,Ve)|0,C=C+Math.imul(R,pe)|0;var ht=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(ht>>>26)|0,ht&=67108863,v=Math.imul(ie,Ue),x=Math.imul(ie,he),x=x+Math.imul(Y,Ue)|0,C=Math.imul(Y,he),v=v+Math.imul(U,je)|0,x=x+Math.imul(U,de)|0,x=x+Math.imul(F,je)|0,C=C+Math.imul(F,de)|0,v=v+Math.imul(z,Ve)|0,x=x+Math.imul(z,pe)|0,x=x+Math.imul(H,Ve)|0,C=C+Math.imul(H,pe)|0,v=v+Math.imul(k,Ke)|0,x=x+Math.imul(k,ve)|0,x=x+Math.imul(R,Ke)|0,C=C+Math.imul(R,ve)|0;var ct=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(ct>>>26)|0,ct&=67108863,v=Math.imul(xe,Ue),x=Math.imul(xe,he),x=x+Math.imul(ne,Ue)|0,C=Math.imul(ne,he),v=v+Math.imul(ie,je)|0,x=x+Math.imul(ie,de)|0,x=x+Math.imul(Y,je)|0,C=C+Math.imul(Y,de)|0,v=v+Math.imul(U,Ve)|0,x=x+Math.imul(U,pe)|0,x=x+Math.imul(F,Ve)|0,C=C+Math.imul(F,pe)|0,v=v+Math.imul(z,Ke)|0,x=x+Math.imul(z,ve)|0,x=x+Math.imul(H,Ke)|0,C=C+Math.imul(H,ve)|0,v=v+Math.imul(k,Ge)|0,x=x+Math.imul(k,me)|0,x=x+Math.imul(R,Ge)|0,C=C+Math.imul(R,me)|0;var dt=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(dt>>>26)|0,dt&=67108863,v=Math.imul(te,Ue),x=Math.imul(te,he),x=x+Math.imul(ee,Ue)|0,C=Math.imul(ee,he),v=v+Math.imul(xe,je)|0,x=x+Math.imul(xe,de)|0,x=x+Math.imul(ne,je)|0,C=C+Math.imul(ne,de)|0,v=v+Math.imul(ie,Ve)|0,x=x+Math.imul(ie,pe)|0,x=x+Math.imul(Y,Ve)|0,C=C+Math.imul(Y,pe)|0,v=v+Math.imul(U,Ke)|0,x=x+Math.imul(U,ve)|0,x=x+Math.imul(F,Ke)|0,C=C+Math.imul(F,ve)|0,v=v+Math.imul(z,Ge)|0,x=x+Math.imul(z,me)|0,x=x+Math.imul(H,Ge)|0,C=C+Math.imul(H,me)|0,v=v+Math.imul(k,We)|0,x=x+Math.imul(k,ge)|0,x=x+Math.imul(R,We)|0,C=C+Math.imul(R,ge)|0;var yt=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(yt>>>26)|0,yt&=67108863,v=Math.imul(_e,Ue),x=Math.imul(_e,he),x=x+Math.imul(K,Ue)|0,C=Math.imul(K,he),v=v+Math.imul(te,je)|0,x=x+Math.imul(te,de)|0,x=x+Math.imul(ee,je)|0,C=C+Math.imul(ee,de)|0,v=v+Math.imul(xe,Ve)|0,x=x+Math.imul(xe,pe)|0,x=x+Math.imul(ne,Ve)|0,C=C+Math.imul(ne,pe)|0,v=v+Math.imul(ie,Ke)|0,x=x+Math.imul(ie,ve)|0,x=x+Math.imul(Y,Ke)|0,C=C+Math.imul(Y,ve)|0,v=v+Math.imul(U,Ge)|0,x=x+Math.imul(U,me)|0,x=x+Math.imul(F,Ge)|0,C=C+Math.imul(F,me)|0,v=v+Math.imul(z,We)|0,x=x+Math.imul(z,ge)|0,x=x+Math.imul(H,We)|0,C=C+Math.imul(H,ge)|0,v=v+Math.imul(k,Ze)|0,x=x+Math.imul(k,ye)|0,x=x+Math.imul(R,Ze)|0,C=C+Math.imul(R,ye)|0;var bt=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(bt>>>26)|0,bt&=67108863,v=Math.imul(Te,Ue),x=Math.imul(Te,he),x=x+Math.imul(ae,Ue)|0,C=Math.imul(ae,he),v=v+Math.imul(_e,je)|0,x=x+Math.imul(_e,de)|0,x=x+Math.imul(K,je)|0,C=C+Math.imul(K,de)|0,v=v+Math.imul(te,Ve)|0,x=x+Math.imul(te,pe)|0,x=x+Math.imul(ee,Ve)|0,C=C+Math.imul(ee,pe)|0,v=v+Math.imul(xe,Ke)|0,x=x+Math.imul(xe,ve)|0,x=x+Math.imul(ne,Ke)|0,C=C+Math.imul(ne,ve)|0,v=v+Math.imul(ie,Ge)|0,x=x+Math.imul(ie,me)|0,x=x+Math.imul(Y,Ge)|0,C=C+Math.imul(Y,me)|0,v=v+Math.imul(U,We)|0,x=x+Math.imul(U,ge)|0,x=x+Math.imul(F,We)|0,C=C+Math.imul(F,ge)|0,v=v+Math.imul(z,Ze)|0,x=x+Math.imul(z,ye)|0,x=x+Math.imul(H,Ze)|0,C=C+Math.imul(H,ye)|0,v=v+Math.imul(k,Ye)|0,x=x+Math.imul(k,be)|0,x=x+Math.imul(R,Ye)|0,C=C+Math.imul(R,be)|0;var wt=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(wt>>>26)|0,wt&=67108863,v=Math.imul(ze,Ue),x=Math.imul(ze,he),x=x+Math.imul(fe,Ue)|0,C=Math.imul(fe,he),v=v+Math.imul(Te,je)|0,x=x+Math.imul(Te,de)|0,x=x+Math.imul(ae,je)|0,C=C+Math.imul(ae,de)|0,v=v+Math.imul(_e,Ve)|0,x=x+Math.imul(_e,pe)|0,x=x+Math.imul(K,Ve)|0,C=C+Math.imul(K,pe)|0,v=v+Math.imul(te,Ke)|0,x=x+Math.imul(te,ve)|0,x=x+Math.imul(ee,Ke)|0,C=C+Math.imul(ee,ve)|0,v=v+Math.imul(xe,Ge)|0,x=x+Math.imul(xe,me)|0,x=x+Math.imul(ne,Ge)|0,C=C+Math.imul(ne,me)|0,v=v+Math.imul(ie,We)|0,x=x+Math.imul(ie,ge)|0,x=x+Math.imul(Y,We)|0,C=C+Math.imul(Y,ge)|0,v=v+Math.imul(U,Ze)|0,x=x+Math.imul(U,ye)|0,x=x+Math.imul(F,Ze)|0,C=C+Math.imul(F,ye)|0,v=v+Math.imul(z,Ye)|0,x=x+Math.imul(z,be)|0,x=x+Math.imul(H,Ye)|0,C=C+Math.imul(H,be)|0,v=v+Math.imul(k,Xe)|0,x=x+Math.imul(k,we)|0,x=x+Math.imul(R,Xe)|0,C=C+Math.imul(R,we)|0;var Mt=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,v=Math.imul(He,Ue),x=Math.imul(He,he),x=x+Math.imul(ue,Ue)|0,C=Math.imul(ue,he),v=v+Math.imul(ze,je)|0,x=x+Math.imul(ze,de)|0,x=x+Math.imul(fe,je)|0,C=C+Math.imul(fe,de)|0,v=v+Math.imul(Te,Ve)|0,x=x+Math.imul(Te,pe)|0,x=x+Math.imul(ae,Ve)|0,C=C+Math.imul(ae,pe)|0,v=v+Math.imul(_e,Ke)|0,x=x+Math.imul(_e,ve)|0,x=x+Math.imul(K,Ke)|0,C=C+Math.imul(K,ve)|0,v=v+Math.imul(te,Ge)|0,x=x+Math.imul(te,me)|0,x=x+Math.imul(ee,Ge)|0,C=C+Math.imul(ee,me)|0,v=v+Math.imul(xe,We)|0,x=x+Math.imul(xe,ge)|0,x=x+Math.imul(ne,We)|0,C=C+Math.imul(ne,ge)|0,v=v+Math.imul(ie,Ze)|0,x=x+Math.imul(ie,ye)|0,x=x+Math.imul(Y,Ze)|0,C=C+Math.imul(Y,ye)|0,v=v+Math.imul(U,Ye)|0,x=x+Math.imul(U,be)|0,x=x+Math.imul(F,Ye)|0,C=C+Math.imul(F,be)|0,v=v+Math.imul(z,Xe)|0,x=x+Math.imul(z,we)|0,x=x+Math.imul(H,Xe)|0,C=C+Math.imul(H,we)|0,v=v+Math.imul(k,tt)|0,x=x+Math.imul(k,rt)|0,x=x+Math.imul(R,tt)|0,C=C+Math.imul(R,rt)|0;var xt=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(xt>>>26)|0,xt&=67108863,v=Math.imul(He,je),x=Math.imul(He,de),x=x+Math.imul(ue,je)|0,C=Math.imul(ue,de),v=v+Math.imul(ze,Ve)|0,x=x+Math.imul(ze,pe)|0,x=x+Math.imul(fe,Ve)|0,C=C+Math.imul(fe,pe)|0,v=v+Math.imul(Te,Ke)|0,x=x+Math.imul(Te,ve)|0,x=x+Math.imul(ae,Ke)|0,C=C+Math.imul(ae,ve)|0,v=v+Math.imul(_e,Ge)|0,x=x+Math.imul(_e,me)|0,x=x+Math.imul(K,Ge)|0,C=C+Math.imul(K,me)|0,v=v+Math.imul(te,We)|0,x=x+Math.imul(te,ge)|0,x=x+Math.imul(ee,We)|0,C=C+Math.imul(ee,ge)|0,v=v+Math.imul(xe,Ze)|0,x=x+Math.imul(xe,ye)|0,x=x+Math.imul(ne,Ze)|0,C=C+Math.imul(ne,ye)|0,v=v+Math.imul(ie,Ye)|0,x=x+Math.imul(ie,be)|0,x=x+Math.imul(Y,Ye)|0,C=C+Math.imul(Y,be)|0,v=v+Math.imul(U,Xe)|0,x=x+Math.imul(U,we)|0,x=x+Math.imul(F,Xe)|0,C=C+Math.imul(F,we)|0,v=v+Math.imul(z,tt)|0,x=x+Math.imul(z,rt)|0,x=x+Math.imul(H,tt)|0,C=C+Math.imul(H,rt)|0;var _t=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(_t>>>26)|0,_t&=67108863,v=Math.imul(He,Ve),x=Math.imul(He,pe),x=x+Math.imul(ue,Ve)|0,C=Math.imul(ue,pe),v=v+Math.imul(ze,Ke)|0,x=x+Math.imul(ze,ve)|0,x=x+Math.imul(fe,Ke)|0,C=C+Math.imul(fe,ve)|0,v=v+Math.imul(Te,Ge)|0,x=x+Math.imul(Te,me)|0,x=x+Math.imul(ae,Ge)|0,C=C+Math.imul(ae,me)|0,v=v+Math.imul(_e,We)|0,x=x+Math.imul(_e,ge)|0,x=x+Math.imul(K,We)|0,C=C+Math.imul(K,ge)|0,v=v+Math.imul(te,Ze)|0,x=x+Math.imul(te,ye)|0,x=x+Math.imul(ee,Ze)|0,C=C+Math.imul(ee,ye)|0,v=v+Math.imul(xe,Ye)|0,x=x+Math.imul(xe,be)|0,x=x+Math.imul(ne,Ye)|0,C=C+Math.imul(ne,be)|0,v=v+Math.imul(ie,Xe)|0,x=x+Math.imul(ie,we)|0,x=x+Math.imul(Y,Xe)|0,C=C+Math.imul(Y,we)|0,v=v+Math.imul(U,tt)|0,x=x+Math.imul(U,rt)|0,x=x+Math.imul(F,tt)|0,C=C+Math.imul(F,rt)|0;var Et=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(Et>>>26)|0,Et&=67108863,v=Math.imul(He,Ke),x=Math.imul(He,ve),x=x+Math.imul(ue,Ke)|0,C=Math.imul(ue,ve),v=v+Math.imul(ze,Ge)|0,x=x+Math.imul(ze,me)|0,x=x+Math.imul(fe,Ge)|0,C=C+Math.imul(fe,me)|0,v=v+Math.imul(Te,We)|0,x=x+Math.imul(Te,ge)|0,x=x+Math.imul(ae,We)|0,C=C+Math.imul(ae,ge)|0,v=v+Math.imul(_e,Ze)|0,x=x+Math.imul(_e,ye)|0,x=x+Math.imul(K,Ze)|0,C=C+Math.imul(K,ye)|0,v=v+Math.imul(te,Ye)|0,x=x+Math.imul(te,be)|0,x=x+Math.imul(ee,Ye)|0,C=C+Math.imul(ee,be)|0,v=v+Math.imul(xe,Xe)|0,x=x+Math.imul(xe,we)|0,x=x+Math.imul(ne,Xe)|0,C=C+Math.imul(ne,we)|0,v=v+Math.imul(ie,tt)|0,x=x+Math.imul(ie,rt)|0,x=x+Math.imul(Y,tt)|0,C=C+Math.imul(Y,rt)|0;var St=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(St>>>26)|0,St&=67108863,v=Math.imul(He,Ge),x=Math.imul(He,me),x=x+Math.imul(ue,Ge)|0,C=Math.imul(ue,me),v=v+Math.imul(ze,We)|0,x=x+Math.imul(ze,ge)|0,x=x+Math.imul(fe,We)|0,C=C+Math.imul(fe,ge)|0,v=v+Math.imul(Te,Ze)|0,x=x+Math.imul(Te,ye)|0,x=x+Math.imul(ae,Ze)|0,C=C+Math.imul(ae,ye)|0,v=v+Math.imul(_e,Ye)|0,x=x+Math.imul(_e,be)|0,x=x+Math.imul(K,Ye)|0,C=C+Math.imul(K,be)|0,v=v+Math.imul(te,Xe)|0,x=x+Math.imul(te,we)|0,x=x+Math.imul(ee,Xe)|0,C=C+Math.imul(ee,we)|0,v=v+Math.imul(xe,tt)|0,x=x+Math.imul(xe,rt)|0,x=x+Math.imul(ne,tt)|0,C=C+Math.imul(ne,rt)|0;var At=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(At>>>26)|0,At&=67108863,v=Math.imul(He,We),x=Math.imul(He,ge),x=x+Math.imul(ue,We)|0,C=Math.imul(ue,ge),v=v+Math.imul(ze,Ze)|0,x=x+Math.imul(ze,ye)|0,x=x+Math.imul(fe,Ze)|0,C=C+Math.imul(fe,ye)|0,v=v+Math.imul(Te,Ye)|0,x=x+Math.imul(Te,be)|0,x=x+Math.imul(ae,Ye)|0,C=C+Math.imul(ae,be)|0,v=v+Math.imul(_e,Xe)|0,x=x+Math.imul(_e,we)|0,x=x+Math.imul(K,Xe)|0,C=C+Math.imul(K,we)|0,v=v+Math.imul(te,tt)|0,x=x+Math.imul(te,rt)|0,x=x+Math.imul(ee,tt)|0,C=C+Math.imul(ee,rt)|0;var Tt=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,v=Math.imul(He,Ze),x=Math.imul(He,ye),x=x+Math.imul(ue,Ze)|0,C=Math.imul(ue,ye),v=v+Math.imul(ze,Ye)|0,x=x+Math.imul(ze,be)|0,x=x+Math.imul(fe,Ye)|0,C=C+Math.imul(fe,be)|0,v=v+Math.imul(Te,Xe)|0,x=x+Math.imul(Te,we)|0,x=x+Math.imul(ae,Xe)|0,C=C+Math.imul(ae,we)|0,v=v+Math.imul(_e,tt)|0,x=x+Math.imul(_e,rt)|0,x=x+Math.imul(K,tt)|0,C=C+Math.imul(K,rt)|0;var Rt=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,v=Math.imul(He,Ye),x=Math.imul(He,be),x=x+Math.imul(ue,Ye)|0,C=Math.imul(ue,be),v=v+Math.imul(ze,Xe)|0,x=x+Math.imul(ze,we)|0,x=x+Math.imul(fe,Xe)|0,C=C+Math.imul(fe,we)|0,v=v+Math.imul(Te,tt)|0,x=x+Math.imul(Te,rt)|0,x=x+Math.imul(ae,tt)|0,C=C+Math.imul(ae,rt)|0;var qt=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(qt>>>26)|0,qt&=67108863,v=Math.imul(He,Xe),x=Math.imul(He,we),x=x+Math.imul(ue,Xe)|0,C=Math.imul(ue,we),v=v+Math.imul(ze,tt)|0,x=x+Math.imul(ze,rt)|0,x=x+Math.imul(fe,tt)|0,C=C+Math.imul(fe,rt)|0;var jd=(s+v|0)+((x&8191)<<13)|0;s=(C+(x>>>13)|0)+(jd>>>26)|0,jd&=67108863,v=Math.imul(He,tt),x=Math.imul(He,rt),x=x+Math.imul(ue,tt)|0,C=Math.imul(ue,rt);var qd=(s+v|0)+((x&8191)<<13)|0;return s=(C+(x>>>13)|0)+(qd>>>26)|0,qd&=67108863,l[0]=ut,l[1]=lt,l[2]=ht,l[3]=ct,l[4]=dt,l[5]=yt,l[6]=bt,l[7]=wt,l[8]=Mt,l[9]=xt,l[10]=_t,l[11]=Et,l[12]=St,l[13]=At,l[14]=Tt,l[15]=Rt,l[16]=qt,l[17]=jd,l[18]=qd,s!==0&&(l[19]=s,p.length++),p};Math.imul||(P=O);function L(f,u,c){c.negative=u.negative^f.negative,c.length=f.length+u.length;for(var p=0,b=0,g=0;g>>26)|0,b+=l>>>26,l&=67108863}c.words[g]=s,p=l,l=b}return p!==0?c.words[g]=p:c.length--,c._strip()}function N(f,u,c){return L(f,u,c)}a.prototype.mulTo=function(u,c){var p,b=this.length+u.length;return this.length===10&&u.length===10?p=P(this,u,c):b<63?p=O(this,u,c):b<1024?p=L(this,u,c):p=N(this,u,c),p},a.prototype.mul=function(u){var c=new a(null);return c.words=new Array(this.length+u.length),this.mulTo(u,c)},a.prototype.mulf=function(u){var c=new a(null);return c.words=new Array(this.length+u.length),N(this,u,c)},a.prototype.imul=function(u){return this.clone().mulTo(u,this)},a.prototype.imuln=function(u){var c=u<0;c&&(u=-u),n(typeof u=="number"),n(u<67108864);for(var p=0,b=0;b>=26,p+=g/67108864|0,p+=l>>>26,this.words[b]=l&67108863}return p!==0&&(this.words[b]=p,this.length++),c?this.ineg():this},a.prototype.muln=function(u){return this.clone().imuln(u)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(u){var c=I(u);if(c.length===0)return new a(1);for(var p=this,b=0;b=0);var c=u%26,p=(u-c)/26,b=67108863>>>26-c<<26-c,g;if(c!==0){var l=0;for(g=0;g>>26-c}l&&(this.words[g]=l,this.length++)}if(p!==0){for(g=this.length-1;g>=0;g--)this.words[g+p]=this.words[g];for(g=0;g=0);var b;c?b=(c-c%26)/26:b=0;var g=u%26,l=Math.min((u-g)/26,this.length),s=67108863^67108863>>>g<l)for(this.length-=l,x=0;x=0&&(C!==0||x>=b);x--){var B=this.words[x]|0;this.words[x]=C<<26-g|B>>>g,C=B&s}return v&&C!==0&&(v.words[v.length++]=C),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(u,c,p){return n(this.negative===0),this.iushrn(u,c,p)},a.prototype.shln=function(u){return this.clone().ishln(u)},a.prototype.ushln=function(u){return this.clone().iushln(u)},a.prototype.shrn=function(u){return this.clone().ishrn(u)},a.prototype.ushrn=function(u){return this.clone().iushrn(u)},a.prototype.testn=function(u){n(typeof u=="number"&&u>=0);var c=u%26,p=(u-c)/26,b=1<=0);var c=u%26,p=(u-c)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(c!==0&&p++,this.length=Math.min(p,this.length),c!==0){var b=67108863^67108863>>>c<=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},a.prototype.isubn=function(u){if(n(typeof u=="number"),n(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c>26)-(v/67108864|0),this.words[g+p]=l&67108863}for(;g>26,this.words[g+p]=l&67108863;if(s===0)return this._strip();for(n(s===-1),s=0,g=0;g>26,this.words[g]=l&67108863;return this.negative=1,this._strip()},a.prototype._wordDiv=function(u,c){var p=this.length-u.length,b=this.clone(),g=u,l=g.words[g.length-1]|0,s=this._countBits(l);p=26-s,p!==0&&(g=g.ushln(p),b.iushln(p),l=g.words[g.length-1]|0);var v=b.length-g.length,x;if(c!=="mod"){x=new a(null),x.length=v+1,x.words=new Array(x.length);for(var C=0;C=0;k--){var R=(b.words[g.length+k]|0)*67108864+(b.words[g.length+k-1]|0);for(R=Math.min(R/l|0,67108863),b._ishlnsubmul(g,R,k);b.negative!==0;)R--,b.negative=0,b._ishlnsubmul(g,1,k),b.isZero()||(b.negative^=1);x&&(x.words[k]=R)}return x&&x._strip(),b._strip(),c!=="div"&&p!==0&&b.iushrn(p),{div:x||null,mod:b}},a.prototype.divmod=function(u,c,p){if(n(!u.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var b,g,l;return this.negative!==0&&u.negative===0?(l=this.neg().divmod(u,c),c!=="mod"&&(b=l.div.neg()),c!=="div"&&(g=l.mod.neg(),p&&g.negative!==0&&g.iadd(u)),{div:b,mod:g}):this.negative===0&&u.negative!==0?(l=this.divmod(u.neg(),c),c!=="mod"&&(b=l.div.neg()),{div:b,mod:l.mod}):(this.negative&u.negative)!==0?(l=this.neg().divmod(u.neg(),c),c!=="div"&&(g=l.mod.neg(),p&&g.negative!==0&&g.isub(u)),{div:l.div,mod:g}):u.length>this.length||this.cmp(u)<0?{div:new a(0),mod:this}:u.length===1?c==="div"?{div:this.divn(u.words[0]),mod:null}:c==="mod"?{div:null,mod:new a(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new a(this.modrn(u.words[0]))}:this._wordDiv(u,c)},a.prototype.div=function(u){return this.divmod(u,"div",!1).div},a.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},a.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},a.prototype.divRound=function(u){var c=this.divmod(u);if(c.mod.isZero())return c.div;var p=c.div.negative!==0?c.mod.isub(u):c.mod,b=u.ushrn(1),g=u.andln(1),l=p.cmp(b);return l<0||g===1&&l===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},a.prototype.modrn=function(u){var c=u<0;c&&(u=-u),n(u<=67108863);for(var p=(1<<26)%u,b=0,g=this.length-1;g>=0;g--)b=(p*b+(this.words[g]|0))%u;return c?-b:b},a.prototype.modn=function(u){return this.modrn(u)},a.prototype.idivn=function(u){var c=u<0;c&&(u=-u),n(u<=67108863);for(var p=0,b=this.length-1;b>=0;b--){var g=(this.words[b]|0)+p*67108864;this.words[b]=g/u|0,p=g%u}return this._strip(),c?this.ineg():this},a.prototype.divn=function(u){return this.clone().idivn(u)},a.prototype.egcd=function(u){n(u.negative===0),n(!u.isZero());var c=this,p=u.clone();c.negative!==0?c=c.umod(u):c=c.clone();for(var b=new a(1),g=new a(0),l=new a(0),s=new a(1),v=0;c.isEven()&&p.isEven();)c.iushrn(1),p.iushrn(1),++v;for(var x=p.clone(),C=c.clone();!c.isZero();){for(var B=0,k=1;(c.words[0]&k)===0&&B<26;++B,k<<=1);if(B>0)for(c.iushrn(B);B-- >0;)(b.isOdd()||g.isOdd())&&(b.iadd(x),g.isub(C)),b.iushrn(1),g.iushrn(1);for(var R=0,D=1;(p.words[0]&D)===0&&R<26;++R,D<<=1);if(R>0)for(p.iushrn(R);R-- >0;)(l.isOdd()||s.isOdd())&&(l.iadd(x),s.isub(C)),l.iushrn(1),s.iushrn(1);c.cmp(p)>=0?(c.isub(p),b.isub(l),g.isub(s)):(p.isub(c),l.isub(b),s.isub(g))}return{a:l,b:s,gcd:p.iushln(v)}},a.prototype._invmp=function(u){n(u.negative===0),n(!u.isZero());var c=this,p=u.clone();c.negative!==0?c=c.umod(u):c=c.clone();for(var b=new a(1),g=new a(0),l=p.clone();c.cmpn(1)>0&&p.cmpn(1)>0;){for(var s=0,v=1;(c.words[0]&v)===0&&s<26;++s,v<<=1);if(s>0)for(c.iushrn(s);s-- >0;)b.isOdd()&&b.iadd(l),b.iushrn(1);for(var x=0,C=1;(p.words[0]&C)===0&&x<26;++x,C<<=1);if(x>0)for(p.iushrn(x);x-- >0;)g.isOdd()&&g.iadd(l),g.iushrn(1);c.cmp(p)>=0?(c.isub(p),b.isub(g)):(p.isub(c),g.isub(b))}var B;return c.cmpn(1)===0?B=b:B=g,B.cmpn(0)<0&&B.iadd(u),B},a.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var c=this.clone(),p=u.clone();c.negative=0,p.negative=0;for(var b=0;c.isEven()&&p.isEven();b++)c.iushrn(1),p.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;p.isEven();)p.iushrn(1);var g=c.cmp(p);if(g<0){var l=c;c=p,p=l}else if(g===0||p.cmpn(1)===0)break;c.isub(p)}while(!0);return p.iushln(b)},a.prototype.invm=function(u){return this.egcd(u).a.umod(u)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(u){return this.words[0]&u},a.prototype.bincn=function(u){n(typeof u=="number");var c=u%26,p=(u-c)/26,b=1<>>26,s&=67108863,this.words[l]=s}return g!==0&&(this.words[l]=g,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(u){var c=u<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this._strip();var p;if(this.length>1)p=1;else{c&&(u=-u),n(u<=67108863,"Number is too big");var b=this.words[0]|0;p=b===u?0:bu.length)return 1;if(this.length=0;p--){var b=this.words[p]|0,g=u.words[p]|0;if(b!==g){bg&&(c=1);break}}return c},a.prototype.gtn=function(u){return this.cmpn(u)===1},a.prototype.gt=function(u){return this.cmp(u)===1},a.prototype.gten=function(u){return this.cmpn(u)>=0},a.prototype.gte=function(u){return this.cmp(u)>=0},a.prototype.ltn=function(u){return this.cmpn(u)===-1},a.prototype.lt=function(u){return this.cmp(u)===-1},a.prototype.lten=function(u){return this.cmpn(u)<=0},a.prototype.lte=function(u){return this.cmp(u)<=0},a.prototype.eqn=function(u){return this.cmpn(u)===0},a.prototype.eq=function(u){return this.cmp(u)===0},a.red=function(u){return new h(u)},a.prototype.toRed=function(u){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(u){return this.red=u,this},a.prototype.forceRed=function(u){return n(!this.red,"Already a number in reduction context"),this._forceRed(u)},a.prototype.redAdd=function(u){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},a.prototype.redIAdd=function(u){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},a.prototype.redSub=function(u){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},a.prototype.redISub=function(u){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},a.prototype.redShl=function(u){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},a.prototype.redMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},a.prototype.redIMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},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(u){return n(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var q={k256:null,p224:null,p192:null,p25519:null};function X(f,u){this.name=f,this.p=new a(u,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}X.prototype._tmp=function(){var u=new a(null);return u.words=new Array(Math.ceil(this.n/13)),u},X.prototype.ireduce=function(u){var c=u,p;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),p=c.bitLength();while(p>this.n);var b=p0?c.isub(this.p):c.strip!==void 0?c.strip():c._strip(),c},X.prototype.split=function(u,c){u.iushrn(this.n,0,c)},X.prototype.imulK=function(u){return u.imul(this.k)};function J(){X.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(J,X),J.prototype.split=function(u,c){for(var p=4194303,b=Math.min(u.length,9),g=0;g>>22,l=s}l>>>=22,u.words[g-10]=l,l===0&&u.length>10?u.length-=10:u.length-=9},J.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var c=0,p=0;p>>=26,u.words[p]=g,c=b}return c!==0&&(u.words[u.length++]=c),u},a._prime=function(u){if(q[u])return q[u];var c;if(u==="k256")c=new J;else if(u==="p224")c=new Z;else if(u==="p192")c=new W;else if(u==="p25519")c=new $;else throw new Error("Unknown prime "+u);return q[u]=c,c};function h(f){if(typeof f=="string"){var u=a._prime(f);this.m=u.p,this.prime=u}else n(f.gtn(1),"modulus must be greater than 1"),this.m=f,this.prime=null}h.prototype._verify1=function(u){n(u.negative===0,"red works only with positives"),n(u.red,"red works only with red numbers")},h.prototype._verify2=function(u,c){n((u.negative|c.negative)===0,"red works only with positives"),n(u.red&&u.red===c.red,"red works only with red numbers")},h.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(M(u,u.umod(this.m)._forceRed(this)),u)},h.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},h.prototype.add=function(u,c){this._verify2(u,c);var p=u.add(c);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},h.prototype.iadd=function(u,c){this._verify2(u,c);var p=u.iadd(c);return p.cmp(this.m)>=0&&p.isub(this.m),p},h.prototype.sub=function(u,c){this._verify2(u,c);var p=u.sub(c);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},h.prototype.isub=function(u,c){this._verify2(u,c);var p=u.isub(c);return p.cmpn(0)<0&&p.iadd(this.m),p},h.prototype.shl=function(u,c){return this._verify1(u),this.imod(u.ushln(c))},h.prototype.imul=function(u,c){return this._verify2(u,c),this.imod(u.imul(c))},h.prototype.mul=function(u,c){return this._verify2(u,c),this.imod(u.mul(c))},h.prototype.isqr=function(u){return this.imul(u,u.clone())},h.prototype.sqr=function(u){return this.mul(u,u)},h.prototype.sqrt=function(u){if(u.isZero())return u.clone();var c=this.m.andln(3);if(n(c%2===1),c===3){var p=this.m.add(new a(1)).iushrn(2);return this.pow(u,p)}for(var b=this.m.subn(1),g=0;!b.isZero()&&b.andln(1)===0;)g++,b.iushrn(1);n(!b.isZero());var l=new a(1).toRed(this),s=l.redNeg(),v=this.m.subn(1).iushrn(1),x=this.m.bitLength();for(x=new a(2*x*x).toRed(this);this.pow(x,v).cmp(s)!==0;)x.redIAdd(s);for(var C=this.pow(x,b),B=this.pow(u,b.addn(1).iushrn(1)),k=this.pow(u,b),R=g;k.cmp(l)!==0;){for(var D=k,z=0;D.cmp(l)!==0;z++)D=D.redSqr();n(z=0;g--){for(var C=c.words[g],B=x-1;B>=0;B--){var k=C>>B&1;if(l!==b[0]&&(l=this.sqr(l)),k===0&&s===0){v=0;continue}s<<=1,s|=k,v++,!(v!==p&&(g!==0||B!==0))&&(l=this.mul(l,b[s]),v=0,s=0)}x=26}return l},h.prototype.convertTo=function(u){var c=u.umod(this.m);return c===u?c.clone():c},h.prototype.convertFrom=function(u){var c=u.clone();return c.red=null,c},a.mont=function(u){return new i(u)};function i(f){h.call(this,f),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)}o(i,h),i.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},i.prototype.convertFrom=function(u){var c=this.imod(u.mul(this.rinv));return c.red=null,c},i.prototype.imul=function(u,c){if(u.isZero()||c.isZero())return u.words[0]=0,u.length=1,u;var p=u.imul(c),b=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=p.isub(b).iushrn(this.shift),l=g;return g.cmp(this.m)>=0?l=g.isub(this.m):g.cmpn(0)<0&&(l=g.iadd(this.m)),l._forceRed(this)},i.prototype.mul=function(u,c){if(u.isZero()||c.isZero())return new a(0)._forceRed(this);var p=u.mul(c),b=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=p.isub(b).iushrn(this.shift),l=g;return g.cmp(this.m)>=0?l=g.isub(this.m):g.cmpn(0)<0&&(l=g.iadd(this.m)),l._forceRed(this)},i.prototype.invm=function(u){var c=this.imod(u._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(e,Qe)})(ra);var m_={};/*! https://mths.be/utf8js v3.0.0 by @mathias */(function(e){(function(t){var r=String.fromCharCode;function n(T){for(var I=[],O=0,P=T.length,L,N;O=55296&&L<=56319&&O65535&&(P-=65536,L+=r(P>>>10&1023|55296),P=56320|P&1023),L+=r(P);return L}function a(T){if(T>=55296&&T<=57343)throw Error("Lone surrogate U+"+T.toString(16).toUpperCase()+" is not a scalar value")}function d(T,I){return r(T>>I&63|128)}function m(T){if((T&4294967168)==0)return r(T);var I="";return(T&4294965248)==0?I=r(T>>6&31|192):(T&4294901760)==0?(a(T),I=r(T>>12&15|224),I+=d(T,6)):(T&4292870144)==0&&(I=r(T>>18&7|240),I+=d(T,12),I+=d(T,6)),I+=r(T&63|128),I}function y(T){for(var I=n(T),O=I.length,P=-1,L,N="";++P=E)throw Error("Invalid byte index");var T=_[S]&255;if(S++,(T&192)==128)return T&63;throw Error("Invalid continuation byte")}function M(){var T,I,O,P,L;if(S>E)throw Error("Invalid byte index");if(S==E)return!1;if(T=_[S]&255,S++,(T&128)==0)return T;if((T&224)==192){if(I=w(),L=(T&31)<<6|I,L>=128)return L;throw Error("Invalid continuation byte")}if((T&240)==224){if(I=w(),O=w(),L=(T&15)<<12|I<<6|O,L>=2048)return a(L),L;throw Error("Invalid continuation byte")}if((T&248)==240&&(I=w(),O=w(),P=w(),L=(T&7)<<18|I<<12|O<<6|P,L>=65536&&L<=1114111))return L;throw Error("Invalid UTF-8 detected")}var _,E,S;function A(T){_=n(T),E=_.length,S=0;for(var I=[],O;(O=M())!==!1;)I.push(O);return o(I)}t.version="3.0.0",t.encode=y,t.decode=A})(e)})(m_);var g_={},wy={},en={},Ca={},sU=Qe&&Qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ca,"__esModule",{value:!0});Ca.getLength=Ca.decode=Ca.encode=void 0;var fU=sU(ra.exports);function y_(e){if(Array.isArray(e)){for(var t=[],r=0;re.length)throw new Error("invalid rlp: total length is larger than the data");if(o=e.slice(r,y),o.length===0)throw new Error("invalid rlp, List has a invalid length");for(;o.length;)a=eg(o),d.push(a.data),o=a.remainder;return{data:d,remainder:e.slice(y)}}}function b_(e){return e.slice(0,2)==="0x"}function hU(e){return typeof e!="string"?e:b_(e)?e.slice(2):e}function tg(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function cU(e){return e.length%2?"0"+e:e}function dU(e){var t=tg(e);return ce.from(t,"hex")}function My(e){if(!ce.isBuffer(e)){if(typeof e=="string")return b_(e)?ce.from(cU(hU(e)),"hex"):ce.from(e);if(typeof e=="number"||typeof e=="bigint")return e?dU(e):ce.from([]);if(e==null)return ce.from([]);if(e instanceof Uint8Array)return ce.from(e);if(fU.default.isBN(e))return ce.from(e.toArray());throw new Error("invalid type")}return e}var pU=Qe&&Qe.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),vU=Qe&&Qe.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),mU=Qe&&Qe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&pU(t,e,r);return vU(t,e),t},gU=Qe&&Qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(en,"__esModule",{value:!0});en.rlp=en.BN=void 0;var yU=gU(ra.exports);en.BN=yU.default;var bU=mU(Ca);en.rlp=bU;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.MAX_INTEGER=e.MAX_UINT64=void 0;var t=on,r=en;e.MAX_UINT64=new r.BN("ffffffffffffffff",16),e.MAX_INTEGER=new r.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new r.BN("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=t.Buffer.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=t.Buffer.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=t.Buffer.from(e.KECCAK256_RLP_S,"hex")})(wy);var xy={},In={},w_={},M_=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(t,r);if(d.value!==o||d.enumerable!==!0)return!1}return!0},wU=M_,Xc=function(){return wU()&&!!Symbol.toStringTag},b6=typeof Symbol<"u"&&Symbol,MU=M_,xU=function(){return typeof b6!="function"||typeof Symbol!="function"||typeof b6("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:MU()},_U="Function.prototype.bind called on incompatible ",O1=Array.prototype.slice,EU=Object.prototype.toString,SU="[object Function]",AU=function(t){var r=this;if(typeof r!="function"||EU.call(r)!==SU)throw new TypeError(_U+r);for(var n=O1.call(arguments,1),o,a=function(){if(this instanceof o){var M=r.apply(this,n.concat(O1.call(arguments)));return Object(M)===M?M:this}else return r.apply(t,n.concat(O1.call(arguments)))},d=Math.max(0,r.length-n.length),m=[],y=0;y"u"?Bt:da(Uint8Array),Ms={"%AggregateError%":typeof AggregateError>"u"?Bt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Bt:ArrayBuffer,"%ArrayIteratorPrototype%":No?da([][Symbol.iterator]()):Bt,"%AsyncFromSyncIteratorPrototype%":Bt,"%AsyncFunction%":Wo,"%AsyncGenerator%":Wo,"%AsyncGeneratorFunction%":Wo,"%AsyncIteratorPrototype%":Wo,"%Atomics%":typeof Atomics>"u"?Bt:Atomics,"%BigInt%":typeof BigInt>"u"?Bt:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Bt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Bt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Bt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Bt:FinalizationRegistry,"%Function%":x_,"%GeneratorFunction%":Wo,"%Int8Array%":typeof Int8Array>"u"?Bt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Bt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Bt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":No?da(da([][Symbol.iterator]())):Bt,"%JSON%":typeof JSON=="object"?JSON:Bt,"%Map%":typeof Map>"u"?Bt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!No?Bt:da(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Bt:Promise,"%Proxy%":typeof Proxy>"u"?Bt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Bt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Bt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!No?Bt:da(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Bt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":No?da(""[Symbol.iterator]()):Bt,"%Symbol%":No?Symbol:Bt,"%SyntaxError%":Ds,"%ThrowTypeError%":RU,"%TypedArray%":OU,"%TypeError%":ws,"%Uint8Array%":typeof Uint8Array>"u"?Bt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Bt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Bt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Bt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Bt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Bt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Bt:WeakSet},PU=function e(t){var r;if(t==="%AsyncFunction%")r=P1("async function () {}");else if(t==="%GeneratorFunction%")r=P1("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=P1("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&(r=da(o.prototype))}return Ms[t]=r,r},w6={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ul=_y,Oh=TU,BU=ul.call(Function.call,Array.prototype.concat),IU=ul.call(Function.apply,Array.prototype.splice),M6=ul.call(Function.call,String.prototype.replace),Ph=ul.call(Function.call,String.prototype.slice),$U=ul.call(Function.call,RegExp.prototype.exec),LU=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,DU=/\\(\\)?/g,FU=function(t){var r=Ph(t,0,1),n=Ph(t,-1);if(r==="%"&&n!=="%")throw new Ds("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ds("invalid intrinsic syntax, expected opening `%`");var o=[];return M6(t,LU,function(a,d,m,y){o[o.length]=m?M6(y,DU,"$1"):d||a}),o},NU=function(t,r){var n=t,o;if(Oh(w6,n)&&(o=w6[n],n="%"+o[0]+"%"),Oh(Ms,n)){var a=Ms[n];if(a===Wo&&(a=PU(n)),typeof a>"u"&&!r)throw new ws("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new Ds("intrinsic "+t+" does not exist!")},Ey=function(t,r){if(typeof t!="string"||t.length===0)throw new ws("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ws('"allowMissing" argument must be a boolean');if($U(/^%?[^%]*%?$/,t)===null)throw new Ds("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=FU(t),o=n.length>0?n[0]:"",a=NU("%"+o+"%",r),d=a.name,m=a.value,y=!1,w=a.alias;w&&(o=w[0],IU(n,BU([0,1],w)));for(var M=1,_=!0;M=n.length){var T=lo(m,E);_=!!T,_&&"get"in T&&!("originalValue"in T.get)?m=T.get:m=m[E]}else _=Oh(m,E),m=m[E];_&&!y&&(Ms[d]=m)}}return m},__={exports:{}};(function(e){var t=_y,r=Ey,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(o,n),d=r("%Object.getOwnPropertyDescriptor%",!0),m=r("%Object.defineProperty%",!0),y=r("%Math.max%");if(m)try{m({},"a",{value:1})}catch{m=null}e.exports=function(_){var E=a(t,o,arguments);if(d&&m){var S=d(E,"length");S.configurable&&m(E,"length",{value:1+y(0,_.length-(arguments.length-1))})}return E};var w=function(){return a(t,n,arguments)};m?m(e.exports,"apply",{value:w}):e.exports.apply=w})(__);var E_=Ey,S_=__.exports,zU=S_(E_("String.prototype.indexOf")),Sy=function(t,r){var n=E_(t,!!r);return typeof n=="function"&&zU(t,".prototype.")>-1?S_(n):n},HU=Xc(),UU=Sy,rg=UU("Object.prototype.toString"),Jc=function(t){return HU&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:rg(t)==="[object Arguments]"},A_=function(t){return Jc(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&rg(t)!=="[object Array]"&&rg(t.callee)==="[object Function]"},jU=function(){return Jc(arguments)}();Jc.isLegacyArguments=A_;var qU=jU?Jc:A_,VU=Object.prototype.toString,KU=Function.prototype.toString,GU=/^\s*(?:function)?\*/,C_=Xc(),I1=Object.getPrototypeOf,WU=function(){if(!C_)return!1;try{return Function("return function*() {}")()}catch{}},$1,ZU=function(t){if(typeof t!="function")return!1;if(GU.test(KU.call(t)))return!0;if(!C_){var r=VU.call(t);return r==="[object GeneratorFunction]"}if(!I1)return!1;if(typeof $1>"u"){var n=WU();$1=n?I1(n):!1}return I1(t)===$1},k_=Function.prototype.toString,ls=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,ng,I0;if(typeof ls=="function"&&typeof Object.defineProperty=="function")try{ng=Object.defineProperty({},"length",{get:function(){throw I0}}),I0={},ls(function(){throw 42},null,ng)}catch(e){e!==I0&&(ls=null)}else ls=null;var YU=/^\s*class\b/,ig=function(t){try{var r=k_.call(t);return YU.test(r)}catch{return!1}},L1=function(t){try{return ig(t)?!1:(k_.call(t),!0)}catch{return!1}},$0=Object.prototype.toString,XU="[object Object]",JU="[object Function]",QU="[object GeneratorFunction]",ej="[object HTMLAllCollection]",tj="[object HTML document.all class]",rj="[object HTMLCollection]",nj=typeof Symbol=="function"&&!!Symbol.toStringTag,ij=!(0 in[,]),ag=function(){return!1};if(typeof document=="object"){var aj=document.all;$0.call(aj)===$0.call(document.all)&&(ag=function(t){if((ij||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=$0.call(t);return(r===ej||r===tj||r===rj||r===XU)&&t("")==null}catch{}return!1})}var oj=ls?function(t){if(ag(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{ls(t,null,ng)}catch(r){if(r!==I0)return!1}return!ig(t)&&L1(t)}:function(t){if(ag(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(nj)return L1(t);if(ig(t))return!1;var r=$0.call(t);return r!==JU&&r!==QU&&!/^\[object HTML/.test(r)?!1:L1(t)},sj=oj,fj=Object.prototype.toString,T_=Object.prototype.hasOwnProperty,uj=function(t,r,n){for(var o=0,a=t.length;o=3&&(o=n),fj.call(t)==="[object Array]"?uj(t,r,o):typeof t=="string"?lj(t,r,o):hj(t,r,o)},R_=cj,D1=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],dj=typeof globalThis>"u"?Qe:globalThis,O_=function(){for(var t=[],r=0;r"u"?Qe:globalThis,$_=vj(),yj=Ay("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}return D0?wj(t):!1},F_=R_,Mj=O_,N_=Sy,N1=P_,xj=N_("Object.prototype.toString"),z_=Xc(),x6=typeof globalThis>"u"?Qe:globalThis,_j=Mj(),Ej=N_("String.prototype.slice"),H_={},z1=Object.getPrototypeOf;z_&&N1&&z1&&F_(_j,function(e){if(typeof x6[e]=="function"){var t=new x6[e];if(Symbol.toStringTag in t){var r=z1(t),n=N1(r,Symbol.toStringTag);if(!n){var o=z1(r);n=N1(o,Symbol.toStringTag)}H_[e]=n.get}}});var Sj=function(t){var r=!1;return F_(H_,function(n,o){if(!r)try{var a=n.call(t);a===o&&(r=a)}catch{}}),r},Aj=D_,Cj=function(t){return Aj(t)?!z_||!(Symbol.toStringTag in t)?Ej(xj(t),8,-1):Sj(t):!1};(function(e){var t=qU,r=ZU,n=Cj,o=D_;function a(Q){return Q.call.bind(Q)}var d=typeof BigInt<"u",m=typeof Symbol<"u",y=a(Object.prototype.toString),w=a(Number.prototype.valueOf),M=a(String.prototype.valueOf),_=a(Boolean.prototype.valueOf);if(d)var E=a(BigInt.prototype.valueOf);if(m)var S=a(Symbol.prototype.valueOf);function A(Q,te){if(typeof Q!="object")return!1;try{return te(Q),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function T(Q){return typeof Promise<"u"&&Q instanceof Promise||Q!==null&&typeof Q=="object"&&typeof Q.then=="function"&&typeof Q.catch=="function"}e.isPromise=T;function I(Q){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Q):o(Q)||C(Q)}e.isArrayBufferView=I;function O(Q){return n(Q)==="Uint8Array"}e.isUint8Array=O;function P(Q){return n(Q)==="Uint8ClampedArray"}e.isUint8ClampedArray=P;function L(Q){return n(Q)==="Uint16Array"}e.isUint16Array=L;function N(Q){return n(Q)==="Uint32Array"}e.isUint32Array=N;function q(Q){return n(Q)==="Int8Array"}e.isInt8Array=q;function X(Q){return n(Q)==="Int16Array"}e.isInt16Array=X;function J(Q){return n(Q)==="Int32Array"}e.isInt32Array=J;function Z(Q){return n(Q)==="Float32Array"}e.isFloat32Array=Z;function W(Q){return n(Q)==="Float64Array"}e.isFloat64Array=W;function $(Q){return n(Q)==="BigInt64Array"}e.isBigInt64Array=$;function h(Q){return n(Q)==="BigUint64Array"}e.isBigUint64Array=h;function i(Q){return y(Q)==="[object Map]"}i.working=typeof Map<"u"&&i(new Map);function f(Q){return typeof Map>"u"?!1:i.working?i(Q):Q instanceof Map}e.isMap=f;function u(Q){return y(Q)==="[object Set]"}u.working=typeof Set<"u"&&u(new Set);function c(Q){return typeof Set>"u"?!1:u.working?u(Q):Q instanceof Set}e.isSet=c;function p(Q){return y(Q)==="[object WeakMap]"}p.working=typeof WeakMap<"u"&&p(new WeakMap);function b(Q){return typeof WeakMap>"u"?!1:p.working?p(Q):Q instanceof WeakMap}e.isWeakMap=b;function g(Q){return y(Q)==="[object WeakSet]"}g.working=typeof WeakSet<"u"&&g(new WeakSet);function l(Q){return g(Q)}e.isWeakSet=l;function s(Q){return y(Q)==="[object ArrayBuffer]"}s.working=typeof ArrayBuffer<"u"&&s(new ArrayBuffer);function v(Q){return typeof ArrayBuffer>"u"?!1:s.working?s(Q):Q instanceof ArrayBuffer}e.isArrayBuffer=v;function x(Q){return y(Q)==="[object DataView]"}x.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&x(new DataView(new ArrayBuffer(1),0,1));function C(Q){return typeof DataView>"u"?!1:x.working?x(Q):Q instanceof DataView}e.isDataView=C;var B=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function k(Q){return y(Q)==="[object SharedArrayBuffer]"}function R(Q){return typeof B>"u"?!1:(typeof k.working>"u"&&(k.working=k(new B)),k.working?k(Q):Q instanceof B)}e.isSharedArrayBuffer=R;function D(Q){return y(Q)==="[object AsyncFunction]"}e.isAsyncFunction=D;function z(Q){return y(Q)==="[object Map Iterator]"}e.isMapIterator=z;function H(Q){return y(Q)==="[object Set Iterator]"}e.isSetIterator=H;function V(Q){return y(Q)==="[object Generator]"}e.isGeneratorObject=V;function U(Q){return y(Q)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=U;function F(Q){return A(Q,w)}e.isNumberObject=F;function G(Q){return A(Q,M)}e.isStringObject=G;function ie(Q){return A(Q,_)}e.isBooleanObject=ie;function Y(Q){return d&&A(Q,E)}e.isBigIntObject=Y;function oe(Q){return m&&A(Q,S)}e.isSymbolObject=oe;function xe(Q){return F(Q)||G(Q)||ie(Q)||Y(Q)||oe(Q)}e.isBoxedPrimitive=xe;function ne(Q){return typeof Uint8Array<"u"&&(v(Q)||R(Q))}e.isAnyArrayBuffer=ne,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Q){Object.defineProperty(e,Q,{enumerable:!1,value:function(){throw new Error(Q+" is not supported in userland")}})})})(w_);var kj=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},mt={exports:{}};typeof Object.create=="function"?mt.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:mt.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}};(function(e){var t=Object.getOwnPropertyDescriptors||function(C){for(var B=Object.keys(C),k={},R=0;R=R)return H;switch(H){case"%s":return String(k[B++]);case"%d":return Number(k[B++]);case"%j":try{return JSON.stringify(k[B++])}catch{return"[Circular]"}default:return H}}),z=k[B];B"u")return function(){return e.deprecate(x,C).apply(this,arguments)};var B=!1;function k(){if(!B){if(ot.throwDeprecation)throw new Error(C);ot.traceDeprecation?console.trace(C):console.error(C),B=!0}return x.apply(this,arguments)}return k};var n={},o=/^$/;if({}.NODE_DEBUG){var a={}.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+a+"$","i")}e.debuglog=function(x){if(x=x.toUpperCase(),!n[x])if(o.test(x)){var C=ot.pid;n[x]=function(){var B=e.format.apply(e,arguments);console.error("%s %d: %s",x,C,B)}}else n[x]=function(){};return n[x]};function d(x,C){var B={seen:[],stylize:y};return arguments.length>=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),O(C)?B.showHidden=C:C&&e._extend(B,C),J(B.showHidden)&&(B.showHidden=!1),J(B.depth)&&(B.depth=2),J(B.colors)&&(B.colors=!1),J(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=m),M(B,x,B.depth)}e.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function m(x,C){var B=d.styles[C];return B?"\x1B["+d.colors[B][0]+"m"+x+"\x1B["+d.colors[B][1]+"m":x}function y(x,C){return x}function w(x){var C={};return x.forEach(function(B,k){C[B]=!0}),C}function M(x,C,B){if(x.customInspect&&C&&i(C.inspect)&&C.inspect!==e.inspect&&!(C.constructor&&C.constructor.prototype===C)){var k=C.inspect(B,x);return q(k)||(k=M(x,k,B)),k}var R=_(x,C);if(R)return R;var D=Object.keys(C),z=w(D);if(x.showHidden&&(D=Object.getOwnPropertyNames(C)),h(C)&&(D.indexOf("message")>=0||D.indexOf("description")>=0))return E(C);if(D.length===0){if(i(C)){var H=C.name?": "+C.name:"";return x.stylize("[Function"+H+"]","special")}if(Z(C))return x.stylize(RegExp.prototype.toString.call(C),"regexp");if($(C))return x.stylize(Date.prototype.toString.call(C),"date");if(h(C))return E(C)}var V="",U=!1,F=["{","}"];if(I(C)&&(U=!0,F=["[","]"]),i(C)){var G=C.name?": "+C.name:"";V=" [Function"+G+"]"}if(Z(C)&&(V=" "+RegExp.prototype.toString.call(C)),$(C)&&(V=" "+Date.prototype.toUTCString.call(C)),h(C)&&(V=" "+E(C)),D.length===0&&(!U||C.length==0))return F[0]+V+F[1];if(B<0)return Z(C)?x.stylize(RegExp.prototype.toString.call(C),"regexp"):x.stylize("[Object]","special");x.seen.push(C);var ie;return U?ie=S(x,C,B,z,D):ie=D.map(function(Y){return A(x,C,B,z,Y,U)}),x.seen.pop(),T(ie,V,F)}function _(x,C){if(J(C))return x.stylize("undefined","undefined");if(q(C)){var B="'"+JSON.stringify(C).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return x.stylize(B,"string")}if(N(C))return x.stylize(""+C,"number");if(O(C))return x.stylize(""+C,"boolean");if(P(C))return x.stylize("null","null")}function E(x){return"["+Error.prototype.toString.call(x)+"]"}function S(x,C,B,k,R){for(var D=[],z=0,H=C.length;z-1&&(D?H=H.split(` `).map(function(U){return" "+U}).join(` `).slice(2):H=` `+H.split(` `).map(function(U){return" "+U}).join(` `))):H=x.stylize("[Circular]","special")),J(z)){if(D&&R.match(/^\d+$/))return H;z=JSON.stringify(""+R),z.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(z=z.slice(1,-1),z=x.stylize(z,"name")):(z=z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),z=x.stylize(z,"string"))}return z+": "+H}function T(x,C,B){var k=x.reduce(function(R,D){return D.indexOf(` `)>=0,R+D.replace(/\u001b\[\d\d?m/g,"").length+1},0);return k>60?B[0]+(C===""?"":C+` `)+" "+x.join(`, `)+" "+B[1]:B[0]+C+" "+x.join(", ")+" "+B[1]}e.types=w_;function I(x){return Array.isArray(x)}e.isArray=I;function O(x){return typeof x=="boolean"}e.isBoolean=O;function P(x){return x===null}e.isNull=P;function L(x){return x==null}e.isNullOrUndefined=L;function N(x){return typeof x=="number"}e.isNumber=N;function q(x){return typeof x=="string"}e.isString=q;function X(x){return typeof x=="symbol"}e.isSymbol=X;function J(x){return x===void 0}e.isUndefined=J;function Z(x){return W(x)&&u(x)==="[object RegExp]"}e.isRegExp=Z,e.types.isRegExp=Z;function W(x){return typeof x=="object"&&x!==null}e.isObject=W;function $(x){return W(x)&&u(x)==="[object Date]"}e.isDate=$,e.types.isDate=$;function h(x){return W(x)&&(u(x)==="[object Error]"||x instanceof Error)}e.isError=h,e.types.isNativeError=h;function i(x){return typeof x=="function"}e.isFunction=i;function f(x){return x===null||typeof x=="boolean"||typeof x=="number"||typeof x=="string"||typeof x=="symbol"||typeof x>"u"}e.isPrimitive=f,e.isBuffer=kj;function u(x){return Object.prototype.toString.call(x)}function c(x){return x<10?"0"+x.toString(10):x.toString(10)}var p=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function b(){var x=new Date,C=[c(x.getHours()),c(x.getMinutes()),c(x.getSeconds())].join(":");return[x.getDate(),p[x.getMonth()],C].join(" ")}e.log=function(){console.log("%s - %s",b(),e.format.apply(e,arguments))},e.inherits=mt.exports,e._extend=function(x,C){if(!C||!W(C))return x;for(var B=Object.keys(C),k=B.length;k--;)x[B[k]]=C[B[k]];return x};function g(x,C){return Object.prototype.hasOwnProperty.call(x,C)}var l=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(C){if(typeof C!="function")throw new TypeError('The "original" argument must be of type Function');if(l&&C[l]){var B=C[l];if(typeof B!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(B,l,{value:B,enumerable:!1,writable:!1,configurable:!0}),B}function B(){for(var k,R,D=new Promise(function(V,U){k=V,R=U}),z=[],H=0;H=0){var d=n.indexOf(` `,a+1);n=n.substring(d+1)}this.stack=n}}}In.inherits(Qc,Error);function k6(e,t){return typeof e=="string"?e.length=0;w--)if(d[w]!==m[w])return!1;for(w=d.length-1;w>=0;w--)if(y=d[w],!Fs(e[y],t[y],r,n))return!1;return!0}Wr.notDeepEqual=Oy;function Oy(e,t,r){Fs(e,t,!1)&&Vr(e,t,r,"notDeepEqual",Oy)}Wr.notDeepStrictEqual=Py;function Py(e,t,r){Fs(e,t,!0)&&Vr(e,t,r,"notDeepStrictEqual",Py)}Wr.strictEqual=By;function By(e,t,r){e!==t&&Vr(e,t,r,"===",By)}Wr.notStrictEqual=Iy;function Iy(e,t,r){e===t&&Vr(e,t,r,"!==",Iy)}function O6(e,t){if(!e||!t)return!1;if(Object.prototype.toString.call(t)=="[object RegExp]")return t.test(e);try{if(e instanceof t)return!0}catch{}return Error.isPrototypeOf(t)?!1:t.call({},e)===!0}function Bj(e){var t;try{e()}catch(r){t=r}return t}function q_(e,t,r,n){var o;if(typeof t!="function")throw new TypeError('"block" argument must be a function');typeof r=="string"&&(n=r,r=null),o=Bj(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!o&&Vr(o,r,"Missing expected exception"+n);var a=typeof n=="string",d=!e&&In.isError(o),m=!e&&o&&!r;if((d&&a&&O6(o,r)||m)&&Vr(o,r,"Got unwanted exception"+n),e&&o&&r&&!O6(o,r)||!e&&o)throw o}Wr.throws=V_;function V_(e,t,r){q_(!0,e,t,r)}Wr.doesNotThrow=K_;function K_(e,t,r){q_(!1,e,t,r)}Wr.ifError=G_;function G_(e){if(e)throw e}const Ij=Object.freeze(Object.defineProperty({__proto__:null,default:Wr,AssertionError:Qc,fail:Vr,ok:zu,assert:zu,equal:Cy,notEqual:ky,deepEqual:Ty,deepStrictEqual:Ry,notDeepEqual:Oy,notDeepStrictEqual:Py,strictEqual:By,notStrictEqual:Iy,throws:V_,doesNotThrow:K_,ifError:G_},Symbol.toStringTag,{value:"Module"})),$y=Tg(Ij);var Ly={};const Lt={IMPOSSIBLE_CASE:"Impossible case. Please create issue.",TWEAK_ADD:"The tweak was out of range or the resulted private key is invalid",TWEAK_MUL:"The tweak was out of range or equal to zero",CONTEXT_RANDOMIZE_UNKNOW:"Unknow error on context randomization",SECKEY_INVALID:"Private Key is invalid",PUBKEY_PARSE:"Public Key could not be parsed",PUBKEY_SERIALIZE:"Public Key serialization error",PUBKEY_COMBINE:"The sum of the public keys is not valid",SIG_PARSE:"Signature could not be parsed",SIGN:"The nonce generation function failed, or the private key was invalid",RECOVER:"Public key could not be recover",ECDH:"Scalar was invalid (zero or overflow)"};function Rn(e,t){if(!e)throw new Error(t)}function Pt(e,t,r){if(Rn(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),r!==void 0)if(Array.isArray(r)){const n=r.join(", "),o=`Expected ${e} to be an Uint8Array with length [${n}]`;Rn(r.includes(t.length),o)}else{const n=`Expected ${e} to be an Uint8Array with length ${r}`;Rn(t.length===r,n)}}function Va(e){Rn(Zo(e)==="Boolean","Expected compressed to be a Boolean")}function Kn(e=r=>new Uint8Array(r),t){return typeof e=="function"&&(e=e(t)),Pt("output",e,t),e}function Zo(e){return Object.prototype.toString.call(e).slice(8,-1)}var $j=e=>({contextRandomize(t){switch(Rn(t===null||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),t!==null&&Pt("seed",t,32),e.contextRandomize(t)){case 1:throw new Error(Lt.CONTEXT_RANDOMIZE_UNKNOW)}},privateKeyVerify(t){return Pt("private key",t,32),e.privateKeyVerify(t)===0},privateKeyNegate(t){switch(Pt("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(Lt.IMPOSSIBLE_CASE)}},privateKeyTweakAdd(t,r){switch(Pt("private key",t,32),Pt("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(Lt.TWEAK_ADD)}},privateKeyTweakMul(t,r){switch(Pt("private key",t,32),Pt("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(Lt.TWEAK_MUL)}},publicKeyVerify(t){return Pt("public key",t,[33,65]),e.publicKeyVerify(t)===0},publicKeyCreate(t,r=!0,n){switch(Pt("private key",t,32),Va(r),n=Kn(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error(Lt.SECKEY_INVALID);case 2:throw new Error(Lt.PUBKEY_SERIALIZE)}},publicKeyConvert(t,r=!0,n){switch(Pt("public key",t,[33,65]),Va(r),n=Kn(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(Lt.PUBKEY_PARSE);case 2:throw new Error(Lt.PUBKEY_SERIALIZE)}},publicKeyNegate(t,r=!0,n){switch(Pt("public key",t,[33,65]),Va(r),n=Kn(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(Lt.PUBKEY_PARSE);case 2:throw new Error(Lt.IMPOSSIBLE_CASE);case 3:throw new Error(Lt.PUBKEY_SERIALIZE)}},publicKeyCombine(t,r=!0,n){Rn(Array.isArray(t),"Expected public keys to be an Array"),Rn(t.length>0,"Expected public keys array will have more than zero items");for(const o of t)Pt("public key",o,[33,65]);switch(Va(r),n=Kn(n,r?33:65),e.publicKeyCombine(n,t)){case 0:return n;case 1:throw new Error(Lt.PUBKEY_PARSE);case 2:throw new Error(Lt.PUBKEY_COMBINE);case 3:throw new Error(Lt.PUBKEY_SERIALIZE)}},publicKeyTweakAdd(t,r,n=!0,o){switch(Pt("public key",t,[33,65]),Pt("tweak",r,32),Va(n),o=Kn(o,n?33:65),e.publicKeyTweakAdd(o,t,r)){case 0:return o;case 1:throw new Error(Lt.PUBKEY_PARSE);case 2:throw new Error(Lt.TWEAK_ADD)}},publicKeyTweakMul(t,r,n=!0,o){switch(Pt("public key",t,[33,65]),Pt("tweak",r,32),Va(n),o=Kn(o,n?33:65),e.publicKeyTweakMul(o,t,r)){case 0:return o;case 1:throw new Error(Lt.PUBKEY_PARSE);case 2:throw new Error(Lt.TWEAK_MUL)}},signatureNormalize(t){switch(Pt("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(Lt.SIG_PARSE)}},signatureExport(t,r){Pt("signature",t,64),r=Kn(r,72);const n={output:r,outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(Lt.SIG_PARSE);case 2:throw new Error(Lt.IMPOSSIBLE_CASE)}},signatureImport(t,r){switch(Pt("signature",t),r=Kn(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(Lt.SIG_PARSE);case 2:throw new Error(Lt.IMPOSSIBLE_CASE)}},ecdsaSign(t,r,n={},o){Pt("message",t,32),Pt("private key",r,32),Rn(Zo(n)==="Object","Expected options to be an Object"),n.data!==void 0&&Pt("options.data",n.data),n.noncefn!==void 0&&Rn(Zo(n.noncefn)==="Function","Expected options.noncefn to be a Function"),o=Kn(o,64);const a={signature:o,recid:null};switch(e.ecdsaSign(a,t,r,n.data,n.noncefn)){case 0:return a;case 1:throw new Error(Lt.SIGN);case 2:throw new Error(Lt.IMPOSSIBLE_CASE)}},ecdsaVerify(t,r,n){switch(Pt("signature",t,64),Pt("message",r,32),Pt("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(Lt.SIG_PARSE);case 2:throw new Error(Lt.PUBKEY_PARSE)}},ecdsaRecover(t,r,n,o=!0,a){switch(Pt("signature",t,64),Rn(Zo(r)==="Number"&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),Pt("message",n,32),Va(o),a=Kn(a,o?33:65),e.ecdsaRecover(a,t,r,n)){case 0:return a;case 1:throw new Error(Lt.SIG_PARSE);case 2:throw new Error(Lt.RECOVER);case 3:throw new Error(Lt.IMPOSSIBLE_CASE)}},ecdh(t,r,n={},o){switch(Pt("public key",t,[33,65]),Pt("private key",r,32),Rn(Zo(n)==="Object","Expected options to be an Object"),n.data!==void 0&&Pt("options.data",n.data),n.hashfn!==void 0?(Rn(Zo(n.hashfn)==="Function","Expected options.hashfn to be a Function"),n.xbuf!==void 0&&Pt("options.xbuf",n.xbuf,32),n.ybuf!==void 0&&Pt("options.ybuf",n.ybuf,32),Pt("output",o)):o=Kn(o,32),e.ecdh(o,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return o;case 1:throw new Error(Lt.PUBKEY_PARSE);case 2:throw new Error(Lt.ECDH)}}}),U1={};const Lj="elliptic",Dj="6.5.4",Fj="EC cryptography",Nj="lib/elliptic.js",zj=["lib"],Hj={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},Uj={type:"git",url:"git@github.com:indutny/elliptic"},jj=["EC","Elliptic","curve","Cryptography"],qj="Fedor Indutny ",Vj="MIT",Kj={url:"https://github.com/indutny/elliptic/issues"},Gj="https://github.com/indutny/elliptic",Wj={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},Zj={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},Yj={name:Lj,version:Dj,description:Fj,main:Nj,files:zj,scripts:Hj,repository:Uj,keywords:jj,author:qj,license:Vj,bugs:Kj,homepage:Gj,devDependencies:Wj,dependencies:Zj};var _n={},Pi={exports:{}};(function(e){(function(t,r){function n(h,i){if(!h)throw new Error(i||"Assertion failed")}function o(h,i){h.super_=i;var f=function(){};f.prototype=i.prototype,h.prototype=new f,h.prototype.constructor=h}function a(h,i,f){if(a.isBN(h))return h;this.negative=0,this.words=null,this.length=0,this.red=null,h!==null&&((i==="le"||i==="be")&&(f=i,i=10),this._init(h||0,i||10,f||"be"))}typeof t=="object"?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var d;try{typeof window<"u"&&typeof window.Buffer<"u"?d=window.Buffer:d=on.Buffer}catch{}a.isBN=function(i){return i instanceof a?!0:i!==null&&typeof i=="object"&&i.constructor.wordSize===a.wordSize&&Array.isArray(i.words)},a.max=function(i,f){return i.cmp(f)>0?i:f},a.min=function(i,f){return i.cmp(f)<0?i:f},a.prototype._init=function(i,f,u){if(typeof i=="number")return this._initNumber(i,f,u);if(typeof i=="object")return this._initArray(i,f,u);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),i=i.toString().replace(/\s+/g,"");var c=0;i[0]==="-"&&(c++,this.negative=1),c=0;c-=3)b=i[c]|i[c-1]<<8|i[c-2]<<16,this.words[p]|=b<>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);else if(u==="le")for(c=0,p=0;c>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);return this.strip()};function m(h,i){var f=h.charCodeAt(i);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function y(h,i,f){var u=m(h,f);return f-1>=i&&(u|=m(h,f-1)<<4),u}a.prototype._parseHex=function(i,f,u){this.length=Math.ceil((i.length-f)/6),this.words=new Array(this.length);for(var c=0;c=f;c-=2)g=y(i,f,c)<=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8;else{var l=i.length-f;for(c=l%2===0?f+1:f;c=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8}this.strip()};function w(h,i,f,u){for(var c=0,p=Math.min(h.length,f),b=i;b=49?c+=g-49+10:g>=17?c+=g-17+10:c+=g}return c}a.prototype._parseBase=function(i,f,u){this.words=[0],this.length=1;for(var c=0,p=1;p<=67108863;p*=f)c++;c--,p=p/f|0;for(var b=i.length-u,g=b%c,l=Math.min(b,b-g)+u,s=0,v=u;v1&&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},a.prototype.inspect=function(){return(this.red?""};var M=["","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"],_=[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],E=[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(i,f){i=i||10,f=f|0||1;var u;if(i===16||i==="hex"){u="";for(var c=0,p=0,b=0;b>>24-c&16777215,p!==0||b!==this.length-1?u=M[6-l.length]+l+u:u=l+u,c+=2,c>=26&&(c-=26,b--)}for(p!==0&&(u=p.toString(16)+u);u.length%f!==0;)u="0"+u;return this.negative!==0&&(u="-"+u),u}if(i===(i|0)&&i>=2&&i<=36){var s=_[i],v=E[i];u="";var x=this.clone();for(x.negative=0;!x.isZero();){var C=x.modn(v).toString(i);x=x.idivn(v),x.isZero()?u=C+u:u=M[s-C.length]+C+u}for(this.isZero()&&(u="0"+u);u.length%f!==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 i=this.words[0];return this.length===2?i+=this.words[1]*67108864:this.length===3&&this.words[2]===1?i+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-i:i},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(i,f){return n(typeof d<"u"),this.toArrayLike(d,i,f)},a.prototype.toArray=function(i,f){return this.toArrayLike(Array,i,f)},a.prototype.toArrayLike=function(i,f,u){var c=this.byteLength(),p=u||Math.max(1,c);n(c<=p,"byte array longer than desired length"),n(p>0,"Requested array length <= 0"),this.strip();var b=f==="le",g=new i(p),l,s,v=this.clone();if(b){for(s=0;!v.isZero();s++)l=v.andln(255),v.iushrn(8),g[s]=l;for(;s=4096&&(u+=13,f>>>=13),f>=64&&(u+=7,f>>>=7),f>=8&&(u+=4,f>>>=4),f>=2&&(u+=2,f>>>=2),u+f},a.prototype._zeroBits=function(i){if(i===0)return 26;var f=i,u=0;return(f&8191)===0&&(u+=13,f>>>=13),(f&127)===0&&(u+=7,f>>>=7),(f&15)===0&&(u+=4,f>>>=4),(f&3)===0&&(u+=2,f>>>=2),(f&1)===0&&u++,u},a.prototype.bitLength=function(){var i=this.words[this.length-1],f=this._countBits(i);return(this.length-1)*26+f};function S(h){for(var i=new Array(h.bitLength()),f=0;f>>c}return i}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var i=0,f=0;fi.length?this.clone().ior(i):i.clone().ior(this)},a.prototype.uor=function(i){return this.length>i.length?this.clone().iuor(i):i.clone().iuor(this)},a.prototype.iuand=function(i){var f;this.length>i.length?f=i:f=this;for(var u=0;ui.length?this.clone().iand(i):i.clone().iand(this)},a.prototype.uand=function(i){return this.length>i.length?this.clone().iuand(i):i.clone().iuand(this)},a.prototype.iuxor=function(i){var f,u;this.length>i.length?(f=this,u=i):(f=i,u=this);for(var c=0;ci.length?this.clone().ixor(i):i.clone().ixor(this)},a.prototype.uxor=function(i){return this.length>i.length?this.clone().iuxor(i):i.clone().iuxor(this)},a.prototype.inotn=function(i){n(typeof i=="number"&&i>=0);var f=Math.ceil(i/26)|0,u=i%26;this._expand(f),u>0&&f--;for(var c=0;c0&&(this.words[c]=~this.words[c]&67108863>>26-u),this.strip()},a.prototype.notn=function(i){return this.clone().inotn(i)},a.prototype.setn=function(i,f){n(typeof i=="number"&&i>=0);var u=i/26|0,c=i%26;return this._expand(u+1),f?this.words[u]=this.words[u]|1<i.length?(u=this,c=i):(u=i,c=this);for(var p=0,b=0;b>>26;for(;p!==0&&b>>26;if(this.length=u.length,p!==0)this.words[this.length]=p,this.length++;else if(u!==this)for(;bi.length?this.clone().iadd(i):i.clone().iadd(this)},a.prototype.isub=function(i){if(i.negative!==0){i.negative=0;var f=this.iadd(i);return i.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(i),this.negative=1,this._normSign();var u=this.cmp(i);if(u===0)return this.negative=0,this.length=1,this.words[0]=0,this;var c,p;u>0?(c=this,p=i):(c=i,p=this);for(var b=0,g=0;g>26,this.words[g]=f&67108863;for(;b!==0&&g>26,this.words[g]=f&67108863;if(b===0&&g>>26,x=l&67108863,C=Math.min(s,i.length-1),B=Math.max(0,s-h.length+1);B<=C;B++){var k=s-B|0;c=h.words[k]|0,p=i.words[B]|0,b=c*p+x,v+=b/67108864|0,x=b&67108863}f.words[s]=x|0,l=v|0}return l!==0?f.words[s]=l|0:f.length--,f.strip()}var T=function(i,f,u){var c=i.words,p=f.words,b=u.words,g=0,l,s,v,x=c[0]|0,C=x&8191,B=x>>>13,k=c[1]|0,R=k&8191,D=k>>>13,z=c[2]|0,H=z&8191,V=z>>>13,U=c[3]|0,F=U&8191,G=U>>>13,ie=c[4]|0,Y=ie&8191,oe=ie>>>13,xe=c[5]|0,ne=xe&8191,Q=xe>>>13,te=c[6]|0,ee=te&8191,se=te>>>13,_e=c[7]|0,K=_e&8191,re=_e>>>13,Te=c[8]|0,ae=Te&8191,Me=Te>>>13,ze=c[9]|0,fe=ze&8191,Se=ze>>>13,He=p[0]|0,ue=He&8191,Ae=He>>>13,Ue=p[1]|0,he=Ue&8191,Ce=Ue>>>13,je=p[2]|0,de=je&8191,Oe=je>>>13,Ve=p[3]|0,pe=Ve&8191,Pe=Ve>>>13,Ke=p[4]|0,ve=Ke&8191,Be=Ke>>>13,Ge=p[5]|0,me=Ge&8191,Ie=Ge>>>13,We=p[6]|0,ge=We&8191,$e=We>>>13,Ze=p[7]|0,ye=Ze&8191,Le=Ze>>>13,Ye=p[8]|0,be=Ye&8191,De=Ye>>>13,Xe=p[9]|0,we=Xe&8191,Re=Xe>>>13;u.negative=i.negative^f.negative,u.length=19,l=Math.imul(C,ue),s=Math.imul(C,Ae),s=s+Math.imul(B,ue)|0,v=Math.imul(B,Ae);var tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(tt>>>26)|0,tt&=67108863,l=Math.imul(R,ue),s=Math.imul(R,Ae),s=s+Math.imul(D,ue)|0,v=Math.imul(D,Ae),l=l+Math.imul(C,he)|0,s=s+Math.imul(C,Ce)|0,s=s+Math.imul(B,he)|0,v=v+Math.imul(B,Ce)|0;var rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(rt>>>26)|0,rt&=67108863,l=Math.imul(H,ue),s=Math.imul(H,Ae),s=s+Math.imul(V,ue)|0,v=Math.imul(V,Ae),l=l+Math.imul(R,he)|0,s=s+Math.imul(R,Ce)|0,s=s+Math.imul(D,he)|0,v=v+Math.imul(D,Ce)|0,l=l+Math.imul(C,de)|0,s=s+Math.imul(C,Oe)|0,s=s+Math.imul(B,de)|0,v=v+Math.imul(B,Oe)|0;var ut=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ut>>>26)|0,ut&=67108863,l=Math.imul(F,ue),s=Math.imul(F,Ae),s=s+Math.imul(G,ue)|0,v=Math.imul(G,Ae),l=l+Math.imul(H,he)|0,s=s+Math.imul(H,Ce)|0,s=s+Math.imul(V,he)|0,v=v+Math.imul(V,Ce)|0,l=l+Math.imul(R,de)|0,s=s+Math.imul(R,Oe)|0,s=s+Math.imul(D,de)|0,v=v+Math.imul(D,Oe)|0,l=l+Math.imul(C,pe)|0,s=s+Math.imul(C,Pe)|0,s=s+Math.imul(B,pe)|0,v=v+Math.imul(B,Pe)|0;var lt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(lt>>>26)|0,lt&=67108863,l=Math.imul(Y,ue),s=Math.imul(Y,Ae),s=s+Math.imul(oe,ue)|0,v=Math.imul(oe,Ae),l=l+Math.imul(F,he)|0,s=s+Math.imul(F,Ce)|0,s=s+Math.imul(G,he)|0,v=v+Math.imul(G,Ce)|0,l=l+Math.imul(H,de)|0,s=s+Math.imul(H,Oe)|0,s=s+Math.imul(V,de)|0,v=v+Math.imul(V,Oe)|0,l=l+Math.imul(R,pe)|0,s=s+Math.imul(R,Pe)|0,s=s+Math.imul(D,pe)|0,v=v+Math.imul(D,Pe)|0,l=l+Math.imul(C,ve)|0,s=s+Math.imul(C,Be)|0,s=s+Math.imul(B,ve)|0,v=v+Math.imul(B,Be)|0;var ht=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ht>>>26)|0,ht&=67108863,l=Math.imul(ne,ue),s=Math.imul(ne,Ae),s=s+Math.imul(Q,ue)|0,v=Math.imul(Q,Ae),l=l+Math.imul(Y,he)|0,s=s+Math.imul(Y,Ce)|0,s=s+Math.imul(oe,he)|0,v=v+Math.imul(oe,Ce)|0,l=l+Math.imul(F,de)|0,s=s+Math.imul(F,Oe)|0,s=s+Math.imul(G,de)|0,v=v+Math.imul(G,Oe)|0,l=l+Math.imul(H,pe)|0,s=s+Math.imul(H,Pe)|0,s=s+Math.imul(V,pe)|0,v=v+Math.imul(V,Pe)|0,l=l+Math.imul(R,ve)|0,s=s+Math.imul(R,Be)|0,s=s+Math.imul(D,ve)|0,v=v+Math.imul(D,Be)|0,l=l+Math.imul(C,me)|0,s=s+Math.imul(C,Ie)|0,s=s+Math.imul(B,me)|0,v=v+Math.imul(B,Ie)|0;var ct=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ct>>>26)|0,ct&=67108863,l=Math.imul(ee,ue),s=Math.imul(ee,Ae),s=s+Math.imul(se,ue)|0,v=Math.imul(se,Ae),l=l+Math.imul(ne,he)|0,s=s+Math.imul(ne,Ce)|0,s=s+Math.imul(Q,he)|0,v=v+Math.imul(Q,Ce)|0,l=l+Math.imul(Y,de)|0,s=s+Math.imul(Y,Oe)|0,s=s+Math.imul(oe,de)|0,v=v+Math.imul(oe,Oe)|0,l=l+Math.imul(F,pe)|0,s=s+Math.imul(F,Pe)|0,s=s+Math.imul(G,pe)|0,v=v+Math.imul(G,Pe)|0,l=l+Math.imul(H,ve)|0,s=s+Math.imul(H,Be)|0,s=s+Math.imul(V,ve)|0,v=v+Math.imul(V,Be)|0,l=l+Math.imul(R,me)|0,s=s+Math.imul(R,Ie)|0,s=s+Math.imul(D,me)|0,v=v+Math.imul(D,Ie)|0,l=l+Math.imul(C,ge)|0,s=s+Math.imul(C,$e)|0,s=s+Math.imul(B,ge)|0,v=v+Math.imul(B,$e)|0;var dt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(dt>>>26)|0,dt&=67108863,l=Math.imul(K,ue),s=Math.imul(K,Ae),s=s+Math.imul(re,ue)|0,v=Math.imul(re,Ae),l=l+Math.imul(ee,he)|0,s=s+Math.imul(ee,Ce)|0,s=s+Math.imul(se,he)|0,v=v+Math.imul(se,Ce)|0,l=l+Math.imul(ne,de)|0,s=s+Math.imul(ne,Oe)|0,s=s+Math.imul(Q,de)|0,v=v+Math.imul(Q,Oe)|0,l=l+Math.imul(Y,pe)|0,s=s+Math.imul(Y,Pe)|0,s=s+Math.imul(oe,pe)|0,v=v+Math.imul(oe,Pe)|0,l=l+Math.imul(F,ve)|0,s=s+Math.imul(F,Be)|0,s=s+Math.imul(G,ve)|0,v=v+Math.imul(G,Be)|0,l=l+Math.imul(H,me)|0,s=s+Math.imul(H,Ie)|0,s=s+Math.imul(V,me)|0,v=v+Math.imul(V,Ie)|0,l=l+Math.imul(R,ge)|0,s=s+Math.imul(R,$e)|0,s=s+Math.imul(D,ge)|0,v=v+Math.imul(D,$e)|0,l=l+Math.imul(C,ye)|0,s=s+Math.imul(C,Le)|0,s=s+Math.imul(B,ye)|0,v=v+Math.imul(B,Le)|0;var yt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(yt>>>26)|0,yt&=67108863,l=Math.imul(ae,ue),s=Math.imul(ae,Ae),s=s+Math.imul(Me,ue)|0,v=Math.imul(Me,Ae),l=l+Math.imul(K,he)|0,s=s+Math.imul(K,Ce)|0,s=s+Math.imul(re,he)|0,v=v+Math.imul(re,Ce)|0,l=l+Math.imul(ee,de)|0,s=s+Math.imul(ee,Oe)|0,s=s+Math.imul(se,de)|0,v=v+Math.imul(se,Oe)|0,l=l+Math.imul(ne,pe)|0,s=s+Math.imul(ne,Pe)|0,s=s+Math.imul(Q,pe)|0,v=v+Math.imul(Q,Pe)|0,l=l+Math.imul(Y,ve)|0,s=s+Math.imul(Y,Be)|0,s=s+Math.imul(oe,ve)|0,v=v+Math.imul(oe,Be)|0,l=l+Math.imul(F,me)|0,s=s+Math.imul(F,Ie)|0,s=s+Math.imul(G,me)|0,v=v+Math.imul(G,Ie)|0,l=l+Math.imul(H,ge)|0,s=s+Math.imul(H,$e)|0,s=s+Math.imul(V,ge)|0,v=v+Math.imul(V,$e)|0,l=l+Math.imul(R,ye)|0,s=s+Math.imul(R,Le)|0,s=s+Math.imul(D,ye)|0,v=v+Math.imul(D,Le)|0,l=l+Math.imul(C,be)|0,s=s+Math.imul(C,De)|0,s=s+Math.imul(B,be)|0,v=v+Math.imul(B,De)|0;var bt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(bt>>>26)|0,bt&=67108863,l=Math.imul(fe,ue),s=Math.imul(fe,Ae),s=s+Math.imul(Se,ue)|0,v=Math.imul(Se,Ae),l=l+Math.imul(ae,he)|0,s=s+Math.imul(ae,Ce)|0,s=s+Math.imul(Me,he)|0,v=v+Math.imul(Me,Ce)|0,l=l+Math.imul(K,de)|0,s=s+Math.imul(K,Oe)|0,s=s+Math.imul(re,de)|0,v=v+Math.imul(re,Oe)|0,l=l+Math.imul(ee,pe)|0,s=s+Math.imul(ee,Pe)|0,s=s+Math.imul(se,pe)|0,v=v+Math.imul(se,Pe)|0,l=l+Math.imul(ne,ve)|0,s=s+Math.imul(ne,Be)|0,s=s+Math.imul(Q,ve)|0,v=v+Math.imul(Q,Be)|0,l=l+Math.imul(Y,me)|0,s=s+Math.imul(Y,Ie)|0,s=s+Math.imul(oe,me)|0,v=v+Math.imul(oe,Ie)|0,l=l+Math.imul(F,ge)|0,s=s+Math.imul(F,$e)|0,s=s+Math.imul(G,ge)|0,v=v+Math.imul(G,$e)|0,l=l+Math.imul(H,ye)|0,s=s+Math.imul(H,Le)|0,s=s+Math.imul(V,ye)|0,v=v+Math.imul(V,Le)|0,l=l+Math.imul(R,be)|0,s=s+Math.imul(R,De)|0,s=s+Math.imul(D,be)|0,v=v+Math.imul(D,De)|0,l=l+Math.imul(C,we)|0,s=s+Math.imul(C,Re)|0,s=s+Math.imul(B,we)|0,v=v+Math.imul(B,Re)|0;var wt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(wt>>>26)|0,wt&=67108863,l=Math.imul(fe,he),s=Math.imul(fe,Ce),s=s+Math.imul(Se,he)|0,v=Math.imul(Se,Ce),l=l+Math.imul(ae,de)|0,s=s+Math.imul(ae,Oe)|0,s=s+Math.imul(Me,de)|0,v=v+Math.imul(Me,Oe)|0,l=l+Math.imul(K,pe)|0,s=s+Math.imul(K,Pe)|0,s=s+Math.imul(re,pe)|0,v=v+Math.imul(re,Pe)|0,l=l+Math.imul(ee,ve)|0,s=s+Math.imul(ee,Be)|0,s=s+Math.imul(se,ve)|0,v=v+Math.imul(se,Be)|0,l=l+Math.imul(ne,me)|0,s=s+Math.imul(ne,Ie)|0,s=s+Math.imul(Q,me)|0,v=v+Math.imul(Q,Ie)|0,l=l+Math.imul(Y,ge)|0,s=s+Math.imul(Y,$e)|0,s=s+Math.imul(oe,ge)|0,v=v+Math.imul(oe,$e)|0,l=l+Math.imul(F,ye)|0,s=s+Math.imul(F,Le)|0,s=s+Math.imul(G,ye)|0,v=v+Math.imul(G,Le)|0,l=l+Math.imul(H,be)|0,s=s+Math.imul(H,De)|0,s=s+Math.imul(V,be)|0,v=v+Math.imul(V,De)|0,l=l+Math.imul(R,we)|0,s=s+Math.imul(R,Re)|0,s=s+Math.imul(D,we)|0,v=v+Math.imul(D,Re)|0;var Mt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,l=Math.imul(fe,de),s=Math.imul(fe,Oe),s=s+Math.imul(Se,de)|0,v=Math.imul(Se,Oe),l=l+Math.imul(ae,pe)|0,s=s+Math.imul(ae,Pe)|0,s=s+Math.imul(Me,pe)|0,v=v+Math.imul(Me,Pe)|0,l=l+Math.imul(K,ve)|0,s=s+Math.imul(K,Be)|0,s=s+Math.imul(re,ve)|0,v=v+Math.imul(re,Be)|0,l=l+Math.imul(ee,me)|0,s=s+Math.imul(ee,Ie)|0,s=s+Math.imul(se,me)|0,v=v+Math.imul(se,Ie)|0,l=l+Math.imul(ne,ge)|0,s=s+Math.imul(ne,$e)|0,s=s+Math.imul(Q,ge)|0,v=v+Math.imul(Q,$e)|0,l=l+Math.imul(Y,ye)|0,s=s+Math.imul(Y,Le)|0,s=s+Math.imul(oe,ye)|0,v=v+Math.imul(oe,Le)|0,l=l+Math.imul(F,be)|0,s=s+Math.imul(F,De)|0,s=s+Math.imul(G,be)|0,v=v+Math.imul(G,De)|0,l=l+Math.imul(H,we)|0,s=s+Math.imul(H,Re)|0,s=s+Math.imul(V,we)|0,v=v+Math.imul(V,Re)|0;var xt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(xt>>>26)|0,xt&=67108863,l=Math.imul(fe,pe),s=Math.imul(fe,Pe),s=s+Math.imul(Se,pe)|0,v=Math.imul(Se,Pe),l=l+Math.imul(ae,ve)|0,s=s+Math.imul(ae,Be)|0,s=s+Math.imul(Me,ve)|0,v=v+Math.imul(Me,Be)|0,l=l+Math.imul(K,me)|0,s=s+Math.imul(K,Ie)|0,s=s+Math.imul(re,me)|0,v=v+Math.imul(re,Ie)|0,l=l+Math.imul(ee,ge)|0,s=s+Math.imul(ee,$e)|0,s=s+Math.imul(se,ge)|0,v=v+Math.imul(se,$e)|0,l=l+Math.imul(ne,ye)|0,s=s+Math.imul(ne,Le)|0,s=s+Math.imul(Q,ye)|0,v=v+Math.imul(Q,Le)|0,l=l+Math.imul(Y,be)|0,s=s+Math.imul(Y,De)|0,s=s+Math.imul(oe,be)|0,v=v+Math.imul(oe,De)|0,l=l+Math.imul(F,we)|0,s=s+Math.imul(F,Re)|0,s=s+Math.imul(G,we)|0,v=v+Math.imul(G,Re)|0;var _t=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(_t>>>26)|0,_t&=67108863,l=Math.imul(fe,ve),s=Math.imul(fe,Be),s=s+Math.imul(Se,ve)|0,v=Math.imul(Se,Be),l=l+Math.imul(ae,me)|0,s=s+Math.imul(ae,Ie)|0,s=s+Math.imul(Me,me)|0,v=v+Math.imul(Me,Ie)|0,l=l+Math.imul(K,ge)|0,s=s+Math.imul(K,$e)|0,s=s+Math.imul(re,ge)|0,v=v+Math.imul(re,$e)|0,l=l+Math.imul(ee,ye)|0,s=s+Math.imul(ee,Le)|0,s=s+Math.imul(se,ye)|0,v=v+Math.imul(se,Le)|0,l=l+Math.imul(ne,be)|0,s=s+Math.imul(ne,De)|0,s=s+Math.imul(Q,be)|0,v=v+Math.imul(Q,De)|0,l=l+Math.imul(Y,we)|0,s=s+Math.imul(Y,Re)|0,s=s+Math.imul(oe,we)|0,v=v+Math.imul(oe,Re)|0;var Et=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Et>>>26)|0,Et&=67108863,l=Math.imul(fe,me),s=Math.imul(fe,Ie),s=s+Math.imul(Se,me)|0,v=Math.imul(Se,Ie),l=l+Math.imul(ae,ge)|0,s=s+Math.imul(ae,$e)|0,s=s+Math.imul(Me,ge)|0,v=v+Math.imul(Me,$e)|0,l=l+Math.imul(K,ye)|0,s=s+Math.imul(K,Le)|0,s=s+Math.imul(re,ye)|0,v=v+Math.imul(re,Le)|0,l=l+Math.imul(ee,be)|0,s=s+Math.imul(ee,De)|0,s=s+Math.imul(se,be)|0,v=v+Math.imul(se,De)|0,l=l+Math.imul(ne,we)|0,s=s+Math.imul(ne,Re)|0,s=s+Math.imul(Q,we)|0,v=v+Math.imul(Q,Re)|0;var St=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(St>>>26)|0,St&=67108863,l=Math.imul(fe,ge),s=Math.imul(fe,$e),s=s+Math.imul(Se,ge)|0,v=Math.imul(Se,$e),l=l+Math.imul(ae,ye)|0,s=s+Math.imul(ae,Le)|0,s=s+Math.imul(Me,ye)|0,v=v+Math.imul(Me,Le)|0,l=l+Math.imul(K,be)|0,s=s+Math.imul(K,De)|0,s=s+Math.imul(re,be)|0,v=v+Math.imul(re,De)|0,l=l+Math.imul(ee,we)|0,s=s+Math.imul(ee,Re)|0,s=s+Math.imul(se,we)|0,v=v+Math.imul(se,Re)|0;var At=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(At>>>26)|0,At&=67108863,l=Math.imul(fe,ye),s=Math.imul(fe,Le),s=s+Math.imul(Se,ye)|0,v=Math.imul(Se,Le),l=l+Math.imul(ae,be)|0,s=s+Math.imul(ae,De)|0,s=s+Math.imul(Me,be)|0,v=v+Math.imul(Me,De)|0,l=l+Math.imul(K,we)|0,s=s+Math.imul(K,Re)|0,s=s+Math.imul(re,we)|0,v=v+Math.imul(re,Re)|0;var Tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,l=Math.imul(fe,be),s=Math.imul(fe,De),s=s+Math.imul(Se,be)|0,v=Math.imul(Se,De),l=l+Math.imul(ae,we)|0,s=s+Math.imul(ae,Re)|0,s=s+Math.imul(Me,we)|0,v=v+Math.imul(Me,Re)|0;var Rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,l=Math.imul(fe,we),s=Math.imul(fe,Re),s=s+Math.imul(Se,we)|0,v=Math.imul(Se,Re);var qt=(g+l|0)+((s&8191)<<13)|0;return g=(v+(s>>>13)|0)+(qt>>>26)|0,qt&=67108863,b[0]=tt,b[1]=rt,b[2]=ut,b[3]=lt,b[4]=ht,b[5]=ct,b[6]=dt,b[7]=yt,b[8]=bt,b[9]=wt,b[10]=Mt,b[11]=xt,b[12]=_t,b[13]=Et,b[14]=St,b[15]=At,b[16]=Tt,b[17]=Rt,b[18]=qt,g!==0&&(b[19]=g,u.length++),u};Math.imul||(T=A);function I(h,i,f){f.negative=i.negative^h.negative,f.length=h.length+i.length;for(var u=0,c=0,p=0;p>>26)|0,c+=b>>>26,b&=67108863}f.words[p]=g,u=b,b=c}return u!==0?f.words[p]=u:f.length--,f.strip()}function O(h,i,f){var u=new P;return u.mulp(h,i,f)}a.prototype.mulTo=function(i,f){var u,c=this.length+i.length;return this.length===10&&i.length===10?u=T(this,i,f):c<63?u=A(this,i,f):c<1024?u=I(this,i,f):u=O(this,i,f),u};function P(h,i){this.x=h,this.y=i}P.prototype.makeRBT=function(i){for(var f=new Array(i),u=a.prototype._countBits(i)-1,c=0;c>=1;return c},P.prototype.permute=function(i,f,u,c,p,b){for(var g=0;g>>1)p++;return 1<>>13,u[2*b+1]=p&8191,p=p>>>13;for(b=2*f;b>=26,f+=c/67108864|0,f+=p>>>26,this.words[u]=p&67108863}return f!==0&&(this.words[u]=f,this.length++),this},a.prototype.muln=function(i){return this.clone().imuln(i)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(i){var f=S(i);if(f.length===0)return new a(1);for(var u=this,c=0;c=0);var f=i%26,u=(i-f)/26,c=67108863>>>26-f<<26-f,p;if(f!==0){var b=0;for(p=0;p>>26-f}b&&(this.words[p]=b,this.length++)}if(u!==0){for(p=this.length-1;p>=0;p--)this.words[p+u]=this.words[p];for(p=0;p=0);var c;f?c=(f-f%26)/26:c=0;var p=i%26,b=Math.min((i-p)/26,this.length),g=67108863^67108863>>>p<b)for(this.length-=b,s=0;s=0&&(v!==0||s>=c);s--){var x=this.words[s]|0;this.words[s]=v<<26-p|x>>>p,v=x&g}return l&&v!==0&&(l.words[l.length++]=v),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(i,f,u){return n(this.negative===0),this.iushrn(i,f,u)},a.prototype.shln=function(i){return this.clone().ishln(i)},a.prototype.ushln=function(i){return this.clone().iushln(i)},a.prototype.shrn=function(i){return this.clone().ishrn(i)},a.prototype.ushrn=function(i){return this.clone().iushrn(i)},a.prototype.testn=function(i){n(typeof i=="number"&&i>=0);var f=i%26,u=(i-f)/26,c=1<=0);var f=i%26,u=(i-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=u)return this;if(f!==0&&u++,this.length=Math.min(u,this.length),f!==0){var c=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},a.prototype.isubn=function(i){if(n(typeof i=="number"),n(i<67108864),i<0)return this.iaddn(-i);if(this.negative!==0)return this.negative=0,this.iaddn(i),this.negative=1,this;if(this.words[0]-=i,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(l/67108864|0),this.words[p+u]=b&67108863}for(;p>26,this.words[p+u]=b&67108863;if(g===0)return this.strip();for(n(g===-1),g=0,p=0;p>26,this.words[p]=b&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(i,f){var u=this.length-i.length,c=this.clone(),p=i,b=p.words[p.length-1]|0,g=this._countBits(b);u=26-g,u!==0&&(p=p.ushln(u),c.iushln(u),b=p.words[p.length-1]|0);var l=c.length-p.length,s;if(f!=="mod"){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var v=0;v=0;C--){var B=(c.words[p.length+C]|0)*67108864+(c.words[p.length+C-1]|0);for(B=Math.min(B/b|0,67108863),c._ishlnsubmul(p,B,C);c.negative!==0;)B--,c.negative=0,c._ishlnsubmul(p,1,C),c.isZero()||(c.negative^=1);s&&(s.words[C]=B)}return s&&s.strip(),c.strip(),f!=="div"&&u!==0&&c.iushrn(u),{div:s||null,mod:c}},a.prototype.divmod=function(i,f,u){if(n(!i.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var c,p,b;return this.negative!==0&&i.negative===0?(b=this.neg().divmod(i,f),f!=="mod"&&(c=b.div.neg()),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.iadd(i)),{div:c,mod:p}):this.negative===0&&i.negative!==0?(b=this.divmod(i.neg(),f),f!=="mod"&&(c=b.div.neg()),{div:c,mod:b.mod}):(this.negative&i.negative)!==0?(b=this.neg().divmod(i.neg(),f),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.isub(i)),{div:b.div,mod:p}):i.length>this.length||this.cmp(i)<0?{div:new a(0),mod:this}:i.length===1?f==="div"?{div:this.divn(i.words[0]),mod:null}:f==="mod"?{div:null,mod:new a(this.modn(i.words[0]))}:{div:this.divn(i.words[0]),mod:new a(this.modn(i.words[0]))}:this._wordDiv(i,f)},a.prototype.div=function(i){return this.divmod(i,"div",!1).div},a.prototype.mod=function(i){return this.divmod(i,"mod",!1).mod},a.prototype.umod=function(i){return this.divmod(i,"mod",!0).mod},a.prototype.divRound=function(i){var f=this.divmod(i);if(f.mod.isZero())return f.div;var u=f.div.negative!==0?f.mod.isub(i):f.mod,c=i.ushrn(1),p=i.andln(1),b=u.cmp(c);return b<0||p===1&&b===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},a.prototype.modn=function(i){n(i<=67108863);for(var f=(1<<26)%i,u=0,c=this.length-1;c>=0;c--)u=(f*u+(this.words[c]|0))%i;return u},a.prototype.idivn=function(i){n(i<=67108863);for(var f=0,u=this.length-1;u>=0;u--){var c=(this.words[u]|0)+f*67108864;this.words[u]=c/i|0,f=c%i}return this.strip()},a.prototype.divn=function(i){return this.clone().idivn(i)},a.prototype.egcd=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=new a(0),g=new a(1),l=0;f.isEven()&&u.isEven();)f.iushrn(1),u.iushrn(1),++l;for(var s=u.clone(),v=f.clone();!f.isZero();){for(var x=0,C=1;(f.words[0]&C)===0&&x<26;++x,C<<=1);if(x>0)for(f.iushrn(x);x-- >0;)(c.isOdd()||p.isOdd())&&(c.iadd(s),p.isub(v)),c.iushrn(1),p.iushrn(1);for(var B=0,k=1;(u.words[0]&k)===0&&B<26;++B,k<<=1);if(B>0)for(u.iushrn(B);B-- >0;)(b.isOdd()||g.isOdd())&&(b.iadd(s),g.isub(v)),b.iushrn(1),g.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(b),p.isub(g)):(u.isub(f),b.isub(c),g.isub(p))}return{a:b,b:g,gcd:u.iushln(l)}},a.prototype._invmp=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=u.clone();f.cmpn(1)>0&&u.cmpn(1)>0;){for(var g=0,l=1;(f.words[0]&l)===0&&g<26;++g,l<<=1);if(g>0)for(f.iushrn(g);g-- >0;)c.isOdd()&&c.iadd(b),c.iushrn(1);for(var s=0,v=1;(u.words[0]&v)===0&&s<26;++s,v<<=1);if(s>0)for(u.iushrn(s);s-- >0;)p.isOdd()&&p.iadd(b),p.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(p)):(u.isub(f),p.isub(c))}var x;return f.cmpn(1)===0?x=c:x=p,x.cmpn(0)<0&&x.iadd(i),x},a.prototype.gcd=function(i){if(this.isZero())return i.abs();if(i.isZero())return this.abs();var f=this.clone(),u=i.clone();f.negative=0,u.negative=0;for(var c=0;f.isEven()&&u.isEven();c++)f.iushrn(1),u.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;u.isEven();)u.iushrn(1);var p=f.cmp(u);if(p<0){var b=f;f=u,u=b}else if(p===0||u.cmpn(1)===0)break;f.isub(u)}while(!0);return u.iushln(c)},a.prototype.invm=function(i){return this.egcd(i).a.umod(i)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(i){return this.words[0]&i},a.prototype.bincn=function(i){n(typeof i=="number");var f=i%26,u=(i-f)/26,c=1<>>26,g&=67108863,this.words[b]=g}return p!==0&&(this.words[b]=p,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(i){var f=i<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var u;if(this.length>1)u=1;else{f&&(i=-i),n(i<=67108863,"Number is too big");var c=this.words[0]|0;u=c===i?0:ci.length)return 1;if(this.length=0;u--){var c=this.words[u]|0,p=i.words[u]|0;if(c!==p){cp&&(f=1);break}}return f},a.prototype.gtn=function(i){return this.cmpn(i)===1},a.prototype.gt=function(i){return this.cmp(i)===1},a.prototype.gten=function(i){return this.cmpn(i)>=0},a.prototype.gte=function(i){return this.cmp(i)>=0},a.prototype.ltn=function(i){return this.cmpn(i)===-1},a.prototype.lt=function(i){return this.cmp(i)===-1},a.prototype.lten=function(i){return this.cmpn(i)<=0},a.prototype.lte=function(i){return this.cmp(i)<=0},a.prototype.eqn=function(i){return this.cmpn(i)===0},a.prototype.eq=function(i){return this.cmp(i)===0},a.red=function(i){return new W(i)},a.prototype.toRed=function(i){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),i.convertTo(this)._forceRed(i)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(i){return this.red=i,this},a.prototype.forceRed=function(i){return n(!this.red,"Already a number in reduction context"),this._forceRed(i)},a.prototype.redAdd=function(i){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,i)},a.prototype.redIAdd=function(i){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,i)},a.prototype.redSub=function(i){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,i)},a.prototype.redISub=function(i){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,i)},a.prototype.redShl=function(i){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,i)},a.prototype.redMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.mul(this,i)},a.prototype.redIMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.imul(this,i)},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(i){return n(this.red&&!i.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,i)};var L={k256:null,p224:null,p192:null,p25519:null};function N(h,i){this.name=h,this.p=new a(i,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var i=new a(null);return i.words=new Array(Math.ceil(this.n/13)),i},N.prototype.ireduce=function(i){var f=i,u;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),u=f.bitLength();while(u>this.n);var c=u0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},N.prototype.split=function(i,f){i.iushrn(this.n,0,f)},N.prototype.imulK=function(i){return i.imul(this.k)};function q(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(q,N),q.prototype.split=function(i,f){for(var u=4194303,c=Math.min(i.length,9),p=0;p>>22,b=g}b>>>=22,i.words[p-10]=b,b===0&&i.length>10?i.length-=10:i.length-=9},q.prototype.imulK=function(i){i.words[i.length]=0,i.words[i.length+1]=0,i.length+=2;for(var f=0,u=0;u>>=26,i.words[u]=p,f=c}return f!==0&&(i.words[i.length++]=f),i},a._prime=function(i){if(L[i])return L[i];var f;if(i==="k256")f=new q;else if(i==="p224")f=new X;else if(i==="p192")f=new J;else if(i==="p25519")f=new Z;else throw new Error("Unknown prime "+i);return L[i]=f,f};function W(h){if(typeof h=="string"){var i=a._prime(h);this.m=i.p,this.prime=i}else n(h.gtn(1),"modulus must be greater than 1"),this.m=h,this.prime=null}W.prototype._verify1=function(i){n(i.negative===0,"red works only with positives"),n(i.red,"red works only with red numbers")},W.prototype._verify2=function(i,f){n((i.negative|f.negative)===0,"red works only with positives"),n(i.red&&i.red===f.red,"red works only with red numbers")},W.prototype.imod=function(i){return this.prime?this.prime.ireduce(i)._forceRed(this):i.umod(this.m)._forceRed(this)},W.prototype.neg=function(i){return i.isZero()?i.clone():this.m.sub(i)._forceRed(this)},W.prototype.add=function(i,f){this._verify2(i,f);var u=i.add(f);return u.cmp(this.m)>=0&&u.isub(this.m),u._forceRed(this)},W.prototype.iadd=function(i,f){this._verify2(i,f);var u=i.iadd(f);return u.cmp(this.m)>=0&&u.isub(this.m),u},W.prototype.sub=function(i,f){this._verify2(i,f);var u=i.sub(f);return u.cmpn(0)<0&&u.iadd(this.m),u._forceRed(this)},W.prototype.isub=function(i,f){this._verify2(i,f);var u=i.isub(f);return u.cmpn(0)<0&&u.iadd(this.m),u},W.prototype.shl=function(i,f){return this._verify1(i),this.imod(i.ushln(f))},W.prototype.imul=function(i,f){return this._verify2(i,f),this.imod(i.imul(f))},W.prototype.mul=function(i,f){return this._verify2(i,f),this.imod(i.mul(f))},W.prototype.isqr=function(i){return this.imul(i,i.clone())},W.prototype.sqr=function(i){return this.mul(i,i)},W.prototype.sqrt=function(i){if(i.isZero())return i.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var u=this.m.add(new a(1)).iushrn(2);return this.pow(i,u)}for(var c=this.m.subn(1),p=0;!c.isZero()&&c.andln(1)===0;)p++,c.iushrn(1);n(!c.isZero());var b=new a(1).toRed(this),g=b.redNeg(),l=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new a(2*s*s).toRed(this);this.pow(s,l).cmp(g)!==0;)s.redIAdd(g);for(var v=this.pow(s,c),x=this.pow(i,c.addn(1).iushrn(1)),C=this.pow(i,c),B=p;C.cmp(b)!==0;){for(var k=C,R=0;k.cmp(b)!==0;R++)k=k.redSqr();n(R=0;p--){for(var v=f.words[p],x=s-1;x>=0;x--){var C=v>>x&1;if(b!==c[0]&&(b=this.sqr(b)),C===0&&g===0){l=0;continue}g<<=1,g|=C,l++,!(l!==u&&(p!==0||x!==0))&&(b=this.mul(b,c[g]),l=0,g=0)}s=26}return b},W.prototype.convertTo=function(i){var f=i.umod(this.m);return f===i?f.clone():f},W.prototype.convertFrom=function(i){var f=i.clone();return f.red=null,f},a.mont=function(i){return new $(i)};function $(h){W.call(this,h),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)}o($,W),$.prototype.convertTo=function(i){return this.imod(i.ushln(this.shift))},$.prototype.convertFrom=function(i){var f=this.imod(i.mul(this.rinv));return f.red=null,f},$.prototype.imul=function(i,f){if(i.isZero()||f.isZero())return i.words[0]=0,i.length=1,i;var u=i.imul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.mul=function(i,f){if(i.isZero()||f.isZero())return new a(0)._forceRed(this);var u=i.mul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.invm=function(i){var f=this.imod(i._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(e,Qe)})(Pi);var Hn=W_;function W_(e,t){if(!e)throw new Error(t||"Assertion failed")}W_.equal=function(t,r,n){if(t!=r)throw new Error(n||"Assertion failed: "+t+" != "+r)};var Dy={};(function(e){var t=e;function r(a,d){if(Array.isArray(a))return a.slice();if(!a)return[];var m=[];if(typeof a!="string"){for(var y=0;y>8,_=w&255;M?m.push(M,_):m.push(_)}return m}t.toArray=r;function n(a){return a.length===1?"0"+a:a}t.zero2=n;function o(a){for(var d="",m=0;m(A>>1)-1?O=(A>>1)-P:O=P,T.isubn(O)):O=0,S[I]=O,T.iushrn(1)}return S}t.getNAF=a;function d(M,_){var E=[[],[]];M=M.clone(),_=_.clone();for(var S=0,A=0,T;M.cmpn(-S)>0||_.cmpn(-A)>0;){var I=M.andln(3)+S&3,O=_.andln(3)+A&3;I===3&&(I=-1),O===3&&(O=-1);var P;(I&1)===0?P=0:(T=M.andln(7)+S&7,(T===3||T===5)&&O===2?P=-I:P=I),E[0].push(P);var L;(O&1)===0?L=0:(T=_.andln(7)+A&7,(T===3||T===5)&&I===2?L=-O:L=O),E[1].push(L),2*S===P+1&&(S=1-S),2*A===L+1&&(A=1-A),M.iushrn(1),_.iushrn(1)}return E}t.getJSF=d;function m(M,_,E){var S="_"+_;M.prototype[_]=function(){return this[S]!==void 0?this[S]:this[S]=E.call(this)}}t.cachedProperty=m;function y(M){return typeof M=="string"?t.toArray(M,"hex"):M}t.parseBytes=y;function w(M){return new r(M,"hex","le")}t.intFromLE=w})(_n);var Gl={exports:{}},vt={},Ai={exports:{}},gt={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(e,t){var r=on,n=r.Buffer;function o(d,m){for(var y in d)m[y]=d[y]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a);function a(d,m,y){return n(d,m,y)}a.prototype=Object.create(n.prototype),o(n,a),a.from=function(d,m,y){if(typeof d=="number")throw new TypeError("Argument must not be a number");return n(d,m,y)},a.alloc=function(d,m,y){if(typeof d!="number")throw new TypeError("Argument must be a number");var w=n(d);return m!==void 0?typeof y=="string"?w.fill(m,y):w.fill(m):w.fill(0),w},a.allocUnsafe=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return n(d)},a.allocUnsafeSlow=function(d){if(typeof d!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(d)}})(gt,gt.exports);var j1=65536,Xj=4294967295;function Jj(){throw new Error(`Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11`)}var Qj=gt.exports.Buffer,Bh=Qe.crypto||Qe.msCrypto;Bh&&Bh.getRandomValues?Ai.exports=eq:Ai.exports=Jj;function eq(e,t){if(e>Xj)throw new RangeError("requested too many random bytes");var r=Qj.allocUnsafe(e);if(e>0)if(e>j1)for(var n=0;n0?this.tail.next=T:this.head=T,this.tail=T,++this.length}},{key:"unshift",value:function(A){var T={data:A,next:this.head};this.length===0&&(this.tail=T),this.head=T,++this.length}},{key:"shift",value:function(){if(this.length!==0){var A=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,A}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(A){if(this.length===0)return"";for(var T=this.head,I=""+T.data;T=T.next;)I+=A+T.data;return I}},{key:"concat",value:function(A){if(this.length===0)return m.alloc(0);for(var T=m.allocUnsafe(A>>>0),I=this.head,O=0;I;)_(I.data,T,O),O+=I.data.length,I=I.next;return T}},{key:"consume",value:function(A,T){var I;return AP.length?P.length:A;if(L===P.length?O+=P:O+=P.slice(0,A),A-=L,A===0){L===P.length?(++I,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=P.slice(L));break}++I}return this.length-=I,O}},{key:"_getBuffer",value:function(A){var T=m.allocUnsafe(A),I=this.head,O=1;for(I.data.copy(T),A-=I.data.length;I=I.next;){var P=I.data,L=A>P.length?P.length:A;if(P.copy(T,T.length-A,0,L),A-=L,A===0){L===P.length?(++O,I.next?this.head=I.next:this.head=this.tail=null):(this.head=I,I.data=P.slice(L));break}++O}return this.length-=O,T}},{key:M,value:function(A,T){return w(this,t({},T,{depth:0,customInspect:!1}))}}]),E}(),q1}function rq(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ot.nextTick(og,this,e)):ot.nextTick(og,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?ot.nextTick(F0,r):(r._writableState.errorEmitted=!0,ot.nextTick(B6,r,a)):ot.nextTick(B6,r,a):t?(ot.nextTick(F0,r),t(a)):ot.nextTick(F0,r)}),this)}function B6(e,t){og(e,t),F0(e)}function F0(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function nq(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function og(e,t){e.emit("error",t)}function iq(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var Y_={destroy:rq,undestroy:nq,errorOrDestroy:iq},Io={};function aq(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var X_={};function Un(e,t,r){r||(r=Error);function n(a,d,m){return typeof t=="string"?t:t(a,d,m)}var o=function(a){aq(d,a);function d(m,y,w){return a.call(this,n(m,y,w))||this}return d}(r);o.prototype.name=r.name,o.prototype.code=e,X_[e]=o}function I6(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function oq(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function sq(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function fq(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Un("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Un("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&oq(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var o;if(sq(e," argument"))o="The ".concat(e," ").concat(n," ").concat(I6(t,"type"));else{var a=fq(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(I6(t,"type"))}return o+=". Received type ".concat(typeof r),o},TypeError);Un("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Un("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Un("ERR_STREAM_PREMATURE_CLOSE","Premature close");Un("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Un("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Un("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Un("ERR_STREAM_WRITE_AFTER_END","write after end");Un("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Un("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Un("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Io.codes=X_;var uq=Io.codes.ERR_INVALID_OPT_VALUE;function lq(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function hq(e,t,r,n){var o=lq(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var a=n?r:"highWaterMark";throw new uq(a,o)}return Math.floor(o)}return e.objectMode?16:16*1024}var J_={getHighWaterMark:hq},cq=dq;function dq(e,t){if(V1("noDeprecation"))return e;var r=!1;function n(){if(!r){if(V1("throwDeprecation"))throw new Error(t);V1("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function V1(e){try{if(!Qe.localStorage)return!1}catch{return!1}var t=Qe.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var K1,$6;function Q_(){if($6)return K1;$6=1,K1=Z;function e(R){var D=this;this.next=null,this.entry=null,this.finish=function(){k(D,R)}}var t;Z.WritableState=X;var r={deprecate:cq},n=Z_,o=on.Buffer,a=Qe.Uint8Array||function(){};function d(R){return o.from(R)}function m(R){return o.isBuffer(R)||R instanceof a}var y=Y_,w=J_,M=w.getHighWaterMark,_=Io.codes,E=_.ERR_INVALID_ARG_TYPE,S=_.ERR_METHOD_NOT_IMPLEMENTED,A=_.ERR_MULTIPLE_CALLBACK,T=_.ERR_STREAM_CANNOT_PIPE,I=_.ERR_STREAM_DESTROYED,O=_.ERR_STREAM_NULL_VALUES,P=_.ERR_STREAM_WRITE_AFTER_END,L=_.ERR_UNKNOWN_ENCODING,N=y.errorOrDestroy;mt.exports(Z,n);function q(){}function X(R,D,z){t=t||zs(),R=R||{},typeof z!="boolean"&&(z=D instanceof t),this.objectMode=!!R.objectMode,z&&(this.objectMode=this.objectMode||!!R.writableObjectMode),this.highWaterMark=M(this,R,"writableHighWaterMark",z),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var H=R.decodeStrings===!1;this.decodeStrings=!H,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(V){p(D,V)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=R.emitClose!==!1,this.autoDestroy=!!R.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}X.prototype.getBuffer=function(){for(var D=this.bufferedRequest,z=[];D;)z.push(D),D=D.next;return z},function(){try{Object.defineProperty(X.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var J;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(J=Function.prototype[Symbol.hasInstance],Object.defineProperty(Z,Symbol.hasInstance,{value:function(D){return J.call(this,D)?!0:this!==Z?!1:D&&D._writableState instanceof X}})):J=function(D){return D instanceof this};function Z(R){t=t||zs();var D=this instanceof t;if(!D&&!J.call(Z,this))return new Z(R);this._writableState=new X(R,this,D),this.writable=!0,R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final)),n.call(this)}Z.prototype.pipe=function(){N(this,new T)};function W(R,D){var z=new P;N(R,z),ot.nextTick(D,z)}function $(R,D,z,H){var V;return z===null?V=new O:typeof z!="string"&&!D.objectMode&&(V=new E("chunk",["string","Buffer"],z)),V?(N(R,V),ot.nextTick(H,V),!1):!0}Z.prototype.write=function(R,D,z){var H=this._writableState,V=!1,U=!H.objectMode&&m(R);return U&&!o.isBuffer(R)&&(R=d(R)),typeof D=="function"&&(z=D,D=null),U?D="buffer":D||(D=H.defaultEncoding),typeof z!="function"&&(z=q),H.ending?W(this,z):(U||$(this,H,R,z))&&(H.pendingcb++,V=i(this,H,U,R,D,z)),V},Z.prototype.cork=function(){this._writableState.corked++},Z.prototype.uncork=function(){var R=this._writableState;R.corked&&(R.corked--,!R.writing&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&l(this,R))},Z.prototype.setDefaultEncoding=function(D){if(typeof D=="string"&&(D=D.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((D+"").toLowerCase())>-1))throw new L(D);return this._writableState.defaultEncoding=D,this},Object.defineProperty(Z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function h(R,D,z){return!R.objectMode&&R.decodeStrings!==!1&&typeof D=="string"&&(D=o.from(D,z)),D}Object.defineProperty(Z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function i(R,D,z,H,V,U){if(!z){var F=h(D,H,V);H!==F&&(z=!0,V="buffer",H=F)}var G=D.objectMode?1:H.length;D.length+=G;var ie=D.length>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function mq(e,t,r){var n=t.length-1;if(n=0?(o>0&&(e.lastNeed=o-1),o):--n=0?(o>0&&(e.lastNeed=o-2),o):--n=0?(o>0&&(o===2?o=0:e.lastNeed=o-3),o):0))}function gq(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function yq(e){var t=this.lastTotal-this.lastNeed,r=gq(this,e);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function bq(e,t){var r=mq(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function wq(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function Mq(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function xq(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function _q(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function Eq(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Sq(e){return e.toString(this.encoding)}function Aq(e){return e&&e.length?this.write(e):""}var F6=Io.codes.ERR_STREAM_PREMATURE_CLOSE;function Cq(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o0)if(typeof F!="string"&&!oe.objectMode&&Object.getPrototypeOf(F)!==n.prototype&&(F=a(F)),ie)oe.endEmitted?q(U,new O):h(U,oe,F,!0);else if(oe.ended)q(U,new T);else{if(oe.destroyed)return!1;oe.reading=!1,oe.decoder&&!G?(F=oe.decoder.write(F),oe.objectMode||F.length!==0?h(U,oe,F,!1):l(U,oe)):h(U,oe,F,!1)}else ie||(oe.reading=!1,l(U,oe))}return!oe.ended&&(oe.length=f?U=f:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U}function c(U,F){return U<=0||F.length===0&&F.ended?0:F.objectMode?1:U!==U?F.flowing&&F.length?F.buffer.head.data.length:F.length:(U>F.highWaterMark&&(F.highWaterMark=u(U)),U<=F.length?U:F.ended?F.length:(F.needReadable=!0,0))}W.prototype.read=function(U){y("read",U),U=parseInt(U,10);var F=this._readableState,G=U;if(U!==0&&(F.emittedReadable=!1),U===0&&F.needReadable&&((F.highWaterMark!==0?F.length>=F.highWaterMark:F.length>0)||F.ended))return y("read: emitReadable",F.length,F.ended),F.length===0&&F.ended?z(this):b(this),null;if(U=c(U,F),U===0&&F.ended)return F.length===0&&z(this),null;var ie=F.needReadable;y("need readable",ie),(F.length===0||F.length-U0?Y=D(U,F):Y=null,Y===null?(F.needReadable=F.length<=F.highWaterMark,U=0):(F.length-=U,F.awaitDrain=0),F.length===0&&(F.ended||(F.needReadable=!0),G!==U&&F.ended&&z(this)),Y!==null&&this.emit("data",Y),Y};function p(U,F){if(y("onEofChunk"),!F.ended){if(F.decoder){var G=F.decoder.end();G&&G.length&&(F.buffer.push(G),F.length+=F.objectMode?1:G.length)}F.ended=!0,F.sync?b(U):(F.needReadable=!1,F.emittedReadable||(F.emittedReadable=!0,g(U)))}}function b(U){var F=U._readableState;y("emitReadable",F.needReadable,F.emittedReadable),F.needReadable=!1,F.emittedReadable||(y("emitReadable",F.flowing),F.emittedReadable=!0,ot.nextTick(g,U))}function g(U){var F=U._readableState;y("emitReadable_",F.destroyed,F.length,F.ended),!F.destroyed&&(F.length||F.ended)&&(U.emit("readable"),F.emittedReadable=!1),F.needReadable=!F.flowing&&!F.ended&&F.length<=F.highWaterMark,R(U)}function l(U,F){F.readingMore||(F.readingMore=!0,ot.nextTick(s,U,F))}function s(U,F){for(;!F.reading&&!F.ended&&(F.length1&&V(ie.pipes,U)!==-1)&&!te&&(y("false write response, pause",ie.awaitDrain),ie.awaitDrain++),G.pause())}function _e(ae){y("onerror",ae),Te(),U.removeListener("error",_e),t(U,"error")===0&&q(U,ae)}J(U,"error",_e);function K(){U.removeListener("finish",re),Te()}U.once("close",K);function re(){y("onfinish"),U.removeListener("close",K),Te()}U.once("finish",re);function Te(){y("unpipe"),G.unpipe(U)}return U.emit("pipe",G),ie.flowing||(y("pipe resume"),G.resume()),U};function v(U){return function(){var G=U._readableState;y("pipeOnDrain",G.awaitDrain),G.awaitDrain&&G.awaitDrain--,G.awaitDrain===0&&t(U,"data")&&(G.flowing=!0,R(U))}}W.prototype.unpipe=function(U){var F=this._readableState,G={hasUnpiped:!1};if(F.pipesCount===0)return this;if(F.pipesCount===1)return U&&U!==F.pipes?this:(U||(U=F.pipes),F.pipes=null,F.pipesCount=0,F.flowing=!1,U&&U.emit("unpipe",this,G),this);if(!U){var ie=F.pipes,Y=F.pipesCount;F.pipes=null,F.pipesCount=0,F.flowing=!1;for(var oe=0;oe0,ie.flowing!==!1&&this.resume()):U==="readable"&&!ie.endEmitted&&!ie.readableListening&&(ie.readableListening=ie.needReadable=!0,ie.flowing=!1,ie.emittedReadable=!1,y("on readable",ie.length,ie.reading),ie.length?b(this):ie.reading||ot.nextTick(C,this)),G},W.prototype.addListener=W.prototype.on,W.prototype.removeListener=function(U,F){var G=r.prototype.removeListener.call(this,U,F);return U==="readable"&&ot.nextTick(x,this),G},W.prototype.removeAllListeners=function(U){var F=r.prototype.removeAllListeners.apply(this,arguments);return(U==="readable"||U===void 0)&&ot.nextTick(x,this),F};function x(U){var F=U._readableState;F.readableListening=U.listenerCount("readable")>0,F.resumeScheduled&&!F.paused?F.flowing=!0:U.listenerCount("data")>0&&U.resume()}function C(U){y("readable nexttick read 0"),U.read(0)}W.prototype.resume=function(){var U=this._readableState;return U.flowing||(y("resume"),U.flowing=!U.readableListening,B(this,U)),U.paused=!1,this};function B(U,F){F.resumeScheduled||(F.resumeScheduled=!0,ot.nextTick(k,U,F))}function k(U,F){y("resume",F.reading),F.reading||U.read(0),F.resumeScheduled=!1,U.emit("resume"),R(U),F.flowing&&!F.reading&&U.read(0)}W.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function R(U){var F=U._readableState;for(y("flow",F.flowing);F.flowing&&U.read()!==null;);}W.prototype.wrap=function(U){var F=this,G=this._readableState,ie=!1;U.on("end",function(){if(y("wrapped end"),G.decoder&&!G.ended){var xe=G.decoder.end();xe&&xe.length&&F.push(xe)}F.push(null)}),U.on("data",function(xe){if(y("wrapped data"),G.decoder&&(xe=G.decoder.write(xe)),!(G.objectMode&&xe==null)&&!(!G.objectMode&&(!xe||!xe.length))){var ne=F.push(xe);ne||(ie=!0,U.pause())}});for(var Y in U)this[Y]===void 0&&typeof U[Y]=="function"&&(this[Y]=function(ne){return function(){return U[ne].apply(U,arguments)}}(Y));for(var oe=0;oe=F.length?(F.decoder?G=F.buffer.join(""):F.buffer.length===1?G=F.buffer.first():G=F.buffer.concat(F.length),F.buffer.clear()):G=F.buffer.consume(U,F.decoder),G}function z(U){var F=U._readableState;y("endReadable",F.endEmitted),F.endEmitted||(F.ended=!0,ot.nextTick(H,F,U))}function H(U,F){if(y("endReadableNT",U.endEmitted,U.length),!U.endEmitted&&U.length===0&&(U.endEmitted=!0,F.readable=!1,F.emit("end"),U.autoDestroy)){var G=F._writableState;(!G||G.autoDestroy&&G.finished)&&F.destroy()}}typeof Symbol=="function"&&(W.from=function(U,F){return N===void 0&&(N=Oq()),N(W,U,F)});function V(U,F){for(var G=0,ie=U.length;G0;return jq(d,y,w,function(M){o||(o=M),M&&a.forEach(q6),!y&&(a.forEach(q6),n(o))})});return t.reduce(qq)}var Gq=Kq;(function(e,t){t=e.exports=tE(),t.Stream=t,t.Readable=t,t.Writable=Q_(),t.Duplex=zs(),t.Transform=rE,t.PassThrough=Fq,t.finished=Ny,t.pipeline=Gq})(Ns,Ns.exports);var $h=gt.exports.Buffer,aE=Ns.exports.Transform,Wq=mt.exports;function Zq(e,t){if(!$h.isBuffer(e)&&typeof e!="string")throw new TypeError(t+" must be a string or a buffer")}function za(e){aE.call(this),this._block=$h.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Wq(za,aE);za.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(o){n=o}r(n)};za.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)};za.prototype.update=function(e,t){if(Zq(e,"Data"),this._finalized)throw new Error("Digest already called");$h.isBuffer(e)||(e=$h.from(e,t));for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=d,d=this._length[a]/4294967296|0,d>0&&(this._length[a]-=4294967296*d);return this};za.prototype._update=function(){throw new Error("_update is not implemented")};za.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};za.prototype._digest=function(){throw new Error("_digest is not implemented")};var oE=za,Yq=mt.exports,sE=oE,Xq=gt.exports.Buffer,Jq=new Array(16);function rd(){sE.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}Yq(rd,sE);rd.prototype._update=function(){for(var e=Jq,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);var r=this._a,n=this._b,o=this._c,a=this._d;r=Br(r,n,o,a,e[0],3614090360,7),a=Br(a,r,n,o,e[1],3905402710,12),o=Br(o,a,r,n,e[2],606105819,17),n=Br(n,o,a,r,e[3],3250441966,22),r=Br(r,n,o,a,e[4],4118548399,7),a=Br(a,r,n,o,e[5],1200080426,12),o=Br(o,a,r,n,e[6],2821735955,17),n=Br(n,o,a,r,e[7],4249261313,22),r=Br(r,n,o,a,e[8],1770035416,7),a=Br(a,r,n,o,e[9],2336552879,12),o=Br(o,a,r,n,e[10],4294925233,17),n=Br(n,o,a,r,e[11],2304563134,22),r=Br(r,n,o,a,e[12],1804603682,7),a=Br(a,r,n,o,e[13],4254626195,12),o=Br(o,a,r,n,e[14],2792965006,17),n=Br(n,o,a,r,e[15],1236535329,22),r=Ir(r,n,o,a,e[1],4129170786,5),a=Ir(a,r,n,o,e[6],3225465664,9),o=Ir(o,a,r,n,e[11],643717713,14),n=Ir(n,o,a,r,e[0],3921069994,20),r=Ir(r,n,o,a,e[5],3593408605,5),a=Ir(a,r,n,o,e[10],38016083,9),o=Ir(o,a,r,n,e[15],3634488961,14),n=Ir(n,o,a,r,e[4],3889429448,20),r=Ir(r,n,o,a,e[9],568446438,5),a=Ir(a,r,n,o,e[14],3275163606,9),o=Ir(o,a,r,n,e[3],4107603335,14),n=Ir(n,o,a,r,e[8],1163531501,20),r=Ir(r,n,o,a,e[13],2850285829,5),a=Ir(a,r,n,o,e[2],4243563512,9),o=Ir(o,a,r,n,e[7],1735328473,14),n=Ir(n,o,a,r,e[12],2368359562,20),r=$r(r,n,o,a,e[5],4294588738,4),a=$r(a,r,n,o,e[8],2272392833,11),o=$r(o,a,r,n,e[11],1839030562,16),n=$r(n,o,a,r,e[14],4259657740,23),r=$r(r,n,o,a,e[1],2763975236,4),a=$r(a,r,n,o,e[4],1272893353,11),o=$r(o,a,r,n,e[7],4139469664,16),n=$r(n,o,a,r,e[10],3200236656,23),r=$r(r,n,o,a,e[13],681279174,4),a=$r(a,r,n,o,e[0],3936430074,11),o=$r(o,a,r,n,e[3],3572445317,16),n=$r(n,o,a,r,e[6],76029189,23),r=$r(r,n,o,a,e[9],3654602809,4),a=$r(a,r,n,o,e[12],3873151461,11),o=$r(o,a,r,n,e[15],530742520,16),n=$r(n,o,a,r,e[2],3299628645,23),r=Lr(r,n,o,a,e[0],4096336452,6),a=Lr(a,r,n,o,e[7],1126891415,10),o=Lr(o,a,r,n,e[14],2878612391,15),n=Lr(n,o,a,r,e[5],4237533241,21),r=Lr(r,n,o,a,e[12],1700485571,6),a=Lr(a,r,n,o,e[3],2399980690,10),o=Lr(o,a,r,n,e[10],4293915773,15),n=Lr(n,o,a,r,e[1],2240044497,21),r=Lr(r,n,o,a,e[8],1873313359,6),a=Lr(a,r,n,o,e[15],4264355552,10),o=Lr(o,a,r,n,e[6],2734768916,15),n=Lr(n,o,a,r,e[13],1309151649,21),r=Lr(r,n,o,a,e[4],4149444226,6),a=Lr(a,r,n,o,e[11],3174756917,10),o=Lr(o,a,r,n,e[2],718787259,15),n=Lr(n,o,a,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+o|0,this._d=this._d+a|0};rd.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Xq.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};function nd(e,t){return e<>>32-t}function Br(e,t,r,n,o,a,d){return nd(e+(t&r|~t&n)+o+a|0,d)+t|0}function Ir(e,t,r,n,o,a,d){return nd(e+(t&n|r&~n)+o+a|0,d)+t|0}function $r(e,t,r,n,o,a,d){return nd(e+(t^r^n)+o+a|0,d)+t|0}function Lr(e,t,r,n,o,a,d){return nd(e+(r^(t|~n))+o+a|0,d)+t|0}var zy=rd,Q1=on.Buffer,Qq=mt.exports,fE=oE,eV=new Array(16),Pf=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Bf=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],If=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],$f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Lf=[0,1518500249,1859775393,2400959708,2840853838],Df=[1352829926,1548603684,1836072691,2053994217,0];function id(){fE.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}Qq(id,fE);id.prototype._update=function(){for(var e=eV,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);for(var r=this._a|0,n=this._b|0,o=this._c|0,a=this._d|0,d=this._e|0,m=this._a|0,y=this._b|0,w=this._c|0,M=this._d|0,_=this._e|0,E=0;E<80;E+=1){var S,A;E<16?(S=V6(r,n,o,a,d,e[Pf[E]],Lf[0],If[E]),A=Z6(m,y,w,M,_,e[Bf[E]],Df[0],$f[E])):E<32?(S=K6(r,n,o,a,d,e[Pf[E]],Lf[1],If[E]),A=W6(m,y,w,M,_,e[Bf[E]],Df[1],$f[E])):E<48?(S=G6(r,n,o,a,d,e[Pf[E]],Lf[2],If[E]),A=G6(m,y,w,M,_,e[Bf[E]],Df[2],$f[E])):E<64?(S=W6(r,n,o,a,d,e[Pf[E]],Lf[3],If[E]),A=K6(m,y,w,M,_,e[Bf[E]],Df[3],$f[E])):(S=Z6(r,n,o,a,d,e[Pf[E]],Lf[4],If[E]),A=V6(m,y,w,M,_,e[Bf[E]],Df[4],$f[E])),r=d,d=a,a=bo(o,10),o=n,n=S,m=_,_=M,M=bo(w,10),w=y,y=A}var T=this._b+o+M|0;this._b=this._c+a+_|0,this._c=this._d+d+m|0,this._d=this._e+r+y|0,this._e=this._a+n+w|0,this._a=T};id.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Q1.alloc?Q1.alloc(20):new Q1(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};function bo(e,t){return e<>>32-t}function V6(e,t,r,n,o,a,d,m){return bo(e+(t^r^n)+a+d|0,m)+o|0}function K6(e,t,r,n,o,a,d,m){return bo(e+(t&r|~t&n)+a+d|0,m)+o|0}function G6(e,t,r,n,o,a,d,m){return bo(e+((t|~r)^n)+a+d|0,m)+o|0}function W6(e,t,r,n,o,a,d,m){return bo(e+(t&n|r&~n)+a+d|0,m)+o|0}function Z6(e,t,r,n,o,a,d,m){return bo(e+(t^(r|~n))+a+d|0,m)+o|0}var Hy=id,ad={exports:{}},uE=gt.exports.Buffer;function od(e,t){this._block=uE.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}od.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=uE.from(e,t));for(var r=this._block,n=this._blockSize,o=e.length,a=this._len,d=0;d=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a};od.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var rf=od,tV=mt.exports,lE=rf,rV=gt.exports.Buffer,nV=[1518500249,1859775393,-1894007588,-899497514],iV=new Array(80);function hl(){this.init(),this._w=iV,lE.call(this,64,56)}tV(hl,lE);hl.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function aV(e){return e<<5|e>>>27}function oV(e){return e<<30|e>>>2}function sV(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}hl.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,a=this._d|0,d=this._e|0,m=0;m<16;++m)t[m]=e.readInt32BE(m*4);for(;m<80;++m)t[m]=t[m-3]^t[m-8]^t[m-14]^t[m-16];for(var y=0;y<80;++y){var w=~~(y/20),M=aV(r)+sV(w,n,o,a)+d+t[y]+nV[w]|0;d=a,a=o,o=oV(n),n=r,r=M}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=d+this._e|0};hl.prototype._hash=function(){var e=rV.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var fV=hl,uV=mt.exports,hE=rf,lV=gt.exports.Buffer,hV=[1518500249,1859775393,-1894007588,-899497514],cV=new Array(80);function cl(){this.init(),this._w=cV,hE.call(this,64,56)}uV(cl,hE);cl.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function dV(e){return e<<1|e>>>31}function pV(e){return e<<5|e>>>27}function vV(e){return e<<30|e>>>2}function mV(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}cl.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,a=this._d|0,d=this._e|0,m=0;m<16;++m)t[m]=e.readInt32BE(m*4);for(;m<80;++m)t[m]=dV(t[m-3]^t[m-8]^t[m-14]^t[m-16]);for(var y=0;y<80;++y){var w=~~(y/20),M=pV(r)+mV(w,n,o,a)+d+t[y]+hV[w]|0;d=a,a=o,o=vV(n),n=r,r=M}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=d+this._e|0};cl.prototype._hash=function(){var e=lV.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var gV=cl,yV=mt.exports,cE=rf,bV=gt.exports.Buffer,wV=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],MV=new Array(64);function dl(){this.init(),this._w=MV,cE.call(this,64,56)}yV(dl,cE);dl.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function xV(e,t,r){return r^e&(t^r)}function _V(e,t,r){return e&t|r&(e|t)}function EV(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function SV(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function AV(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function CV(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}dl.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,o=this._c|0,a=this._d|0,d=this._e|0,m=this._f|0,y=this._g|0,w=this._h|0,M=0;M<16;++M)t[M]=e.readInt32BE(M*4);for(;M<64;++M)t[M]=CV(t[M-2])+t[M-7]+AV(t[M-15])+t[M-16]|0;for(var _=0;_<64;++_){var E=w+SV(d)+xV(d,m,y)+wV[_]+t[_]|0,S=EV(r)+_V(r,n,o)|0;w=y,y=m,m=d,d=a+E|0,a=o,o=n,n=r,r=E+S|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=d+this._e|0,this._f=m+this._f|0,this._g=y+this._g|0,this._h=w+this._h|0};dl.prototype._hash=function(){var e=bV.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var dE=dl,kV=mt.exports,TV=dE,RV=rf,OV=gt.exports.Buffer,PV=new Array(64);function sd(){this.init(),this._w=PV,RV.call(this,64,56)}kV(sd,TV);sd.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};sd.prototype._hash=function(){var e=OV.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var BV=sd,IV=mt.exports,pE=rf,$V=gt.exports.Buffer,Y6=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],LV=new Array(160);function pl(){this.init(),this._w=LV,pE.call(this,128,112)}IV(pl,pE);pl.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function X6(e,t,r){return r^e&(t^r)}function J6(e,t,r){return e&t|r&(e|t)}function Q6(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function ew(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function DV(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function FV(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function NV(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function zV(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function gr(e,t){return e>>>0>>0?1:0}pl.prototype._update=function(e){for(var t=this._w,r=this._ah|0,n=this._bh|0,o=this._ch|0,a=this._dh|0,d=this._eh|0,m=this._fh|0,y=this._gh|0,w=this._hh|0,M=this._al|0,_=this._bl|0,E=this._cl|0,S=this._dl|0,A=this._el|0,T=this._fl|0,I=this._gl|0,O=this._hl|0,P=0;P<32;P+=2)t[P]=e.readInt32BE(P*4),t[P+1]=e.readInt32BE(P*4+4);for(;P<160;P+=2){var L=t[P-30],N=t[P-15*2+1],q=DV(L,N),X=FV(N,L);L=t[P-2*2],N=t[P-2*2+1];var J=NV(L,N),Z=zV(N,L),W=t[P-7*2],$=t[P-7*2+1],h=t[P-16*2],i=t[P-16*2+1],f=X+$|0,u=q+W+gr(f,X)|0;f=f+Z|0,u=u+J+gr(f,Z)|0,f=f+i|0,u=u+h+gr(f,i)|0,t[P]=u,t[P+1]=f}for(var c=0;c<160;c+=2){u=t[c],f=t[c+1];var p=J6(r,n,o),b=J6(M,_,E),g=Q6(r,M),l=Q6(M,r),s=ew(d,A),v=ew(A,d),x=Y6[c],C=Y6[c+1],B=X6(d,m,y),k=X6(A,T,I),R=O+v|0,D=w+s+gr(R,O)|0;R=R+k|0,D=D+B+gr(R,k)|0,R=R+C|0,D=D+x+gr(R,C)|0,R=R+f|0,D=D+u+gr(R,f)|0;var z=l+b|0,H=g+p+gr(z,l)|0;w=y,O=I,y=m,I=T,m=d,T=A,A=S+R|0,d=a+D+gr(A,S)|0,a=o,S=E,o=n,E=_,n=r,_=M,M=R+z|0,r=D+H+gr(M,R)|0}this._al=this._al+M|0,this._bl=this._bl+_|0,this._cl=this._cl+E|0,this._dl=this._dl+S|0,this._el=this._el+A|0,this._fl=this._fl+T|0,this._gl=this._gl+I|0,this._hl=this._hl+O|0,this._ah=this._ah+r+gr(this._al,M)|0,this._bh=this._bh+n+gr(this._bl,_)|0,this._ch=this._ch+o+gr(this._cl,E)|0,this._dh=this._dh+a+gr(this._dl,S)|0,this._eh=this._eh+d+gr(this._el,A)|0,this._fh=this._fh+m+gr(this._fl,T)|0,this._gh=this._gh+y+gr(this._gl,I)|0,this._hh=this._hh+w+gr(this._hl,O)|0};pl.prototype._hash=function(){var e=$V.allocUnsafe(64);function t(r,n,o){e.writeInt32BE(r,o),e.writeInt32BE(n,o+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var vE=pl,HV=mt.exports,UV=vE,jV=rf,qV=gt.exports.Buffer,VV=new Array(160);function fd(){this.init(),this._w=VV,jV.call(this,128,112)}HV(fd,UV);fd.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};fd.prototype._hash=function(){var e=qV.allocUnsafe(48);function t(r,n,o){e.writeInt32BE(r,o),e.writeInt32BE(n,o+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var KV=fd,$o=ad.exports=function(t){t=t.toLowerCase();var r=$o[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r};$o.sha=fV;$o.sha1=gV;$o.sha224=BV;$o.sha256=dE;$o.sha384=KV;$o.sha512=vE;var mE=gt.exports.Buffer,gE=Hu.Transform,GV=Ih.StringDecoder,WV=mt.exports;function ri(e){gE.call(this),this.hashMode=typeof e=="string",this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}WV(ri,gE);ri.prototype.update=function(e,t,r){typeof e=="string"&&(e=mE.from(e,t));var n=this._update(e);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};ri.prototype.setAutoPadding=function(){};ri.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};ri.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};ri.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};ri.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(o){n=o}finally{r(n)}};ri.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)};ri.prototype._finalOrDigest=function(e){var t=this.__final()||mE.alloc(0);return e&&(t=this._toString(t,e,!0)),t};ri.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new GV(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n};var Ha=ri,ZV=mt.exports,YV=zy,XV=Hy,JV=ad.exports,yE=Ha;function ud(e){yE.call(this,"digest"),this._hash=e}ZV(ud,yE);ud.prototype._update=function(e){this._hash.update(e)};ud.prototype._final=function(){return this._hash.digest()};var nf=function(t){return t=t.toLowerCase(),t==="md5"?new YV:t==="rmd160"||t==="ripemd160"?new XV:new ud(JV(t))},ep,tw;function QV(){if(tw)return ep;tw=1;var e=mt.exports,t=gt.exports.Buffer,r=Ha,n=t.alloc(128),o=64;function a(d,m){r.call(this,"digest"),typeof m=="string"&&(m=t.from(m)),this._alg=d,this._key=m,m.length>o?m=d(m):m.length_){var E=w==="rmd160"?new a:d(w);M=E.update(M).digest()}else M.length<_&&(M=n.concat([M,m],_));for(var S=this._ipad=n.allocUnsafe(_),A=this._opad=n.allocUnsafe(_),T=0;T<_;T++)S[T]=M[T]^54,A[T]=M[T]^92;this._hash=w==="rmd160"?new a:d(w),this._hash.update(S)}return e(y,r),y.prototype._update=function(w){this._hash.update(w)},y.prototype._final=function(){var w=this._hash.digest(),M=this._alg==="rmd160"?new a:d(this._alg);return M.update(this._opad).update(w).digest()},rp=function(M,_){return M=M.toLowerCase(),M==="rmd160"||M==="ripemd160"?new y("rmd160",_):M==="md5"?new t(o,_):new y(M,_)},rp}var np={exports:{}};const eK={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},tK={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},rK={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},nK={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},iK={sign:"ecdsa",hash:"sha256",id:""},aK={sign:"ecdsa",hash:"sha224",id:""},oK={sign:"ecdsa",hash:"sha384",id:""},sK={sign:"ecdsa",hash:"sha512",id:""},fK={sign:"dsa",hash:"sha1",id:""},uK={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},lK={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},ME={sha224WithRSAEncryption:eK,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:tK,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:rK,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:nK,"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:iK,sha224:aK,sha384:oK,sha512:sK,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:fK,"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:uK,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:lK,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var iw;function hK(){return iw||(iw=1,function(e){e.exports=ME}(np)),np.exports}var Wl={},ip,aw;function xE(){if(aw)return ip;aw=1;var e=Math.pow(2,30)-1;return ip=function(t,r){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if(typeof r!="number")throw new TypeError("Key length not a number");if(r<0||r>e||r!==r)throw new TypeError("Bad key length")},ip}var ap,ow;function _E(){if(ow)return ap;ow=1;var e;if(Qe.process&&Qe.process.browser)e="utf-8";else if(Qe.process&&Qe.process.version){var t=parseInt(ot.version.split(".")[0].slice(1),10);e=t>=6?"utf-8":"binary"}else e="utf-8";return ap=e,ap}var op,sw;function EE(){if(sw)return op;sw=1;var e=gt.exports.Buffer;return op=function(t,r,n){if(e.isBuffer(t))return t;if(typeof t=="string")return e.from(t,r);if(ArrayBuffer.isView(t))return e.from(t.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")},op}var sp,fw;function SE(){if(fw)return sp;fw=1;var e=bE(),t=Hy,r=ad.exports,n=gt.exports.Buffer,o=xE(),a=_E(),d=EE(),m=n.alloc(128),y={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function w(E,S,A){var T=M(E),I=E==="sha512"||E==="sha384"?128:64;S.length>I?S=T(S):S.length>>0},sn.writeUInt32BE=function(o,a,d){o[0+d]=a>>>24,o[1+d]=a>>>16&255,o[2+d]=a>>>8&255,o[3+d]=a&255},sn.ip=function(o,a,d,m){for(var y=0,w=0,M=6;M>=0;M-=2){for(var _=0;_<=24;_+=8)y<<=1,y|=a>>>_+M&1;for(var _=0;_<=24;_+=8)y<<=1,y|=o>>>_+M&1}for(var M=6;M>=0;M-=2){for(var _=1;_<=25;_+=8)w<<=1,w|=a>>>_+M&1;for(var _=1;_<=25;_+=8)w<<=1,w|=o>>>_+M&1}d[m+0]=y>>>0,d[m+1]=w>>>0},sn.rip=function(o,a,d,m){for(var y=0,w=0,M=0;M<4;M++)for(var _=24;_>=0;_-=8)y<<=1,y|=a>>>_+M&1,y<<=1,y|=o>>>_+M&1;for(var M=4;M<8;M++)for(var _=24;_>=0;_-=8)w<<=1,w|=a>>>_+M&1,w<<=1,w|=o>>>_+M&1;d[m+0]=y>>>0,d[m+1]=w>>>0},sn.pc1=function(o,a,d,m){for(var y=0,w=0,M=7;M>=5;M--){for(var _=0;_<=24;_+=8)y<<=1,y|=a>>_+M&1;for(var _=0;_<=24;_+=8)y<<=1,y|=o>>_+M&1}for(var _=0;_<=24;_+=8)y<<=1,y|=a>>_+M&1;for(var M=1;M<=3;M++){for(var _=0;_<=24;_+=8)w<<=1,w|=a>>_+M&1;for(var _=0;_<=24;_+=8)w<<=1,w|=o>>_+M&1}for(var _=0;_<=24;_+=8)w<<=1,w|=o>>_+M&1;d[m+0]=y>>>0,d[m+1]=w>>>0},sn.r28shl=function(o,a){return o<>>28-a};var e=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];sn.pc2=function(o,a,d,m){for(var y=0,w=0,M=e.length>>>1,_=0;_>>e[_]&1;for(var _=M;_>>e[_]&1;d[m+0]=y>>>0,d[m+1]=w>>>0},sn.expand=function(o,a,d){var m=0,y=0;m=(o&1)<<5|o>>>27;for(var w=23;w>=15;w-=4)m<<=6,m|=o>>>w&63;for(var w=11;w>=3;w-=4)y|=o>>>w&63,y<<=6;y|=(o&31)<<1|o>>>31,a[d+0]=m>>>0,a[d+1]=y>>>0};var t=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];sn.substitute=function(o,a){for(var d=0,m=0;m<4;m++){var y=o>>>18-m*6&63,w=t[m*64+y];d<<=4,d|=w}for(var m=0;m<4;m++){var y=a>>>18-m*6&63,w=t[4*64+m*64+y];d<<=4,d|=w}return d>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return sn.permute=function(o){for(var a=0,d=0;d>>r[d]&1;return a>>>0},sn.padSplit=function(o,a,d){for(var m=o.toString(2);m.length0;d--)o+=this._buffer(n,o),a+=this._flushBuffer(m,a);return o+=this._buffer(n,o),m},t.prototype.final=function(n){var o;n&&(o=this.update(n));var a;return this.type==="encrypt"?a=this._finalEncrypt():a=this._finalDecrypt(),o?o.concat(a):a},t.prototype._pad=function(n,o){if(o===0)return!1;for(;o>>1];M=r.r28shl(M,S),_=r.r28shl(_,S),r.pc2(M,_,y.keys,E)}},a.prototype._update=function(y,w,M,_){var E=this._desState,S=r.readUInt32BE(y,w),A=r.readUInt32BE(y,w+4);r.ip(S,A,E.tmp,0),S=E.tmp[0],A=E.tmp[1],this.type==="encrypt"?this._encrypt(E,S,A,E.tmp,0):this._decrypt(E,S,A,E.tmp,0),S=E.tmp[0],A=E.tmp[1],r.writeUInt32BE(M,S,_),r.writeUInt32BE(M,A,_+4)},a.prototype._pad=function(y,w){for(var M=y.length-w,_=w;_>>0,S=N}r.rip(A,S,_,E)},a.prototype._decrypt=function(y,w,M,_,E){for(var S=M,A=w,T=y.keys.length-2;T>=0;T-=2){var I=y.keys[T],O=y.keys[T+1];r.expand(S,y.tmp,0),I^=y.tmp[0],O^=y.tmp[1];var P=r.substitute(I,O),L=r.permute(P),N=S;S=(A^L)>>>0,A=N}r.rip(S,A,_,E)},lp}var hp={},pw;function dK(){if(pw)return hp;pw=1;var e=Hn,t=mt.exports,r={};function n(a){e.equal(a.length,8,"Invalid IV length"),this.iv=new Array(8);for(var d=0;d>m%8,n._prev=r(n._prev,a?M:_);return w}function r(n,o){var a=n.length,d=-1,m=e.allocUnsafe(n.length);for(n=e.concat([n,e.from([o])]);++d>7;return m}return gp.encrypt=function(n,o,a){for(var d=o.length,m=e.allocUnsafe(d),y=-1;++y>>24]^S[O>>>16&255]^A[P>>>8&255]^T[L&255]^y[Z++],q=E[O>>>24]^S[P>>>16&255]^A[L>>>8&255]^T[I&255]^y[Z++],X=E[P>>>24]^S[L>>>16&255]^A[I>>>8&255]^T[O&255]^y[Z++],J=E[L>>>24]^S[I>>>16&255]^A[O>>>8&255]^T[P&255]^y[Z++],I=N,O=q,P=X,L=J;return N=(M[I>>>24]<<24|M[O>>>16&255]<<16|M[P>>>8&255]<<8|M[L&255])^y[Z++],q=(M[O>>>24]<<24|M[P>>>16&255]<<16|M[L>>>8&255]<<8|M[I&255])^y[Z++],X=(M[P>>>24]<<24|M[L>>>16&255]<<16|M[I>>>8&255]<<8|M[O&255])^y[Z++],J=(M[L>>>24]<<24|M[I>>>16&255]<<16|M[O>>>8&255]<<8|M[P&255])^y[Z++],N=N>>>0,q=q>>>0,X=X>>>0,J=J>>>0,[N,q,X,J]}var o=[0,1,2,4,8,16,32,64,128,27,54],a=function(){for(var m=new Array(256),y=0;y<256;y++)y<128?m[y]=y<<1:m[y]=y<<1^283;for(var w=[],M=[],_=[[],[],[],[]],E=[[],[],[],[]],S=0,A=0,T=0;T<256;++T){var I=A^A<<1^A<<2^A<<3^A<<4;I=I>>>8^I&255^99,w[S]=I,M[I]=S;var O=m[S],P=m[O],L=m[P],N=m[I]*257^I*16843008;_[0][S]=N<<24|N>>>8,_[1][S]=N<<16|N>>>16,_[2][S]=N<<8|N>>>24,_[3][S]=N,N=L*16843009^P*65537^O*257^S*16843008,E[0][I]=N<<24|N>>>8,E[1][I]=N<<16|N>>>16,E[2][I]=N<<8|N>>>24,E[3][I]=N,S===0?S=A=1:(S=O^m[m[m[L^O]]],A^=m[m[A]])}return{SBOX:w,INV_SBOX:M,SUB_MIX:_,INV_SUB_MIX:E}}();function d(m){this._key=t(m),this._reset()}return d.blockSize=4*4,d.keySize=256/8,d.prototype.blockSize=d.blockSize,d.prototype.keySize=d.keySize,d.prototype._reset=function(){for(var m=this._key,y=m.length,w=y+6,M=(w+1)*4,_=[],E=0;E>>24,S=a.SBOX[S>>>24]<<24|a.SBOX[S>>>16&255]<<16|a.SBOX[S>>>8&255]<<8|a.SBOX[S&255],S^=o[E/y|0]<<24):y>6&&E%y===4&&(S=a.SBOX[S>>>24]<<24|a.SBOX[S>>>16&255]<<16|a.SBOX[S>>>8&255]<<8|a.SBOX[S&255]),_[E]=_[E-y]^S}for(var A=[],T=0;T>>24]]^a.INV_SUB_MIX[1][a.SBOX[O>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[O>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[O&255]]}this._nRounds=w,this._keySchedule=_,this._invKeySchedule=A},d.prototype.encryptBlockRaw=function(m){return m=t(m),n(m,this._keySchedule,a.SUB_MIX,a.SBOX,this._nRounds)},d.prototype.encryptBlock=function(m){var y=this.encryptBlockRaw(m),w=e.allocUnsafe(16);return w.writeUInt32BE(y[0],0),w.writeUInt32BE(y[1],4),w.writeUInt32BE(y[2],8),w.writeUInt32BE(y[3],12),w},d.prototype.decryptBlock=function(m){m=t(m);var y=m[1];m[1]=m[3],m[3]=y;var w=n(m,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX,this._nRounds),M=e.allocUnsafe(16);return M.writeUInt32BE(w[0],0),M.writeUInt32BE(w[3],4),M.writeUInt32BE(w[2],8),M.writeUInt32BE(w[1],12),M},d.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},xp.AES=d,xp}var _p,Rw;function AK(){if(Rw)return _p;Rw=1;var e=gt.exports.Buffer,t=e.alloc(16,0);function r(a){return[a.readUInt32BE(0),a.readUInt32BE(4),a.readUInt32BE(8),a.readUInt32BE(12)]}function n(a){var d=e.allocUnsafe(16);return d.writeUInt32BE(a[0]>>>0,0),d.writeUInt32BE(a[1]>>>0,4),d.writeUInt32BE(a[2]>>>0,8),d.writeUInt32BE(a[3]>>>0,12),d}function o(a){this.h=a,this.state=e.alloc(16,0),this.cache=e.allocUnsafe(0)}return o.prototype.ghash=function(a){for(var d=-1;++d0;m--)a[m]=a[m]>>>1|(a[m-1]&1)<<31;a[0]=a[0]>>>1,w&&(a[0]=a[0]^225<<24)}this.state=n(d)},o.prototype.update=function(a){this.cache=e.concat([this.cache,a]);for(var d;this.cache.length>=16;)d=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(d)},o.prototype.final=function(a,d){return this.cache.length&&this.ghash(e.concat([this.cache,t],16)),this.ghash(n([0,a,0,d])),this.state},_p=o,_p}var Ep,Ow;function OE(){if(Ow)return Ep;Ow=1;var e=ld(),t=gt.exports.Buffer,r=Ha,n=mt.exports,o=AK(),a=vl(),d=TE();function m(M,_){var E=0;M.length!==_.length&&E++;for(var S=Math.min(M.length,_.length),A=0;A0||d>0;){var _=new t;_.update(M),_.update(n),o&&_.update(o),M=_.digest();var E=0;if(m>0){var S=y.length-m;E=Math.min(m,M.length),M.copy(y,S,0,E),m-=E}if(E0){var A=w.length-d,T=Math.min(d,M.length-E);M.copy(w,A,E,E+T),d-=T}}return M.fill(0),{key:y,iv:w}}return Ap=r,Ap}var Iw;function CK(){if(Iw)return Zl;Iw=1;var e=jy(),t=OE(),r=gt.exports.Buffer,n=PE(),o=Ha,a=ld(),d=hd(),m=mt.exports;function y(S,A,T){o.call(this),this._cache=new M,this._cipher=new a.AES(A),this._prev=r.from(T),this._mode=S,this._autopadding=!0}m(y,o),y.prototype._update=function(S){this._cache.add(S);for(var A,T,I=[];A=this._cache.get();)T=this._mode.encrypt(this,A),I.push(T);return r.concat(I)};var w=r.alloc(16,16);y.prototype._final=function(){var S=this._cache.flush();if(this._autopadding)return S=this._mode.encrypt(this,S),this._cipher.scrub(),S;if(!S.equals(w))throw this._cipher.scrub(),new Error("data not multiple of block length")},y.prototype.setAutoPadding=function(S){return this._autopadding=!!S,this};function M(){this.cache=r.allocUnsafe(0)}M.prototype.add=function(S){this.cache=r.concat([this.cache,S])},M.prototype.get=function(){if(this.cache.length>15){var S=this.cache.slice(0,16);return this.cache=this.cache.slice(16),S}return null},M.prototype.flush=function(){for(var S=16-this.cache.length,A=r.allocUnsafe(S),T=-1;++T16)return A=this.cache.slice(0,16),this.cache=this.cache.slice(16),A}else if(this.cache.length>=16)return A=this.cache.slice(0,16),this.cache=this.cache.slice(16),A;return null},w.prototype.flush=function(){if(this.cache.length)return this.cache};function M(S){var A=S[15];if(A<1||A>16)throw new Error("unable to decrypt data");for(var T=-1;++T0?i:f},a.min=function(i,f){return i.cmp(f)<0?i:f},a.prototype._init=function(i,f,u){if(typeof i=="number")return this._initNumber(i,f,u);if(typeof i=="object")return this._initArray(i,f,u);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),i=i.toString().replace(/\s+/g,"");var c=0;i[0]==="-"&&(c++,this.negative=1),c=0;c-=3)b=i[c]|i[c-1]<<8|i[c-2]<<16,this.words[p]|=b<>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);else if(u==="le")for(c=0,p=0;c>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);return this.strip()};function m(h,i){var f=h.charCodeAt(i);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function y(h,i,f){var u=m(h,f);return f-1>=i&&(u|=m(h,f-1)<<4),u}a.prototype._parseHex=function(i,f,u){this.length=Math.ceil((i.length-f)/6),this.words=new Array(this.length);for(var c=0;c=f;c-=2)g=y(i,f,c)<=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8;else{var l=i.length-f;for(c=l%2===0?f+1:f;c=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8}this.strip()};function w(h,i,f,u){for(var c=0,p=Math.min(h.length,f),b=i;b=49?c+=g-49+10:g>=17?c+=g-17+10:c+=g}return c}a.prototype._parseBase=function(i,f,u){this.words=[0],this.length=1;for(var c=0,p=1;p<=67108863;p*=f)c++;c--,p=p/f|0;for(var b=i.length-u,g=b%c,l=Math.min(b,b-g)+u,s=0,v=u;v1&&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},a.prototype.inspect=function(){return(this.red?""};var M=["","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"],_=[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],E=[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(i,f){i=i||10,f=f|0||1;var u;if(i===16||i==="hex"){u="";for(var c=0,p=0,b=0;b>>24-c&16777215,p!==0||b!==this.length-1?u=M[6-l.length]+l+u:u=l+u,c+=2,c>=26&&(c-=26,b--)}for(p!==0&&(u=p.toString(16)+u);u.length%f!==0;)u="0"+u;return this.negative!==0&&(u="-"+u),u}if(i===(i|0)&&i>=2&&i<=36){var s=_[i],v=E[i];u="";var x=this.clone();for(x.negative=0;!x.isZero();){var C=x.modn(v).toString(i);x=x.idivn(v),x.isZero()?u=C+u:u=M[s-C.length]+C+u}for(this.isZero()&&(u="0"+u);u.length%f!==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 i=this.words[0];return this.length===2?i+=this.words[1]*67108864:this.length===3&&this.words[2]===1?i+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-i:i},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(i,f){return n(typeof d<"u"),this.toArrayLike(d,i,f)},a.prototype.toArray=function(i,f){return this.toArrayLike(Array,i,f)},a.prototype.toArrayLike=function(i,f,u){var c=this.byteLength(),p=u||Math.max(1,c);n(c<=p,"byte array longer than desired length"),n(p>0,"Requested array length <= 0"),this.strip();var b=f==="le",g=new i(p),l,s,v=this.clone();if(b){for(s=0;!v.isZero();s++)l=v.andln(255),v.iushrn(8),g[s]=l;for(;s=4096&&(u+=13,f>>>=13),f>=64&&(u+=7,f>>>=7),f>=8&&(u+=4,f>>>=4),f>=2&&(u+=2,f>>>=2),u+f},a.prototype._zeroBits=function(i){if(i===0)return 26;var f=i,u=0;return(f&8191)===0&&(u+=13,f>>>=13),(f&127)===0&&(u+=7,f>>>=7),(f&15)===0&&(u+=4,f>>>=4),(f&3)===0&&(u+=2,f>>>=2),(f&1)===0&&u++,u},a.prototype.bitLength=function(){var i=this.words[this.length-1],f=this._countBits(i);return(this.length-1)*26+f};function S(h){for(var i=new Array(h.bitLength()),f=0;f>>c}return i}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var i=0,f=0;fi.length?this.clone().ior(i):i.clone().ior(this)},a.prototype.uor=function(i){return this.length>i.length?this.clone().iuor(i):i.clone().iuor(this)},a.prototype.iuand=function(i){var f;this.length>i.length?f=i:f=this;for(var u=0;ui.length?this.clone().iand(i):i.clone().iand(this)},a.prototype.uand=function(i){return this.length>i.length?this.clone().iuand(i):i.clone().iuand(this)},a.prototype.iuxor=function(i){var f,u;this.length>i.length?(f=this,u=i):(f=i,u=this);for(var c=0;ci.length?this.clone().ixor(i):i.clone().ixor(this)},a.prototype.uxor=function(i){return this.length>i.length?this.clone().iuxor(i):i.clone().iuxor(this)},a.prototype.inotn=function(i){n(typeof i=="number"&&i>=0);var f=Math.ceil(i/26)|0,u=i%26;this._expand(f),u>0&&f--;for(var c=0;c0&&(this.words[c]=~this.words[c]&67108863>>26-u),this.strip()},a.prototype.notn=function(i){return this.clone().inotn(i)},a.prototype.setn=function(i,f){n(typeof i=="number"&&i>=0);var u=i/26|0,c=i%26;return this._expand(u+1),f?this.words[u]=this.words[u]|1<i.length?(u=this,c=i):(u=i,c=this);for(var p=0,b=0;b>>26;for(;p!==0&&b>>26;if(this.length=u.length,p!==0)this.words[this.length]=p,this.length++;else if(u!==this)for(;bi.length?this.clone().iadd(i):i.clone().iadd(this)},a.prototype.isub=function(i){if(i.negative!==0){i.negative=0;var f=this.iadd(i);return i.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(i),this.negative=1,this._normSign();var u=this.cmp(i);if(u===0)return this.negative=0,this.length=1,this.words[0]=0,this;var c,p;u>0?(c=this,p=i):(c=i,p=this);for(var b=0,g=0;g>26,this.words[g]=f&67108863;for(;b!==0&&g>26,this.words[g]=f&67108863;if(b===0&&g>>26,x=l&67108863,C=Math.min(s,i.length-1),B=Math.max(0,s-h.length+1);B<=C;B++){var k=s-B|0;c=h.words[k]|0,p=i.words[B]|0,b=c*p+x,v+=b/67108864|0,x=b&67108863}f.words[s]=x|0,l=v|0}return l!==0?f.words[s]=l|0:f.length--,f.strip()}var T=function(i,f,u){var c=i.words,p=f.words,b=u.words,g=0,l,s,v,x=c[0]|0,C=x&8191,B=x>>>13,k=c[1]|0,R=k&8191,D=k>>>13,z=c[2]|0,H=z&8191,V=z>>>13,U=c[3]|0,F=U&8191,G=U>>>13,ie=c[4]|0,Y=ie&8191,oe=ie>>>13,xe=c[5]|0,ne=xe&8191,Q=xe>>>13,te=c[6]|0,ee=te&8191,se=te>>>13,_e=c[7]|0,K=_e&8191,re=_e>>>13,Te=c[8]|0,ae=Te&8191,Me=Te>>>13,ze=c[9]|0,fe=ze&8191,Se=ze>>>13,He=p[0]|0,ue=He&8191,Ae=He>>>13,Ue=p[1]|0,he=Ue&8191,Ce=Ue>>>13,je=p[2]|0,de=je&8191,Oe=je>>>13,Ve=p[3]|0,pe=Ve&8191,Pe=Ve>>>13,Ke=p[4]|0,ve=Ke&8191,Be=Ke>>>13,Ge=p[5]|0,me=Ge&8191,Ie=Ge>>>13,We=p[6]|0,ge=We&8191,$e=We>>>13,Ze=p[7]|0,ye=Ze&8191,Le=Ze>>>13,Ye=p[8]|0,be=Ye&8191,De=Ye>>>13,Xe=p[9]|0,we=Xe&8191,Re=Xe>>>13;u.negative=i.negative^f.negative,u.length=19,l=Math.imul(C,ue),s=Math.imul(C,Ae),s=s+Math.imul(B,ue)|0,v=Math.imul(B,Ae);var tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(tt>>>26)|0,tt&=67108863,l=Math.imul(R,ue),s=Math.imul(R,Ae),s=s+Math.imul(D,ue)|0,v=Math.imul(D,Ae),l=l+Math.imul(C,he)|0,s=s+Math.imul(C,Ce)|0,s=s+Math.imul(B,he)|0,v=v+Math.imul(B,Ce)|0;var rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(rt>>>26)|0,rt&=67108863,l=Math.imul(H,ue),s=Math.imul(H,Ae),s=s+Math.imul(V,ue)|0,v=Math.imul(V,Ae),l=l+Math.imul(R,he)|0,s=s+Math.imul(R,Ce)|0,s=s+Math.imul(D,he)|0,v=v+Math.imul(D,Ce)|0,l=l+Math.imul(C,de)|0,s=s+Math.imul(C,Oe)|0,s=s+Math.imul(B,de)|0,v=v+Math.imul(B,Oe)|0;var ut=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ut>>>26)|0,ut&=67108863,l=Math.imul(F,ue),s=Math.imul(F,Ae),s=s+Math.imul(G,ue)|0,v=Math.imul(G,Ae),l=l+Math.imul(H,he)|0,s=s+Math.imul(H,Ce)|0,s=s+Math.imul(V,he)|0,v=v+Math.imul(V,Ce)|0,l=l+Math.imul(R,de)|0,s=s+Math.imul(R,Oe)|0,s=s+Math.imul(D,de)|0,v=v+Math.imul(D,Oe)|0,l=l+Math.imul(C,pe)|0,s=s+Math.imul(C,Pe)|0,s=s+Math.imul(B,pe)|0,v=v+Math.imul(B,Pe)|0;var lt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(lt>>>26)|0,lt&=67108863,l=Math.imul(Y,ue),s=Math.imul(Y,Ae),s=s+Math.imul(oe,ue)|0,v=Math.imul(oe,Ae),l=l+Math.imul(F,he)|0,s=s+Math.imul(F,Ce)|0,s=s+Math.imul(G,he)|0,v=v+Math.imul(G,Ce)|0,l=l+Math.imul(H,de)|0,s=s+Math.imul(H,Oe)|0,s=s+Math.imul(V,de)|0,v=v+Math.imul(V,Oe)|0,l=l+Math.imul(R,pe)|0,s=s+Math.imul(R,Pe)|0,s=s+Math.imul(D,pe)|0,v=v+Math.imul(D,Pe)|0,l=l+Math.imul(C,ve)|0,s=s+Math.imul(C,Be)|0,s=s+Math.imul(B,ve)|0,v=v+Math.imul(B,Be)|0;var ht=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ht>>>26)|0,ht&=67108863,l=Math.imul(ne,ue),s=Math.imul(ne,Ae),s=s+Math.imul(Q,ue)|0,v=Math.imul(Q,Ae),l=l+Math.imul(Y,he)|0,s=s+Math.imul(Y,Ce)|0,s=s+Math.imul(oe,he)|0,v=v+Math.imul(oe,Ce)|0,l=l+Math.imul(F,de)|0,s=s+Math.imul(F,Oe)|0,s=s+Math.imul(G,de)|0,v=v+Math.imul(G,Oe)|0,l=l+Math.imul(H,pe)|0,s=s+Math.imul(H,Pe)|0,s=s+Math.imul(V,pe)|0,v=v+Math.imul(V,Pe)|0,l=l+Math.imul(R,ve)|0,s=s+Math.imul(R,Be)|0,s=s+Math.imul(D,ve)|0,v=v+Math.imul(D,Be)|0,l=l+Math.imul(C,me)|0,s=s+Math.imul(C,Ie)|0,s=s+Math.imul(B,me)|0,v=v+Math.imul(B,Ie)|0;var ct=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ct>>>26)|0,ct&=67108863,l=Math.imul(ee,ue),s=Math.imul(ee,Ae),s=s+Math.imul(se,ue)|0,v=Math.imul(se,Ae),l=l+Math.imul(ne,he)|0,s=s+Math.imul(ne,Ce)|0,s=s+Math.imul(Q,he)|0,v=v+Math.imul(Q,Ce)|0,l=l+Math.imul(Y,de)|0,s=s+Math.imul(Y,Oe)|0,s=s+Math.imul(oe,de)|0,v=v+Math.imul(oe,Oe)|0,l=l+Math.imul(F,pe)|0,s=s+Math.imul(F,Pe)|0,s=s+Math.imul(G,pe)|0,v=v+Math.imul(G,Pe)|0,l=l+Math.imul(H,ve)|0,s=s+Math.imul(H,Be)|0,s=s+Math.imul(V,ve)|0,v=v+Math.imul(V,Be)|0,l=l+Math.imul(R,me)|0,s=s+Math.imul(R,Ie)|0,s=s+Math.imul(D,me)|0,v=v+Math.imul(D,Ie)|0,l=l+Math.imul(C,ge)|0,s=s+Math.imul(C,$e)|0,s=s+Math.imul(B,ge)|0,v=v+Math.imul(B,$e)|0;var dt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(dt>>>26)|0,dt&=67108863,l=Math.imul(K,ue),s=Math.imul(K,Ae),s=s+Math.imul(re,ue)|0,v=Math.imul(re,Ae),l=l+Math.imul(ee,he)|0,s=s+Math.imul(ee,Ce)|0,s=s+Math.imul(se,he)|0,v=v+Math.imul(se,Ce)|0,l=l+Math.imul(ne,de)|0,s=s+Math.imul(ne,Oe)|0,s=s+Math.imul(Q,de)|0,v=v+Math.imul(Q,Oe)|0,l=l+Math.imul(Y,pe)|0,s=s+Math.imul(Y,Pe)|0,s=s+Math.imul(oe,pe)|0,v=v+Math.imul(oe,Pe)|0,l=l+Math.imul(F,ve)|0,s=s+Math.imul(F,Be)|0,s=s+Math.imul(G,ve)|0,v=v+Math.imul(G,Be)|0,l=l+Math.imul(H,me)|0,s=s+Math.imul(H,Ie)|0,s=s+Math.imul(V,me)|0,v=v+Math.imul(V,Ie)|0,l=l+Math.imul(R,ge)|0,s=s+Math.imul(R,$e)|0,s=s+Math.imul(D,ge)|0,v=v+Math.imul(D,$e)|0,l=l+Math.imul(C,ye)|0,s=s+Math.imul(C,Le)|0,s=s+Math.imul(B,ye)|0,v=v+Math.imul(B,Le)|0;var yt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(yt>>>26)|0,yt&=67108863,l=Math.imul(ae,ue),s=Math.imul(ae,Ae),s=s+Math.imul(Me,ue)|0,v=Math.imul(Me,Ae),l=l+Math.imul(K,he)|0,s=s+Math.imul(K,Ce)|0,s=s+Math.imul(re,he)|0,v=v+Math.imul(re,Ce)|0,l=l+Math.imul(ee,de)|0,s=s+Math.imul(ee,Oe)|0,s=s+Math.imul(se,de)|0,v=v+Math.imul(se,Oe)|0,l=l+Math.imul(ne,pe)|0,s=s+Math.imul(ne,Pe)|0,s=s+Math.imul(Q,pe)|0,v=v+Math.imul(Q,Pe)|0,l=l+Math.imul(Y,ve)|0,s=s+Math.imul(Y,Be)|0,s=s+Math.imul(oe,ve)|0,v=v+Math.imul(oe,Be)|0,l=l+Math.imul(F,me)|0,s=s+Math.imul(F,Ie)|0,s=s+Math.imul(G,me)|0,v=v+Math.imul(G,Ie)|0,l=l+Math.imul(H,ge)|0,s=s+Math.imul(H,$e)|0,s=s+Math.imul(V,ge)|0,v=v+Math.imul(V,$e)|0,l=l+Math.imul(R,ye)|0,s=s+Math.imul(R,Le)|0,s=s+Math.imul(D,ye)|0,v=v+Math.imul(D,Le)|0,l=l+Math.imul(C,be)|0,s=s+Math.imul(C,De)|0,s=s+Math.imul(B,be)|0,v=v+Math.imul(B,De)|0;var bt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(bt>>>26)|0,bt&=67108863,l=Math.imul(fe,ue),s=Math.imul(fe,Ae),s=s+Math.imul(Se,ue)|0,v=Math.imul(Se,Ae),l=l+Math.imul(ae,he)|0,s=s+Math.imul(ae,Ce)|0,s=s+Math.imul(Me,he)|0,v=v+Math.imul(Me,Ce)|0,l=l+Math.imul(K,de)|0,s=s+Math.imul(K,Oe)|0,s=s+Math.imul(re,de)|0,v=v+Math.imul(re,Oe)|0,l=l+Math.imul(ee,pe)|0,s=s+Math.imul(ee,Pe)|0,s=s+Math.imul(se,pe)|0,v=v+Math.imul(se,Pe)|0,l=l+Math.imul(ne,ve)|0,s=s+Math.imul(ne,Be)|0,s=s+Math.imul(Q,ve)|0,v=v+Math.imul(Q,Be)|0,l=l+Math.imul(Y,me)|0,s=s+Math.imul(Y,Ie)|0,s=s+Math.imul(oe,me)|0,v=v+Math.imul(oe,Ie)|0,l=l+Math.imul(F,ge)|0,s=s+Math.imul(F,$e)|0,s=s+Math.imul(G,ge)|0,v=v+Math.imul(G,$e)|0,l=l+Math.imul(H,ye)|0,s=s+Math.imul(H,Le)|0,s=s+Math.imul(V,ye)|0,v=v+Math.imul(V,Le)|0,l=l+Math.imul(R,be)|0,s=s+Math.imul(R,De)|0,s=s+Math.imul(D,be)|0,v=v+Math.imul(D,De)|0,l=l+Math.imul(C,we)|0,s=s+Math.imul(C,Re)|0,s=s+Math.imul(B,we)|0,v=v+Math.imul(B,Re)|0;var wt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(wt>>>26)|0,wt&=67108863,l=Math.imul(fe,he),s=Math.imul(fe,Ce),s=s+Math.imul(Se,he)|0,v=Math.imul(Se,Ce),l=l+Math.imul(ae,de)|0,s=s+Math.imul(ae,Oe)|0,s=s+Math.imul(Me,de)|0,v=v+Math.imul(Me,Oe)|0,l=l+Math.imul(K,pe)|0,s=s+Math.imul(K,Pe)|0,s=s+Math.imul(re,pe)|0,v=v+Math.imul(re,Pe)|0,l=l+Math.imul(ee,ve)|0,s=s+Math.imul(ee,Be)|0,s=s+Math.imul(se,ve)|0,v=v+Math.imul(se,Be)|0,l=l+Math.imul(ne,me)|0,s=s+Math.imul(ne,Ie)|0,s=s+Math.imul(Q,me)|0,v=v+Math.imul(Q,Ie)|0,l=l+Math.imul(Y,ge)|0,s=s+Math.imul(Y,$e)|0,s=s+Math.imul(oe,ge)|0,v=v+Math.imul(oe,$e)|0,l=l+Math.imul(F,ye)|0,s=s+Math.imul(F,Le)|0,s=s+Math.imul(G,ye)|0,v=v+Math.imul(G,Le)|0,l=l+Math.imul(H,be)|0,s=s+Math.imul(H,De)|0,s=s+Math.imul(V,be)|0,v=v+Math.imul(V,De)|0,l=l+Math.imul(R,we)|0,s=s+Math.imul(R,Re)|0,s=s+Math.imul(D,we)|0,v=v+Math.imul(D,Re)|0;var Mt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,l=Math.imul(fe,de),s=Math.imul(fe,Oe),s=s+Math.imul(Se,de)|0,v=Math.imul(Se,Oe),l=l+Math.imul(ae,pe)|0,s=s+Math.imul(ae,Pe)|0,s=s+Math.imul(Me,pe)|0,v=v+Math.imul(Me,Pe)|0,l=l+Math.imul(K,ve)|0,s=s+Math.imul(K,Be)|0,s=s+Math.imul(re,ve)|0,v=v+Math.imul(re,Be)|0,l=l+Math.imul(ee,me)|0,s=s+Math.imul(ee,Ie)|0,s=s+Math.imul(se,me)|0,v=v+Math.imul(se,Ie)|0,l=l+Math.imul(ne,ge)|0,s=s+Math.imul(ne,$e)|0,s=s+Math.imul(Q,ge)|0,v=v+Math.imul(Q,$e)|0,l=l+Math.imul(Y,ye)|0,s=s+Math.imul(Y,Le)|0,s=s+Math.imul(oe,ye)|0,v=v+Math.imul(oe,Le)|0,l=l+Math.imul(F,be)|0,s=s+Math.imul(F,De)|0,s=s+Math.imul(G,be)|0,v=v+Math.imul(G,De)|0,l=l+Math.imul(H,we)|0,s=s+Math.imul(H,Re)|0,s=s+Math.imul(V,we)|0,v=v+Math.imul(V,Re)|0;var xt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(xt>>>26)|0,xt&=67108863,l=Math.imul(fe,pe),s=Math.imul(fe,Pe),s=s+Math.imul(Se,pe)|0,v=Math.imul(Se,Pe),l=l+Math.imul(ae,ve)|0,s=s+Math.imul(ae,Be)|0,s=s+Math.imul(Me,ve)|0,v=v+Math.imul(Me,Be)|0,l=l+Math.imul(K,me)|0,s=s+Math.imul(K,Ie)|0,s=s+Math.imul(re,me)|0,v=v+Math.imul(re,Ie)|0,l=l+Math.imul(ee,ge)|0,s=s+Math.imul(ee,$e)|0,s=s+Math.imul(se,ge)|0,v=v+Math.imul(se,$e)|0,l=l+Math.imul(ne,ye)|0,s=s+Math.imul(ne,Le)|0,s=s+Math.imul(Q,ye)|0,v=v+Math.imul(Q,Le)|0,l=l+Math.imul(Y,be)|0,s=s+Math.imul(Y,De)|0,s=s+Math.imul(oe,be)|0,v=v+Math.imul(oe,De)|0,l=l+Math.imul(F,we)|0,s=s+Math.imul(F,Re)|0,s=s+Math.imul(G,we)|0,v=v+Math.imul(G,Re)|0;var _t=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(_t>>>26)|0,_t&=67108863,l=Math.imul(fe,ve),s=Math.imul(fe,Be),s=s+Math.imul(Se,ve)|0,v=Math.imul(Se,Be),l=l+Math.imul(ae,me)|0,s=s+Math.imul(ae,Ie)|0,s=s+Math.imul(Me,me)|0,v=v+Math.imul(Me,Ie)|0,l=l+Math.imul(K,ge)|0,s=s+Math.imul(K,$e)|0,s=s+Math.imul(re,ge)|0,v=v+Math.imul(re,$e)|0,l=l+Math.imul(ee,ye)|0,s=s+Math.imul(ee,Le)|0,s=s+Math.imul(se,ye)|0,v=v+Math.imul(se,Le)|0,l=l+Math.imul(ne,be)|0,s=s+Math.imul(ne,De)|0,s=s+Math.imul(Q,be)|0,v=v+Math.imul(Q,De)|0,l=l+Math.imul(Y,we)|0,s=s+Math.imul(Y,Re)|0,s=s+Math.imul(oe,we)|0,v=v+Math.imul(oe,Re)|0;var Et=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Et>>>26)|0,Et&=67108863,l=Math.imul(fe,me),s=Math.imul(fe,Ie),s=s+Math.imul(Se,me)|0,v=Math.imul(Se,Ie),l=l+Math.imul(ae,ge)|0,s=s+Math.imul(ae,$e)|0,s=s+Math.imul(Me,ge)|0,v=v+Math.imul(Me,$e)|0,l=l+Math.imul(K,ye)|0,s=s+Math.imul(K,Le)|0,s=s+Math.imul(re,ye)|0,v=v+Math.imul(re,Le)|0,l=l+Math.imul(ee,be)|0,s=s+Math.imul(ee,De)|0,s=s+Math.imul(se,be)|0,v=v+Math.imul(se,De)|0,l=l+Math.imul(ne,we)|0,s=s+Math.imul(ne,Re)|0,s=s+Math.imul(Q,we)|0,v=v+Math.imul(Q,Re)|0;var St=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(St>>>26)|0,St&=67108863,l=Math.imul(fe,ge),s=Math.imul(fe,$e),s=s+Math.imul(Se,ge)|0,v=Math.imul(Se,$e),l=l+Math.imul(ae,ye)|0,s=s+Math.imul(ae,Le)|0,s=s+Math.imul(Me,ye)|0,v=v+Math.imul(Me,Le)|0,l=l+Math.imul(K,be)|0,s=s+Math.imul(K,De)|0,s=s+Math.imul(re,be)|0,v=v+Math.imul(re,De)|0,l=l+Math.imul(ee,we)|0,s=s+Math.imul(ee,Re)|0,s=s+Math.imul(se,we)|0,v=v+Math.imul(se,Re)|0;var At=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(At>>>26)|0,At&=67108863,l=Math.imul(fe,ye),s=Math.imul(fe,Le),s=s+Math.imul(Se,ye)|0,v=Math.imul(Se,Le),l=l+Math.imul(ae,be)|0,s=s+Math.imul(ae,De)|0,s=s+Math.imul(Me,be)|0,v=v+Math.imul(Me,De)|0,l=l+Math.imul(K,we)|0,s=s+Math.imul(K,Re)|0,s=s+Math.imul(re,we)|0,v=v+Math.imul(re,Re)|0;var Tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,l=Math.imul(fe,be),s=Math.imul(fe,De),s=s+Math.imul(Se,be)|0,v=Math.imul(Se,De),l=l+Math.imul(ae,we)|0,s=s+Math.imul(ae,Re)|0,s=s+Math.imul(Me,we)|0,v=v+Math.imul(Me,Re)|0;var Rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,l=Math.imul(fe,we),s=Math.imul(fe,Re),s=s+Math.imul(Se,we)|0,v=Math.imul(Se,Re);var qt=(g+l|0)+((s&8191)<<13)|0;return g=(v+(s>>>13)|0)+(qt>>>26)|0,qt&=67108863,b[0]=tt,b[1]=rt,b[2]=ut,b[3]=lt,b[4]=ht,b[5]=ct,b[6]=dt,b[7]=yt,b[8]=bt,b[9]=wt,b[10]=Mt,b[11]=xt,b[12]=_t,b[13]=Et,b[14]=St,b[15]=At,b[16]=Tt,b[17]=Rt,b[18]=qt,g!==0&&(b[19]=g,u.length++),u};Math.imul||(T=A);function I(h,i,f){f.negative=i.negative^h.negative,f.length=h.length+i.length;for(var u=0,c=0,p=0;p>>26)|0,c+=b>>>26,b&=67108863}f.words[p]=g,u=b,b=c}return u!==0?f.words[p]=u:f.length--,f.strip()}function O(h,i,f){var u=new P;return u.mulp(h,i,f)}a.prototype.mulTo=function(i,f){var u,c=this.length+i.length;return this.length===10&&i.length===10?u=T(this,i,f):c<63?u=A(this,i,f):c<1024?u=I(this,i,f):u=O(this,i,f),u};function P(h,i){this.x=h,this.y=i}P.prototype.makeRBT=function(i){for(var f=new Array(i),u=a.prototype._countBits(i)-1,c=0;c>=1;return c},P.prototype.permute=function(i,f,u,c,p,b){for(var g=0;g>>1)p++;return 1<>>13,u[2*b+1]=p&8191,p=p>>>13;for(b=2*f;b>=26,f+=c/67108864|0,f+=p>>>26,this.words[u]=p&67108863}return f!==0&&(this.words[u]=f,this.length++),this},a.prototype.muln=function(i){return this.clone().imuln(i)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(i){var f=S(i);if(f.length===0)return new a(1);for(var u=this,c=0;c=0);var f=i%26,u=(i-f)/26,c=67108863>>>26-f<<26-f,p;if(f!==0){var b=0;for(p=0;p>>26-f}b&&(this.words[p]=b,this.length++)}if(u!==0){for(p=this.length-1;p>=0;p--)this.words[p+u]=this.words[p];for(p=0;p=0);var c;f?c=(f-f%26)/26:c=0;var p=i%26,b=Math.min((i-p)/26,this.length),g=67108863^67108863>>>p<b)for(this.length-=b,s=0;s=0&&(v!==0||s>=c);s--){var x=this.words[s]|0;this.words[s]=v<<26-p|x>>>p,v=x&g}return l&&v!==0&&(l.words[l.length++]=v),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(i,f,u){return n(this.negative===0),this.iushrn(i,f,u)},a.prototype.shln=function(i){return this.clone().ishln(i)},a.prototype.ushln=function(i){return this.clone().iushln(i)},a.prototype.shrn=function(i){return this.clone().ishrn(i)},a.prototype.ushrn=function(i){return this.clone().iushrn(i)},a.prototype.testn=function(i){n(typeof i=="number"&&i>=0);var f=i%26,u=(i-f)/26,c=1<=0);var f=i%26,u=(i-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=u)return this;if(f!==0&&u++,this.length=Math.min(u,this.length),f!==0){var c=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},a.prototype.isubn=function(i){if(n(typeof i=="number"),n(i<67108864),i<0)return this.iaddn(-i);if(this.negative!==0)return this.negative=0,this.iaddn(i),this.negative=1,this;if(this.words[0]-=i,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(l/67108864|0),this.words[p+u]=b&67108863}for(;p>26,this.words[p+u]=b&67108863;if(g===0)return this.strip();for(n(g===-1),g=0,p=0;p>26,this.words[p]=b&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(i,f){var u=this.length-i.length,c=this.clone(),p=i,b=p.words[p.length-1]|0,g=this._countBits(b);u=26-g,u!==0&&(p=p.ushln(u),c.iushln(u),b=p.words[p.length-1]|0);var l=c.length-p.length,s;if(f!=="mod"){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var v=0;v=0;C--){var B=(c.words[p.length+C]|0)*67108864+(c.words[p.length+C-1]|0);for(B=Math.min(B/b|0,67108863),c._ishlnsubmul(p,B,C);c.negative!==0;)B--,c.negative=0,c._ishlnsubmul(p,1,C),c.isZero()||(c.negative^=1);s&&(s.words[C]=B)}return s&&s.strip(),c.strip(),f!=="div"&&u!==0&&c.iushrn(u),{div:s||null,mod:c}},a.prototype.divmod=function(i,f,u){if(n(!i.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var c,p,b;return this.negative!==0&&i.negative===0?(b=this.neg().divmod(i,f),f!=="mod"&&(c=b.div.neg()),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.iadd(i)),{div:c,mod:p}):this.negative===0&&i.negative!==0?(b=this.divmod(i.neg(),f),f!=="mod"&&(c=b.div.neg()),{div:c,mod:b.mod}):(this.negative&i.negative)!==0?(b=this.neg().divmod(i.neg(),f),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.isub(i)),{div:b.div,mod:p}):i.length>this.length||this.cmp(i)<0?{div:new a(0),mod:this}:i.length===1?f==="div"?{div:this.divn(i.words[0]),mod:null}:f==="mod"?{div:null,mod:new a(this.modn(i.words[0]))}:{div:this.divn(i.words[0]),mod:new a(this.modn(i.words[0]))}:this._wordDiv(i,f)},a.prototype.div=function(i){return this.divmod(i,"div",!1).div},a.prototype.mod=function(i){return this.divmod(i,"mod",!1).mod},a.prototype.umod=function(i){return this.divmod(i,"mod",!0).mod},a.prototype.divRound=function(i){var f=this.divmod(i);if(f.mod.isZero())return f.div;var u=f.div.negative!==0?f.mod.isub(i):f.mod,c=i.ushrn(1),p=i.andln(1),b=u.cmp(c);return b<0||p===1&&b===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},a.prototype.modn=function(i){n(i<=67108863);for(var f=(1<<26)%i,u=0,c=this.length-1;c>=0;c--)u=(f*u+(this.words[c]|0))%i;return u},a.prototype.idivn=function(i){n(i<=67108863);for(var f=0,u=this.length-1;u>=0;u--){var c=(this.words[u]|0)+f*67108864;this.words[u]=c/i|0,f=c%i}return this.strip()},a.prototype.divn=function(i){return this.clone().idivn(i)},a.prototype.egcd=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=new a(0),g=new a(1),l=0;f.isEven()&&u.isEven();)f.iushrn(1),u.iushrn(1),++l;for(var s=u.clone(),v=f.clone();!f.isZero();){for(var x=0,C=1;(f.words[0]&C)===0&&x<26;++x,C<<=1);if(x>0)for(f.iushrn(x);x-- >0;)(c.isOdd()||p.isOdd())&&(c.iadd(s),p.isub(v)),c.iushrn(1),p.iushrn(1);for(var B=0,k=1;(u.words[0]&k)===0&&B<26;++B,k<<=1);if(B>0)for(u.iushrn(B);B-- >0;)(b.isOdd()||g.isOdd())&&(b.iadd(s),g.isub(v)),b.iushrn(1),g.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(b),p.isub(g)):(u.isub(f),b.isub(c),g.isub(p))}return{a:b,b:g,gcd:u.iushln(l)}},a.prototype._invmp=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=u.clone();f.cmpn(1)>0&&u.cmpn(1)>0;){for(var g=0,l=1;(f.words[0]&l)===0&&g<26;++g,l<<=1);if(g>0)for(f.iushrn(g);g-- >0;)c.isOdd()&&c.iadd(b),c.iushrn(1);for(var s=0,v=1;(u.words[0]&v)===0&&s<26;++s,v<<=1);if(s>0)for(u.iushrn(s);s-- >0;)p.isOdd()&&p.iadd(b),p.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(p)):(u.isub(f),p.isub(c))}var x;return f.cmpn(1)===0?x=c:x=p,x.cmpn(0)<0&&x.iadd(i),x},a.prototype.gcd=function(i){if(this.isZero())return i.abs();if(i.isZero())return this.abs();var f=this.clone(),u=i.clone();f.negative=0,u.negative=0;for(var c=0;f.isEven()&&u.isEven();c++)f.iushrn(1),u.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;u.isEven();)u.iushrn(1);var p=f.cmp(u);if(p<0){var b=f;f=u,u=b}else if(p===0||u.cmpn(1)===0)break;f.isub(u)}while(!0);return u.iushln(c)},a.prototype.invm=function(i){return this.egcd(i).a.umod(i)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(i){return this.words[0]&i},a.prototype.bincn=function(i){n(typeof i=="number");var f=i%26,u=(i-f)/26,c=1<>>26,g&=67108863,this.words[b]=g}return p!==0&&(this.words[b]=p,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(i){var f=i<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var u;if(this.length>1)u=1;else{f&&(i=-i),n(i<=67108863,"Number is too big");var c=this.words[0]|0;u=c===i?0:ci.length)return 1;if(this.length=0;u--){var c=this.words[u]|0,p=i.words[u]|0;if(c!==p){cp&&(f=1);break}}return f},a.prototype.gtn=function(i){return this.cmpn(i)===1},a.prototype.gt=function(i){return this.cmp(i)===1},a.prototype.gten=function(i){return this.cmpn(i)>=0},a.prototype.gte=function(i){return this.cmp(i)>=0},a.prototype.ltn=function(i){return this.cmpn(i)===-1},a.prototype.lt=function(i){return this.cmp(i)===-1},a.prototype.lten=function(i){return this.cmpn(i)<=0},a.prototype.lte=function(i){return this.cmp(i)<=0},a.prototype.eqn=function(i){return this.cmpn(i)===0},a.prototype.eq=function(i){return this.cmp(i)===0},a.red=function(i){return new W(i)},a.prototype.toRed=function(i){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),i.convertTo(this)._forceRed(i)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(i){return this.red=i,this},a.prototype.forceRed=function(i){return n(!this.red,"Already a number in reduction context"),this._forceRed(i)},a.prototype.redAdd=function(i){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,i)},a.prototype.redIAdd=function(i){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,i)},a.prototype.redSub=function(i){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,i)},a.prototype.redISub=function(i){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,i)},a.prototype.redShl=function(i){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,i)},a.prototype.redMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.mul(this,i)},a.prototype.redIMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.imul(this,i)},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(i){return n(this.red&&!i.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,i)};var L={k256:null,p224:null,p192:null,p25519:null};function N(h,i){this.name=h,this.p=new a(i,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var i=new a(null);return i.words=new Array(Math.ceil(this.n/13)),i},N.prototype.ireduce=function(i){var f=i,u;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),u=f.bitLength();while(u>this.n);var c=u0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},N.prototype.split=function(i,f){i.iushrn(this.n,0,f)},N.prototype.imulK=function(i){return i.imul(this.k)};function q(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(q,N),q.prototype.split=function(i,f){for(var u=4194303,c=Math.min(i.length,9),p=0;p>>22,b=g}b>>>=22,i.words[p-10]=b,b===0&&i.length>10?i.length-=10:i.length-=9},q.prototype.imulK=function(i){i.words[i.length]=0,i.words[i.length+1]=0,i.length+=2;for(var f=0,u=0;u>>=26,i.words[u]=p,f=c}return f!==0&&(i.words[i.length++]=f),i},a._prime=function(i){if(L[i])return L[i];var f;if(i==="k256")f=new q;else if(i==="p224")f=new X;else if(i==="p192")f=new J;else if(i==="p25519")f=new Z;else throw new Error("Unknown prime "+i);return L[i]=f,f};function W(h){if(typeof h=="string"){var i=a._prime(h);this.m=i.p,this.prime=i}else n(h.gtn(1),"modulus must be greater than 1"),this.m=h,this.prime=null}W.prototype._verify1=function(i){n(i.negative===0,"red works only with positives"),n(i.red,"red works only with red numbers")},W.prototype._verify2=function(i,f){n((i.negative|f.negative)===0,"red works only with positives"),n(i.red&&i.red===f.red,"red works only with red numbers")},W.prototype.imod=function(i){return this.prime?this.prime.ireduce(i)._forceRed(this):i.umod(this.m)._forceRed(this)},W.prototype.neg=function(i){return i.isZero()?i.clone():this.m.sub(i)._forceRed(this)},W.prototype.add=function(i,f){this._verify2(i,f);var u=i.add(f);return u.cmp(this.m)>=0&&u.isub(this.m),u._forceRed(this)},W.prototype.iadd=function(i,f){this._verify2(i,f);var u=i.iadd(f);return u.cmp(this.m)>=0&&u.isub(this.m),u},W.prototype.sub=function(i,f){this._verify2(i,f);var u=i.sub(f);return u.cmpn(0)<0&&u.iadd(this.m),u._forceRed(this)},W.prototype.isub=function(i,f){this._verify2(i,f);var u=i.isub(f);return u.cmpn(0)<0&&u.iadd(this.m),u},W.prototype.shl=function(i,f){return this._verify1(i),this.imod(i.ushln(f))},W.prototype.imul=function(i,f){return this._verify2(i,f),this.imod(i.imul(f))},W.prototype.mul=function(i,f){return this._verify2(i,f),this.imod(i.mul(f))},W.prototype.isqr=function(i){return this.imul(i,i.clone())},W.prototype.sqr=function(i){return this.mul(i,i)},W.prototype.sqrt=function(i){if(i.isZero())return i.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var u=this.m.add(new a(1)).iushrn(2);return this.pow(i,u)}for(var c=this.m.subn(1),p=0;!c.isZero()&&c.andln(1)===0;)p++,c.iushrn(1);n(!c.isZero());var b=new a(1).toRed(this),g=b.redNeg(),l=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new a(2*s*s).toRed(this);this.pow(s,l).cmp(g)!==0;)s.redIAdd(g);for(var v=this.pow(s,c),x=this.pow(i,c.addn(1).iushrn(1)),C=this.pow(i,c),B=p;C.cmp(b)!==0;){for(var k=C,R=0;k.cmp(b)!==0;R++)k=k.redSqr();n(R=0;p--){for(var v=f.words[p],x=s-1;x>=0;x--){var C=v>>x&1;if(b!==c[0]&&(b=this.sqr(b)),C===0&&g===0){l=0;continue}g<<=1,g|=C,l++,!(l!==u&&(p!==0||x!==0))&&(b=this.mul(b,c[g]),l=0,g=0)}s=26}return b},W.prototype.convertTo=function(i){var f=i.umod(this.m);return f===i?f.clone():f},W.prototype.convertFrom=function(i){var f=i.clone();return f.red=null,f},a.mont=function(i){return new $(i)};function $(h){W.call(this,h),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)}o($,W),$.prototype.convertTo=function(i){return this.imod(i.ushln(this.shift))},$.prototype.convertFrom=function(i){var f=this.imod(i.mul(this.rinv));return f.red=null,f},$.prototype.imul=function(i,f){if(i.isZero()||f.isZero())return i.words[0]=0,i.length=1,i;var u=i.imul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.mul=function(i,f){if(i.isZero()||f.isZero())return new a(0)._forceRed(this);var u=i.mul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.invm=function(i){var f=this.imod(i._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(e,Qe)}(kp)),kp.exports}var Tp={exports:{}},zw;function OK(){return zw||(zw=1,function(e){(function(t,r){function n(h,i){if(!h)throw new Error(i||"Assertion failed")}function o(h,i){h.super_=i;var f=function(){};f.prototype=i.prototype,h.prototype=new f,h.prototype.constructor=h}function a(h,i,f){if(a.isBN(h))return h;this.negative=0,this.words=null,this.length=0,this.red=null,h!==null&&((i==="le"||i==="be")&&(f=i,i=10),this._init(h||0,i||10,f||"be"))}typeof t=="object"?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var d;try{typeof window<"u"&&typeof window.Buffer<"u"?d=window.Buffer:d=on.Buffer}catch{}a.isBN=function(i){return i instanceof a?!0:i!==null&&typeof i=="object"&&i.constructor.wordSize===a.wordSize&&Array.isArray(i.words)},a.max=function(i,f){return i.cmp(f)>0?i:f},a.min=function(i,f){return i.cmp(f)<0?i:f},a.prototype._init=function(i,f,u){if(typeof i=="number")return this._initNumber(i,f,u);if(typeof i=="object")return this._initArray(i,f,u);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),i=i.toString().replace(/\s+/g,"");var c=0;i[0]==="-"&&(c++,this.negative=1),c=0;c-=3)b=i[c]|i[c-1]<<8|i[c-2]<<16,this.words[p]|=b<>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);else if(u==="le")for(c=0,p=0;c>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);return this.strip()};function m(h,i){var f=h.charCodeAt(i);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function y(h,i,f){var u=m(h,f);return f-1>=i&&(u|=m(h,f-1)<<4),u}a.prototype._parseHex=function(i,f,u){this.length=Math.ceil((i.length-f)/6),this.words=new Array(this.length);for(var c=0;c=f;c-=2)g=y(i,f,c)<=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8;else{var l=i.length-f;for(c=l%2===0?f+1:f;c=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8}this.strip()};function w(h,i,f,u){for(var c=0,p=Math.min(h.length,f),b=i;b=49?c+=g-49+10:g>=17?c+=g-17+10:c+=g}return c}a.prototype._parseBase=function(i,f,u){this.words=[0],this.length=1;for(var c=0,p=1;p<=67108863;p*=f)c++;c--,p=p/f|0;for(var b=i.length-u,g=b%c,l=Math.min(b,b-g)+u,s=0,v=u;v1&&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},a.prototype.inspect=function(){return(this.red?""};var M=["","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"],_=[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],E=[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(i,f){i=i||10,f=f|0||1;var u;if(i===16||i==="hex"){u="";for(var c=0,p=0,b=0;b>>24-c&16777215,p!==0||b!==this.length-1?u=M[6-l.length]+l+u:u=l+u,c+=2,c>=26&&(c-=26,b--)}for(p!==0&&(u=p.toString(16)+u);u.length%f!==0;)u="0"+u;return this.negative!==0&&(u="-"+u),u}if(i===(i|0)&&i>=2&&i<=36){var s=_[i],v=E[i];u="";var x=this.clone();for(x.negative=0;!x.isZero();){var C=x.modn(v).toString(i);x=x.idivn(v),x.isZero()?u=C+u:u=M[s-C.length]+C+u}for(this.isZero()&&(u="0"+u);u.length%f!==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 i=this.words[0];return this.length===2?i+=this.words[1]*67108864:this.length===3&&this.words[2]===1?i+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-i:i},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(i,f){return n(typeof d<"u"),this.toArrayLike(d,i,f)},a.prototype.toArray=function(i,f){return this.toArrayLike(Array,i,f)},a.prototype.toArrayLike=function(i,f,u){var c=this.byteLength(),p=u||Math.max(1,c);n(c<=p,"byte array longer than desired length"),n(p>0,"Requested array length <= 0"),this.strip();var b=f==="le",g=new i(p),l,s,v=this.clone();if(b){for(s=0;!v.isZero();s++)l=v.andln(255),v.iushrn(8),g[s]=l;for(;s=4096&&(u+=13,f>>>=13),f>=64&&(u+=7,f>>>=7),f>=8&&(u+=4,f>>>=4),f>=2&&(u+=2,f>>>=2),u+f},a.prototype._zeroBits=function(i){if(i===0)return 26;var f=i,u=0;return(f&8191)===0&&(u+=13,f>>>=13),(f&127)===0&&(u+=7,f>>>=7),(f&15)===0&&(u+=4,f>>>=4),(f&3)===0&&(u+=2,f>>>=2),(f&1)===0&&u++,u},a.prototype.bitLength=function(){var i=this.words[this.length-1],f=this._countBits(i);return(this.length-1)*26+f};function S(h){for(var i=new Array(h.bitLength()),f=0;f>>c}return i}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var i=0,f=0;fi.length?this.clone().ior(i):i.clone().ior(this)},a.prototype.uor=function(i){return this.length>i.length?this.clone().iuor(i):i.clone().iuor(this)},a.prototype.iuand=function(i){var f;this.length>i.length?f=i:f=this;for(var u=0;ui.length?this.clone().iand(i):i.clone().iand(this)},a.prototype.uand=function(i){return this.length>i.length?this.clone().iuand(i):i.clone().iuand(this)},a.prototype.iuxor=function(i){var f,u;this.length>i.length?(f=this,u=i):(f=i,u=this);for(var c=0;ci.length?this.clone().ixor(i):i.clone().ixor(this)},a.prototype.uxor=function(i){return this.length>i.length?this.clone().iuxor(i):i.clone().iuxor(this)},a.prototype.inotn=function(i){n(typeof i=="number"&&i>=0);var f=Math.ceil(i/26)|0,u=i%26;this._expand(f),u>0&&f--;for(var c=0;c0&&(this.words[c]=~this.words[c]&67108863>>26-u),this.strip()},a.prototype.notn=function(i){return this.clone().inotn(i)},a.prototype.setn=function(i,f){n(typeof i=="number"&&i>=0);var u=i/26|0,c=i%26;return this._expand(u+1),f?this.words[u]=this.words[u]|1<i.length?(u=this,c=i):(u=i,c=this);for(var p=0,b=0;b>>26;for(;p!==0&&b>>26;if(this.length=u.length,p!==0)this.words[this.length]=p,this.length++;else if(u!==this)for(;bi.length?this.clone().iadd(i):i.clone().iadd(this)},a.prototype.isub=function(i){if(i.negative!==0){i.negative=0;var f=this.iadd(i);return i.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(i),this.negative=1,this._normSign();var u=this.cmp(i);if(u===0)return this.negative=0,this.length=1,this.words[0]=0,this;var c,p;u>0?(c=this,p=i):(c=i,p=this);for(var b=0,g=0;g>26,this.words[g]=f&67108863;for(;b!==0&&g>26,this.words[g]=f&67108863;if(b===0&&g>>26,x=l&67108863,C=Math.min(s,i.length-1),B=Math.max(0,s-h.length+1);B<=C;B++){var k=s-B|0;c=h.words[k]|0,p=i.words[B]|0,b=c*p+x,v+=b/67108864|0,x=b&67108863}f.words[s]=x|0,l=v|0}return l!==0?f.words[s]=l|0:f.length--,f.strip()}var T=function(i,f,u){var c=i.words,p=f.words,b=u.words,g=0,l,s,v,x=c[0]|0,C=x&8191,B=x>>>13,k=c[1]|0,R=k&8191,D=k>>>13,z=c[2]|0,H=z&8191,V=z>>>13,U=c[3]|0,F=U&8191,G=U>>>13,ie=c[4]|0,Y=ie&8191,oe=ie>>>13,xe=c[5]|0,ne=xe&8191,Q=xe>>>13,te=c[6]|0,ee=te&8191,se=te>>>13,_e=c[7]|0,K=_e&8191,re=_e>>>13,Te=c[8]|0,ae=Te&8191,Me=Te>>>13,ze=c[9]|0,fe=ze&8191,Se=ze>>>13,He=p[0]|0,ue=He&8191,Ae=He>>>13,Ue=p[1]|0,he=Ue&8191,Ce=Ue>>>13,je=p[2]|0,de=je&8191,Oe=je>>>13,Ve=p[3]|0,pe=Ve&8191,Pe=Ve>>>13,Ke=p[4]|0,ve=Ke&8191,Be=Ke>>>13,Ge=p[5]|0,me=Ge&8191,Ie=Ge>>>13,We=p[6]|0,ge=We&8191,$e=We>>>13,Ze=p[7]|0,ye=Ze&8191,Le=Ze>>>13,Ye=p[8]|0,be=Ye&8191,De=Ye>>>13,Xe=p[9]|0,we=Xe&8191,Re=Xe>>>13;u.negative=i.negative^f.negative,u.length=19,l=Math.imul(C,ue),s=Math.imul(C,Ae),s=s+Math.imul(B,ue)|0,v=Math.imul(B,Ae);var tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(tt>>>26)|0,tt&=67108863,l=Math.imul(R,ue),s=Math.imul(R,Ae),s=s+Math.imul(D,ue)|0,v=Math.imul(D,Ae),l=l+Math.imul(C,he)|0,s=s+Math.imul(C,Ce)|0,s=s+Math.imul(B,he)|0,v=v+Math.imul(B,Ce)|0;var rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(rt>>>26)|0,rt&=67108863,l=Math.imul(H,ue),s=Math.imul(H,Ae),s=s+Math.imul(V,ue)|0,v=Math.imul(V,Ae),l=l+Math.imul(R,he)|0,s=s+Math.imul(R,Ce)|0,s=s+Math.imul(D,he)|0,v=v+Math.imul(D,Ce)|0,l=l+Math.imul(C,de)|0,s=s+Math.imul(C,Oe)|0,s=s+Math.imul(B,de)|0,v=v+Math.imul(B,Oe)|0;var ut=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ut>>>26)|0,ut&=67108863,l=Math.imul(F,ue),s=Math.imul(F,Ae),s=s+Math.imul(G,ue)|0,v=Math.imul(G,Ae),l=l+Math.imul(H,he)|0,s=s+Math.imul(H,Ce)|0,s=s+Math.imul(V,he)|0,v=v+Math.imul(V,Ce)|0,l=l+Math.imul(R,de)|0,s=s+Math.imul(R,Oe)|0,s=s+Math.imul(D,de)|0,v=v+Math.imul(D,Oe)|0,l=l+Math.imul(C,pe)|0,s=s+Math.imul(C,Pe)|0,s=s+Math.imul(B,pe)|0,v=v+Math.imul(B,Pe)|0;var lt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(lt>>>26)|0,lt&=67108863,l=Math.imul(Y,ue),s=Math.imul(Y,Ae),s=s+Math.imul(oe,ue)|0,v=Math.imul(oe,Ae),l=l+Math.imul(F,he)|0,s=s+Math.imul(F,Ce)|0,s=s+Math.imul(G,he)|0,v=v+Math.imul(G,Ce)|0,l=l+Math.imul(H,de)|0,s=s+Math.imul(H,Oe)|0,s=s+Math.imul(V,de)|0,v=v+Math.imul(V,Oe)|0,l=l+Math.imul(R,pe)|0,s=s+Math.imul(R,Pe)|0,s=s+Math.imul(D,pe)|0,v=v+Math.imul(D,Pe)|0,l=l+Math.imul(C,ve)|0,s=s+Math.imul(C,Be)|0,s=s+Math.imul(B,ve)|0,v=v+Math.imul(B,Be)|0;var ht=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ht>>>26)|0,ht&=67108863,l=Math.imul(ne,ue),s=Math.imul(ne,Ae),s=s+Math.imul(Q,ue)|0,v=Math.imul(Q,Ae),l=l+Math.imul(Y,he)|0,s=s+Math.imul(Y,Ce)|0,s=s+Math.imul(oe,he)|0,v=v+Math.imul(oe,Ce)|0,l=l+Math.imul(F,de)|0,s=s+Math.imul(F,Oe)|0,s=s+Math.imul(G,de)|0,v=v+Math.imul(G,Oe)|0,l=l+Math.imul(H,pe)|0,s=s+Math.imul(H,Pe)|0,s=s+Math.imul(V,pe)|0,v=v+Math.imul(V,Pe)|0,l=l+Math.imul(R,ve)|0,s=s+Math.imul(R,Be)|0,s=s+Math.imul(D,ve)|0,v=v+Math.imul(D,Be)|0,l=l+Math.imul(C,me)|0,s=s+Math.imul(C,Ie)|0,s=s+Math.imul(B,me)|0,v=v+Math.imul(B,Ie)|0;var ct=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ct>>>26)|0,ct&=67108863,l=Math.imul(ee,ue),s=Math.imul(ee,Ae),s=s+Math.imul(se,ue)|0,v=Math.imul(se,Ae),l=l+Math.imul(ne,he)|0,s=s+Math.imul(ne,Ce)|0,s=s+Math.imul(Q,he)|0,v=v+Math.imul(Q,Ce)|0,l=l+Math.imul(Y,de)|0,s=s+Math.imul(Y,Oe)|0,s=s+Math.imul(oe,de)|0,v=v+Math.imul(oe,Oe)|0,l=l+Math.imul(F,pe)|0,s=s+Math.imul(F,Pe)|0,s=s+Math.imul(G,pe)|0,v=v+Math.imul(G,Pe)|0,l=l+Math.imul(H,ve)|0,s=s+Math.imul(H,Be)|0,s=s+Math.imul(V,ve)|0,v=v+Math.imul(V,Be)|0,l=l+Math.imul(R,me)|0,s=s+Math.imul(R,Ie)|0,s=s+Math.imul(D,me)|0,v=v+Math.imul(D,Ie)|0,l=l+Math.imul(C,ge)|0,s=s+Math.imul(C,$e)|0,s=s+Math.imul(B,ge)|0,v=v+Math.imul(B,$e)|0;var dt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(dt>>>26)|0,dt&=67108863,l=Math.imul(K,ue),s=Math.imul(K,Ae),s=s+Math.imul(re,ue)|0,v=Math.imul(re,Ae),l=l+Math.imul(ee,he)|0,s=s+Math.imul(ee,Ce)|0,s=s+Math.imul(se,he)|0,v=v+Math.imul(se,Ce)|0,l=l+Math.imul(ne,de)|0,s=s+Math.imul(ne,Oe)|0,s=s+Math.imul(Q,de)|0,v=v+Math.imul(Q,Oe)|0,l=l+Math.imul(Y,pe)|0,s=s+Math.imul(Y,Pe)|0,s=s+Math.imul(oe,pe)|0,v=v+Math.imul(oe,Pe)|0,l=l+Math.imul(F,ve)|0,s=s+Math.imul(F,Be)|0,s=s+Math.imul(G,ve)|0,v=v+Math.imul(G,Be)|0,l=l+Math.imul(H,me)|0,s=s+Math.imul(H,Ie)|0,s=s+Math.imul(V,me)|0,v=v+Math.imul(V,Ie)|0,l=l+Math.imul(R,ge)|0,s=s+Math.imul(R,$e)|0,s=s+Math.imul(D,ge)|0,v=v+Math.imul(D,$e)|0,l=l+Math.imul(C,ye)|0,s=s+Math.imul(C,Le)|0,s=s+Math.imul(B,ye)|0,v=v+Math.imul(B,Le)|0;var yt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(yt>>>26)|0,yt&=67108863,l=Math.imul(ae,ue),s=Math.imul(ae,Ae),s=s+Math.imul(Me,ue)|0,v=Math.imul(Me,Ae),l=l+Math.imul(K,he)|0,s=s+Math.imul(K,Ce)|0,s=s+Math.imul(re,he)|0,v=v+Math.imul(re,Ce)|0,l=l+Math.imul(ee,de)|0,s=s+Math.imul(ee,Oe)|0,s=s+Math.imul(se,de)|0,v=v+Math.imul(se,Oe)|0,l=l+Math.imul(ne,pe)|0,s=s+Math.imul(ne,Pe)|0,s=s+Math.imul(Q,pe)|0,v=v+Math.imul(Q,Pe)|0,l=l+Math.imul(Y,ve)|0,s=s+Math.imul(Y,Be)|0,s=s+Math.imul(oe,ve)|0,v=v+Math.imul(oe,Be)|0,l=l+Math.imul(F,me)|0,s=s+Math.imul(F,Ie)|0,s=s+Math.imul(G,me)|0,v=v+Math.imul(G,Ie)|0,l=l+Math.imul(H,ge)|0,s=s+Math.imul(H,$e)|0,s=s+Math.imul(V,ge)|0,v=v+Math.imul(V,$e)|0,l=l+Math.imul(R,ye)|0,s=s+Math.imul(R,Le)|0,s=s+Math.imul(D,ye)|0,v=v+Math.imul(D,Le)|0,l=l+Math.imul(C,be)|0,s=s+Math.imul(C,De)|0,s=s+Math.imul(B,be)|0,v=v+Math.imul(B,De)|0;var bt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(bt>>>26)|0,bt&=67108863,l=Math.imul(fe,ue),s=Math.imul(fe,Ae),s=s+Math.imul(Se,ue)|0,v=Math.imul(Se,Ae),l=l+Math.imul(ae,he)|0,s=s+Math.imul(ae,Ce)|0,s=s+Math.imul(Me,he)|0,v=v+Math.imul(Me,Ce)|0,l=l+Math.imul(K,de)|0,s=s+Math.imul(K,Oe)|0,s=s+Math.imul(re,de)|0,v=v+Math.imul(re,Oe)|0,l=l+Math.imul(ee,pe)|0,s=s+Math.imul(ee,Pe)|0,s=s+Math.imul(se,pe)|0,v=v+Math.imul(se,Pe)|0,l=l+Math.imul(ne,ve)|0,s=s+Math.imul(ne,Be)|0,s=s+Math.imul(Q,ve)|0,v=v+Math.imul(Q,Be)|0,l=l+Math.imul(Y,me)|0,s=s+Math.imul(Y,Ie)|0,s=s+Math.imul(oe,me)|0,v=v+Math.imul(oe,Ie)|0,l=l+Math.imul(F,ge)|0,s=s+Math.imul(F,$e)|0,s=s+Math.imul(G,ge)|0,v=v+Math.imul(G,$e)|0,l=l+Math.imul(H,ye)|0,s=s+Math.imul(H,Le)|0,s=s+Math.imul(V,ye)|0,v=v+Math.imul(V,Le)|0,l=l+Math.imul(R,be)|0,s=s+Math.imul(R,De)|0,s=s+Math.imul(D,be)|0,v=v+Math.imul(D,De)|0,l=l+Math.imul(C,we)|0,s=s+Math.imul(C,Re)|0,s=s+Math.imul(B,we)|0,v=v+Math.imul(B,Re)|0;var wt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(wt>>>26)|0,wt&=67108863,l=Math.imul(fe,he),s=Math.imul(fe,Ce),s=s+Math.imul(Se,he)|0,v=Math.imul(Se,Ce),l=l+Math.imul(ae,de)|0,s=s+Math.imul(ae,Oe)|0,s=s+Math.imul(Me,de)|0,v=v+Math.imul(Me,Oe)|0,l=l+Math.imul(K,pe)|0,s=s+Math.imul(K,Pe)|0,s=s+Math.imul(re,pe)|0,v=v+Math.imul(re,Pe)|0,l=l+Math.imul(ee,ve)|0,s=s+Math.imul(ee,Be)|0,s=s+Math.imul(se,ve)|0,v=v+Math.imul(se,Be)|0,l=l+Math.imul(ne,me)|0,s=s+Math.imul(ne,Ie)|0,s=s+Math.imul(Q,me)|0,v=v+Math.imul(Q,Ie)|0,l=l+Math.imul(Y,ge)|0,s=s+Math.imul(Y,$e)|0,s=s+Math.imul(oe,ge)|0,v=v+Math.imul(oe,$e)|0,l=l+Math.imul(F,ye)|0,s=s+Math.imul(F,Le)|0,s=s+Math.imul(G,ye)|0,v=v+Math.imul(G,Le)|0,l=l+Math.imul(H,be)|0,s=s+Math.imul(H,De)|0,s=s+Math.imul(V,be)|0,v=v+Math.imul(V,De)|0,l=l+Math.imul(R,we)|0,s=s+Math.imul(R,Re)|0,s=s+Math.imul(D,we)|0,v=v+Math.imul(D,Re)|0;var Mt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,l=Math.imul(fe,de),s=Math.imul(fe,Oe),s=s+Math.imul(Se,de)|0,v=Math.imul(Se,Oe),l=l+Math.imul(ae,pe)|0,s=s+Math.imul(ae,Pe)|0,s=s+Math.imul(Me,pe)|0,v=v+Math.imul(Me,Pe)|0,l=l+Math.imul(K,ve)|0,s=s+Math.imul(K,Be)|0,s=s+Math.imul(re,ve)|0,v=v+Math.imul(re,Be)|0,l=l+Math.imul(ee,me)|0,s=s+Math.imul(ee,Ie)|0,s=s+Math.imul(se,me)|0,v=v+Math.imul(se,Ie)|0,l=l+Math.imul(ne,ge)|0,s=s+Math.imul(ne,$e)|0,s=s+Math.imul(Q,ge)|0,v=v+Math.imul(Q,$e)|0,l=l+Math.imul(Y,ye)|0,s=s+Math.imul(Y,Le)|0,s=s+Math.imul(oe,ye)|0,v=v+Math.imul(oe,Le)|0,l=l+Math.imul(F,be)|0,s=s+Math.imul(F,De)|0,s=s+Math.imul(G,be)|0,v=v+Math.imul(G,De)|0,l=l+Math.imul(H,we)|0,s=s+Math.imul(H,Re)|0,s=s+Math.imul(V,we)|0,v=v+Math.imul(V,Re)|0;var xt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(xt>>>26)|0,xt&=67108863,l=Math.imul(fe,pe),s=Math.imul(fe,Pe),s=s+Math.imul(Se,pe)|0,v=Math.imul(Se,Pe),l=l+Math.imul(ae,ve)|0,s=s+Math.imul(ae,Be)|0,s=s+Math.imul(Me,ve)|0,v=v+Math.imul(Me,Be)|0,l=l+Math.imul(K,me)|0,s=s+Math.imul(K,Ie)|0,s=s+Math.imul(re,me)|0,v=v+Math.imul(re,Ie)|0,l=l+Math.imul(ee,ge)|0,s=s+Math.imul(ee,$e)|0,s=s+Math.imul(se,ge)|0,v=v+Math.imul(se,$e)|0,l=l+Math.imul(ne,ye)|0,s=s+Math.imul(ne,Le)|0,s=s+Math.imul(Q,ye)|0,v=v+Math.imul(Q,Le)|0,l=l+Math.imul(Y,be)|0,s=s+Math.imul(Y,De)|0,s=s+Math.imul(oe,be)|0,v=v+Math.imul(oe,De)|0,l=l+Math.imul(F,we)|0,s=s+Math.imul(F,Re)|0,s=s+Math.imul(G,we)|0,v=v+Math.imul(G,Re)|0;var _t=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(_t>>>26)|0,_t&=67108863,l=Math.imul(fe,ve),s=Math.imul(fe,Be),s=s+Math.imul(Se,ve)|0,v=Math.imul(Se,Be),l=l+Math.imul(ae,me)|0,s=s+Math.imul(ae,Ie)|0,s=s+Math.imul(Me,me)|0,v=v+Math.imul(Me,Ie)|0,l=l+Math.imul(K,ge)|0,s=s+Math.imul(K,$e)|0,s=s+Math.imul(re,ge)|0,v=v+Math.imul(re,$e)|0,l=l+Math.imul(ee,ye)|0,s=s+Math.imul(ee,Le)|0,s=s+Math.imul(se,ye)|0,v=v+Math.imul(se,Le)|0,l=l+Math.imul(ne,be)|0,s=s+Math.imul(ne,De)|0,s=s+Math.imul(Q,be)|0,v=v+Math.imul(Q,De)|0,l=l+Math.imul(Y,we)|0,s=s+Math.imul(Y,Re)|0,s=s+Math.imul(oe,we)|0,v=v+Math.imul(oe,Re)|0;var Et=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Et>>>26)|0,Et&=67108863,l=Math.imul(fe,me),s=Math.imul(fe,Ie),s=s+Math.imul(Se,me)|0,v=Math.imul(Se,Ie),l=l+Math.imul(ae,ge)|0,s=s+Math.imul(ae,$e)|0,s=s+Math.imul(Me,ge)|0,v=v+Math.imul(Me,$e)|0,l=l+Math.imul(K,ye)|0,s=s+Math.imul(K,Le)|0,s=s+Math.imul(re,ye)|0,v=v+Math.imul(re,Le)|0,l=l+Math.imul(ee,be)|0,s=s+Math.imul(ee,De)|0,s=s+Math.imul(se,be)|0,v=v+Math.imul(se,De)|0,l=l+Math.imul(ne,we)|0,s=s+Math.imul(ne,Re)|0,s=s+Math.imul(Q,we)|0,v=v+Math.imul(Q,Re)|0;var St=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(St>>>26)|0,St&=67108863,l=Math.imul(fe,ge),s=Math.imul(fe,$e),s=s+Math.imul(Se,ge)|0,v=Math.imul(Se,$e),l=l+Math.imul(ae,ye)|0,s=s+Math.imul(ae,Le)|0,s=s+Math.imul(Me,ye)|0,v=v+Math.imul(Me,Le)|0,l=l+Math.imul(K,be)|0,s=s+Math.imul(K,De)|0,s=s+Math.imul(re,be)|0,v=v+Math.imul(re,De)|0,l=l+Math.imul(ee,we)|0,s=s+Math.imul(ee,Re)|0,s=s+Math.imul(se,we)|0,v=v+Math.imul(se,Re)|0;var At=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(At>>>26)|0,At&=67108863,l=Math.imul(fe,ye),s=Math.imul(fe,Le),s=s+Math.imul(Se,ye)|0,v=Math.imul(Se,Le),l=l+Math.imul(ae,be)|0,s=s+Math.imul(ae,De)|0,s=s+Math.imul(Me,be)|0,v=v+Math.imul(Me,De)|0,l=l+Math.imul(K,we)|0,s=s+Math.imul(K,Re)|0,s=s+Math.imul(re,we)|0,v=v+Math.imul(re,Re)|0;var Tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,l=Math.imul(fe,be),s=Math.imul(fe,De),s=s+Math.imul(Se,be)|0,v=Math.imul(Se,De),l=l+Math.imul(ae,we)|0,s=s+Math.imul(ae,Re)|0,s=s+Math.imul(Me,we)|0,v=v+Math.imul(Me,Re)|0;var Rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,l=Math.imul(fe,we),s=Math.imul(fe,Re),s=s+Math.imul(Se,we)|0,v=Math.imul(Se,Re);var qt=(g+l|0)+((s&8191)<<13)|0;return g=(v+(s>>>13)|0)+(qt>>>26)|0,qt&=67108863,b[0]=tt,b[1]=rt,b[2]=ut,b[3]=lt,b[4]=ht,b[5]=ct,b[6]=dt,b[7]=yt,b[8]=bt,b[9]=wt,b[10]=Mt,b[11]=xt,b[12]=_t,b[13]=Et,b[14]=St,b[15]=At,b[16]=Tt,b[17]=Rt,b[18]=qt,g!==0&&(b[19]=g,u.length++),u};Math.imul||(T=A);function I(h,i,f){f.negative=i.negative^h.negative,f.length=h.length+i.length;for(var u=0,c=0,p=0;p>>26)|0,c+=b>>>26,b&=67108863}f.words[p]=g,u=b,b=c}return u!==0?f.words[p]=u:f.length--,f.strip()}function O(h,i,f){var u=new P;return u.mulp(h,i,f)}a.prototype.mulTo=function(i,f){var u,c=this.length+i.length;return this.length===10&&i.length===10?u=T(this,i,f):c<63?u=A(this,i,f):c<1024?u=I(this,i,f):u=O(this,i,f),u};function P(h,i){this.x=h,this.y=i}P.prototype.makeRBT=function(i){for(var f=new Array(i),u=a.prototype._countBits(i)-1,c=0;c>=1;return c},P.prototype.permute=function(i,f,u,c,p,b){for(var g=0;g>>1)p++;return 1<>>13,u[2*b+1]=p&8191,p=p>>>13;for(b=2*f;b>=26,f+=c/67108864|0,f+=p>>>26,this.words[u]=p&67108863}return f!==0&&(this.words[u]=f,this.length++),this},a.prototype.muln=function(i){return this.clone().imuln(i)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(i){var f=S(i);if(f.length===0)return new a(1);for(var u=this,c=0;c=0);var f=i%26,u=(i-f)/26,c=67108863>>>26-f<<26-f,p;if(f!==0){var b=0;for(p=0;p>>26-f}b&&(this.words[p]=b,this.length++)}if(u!==0){for(p=this.length-1;p>=0;p--)this.words[p+u]=this.words[p];for(p=0;p=0);var c;f?c=(f-f%26)/26:c=0;var p=i%26,b=Math.min((i-p)/26,this.length),g=67108863^67108863>>>p<b)for(this.length-=b,s=0;s=0&&(v!==0||s>=c);s--){var x=this.words[s]|0;this.words[s]=v<<26-p|x>>>p,v=x&g}return l&&v!==0&&(l.words[l.length++]=v),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(i,f,u){return n(this.negative===0),this.iushrn(i,f,u)},a.prototype.shln=function(i){return this.clone().ishln(i)},a.prototype.ushln=function(i){return this.clone().iushln(i)},a.prototype.shrn=function(i){return this.clone().ishrn(i)},a.prototype.ushrn=function(i){return this.clone().iushrn(i)},a.prototype.testn=function(i){n(typeof i=="number"&&i>=0);var f=i%26,u=(i-f)/26,c=1<=0);var f=i%26,u=(i-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=u)return this;if(f!==0&&u++,this.length=Math.min(u,this.length),f!==0){var c=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},a.prototype.isubn=function(i){if(n(typeof i=="number"),n(i<67108864),i<0)return this.iaddn(-i);if(this.negative!==0)return this.negative=0,this.iaddn(i),this.negative=1,this;if(this.words[0]-=i,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(l/67108864|0),this.words[p+u]=b&67108863}for(;p>26,this.words[p+u]=b&67108863;if(g===0)return this.strip();for(n(g===-1),g=0,p=0;p>26,this.words[p]=b&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(i,f){var u=this.length-i.length,c=this.clone(),p=i,b=p.words[p.length-1]|0,g=this._countBits(b);u=26-g,u!==0&&(p=p.ushln(u),c.iushln(u),b=p.words[p.length-1]|0);var l=c.length-p.length,s;if(f!=="mod"){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var v=0;v=0;C--){var B=(c.words[p.length+C]|0)*67108864+(c.words[p.length+C-1]|0);for(B=Math.min(B/b|0,67108863),c._ishlnsubmul(p,B,C);c.negative!==0;)B--,c.negative=0,c._ishlnsubmul(p,1,C),c.isZero()||(c.negative^=1);s&&(s.words[C]=B)}return s&&s.strip(),c.strip(),f!=="div"&&u!==0&&c.iushrn(u),{div:s||null,mod:c}},a.prototype.divmod=function(i,f,u){if(n(!i.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var c,p,b;return this.negative!==0&&i.negative===0?(b=this.neg().divmod(i,f),f!=="mod"&&(c=b.div.neg()),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.iadd(i)),{div:c,mod:p}):this.negative===0&&i.negative!==0?(b=this.divmod(i.neg(),f),f!=="mod"&&(c=b.div.neg()),{div:c,mod:b.mod}):(this.negative&i.negative)!==0?(b=this.neg().divmod(i.neg(),f),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.isub(i)),{div:b.div,mod:p}):i.length>this.length||this.cmp(i)<0?{div:new a(0),mod:this}:i.length===1?f==="div"?{div:this.divn(i.words[0]),mod:null}:f==="mod"?{div:null,mod:new a(this.modn(i.words[0]))}:{div:this.divn(i.words[0]),mod:new a(this.modn(i.words[0]))}:this._wordDiv(i,f)},a.prototype.div=function(i){return this.divmod(i,"div",!1).div},a.prototype.mod=function(i){return this.divmod(i,"mod",!1).mod},a.prototype.umod=function(i){return this.divmod(i,"mod",!0).mod},a.prototype.divRound=function(i){var f=this.divmod(i);if(f.mod.isZero())return f.div;var u=f.div.negative!==0?f.mod.isub(i):f.mod,c=i.ushrn(1),p=i.andln(1),b=u.cmp(c);return b<0||p===1&&b===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},a.prototype.modn=function(i){n(i<=67108863);for(var f=(1<<26)%i,u=0,c=this.length-1;c>=0;c--)u=(f*u+(this.words[c]|0))%i;return u},a.prototype.idivn=function(i){n(i<=67108863);for(var f=0,u=this.length-1;u>=0;u--){var c=(this.words[u]|0)+f*67108864;this.words[u]=c/i|0,f=c%i}return this.strip()},a.prototype.divn=function(i){return this.clone().idivn(i)},a.prototype.egcd=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=new a(0),g=new a(1),l=0;f.isEven()&&u.isEven();)f.iushrn(1),u.iushrn(1),++l;for(var s=u.clone(),v=f.clone();!f.isZero();){for(var x=0,C=1;(f.words[0]&C)===0&&x<26;++x,C<<=1);if(x>0)for(f.iushrn(x);x-- >0;)(c.isOdd()||p.isOdd())&&(c.iadd(s),p.isub(v)),c.iushrn(1),p.iushrn(1);for(var B=0,k=1;(u.words[0]&k)===0&&B<26;++B,k<<=1);if(B>0)for(u.iushrn(B);B-- >0;)(b.isOdd()||g.isOdd())&&(b.iadd(s),g.isub(v)),b.iushrn(1),g.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(b),p.isub(g)):(u.isub(f),b.isub(c),g.isub(p))}return{a:b,b:g,gcd:u.iushln(l)}},a.prototype._invmp=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=u.clone();f.cmpn(1)>0&&u.cmpn(1)>0;){for(var g=0,l=1;(f.words[0]&l)===0&&g<26;++g,l<<=1);if(g>0)for(f.iushrn(g);g-- >0;)c.isOdd()&&c.iadd(b),c.iushrn(1);for(var s=0,v=1;(u.words[0]&v)===0&&s<26;++s,v<<=1);if(s>0)for(u.iushrn(s);s-- >0;)p.isOdd()&&p.iadd(b),p.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(p)):(u.isub(f),p.isub(c))}var x;return f.cmpn(1)===0?x=c:x=p,x.cmpn(0)<0&&x.iadd(i),x},a.prototype.gcd=function(i){if(this.isZero())return i.abs();if(i.isZero())return this.abs();var f=this.clone(),u=i.clone();f.negative=0,u.negative=0;for(var c=0;f.isEven()&&u.isEven();c++)f.iushrn(1),u.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;u.isEven();)u.iushrn(1);var p=f.cmp(u);if(p<0){var b=f;f=u,u=b}else if(p===0||u.cmpn(1)===0)break;f.isub(u)}while(!0);return u.iushln(c)},a.prototype.invm=function(i){return this.egcd(i).a.umod(i)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(i){return this.words[0]&i},a.prototype.bincn=function(i){n(typeof i=="number");var f=i%26,u=(i-f)/26,c=1<>>26,g&=67108863,this.words[b]=g}return p!==0&&(this.words[b]=p,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(i){var f=i<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var u;if(this.length>1)u=1;else{f&&(i=-i),n(i<=67108863,"Number is too big");var c=this.words[0]|0;u=c===i?0:ci.length)return 1;if(this.length=0;u--){var c=this.words[u]|0,p=i.words[u]|0;if(c!==p){cp&&(f=1);break}}return f},a.prototype.gtn=function(i){return this.cmpn(i)===1},a.prototype.gt=function(i){return this.cmp(i)===1},a.prototype.gten=function(i){return this.cmpn(i)>=0},a.prototype.gte=function(i){return this.cmp(i)>=0},a.prototype.ltn=function(i){return this.cmpn(i)===-1},a.prototype.lt=function(i){return this.cmp(i)===-1},a.prototype.lten=function(i){return this.cmpn(i)<=0},a.prototype.lte=function(i){return this.cmp(i)<=0},a.prototype.eqn=function(i){return this.cmpn(i)===0},a.prototype.eq=function(i){return this.cmp(i)===0},a.red=function(i){return new W(i)},a.prototype.toRed=function(i){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),i.convertTo(this)._forceRed(i)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(i){return this.red=i,this},a.prototype.forceRed=function(i){return n(!this.red,"Already a number in reduction context"),this._forceRed(i)},a.prototype.redAdd=function(i){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,i)},a.prototype.redIAdd=function(i){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,i)},a.prototype.redSub=function(i){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,i)},a.prototype.redISub=function(i){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,i)},a.prototype.redShl=function(i){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,i)},a.prototype.redMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.mul(this,i)},a.prototype.redIMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.imul(this,i)},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(i){return n(this.red&&!i.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,i)};var L={k256:null,p224:null,p192:null,p25519:null};function N(h,i){this.name=h,this.p=new a(i,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var i=new a(null);return i.words=new Array(Math.ceil(this.n/13)),i},N.prototype.ireduce=function(i){var f=i,u;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),u=f.bitLength();while(u>this.n);var c=u0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},N.prototype.split=function(i,f){i.iushrn(this.n,0,f)},N.prototype.imulK=function(i){return i.imul(this.k)};function q(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(q,N),q.prototype.split=function(i,f){for(var u=4194303,c=Math.min(i.length,9),p=0;p>>22,b=g}b>>>=22,i.words[p-10]=b,b===0&&i.length>10?i.length-=10:i.length-=9},q.prototype.imulK=function(i){i.words[i.length]=0,i.words[i.length+1]=0,i.length+=2;for(var f=0,u=0;u>>=26,i.words[u]=p,f=c}return f!==0&&(i.words[i.length++]=f),i},a._prime=function(i){if(L[i])return L[i];var f;if(i==="k256")f=new q;else if(i==="p224")f=new X;else if(i==="p192")f=new J;else if(i==="p25519")f=new Z;else throw new Error("Unknown prime "+i);return L[i]=f,f};function W(h){if(typeof h=="string"){var i=a._prime(h);this.m=i.p,this.prime=i}else n(h.gtn(1),"modulus must be greater than 1"),this.m=h,this.prime=null}W.prototype._verify1=function(i){n(i.negative===0,"red works only with positives"),n(i.red,"red works only with red numbers")},W.prototype._verify2=function(i,f){n((i.negative|f.negative)===0,"red works only with positives"),n(i.red&&i.red===f.red,"red works only with red numbers")},W.prototype.imod=function(i){return this.prime?this.prime.ireduce(i)._forceRed(this):i.umod(this.m)._forceRed(this)},W.prototype.neg=function(i){return i.isZero()?i.clone():this.m.sub(i)._forceRed(this)},W.prototype.add=function(i,f){this._verify2(i,f);var u=i.add(f);return u.cmp(this.m)>=0&&u.isub(this.m),u._forceRed(this)},W.prototype.iadd=function(i,f){this._verify2(i,f);var u=i.iadd(f);return u.cmp(this.m)>=0&&u.isub(this.m),u},W.prototype.sub=function(i,f){this._verify2(i,f);var u=i.sub(f);return u.cmpn(0)<0&&u.iadd(this.m),u._forceRed(this)},W.prototype.isub=function(i,f){this._verify2(i,f);var u=i.isub(f);return u.cmpn(0)<0&&u.iadd(this.m),u},W.prototype.shl=function(i,f){return this._verify1(i),this.imod(i.ushln(f))},W.prototype.imul=function(i,f){return this._verify2(i,f),this.imod(i.imul(f))},W.prototype.mul=function(i,f){return this._verify2(i,f),this.imod(i.mul(f))},W.prototype.isqr=function(i){return this.imul(i,i.clone())},W.prototype.sqr=function(i){return this.mul(i,i)},W.prototype.sqrt=function(i){if(i.isZero())return i.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var u=this.m.add(new a(1)).iushrn(2);return this.pow(i,u)}for(var c=this.m.subn(1),p=0;!c.isZero()&&c.andln(1)===0;)p++,c.iushrn(1);n(!c.isZero());var b=new a(1).toRed(this),g=b.redNeg(),l=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new a(2*s*s).toRed(this);this.pow(s,l).cmp(g)!==0;)s.redIAdd(g);for(var v=this.pow(s,c),x=this.pow(i,c.addn(1).iushrn(1)),C=this.pow(i,c),B=p;C.cmp(b)!==0;){for(var k=C,R=0;k.cmp(b)!==0;R++)k=k.redSqr();n(R=0;p--){for(var v=f.words[p],x=s-1;x>=0;x--){var C=v>>x&1;if(b!==c[0]&&(b=this.sqr(b)),C===0&&g===0){l=0;continue}g<<=1,g|=C,l++,!(l!==u&&(p!==0||x!==0))&&(b=this.mul(b,c[g]),l=0,g=0)}s=26}return b},W.prototype.convertTo=function(i){var f=i.umod(this.m);return f===i?f.clone():f},W.prototype.convertFrom=function(i){var f=i.clone();return f.red=null,f},a.mont=function(i){return new $(i)};function $(h){W.call(this,h),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)}o($,W),$.prototype.convertTo=function(i){return this.imod(i.ushln(this.shift))},$.prototype.convertFrom=function(i){var f=this.imod(i.mul(this.rinv));return f.red=null,f},$.prototype.imul=function(i,f){if(i.isZero()||f.isZero())return i.words[0]=0,i.length=1,i;var u=i.imul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.mul=function(i,f){if(i.isZero()||f.isZero())return new a(0)._forceRed(this);var u=i.mul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.invm=function(i){var f=this.imod(i._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(e,Qe)}(Tp)),Tp.exports}var Rp,Hw;function IE(){if(Hw)return Rp;Hw=1;var e=OK(),t=Xy();function r(n){this.rand=n||new t.Rand}return Rp=r,r.create=function(o){return new r(o)},r.prototype._randbelow=function(o){var a=o.bitLength(),d=Math.ceil(a/8);do var m=new e(this.rand.generate(d));while(m.cmp(o)>=0);return m},r.prototype._randrange=function(o,a){var d=a.sub(o);return o.add(this._randbelow(d))},r.prototype.test=function(o,a,d){var m=o.bitLength(),y=e.mont(o),w=new e(1).toRed(y);a||(a=Math.max(1,m/48|0));for(var M=o.subn(1),_=0;!M.testn(_);_++);for(var E=o.shrn(_),S=M.toRed(y),A=!0;a>0;a--){var T=this._randrange(new e(2),M);d&&d(T);var I=T.toRed(y).redPow(E);if(!(I.cmp(w)===0||I.cmp(S)===0)){for(var O=1;O<_;O++){if(I=I.redSqr(),I.cmp(w)===0)return!1;if(I.cmp(S)===0)break}if(O===_)return!1}}return A},r.prototype.getDivisor=function(o,a){var d=o.bitLength(),m=e.mont(o),y=new e(1).toRed(m);a||(a=Math.max(1,d/48|0));for(var w=o.subn(1),M=0;!w.testn(M);M++);for(var _=o.shrn(M),E=w.toRed(m);a>0;a--){var S=this._randrange(new e(2),w),A=o.gcd(S);if(A.cmpn(1)!==0)return A;var T=S.toRed(m).redPow(_);if(!(T.cmp(y)===0||T.cmp(E)===0)){for(var I=1;IO;)L.ishrn(1);if(L.isEven()&&L.iadd(a),L.testn(1)||L.iadd(d),P.cmp(d)){if(!P.cmp(m))for(;L.mod(y).cmp(w);)L.iadd(_)}else for(;L.mod(r).cmp(M);)L.iadd(_);if(N=L.shrn(1),A(N)&&A(L)&&T(N)&&T(L)&&o.test(N)&&o.test(L))return L}}return Op}const PK={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},BK={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},IK={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},$K={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},LK={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},DK={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},FK={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},NK={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},zK={modp1:PK,modp2:BK,modp5:IK,modp14:$K,modp15:LK,modp16:DK,modp17:FK,modp18:NK};var Pp,jw;function HK(){if(jw)return Pp;jw=1;var e=BE(),t=IE(),r=new t,n=new e(24),o=new e(11),a=new e(10),d=new e(3),m=new e(7),y=$E(),w=Ai.exports;Pp=A;function M(I,O){return O=O||"utf8",ce.isBuffer(I)||(I=new ce(I,O)),this._pub=new e(I),this}function _(I,O){return O=O||"utf8",ce.isBuffer(I)||(I=new ce(I,O)),this._priv=new e(I),this}var E={};function S(I,O){var P=O.toString("hex"),L=[P,I.toString(16)].join("_");if(L in E)return E[L];var N=0;if(I.isEven()||!y.simpleSieve||!y.fermatTest(I)||!r.test(I))return N+=1,P==="02"||P==="05"?N+=8:N+=4,E[L]=N,N;r.test(I.shrn(1))||(N+=2);var q;switch(P){case"02":I.mod(n).cmp(o)&&(N+=8);break;case"05":q=I.mod(a),q.cmp(d)&&q.cmp(m)&&(N+=8);break;default:N+=4}return E[L]=N,N}function A(I,O,P){this.setGenerator(O),this.__prime=new e(I),this._prime=e.mont(this.__prime),this._primeLen=I.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,P?(this.setPublicKey=M,this.setPrivateKey=_):this._primeCode=8}Object.defineProperty(A.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=S(this.__prime,this.__gen)),this._primeCode}}),A.prototype.generateKeys=function(){return this._priv||(this._priv=new e(w(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},A.prototype.computeSecret=function(I){I=new e(I),I=I.toRed(this._prime);var O=I.redPow(this._priv).fromRed(),P=new ce(O.toArray()),L=this.getPrime();if(P.length=0||!m.umod(a.prime1)||!m.umod(a.prime2));return m}function o(a,d){var m=r(d),y=d.modulus.byteLength(),w=new e(a).mul(m.blinder).umod(d.modulus),M=w.toRed(e.mont(d.prime1)),_=w.toRed(e.mont(d.prime2)),E=d.coefficient,S=d.prime1,A=d.prime2,T=M.redPow(d.exponent1).fromRed(),I=_.redPow(d.exponent2).fromRed(),O=T.isub(I).imul(E).umod(S).imul(A);return I.iadd(O).imul(m.unblinder).umod(d.modulus).toArrayLike(ce,"be",y)}return o.getr=n,Bp=o,Bp}var Cn={},Ip={},$p={exports:{}},Kw;function LE(){return Kw||(Kw=1,function(e){(function(t,r){function n(h,i){if(!h)throw new Error(i||"Assertion failed")}function o(h,i){h.super_=i;var f=function(){};f.prototype=i.prototype,h.prototype=new f,h.prototype.constructor=h}function a(h,i,f){if(a.isBN(h))return h;this.negative=0,this.words=null,this.length=0,this.red=null,h!==null&&((i==="le"||i==="be")&&(f=i,i=10),this._init(h||0,i||10,f||"be"))}typeof t=="object"?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var d;try{typeof window<"u"&&typeof window.Buffer<"u"?d=window.Buffer:d=on.Buffer}catch{}a.isBN=function(i){return i instanceof a?!0:i!==null&&typeof i=="object"&&i.constructor.wordSize===a.wordSize&&Array.isArray(i.words)},a.max=function(i,f){return i.cmp(f)>0?i:f},a.min=function(i,f){return i.cmp(f)<0?i:f},a.prototype._init=function(i,f,u){if(typeof i=="number")return this._initNumber(i,f,u);if(typeof i=="object")return this._initArray(i,f,u);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),i=i.toString().replace(/\s+/g,"");var c=0;i[0]==="-"&&(c++,this.negative=1),c=0;c-=3)b=i[c]|i[c-1]<<8|i[c-2]<<16,this.words[p]|=b<>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);else if(u==="le")for(c=0,p=0;c>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);return this.strip()};function m(h,i){var f=h.charCodeAt(i);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function y(h,i,f){var u=m(h,f);return f-1>=i&&(u|=m(h,f-1)<<4),u}a.prototype._parseHex=function(i,f,u){this.length=Math.ceil((i.length-f)/6),this.words=new Array(this.length);for(var c=0;c=f;c-=2)g=y(i,f,c)<=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8;else{var l=i.length-f;for(c=l%2===0?f+1:f;c=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8}this.strip()};function w(h,i,f,u){for(var c=0,p=Math.min(h.length,f),b=i;b=49?c+=g-49+10:g>=17?c+=g-17+10:c+=g}return c}a.prototype._parseBase=function(i,f,u){this.words=[0],this.length=1;for(var c=0,p=1;p<=67108863;p*=f)c++;c--,p=p/f|0;for(var b=i.length-u,g=b%c,l=Math.min(b,b-g)+u,s=0,v=u;v1&&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},a.prototype.inspect=function(){return(this.red?""};var M=["","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"],_=[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],E=[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(i,f){i=i||10,f=f|0||1;var u;if(i===16||i==="hex"){u="";for(var c=0,p=0,b=0;b>>24-c&16777215,p!==0||b!==this.length-1?u=M[6-l.length]+l+u:u=l+u,c+=2,c>=26&&(c-=26,b--)}for(p!==0&&(u=p.toString(16)+u);u.length%f!==0;)u="0"+u;return this.negative!==0&&(u="-"+u),u}if(i===(i|0)&&i>=2&&i<=36){var s=_[i],v=E[i];u="";var x=this.clone();for(x.negative=0;!x.isZero();){var C=x.modn(v).toString(i);x=x.idivn(v),x.isZero()?u=C+u:u=M[s-C.length]+C+u}for(this.isZero()&&(u="0"+u);u.length%f!==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 i=this.words[0];return this.length===2?i+=this.words[1]*67108864:this.length===3&&this.words[2]===1?i+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-i:i},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(i,f){return n(typeof d<"u"),this.toArrayLike(d,i,f)},a.prototype.toArray=function(i,f){return this.toArrayLike(Array,i,f)},a.prototype.toArrayLike=function(i,f,u){var c=this.byteLength(),p=u||Math.max(1,c);n(c<=p,"byte array longer than desired length"),n(p>0,"Requested array length <= 0"),this.strip();var b=f==="le",g=new i(p),l,s,v=this.clone();if(b){for(s=0;!v.isZero();s++)l=v.andln(255),v.iushrn(8),g[s]=l;for(;s=4096&&(u+=13,f>>>=13),f>=64&&(u+=7,f>>>=7),f>=8&&(u+=4,f>>>=4),f>=2&&(u+=2,f>>>=2),u+f},a.prototype._zeroBits=function(i){if(i===0)return 26;var f=i,u=0;return(f&8191)===0&&(u+=13,f>>>=13),(f&127)===0&&(u+=7,f>>>=7),(f&15)===0&&(u+=4,f>>>=4),(f&3)===0&&(u+=2,f>>>=2),(f&1)===0&&u++,u},a.prototype.bitLength=function(){var i=this.words[this.length-1],f=this._countBits(i);return(this.length-1)*26+f};function S(h){for(var i=new Array(h.bitLength()),f=0;f>>c}return i}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var i=0,f=0;fi.length?this.clone().ior(i):i.clone().ior(this)},a.prototype.uor=function(i){return this.length>i.length?this.clone().iuor(i):i.clone().iuor(this)},a.prototype.iuand=function(i){var f;this.length>i.length?f=i:f=this;for(var u=0;ui.length?this.clone().iand(i):i.clone().iand(this)},a.prototype.uand=function(i){return this.length>i.length?this.clone().iuand(i):i.clone().iuand(this)},a.prototype.iuxor=function(i){var f,u;this.length>i.length?(f=this,u=i):(f=i,u=this);for(var c=0;ci.length?this.clone().ixor(i):i.clone().ixor(this)},a.prototype.uxor=function(i){return this.length>i.length?this.clone().iuxor(i):i.clone().iuxor(this)},a.prototype.inotn=function(i){n(typeof i=="number"&&i>=0);var f=Math.ceil(i/26)|0,u=i%26;this._expand(f),u>0&&f--;for(var c=0;c0&&(this.words[c]=~this.words[c]&67108863>>26-u),this.strip()},a.prototype.notn=function(i){return this.clone().inotn(i)},a.prototype.setn=function(i,f){n(typeof i=="number"&&i>=0);var u=i/26|0,c=i%26;return this._expand(u+1),f?this.words[u]=this.words[u]|1<i.length?(u=this,c=i):(u=i,c=this);for(var p=0,b=0;b>>26;for(;p!==0&&b>>26;if(this.length=u.length,p!==0)this.words[this.length]=p,this.length++;else if(u!==this)for(;bi.length?this.clone().iadd(i):i.clone().iadd(this)},a.prototype.isub=function(i){if(i.negative!==0){i.negative=0;var f=this.iadd(i);return i.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(i),this.negative=1,this._normSign();var u=this.cmp(i);if(u===0)return this.negative=0,this.length=1,this.words[0]=0,this;var c,p;u>0?(c=this,p=i):(c=i,p=this);for(var b=0,g=0;g>26,this.words[g]=f&67108863;for(;b!==0&&g>26,this.words[g]=f&67108863;if(b===0&&g>>26,x=l&67108863,C=Math.min(s,i.length-1),B=Math.max(0,s-h.length+1);B<=C;B++){var k=s-B|0;c=h.words[k]|0,p=i.words[B]|0,b=c*p+x,v+=b/67108864|0,x=b&67108863}f.words[s]=x|0,l=v|0}return l!==0?f.words[s]=l|0:f.length--,f.strip()}var T=function(i,f,u){var c=i.words,p=f.words,b=u.words,g=0,l,s,v,x=c[0]|0,C=x&8191,B=x>>>13,k=c[1]|0,R=k&8191,D=k>>>13,z=c[2]|0,H=z&8191,V=z>>>13,U=c[3]|0,F=U&8191,G=U>>>13,ie=c[4]|0,Y=ie&8191,oe=ie>>>13,xe=c[5]|0,ne=xe&8191,Q=xe>>>13,te=c[6]|0,ee=te&8191,se=te>>>13,_e=c[7]|0,K=_e&8191,re=_e>>>13,Te=c[8]|0,ae=Te&8191,Me=Te>>>13,ze=c[9]|0,fe=ze&8191,Se=ze>>>13,He=p[0]|0,ue=He&8191,Ae=He>>>13,Ue=p[1]|0,he=Ue&8191,Ce=Ue>>>13,je=p[2]|0,de=je&8191,Oe=je>>>13,Ve=p[3]|0,pe=Ve&8191,Pe=Ve>>>13,Ke=p[4]|0,ve=Ke&8191,Be=Ke>>>13,Ge=p[5]|0,me=Ge&8191,Ie=Ge>>>13,We=p[6]|0,ge=We&8191,$e=We>>>13,Ze=p[7]|0,ye=Ze&8191,Le=Ze>>>13,Ye=p[8]|0,be=Ye&8191,De=Ye>>>13,Xe=p[9]|0,we=Xe&8191,Re=Xe>>>13;u.negative=i.negative^f.negative,u.length=19,l=Math.imul(C,ue),s=Math.imul(C,Ae),s=s+Math.imul(B,ue)|0,v=Math.imul(B,Ae);var tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(tt>>>26)|0,tt&=67108863,l=Math.imul(R,ue),s=Math.imul(R,Ae),s=s+Math.imul(D,ue)|0,v=Math.imul(D,Ae),l=l+Math.imul(C,he)|0,s=s+Math.imul(C,Ce)|0,s=s+Math.imul(B,he)|0,v=v+Math.imul(B,Ce)|0;var rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(rt>>>26)|0,rt&=67108863,l=Math.imul(H,ue),s=Math.imul(H,Ae),s=s+Math.imul(V,ue)|0,v=Math.imul(V,Ae),l=l+Math.imul(R,he)|0,s=s+Math.imul(R,Ce)|0,s=s+Math.imul(D,he)|0,v=v+Math.imul(D,Ce)|0,l=l+Math.imul(C,de)|0,s=s+Math.imul(C,Oe)|0,s=s+Math.imul(B,de)|0,v=v+Math.imul(B,Oe)|0;var ut=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ut>>>26)|0,ut&=67108863,l=Math.imul(F,ue),s=Math.imul(F,Ae),s=s+Math.imul(G,ue)|0,v=Math.imul(G,Ae),l=l+Math.imul(H,he)|0,s=s+Math.imul(H,Ce)|0,s=s+Math.imul(V,he)|0,v=v+Math.imul(V,Ce)|0,l=l+Math.imul(R,de)|0,s=s+Math.imul(R,Oe)|0,s=s+Math.imul(D,de)|0,v=v+Math.imul(D,Oe)|0,l=l+Math.imul(C,pe)|0,s=s+Math.imul(C,Pe)|0,s=s+Math.imul(B,pe)|0,v=v+Math.imul(B,Pe)|0;var lt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(lt>>>26)|0,lt&=67108863,l=Math.imul(Y,ue),s=Math.imul(Y,Ae),s=s+Math.imul(oe,ue)|0,v=Math.imul(oe,Ae),l=l+Math.imul(F,he)|0,s=s+Math.imul(F,Ce)|0,s=s+Math.imul(G,he)|0,v=v+Math.imul(G,Ce)|0,l=l+Math.imul(H,de)|0,s=s+Math.imul(H,Oe)|0,s=s+Math.imul(V,de)|0,v=v+Math.imul(V,Oe)|0,l=l+Math.imul(R,pe)|0,s=s+Math.imul(R,Pe)|0,s=s+Math.imul(D,pe)|0,v=v+Math.imul(D,Pe)|0,l=l+Math.imul(C,ve)|0,s=s+Math.imul(C,Be)|0,s=s+Math.imul(B,ve)|0,v=v+Math.imul(B,Be)|0;var ht=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ht>>>26)|0,ht&=67108863,l=Math.imul(ne,ue),s=Math.imul(ne,Ae),s=s+Math.imul(Q,ue)|0,v=Math.imul(Q,Ae),l=l+Math.imul(Y,he)|0,s=s+Math.imul(Y,Ce)|0,s=s+Math.imul(oe,he)|0,v=v+Math.imul(oe,Ce)|0,l=l+Math.imul(F,de)|0,s=s+Math.imul(F,Oe)|0,s=s+Math.imul(G,de)|0,v=v+Math.imul(G,Oe)|0,l=l+Math.imul(H,pe)|0,s=s+Math.imul(H,Pe)|0,s=s+Math.imul(V,pe)|0,v=v+Math.imul(V,Pe)|0,l=l+Math.imul(R,ve)|0,s=s+Math.imul(R,Be)|0,s=s+Math.imul(D,ve)|0,v=v+Math.imul(D,Be)|0,l=l+Math.imul(C,me)|0,s=s+Math.imul(C,Ie)|0,s=s+Math.imul(B,me)|0,v=v+Math.imul(B,Ie)|0;var ct=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ct>>>26)|0,ct&=67108863,l=Math.imul(ee,ue),s=Math.imul(ee,Ae),s=s+Math.imul(se,ue)|0,v=Math.imul(se,Ae),l=l+Math.imul(ne,he)|0,s=s+Math.imul(ne,Ce)|0,s=s+Math.imul(Q,he)|0,v=v+Math.imul(Q,Ce)|0,l=l+Math.imul(Y,de)|0,s=s+Math.imul(Y,Oe)|0,s=s+Math.imul(oe,de)|0,v=v+Math.imul(oe,Oe)|0,l=l+Math.imul(F,pe)|0,s=s+Math.imul(F,Pe)|0,s=s+Math.imul(G,pe)|0,v=v+Math.imul(G,Pe)|0,l=l+Math.imul(H,ve)|0,s=s+Math.imul(H,Be)|0,s=s+Math.imul(V,ve)|0,v=v+Math.imul(V,Be)|0,l=l+Math.imul(R,me)|0,s=s+Math.imul(R,Ie)|0,s=s+Math.imul(D,me)|0,v=v+Math.imul(D,Ie)|0,l=l+Math.imul(C,ge)|0,s=s+Math.imul(C,$e)|0,s=s+Math.imul(B,ge)|0,v=v+Math.imul(B,$e)|0;var dt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(dt>>>26)|0,dt&=67108863,l=Math.imul(K,ue),s=Math.imul(K,Ae),s=s+Math.imul(re,ue)|0,v=Math.imul(re,Ae),l=l+Math.imul(ee,he)|0,s=s+Math.imul(ee,Ce)|0,s=s+Math.imul(se,he)|0,v=v+Math.imul(se,Ce)|0,l=l+Math.imul(ne,de)|0,s=s+Math.imul(ne,Oe)|0,s=s+Math.imul(Q,de)|0,v=v+Math.imul(Q,Oe)|0,l=l+Math.imul(Y,pe)|0,s=s+Math.imul(Y,Pe)|0,s=s+Math.imul(oe,pe)|0,v=v+Math.imul(oe,Pe)|0,l=l+Math.imul(F,ve)|0,s=s+Math.imul(F,Be)|0,s=s+Math.imul(G,ve)|0,v=v+Math.imul(G,Be)|0,l=l+Math.imul(H,me)|0,s=s+Math.imul(H,Ie)|0,s=s+Math.imul(V,me)|0,v=v+Math.imul(V,Ie)|0,l=l+Math.imul(R,ge)|0,s=s+Math.imul(R,$e)|0,s=s+Math.imul(D,ge)|0,v=v+Math.imul(D,$e)|0,l=l+Math.imul(C,ye)|0,s=s+Math.imul(C,Le)|0,s=s+Math.imul(B,ye)|0,v=v+Math.imul(B,Le)|0;var yt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(yt>>>26)|0,yt&=67108863,l=Math.imul(ae,ue),s=Math.imul(ae,Ae),s=s+Math.imul(Me,ue)|0,v=Math.imul(Me,Ae),l=l+Math.imul(K,he)|0,s=s+Math.imul(K,Ce)|0,s=s+Math.imul(re,he)|0,v=v+Math.imul(re,Ce)|0,l=l+Math.imul(ee,de)|0,s=s+Math.imul(ee,Oe)|0,s=s+Math.imul(se,de)|0,v=v+Math.imul(se,Oe)|0,l=l+Math.imul(ne,pe)|0,s=s+Math.imul(ne,Pe)|0,s=s+Math.imul(Q,pe)|0,v=v+Math.imul(Q,Pe)|0,l=l+Math.imul(Y,ve)|0,s=s+Math.imul(Y,Be)|0,s=s+Math.imul(oe,ve)|0,v=v+Math.imul(oe,Be)|0,l=l+Math.imul(F,me)|0,s=s+Math.imul(F,Ie)|0,s=s+Math.imul(G,me)|0,v=v+Math.imul(G,Ie)|0,l=l+Math.imul(H,ge)|0,s=s+Math.imul(H,$e)|0,s=s+Math.imul(V,ge)|0,v=v+Math.imul(V,$e)|0,l=l+Math.imul(R,ye)|0,s=s+Math.imul(R,Le)|0,s=s+Math.imul(D,ye)|0,v=v+Math.imul(D,Le)|0,l=l+Math.imul(C,be)|0,s=s+Math.imul(C,De)|0,s=s+Math.imul(B,be)|0,v=v+Math.imul(B,De)|0;var bt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(bt>>>26)|0,bt&=67108863,l=Math.imul(fe,ue),s=Math.imul(fe,Ae),s=s+Math.imul(Se,ue)|0,v=Math.imul(Se,Ae),l=l+Math.imul(ae,he)|0,s=s+Math.imul(ae,Ce)|0,s=s+Math.imul(Me,he)|0,v=v+Math.imul(Me,Ce)|0,l=l+Math.imul(K,de)|0,s=s+Math.imul(K,Oe)|0,s=s+Math.imul(re,de)|0,v=v+Math.imul(re,Oe)|0,l=l+Math.imul(ee,pe)|0,s=s+Math.imul(ee,Pe)|0,s=s+Math.imul(se,pe)|0,v=v+Math.imul(se,Pe)|0,l=l+Math.imul(ne,ve)|0,s=s+Math.imul(ne,Be)|0,s=s+Math.imul(Q,ve)|0,v=v+Math.imul(Q,Be)|0,l=l+Math.imul(Y,me)|0,s=s+Math.imul(Y,Ie)|0,s=s+Math.imul(oe,me)|0,v=v+Math.imul(oe,Ie)|0,l=l+Math.imul(F,ge)|0,s=s+Math.imul(F,$e)|0,s=s+Math.imul(G,ge)|0,v=v+Math.imul(G,$e)|0,l=l+Math.imul(H,ye)|0,s=s+Math.imul(H,Le)|0,s=s+Math.imul(V,ye)|0,v=v+Math.imul(V,Le)|0,l=l+Math.imul(R,be)|0,s=s+Math.imul(R,De)|0,s=s+Math.imul(D,be)|0,v=v+Math.imul(D,De)|0,l=l+Math.imul(C,we)|0,s=s+Math.imul(C,Re)|0,s=s+Math.imul(B,we)|0,v=v+Math.imul(B,Re)|0;var wt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(wt>>>26)|0,wt&=67108863,l=Math.imul(fe,he),s=Math.imul(fe,Ce),s=s+Math.imul(Se,he)|0,v=Math.imul(Se,Ce),l=l+Math.imul(ae,de)|0,s=s+Math.imul(ae,Oe)|0,s=s+Math.imul(Me,de)|0,v=v+Math.imul(Me,Oe)|0,l=l+Math.imul(K,pe)|0,s=s+Math.imul(K,Pe)|0,s=s+Math.imul(re,pe)|0,v=v+Math.imul(re,Pe)|0,l=l+Math.imul(ee,ve)|0,s=s+Math.imul(ee,Be)|0,s=s+Math.imul(se,ve)|0,v=v+Math.imul(se,Be)|0,l=l+Math.imul(ne,me)|0,s=s+Math.imul(ne,Ie)|0,s=s+Math.imul(Q,me)|0,v=v+Math.imul(Q,Ie)|0,l=l+Math.imul(Y,ge)|0,s=s+Math.imul(Y,$e)|0,s=s+Math.imul(oe,ge)|0,v=v+Math.imul(oe,$e)|0,l=l+Math.imul(F,ye)|0,s=s+Math.imul(F,Le)|0,s=s+Math.imul(G,ye)|0,v=v+Math.imul(G,Le)|0,l=l+Math.imul(H,be)|0,s=s+Math.imul(H,De)|0,s=s+Math.imul(V,be)|0,v=v+Math.imul(V,De)|0,l=l+Math.imul(R,we)|0,s=s+Math.imul(R,Re)|0,s=s+Math.imul(D,we)|0,v=v+Math.imul(D,Re)|0;var Mt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,l=Math.imul(fe,de),s=Math.imul(fe,Oe),s=s+Math.imul(Se,de)|0,v=Math.imul(Se,Oe),l=l+Math.imul(ae,pe)|0,s=s+Math.imul(ae,Pe)|0,s=s+Math.imul(Me,pe)|0,v=v+Math.imul(Me,Pe)|0,l=l+Math.imul(K,ve)|0,s=s+Math.imul(K,Be)|0,s=s+Math.imul(re,ve)|0,v=v+Math.imul(re,Be)|0,l=l+Math.imul(ee,me)|0,s=s+Math.imul(ee,Ie)|0,s=s+Math.imul(se,me)|0,v=v+Math.imul(se,Ie)|0,l=l+Math.imul(ne,ge)|0,s=s+Math.imul(ne,$e)|0,s=s+Math.imul(Q,ge)|0,v=v+Math.imul(Q,$e)|0,l=l+Math.imul(Y,ye)|0,s=s+Math.imul(Y,Le)|0,s=s+Math.imul(oe,ye)|0,v=v+Math.imul(oe,Le)|0,l=l+Math.imul(F,be)|0,s=s+Math.imul(F,De)|0,s=s+Math.imul(G,be)|0,v=v+Math.imul(G,De)|0,l=l+Math.imul(H,we)|0,s=s+Math.imul(H,Re)|0,s=s+Math.imul(V,we)|0,v=v+Math.imul(V,Re)|0;var xt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(xt>>>26)|0,xt&=67108863,l=Math.imul(fe,pe),s=Math.imul(fe,Pe),s=s+Math.imul(Se,pe)|0,v=Math.imul(Se,Pe),l=l+Math.imul(ae,ve)|0,s=s+Math.imul(ae,Be)|0,s=s+Math.imul(Me,ve)|0,v=v+Math.imul(Me,Be)|0,l=l+Math.imul(K,me)|0,s=s+Math.imul(K,Ie)|0,s=s+Math.imul(re,me)|0,v=v+Math.imul(re,Ie)|0,l=l+Math.imul(ee,ge)|0,s=s+Math.imul(ee,$e)|0,s=s+Math.imul(se,ge)|0,v=v+Math.imul(se,$e)|0,l=l+Math.imul(ne,ye)|0,s=s+Math.imul(ne,Le)|0,s=s+Math.imul(Q,ye)|0,v=v+Math.imul(Q,Le)|0,l=l+Math.imul(Y,be)|0,s=s+Math.imul(Y,De)|0,s=s+Math.imul(oe,be)|0,v=v+Math.imul(oe,De)|0,l=l+Math.imul(F,we)|0,s=s+Math.imul(F,Re)|0,s=s+Math.imul(G,we)|0,v=v+Math.imul(G,Re)|0;var _t=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(_t>>>26)|0,_t&=67108863,l=Math.imul(fe,ve),s=Math.imul(fe,Be),s=s+Math.imul(Se,ve)|0,v=Math.imul(Se,Be),l=l+Math.imul(ae,me)|0,s=s+Math.imul(ae,Ie)|0,s=s+Math.imul(Me,me)|0,v=v+Math.imul(Me,Ie)|0,l=l+Math.imul(K,ge)|0,s=s+Math.imul(K,$e)|0,s=s+Math.imul(re,ge)|0,v=v+Math.imul(re,$e)|0,l=l+Math.imul(ee,ye)|0,s=s+Math.imul(ee,Le)|0,s=s+Math.imul(se,ye)|0,v=v+Math.imul(se,Le)|0,l=l+Math.imul(ne,be)|0,s=s+Math.imul(ne,De)|0,s=s+Math.imul(Q,be)|0,v=v+Math.imul(Q,De)|0,l=l+Math.imul(Y,we)|0,s=s+Math.imul(Y,Re)|0,s=s+Math.imul(oe,we)|0,v=v+Math.imul(oe,Re)|0;var Et=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Et>>>26)|0,Et&=67108863,l=Math.imul(fe,me),s=Math.imul(fe,Ie),s=s+Math.imul(Se,me)|0,v=Math.imul(Se,Ie),l=l+Math.imul(ae,ge)|0,s=s+Math.imul(ae,$e)|0,s=s+Math.imul(Me,ge)|0,v=v+Math.imul(Me,$e)|0,l=l+Math.imul(K,ye)|0,s=s+Math.imul(K,Le)|0,s=s+Math.imul(re,ye)|0,v=v+Math.imul(re,Le)|0,l=l+Math.imul(ee,be)|0,s=s+Math.imul(ee,De)|0,s=s+Math.imul(se,be)|0,v=v+Math.imul(se,De)|0,l=l+Math.imul(ne,we)|0,s=s+Math.imul(ne,Re)|0,s=s+Math.imul(Q,we)|0,v=v+Math.imul(Q,Re)|0;var St=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(St>>>26)|0,St&=67108863,l=Math.imul(fe,ge),s=Math.imul(fe,$e),s=s+Math.imul(Se,ge)|0,v=Math.imul(Se,$e),l=l+Math.imul(ae,ye)|0,s=s+Math.imul(ae,Le)|0,s=s+Math.imul(Me,ye)|0,v=v+Math.imul(Me,Le)|0,l=l+Math.imul(K,be)|0,s=s+Math.imul(K,De)|0,s=s+Math.imul(re,be)|0,v=v+Math.imul(re,De)|0,l=l+Math.imul(ee,we)|0,s=s+Math.imul(ee,Re)|0,s=s+Math.imul(se,we)|0,v=v+Math.imul(se,Re)|0;var At=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(At>>>26)|0,At&=67108863,l=Math.imul(fe,ye),s=Math.imul(fe,Le),s=s+Math.imul(Se,ye)|0,v=Math.imul(Se,Le),l=l+Math.imul(ae,be)|0,s=s+Math.imul(ae,De)|0,s=s+Math.imul(Me,be)|0,v=v+Math.imul(Me,De)|0,l=l+Math.imul(K,we)|0,s=s+Math.imul(K,Re)|0,s=s+Math.imul(re,we)|0,v=v+Math.imul(re,Re)|0;var Tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,l=Math.imul(fe,be),s=Math.imul(fe,De),s=s+Math.imul(Se,be)|0,v=Math.imul(Se,De),l=l+Math.imul(ae,we)|0,s=s+Math.imul(ae,Re)|0,s=s+Math.imul(Me,we)|0,v=v+Math.imul(Me,Re)|0;var Rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,l=Math.imul(fe,we),s=Math.imul(fe,Re),s=s+Math.imul(Se,we)|0,v=Math.imul(Se,Re);var qt=(g+l|0)+((s&8191)<<13)|0;return g=(v+(s>>>13)|0)+(qt>>>26)|0,qt&=67108863,b[0]=tt,b[1]=rt,b[2]=ut,b[3]=lt,b[4]=ht,b[5]=ct,b[6]=dt,b[7]=yt,b[8]=bt,b[9]=wt,b[10]=Mt,b[11]=xt,b[12]=_t,b[13]=Et,b[14]=St,b[15]=At,b[16]=Tt,b[17]=Rt,b[18]=qt,g!==0&&(b[19]=g,u.length++),u};Math.imul||(T=A);function I(h,i,f){f.negative=i.negative^h.negative,f.length=h.length+i.length;for(var u=0,c=0,p=0;p>>26)|0,c+=b>>>26,b&=67108863}f.words[p]=g,u=b,b=c}return u!==0?f.words[p]=u:f.length--,f.strip()}function O(h,i,f){var u=new P;return u.mulp(h,i,f)}a.prototype.mulTo=function(i,f){var u,c=this.length+i.length;return this.length===10&&i.length===10?u=T(this,i,f):c<63?u=A(this,i,f):c<1024?u=I(this,i,f):u=O(this,i,f),u};function P(h,i){this.x=h,this.y=i}P.prototype.makeRBT=function(i){for(var f=new Array(i),u=a.prototype._countBits(i)-1,c=0;c>=1;return c},P.prototype.permute=function(i,f,u,c,p,b){for(var g=0;g>>1)p++;return 1<>>13,u[2*b+1]=p&8191,p=p>>>13;for(b=2*f;b>=26,f+=c/67108864|0,f+=p>>>26,this.words[u]=p&67108863}return f!==0&&(this.words[u]=f,this.length++),this},a.prototype.muln=function(i){return this.clone().imuln(i)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(i){var f=S(i);if(f.length===0)return new a(1);for(var u=this,c=0;c=0);var f=i%26,u=(i-f)/26,c=67108863>>>26-f<<26-f,p;if(f!==0){var b=0;for(p=0;p>>26-f}b&&(this.words[p]=b,this.length++)}if(u!==0){for(p=this.length-1;p>=0;p--)this.words[p+u]=this.words[p];for(p=0;p=0);var c;f?c=(f-f%26)/26:c=0;var p=i%26,b=Math.min((i-p)/26,this.length),g=67108863^67108863>>>p<b)for(this.length-=b,s=0;s=0&&(v!==0||s>=c);s--){var x=this.words[s]|0;this.words[s]=v<<26-p|x>>>p,v=x&g}return l&&v!==0&&(l.words[l.length++]=v),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(i,f,u){return n(this.negative===0),this.iushrn(i,f,u)},a.prototype.shln=function(i){return this.clone().ishln(i)},a.prototype.ushln=function(i){return this.clone().iushln(i)},a.prototype.shrn=function(i){return this.clone().ishrn(i)},a.prototype.ushrn=function(i){return this.clone().iushrn(i)},a.prototype.testn=function(i){n(typeof i=="number"&&i>=0);var f=i%26,u=(i-f)/26,c=1<=0);var f=i%26,u=(i-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=u)return this;if(f!==0&&u++,this.length=Math.min(u,this.length),f!==0){var c=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},a.prototype.isubn=function(i){if(n(typeof i=="number"),n(i<67108864),i<0)return this.iaddn(-i);if(this.negative!==0)return this.negative=0,this.iaddn(i),this.negative=1,this;if(this.words[0]-=i,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(l/67108864|0),this.words[p+u]=b&67108863}for(;p>26,this.words[p+u]=b&67108863;if(g===0)return this.strip();for(n(g===-1),g=0,p=0;p>26,this.words[p]=b&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(i,f){var u=this.length-i.length,c=this.clone(),p=i,b=p.words[p.length-1]|0,g=this._countBits(b);u=26-g,u!==0&&(p=p.ushln(u),c.iushln(u),b=p.words[p.length-1]|0);var l=c.length-p.length,s;if(f!=="mod"){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var v=0;v=0;C--){var B=(c.words[p.length+C]|0)*67108864+(c.words[p.length+C-1]|0);for(B=Math.min(B/b|0,67108863),c._ishlnsubmul(p,B,C);c.negative!==0;)B--,c.negative=0,c._ishlnsubmul(p,1,C),c.isZero()||(c.negative^=1);s&&(s.words[C]=B)}return s&&s.strip(),c.strip(),f!=="div"&&u!==0&&c.iushrn(u),{div:s||null,mod:c}},a.prototype.divmod=function(i,f,u){if(n(!i.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var c,p,b;return this.negative!==0&&i.negative===0?(b=this.neg().divmod(i,f),f!=="mod"&&(c=b.div.neg()),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.iadd(i)),{div:c,mod:p}):this.negative===0&&i.negative!==0?(b=this.divmod(i.neg(),f),f!=="mod"&&(c=b.div.neg()),{div:c,mod:b.mod}):(this.negative&i.negative)!==0?(b=this.neg().divmod(i.neg(),f),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.isub(i)),{div:b.div,mod:p}):i.length>this.length||this.cmp(i)<0?{div:new a(0),mod:this}:i.length===1?f==="div"?{div:this.divn(i.words[0]),mod:null}:f==="mod"?{div:null,mod:new a(this.modn(i.words[0]))}:{div:this.divn(i.words[0]),mod:new a(this.modn(i.words[0]))}:this._wordDiv(i,f)},a.prototype.div=function(i){return this.divmod(i,"div",!1).div},a.prototype.mod=function(i){return this.divmod(i,"mod",!1).mod},a.prototype.umod=function(i){return this.divmod(i,"mod",!0).mod},a.prototype.divRound=function(i){var f=this.divmod(i);if(f.mod.isZero())return f.div;var u=f.div.negative!==0?f.mod.isub(i):f.mod,c=i.ushrn(1),p=i.andln(1),b=u.cmp(c);return b<0||p===1&&b===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},a.prototype.modn=function(i){n(i<=67108863);for(var f=(1<<26)%i,u=0,c=this.length-1;c>=0;c--)u=(f*u+(this.words[c]|0))%i;return u},a.prototype.idivn=function(i){n(i<=67108863);for(var f=0,u=this.length-1;u>=0;u--){var c=(this.words[u]|0)+f*67108864;this.words[u]=c/i|0,f=c%i}return this.strip()},a.prototype.divn=function(i){return this.clone().idivn(i)},a.prototype.egcd=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=new a(0),g=new a(1),l=0;f.isEven()&&u.isEven();)f.iushrn(1),u.iushrn(1),++l;for(var s=u.clone(),v=f.clone();!f.isZero();){for(var x=0,C=1;(f.words[0]&C)===0&&x<26;++x,C<<=1);if(x>0)for(f.iushrn(x);x-- >0;)(c.isOdd()||p.isOdd())&&(c.iadd(s),p.isub(v)),c.iushrn(1),p.iushrn(1);for(var B=0,k=1;(u.words[0]&k)===0&&B<26;++B,k<<=1);if(B>0)for(u.iushrn(B);B-- >0;)(b.isOdd()||g.isOdd())&&(b.iadd(s),g.isub(v)),b.iushrn(1),g.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(b),p.isub(g)):(u.isub(f),b.isub(c),g.isub(p))}return{a:b,b:g,gcd:u.iushln(l)}},a.prototype._invmp=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=u.clone();f.cmpn(1)>0&&u.cmpn(1)>0;){for(var g=0,l=1;(f.words[0]&l)===0&&g<26;++g,l<<=1);if(g>0)for(f.iushrn(g);g-- >0;)c.isOdd()&&c.iadd(b),c.iushrn(1);for(var s=0,v=1;(u.words[0]&v)===0&&s<26;++s,v<<=1);if(s>0)for(u.iushrn(s);s-- >0;)p.isOdd()&&p.iadd(b),p.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(p)):(u.isub(f),p.isub(c))}var x;return f.cmpn(1)===0?x=c:x=p,x.cmpn(0)<0&&x.iadd(i),x},a.prototype.gcd=function(i){if(this.isZero())return i.abs();if(i.isZero())return this.abs();var f=this.clone(),u=i.clone();f.negative=0,u.negative=0;for(var c=0;f.isEven()&&u.isEven();c++)f.iushrn(1),u.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;u.isEven();)u.iushrn(1);var p=f.cmp(u);if(p<0){var b=f;f=u,u=b}else if(p===0||u.cmpn(1)===0)break;f.isub(u)}while(!0);return u.iushln(c)},a.prototype.invm=function(i){return this.egcd(i).a.umod(i)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(i){return this.words[0]&i},a.prototype.bincn=function(i){n(typeof i=="number");var f=i%26,u=(i-f)/26,c=1<>>26,g&=67108863,this.words[b]=g}return p!==0&&(this.words[b]=p,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(i){var f=i<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var u;if(this.length>1)u=1;else{f&&(i=-i),n(i<=67108863,"Number is too big");var c=this.words[0]|0;u=c===i?0:ci.length)return 1;if(this.length=0;u--){var c=this.words[u]|0,p=i.words[u]|0;if(c!==p){cp&&(f=1);break}}return f},a.prototype.gtn=function(i){return this.cmpn(i)===1},a.prototype.gt=function(i){return this.cmp(i)===1},a.prototype.gten=function(i){return this.cmpn(i)>=0},a.prototype.gte=function(i){return this.cmp(i)>=0},a.prototype.ltn=function(i){return this.cmpn(i)===-1},a.prototype.lt=function(i){return this.cmp(i)===-1},a.prototype.lten=function(i){return this.cmpn(i)<=0},a.prototype.lte=function(i){return this.cmp(i)<=0},a.prototype.eqn=function(i){return this.cmpn(i)===0},a.prototype.eq=function(i){return this.cmp(i)===0},a.red=function(i){return new W(i)},a.prototype.toRed=function(i){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),i.convertTo(this)._forceRed(i)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(i){return this.red=i,this},a.prototype.forceRed=function(i){return n(!this.red,"Already a number in reduction context"),this._forceRed(i)},a.prototype.redAdd=function(i){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,i)},a.prototype.redIAdd=function(i){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,i)},a.prototype.redSub=function(i){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,i)},a.prototype.redISub=function(i){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,i)},a.prototype.redShl=function(i){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,i)},a.prototype.redMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.mul(this,i)},a.prototype.redIMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.imul(this,i)},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(i){return n(this.red&&!i.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,i)};var L={k256:null,p224:null,p192:null,p25519:null};function N(h,i){this.name=h,this.p=new a(i,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var i=new a(null);return i.words=new Array(Math.ceil(this.n/13)),i},N.prototype.ireduce=function(i){var f=i,u;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),u=f.bitLength();while(u>this.n);var c=u0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},N.prototype.split=function(i,f){i.iushrn(this.n,0,f)},N.prototype.imulK=function(i){return i.imul(this.k)};function q(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(q,N),q.prototype.split=function(i,f){for(var u=4194303,c=Math.min(i.length,9),p=0;p>>22,b=g}b>>>=22,i.words[p-10]=b,b===0&&i.length>10?i.length-=10:i.length-=9},q.prototype.imulK=function(i){i.words[i.length]=0,i.words[i.length+1]=0,i.length+=2;for(var f=0,u=0;u>>=26,i.words[u]=p,f=c}return f!==0&&(i.words[i.length++]=f),i},a._prime=function(i){if(L[i])return L[i];var f;if(i==="k256")f=new q;else if(i==="p224")f=new X;else if(i==="p192")f=new J;else if(i==="p25519")f=new Z;else throw new Error("Unknown prime "+i);return L[i]=f,f};function W(h){if(typeof h=="string"){var i=a._prime(h);this.m=i.p,this.prime=i}else n(h.gtn(1),"modulus must be greater than 1"),this.m=h,this.prime=null}W.prototype._verify1=function(i){n(i.negative===0,"red works only with positives"),n(i.red,"red works only with red numbers")},W.prototype._verify2=function(i,f){n((i.negative|f.negative)===0,"red works only with positives"),n(i.red&&i.red===f.red,"red works only with red numbers")},W.prototype.imod=function(i){return this.prime?this.prime.ireduce(i)._forceRed(this):i.umod(this.m)._forceRed(this)},W.prototype.neg=function(i){return i.isZero()?i.clone():this.m.sub(i)._forceRed(this)},W.prototype.add=function(i,f){this._verify2(i,f);var u=i.add(f);return u.cmp(this.m)>=0&&u.isub(this.m),u._forceRed(this)},W.prototype.iadd=function(i,f){this._verify2(i,f);var u=i.iadd(f);return u.cmp(this.m)>=0&&u.isub(this.m),u},W.prototype.sub=function(i,f){this._verify2(i,f);var u=i.sub(f);return u.cmpn(0)<0&&u.iadd(this.m),u._forceRed(this)},W.prototype.isub=function(i,f){this._verify2(i,f);var u=i.isub(f);return u.cmpn(0)<0&&u.iadd(this.m),u},W.prototype.shl=function(i,f){return this._verify1(i),this.imod(i.ushln(f))},W.prototype.imul=function(i,f){return this._verify2(i,f),this.imod(i.imul(f))},W.prototype.mul=function(i,f){return this._verify2(i,f),this.imod(i.mul(f))},W.prototype.isqr=function(i){return this.imul(i,i.clone())},W.prototype.sqr=function(i){return this.mul(i,i)},W.prototype.sqrt=function(i){if(i.isZero())return i.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var u=this.m.add(new a(1)).iushrn(2);return this.pow(i,u)}for(var c=this.m.subn(1),p=0;!c.isZero()&&c.andln(1)===0;)p++,c.iushrn(1);n(!c.isZero());var b=new a(1).toRed(this),g=b.redNeg(),l=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new a(2*s*s).toRed(this);this.pow(s,l).cmp(g)!==0;)s.redIAdd(g);for(var v=this.pow(s,c),x=this.pow(i,c.addn(1).iushrn(1)),C=this.pow(i,c),B=p;C.cmp(b)!==0;){for(var k=C,R=0;k.cmp(b)!==0;R++)k=k.redSqr();n(R=0;p--){for(var v=f.words[p],x=s-1;x>=0;x--){var C=v>>x&1;if(b!==c[0]&&(b=this.sqr(b)),C===0&&g===0){l=0;continue}g<<=1,g|=C,l++,!(l!==u&&(p!==0||x!==0))&&(b=this.mul(b,c[g]),l=0,g=0)}s=26}return b},W.prototype.convertTo=function(i){var f=i.umod(this.m);return f===i?f.clone():f},W.prototype.convertFrom=function(i){var f=i.clone();return f.red=null,f},a.mont=function(i){return new $(i)};function $(h){W.call(this,h),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)}o($,W),$.prototype.convertTo=function(i){return this.imod(i.ushln(this.shift))},$.prototype.convertFrom=function(i){var f=this.imod(i.mul(this.rinv));return f.red=null,f},$.prototype.imul=function(i,f){if(i.isZero()||f.isZero())return i.words[0]=0,i.length=1,i;var u=i.imul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.mul=function(i,f){if(i.isZero()||f.isZero())return new a(0)._forceRed(this);var u=i.mul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.invm=function(i){var f=this.imod(i._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(e,Qe)}($p)),$p.exports}var Lp={},Dp={},Fp,Gw;function Ky(){if(Gw)return Fp;Gw=1;var e=on,t=e.Buffer,r={},n;for(n in e)!e.hasOwnProperty(n)||n==="SlowBuffer"||n==="Buffer"||(r[n]=e[n]);var o=r.Buffer={};for(n in t)!t.hasOwnProperty(n)||n==="allocUnsafe"||n==="allocUnsafeSlow"||(o[n]=t[n]);if(r.Buffer.prototype=t.prototype,(!o.from||o.from===Uint8Array.from)&&(o.from=function(a,d,m){if(typeof a=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof a);if(a&&typeof a.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof a);return t(a,d,m)}),o.alloc||(o.alloc=function(a,d,m){if(typeof a!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof a);if(a<0||a>=2*(1<<30))throw new RangeError('The value "'+a+'" is invalid for option "size"');var y=t(a);return!d||d.length===0?y.fill(0):typeof m=="string"?y.fill(d,m):y.fill(d),y}),!r.kStringMaxLength)try{r.kStringMaxLength=ot.binding("buffer").kStringMaxLength}catch{}return r.constants||(r.constants={MAX_LENGTH:r.kMaxLength},r.kStringMaxLength&&(r.constants.MAX_STRING_LENGTH=r.kStringMaxLength)),Fp=r,Fp}var Np={},Ww;function Gy(){if(Ww)return Np;Ww=1;const e=mt.exports;function t(n){this._reporterState={obj:null,path:[],options:n||{},errors:[]}}Np.Reporter=t,t.prototype.isError=function(o){return o instanceof r},t.prototype.save=function(){const o=this._reporterState;return{obj:o.obj,pathLen:o.path.length}},t.prototype.restore=function(o){const a=this._reporterState;a.obj=o.obj,a.path=a.path.slice(0,o.pathLen)},t.prototype.enterKey=function(o){return this._reporterState.path.push(o)},t.prototype.exitKey=function(o){const a=this._reporterState;a.path=a.path.slice(0,o-1)},t.prototype.leaveKey=function(o,a,d){const m=this._reporterState;this.exitKey(o),m.obj!==null&&(m.obj[a]=d)},t.prototype.path=function(){return this._reporterState.path.join("/")},t.prototype.enterObject=function(){const o=this._reporterState,a=o.obj;return o.obj={},a},t.prototype.leaveObject=function(o){const a=this._reporterState,d=a.obj;return a.obj=o,d},t.prototype.error=function(o){let a;const d=this._reporterState,m=o instanceof r;if(m?a=o:a=new r(d.path.map(function(y){return"["+JSON.stringify(y)+"]"}).join(""),o.message||o,o.stack),!d.options.partial)throw a;return m||d.errors.push(a),a},t.prototype.wrapResult=function(o){const a=this._reporterState;return a.options.partial?{result:this.isError(o)?null:o,errors:a.errors}:o};function r(n,o){this.path=n,this.rethrow(o)}return e(r,Error),r.prototype.rethrow=function(o){if(this.message=o+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw new Error(this.message)}catch(a){this.stack=a.stack}return this},Np}var Ql={},Zw;function ju(){if(Zw)return Ql;Zw=1;const e=mt.exports,t=Gy().Reporter,r=Ky().Buffer;function n(a,d){if(t.call(this,d),!r.isBuffer(a)){this.error("Input not Buffer");return}this.base=a,this.offset=0,this.length=a.length}e(n,t),Ql.DecoderBuffer=n,n.isDecoderBuffer=function(d){return d instanceof n?!0:typeof d=="object"&&r.isBuffer(d.base)&&d.constructor.name==="DecoderBuffer"&&typeof d.offset=="number"&&typeof d.length=="number"&&typeof d.save=="function"&&typeof d.restore=="function"&&typeof d.isEmpty=="function"&&typeof d.readUInt8=="function"&&typeof d.skip=="function"&&typeof d.raw=="function"},n.prototype.save=function(){return{offset:this.offset,reporter:t.prototype.save.call(this)}},n.prototype.restore=function(d){const m=new n(this.base);return m.offset=d.offset,m.length=this.offset,this.offset=d.offset,t.prototype.restore.call(this,d.reporter),m},n.prototype.isEmpty=function(){return this.offset===this.length},n.prototype.readUInt8=function(d){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(d||"DecoderBuffer overrun")},n.prototype.skip=function(d,m){if(!(this.offset+d<=this.length))return this.error(m||"DecoderBuffer overrun");const y=new n(this.base);return y._reporterState=this._reporterState,y.offset=this.offset,y.length=this.offset+d,this.offset+=d,y},n.prototype.raw=function(d){return this.base.slice(d?d.offset:this.offset,this.length)};function o(a,d){if(Array.isArray(a))this.length=0,this.value=a.map(function(m){return o.isEncoderBuffer(m)||(m=new o(m,d)),this.length+=m.length,m},this);else if(typeof a=="number"){if(!(0<=a&&a<=255))return d.error("non-byte EncoderBuffer value");this.value=a,this.length=1}else if(typeof a=="string")this.value=a,this.length=r.byteLength(a);else if(r.isBuffer(a))this.value=a,this.length=a.length;else return d.error("Unsupported type: "+typeof a)}return Ql.EncoderBuffer=o,o.isEncoderBuffer=function(d){return d instanceof o?!0:typeof d=="object"&&d.constructor.name==="EncoderBuffer"&&typeof d.length=="number"&&typeof d.join=="function"},o.prototype.join=function(d,m){return d||(d=r.alloc(this.length)),m||(m=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(y){y.join(d,m),m+=y.length}):(typeof this.value=="number"?d[m]=this.value:typeof this.value=="string"?d.write(this.value,m):r.isBuffer(this.value)&&this.value.copy(d,m),m+=this.length)),d},Ql}var zp,Yw;function Wy(){if(Yw)return zp;Yw=1;const e=Gy().Reporter,t=ju().EncoderBuffer,r=ju().DecoderBuffer,n=Hn,o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],a=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o),d=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function m(w,M,_){const E={};this._baseState=E,E.name=_,E.enc=w,E.parent=M||null,E.children=null,E.tag=null,E.args=null,E.reverseArgs=null,E.choice=null,E.optional=!1,E.any=!1,E.obj=!1,E.use=null,E.useDecoder=null,E.key=null,E.default=null,E.explicit=null,E.implicit=null,E.contains=null,E.parent||(E.children=[],this._wrap())}zp=m;const y=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return m.prototype.clone=function(){const M=this._baseState,_={};y.forEach(function(S){_[S]=M[S]});const E=new this.constructor(_.parent);return E._baseState=_,E},m.prototype._wrap=function(){const M=this._baseState;a.forEach(function(_){this[_]=function(){const S=new this.constructor(this);return M.children.push(S),S[_].apply(S,arguments)}},this)},m.prototype._init=function(M){const _=this._baseState;n(_.parent===null),M.call(this),_.children=_.children.filter(function(E){return E._baseState.parent===this},this),n.equal(_.children.length,1,"Root node can have only one child")},m.prototype._useArgs=function(M){const _=this._baseState,E=M.filter(function(S){return S instanceof this.constructor},this);M=M.filter(function(S){return!(S instanceof this.constructor)},this),E.length!==0&&(n(_.children===null),_.children=E,E.forEach(function(S){S._baseState.parent=this},this)),M.length!==0&&(n(_.args===null),_.args=M,_.reverseArgs=M.map(function(S){if(typeof S!="object"||S.constructor!==Object)return S;const A={};return Object.keys(S).forEach(function(T){T==(T|0)&&(T|=0);const I=S[T];A[I]=T}),A}))},d.forEach(function(w){m.prototype[w]=function(){const _=this._baseState;throw new Error(w+" not implemented for encoding: "+_.enc)}}),o.forEach(function(w){m.prototype[w]=function(){const _=this._baseState,E=Array.prototype.slice.call(arguments);return n(_.tag===null),_.tag=w,this._useArgs(E),this}}),m.prototype.use=function(M){n(M);const _=this._baseState;return n(_.use===null),_.use=M,this},m.prototype.optional=function(){const M=this._baseState;return M.optional=!0,this},m.prototype.def=function(M){const _=this._baseState;return n(_.default===null),_.default=M,_.optional=!0,this},m.prototype.explicit=function(M){const _=this._baseState;return n(_.explicit===null&&_.implicit===null),_.explicit=M,this},m.prototype.implicit=function(M){const _=this._baseState;return n(_.explicit===null&&_.implicit===null),_.implicit=M,this},m.prototype.obj=function(){const M=this._baseState,_=Array.prototype.slice.call(arguments);return M.obj=!0,_.length!==0&&this._useArgs(_),this},m.prototype.key=function(M){const _=this._baseState;return n(_.key===null),_.key=M,this},m.prototype.any=function(){const M=this._baseState;return M.any=!0,this},m.prototype.choice=function(M){const _=this._baseState;return n(_.choice===null),_.choice=M,this._useArgs(Object.keys(M).map(function(E){return M[E]})),this},m.prototype.contains=function(M){const _=this._baseState;return n(_.use===null),_.contains=M,this},m.prototype._decode=function(M,_){const E=this._baseState;if(E.parent===null)return M.wrapResult(E.children[0]._decode(M,_));let S=E.default,A=!0,T=null;if(E.key!==null&&(T=M.enterKey(E.key)),E.optional){let O=null;if(E.explicit!==null?O=E.explicit:E.implicit!==null?O=E.implicit:E.tag!==null&&(O=E.tag),O===null&&!E.any){const P=M.save();try{E.choice===null?this._decodeGeneric(E.tag,M,_):this._decodeChoice(M,_),A=!0}catch{A=!1}M.restore(P)}else if(A=this._peekTag(M,O,E.any),M.isError(A))return A}let I;if(E.obj&&A&&(I=M.enterObject()),A){if(E.explicit!==null){const P=this._decodeTag(M,E.explicit);if(M.isError(P))return P;M=P}const O=M.offset;if(E.use===null&&E.choice===null){let P;E.any&&(P=M.save());const L=this._decodeTag(M,E.implicit!==null?E.implicit:E.tag,E.any);if(M.isError(L))return L;E.any?S=M.raw(P):M=L}if(_&&_.track&&E.tag!==null&&_.track(M.path(),O,M.length,"tagged"),_&&_.track&&E.tag!==null&&_.track(M.path(),M.offset,M.length,"content"),E.any||(E.choice===null?S=this._decodeGeneric(E.tag,M,_):S=this._decodeChoice(M,_)),M.isError(S))return S;if(!E.any&&E.choice===null&&E.children!==null&&E.children.forEach(function(L){L._decode(M,_)}),E.contains&&(E.tag==="octstr"||E.tag==="bitstr")){const P=new r(S);S=this._getUse(E.contains,M._reporterState.obj)._decode(P,_)}}return E.obj&&A&&(S=M.leaveObject(I)),E.key!==null&&(S!==null||A===!0)?M.leaveKey(T,E.key,S):T!==null&&M.exitKey(T),S},m.prototype._decodeGeneric=function(M,_,E){const S=this._baseState;return M==="seq"||M==="set"?null:M==="seqof"||M==="setof"?this._decodeList(_,M,S.args[0],E):/str$/.test(M)?this._decodeStr(_,M,E):M==="objid"&&S.args?this._decodeObjid(_,S.args[0],S.args[1],E):M==="objid"?this._decodeObjid(_,null,null,E):M==="gentime"||M==="utctime"?this._decodeTime(_,M,E):M==="null_"?this._decodeNull(_,E):M==="bool"?this._decodeBool(_,E):M==="objDesc"?this._decodeStr(_,M,E):M==="int"||M==="enum"?this._decodeInt(_,S.args&&S.args[0],E):S.use!==null?this._getUse(S.use,_._reporterState.obj)._decode(_,E):_.error("unknown tag: "+M)},m.prototype._getUse=function(M,_){const E=this._baseState;return E.useDecoder=this._use(M,_),n(E.useDecoder._baseState.parent===null),E.useDecoder=E.useDecoder._baseState.children[0],E.implicit!==E.useDecoder._baseState.implicit&&(E.useDecoder=E.useDecoder.clone(),E.useDecoder._baseState.implicit=E.implicit),E.useDecoder},m.prototype._decodeChoice=function(M,_){const E=this._baseState;let S=null,A=!1;return Object.keys(E.choice).some(function(T){const I=M.save(),O=E.choice[T];try{const P=O._decode(M,_);if(M.isError(P))return!1;S={type:T,value:P},A=!0}catch{return M.restore(I),!1}return!0},this),A?S:M.error("Choice not matched")},m.prototype._createEncoderBuffer=function(M){return new t(M,this.reporter)},m.prototype._encode=function(M,_,E){const S=this._baseState;if(S.default!==null&&S.default===M)return;const A=this._encodeValue(M,_,E);if(A!==void 0&&!this._skipDefault(A,_,E))return A},m.prototype._encodeValue=function(M,_,E){const S=this._baseState;if(S.parent===null)return S.children[0]._encode(M,_||new e);let A=null;if(this.reporter=_,S.optional&&M===void 0)if(S.default!==null)M=S.default;else return;let T=null,I=!1;if(S.any)A=this._createEncoderBuffer(M);else if(S.choice)A=this._encodeChoice(M,_);else if(S.contains)T=this._getUse(S.contains,E)._encode(M,_),I=!0;else if(S.children)T=S.children.map(function(O){if(O._baseState.tag==="null_")return O._encode(null,_,M);if(O._baseState.key===null)return _.error("Child should have a key");const P=_.enterKey(O._baseState.key);if(typeof M!="object")return _.error("Child expected, but input is not object");const L=O._encode(M[O._baseState.key],_,M);return _.leaveKey(P),L},this).filter(function(O){return O}),T=this._createEncoderBuffer(T);else if(S.tag==="seqof"||S.tag==="setof"){if(!(S.args&&S.args.length===1))return _.error("Too many args for : "+S.tag);if(!Array.isArray(M))return _.error("seqof/setof, but data is not Array");const O=this.clone();O._baseState.implicit=null,T=this._createEncoderBuffer(M.map(function(P){const L=this._baseState;return this._getUse(L.args[0],M)._encode(P,_)},O))}else S.use!==null?A=this._getUse(S.use,E)._encode(M,_):(T=this._encodePrimitive(S.tag,M),I=!0);if(!S.any&&S.choice===null){const O=S.implicit!==null?S.implicit:S.tag,P=S.implicit===null?"universal":"context";O===null?S.use===null&&_.error("Tag could be omitted only for .use()"):S.use===null&&(A=this._encodeComposite(O,I,P,T))}return S.explicit!==null&&(A=this._encodeComposite(S.explicit,!1,"context",A)),A},m.prototype._encodeChoice=function(M,_){const E=this._baseState,S=E.choice[M.type];return S||n(!1,M.type+" not found in "+JSON.stringify(Object.keys(E.choice))),S._encode(M.value,_)},m.prototype._encodePrimitive=function(M,_){const E=this._baseState;if(/str$/.test(M))return this._encodeStr(_,M);if(M==="objid"&&E.args)return this._encodeObjid(_,E.reverseArgs[0],E.args[1]);if(M==="objid")return this._encodeObjid(_,null,null);if(M==="gentime"||M==="utctime")return this._encodeTime(_,M);if(M==="null_")return this._encodeNull();if(M==="int"||M==="enum")return this._encodeInt(_,E.args&&E.reverseArgs[0]);if(M==="bool")return this._encodeBool(_);if(M==="objDesc")return this._encodeStr(_,M);throw new Error("Unsupported tag: "+M)},m.prototype._isNumstr=function(M){return/^[0-9 ]*$/.test(M)},m.prototype._isPrintstr=function(M){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(M)},zp}var Hp={},Xw;function Zy(){return Xw||(Xw=1,function(e){function t(r){const n={};return Object.keys(r).forEach(function(o){(o|0)==o&&(o=o|0);const a=r[o];n[a]=o}),n}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=t(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=t(e.tag)}(Hp)),Hp}var Up,Jw;function DE(){if(Jw)return Up;Jw=1;const e=mt.exports,t=Ky().Buffer,r=Wy(),n=Zy();function o(y){this.enc="der",this.name=y.name,this.entity=y,this.tree=new a,this.tree._init(y.body)}Up=o,o.prototype.encode=function(w,M){return this.tree._encode(w,M).join()};function a(y){r.call(this,"der",y)}e(a,r),a.prototype._encodeComposite=function(w,M,_,E){const S=m(w,M,_,this.reporter);if(E.length<128){const I=t.alloc(2);return I[0]=S,I[1]=E.length,this._createEncoderBuffer([I,E])}let A=1;for(let I=E.length;I>=256;I>>=8)A++;const T=t.alloc(1+1+A);T[0]=S,T[1]=128|A;for(let I=1+A,O=E.length;O>0;I--,O>>=8)T[I]=O&255;return this._createEncoderBuffer([T,E])},a.prototype._encodeStr=function(w,M){if(M==="bitstr")return this._createEncoderBuffer([w.unused|0,w.data]);if(M==="bmpstr"){const _=t.alloc(w.length*2);for(let E=0;E=40)return this.reporter.error("Second objid identifier OOB");w.splice(0,2,w[0]*40+w[1])}let E=0;for(let T=0;T=128;I>>=7)E++}const S=t.alloc(E);let A=S.length-1;for(let T=w.length-1;T>=0;T--){let I=w[T];for(S[A--]=I&127;(I>>=7)>0;)S[A--]=128|I&127}return this._createEncoderBuffer(S)};function d(y){return y<10?"0"+y:y}a.prototype._encodeTime=function(w,M){let _;const E=new Date(w);return M==="gentime"?_=[d(E.getUTCFullYear()),d(E.getUTCMonth()+1),d(E.getUTCDate()),d(E.getUTCHours()),d(E.getUTCMinutes()),d(E.getUTCSeconds()),"Z"].join(""):M==="utctime"?_=[d(E.getUTCFullYear()%100),d(E.getUTCMonth()+1),d(E.getUTCDate()),d(E.getUTCHours()),d(E.getUTCMinutes()),d(E.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+M+" time is not supported yet"),this._encodeStr(_,"octstr")},a.prototype._encodeNull=function(){return this._createEncoderBuffer("")},a.prototype._encodeInt=function(w,M){if(typeof w=="string"){if(!M)return this.reporter.error("String int or enum given, but no values map");if(!M.hasOwnProperty(w))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(w));w=M[w]}if(typeof w!="number"&&!t.isBuffer(w)){const S=w.toArray();!w.sign&&S[0]&128&&S.unshift(0),w=t.from(S)}if(t.isBuffer(w)){let S=w.length;w.length===0&&S++;const A=t.alloc(S);return w.copy(A),w.length===0&&(A[0]=0),this._createEncoderBuffer(A)}if(w<128)return this._createEncoderBuffer(w);if(w<256)return this._createEncoderBuffer([0,w]);let _=1;for(let S=w;S>=256;S>>=8)_++;const E=new Array(_);for(let S=E.length-1;S>=0;S--)E[S]=w&255,w>>=8;return E[0]&128&&E.unshift(0),this._createEncoderBuffer(t.from(E))},a.prototype._encodeBool=function(w){return this._createEncoderBuffer(w?255:0)},a.prototype._use=function(w,M){return typeof w=="function"&&(w=w(M)),w._getEncoder("der").tree},a.prototype._skipDefault=function(w,M,_){const E=this._baseState;let S;if(E.default===null)return!1;const A=w.join();if(E.defaultBuffer===void 0&&(E.defaultBuffer=this._encodeValue(E.default,M,_).join()),A.length!==E.defaultBuffer.length)return!1;for(S=0;S=31?_.error("Multi-octet tag encoding unsupported"):(w||(E|=32),E|=n.tagClassByName[M||"universal"]<<6,E)}return Up}var jp,Qw;function jK(){if(Qw)return jp;Qw=1;const e=mt.exports,t=DE();function r(n){t.call(this,n),this.enc="pem"}return e(r,t),jp=r,r.prototype.encode=function(o,a){const m=t.prototype.encode.call(this,o).toString("base64"),y=["-----BEGIN "+a.label+"-----"];for(let w=0;w>6],S=(_&32)===0;if((_&31)===31){let T=_;for(_=0;(T&128)===128;){if(T=w.readUInt8(M),w.isError(T))return T;_<<=7,_|=T&127}}else _&=31;const A=o.tag[_];return{cls:E,primitive:S,tag:_,tagStr:A}}function y(w,M,_){let E=w.readUInt8(_);if(w.isError(E))return E;if(!M&&E===128)return null;if((E&128)===0)return E;const S=E&127;if(S>4)return w.error("length octect is too long");E=0;for(let A=0;A0&&P.ishrn(L),P}function S(I,O){I=E(I,O),I=I.mod(O);var P=e.from(I.toArray());if(P.length=M)throw new Error("invalid sig")}return Jp=a,Jp}var Qp,p5;function eG(){if(p5)return Qp;p5=1;var e=gt.exports.Buffer,t=nf,r=Ns.exports,n=mt.exports,o=JK(),a=QK(),d=ME;Object.keys(d).forEach(function(_){d[_].id=e.from(d[_].id,"hex"),d[_.toLowerCase()]=d[_]});function m(_){r.Writable.call(this);var E=d[_];if(!E)throw new Error("Unknown message digest");this._hashType=E.hash,this._hash=t(E.hash),this._tag=E.id,this._signType=E.sign}n(m,r.Writable),m.prototype._write=function(E,S,A){this._hash.update(E),A()},m.prototype.update=function(E,S){return typeof E=="string"&&(E=e.from(E,S)),this._hash.update(E),this},m.prototype.sign=function(E,S){this.end();var A=this._hash.digest(),T=o(A,E,this._hashType,this._signType,this._tag);return S?T.toString(S):T};function y(_){r.Writable.call(this);var E=d[_];if(!E)throw new Error("Unknown message digest");this._hash=t(E.hash),this._tag=E.id,this._signType=E.sign}n(y,r.Writable),y.prototype._write=function(E,S,A){this._hash.update(E),A()},y.prototype.update=function(E,S){return typeof E=="string"&&(E=e.from(E,S)),this._hash.update(E),this},y.prototype.verify=function(E,S,A){typeof S=="string"&&(S=e.from(S,A)),this.end();var T=this._hash.digest();return a(S,T,E,this._signType,this._tag)};function w(_){return new m(_)}function M(_){return new y(_)}return Qp={Sign:w,Verify:M,createSign:w,createVerify:M},Qp}var ev={exports:{}},v5;function tG(){return v5||(v5=1,function(e){(function(t,r){function n(h,i){if(!h)throw new Error(i||"Assertion failed")}function o(h,i){h.super_=i;var f=function(){};f.prototype=i.prototype,h.prototype=new f,h.prototype.constructor=h}function a(h,i,f){if(a.isBN(h))return h;this.negative=0,this.words=null,this.length=0,this.red=null,h!==null&&((i==="le"||i==="be")&&(f=i,i=10),this._init(h||0,i||10,f||"be"))}typeof t=="object"?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var d;try{typeof window<"u"&&typeof window.Buffer<"u"?d=window.Buffer:d=on.Buffer}catch{}a.isBN=function(i){return i instanceof a?!0:i!==null&&typeof i=="object"&&i.constructor.wordSize===a.wordSize&&Array.isArray(i.words)},a.max=function(i,f){return i.cmp(f)>0?i:f},a.min=function(i,f){return i.cmp(f)<0?i:f},a.prototype._init=function(i,f,u){if(typeof i=="number")return this._initNumber(i,f,u);if(typeof i=="object")return this._initArray(i,f,u);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),i=i.toString().replace(/\s+/g,"");var c=0;i[0]==="-"&&(c++,this.negative=1),c=0;c-=3)b=i[c]|i[c-1]<<8|i[c-2]<<16,this.words[p]|=b<>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);else if(u==="le")for(c=0,p=0;c>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);return this.strip()};function m(h,i){var f=h.charCodeAt(i);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function y(h,i,f){var u=m(h,f);return f-1>=i&&(u|=m(h,f-1)<<4),u}a.prototype._parseHex=function(i,f,u){this.length=Math.ceil((i.length-f)/6),this.words=new Array(this.length);for(var c=0;c=f;c-=2)g=y(i,f,c)<=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8;else{var l=i.length-f;for(c=l%2===0?f+1:f;c=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8}this.strip()};function w(h,i,f,u){for(var c=0,p=Math.min(h.length,f),b=i;b=49?c+=g-49+10:g>=17?c+=g-17+10:c+=g}return c}a.prototype._parseBase=function(i,f,u){this.words=[0],this.length=1;for(var c=0,p=1;p<=67108863;p*=f)c++;c--,p=p/f|0;for(var b=i.length-u,g=b%c,l=Math.min(b,b-g)+u,s=0,v=u;v1&&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},a.prototype.inspect=function(){return(this.red?""};var M=["","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"],_=[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],E=[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(i,f){i=i||10,f=f|0||1;var u;if(i===16||i==="hex"){u="";for(var c=0,p=0,b=0;b>>24-c&16777215,p!==0||b!==this.length-1?u=M[6-l.length]+l+u:u=l+u,c+=2,c>=26&&(c-=26,b--)}for(p!==0&&(u=p.toString(16)+u);u.length%f!==0;)u="0"+u;return this.negative!==0&&(u="-"+u),u}if(i===(i|0)&&i>=2&&i<=36){var s=_[i],v=E[i];u="";var x=this.clone();for(x.negative=0;!x.isZero();){var C=x.modn(v).toString(i);x=x.idivn(v),x.isZero()?u=C+u:u=M[s-C.length]+C+u}for(this.isZero()&&(u="0"+u);u.length%f!==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 i=this.words[0];return this.length===2?i+=this.words[1]*67108864:this.length===3&&this.words[2]===1?i+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-i:i},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(i,f){return n(typeof d<"u"),this.toArrayLike(d,i,f)},a.prototype.toArray=function(i,f){return this.toArrayLike(Array,i,f)},a.prototype.toArrayLike=function(i,f,u){var c=this.byteLength(),p=u||Math.max(1,c);n(c<=p,"byte array longer than desired length"),n(p>0,"Requested array length <= 0"),this.strip();var b=f==="le",g=new i(p),l,s,v=this.clone();if(b){for(s=0;!v.isZero();s++)l=v.andln(255),v.iushrn(8),g[s]=l;for(;s=4096&&(u+=13,f>>>=13),f>=64&&(u+=7,f>>>=7),f>=8&&(u+=4,f>>>=4),f>=2&&(u+=2,f>>>=2),u+f},a.prototype._zeroBits=function(i){if(i===0)return 26;var f=i,u=0;return(f&8191)===0&&(u+=13,f>>>=13),(f&127)===0&&(u+=7,f>>>=7),(f&15)===0&&(u+=4,f>>>=4),(f&3)===0&&(u+=2,f>>>=2),(f&1)===0&&u++,u},a.prototype.bitLength=function(){var i=this.words[this.length-1],f=this._countBits(i);return(this.length-1)*26+f};function S(h){for(var i=new Array(h.bitLength()),f=0;f>>c}return i}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var i=0,f=0;fi.length?this.clone().ior(i):i.clone().ior(this)},a.prototype.uor=function(i){return this.length>i.length?this.clone().iuor(i):i.clone().iuor(this)},a.prototype.iuand=function(i){var f;this.length>i.length?f=i:f=this;for(var u=0;ui.length?this.clone().iand(i):i.clone().iand(this)},a.prototype.uand=function(i){return this.length>i.length?this.clone().iuand(i):i.clone().iuand(this)},a.prototype.iuxor=function(i){var f,u;this.length>i.length?(f=this,u=i):(f=i,u=this);for(var c=0;ci.length?this.clone().ixor(i):i.clone().ixor(this)},a.prototype.uxor=function(i){return this.length>i.length?this.clone().iuxor(i):i.clone().iuxor(this)},a.prototype.inotn=function(i){n(typeof i=="number"&&i>=0);var f=Math.ceil(i/26)|0,u=i%26;this._expand(f),u>0&&f--;for(var c=0;c0&&(this.words[c]=~this.words[c]&67108863>>26-u),this.strip()},a.prototype.notn=function(i){return this.clone().inotn(i)},a.prototype.setn=function(i,f){n(typeof i=="number"&&i>=0);var u=i/26|0,c=i%26;return this._expand(u+1),f?this.words[u]=this.words[u]|1<i.length?(u=this,c=i):(u=i,c=this);for(var p=0,b=0;b>>26;for(;p!==0&&b>>26;if(this.length=u.length,p!==0)this.words[this.length]=p,this.length++;else if(u!==this)for(;bi.length?this.clone().iadd(i):i.clone().iadd(this)},a.prototype.isub=function(i){if(i.negative!==0){i.negative=0;var f=this.iadd(i);return i.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(i),this.negative=1,this._normSign();var u=this.cmp(i);if(u===0)return this.negative=0,this.length=1,this.words[0]=0,this;var c,p;u>0?(c=this,p=i):(c=i,p=this);for(var b=0,g=0;g>26,this.words[g]=f&67108863;for(;b!==0&&g>26,this.words[g]=f&67108863;if(b===0&&g>>26,x=l&67108863,C=Math.min(s,i.length-1),B=Math.max(0,s-h.length+1);B<=C;B++){var k=s-B|0;c=h.words[k]|0,p=i.words[B]|0,b=c*p+x,v+=b/67108864|0,x=b&67108863}f.words[s]=x|0,l=v|0}return l!==0?f.words[s]=l|0:f.length--,f.strip()}var T=function(i,f,u){var c=i.words,p=f.words,b=u.words,g=0,l,s,v,x=c[0]|0,C=x&8191,B=x>>>13,k=c[1]|0,R=k&8191,D=k>>>13,z=c[2]|0,H=z&8191,V=z>>>13,U=c[3]|0,F=U&8191,G=U>>>13,ie=c[4]|0,Y=ie&8191,oe=ie>>>13,xe=c[5]|0,ne=xe&8191,Q=xe>>>13,te=c[6]|0,ee=te&8191,se=te>>>13,_e=c[7]|0,K=_e&8191,re=_e>>>13,Te=c[8]|0,ae=Te&8191,Me=Te>>>13,ze=c[9]|0,fe=ze&8191,Se=ze>>>13,He=p[0]|0,ue=He&8191,Ae=He>>>13,Ue=p[1]|0,he=Ue&8191,Ce=Ue>>>13,je=p[2]|0,de=je&8191,Oe=je>>>13,Ve=p[3]|0,pe=Ve&8191,Pe=Ve>>>13,Ke=p[4]|0,ve=Ke&8191,Be=Ke>>>13,Ge=p[5]|0,me=Ge&8191,Ie=Ge>>>13,We=p[6]|0,ge=We&8191,$e=We>>>13,Ze=p[7]|0,ye=Ze&8191,Le=Ze>>>13,Ye=p[8]|0,be=Ye&8191,De=Ye>>>13,Xe=p[9]|0,we=Xe&8191,Re=Xe>>>13;u.negative=i.negative^f.negative,u.length=19,l=Math.imul(C,ue),s=Math.imul(C,Ae),s=s+Math.imul(B,ue)|0,v=Math.imul(B,Ae);var tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(tt>>>26)|0,tt&=67108863,l=Math.imul(R,ue),s=Math.imul(R,Ae),s=s+Math.imul(D,ue)|0,v=Math.imul(D,Ae),l=l+Math.imul(C,he)|0,s=s+Math.imul(C,Ce)|0,s=s+Math.imul(B,he)|0,v=v+Math.imul(B,Ce)|0;var rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(rt>>>26)|0,rt&=67108863,l=Math.imul(H,ue),s=Math.imul(H,Ae),s=s+Math.imul(V,ue)|0,v=Math.imul(V,Ae),l=l+Math.imul(R,he)|0,s=s+Math.imul(R,Ce)|0,s=s+Math.imul(D,he)|0,v=v+Math.imul(D,Ce)|0,l=l+Math.imul(C,de)|0,s=s+Math.imul(C,Oe)|0,s=s+Math.imul(B,de)|0,v=v+Math.imul(B,Oe)|0;var ut=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ut>>>26)|0,ut&=67108863,l=Math.imul(F,ue),s=Math.imul(F,Ae),s=s+Math.imul(G,ue)|0,v=Math.imul(G,Ae),l=l+Math.imul(H,he)|0,s=s+Math.imul(H,Ce)|0,s=s+Math.imul(V,he)|0,v=v+Math.imul(V,Ce)|0,l=l+Math.imul(R,de)|0,s=s+Math.imul(R,Oe)|0,s=s+Math.imul(D,de)|0,v=v+Math.imul(D,Oe)|0,l=l+Math.imul(C,pe)|0,s=s+Math.imul(C,Pe)|0,s=s+Math.imul(B,pe)|0,v=v+Math.imul(B,Pe)|0;var lt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(lt>>>26)|0,lt&=67108863,l=Math.imul(Y,ue),s=Math.imul(Y,Ae),s=s+Math.imul(oe,ue)|0,v=Math.imul(oe,Ae),l=l+Math.imul(F,he)|0,s=s+Math.imul(F,Ce)|0,s=s+Math.imul(G,he)|0,v=v+Math.imul(G,Ce)|0,l=l+Math.imul(H,de)|0,s=s+Math.imul(H,Oe)|0,s=s+Math.imul(V,de)|0,v=v+Math.imul(V,Oe)|0,l=l+Math.imul(R,pe)|0,s=s+Math.imul(R,Pe)|0,s=s+Math.imul(D,pe)|0,v=v+Math.imul(D,Pe)|0,l=l+Math.imul(C,ve)|0,s=s+Math.imul(C,Be)|0,s=s+Math.imul(B,ve)|0,v=v+Math.imul(B,Be)|0;var ht=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ht>>>26)|0,ht&=67108863,l=Math.imul(ne,ue),s=Math.imul(ne,Ae),s=s+Math.imul(Q,ue)|0,v=Math.imul(Q,Ae),l=l+Math.imul(Y,he)|0,s=s+Math.imul(Y,Ce)|0,s=s+Math.imul(oe,he)|0,v=v+Math.imul(oe,Ce)|0,l=l+Math.imul(F,de)|0,s=s+Math.imul(F,Oe)|0,s=s+Math.imul(G,de)|0,v=v+Math.imul(G,Oe)|0,l=l+Math.imul(H,pe)|0,s=s+Math.imul(H,Pe)|0,s=s+Math.imul(V,pe)|0,v=v+Math.imul(V,Pe)|0,l=l+Math.imul(R,ve)|0,s=s+Math.imul(R,Be)|0,s=s+Math.imul(D,ve)|0,v=v+Math.imul(D,Be)|0,l=l+Math.imul(C,me)|0,s=s+Math.imul(C,Ie)|0,s=s+Math.imul(B,me)|0,v=v+Math.imul(B,Ie)|0;var ct=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ct>>>26)|0,ct&=67108863,l=Math.imul(ee,ue),s=Math.imul(ee,Ae),s=s+Math.imul(se,ue)|0,v=Math.imul(se,Ae),l=l+Math.imul(ne,he)|0,s=s+Math.imul(ne,Ce)|0,s=s+Math.imul(Q,he)|0,v=v+Math.imul(Q,Ce)|0,l=l+Math.imul(Y,de)|0,s=s+Math.imul(Y,Oe)|0,s=s+Math.imul(oe,de)|0,v=v+Math.imul(oe,Oe)|0,l=l+Math.imul(F,pe)|0,s=s+Math.imul(F,Pe)|0,s=s+Math.imul(G,pe)|0,v=v+Math.imul(G,Pe)|0,l=l+Math.imul(H,ve)|0,s=s+Math.imul(H,Be)|0,s=s+Math.imul(V,ve)|0,v=v+Math.imul(V,Be)|0,l=l+Math.imul(R,me)|0,s=s+Math.imul(R,Ie)|0,s=s+Math.imul(D,me)|0,v=v+Math.imul(D,Ie)|0,l=l+Math.imul(C,ge)|0,s=s+Math.imul(C,$e)|0,s=s+Math.imul(B,ge)|0,v=v+Math.imul(B,$e)|0;var dt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(dt>>>26)|0,dt&=67108863,l=Math.imul(K,ue),s=Math.imul(K,Ae),s=s+Math.imul(re,ue)|0,v=Math.imul(re,Ae),l=l+Math.imul(ee,he)|0,s=s+Math.imul(ee,Ce)|0,s=s+Math.imul(se,he)|0,v=v+Math.imul(se,Ce)|0,l=l+Math.imul(ne,de)|0,s=s+Math.imul(ne,Oe)|0,s=s+Math.imul(Q,de)|0,v=v+Math.imul(Q,Oe)|0,l=l+Math.imul(Y,pe)|0,s=s+Math.imul(Y,Pe)|0,s=s+Math.imul(oe,pe)|0,v=v+Math.imul(oe,Pe)|0,l=l+Math.imul(F,ve)|0,s=s+Math.imul(F,Be)|0,s=s+Math.imul(G,ve)|0,v=v+Math.imul(G,Be)|0,l=l+Math.imul(H,me)|0,s=s+Math.imul(H,Ie)|0,s=s+Math.imul(V,me)|0,v=v+Math.imul(V,Ie)|0,l=l+Math.imul(R,ge)|0,s=s+Math.imul(R,$e)|0,s=s+Math.imul(D,ge)|0,v=v+Math.imul(D,$e)|0,l=l+Math.imul(C,ye)|0,s=s+Math.imul(C,Le)|0,s=s+Math.imul(B,ye)|0,v=v+Math.imul(B,Le)|0;var yt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(yt>>>26)|0,yt&=67108863,l=Math.imul(ae,ue),s=Math.imul(ae,Ae),s=s+Math.imul(Me,ue)|0,v=Math.imul(Me,Ae),l=l+Math.imul(K,he)|0,s=s+Math.imul(K,Ce)|0,s=s+Math.imul(re,he)|0,v=v+Math.imul(re,Ce)|0,l=l+Math.imul(ee,de)|0,s=s+Math.imul(ee,Oe)|0,s=s+Math.imul(se,de)|0,v=v+Math.imul(se,Oe)|0,l=l+Math.imul(ne,pe)|0,s=s+Math.imul(ne,Pe)|0,s=s+Math.imul(Q,pe)|0,v=v+Math.imul(Q,Pe)|0,l=l+Math.imul(Y,ve)|0,s=s+Math.imul(Y,Be)|0,s=s+Math.imul(oe,ve)|0,v=v+Math.imul(oe,Be)|0,l=l+Math.imul(F,me)|0,s=s+Math.imul(F,Ie)|0,s=s+Math.imul(G,me)|0,v=v+Math.imul(G,Ie)|0,l=l+Math.imul(H,ge)|0,s=s+Math.imul(H,$e)|0,s=s+Math.imul(V,ge)|0,v=v+Math.imul(V,$e)|0,l=l+Math.imul(R,ye)|0,s=s+Math.imul(R,Le)|0,s=s+Math.imul(D,ye)|0,v=v+Math.imul(D,Le)|0,l=l+Math.imul(C,be)|0,s=s+Math.imul(C,De)|0,s=s+Math.imul(B,be)|0,v=v+Math.imul(B,De)|0;var bt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(bt>>>26)|0,bt&=67108863,l=Math.imul(fe,ue),s=Math.imul(fe,Ae),s=s+Math.imul(Se,ue)|0,v=Math.imul(Se,Ae),l=l+Math.imul(ae,he)|0,s=s+Math.imul(ae,Ce)|0,s=s+Math.imul(Me,he)|0,v=v+Math.imul(Me,Ce)|0,l=l+Math.imul(K,de)|0,s=s+Math.imul(K,Oe)|0,s=s+Math.imul(re,de)|0,v=v+Math.imul(re,Oe)|0,l=l+Math.imul(ee,pe)|0,s=s+Math.imul(ee,Pe)|0,s=s+Math.imul(se,pe)|0,v=v+Math.imul(se,Pe)|0,l=l+Math.imul(ne,ve)|0,s=s+Math.imul(ne,Be)|0,s=s+Math.imul(Q,ve)|0,v=v+Math.imul(Q,Be)|0,l=l+Math.imul(Y,me)|0,s=s+Math.imul(Y,Ie)|0,s=s+Math.imul(oe,me)|0,v=v+Math.imul(oe,Ie)|0,l=l+Math.imul(F,ge)|0,s=s+Math.imul(F,$e)|0,s=s+Math.imul(G,ge)|0,v=v+Math.imul(G,$e)|0,l=l+Math.imul(H,ye)|0,s=s+Math.imul(H,Le)|0,s=s+Math.imul(V,ye)|0,v=v+Math.imul(V,Le)|0,l=l+Math.imul(R,be)|0,s=s+Math.imul(R,De)|0,s=s+Math.imul(D,be)|0,v=v+Math.imul(D,De)|0,l=l+Math.imul(C,we)|0,s=s+Math.imul(C,Re)|0,s=s+Math.imul(B,we)|0,v=v+Math.imul(B,Re)|0;var wt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(wt>>>26)|0,wt&=67108863,l=Math.imul(fe,he),s=Math.imul(fe,Ce),s=s+Math.imul(Se,he)|0,v=Math.imul(Se,Ce),l=l+Math.imul(ae,de)|0,s=s+Math.imul(ae,Oe)|0,s=s+Math.imul(Me,de)|0,v=v+Math.imul(Me,Oe)|0,l=l+Math.imul(K,pe)|0,s=s+Math.imul(K,Pe)|0,s=s+Math.imul(re,pe)|0,v=v+Math.imul(re,Pe)|0,l=l+Math.imul(ee,ve)|0,s=s+Math.imul(ee,Be)|0,s=s+Math.imul(se,ve)|0,v=v+Math.imul(se,Be)|0,l=l+Math.imul(ne,me)|0,s=s+Math.imul(ne,Ie)|0,s=s+Math.imul(Q,me)|0,v=v+Math.imul(Q,Ie)|0,l=l+Math.imul(Y,ge)|0,s=s+Math.imul(Y,$e)|0,s=s+Math.imul(oe,ge)|0,v=v+Math.imul(oe,$e)|0,l=l+Math.imul(F,ye)|0,s=s+Math.imul(F,Le)|0,s=s+Math.imul(G,ye)|0,v=v+Math.imul(G,Le)|0,l=l+Math.imul(H,be)|0,s=s+Math.imul(H,De)|0,s=s+Math.imul(V,be)|0,v=v+Math.imul(V,De)|0,l=l+Math.imul(R,we)|0,s=s+Math.imul(R,Re)|0,s=s+Math.imul(D,we)|0,v=v+Math.imul(D,Re)|0;var Mt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,l=Math.imul(fe,de),s=Math.imul(fe,Oe),s=s+Math.imul(Se,de)|0,v=Math.imul(Se,Oe),l=l+Math.imul(ae,pe)|0,s=s+Math.imul(ae,Pe)|0,s=s+Math.imul(Me,pe)|0,v=v+Math.imul(Me,Pe)|0,l=l+Math.imul(K,ve)|0,s=s+Math.imul(K,Be)|0,s=s+Math.imul(re,ve)|0,v=v+Math.imul(re,Be)|0,l=l+Math.imul(ee,me)|0,s=s+Math.imul(ee,Ie)|0,s=s+Math.imul(se,me)|0,v=v+Math.imul(se,Ie)|0,l=l+Math.imul(ne,ge)|0,s=s+Math.imul(ne,$e)|0,s=s+Math.imul(Q,ge)|0,v=v+Math.imul(Q,$e)|0,l=l+Math.imul(Y,ye)|0,s=s+Math.imul(Y,Le)|0,s=s+Math.imul(oe,ye)|0,v=v+Math.imul(oe,Le)|0,l=l+Math.imul(F,be)|0,s=s+Math.imul(F,De)|0,s=s+Math.imul(G,be)|0,v=v+Math.imul(G,De)|0,l=l+Math.imul(H,we)|0,s=s+Math.imul(H,Re)|0,s=s+Math.imul(V,we)|0,v=v+Math.imul(V,Re)|0;var xt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(xt>>>26)|0,xt&=67108863,l=Math.imul(fe,pe),s=Math.imul(fe,Pe),s=s+Math.imul(Se,pe)|0,v=Math.imul(Se,Pe),l=l+Math.imul(ae,ve)|0,s=s+Math.imul(ae,Be)|0,s=s+Math.imul(Me,ve)|0,v=v+Math.imul(Me,Be)|0,l=l+Math.imul(K,me)|0,s=s+Math.imul(K,Ie)|0,s=s+Math.imul(re,me)|0,v=v+Math.imul(re,Ie)|0,l=l+Math.imul(ee,ge)|0,s=s+Math.imul(ee,$e)|0,s=s+Math.imul(se,ge)|0,v=v+Math.imul(se,$e)|0,l=l+Math.imul(ne,ye)|0,s=s+Math.imul(ne,Le)|0,s=s+Math.imul(Q,ye)|0,v=v+Math.imul(Q,Le)|0,l=l+Math.imul(Y,be)|0,s=s+Math.imul(Y,De)|0,s=s+Math.imul(oe,be)|0,v=v+Math.imul(oe,De)|0,l=l+Math.imul(F,we)|0,s=s+Math.imul(F,Re)|0,s=s+Math.imul(G,we)|0,v=v+Math.imul(G,Re)|0;var _t=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(_t>>>26)|0,_t&=67108863,l=Math.imul(fe,ve),s=Math.imul(fe,Be),s=s+Math.imul(Se,ve)|0,v=Math.imul(Se,Be),l=l+Math.imul(ae,me)|0,s=s+Math.imul(ae,Ie)|0,s=s+Math.imul(Me,me)|0,v=v+Math.imul(Me,Ie)|0,l=l+Math.imul(K,ge)|0,s=s+Math.imul(K,$e)|0,s=s+Math.imul(re,ge)|0,v=v+Math.imul(re,$e)|0,l=l+Math.imul(ee,ye)|0,s=s+Math.imul(ee,Le)|0,s=s+Math.imul(se,ye)|0,v=v+Math.imul(se,Le)|0,l=l+Math.imul(ne,be)|0,s=s+Math.imul(ne,De)|0,s=s+Math.imul(Q,be)|0,v=v+Math.imul(Q,De)|0,l=l+Math.imul(Y,we)|0,s=s+Math.imul(Y,Re)|0,s=s+Math.imul(oe,we)|0,v=v+Math.imul(oe,Re)|0;var Et=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Et>>>26)|0,Et&=67108863,l=Math.imul(fe,me),s=Math.imul(fe,Ie),s=s+Math.imul(Se,me)|0,v=Math.imul(Se,Ie),l=l+Math.imul(ae,ge)|0,s=s+Math.imul(ae,$e)|0,s=s+Math.imul(Me,ge)|0,v=v+Math.imul(Me,$e)|0,l=l+Math.imul(K,ye)|0,s=s+Math.imul(K,Le)|0,s=s+Math.imul(re,ye)|0,v=v+Math.imul(re,Le)|0,l=l+Math.imul(ee,be)|0,s=s+Math.imul(ee,De)|0,s=s+Math.imul(se,be)|0,v=v+Math.imul(se,De)|0,l=l+Math.imul(ne,we)|0,s=s+Math.imul(ne,Re)|0,s=s+Math.imul(Q,we)|0,v=v+Math.imul(Q,Re)|0;var St=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(St>>>26)|0,St&=67108863,l=Math.imul(fe,ge),s=Math.imul(fe,$e),s=s+Math.imul(Se,ge)|0,v=Math.imul(Se,$e),l=l+Math.imul(ae,ye)|0,s=s+Math.imul(ae,Le)|0,s=s+Math.imul(Me,ye)|0,v=v+Math.imul(Me,Le)|0,l=l+Math.imul(K,be)|0,s=s+Math.imul(K,De)|0,s=s+Math.imul(re,be)|0,v=v+Math.imul(re,De)|0,l=l+Math.imul(ee,we)|0,s=s+Math.imul(ee,Re)|0,s=s+Math.imul(se,we)|0,v=v+Math.imul(se,Re)|0;var At=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(At>>>26)|0,At&=67108863,l=Math.imul(fe,ye),s=Math.imul(fe,Le),s=s+Math.imul(Se,ye)|0,v=Math.imul(Se,Le),l=l+Math.imul(ae,be)|0,s=s+Math.imul(ae,De)|0,s=s+Math.imul(Me,be)|0,v=v+Math.imul(Me,De)|0,l=l+Math.imul(K,we)|0,s=s+Math.imul(K,Re)|0,s=s+Math.imul(re,we)|0,v=v+Math.imul(re,Re)|0;var Tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,l=Math.imul(fe,be),s=Math.imul(fe,De),s=s+Math.imul(Se,be)|0,v=Math.imul(Se,De),l=l+Math.imul(ae,we)|0,s=s+Math.imul(ae,Re)|0,s=s+Math.imul(Me,we)|0,v=v+Math.imul(Me,Re)|0;var Rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,l=Math.imul(fe,we),s=Math.imul(fe,Re),s=s+Math.imul(Se,we)|0,v=Math.imul(Se,Re);var qt=(g+l|0)+((s&8191)<<13)|0;return g=(v+(s>>>13)|0)+(qt>>>26)|0,qt&=67108863,b[0]=tt,b[1]=rt,b[2]=ut,b[3]=lt,b[4]=ht,b[5]=ct,b[6]=dt,b[7]=yt,b[8]=bt,b[9]=wt,b[10]=Mt,b[11]=xt,b[12]=_t,b[13]=Et,b[14]=St,b[15]=At,b[16]=Tt,b[17]=Rt,b[18]=qt,g!==0&&(b[19]=g,u.length++),u};Math.imul||(T=A);function I(h,i,f){f.negative=i.negative^h.negative,f.length=h.length+i.length;for(var u=0,c=0,p=0;p>>26)|0,c+=b>>>26,b&=67108863}f.words[p]=g,u=b,b=c}return u!==0?f.words[p]=u:f.length--,f.strip()}function O(h,i,f){var u=new P;return u.mulp(h,i,f)}a.prototype.mulTo=function(i,f){var u,c=this.length+i.length;return this.length===10&&i.length===10?u=T(this,i,f):c<63?u=A(this,i,f):c<1024?u=I(this,i,f):u=O(this,i,f),u};function P(h,i){this.x=h,this.y=i}P.prototype.makeRBT=function(i){for(var f=new Array(i),u=a.prototype._countBits(i)-1,c=0;c>=1;return c},P.prototype.permute=function(i,f,u,c,p,b){for(var g=0;g>>1)p++;return 1<>>13,u[2*b+1]=p&8191,p=p>>>13;for(b=2*f;b>=26,f+=c/67108864|0,f+=p>>>26,this.words[u]=p&67108863}return f!==0&&(this.words[u]=f,this.length++),this},a.prototype.muln=function(i){return this.clone().imuln(i)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(i){var f=S(i);if(f.length===0)return new a(1);for(var u=this,c=0;c=0);var f=i%26,u=(i-f)/26,c=67108863>>>26-f<<26-f,p;if(f!==0){var b=0;for(p=0;p>>26-f}b&&(this.words[p]=b,this.length++)}if(u!==0){for(p=this.length-1;p>=0;p--)this.words[p+u]=this.words[p];for(p=0;p=0);var c;f?c=(f-f%26)/26:c=0;var p=i%26,b=Math.min((i-p)/26,this.length),g=67108863^67108863>>>p<b)for(this.length-=b,s=0;s=0&&(v!==0||s>=c);s--){var x=this.words[s]|0;this.words[s]=v<<26-p|x>>>p,v=x&g}return l&&v!==0&&(l.words[l.length++]=v),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(i,f,u){return n(this.negative===0),this.iushrn(i,f,u)},a.prototype.shln=function(i){return this.clone().ishln(i)},a.prototype.ushln=function(i){return this.clone().iushln(i)},a.prototype.shrn=function(i){return this.clone().ishrn(i)},a.prototype.ushrn=function(i){return this.clone().iushrn(i)},a.prototype.testn=function(i){n(typeof i=="number"&&i>=0);var f=i%26,u=(i-f)/26,c=1<=0);var f=i%26,u=(i-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=u)return this;if(f!==0&&u++,this.length=Math.min(u,this.length),f!==0){var c=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},a.prototype.isubn=function(i){if(n(typeof i=="number"),n(i<67108864),i<0)return this.iaddn(-i);if(this.negative!==0)return this.negative=0,this.iaddn(i),this.negative=1,this;if(this.words[0]-=i,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(l/67108864|0),this.words[p+u]=b&67108863}for(;p>26,this.words[p+u]=b&67108863;if(g===0)return this.strip();for(n(g===-1),g=0,p=0;p>26,this.words[p]=b&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(i,f){var u=this.length-i.length,c=this.clone(),p=i,b=p.words[p.length-1]|0,g=this._countBits(b);u=26-g,u!==0&&(p=p.ushln(u),c.iushln(u),b=p.words[p.length-1]|0);var l=c.length-p.length,s;if(f!=="mod"){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var v=0;v=0;C--){var B=(c.words[p.length+C]|0)*67108864+(c.words[p.length+C-1]|0);for(B=Math.min(B/b|0,67108863),c._ishlnsubmul(p,B,C);c.negative!==0;)B--,c.negative=0,c._ishlnsubmul(p,1,C),c.isZero()||(c.negative^=1);s&&(s.words[C]=B)}return s&&s.strip(),c.strip(),f!=="div"&&u!==0&&c.iushrn(u),{div:s||null,mod:c}},a.prototype.divmod=function(i,f,u){if(n(!i.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var c,p,b;return this.negative!==0&&i.negative===0?(b=this.neg().divmod(i,f),f!=="mod"&&(c=b.div.neg()),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.iadd(i)),{div:c,mod:p}):this.negative===0&&i.negative!==0?(b=this.divmod(i.neg(),f),f!=="mod"&&(c=b.div.neg()),{div:c,mod:b.mod}):(this.negative&i.negative)!==0?(b=this.neg().divmod(i.neg(),f),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.isub(i)),{div:b.div,mod:p}):i.length>this.length||this.cmp(i)<0?{div:new a(0),mod:this}:i.length===1?f==="div"?{div:this.divn(i.words[0]),mod:null}:f==="mod"?{div:null,mod:new a(this.modn(i.words[0]))}:{div:this.divn(i.words[0]),mod:new a(this.modn(i.words[0]))}:this._wordDiv(i,f)},a.prototype.div=function(i){return this.divmod(i,"div",!1).div},a.prototype.mod=function(i){return this.divmod(i,"mod",!1).mod},a.prototype.umod=function(i){return this.divmod(i,"mod",!0).mod},a.prototype.divRound=function(i){var f=this.divmod(i);if(f.mod.isZero())return f.div;var u=f.div.negative!==0?f.mod.isub(i):f.mod,c=i.ushrn(1),p=i.andln(1),b=u.cmp(c);return b<0||p===1&&b===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},a.prototype.modn=function(i){n(i<=67108863);for(var f=(1<<26)%i,u=0,c=this.length-1;c>=0;c--)u=(f*u+(this.words[c]|0))%i;return u},a.prototype.idivn=function(i){n(i<=67108863);for(var f=0,u=this.length-1;u>=0;u--){var c=(this.words[u]|0)+f*67108864;this.words[u]=c/i|0,f=c%i}return this.strip()},a.prototype.divn=function(i){return this.clone().idivn(i)},a.prototype.egcd=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=new a(0),g=new a(1),l=0;f.isEven()&&u.isEven();)f.iushrn(1),u.iushrn(1),++l;for(var s=u.clone(),v=f.clone();!f.isZero();){for(var x=0,C=1;(f.words[0]&C)===0&&x<26;++x,C<<=1);if(x>0)for(f.iushrn(x);x-- >0;)(c.isOdd()||p.isOdd())&&(c.iadd(s),p.isub(v)),c.iushrn(1),p.iushrn(1);for(var B=0,k=1;(u.words[0]&k)===0&&B<26;++B,k<<=1);if(B>0)for(u.iushrn(B);B-- >0;)(b.isOdd()||g.isOdd())&&(b.iadd(s),g.isub(v)),b.iushrn(1),g.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(b),p.isub(g)):(u.isub(f),b.isub(c),g.isub(p))}return{a:b,b:g,gcd:u.iushln(l)}},a.prototype._invmp=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=u.clone();f.cmpn(1)>0&&u.cmpn(1)>0;){for(var g=0,l=1;(f.words[0]&l)===0&&g<26;++g,l<<=1);if(g>0)for(f.iushrn(g);g-- >0;)c.isOdd()&&c.iadd(b),c.iushrn(1);for(var s=0,v=1;(u.words[0]&v)===0&&s<26;++s,v<<=1);if(s>0)for(u.iushrn(s);s-- >0;)p.isOdd()&&p.iadd(b),p.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(p)):(u.isub(f),p.isub(c))}var x;return f.cmpn(1)===0?x=c:x=p,x.cmpn(0)<0&&x.iadd(i),x},a.prototype.gcd=function(i){if(this.isZero())return i.abs();if(i.isZero())return this.abs();var f=this.clone(),u=i.clone();f.negative=0,u.negative=0;for(var c=0;f.isEven()&&u.isEven();c++)f.iushrn(1),u.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;u.isEven();)u.iushrn(1);var p=f.cmp(u);if(p<0){var b=f;f=u,u=b}else if(p===0||u.cmpn(1)===0)break;f.isub(u)}while(!0);return u.iushln(c)},a.prototype.invm=function(i){return this.egcd(i).a.umod(i)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(i){return this.words[0]&i},a.prototype.bincn=function(i){n(typeof i=="number");var f=i%26,u=(i-f)/26,c=1<>>26,g&=67108863,this.words[b]=g}return p!==0&&(this.words[b]=p,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(i){var f=i<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var u;if(this.length>1)u=1;else{f&&(i=-i),n(i<=67108863,"Number is too big");var c=this.words[0]|0;u=c===i?0:ci.length)return 1;if(this.length=0;u--){var c=this.words[u]|0,p=i.words[u]|0;if(c!==p){cp&&(f=1);break}}return f},a.prototype.gtn=function(i){return this.cmpn(i)===1},a.prototype.gt=function(i){return this.cmp(i)===1},a.prototype.gten=function(i){return this.cmpn(i)>=0},a.prototype.gte=function(i){return this.cmp(i)>=0},a.prototype.ltn=function(i){return this.cmpn(i)===-1},a.prototype.lt=function(i){return this.cmp(i)===-1},a.prototype.lten=function(i){return this.cmpn(i)<=0},a.prototype.lte=function(i){return this.cmp(i)<=0},a.prototype.eqn=function(i){return this.cmpn(i)===0},a.prototype.eq=function(i){return this.cmp(i)===0},a.red=function(i){return new W(i)},a.prototype.toRed=function(i){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),i.convertTo(this)._forceRed(i)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(i){return this.red=i,this},a.prototype.forceRed=function(i){return n(!this.red,"Already a number in reduction context"),this._forceRed(i)},a.prototype.redAdd=function(i){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,i)},a.prototype.redIAdd=function(i){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,i)},a.prototype.redSub=function(i){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,i)},a.prototype.redISub=function(i){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,i)},a.prototype.redShl=function(i){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,i)},a.prototype.redMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.mul(this,i)},a.prototype.redIMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.imul(this,i)},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(i){return n(this.red&&!i.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,i)};var L={k256:null,p224:null,p192:null,p25519:null};function N(h,i){this.name=h,this.p=new a(i,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var i=new a(null);return i.words=new Array(Math.ceil(this.n/13)),i},N.prototype.ireduce=function(i){var f=i,u;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),u=f.bitLength();while(u>this.n);var c=u0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},N.prototype.split=function(i,f){i.iushrn(this.n,0,f)},N.prototype.imulK=function(i){return i.imul(this.k)};function q(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(q,N),q.prototype.split=function(i,f){for(var u=4194303,c=Math.min(i.length,9),p=0;p>>22,b=g}b>>>=22,i.words[p-10]=b,b===0&&i.length>10?i.length-=10:i.length-=9},q.prototype.imulK=function(i){i.words[i.length]=0,i.words[i.length+1]=0,i.length+=2;for(var f=0,u=0;u>>=26,i.words[u]=p,f=c}return f!==0&&(i.words[i.length++]=f),i},a._prime=function(i){if(L[i])return L[i];var f;if(i==="k256")f=new q;else if(i==="p224")f=new X;else if(i==="p192")f=new J;else if(i==="p25519")f=new Z;else throw new Error("Unknown prime "+i);return L[i]=f,f};function W(h){if(typeof h=="string"){var i=a._prime(h);this.m=i.p,this.prime=i}else n(h.gtn(1),"modulus must be greater than 1"),this.m=h,this.prime=null}W.prototype._verify1=function(i){n(i.negative===0,"red works only with positives"),n(i.red,"red works only with red numbers")},W.prototype._verify2=function(i,f){n((i.negative|f.negative)===0,"red works only with positives"),n(i.red&&i.red===f.red,"red works only with red numbers")},W.prototype.imod=function(i){return this.prime?this.prime.ireduce(i)._forceRed(this):i.umod(this.m)._forceRed(this)},W.prototype.neg=function(i){return i.isZero()?i.clone():this.m.sub(i)._forceRed(this)},W.prototype.add=function(i,f){this._verify2(i,f);var u=i.add(f);return u.cmp(this.m)>=0&&u.isub(this.m),u._forceRed(this)},W.prototype.iadd=function(i,f){this._verify2(i,f);var u=i.iadd(f);return u.cmp(this.m)>=0&&u.isub(this.m),u},W.prototype.sub=function(i,f){this._verify2(i,f);var u=i.sub(f);return u.cmpn(0)<0&&u.iadd(this.m),u._forceRed(this)},W.prototype.isub=function(i,f){this._verify2(i,f);var u=i.isub(f);return u.cmpn(0)<0&&u.iadd(this.m),u},W.prototype.shl=function(i,f){return this._verify1(i),this.imod(i.ushln(f))},W.prototype.imul=function(i,f){return this._verify2(i,f),this.imod(i.imul(f))},W.prototype.mul=function(i,f){return this._verify2(i,f),this.imod(i.mul(f))},W.prototype.isqr=function(i){return this.imul(i,i.clone())},W.prototype.sqr=function(i){return this.mul(i,i)},W.prototype.sqrt=function(i){if(i.isZero())return i.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var u=this.m.add(new a(1)).iushrn(2);return this.pow(i,u)}for(var c=this.m.subn(1),p=0;!c.isZero()&&c.andln(1)===0;)p++,c.iushrn(1);n(!c.isZero());var b=new a(1).toRed(this),g=b.redNeg(),l=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new a(2*s*s).toRed(this);this.pow(s,l).cmp(g)!==0;)s.redIAdd(g);for(var v=this.pow(s,c),x=this.pow(i,c.addn(1).iushrn(1)),C=this.pow(i,c),B=p;C.cmp(b)!==0;){for(var k=C,R=0;k.cmp(b)!==0;R++)k=k.redSqr();n(R=0;p--){for(var v=f.words[p],x=s-1;x>=0;x--){var C=v>>x&1;if(b!==c[0]&&(b=this.sqr(b)),C===0&&g===0){l=0;continue}g<<=1,g|=C,l++,!(l!==u&&(p!==0||x!==0))&&(b=this.mul(b,c[g]),l=0,g=0)}s=26}return b},W.prototype.convertTo=function(i){var f=i.umod(this.m);return f===i?f.clone():f},W.prototype.convertFrom=function(i){var f=i.clone();return f.red=null,f},a.mont=function(i){return new $(i)};function $(h){W.call(this,h),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)}o($,W),$.prototype.convertTo=function(i){return this.imod(i.ushln(this.shift))},$.prototype.convertFrom=function(i){var f=this.imod(i.mul(this.rinv));return f.red=null,f},$.prototype.imul=function(i,f){if(i.isZero()||f.isZero())return i.words[0]=0,i.length=1,i;var u=i.imul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.mul=function(i,f){if(i.isZero()||f.isZero())return new a(0)._forceRed(this);var u=i.mul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.invm=function(i){var f=this.imod(i._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(e,Qe)}(ev)),ev.exports}var tv,m5;function rG(){if(m5)return tv;m5=1;var e=xd(),t=tG();tv=function(d){return new n(d)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1;function n(a){this.curveType=r[a],this.curveType||(this.curveType={name:a}),this.curve=new e.ec(this.curveType.name),this.keys=void 0}n.prototype.generateKeys=function(a,d){return this.keys=this.curve.genKeyPair(),this.getPublicKey(a,d)},n.prototype.computeSecret=function(a,d,m){d=d||"utf8",ce.isBuffer(a)||(a=new ce(a,d));var y=this.curve.keyFromPublic(a).getPublic(),w=y.mul(this.keys.getPrivate()).getX();return o(w,m,this.curveType.byteLength)},n.prototype.getPublicKey=function(a,d){var m=this.keys.getPublic(d==="compressed",!0);return d==="hybrid"&&(m[m.length-1]%2?m[0]=7:m[0]=6),o(m,a)},n.prototype.getPrivateKey=function(a){return o(this.keys.getPrivate(),a)},n.prototype.setPublicKey=function(a,d){return d=d||"utf8",ce.isBuffer(a)||(a=new ce(a,d)),this.keys._importPublic(a),this},n.prototype.setPrivateKey=function(a,d){d=d||"utf8",ce.isBuffer(a)||(a=new ce(a,d));var m=new t(a);return m=m.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(m),this};function o(a,d,m){Array.isArray(a)||(a=a.toArray());var y=new ce(a);if(m&&y.length0?i:f},a.min=function(i,f){return i.cmp(f)<0?i:f},a.prototype._init=function(i,f,u){if(typeof i=="number")return this._initNumber(i,f,u);if(typeof i=="object")return this._initArray(i,f,u);f==="hex"&&(f=16),n(f===(f|0)&&f>=2&&f<=36),i=i.toString().replace(/\s+/g,"");var c=0;i[0]==="-"&&(c++,this.negative=1),c=0;c-=3)b=i[c]|i[c-1]<<8|i[c-2]<<16,this.words[p]|=b<>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);else if(u==="le")for(c=0,p=0;c>>26-g&67108863,g+=24,g>=26&&(g-=26,p++);return this.strip()};function m(h,i){var f=h.charCodeAt(i);return f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:f-48&15}function y(h,i,f){var u=m(h,f);return f-1>=i&&(u|=m(h,f-1)<<4),u}a.prototype._parseHex=function(i,f,u){this.length=Math.ceil((i.length-f)/6),this.words=new Array(this.length);for(var c=0;c=f;c-=2)g=y(i,f,c)<=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8;else{var l=i.length-f;for(c=l%2===0?f+1:f;c=18?(p-=18,b+=1,this.words[b]|=g>>>26):p+=8}this.strip()};function w(h,i,f,u){for(var c=0,p=Math.min(h.length,f),b=i;b=49?c+=g-49+10:g>=17?c+=g-17+10:c+=g}return c}a.prototype._parseBase=function(i,f,u){this.words=[0],this.length=1;for(var c=0,p=1;p<=67108863;p*=f)c++;c--,p=p/f|0;for(var b=i.length-u,g=b%c,l=Math.min(b,b-g)+u,s=0,v=u;v1&&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},a.prototype.inspect=function(){return(this.red?""};var M=["","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"],_=[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],E=[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(i,f){i=i||10,f=f|0||1;var u;if(i===16||i==="hex"){u="";for(var c=0,p=0,b=0;b>>24-c&16777215,p!==0||b!==this.length-1?u=M[6-l.length]+l+u:u=l+u,c+=2,c>=26&&(c-=26,b--)}for(p!==0&&(u=p.toString(16)+u);u.length%f!==0;)u="0"+u;return this.negative!==0&&(u="-"+u),u}if(i===(i|0)&&i>=2&&i<=36){var s=_[i],v=E[i];u="";var x=this.clone();for(x.negative=0;!x.isZero();){var C=x.modn(v).toString(i);x=x.idivn(v),x.isZero()?u=C+u:u=M[s-C.length]+C+u}for(this.isZero()&&(u="0"+u);u.length%f!==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 i=this.words[0];return this.length===2?i+=this.words[1]*67108864:this.length===3&&this.words[2]===1?i+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-i:i},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(i,f){return n(typeof d<"u"),this.toArrayLike(d,i,f)},a.prototype.toArray=function(i,f){return this.toArrayLike(Array,i,f)},a.prototype.toArrayLike=function(i,f,u){var c=this.byteLength(),p=u||Math.max(1,c);n(c<=p,"byte array longer than desired length"),n(p>0,"Requested array length <= 0"),this.strip();var b=f==="le",g=new i(p),l,s,v=this.clone();if(b){for(s=0;!v.isZero();s++)l=v.andln(255),v.iushrn(8),g[s]=l;for(;s=4096&&(u+=13,f>>>=13),f>=64&&(u+=7,f>>>=7),f>=8&&(u+=4,f>>>=4),f>=2&&(u+=2,f>>>=2),u+f},a.prototype._zeroBits=function(i){if(i===0)return 26;var f=i,u=0;return(f&8191)===0&&(u+=13,f>>>=13),(f&127)===0&&(u+=7,f>>>=7),(f&15)===0&&(u+=4,f>>>=4),(f&3)===0&&(u+=2,f>>>=2),(f&1)===0&&u++,u},a.prototype.bitLength=function(){var i=this.words[this.length-1],f=this._countBits(i);return(this.length-1)*26+f};function S(h){for(var i=new Array(h.bitLength()),f=0;f>>c}return i}a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var i=0,f=0;fi.length?this.clone().ior(i):i.clone().ior(this)},a.prototype.uor=function(i){return this.length>i.length?this.clone().iuor(i):i.clone().iuor(this)},a.prototype.iuand=function(i){var f;this.length>i.length?f=i:f=this;for(var u=0;ui.length?this.clone().iand(i):i.clone().iand(this)},a.prototype.uand=function(i){return this.length>i.length?this.clone().iuand(i):i.clone().iuand(this)},a.prototype.iuxor=function(i){var f,u;this.length>i.length?(f=this,u=i):(f=i,u=this);for(var c=0;ci.length?this.clone().ixor(i):i.clone().ixor(this)},a.prototype.uxor=function(i){return this.length>i.length?this.clone().iuxor(i):i.clone().iuxor(this)},a.prototype.inotn=function(i){n(typeof i=="number"&&i>=0);var f=Math.ceil(i/26)|0,u=i%26;this._expand(f),u>0&&f--;for(var c=0;c0&&(this.words[c]=~this.words[c]&67108863>>26-u),this.strip()},a.prototype.notn=function(i){return this.clone().inotn(i)},a.prototype.setn=function(i,f){n(typeof i=="number"&&i>=0);var u=i/26|0,c=i%26;return this._expand(u+1),f?this.words[u]=this.words[u]|1<i.length?(u=this,c=i):(u=i,c=this);for(var p=0,b=0;b>>26;for(;p!==0&&b>>26;if(this.length=u.length,p!==0)this.words[this.length]=p,this.length++;else if(u!==this)for(;bi.length?this.clone().iadd(i):i.clone().iadd(this)},a.prototype.isub=function(i){if(i.negative!==0){i.negative=0;var f=this.iadd(i);return i.negative=1,f._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(i),this.negative=1,this._normSign();var u=this.cmp(i);if(u===0)return this.negative=0,this.length=1,this.words[0]=0,this;var c,p;u>0?(c=this,p=i):(c=i,p=this);for(var b=0,g=0;g>26,this.words[g]=f&67108863;for(;b!==0&&g>26,this.words[g]=f&67108863;if(b===0&&g>>26,x=l&67108863,C=Math.min(s,i.length-1),B=Math.max(0,s-h.length+1);B<=C;B++){var k=s-B|0;c=h.words[k]|0,p=i.words[B]|0,b=c*p+x,v+=b/67108864|0,x=b&67108863}f.words[s]=x|0,l=v|0}return l!==0?f.words[s]=l|0:f.length--,f.strip()}var T=function(i,f,u){var c=i.words,p=f.words,b=u.words,g=0,l,s,v,x=c[0]|0,C=x&8191,B=x>>>13,k=c[1]|0,R=k&8191,D=k>>>13,z=c[2]|0,H=z&8191,V=z>>>13,U=c[3]|0,F=U&8191,G=U>>>13,ie=c[4]|0,Y=ie&8191,oe=ie>>>13,xe=c[5]|0,ne=xe&8191,Q=xe>>>13,te=c[6]|0,ee=te&8191,se=te>>>13,_e=c[7]|0,K=_e&8191,re=_e>>>13,Te=c[8]|0,ae=Te&8191,Me=Te>>>13,ze=c[9]|0,fe=ze&8191,Se=ze>>>13,He=p[0]|0,ue=He&8191,Ae=He>>>13,Ue=p[1]|0,he=Ue&8191,Ce=Ue>>>13,je=p[2]|0,de=je&8191,Oe=je>>>13,Ve=p[3]|0,pe=Ve&8191,Pe=Ve>>>13,Ke=p[4]|0,ve=Ke&8191,Be=Ke>>>13,Ge=p[5]|0,me=Ge&8191,Ie=Ge>>>13,We=p[6]|0,ge=We&8191,$e=We>>>13,Ze=p[7]|0,ye=Ze&8191,Le=Ze>>>13,Ye=p[8]|0,be=Ye&8191,De=Ye>>>13,Xe=p[9]|0,we=Xe&8191,Re=Xe>>>13;u.negative=i.negative^f.negative,u.length=19,l=Math.imul(C,ue),s=Math.imul(C,Ae),s=s+Math.imul(B,ue)|0,v=Math.imul(B,Ae);var tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(tt>>>26)|0,tt&=67108863,l=Math.imul(R,ue),s=Math.imul(R,Ae),s=s+Math.imul(D,ue)|0,v=Math.imul(D,Ae),l=l+Math.imul(C,he)|0,s=s+Math.imul(C,Ce)|0,s=s+Math.imul(B,he)|0,v=v+Math.imul(B,Ce)|0;var rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(rt>>>26)|0,rt&=67108863,l=Math.imul(H,ue),s=Math.imul(H,Ae),s=s+Math.imul(V,ue)|0,v=Math.imul(V,Ae),l=l+Math.imul(R,he)|0,s=s+Math.imul(R,Ce)|0,s=s+Math.imul(D,he)|0,v=v+Math.imul(D,Ce)|0,l=l+Math.imul(C,de)|0,s=s+Math.imul(C,Oe)|0,s=s+Math.imul(B,de)|0,v=v+Math.imul(B,Oe)|0;var ut=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ut>>>26)|0,ut&=67108863,l=Math.imul(F,ue),s=Math.imul(F,Ae),s=s+Math.imul(G,ue)|0,v=Math.imul(G,Ae),l=l+Math.imul(H,he)|0,s=s+Math.imul(H,Ce)|0,s=s+Math.imul(V,he)|0,v=v+Math.imul(V,Ce)|0,l=l+Math.imul(R,de)|0,s=s+Math.imul(R,Oe)|0,s=s+Math.imul(D,de)|0,v=v+Math.imul(D,Oe)|0,l=l+Math.imul(C,pe)|0,s=s+Math.imul(C,Pe)|0,s=s+Math.imul(B,pe)|0,v=v+Math.imul(B,Pe)|0;var lt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(lt>>>26)|0,lt&=67108863,l=Math.imul(Y,ue),s=Math.imul(Y,Ae),s=s+Math.imul(oe,ue)|0,v=Math.imul(oe,Ae),l=l+Math.imul(F,he)|0,s=s+Math.imul(F,Ce)|0,s=s+Math.imul(G,he)|0,v=v+Math.imul(G,Ce)|0,l=l+Math.imul(H,de)|0,s=s+Math.imul(H,Oe)|0,s=s+Math.imul(V,de)|0,v=v+Math.imul(V,Oe)|0,l=l+Math.imul(R,pe)|0,s=s+Math.imul(R,Pe)|0,s=s+Math.imul(D,pe)|0,v=v+Math.imul(D,Pe)|0,l=l+Math.imul(C,ve)|0,s=s+Math.imul(C,Be)|0,s=s+Math.imul(B,ve)|0,v=v+Math.imul(B,Be)|0;var ht=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ht>>>26)|0,ht&=67108863,l=Math.imul(ne,ue),s=Math.imul(ne,Ae),s=s+Math.imul(Q,ue)|0,v=Math.imul(Q,Ae),l=l+Math.imul(Y,he)|0,s=s+Math.imul(Y,Ce)|0,s=s+Math.imul(oe,he)|0,v=v+Math.imul(oe,Ce)|0,l=l+Math.imul(F,de)|0,s=s+Math.imul(F,Oe)|0,s=s+Math.imul(G,de)|0,v=v+Math.imul(G,Oe)|0,l=l+Math.imul(H,pe)|0,s=s+Math.imul(H,Pe)|0,s=s+Math.imul(V,pe)|0,v=v+Math.imul(V,Pe)|0,l=l+Math.imul(R,ve)|0,s=s+Math.imul(R,Be)|0,s=s+Math.imul(D,ve)|0,v=v+Math.imul(D,Be)|0,l=l+Math.imul(C,me)|0,s=s+Math.imul(C,Ie)|0,s=s+Math.imul(B,me)|0,v=v+Math.imul(B,Ie)|0;var ct=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(ct>>>26)|0,ct&=67108863,l=Math.imul(ee,ue),s=Math.imul(ee,Ae),s=s+Math.imul(se,ue)|0,v=Math.imul(se,Ae),l=l+Math.imul(ne,he)|0,s=s+Math.imul(ne,Ce)|0,s=s+Math.imul(Q,he)|0,v=v+Math.imul(Q,Ce)|0,l=l+Math.imul(Y,de)|0,s=s+Math.imul(Y,Oe)|0,s=s+Math.imul(oe,de)|0,v=v+Math.imul(oe,Oe)|0,l=l+Math.imul(F,pe)|0,s=s+Math.imul(F,Pe)|0,s=s+Math.imul(G,pe)|0,v=v+Math.imul(G,Pe)|0,l=l+Math.imul(H,ve)|0,s=s+Math.imul(H,Be)|0,s=s+Math.imul(V,ve)|0,v=v+Math.imul(V,Be)|0,l=l+Math.imul(R,me)|0,s=s+Math.imul(R,Ie)|0,s=s+Math.imul(D,me)|0,v=v+Math.imul(D,Ie)|0,l=l+Math.imul(C,ge)|0,s=s+Math.imul(C,$e)|0,s=s+Math.imul(B,ge)|0,v=v+Math.imul(B,$e)|0;var dt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(dt>>>26)|0,dt&=67108863,l=Math.imul(K,ue),s=Math.imul(K,Ae),s=s+Math.imul(re,ue)|0,v=Math.imul(re,Ae),l=l+Math.imul(ee,he)|0,s=s+Math.imul(ee,Ce)|0,s=s+Math.imul(se,he)|0,v=v+Math.imul(se,Ce)|0,l=l+Math.imul(ne,de)|0,s=s+Math.imul(ne,Oe)|0,s=s+Math.imul(Q,de)|0,v=v+Math.imul(Q,Oe)|0,l=l+Math.imul(Y,pe)|0,s=s+Math.imul(Y,Pe)|0,s=s+Math.imul(oe,pe)|0,v=v+Math.imul(oe,Pe)|0,l=l+Math.imul(F,ve)|0,s=s+Math.imul(F,Be)|0,s=s+Math.imul(G,ve)|0,v=v+Math.imul(G,Be)|0,l=l+Math.imul(H,me)|0,s=s+Math.imul(H,Ie)|0,s=s+Math.imul(V,me)|0,v=v+Math.imul(V,Ie)|0,l=l+Math.imul(R,ge)|0,s=s+Math.imul(R,$e)|0,s=s+Math.imul(D,ge)|0,v=v+Math.imul(D,$e)|0,l=l+Math.imul(C,ye)|0,s=s+Math.imul(C,Le)|0,s=s+Math.imul(B,ye)|0,v=v+Math.imul(B,Le)|0;var yt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(yt>>>26)|0,yt&=67108863,l=Math.imul(ae,ue),s=Math.imul(ae,Ae),s=s+Math.imul(Me,ue)|0,v=Math.imul(Me,Ae),l=l+Math.imul(K,he)|0,s=s+Math.imul(K,Ce)|0,s=s+Math.imul(re,he)|0,v=v+Math.imul(re,Ce)|0,l=l+Math.imul(ee,de)|0,s=s+Math.imul(ee,Oe)|0,s=s+Math.imul(se,de)|0,v=v+Math.imul(se,Oe)|0,l=l+Math.imul(ne,pe)|0,s=s+Math.imul(ne,Pe)|0,s=s+Math.imul(Q,pe)|0,v=v+Math.imul(Q,Pe)|0,l=l+Math.imul(Y,ve)|0,s=s+Math.imul(Y,Be)|0,s=s+Math.imul(oe,ve)|0,v=v+Math.imul(oe,Be)|0,l=l+Math.imul(F,me)|0,s=s+Math.imul(F,Ie)|0,s=s+Math.imul(G,me)|0,v=v+Math.imul(G,Ie)|0,l=l+Math.imul(H,ge)|0,s=s+Math.imul(H,$e)|0,s=s+Math.imul(V,ge)|0,v=v+Math.imul(V,$e)|0,l=l+Math.imul(R,ye)|0,s=s+Math.imul(R,Le)|0,s=s+Math.imul(D,ye)|0,v=v+Math.imul(D,Le)|0,l=l+Math.imul(C,be)|0,s=s+Math.imul(C,De)|0,s=s+Math.imul(B,be)|0,v=v+Math.imul(B,De)|0;var bt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(bt>>>26)|0,bt&=67108863,l=Math.imul(fe,ue),s=Math.imul(fe,Ae),s=s+Math.imul(Se,ue)|0,v=Math.imul(Se,Ae),l=l+Math.imul(ae,he)|0,s=s+Math.imul(ae,Ce)|0,s=s+Math.imul(Me,he)|0,v=v+Math.imul(Me,Ce)|0,l=l+Math.imul(K,de)|0,s=s+Math.imul(K,Oe)|0,s=s+Math.imul(re,de)|0,v=v+Math.imul(re,Oe)|0,l=l+Math.imul(ee,pe)|0,s=s+Math.imul(ee,Pe)|0,s=s+Math.imul(se,pe)|0,v=v+Math.imul(se,Pe)|0,l=l+Math.imul(ne,ve)|0,s=s+Math.imul(ne,Be)|0,s=s+Math.imul(Q,ve)|0,v=v+Math.imul(Q,Be)|0,l=l+Math.imul(Y,me)|0,s=s+Math.imul(Y,Ie)|0,s=s+Math.imul(oe,me)|0,v=v+Math.imul(oe,Ie)|0,l=l+Math.imul(F,ge)|0,s=s+Math.imul(F,$e)|0,s=s+Math.imul(G,ge)|0,v=v+Math.imul(G,$e)|0,l=l+Math.imul(H,ye)|0,s=s+Math.imul(H,Le)|0,s=s+Math.imul(V,ye)|0,v=v+Math.imul(V,Le)|0,l=l+Math.imul(R,be)|0,s=s+Math.imul(R,De)|0,s=s+Math.imul(D,be)|0,v=v+Math.imul(D,De)|0,l=l+Math.imul(C,we)|0,s=s+Math.imul(C,Re)|0,s=s+Math.imul(B,we)|0,v=v+Math.imul(B,Re)|0;var wt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(wt>>>26)|0,wt&=67108863,l=Math.imul(fe,he),s=Math.imul(fe,Ce),s=s+Math.imul(Se,he)|0,v=Math.imul(Se,Ce),l=l+Math.imul(ae,de)|0,s=s+Math.imul(ae,Oe)|0,s=s+Math.imul(Me,de)|0,v=v+Math.imul(Me,Oe)|0,l=l+Math.imul(K,pe)|0,s=s+Math.imul(K,Pe)|0,s=s+Math.imul(re,pe)|0,v=v+Math.imul(re,Pe)|0,l=l+Math.imul(ee,ve)|0,s=s+Math.imul(ee,Be)|0,s=s+Math.imul(se,ve)|0,v=v+Math.imul(se,Be)|0,l=l+Math.imul(ne,me)|0,s=s+Math.imul(ne,Ie)|0,s=s+Math.imul(Q,me)|0,v=v+Math.imul(Q,Ie)|0,l=l+Math.imul(Y,ge)|0,s=s+Math.imul(Y,$e)|0,s=s+Math.imul(oe,ge)|0,v=v+Math.imul(oe,$e)|0,l=l+Math.imul(F,ye)|0,s=s+Math.imul(F,Le)|0,s=s+Math.imul(G,ye)|0,v=v+Math.imul(G,Le)|0,l=l+Math.imul(H,be)|0,s=s+Math.imul(H,De)|0,s=s+Math.imul(V,be)|0,v=v+Math.imul(V,De)|0,l=l+Math.imul(R,we)|0,s=s+Math.imul(R,Re)|0,s=s+Math.imul(D,we)|0,v=v+Math.imul(D,Re)|0;var Mt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,l=Math.imul(fe,de),s=Math.imul(fe,Oe),s=s+Math.imul(Se,de)|0,v=Math.imul(Se,Oe),l=l+Math.imul(ae,pe)|0,s=s+Math.imul(ae,Pe)|0,s=s+Math.imul(Me,pe)|0,v=v+Math.imul(Me,Pe)|0,l=l+Math.imul(K,ve)|0,s=s+Math.imul(K,Be)|0,s=s+Math.imul(re,ve)|0,v=v+Math.imul(re,Be)|0,l=l+Math.imul(ee,me)|0,s=s+Math.imul(ee,Ie)|0,s=s+Math.imul(se,me)|0,v=v+Math.imul(se,Ie)|0,l=l+Math.imul(ne,ge)|0,s=s+Math.imul(ne,$e)|0,s=s+Math.imul(Q,ge)|0,v=v+Math.imul(Q,$e)|0,l=l+Math.imul(Y,ye)|0,s=s+Math.imul(Y,Le)|0,s=s+Math.imul(oe,ye)|0,v=v+Math.imul(oe,Le)|0,l=l+Math.imul(F,be)|0,s=s+Math.imul(F,De)|0,s=s+Math.imul(G,be)|0,v=v+Math.imul(G,De)|0,l=l+Math.imul(H,we)|0,s=s+Math.imul(H,Re)|0,s=s+Math.imul(V,we)|0,v=v+Math.imul(V,Re)|0;var xt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(xt>>>26)|0,xt&=67108863,l=Math.imul(fe,pe),s=Math.imul(fe,Pe),s=s+Math.imul(Se,pe)|0,v=Math.imul(Se,Pe),l=l+Math.imul(ae,ve)|0,s=s+Math.imul(ae,Be)|0,s=s+Math.imul(Me,ve)|0,v=v+Math.imul(Me,Be)|0,l=l+Math.imul(K,me)|0,s=s+Math.imul(K,Ie)|0,s=s+Math.imul(re,me)|0,v=v+Math.imul(re,Ie)|0,l=l+Math.imul(ee,ge)|0,s=s+Math.imul(ee,$e)|0,s=s+Math.imul(se,ge)|0,v=v+Math.imul(se,$e)|0,l=l+Math.imul(ne,ye)|0,s=s+Math.imul(ne,Le)|0,s=s+Math.imul(Q,ye)|0,v=v+Math.imul(Q,Le)|0,l=l+Math.imul(Y,be)|0,s=s+Math.imul(Y,De)|0,s=s+Math.imul(oe,be)|0,v=v+Math.imul(oe,De)|0,l=l+Math.imul(F,we)|0,s=s+Math.imul(F,Re)|0,s=s+Math.imul(G,we)|0,v=v+Math.imul(G,Re)|0;var _t=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(_t>>>26)|0,_t&=67108863,l=Math.imul(fe,ve),s=Math.imul(fe,Be),s=s+Math.imul(Se,ve)|0,v=Math.imul(Se,Be),l=l+Math.imul(ae,me)|0,s=s+Math.imul(ae,Ie)|0,s=s+Math.imul(Me,me)|0,v=v+Math.imul(Me,Ie)|0,l=l+Math.imul(K,ge)|0,s=s+Math.imul(K,$e)|0,s=s+Math.imul(re,ge)|0,v=v+Math.imul(re,$e)|0,l=l+Math.imul(ee,ye)|0,s=s+Math.imul(ee,Le)|0,s=s+Math.imul(se,ye)|0,v=v+Math.imul(se,Le)|0,l=l+Math.imul(ne,be)|0,s=s+Math.imul(ne,De)|0,s=s+Math.imul(Q,be)|0,v=v+Math.imul(Q,De)|0,l=l+Math.imul(Y,we)|0,s=s+Math.imul(Y,Re)|0,s=s+Math.imul(oe,we)|0,v=v+Math.imul(oe,Re)|0;var Et=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Et>>>26)|0,Et&=67108863,l=Math.imul(fe,me),s=Math.imul(fe,Ie),s=s+Math.imul(Se,me)|0,v=Math.imul(Se,Ie),l=l+Math.imul(ae,ge)|0,s=s+Math.imul(ae,$e)|0,s=s+Math.imul(Me,ge)|0,v=v+Math.imul(Me,$e)|0,l=l+Math.imul(K,ye)|0,s=s+Math.imul(K,Le)|0,s=s+Math.imul(re,ye)|0,v=v+Math.imul(re,Le)|0,l=l+Math.imul(ee,be)|0,s=s+Math.imul(ee,De)|0,s=s+Math.imul(se,be)|0,v=v+Math.imul(se,De)|0,l=l+Math.imul(ne,we)|0,s=s+Math.imul(ne,Re)|0,s=s+Math.imul(Q,we)|0,v=v+Math.imul(Q,Re)|0;var St=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(St>>>26)|0,St&=67108863,l=Math.imul(fe,ge),s=Math.imul(fe,$e),s=s+Math.imul(Se,ge)|0,v=Math.imul(Se,$e),l=l+Math.imul(ae,ye)|0,s=s+Math.imul(ae,Le)|0,s=s+Math.imul(Me,ye)|0,v=v+Math.imul(Me,Le)|0,l=l+Math.imul(K,be)|0,s=s+Math.imul(K,De)|0,s=s+Math.imul(re,be)|0,v=v+Math.imul(re,De)|0,l=l+Math.imul(ee,we)|0,s=s+Math.imul(ee,Re)|0,s=s+Math.imul(se,we)|0,v=v+Math.imul(se,Re)|0;var At=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(At>>>26)|0,At&=67108863,l=Math.imul(fe,ye),s=Math.imul(fe,Le),s=s+Math.imul(Se,ye)|0,v=Math.imul(Se,Le),l=l+Math.imul(ae,be)|0,s=s+Math.imul(ae,De)|0,s=s+Math.imul(Me,be)|0,v=v+Math.imul(Me,De)|0,l=l+Math.imul(K,we)|0,s=s+Math.imul(K,Re)|0,s=s+Math.imul(re,we)|0,v=v+Math.imul(re,Re)|0;var Tt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,l=Math.imul(fe,be),s=Math.imul(fe,De),s=s+Math.imul(Se,be)|0,v=Math.imul(Se,De),l=l+Math.imul(ae,we)|0,s=s+Math.imul(ae,Re)|0,s=s+Math.imul(Me,we)|0,v=v+Math.imul(Me,Re)|0;var Rt=(g+l|0)+((s&8191)<<13)|0;g=(v+(s>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,l=Math.imul(fe,we),s=Math.imul(fe,Re),s=s+Math.imul(Se,we)|0,v=Math.imul(Se,Re);var qt=(g+l|0)+((s&8191)<<13)|0;return g=(v+(s>>>13)|0)+(qt>>>26)|0,qt&=67108863,b[0]=tt,b[1]=rt,b[2]=ut,b[3]=lt,b[4]=ht,b[5]=ct,b[6]=dt,b[7]=yt,b[8]=bt,b[9]=wt,b[10]=Mt,b[11]=xt,b[12]=_t,b[13]=Et,b[14]=St,b[15]=At,b[16]=Tt,b[17]=Rt,b[18]=qt,g!==0&&(b[19]=g,u.length++),u};Math.imul||(T=A);function I(h,i,f){f.negative=i.negative^h.negative,f.length=h.length+i.length;for(var u=0,c=0,p=0;p>>26)|0,c+=b>>>26,b&=67108863}f.words[p]=g,u=b,b=c}return u!==0?f.words[p]=u:f.length--,f.strip()}function O(h,i,f){var u=new P;return u.mulp(h,i,f)}a.prototype.mulTo=function(i,f){var u,c=this.length+i.length;return this.length===10&&i.length===10?u=T(this,i,f):c<63?u=A(this,i,f):c<1024?u=I(this,i,f):u=O(this,i,f),u};function P(h,i){this.x=h,this.y=i}P.prototype.makeRBT=function(i){for(var f=new Array(i),u=a.prototype._countBits(i)-1,c=0;c>=1;return c},P.prototype.permute=function(i,f,u,c,p,b){for(var g=0;g>>1)p++;return 1<>>13,u[2*b+1]=p&8191,p=p>>>13;for(b=2*f;b>=26,f+=c/67108864|0,f+=p>>>26,this.words[u]=p&67108863}return f!==0&&(this.words[u]=f,this.length++),this},a.prototype.muln=function(i){return this.clone().imuln(i)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(i){var f=S(i);if(f.length===0)return new a(1);for(var u=this,c=0;c=0);var f=i%26,u=(i-f)/26,c=67108863>>>26-f<<26-f,p;if(f!==0){var b=0;for(p=0;p>>26-f}b&&(this.words[p]=b,this.length++)}if(u!==0){for(p=this.length-1;p>=0;p--)this.words[p+u]=this.words[p];for(p=0;p=0);var c;f?c=(f-f%26)/26:c=0;var p=i%26,b=Math.min((i-p)/26,this.length),g=67108863^67108863>>>p<b)for(this.length-=b,s=0;s=0&&(v!==0||s>=c);s--){var x=this.words[s]|0;this.words[s]=v<<26-p|x>>>p,v=x&g}return l&&v!==0&&(l.words[l.length++]=v),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(i,f,u){return n(this.negative===0),this.iushrn(i,f,u)},a.prototype.shln=function(i){return this.clone().ishln(i)},a.prototype.ushln=function(i){return this.clone().iushln(i)},a.prototype.shrn=function(i){return this.clone().ishrn(i)},a.prototype.ushrn=function(i){return this.clone().iushrn(i)},a.prototype.testn=function(i){n(typeof i=="number"&&i>=0);var f=i%26,u=(i-f)/26,c=1<=0);var f=i%26,u=(i-f)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=u)return this;if(f!==0&&u++,this.length=Math.min(u,this.length),f!==0){var c=67108863^67108863>>>f<=67108864;f++)this.words[f]-=67108864,f===this.length-1?this.words[f+1]=1:this.words[f+1]++;return this.length=Math.max(this.length,f+1),this},a.prototype.isubn=function(i){if(n(typeof i=="number"),n(i<67108864),i<0)return this.iaddn(-i);if(this.negative!==0)return this.negative=0,this.iaddn(i),this.negative=1,this;if(this.words[0]-=i,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var f=0;f>26)-(l/67108864|0),this.words[p+u]=b&67108863}for(;p>26,this.words[p+u]=b&67108863;if(g===0)return this.strip();for(n(g===-1),g=0,p=0;p>26,this.words[p]=b&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(i,f){var u=this.length-i.length,c=this.clone(),p=i,b=p.words[p.length-1]|0,g=this._countBits(b);u=26-g,u!==0&&(p=p.ushln(u),c.iushln(u),b=p.words[p.length-1]|0);var l=c.length-p.length,s;if(f!=="mod"){s=new a(null),s.length=l+1,s.words=new Array(s.length);for(var v=0;v=0;C--){var B=(c.words[p.length+C]|0)*67108864+(c.words[p.length+C-1]|0);for(B=Math.min(B/b|0,67108863),c._ishlnsubmul(p,B,C);c.negative!==0;)B--,c.negative=0,c._ishlnsubmul(p,1,C),c.isZero()||(c.negative^=1);s&&(s.words[C]=B)}return s&&s.strip(),c.strip(),f!=="div"&&u!==0&&c.iushrn(u),{div:s||null,mod:c}},a.prototype.divmod=function(i,f,u){if(n(!i.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var c,p,b;return this.negative!==0&&i.negative===0?(b=this.neg().divmod(i,f),f!=="mod"&&(c=b.div.neg()),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.iadd(i)),{div:c,mod:p}):this.negative===0&&i.negative!==0?(b=this.divmod(i.neg(),f),f!=="mod"&&(c=b.div.neg()),{div:c,mod:b.mod}):(this.negative&i.negative)!==0?(b=this.neg().divmod(i.neg(),f),f!=="div"&&(p=b.mod.neg(),u&&p.negative!==0&&p.isub(i)),{div:b.div,mod:p}):i.length>this.length||this.cmp(i)<0?{div:new a(0),mod:this}:i.length===1?f==="div"?{div:this.divn(i.words[0]),mod:null}:f==="mod"?{div:null,mod:new a(this.modn(i.words[0]))}:{div:this.divn(i.words[0]),mod:new a(this.modn(i.words[0]))}:this._wordDiv(i,f)},a.prototype.div=function(i){return this.divmod(i,"div",!1).div},a.prototype.mod=function(i){return this.divmod(i,"mod",!1).mod},a.prototype.umod=function(i){return this.divmod(i,"mod",!0).mod},a.prototype.divRound=function(i){var f=this.divmod(i);if(f.mod.isZero())return f.div;var u=f.div.negative!==0?f.mod.isub(i):f.mod,c=i.ushrn(1),p=i.andln(1),b=u.cmp(c);return b<0||p===1&&b===0?f.div:f.div.negative!==0?f.div.isubn(1):f.div.iaddn(1)},a.prototype.modn=function(i){n(i<=67108863);for(var f=(1<<26)%i,u=0,c=this.length-1;c>=0;c--)u=(f*u+(this.words[c]|0))%i;return u},a.prototype.idivn=function(i){n(i<=67108863);for(var f=0,u=this.length-1;u>=0;u--){var c=(this.words[u]|0)+f*67108864;this.words[u]=c/i|0,f=c%i}return this.strip()},a.prototype.divn=function(i){return this.clone().idivn(i)},a.prototype.egcd=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=new a(0),g=new a(1),l=0;f.isEven()&&u.isEven();)f.iushrn(1),u.iushrn(1),++l;for(var s=u.clone(),v=f.clone();!f.isZero();){for(var x=0,C=1;(f.words[0]&C)===0&&x<26;++x,C<<=1);if(x>0)for(f.iushrn(x);x-- >0;)(c.isOdd()||p.isOdd())&&(c.iadd(s),p.isub(v)),c.iushrn(1),p.iushrn(1);for(var B=0,k=1;(u.words[0]&k)===0&&B<26;++B,k<<=1);if(B>0)for(u.iushrn(B);B-- >0;)(b.isOdd()||g.isOdd())&&(b.iadd(s),g.isub(v)),b.iushrn(1),g.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(b),p.isub(g)):(u.isub(f),b.isub(c),g.isub(p))}return{a:b,b:g,gcd:u.iushln(l)}},a.prototype._invmp=function(i){n(i.negative===0),n(!i.isZero());var f=this,u=i.clone();f.negative!==0?f=f.umod(i):f=f.clone();for(var c=new a(1),p=new a(0),b=u.clone();f.cmpn(1)>0&&u.cmpn(1)>0;){for(var g=0,l=1;(f.words[0]&l)===0&&g<26;++g,l<<=1);if(g>0)for(f.iushrn(g);g-- >0;)c.isOdd()&&c.iadd(b),c.iushrn(1);for(var s=0,v=1;(u.words[0]&v)===0&&s<26;++s,v<<=1);if(s>0)for(u.iushrn(s);s-- >0;)p.isOdd()&&p.iadd(b),p.iushrn(1);f.cmp(u)>=0?(f.isub(u),c.isub(p)):(u.isub(f),p.isub(c))}var x;return f.cmpn(1)===0?x=c:x=p,x.cmpn(0)<0&&x.iadd(i),x},a.prototype.gcd=function(i){if(this.isZero())return i.abs();if(i.isZero())return this.abs();var f=this.clone(),u=i.clone();f.negative=0,u.negative=0;for(var c=0;f.isEven()&&u.isEven();c++)f.iushrn(1),u.iushrn(1);do{for(;f.isEven();)f.iushrn(1);for(;u.isEven();)u.iushrn(1);var p=f.cmp(u);if(p<0){var b=f;f=u,u=b}else if(p===0||u.cmpn(1)===0)break;f.isub(u)}while(!0);return u.iushln(c)},a.prototype.invm=function(i){return this.egcd(i).a.umod(i)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(i){return this.words[0]&i},a.prototype.bincn=function(i){n(typeof i=="number");var f=i%26,u=(i-f)/26,c=1<>>26,g&=67108863,this.words[b]=g}return p!==0&&(this.words[b]=p,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(i){var f=i<0;if(this.negative!==0&&!f)return-1;if(this.negative===0&&f)return 1;this.strip();var u;if(this.length>1)u=1;else{f&&(i=-i),n(i<=67108863,"Number is too big");var c=this.words[0]|0;u=c===i?0:ci.length)return 1;if(this.length=0;u--){var c=this.words[u]|0,p=i.words[u]|0;if(c!==p){cp&&(f=1);break}}return f},a.prototype.gtn=function(i){return this.cmpn(i)===1},a.prototype.gt=function(i){return this.cmp(i)===1},a.prototype.gten=function(i){return this.cmpn(i)>=0},a.prototype.gte=function(i){return this.cmp(i)>=0},a.prototype.ltn=function(i){return this.cmpn(i)===-1},a.prototype.lt=function(i){return this.cmp(i)===-1},a.prototype.lten=function(i){return this.cmpn(i)<=0},a.prototype.lte=function(i){return this.cmp(i)<=0},a.prototype.eqn=function(i){return this.cmpn(i)===0},a.prototype.eq=function(i){return this.cmp(i)===0},a.red=function(i){return new W(i)},a.prototype.toRed=function(i){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),i.convertTo(this)._forceRed(i)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(i){return this.red=i,this},a.prototype.forceRed=function(i){return n(!this.red,"Already a number in reduction context"),this._forceRed(i)},a.prototype.redAdd=function(i){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,i)},a.prototype.redIAdd=function(i){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,i)},a.prototype.redSub=function(i){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,i)},a.prototype.redISub=function(i){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,i)},a.prototype.redShl=function(i){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,i)},a.prototype.redMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.mul(this,i)},a.prototype.redIMul=function(i){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,i),this.red.imul(this,i)},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(i){return n(this.red&&!i.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,i)};var L={k256:null,p224:null,p192:null,p25519:null};function N(h,i){this.name=h,this.p=new a(i,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var i=new a(null);return i.words=new Array(Math.ceil(this.n/13)),i},N.prototype.ireduce=function(i){var f=i,u;do this.split(f,this.tmp),f=this.imulK(f),f=f.iadd(this.tmp),u=f.bitLength();while(u>this.n);var c=u0?f.isub(this.p):f.strip!==void 0?f.strip():f._strip(),f},N.prototype.split=function(i,f){i.iushrn(this.n,0,f)},N.prototype.imulK=function(i){return i.imul(this.k)};function q(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(q,N),q.prototype.split=function(i,f){for(var u=4194303,c=Math.min(i.length,9),p=0;p>>22,b=g}b>>>=22,i.words[p-10]=b,b===0&&i.length>10?i.length-=10:i.length-=9},q.prototype.imulK=function(i){i.words[i.length]=0,i.words[i.length+1]=0,i.length+=2;for(var f=0,u=0;u>>=26,i.words[u]=p,f=c}return f!==0&&(i.words[i.length++]=f),i},a._prime=function(i){if(L[i])return L[i];var f;if(i==="k256")f=new q;else if(i==="p224")f=new X;else if(i==="p192")f=new J;else if(i==="p25519")f=new Z;else throw new Error("Unknown prime "+i);return L[i]=f,f};function W(h){if(typeof h=="string"){var i=a._prime(h);this.m=i.p,this.prime=i}else n(h.gtn(1),"modulus must be greater than 1"),this.m=h,this.prime=null}W.prototype._verify1=function(i){n(i.negative===0,"red works only with positives"),n(i.red,"red works only with red numbers")},W.prototype._verify2=function(i,f){n((i.negative|f.negative)===0,"red works only with positives"),n(i.red&&i.red===f.red,"red works only with red numbers")},W.prototype.imod=function(i){return this.prime?this.prime.ireduce(i)._forceRed(this):i.umod(this.m)._forceRed(this)},W.prototype.neg=function(i){return i.isZero()?i.clone():this.m.sub(i)._forceRed(this)},W.prototype.add=function(i,f){this._verify2(i,f);var u=i.add(f);return u.cmp(this.m)>=0&&u.isub(this.m),u._forceRed(this)},W.prototype.iadd=function(i,f){this._verify2(i,f);var u=i.iadd(f);return u.cmp(this.m)>=0&&u.isub(this.m),u},W.prototype.sub=function(i,f){this._verify2(i,f);var u=i.sub(f);return u.cmpn(0)<0&&u.iadd(this.m),u._forceRed(this)},W.prototype.isub=function(i,f){this._verify2(i,f);var u=i.isub(f);return u.cmpn(0)<0&&u.iadd(this.m),u},W.prototype.shl=function(i,f){return this._verify1(i),this.imod(i.ushln(f))},W.prototype.imul=function(i,f){return this._verify2(i,f),this.imod(i.imul(f))},W.prototype.mul=function(i,f){return this._verify2(i,f),this.imod(i.mul(f))},W.prototype.isqr=function(i){return this.imul(i,i.clone())},W.prototype.sqr=function(i){return this.mul(i,i)},W.prototype.sqrt=function(i){if(i.isZero())return i.clone();var f=this.m.andln(3);if(n(f%2===1),f===3){var u=this.m.add(new a(1)).iushrn(2);return this.pow(i,u)}for(var c=this.m.subn(1),p=0;!c.isZero()&&c.andln(1)===0;)p++,c.iushrn(1);n(!c.isZero());var b=new a(1).toRed(this),g=b.redNeg(),l=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new a(2*s*s).toRed(this);this.pow(s,l).cmp(g)!==0;)s.redIAdd(g);for(var v=this.pow(s,c),x=this.pow(i,c.addn(1).iushrn(1)),C=this.pow(i,c),B=p;C.cmp(b)!==0;){for(var k=C,R=0;k.cmp(b)!==0;R++)k=k.redSqr();n(R=0;p--){for(var v=f.words[p],x=s-1;x>=0;x--){var C=v>>x&1;if(b!==c[0]&&(b=this.sqr(b)),C===0&&g===0){l=0;continue}g<<=1,g|=C,l++,!(l!==u&&(p!==0||x!==0))&&(b=this.mul(b,c[g]),l=0,g=0)}s=26}return b},W.prototype.convertTo=function(i){var f=i.umod(this.m);return f===i?f.clone():f},W.prototype.convertFrom=function(i){var f=i.clone();return f.red=null,f},a.mont=function(i){return new $(i)};function $(h){W.call(this,h),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)}o($,W),$.prototype.convertTo=function(i){return this.imod(i.ushln(this.shift))},$.prototype.convertFrom=function(i){var f=this.imod(i.mul(this.rinv));return f.red=null,f},$.prototype.imul=function(i,f){if(i.isZero()||f.isZero())return i.words[0]=0,i.length=1,i;var u=i.imul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.mul=function(i,f){if(i.isZero()||f.isZero())return new a(0)._forceRed(this);var u=i.mul(f),c=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=u.isub(c).iushrn(this.shift),b=p;return p.cmp(this.m)>=0?b=p.isub(this.m):p.cmpn(0)<0&&(b=p.iadd(this.m)),b._forceRed(this)},$.prototype.invm=function(i){var f=this.imod(i._invmp(this.m).mul(this.r2));return f._forceRed(this)}})(e,Qe)}(av)),av.exports}var ov,w5;function VE(){if(w5)return ov;w5=1;var e=Yy(),t=gt.exports.Buffer;function r(n,o){return t.from(n.toRed(e.mont(o.modulus)).redPow(new e(o.publicExponent)).fromRed().toArray())}return ov=r,ov}var sv,M5;function nG(){if(M5)return sv;M5=1;var e=cd(),t=Ai.exports,r=nf,n=jE(),o=qE(),a=Yy(),d=VE(),m=Vy(),y=gt.exports.Buffer;sv=function(S,A,T){var I;S.padding?I=S.padding:T?I=1:I=4;var O=e(S),P;if(I===4)P=w(O,A);else if(I===1)P=M(O,A,T);else if(I===3){if(P=new a(A),P.cmp(O.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return T?m(P,O):d(P,O)};function w(E,S){var A=E.modulus.byteLength(),T=S.length,I=r("sha1").update(y.alloc(0)).digest(),O=I.length,P=2*O;if(T>A-P-2)throw new Error("message too long");var L=y.alloc(A-T-P-2),N=A-O-1,q=t(O),X=o(y.concat([I,L,y.alloc(1,1),S],N),n(q,N)),J=o(q,n(X,O));return new a(y.concat([y.alloc(1),J,X],A))}function M(E,S,A){var T=S.length,I=E.modulus.byteLength();if(T>I-11)throw new Error("message too long");var O;return A?O=y.alloc(I-T-3,255):O=_(I-T-3),new a(y.concat([y.from([0,A?1:2]),O,y.alloc(1),S],I))}function _(E){for(var S=y.allocUnsafe(E),A=0,T=t(E*2),I=0,O;AO||new n(S).cmp(I.modulus)>=0)throw new Error("decryption error");var P;A?P=d(new n(S),I):P=o(S,I);var L=m.alloc(O-P.length);if(P=m.concat([L,P],O),T===4)return y(I,P);if(T===1)return w(I,P,A);if(T===3)return P;throw new Error("unknown padding")};function y(_,E){var S=_.modulus.byteLength(),A=a("sha1").update(m.alloc(0)).digest(),T=A.length;if(E[0]!==0)throw new Error("decryption error");var I=E.slice(1,T+1),O=E.slice(T+1),P=r(I,t(O,T)),L=r(O,t(P,S-T-1));if(M(A,L.slice(0,T)))throw new Error("decryption error");for(var N=T;L[N]===0;)N++;if(L[N++]!==1)throw new Error("decryption error");return L.slice(N)}function w(_,E,S){for(var A=E.slice(0,2),T=2,I=0;E[T++]!==0;)if(T>=E.length){I++;break}var O=E.slice(2,T-1);if((A.toString("hex")!=="0002"&&!S||A.toString("hex")!=="0001"&&S)&&I++,O.length<8&&I++,I)throw new Error("decryption error");return E.slice(T)}function M(_,E){_=m.from(_),E=m.from(E);var S=0,A=_.length;_.length!==E.length&&(S++,A=Math.min(_.length,E.length));for(var T=-1;++Td||E<0)throw new TypeError("offset must be a uint32");if(E>o||E>S)throw new RangeError("offset out of range")}function y(E,S,A){if(typeof E!="number"||E!==E)throw new TypeError("size must be a number");if(E>d||E<0)throw new TypeError("size must be a uint32");if(E+S>A||E>o)throw new RangeError("buffer too small")}a&&a.getRandomValues||!ot.browser?(zo.randomFill=w,zo.randomFillSync=_):(zo.randomFill=e,zo.randomFillSync=e);function w(E,S,A,T){if(!n.isBuffer(E)&&!(E instanceof Qe.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof S=="function")T=S,S=0,A=E.length;else if(typeof A=="function")T=A,A=E.length-S;else if(typeof T!="function")throw new TypeError('"cb" argument must be a function');return m(S,E.length),y(A,S,E.length),M(E,S,A,T)}function M(E,S,A,T){if(ot.browser){var I=E.buffer,O=new Uint8Array(I,S,A);if(a.getRandomValues(O),T){ot.nextTick(function(){T(null,E)});return}return E}if(T){r(A,function(L,N){if(L)return T(L);N.copy(E,S),T(null,E)});return}var P=r(A);return P.copy(E,S),E}function _(E,S,A){if(typeof S>"u"&&(S=0),!n.isBuffer(E)&&!(E instanceof Qe.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return m(S,E.length),A===void 0&&(A=E.length-S),y(A,S,E.length),M(E,S,A)}return zo}var S5;function sG(){if(S5)return vt;S5=1,vt.randomBytes=vt.rng=vt.pseudoRandomBytes=vt.prng=Ai.exports,vt.createHash=vt.Hash=nf,vt.createHmac=vt.Hmac=wE();var e=hK(),t=Object.keys(e),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(t);vt.getHashes=function(){return r};var n=AE();vt.pbkdf2=n.pbkdf2,vt.pbkdf2Sync=n.pbkdf2Sync;var o=RK();vt.Cipher=o.Cipher,vt.createCipher=o.createCipher,vt.Cipheriv=o.Cipheriv,vt.createCipheriv=o.createCipheriv,vt.Decipher=o.Decipher,vt.createDecipher=o.createDecipher,vt.Decipheriv=o.Decipheriv,vt.createDecipheriv=o.createDecipheriv,vt.getCiphers=o.getCiphers,vt.listCiphers=o.listCiphers;var a=UK();vt.DiffieHellmanGroup=a.DiffieHellmanGroup,vt.createDiffieHellmanGroup=a.createDiffieHellmanGroup,vt.getDiffieHellman=a.getDiffieHellman,vt.createDiffieHellman=a.createDiffieHellman,vt.DiffieHellman=a.DiffieHellman;var d=eG();vt.createSign=d.createSign,vt.Sign=d.Sign,vt.createVerify=d.createVerify,vt.Verify=d.Verify,vt.createECDH=rG();var m=aG();vt.publicEncrypt=m.publicEncrypt,vt.privateEncrypt=m.privateEncrypt,vt.publicDecrypt=m.publicDecrypt,vt.privateDecrypt=m.privateDecrypt;var y=oG();return vt.randomFill=y.randomFill,vt.randomFillSync=y.randomFillSync,vt.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(` `))},vt.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},vt}var A5;function Xy(){if(A5)return Gl.exports;A5=1;var e;Gl.exports=function(o){return e||(e=new t(null)),e.generate(o)};function t(n){this.rand=n}if(Gl.exports.Rand=t,t.prototype.generate=function(o){return this._rand(o)},t.prototype._rand=function(o){if(this.rand.getBytes)return this.rand.getBytes(o);for(var a=new Uint8Array(o),d=0;d0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var dd=Ua;Ua.prototype.point=function(){throw new Error("Not implemented")};Ua.prototype.validate=function(){throw new Error("Not implemented")};Ua.prototype._fixedNafMul=function(t,r){Dh(t.precomputed);var n=t._getDoubles(),o=Lh(r,1,this._bitLength),a=(1<=m;w--)y=(y<<1)+o[w];d.push(y)}for(var M=this.jpoint(null,null,null),_=this.jpoint(null,null,null),E=a;E>0;E--){for(m=0;m=0;y--){for(var w=0;y>=0&&d[y]===0;y--)w++;if(y>=0&&w++,m=m.dblp(w),y<0)break;var M=d[y];Dh(M!==0),t.type==="affine"?M>0?m=m.mixedAdd(a[M-1>>1]):m=m.mixedAdd(a[-M-1>>1].neg()):M>0?m=m.add(a[M-1>>1]):m=m.add(a[-M-1>>1].neg())}return t.type==="affine"?m.toP():m};Ua.prototype._wnafMulAdd=function(t,r,n,o,a){var d=this._wnafT1,m=this._wnafT2,y=this._wnafT3,w=0,M,_,E;for(M=0;M=1;M-=2){var A=M-1,T=M;if(d[A]!==1||d[T]!==1){y[A]=Lh(n[A],d[A],this._bitLength),y[T]=Lh(n[T],d[T],this._bitLength),w=Math.max(y[A].length,w),w=Math.max(y[T].length,w);continue}var I=[r[A],null,null,r[T]];r[A].y.cmp(r[T].y)===0?(I[1]=r[A].add(r[T]),I[2]=r[A].toJ().mixedAdd(r[T].neg())):r[A].y.cmp(r[T].y.redNeg())===0?(I[1]=r[A].toJ().mixedAdd(r[T]),I[2]=r[A].add(r[T].neg())):(I[1]=r[A].toJ().mixedAdd(r[T]),I[2]=r[A].toJ().mixedAdd(r[T].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],P=fG(n[A],n[T]);for(w=Math.max(P[0].length,w),y[A]=new Array(w),y[T]=new Array(w),_=0;_=0;M--){for(var J=0;M>=0;){var Z=!0;for(_=0;_=0&&J++,q=q.dblp(J),M<0)break;for(_=0;_0?E=m[_][W-1>>1]:W<0&&(E=m[_][-W-1>>1].neg()),E.type==="affine"?q=q.mixedAdd(E):q=q.add(E))}}for(M=0;M=Math.ceil((t.bitLength()+1)/r.step):!1};jn.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],o=this,a=0;a=0&&(S=w,A=M),_.negative&&(_=_.neg(),E=E.neg()),S.negative&&(S=S.neg(),A=A.neg()),[{a:_,b:E},{a:S,b:A}]};qn.prototype._endoSplit=function(t){var r=this.endo.basis,n=r[0],o=r[1],a=o.b.mul(t).divRound(this.n),d=n.b.neg().mul(t).divRound(this.n),m=a.mul(n.a),y=d.mul(o.a),w=a.mul(n.b),M=d.mul(o.b),_=t.sub(m).sub(y),E=w.add(M).neg();return{k1:_,k2:E}};qn.prototype.pointFromX=function(t,r){t=new fr(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),o=n.redSqrt();if(o.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=o.fromRed().isOdd();return(r&&!a||!r&&a)&&(o=o.redNeg()),this.point(t,o)};qn.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,n=t.y,o=this.a.redMul(r),a=r.redSqr().redMul(r).redIAdd(o).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0};qn.prototype._endoWnafMulAdd=function(t,r,n){for(var o=this._endoWnafT1,a=this._endoWnafT2,d=0;d":""};Er.prototype.isInfinity=function(){return this.inf};Er.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(t.x),o=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,o)};Er.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),o=t.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(o),d=a.redSqr().redISub(this.x.redAdd(this.x)),m=a.redMul(this.x.redSub(d)).redISub(this.y);return this.curve.point(d,m)};Er.prototype.getX=function(){return this.x.fromRed()};Er.prototype.getY=function(){return this.y.fromRed()};Er.prototype.mul=function(t){return t=new fr(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};Er.prototype.mulAdd=function(t,r,n){var o=[this,r],a=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,a):this.curve._wnafMulAdd(1,o,a,2)};Er.prototype.jmulAdd=function(t,r,n){var o=[this,r],a=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,a,!0):this.curve._wnafMulAdd(1,o,a,2,!0)};Er.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};Er.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,o=function(a){return a.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(o)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(o)}}}return r};Er.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function Rr(e,t,r,n){af.BasePoint.call(this,e,"jacobian"),t===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new fr(0)):(this.x=new fr(t,16),this.y=new fr(r,16),this.z=new fr(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}Qy(Rr,af.BasePoint);qn.prototype.jpoint=function(t,r,n){return new Rr(this,t,r,n)};Rr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),n=this.x.redMul(r),o=this.y.redMul(r).redMul(t);return this.curve.point(n,o)};Rr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Rr.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),n=this.z.redSqr(),o=this.x.redMul(r),a=t.x.redMul(n),d=this.y.redMul(r.redMul(t.z)),m=t.y.redMul(n.redMul(this.z)),y=o.redSub(a),w=d.redSub(m);if(y.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var M=y.redSqr(),_=M.redMul(y),E=o.redMul(M),S=w.redSqr().redIAdd(_).redISub(E).redISub(E),A=w.redMul(E.redISub(S)).redISub(d.redMul(_)),T=this.z.redMul(t.z).redMul(y);return this.curve.jpoint(S,A,T)};Rr.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),n=this.x,o=t.x.redMul(r),a=this.y,d=t.y.redMul(r).redMul(this.z),m=n.redSub(o),y=a.redSub(d);if(m.cmpn(0)===0)return y.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var w=m.redSqr(),M=w.redMul(m),_=n.redMul(w),E=y.redSqr().redIAdd(M).redISub(_).redISub(_),S=y.redMul(_.redISub(E)).redISub(a.redMul(M)),A=this.z.redMul(m);return this.curve.jpoint(E,S,A)};Rr.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)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}};Rr.prototype.inspect=function(){return this.isInfinity()?"":""};Rr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var hs=Pi.exports,KE=mt.exports,pd=dd,cG=_n;function of(e){pd.call(this,"mont",e),this.a=new hs(e.a,16).toRed(this.red),this.b=new hs(e.b,16).toRed(this.red),this.i4=new hs(4).toRed(this.red).redInvm(),this.two=new hs(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}KE(of,pd);var dG=of;of.prototype.validate=function(t){var r=t.normalize().x,n=r.redSqr(),o=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),a=o.redSqrt();return a.redSqr().cmp(o)===0};function Mr(e,t,r){pd.BasePoint.call(this,e,"projective"),t===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new hs(t,16),this.z=new hs(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}KE(Mr,pd.BasePoint);of.prototype.decodePoint=function(t,r){return this.point(cG.toArray(t,r),1)};of.prototype.point=function(t,r){return new Mr(this,t,r)};of.prototype.pointFromJSON=function(t){return Mr.fromJSON(this,t)};Mr.prototype.precompute=function(){};Mr.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Mr.fromJSON=function(t,r){return new Mr(t,r[0],r[1]||t.one)};Mr.prototype.inspect=function(){return this.isInfinity()?"":""};Mr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Mr.prototype.dbl=function(){var t=this.x.redAdd(this.z),r=t.redSqr(),n=this.x.redSub(this.z),o=n.redSqr(),a=r.redSub(o),d=r.redMul(o),m=a.redMul(o.redAdd(this.curve.a24.redMul(a)));return this.curve.point(d,m)};Mr.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Mr.prototype.diffAdd=function(t,r){var n=this.x.redAdd(this.z),o=this.x.redSub(this.z),a=t.x.redAdd(t.z),d=t.x.redSub(t.z),m=d.redMul(n),y=a.redMul(o),w=r.z.redMul(m.redAdd(y).redSqr()),M=r.x.redMul(m.redISub(y).redSqr());return this.curve.point(w,M)};Mr.prototype.mul=function(t){for(var r=t.clone(),n=this,o=this.curve.point(null,null),a=this,d=[];r.cmpn(0)!==0;r.iushrn(1))d.push(r.andln(1));for(var m=d.length-1;m>=0;m--)d[m]===0?(n=n.diffAdd(o,a),o=o.dbl()):(o=n.diffAdd(o,a),n=n.dbl());return o};Mr.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Mr.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Mr.prototype.eq=function(t){return this.getX().cmp(t.getX())===0};Mr.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Mr.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var pG=_n,Ui=Pi.exports,GE=mt.exports,vd=dd,vG=pG.assert;function Bi(e){this.twisted=(e.a|0)!==1,this.mOneA=this.twisted&&(e.a|0)===-1,this.extended=this.mOneA,vd.call(this,"edwards",e),this.a=new Ui(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Ui(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Ui(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),vG(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)===1}GE(Bi,vd);var mG=Bi;Bi.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)};Bi.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)};Bi.prototype.jpoint=function(t,r,n,o){return this.point(t,r,n,o)};Bi.prototype.pointFromX=function(t,r){t=new Ui(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr(),o=this.c2.redSub(this.a.redMul(n)),a=this.one.redSub(this.c2.redMul(this.d).redMul(n)),d=o.redMul(a.redInvm()),m=d.redSqrt();if(m.redSqr().redSub(d).cmp(this.zero)!==0)throw new Error("invalid point");var y=m.fromRed().isOdd();return(r&&!y||!r&&y)&&(m=m.redNeg()),this.point(t,m)};Bi.prototype.pointFromY=function(t,r){t=new Ui(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr(),o=n.redSub(this.c2),a=n.redMul(this.d).redMul(this.c2).redSub(this.a),d=o.redMul(a.redInvm());if(d.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var m=d.redSqrt();if(m.redSqr().redSub(d).cmp(this.zero)!==0)throw new Error("invalid point");return m.fromRed().isOdd()!==r&&(m=m.redNeg()),this.point(m,t)};Bi.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),n=t.y.redSqr(),o=r.redMul(this.a).redAdd(n),a=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return o.cmp(a)===0};function Yt(e,t,r,n,o){vd.BasePoint.call(this,e,"projective"),t===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Ui(t,16),this.y=new Ui(r,16),this.z=n?new Ui(n,16):this.curve.one,this.t=o&&new Ui(o,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.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}GE(Yt,vd.BasePoint);Bi.prototype.pointFromJSON=function(t){return Yt.fromJSON(this,t)};Bi.prototype.point=function(t,r,n,o){return new Yt(this,t,r,n,o)};Yt.fromJSON=function(t,r){return new Yt(t,r[0],r[1],r[2])};Yt.prototype.inspect=function(){return this.isInfinity()?"":""};Yt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Yt.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var o=this.curve._mulA(t),a=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),d=o.redAdd(r),m=d.redSub(n),y=o.redSub(r),w=a.redMul(m),M=d.redMul(y),_=a.redMul(y),E=m.redMul(d);return this.curve.point(w,M,E,_)};Yt.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),o,a,d,m,y,w;if(this.curve.twisted){m=this.curve._mulA(r);var M=m.redAdd(n);this.zOne?(o=t.redSub(r).redSub(n).redMul(M.redSub(this.curve.two)),a=M.redMul(m.redSub(n)),d=M.redSqr().redSub(M).redSub(M)):(y=this.z.redSqr(),w=M.redSub(y).redISub(y),o=t.redSub(r).redISub(n).redMul(w),a=M.redMul(m.redSub(n)),d=M.redMul(w))}else m=r.redAdd(n),y=this.curve._mulC(this.z).redSqr(),w=m.redSub(y).redSub(y),o=this.curve._mulC(t.redISub(m)).redMul(w),a=this.curve._mulC(m).redMul(r.redISub(n)),d=m.redMul(w);return this.curve.point(o,a,d)};Yt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Yt.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),o=this.t.redMul(this.curve.dd).redMul(t.t),a=this.z.redMul(t.z.redAdd(t.z)),d=n.redSub(r),m=a.redSub(o),y=a.redAdd(o),w=n.redAdd(r),M=d.redMul(m),_=y.redMul(w),E=d.redMul(w),S=m.redMul(y);return this.curve.point(M,_,S,E)};Yt.prototype._projAdd=function(t){var r=this.z.redMul(t.z),n=r.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),d=this.curve.d.redMul(o).redMul(a),m=n.redSub(d),y=n.redAdd(d),w=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),M=r.redMul(m).redMul(w),_,E;return this.curve.twisted?(_=r.redMul(y).redMul(a.redSub(this.curve._mulA(o))),E=m.redMul(y)):(_=r.redMul(y).redMul(a.redSub(o)),E=this.curve._mulC(m).redMul(y)),this.curve.point(M,_,E)};Yt.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)};Yt.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)};Yt.prototype.mulAdd=function(t,r,n){return this.curve._wnafMulAdd(1,[this,r],[t,n],2,!1)};Yt.prototype.jmulAdd=function(t,r,n){return this.curve._wnafMulAdd(1,[this,r],[t,n],2,!0)};Yt.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this};Yt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Yt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Yt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Yt.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0};Yt.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=t.clone(),o=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),this.x.cmp(r)===0)return!0}};Yt.prototype.toP=Yt.prototype.normalize;Yt.prototype.mixedAdd=Yt.prototype.add;(function(e){var t=e;t.base=dd,t.short=hG,t.mont=dG,t.edwards=mG})(Jy);var md={},gd={},kt={},gG=Hn,yG=mt.exports;kt.inherits=yG;function bG(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function wG(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),o=0;o>6|192,r[n++]=a&63|128):bG(e,o)?(a=65536+((a&1023)<<10)+(e.charCodeAt(++o)&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(o=0;o>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}kt.htonl=WE;function xG(e,t){for(var r="",n=0;n>>0}return a}kt.join32=_G;function EG(e,t){for(var r=new Array(e.length*4),n=0,o=0;n>>24,r[o+1]=a>>>16&255,r[o+2]=a>>>8&255,r[o+3]=a&255):(r[o+3]=a>>>24,r[o+2]=a>>>16&255,r[o+1]=a>>>8&255,r[o]=a&255)}return r}kt.split32=EG;function SG(e,t){return e>>>t|e<<32-t}kt.rotr32=SG;function AG(e,t){return e<>>32-t}kt.rotl32=AG;function CG(e,t){return e+t>>>0}kt.sum32=CG;function kG(e,t,r){return e+t+r>>>0}kt.sum32_3=kG;function TG(e,t,r,n){return e+t+r+n>>>0}kt.sum32_4=TG;function RG(e,t,r,n,o){return e+t+r+n+o>>>0}kt.sum32_5=RG;function OG(e,t,r,n){var o=e[t],a=e[t+1],d=n+a>>>0,m=(d>>0,e[t+1]=d}kt.sum64=OG;function PG(e,t,r,n){var o=t+n>>>0,a=(o>>0}kt.sum64_hi=PG;function BG(e,t,r,n){var o=t+n;return o>>>0}kt.sum64_lo=BG;function IG(e,t,r,n,o,a,d,m){var y=0,w=t;w=w+n>>>0,y+=w>>0,y+=w>>0,y+=w>>0}kt.sum64_4_hi=IG;function $G(e,t,r,n,o,a,d,m){var y=t+n+a+m;return y>>>0}kt.sum64_4_lo=$G;function LG(e,t,r,n,o,a,d,m,y,w){var M=0,_=t;_=_+n>>>0,M+=_>>0,M+=_>>0,M+=_>>0,M+=_>>0}kt.sum64_5_hi=LG;function DG(e,t,r,n,o,a,d,m,y,w){var M=t+n+a+m+w;return M>>>0}kt.sum64_5_lo=DG;function FG(e,t,r){var n=t<<32-r|e>>>r;return n>>>0}kt.rotr64_hi=FG;function NG(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}kt.rotr64_lo=NG;function zG(e,t,r){return e>>>r}kt.shr64_hi=zG;function HG(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}kt.shr64_lo=HG;var sf={},C5=kt,UG=Hn;function yd(){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}sf.BlockHash=yd;yd.prototype.update=function(t,r){if(t=C5.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var n=t.length%this._delta8;this.pending=t.slice(t.length-n,t.length),this.pending.length===0&&(this.pending=null),t=C5.join32(t,0,t.length-n,this.endian);for(var o=0;o>>24&255,o[a++]=t>>>16&255,o[a++]=t>>>8&255,o[a++]=t&255}else for(o[a++]=t&255,o[a++]=t>>>8&255,o[a++]=t>>>16&255,o[a++]=t>>>24&255,o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0,d=8;d>>3}Ii.g0_256=GG;function WG(e){return yi(e,17)^yi(e,19)^e>>>10}Ii.g1_256=WG;var Hs=kt,ZG=sf,YG=Ii,uv=Hs.rotl32,Nf=Hs.sum32,XG=Hs.sum32_5,JG=YG.ft_1,eS=ZG.BlockHash,QG=[1518500249,1859775393,2400959708,3395469782];function Ci(){if(!(this instanceof Ci))return new Ci;eS.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Hs.inherits(Ci,eS);var eW=Ci;Ci.blockSize=512;Ci.outSize=160;Ci.hmacStrength=80;Ci.padLength=64;Ci.prototype._update=function(t,r){for(var n=this.W,o=0;o<16;o++)n[o]=t[r+o];for(;othis.blockSize&&(t=new this.Hash().update(t).digest()),HW(t.length<=this.blockSize);for(var r=t.length;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var VW=$a;$a.prototype._init=function(t,r,n){var o=t.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(t.concat(n||[])),this._reseed=1};$a.prototype.generate=function(t,r,n,o){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(o=n,n=r,r=null),n&&(n=ho.toArray(n,o||"hex"),this._update(n));for(var a=[];a.length"};var Fh=Pi.exports,e3=_n,ZW=e3.assert;function bd(e,t){if(e instanceof bd)return e;this._importDER(e,t)||(ZW(e.r&&e.s,"Signature without r or s"),this.r=new Fh(e.r,16),this.s=new Fh(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var YW=bd;function XW(){this.place=0}function dv(e,t){var r=e[t.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var o=0,a=0,d=t.place;a>>=0;return o<=127?!1:(t.place=d,o)}function P5(e){for(var t=0,r=e.length-1;!e[t]&&!(e[t+1]&128)&&t>>3);for(e.push(r|128);--r;)e.push(t>>>(r<<3)&255);e.push(t)}bd.prototype.toDER=function(t){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=P5(r),n=P5(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var o=[2];pv(o,r.length),o=o.concat(r),o.push(2),pv(o,n.length);var a=o.concat(n),d=[48];return pv(d,a.length),d=d.concat(a),e3.encode(d,t)};var vv,B5;function JW(){if(B5)return vv;B5=1;var e=Pi.exports,t=VW,r=_n,n=md,o=Xy(),a=r.assert,d=WW,m=YW;function y(w){if(!(this instanceof y))return new y(w);typeof w=="string"&&(a(Object.prototype.hasOwnProperty.call(n,w),"Unknown curve "+w),w=n[w]),w instanceof n.PresetCurve&&(w={curve:w}),this.curve=w.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=w.curve.g,this.g.precompute(w.curve.n.bitLength()+1),this.hash=w.hash||w.curve.hash}return vv=y,y.prototype.keyPair=function(M){return new d(this,M)},y.prototype.keyFromPrivate=function(M,_){return d.fromPrivate(this,M,_)},y.prototype.keyFromPublic=function(M,_){return d.fromPublic(this,M,_)},y.prototype.genKeyPair=function(M){M||(M={});for(var _=new t({hash:this.hash,pers:M.pers,persEnc:M.persEnc||"utf8",entropy:M.entropy||o(this.hash.hmacStrength),entropyEnc:M.entropy&&M.entropyEnc||"utf8",nonce:this.n.toArray()}),E=this.n.byteLength(),S=this.n.sub(new e(2));;){var A=new e(_.generate(E));if(!(A.cmp(S)>0))return A.iaddn(1),this.keyFromPrivate(A)}},y.prototype._truncateToN=function(M,_){var E=M.byteLength()*8-this.n.bitLength();return E>0&&(M=M.ushrn(E)),!_&&M.cmp(this.n)>=0?M.sub(this.n):M},y.prototype.sign=function(M,_,E,S){typeof E=="object"&&(S=E,E=null),S||(S={}),_=this.keyFromPrivate(_,E),M=this._truncateToN(new e(M,16));for(var A=this.n.byteLength(),T=_.getPrivate().toArray("be",A),I=M.toArray("be",A),O=new t({hash:this.hash,entropy:T,nonce:I,pers:S.pers,persEnc:S.persEnc||"utf8"}),P=this.n.sub(new e(1)),L=0;;L++){var N=S.k?S.k(L):new e(O.generate(this.n.byteLength()));if(N=this._truncateToN(N,!0),!(N.cmpn(1)<=0||N.cmp(P)>=0)){var q=this.g.mul(N);if(!q.isInfinity()){var X=q.getX(),J=X.umod(this.n);if(J.cmpn(0)!==0){var Z=N.invm(this.n).mul(J.mul(_.getPrivate()).iadd(M));if(Z=Z.umod(this.n),Z.cmpn(0)!==0){var W=(q.getY().isOdd()?1:0)|(X.cmp(J)!==0?2:0);return S.canonical&&Z.cmp(this.nh)>0&&(Z=this.n.sub(Z),W^=1),new m({r:J,s:Z,recoveryParam:W})}}}}}},y.prototype.verify=function(M,_,E,S){M=this._truncateToN(new e(M,16)),E=this.keyFromPublic(E,S),_=new m(_,"hex");var A=_.r,T=_.s;if(A.cmpn(1)<0||A.cmp(this.n)>=0||T.cmpn(1)<0||T.cmp(this.n)>=0)return!1;var I=T.invm(this.n),O=I.mul(M).umod(this.n),P=I.mul(A).umod(this.n),L;return this.curve._maxwellTrick?(L=this.g.jmulAdd(O,E.getPublic(),P),L.isInfinity()?!1:L.eqXToP(A)):(L=this.g.mulAdd(O,E.getPublic(),P),L.isInfinity()?!1:L.getX().umod(this.n).cmp(A)===0)},y.prototype.recoverPubKey=function(w,M,_,E){a((3&_)===_,"The recovery param is more than two bits"),M=new m(M,E);var S=this.n,A=new e(w),T=M.r,I=M.s,O=_&1,P=_>>1;if(T.cmp(this.curve.p.umod(this.curve.n))>=0&&P)throw new Error("Unable to find sencond key candinate");P?T=this.curve.pointFromX(T.add(this.curve.n),O):T=this.curve.pointFromX(T,O);var L=M.r.invm(S),N=S.sub(A).mul(L).umod(S),q=I.mul(L).umod(S);return this.g.mulAdd(N,T,q)},y.prototype.getKeyRecoveryParam=function(w,M,_,E){if(M=new m(M,E),M.recoveryParam!==null)return M.recoveryParam;for(var S=0;S<4;S++){var A;try{A=this.recoverPubKey(w,M,S)}catch{continue}if(A.eq(_))return S}throw new Error("Unable to find valid recovery factor")},vv}var gl=_n,cS=gl.assert,I5=gl.parseBytes,lf=gl.cachedProperty;function wr(e,t){this.eddsa=e,this._secret=I5(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=I5(t.pub)}wr.fromPublic=function(t,r){return r instanceof wr?r:new wr(t,{pub:r})};wr.fromSecret=function(t,r){return r instanceof wr?r:new wr(t,{secret:r})};wr.prototype.secret=function(){return this._secret};lf(wr,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});lf(wr,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});lf(wr,"privBytes",function(){var t=this.eddsa,r=this.hash(),n=t.encodingLength-1,o=r.slice(0,t.encodingLength);return o[0]&=248,o[n]&=127,o[n]|=64,o});lf(wr,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});lf(wr,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});lf(wr,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});wr.prototype.sign=function(t){return cS(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)};wr.prototype.verify=function(t,r){return this.eddsa.verify(t,r,this)};wr.prototype.getSecret=function(t){return cS(this._secret,"KeyPair is public only"),gl.encode(this.secret(),t)};wr.prototype.getPublic=function(t){return gl.encode(this.pubBytes(),t)};var QW=wr,eZ=Pi.exports,wd=_n,tZ=wd.assert,Md=wd.cachedProperty,rZ=wd.parseBytes;function Lo(e,t){this.eddsa=e,typeof t!="object"&&(t=rZ(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),tZ(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof eZ&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Md(Lo,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Md(Lo,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Md(Lo,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Md(Lo,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Lo.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Lo.prototype.toHex=function(){return wd.encode(this.toBytes(),"hex").toUpperCase()};var nZ=Lo,iZ=gd,aZ=md,qs=_n,oZ=qs.assert,dS=qs.parseBytes,pS=QW,$5=nZ;function rn(e){if(oZ(e==="ed25519","only tested with ed25519 so far"),!(this instanceof rn))return new rn(e);e=aZ[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=iZ.sha512}var sZ=rn;rn.prototype.sign=function(t,r){t=dS(t);var n=this.keyFromSecret(r),o=this.hashInt(n.messagePrefix(),t),a=this.g.mul(o),d=this.encodePoint(a),m=this.hashInt(d,n.pubBytes(),t).mul(n.priv()),y=o.add(m).umod(this.curve.n);return this.makeSignature({R:a,S:y,Rencoded:d})};rn.prototype.verify=function(t,r,n){t=dS(t),r=this.makeSignature(r);var o=this.keyFromPublic(n),a=this.hashInt(r.Rencoded(),o.pubBytes(),t),d=this.g.mul(r.S()),m=r.R().add(o.pub().mul(a));return m.eq(d)};rn.prototype.hashInt=function(){for(var t=this.hash(),r=0;r=0)return null;r=r.toRed(Ot.red);let n=r.redSqr().redIMul(r).redIAdd(Ot.b).redSqrt();return e===3!==n.isOdd()&&(n=n.redNeg()),oi.keyPair({pub:{x:r,y:n}})}function lZ(e,t,r){let n=new Vt(t),o=new Vt(r);if(n.cmp(Ot.p)>=0||o.cmp(Ot.p)>=0||(n=n.toRed(Ot.red),o=o.toRed(Ot.red),(e===6||e===7)&&o.isOdd()!==(e===7)))return null;const a=n.redSqr().redIMul(n);return o.redSqr().redISub(a.redIAdd(Ot.b)).isZero()?oi.keyPair({pub:{x:n,y:o}}):null}function fa(e){const t=e[0];switch(t){case 2:case 3:return e.length!==33?null:uZ(t,e.subarray(1,33));case 4:case 6:case 7:return e.length!==65?null:lZ(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function Za(e,t){const r=t.encode(null,e.length===33);for(let n=0;n=0||(r.iadd(new Vt(e)),r.cmp(Ot.n)>=0&&r.isub(Ot.n),r.isZero()))return 1;const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul(e,t){let r=new Vt(t);if(r.cmp(Ot.n)>=0||r.isZero())return 1;r.imul(new Vt(e)),r.cmp(Ot.n)>=0&&(r=r.umod(Ot.n));const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify(e){return fa(e)===null?1:0},publicKeyCreate(e,t){const r=new Vt(t);if(r.cmp(Ot.n)>=0||r.isZero())return 1;const n=oi.keyFromPrivate(t).getPublic();return Za(e,n),0},publicKeyConvert(e,t){const r=fa(t);if(r===null)return 1;const n=r.getPublic();return Za(e,n),0},publicKeyNegate(e,t){const r=fa(t);if(r===null)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),Za(e,n),0},publicKeyCombine(e,t){const r=new Array(t.length);for(let o=0;o=0)return 2;const o=n.getPublic().add(Ot.g.mul(r));return o.isInfinity()?2:(Za(e,o),0)},publicKeyTweakMul(e,t,r){const n=fa(t);if(n===null)return 1;if(r=new Vt(r),r.cmp(Ot.n)>=0||r.isZero())return 2;const o=n.getPublic().mul(r);return Za(e,o),0},signatureNormalize(e){const t=new Vt(e.subarray(0,32)),r=new Vt(e.subarray(32,64));return t.cmp(Ot.n)>=0||r.cmp(Ot.n)>=0?1:(r.cmp(oi.nh)===1&&e.set(Ot.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){const r=t.subarray(0,32),n=t.subarray(32,64);if(new Vt(r).cmp(Ot.n)>=0||new Vt(n).cmp(Ot.n)>=0)return 1;const{output:o}=e;let a=o.subarray(4,4+33);a[0]=0,a.set(r,1);let d=33,m=0;for(;d>1&&a[m]===0&&!(a[m+1]&128);--d,++m);if(a=a.subarray(m),a[0]&128||d>1&&a[0]===0&&!(a[1]&128))return 1;let y=o.subarray(6+33,6+33+33);y[0]=0,y.set(n,1);let w=33,M=0;for(;w>1&&y[M]===0&&!(y[M+1]&128);--w,++M);return y=y.subarray(M),y[0]&128||w>1&&y[0]===0&&!(y[1]&128)?1:(e.outputlen=6+d+w,o[0]=48,o[1]=e.outputlen-2,o[2]=2,o[3]=a.length,o.set(a,4),o[4+d]=2,o[5+d]=y.length,o.set(y,6+d),0)},signatureImport(e,t){if(t.length<8||t.length>72||t[0]!==48||t[1]!==t.length-2||t[2]!==2)return 1;const r=t[3];if(r===0||5+r>=t.length||t[4+r]!==2)return 1;const n=t[5+r];if(n===0||6+r+n!==t.length||t[4]&128||r>1&&t[4]===0&&!(t[5]&128)||t[r+6]&128||n>1&&t[r+6]===0&&!(t[r+7]&128))return 1;let o=t.subarray(4,4+r);if(o.length===33&&o[0]===0&&(o=o.subarray(1)),o.length>32)return 1;let a=t.subarray(6+r);if(a.length===33&&a[0]===0&&(a=a.slice(1)),a.length>32)throw new Error("S length is too long");let d=new Vt(o);d.cmp(Ot.n)>=0&&(d=new Vt(0));let m=new Vt(t.subarray(6+r));return m.cmp(Ot.n)>=0&&(m=new Vt(0)),e.set(d.toArrayLike(Uint8Array,"be",32),0),e.set(m.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t,r,n,o){if(o){const m=o;o=y=>{const w=m(t,r,null,n,y);if(!(w instanceof Uint8Array&&w.length===32))throw new Error("This is the way");return new Vt(w)}}const a=new Vt(r);if(a.cmp(Ot.n)>=0||a.isZero())return 1;let d;try{d=oi.sign(t,r,{canonical:!0,k:o,pers:n})}catch{return 1}return e.signature.set(d.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(d.s.toArrayLike(Uint8Array,"be",32),32),e.recid=d.recoveryParam,0},ecdsaVerify(e,t,r){const n={r:e.subarray(0,32),s:e.subarray(32,64)},o=new Vt(n.r),a=new Vt(n.s);if(o.cmp(Ot.n)>=0||a.cmp(Ot.n)>=0)return 1;if(a.cmp(oi.nh)===1||o.isZero()||a.isZero())return 3;const d=fa(r);if(d===null)return 2;const m=d.getPublic();return oi.verify(t,n,m)?0:3},ecdsaRecover(e,t,r,n){const o={r:t.slice(0,32),s:t.slice(32,64)},a=new Vt(o.r),d=new Vt(o.s);if(a.cmp(Ot.n)>=0||d.cmp(Ot.n)>=0)return 1;if(a.isZero()||d.isZero())return 2;let m;try{m=oi.recoverPubKey(n,o,r)}catch{return 2}return Za(e,m),0},ecdh(e,t,r,n,o,a,d){const m=fa(t);if(m===null)return 1;const y=new Vt(r);if(y.cmp(Ot.n)>=0||y.isZero())return 2;const w=m.getPublic().mul(y);if(o===void 0){const M=w.encode(null,!0),_=oi.hash().update(M).digest();for(let E=0;E<32;++E)e[E]=_[E]}else{a||(a=new Uint8Array(32));const M=w.getX().toArray("be",32);for(let A=0;A<32;++A)a[A]=M[A];d||(d=new Uint8Array(32));const _=w.getY().toArray("be",32);for(let A=0;A<32;++A)d[A]=_[A];const E=o(a,d,n);if(!(E instanceof Uint8Array&&E.length===e.length))return 2;e.set(E)}return 0}},D5=$j(hZ),_d={};Object.defineProperty(_d,"__esModule",{value:!0});var vS=Ai.exports;function cZ(e){return new Promise(function(t,r){vS(e,function(n,o){if(n){r(n);return}t(o)})})}_d.getRandomBytes=cZ;function dZ(e){return vS(e)}_d.getRandomBytesSync=dZ;(function(e){var t=Qe&&Qe.__awaiter||function(w,M,_,E){function S(A){return A instanceof _?A:new _(function(T){T(A)})}return new(_||(_=Promise))(function(A,T){function I(L){try{P(E.next(L))}catch(N){T(N)}}function O(L){try{P(E.throw(L))}catch(N){T(N)}}function P(L){L.done?A(L.value):S(L.value).then(I,O)}P((E=E.apply(w,M||[])).next())})},r=Qe&&Qe.__generator||function(w,M){var _={label:0,sent:function(){if(A[0]&1)throw A[1];return A[1]},trys:[],ops:[]},E,S,A,T;return T={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(T[Symbol.iterator]=function(){return this}),T;function I(P){return function(L){return O([P,L])}}function O(P){if(E)throw new TypeError("Generator is already executing.");for(;_;)try{if(E=1,S&&(A=P[0]&2?S.return:P[0]?S.throw||((A=S.return)&&A.call(S),0):S.next)&&!(A=A.call(S,P[1])).done)return A;switch(S=0,A&&(P=[P[0]&2,A.value]),P[0]){case 0:case 1:A=P;break;case 4:return _.label++,{value:P[1],done:!1};case 5:_.label++,S=P[1],P=[0];continue;case 7:P=_.ops.pop(),_.trys.pop();continue;default:if(A=_.trys,!(A=A.length>0&&A[A.length-1])&&(P[0]===6||P[0]===2)){_=0;continue}if(P[0]===3&&(!A||P[1]>A[0]&&P[1]=0})}Kt.arrayContainsArray=mZ;function gZ(e){var t="",r=0,n=e.length;for(e.substring(0,2)==="0x"&&(r=2);r=h.length&&(h=void 0),{value:h&&h[u++],done:!h}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},r=Qe&&Qe.__read||function(h,i){var f=typeof Symbol=="function"&&h[Symbol.iterator];if(!f)return h;var u=f.call(h),c,p=[],b;try{for(;(i===void 0||i-- >0)&&!(c=u.next()).done;)p.push(c.value)}catch(g){b={error:g}}finally{try{c&&!c.done&&(f=u.return)&&f.call(u)}finally{if(b)throw b.error}}return p};Object.defineProperty(e,"__esModule",{value:!0}),e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToHex=e.bufferToInt=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;var n=en,o=Kt,a=dn,d=function(h){if(!Number.isSafeInteger(h)||h<0)throw new Error("Received an invalid integer type: ".concat(h));return"0x".concat(h.toString(16))};e.intToHex=d;var m=function(h){var i=(0,e.intToHex)(h);return ce.from((0,o.padToEven)(i.slice(2)),"hex")};e.intToBuffer=m;var y=function(h){return ce.allocUnsafe(h).fill(0)};e.zeros=y;var w=function(h,i,f){var u=(0,e.zeros)(i);return f?h.length0&&i.toString()==="0";)h=h.slice(1),i=h[0];return h},S=function(h){return(0,a.assertIsBuffer)(h),E(h)};e.unpadBuffer=S;var A=function(h){return(0,a.assertIsArray)(h),E(h)};e.unpadArray=A;var T=function(h){return(0,a.assertIsHexString)(h),h=(0,o.stripHexPrefix)(h),E(h)};e.unpadHexString=T;var I=function(h){if(h==null)return ce.allocUnsafe(0);if(ce.isBuffer(h)||Array.isArray(h)||h instanceof Uint8Array)return ce.from(h);if(typeof h=="string"){if(!(0,o.isHexString)(h))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ".concat(h));return ce.from((0,o.padToEven)((0,o.stripHexPrefix)(h)),"hex")}if(typeof h=="number")return(0,e.intToBuffer)(h);if(n.BN.isBN(h)){if(h.isNeg())throw new Error("Cannot convert negative BN to buffer. Given: ".concat(h));return h.toArrayLike(ce)}if(h.toArray)return ce.from(h.toArray());if(h.toBuffer)return ce.from(h.toBuffer());throw new Error("invalid type")};e.toBuffer=I;var O=function(h){return new n.BN((0,e.toBuffer)(h)).toNumber()};e.bufferToInt=O;var P=function(h){return h=(0,e.toBuffer)(h),"0x"+h.toString("hex")};e.bufferToHex=P;var L=function(h){return new n.BN(h).fromTwos(256)};e.fromSigned=L;var N=function(h){return ce.from(h.toTwos(256).toArray())};e.toUnsigned=N;var q=function(h){return typeof h!="string"||(0,o.isHexPrefixed)(h)?h:"0x"+h};e.addHexPrefix=q;var X=function(h){var i=/^(00)+|(00)+$/g;if(h=(0,o.stripHexPrefix)(h),h.length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");var f=ce.from(h.replace(i,""),"hex");return f.toString("utf8")};e.toUtf8=X;var J=function(h){if(ce.isBuffer(h))return"0x".concat(h.toString("hex"));if(h instanceof Array){for(var i=[],f=0;f0&&g[0]===0)throw new Error("".concat(b," cannot have leading zeroes, received: ").concat(g.toString("hex")))}}catch(l){i={error:l}}finally{try{c&&!c.done&&(f=u.return)&&f.call(u)}finally{if(i)throw i.error}}};e.validateNoLeadingZeroes=Z;function W(h){return Array.isArray(h)?h.map(function(i){return W(i)}):ce.from(h)}e.arrToBufArr=W;function $(h){return Array.isArray(h)?h.map(function(i){return $(i)}):Uint8Array.from(h!=null?h:[])}e.bufArrToArr=$})(ja);var Ed={},hf={},t3={};Object.defineProperty(t3,"__esModule",{value:!0});function CZ(e){return function(t){var r=e();return r.update(t),ce.from(r.digest())}}t3.createHashFunction=CZ;const{Transform:kZ}=Ns.exports;var TZ=e=>class yS extends kZ{constructor(r,n,o,a,d){super(d),this._rate=r,this._capacity=n,this._delimitedSuffix=o,this._hashBitLength=a,this._options=d,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,o){let a=null;try{this.update(r,n)}catch(d){a=d}o(a)}_flush(r){let n=null;try{this.push(this.digest())}catch(o){n=o}r(n)}update(r,n){if(!ce.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return ce.isBuffer(r)||(r=ce.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new yS(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:RZ}=Ns.exports;var OZ=e=>class bS extends RZ{constructor(r,n,o,a){super(a),this._rate=r,this._capacity=n,this._delimitedSuffix=o,this._options=a,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,o){let a=null;try{this.update(r,n)}catch(d){a=d}o(a)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!ce.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return ce.isBuffer(r)||(r=ce.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let o=this._state.squeeze(r);return n!==void 0&&(o=o.toString(n)),o}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new bS(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const PZ=TZ,BZ=OZ;var IZ=function(e){const t=PZ(e),r=BZ(e);return function(n,o){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new t(1152,448,null,224,o);case"keccak256":return new t(1088,512,null,256,o);case"keccak384":return new t(832,768,null,384,o);case"keccak512":return new t(576,1024,null,512,o);case"sha3-224":return new t(1152,448,6,224,o);case"sha3-256":return new t(1088,512,6,256,o);case"sha3-384":return new t(832,768,6,384,o);case"sha3-512":return new t(576,1024,6,512,o);case"shake128":return new r(1344,256,31,o);case"shake256":return new r(1088,512,31,o);default:throw new Error("Invald algorithm: "+n)}}},wS={};const F5=[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];wS.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],n=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],d=e[4]^e[14]^e[24]^e[34]^e[44],m=e[5]^e[15]^e[25]^e[35]^e[45],y=e[6]^e[16]^e[26]^e[36]^e[46],w=e[7]^e[17]^e[27]^e[37]^e[47],M=e[8]^e[18]^e[28]^e[38]^e[48],_=e[9]^e[19]^e[29]^e[39]^e[49];let E=M^(o<<1|a>>>31),S=_^(a<<1|o>>>31);const A=e[0]^E,T=e[1]^S,I=e[10]^E,O=e[11]^S,P=e[20]^E,L=e[21]^S,N=e[30]^E,q=e[31]^S,X=e[40]^E,J=e[41]^S;E=r^(d<<1|m>>>31),S=n^(m<<1|d>>>31);const Z=e[2]^E,W=e[3]^S,$=e[12]^E,h=e[13]^S,i=e[22]^E,f=e[23]^S,u=e[32]^E,c=e[33]^S,p=e[42]^E,b=e[43]^S;E=o^(y<<1|w>>>31),S=a^(w<<1|y>>>31);const g=e[4]^E,l=e[5]^S,s=e[14]^E,v=e[15]^S,x=e[24]^E,C=e[25]^S,B=e[34]^E,k=e[35]^S,R=e[44]^E,D=e[45]^S;E=d^(M<<1|_>>>31),S=m^(_<<1|M>>>31);const z=e[6]^E,H=e[7]^S,V=e[16]^E,U=e[17]^S,F=e[26]^E,G=e[27]^S,ie=e[36]^E,Y=e[37]^S,oe=e[46]^E,xe=e[47]^S;E=y^(r<<1|n>>>31),S=w^(n<<1|r>>>31);const ne=e[8]^E,Q=e[9]^S,te=e[18]^E,ee=e[19]^S,se=e[28]^E,_e=e[29]^S,K=e[38]^E,re=e[39]^S,Te=e[48]^E,ae=e[49]^S,Me=A,ze=T,fe=O<<4|I>>>28,Se=I<<4|O>>>28,He=P<<3|L>>>29,ue=L<<3|P>>>29,Ae=q<<9|N>>>23,Ue=N<<9|q>>>23,he=X<<18|J>>>14,Ce=J<<18|X>>>14,je=Z<<1|W>>>31,de=W<<1|Z>>>31,Oe=h<<12|$>>>20,Ve=$<<12|h>>>20,pe=i<<10|f>>>22,Pe=f<<10|i>>>22,Ke=c<<13|u>>>19,ve=u<<13|c>>>19,Be=p<<2|b>>>30,Ge=b<<2|p>>>30,me=l<<30|g>>>2,Ie=g<<30|l>>>2,We=s<<6|v>>>26,ge=v<<6|s>>>26,$e=C<<11|x>>>21,Ze=x<<11|C>>>21,ye=B<<15|k>>>17,Le=k<<15|B>>>17,Ye=D<<29|R>>>3,be=R<<29|D>>>3,De=z<<28|H>>>4,Xe=H<<28|z>>>4,we=U<<23|V>>>9,Re=V<<23|U>>>9,tt=F<<25|G>>>7,rt=G<<25|F>>>7,ut=ie<<21|Y>>>11,lt=Y<<21|ie>>>11,ht=xe<<24|oe>>>8,ct=oe<<24|xe>>>8,dt=ne<<27|Q>>>5,yt=Q<<27|ne>>>5,bt=te<<20|ee>>>12,wt=ee<<20|te>>>12,Mt=_e<<7|se>>>25,xt=se<<7|_e>>>25,_t=K<<8|re>>>24,Et=re<<8|K>>>24,St=Te<<14|ae>>>18,At=ae<<14|Te>>>18;e[0]=Me^~Oe&$e,e[1]=ze^~Ve&Ze,e[10]=De^~bt&He,e[11]=Xe^~wt&ue,e[20]=je^~We&tt,e[21]=de^~ge&rt,e[30]=dt^~fe&pe,e[31]=yt^~Se&Pe,e[40]=me^~we&Mt,e[41]=Ie^~Re&xt,e[2]=Oe^~$e&ut,e[3]=Ve^~Ze<,e[12]=bt^~He&Ke,e[13]=wt^~ue&ve,e[22]=We^~tt&_t,e[23]=ge^~rt&Et,e[32]=fe^~pe&ye,e[33]=Se^~Pe&Le,e[42]=we^~Mt&Ae,e[43]=Re^~xt&Ue,e[4]=$e^~ut&St,e[5]=Ze^~lt&At,e[14]=He^~Ke&Ye,e[15]=ue^~ve&be,e[24]=tt^~_t&he,e[25]=rt^~Et&Ce,e[34]=pe^~ye&ht,e[35]=Pe^~Le&ct,e[44]=Mt^~Ae&Be,e[45]=xt^~Ue&Ge,e[6]=ut^~St&Me,e[7]=lt^~At&ze,e[16]=Ke^~Ye&De,e[17]=ve^~be&Xe,e[26]=_t^~he&je,e[27]=Et^~Ce&de,e[36]=ye^~ht&dt,e[37]=Le^~ct&yt,e[46]=Ae^~Be&me,e[47]=Ue^~Ge&Ie,e[8]=St^~Me&Oe,e[9]=At^~ze&Ve,e[18]=Ye^~De&bt,e[19]=be^~Xe&wt,e[28]=he^~je&We,e[29]=Ce^~de&ge,e[38]=ht^~dt&fe,e[39]=ct^~yt&Se,e[48]=Be^~me&we,e[49]=Ge^~Ie&Re,e[0]^=F5[t*2],e[1]^=F5[t*2+1]}};const Nh=wS;function cf(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}cf.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};cf.prototype.absorb=function(e){for(let t=0;t>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(Nh.p1600(this.state),this.count=0);return t};cf.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var $Z=cf,LZ=IZ($Z);Object.defineProperty(hf,"__esModule",{value:!0});var Sd=t3,Ad=LZ;hf.keccak224=Sd.createHashFunction(function(){return Ad("keccak224")});hf.keccak256=Sd.createHashFunction(function(){return Ad("keccak256")});hf.keccak384=Sd.createHashFunction(function(){return Ad("keccak384")});hf.keccak512=Sd.createHashFunction(function(){return Ad("keccak512")});(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.rlphash=e.ripemd160FromArray=e.ripemd160FromString=e.ripemd160=e.sha256FromArray=e.sha256FromString=e.sha256=e.keccakFromArray=e.keccakFromHexString=e.keccakFromString=e.keccak256=e.keccak=void 0;var t=hf,r=nf,n=en,o=ja,a=dn,d=function(N,q){switch(q===void 0&&(q=256),(0,a.assertIsBuffer)(N),q){case 224:return(0,t.keccak224)(N);case 256:return(0,t.keccak256)(N);case 384:return(0,t.keccak384)(N);case 512:return(0,t.keccak512)(N);default:throw new Error("Invald algorithm: keccak".concat(q))}};e.keccak=d;var m=function(N){return(0,e.keccak)(N)};e.keccak256=m;var y=function(N,q){q===void 0&&(q=256),(0,a.assertIsString)(N);var X=ce.from(N,"utf8");return(0,e.keccak)(X,q)};e.keccakFromString=y;var w=function(N,q){return q===void 0&&(q=256),(0,a.assertIsHexString)(N),(0,e.keccak)((0,o.toBuffer)(N),q)};e.keccakFromHexString=w;var M=function(N,q){return q===void 0&&(q=256),(0,a.assertIsArray)(N),(0,e.keccak)((0,o.toBuffer)(N),q)};e.keccakFromArray=M;var _=function(N){return N=(0,o.toBuffer)(N),r("sha256").update(N).digest()},E=function(N){return(0,a.assertIsBuffer)(N),_(N)};e.sha256=E;var S=function(N){return(0,a.assertIsString)(N),_(N)};e.sha256FromString=S;var A=function(N){return(0,a.assertIsArray)(N),_(N)};e.sha256FromArray=A;var T=function(N,q){N=(0,o.toBuffer)(N);var X=r("rmd160").update(N).digest();return q===!0?(0,o.setLengthLeft)(X,32):X},I=function(N,q){return(0,a.assertIsBuffer)(N),T(N,q)};e.ripemd160=I;var O=function(N,q){return(0,a.assertIsString)(N),T(N,q)};e.ripemd160FromString=O;var P=function(N,q){return(0,a.assertIsArray)(N),T(N,q)};e.ripemd160FromArray=P;var L=function(N){return(0,e.keccak)(n.rlp.encode(N))};e.rlphash=L})(Ed);var Cd={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=e.bnToRlp=e.bnToUnpaddedBuffer=e.bnToHex=void 0;var t=en,r=Kt,n=ja;function o(w){return"0x".concat(w.toString(16))}e.bnToHex=o;function a(w){return(0,n.unpadBuffer)(w.toArrayLike(ce))}e.bnToUnpaddedBuffer=a;function d(w){return a(w)}e.bnToRlp=d;var m;(function(w){w[w.Number=0]="Number",w[w.BN=1]="BN",w[w.Buffer=2]="Buffer",w[w.PrefixedHexString=3]="PrefixedHexString"})(m=e.TypeOutput||(e.TypeOutput={}));function y(w,M){if(w===null)return null;if(w!==void 0){if(typeof w=="string"&&!(0,r.isHexString)(w))throw new Error("A string must be provided with a 0x-prefix, given: ".concat(w));if(typeof w=="number"&&!Number.isSafeInteger(w))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var _=(0,n.toBuffer)(w);if(M===m.Buffer)return _;if(M===m.BN)return new t.BN(_);if(M===m.Number){var E=new t.BN(_),S=new t.BN(Number.MAX_SAFE_INTEGER.toString());if(E.gt(S))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return E.toNumber()}else return"0x".concat(_.toString("hex"))}}e.toType=y})(Cd);(function(e){var t=Qe&&Qe.__read||function($,h){var i=typeof Symbol=="function"&&$[Symbol.iterator];if(!i)return $;var f=i.call($),u,c=[],p;try{for(;(h===void 0||h-- >0)&&!(u=f.next()).done;)c.push(u.value)}catch(b){p={error:b}}finally{try{u&&!u.done&&(i=f.return)&&i.call(f)}finally{if(p)throw p.error}}return c},r=Qe&&Qe.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;var n=r($y),o=en,a=Ly,d=Kt,m=wy,y=ja,w=Ed,M=dn,_=Cd,E=function(){function $(h,i,f,u){h===void 0&&(h=new o.BN(0)),i===void 0&&(i=new o.BN(0)),f===void 0&&(f=m.KECCAK256_RLP),u===void 0&&(u=m.KECCAK256_NULL),this.nonce=h,this.balance=i,this.stateRoot=f,this.codeHash=u,this._validate()}return $.fromAccountData=function(h){var i=h.nonce,f=h.balance,u=h.stateRoot,c=h.codeHash;return new $(i?new o.BN((0,y.toBuffer)(i)):void 0,f?new o.BN((0,y.toBuffer)(f)):void 0,u?(0,y.toBuffer)(u):void 0,c?(0,y.toBuffer)(c):void 0)},$.fromRlpSerializedAccount=function(h){var i=o.rlp.decode(h);if(!Array.isArray(i))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(i)},$.fromValuesArray=function(h){var i=t(h,4),f=i[0],u=i[1],c=i[2],p=i[3];return new $(new o.BN(f),new o.BN(u),c,p)},$.prototype._validate=function(){if(this.nonce.lt(new o.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new o.BN(0)))throw new Error("balance must be greater than zero");if(this.stateRoot.length!==32)throw new Error("stateRoot must have a length of 32");if(this.codeHash.length!==32)throw new Error("codeHash must have a length of 32")},$.prototype.raw=function(){return[(0,_.bnToUnpaddedBuffer)(this.nonce),(0,_.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},$.prototype.serialize=function(){return o.rlp.encode(this.raw())},$.prototype.isContract=function(){return!this.codeHash.equals(m.KECCAK256_NULL)},$.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(m.KECCAK256_NULL)},$}();e.Account=E;var S=function($){try{(0,M.assertIsString)($)}catch{return!1}return/^0x[0-9a-fA-F]{40}$/.test($)};e.isValidAddress=S;var A=function($,h){(0,M.assertIsHexString)($);var i=(0,d.stripHexPrefix)($).toLowerCase(),f="";if(h){var u=(0,_.toType)(h,_.TypeOutput.BN);f=u.toString()+"0x"}for(var c=(0,w.keccakFromString)(f+i).toString("hex"),p="0x",b=0;b=8?p+=i[b].toUpperCase():p+=i[b];return p};e.toChecksumAddress=A;var T=function($,h){return(0,e.isValidAddress)($)&&(0,e.toChecksumAddress)($,h)===$};e.isValidChecksumAddress=T;var I=function($,h){(0,M.assertIsBuffer)($),(0,M.assertIsBuffer)(h);var i=new o.BN(h);return i.isZero()?(0,w.rlphash)([$,null]).slice(-20):(0,w.rlphash)([$,ce.from(i.toArray())]).slice(-20)};e.generateAddress=I;var O=function($,h,i){(0,M.assertIsBuffer)($),(0,M.assertIsBuffer)(h),(0,M.assertIsBuffer)(i),(0,n.default)($.length===20),(0,n.default)(h.length===32);var f=(0,w.keccak256)(ce.concat([ce.from("ff","hex"),$,h,(0,w.keccak256)(i)]));return f.slice(-20)};e.generateAddress2=O;var P=function($){return(0,a.privateKeyVerify)($)};e.isValidPrivate=P;var L=function($,h){return h===void 0&&(h=!1),(0,M.assertIsBuffer)($),$.length===64?(0,a.publicKeyVerify)(ce.concat([ce.from([4]),$])):h?(0,a.publicKeyVerify)($):!1};e.isValidPublic=L;var N=function($,h){return h===void 0&&(h=!1),(0,M.assertIsBuffer)($),h&&$.length!==64&&($=ce.from((0,a.publicKeyConvert)($,!1).slice(1))),(0,n.default)($.length===64),(0,w.keccak)($).slice(-20)};e.pubToAddress=N,e.publicToAddress=e.pubToAddress;var q=function($){return(0,M.assertIsBuffer)($),ce.from((0,a.publicKeyCreate)($,!1)).slice(1)};e.privateToPublic=q;var X=function($){return(0,e.publicToAddress)((0,e.privateToPublic)($))};e.privateToAddress=X;var J=function($){return(0,M.assertIsBuffer)($),$.length!==64&&($=ce.from((0,a.publicKeyConvert)($,!1).slice(1))),$};e.importPublic=J;var Z=function(){var $=20,h=(0,y.zeros)($);return(0,y.bufferToHex)(h)};e.zeroAddress=Z;var W=function($){try{(0,M.assertIsString)($)}catch{return!1}var h=(0,e.zeroAddress)();return h===$};e.isZeroAddress=W})(xy);var kd={},DZ=Qe&&Qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kd,"__esModule",{value:!0});kd.Address=void 0;var Ya=DZ($y),t0=en,N5=ja,Hf=xy,FZ=function(){function e(t){(0,Ya.default)(t.length===20,"Invalid address length"),this.buf=t}return e.zero=function(){return new e((0,N5.zeros)(20))},e.fromString=function(t){return(0,Ya.default)((0,Hf.isValidAddress)(t),"Invalid address"),new e((0,N5.toBuffer)(t))},e.fromPublicKey=function(t){(0,Ya.default)(ce.isBuffer(t),"Public key should be Buffer");var r=(0,Hf.pubToAddress)(t);return new e(r)},e.fromPrivateKey=function(t){(0,Ya.default)(ce.isBuffer(t),"Private key should be Buffer");var r=(0,Hf.privateToAddress)(t);return new e(r)},e.generate=function(t,r){return(0,Ya.default)(t0.BN.isBN(r)),new e((0,Hf.generateAddress)(t.buf,r.toArrayLike(ce)))},e.generate2=function(t,r,n){return(0,Ya.default)(ce.isBuffer(r)),(0,Ya.default)(ce.isBuffer(n)),new e((0,Hf.generateAddress2)(t.buf,r,n))},e.prototype.equals=function(t){return this.buf.equals(t.buf)},e.prototype.isZero=function(){return this.equals(e.zero())},e.prototype.isPrecompileOrSystemAddress=function(){var t=new t0.BN(this.buf),r=new t0.BN(0),n=new t0.BN("ffff","hex");return t.gte(r)&&t.lte(n)},e.prototype.toString=function(){return"0x"+this.buf.toString("hex")},e.prototype.toBuffer=function(){return ce.from(this.buf)},e}();kd.Address=FZ;var Fr={};Object.defineProperty(Fr,"__esModule",{value:!0});Fr.hashPersonalMessage=Fr.isValidSignature=Fr.fromRpcSig=Fr.toCompactSig=Fr.toRpcSig=Fr.ecrecover=Fr.ecsign=void 0;var lg=Ly,Yf=en,$n=ja,NZ=Ed,zZ=dn,si=Cd;function HZ(e,t,r){var n=(0,lg.ecdsaSign)(e,t),o=n.signature,a=n.recid,d=ce.from(o.slice(0,32)),m=ce.from(o.slice(32,64));if(!r||typeof r=="number"){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var y=r?a+(r*2+35):a+27;return{r:d,s:m,v:y}}var w=(0,si.toType)(r,si.TypeOutput.BN),M=w.muln(2).addn(35).addn(a).toArrayLike(ce);return{r:d,s:m,v:M}}Fr.ecsign=HZ;function Td(e,t){var r=(0,si.toType)(e,si.TypeOutput.BN);if(r.eqn(0)||r.eqn(1))return(0,si.toType)(e,si.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,si.toType)(t,si.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function Rd(e){var t=new Yf.BN(e);return t.eqn(0)||t.eqn(1)}var UZ=function(e,t,r,n,o){var a=ce.concat([(0,$n.setLengthLeft)(r,32),(0,$n.setLengthLeft)(n,32)],64),d=Td(t,o);if(!Rd(d))throw new Error("Invalid signature v value");var m=(0,lg.ecdsaRecover)(a,d.toNumber(),e);return ce.from((0,lg.publicKeyConvert)(m,!1).slice(1))};Fr.ecrecover=UZ;var jZ=function(e,t,r,n){var o=Td(e,n);if(!Rd(o))throw new Error("Invalid signature v value");return(0,$n.bufferToHex)(ce.concat([(0,$n.setLengthLeft)(t,32),(0,$n.setLengthLeft)(r,32),(0,$n.toBuffer)(e)]))};Fr.toRpcSig=jZ;var qZ=function(e,t,r,n){var o=Td(e,n);if(!Rd(o))throw new Error("Invalid signature v value");var a=(0,si.toType)(e,si.TypeOutput.Number),d=r;return(a>28&&a%2===1||a===1||a===28)&&(d=ce.from(r),d[0]|=128),(0,$n.bufferToHex)(ce.concat([(0,$n.setLengthLeft)(t,32),(0,$n.setLengthLeft)(d,32)]))};Fr.toCompactSig=qZ;var VZ=function(e){var t=(0,$n.toBuffer)(e),r,n,o;if(t.length>=65)r=t.slice(0,32),n=t.slice(32,64),o=(0,$n.bufferToInt)(t.slice(64));else if(t.length===64)r=t.slice(0,32),n=t.slice(32,64),o=(0,$n.bufferToInt)(t.slice(32,33))>>7,n[0]&=127;else throw new Error("Invalid signature length");return o<27&&(o+=27),{v:o,r,s:n}};Fr.fromRpcSig=VZ;var KZ=function(e,t,r,n,o){n===void 0&&(n=!0);var a=new Yf.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),d=new Yf.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(t.length!==32||r.length!==32||!Rd(Td(e,o)))return!1;var m=new Yf.BN(t),y=new Yf.BN(r);return!(m.isZero()||m.gt(d)||y.isZero()||y.gt(d)||n&&y.cmp(a)===1)};Fr.isValidSignature=KZ;var GZ=function(e){(0,zZ.assertIsBuffer)(e);var t=ce.from(`Ethereum Signed Message: `.concat(e.length),"utf-8");return(0,NZ.keccak)(ce.concat([t,e]))};Fr.hashPersonalMessage=GZ;var Od={},WZ=Qe&&Qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Od,"__esModule",{value:!0});Od.defineProperties=void 0;var z5=WZ($y),ZZ=Kt,H5=en,r0=ja,YZ=function(e,t,r){if(e.raw=[],e._fields=[],e.toJSON=function(o){if(o===void 0&&(o=!1),o){var a={};return e._fields.forEach(function(d){a[d]="0x".concat(e[d].toString("hex"))}),a}return(0,r0.baToJSON)(e.raw)},e.serialize=function(){return H5.rlp.encode(e.raw)},t.forEach(function(o,a){e._fields.push(o.name);function d(){return e.raw[a]}function m(y){y=(0,r0.toBuffer)(y),y.toString("hex")==="00"&&!o.allowZero&&(y=ce.allocUnsafe(0)),o.allowLess&&o.length?(y=(0,r0.unpadBuffer)(y),(0,z5.default)(o.length>=y.length,"The field ".concat(o.name," must not have more ").concat(o.length," bytes"))):!(o.allowZero&&y.length===0)&&o.length&&(0,z5.default)(o.length===y.length,"The field ".concat(o.name," must have byte length of ").concat(o.length)),e.raw[a]=y}Object.defineProperty(e,o.name,{enumerable:!0,configurable:!0,get:d,set:m}),o.default&&(e[o.name]=o.default),o.alias&&Object.defineProperty(e,o.alias,{enumerable:!1,configurable:!0,set:m,get:d})}),r)if(typeof r=="string"&&(r=ce.from((0,ZZ.stripHexPrefix)(r),"hex")),ce.isBuffer(r)&&(r=H5.rlp.decode(r)),Array.isArray(r)){if(r.length>e._fields.length)throw new Error("wrong number of fields in data");r.forEach(function(o,a){e[e._fields[a]]=(0,r0.toBuffer)(o)})}else if(typeof r=="object"){var n=Object.keys(r);t.forEach(function(o){n.indexOf(o.name)!==-1&&(e[o.name]=r[o.name]),n.indexOf(o.alias)!==-1&&(e[o.alias]=r[o.alias])})}else throw new Error("invalid data")};Od.defineProperties=YZ;(function(e){var t=Qe&&Qe.__createBinding||(Object.create?function(o,a,d,m){m===void 0&&(m=d);var y=Object.getOwnPropertyDescriptor(a,d);(!y||("get"in y?!a.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return a[d]}}),Object.defineProperty(o,m,y)}:function(o,a,d,m){m===void 0&&(m=d),o[m]=a[d]}),r=Qe&&Qe.__exportStar||function(o,a){for(var d in o)d!=="default"&&!Object.prototype.hasOwnProperty.call(a,d)&&t(a,o,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,r(wy,e),r(xy,e),r(kd,e),r(Ed,e),r(Fr,e),r(ja,e),r(Od,e),r(en,e),r(Cd,e);var n=Kt;Object.defineProperty(e,"isHexPrefixed",{enumerable:!0,get:function(){return n.isHexPrefixed}}),Object.defineProperty(e,"stripHexPrefix",{enumerable:!0,get:function(){return n.stripHexPrefix}}),Object.defineProperty(e,"padToEven",{enumerable:!0,get:function(){return n.padToEven}}),Object.defineProperty(e,"getBinarySize",{enumerable:!0,get:function(){return n.getBinarySize}}),Object.defineProperty(e,"arrayContainsArray",{enumerable:!0,get:function(){return n.arrayContainsArray}}),Object.defineProperty(e,"toAscii",{enumerable:!0,get:function(){return n.toAscii}}),Object.defineProperty(e,"fromUtf8",{enumerable:!0,get:function(){return n.fromUtf8}}),Object.defineProperty(e,"fromAscii",{enumerable:!0,get:function(){return n.fromAscii}}),Object.defineProperty(e,"getKeys",{enumerable:!0,get:function(){return n.getKeys}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return n.isHexString}})})(g_);var na={},df={},MS={exports:{}};(function(e){(function(){var t="input is invalid type",r="finalize already called",n=typeof window=="object",o=n?window:{};o.JS_SHA3_NO_WINDOW&&(n=!1);var a=!n&&typeof self=="object",d=!o.JS_SHA3_NO_NODE_JS&&typeof ot=="object"&&ot.versions&&ot.versions.node;d?o=Qe:a&&(o=self);var m=!o.JS_SHA3_NO_COMMON_JS&&!0&&e.exports,y=!o.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",w="0123456789abcdef".split(""),M=[31,7936,2031616,520093696],_=[4,1024,262144,67108864],E=[1,256,65536,16777216],S=[6,1536,393216,100663296],A=[0,8,16,24],T=[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],I=[224,256,384,512],O=[128,256],P=["hex","buffer","arrayBuffer","array","digest"],L={128:168,256:136};(o.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(k){return Object.prototype.toString.call(k)==="[object Array]"}),y&&(o.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(k){return typeof k=="object"&&k.buffer&&k.buffer.constructor===ArrayBuffer});for(var N=function(k,R,D){return function(z){return new x(k,R,k).update(z)[D]()}},q=function(k,R,D){return function(z,H){return new x(k,R,H).update(z)[D]()}},X=function(k,R,D){return function(z,H,V,U){return u["cshake"+k].update(z,H,V,U)[D]()}},J=function(k,R,D){return function(z,H,V,U){return u["kmac"+k].update(z,H,V,U)[D]()}},Z=function(k,R,D,z){for(var H=0;H>5,this.byteCount=this.blockCount<<2,this.outputBlocks=D>>5,this.extraBytes=(D&31)>>3;for(var z=0;z<50;++z)this.s[z]=0}x.prototype.update=function(k){if(this.finalized)throw new Error(r);var R,D=typeof k;if(D!=="string"){if(D==="object"){if(k===null)throw new Error(t);if(y&&k.constructor===ArrayBuffer)k=new Uint8Array(k);else if(!Array.isArray(k)&&(!y||!ArrayBuffer.isView(k)))throw new Error(t)}else throw new Error(t);R=!0}for(var z=this.blocks,H=this.byteCount,V=k.length,U=this.blockCount,F=0,G=this.s,ie,Y;F>2]|=k[F]<>2]|=Y<>2]|=(192|Y>>6)<>2]|=(128|Y&63)<=57344?(z[ie>>2]|=(224|Y>>12)<>2]|=(128|Y>>6&63)<>2]|=(128|Y&63)<>2]|=(240|Y>>18)<>2]|=(128|Y>>12&63)<>2]|=(128|Y>>6&63)<>2]|=(128|Y&63)<=H){for(this.start=ie-H,this.block=z[U],ie=0;ie>8,D=k&255;D>0;)H.unshift(D),k=k>>8,D=k&255,++z;return R?H.push(z):H.unshift(z),this.update(H),H.length},x.prototype.encodeString=function(k){var R,D=typeof k;if(D!=="string"){if(D==="object"){if(k===null)throw new Error(t);if(y&&k.constructor===ArrayBuffer)k=new Uint8Array(k);else if(!Array.isArray(k)&&(!y||!ArrayBuffer.isView(k)))throw new Error(t)}else throw new Error(t);R=!0}var z=0,H=k.length;if(R)z=H;else for(var V=0;V=57344?z+=3:(U=65536+((U&1023)<<10|k.charCodeAt(++V)&1023),z+=4)}return z+=this.encode(z*8),this.update(k),z},x.prototype.bytepad=function(k,R){for(var D=this.encode(R),z=0;z>2]|=this.padding[R&3],this.lastByteIndex===this.byteCount)for(k[0]=k[D],R=1;R>4&15]+w[F&15]+w[F>>12&15]+w[F>>8&15]+w[F>>20&15]+w[F>>16&15]+w[F>>28&15]+w[F>>24&15];V%k===0&&(B(R),H=0)}return z&&(F=R[H],U+=w[F>>4&15]+w[F&15],z>1&&(U+=w[F>>12&15]+w[F>>8&15]),z>2&&(U+=w[F>>20&15]+w[F>>16&15])),U},x.prototype.arrayBuffer=function(){this.finalize();var k=this.blockCount,R=this.s,D=this.outputBlocks,z=this.extraBytes,H=0,V=0,U=this.outputBits>>3,F;z?F=new ArrayBuffer(D+1<<2):F=new ArrayBuffer(U);for(var G=new Uint32Array(F);V>8&255,U[F+2]=G>>16&255,U[F+3]=G>>24&255;V%k===0&&B(R)}return z&&(F=V<<2,G=R[H],U[F]=G&255,z>1&&(U[F+1]=G>>8&255),z>2&&(U[F+2]=G>>16&255)),U};function C(k,R,D){x.call(this,k,R,D)}C.prototype=new x,C.prototype.finalize=function(){return this.encode(this.outputBits,!0),x.prototype.finalize.call(this)};var B=function(k){var R,D,z,H,V,U,F,G,ie,Y,oe,xe,ne,Q,te,ee,se,_e,K,re,Te,ae,Me,ze,fe,Se,He,ue,Ae,Ue,he,Ce,je,de,Oe,Ve,pe,Pe,Ke,ve,Be,Ge,me,Ie,We,ge,$e,Ze,ye,Le,Ye,be,De,Xe,we,Re,tt,rt,ut,lt,ht,ct,dt;for(z=0;z<48;z+=2)H=k[0]^k[10]^k[20]^k[30]^k[40],V=k[1]^k[11]^k[21]^k[31]^k[41],U=k[2]^k[12]^k[22]^k[32]^k[42],F=k[3]^k[13]^k[23]^k[33]^k[43],G=k[4]^k[14]^k[24]^k[34]^k[44],ie=k[5]^k[15]^k[25]^k[35]^k[45],Y=k[6]^k[16]^k[26]^k[36]^k[46],oe=k[7]^k[17]^k[27]^k[37]^k[47],xe=k[8]^k[18]^k[28]^k[38]^k[48],ne=k[9]^k[19]^k[29]^k[39]^k[49],R=xe^(U<<1|F>>>31),D=ne^(F<<1|U>>>31),k[0]^=R,k[1]^=D,k[10]^=R,k[11]^=D,k[20]^=R,k[21]^=D,k[30]^=R,k[31]^=D,k[40]^=R,k[41]^=D,R=H^(G<<1|ie>>>31),D=V^(ie<<1|G>>>31),k[2]^=R,k[3]^=D,k[12]^=R,k[13]^=D,k[22]^=R,k[23]^=D,k[32]^=R,k[33]^=D,k[42]^=R,k[43]^=D,R=U^(Y<<1|oe>>>31),D=F^(oe<<1|Y>>>31),k[4]^=R,k[5]^=D,k[14]^=R,k[15]^=D,k[24]^=R,k[25]^=D,k[34]^=R,k[35]^=D,k[44]^=R,k[45]^=D,R=G^(xe<<1|ne>>>31),D=ie^(ne<<1|xe>>>31),k[6]^=R,k[7]^=D,k[16]^=R,k[17]^=D,k[26]^=R,k[27]^=D,k[36]^=R,k[37]^=D,k[46]^=R,k[47]^=D,R=Y^(H<<1|V>>>31),D=oe^(V<<1|H>>>31),k[8]^=R,k[9]^=D,k[18]^=R,k[19]^=D,k[28]^=R,k[29]^=D,k[38]^=R,k[39]^=D,k[48]^=R,k[49]^=D,Q=k[0],te=k[1],ge=k[11]<<4|k[10]>>>28,$e=k[10]<<4|k[11]>>>28,ue=k[20]<<3|k[21]>>>29,Ae=k[21]<<3|k[20]>>>29,lt=k[31]<<9|k[30]>>>23,ht=k[30]<<9|k[31]>>>23,Ge=k[40]<<18|k[41]>>>14,me=k[41]<<18|k[40]>>>14,de=k[2]<<1|k[3]>>>31,Oe=k[3]<<1|k[2]>>>31,ee=k[13]<<12|k[12]>>>20,se=k[12]<<12|k[13]>>>20,Ze=k[22]<<10|k[23]>>>22,ye=k[23]<<10|k[22]>>>22,Ue=k[33]<<13|k[32]>>>19,he=k[32]<<13|k[33]>>>19,ct=k[42]<<2|k[43]>>>30,dt=k[43]<<2|k[42]>>>30,Xe=k[5]<<30|k[4]>>>2,we=k[4]<<30|k[5]>>>2,Ve=k[14]<<6|k[15]>>>26,pe=k[15]<<6|k[14]>>>26,_e=k[25]<<11|k[24]>>>21,K=k[24]<<11|k[25]>>>21,Le=k[34]<<15|k[35]>>>17,Ye=k[35]<<15|k[34]>>>17,Ce=k[45]<<29|k[44]>>>3,je=k[44]<<29|k[45]>>>3,ze=k[6]<<28|k[7]>>>4,fe=k[7]<<28|k[6]>>>4,Re=k[17]<<23|k[16]>>>9,tt=k[16]<<23|k[17]>>>9,Pe=k[26]<<25|k[27]>>>7,Ke=k[27]<<25|k[26]>>>7,re=k[36]<<21|k[37]>>>11,Te=k[37]<<21|k[36]>>>11,be=k[47]<<24|k[46]>>>8,De=k[46]<<24|k[47]>>>8,Ie=k[8]<<27|k[9]>>>5,We=k[9]<<27|k[8]>>>5,Se=k[18]<<20|k[19]>>>12,He=k[19]<<20|k[18]>>>12,rt=k[29]<<7|k[28]>>>25,ut=k[28]<<7|k[29]>>>25,ve=k[38]<<8|k[39]>>>24,Be=k[39]<<8|k[38]>>>24,ae=k[48]<<14|k[49]>>>18,Me=k[49]<<14|k[48]>>>18,k[0]=Q^~ee&_e,k[1]=te^~se&K,k[10]=ze^~Se&ue,k[11]=fe^~He&Ae,k[20]=de^~Ve&Pe,k[21]=Oe^~pe&Ke,k[30]=Ie^~ge&Ze,k[31]=We^~$e&ye,k[40]=Xe^~Re&rt,k[41]=we^~tt&ut,k[2]=ee^~_e&re,k[3]=se^~K&Te,k[12]=Se^~ue&Ue,k[13]=He^~Ae&he,k[22]=Ve^~Pe&ve,k[23]=pe^~Ke&Be,k[32]=ge^~Ze&Le,k[33]=$e^~ye&Ye,k[42]=Re^~rt<,k[43]=tt^~ut&ht,k[4]=_e^~re&ae,k[5]=K^~Te&Me,k[14]=ue^~Ue&Ce,k[15]=Ae^~he&je,k[24]=Pe^~ve&Ge,k[25]=Ke^~Be&me,k[34]=Ze^~Le&be,k[35]=ye^~Ye&De,k[44]=rt^~lt&ct,k[45]=ut^~ht&dt,k[6]=re^~ae&Q,k[7]=Te^~Me&te,k[16]=Ue^~Ce&ze,k[17]=he^~je&fe,k[26]=ve^~Ge&de,k[27]=Be^~me&Oe,k[36]=Le^~be&Ie,k[37]=Ye^~De&We,k[46]=lt^~ct&Xe,k[47]=ht^~dt&we,k[8]=ae^~Q&ee,k[9]=Me^~te&se,k[18]=Ce^~ze&Se,k[19]=je^~fe&He,k[28]=Ge^~de&Ve,k[29]=me^~Oe&pe,k[38]=be^~Ie&ge,k[39]=De^~We&$e,k[48]=ct^~Xe&Re,k[49]=dt^~we&tt,k[0]^=T[z],k[1]^=T[z+1]};if(m)e.exports=u;else for(p=0;p{const r=/^0x/i.test(e)||typeof e=="number";e=e.toString().replace(/^0x/i,"");const n=t-e.length+1>=0?t-e.length+1:0;return(r?"0x":"")+new Array(n).join("0")+e};function QZ(e){const t=[];for(let r=0;r>>4).toString(16)),t.push((e[r]&15).toString(16));return`0x${t.join("").replace(/^0+/,"")}`}df.bytesToHex=QZ;function xS(e){if(e==null)throw new Error("cannot convert null value to array");if(typeof e=="string"){const t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw new Error("invalid hexidecimal string");if(t[1]!=="0x")throw new Error("hex string must have 0x prefix");e=e.substring(2),e.length%2&&(e="0"+e);const r=[];for(let n=0;n=256||parseInt(String(r))!=r)return!1}return!0}function hg(e){return e.slice!==void 0||(e.slice=()=>{const t=Array.prototype.slice.call(arguments);return hg(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}Object.defineProperty(na,"__esModule",{value:!0});const cg=df;function Pd(e){return typeof e!="string"||!/^(0x)?[0-9a-f]{512}$/i.test(e)?!1:!!(/^(0x)?[0-9a-f]{512}$/.test(e)||/^(0x)?[0-9A-F]{512}$/.test(e))}na.isBloom=Pd;function Bd(e,t){typeof t=="object"&&t.constructor===Uint8Array&&(t=cg.bytesToHex(t));const r=cg.keccak256(t).replace("0x","");for(let n=0;n<12;n+=4){const o=(parseInt(r.substr(n,2),16)<<8)+parseInt(r.substr(n+2,2),16)&2047,a=tY(e.charCodeAt(e.length-1-Math.floor(o/4))),d=1<=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error("invalid bloom")}function rY(e,t){if(!Pd(e))throw new Error("Invalid bloom given");if(!r3(t))throw new Error(`Invalid ethereum address given: "${t}"`);const r=cg.padLeft(t,64);return Bd(e,r)}na.isUserEthereumAddressInBloom=rY;function nY(e,t){if(!Pd(e))throw new Error("Invalid bloom given");if(!r3(t))throw new Error(`Invalid contract address given: "${t}"`);return Bd(e,t)}na.isContractAddressInBloom=nY;function iY(e,t){if(!Pd(e))throw new Error("Invalid bloom given");if(!_S(t))throw new Error("Invalid topic");return Bd(e,t)}na.isTopicInBloom=iY;function _S(e){if(typeof e!="string")return!1;if(/^(0x)?[0-9a-f]{64}$/i.test(e)){if(/^(0x)?[0-9a-f]{64}$/.test(e)||/^(0x)?[0-9A-F]{64}$/.test(e))return!0}else return!1;return!1}na.isTopic=_S;function r3(e){return typeof e!="string"?!1:!!(e.match(/^(0x)?[0-9a-fA-F]{40}$/)||e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}na.isAddress=r3;var Vs=ra.exports,aY=J9,ES=m_,N0=g_,pf=na,n3=function(e){return Vs.isBN(e)},SS=function(e){return e&&e.constructor&&e.constructor.name==="BigNumber"},yl=function(e){try{return aY.apply(null,arguments)}catch(t){throw new Error(t+' Given value: "'+e+'"')}},oY=function(e){return"0x"+yl(e).toTwos(256).toString(16,64)},AS=function(e){return/^(0x)?[0-9a-f]{40}$/i.test(e)?/^(0x|0X)?[0-9a-f]{40}$/.test(e)||/^(0x|0X)?[0-9A-F]{40}$/.test(e)?!0:CS(e):!1},CS=function(e){e=e.replace(/^0x/i,"");for(var t=Id(e.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(t[r],16)>7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0},sY=function(e,t,r){var n=/^0x/i.test(e)||typeof e=="number";e=e.toString(16).replace(/^0x/i,"");var o=t-e.length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(o).join(r||"0")+e},fY=function(e,t,r){var n=/^0x/i.test(e)||typeof e=="number";e=e.toString(16).replace(/^0x/i,"");var o=t-e.length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(o).join(r||"0")},dg=function(e){e=ES.encode(e);var t="";e=e.replace(/^(?:\u0000)*/,""),e=e.split("").reverse().join(""),e=e.replace(/^(?:\u0000)*/,""),e=e.split("").reverse().join("");for(var r=0;r>>4).toString(16)),t.push((e[r]&15).toString(16));return"0x"+t.join("")},cY=function(e){if(e=e.toString(16),!Do(e))throw new Error('Given value "'+e+'" is not a valid hex string.');e=e.replace(/^0x/i,"");for(var t=[],r=0;r32||n256)throw new Error("Invalid uint"+n+" size");if(o=U5(t),o.bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+o.bitLength());if(o.lt(new so(0)))throw new Error("Supplied uint "+o.toString()+" is negative");return n?ln.leftPad(o.toString("hex"),n/8*2):o}else if(e.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if(o=U5(t),o.bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+o.bitLength());return o.lt(new so(0))?o.toTwos(n).toString("hex"):n?ln.leftPad(o.toString("hex"),n/8*2):o}else throw new Error("Unsupported or invalid type: "+e)},a3=function(e){if(Array.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r="",n,o;if(!!e&&typeof e=="object"&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,r=e.hasOwnProperty("v")?e.v:e.value):(t=ln.toHex(e,!0),r=ln.toHex(e),!t.startsWith("int")&&!t.startsWith("uint")&&(t="bytes")),(t.startsWith("int")||t.startsWith("uint"))&&typeof r=="string"&&!/^(-)?0x/i.test(r)&&(r=new so(r)),Array.isArray(r)){if(o=EY(t),o&&r.length!==o)throw new Error(t+" is not matching the given array "+JSON.stringify(r));o=r.length}return Array.isArray(r)?(n=r.map(function(a){return j5(t,a,o).toString("hex").replace("0x","")}),n.join("")):(n=j5(t,r,o),n.toString("hex").replace("0x",""))},SY=function(){var e=Array.prototype.slice.call(arguments),t=e.map(a3);return ln.sha3("0x"+t.join(""))},AY=function(){return ln.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(a3).join(""))},CY=function(){var e=Array.prototype.slice.call(arguments),t=e.map(a3);return"0x"+t.join("").toLowerCase()},kY={soliditySha3:SY,soliditySha3Raw:AY,encodePacked:CY},Mo=kH,pt=PS,mv=kY,TY=Ai.exports,q5=ra.exports,RY=function(e,t,r,n,o){return!!e&&typeof e=="object"&&!(e instanceof Error)&&e.data&&((!!e.data&&typeof e.data=="object"||Array.isArray(e.data))&&(e.data=JSON.stringify(e.data,null,2)),e=e.message+` `+e.data),typeof e=="string"&&(e=new Error(e)),typeof n=="function"&&n(e,o),typeof r=="function"&&((t&&typeof t.listeners=="function"&&t.listeners("error").length||typeof n=="function")&&t.catch(function(){}),setTimeout(function(){r(e)},1)),t&&typeof t.emit=="function"&&setTimeout(function(){t.emit("error",e,o),t.removeAllListeners()},1),t},OY=function(e){return!!e&&typeof e=="object"&&e.name&&e.name.indexOf("(")!==-1?e.name:e.name+"("+o3(!1,e.inputs).join(",")+")"},o3=function(e,t){var r=[];return t.forEach(function(n){if(typeof n.components=="object"){if(n.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");var o="",a=n.type.indexOf("[");a>=0&&(o=n.type.substring(a));var d=o3(e,n.components);Array.isArray(d)&&e?r.push("tuple("+d.join(",")+")"+o):e?r.push("("+d+")"):r.push("("+d.join(",")+")"+o)}else r.push(n.type)}),r},PY=function(e){return"0x"+TY(e).toString("hex")},V5=function(e){if(!pt.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for(e.substring(0,2)==="0x"&&(r=2);r"u")return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(e))throw new Error('Given address "'+e+'" is not a valid Ethereum address.');e=e.toLowerCase().replace(/^0x/i,"");for(var t=pt.sha3(e).replace(/^0x/i,""),r="0x",n=0;n7?r+=e[n].toUpperCase():r+=e[n];return r},LY=function(e,t){if(e===t)return 0;if((e==="genesis"||e==="earliest"||e===0)&&(t==="genesis"||t==="earliest"||t===0))return 0;if(e==="genesis"||e==="earliest"||e===0)return-1;if(t==="genesis"||t==="earliest"||t===0)return 1;if(e==="latest"||e==="finalized")return t==="pending"?-1:1;if(t==="latest"||t==="finalized")return e==="pending"?1:-1;if(e==="pending")return 1;if(t==="pending")return-1;if(e==="safe"||t==="safe")return;{let r=new q5(e),n=new q5(t);return r.lt(n)?-1:r.eq(n)?0:1}},DY={_fireError:RY,_jsonInterfaceMethodToString:OY,_flattenTypes:o3,randomHex:PY,BN:pt.BN,isBN:pt.isBN,isBigNumber:pt.isBigNumber,isHex:pt.isHex,isHexStrict:pt.isHexStrict,sha3:pt.sha3,sha3Raw:pt.sha3Raw,keccak256:pt.sha3,soliditySha3:mv.soliditySha3,soliditySha3Raw:mv.soliditySha3Raw,encodePacked:mv.encodePacked,isAddress:pt.isAddress,checkAddressChecksum:pt.checkAddressChecksum,toChecksumAddress:$Y,toHex:pt.toHex,toBN:pt.toBN,bytesToHex:pt.bytesToHex,hexToBytes:pt.hexToBytes,hexToNumberString:pt.hexToNumberString,hexToNumber:pt.hexToNumber,toDecimal:pt.hexToNumber,numberToHex:pt.numberToHex,fromDecimal:pt.numberToHex,hexToUtf8:pt.hexToUtf8,hexToString:pt.hexToUtf8,toUtf8:pt.hexToUtf8,stripHexPrefix:pt.stripHexPrefix,utf8ToHex:pt.utf8ToHex,stringToHex:pt.utf8ToHex,fromUtf8:pt.utf8ToHex,hexToAscii:V5,toAscii:V5,asciiToHex:K5,fromAscii:K5,unitMap:Mo.unitMap,toWei:IY,fromWei:BY,padLeft:pt.leftPad,leftPad:pt.leftPad,padRight:pt.rightPad,rightPad:pt.rightPad,toTwosComplement:pt.toTwosComplement,isBloom:pt.isBloom,isUserEthereumAddressInBloom:pt.isUserEthereumAddressInBloom,isContractAddressInBloom:pt.isContractAddressInBloom,isTopic:pt.isTopic,isTopicInBloom:pt.isTopicInBloom,isInBloom:pt.isInBloom,compareBlockNumbers:LY,toNumber:pt.toNumber};function IS(e,t){return function(){return e.apply(t,arguments)}}const{toString:$S}=Object.prototype,{getPrototypeOf:s3}=Object,f3=(e=>t=>{const r=$S.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ia=e=>(e=e.toLowerCase(),t=>f3(t)===e),$d=e=>t=>typeof t===e,{isArray:vf}=Array,qu=$d("undefined");function FY(e){return e!==null&&!qu(e)&&e.constructor!==null&&!qu(e.constructor)&&xo(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const LS=ia("ArrayBuffer");function NY(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&LS(e.buffer),t}const zY=$d("string"),xo=$d("function"),DS=$d("number"),u3=e=>e!==null&&typeof e=="object",HY=e=>e===!0||e===!1,z0=e=>{if(f3(e)!=="object")return!1;const t=s3(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},UY=ia("Date"),jY=ia("File"),qY=ia("Blob"),VY=ia("FileList"),KY=e=>u3(e)&&xo(e.pipe),GY=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||$S.call(e)===t||xo(e.toString)&&e.toString()===t)},WY=ia("URLSearchParams"),ZY=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bl(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),vf(e))for(n=0,o=e.length;n0;)if(o=r[n],t===o.toLowerCase())return o;return null}const NS=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ci)(),zS=e=>!qu(e)&&e!==NS;function vg(){const{caseless:e}=zS(this)&&this||{},t={},r=(n,o)=>{const a=e&&FS(t,o)||o;z0(t[a])&&z0(n)?t[a]=vg(t[a],n):z0(n)?t[a]=vg({},n):vf(n)?t[a]=n.slice():t[a]=n};for(let n=0,o=arguments.length;n(bl(t,(o,a)=>{r&&xo(o)?e[a]=IS(o,r):e[a]=o},{allOwnKeys:n}),e),XY=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),JY=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},QY=(e,t,r,n)=>{let o,a,d;const m={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)d=o[a],(!n||n(d,e,t))&&!m[d]&&(t[d]=e[d],m[d]=!0);e=r!==!1&&s3(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},eX=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},tX=e=>{if(!e)return null;if(vf(e))return e;let t=e.length;if(!DS(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},rX=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&s3(Uint8Array)),nX=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},iX=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},aX=ia("HTMLFormElement"),oX=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),G5=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),sX=ia("RegExp"),HS=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};bl(r,(o,a)=>{t(o,a,e)!==!1&&(n[a]=o)}),Object.defineProperties(e,n)},fX=e=>{HS(e,(t,r)=>{if(xo(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(!!xo(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},uX=(e,t)=>{const r={},n=o=>{o.forEach(a=>{r[a]=!0})};return vf(e)?n(e):n(String(e).split(t)),r},lX=()=>{},hX=(e,t)=>(e=+e,Number.isFinite(e)?e:t),cX=e=>{const t=new Array(10),r=(n,o)=>{if(u3(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const a=vf(n)?[]:{};return bl(n,(d,m)=>{const y=r(d,o+1);!qu(y)&&(a[m]=y)}),t[o]=void 0,a}}return n};return r(e,0)},Ne={isArray:vf,isArrayBuffer:LS,isBuffer:FY,isFormData:GY,isArrayBufferView:NY,isString:zY,isNumber:DS,isBoolean:HY,isObject:u3,isPlainObject:z0,isUndefined:qu,isDate:UY,isFile:jY,isBlob:qY,isRegExp:sX,isFunction:xo,isStream:KY,isURLSearchParams:WY,isTypedArray:rX,isFileList:VY,forEach:bl,merge:vg,extend:YY,trim:ZY,stripBOM:XY,inherits:JY,toFlatObject:QY,kindOf:f3,kindOfTest:ia,endsWith:eX,toArray:tX,forEachEntry:nX,matchAll:iX,isHTMLForm:aX,hasOwnProperty:G5,hasOwnProp:G5,reduceDescriptors:HS,freezeMethods:fX,toObjectSet:uX,toCamelCase:oX,noop:lX,toFiniteNumber:hX,findKey:FS,global:NS,isContextDefined:zS,toJSONObject:cX};function It(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}Ne.inherits(It,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ne.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const US=It.prototype,jS={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{jS[e]={value:e}});Object.defineProperties(It,jS);Object.defineProperty(US,"isAxiosError",{value:!0});It.from=(e,t,r,n,o,a)=>{const d=Object.create(US);return Ne.toFlatObject(e,d,function(y){return y!==Error.prototype},m=>m!=="isAxiosError"),It.call(d,e.message,t,r,n,o),d.cause=e,d.name=e.name,a&&Object.assign(d,a),d};var dX=typeof self=="object"?self.FormData:window.FormData;const pX=dX;function mg(e){return Ne.isPlainObject(e)||Ne.isArray(e)}function qS(e){return Ne.endsWith(e,"[]")?e.slice(0,-2):e}function W5(e,t,r){return e?e.concat(t).map(function(o,a){return o=qS(o),!r&&a?"["+o+"]":o}).join(r?".":""):t}function vX(e){return Ne.isArray(e)&&!e.some(mg)}const mX=Ne.toFlatObject(Ne,{},null,function(t){return/^is[A-Z]/.test(t)});function gX(e){return e&&Ne.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Ld(e,t,r){if(!Ne.isObject(e))throw new TypeError("target must be an object");t=t||new(pX||FormData),r=Ne.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,I){return!Ne.isUndefined(I[T])});const n=r.metaTokens,o=r.visitor||M,a=r.dots,d=r.indexes,y=(r.Blob||typeof Blob<"u"&&Blob)&&gX(t);if(!Ne.isFunction(o))throw new TypeError("visitor must be a function");function w(A){if(A===null)return"";if(Ne.isDate(A))return A.toISOString();if(!y&&Ne.isBlob(A))throw new It("Blob is not supported. Use a Buffer instead.");return Ne.isArrayBuffer(A)||Ne.isTypedArray(A)?y&&typeof Blob=="function"?new Blob([A]):ce.from(A):A}function M(A,T,I){let O=A;if(A&&!I&&typeof A=="object"){if(Ne.endsWith(T,"{}"))T=n?T:T.slice(0,-2),A=JSON.stringify(A);else if(Ne.isArray(A)&&vX(A)||Ne.isFileList(A)||Ne.endsWith(T,"[]")&&(O=Ne.toArray(A)))return T=qS(T),O.forEach(function(L,N){!(Ne.isUndefined(L)||L===null)&&t.append(d===!0?W5([T],N,a):d===null?T:T+"[]",w(L))}),!1}return mg(A)?!0:(t.append(W5(I,T,a),w(A)),!1)}const _=[],E=Object.assign(mX,{defaultVisitor:M,convertValue:w,isVisitable:mg});function S(A,T){if(!Ne.isUndefined(A)){if(_.indexOf(A)!==-1)throw Error("Circular reference detected in "+T.join("."));_.push(A),Ne.forEach(A,function(O,P){(!(Ne.isUndefined(O)||O===null)&&o.call(t,O,Ne.isString(P)?P.trim():P,T,E))===!0&&S(O,T?T.concat(P):[P])}),_.pop()}}if(!Ne.isObject(e))throw new TypeError("data must be an object");return S(e),t}function Z5(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function l3(e,t){this._pairs=[],e&&Ld(e,this,t)}const VS=l3.prototype;VS.append=function(t,r){this._pairs.push([t,r])};VS.toString=function(t){const r=t?function(n){return t.call(this,n,Z5)}:Z5;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function yX(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function KS(e,t,r){if(!t)return e;const n=r&&r.encode||yX,o=r&&r.serialize;let a;if(o?a=o(t,r):a=Ne.isURLSearchParams(t)?t.toString():new l3(t,r).toString(n),a){const d=e.indexOf("#");d!==-1&&(e=e.slice(0,d)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class bX{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ne.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Y5=bX,GS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wX=typeof URLSearchParams<"u"?URLSearchParams:l3,MX=FormData,xX=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),_X=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),di={isBrowser:!0,classes:{URLSearchParams:wX,FormData:MX,Blob},isStandardBrowserEnv:xX,isStandardBrowserWebWorkerEnv:_X,protocols:["http","https","file","blob","url","data"]};function EX(e,t){return Ld(e,new di.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,a){return di.isNode&&Ne.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function SX(e){return Ne.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function AX(e){const t={},r=Object.keys(e);let n;const o=r.length;let a;for(n=0;n=r.length;return d=!d&&Ne.isArray(o)?o.length:d,y?(Ne.hasOwnProp(o,d)?o[d]=[o[d],n]:o[d]=n,!m):((!o[d]||!Ne.isObject(o[d]))&&(o[d]=[]),t(r,n,o[d],a)&&Ne.isArray(o[d])&&(o[d]=AX(o[d])),!m)}if(Ne.isFormData(e)&&Ne.isFunction(e.entries)){const r={};return Ne.forEachEntry(e,(n,o)=>{t(SX(n),o,r,0)}),r}return null}const CX={"Content-Type":void 0};function kX(e,t,r){if(Ne.isString(e))try{return(t||JSON.parse)(e),Ne.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Dd={transitional:GS,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,a=Ne.isObject(t);if(a&&Ne.isHTMLForm(t)&&(t=new FormData(t)),Ne.isFormData(t))return o&&o?JSON.stringify(WS(t)):t;if(Ne.isArrayBuffer(t)||Ne.isBuffer(t)||Ne.isStream(t)||Ne.isFile(t)||Ne.isBlob(t))return t;if(Ne.isArrayBufferView(t))return t.buffer;if(Ne.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let m;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return EX(t,this.formSerializer).toString();if((m=Ne.isFileList(t))||n.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Ld(m?{"files[]":t}:t,y&&new y,this.formSerializer)}}return a||o?(r.setContentType("application/json",!1),kX(t)):t}],transformResponse:[function(t){const r=this.transitional||Dd.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&Ne.isString(t)&&(n&&!this.responseType||o)){const d=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(m){if(d)throw m.name==="SyntaxError"?It.from(m,It.ERR_BAD_RESPONSE,this,null,this.response):m}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:di.classes.FormData,Blob:di.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Ne.forEach(["delete","get","head"],function(t){Dd.headers[t]={}});Ne.forEach(["post","put","patch"],function(t){Dd.headers[t]=Ne.merge(CX)});const h3=Dd,TX=Ne.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),RX=e=>{const t={};let r,n,o;return e&&e.split(` `).forEach(function(d){o=d.indexOf(":"),r=d.substring(0,o).trim().toLowerCase(),n=d.substring(o+1).trim(),!(!r||t[r]&&TX[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},X5=Symbol("internals");function Uf(e){return e&&String(e).trim().toLowerCase()}function H0(e){return e===!1||e==null?e:Ne.isArray(e)?e.map(H0):String(e)}function OX(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}function PX(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function J5(e,t,r,n){if(Ne.isFunction(n))return n.call(this,t,r);if(!!Ne.isString(t)){if(Ne.isString(n))return t.indexOf(n)!==-1;if(Ne.isRegExp(n))return n.test(t)}}function BX(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function IX(e,t){const r=Ne.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,a,d){return this[n].call(this,t,o,a,d)},configurable:!0})})}class Fd{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function a(m,y,w){const M=Uf(y);if(!M)throw new Error("header name must be a non-empty string");const _=Ne.findKey(o,M);(!_||o[_]===void 0||w===!0||w===void 0&&o[_]!==!1)&&(o[_||y]=H0(m))}const d=(m,y)=>Ne.forEach(m,(w,M)=>a(w,M,y));return Ne.isPlainObject(t)||t instanceof this.constructor?d(t,r):Ne.isString(t)&&(t=t.trim())&&!PX(t)?d(RX(t),r):t!=null&&a(r,t,n),this}get(t,r){if(t=Uf(t),t){const n=Ne.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return OX(o);if(Ne.isFunction(r))return r.call(this,o,n);if(Ne.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Uf(t),t){const n=Ne.findKey(this,t);return!!(n&&(!r||J5(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function a(d){if(d=Uf(d),d){const m=Ne.findKey(n,d);m&&(!r||J5(n,n[m],m,r))&&(delete n[m],o=!0)}}return Ne.isArray(t)?t.forEach(a):a(t),o}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const r=this,n={};return Ne.forEach(this,(o,a)=>{const d=Ne.findKey(n,a);if(d){r[d]=H0(o),delete r[a];return}const m=t?BX(a):String(a).trim();m!==a&&delete r[a],r[m]=H0(o),n[m]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return Ne.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&Ne.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[X5]=this[X5]={accessors:{}}).accessors,o=this.prototype;function a(d){const m=Uf(d);n[m]||(IX(o,d),n[m]=!0)}return Ne.isArray(t)?t.forEach(a):a(t),this}}Fd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]);Ne.freezeMethods(Fd.prototype);Ne.freezeMethods(Fd);const qi=Fd;function gv(e,t){const r=this||h3,n=t||r,o=qi.from(n.headers);let a=n.data;return Ne.forEach(e,function(m){a=m.call(r,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function ZS(e){return!!(e&&e.__CANCEL__)}function wl(e,t,r){It.call(this,e==null?"canceled":e,It.ERR_CANCELED,t,r),this.name="CanceledError"}Ne.inherits(wl,It,{__CANCEL__:!0});const $X=null;function LX(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new It("Request failed with status code "+r.status,[It.ERR_BAD_REQUEST,It.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const DX=di.isStandardBrowserEnv?function(){return{write:function(r,n,o,a,d,m){const y=[];y.push(r+"="+encodeURIComponent(n)),Ne.isNumber(o)&&y.push("expires="+new Date(o).toGMTString()),Ne.isString(a)&&y.push("path="+a),Ne.isString(d)&&y.push("domain="+d),m===!0&&y.push("secure"),document.cookie=y.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function FX(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function NX(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function YS(e,t){return e&&!FX(t)?NX(e,t):t}const zX=di.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(a){let d=a;return t&&(r.setAttribute("href",d),d=r.href),r.setAttribute("href",d),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(d){const m=Ne.isString(d)?o(d):d;return m.protocol===n.protocol&&m.host===n.host}}():function(){return function(){return!0}}();function HX(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function UX(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,a=0,d;return t=t!==void 0?t:1e3,function(y){const w=Date.now(),M=n[a];d||(d=w),r[o]=y,n[o]=w;let _=a,E=0;for(;_!==o;)E+=r[_++],_=_%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),w-d{const a=o.loaded,d=o.lengthComputable?o.total:void 0,m=a-r,y=n(m),w=a<=d;r=a;const M={loaded:a,total:d,progress:d?a/d:void 0,bytes:m,rate:y||void 0,estimated:y&&d&&w?(d-a)/y:void 0,event:o};M[t?"download":"upload"]=!0,e(M)}}const jX=typeof XMLHttpRequest<"u",qX=jX&&function(e){return new Promise(function(r,n){let o=e.data;const a=qi.from(e.headers).normalize(),d=e.responseType;let m;function y(){e.cancelToken&&e.cancelToken.unsubscribe(m),e.signal&&e.signal.removeEventListener("abort",m)}Ne.isFormData(o)&&(di.isStandardBrowserEnv||di.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let w=new XMLHttpRequest;if(e.auth){const S=e.auth.username||"",A=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(S+":"+A))}const M=YS(e.baseURL,e.url);w.open(e.method.toUpperCase(),KS(M,e.params,e.paramsSerializer),!0),w.timeout=e.timeout;function _(){if(!w)return;const S=qi.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),T={data:!d||d==="text"||d==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:S,config:e,request:w};LX(function(O){r(O),y()},function(O){n(O),y()},T),w=null}if("onloadend"in w?w.onloadend=_:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(_)},w.onabort=function(){!w||(n(new It("Request aborted",It.ECONNABORTED,e,w)),w=null)},w.onerror=function(){n(new It("Network Error",It.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){let A=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const T=e.transitional||GS;e.timeoutErrorMessage&&(A=e.timeoutErrorMessage),n(new It(A,T.clarifyTimeoutError?It.ETIMEDOUT:It.ECONNABORTED,e,w)),w=null},di.isStandardBrowserEnv){const S=(e.withCredentials||zX(M))&&e.xsrfCookieName&&DX.read(e.xsrfCookieName);S&&a.set(e.xsrfHeaderName,S)}o===void 0&&a.setContentType(null),"setRequestHeader"in w&&Ne.forEach(a.toJSON(),function(A,T){w.setRequestHeader(T,A)}),Ne.isUndefined(e.withCredentials)||(w.withCredentials=!!e.withCredentials),d&&d!=="json"&&(w.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&w.addEventListener("progress",Q5(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",Q5(e.onUploadProgress)),(e.cancelToken||e.signal)&&(m=S=>{!w||(n(!S||S.type?new wl(null,e,w):S),w.abort(),w=null)},e.cancelToken&&e.cancelToken.subscribe(m),e.signal&&(e.signal.aborted?m():e.signal.addEventListener("abort",m)));const E=HX(M);if(E&&di.protocols.indexOf(E)===-1){n(new It("Unsupported protocol "+E+":",It.ERR_BAD_REQUEST,e));return}w.send(o||null)})},U0={http:$X,xhr:qX};Ne.forEach(U0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const VX={getAdapter:e=>{e=Ne.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;oe instanceof qi?e.toJSON():e;function Ks(e,t){t=t||{};const r={};function n(w,M,_){return Ne.isPlainObject(w)&&Ne.isPlainObject(M)?Ne.merge.call({caseless:_},w,M):Ne.isPlainObject(M)?Ne.merge({},M):Ne.isArray(M)?M.slice():M}function o(w,M,_){if(Ne.isUndefined(M)){if(!Ne.isUndefined(w))return n(void 0,w,_)}else return n(w,M,_)}function a(w,M){if(!Ne.isUndefined(M))return n(void 0,M)}function d(w,M){if(Ne.isUndefined(M)){if(!Ne.isUndefined(w))return n(void 0,w)}else return n(void 0,M)}function m(w,M,_){if(_ in t)return n(w,M);if(_ in e)return n(void 0,w)}const y={url:a,method:a,data:a,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:m,headers:(w,M)=>o(t8(w),t8(M),!0)};return Ne.forEach(Object.keys(e).concat(Object.keys(t)),function(M){const _=y[M]||o,E=_(e[M],t[M],M);Ne.isUndefined(E)&&_!==m||(r[M]=E)}),r}const XS="1.2.2",c3={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{c3[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const r8={};c3.transitional=function(t,r,n){function o(a,d){return"[Axios v"+XS+"] Transitional option '"+a+"'"+d+(n?". "+n:"")}return(a,d,m)=>{if(t===!1)throw new It(o(d," has been removed"+(r?" in "+r:"")),It.ERR_DEPRECATED);return r&&!r8[d]&&(r8[d]=!0,console.warn(o(d," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,d,m):!0}};function KX(e,t,r){if(typeof e!="object")throw new It("options must be an object",It.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const a=n[o],d=t[a];if(d){const m=e[a],y=m===void 0||d(m,a,e);if(y!==!0)throw new It("option "+a+" must be "+y,It.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new It("Unknown option "+a,It.ERR_BAD_OPTION)}}const gg={assertOptions:KX,validators:c3},ua=gg.validators;class zh{constructor(t){this.defaults=t,this.interceptors={request:new Y5,response:new Y5}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ks(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:a}=r;n!==void 0&&gg.assertOptions(n,{silentJSONParsing:ua.transitional(ua.boolean),forcedJSONParsing:ua.transitional(ua.boolean),clarifyTimeoutError:ua.transitional(ua.boolean)},!1),o!==void 0&&gg.assertOptions(o,{encode:ua.function,serialize:ua.function},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let d;d=a&&Ne.merge(a.common,a[r.method]),d&&Ne.forEach(["delete","get","head","post","put","patch","common"],A=>{delete a[A]}),r.headers=qi.concat(d,a);const m=[];let y=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(r)===!1||(y=y&&T.synchronous,m.unshift(T.fulfilled,T.rejected))});const w=[];this.interceptors.response.forEach(function(T){w.push(T.fulfilled,T.rejected)});let M,_=0,E;if(!y){const A=[e8.bind(this),void 0];for(A.unshift.apply(A,m),A.push.apply(A,w),E=A.length,M=Promise.resolve(r);_{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](o);n._listeners=null}),this.promise.then=o=>{let a;const d=new Promise(m=>{n.subscribe(m),a=m}).then(o);return d.cancel=function(){n.unsubscribe(a)},d},t(function(a,d,m){n.reason||(n.reason=new wl(a,d,m),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new d3(function(o){t=o}),cancel:t}}}const GX=d3;function WX(e){return function(r){return e.apply(null,r)}}function ZX(e){return Ne.isObject(e)&&e.isAxiosError===!0}const yg={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yg).forEach(([e,t])=>{yg[t]=e});const YX=yg;function JS(e){const t=new j0(e),r=IS(j0.prototype.request,t);return Ne.extend(r,j0.prototype,t,{allOwnKeys:!0}),Ne.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return JS(Ks(e,o))},r}const mr=JS(h3);mr.Axios=j0;mr.CanceledError=wl;mr.CancelToken=GX;mr.isCancel=ZS;mr.VERSION=XS;mr.toFormData=Ld;mr.AxiosError=It;mr.Cancel=mr.CanceledError;mr.all=function(t){return Promise.all(t)};mr.spread=WX;mr.isAxiosError=ZX;mr.mergeConfig=Ks;mr.AxiosHeaders=qi;mr.formToJSON=e=>WS(Ne.isHTMLForm(e)?new FormData(e):e);mr.HttpStatusCode=YX;mr.default=mr;const n8=mr;class XX{constructor(){yf(this,"baseUrl","https://hashex.org/api/auditor/verify-contract");yf(this,"token",{}.VITE_API_TOKEN);yf(this,"checkByAddress",async(t,r,n)=>{const{data:o}=await n8.get(this.baseUrl,{params:{address:t,blockchain:r,net:n}});return o});yf(this,"checkByText",async t=>{const{data:r}=await n8.post(this.baseUrl,{contract:t});return r})}}const i8=new XX,JX=ke.div` display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; `,QX=ke.label` font-style: normal; font-weight: 500; font-size: 14px; line-height: 130%; color: ${e=>e.theme.textColor}; `,eJ=ke.div` font-size: 10px; color: red; `,bg=({label:e,children:t,error:r,className:n})=>j.createElement(JX,{className:n},j.createElement(QX,null,e),t,r&&j.createElement(eJ,null,r)),tJ="/assets/spinner-green.bbd37da3.png",rJ=ke.section` display: flex; justify-content: center; margin: 0 auto; padding: 0 ${xi}; @media ${Ee.LAPTOP} { padding: 0 ${Ra}; } @media ${Ee.LAPTOP_LARGE} { padding: 0 ${_i}; } `,nJ=ke.div` display: flex; justify-content: center; flex-direction: column; gap: 30px; width: 100%; `,iJ=ke.div` gap: 28px; display: flex; flex-direction: column; justify-content: space-between; z-index: 10; background-color: ${Fe.WHITE}; box-sizing: border-box; margin-top: -10%; width: 100%; border-radius: 15px; padding: 23px 8px 40px; box-shadow: 2px 4px 15px ${Fe.BORDER_SHADOW}; @media ${Ee.TABLET} { padding-left: 12px; padding-right: 12px; } @media ${Ee.LAPTOP} { padding: 50px 25px; } @media ${Ee.LAPTOP_LARGE} { max-width: ${Ao}; padding: 50px 70px 65px; } `,aJ=ke(Hc)` display: flex !important; gap: 10px; width: 100%; padding: 15px 50px; @media ${Ee.TABLET} { width: max-content; } `,oJ=ke.div` position: relative; width: 100%; ${e=>e.disabled?` cursor: not-allowed; opacity: 0.5;`:""} `,sJ=ke.div` position: relative; margin-top: 50px; @media ${Ee.MOBILE_LARGE} { margin-top: 70px; } @media ${Ee.TABLET} { margin-top: 50px; } @media ${Ee.LAPTOP_LARGE} { margin-top: 55px; } `,fJ=ke.img` background-image: url(${tJ}); border-radius: 50%; background-repeat: no-repeat; background-size: cover; z-index: 10; padding: 20px; background-position: 50% 50%; top: 40%; position: absolute; left: 50%; width: 20px; height: 20px; animation-name: ${jR}; animation-duration: 1000ms; animation-iteration-count: infinite; animation-timing-function: linear; `,uJ=ke.div` align-items: center; gap: 10px; color: ${Fe.DARK_GREY}; position: relative; z-index: 1; cursor: pointer; display: flex; padding: 12px 22px; border-radius: 30px; margin-bottom: 8px; &:before, &:after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; } &:before { margin: -2px; border-radius: inherit; background: ${Fe.GRADIENT}; padding: 2px; -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; } &:after { z-index: -1; background: ${Fe.WHITE}; border-radius: 30px; opacity: 0; transition: 0.3s; } font-family: 'Avenir'; font-style: normal; font-weight: 400; font-size: 16px; line-height: 130%; & svg { color: ${Fe.DARK_GREY}; width: 18px; height: 18px; } `,lJ=ke.label` position: absolute; margin-top: 5px; font-style: normal; font-weight: 500; font-size: 14px; line-height: 130%; -webkit-line-clamp: 1; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-align: start; align-items: center; color: ${Fe.REQUIRED_ERROR}; `,a8=ke.span` text-align: center; font-family: 'Avenir'; font-style: normal; font-weight: 400; font-size: 14px; line-height: 130%; color: ${Fe.BLACK}; `,hJ=ke.div` padding: 24px; background: #fafafa; border: 2px dashed #908e8d; width: 100%; height: 100%; align-items: center; display: flex; justify-content: center; flex-direction: column; box-sizing: border-box; &:hover { cursor: pointer; } `,cJ=ke.button` border: 0; background: none; padding: 0; cursor: pointer; height: 16px; z-index: 100; `,dJ=ke(bg)` width: 100%; height: 100%; width: 100%; max-width: 670px; `,pJ=ke.div` display: flex; align-items: flex-start; flex-direction: column; width: 100%; height: 100%; gap: 44px; @media ${Ee.LAPTOP_LARGE} { flex-direction: row; align-items: center; } `;function _o(e){return _o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_o(e)}function vJ(e,t){if(_o(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_o(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QS(e){var t=vJ(e,"string");return _o(t)==="symbol"?t:String(t)}function Xf(e,t,r){return t=QS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ft(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&(r[o]=e[o]);return r}function mf(e,t){if(e==null)return{};var r=bJ(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}var wJ=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function MJ(e){var t=e.defaultInputValue,r=t===void 0?"":t,n=e.defaultMenuIsOpen,o=n===void 0?!1:n,a=e.defaultValue,d=a===void 0?null:a,m=e.inputValue,y=e.menuIsOpen,w=e.onChange,M=e.onInputChange,_=e.onMenuClose,E=e.onMenuOpen,S=e.value,A=mf(e,wJ),T=le.exports.useState(m!==void 0?m:r),I=Vi(T,2),O=I[0],P=I[1],L=le.exports.useState(y!==void 0?y:o),N=Vi(L,2),q=N[0],X=N[1],J=le.exports.useState(S!==void 0?S:d),Z=Vi(J,2),W=Z[0],$=Z[1],h=le.exports.useCallback(function(g,l){typeof w=="function"&&w(g,l),$(g)},[w]),i=le.exports.useCallback(function(g,l){var s;typeof M=="function"&&(s=M(g,l)),P(s!==void 0?s:g)},[M]),f=le.exports.useCallback(function(){typeof E=="function"&&E(),X(!0)},[E]),u=le.exports.useCallback(function(){typeof _=="function"&&_(),X(!1)},[_]),c=m!==void 0?m:O,p=y!==void 0?y:q,b=S!==void 0?S:W;return ft(ft({},A),{},{inputValue:c,menuIsOpen:p,onChange:h,onInputChange:i,onMenuClose:u,onMenuOpen:f,value:b})}function at(){return at=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function AJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CJ(e,t){if(t&&(_o(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AJ(e)}function kJ(e){var t=SJ();return function(){var n=Hh(e),o;if(t){var a=Hh(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return CJ(this,o)}}function TJ(e){if(Array.isArray(e))return wg(e)}function RJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tA(e){return TJ(e)||RJ(e)||eA(e)||OJ()}function PJ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Cr(gf,--nn):0,Gs--,cr===10&&(Gs=1,zd--),cr}function yn(){return cr=nn2||Ku(cr)>3?"":" "}function qJ(e,t){for(;--t&&yn()&&!(cr<48||cr>102||cr>57&&cr<65||cr>70&&cr<97););return Ml(e,q0()+(t<6&&Mi()==32&&yn()==32))}function _g(e){for(;yn();)switch(cr){case e:return nn;case 34:case 39:e!==34&&e!==39&&_g(cr);break;case 40:e===41&&_g(e);break;case 92:yn();break}return nn}function VJ(e,t){for(;yn()&&e+cr!==47+10;)if(e+cr===42+42&&Mi()===47)break;return"/*"+Ml(t,nn-1)+"*"+Nd(e===47?e:yn())}function KJ(e){for(;!Ku(Mi());)yn();return Ml(e,nn)}function GJ(e){return sA(K0("",null,null,null,[""],e=oA(e),0,[0],e))}function K0(e,t,r,n,o,a,d,m,y){for(var w=0,M=0,_=d,E=0,S=0,A=0,T=1,I=1,O=1,P=0,L="",N=o,q=a,X=n,J=L;I;)switch(A=P,P=yn()){case 40:if(A!=108&&Cr(J,_-1)==58){xg(J+=Nt(V0(P),"&","&\f"),"&\f")!=-1&&(O=-1);break}case 34:case 39:case 91:J+=V0(P);break;case 9:case 10:case 13:case 32:J+=jJ(A);break;case 92:J+=qJ(q0()-1,7);continue;case 47:switch(Mi()){case 42:case 47:n0(WJ(VJ(yn(),q0()),t,r),y);break;default:J+="/"}break;case 123*T:m[w++]=fi(J)*O;case 125*T:case 59:case 0:switch(P){case 0:case 125:I=0;case 59+M:S>0&&fi(J)-_&&n0(S>32?u8(J+";",n,r,_-1):u8(Nt(J," ","")+";",n,r,_-2),y);break;case 59:J+=";";default:if(n0(X=f8(J,t,r,w,M,o,m,L,N=[],q=[],_),a),P===123)if(M===0)K0(J,t,X,X,N,a,_,m,q);else switch(E===99&&Cr(J,3)===110?100:E){case 100:case 109:case 115:K0(e,X,X,n&&n0(f8(e,X,X,0,0,o,m,L,o,N=[],_),q),o,q,_,m,n?N:q);break;default:K0(J,X,X,X,[""],q,0,m,q)}}w=M=S=0,T=O=1,L=J="",_=d;break;case 58:_=1+fi(J),S=A;default:if(T<1){if(P==123)--T;else if(P==125&&T++==0&&UJ()==125)continue}switch(J+=Nd(P),P*T){case 38:O=M>0?1:(J+="\f",-1);break;case 44:m[w++]=(fi(J)-1)*O,O=1;break;case 64:Mi()===45&&(J+=V0(yn())),E=Mi(),M=_=fi(L=J+=KJ(q0())),P++;break;case 45:A===45&&fi(J)==2&&(T=0)}}return a}function f8(e,t,r,n,o,a,d,m,y,w,M){for(var _=o-1,E=o===0?a:[""],S=m3(E),A=0,T=0,I=0;A0?E[O]+" "+P:Nt(P,/&\f/g,E[O])))&&(y[I++]=L);return Hd(e,t,r,o===0?p3:m,y,w,M)}function WJ(e,t,r){return Hd(e,t,r,rA,Nd(HJ()),Vu(e,2,-2),0)}function u8(e,t,r,n){return Hd(e,t,r,v3,Vu(e,0,n),Vu(e,n+1,-1),n)}function xs(e,t){for(var r="",n=m3(e),o=0;o6)switch(Cr(e,t+1)){case 109:if(Cr(e,t+4)!==45)break;case 102:return Nt(e,/(.+:)(.+)-([^]+)/,"$1"+Ft+"$2-$3$1"+Uh+(Cr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~xg(e,"stretch")?fA(Nt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Cr(e,t+1)!==115)break;case 6444:switch(Cr(e,fi(e)-3-(~xg(e,"!important")&&10))){case 107:return Nt(e,":",":"+Ft)+e;case 101:return Nt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ft+(Cr(e,14)===45?"inline-":"")+"box$3$1"+Ft+"$2$3$1"+Dr+"$2box$3")+e}break;case 5936:switch(Cr(e,t+11)){case 114:return Ft+e+Dr+Nt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ft+e+Dr+Nt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ft+e+Dr+Nt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ft+e+Dr+e+e}return e}var nQ=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case v3:t.return=fA(t.value,t.length);break;case nA:return xs([jf(t,{value:Nt(t.value,"@","@"+Ft)})],o);case p3:if(t.length)return zJ(t.props,function(a){switch(NJ(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return xs([jf(t,{props:[Nt(a,/:(read-\w+)/,":"+Uh+"$1")]})],o);case"::placeholder":return xs([jf(t,{props:[Nt(a,/:(plac\w+)/,":"+Ft+"input-$1")]}),jf(t,{props:[Nt(a,/:(plac\w+)/,":"+Uh+"$1")]}),jf(t,{props:[Nt(a,/:(plac\w+)/,Dr+"input-$1")]})],o)}return""})}},iQ=[nQ],aQ=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(T){var I=T.getAttribute("data-emotion");I.indexOf(" ")!==-1&&(document.head.appendChild(T),T.setAttribute("data-s",""))})}var o=t.stylisPlugins||iQ,a={},d,m=[];d=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(T){for(var I=T.getAttribute("data-emotion").split(" "),O=1;O=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var lQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hQ=/[A-Z]|^ms/g,cQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,lA=function(t){return t.charCodeAt(1)===45},h8=function(t){return t!=null&&typeof t!="boolean"},bv=J7(function(e){return lA(e)?e:e.replace(hQ,"-$&").toLowerCase()}),c8=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(cQ,function(n,o,a){return ui={name:o,styles:a,next:ui},o})}return lQ[t]!==1&&!lA(t)&&typeof r=="number"&&r!==0?r+"px":r};function Gu(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return ui={name:r.name,styles:r.styles,next:ui},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)ui={name:n.name,styles:n.styles,next:ui},n=n.next;var o=r.styles+";";return o}return dQ(e,t,r)}case"function":{if(e!==void 0){var a=ui,d=r(e);return ui=a,Gu(e,t,d)}break}}if(t==null)return r;var m=t[r];return m!==void 0?m:r}function dQ(e,t,r){var n="";if(Array.isArray(r))for(var o=0;ot.brand+"/"+t.version).join(" "),i0):navigator.userAgent}function vA(e){return e instanceof pi(e).HTMLElement}function _s(e){return e instanceof pi(e).Element}function mA(e){return e instanceof pi(e).Node}function p8(e){if(typeof ShadowRoot>"u")return!1;const t=pi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function gA(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=dA(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function SQ(){return!/^((?!chrome|android).)*safari/i.test(EQ())}function AQ(e){return["html","body","#document"].includes(pA(e))}const jh=Math.round;function CQ(e){const t=dA(e);let r=parseFloat(t.width),n=parseFloat(t.height);const o=e.offsetWidth,a=e.offsetHeight,d=jh(r)!==o||jh(n)!==a;return d&&(r=o,n=a),{width:r,height:n,fallback:d}}function yA(e){return _s(e)?e:e.contextElement}const bA={x:1,y:1};function wv(e){const t=yA(e);if(!vA(t))return bA;const r=t.getBoundingClientRect(),{width:n,height:o,fallback:a}=CQ(t);let d=(a?jh(r.width):r.width)/n,m=(a?jh(r.height):r.height)/o;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}function v8(e,t,r,n){var o,a;t===void 0&&(t=!1),r===void 0&&(r=!1);const d=e.getBoundingClientRect(),m=yA(e);let y=bA;t&&(n?_s(n)&&(y=wv(n)):y=wv(e));const w=m?pi(m):window,M=!SQ()&&r;let _=(d.left+(M&&((o=w.visualViewport)==null?void 0:o.offsetLeft)||0))/y.x,E=(d.top+(M&&((a=w.visualViewport)==null?void 0:a.offsetTop)||0))/y.y,S=d.width/y.x,A=d.height/y.y;if(m){const T=pi(m),I=n&&_s(n)?pi(n):n;let O=T.frameElement;for(;O&&n&&I!==T;){const P=wv(O),L=O.getBoundingClientRect(),N=getComputedStyle(O);L.x+=(O.clientLeft+parseFloat(N.paddingLeft))*P.x,L.y+=(O.clientTop+parseFloat(N.paddingTop))*P.y,_*=P.x,E*=P.y,S*=P.x,A*=P.y,_+=L.x,E+=L.y,O=pi(O).frameElement}}return{width:S,height:A,top:E,right:_+S,bottom:E+A,left:_,x:_,y:E}}function kQ(e){return((mA(e)?e.ownerDocument:e.document)||window.document).documentElement}function TQ(e){if(pA(e)==="html")return e;const t=e.assignedSlot||e.parentNode||(p8(e)?e.host:null)||kQ(e);return p8(t)?t.host:t}function wA(e){const t=TQ(e);return AQ(t)?e.ownerDocument.body:vA(t)&&gA(t)?t:wA(t)}function G0(e,t){var r;t===void 0&&(t=[]);const n=wA(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),a=pi(n);return o?t.concat(a,a.visualViewport||[],gA(n)?n:[]):t.concat(n,G0(n))}function RQ(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:d=!0,animationFrame:m=!1}=n,y=o&&!m,w=y||a?[..._s(e)?G0(e):e.contextElement?G0(e.contextElement):[],...G0(t)]:[];w.forEach(A=>{y&&A.addEventListener("scroll",r,{passive:!0}),a&&A.addEventListener("resize",r)});let M=null;if(d){let A=!0;M=new ResizeObserver(()=>{A||r(),A=!1}),_s(e)&&!m&&M.observe(e),!_s(e)&&e.contextElement&&!m&&M.observe(e.contextElement),M.observe(t)}let _,E=m?v8(e):null;m&&S();function S(){const A=v8(e);E&&(A.x!==E.x||A.y!==E.y||A.width!==E.width||A.height!==E.height)&&r(),E=A,_=requestAnimationFrame(S)}return r(),()=>{var A;w.forEach(T=>{y&&T.removeEventListener("scroll",r),a&&T.removeEventListener("resize",r)}),(A=M)==null||A.disconnect(),M=null,m&&cancelAnimationFrame(_)}}var Sg=le.exports.useLayoutEffect,OQ=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],qh=function(){};function PQ(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function BQ(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o-1}function IQ(e){return Ud(e)?window.innerHeight:e.clientHeight}function xA(e){return Ud(e)?window.pageYOffset:e.scrollTop}function Vh(e,t){if(Ud(e)){window.scrollTo(0,t);return}e.scrollTop=t}function $Q(e){var t=getComputedStyle(e),r=t.position==="absolute",n=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(r&&t.position==="static")&&n.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function LQ(e,t,r,n){return r*((e=e/n-1)*e*e+1)+t}function a0(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:qh,o=xA(e),a=t-o,d=10,m=0;function y(){m+=d;var w=LQ(m,o,a,r);Vh(e,w),mr.bottom?Vh(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):n.top-o1?r-1:0),o=1;o=A)return{placement:"bottom",maxHeight:t};if(W>=A&&!d)return a&&a0(y,$,i),{placement:"bottom",maxHeight:t};if(!d&&W>=n||d&&J>=n){a&&a0(y,$,i);var f=d?J-N:W-N;return{placement:"bottom",maxHeight:f}}if(o==="auto"||d){var u=t,c=d?X:Z;return c>=n&&(u=Math.min(c-N-m,t)),{placement:"top",maxHeight:u}}if(o==="bottom")return a&&Vh(y,$),{placement:"bottom",maxHeight:t};break;case"top":if(X>=A)return{placement:"top",maxHeight:t};if(Z>=A&&!d)return a&&a0(y,h,i),{placement:"top",maxHeight:t};if(!d&&Z>=n||d&&X>=n){var p=t;return(!d&&Z>=n||d&&X>=n)&&(p=d?X-q:Z-q),a&&a0(y,h,i),{placement:"top",maxHeight:p}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return w}function VQ(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var EA=function(t){return t==="auto"?"bottom":t},KQ=function(t,r){var n,o=t.placement,a=t.theme,d=a.borderRadius,m=a.spacing,y=a.colors;return ft((n={label:"menu"},Xf(n,VQ(o),"100%"),Xf(n,"position","absolute"),Xf(n,"width","100%"),Xf(n,"zIndex",1),n),r?{}:{backgroundColor:y.neutral0,borderRadius:d,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:m.menuGutter,marginTop:m.menuGutter})},SA=le.exports.createContext(null),GQ=function(t){var r=t.children,n=t.minMenuHeight,o=t.maxMenuHeight,a=t.menuPlacement,d=t.menuPosition,m=t.menuShouldScrollIntoView,y=t.theme,w=le.exports.useContext(SA)||{},M=w.setPortalPlacement,_=le.exports.useRef(null),E=le.exports.useState(o),S=Vi(E,2),A=S[0],T=S[1],I=le.exports.useState(null),O=Vi(I,2),P=O[0],L=O[1],N=y.spacing.controlHeight;return Sg(function(){var q=_.current;if(!!q){var X=d==="fixed",J=m&&!X,Z=qQ({maxHeight:o,menuEl:q,minHeight:n,placement:a,shouldScroll:J,isFixedPosition:X,controlHeight:N});T(Z.maxHeight),L(Z.placement),M==null||M(Z.placement)}},[o,a,d,m,n,M,N]),r({ref:_,placerProps:ft(ft({},t),{},{placement:P||EA(a),maxHeight:A})})},WQ=function(t){var r=t.children,n=t.innerRef,o=t.innerProps;return it("div",at({},ur(t,"menu",{menu:!0}),{ref:n},o),r)},ZQ=function(t,r){var n=t.maxHeight,o=t.theme.spacing.baseUnit;return ft({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},r?{}:{paddingBottom:o,paddingTop:o})},YQ=function(t){var r=t.children,n=t.innerProps,o=t.innerRef,a=t.isMulti;return it("div",at({},ur(t,"menuList",{"menu-list":!0,"menu-list--is-multi":a}),{ref:o},n),r)},AA=function(t,r){var n=t.theme,o=n.spacing.baseUnit,a=n.colors;return ft({textAlign:"center"},r?{}:{color:a.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},XQ=AA,JQ=AA,CA=function(t){var r=t.children,n=t.innerProps;return it("div",at({},ur(t,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),r)};CA.defaultProps={children:"No options"};var kA=function(t){var r=t.children,n=t.innerProps;return it("div",at({},ur(t,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),r)};kA.defaultProps={children:"Loading..."};var QQ=function(t){var r=t.rect,n=t.offset,o=t.position;return{left:r.left,position:o,top:n,width:r.width,zIndex:1}},eee=function(t){var r=t.appendTo,n=t.children,o=t.controlElement,a=t.innerProps,d=t.menuPlacement,m=t.menuPosition,y=le.exports.useRef(null),w=le.exports.useRef(null),M=le.exports.useState(EA(d)),_=Vi(M,2),E=_[0],S=_[1],A=le.exports.useMemo(function(){return{setPortalPlacement:S}},[]),T=le.exports.useState(null),I=Vi(T,2),O=I[0],P=I[1],L=le.exports.useCallback(function(){if(!!o){var J=DQ(o),Z=m==="fixed"?0:window.pageYOffset,W=J[E]+Z;(W!==(O==null?void 0:O.offset)||J.left!==(O==null?void 0:O.rect.left)||J.width!==(O==null?void 0:O.rect.width))&&P({offset:W,rect:J})}},[o,m,E,O==null?void 0:O.offset,O==null?void 0:O.rect.left,O==null?void 0:O.rect.width]);Sg(function(){L()},[L]);var N=le.exports.useCallback(function(){typeof w.current=="function"&&(w.current(),w.current=null),o&&y.current&&(w.current=RQ(o,y.current,L,{elementResize:"ResizeObserver"in window}))},[o,L]);Sg(function(){N()},[N]);var q=le.exports.useCallback(function(J){y.current=J,N()},[N]);if(!r&&m!=="fixed"||!O)return null;var X=it("div",at({ref:q},ur(ft(ft({},t),{},{offset:O.offset,position:m,rect:O.rect}),"menuPortal",{"menu-portal":!0}),a),n);return it(SA.Provider,{value:A},r?Ig.exports.createPortal(X,r):X)},tee=function(t){var r=t.isDisabled,n=t.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:r?"none":void 0,position:"relative"}},ree=function(t){var r=t.children,n=t.innerProps,o=t.isDisabled,a=t.isRtl;return it("div",at({},ur(t,"container",{"--is-disabled":o,"--is-rtl":a}),n),r)},nee=function(t,r){var n=t.theme.spacing,o=t.isMulti,a=t.hasValue,d=t.selectProps.controlShouldRenderValue;return ft({alignItems:"center",display:o&&a&&d?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},r?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},iee=function(t){var r=t.children,n=t.innerProps,o=t.isMulti,a=t.hasValue;return it("div",at({},ur(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a}),n),r)},aee=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},oee=function(t){var r=t.children,n=t.innerProps;return it("div",at({},ur(t,"indicatorsContainer",{indicators:!0}),n),r)},b8,see=["size"],fee={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},TA=function(t){var r=t.size,n=mf(t,see);return it("svg",at({height:r,width:r,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:fee},n))},b3=function(t){return it(TA,at({size:20},t),it("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},RA=function(t){return it(TA,at({size:20},t),it("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},OA=function(t,r){var n=t.isFocused,o=t.theme,a=o.spacing.baseUnit,d=o.colors;return ft({label:"indicatorContainer",display:"flex",transition:"color 150ms"},r?{}:{color:n?d.neutral60:d.neutral20,padding:a*2,":hover":{color:n?d.neutral80:d.neutral40}})},uee=OA,lee=function(t){var r=t.children,n=t.innerProps;return it("div",at({},ur(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),r||it(RA,null))},hee=OA,cee=function(t){var r=t.children,n=t.innerProps;return it("div",at({},ur(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),r||it(b3,null))},dee=function(t,r){var n=t.isDisabled,o=t.theme,a=o.spacing.baseUnit,d=o.colors;return ft({label:"indicatorSeparator",alignSelf:"stretch",width:1},r?{}:{backgroundColor:n?d.neutral10:d.neutral20,marginBottom:a*2,marginTop:a*2})},pee=function(t){var r=t.innerProps;return it("span",at({},r,ur(t,"indicatorSeparator",{"indicator-separator":!0})))},vee=xQ(b8||(b8=_Q([` 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } `]))),mee=function(t,r){var n=t.isFocused,o=t.size,a=t.theme,d=a.colors,m=a.spacing.baseUnit;return ft({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},r?{}:{color:n?d.neutral60:d.neutral20,padding:m*2})},Mv=function(t){var r=t.delay,n=t.offset;return it("span",{css:y3({animation:"".concat(vee," 1s ease-in-out ").concat(r,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},PA=function(t){var r=t.innerProps,n=t.isRtl;return it("div",at({},ur(t,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),r),it(Mv,{delay:0,offset:n}),it(Mv,{delay:160,offset:!0}),it(Mv,{delay:320,offset:!n}))};PA.defaultProps={size:4};var gee=function(t,r){var n=t.isDisabled,o=t.isFocused,a=t.theme,d=a.colors,m=a.borderRadius,y=a.spacing;return ft({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:y.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},r?{}:{backgroundColor:n?d.neutral5:d.neutral0,borderColor:n?d.neutral10:o?d.primary:d.neutral20,borderRadius:m,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(d.primary):void 0,"&:hover":{borderColor:o?d.primary:d.neutral30}})},yee=function(t){var r=t.children,n=t.isDisabled,o=t.isFocused,a=t.innerRef,d=t.innerProps,m=t.menuIsOpen;return it("div",at({ref:a},ur(t,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":m}),d),r)},bee=["data"],wee=function(t,r){var n=t.theme.spacing;return r?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},Mee=function(t){var r=t.children,n=t.cx,o=t.getStyles,a=t.getClassNames,d=t.Heading,m=t.headingProps,y=t.innerProps,w=t.label,M=t.theme,_=t.selectProps;return it("div",at({},ur(t,"group",{group:!0}),y),it(d,at({},m,{selectProps:_,theme:M,getStyles:o,getClassNames:a,cx:n}),w),it("div",null,r))},xee=function(t,r){var n=t.theme,o=n.colors,a=n.spacing;return ft({label:"group",cursor:"default",display:"block"},r?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},_ee=function(t){var r=MA(t);r.data;var n=mf(r,bee);return it("div",at({},ur(t,"groupHeading",{"group-heading":!0}),n))},Eee=["innerRef","isDisabled","isHidden","inputClassName"],See=function(t,r){var n=t.isDisabled,o=t.value,a=t.theme,d=a.spacing,m=a.colors;return ft(ft({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},Aee),r?{}:{margin:d.baseUnit/2,paddingBottom:d.baseUnit/2,paddingTop:d.baseUnit/2,color:m.neutral80})},BA={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Aee={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ft({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},BA)},Cee=function(t){return ft({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},BA)},kee=function(t){var r=t.cx,n=t.value,o=MA(t),a=o.innerRef,d=o.isDisabled,m=o.isHidden,y=o.inputClassName,w=mf(o,Eee);return it("div",at({},ur(t,"input",{"input-container":!0}),{"data-value":n||""}),it("input",at({className:r({input:!0},y),ref:a,style:Cee(m),disabled:d},w)))},Tee=function(t,r){var n=t.theme,o=n.spacing,a=n.borderRadius,d=n.colors;return ft({label:"multiValue",display:"flex",minWidth:0},r?{}:{backgroundColor:d.neutral10,borderRadius:a/2,margin:o.baseUnit/2})},Ree=function(t,r){var n=t.theme,o=n.borderRadius,a=n.colors,d=t.cropWithEllipsis;return ft({overflow:"hidden",textOverflow:d||d===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},r?{}:{borderRadius:o/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Oee=function(t,r){var n=t.theme,o=n.spacing,a=n.borderRadius,d=n.colors,m=t.isFocused;return ft({alignItems:"center",display:"flex"},r?{}:{borderRadius:a/2,backgroundColor:m?d.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:d.dangerLight,color:d.danger}})},IA=function(t){var r=t.children,n=t.innerProps;return it("div",n,r)},Pee=IA,Bee=IA;function Iee(e){var t=e.children,r=e.innerProps;return it("div",at({role:"button"},r),t||it(b3,{size:14}))}var $ee=function(t){var r=t.children,n=t.components,o=t.data,a=t.innerProps,d=t.isDisabled,m=t.removeProps,y=t.selectProps,w=n.Container,M=n.Label,_=n.Remove;return it(w,{data:o,innerProps:ft(ft({},ur(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":d})),a),selectProps:y},it(M,{data:o,innerProps:ft({},ur(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:y},r),it(_,{data:o,innerProps:ft(ft({},ur(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(r||"option")},m),selectProps:y}))},Lee=function(t,r){var n=t.isDisabled,o=t.isFocused,a=t.isSelected,d=t.theme,m=d.spacing,y=d.colors;return ft({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},r?{}:{backgroundColor:a?y.primary:o?y.primary25:"transparent",color:n?y.neutral20:a?y.neutral0:"inherit",padding:"".concat(m.baseUnit*2,"px ").concat(m.baseUnit*3,"px"),":active":{backgroundColor:n?void 0:a?y.primary:y.primary50}})},Dee=function(t){var r=t.children,n=t.isDisabled,o=t.isFocused,a=t.isSelected,d=t.innerRef,m=t.innerProps;return it("div",at({},ur(t,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":a}),{ref:d,"aria-disabled":n},m),r)},Fee=function(t,r){var n=t.theme,o=n.spacing,a=n.colors;return ft({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},r?{}:{color:a.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},Nee=function(t){var r=t.children,n=t.innerProps;return it("div",at({},ur(t,"placeholder",{placeholder:!0}),n),r)},zee=function(t,r){var n=t.isDisabled,o=t.theme,a=o.spacing,d=o.colors;return ft({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r?{}:{color:n?d.neutral40:d.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},Hee=function(t){var r=t.children,n=t.isDisabled,o=t.innerProps;return it("div",at({},ur(t,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),r)},Ws={ClearIndicator:cee,Control:yee,DropdownIndicator:lee,DownChevron:RA,CrossIcon:b3,Group:Mee,GroupHeading:_ee,IndicatorsContainer:oee,IndicatorSeparator:pee,Input:kee,LoadingIndicator:PA,Menu:WQ,MenuList:YQ,MenuPortal:eee,LoadingMessage:kA,NoOptionsMessage:CA,MultiValue:$ee,MultiValueContainer:Pee,MultiValueLabel:Bee,MultiValueRemove:Iee,Option:Dee,Placeholder:Nee,SelectContainer:ree,SingleValue:Hee,ValueContainer:iee},Uee=function(t){return ft(ft({},Ws),t.components)},w8=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function jee(e,t){return!!(e===t||w8(e)&&w8(t))}function qee(e,t){if(e.length!==t.length)return!1;for(var r=0;r1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return d?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var r=t.context,n=t.focused,o=t.options,a=t.label,d=a===void 0?"":a,m=t.selectValue,y=t.isDisabled,w=t.isSelected,M=function(A,T){return A&&A.length?"".concat(A.indexOf(T)+1," of ").concat(A.length):""};if(r==="value"&&m)return"value ".concat(d," focused, ").concat(M(m,n),".");if(r==="menu"){var _=y?" disabled":"",E="".concat(w?"selected":"focused").concat(_);return"option ".concat(d," ").concat(E,", ").concat(M(o,n),".")}return""},onFilter:function(t){var r=t.inputValue,n=t.resultsMessage;return"".concat(n).concat(r?" for search term "+r:"",".")}},Wee=function(t){var r=t.ariaSelection,n=t.focusedOption,o=t.focusedValue,a=t.focusableOptions,d=t.isFocused,m=t.selectValue,y=t.selectProps,w=t.id,M=y.ariaLiveMessages,_=y.getOptionLabel,E=y.inputValue,S=y.isMulti,A=y.isOptionDisabled,T=y.isSearchable,I=y.menuIsOpen,O=y.options,P=y.screenReaderStatus,L=y.tabSelectsValue,N=y["aria-label"],q=y["aria-live"],X=le.exports.useMemo(function(){return ft(ft({},Gee),M||{})},[M]),J=le.exports.useMemo(function(){var u="";if(r&&X.onChange){var c=r.option,p=r.options,b=r.removedValue,g=r.removedValues,l=r.value,s=function(D){return Array.isArray(D)?null:D},v=b||c||s(l),x=v?_(v):"",C=p||g||void 0,B=C?C.map(_):[],k=ft({isDisabled:v&&A(v,m),label:x,labels:B},r);u=X.onChange(k)}return u},[r,X,A,m,_]),Z=le.exports.useMemo(function(){var u="",c=n||o,p=!!(n&&m&&m.includes(n));if(c&&X.onFocus){var b={focused:c,label:_(c),isDisabled:A(c,m),isSelected:p,options:a,context:c===n?"menu":"value",selectValue:m};u=X.onFocus(b)}return u},[n,o,_,A,X,a,m]),W=le.exports.useMemo(function(){var u="";if(I&&O.length&&X.onFilter){var c=P({count:a.length});u=X.onFilter({inputValue:E,resultsMessage:c})}return u},[a,E,I,X,O,P]),$=le.exports.useMemo(function(){var u="";if(X.guidance){var c=o?"value":I?"menu":"input";u=X.guidance({"aria-label":N,context:c,isDisabled:n&&A(n,m),isMulti:S,isSearchable:T,tabSelectsValue:L})}return u},[N,n,o,S,A,T,I,X,m,L]),h="".concat(Z," ").concat(W," ").concat($),i=it(le.exports.Fragment,null,it("span",{id:"aria-selection"},J),it("span",{id:"aria-context"},h)),f=(r==null?void 0:r.action)==="initial-input-focus";return it(le.exports.Fragment,null,it(M8,{id:w},f&&i),it(M8,{"aria-live":q,"aria-atomic":"false","aria-relevant":"additions text"},d&&!f&&i))},Ag=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],Zee=new RegExp("["+Ag.map(function(e){return e.letters}).join("")+"]","g"),$A={};for(var xv=0;xv-1}},Qee=["innerRef"];function ete(e){var t=e.innerRef,r=mf(e,Qee),n=jQ(r,"onExited","in","enter","exit","appear");return it("input",at({ref:t},n,{css:y3({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var tte=function(t){t.preventDefault(),t.stopPropagation()};function rte(e){var t=e.isEnabled,r=e.onBottomArrive,n=e.onBottomLeave,o=e.onTopArrive,a=e.onTopLeave,d=le.exports.useRef(!1),m=le.exports.useRef(!1),y=le.exports.useRef(0),w=le.exports.useRef(null),M=le.exports.useCallback(function(I,O){if(w.current!==null){var P=w.current,L=P.scrollTop,N=P.scrollHeight,q=P.clientHeight,X=w.current,J=O>0,Z=N-q-L,W=!1;Z>O&&d.current&&(n&&n(I),d.current=!1),J&&m.current&&(a&&a(I),m.current=!1),J&&O>Z?(r&&!d.current&&r(I),X.scrollTop=N,W=!0,d.current=!0):!J&&-O>L&&(o&&!m.current&&o(I),X.scrollTop=0,W=!0,m.current=!0),W&&tte(I)}},[r,n,o,a]),_=le.exports.useCallback(function(I){M(I,I.deltaY)},[M]),E=le.exports.useCallback(function(I){y.current=I.changedTouches[0].clientY},[]),S=le.exports.useCallback(function(I){var O=y.current-I.changedTouches[0].clientY;M(I,O)},[M]),A=le.exports.useCallback(function(I){if(!!I){var O=zQ?{passive:!1}:!1;I.addEventListener("wheel",_,O),I.addEventListener("touchstart",E,O),I.addEventListener("touchmove",S,O)}},[S,E,_]),T=le.exports.useCallback(function(I){!I||(I.removeEventListener("wheel",_,!1),I.removeEventListener("touchstart",E,!1),I.removeEventListener("touchmove",S,!1))},[S,E,_]);return le.exports.useEffect(function(){if(!!t){var I=w.current;return A(I),function(){T(I)}}},[t,A,T]),function(I){w.current=I}}var _8=["boxSizing","height","overflow","paddingRight","position"],E8={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function S8(e){e.preventDefault()}function A8(e){e.stopPropagation()}function C8(){var e=this.scrollTop,t=this.scrollHeight,r=e+this.offsetHeight;e===0?this.scrollTop=1:r===t&&(this.scrollTop=e-1)}function k8(){return"ontouchstart"in window||navigator.maxTouchPoints}var T8=!!(typeof window<"u"&&window.document&&window.document.createElement),qf=0,Ho={capture:!1,passive:!1};function nte(e){var t=e.isEnabled,r=e.accountForScrollbars,n=r===void 0?!0:r,o=le.exports.useRef({}),a=le.exports.useRef(null),d=le.exports.useCallback(function(y){if(!!T8){var w=document.body,M=w&&w.style;if(n&&_8.forEach(function(A){var T=M&&M[A];o.current[A]=T}),n&&qf<1){var _=parseInt(o.current.paddingRight,10)||0,E=document.body?document.body.clientWidth:0,S=window.innerWidth-E+_||0;Object.keys(E8).forEach(function(A){var T=E8[A];M&&(M[A]=T)}),M&&(M.paddingRight="".concat(S,"px"))}w&&k8()&&(w.addEventListener("touchmove",S8,Ho),y&&(y.addEventListener("touchstart",C8,Ho),y.addEventListener("touchmove",A8,Ho))),qf+=1}},[n]),m=le.exports.useCallback(function(y){if(!!T8){var w=document.body,M=w&&w.style;qf=Math.max(qf-1,0),n&&qf<1&&_8.forEach(function(_){var E=o.current[_];M&&(M[_]=E)}),w&&k8()&&(w.removeEventListener("touchmove",S8,Ho),y&&(y.removeEventListener("touchstart",C8,Ho),y.removeEventListener("touchmove",A8,Ho)))}},[n]);return le.exports.useEffect(function(){if(!!t){var y=a.current;return d(y),function(){m(y)}}},[t,d,m]),function(y){a.current=y}}var ite=function(){return document.activeElement&&document.activeElement.blur()},ate={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function ote(e){var t=e.children,r=e.lockEnabled,n=e.captureEnabled,o=n===void 0?!0:n,a=e.onBottomArrive,d=e.onBottomLeave,m=e.onTopArrive,y=e.onTopLeave,w=rte({isEnabled:o,onBottomArrive:a,onBottomLeave:d,onTopArrive:m,onTopLeave:y}),M=nte({isEnabled:r}),_=function(S){w(S),M(S)};return it(le.exports.Fragment,null,r&&it("div",{onClick:ite,css:ate}),t(_))}var ste={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},fte=function(t){var r=t.name,n=t.onFocus;return it("input",{required:!0,name:r,tabIndex:-1,onFocus:n,css:ste,value:"",onChange:function(){}})},ute=function(t){return t.label},lte=function(t){return t.label},hte=function(t){return t.value},cte=function(t){return!!t.isDisabled},dte={clearIndicator:hee,container:tee,control:gee,dropdownIndicator:uee,group:wee,groupHeading:xee,indicatorsContainer:aee,indicatorSeparator:dee,input:See,loadingIndicator:mee,loadingMessage:JQ,menu:KQ,menuList:ZQ,menuPortal:QQ,multiValue:Tee,multiValueLabel:Ree,multiValueRemove:Oee,noOptionsMessage:XQ,option:Lee,placeholder:Fee,singleValue:zee,valueContainer:nee},pte={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},vte=4,DA=4,mte=38,gte=DA*2,yte={baseUnit:DA,controlHeight:mte,menuGutter:gte},Sv={borderRadius:vte,colors:pte,spacing:yte},bte={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:y8(),captureMenuScroll:!y8(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Jee(),formatGroupLabel:ute,getOptionLabel:lte,getOptionValue:hte,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:cte,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!FQ(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var r=t.count;return"".concat(r," result").concat(r!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function R8(e,t,r,n){var o=HA(e,t,r),a=UA(e,t,r),d=zA(e,t),m=Kh(e,t);return{type:"option",data:t,isDisabled:o,isSelected:a,label:d,value:m,index:n}}function FA(e,t){return e.options.map(function(r,n){if("options"in r){var o=r.options.map(function(d,m){return R8(e,d,t,m)}).filter(function(d){return O8(e,d)});return o.length>0?{type:"group",data:r,options:o,index:n}:void 0}var a=R8(e,r,t,n);return O8(e,a)?a:void 0}).filter(HQ)}function NA(e){return e.reduce(function(t,r){return r.type==="group"?t.push.apply(t,tA(r.options.map(function(n){return n.data}))):t.push(r.data),t},[])}function wte(e,t){return NA(FA(e,t))}function O8(e,t){var r=e.inputValue,n=r===void 0?"":r,o=t.data,a=t.isSelected,d=t.label,m=t.value;return(!qA(e)||!a)&&jA(e,{label:d,value:m,data:o},n)}function Mte(e,t){var r=e.focusedValue,n=e.selectValue,o=n.indexOf(r);if(o>-1){var a=t.indexOf(r);if(a>-1)return r;if(o-1?r:t[0]}var zA=function(t,r){return t.getOptionLabel(r)},Kh=function(t,r){return t.getOptionValue(r)};function HA(e,t,r){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,r):!1}function UA(e,t,r){if(r.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,r);var n=Kh(e,t);return r.some(function(o){return Kh(e,o)===n})}function jA(e,t,r){return e.filterOption?e.filterOption(t,r):!0}var qA=function(t){var r=t.hideSelectedOptions,n=t.isMulti;return r===void 0?n:r},_te=1,VA=function(e){EJ(r,e);var t=kJ(r);function r(n){var o;if(xJ(this,r),o=t.call(this,n),o.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.instancePrefix="",o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(m){o.controlRef=m},o.focusedOptionRef=null,o.getFocusedOptionRef=function(m){o.focusedOptionRef=m},o.menuListRef=null,o.getMenuListRef=function(m){o.menuListRef=m},o.inputRef=null,o.getInputRef=function(m){o.inputRef=m},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(m,y){var w=o.props,M=w.onChange,_=w.name;y.name=_,o.ariaOnChange(m,y),M(m,y)},o.setValue=function(m,y,w){var M=o.props,_=M.closeMenuOnSelect,E=M.isMulti,S=M.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:S}),_&&(o.setState({inputIsHiddenAfterUpdate:!E}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(m,{action:y,option:w})},o.selectOption=function(m){var y=o.props,w=y.blurInputOnSelect,M=y.isMulti,_=y.name,E=o.state.selectValue,S=M&&o.isOptionSelected(m,E),A=o.isOptionDisabled(m,E);if(S){var T=o.getOptionValue(m);o.setValue(E.filter(function(I){return o.getOptionValue(I)!==T}),"deselect-option",m)}else if(!A)M?o.setValue([].concat(tA(E),[m]),"select-option",m):o.setValue(m,"select-option");else{o.ariaOnChange(m,{action:"select-option",option:m,name:_});return}w&&o.blurInput()},o.removeValue=function(m){var y=o.props.isMulti,w=o.state.selectValue,M=o.getOptionValue(m),_=w.filter(function(S){return o.getOptionValue(S)!==M}),E=s0(y,_,_[0]||null);o.onChange(E,{action:"remove-value",removedValue:m}),o.focusInput()},o.clearValue=function(){var m=o.state.selectValue;o.onChange(s0(o.props.isMulti,[],null),{action:"clear",removedValues:m})},o.popValue=function(){var m=o.props.isMulti,y=o.state.selectValue,w=y[y.length-1],M=y.slice(0,y.length-1),_=s0(m,M,M[0]||null);o.onChange(_,{action:"pop-value",removedValue:w})},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var m=arguments.length,y=new Array(m),w=0;wE||_>E}},o.onTouchEnd=function(m){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(m.target)&&o.menuListRef&&!o.menuListRef.contains(m.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(m){o.userIsDragging||o.onControlMouseDown(m)},o.onClearIndicatorTouchEnd=function(m){o.userIsDragging||o.onClearIndicatorMouseDown(m)},o.onDropdownIndicatorTouchEnd=function(m){o.userIsDragging||o.onDropdownIndicatorMouseDown(m)},o.handleInputChange=function(m){var y=o.props.inputValue,w=m.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(w,{action:"input-change",prevInputValue:y}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(m){o.props.onFocus&&o.props.onFocus(m),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(m){var y=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(m),o.onInputChange("",{action:"input-blur",prevInputValue:y}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(m){o.blockOptionHover||o.state.focusedOption===m||o.setState({focusedOption:m})},o.shouldHideSelectedOptions=function(){return qA(o.props)},o.onValueInputFocus=function(m){m.preventDefault(),m.stopPropagation(),o.focus()},o.onKeyDown=function(m){var y=o.props,w=y.isMulti,M=y.backspaceRemovesValue,_=y.escapeClearsValue,E=y.inputValue,S=y.isClearable,A=y.isDisabled,T=y.menuIsOpen,I=y.onKeyDown,O=y.tabSelectsValue,P=y.openMenuOnFocus,L=o.state,N=L.focusedOption,q=L.focusedValue,X=L.selectValue;if(!A&&!(typeof I=="function"&&(I(m),m.defaultPrevented))){switch(o.blockOptionHover=!0,m.key){case"ArrowLeft":if(!w||E)return;o.focusValue("previous");break;case"ArrowRight":if(!w||E)return;o.focusValue("next");break;case"Delete":case"Backspace":if(E)return;if(q)o.removeValue(q);else{if(!M)return;w?o.popValue():S&&o.clearValue()}break;case"Tab":if(o.isComposing||m.shiftKey||!T||!O||!N||P&&o.isOptionSelected(N,X))return;o.selectOption(N);break;case"Enter":if(m.keyCode===229)break;if(T){if(!N||o.isComposing)return;o.selectOption(N);break}return;case"Escape":T?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:E}),o.onMenuClose()):S&&_&&o.clearValue();break;case" ":if(E)return;if(!T){o.openMenu("first");break}if(!N)return;o.selectOption(N);break;case"ArrowUp":T?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":T?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!T)return;o.focusOption("pageup");break;case"PageDown":if(!T)return;o.focusOption("pagedown");break;case"Home":if(!T)return;o.focusOption("first");break;case"End":if(!T)return;o.focusOption("last");break;default:return}m.preventDefault()}},o.instancePrefix="react-select-"+(o.props.instanceId||++_te),o.state.selectValue=m8(n.value),n.menuIsOpen&&o.state.selectValue.length){var a=o.buildFocusableOptions(),d=a.indexOf(o.state.selectValue[0]);o.state.focusedOption=a[d]}return o}return _J(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&g8(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var a=this.props,d=a.isDisabled,m=a.menuIsOpen,y=this.state.isFocused;(y&&!d&&o.isDisabled||y&&m&&!o.menuIsOpen)&&this.focusInput(),y&&d&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!y&&!d&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(g8(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,a){this.props.onInputChange(o,a)}},{key:"focusInput",value:function(){!this.inputRef||this.inputRef.focus()}},{key:"blurInput",value:function(){!this.inputRef||this.inputRef.blur()}},{key:"openMenu",value:function(o){var a=this,d=this.state,m=d.selectValue,y=d.isFocused,w=this.buildFocusableOptions(),M=o==="first"?0:w.length-1;if(!this.props.isMulti){var _=w.indexOf(m[0]);_>-1&&(M=_)}this.scrollToFocusedOptionOnUpdate=!(y&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:w[M]},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(o){var a=this.state,d=a.selectValue,m=a.focusedValue;if(!!this.props.isMulti){this.setState({focusedOption:null});var y=d.indexOf(m);m||(y=-1);var w=d.length-1,M=-1;if(!!d.length){switch(o){case"previous":y===0?M=0:y===-1?M=w:M=y-1;break;case"next":y>-1&&y0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,d=this.state.focusedOption,m=this.getFocusableOptions();if(!!m.length){var y=0,w=m.indexOf(d);d||(w=-1),o==="up"?y=w>0?w-1:m.length-1:o==="down"?y=(w+1)%m.length:o==="pageup"?(y=w-a,y<0&&(y=0)):o==="pagedown"?(y=w+a,y>m.length-1&&(y=m.length-1)):o==="last"&&(y=m.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:m[y],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Sv):ft(ft({},Sv),this.props.theme):Sv}},{key:"getCommonProps",value:function(){var o=this.clearValue,a=this.cx,d=this.getStyles,m=this.getClassNames,y=this.getValue,w=this.selectOption,M=this.setValue,_=this.props,E=_.isMulti,S=_.isRtl,A=_.options,T=this.hasValue();return{clearValue:o,cx:a,getStyles:d,getClassNames:m,getValue:y,hasValue:T,isMulti:E,isRtl:S,options:A,selectOption:w,selectProps:_,setValue:M,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,a=o.isClearable,d=o.isMulti;return a===void 0?d:a}},{key:"isOptionDisabled",value:function(o,a){return HA(this.props,o,a)}},{key:"isOptionSelected",value:function(o,a){return UA(this.props,o,a)}},{key:"filterOption",value:function(o,a){return jA(this.props,o,a)}},{key:"formatOptionLabel",value:function(o,a){if(typeof this.props.formatOptionLabel=="function"){var d=this.props.inputValue,m=this.state.selectValue;return this.props.formatOptionLabel(o,{context:a,inputValue:d,selectValue:m})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,a=o.isDisabled,d=o.isSearchable,m=o.inputId,y=o.inputValue,w=o.tabIndex,M=o.form,_=o.menuIsOpen,E=o.required,S=this.getComponents(),A=S.Input,T=this.state,I=T.inputIsHidden,O=T.ariaSelection,P=this.commonProps,L=m||this.getElementId("input"),N=ft(ft(ft({"aria-autocomplete":"list","aria-expanded":_,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":E,role:"combobox"},_&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!d&&{"aria-readonly":!0}),this.hasValue()?(O==null?void 0:O.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return d?le.exports.createElement(A,at({},P,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:L,innerRef:this.getInputRef,isDisabled:a,isHidden:I,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:w,form:M,type:"text",value:y},N)):le.exports.createElement(ete,at({id:L,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:qh,onFocus:this.onInputFocus,disabled:a,tabIndex:w,inputMode:"none",form:M,value:""},N))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,a=this.getComponents(),d=a.MultiValue,m=a.MultiValueContainer,y=a.MultiValueLabel,w=a.MultiValueRemove,M=a.SingleValue,_=a.Placeholder,E=this.commonProps,S=this.props,A=S.controlShouldRenderValue,T=S.isDisabled,I=S.isMulti,O=S.inputValue,P=S.placeholder,L=this.state,N=L.selectValue,q=L.focusedValue,X=L.isFocused;if(!this.hasValue()||!A)return O?null:le.exports.createElement(_,at({},E,{key:"placeholder",isDisabled:T,isFocused:X,innerProps:{id:this.getElementId("placeholder")}}),P);if(I)return N.map(function(Z,W){var $=Z===q,h="".concat(o.getOptionLabel(Z),"-").concat(o.getOptionValue(Z));return le.exports.createElement(d,at({},E,{components:{Container:m,Label:y,Remove:w},isFocused:$,isDisabled:T,key:h,index:W,removeProps:{onClick:function(){return o.removeValue(Z)},onTouchEnd:function(){return o.removeValue(Z)},onMouseDown:function(f){f.preventDefault()}},data:Z}),o.formatOptionLabel(Z,"value"))});if(O)return null;var J=N[0];return le.exports.createElement(M,at({},E,{data:J,isDisabled:T}),this.formatOptionLabel(J,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),a=o.ClearIndicator,d=this.commonProps,m=this.props,y=m.isDisabled,w=m.isLoading,M=this.state.isFocused;if(!this.isClearable()||!a||y||!this.hasValue()||w)return null;var _={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return le.exports.createElement(a,at({},d,{innerProps:_,isFocused:M}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),a=o.LoadingIndicator,d=this.commonProps,m=this.props,y=m.isDisabled,w=m.isLoading,M=this.state.isFocused;if(!a||!w)return null;var _={"aria-hidden":"true"};return le.exports.createElement(a,at({},d,{innerProps:_,isDisabled:y,isFocused:M}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),a=o.DropdownIndicator,d=o.IndicatorSeparator;if(!a||!d)return null;var m=this.commonProps,y=this.props.isDisabled,w=this.state.isFocused;return le.exports.createElement(d,at({},m,{isDisabled:y,isFocused:w}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),a=o.DropdownIndicator;if(!a)return null;var d=this.commonProps,m=this.props.isDisabled,y=this.state.isFocused,w={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return le.exports.createElement(a,at({},d,{innerProps:w,isDisabled:m,isFocused:y}))}},{key:"renderMenu",value:function(){var o=this,a=this.getComponents(),d=a.Group,m=a.GroupHeading,y=a.Menu,w=a.MenuList,M=a.MenuPortal,_=a.LoadingMessage,E=a.NoOptionsMessage,S=a.Option,A=this.commonProps,T=this.state.focusedOption,I=this.props,O=I.captureMenuScroll,P=I.inputValue,L=I.isLoading,N=I.loadingMessage,q=I.minMenuHeight,X=I.maxMenuHeight,J=I.menuIsOpen,Z=I.menuPlacement,W=I.menuPosition,$=I.menuPortalTarget,h=I.menuShouldBlockScroll,i=I.menuShouldScrollIntoView,f=I.noOptionsMessage,u=I.onMenuScrollToTop,c=I.onMenuScrollToBottom;if(!J)return null;var p=function(C,B){var k=C.type,R=C.data,D=C.isDisabled,z=C.isSelected,H=C.label,V=C.value,U=T===R,F=D?void 0:function(){return o.onOptionHover(R)},G=D?void 0:function(){return o.selectOption(R)},ie="".concat(o.getElementId("option"),"-").concat(B),Y={id:ie,onClick:G,onMouseMove:F,onMouseOver:F,tabIndex:-1};return le.exports.createElement(S,at({},A,{innerProps:Y,data:R,isDisabled:D,isSelected:z,key:ie,label:H,type:k,value:V,isFocused:U,innerRef:U?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(C.data,"menu"))},b;if(this.hasOptions())b=this.getCategorizedOptions().map(function(x){if(x.type==="group"){var C=x.data,B=x.options,k=x.index,R="".concat(o.getElementId("group"),"-").concat(k),D="".concat(R,"-heading");return le.exports.createElement(d,at({},A,{key:R,data:C,options:B,Heading:m,headingProps:{id:D,data:x.data},label:o.formatGroupLabel(x.data)}),x.options.map(function(z){return p(z,"".concat(k,"-").concat(z.index))}))}else if(x.type==="option")return p(x,"".concat(x.index))});else if(L){var g=N({inputValue:P});if(g===null)return null;b=le.exports.createElement(_,A,g)}else{var l=f({inputValue:P});if(l===null)return null;b=le.exports.createElement(E,A,l)}var s={minMenuHeight:q,maxMenuHeight:X,menuPlacement:Z,menuPosition:W,menuShouldScrollIntoView:i},v=le.exports.createElement(GQ,at({},A,s),function(x){var C=x.ref,B=x.placerProps,k=B.placement,R=B.maxHeight;return le.exports.createElement(y,at({},A,s,{innerRef:C,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove,id:o.getElementId("listbox")},isLoading:L,placement:k}),le.exports.createElement(ote,{captureEnabled:O,onTopArrive:u,onBottomArrive:c,lockEnabled:h},function(D){return le.exports.createElement(w,at({},A,{innerRef:function(H){o.getMenuListRef(H),D(H)},isLoading:L,maxHeight:R,focusedOption:T}),b)}))});return $||W==="fixed"?le.exports.createElement(M,at({},A,{appendTo:$,controlElement:this.controlRef,menuPlacement:Z,menuPosition:W}),v):v}},{key:"renderFormField",value:function(){var o=this,a=this.props,d=a.delimiter,m=a.isDisabled,y=a.isMulti,w=a.name,M=a.required,_=this.state.selectValue;if(!(!w||m)){if(M&&!this.hasValue())return le.exports.createElement(fte,{name:w,onFocus:this.onValueInputFocus});if(y)if(d){var E=_.map(function(T){return o.getOptionValue(T)}).join(d);return le.exports.createElement("input",{name:w,type:"hidden",value:E})}else{var S=_.length>0?_.map(function(T,I){return le.exports.createElement("input",{key:"i-".concat(I),name:w,type:"hidden",value:o.getOptionValue(T)})}):le.exports.createElement("input",{name:w,type:"hidden",value:""});return le.exports.createElement("div",null,S)}else{var A=_[0]?this.getOptionValue(_[0]):"";return le.exports.createElement("input",{name:w,type:"hidden",value:A})}}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,a=this.state,d=a.ariaSelection,m=a.focusedOption,y=a.focusedValue,w=a.isFocused,M=a.selectValue,_=this.getFocusableOptions();return le.exports.createElement(Wee,at({},o,{id:this.getElementId("live-region"),ariaSelection:d,focusedOption:m,focusedValue:y,isFocused:w,selectValue:M,focusableOptions:_}))}},{key:"render",value:function(){var o=this.getComponents(),a=o.Control,d=o.IndicatorsContainer,m=o.SelectContainer,y=o.ValueContainer,w=this.props,M=w.className,_=w.id,E=w.isDisabled,S=w.menuIsOpen,A=this.state.isFocused,T=this.commonProps=this.getCommonProps();return le.exports.createElement(m,at({},T,{className:M,innerProps:{id:_,onKeyDown:this.onKeyDown},isDisabled:E,isFocused:A}),this.renderLiveRegion(),le.exports.createElement(a,at({},T,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:E,isFocused:A,menuIsOpen:S}),le.exports.createElement(y,at({},T,{isDisabled:E}),this.renderPlaceholderOrValue(),this.renderInput()),le.exports.createElement(d,at({},T,{isDisabled:E}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,a){var d=a.prevProps,m=a.clearFocusValueOnUpdate,y=a.inputIsHiddenAfterUpdate,w=a.ariaSelection,M=a.isFocused,_=a.prevWasFocused,E=o.options,S=o.value,A=o.menuIsOpen,T=o.inputValue,I=o.isMulti,O=m8(S),P={};if(d&&(S!==d.value||E!==d.options||A!==d.menuIsOpen||T!==d.inputValue)){var L=A?wte(o,O):[],N=m?Mte(a,O):null,q=xte(a,L);P={selectValue:O,focusedOption:q,focusedValue:N,clearFocusValueOnUpdate:!1}}var X=y!=null&&o!==d?{inputIsHidden:y,inputIsHiddenAfterUpdate:void 0}:{},J=w,Z=M&&_;return M&&!Z&&(J={value:s0(I,O,O[0]||null),options:O,action:"initial-input-focus"},Z=!_),(w==null?void 0:w.action)==="initial-input-focus"&&(J=null),ft(ft(ft({},P),X),{},{prevProps:o,ariaSelection:J,prevWasFocused:Z})}}]),r}(le.exports.Component);VA.defaultProps=bte;var Ete=le.exports.forwardRef(function(e,t){var r=MJ(e);return le.exports.createElement(VA,at({ref:t},r))});const Ste=Ete,Ate=ke(Ste)` font-style: normal; font-weight: 400; font-size: 14px; line-height: 14px; width: 100%; max-width: 670px; @media ${Ee.LAPTOP_LARGE} { width: 450px; } .Select__input { color: ${e=>e.theme.selectColor}; } .Select__control { background-color: ${Fe.LIGHT_GREY}; text-align: start; min-height: 0; position: relative; border-radius: 5px; border-style: none; padding: 6px 4px; -webkit-appearance: none; -moz-appearance: none; appearance: none; outline: none; border: 1px solid ${Fe.GREY}; :hover { border: 1px solid ${Fe.GREY}; } } .Select__placeholder { color: ${Fe.BLACK}; align-items: center; display: flex; gap: 6px; justify-content: flex-start; & svg { color: #908e8d; } } .Select__control--is-focused { border: none; border: 1px solid ${Fe.GREY} !important; box-shadow: none; } .Select__control--is-disabled { cursor: not-allowed; opacity: 0.5; } .Select__menu { background: ${Fe.LIGHT_GREY}; color: ${Fe.GREY}; z-index: 10; margin: 0; top: 75%; border-radius: 0 0 4px 4px; box-shadow: none; border: 1px solid ${Fe.GREY}; border-top: 0; } .Select__menu-list { padding: 10px 0; } .Select__option { display: flex; align-items: center; grid-gap: 10px; gap: 10px; color: ${Fe.BLACK}; padding: 6px 12px; text-align: left; background: ${Fe.LIGHT_GREY}; :hover { box-shadow: 0 0 11px rgba(33, 33, 33, 0.2); cursor: pointer; position: relative; z-index: 10; } :active { background: ${Fe.LIGHT_BLACK}; color: ${Fe.WHITE}; } } .Select__value-container { display: flex; gap: 10px; align-items: center; } .Select__option--is-focused { background: ${e=>e.theme.selectFocusedColor}; box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.25); border-radius: 5px; } .Select__clear-indicator { padding: 3.2px; } .Select__indicator { transition: 0.3s; cursor: pointer; color: #908e8d; } `,Cg=ke.div` width: 20px; height: 20px; svg, img { color: #908e8d; width: 20px; height: 20px; } `,Cte=e=>Ws.DropdownIndicator&&j.createElement(Ws.DropdownIndicator,{...e},j.createElement(a9,null)),kte=e=>{const{data:t}=e;return j.createElement(Ws.Option,{...e},j.createElement(Cg,null,j.createElement("img",{src:S2[t.value],alt:t.label}))," ",t.label)},Tte=({prefixIcon:e,options:t,value:r,onChange:n,placeholder:o="Select...",disabled:a})=>{const d=w=>n({target:{value:w.value}}),m=le.exports.useMemo(()=>r?t.find(w=>w.value===r):null,[t,r]),y=le.exports.useCallback(({children:w,...M})=>{const{getValue:_,hasValue:E}=M,S=_();return E?j.createElement(Ws.ValueContainer,{...M},j.createElement(Cg,null,j.createElement("img",{src:S2[S[0].value],alt:S[0].label})),S[0].label):j.createElement(Ws.ValueContainer,{...M},!!e&&j.createElement(Cg,null,e)," ",w)},[e]);return j.createElement(Ate,{isDisabled:a,value:m,classNamePrefix:"Select",options:t,placeholder:o,components:{DropdownIndicator:Cte,IndicatorSeparator:()=>null,Option:kte,ValueContainer:y},isClearable:!1,isSearchable:!0,onChange:d,styles:{dropdownIndicator:(w,M)=>({...w,transform:!M.selectProps.menuIsOpen&&"rotate(180deg)"})},hideSelectedOptions:!0})},Rte=({className:e})=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:"18",height:"18",fill:"none"},j.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M0 8.999C0 4.039 4.038 0 8.999 0c4.96 0 8.999 4.038 8.999 8.999 0 4.96-4.039 8.999-9 8.999-4.96 0-8.998-4.039-8.998-9Zm10.26 2.556a2.698 2.698 0 0 0-.37-4.116.285.285 0 0 0-.366.03l-.374.374a.707.707 0 0 0-.208.53.285.285 0 0 0 .124.224 1.278 1.278 0 0 1 .184 1.96L8.055 11.75a1.28 1.28 0 0 1-1.817-.01 1.29 1.29 0 0 1 .02-1.81l.233-.232a.286.286 0 0 0 .067-.295 3.272 3.272 0 0 1-.172-.936.284.284 0 0 0-.485-.188l-.659.658a2.702 2.702 0 0 0 0 3.817 2.702 2.702 0 0 0 3.817 0l1.194-1.193.006-.006ZM8.94 5.242a2.702 2.702 0 0 1 3.816 0 2.702 2.702 0 0 1 0 3.817l-.659.658a.284.284 0 0 1-.484-.188 3.27 3.27 0 0 0-.172-.936.286.286 0 0 1 .067-.295l.232-.232a1.289 1.289 0 0 0 .02-1.81 1.28 1.28 0 0 0-1.816-.01L8.75 7.439a1.278 1.278 0 0 0 .184 1.96.285.285 0 0 1 .123.224.707.707 0 0 1-.207.53l-.374.373a.285.285 0 0 1-.366.031 2.698 2.698 0 0 1-.37-4.116l.006-.006 1.193-1.193Z",clipRule:"evenodd"})),Ote=({className:e})=>j.createElement("svg",{width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e},j.createElement("path",{d:"M5.9938 7.30532H6.4938V6.80532L6.4938 1.7027C6.4938 1.50916 6.6507 1.35226 6.84424 1.35226C7.03778 1.35226 7.19467 1.50916 7.19467 1.7027L7.19468 6.80532V7.30532H7.69468L12.7973 7.30532C12.9908 7.30532 13.1477 7.46221 13.1477 7.65575C13.1477 7.84929 12.9908 8.00619 12.7973 8.00619L12.7973 8.50619L12.7973 8.00619L7.69468 8.00619H7.19468V8.50619L7.19467 13.6088C7.19467 13.8023 7.03778 13.9592 6.84424 13.9592C6.6507 13.9592 6.4938 13.8023 6.4938 13.6088L6.4938 8.50619V8.00619H5.9938L0.891185 8.00619C0.697644 8.00619 0.540748 7.84929 0.540748 7.65575C0.540748 7.46221 0.697643 7.30532 0.891184 7.30532L5.9938 7.30532Z",fill:"#C2F051",stroke:"currentColor"})),Pte=ke.input` border: none; outline: none; background-color: transparent; font-family: 'Avenir'; font-style: normal; font-weight: 400; font-size: 14px; line-height: 130%; padding: 2px 0; display: flex; align-items: center; width: 100%; align-self: end; color: ${e=>e.theme.textColor3}; @media ${Ee.TABLET} { font-size: 14px; } &:disabled { background: transparent; cursor: not-allowed; } `,Bte=ke.div` display: flex; align-items: center; width: 100%; max-width: 670px; @media ${Ee.LAPTOP_LARGE} { width: 450px; } background-color: ${Fe.LIGHT_GREY}; text-align: start; min-height: 0; position: relative; border-radius: 5px; border-style: none; box-sizing: border-box; padding: 10px 15px 10px; padding-left: ${e=>e.withIcon?"40px":"15px"}; -webkit-appearance: none; -moz-appearance: none; appearance: none; outline: none; border: 1px solid ${Fe.GREY}; :hover { border: 1px solid ${Fe.GREY}; } `,Ite=ke.div` position: absolute; display: flex; align-items: center; gap: 6px; font-family: 'Avenir'; font-style: normal; font-weight: 400; font-size: 14px; & svg { color: #908e8d; width: 18px; height: 18px; } `,$te=ke.button` position: absolute; right: 0; border: none; background-color: transparent; cursor: pointer; color: ${e=>e.theme.indicatorColor}; transform: rotate(45deg); `,Lte=ke.div` position: absolute; top: 10px; left: 10px; svg { color: #908e8d; width: 20px; height: 20px; } `,Dte=({className:e,invalid:t,helpText:r,onClear:n,defaultValue:o,placeholder:a,value:d,prefixIcon:m,...y})=>j.createElement(Bte,{withIcon:!!m},m&&j.createElement(Lte,null,m),j.createElement(Pte,{defaultValue:o,className:e,value:d,...y}),!d&&a&&j.createElement(Ite,null,a),n&&j.createElement($te,{title:"Remove argument",className:"remove-param",onClick:n},j.createElement(Ote,null))),P8=({className:e})=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"none"},j.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M18.731 9.828H22.2c.66 0 1.2.54 1.2 1.2v6.288C23.4 21.6 20.411 24 16.715 24H7.283C3.587 24 .6 21.6.6 17.316V6.684C.6 2.4 3.587 0 7.283 0h5.088c.66 0 1.2.54 1.2 1.2v3.468a5.167 5.167 0 0 0 5.16 5.16ZM6.6 18.9h4.8c.492 0 .9-.408.9-.9 0-.492-.408-.9-.9-.9H6.6c-.492 0-.9.408-.9.9 0 .492.408.9.9.9Zm0-4.8h7.2c.492 0 .9-.408.9-.9 0-.492-.408-.9-.9-.9H6.6c-.492 0-.9.408-.9.9 0 .492.408.9.9.9ZM15.215.782c0-.684.852-1.02 1.344-.528 1.2 1.199 3 3.016 4.575 4.606l2.025 2.042c.48.48.12 1.284-.564 1.284-1.356 0-2.94 0-4.08-.012-1.812 0-3.3-1.452-3.3-3.204V.782Z",clipRule:"evenodd"})),Fte=({className:e})=>j.createElement("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{d:"M1 15.7222L14.7199 1.5M1.50231 1.5L15.2222 15.7222",stroke:"#7C7C7C",strokeWidth:"2",strokeLinecap:"round"})),Nte=e=>{if(!e)return;const t={highlight:!1,enhancers:[s$(e,{type:"block"})]};try{return f$(e,t)}catch{return}},zte="Address",Hte="Chain",Ute=({setContracts:e,chains:t})=>{var A;const o=uH({initialValues:{contractAddress:"",blockchain:""},validate:T=>{const{contractAddress:I,file:O}=T,P={};return!O&&!DY.isAddress(I)&&!!I&&(P.contractAddress="Invalid address"),P},onSubmit:async T=>{try{const I=!!T.file;let O;if(I){const L=X=>new Promise(J=>{const Z=new FileReader;Z.onloadend=()=>J(Z.result),X&&Z.readAsText(X)}),{file:N}=o.values,q=await L(N);O=await i8.checkByText(q)}else O=await i8.checkByAddress(T.contractAddress,T.blockchain);const P=O.map(L=>{const N=L.findMode===1,q=N?null:L.matches.sort((J,Z)=>Z.tunedSimilarity-J.tunedSimilarity)[0],X={entitySHA256:L.entitySHA256,entityName:L.entityName,entityCode:L.entityCode,exact:N,bestMatch:q,order:N&&2||(q?q.tunedSimilarity:0),diff:void 0};if(q){const J=kh.exports.diffLines(L.entityCode.replaceAll("\r",""),q.contents.replaceAll("\r","")),Z=kh.exports.formatLines(J,{context:3}),[W]=kB(Z);X.diff={...W,tokens:Nte(W.hunks)}}return X}).sort((L,N)=>L.order-N.order);e(P)}catch(I){console.error("error:",I)}}}),a=T=>{T.stopPropagation(),o.setFieldValue("file",void 0)},{getRootProps:d,getInputProps:m,isFocused:y,isDragActive:w}=w9({maxFiles:1,validator:T=>/.sol$/.test(T.path)?null:{code:nL.FileInvalidType,message:"Wrong file extension"},onDropAccepted:T=>{const[I]=T;o.setFieldValue("file",I)}}),M=le.exports.useMemo(()=>!!o.values.file,[o.values.file]),_=le.exports.useMemo(()=>t.map(T=>({label:T.label,value:T.value})),[t]),E=T=>{const I=T.target.value;o.setFieldValue("blockchain",I)},S=T=>{o.setFieldValue("contractAddress",T.target.value.toLowerCase())};return j.createElement("form",{onSubmit:o.handleSubmit},j.createElement(rJ,null,j.createElement(iJ,null,j.createElement(pJ,null,j.createElement(nJ,null,j.createElement(bg,{label:"Enter contract address"},j.createElement(oJ,{disabled:!!o.values.file},j.createElement(Dte,{prefixIcon:j.createElement(P8,null),placeholder:zte,value:o.values.contractAddress,onChange:S,disabled:!!o.values.file}),o.errors.contractAddress&&j.createElement(lJ,null,o.errors.contractAddress))),j.createElement(bg,{label:"Choose a network"},j.createElement(Tte,{prefixIcon:j.createElement(Rte,null),placeholder:Hte,options:_,onChange:E,disabled:!!o.values.file,value:o.values.blockchain}))),j.createElement(dJ,{label:"Or drag and drop .sol file"},j.createElement(hJ,{...d()},j.createElement("input",{...m()}),!M&&j.createElement(a8,null,w?j.createElement("p",null,"Drop file here",j.createElement("br",null),"(Only one *.sol file will be accepted)"):j.createElement("p",null,"Drag n drop file here, or click to select file",j.createElement("br",null),"(Only one *.sol file will be accepted)")),M&&j.createElement(j.Fragment,null,j.createElement(uJ,null,j.createElement(P8,null),(A=o.values.file)==null?void 0:A.name,j.createElement(cJ,{type:"button",title:"Remove file",onClick:a,onKeyUp:a},j.createElement(Fte,null))),j.createElement(a8,null,"or click to select another file"))))),j.createElement(aJ,{type:"button",buttonType:"submit",text:"Check",disabled:o.isSubmitting||(!o.values.blockchain||!o.values.contractAddress)&&!o.values.file||!!o.errors.contractAddress}))),o.isSubmitting&&j.createElement(sJ,null,j.createElement(fJ,null)))},jte=[{title:"What is a fork in cryptocurrency? ",text:["A fork project is a new code based on an existing source code of a different project. Usually, developers add some changes to various processes. Thus, the project fork may end up very different from the original one."]},{title:"What is a fork checker and why do I need it?",text:["A fork checker does exactly what it says: checks a project fork. It\u2019s usually used on two occasions.","The first one is evaluating a code: if you\u2019re dealing with a fork, you can see what changes the project has made to the original code.","The other one is reviewing and comparing all dependencies. Usually, these tasks have to be done manually and it\u2019s time-consuming.","With this feature, the Builder automatically checks whether there\u2019s been a backdoor added to the code."]},{title:"How does the Fork Checker work?",text:["Fork Checker takes the code provided in a .sol file or via the address and compares it to its database which includes OpenZeppelin and others. The feature shows the differences between the codes."]},{title:"Is Fork Checker free to use?",text:["Yes, Fork Checker is a free tool and we would be grateful if you spread the word about it and share it with the crypto community."]},{title:"Why do developers fork other projects?",text:["Developers don\u2019t always launch their projects on all networks, which results in enthusiasts wanting to either add a useful project to a chain or add some changes to the source code and make the project more niche. Forking a project is common practice in the industry."]},{title:"What should I know about code forks?",text:["When dealing with a fork, it\u2019s crucial to remember that the errors and vulnerabilities from the original project can be transferred onto the fork. So it\u2019s imperative to carefully review the differences, which can be done with the help of Fork Checker.","It\u2019s also very important to audit the final project and HashEx is your best defense against vulnerabilities."]}],B8=Object.values(zt).map(e=>({label:MT[e],value:e})),qte=()=>{const[e,t]=le.exports.useState(null);return j.createElement(j.Fragment,null,j.createElement(dO,{chains:B8}),j.createElement(Ute,{chains:B8,setContracts:t}),j.createElement(D$,{contracts:e,setContracts:t}),j.createElement(_O,null),j.createElement(rO,{faq:jte}))},Vte=({className:e})=>j.createElement("svg",{width:"160",height:"40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{d:"M33.252 10.444h13.82v-8.87h3.935V23.28H47.07v-8.87h-13.82v8.87h-3.935V1.574h3.936v8.87ZM71.986 17.861c0 .545-.096 1.136-.287 1.771a5.295 5.295 0 0 1-.939 1.756c-.424.535-.984.984-1.68 1.347-.686.364-1.524.545-2.513.545h-7.099c-.545 0-1.135-.096-1.77-.287a5.443 5.443 0 0 1-1.757-.924c-.534-.434-.983-.994-1.347-1.68-.363-.696-.545-1.539-.545-2.528 0-.545.096-1.135.288-1.77.192-.636.5-1.222.923-1.757.434-.544.994-.999 1.68-1.362.697-.363 1.54-.545 2.528-.545h7.1v3.754h-7.1c-.535 0-.948.167-1.24.5-.294.323-.44.726-.44 1.21 0 .515.167.919.5 1.212.343.282.746.423 1.21.423h7.07c.534 0 .948-.161 1.24-.484.293-.323.44-.727.44-1.21v-5.496c0-.514-.162-.923-.485-1.226-.313-.302-.711-.454-1.196-.454h-8.643V6.917h8.643c.545 0 1.13.096 1.756.288a5.107 5.107 0 0 1 1.756.939c.545.423 1 .983 1.362 1.68.364.686.545 1.524.545 2.512v5.525ZM91.165 17.755c0 .677-.086 1.287-.258 1.832a5.468 5.468 0 0 1-.68 1.423c-.284.403-.611.752-.985 1.044a5.85 5.85 0 0 1-1.18.697 6.167 6.167 0 0 1-1.242.408c-.413.08-.807.121-1.18.121H74.983v-3.935H85.61c.535 0 .939-.136 1.211-.409.273-.272.409-.666.409-1.18-.05-1.05-.58-1.575-1.59-1.575h-6.1c-.867 0-1.604-.151-2.21-.454-.605-.303-1.1-.681-1.483-1.135a4.506 4.506 0 0 1-.817-1.469 5.011 5.011 0 0 1-.242-1.468c0-.878.156-1.614.469-2.21.313-.605.706-1.095 1.18-1.468.475-.373.99-.64 1.544-.802a5.295 5.295 0 0 1 1.56-.258h9.672v3.936H79.57c-.202 0-.363.025-.485.076a.544.544 0 0 0-.257.181.505.505 0 0 0-.09.242 1.95 1.95 0 0 0-.016.243c.01.161.04.287.091.378.05.091.111.157.182.197.08.04.166.066.257.076h6.388c1.009 0 1.867.181 2.573.544.706.364 1.276.823 1.71 1.378a5.24 5.24 0 0 1 .939 1.786c.202.646.303 1.246.303 1.801ZM112.129 23.28h-3.936V12.427c0-.514-.131-.903-.393-1.165-.263-.273-.656-.409-1.181-.409H99.52V6.917h7.099c.374 0 .767.046 1.181.137.414.08.822.212 1.226.393.414.182.807.42 1.181.712.373.282.701.63.983 1.044.283.404.51.873.682 1.408.171.535.257 1.14.257 1.816V23.28Zm-14.198 0h-3.936V0h3.936v23.28ZM134.017 14.41h-12.428v-3.966h12.428v3.966Zm1.771 8.87h-14.199c-.545 0-1.14-.096-1.786-.287a5.402 5.402 0 0 1-1.801-.939c-.545-.444-1.004-1.014-1.377-1.71-.364-.707-.545-1.57-.545-2.589V3.557c0-.272.05-.53.151-.772.101-.242.237-.454.409-.636.181-.181.393-.323.635-.423.243-.101.505-.152.787-.152h17.726V5.51h-15.773v12.245c0 .515.136.909.409 1.181.272.273.671.409 1.196.409h14.168v3.935ZM157.857 6.917l-7.069 7.72 7.962 8.643h-5.419l-5.237-5.706-5.238 5.706h-5.434l7.947-8.673-7.038-7.69h5.388l4.344 4.738 4.375-4.738h5.419Z",fill:"#fff"}),j.createElement("path",{d:"M2.738 6.564H6.24L7.447 1.28h3.96l-1.19 5.284h4.075l1.19-5.284h3.976l-1.206 5.284H22l-.847 3.73H17.42l-.864 3.908h3.602l-.832 3.73h-3.601L14.52 23.28h-3.976l1.206-5.348H7.676L6.47 23.28H2.51l1.19-5.348H0l.896-3.73H4.53l.88-3.907H1.841l.897-3.73Zm5.769 7.638h4.074l.863-3.907H9.37l-.863 3.907Z",fill:"#C2F051"}),j.createElement("path",{d:"M28.94 32.2h2.11c.267 0 .537.03.81.09.273.054.517.15.73.29a1.5 1.5 0 0 1 .53.55c.14.234.21.527.21.88 0 .374-.113.7-.34.98-.227.274-.53.454-.91.54v.02c.46.054.84.234 1.14.54.307.3.46.71.46 1.23a1.774 1.774 0 0 1-.71 1.43 2.586 2.586 0 0 1-.83.39c-.327.094-.693.14-1.1.14h-2.1V32.2Zm.72 3.1h1.45c.173 0 .347-.02.52-.06.18-.04.343-.106.49-.2a1.153 1.153 0 0 0 .49-.98c0-.226-.047-.416-.14-.57a1.063 1.063 0 0 0-.36-.39c-.153-.1-.333-.17-.54-.21a2.988 2.988 0 0 0-.66-.07h-1.25v2.48Zm0 3.36H31c.26 0 .507-.023.74-.07.24-.053.447-.133.62-.24.18-.113.323-.256.43-.43.107-.18.16-.393.16-.64 0-.466-.16-.813-.48-1.04-.313-.233-.76-.35-1.34-.35h-1.47v2.77ZM37.017 38.64h3.3v.64h-4.02V32.2h.72v6.44ZM49.092 35.74c0 .54-.093 1.037-.28 1.49a3.574 3.574 0 0 1-.78 1.18 3.54 3.54 0 0 1-1.17.77c-.446.187-.933.28-1.46.28a3.822 3.822 0 0 1-1.47-.28 3.68 3.68 0 0 1-1.17-.77 3.653 3.653 0 0 1-.77-1.18 3.875 3.875 0 0 1-.28-1.49c0-.54.094-1.036.28-1.49a3.54 3.54 0 0 1 .77-1.17 3.6 3.6 0 0 1 1.17-.78c.454-.186.944-.28 1.47-.28.527 0 1.014.094 1.46.28.454.187.844.447 1.17.78.334.327.594.717.78 1.17.187.454.28.95.28 1.49Zm-.76 0c0-.413-.066-.806-.2-1.18a2.895 2.895 0 0 0-.58-.98 2.731 2.731 0 0 0-.93-.68 2.87 2.87 0 0 0-1.22-.25c-.453 0-.863.084-1.23.25-.36.167-.666.394-.92.68-.253.28-.446.607-.58.98-.133.374-.2.767-.2 1.18 0 .414.067.807.2 1.18.134.374.327.7.58.98.254.28.56.504.92.67.367.167.777.25 1.23.25.454 0 .86-.083 1.22-.25.367-.166.677-.39.93-.67.254-.28.447-.606.58-.98.134-.373.2-.766.2-1.18ZM57.548 38.14c-.12.18-.266.35-.44.51-.166.16-.363.3-.59.42-.22.12-.466.214-.74.28-.266.074-.56.11-.88.11a3.848 3.848 0 0 1-1.48-.28 3.538 3.538 0 0 1-1.17-.77 3.652 3.652 0 0 1-.77-1.18c-.18-.453-.27-.95-.27-1.49s.094-1.036.28-1.49c.187-.453.444-.843.77-1.17a3.6 3.6 0 0 1 1.17-.78c.454-.186.944-.28 1.47-.28a3.588 3.588 0 0 1 1.47.31c.22.094.42.21.6.35.18.134.33.287.45.46l-.6.44a1.72 1.72 0 0 0-.3-.34 1.897 1.897 0 0 0-.43-.3 2.688 2.688 0 0 0-.55-.21 2.365 2.365 0 0 0-.63-.08c-.46 0-.873.084-1.24.25-.36.167-.666.394-.92.68-.253.28-.446.607-.58.98a3.48 3.48 0 0 0-.2 1.18c0 .414.067.807.2 1.18.14.374.337.704.59.99.254.28.56.504.92.67.367.167.777.25 1.23.25.407 0 .794-.083 1.16-.25a2.2 2.2 0 0 0 .92-.8l.56.36ZM60.506 35.38h.01l3.37-3.18h1.03l-3.57 3.21 3.77 3.87h-1.06l-3.54-3.77h-.01v3.77h-.72V32.2h.72v3.18ZM72.78 38.14c-.12.18-.266.35-.44.51-.166.16-.362.3-.59.42-.22.12-.466.214-.74.28-.266.074-.56.11-.88.11a3.849 3.849 0 0 1-1.48-.28 3.54 3.54 0 0 1-1.17-.77 3.653 3.653 0 0 1-.77-1.18c-.18-.453-.27-.95-.27-1.49s.094-1.036.28-1.49a3.54 3.54 0 0 1 .77-1.17 3.6 3.6 0 0 1 1.17-.78c.454-.186.944-.28 1.47-.28a3.588 3.588 0 0 1 1.47.31c.22.094.42.21.6.35.18.134.33.287.45.46l-.6.44a1.713 1.713 0 0 0-.3-.34 1.895 1.895 0 0 0-.43-.3 2.688 2.688 0 0 0-.55-.21 2.363 2.363 0 0 0-.63-.08c-.46 0-.873.084-1.24.25-.36.167-.666.394-.92.68-.252.28-.446.607-.58.98-.133.374-.2.767-.2 1.18 0 .414.067.807.2 1.18.14.374.337.704.59.99.254.28.56.504.92.67.368.167.778.25 1.23.25a2.77 2.77 0 0 0 1.16-.25 2.2 2.2 0 0 0 .92-.8l.56.36ZM75.018 32.2h.72v3.07h3.86V32.2h.72v7.08h-.72v-3.35h-3.86v3.35h-.72V32.2ZM83.146 39.28h-.79l3.06-7.08h.7l3.04 7.08h-.8l-.78-1.86h-3.66l-.77 1.86Zm1.04-2.52h3.12L85.746 33l-1.56 3.76ZM91.918 39.28h-.72V32.2h.72v7.08ZM99.815 38.23h.02V32.2h.72v7.08h-.9l-4.12-6.09h-.02v6.09h-.72V32.2h.9l4.12 6.03ZM110.362 33.34a1.679 1.679 0 0 0-.59-.51c-.24-.133-.53-.2-.87-.2-.173 0-.35.027-.53.08-.18.054-.343.137-.49.25a1.253 1.253 0 0 0-.36.41c-.087.167-.13.364-.13.59 0 .227.043.414.13.56.087.147.2.274.34.38.147.1.31.184.49.25.187.067.38.134.58.2.247.08.493.167.74.26.253.094.48.217.68.37.2.147.363.337.49.57.127.227.19.517.19.87a1.87 1.87 0 0 1-.74 1.55c-.213.167-.46.29-.74.37a2.939 2.939 0 0 1-1.47.05 2.702 2.702 0 0 1-.61-.19 2.514 2.514 0 0 1-.54-.33 2.399 2.399 0 0 1-.44-.46l.62-.46c.153.254.367.467.64.64.28.167.607.25.98.25a2 2 0 0 0 .55-.08c.187-.06.353-.146.5-.26.153-.12.277-.263.37-.43.1-.173.15-.373.15-.6 0-.246-.05-.45-.15-.61a1.175 1.175 0 0 0-.38-.41 2.238 2.238 0 0 0-.55-.28 24.471 24.471 0 0 0-.65-.22 8.616 8.616 0 0 1-.69-.25 2.406 2.406 0 0 1-.61-.36 1.818 1.818 0 0 1-.44-.56c-.107-.22-.16-.49-.16-.81 0-.34.067-.633.2-.88.14-.246.32-.45.54-.61.22-.16.463-.276.73-.35.267-.073.53-.11.79-.11.48 0 .89.087 1.23.26.34.167.597.367.77.6l-.57.46ZM114.297 38.64h3.79v.64h-4.51V32.2h4.39v.64h-3.67v2.44h3.43v.63h-3.43v2.73ZM126.455 38.14c-.12.18-.267.35-.44.51-.167.16-.364.3-.59.42-.22.12-.467.214-.74.28-.267.074-.56.11-.88.11a3.845 3.845 0 0 1-1.48-.28 3.525 3.525 0 0 1-1.17-.77 3.637 3.637 0 0 1-.77-1.18c-.18-.453-.27-.95-.27-1.49s.093-1.036.28-1.49a3.524 3.524 0 0 1 1.94-1.95 3.82 3.82 0 0 1 1.47-.28 3.59 3.59 0 0 1 1.47.31c.22.094.42.21.6.35.18.134.33.287.45.46l-.6.44a1.76 1.76 0 0 0-.3-.34 1.91 1.91 0 0 0-.43-.3 2.695 2.695 0 0 0-.55-.21 2.371 2.371 0 0 0-.63-.08c-.46 0-.874.084-1.24.25a2.878 2.878 0 0 0-1.5 1.66c-.134.374-.2.767-.2 1.18 0 .414.066.807.2 1.18.14.374.336.704.59.99.253.28.56.504.92.67.366.167.776.25 1.23.25.406 0 .793-.083 1.16-.25.366-.166.673-.433.92-.8l.56.36ZM131.302 39.46c-.533 0-.97-.09-1.31-.27-.34-.186-.61-.42-.81-.7a2.63 2.63 0 0 1-.42-.91 4.406 4.406 0 0 1-.11-.94V32.2h.72v4.36c0 .287.033.567.1.84a2.2 2.2 0 0 0 .32.72c.153.207.353.377.6.51.247.127.55.19.91.19s.663-.063.91-.19c.247-.133.443-.303.59-.51a2.1 2.1 0 0 0 .33-.72c.067-.273.1-.553.1-.84V32.2h.72v4.44c0 .294-.04.607-.12.94-.073.327-.21.63-.41.91-.2.28-.473.514-.82.7-.34.18-.773.27-1.3.27ZM137.512 39.28h-.72V32.2h2.08c.346 0 .666.034.96.1.3.067.556.177.77.33.22.147.39.34.51.58.12.24.18.534.18.88a1.758 1.758 0 0 1-.52 1.27 1.87 1.87 0 0 1-.57.37c-.22.094-.46.154-.72.18l2.07 3.37h-.88l-1.96-3.31h-1.2v3.31Zm0-3.93h1.25c.58 0 1.026-.103 1.34-.31.313-.213.47-.53.47-.95 0-.233-.044-.43-.13-.59a1.07 1.07 0 0 0-.36-.39c-.154-.1-.34-.173-.56-.22a3.527 3.527 0 0 0-.73-.07h-1.28v2.53ZM144.498 39.28h-.72V32.2h.72v7.08ZM149.645 39.28h-.72v-6.44h-2.37v-.64h5.46v.64h-2.37v6.44ZM156.391 39.28h-.72v-3.05l-2.65-4.03h.9l2.13 3.43 2.15-3.43h.84l-2.65 4.03v3.05Z",fill:"#C4C4C4"})),KA=({className:e})=>j.createElement("svg",{width:"15",height:"13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{d:"m14.901 1.414-2.257 10.559c-.178.752-.587.952-1.229.597l-3.42-2.523-1.66 1.594c-.221.221-.454.332-.697.332l.265-3.486 6.342-5.711c.155-.155.155-.244 0-.266-.133-.044-.277-.011-.431.1L3.977 7.557.59 6.494c-.376-.11-.554-.276-.531-.498.022-.221.254-.41.697-.564L13.938.319c.332-.111.598-.067.797.132.2.177.255.498.166.963Z"})),Kte=dx` 0% { opacity: 0; transform: rotateX(-90deg); } 50% { transform: rotateX(-20deg); } 100% { opacity: 1; transform: rotateX(0deg); } `;function Gte(){let e="";for(let t=0;t<20;t+=1)e+=` &:nth-child(${t+1}) { animation-delay: ${t*30}ms; } `;return D2` ${e} `}const Wte=ke.header` top: 0; position: fixed; z-index: 100; display: flex; box-sizing: border-box; width: 100%; height: 60px; padding-left: 16px; padding-right: 16px; background-color: ${Fe.BLACK}; @media ${Ee.MOBILE_LARGE} { height: 75px; } @media ${Ee.TABLET} { height: 80px; } @media ${Ee.LAPTOP} { height: 90px; padding: 0; } `,Zte=ke.div` display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: ${Ao}; margin: 0 auto; padding: 0 ${xi}; @media ${Ee.LAPTOP} { padding: 0 ${Ra}; } @media ${Ee.LAPTOP_LARGE} { padding: 0 ${_i}; } `,Yte=ke.a` width: 87px; height: 22px; font-size: 0; @media ${Ee.MOBILE_LARGE} { width: 120px; height: 30px; } @media ${Ee.LAPTOP} { width: 144px; height: 36px; } @media ${Ee.DESKTOP} { width: 160px; height: 40px; } `,Xte=ke.nav` display: none; @media ${Ee.LAPTOP} { display: block; height: 100%; } `,Jte=ke.ul` display: flex; height: 100%; margin: 0 -14px; @media ${Ee.DESKTOP} { margin: 0 -32px; } `,Qte=ke.ul` position: absolute; z-index: 10; top: 100%; left: 50%; transform: translateX(-50%); `,GA=ke.li` padding-top: 10px; padding-bottom: 10px; display: none; padding-left: 24px; padding-right: 24px; white-space: nowrap; text-align: center; ${Gte}; animation-name: ${Kte}; transform-origin: top center; animation-fill-mode: forwards; opacity: 0; background-color: ${Fe.BLACK}; `,kg=ke.a` display: inline-block; position: relative; ${st.BODY6}; color: rgba(241, 241, 241, 0); ${el(Fe.GREEN_SECONDARY)}; transition: 0.6s color; `,I8=ke.a` color: rgba(241, 241, 241, 1); &:hover { color: ${Fe.GREEN_SECONDARY}; } `,Vf=ke.li` display: flex; align-items: center; position: relative; padding: 0 14px; color: ${Fe.WHITE}; text-transform: capitalize; transition: 0.3s; @media ${Ee.DESKTOP} { padding: 0 32px; } &:hover { color: ${Fe.GREEN_SECONDARY}; ${GA} { display: block; } ${kg} { color: rgba(241, 241, 241, 1); } } `,ere=ke.a` ${st.BODY6}; padding: 12px 16px; border-radius: 24px; ${px}; background-color: ${Fe.BLACK}; color: ${Fe.LIGHT_GREY}; transition: 0.3s; @media ${Ee.DESKTOP} { ${st.BODY5}; } & svg { fill: ${Fe.LIGHT_GREY}; margin-right: 10px; transition: 0.3s; } `,f0=({links:e})=>j.createElement(Qte,null,e==null?void 0:e.map(t=>{const r=(t==null?void 0:t.linkTitle)==="Online ABI Encoder"||(t==null?void 0:t.linkTitle)==="Paper Wallet",n=()=>tre(t.linkTitle);return j.createElement(GA,{key:t==null?void 0:t.id},r?j.createElement(kg,{href:t==null?void 0:t.linkHref,target:"_blank",rel:"noopener noreferrer"},t==null?void 0:t.linkTitle):j.createElement(kg,{href:t==null?void 0:t.linkHref,onClick:n},t==null?void 0:t.linkTitle))}));function tre(e){throw new Error("Function not implemented.")}const WA=(e,t)=>{if(typeof window<"u"&&window.gtag){const{gtag:r}=window;r("event",e,t)}},ZA=(e=window.location.pathname)=>{WA("request_contract",{event_category:"elements",event_action:"click",event_label:e})},Uo=e=>{WA("elements_click",{event_category:"social_media",event_label:e})},rre="/assets/header-arrow.dd4557e9.svg",nre="/assets/hash.5774225c.svg",YA="/assets/arrow-white.f735af87.svg",ire=ke.div` @media ${Ee.LAPTOP} { display: none; } `,are=ke.aside` background-color: ${Fe.BLACK}; left: ${({opened:e})=>e?0:"-100%"}; box-sizing: border-box; width: 100%; min-height: 100vh; position: fixed; top: 0; transition: all 0.5s ease-in-out; z-index: 11; `,ore=ke.div` display: flex; align-items: center; height: 60px; padding-left: 16px; @media ${Ee.MOBILE_LARGE} { height: 75px; } @media ${Ee.TABLET} { height: 80px; } @media ${Ee.LAPTOP} { height: 90px; padding: 0; } `,sre=ke.button` width: 20px; height: 20px; border: none; background-image: url(${rre}); background-color: transparent; background-repeat: no-repeat; background-position: 50% 50%; cursor: pointer; transform: ${({visible:e})=>`translateX(${e?0:"-40px"})`}; margin-right: ${({visible:e})=>e?"10px":"-20px"}; transition: 0.5s ease-in-out; `,fre=ke.div` width: 20px; height: 20px; background-image: url(${nre}); background-repeat: no-repeat; background-position: 50% 50%; `,Av=ke.ul` display: flex; flex-direction: column; align-items: center; `,Li=ke.li` margin: 6px 0; color: ${({active:e})=>e?Fe.GREEN_SECONDARY:Fe.LIGHT_GREY}; cursor: pointer; ${st.BODY5}; font-weight: 500; text-transform: capitalize; &:after { content: ''; content: ${({hasArrow:e})=>e?"''":"none"}; display: inline-block; width: 11px; height: 9px; margin-left: 10px; background-image: url(${YA}); background-repeat: no-repeat; transition: 0.3s; } &:hover:after { transform: translateX(5px); } &:last-child { margin-top: 25px; } `,$8=ke.a` color: ${Fe.GREEN_SECONDARY}; `,ure=ke.div` margin-top: 50px; `,u0=ke.a` color: ${Fe.WHITE}; ${st.BODY6}; font-weight: 400; ${({hasArrow:e})=>!e&&el(Fe.GREEN_SECONDARY)}; &:after { content: ''; content: ${({hasArrow:e})=>e?"''":"none"}; display: inline-block; width: 8px; height: 6px; margin-left: 10px; margin-bottom: 2px; background-image: url(${YA}); background-repeat: no-repeat; background-size: cover; transition: 0.3s; } &:hover:after { transform: translateX(5px); } `,lre=ke.div` margin-top: 50px; ${Li}:last-child { margin-top: 10px; } `,hre=ke.nav` background: ${Fe.BLACK}; position: fixed; z-index: 100; top: 60px; left: ${({opened:e})=>e?0:"-100%"}; width: 100%; height: 100%; transition: 0.5s ease-in-out; ${Li}:first-child { margin-bottom: 16px; } `,cre=ke.button` display: block; position: relative; z-index: 100; width: 18px; height: 14px; padding: 0; border: none; cursor: pointer; background: transparent; `,Cv=ke.span` position: absolute; top: ${({opened:e})=>e?"1px":0}; left: ${({opened:e})=>e?"3px":0}; display: block; width: 100%; height: 2px; border-radius: 2px; background: ${({opened:e})=>e?Fe.GREEN_PRIMARY:Fe.LIGHT_GREY}; transform-origin: left center; transition: 0.5s ease-in-out; transform: ${({opened:e})=>e?"rotate(45deg)":"none"}; &:nth-child(2) { top: 7px; left: 0; width: ${({opened:e})=>e?0:"100%"}; opacity: ${({opened:e})=>e?0:1}; transform: none; } &:nth-child(3) { top: 14px; left: ${({opened:e})=>e?"3px":0}; transform: ${({opened:e})=>e?"rotate(-45deg)":"none"}; } `,dre=ke.a` ${st.BODY6}; padding: 12px 22px; border-radius: 30px; ${px}; background-color: ${Fe.BLACK}; color: ${Fe.LIGHT_GREY}; transition: 0.3s; text-transform: none; @media ${Ee.TABLET} { ${st.BODY5}; padding: 15px 30px; } `,pre=500,vre=({chainsTitle:e,chainsLinks:t,typesOfAuditsTitle:r,typesOfAuditsLinks:n})=>({[e]:t,[r]:n}),mre=({productsTitle:e,productsLinks:t,companyTitle:r,companyLinks:n,servicesTitle:o,servicesLinks:a})=>({[o]:a,[e]:t,[r]:n}),gre=({common:e})=>{var T,I;const[t,r]=le.exports.useState(!1),[n,o]=le.exports.useState(!1),[a,d]=le.exports.useState(null),m=le.exports.useMemo(()=>vre(e),[e]),y=le.exports.useMemo(()=>mre(e),[e]),w={...m,...y},M=O=>{o(!0),d(O)},_=()=>{o(!1),setTimeout(()=>{d(null)},pre)},E=le.exports.useCallback(()=>{t&&a&&_(),r(!t)},[t,a]),S=j.useCallback((O,P)=>O===(P==null?void 0:P.servicesTitle)?j.createElement($8,{href:P==null?void 0:P.servicesHref,onClick:E},P==null?void 0:P.servicesTitle):O===(P==null?void 0:P.productsTitle)?j.createElement($8,{href:P==null?void 0:P.productsHref,onClick:E},P==null?void 0:P.productsTitle):a,[a,E]),A=()=>{ZA(window.location.pathname),E()};return j.createElement(ire,null,j.createElement(are,{opened:t},j.createElement(ore,null,j.createElement(sre,{onClick:_,visible:n}),j.createElement(fre,null)),j.createElement(Av,null,j.createElement(Li,{active:!0},e==null?void 0:e.auditsTitle),e==null?void 0:e.auditsLinks.map(O=>j.createElement(Li,{key:O.id},j.createElement(u0,{href:O==null?void 0:O.linkHref,onClick:E},O==null?void 0:O.linkTitle))),Object.keys(m).map(O=>j.createElement(Li,{key:O,onClick:()=>M(O)},j.createElement(u0,{hasArrow:!0},O))),j.createElement(lre,null,j.createElement(Av,null,Object.keys(y).map(O=>j.createElement(Li,{key:O,onClick:()=>M(O),hasArrow:!0},O)))),j.createElement(ure,null,j.createElement(Hc,{href:(T=e==null?void 0:e.contacts)==null?void 0:T.requestButtonHref,text:"Request a Quote",onClick:E}))),j.createElement(hre,{opened:n},j.createElement(Av,null,a&&j.createElement(j.Fragment,null,j.createElement(Li,{active:!0},S(a,e)),w[a].map(O=>{const P=(O==null?void 0:O.linkTitle)==="Blog"||(O==null?void 0:O.linkTitle)==="Online ABI Encoder"||(O==null?void 0:O.linkTitle)==="Paper Wallet";return j.createElement(Li,{key:O==null?void 0:O.id},P?j.createElement(u0,{href:O==null?void 0:O.linkHref,target:"_blank",rel:"noopener noreferrer"},O==null?void 0:O.linkTitle):j.createElement(u0,{href:O==null?void 0:O.linkHref,onClick:E},O==null?void 0:O.linkTitle))})),j.createElement(Li,null,j.createElement(dre,{href:(I=e==null?void 0:e.contacts)==null?void 0:I.requestButtonHref,onClick:A},"Request a Quote"))))),j.createElement(cre,{type:"button",onClick:E},j.createElement(Cv,{opened:t}),j.createElement(Cv,{opened:t}),j.createElement(Cv,{opened:t})))},yre=({common:e})=>{var r,n;const t=e==null?void 0:e.auditsLinks.concat([{id:((r=e==null?void 0:e.auditsLinks)==null?void 0:r.length)+1,linkTitle:e==null?void 0:e.chainsTitle,linkHref:e==null?void 0:e.chainsHref},{id:((n=e==null?void 0:e.auditsLinks)==null?void 0:n.length)+2,linkTitle:e==null?void 0:e.typesOfAuditsTitle,linkHref:e==null?void 0:e.typesOfAuditsHref}]);return j.createElement(Wte,null,j.createElement(Zte,null,j.createElement(Yte,{href:nt},"Logo",j.createElement(Vte,null)),j.createElement(Xte,null,j.createElement(Jte,null,j.createElement(Vf,null,e==null?void 0:e.auditsTitle,j.createElement(f0,{links:t})),j.createElement(Vf,null,j.createElement(I8,{href:e==null?void 0:e.servicesHref},e==null?void 0:e.servicesTitle),j.createElement(f0,{links:e==null?void 0:e.servicesLinks})),j.createElement(Vf,null,j.createElement(I8,{href:e==null?void 0:e.productsHref},e==null?void 0:e.productsTitle),j.createElement(f0,{links:e==null?void 0:e.productsLinks})),j.createElement(Vf,null,e==null?void 0:e.companyTitle,j.createElement(f0,{links:e==null?void 0:e.companyLinks})),j.createElement(Vf,null,j.createElement(ere,{href:e==null?void 0:e.telegramChatLink,target:"_blank",rel:"noopener noreferrer"},j.createElement(KA,null),e==null?void 0:e.telegramChatTitle)))),j.createElement(gre,{common:e})))},bre=ke.main` margin-top: 60px; @media ${Ee.MOBILE_LARGE} { margin-top: 75px; } @media ${Ee.TABLET} { margin-top: 80px; } @media ${Ee.LAPTOP} { margin-top: 90px; } `,wre=({children:e})=>j.createElement(bre,null,e),Mre="/assets/dsamember-badge.21ff9171.png",xre=ke.footer` position: relative; padding-top: 24px; padding-bottom: 40px; padding-left: ${xi}; padding-right: ${xi}; background-color: ${Fe.BLACK}; @media ${Ee.LAPTOP} { padding-bottom: 60px; padding-left: ${_i}; padding-right: ${_i}; } @media ${Ee.DESKTOP} { padding-top: 70px; padding-bottom: 70px; } `,_re=ke.div` display: flex; flex-direction: column; justify-content: space-between; box-sizing: border-box; width: 100%; max-width: ${Ao}; margin: 0 auto; @media ${Ee.DESKTOP} { flex-direction: row; justify-content: space-between; } `,Ere=ke.div` display: flex; flex-direction: column; align-items: center; width: 100%; @media ${Ee.MOBILE_LARGE} { flex-direction: row; justify-content: space-between; margin-bottom: 40px; } @media ${Ee.LAPTOP} { margin-bottom: 40px; } @media ${Ee.DESKTOP} { flex-direction: column; align-items: flex-start; justify-content: flex-start; width: auto; margin-bottom: 0; } `,Sre=ke.a` display: inline-block; height: 13px; font-size: 0; @media ${Ee.MOBILE_LARGE} { width: 136px; height: 20px; } `,Are=ke.ul` display: none; @media ${Ee.LAPTOP} { display: block; height: 100%; } `,Cre=ke.nav` display: grid; grid-template-columns: repeat(2, minmax(min-content, max-content)); grid-template-rows: repeat(4, auto); grid-column-gap: 16px; justify-content: space-between; @media ${Ee.MOBILE_LARGE} { padding: 0 40px; } @media ${Ee.TABLET} { padding: 0; grid-template-columns: repeat(3, minmax(min-content, max-content)); grid-template-rows: repeat(2, auto); grid-row-gap: 40px; } @media ${Ee.LAPTOP} { grid-template-columns: repeat(5, minmax(min-content, max-content)); grid-row-gap: 0; } @media ${Ee.DESKTOP} { grid-column-gap: 70px; } `,kre=ke.div` grid-row-start: 1; grid-row-end: 2; `,Tre=ke.div` @media ${Ee.TABLET} { margin-top: 34px; } `,Rre=ke.div` grid-column-start: 2; grid-column-end: 3; grid-row-start: 1; grid-row-end: 2; `,Ore=ke.div` grid-row-start: 2; grid-row-end: 3; @media ${Ee.TABLET} { grid-column-start: 3; grid-column-end: 4; grid-row-start: 1; grid-row-end: 2; } @media ${Ee.LAPTOP} { grid-column-start: 4; grid-column-end: 5; grid-row-start: 1; grid-row-end: 2; } `,Pre=ke.div` grid-row-start: 3; grid-row-end: 4; @media ${Ee.TABLET} { grid-column-start: 2; grid-column-end: 3; grid-row-start: 2; grid-row-end: 3; } @media ${Ee.LAPTOP} { grid-column-start: 3; grid-column-end: 4; grid-row-start: 1; grid-row-end: 2; } `,Bre=ke.div` grid-column-start: 2; grid-column-end: 3; grid-row-start: 2; grid-row-end: 3; @media ${Ee.TABLET} { grid-column-start: 1; grid-column-end: 2; grid-row-start: 2; grid-row-end: 3; } @media ${Ee.LAPTOP} { grid-column-start: 5; grid-column-end: 6; grid-row-start: 1; grid-row-end: 2; } `,Ire=ke.div` grid-column-start: 2; grid-column-end: 3; align-self: end; @media ${Ee.MOBILE_LARGE} { grid-row-start: 3; grid-row-end: 4; align-self: auto; margin-top: 30px; } @media ${Ee.TABLET} { grid-column-start: 3; grid-column-end: 4; grid-row-start: 2; grid-row-end: 3; margin-top: 0; } @media ${Ee.LAPTOP} { display: none; } `,$re=ke.div` margin-top: 30px; @media ${Ee.TABLET} { margin-top: 0; } `,Lre=ke.h3` margin-bottom: 24px; ${st.H9}; font-weight: 500; text-transform: uppercase; color: ${Fe.GREY}; `,L8=ke.a` color: ${Fe.GREY}; `,Dre=ke.ul` margin: -10px 0; `,Fre=ke.li` margin: 10px 0; text-transform: capitalize; `,D8=ke.a` color: ${Fe.LIGHT_GREY}; ${st.CAPTION1}; ${el(Fe.GREEN_SECONDARY)} `,Nre=ke.div` display: flex; flex-direction: column; justify-content: space-between; height: 100%; `,zre=ke.ul` margin: -10px 0; margin-bottom: auto; @media ${Ee.TABLET} { margin-top: 0; } @media ${Ee.LAPTOP} { display: flex; align-items: center; margin: 0 -36px; } @media ${Ee.DESKTOP} { flex-direction: column; margin: 0; align-items: flex-start; } `,kv=ke.li` margin: 10px 0; color: ${Fe.GREY}; ${st.CAPTION1}; @media ${Ee.LAPTOP} { display: flex; margin: 0 36px; } @media ${Ee.DESKTOP} { margin: 5px 0; } `,F8=ke.a` color: ${Fe.GREY}; ${el(Fe.GREEN_SECONDARY)} `,Hre=ke.div` display: flex; flex-direction: column; margin-top: auto; line-height: 120%; margin-top: 36px; gap: 15px; @media ${Ee.MOBILE_LARGE} { gap: 11px; align-items: flex-start; } @media ${Ee.TABLET} { gap: 15px; } @media ${Ee.LAPTOP} { position: absolute; top: calc(100% - 105px); left: calc(100% - 325px); gap: 10px; align-items: flex-end; } @media ${Ee.DESKTOP} { position: static; margin-top: 0; gap: 20px; } `,Ure=ke.p` color: ${Fe.GREY}; ${st.CAPTION2}; `,jre=ke.br` display: none; @media ${Ee.MOBILE_LARGE} { display: block; } @media ${Ee.LAPTOP} { display: none; } `,N8=ke.br` display: none; @media ${Ee.DESKTOP} { display: block; } `,qre=ke.a` width: 115px; height: 32px; background-image: url(${Mre}); background-poisition: center; background-size: cover; `,l0=e=>j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",...e}),Vre=({className:e})=>j.createElement("svg",{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"#414141"}),j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.655 6.976c0 .799-.602 1.438-1.568 1.438H7.07c-.93 0-1.531-.64-1.531-1.438 0-.816.62-1.438 1.567-1.438s1.53.622 1.549 1.438ZM8.473 9.55v8.323h-2.77V9.55h2.77Zm9.988 8.322V13.1c0-2.556-1.366-3.746-3.19-3.746-1.47 0-2.128.808-2.496 1.375v-1.18h-2.77c.036.782 0 8.323 0 8.323h2.77v-4.648c0-.248.018-.497.091-.675.2-.496.656-1.01 1.422-1.01 1.002 0 1.403.762 1.403 1.88v4.453h2.77Z",fill:"#fff"})),Kre=({className:e})=>j.createElement("svg",{width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"#414141"}),j.createElement("g",{clipPath:"url(#a)",fill:"#fff"},j.createElement("path",{d:"M12.827 12.474c0 1.97-1.638 3.566-3.658 3.566S5.51 14.444 5.51 12.474c0-1.97 1.638-3.567 3.659-3.567 2.02 0 3.658 1.597 3.658 3.567ZM16.84 12.473c0 1.855-.818 3.358-1.829 3.358-1.01 0-1.829-1.503-1.829-3.358 0-1.854.82-3.357 1.83-3.357 1.01 0 1.829 1.503 1.829 3.357ZM18.483 12.474c0 1.661-.288 3.008-.644 3.008-.355 0-.643-1.347-.643-3.008 0-1.662.288-3.008.643-3.008.356 0 .644 1.347.644 3.008Z"})),j.createElement("defs",null,j.createElement("clipPath",{id:"a"},j.createElement("path",{fill:"#fff",transform:"translate(1.846 5.538)",d:"M0 0h20.308v13.846H0z"}))));var XA=(e=>(e.MEDIUM="medium",e.TWITTER="twitter",e.LINKEDIN="linkedin",e.GITHUB="github",e.MAIL="mail",e.TELEGRAM="telegram",e))(XA||{});const Gre=(e,t)=>{const r=Wre(t),n=[];return e.forEach(o=>{n.push(r[o])}),n},Wre=e=>({medium:{alt:"medium logo",href:e==null?void 0:e.socialMediumLink,onClick:()=>Uo("medium"),icon:j.createElement(Kre,null)},twitter:{alt:"twitter logo",href:e==null?void 0:e.socialTwitterLink,onClick:()=>Uo("twitter"),icon:j.createElement(l0,{width:"24",height:"24",fill:"none"},j.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"#414141"}),j.createElement("path",{d:"m11.84 9.163.024.439-.4-.054c-1.457-.206-2.73-.905-3.81-2.08l-.528-.582-.136.43c-.288.96-.104 1.972.496 2.653.32.377.248.43-.304.207-.192-.072-.36-.126-.376-.099-.056.063.136.878.288 1.201.208.448.632.887 1.096 1.147l.392.206-.464.01c-.448 0-.464.008-.416.197.16.582.792 1.2 1.497 1.47l.496.188-.432.287a4.176 4.176 0 0 1-2.145.663c-.36.009-.657.045-.657.072 0 .09.977.591 1.545.788 1.705.583 3.73.332 5.25-.663 1.081-.708 2.162-2.115 2.666-3.478.272-.726.544-2.052.544-2.689 0-.412.024-.466.472-.959.264-.286.513-.6.56-.69.08-.17.072-.17-.336-.018-.68.27-.776.233-.44-.17.248-.287.544-.807.544-.959 0-.027-.12.018-.256.099-.144.09-.464.224-.704.304l-.432.153-.392-.296c-.216-.161-.52-.34-.68-.394-.409-.126-1.033-.108-1.401.035-1 .404-1.633 1.443-1.561 2.582Z",fill:"#fff"}))},linkedin:{alt:"linkedin logo",href:e==null?void 0:e.socialLinkedinLink,onClick:()=>Uo("linkedin"),icon:j.createElement(Vre,null)},github:{alt:"github logo",href:e==null?void 0:e.socialGithubLink,onClick:()=>Uo("github"),icon:j.createElement(l0,{width:"24",height:"24",fill:"none"},j.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"#414141"}),j.createElement("path",{d:"M12 3.692c-4.588 0-8.308 3.814-8.308 8.518 0 3.764 2.38 6.957 5.682 8.083.415.079.567-.185.567-.41 0-.203-.007-.874-.01-1.585-2.312.515-2.8-1.005-2.8-1.005-.378-.985-.922-1.247-.922-1.247-.754-.529.057-.518.057-.518.834.06 1.273.878 1.273.878.741 1.302 1.944.926 2.418.708.074-.55.29-.926.527-1.139C8.64 15.76 6.7 15.03 6.7 11.765c0-.93.325-1.69.856-2.286-.086-.214-.37-1.08.08-2.254 0 0 .698-.229 2.286.873A7.778 7.778 0 0 1 12 7.811a7.798 7.798 0 0 1 2.08.287c1.586-1.102 2.283-.873 2.283-.873.452 1.173.167 2.04.081 2.254.533.597.855 1.357.855 2.287 0 3.271-1.943 3.992-3.793 4.202.298.265.563.783.563 1.578 0 1.14-.01 2.057-.01 2.337 0 .227.15.493.571.409 3.3-1.128 5.677-4.32 5.677-8.082 0-4.704-3.72-8.518-8.308-8.518Z",fill:"#fff"}),j.createElement("path",{d:"M6.863 15.864c-.018.042-.083.054-.142.025-.06-.027-.094-.084-.074-.126.018-.043.083-.055.143-.027.06.028.094.086.073.128ZM7.2 16.245c-.04.037-.118.02-.17-.04-.054-.058-.065-.137-.024-.175.04-.037.115-.02.17.04.054.059.065.137.023.175ZM7.526 16.73c-.05.037-.133.003-.185-.072-.05-.075-.05-.165.001-.2.052-.037.134-.005.186.07.05.076.05.166-.002.203ZM7.974 17.2c-.045.051-.142.038-.213-.032-.072-.068-.093-.165-.047-.215.046-.052.143-.037.215.032.072.068.094.165.045.215ZM8.592 17.472c-.02.066-.113.096-.207.068-.094-.029-.155-.106-.136-.173.02-.066.113-.098.207-.068.094.03.155.106.136.173ZM9.27 17.523c.003.07-.076.127-.175.128-.1.002-.18-.054-.18-.122 0-.07.077-.128.177-.13.098-.002.179.054.179.123ZM9.902 17.414c.012.068-.057.137-.154.156-.097.018-.186-.024-.198-.091-.012-.07.058-.14.154-.158.098-.017.186.024.198.093Z",fill:"#161514"}))},mail:{alt:"mail logo",href:e==null?void 0:e.socialEmailLink,onClick:()=>Uo("hashex_email"),icon:j.createElement(l0,{width:"24",height:"24",fill:"none"},j.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"#414141"}),j.createElement("path",{d:"M17.6 7H6.4c-.77 0-1.393.563-1.393 1.25L5 15.75c0 .688.63 1.25 1.4 1.25h11.2c.77 0 1.4-.563 1.4-1.25v-7.5C19 7.562 18.37 7 17.6 7Zm0 2.5L12 12.625 6.4 9.5V8.25l5.6 3.125 5.6-3.125V9.5Z",fill:"#F1F1F1"}))},telegram:{alt:"telegram logo",href:e==null?void 0:e.socialTelegramLink,onClick:()=>Uo("telegram"),icon:j.createElement(l0,{width:"24",height:"24",fill:"none"},j.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"#414141"}),j.createElement("path",{d:"m17.964 8.018-1.972 9.305c-.154.664-.512.84-1.073.527l-2.987-2.224-1.45 1.405c-.193.195-.396.292-.608.292l.231-3.072 5.54-5.033c.135-.137.135-.215 0-.234-.117-.04-.242-.01-.378.087l-6.843 4.36-2.958-.936c-.33-.097-.484-.244-.464-.439.019-.195.222-.36.609-.497l11.512-4.507c.29-.097.522-.058.696.117.174.156.223.44.145.849Z",fill:"#F1F1F1"}))}}),Zre=ke.ul` display: flex; margin: 0 -8px; margin-top: 20px; @media ${Ee.MOBILE_LARGE} { margin-top: 0; } @media ${Ee.DESKTOP} { margin: 35px -8px; } `,Yre=ke.li` margin: 0 8px; & svg circle, svg path, svg g { transition: 0.3s; } &:hover svg circle { fill: ${Fe.GREEN_SECONDARY}; } &:hover svg path, &:hover svg g { fill: ${Fe.BLACK}; } `,z8=e=>/(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/.test(e),Xre=({socialList:e,common:t})=>{const r=le.exports.useMemo(()=>Gre(e,t),[e,t]);return j.createElement(Zre,null,r.map(n=>j.createElement(Yre,{key:n.alt},j.createElement("a",{href:z8(n==null?void 0:n.href)?`mailto:${n.href}`:`${n.href}`,target:z8(n==null?void 0:n.href)?"_self":"_blank",rel:"noreferrer",onClick:n.onClick},n.icon))))},Jre=({className:e})=>j.createElement("svg",{width:"136",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{d:"M28.486 8.973h11.84v-7.62h3.371V20h-3.371v-7.62h-11.84V20h-3.371V1.352h3.371v7.62ZM61.67 15.345c0 .468-.082.975-.246 1.521a4.553 4.553 0 0 1-.804 1.509c-.363.459-.843.845-1.44 1.157-.587.312-1.305.468-2.152.468h-6.082c-.467 0-.972-.082-1.517-.247a4.659 4.659 0 0 1-1.504-.793 4.594 4.594 0 0 1-1.154-1.444c-.312-.598-.467-1.322-.467-2.171 0-.469.082-.976.246-1.522a4.51 4.51 0 0 1 .791-1.508 4.501 4.501 0 0 1 1.44-1.17c.596-.313 1.318-.469 2.165-.469h6.082v3.225h-6.082c-.458 0-.813.143-1.063.43-.251.277-.376.623-.376 1.04 0 .442.142.789.428 1.04.293.243.64.364 1.037.364h6.056c.458 0 .812-.139 1.063-.416.25-.278.376-.624.376-1.04v-4.72c0-.443-.138-.794-.415-1.054-.268-.26-.61-.39-1.024-.39h-7.405V5.943h7.405c.467 0 .968.082 1.504.247a4.372 4.372 0 0 1 1.504.806c.467.364.856.845 1.167 1.444.312.589.467 1.309.467 2.158v4.747ZM78.1 15.254a5.24 5.24 0 0 1-.22 1.573c-.147.46-.342.867-.584 1.222a4.162 4.162 0 0 1-.843.898c-.32.242-.657.442-1.011.598-.346.156-.7.273-1.064.351-.354.07-.691.104-1.011.104h-9.13v-3.381h9.104c.458 0 .804-.117 1.037-.351.234-.234.35-.572.35-1.014-.043-.902-.497-1.353-1.361-1.353H68.14c-.744 0-1.375-.13-1.893-.39a3.944 3.944 0 0 1-1.271-.975c-.32-.39-.553-.81-.7-1.262a4.313 4.313 0 0 1-.208-1.261c0-.754.134-1.387.402-1.899a3.785 3.785 0 0 1 2.334-1.95c.476-.148.921-.221 1.336-.221h8.286v3.38h-8.26c-.173 0-.311.022-.415.066a.466.466 0 0 0-.22.156.435.435 0 0 0-.078.208 1.69 1.69 0 0 0-.013.208.78.78 0 0 0 .078.325.424.424 0 0 0 .155.17c.07.034.143.056.22.064h5.473c.864 0 1.6.156 2.204.468.606.312 1.094.707 1.466 1.184.371.468.64.98.804 1.534.173.555.259 1.07.259 1.548ZM96.06 20h-3.371v-9.324c0-.442-.113-.776-.338-1.001-.224-.234-.562-.351-1.011-.351h-6.082V5.943h6.082c.32 0 .657.039 1.011.117.355.07.705.182 1.05.338.355.156.692.36 1.012.611.32.243.601.542.843.897.242.347.437.75.584 1.21.147.46.22.98.22 1.56V20Zm-12.163 0h-3.372V0h3.371v20ZM114.811 12.38h-10.646V8.973h10.646v3.407Zm1.517 7.62h-12.163a5.39 5.39 0 0 1-1.53-.247 4.626 4.626 0 0 1-1.544-.806 4.78 4.78 0 0 1-1.18-1.47c-.31-.607-.466-1.348-.466-2.223V3.056c0-.234.043-.455.13-.663a1.79 1.79 0 0 1 .35-.546c.155-.156.337-.278.544-.365.207-.086.432-.13.674-.13h15.185v3.381h-13.512v10.52c0 .443.117.78.35 1.015.234.234.575.351 1.025.351h12.137V20ZM135.235 5.943l-6.056 6.632L136 20h-4.642l-4.487-4.902L122.384 20h-4.655l6.808-7.451-6.03-6.606h4.616l3.722 4.07 3.748-4.07h4.642Z",fill:"#fff"}),j.createElement("path",{d:"M2.345 5.639h3.002l1.033-4.54h3.393l-1.02 4.54h3.49l1.02-4.54h3.406l-1.033 4.54h3.211l-.726 3.205h-3.197l-.74 3.356h3.086l-.712 3.205h-3.086L12.44 20H9.033l1.033-4.595h-3.49L5.542 20H2.15l1.02-4.595H0L.768 12.2H3.88l.754-3.356H1.578l.767-3.205ZM7.288 12.2h3.49l.74-3.356h-3.49l-.74 3.356Z",fill:"#C2F051"})),Qre=e=>e==="Services"?j.createElement(L8,{href:fn.servicesHref},"Services"):e==="Products"?j.createElement(L8,{href:fn.productsHref},"Products"):e,jo=({title:e,links:t})=>j.createElement($re,null,j.createElement(Lre,null,Qre(e)),j.createElement(Dre,null,t==null?void 0:t.map(r=>{const n=(r==null?void 0:r.linkTitle)==="Blog"||(r==null?void 0:r.linkTitle)==="Online ABI Encoder"||(r==null?void 0:r.linkTitle)==="Paper Wallet";return j.createElement(Fre,{key:r==null?void 0:r.id},n?j.createElement(D8,{href:r==null?void 0:r.linkHref,target:"_blank",rel:"noopener noreferrer"},r==null?void 0:r.linkTitle):j.createElement(D8,{href:r==null?void 0:r.linkHref},r==null?void 0:r.linkTitle))}))),H8=({common:e})=>j.createElement(Nre,null,j.createElement(zre,null,j.createElement(kv,null,e==null?void 0:e.copyrightText),j.createElement(kv,null,j.createElement(F8,{href:e==null?void 0:e.privacyHref},e==null?void 0:e.privacyPolicyTitle)),j.createElement(kv,null,j.createElement(F8,{href:e==null?void 0:e.cookieHref},e==null?void 0:e.cookiePolicyTitle))),j.createElement(Hre,null,j.createElement(qre,{href:e==null?void 0:e.defiBadgeLink,target:"_blank",rel:"noopener noreferrer"}),j.createElement(Ure,null,"HashEx US, LLC\xA0",j.createElement(N8,null),"16192 COASTAL\xA0",j.createElement(jre,null),"HWY -\xA0",j.createElement(N8,null),"LEWES DE\xA019958, USA"))),ene=Object.values(XA),tne=({common:e})=>j.createElement(xre,null,j.createElement(_re,null,j.createElement(Ere,null,j.createElement(Sre,{href:nt},"Logo",j.createElement(Jre,null)),j.createElement(Xre,{common:e,socialList:ene}),j.createElement(Are,null,j.createElement(H8,{common:e}))),j.createElement(Cre,null,j.createElement(kre,null,jo({title:e==null?void 0:e.auditsTitle,links:e==null?void 0:e.auditsLinks}),j.createElement(Tre,null,jo({title:e==null?void 0:e.chainsTitle,links:e==null?void 0:e.chainsLinks}))),j.createElement(Rre,null,jo({title:e==null?void 0:e.typesOfAuditsTitle,links:e==null?void 0:e.typesOfAuditsLinks})),j.createElement(Ore,null,jo({title:e==null?void 0:e.productsTitle,links:e==null?void 0:e.productsLinks})),j.createElement(Pre,null,jo({title:e==null?void 0:e.servicesTitle,links:e==null?void 0:e.servicesLinks})),j.createElement(Bre,null,jo({title:e==null?void 0:e.companyTitle,links:e==null?void 0:e.companyLinks})),j.createElement(Ire,null,j.createElement(H8,{common:e}))))),rne=({className:e})=>j.createElement("svg",{width:"16",height:"13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{d:"M14.4 0H1.6C.72 0 .008.72.008 1.6L0 11.2c0 .88.72 1.6 1.6 1.6h12.8c.88 0 1.6-.72 1.6-1.6V1.6c0-.88-.72-1.6-1.6-1.6Zm0 3.2L8 7.2l-6.4-4V1.6l6.4 4 6.4-4v1.6Z",fill:"currentColor"})),nne=({className:e})=>j.createElement("svg",{width:"16",height:"17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.4391 12.7839C14.3916 12.0882 15.0001 11.059 15.0001 9.91552C15.0001 7.8196 12.9774 6.12085 10.482 6.12085C7.98685 6.12085 5.96387 7.8196 5.96387 9.91552C5.96387 12.0114 7.98685 13.7105 10.482 13.7105C10.9975 13.7105 11.4953 13.6362 11.9569 13.5025C11.9989 13.4896 12.0434 13.4824 12.0897 13.4824C12.1764 13.4824 12.2552 13.509 12.3296 13.5524L13.3185 14.128C13.3462 14.1438 13.373 14.1563 13.4057 14.1563C13.489 14.1563 13.5563 14.0882 13.5563 14.0045C13.5563 13.9668 13.5414 13.9294 13.532 13.8934C13.5263 13.872 13.4046 13.4139 13.3284 13.128C13.3197 13.0958 13.3125 13.0648 13.3125 13.0313C13.3125 12.9294 13.3625 12.839 13.4391 12.7839ZM8.97591 9.26943C8.66444 9.26943 8.41179 9.01501 8.41179 8.7011C8.41179 8.38705 8.66444 8.1325 8.97591 8.1325C9.28751 8.1325 9.54003 8.38705 9.54003 8.7011C9.54003 9.01501 9.28751 9.26943 8.97591 9.26943ZM11.9877 9.26943C11.6761 9.26943 11.4238 9.01501 11.4238 8.7011C11.4238 8.38705 11.6761 8.1325 11.9877 8.1325C12.2993 8.1325 12.5518 8.38705 12.5518 8.7011C12.5518 9.01501 12.2993 9.26943 11.9877 9.26943Z",fill:"currentColor"}),j.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.4217 1.93091C2.42736 1.93091 0 3.96978 0 6.48462C0 7.85696 0.730382 9.0921 1.87329 9.92681C1.96512 9.99282 2.02516 10.1011 2.02516 10.2237C2.02516 10.2641 2.0166 10.3009 2.006 10.3397C1.91472 10.683 1.76857 11.2326 1.76177 11.2583C1.75036 11.3015 1.73271 11.3463 1.73271 11.3914C1.73271 11.492 1.81353 11.5734 1.91337 11.5734C1.95276 11.5734 1.98468 11.5589 2.01769 11.5396L3.20488 10.8489C3.29399 10.7971 3.38839 10.7652 3.49258 10.7652C3.54813 10.7652 3.60152 10.7735 3.65191 10.7889C4.20571 10.9495 4.80297 11.0386 5.4217 11.0386C5.52167 11.0386 5.62083 11.0359 5.71945 11.0316C5.60154 10.6762 5.53743 10.3023 5.53743 9.9154C5.53743 7.62183 7.75113 5.76226 10.4821 5.76226C10.581 5.76226 10.6062 5.76538 10.7036 5.77014C10.2953 3.59461 8.12657 1.93091 5.4217 1.93091ZM3.615 5.67333C3.26074 5.67333 2.97372 5.384 2.97372 5.0273C2.97372 4.67046 3.26074 4.38127 3.615 4.38127C3.96871 4.38127 4.25573 4.67046 4.25573 5.0273C4.25573 5.384 3.96871 5.67333 3.615 5.67333ZM7.22916 5.67319C6.87517 5.67319 6.58816 5.384 6.58816 5.0273C6.58816 4.67046 6.87517 4.38127 7.22916 4.38127C7.58314 4.38127 7.87016 4.67046 7.87016 5.0273C7.87016 5.384 7.58314 5.67319 7.22916 5.67319Z",fill:"currentColor"})),ine="/assets/contacts-bg-light.cb74ec2d.png",ane="/assets/contacts-bg.8f1c48f1.png",one="/assets/tooltip-wechat.323f7278.svg",sne=ke.section` padding: 40px ${xi}; color: ${({mode:e})=>e==="dark"?Fe.LIGHT_GREY:Fe.LIGHT_BLACK}; background-color: ${({mode:e})=>e==="dark"?Fe.BLACK:Fe.WHITE}; background-image: ${({mode:e})=>e==="dark"?`url(${ane})`:`url(${ine})`}; background-repeat: no-repeat; background-size: 100% 100%; @media ${Ee.TABLET} { padding: 50px ${xi}; } @media ${Ee.LAPTOP} { padding-top: 100px; padding-bottom: 75px; padding-left: ${Ra}; padding-right: ${Ra}; } @media ${Ee.LAPTOP_LARGE} { padding-top: 90px; padding-bottom: 125px; padding-left: ${_i}; padding-right: ${_i}; } `,fne=ke.div` max-width: ${Ao}; margin: 0 auto; @media ${Ee.LAPTOP} { display: flex; } `,une=ke.h2` margin-bottom: 24px; box-sizing: border-box; ${A2}; font-famiy: 'Futura'; width: calc((100% + 30px) / 12 * 10 - 30px); @media ${Ee.MOBILE_LARGE} { width: calc((100% + 30px) / 12 * 8 - 30px); } @media ${Ee.TABLET} { width: 100%; } @media ${Ee.LAPTOP} { width: calc((100% + 30px) / 12 * 7 - 30px); margin-right: calc((100% + 30px) / 12 * 1 + 30px); padding-left: 0; } @media ${Ee.DESKTOP} { width: calc((100% + 30px) / 12 * 5 - 30px); margin-right: calc((100% + 30px) / 12 * 2); } `,lne=ke.div` @media ${Ee.TABLET} { box-sizing: border-box; width: calc((100% + 30px) / 8 * 3 - 30px); padding-right: 40px; white-space: nowrap; } @media ${Ee.LAPTOP} { width: calc((100% + 30px) / 12 * 4 - 30px); padding-right: 0; } @media ${Ee.DESKTOP} { width: calc((100% + 30px) / 12 * 5); } `,hne=ke.div` display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; margin-bottom: 30px; @media ${Ee.MOBILE_LARGE} { justify-content: flex-start; flex-direction: row; width: 100%; margin-left: 0; margin-bottom: 40px; gap: 40px; } @media ${Ee.TABLET} { margin-bottom: 30px; gap: 100px; } @media ${Ee.LAPTOP} { flex-direction: column; align-items: flex-start; gap: 0; margin-left: 0; margin-right: 0; margin-bottom: 55px; } `,JA=ke.div` visibility: hidden; position: absolute; background-image: url(${one}); background-repeat: no-repeat; background-size: 135px 141px; width: 135px; height: 141px; bottom: 0; left: -15px; @media ${Ee.MOBILE_LARGE} { bottom: 5px; } @media ${Ee.TABLET} { bottom: 10px; } @media ${Ee.LAPTOP} { background-size: 156px 163px; width: 156px; height: 163px; bottom: 20px; left: -20px; } @media ${Ee.DESKTOP} { background-size: 167px 175px; width: 167px; height: 175px; } `,Tv=ke.a` display: flex; cursor: pointer; padding-top: 15px; padding-bitton: 10px; ${st.BODY6}; color: ${({mode:e})=>e==="dark"?Fe.LIGHT_GREY:Fe.LIGHT_BLACK}; ${({mode:e})=>el(e==="dark"?Fe.LIGHT_GREY:Fe.LIGHT_BLACK)}; & svg { fill: ${Fe.WHITE}; margin-top: 2px; margin-right: 10px; @media ${Ee.MOBILE_LARGE} { margin-top: 4px; } @media ${Ee.LAPTOP} { margin-top: 7px; } } @media ${Ee.MOBILE_LARGE} { margin: 0; ${st.BODY5}; } @media ${Ee.TABLET} { margin: 8px 0; } @media ${Ee.LAPTOP} { margin: 12px 0; ${st.BODY3}; } `,cne=ke.div` position: relative; &:hover ${JA} { visibility: visible; } `,dne=()=>ZA(),pne=({mode:e,contacts:t,telegramLink:r,emailLink:n})=>j.createElement(sne,{mode:e},j.createElement(fne,null,j.createElement(une,null,t==null?void 0:t.title),j.createElement(lne,null,j.createElement(hne,null,j.createElement(Tv,{href:r,mode:e,target:"_blank",rel:"noopener noreferrer"},j.createElement(KA,null),"Telegram"),j.createElement(Tv,{href:`mailto:${n}`,mode:e,target:"_blank",rel:"noopener noreferrer"},j.createElement(rne,null),t==null?void 0:t.email),j.createElement(cne,null,j.createElement(Tv,{mode:e},j.createElement(nne,null),"WeChat"),j.createElement(JA,null))),j.createElement(Hc,{href:t==null?void 0:t.requestButtonHref,text:t==null?void 0:t.requestButtonText,onClick:dne})))),vne=()=>j.createElement(wre,null,j.createElement(yre,{common:fn}),j.createElement(qte,null),j.createElement(pne,{contacts:fn==null?void 0:fn.contacts,telegramLink:fn==null?void 0:fn.telegramChatLink,emailLink:fn==null?void 0:fn.socialEmailLink,mode:"dark"}),j.createElement(tne,{common:fn}));Rv.createRoot(document.getElementById("root")).render(j.createElement(j.StrictMode,null,j.createElement(vne,null)))});export default mne();